@sapui5/sap.rules.ui 1.121.0 → 1.123.0
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/package.json +1 -1
- package/src/sap/rules/ui/.library +1 -1
- package/src/sap/rules/ui/AstExpressionBasic.js +25 -18
- package/src/sap/rules/ui/AstExpressionBasicRenderer.js +6 -4
- package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +36 -34
- package/src/sap/rules/ui/BindingSpy.js +3 -4
- package/src/sap/rules/ui/DecisionTable.js +113 -74
- package/src/sap/rules/ui/DecisionTableCell.js +67 -34
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +17 -13
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +40 -32
- package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +21 -19
- package/src/sap/rules/ui/DecisionTableConfiguration.js +5 -6
- package/src/sap/rules/ui/DecisionTableRenderer.js +6 -5
- package/src/sap/rules/ui/DecisionTableSettings.js +264 -232
- package/src/sap/rules/ui/DecisionTableSettingsOld.js +61 -61
- package/src/sap/rules/ui/ExpressionAdvanced.js +135 -111
- package/src/sap/rules/ui/ExpressionBase.js +1 -1
- package/src/sap/rules/ui/ExpressionBasic.js +17 -12
- package/src/sap/rules/ui/InstructionRenderer.js +30 -26
- package/src/sap/rules/ui/RuleBase.js +2 -3
- package/src/sap/rules/ui/RuleBuilder.js +29 -23
- package/src/sap/rules/ui/TextRule.js +78 -62
- package/src/sap/rules/ui/TextRuleConfiguration.js +2 -3
- package/src/sap/rules/ui/TextRuleSettings.js +133 -116
- package/src/sap/rules/ui/ast/autoComplete/AutoComplete.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +15 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +15 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +26 -17
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +75 -53
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +35 -23
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +93 -73
- package/src/sap/rules/ui/ast/util/AggregateFunctionDialog.js +172 -157
- package/src/sap/rules/ui/ast/util/LoopFunctionDialog.js +186 -163
- package/src/sap/rules/ui/ast/util/SelectFunctionDialog.js +205 -182
- package/src/sap/rules/ui/ast/util/utilsBase.js +85 -0
- package/src/sap/rules/ui/codemirror/addon/hint/show-hint.js +8 -4
- package/src/sap/rules/ui/i18n/messagebundle.properties +9 -1
- package/src/sap/rules/ui/i18n/messagebundle_ar.properties +1 -1
- package/src/sap/rules/ui/i18n/messagebundle_cnr.properties +34 -34
- package/src/sap/rules/ui/i18n/messagebundle_en_US_saprigi.properties +285 -285
- package/src/sap/rules/ui/i18n/messagebundle_hu.properties +1 -1
- package/src/sap/rules/ui/i18n/messagebundle_mk.properties +3 -3
- package/src/sap/rules/ui/i18n/messagebundle_sh.properties +88 -88
- package/src/sap/rules/ui/i18n/messagebundle_uk.properties +5 -5
- package/src/sap/rules/ui/library.js +6 -7
- package/src/sap/rules/ui/parser/businessLanguage/lib/IDPParser.js +115 -114
- package/src/sap/rules/ui/parser/businessLanguage/lib/antlr3_all_min.js +4 -4
- package/src/sap/rules/ui/parser/businessLanguage/lib/autoCompleteUtils.js +4 -3
- package/src/sap/rules/ui/parser/businessLanguage/lib/conversionUtils.js +10 -6
- package/src/sap/rules/ui/parser/businessLanguage/lib/entityModel.js +8 -7
- package/src/sap/rules/ui/parser/businessLanguage/lib/entityModelConstractor.js +17 -16
- package/src/sap/rules/ui/parser/businessLanguage/lib/parsingBackendMediator.js +10 -9
- package/src/sap/rules/ui/parser/businessLanguage/lib/termsUtils.js +4 -3
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_cnr.properties +57 -57
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_en_US_saprigi.properties +210 -210
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_mk.properties +1 -1
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +90 -90
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +1 -1
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_uk.properties +2 -2
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_cnr.properties +19 -19
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_en_US_saprigi.properties +26 -26
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_mk.properties +2 -2
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
- package/src/sap/rules/ui/parser/infrastructure/errorHandling/hrfException.js +3 -3
- package/src/sap/rules/ui/parser/infrastructure/locale/lib/resourceBundleContext.js +4 -3
- package/src/sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector.js +8 -7
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBody.js +8 -7
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyConvertor.js +4 -3
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyValidator.js +9 -8
- package/src/sap/rules/ui/providers/ValueHelpDialogProvider.js +63 -46
- package/src/sap/rules/ui/providers/ValueHelpProvider.js +8 -7
- package/src/sap/rules/ui/services/AstExpressionLanguage.js +12 -10
- package/src/sap/rules/ui/services/ExpressionLanguage.js +89 -83
- package/src/sap/rules/ui/type/DecisionTableCell.js +2 -2
- package/src/sap/rules/ui/type/DecisionTableHeader.js +3 -3
- package/src/sap/rules/ui/type/Expression.js +3 -3
- package/src/sap/rules/ui/type/ExpressionAbs.js +5 -5
|
@@ -2,9 +2,20 @@ sap.ui.define([
|
|
|
2
2
|
"sap/ui/core/Control",
|
|
3
3
|
"sap/m/List",
|
|
4
4
|
"sap/ui/model/json/JSONModel",
|
|
5
|
-
"sap/rules/ui/ast/constants/Constants"
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
"sap/rules/ui/ast/constants/Constants",
|
|
6
|
+
"sap/m/Select",
|
|
7
|
+
"sap/ui/layout/GridData",
|
|
8
|
+
"sap/ui/core/ListItem",
|
|
9
|
+
"sap/m/MultiComboBox",
|
|
10
|
+
"sap/m/TextArea",
|
|
11
|
+
"sap/m/Text",
|
|
12
|
+
"sap/ui/layout/form/SimpleForm",
|
|
13
|
+
"sap/m/Button",
|
|
14
|
+
"sap/m/Label",
|
|
15
|
+
"sap/m/Dialog",
|
|
16
|
+
"sap/ui/core/Lib",
|
|
17
|
+
"sap/ui/core/Element"
|
|
18
|
+
], function (Control, List, JSONModel, Constants, Select, GridData, ListItem, MultiComboBox, TextArea, Text, SimpleForm, Button, Label, Dialog, coreLib, Element) {
|
|
8
19
|
"use strict";
|
|
9
20
|
|
|
10
21
|
var instance;
|
|
@@ -19,7 +30,7 @@ sap.ui.define([
|
|
|
19
30
|
this.displayTextVocabulary = "";
|
|
20
31
|
this.jsonDataArray = [];
|
|
21
32
|
this.groupBySelectEnable = true;
|
|
22
|
-
this.oBundle =
|
|
33
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
23
34
|
};
|
|
24
35
|
|
|
25
36
|
AggregateFunctionDialog.prototype._filterAggregateFunction = function (aggregateFunction) {
|
|
@@ -39,13 +50,13 @@ sap.ui.define([
|
|
|
39
50
|
AggregateFunctionDialog.prototype._createFunctionSelectionDropDown = function (aggregateFunction, sAriaValue) {
|
|
40
51
|
var that = this;
|
|
41
52
|
aggregateFunction = this._filterAggregateFunction(aggregateFunction);
|
|
42
|
-
var model = new
|
|
53
|
+
var model = new JSONModel(aggregateFunction);
|
|
43
54
|
|
|
44
|
-
this.functionSelect = new
|
|
55
|
+
this.functionSelect = new Select({
|
|
45
56
|
selectedKey: this._aggregateFunctionSelected,
|
|
46
57
|
forceSelection: false,
|
|
47
58
|
showSecondaryValues: true,
|
|
48
|
-
layoutData: new
|
|
59
|
+
layoutData: new GridData({
|
|
49
60
|
span: "L3 M3 S12"
|
|
50
61
|
}),
|
|
51
62
|
ariaLabelledBy: sAriaValue,
|
|
@@ -70,7 +81,7 @@ sap.ui.define([
|
|
|
70
81
|
this.functionSelect.bindItems({
|
|
71
82
|
path: "/aggregate",
|
|
72
83
|
//sorter : new sap.ui.model.Sorter("lastName"),
|
|
73
|
-
template: new
|
|
84
|
+
template: new ListItem({
|
|
74
85
|
text: "{name}",
|
|
75
86
|
key: "{name}",
|
|
76
87
|
additionalText: "{label}"
|
|
@@ -111,10 +122,10 @@ sap.ui.define([
|
|
|
111
122
|
return bIsAttributeFieldEnabled;
|
|
112
123
|
};
|
|
113
124
|
|
|
114
|
-
AggregateFunctionDialog.prototype._createVocabularyAstExpression = function (sAriaValue) {
|
|
125
|
+
AggregateFunctionDialog.prototype._createVocabularyAstExpression = function (sAriaValue, AstExpressionBasic) {
|
|
115
126
|
var that = this;
|
|
116
127
|
var jsonData = [];
|
|
117
|
-
this.astExpressionBasicForVocabulary = new
|
|
128
|
+
this.astExpressionBasicForVocabulary = new AstExpressionBasic({
|
|
118
129
|
value: this._vocabularyExpressionId,
|
|
119
130
|
jsonData: this.jsonDataArray,
|
|
120
131
|
astExpressionLanguage: this._oAstExpressionLanguage,
|
|
@@ -272,9 +283,9 @@ sap.ui.define([
|
|
|
272
283
|
}
|
|
273
284
|
};
|
|
274
285
|
|
|
275
|
-
AggregateFunctionDialog.prototype._createAttributeAstExpressionBasic = function (sAriaValue) {
|
|
286
|
+
AggregateFunctionDialog.prototype._createAttributeAstExpressionBasic = function (sAriaValue,AstExpressionBasic) {
|
|
276
287
|
var that = this;
|
|
277
|
-
this.astExpressionBasicForAttributes = new
|
|
288
|
+
this.astExpressionBasicForAttributes = new AstExpressionBasic({
|
|
278
289
|
value: this._attributeId,
|
|
279
290
|
astExpressionLanguage: this._oAstExpressionLanguage,
|
|
280
291
|
dataObjectInfo: this._getDataObjectInfoForAttribute(),
|
|
@@ -295,13 +306,13 @@ sap.ui.define([
|
|
|
295
306
|
return this.astExpressionBasicForAttributes;
|
|
296
307
|
};
|
|
297
308
|
|
|
298
|
-
AggregateFunctionDialog.prototype._createWhereAstExpressionBasic = function (sAriaValue) {
|
|
309
|
+
AggregateFunctionDialog.prototype._createWhereAstExpressionBasic = function (sAriaValue, AstExpressionBasic) {
|
|
299
310
|
var that = this;
|
|
300
|
-
this.oModel = new
|
|
311
|
+
this.oModel = new JSONModel();
|
|
301
312
|
this.oModel.setData({
|
|
302
313
|
value: this._whereExpressionId,
|
|
303
314
|
});
|
|
304
|
-
this.astExpressionBasicForWhere = new
|
|
315
|
+
this.astExpressionBasicForWhere = new AstExpressionBasic({
|
|
305
316
|
astExpressionLanguage: this._oAstExpressionLanguage,
|
|
306
317
|
enableAggregateFunctionWhereClause: true,
|
|
307
318
|
value: this._whereExpressionId,
|
|
@@ -319,7 +330,7 @@ sap.ui.define([
|
|
|
319
330
|
|
|
320
331
|
AggregateFunctionDialog.prototype._createGroupByDropDown = function (sAriaValue) {
|
|
321
332
|
var that = this;
|
|
322
|
-
this.groupBySelect = new
|
|
333
|
+
this.groupBySelect = new MultiComboBox({
|
|
323
334
|
showSecondaryValues: true,
|
|
324
335
|
enabled: that._enableFieldGroupBy(),
|
|
325
336
|
ariaLabelledBy: sAriaValue,
|
|
@@ -333,7 +344,7 @@ sap.ui.define([
|
|
|
333
344
|
}).addStyleClass("sapAstExpressionDialogField");
|
|
334
345
|
this.groupBySelect.bindItems({
|
|
335
346
|
path: "/terms",
|
|
336
|
-
template: new
|
|
347
|
+
template: new ListItem({
|
|
337
348
|
text: "{label}",
|
|
338
349
|
key: "{id}"
|
|
339
350
|
})
|
|
@@ -354,7 +365,7 @@ sap.ui.define([
|
|
|
354
365
|
var autoSuggestion = this._getSuggestionsForTheGivenInput(this.dataObjectId);
|
|
355
366
|
}
|
|
356
367
|
var attributeJson = this._getAttributesForGroupBy(autoSuggestion.autoComplete.categories);
|
|
357
|
-
var model = new
|
|
368
|
+
var model = new JSONModel(attributeJson);
|
|
358
369
|
this.groupBySelect.setModel(model);
|
|
359
370
|
}
|
|
360
371
|
if (this.groupBySelected) {
|
|
@@ -378,7 +389,7 @@ sap.ui.define([
|
|
|
378
389
|
};
|
|
379
390
|
|
|
380
391
|
AggregateFunctionDialog.prototype._createFunctionLabel = function () {
|
|
381
|
-
this.functionLabelField = new
|
|
392
|
+
this.functionLabelField = new TextArea({
|
|
382
393
|
value: this.functionLabelDisplay,
|
|
383
394
|
enabled: false,
|
|
384
395
|
width: "100%",
|
|
@@ -413,147 +424,151 @@ sap.ui.define([
|
|
|
413
424
|
AggregateFunctionDialog.prototype._createAggregationFunctionDialog = function (data, callBack, AstExpressionLanguage, dialogOpenedCallbackReference, jsonData) {
|
|
414
425
|
var that = this;
|
|
415
426
|
this._clearData();
|
|
416
|
-
this.oBundle =
|
|
427
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
417
428
|
this._oAstExpressionLanguage = AstExpressionLanguage;
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
var oFunctionSelect = that._createFunctionSelectionDropDown(data,"aggregateFunctionSelectLabelId");
|
|
442
|
-
var oVocabularyText = new sap.m.Text({
|
|
443
|
-
text: that.oBundle.getText("vocabulary"),
|
|
444
|
-
tooltip: that.oBundle.getText("vocabulary"),
|
|
445
|
-
textAlign: "End",
|
|
446
|
-
width: "90%",
|
|
447
|
-
layoutData: new sap.ui.layout.GridData({
|
|
448
|
-
span: "L2 M2 S12"
|
|
449
|
-
})
|
|
450
|
-
});
|
|
451
|
-
var oWhereControl = that._createWhereAstExpressionBasic("aggregateWhereLabelId");
|
|
452
|
-
var oGroupByControl = that._createGroupByDropDown("aggregateGroupByLabelId");
|
|
453
|
-
var oAttributeControl = that._createAttributeAstExpressionBasic("aggregateAttributeLabelId");
|
|
454
|
-
var oFunctionLabelControl = that._createFunctionLabel("aggregateFunctionLabelId");
|
|
455
|
-
|
|
456
|
-
var verticalLayoutForAggregateFunction = new sap.ui.layout.form.SimpleForm({
|
|
457
|
-
layout: sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout,
|
|
458
|
-
editable: true,
|
|
459
|
-
content: [
|
|
460
|
-
new sap.m.Label("aggregateFunctionSelectLabelId",{
|
|
461
|
-
text: that.oBundle.getText("function"),
|
|
462
|
-
tooltip: that.oBundle.getText("function"),
|
|
463
|
-
labelFor: oFunctionSelect.getId()
|
|
464
|
-
}), oFunctionSelect,
|
|
465
|
-
|
|
466
|
-
oVocabularyText,
|
|
467
|
-
that._createVocabularyAstExpression(oVocabularyText.getId()),
|
|
468
|
-
|
|
469
|
-
new sap.m.Label("aggregateAttributeLabelId",{
|
|
470
|
-
text: that.oBundle.getText("attribute"),
|
|
471
|
-
tooltip: that.oBundle.getText("attribute"),
|
|
472
|
-
labelFor: oAttributeControl.getId()
|
|
473
|
-
}),
|
|
474
|
-
oAttributeControl,
|
|
475
|
-
|
|
476
|
-
new sap.m.Label("aggregateWhereLabelId",{
|
|
477
|
-
text: that.oBundle.getText("where"),
|
|
478
|
-
tooltip: that.oBundle.getText("where"),
|
|
479
|
-
labelFor: oWhereControl.getId()
|
|
480
|
-
}),
|
|
481
|
-
oWhereControl,
|
|
482
|
-
new sap.m.Label("aggregateGroupByLabelId",{
|
|
483
|
-
text: that.oBundle.getText("group_by"),
|
|
484
|
-
tooltip: that.oBundle.getText("group_by"),
|
|
485
|
-
labelFor: oGroupByControl.getId()
|
|
486
|
-
}),
|
|
487
|
-
oGroupByControl,
|
|
488
|
-
new sap.m.Label("aggregateFunctionLabelId",{
|
|
489
|
-
text: that.oBundle.getText("function_label"),
|
|
490
|
-
tooltip: that.oBundle.getText("function_label"),
|
|
491
|
-
labelFor: oFunctionLabelControl.getId()
|
|
492
|
-
}).addStyleClass("sapAstDialogLabelMargin"),
|
|
493
|
-
oFunctionLabelControl
|
|
494
|
-
]
|
|
495
|
-
});
|
|
429
|
+
sap.ui.require([
|
|
430
|
+
"sap/rules/ui/AstExpressionBasic"
|
|
431
|
+
], (AstExpressionBasic) => {
|
|
432
|
+
if (jsonData) {
|
|
433
|
+
this._whereExpressionId = jsonData.filter;
|
|
434
|
+
this._aggregateFunctionSelected = jsonData.function;
|
|
435
|
+
this._attributeId = jsonData.attribute;
|
|
436
|
+
this.functionLabel = jsonData.functionLabel;
|
|
437
|
+
this.functionLabelDisplay = this._convertFunctionLabelToText(jsonData.dataObject, jsonData.functionLabel);
|
|
438
|
+
if (jsonData.groupBy) {
|
|
439
|
+
for (var i = 0; i < jsonData.groupBy.length; i++) {
|
|
440
|
+
this.groupBySelected.push(jsonData.groupBy[i].replace("./", ""));
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
this._groupBy = jsonData.groupBy;
|
|
444
|
+
this.dataObjectId = jsonData.dataObject;
|
|
445
|
+
if (typeof jsonData.vocabulary === "object" || jsonData.vocabulary instanceof Object) {
|
|
446
|
+
this._vocabularyExpressionId = jsonData.selectExpression;
|
|
447
|
+
this.jsonDataArray = [jsonData.vocabulary];
|
|
448
|
+
} else {
|
|
449
|
+
this._vocabularyExpressionId = jsonData.vocabulary;
|
|
450
|
+
}
|
|
451
|
+
this.groupBySelectEnable = (this._aggregateFunctionSelected !== Constants.COUNTDISTINCT && this._aggregateFunctionSelected !== Constants.DISTINCT) ? true : false;
|
|
496
452
|
|
|
497
|
-
var aggregateFunctionsDialog = new sap.m.Dialog({
|
|
498
|
-
title: this.oBundle.getText("configure_aggr_title"),
|
|
499
|
-
contentWidth: "800px",
|
|
500
|
-
showHeader: true,
|
|
501
|
-
afterOpen: function () {
|
|
502
|
-
that.astExpressionBasicForWhere.setValue(that._whereExpressionId);
|
|
503
|
-
},
|
|
504
|
-
beforeClose: function () {
|
|
505
|
-
dialogOpenedCallbackReference(false);
|
|
506
|
-
},
|
|
507
|
-
content: [verticalLayoutForAggregateFunction],
|
|
508
|
-
buttons: [
|
|
509
|
-
this.applyButton = new sap.m.Button({
|
|
510
|
-
text: that.oBundle.getText("apply"),
|
|
511
|
-
enabled: that._enableField(),
|
|
512
|
-
tooltip: that.oBundle.getText("applyChangesBtnTooltip"),
|
|
513
|
-
press: function (event) {
|
|
514
|
-
if (that._isDataObjectStructure() || that._isDataObjectElement()) {
|
|
515
|
-
that.astExpressionBasicForVocabulary.setValueState("Error");
|
|
516
|
-
that.astExpressionBasicForVocabulary.setValueStateText(that.oBundle.getText("StructureElementNotSupported"));
|
|
517
|
-
} else {
|
|
518
|
-
that.astExpressionBasicForVocabulary.setValueState("None");
|
|
519
|
-
if (that.jsonDataArray && that.jsonDataArray.length > 0) {
|
|
520
|
-
var whereExpressionId = that._whereExpressionId;
|
|
521
|
-
var attributeId = that._attributeId;
|
|
522
|
-
var groupBy = that._groupBy;
|
|
523
|
-
var aggregateFunctionData = that._createJson(that._aggregateFunctionSelected, that.jsonDataArray[0],
|
|
524
|
-
whereExpressionId, groupBy, that.functionLabel, that.dataObjectId, attributeId);
|
|
525
|
-
} else {
|
|
526
|
-
var whereExpressionId = that._whereExpressionId;
|
|
527
|
-
var attributeId = that._attributeId;
|
|
528
|
-
var groupBy = that._groupBy
|
|
529
|
-
var aggregateFunctionData = that._createJson(that._aggregateFunctionSelected, that._vocabularyExpressionId,
|
|
530
|
-
whereExpressionId, groupBy, that.functionLabel, that.dataObjectId, attributeId);
|
|
531
453
|
}
|
|
532
454
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
455
|
+
var oFunctionSelect = that._createFunctionSelectionDropDown(data,"aggregateFunctionSelectLabelId");
|
|
456
|
+
var oVocabularyText = new Text({
|
|
457
|
+
text: that.oBundle.getText("vocabulary"),
|
|
458
|
+
tooltip: that.oBundle.getText("vocabulary"),
|
|
459
|
+
textAlign: "End",
|
|
460
|
+
width: "90%",
|
|
461
|
+
layoutData: new GridData({
|
|
462
|
+
span: "L2 M2 S12"
|
|
463
|
+
})
|
|
464
|
+
});
|
|
465
|
+
var oWhereControl = that._createWhereAstExpressionBasic("aggregateWhereLabelId", AstExpressionBasic);
|
|
466
|
+
var oGroupByControl = that._createGroupByDropDown("aggregateGroupByLabelId");
|
|
467
|
+
var oAttributeControl = that._createAttributeAstExpressionBasic("aggregateAttributeLabelId", AstExpressionBasic);
|
|
468
|
+
var oFunctionLabelControl = that._createFunctionLabel("aggregateFunctionLabelId");
|
|
469
|
+
|
|
470
|
+
var verticalLayoutForAggregateFunction = new SimpleForm({
|
|
471
|
+
layout: "ResponsiveGridLayout",
|
|
472
|
+
editable: true,
|
|
473
|
+
content: [
|
|
474
|
+
new Label("aggregateFunctionSelectLabelId",{
|
|
475
|
+
text: that.oBundle.getText("function"),
|
|
476
|
+
tooltip: that.oBundle.getText("function"),
|
|
477
|
+
labelFor: oFunctionSelect.getId()
|
|
478
|
+
}), oFunctionSelect,
|
|
479
|
+
|
|
480
|
+
oVocabularyText,
|
|
481
|
+
that._createVocabularyAstExpression(oVocabularyText.getId(), AstExpressionBasic),
|
|
482
|
+
|
|
483
|
+
new Label("aggregateAttributeLabelId",{
|
|
484
|
+
text: that.oBundle.getText("attribute"),
|
|
485
|
+
tooltip: that.oBundle.getText("attribute"),
|
|
486
|
+
labelFor: oAttributeControl.getId()
|
|
487
|
+
}),
|
|
488
|
+
oAttributeControl,
|
|
489
|
+
|
|
490
|
+
new Label("aggregateWhereLabelId",{
|
|
491
|
+
text: that.oBundle.getText("where"),
|
|
492
|
+
tooltip: that.oBundle.getText("where"),
|
|
493
|
+
labelFor: oWhereControl.getId()
|
|
494
|
+
}),
|
|
495
|
+
oWhereControl,
|
|
496
|
+
new Label("aggregateGroupByLabelId",{
|
|
497
|
+
text: that.oBundle.getText("group_by"),
|
|
498
|
+
tooltip: that.oBundle.getText("group_by"),
|
|
499
|
+
labelFor: oGroupByControl.getId()
|
|
500
|
+
}),
|
|
501
|
+
oGroupByControl,
|
|
502
|
+
new Label("aggregateFunctionLabelId",{
|
|
503
|
+
text: that.oBundle.getText("function_label"),
|
|
504
|
+
tooltip: that.oBundle.getText("function_label"),
|
|
505
|
+
labelFor: oFunctionLabelControl.getId()
|
|
506
|
+
}).addStyleClass("sapAstDialogLabelMargin"),
|
|
507
|
+
oFunctionLabelControl
|
|
508
|
+
]
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
var aggregateFunctionsDialog = new Dialog({
|
|
512
|
+
title: this.oBundle.getText("configure_aggr_title"),
|
|
513
|
+
contentWidth: "800px",
|
|
514
|
+
showHeader: true,
|
|
515
|
+
afterOpen: function () {
|
|
516
|
+
that.astExpressionBasicForWhere.setValue(that._whereExpressionId);
|
|
517
|
+
},
|
|
518
|
+
beforeClose: function () {
|
|
519
|
+
dialogOpenedCallbackReference(false);
|
|
520
|
+
},
|
|
521
|
+
content: [verticalLayoutForAggregateFunction],
|
|
522
|
+
buttons: [
|
|
523
|
+
this.applyButton = new Button({
|
|
524
|
+
text: that.oBundle.getText("apply"),
|
|
525
|
+
enabled: that._enableField(),
|
|
526
|
+
tooltip: that.oBundle.getText("applyChangesBtnTooltip"),
|
|
527
|
+
press: function (event) {
|
|
528
|
+
if (that._isDataObjectStructure() || that._isDataObjectElement()) {
|
|
529
|
+
that.astExpressionBasicForVocabulary.setValueState("Error");
|
|
530
|
+
that.astExpressionBasicForVocabulary.setValueStateText(that.oBundle.getText("StructureElementNotSupported"));
|
|
531
|
+
} else {
|
|
532
|
+
that.astExpressionBasicForVocabulary.setValueState("None");
|
|
533
|
+
if (that.jsonDataArray && that.jsonDataArray.length > 0) {
|
|
534
|
+
var whereExpressionId = that._whereExpressionId;
|
|
535
|
+
var attributeId = that._attributeId;
|
|
536
|
+
var groupBy = that._groupBy;
|
|
537
|
+
var aggregateFunctionData = that._createJson(that._aggregateFunctionSelected, that.jsonDataArray[0],
|
|
538
|
+
whereExpressionId, groupBy, that.functionLabel, that.dataObjectId, attributeId);
|
|
539
|
+
} else {
|
|
540
|
+
var whereExpressionId = that._whereExpressionId;
|
|
541
|
+
var attributeId = that._attributeId;
|
|
542
|
+
var groupBy = that._groupBy
|
|
543
|
+
var aggregateFunctionData = that._createJson(that._aggregateFunctionSelected, that._vocabularyExpressionId,
|
|
544
|
+
whereExpressionId, groupBy, that.functionLabel, that.dataObjectId, attributeId);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
event.getSource().mProperties = {
|
|
548
|
+
value: that.functionLabel,
|
|
549
|
+
jsonData: aggregateFunctionData
|
|
550
|
+
};
|
|
551
|
+
callBack(event);
|
|
552
|
+
that._setModal(false);
|
|
553
|
+
aggregateFunctionsDialog.close();
|
|
554
|
+
aggregateFunctionsDialog.destroy();
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}),
|
|
558
|
+
new Button({
|
|
559
|
+
text: that.oBundle.getText("cancel"),
|
|
560
|
+
tooltip: that.oBundle.getText("cancelBtnTooltip"),
|
|
561
|
+
press: function (event) {
|
|
562
|
+
that._setModal(false);
|
|
563
|
+
aggregateFunctionsDialog.close();
|
|
564
|
+
aggregateFunctionsDialog.destroy();
|
|
565
|
+
}
|
|
566
|
+
})
|
|
567
|
+
]
|
|
568
|
+
}).addStyleClass("sapUiSizeCompact");
|
|
569
|
+
this._setModal(true);
|
|
570
|
+
aggregateFunctionsDialog.open();
|
|
571
|
+
});
|
|
557
572
|
};
|
|
558
573
|
|
|
559
574
|
AggregateFunctionDialog.prototype._returnDataObjectBasedOnType = function (vocabId) {
|
|
@@ -637,7 +652,7 @@ sap.ui.define([
|
|
|
637
652
|
};
|
|
638
653
|
|
|
639
654
|
AggregateFunctionDialog.prototype._setModal = function (value) {
|
|
640
|
-
var pop =
|
|
655
|
+
var pop = Element.getElementById("popover");
|
|
641
656
|
if (pop) {
|
|
642
657
|
pop.setModal(value);
|
|
643
658
|
}
|