@sapui5/sap.rules.ui 1.120.1 → 1.122.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 (88) 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 +101 -74
  8. package/src/sap/rules/ui/DecisionTableCell.js +63 -33
  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 +254 -225
  15. package/src/sap/rules/ui/DecisionTableSettingsOld.js +59 -59
  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 +1 -2
  20. package/src/sap/rules/ui/RuleBase.js +2 -3
  21. package/src/sap/rules/ui/RuleBuilder.js +23 -23
  22. package/src/sap/rules/ui/TextRule.js +70 -54
  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_ar.properties +1 -1
  48. package/src/sap/rules/ui/i18n/messagebundle_cnr.properties +301 -0
  49. package/src/sap/rules/ui/i18n/messagebundle_en_US_saprigi.properties +285 -285
  50. package/src/sap/rules/ui/i18n/messagebundle_hu.properties +1 -1
  51. package/src/sap/rules/ui/i18n/messagebundle_mk.properties +252 -252
  52. package/src/sap/rules/ui/i18n/messagebundle_sh.properties +108 -108
  53. package/src/sap/rules/ui/i18n/messagebundle_sr.properties +301 -0
  54. package/src/sap/rules/ui/i18n/messagebundle_uk.properties +5 -5
  55. package/src/sap/rules/ui/library.js +6 -6
  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 +213 -0
  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 +210 -210
  67. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +123 -123
  68. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +213 -0
  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 +50 -0
  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 +26 -26
  73. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
  74. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sr.properties +50 -0
  75. package/src/sap/rules/ui/parser/infrastructure/errorHandling/hrfException.js +3 -3
  76. package/src/sap/rules/ui/parser/infrastructure/locale/lib/resourceBundleContext.js +4 -3
  77. package/src/sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector.js +8 -7
  78. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBody.js +8 -7
  79. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyConvertor.js +4 -3
  80. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyValidator.js +9 -8
  81. package/src/sap/rules/ui/providers/ValueHelpDialogProvider.js +63 -46
  82. package/src/sap/rules/ui/providers/ValueHelpProvider.js +8 -7
  83. package/src/sap/rules/ui/services/AstExpressionLanguage.js +12 -10
  84. package/src/sap/rules/ui/services/ExpressionLanguage.js +89 -83
  85. package/src/sap/rules/ui/type/DecisionTableCell.js +2 -2
  86. package/src/sap/rules/ui/type/DecisionTableHeader.js +3 -3
  87. package/src/sap/rules/ui/type/Expression.js +3 -3
  88. package/src/sap/rules/ui/type/ExpressionAbs.js +5 -5
@@ -4,10 +4,10 @@ sap.ui.define([
4
4
  "sap/ui/core/Control",
5
5
  "sap/m/List",
6
6
  "sap/ui/model/json/JSONModel",
7
- "sap/m/ListMode",
7
+ "sap/m/library",
8
8
  "sap/ui/core/CustomData",
9
9
  "sap/ui/model/Sorter",
10
- "sap/rules/ui/parser/infrastructure/util/utilsBase",
10
+ "sap/rules/ui/ast/util/utilsBase",
11
11
  "sap/ui/core/LocaleData",
12
12
  "sap/rules/ui/Constants",
13
13
  "sap/m/DatePicker",
@@ -15,11 +15,33 @@ sap.ui.define([
15
15
  "sap/m/TimePicker",
16
16
  "sap/m/Dialog",
17
17
  "sap/m/Button",
18
+ "sap/base/i18n/Formatting",
19
+ "sap/ui/core/format/DateFormat",
20
+ "sap/ui/core/InvisibleText",
21
+ "sap/m/Input",
22
+ "sap/m/Panel",
23
+ "sap/m/ToolbarSpacer",
24
+ "sap/ui/comp/smartfilterbar/SmartFilterBar",
25
+ "sap/ui/comp/valuehelpdialog/ValueHelpDialog",
26
+ "sap/ui/core/library",
27
+ "sap/ui/model/odata/v2/ODataModel",
28
+ "sap/ui/comp/smartfilterbar/ControlConfiguration",
29
+ "sap/ui/table/Column",
30
+ "sap/ui/model/Filter",
31
+ "sap/ui/model/FilterOperator",
32
+ "sap/m/Label",
33
+ "sap/m/Text",
34
+ "sap/m/Link",
35
+ "sap/ui/core/Lib",
36
+ "sap/ui/core/BusyIndicator",
37
+ "sap/ui/core/Element",
18
38
  "./AutoSuggestionFixedValuePanelRenderer"
19
- ], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils,
20
- LocaleData, Constants, DatePicker , DateTimePicker , TimePicker, Dialog, Button, AutoSuggestionFixedValuePanelRenderer) {
39
+ ], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils,
40
+ LocaleData, Constants, DatePicker , DateTimePicker , TimePicker, Dialog, Button, Formatting, DateFormat, InvisibleText, Input, Panel, ToolbarSpacer, SmartFilterBar,
41
+ ValueHelpDialog, coreLibrary, ODataModel, ControlConfiguration, TableColumn, Filter, FilterOperator, Label, Text, Link, coreLib, BusyIndicator, Element, AutoSuggestionFixedValuePanelRenderer) {
21
42
  "use strict";
22
43
 
44
+ var ListMode = mobileLibrary.ListMode;
23
45
  var autoSuggestionFixedValuePanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionFixedValuePanel", {
24
46
  metadata: {
25
47
  library: "sap.rules.ui",
@@ -56,22 +78,22 @@ sap.ui.define([
56
78
  },
57
79
 
58
80
  init: function () {
59
- this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
81
+ this.infraUtils = new infraUtils.utilsBaseLib();
60
82
  this.needCreateLayout = true;
61
83
  this.businessDataType = "S";
62
84
  this._propertyValue = "Value";
63
85
  this._propertyDescription = "Description";
64
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
86
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
65
87
  this.vocabularyInfo = this.getVocabularyInfo();
66
88
  this.autoSuggestionData = this.getData();
67
89
 
68
90
  // Date instance which is used to convert the selected date from calendar control to short format
69
- var oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
91
+ var oLocale = Formatting.getLanguageTag();
70
92
  var oLocaleData = LocaleData.getInstance(oLocale);
71
93
 
72
- this.oFormatDate = sap.ui.core.format.DateFormat.getInstance({
94
+ this.oFormatDate = DateFormat.getInstance({
73
95
  pattern: oLocaleData.getDatePattern('short'),
74
- calendarType: sap.ui.core.CalendarType.Gregorian
96
+ calendarType: coreLibrary.CalendarType.Gregorian
75
97
  },
76
98
  oLocale
77
99
  );
@@ -110,13 +132,13 @@ sap.ui.define([
110
132
  hasValueSource = false;
111
133
  }
112
134
  //The invisible text is introduced to identify the input field by screen reader.
113
- this._invisibleTextLabel = new sap.ui.core.InvisibleText({
135
+ this._invisibleTextLabel = new InvisibleText({
114
136
  text:this.oBundle.getText("fixedValuePanelTitle")
115
137
  })
116
- this._invisibleTextDescription = new sap.ui.core.InvisibleText({
138
+ this._invisibleTextDescription = new InvisibleText({
117
139
  text:this.oBundle.getText("fixedValueInvisibleText")
118
140
  });
119
- this.fixedValueTextArea = new sap.m.Input({
141
+ this.fixedValueTextArea = new Input({
120
142
  showValueHelp: hasValueSource,
121
143
  showSuggestion: true,
122
144
  autocomplete: false,
@@ -137,7 +159,7 @@ sap.ui.define([
137
159
  width: "auto"
138
160
  });
139
161
 
140
- var fixedValuePanel = new sap.m.Panel({
162
+ var fixedValuePanel = new Panel({
141
163
  headerText: this.oBundle.getText("fixedValuePanelTitle"),
142
164
  expandable: true,
143
165
  expanded: false,
@@ -145,8 +167,8 @@ sap.ui.define([
145
167
  width: "auto"
146
168
  })
147
169
 
148
- this.toolBarSpacerAfterInput = new sap.m.ToolbarSpacer({width: "1em"});
149
- this.toolBarSpacerAfterDateLink = new sap.m.ToolbarSpacer({width: "1em"});
170
+ this.toolBarSpacerAfterInput = new ToolbarSpacer({width: "1em"});
171
+ this.toolBarSpacerAfterDateLink = new ToolbarSpacer({width: "1em"});
150
172
  this.dateContent = this._createDateLink();
151
173
  this.timeContent = this._createTimeStampLink();
152
174
  fixedValuePanel.addContent(this.toolBarSpacerAfterInput);
@@ -158,7 +180,7 @@ sap.ui.define([
158
180
  },
159
181
 
160
182
  _setModal: function (value) {
161
- var pop = sap.ui.getCore().byId("popover");
183
+ var pop = Element.getElementById("popover");
162
184
  if (pop) {
163
185
  pop.setModal(value);
164
186
  }
@@ -213,8 +235,8 @@ sap.ui.define([
213
235
  if(!expressionData.oData[attributePath]){
214
236
  valueHelpInfo.dataObjectId = this._getStructureObjectForTableType(valueHelpInfo.attributeId, valueHelpInfo);
215
237
  }
216
- sap.ui.core.BusyIndicator.show(0);
217
- this.oValueHelpDialog = new sap.ui.comp.valuehelpdialog.ValueHelpDialog({
238
+ BusyIndicator.show(0);
239
+ this.oValueHelpDialog = new ValueHelpDialog({
218
240
  supportMultiselect: false,
219
241
  supportRanges: false,
220
242
  horizontalScrolling: false,
@@ -236,7 +258,7 @@ sap.ui.define([
236
258
  that.oValueHelpDialog.close();
237
259
  that._setModal(false);
238
260
  that.oValueHelpDialog.destroy();
239
- sap.ui.core.BusyIndicator.hide();
261
+ BusyIndicator.hide();
240
262
  that._reference(oEvt);
241
263
  }.bind(this),
242
264
  cancel: function () {
@@ -244,12 +266,12 @@ sap.ui.define([
244
266
  that._setModal(false);
245
267
  that.oValueHelpDialog.close();
246
268
  that.oValueHelpDialog.destroy();
247
- sap.ui.core.BusyIndicator.hide();
269
+ BusyIndicator.hide();
248
270
  },
249
271
  afterClose: function () {
250
272
  that._dialogOpenedCallbackReference(false);
251
273
  that.oFilterBar.destroy();
252
- sap.ui.core.BusyIndicator.hide();
274
+ BusyIndicator.hide();
253
275
  }
254
276
  });
255
277
  },
@@ -334,12 +356,12 @@ sap.ui.define([
334
356
  date = formatterParsing.parse(sValue);
335
357
  }
336
358
  if (this._dateBusinessDataType === "D") {
337
- formatter = sap.ui.core.format.DateFormat.getDateInstance({
359
+ formatter = DateFormat.getDateInstance({
338
360
  pattern: "yyyy-MM-dd"
339
361
  });
340
362
  sDateFormatted = formatter.format(date);
341
363
  } else if (this._dateBusinessDataType === "U") {
342
- formatter = sap.ui.core.format.DateFormat.getDateTimeInstance({
364
+ formatter = DateFormat.getDateTimeInstance({
343
365
  pattern: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
344
366
  UTC:true
345
367
  });
@@ -356,7 +378,7 @@ sap.ui.define([
356
378
  */
357
379
  _createSmartFilterBar: function (basePath, valueHelpInfo) {
358
380
  var that = this;
359
- this.oFilterBar = new sap.ui.comp.smartfilterbar.SmartFilterBar({
381
+ this.oFilterBar = new SmartFilterBar({
360
382
  entitySet: valueHelpInfo.entitySet,
361
383
  enableBasicSearch: true,
362
384
  advancedMode: true,
@@ -370,7 +392,7 @@ sap.ui.define([
370
392
  },
371
393
  controlConfiguration: [that._createControlConfiguration()]
372
394
  });
373
- var oModel = new sap.ui.model.odata.v2.ODataModel(basePath);
395
+ var oModel = new ODataModel(basePath);
374
396
  this.oFilterBar.setModel(oModel);
375
397
  },
376
398
 
@@ -378,7 +400,7 @@ sap.ui.define([
378
400
  * Creating the Control Configuration for the smartFilter of the valueHelp Dialog.
379
401
  */
380
402
  _createControlConfiguration: function () {
381
- var aControlConfiguration = [new sap.ui.comp.smartfilterbar.ControlConfiguration({
403
+ var aControlConfiguration = [new ControlConfiguration({
382
404
  hasValueHelpDialog: true,
383
405
  key: "Value",
384
406
  label: this.oBundle.getText("value"),
@@ -386,7 +408,7 @@ sap.ui.define([
386
408
  width: "100px",
387
409
  index: 1
388
410
 
389
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
411
+ }), new ControlConfiguration({
390
412
  hasValueHelpDialog: true,
391
413
  key: "Description",
392
414
  label: this.oBundle.getText("description"),
@@ -394,7 +416,7 @@ sap.ui.define([
394
416
  width: "100px",
395
417
  index: 2
396
418
 
397
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
419
+ }), new ControlConfiguration({
398
420
  hasValueHelpDialog: true,
399
421
  key: "VocabularyId",
400
422
  label: "VocabularyId",
@@ -402,7 +424,7 @@ sap.ui.define([
402
424
  visible: false,
403
425
  index: 3
404
426
 
405
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
427
+ }), new ControlConfiguration({
406
428
  hasValueHelpDialog: true,
407
429
  key: "DataObjectId",
408
430
  label: "DataObjectId",
@@ -411,7 +433,7 @@ sap.ui.define([
411
433
  groupId: "abc",
412
434
  index: 4
413
435
 
414
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
436
+ }), new ControlConfiguration({
415
437
  hasValueHelpDialog: true,
416
438
  key: "AttributeId",
417
439
  label: "AttributeId",
@@ -420,7 +442,7 @@ sap.ui.define([
420
442
  index: 5
421
443
 
422
444
  }),
423
- new sap.ui.comp.smartfilterbar.ControlConfiguration({
445
+ new ControlConfiguration({
424
446
  hasValueHelpDialog: true,
425
447
  key: "Version",
426
448
  label: "Version",
@@ -468,7 +490,7 @@ sap.ui.define([
468
490
  this._addValueHelpColumn(mEntities.valueHelp.properties[i], oTable, sColumnName);
469
491
  }
470
492
 
471
- var oModel = new sap.ui.model.odata.v2.ODataModel(basePath);
493
+ var oModel = new ODataModel(basePath);
472
494
  oTable.setModel(oModel);
473
495
  oTable.bindRows(mEntities.valueHelp.collection, null, aFilterParams);
474
496
  oTable.getBinding("rows").attachDataReceived(this._handleRowsDataReceived, this);
@@ -488,13 +510,13 @@ sap.ui.define([
488
510
 
489
511
  // Utility function to create columns for the table.
490
512
  _addValueHelpColumn: function (oColumName, oTable, sColumnName) {
491
- var oColumn = new sap.ui.table.Column().setLabel(new sap.m.Label({
513
+ var oColumn = new TableColumn().setLabel(new Label({
492
514
  text: sColumnName
493
515
  }));
494
516
  if (oColumName === this._propertyValue) {
495
517
  oColumn.setSortProperty(sColumnName);
496
518
  }
497
- oTable.addColumn(oColumn.setTemplate(new sap.m.Text().bindProperty("text", oColumName)));
519
+ oTable.addColumn(oColumn.setTemplate(new Text().bindProperty("text", oColumName)));
498
520
  },
499
521
 
500
522
  /*
@@ -513,9 +535,9 @@ sap.ui.define([
513
535
  _fetchFilterParams: function (valueHelpInfo) {
514
536
  var that = this;
515
537
  var aSearchParams = [];
516
- var aFilterParams = [new sap.ui.model.Filter("AttributeId", sap.ui.model.FilterOperator.EQ, valueHelpInfo.attributeId),
517
- new sap.ui.model.Filter("DataObjectId", sap.ui.model.FilterOperator.EQ, valueHelpInfo.dataObjectId),
518
- new sap.ui.model.Filter("VocabularyId", sap.ui.model.FilterOperator.EQ, valueHelpInfo.vocabularyId)
538
+ var aFilterParams = [new Filter("AttributeId",FilterOperator.EQ, valueHelpInfo.attributeId),
539
+ new Filter("DataObjectId", FilterOperator.EQ, valueHelpInfo.dataObjectId),
540
+ new Filter("VocabularyId", FilterOperator.EQ, valueHelpInfo.vocabularyId)
519
541
  ];
520
542
 
521
543
  var aFilters = this.oFilterBar.getFilters();
@@ -525,8 +547,8 @@ sap.ui.define([
525
547
  searchParam = this.oFilterBar.getParameters().custom.search;
526
548
  aSearchParams = this._getSearchFilters(searchParam);
527
549
  aFilters = that._formatFilterParams(aFilters, valueHelpInfo.sourceType);
528
- aFilterParams.push(new sap.ui.model.Filter({
529
- filters: [new sap.ui.model.Filter(aFilters), new sap.ui.model.Filter(aSearchParams)],
550
+ aFilterParams.push(new Filter({
551
+ filters: [new Filter(aFilters), new Filter(aSearchParams)],
530
552
  and: true
531
553
  }));
532
554
  } else if (!jQuery.isEmptyObject(searchParam)) {
@@ -640,9 +662,9 @@ sap.ui.define([
640
662
  _manageParam: function (sPath, operator, value1, value2) {
641
663
  var filterParam = [];
642
664
  if (value1 && value2) {
643
- filterParam = new sap.ui.model.Filter({
644
- filters: [new sap.ui.model.Filter(sPath, sap.ui.model.FilterOperator.GT, value1),
645
- new sap.ui.model.Filter(sPath, sap.ui.model.FilterOperator.LT, value2)
665
+ filterParam = new Filter({
666
+ filters: [new Filter(sPath, FilterOperator.GT, value1),
667
+ new Filter(sPath, FilterOperator.LT, value2)
646
668
  ],
647
669
  and: true
648
670
  });
@@ -652,9 +674,9 @@ sap.ui.define([
652
674
 
653
675
  // Utility function to form the search filter params.
654
676
  _getSearchFilters: function (searchParam) {
655
- return new sap.ui.model.Filter({
656
- filters: [new sap.ui.model.Filter(this._propertyValue, sap.ui.model.FilterOperator.EQ, searchParam),
657
- new sap.ui.model.Filter(this._propertyDescription, sap.ui.model.FilterOperator.EQ, searchParam)
677
+ return new Filter({
678
+ filters: [new Filter(this._propertyValue, FilterOperator.EQ, searchParam),
679
+ new Filter(this._propertyDescription, FilterOperator.EQ, searchParam)
658
680
  ],
659
681
  and: false
660
682
  });
@@ -728,7 +750,7 @@ sap.ui.define([
728
750
  /* ------------------------------- Date and Time related functions -------------------------- */
729
751
  _createDateLink : function(){
730
752
  var that = this;
731
- this.dateContent = new sap.m.Link({
753
+ this.dateContent = new Link({
732
754
  wrapping: true,
733
755
  text: this.oBundle.getText("select_date"),
734
756
  press: function (oEvent) {
@@ -741,7 +763,7 @@ sap.ui.define([
741
763
 
742
764
  _createTimeStampLink : function() {
743
765
  var that = this;
744
- this.timeContent = new sap.m.Link({
766
+ this.timeContent = new Link({
745
767
  wrapping: true,
746
768
  text: this.oBundle.getText("select_date_time"),
747
769
  press: function (oEvent) {
@@ -755,7 +777,7 @@ sap.ui.define([
755
777
  //creates calender control
756
778
  _createDateTimeDialog: function () {
757
779
  var that = this;
758
- var oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
780
+ var oLocale = Formatting.getLanguageTag();
759
781
  var oLocaleData = LocaleData.getInstance(oLocale);
760
782
  var dateFormatted = oLocaleData.getDatePattern('medium');
761
783
  var timeFormat = oLocaleData.getTimePattern('medium');
@@ -833,12 +855,12 @@ sap.ui.define([
833
855
  date = formatterParsing.parse(sValue);
834
856
  }
835
857
  if (this._dateBusinessDataType === "D") {
836
- formatter = sap.ui.core.format.DateFormat.getDateInstance({
858
+ formatter = DateFormat.getDateInstance({
837
859
  pattern: "yyyy-MM-dd"
838
860
  });
839
861
  sDateFormatted = formatter.format(date);
840
862
  } else if (this._dateBusinessDataType === "U") {
841
- formatter = sap.ui.core.format.DateFormat.getDateTimeInstance({
863
+ formatter = DateFormat.getDateTimeInstance({
842
864
  pattern: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
843
865
  UTC:true
844
866
  });
@@ -852,16 +874,16 @@ sap.ui.define([
852
874
 
853
875
  _getDateTimeFormatterForParsing: function () {
854
876
  var formatter;
855
- var oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
877
+ var oLocale = Formatting.getLanguageTag();
856
878
  var oLocaleData = LocaleData.getInstance(oLocale);
857
879
  var datePattern = oLocaleData.getDatePattern('medium');
858
880
  var timePattern = oLocaleData.getTimePattern('medium');
859
881
  if (this.dateContext === "D") {
860
- formatter = sap.ui.core.format.DateFormat.getDateInstance({
882
+ formatter = DateFormat.getDateInstance({
861
883
  pattern: datePattern
862
884
  });
863
885
  } else if (this.dateContext === "U") {
864
- formatter = sap.ui.core.format.DateFormat.getDateTimeInstance({
886
+ formatter = DateFormat.getDateTimeInstance({
865
887
  pattern: datePattern + " " + timePattern
866
888
  });
867
889
  }
@@ -4,14 +4,18 @@ sap.ui.define([
4
4
  "sap/ui/core/Control",
5
5
  "sap/m/List",
6
6
  "sap/ui/model/json/JSONModel",
7
- "sap/m/ListMode",
7
+ "sap/m/library",
8
8
  "sap/ui/core/CustomData",
9
9
  "sap/ui/model/Sorter",
10
- "sap/rules/ui/parser/infrastructure/util/utilsBase",
10
+ "sap/rules/ui/ast/util/utilsBase",
11
+ "sap/m/DisplayListItem",
12
+ "sap/m/Panel",
13
+ "sap/ui/core/Lib",
11
14
  "./AutoSuggestionFunctionalOperatorPanelRenderer"
12
- ], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils, AutoSuggestionFunctionalOperatorPanelRenderer) {
15
+ ], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionFunctionalOperatorPanelRenderer) {
13
16
  "use strict";
14
17
 
18
+ var ListMode = mobileLibrary.ListMode;
15
19
  var autoSuggestionFunctionalOperatorPanel = Control.extend(
16
20
  "sap.rules.ui.ast.autoCompleteContent.AutoSuggestionFunctionalOperatorPanel", {
17
21
  metadata: {
@@ -40,8 +44,8 @@ sap.ui.define([
40
44
  },
41
45
 
42
46
  init: function () {
43
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
44
- this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
47
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
48
+ this.infraUtils = new infraUtils.utilsBaseLib();
45
49
  this.needCreateLayout = true;
46
50
  this.AttributeSegmentSelected = true;
47
51
  this.dataObjectName = "";
@@ -63,11 +67,11 @@ sap.ui.define([
63
67
  var that = this;
64
68
  var vocabularyData = this.getData();
65
69
  // create a Model with this data
66
- var model = new sap.ui.model.json.JSONModel();
70
+ var model = new JSONModel();
67
71
  model.setData(vocabularyData);
68
72
 
69
73
  // create a list
70
- this.functionalOperatorslist = new sap.m.List({
74
+ this.functionalOperatorslist = new List({
71
75
  growing: true,
72
76
  growingScrollToLoad: true,
73
77
  enableBusyIndicator: true,
@@ -78,10 +82,10 @@ sap.ui.define([
78
82
  // bind the List items to the data collection
79
83
  this.functionalOperatorslist.bindItems({
80
84
  path: "/functional",
81
- sorter: new sap.ui.model.Sorter("name"),
85
+ sorter: new Sorter("name"),
82
86
  rememberSelections: false,
83
87
  mode: ListMode.SingleSelectMaster,
84
- template: new sap.m.DisplayListItem({
88
+ template: new DisplayListItem({
85
89
  label: "{name}",
86
90
  value: "{label}",
87
91
  type: "Active",
@@ -96,7 +100,7 @@ sap.ui.define([
96
100
  var that = this;
97
101
 
98
102
  // add list to the panel
99
- var functionalOperatorslistPanel = new sap.m.Panel({
103
+ var functionalOperatorslistPanel = new Panel({
100
104
  headerText: this.oBundle.getText("functionalOperatorsPanelTitle"),
101
105
  expandable: true,
102
106
  expanded: this.getExpand(),
@@ -4,14 +4,18 @@ sap.ui.define([
4
4
  "sap/ui/core/Control",
5
5
  "sap/m/List",
6
6
  "sap/ui/model/json/JSONModel",
7
- "sap/m/ListMode",
7
+ "sap/m/library",
8
8
  "sap/ui/core/CustomData",
9
9
  "sap/ui/model/Sorter",
10
- "sap/rules/ui/parser/infrastructure/util/utilsBase",
10
+ "sap/rules/ui/ast/util/utilsBase",
11
+ "sap/m/DisplayListItem",
12
+ "sap/m/Panel",
13
+ "sap/ui/core/Lib",
11
14
  "./AutoSuggestionLogicalOperatorPanelRenderer"
12
- ], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils, AutoSuggestionLogicalOperatorPanelRenderer) {
15
+ ], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionLogicalOperatorPanelRenderer) {
13
16
  "use strict";
14
17
 
18
+ var ListMode = mobileLibrary.ListMode;
15
19
  var autoSuggestionLogicalOperatorPanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionLogicalOperatorPanel", {
16
20
  metadata: {
17
21
  library: "sap.rules.ui",
@@ -39,8 +43,8 @@ sap.ui.define([
39
43
  },
40
44
 
41
45
  init: function () {
42
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
43
- this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
46
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
47
+ this.infraUtils = new infraUtils.utilsBaseLib();
44
48
  this.needCreateLayout = true;
45
49
  this.AttributeSegmentSelected = true;
46
50
  this.dataObjectName = "";
@@ -62,11 +66,11 @@ sap.ui.define([
62
66
  var that = this;
63
67
  var vocabularyData = this.getData();
64
68
  // create a Model with this data
65
- var model = new sap.ui.model.json.JSONModel();
69
+ var model = new JSONModel();
66
70
  model.setData(vocabularyData);
67
71
 
68
72
  // create a list
69
- this.logicalOperatorslist = new sap.m.List({
73
+ this.logicalOperatorslist = new List({
70
74
  growing: true,
71
75
  growingScrollToLoad: true,
72
76
  enableBusyIndicator: true,
@@ -77,10 +81,10 @@ sap.ui.define([
77
81
  // bind the List items to the data collection
78
82
  this.logicalOperatorslist.bindItems({
79
83
  path: "/logical",
80
- sorter: new sap.ui.model.Sorter("name"),
84
+ sorter: new Sorter("name"),
81
85
  rememberSelections: false,
82
86
  mode: ListMode.SingleSelectMaster,
83
- template: new sap.m.DisplayListItem({
87
+ template: new DisplayListItem({
84
88
  label: "{name}",
85
89
  value: "{label}",
86
90
  type: "Active",
@@ -95,7 +99,7 @@ sap.ui.define([
95
99
  var that = this;
96
100
 
97
101
  // add list to the panel
98
- var logicalOperatorsListPanel = new sap.m.Panel({
102
+ var logicalOperatorsListPanel = new Panel({
99
103
  headerText: this.oBundle.getText("logicalOperatorsPanelTitle"),
100
104
  expandable: true,
101
105
  expanded: this.getExpand(),
@@ -4,20 +4,25 @@ sap.ui.define([
4
4
  "sap/ui/core/Control",
5
5
  "sap/m/List",
6
6
  "sap/ui/model/json/JSONModel",
7
- "sap/m/ListMode",
7
+ "sap/m/library",
8
8
  "sap/ui/core/CustomData",
9
9
  "sap/ui/model/Sorter",
10
- "sap/rules/ui/parser/infrastructure/util/utilsBase",
10
+ "sap/rules/ui/ast/util/utilsBase",
11
11
  "sap/ui/core/LocaleData",
12
12
  "sap/rules/ui/Constants",
13
13
  "sap/rules/ui/services/AstExpressionLanguage",
14
14
  "sap/rules/ui/ast/util/LoopFunctionDialog",
15
+ "sap/m/Panel",
16
+ "sap/m/Link",
17
+ "sap/ui/core/Lib",
18
+ "sap/ui/core/Element",
15
19
  "./AutoSuggestionLoopFunctionPanelRenderer"
16
20
 
17
- ], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils,
18
- LocaleData, Constants, AstExpressionLanguage, LoopFunctionDialog, AutoSuggestionLoopFunctionPanelRenderer) {
21
+ ], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils,
22
+ LocaleData, Constants, AstExpressionLanguage, LoopFunctionDialog, Panel, Link, coreLib, Element, AutoSuggestionLoopFunctionPanelRenderer) {
19
23
  "use strict";
20
24
 
25
+ var ListMode = mobileLibrary.ListMode;
21
26
  var autoSuggestionLoopFunctionPanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionLoopFunctionPanel", {
22
27
  metadata: {
23
28
  library: "sap.rules.ui",
@@ -54,9 +59,9 @@ sap.ui.define([
54
59
  },
55
60
 
56
61
  init: function () {
57
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
62
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
58
63
  this.loopFunctionDialog = LoopFunctionDialog.getInstance();
59
- this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
64
+ this.infraUtils = new infraUtils.utilsBaseLib();
60
65
  this._oAstExpressionLanguage = new AstExpressionLanguage();
61
66
  this.needCreateLayout = true;
62
67
 
@@ -72,18 +77,18 @@ sap.ui.define([
72
77
  },
73
78
 
74
79
  onAfterRendering: function () {
75
- this._oAstExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
80
+ this._oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
76
81
  },
77
82
  initializeVariables: function () {
78
83
 
79
84
  },
80
85
  _createLayout: function () {
81
86
  var that = this;
82
- var ForEachFunctionsPanel = new sap.m.Panel({
87
+ var ForEachFunctionsPanel = new Panel({
83
88
  expandable: false,
84
89
  expanded: true,
85
90
  width: "auto",
86
- content: [new sap.m.Link({
91
+ content: [new Link({
87
92
  wrapping: true,
88
93
  text: this.oBundle.getText("loopFunctionPanelTitle"),
89
94
  press: function (oEvent) {
@@ -4,14 +4,18 @@ sap.ui.define([
4
4
  "sap/ui/core/Control",
5
5
  "sap/m/List",
6
6
  "sap/ui/model/json/JSONModel",
7
- "sap/m/ListMode",
7
+ "sap/m/library",
8
8
  "sap/ui/core/CustomData",
9
9
  "sap/ui/model/Sorter",
10
- "sap/rules/ui/parser/infrastructure/util/utilsBase",
10
+ "sap/rules/ui/ast/util/utilsBase",
11
+ "sap/m/DisplayListItem",
12
+ "sap/m/Panel",
13
+ "sap/ui/core/Lib",
11
14
  "./AutoSuggestionMathematicalOperatorPanelRenderer"
12
- ], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils, AutoSuggestionMathematicalOperatorPanelRenderer) {
15
+ ], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionMathematicalOperatorPanelRenderer) {
13
16
  "use strict";
14
17
 
18
+ var ListMode = mobileLibrary.ListMode;
15
19
  var autoSuggestionMathematicalOperatorPanel = Control.extend(
16
20
  "sap.rules.ui.ast.autoCompleteContent.AutoSuggestionMathematicalOperatorPanel", {
17
21
  metadata: {
@@ -40,8 +44,8 @@ sap.ui.define([
40
44
  },
41
45
 
42
46
  init: function () {
43
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
44
- this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
47
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
48
+ this.infraUtils = new infraUtils.utilsBaseLib();
45
49
  this.needCreateLayout = true;
46
50
  this.AttributeSegmentSelected = true;
47
51
  this.dataObjectName = "";
@@ -63,11 +67,11 @@ sap.ui.define([
63
67
  var that = this;
64
68
  var vocabularyData = this.getData();
65
69
  // create a Model with this data
66
- var model = new sap.ui.model.json.JSONModel();
70
+ var model = new JSONModel();
67
71
  model.setData(vocabularyData);
68
72
 
69
73
  // create a list
70
- this.mathematicalOperatorslist = new sap.m.List({
74
+ this.mathematicalOperatorslist = new List({
71
75
  growing: true,
72
76
  growingScrollToLoad: true,
73
77
  enableBusyIndicator: true,
@@ -76,10 +80,10 @@ sap.ui.define([
76
80
  // bind the List items to the data collection
77
81
  this.mathematicalOperatorslist.bindItems({
78
82
  path: "/arithmetic",
79
- sorter: new sap.ui.model.Sorter("name"),
83
+ sorter: new Sorter("name"),
80
84
  rememberSelections: false,
81
85
  mode: ListMode.SingleSelectMaster,
82
- template: new sap.m.DisplayListItem({
86
+ template: new DisplayListItem({
83
87
  label: "{name}",
84
88
  value: "{label}",
85
89
  type: "Active",
@@ -94,7 +98,7 @@ sap.ui.define([
94
98
  var that = this;
95
99
 
96
100
  // add list to the panel
97
- var mathematicalOperatorsListPanel = new sap.m.Panel({
101
+ var mathematicalOperatorsListPanel = new Panel({
98
102
  headerText: this.oBundle.getText("mathOperatorsPanelTitle"),
99
103
  expandable: true,
100
104
  expanded: this.getExpand(),