@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.
Files changed (87) hide show
  1. package/package.json +1 -1
  2. package/src/sap/rules/ui/.library +1 -1
  3. package/src/sap/rules/ui/AstExpressionBasic.js +25 -18
  4. package/src/sap/rules/ui/AstExpressionBasicRenderer.js +6 -4
  5. package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +36 -34
  6. package/src/sap/rules/ui/BindingSpy.js +3 -4
  7. package/src/sap/rules/ui/DecisionTable.js +113 -74
  8. package/src/sap/rules/ui/DecisionTableCell.js +67 -34
  9. package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +17 -13
  10. package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +40 -32
  11. package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +21 -19
  12. package/src/sap/rules/ui/DecisionTableConfiguration.js +5 -6
  13. package/src/sap/rules/ui/DecisionTableRenderer.js +6 -5
  14. package/src/sap/rules/ui/DecisionTableSettings.js +264 -232
  15. package/src/sap/rules/ui/DecisionTableSettingsOld.js +61 -61
  16. package/src/sap/rules/ui/ExpressionAdvanced.js +135 -111
  17. package/src/sap/rules/ui/ExpressionBase.js +1 -1
  18. package/src/sap/rules/ui/ExpressionBasic.js +17 -12
  19. package/src/sap/rules/ui/InstructionRenderer.js +30 -26
  20. package/src/sap/rules/ui/RuleBase.js +2 -3
  21. package/src/sap/rules/ui/RuleBuilder.js +29 -23
  22. package/src/sap/rules/ui/TextRule.js +78 -62
  23. package/src/sap/rules/ui/TextRuleConfiguration.js +2 -3
  24. package/src/sap/rules/ui/TextRuleSettings.js +133 -116
  25. package/src/sap/rules/ui/ast/autoComplete/AutoComplete.js +4 -3
  26. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +15 -10
  27. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +14 -9
  28. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +14 -10
  29. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +15 -11
  30. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +26 -17
  31. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +75 -53
  32. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +14 -10
  33. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +14 -10
  34. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +14 -9
  35. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +14 -10
  36. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +14 -10
  37. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +14 -10
  38. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +14 -10
  39. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +14 -9
  40. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +35 -23
  41. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +93 -73
  42. package/src/sap/rules/ui/ast/util/AggregateFunctionDialog.js +172 -157
  43. package/src/sap/rules/ui/ast/util/LoopFunctionDialog.js +186 -163
  44. package/src/sap/rules/ui/ast/util/SelectFunctionDialog.js +205 -182
  45. package/src/sap/rules/ui/ast/util/utilsBase.js +85 -0
  46. package/src/sap/rules/ui/codemirror/addon/hint/show-hint.js +8 -4
  47. package/src/sap/rules/ui/i18n/messagebundle.properties +9 -1
  48. package/src/sap/rules/ui/i18n/messagebundle_ar.properties +1 -1
  49. package/src/sap/rules/ui/i18n/messagebundle_cnr.properties +34 -34
  50. package/src/sap/rules/ui/i18n/messagebundle_en_US_saprigi.properties +285 -285
  51. package/src/sap/rules/ui/i18n/messagebundle_hu.properties +1 -1
  52. package/src/sap/rules/ui/i18n/messagebundle_mk.properties +3 -3
  53. package/src/sap/rules/ui/i18n/messagebundle_sh.properties +88 -88
  54. package/src/sap/rules/ui/i18n/messagebundle_uk.properties +5 -5
  55. package/src/sap/rules/ui/library.js +6 -7
  56. package/src/sap/rules/ui/parser/businessLanguage/lib/IDPParser.js +115 -114
  57. package/src/sap/rules/ui/parser/businessLanguage/lib/antlr3_all_min.js +4 -4
  58. package/src/sap/rules/ui/parser/businessLanguage/lib/autoCompleteUtils.js +4 -3
  59. package/src/sap/rules/ui/parser/businessLanguage/lib/conversionUtils.js +10 -6
  60. package/src/sap/rules/ui/parser/businessLanguage/lib/entityModel.js +8 -7
  61. package/src/sap/rules/ui/parser/businessLanguage/lib/entityModelConstractor.js +17 -16
  62. package/src/sap/rules/ui/parser/businessLanguage/lib/parsingBackendMediator.js +10 -9
  63. package/src/sap/rules/ui/parser/businessLanguage/lib/termsUtils.js +4 -3
  64. package/src/sap/rules/ui/parser/i18n/messages_descriptions_cnr.properties +57 -57
  65. package/src/sap/rules/ui/parser/i18n/messages_descriptions_en_US_saprigi.properties +210 -210
  66. package/src/sap/rules/ui/parser/i18n/messages_descriptions_mk.properties +1 -1
  67. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +90 -90
  68. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +1 -1
  69. package/src/sap/rules/ui/parser/i18n/messages_descriptions_uk.properties +2 -2
  70. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_cnr.properties +19 -19
  71. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_en_US_saprigi.properties +26 -26
  72. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_mk.properties +2 -2
  73. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
  74. package/src/sap/rules/ui/parser/infrastructure/errorHandling/hrfException.js +3 -3
  75. package/src/sap/rules/ui/parser/infrastructure/locale/lib/resourceBundleContext.js +4 -3
  76. package/src/sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector.js +8 -7
  77. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBody.js +8 -7
  78. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyConvertor.js +4 -3
  79. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyValidator.js +9 -8
  80. package/src/sap/rules/ui/providers/ValueHelpDialogProvider.js +63 -46
  81. package/src/sap/rules/ui/providers/ValueHelpProvider.js +8 -7
  82. package/src/sap/rules/ui/services/AstExpressionLanguage.js +12 -10
  83. package/src/sap/rules/ui/services/ExpressionLanguage.js +89 -83
  84. package/src/sap/rules/ui/type/DecisionTableCell.js +2 -2
  85. package/src/sap/rules/ui/type/DecisionTableHeader.js +3 -3
  86. package/src/sap/rules/ui/type/Expression.js +3 -3
  87. 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
- ], function (Control, List, JSONModel, Constants) {
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 = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
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 sap.ui.model.json.JSONModel(aggregateFunction);
53
+ var model = new JSONModel(aggregateFunction);
43
54
 
44
- this.functionSelect = new sap.m.Select({
55
+ this.functionSelect = new Select({
45
56
  selectedKey: this._aggregateFunctionSelected,
46
57
  forceSelection: false,
47
58
  showSecondaryValues: true,
48
- layoutData: new sap.ui.layout.GridData({
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 sap.ui.core.ListItem({
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 sap.rules.ui.AstExpressionBasic({
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 sap.rules.ui.AstExpressionBasic({
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 sap.ui.model.json.JSONModel();
311
+ this.oModel = new JSONModel();
301
312
  this.oModel.setData({
302
313
  value: this._whereExpressionId,
303
314
  });
304
- this.astExpressionBasicForWhere = new sap.rules.ui.AstExpressionBasic({
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 sap.m.MultiComboBox({
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 sap.ui.core.ListItem({
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 sap.ui.model.json.JSONModel(attributeJson);
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 sap.m.TextArea({
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 = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
427
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
417
428
  this._oAstExpressionLanguage = AstExpressionLanguage;
418
- if (jsonData) {
419
- this._whereExpressionId = jsonData.filter;
420
- this._aggregateFunctionSelected = jsonData.function;
421
- this._attributeId = jsonData.attribute;
422
- this.functionLabel = jsonData.functionLabel;
423
- this.functionLabelDisplay = this._convertFunctionLabelToText(jsonData.dataObject, jsonData.functionLabel);
424
- if (jsonData.groupBy) {
425
- for (var i = 0; i < jsonData.groupBy.length; i++) {
426
- this.groupBySelected.push(jsonData.groupBy[i].replace("./", ""));
427
- }
428
- }
429
- this._groupBy = jsonData.groupBy;
430
- this.dataObjectId = jsonData.dataObject;
431
- if (typeof jsonData.vocabulary === "object" || jsonData.vocabulary instanceof Object) {
432
- this._vocabularyExpressionId = jsonData.selectExpression;
433
- this.jsonDataArray = [jsonData.vocabulary];
434
- } else {
435
- this._vocabularyExpressionId = jsonData.vocabulary;
436
- }
437
- this.groupBySelectEnable = (this._aggregateFunctionSelected !== Constants.COUNTDISTINCT && this._aggregateFunctionSelected !== Constants.DISTINCT) ? true : false;
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
- event.getSource().mProperties = {
534
- value: that.functionLabel,
535
- jsonData: aggregateFunctionData
536
- };
537
- callBack(event);
538
- that._setModal(false);
539
- aggregateFunctionsDialog.close();
540
- aggregateFunctionsDialog.destroy();
541
- }
542
- }
543
- }),
544
- new sap.m.Button({
545
- text: that.oBundle.getText("cancel"),
546
- tooltip: that.oBundle.getText("cancelBtnTooltip"),
547
- press: function (event) {
548
- that._setModal(false);
549
- aggregateFunctionsDialog.close();
550
- aggregateFunctionsDialog.destroy();
551
- }
552
- })
553
- ]
554
- }).addStyleClass("sapUiSizeCompact");
555
- this._setModal(true);
556
- aggregateFunctionsDialog.open();
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 = sap.ui.getCore().byId("popover");
655
+ var pop = Element.getElementById("popover");
641
656
  if (pop) {
642
657
  pop.setModal(value);
643
658
  }