@sapui5/sap.rules.ui 1.121.0 → 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 (86) 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 +34 -34
  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 +3 -3
  52. package/src/sap/rules/ui/i18n/messagebundle_sh.properties +88 -88
  53. package/src/sap/rules/ui/i18n/messagebundle_uk.properties +5 -5
  54. package/src/sap/rules/ui/library.js +6 -6
  55. package/src/sap/rules/ui/parser/businessLanguage/lib/IDPParser.js +115 -114
  56. package/src/sap/rules/ui/parser/businessLanguage/lib/antlr3_all_min.js +4 -4
  57. package/src/sap/rules/ui/parser/businessLanguage/lib/autoCompleteUtils.js +4 -3
  58. package/src/sap/rules/ui/parser/businessLanguage/lib/conversionUtils.js +10 -6
  59. package/src/sap/rules/ui/parser/businessLanguage/lib/entityModel.js +8 -7
  60. package/src/sap/rules/ui/parser/businessLanguage/lib/entityModelConstractor.js +17 -16
  61. package/src/sap/rules/ui/parser/businessLanguage/lib/parsingBackendMediator.js +10 -9
  62. package/src/sap/rules/ui/parser/businessLanguage/lib/termsUtils.js +4 -3
  63. package/src/sap/rules/ui/parser/i18n/messages_descriptions_cnr.properties +57 -57
  64. package/src/sap/rules/ui/parser/i18n/messages_descriptions_en_US_saprigi.properties +210 -210
  65. package/src/sap/rules/ui/parser/i18n/messages_descriptions_mk.properties +1 -1
  66. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +90 -90
  67. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +1 -1
  68. package/src/sap/rules/ui/parser/i18n/messages_descriptions_uk.properties +2 -2
  69. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_cnr.properties +19 -19
  70. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_en_US_saprigi.properties +26 -26
  71. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_mk.properties +2 -2
  72. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
  73. package/src/sap/rules/ui/parser/infrastructure/errorHandling/hrfException.js +3 -3
  74. package/src/sap/rules/ui/parser/infrastructure/locale/lib/resourceBundleContext.js +4 -3
  75. package/src/sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector.js +8 -7
  76. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBody.js +8 -7
  77. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyConvertor.js +4 -3
  78. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyValidator.js +9 -8
  79. package/src/sap/rules/ui/providers/ValueHelpDialogProvider.js +63 -46
  80. package/src/sap/rules/ui/providers/ValueHelpProvider.js +8 -7
  81. package/src/sap/rules/ui/services/AstExpressionLanguage.js +12 -10
  82. package/src/sap/rules/ui/services/ExpressionLanguage.js +89 -83
  83. package/src/sap/rules/ui/type/DecisionTableCell.js +2 -2
  84. package/src/sap/rules/ui/type/DecisionTableHeader.js +3 -3
  85. package/src/sap/rules/ui/type/Expression.js +3 -3
  86. package/src/sap/rules/ui/type/ExpressionAbs.js +5 -5
@@ -8,7 +8,6 @@
8
8
 
9
9
  // Provides control sap.rules.ui.
10
10
  sap.ui.define([
11
- "jquery.sap.global",
12
11
  "sap/rules/ui/library",
13
12
  "sap/ui/core/Control",
14
13
  "sap/ui/layout/form/SimpleForm",
@@ -28,10 +27,40 @@ sap.ui.define([
28
27
  "sap/rules/ui/AstExpressionBasic",
29
28
  "sap/rules/ui/services/AstExpressionLanguage",
30
29
  "sap/rules/ui/ast/util/AstUtil",
30
+ "sap/ui/core/library",
31
+ "sap/ui/model/odata/v2/ODataModel",
32
+ "sap/ui/model/Context",
33
+ "sap/m/library",
34
+ /*"sap/ui/layout/form/GridContainerData",*/
35
+ "sap/m/Column",
36
+ "sap/ui/layout/ResponsiveFlowLayoutData",
37
+ "sap/ui/core/IconPool",
38
+ "sap/m/MessageStrip",
39
+ "sap/ui/layout/HorizontalLayout",
40
+ "sap/ui/core/Item",
41
+ "sap/ui/model/Filter",
42
+ "sap/ui/model/FilterOperator",
43
+ "sap/m/SelectDialog",
44
+ "sap/m/StandardListItem",
45
+ "sap/ui/model/BindingMode",
46
+ "sap/ui/model/json/JSONModel",
47
+ "sap/m/Dialog",
48
+ "sap/m/ColumnListItem",
49
+ "sap/ui/core/EventBus",
50
+ "sap/ui/core/ListItem",
51
+ "sap/ui/core/Lib",
52
+ "sap/ui/core/BusyIndicator",
53
+ "sap/ui/core/Element",
54
+ "sap/m/MessageToast",
31
55
  "./DecisionTableSettingsRenderer"
32
56
  ],
33
- function (jQuery, library, Control, SimpleForm, Label, Switch, Select, MessageBox, Table, Text, CheckBox, Input, Button,
34
- ExpressionAdvanced, VerticalLayout, ExpressionType, Constants, AstExpressionBasic, AstExpressionLanguage, AstUtil, DecisionTableSettingsRenderer) {
57
+ function (library, Control, SimpleForm, Label, Switch, Select, MessageBox, Table, Text, CheckBox, Input, Button,
58
+ ExpressionAdvanced, VerticalLayout, ExpressionType, Constants,
59
+ AstExpressionBasic, AstExpressionLanguage, AstUtil, coreLibrary, ODataModel,
60
+ Context, mobileLibrary, /*GridContainerData,*/ Column,
61
+ ResponsiveFlowLayoutData, IconPool, MessageStrip, HorizontalLayout, Item, Filter, FilterOperator, SelectDialog,
62
+ StandardListItem, BindingMode, JSONModel, Dialog,
63
+ ColumnListItem, EventBus, ListItem, coreLib, BusyIndicator, Element, MessageToast, DecisionTableSettingsRenderer) {
35
64
  "use strict";
36
65
 
37
66
  /**
@@ -44,7 +73,7 @@ sap.ui.define([
44
73
  * @extends Control
45
74
  *
46
75
  * @author SAP SE
47
- * @version 1.121.0
76
+ * @version 1.122.0
48
77
  *
49
78
  * @constructor
50
79
  * @private
@@ -57,11 +86,11 @@ sap.ui.define([
57
86
  properties: {
58
87
  cellFormat: {
59
88
  type: "sap.rules.ui.DecisionTableCellFormat",
60
- defaultValue: sap.rules.ui.DecisionTableCellFormat.Both
89
+ defaultValue: library.DecisionTableCellFormat.Both
61
90
  },
62
91
  hitPolicies: {
63
92
  type: "sap.rules.ui.RuleHitPolicy[]",
64
- defaultValue: [sap.rules.ui.RuleHitPolicy.FirstMatch, sap.rules.ui.RuleHitPolicy.AllMatch]
93
+ defaultValue: [library.RuleHitPolicy.FirstMatch, library.RuleHitPolicy.AllMatch]
65
94
  },
66
95
  modelName: {
67
96
  type: "string",
@@ -73,7 +102,7 @@ sap.ui.define([
73
102
  },
74
103
  decisionTableFormat: {
75
104
  type: "sap.rules.ui.DecisionTableFormat",
76
- defaultValue: sap.rules.ui.DecisionTableFormat.CellFormat
105
+ defaultValue: library.DecisionTableFormat.CellFormat
77
106
  },
78
107
  enableSettingResult: {
79
108
  type: "boolean",
@@ -105,7 +134,7 @@ sap.ui.define([
105
134
  renderer: DecisionTableSettingsRenderer
106
135
  });
107
136
 
108
- sap.rules.ui.DecisionTableSettings.prototype._addColumnToJsonModel = function (sequence) {
137
+ oDecisionTableSettings.prototype._addColumnToJsonModel = function (sequence) {
109
138
  var displayModel = this.getModel();
110
139
  var modelData = displayModel.getData();
111
140
  var aColumns = displayModel.oData.DecisionTable.DecisionTableColumns.results;
@@ -123,7 +152,7 @@ sap.ui.define([
123
152
  Id: this.mNextColumnId,
124
153
  RuleId: modelData.Id,
125
154
  Sequence: sequence + 1,
126
- Type: sap.rules.ui.DecisionTableColumn.Condition,
155
+ Type: library.DecisionTableColumn.Condition,
127
156
  Version: modelData.Version,
128
157
  Status: "C"
129
158
  };
@@ -143,9 +172,9 @@ sap.ui.define([
143
172
  this._setDisplayModelData(modelData);
144
173
  };
145
174
 
146
- sap.rules.ui.DecisionTableSettings.prototype._addNodeObject = function (astNode) {
175
+ oDecisionTableSettings.prototype._addNodeObject = function (astNode) {
147
176
  var oNodeArray = [];
148
- var oAstExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
177
+ var oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
149
178
  var oAstUtil = oAstExpressionLanguage._astBunldeInstance.ASTUtil;
150
179
 
151
180
  var updatedAstNode = [];
@@ -172,17 +201,17 @@ sap.ui.define([
172
201
  };
173
202
 
174
203
 
175
- sap.rules.ui.DecisionTableSettings.prototype._bindPredefinedTable = function (sPath, sKey) {
204
+ oDecisionTableSettings.prototype._bindPredefinedTable = function (sPath, sKey) {
176
205
  var that = this;
177
206
  this.oPredefinedTable.destroyItems();
178
207
  var oModel = this.getModel("oDataModel");
179
208
  var oExpressionLanguage;
180
209
  if (this.getExpressionLanguage()) {
181
- oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
210
+ oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
182
211
  } else {
183
- oExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
212
+ oExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
184
213
  }
185
- var vocabularyModel = new sap.ui.model.odata.v2.ODataModel(oExpressionLanguage.getModel().sServiceUrl);
214
+ var vocabularyModel = new ODataModel(oExpressionLanguage.getModel().sServiceUrl);
186
215
  var bAddAttributeToPredefTable = true;
187
216
  var sBindingPath;
188
217
  var oHeaderKey;
@@ -200,7 +229,7 @@ sap.ui.define([
200
229
  Version: oAttributes[i].Version
201
230
  };
202
231
  sBindingPath = oModel.createKey(sKey, oHeaderKey);
203
- oContext = new sap.ui.model.Context(oModel, sBindingPath);
232
+ oContext = new Context(oModel, sBindingPath);
204
233
  } else if (sKey === "/ExpandedAttributes") {
205
234
  oHeaderKey = {
206
235
  DataObjectId: oAttributes[i].DataObjectId,
@@ -210,7 +239,7 @@ sap.ui.define([
210
239
  AttributeId: oAttributes[i].AttributeId
211
240
  };
212
241
  sBindingPath = vocabularyModel.createKey(sKey, oHeaderKey);
213
- oContext = new sap.ui.model.Context(vocabularyModel, sBindingPath);
242
+ oContext = new Context(vocabularyModel, sBindingPath);
214
243
  oContext.DataObjectAttributeinfo = oAttributes[i];
215
244
  }
216
245
  if (that.getExpressionLanguage()) {
@@ -289,7 +318,7 @@ sap.ui.define([
289
318
  MessageBox.error(
290
319
  oError.responseText, {
291
320
  title: that.oBundle.getText("ERROR_DIALOG"),
292
- actions: [sap.m.MessageBox.Action.OK]
321
+ actions: [MessageBox.Action.OK]
293
322
 
294
323
  });
295
324
  }
@@ -299,7 +328,7 @@ sap.ui.define([
299
328
  }
300
329
  };
301
330
 
302
- sap.rules.ui.DecisionTableSettings.prototype._getAttributeSequenceArray = function () {
331
+ oDecisionTableSettings.prototype._getAttributeSequenceArray = function () {
303
332
  var attributeSequenceArray = this.getModel("settingsModel").attributeSequenceArray;
304
333
  if (!this.getModel("settingsModel").attributeSequenceArray) {
305
334
  var settingsModel = this.getModel("settingsModel");
@@ -316,7 +345,7 @@ sap.ui.define([
316
345
  return this.getModel("settingsModel").attributeSequenceArray;
317
346
  };
318
347
 
319
- sap.rules.ui.DecisionTableSettings.prototype._getOrderedAttributesArray = function (dataAttrList) {
348
+ oDecisionTableSettings.prototype._getOrderedAttributesArray = function (dataAttrList) {
320
349
  var attributeSequenceArray = this.getModel("settingsModel").attributeSequenceArray;
321
350
  if (!attributeSequenceArray) {
322
351
  attributeSequenceArray = this._getAttributeSequenceArray();
@@ -334,7 +363,7 @@ sap.ui.define([
334
363
  return orderedAttributesArray;
335
364
  };
336
365
 
337
- sap.rules.ui.DecisionTableSettings.prototype._calcNextColumnId = function () {
366
+ oDecisionTableSettings.prototype._calcNextColumnId = function () {
338
367
  var displayModel = this.getModel();
339
368
  var modelData = displayModel.getData();
340
369
  var aColumns = modelData.DecisionTable ? modelData.DecisionTable.DecisionTableColumns.results : [];
@@ -351,7 +380,7 @@ sap.ui.define([
351
380
  return nextId;
352
381
  };
353
382
 
354
- sap.rules.ui.DecisionTableSettings.prototype._callRefreshResultsFunctionImport = function () {
383
+ oDecisionTableSettings.prototype._callRefreshResultsFunctionImport = function () {
355
384
  var that = this;
356
385
  var odataModel = this.getModel("oDataModel");
357
386
  var modelData = this.getModel().getData();
@@ -369,7 +398,7 @@ sap.ui.define([
369
398
  };
370
399
 
371
400
  var submitError = function (e) {
372
- sap.m.MessageToast.show(e);
401
+ MessageToast.show(e);
373
402
  };
374
403
 
375
404
  var callRefreshFunctionImport = function (response) {
@@ -393,12 +422,12 @@ sap.ui.define([
393
422
  }
394
423
  };
395
424
 
396
- sap.rules.ui.DecisionTableSettings.prototype._changeColumnInputMode = function (oContext, oEvent) {
425
+ oDecisionTableSettings.prototype._changeColumnInputMode = function (oContext, oEvent) {
397
426
  var oSelect = oEvent.getSource();
398
427
  this._openWarningDialog(oSelect, oContext);
399
428
  };
400
429
 
401
- sap.rules.ui.DecisionTableSettings.prototype._changeColumnStatusToUpdate = function (oContext) {
430
+ oDecisionTableSettings.prototype._changeColumnStatusToUpdate = function (oContext) {
402
431
  var model = oContext.getModel();
403
432
  //Update column status to "update". But only in case it's not a new column
404
433
  var status = oContext.getProperty("Status");
@@ -407,7 +436,7 @@ sap.ui.define([
407
436
  }
408
437
  };
409
438
 
410
- sap.rules.ui.DecisionTableSettings.prototype._changeInputMode = function (bShouldChangeMode, oSelect, oContext) {
439
+ oDecisionTableSettings.prototype._changeInputMode = function (bShouldChangeMode, oSelect, oContext) {
411
440
  if (!bShouldChangeMode) {
412
441
  oSelect.setSelectedKey(this.oBundle.getText("valueOnly"));
413
442
  return;
@@ -417,7 +446,7 @@ sap.ui.define([
417
446
  this._changeColumnStatusToUpdate(oContext);
418
447
  };
419
448
 
420
- sap.rules.ui.DecisionTableSettings.prototype._createDefaultColumn = function () {
449
+ oDecisionTableSettings.prototype._createDefaultColumn = function () {
421
450
  var _displayModel = this.getModel();
422
451
  var modelData = _displayModel.getData();
423
452
 
@@ -440,42 +469,42 @@ sap.ui.define([
440
469
  },
441
470
  Id: 1,
442
471
  Sequence: 1,
443
- Type: sap.rules.ui.DecisionTableColumn.Condition,
472
+ Type: library.DecisionTableColumn.Condition,
444
473
  Status: "C"
445
474
  });
446
475
  }
447
476
  };
448
477
 
449
478
  //Condition table
450
- sap.rules.ui.DecisionTableSettings.prototype._createTable = function () {
479
+ oDecisionTableSettings.prototype._createTable = function () {
451
480
  this.conditionsTable = new Table({
452
- backgroundDesign: sap.m.BackgroundDesign.Solid,
453
- showSeparators: sap.m.ListSeparators.None,
454
- layoutData: new sap.ui.layout.form.GridContainerData({
481
+ backgroundDesign: mobileLibrary.BackgroundDesign.Solid,
482
+ showSeparators: mobileLibrary.ListSeparators.None,
483
+ /*layoutData: new GridContainerData({
455
484
  halfGrid: false
456
- }),
485
+ }),TODO:Change by Harsh*/
457
486
  columns: [
458
- new sap.m.Column({
487
+ new Column({
459
488
  width: "50%",
460
- header: new sap.m.Label({
489
+ header: new Label({
461
490
  text: this.oBundle.getText("colOfDecisionTable"),
462
- design: sap.m.LabelDesign.Bold
491
+ design: mobileLibrary.LabelDesign.Bold
463
492
  }).setTooltip(this.oBundle.getText("colOfDecisionTable"))
464
493
  }),
465
494
 
466
- new sap.m.Column({
495
+ new Column({
467
496
  width: "25%",
468
- header: new sap.m.Label({
497
+ header: new Label({
469
498
  text: this.oBundle.getText("label"),
470
- design: sap.m.LabelDesign.Bold
499
+ design: mobileLibrary.LabelDesign.Bold
471
500
  }).setTooltip(this.oBundle.getText("label"))
472
501
  }),
473
502
 
474
- new sap.m.Column({
503
+ new Column({
475
504
  width: "25%",
476
- header: new sap.m.Label({
505
+ header: new Label({
477
506
  text: this.oBundle.getText("fixedOperator"),
478
- design: sap.m.LabelDesign.Bold
507
+ design: mobileLibrary.LabelDesign.Bold
479
508
  }).setTooltip(this.oBundle.getText("fixedOperator"))
480
509
  }),
481
510
 
@@ -488,7 +517,7 @@ sap.ui.define([
488
517
  }).setTooltip(this.oBundle.getText("inputMode"))
489
518
  }),*/ // input mode choice will be removed from decision table settings
490
519
 
491
- new sap.m.Column({
520
+ new Column({
492
521
  width: "20%"
493
522
  })
494
523
  ]
@@ -505,7 +534,7 @@ sap.ui.define([
505
534
  return this.conditionsTable;
506
535
  };
507
536
 
508
- sap.rules.ui.DecisionTableSettings.prototype._createRefreshButton = function () {
537
+ oDecisionTableSettings.prototype._createRefreshButton = function () {
509
538
  var _calcStatisticsMessage = function () { //returns null if no changes => we'll disable refresh button
510
539
  var results = this.getModel("settingsModel").oData.results.resultsEnumration;
511
540
  var currentResultID = this.getModel().oData.ResultDataObjectId;
@@ -552,9 +581,9 @@ sap.ui.define([
552
581
  MessageBox.warning(
553
582
  dialogStatisticsMessage, {
554
583
  title: this.oBundle.getText("refeshResultWarningTitle"),
555
- actions: [sap.m.MessageBox.Action.OK, sap.m.MessageBox.Action.CANCEL],
584
+ actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],
556
585
  onClose: function (oAction) {
557
- if (oAction === sap.m.MessageBox.Action.OK) {
586
+ if (oAction === MessageBox.Action.OK) {
558
587
  _handleRefreshConfirmed();
559
588
  }
560
589
  }
@@ -562,12 +591,12 @@ sap.ui.define([
562
591
  }.bind(this);
563
592
 
564
593
  var oRefreshButton = new Button({
565
- layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({
594
+ layoutData: new ResponsiveFlowLayoutData({
566
595
  weight: 1
567
596
  }),
568
- icon: sap.ui.core.IconPool.getIconURI("synchronize"),
597
+ icon: IconPool.getIconURI("synchronize"),
569
598
  width: "3rem",
570
- type: sap.m.ButtonType.Transparent,
599
+ type: mobileLibrary.ButtonType.Transparent,
571
600
  text: "",
572
601
  press: _handleRefreshPress,
573
602
  visible: true,
@@ -579,14 +608,14 @@ sap.ui.define([
579
608
  };
580
609
 
581
610
  //creates a message strip
582
- sap.rules.ui.DecisionTableSettings.prototype._createInfoMessageStrip = function (textstr, elementID) {
583
- var omsgStrip = sap.ui.getCore().byId(elementID);
611
+ oDecisionTableSettings.prototype._createInfoMessageStrip = function (textstr, elementID) {
612
+ var omsgStrip = Element.getElementById(elementID);
584
613
  if (!omsgStrip) {
585
- omsgStrip = new sap.m.MessageStrip({
614
+ omsgStrip = new MessageStrip({
586
615
  visible: true, // boolean
587
616
  id: elementID,
588
617
  text: textstr, // string
589
- type: sap.ui.core.MessageType.Information, // sap.ui.core.MessageType
618
+ type: coreLibrary.MessageType.Information, // sap.ui.core.MessageType
590
619
  showIcon: true, // boolean
591
620
  showCloseButton: true
592
621
  }).addStyleClass("sapRULTDecisionTableSettingsMessageStrip");
@@ -594,7 +623,7 @@ sap.ui.define([
594
623
  return omsgStrip;
595
624
  };
596
625
 
597
- sap.rules.ui.DecisionTableSettings.prototype._createLayout = function () {
626
+ oDecisionTableSettings.prototype._createLayout = function () {
598
627
  var oForm = new SimpleForm({
599
628
  editable: true,
600
629
  layout: "ResponsiveGridLayout",
@@ -612,7 +641,7 @@ sap.ui.define([
612
641
  enabled: "{settingsModel>/hitPolicy/enabled}",
613
642
  items: {
614
643
  path: "settingsModel>/hitPolicy/hitPolicyEnumration",
615
- template: new sap.ui.core.Item({
644
+ template: new Item({
616
645
  key: "{settingsModel>key}",
617
646
  text: "{settingsModel>text}"
618
647
  })
@@ -631,7 +660,7 @@ sap.ui.define([
631
660
  }),
632
661
 
633
662
  new Label(),
634
- new sap.ui.layout.HorizontalLayout({}),
663
+ new HorizontalLayout({}),
635
664
 
636
665
  new Label({
637
666
  text: this.oBundle.getText("conditionsTableLabelText")
@@ -639,12 +668,12 @@ sap.ui.define([
639
668
  this._createTable(),
640
669
 
641
670
  new Label(),
642
- new sap.ui.layout.HorizontalLayout({}),
671
+ new HorizontalLayout({}),
643
672
 
644
673
  new Label({
645
674
  text: this.oBundle.getText("output")
646
675
  }).setTooltip(this.oBundle.getText("output")),
647
- new sap.ui.layout.HorizontalLayout({
676
+ new HorizontalLayout({
648
677
  content: [
649
678
  this._createResultInput(),
650
679
  this._createRefreshButton()
@@ -660,10 +689,10 @@ sap.ui.define([
660
689
  };
661
690
 
662
691
  //creates layout for predefined values
663
- sap.rules.ui.DecisionTableSettings.prototype._createPredefinedResultsLayout = function () {
692
+ oDecisionTableSettings.prototype._createPredefinedResultsLayout = function () {
664
693
  //if ABAP backend is used, we do not show the predefined results table
665
694
  if (this.needToRenderPredefinedResultsTable) {
666
- var verticalLayout = new sap.ui.layout.VerticalLayout({
695
+ var verticalLayout = new VerticalLayout({
667
696
  content: [
668
697
  this._createInfoMessageStrip(this.oBundle.getText("PredefinedMessageStripHiddenAccessInfoText"), "id_HiddenAccessMessageStrip"),
669
698
  this._createInfoMessageStrip(this.oBundle.getText("PredefinedMessageStripEditableAccessInfoText"),
@@ -678,39 +707,39 @@ sap.ui.define([
678
707
  };
679
708
 
680
709
  //creates table for predefined values with access options
681
- sap.rules.ui.DecisionTableSettings.prototype._createPredefinedResultsTable = function () {
710
+ oDecisionTableSettings.prototype._createPredefinedResultsTable = function () {
682
711
  //if the table does not exist, create the table
683
712
  if (!this.oPredefinedTable) {
684
- this.oPredefinedTable = new sap.m.Table("idPredefinedTable", {
685
- backgroundDesign: sap.m.BackgroundDesign.Solid,
686
- showSeparators: sap.m.ListSeparators.All,
687
- swipeDirection: sap.m.SwipeDirection.Both,
688
- layoutData: new sap.ui.layout.form.GridContainerData({
713
+ this.oPredefinedTable = new Table("idPredefinedTable", {
714
+ backgroundDesign: mobileLibrary.BackgroundDesign.Solid,
715
+ showSeparators: mobileLibrary.ListSeparators.All,
716
+ swipeDirection: mobileLibrary.SwipeDirection.Both,
717
+ /*layoutData: new GridContainerData({
689
718
  halfGrid: false
690
- }),
691
- columns: [new sap.m.Column({
719
+ }),TODO:Change by Harsh*/
720
+ columns: [new Column({
692
721
  width: "45%",
693
- header: new sap.m.Label({
722
+ header: new Label({
694
723
  text: this.oBundle.getText("PredefinedResultColumnHeaderText"),
695
- design: sap.m.LabelDesign.Bold
724
+ design: mobileLibrary.LabelDesign.Bold
696
725
  })
697
- }), new sap.m.Column({
726
+ }), new Column({
698
727
  width: "30%",
699
- header: new sap.m.Label({
728
+ header: new Label({
700
729
  text: this.oBundle.getText("PredefinedAccessColumnHeaderText"),
701
- design: sap.m.LabelDesign.Bold
730
+ design: mobileLibrary.LabelDesign.Bold
702
731
  })
703
- }), new sap.m.Column({
732
+ }), new Column({
704
733
  width: "45%",
705
- header: new sap.m.Label({
734
+ header: new Label({
706
735
  text: this.oBundle.getText("PredefinedValuesColumnHeaderText"),
707
- design: sap.m.LabelDesign.Bold
736
+ design: mobileLibrary.LabelDesign.Bold
708
737
  })
709
- }), new sap.m.Column({
738
+ }), new Column({
710
739
  width: "20%",
711
- header: new sap.m.Label({
740
+ header: new Label({
712
741
  text: this.oBundle.getText("ReorderResultDOAttributes"),
713
- design: sap.m.LabelDesign.Bold
742
+ design: mobileLibrary.LabelDesign.Bold
714
743
  })
715
744
  })]
716
745
  });
@@ -734,7 +763,7 @@ sap.ui.define([
734
763
  return null;
735
764
  };
736
765
 
737
- sap.rules.ui.DecisionTableSettings.prototype._createResultInput = function () {
766
+ oDecisionTableSettings.prototype._createResultInput = function () {
738
767
  var model = this.getModel();
739
768
  var resultDataObjectId = model.oData.ResultDataObjectId;
740
769
  var settingsModel = this.getModel("settingsModel");
@@ -763,21 +792,21 @@ sap.ui.define([
763
792
 
764
793
  var _handleSearch = function _handleSearch(evt) {
765
794
  var sValue = evt.getParameter("value");
766
- var oFilter = new sap.ui.model.Filter(
795
+ var oFilter = new Filter(
767
796
  "name",
768
- sap.ui.model.FilterOperator.Contains, sValue
797
+ FilterOperator.Contains, sValue
769
798
  );
770
799
  evt.getSource().getBinding("items").filter([oFilter]);
771
800
  };
772
801
 
773
- this.oSelectDialog = new sap.m.SelectDialog({
802
+ this.oSelectDialog = new SelectDialog({
774
803
  title: this.oBundle.getText("chooseResultDialogTitle"),
775
804
  styleClass: "sapUiPopupWithPadding",
776
805
  rememberSelections: true,
777
806
  items: {
778
807
  path: "settingsModel>/results/resultsEnumration",
779
808
  //sorter: { path: 'name' },
780
- template: new sap.m.StandardListItem({
809
+ template: new StandardListItem({
781
810
  title: "{settingsModel>label}",
782
811
  description: "{settingsModel>description}"
783
812
  })
@@ -841,9 +870,9 @@ sap.ui.define([
841
870
  MessageBox.warning(
842
871
  this.oBundle.getText("changeResultWarningMsg"), {
843
872
  title: this.oBundle.getText("changeResultWarningTitle"),
844
- actions: [sap.m.MessageBox.Action.OK, sap.m.MessageBox.Action.CANCEL],
873
+ actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],
845
874
  onClose: function (oAction) {
846
- if (oAction === sap.m.MessageBox.Action.OK) {
875
+ if (oAction === MessageBox.Action.OK) {
847
876
  _handleValueHelpOpen();
848
877
  }
849
878
  }
@@ -867,7 +896,7 @@ sap.ui.define([
867
896
  if(enableSettingResult) {
868
897
  this.oResultInput.bindAggregation("suggestionItems",{
869
898
  path: "settingsModel>/results/resultsEnumration",
870
- template: new sap.ui.core.Item({
899
+ template: new Item({
871
900
  key: "{settingsModel>id}",
872
901
  text: "{settingsModel>label}"
873
902
  })
@@ -881,8 +910,8 @@ sap.ui.define([
881
910
  return this.oResultInput;
882
911
  };
883
912
 
884
- sap.rules.ui.DecisionTableSettings.prototype._destroyElement = function (element) {
885
- var elementToDestroy = sap.ui.getCore().byId(element);
913
+ oDecisionTableSettings.prototype._destroyElement = function (element) {
914
+ var elementToDestroy = Element.getElementById(element);
886
915
  if (elementToDestroy) {
887
916
  if (element === "idPredefinedTable") {
888
917
  elementToDestroy.destroyColumns();
@@ -893,7 +922,7 @@ sap.ui.define([
893
922
 
894
923
  /*function to find if an attribute is deleted and then remove the attribute from JSON and OdatModel
895
924
  we will also have to ensure that the sequence is maintained after deletion*/
896
- sap.rules.ui.DecisionTableSettings.prototype._findAndRemoveDeletedAttributeFromOModel = function () {
925
+ oDecisionTableSettings.prototype._findAndRemoveDeletedAttributeFromOModel = function () {
897
926
  var _oSettingsModel = this.getModel("settingsModel");
898
927
  var jsonArrayWithExistingValues = _oSettingsModel.oData.predefinedResults;
899
928
 
@@ -928,7 +957,7 @@ sap.ui.define([
928
957
  }
929
958
  };
930
959
 
931
- sap.rules.ui.DecisionTableSettings.prototype._findPropertyAccessMode = function () {
960
+ oDecisionTableSettings.prototype._findPropertyAccessMode = function () {
932
961
  var dtPropertyList = this.oModels.oDataModel.oServiceData.oMetadata.mEntityTypes["/DecisionTableColumnResults"].property;
933
962
  if (dtPropertyList) {
934
963
  for (var nPropertyPos = 0; nPropertyPos < dtPropertyList.length; nPropertyPos++) {
@@ -941,9 +970,9 @@ sap.ui.define([
941
970
  };
942
971
 
943
972
  //AST expression basic control for condition table
944
- sap.rules.ui.DecisionTableSettings.prototype._getASTExpressionBasicForCondition = function (oContext) {
973
+ oDecisionTableSettings.prototype._getASTExpressionBasicForCondition = function (oContext) {
945
974
  var that = this;
946
- var oAstExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
975
+ var oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
947
976
  var sExpression = oContext.getProperty("Condition/Expression");
948
977
  var displayExpression = this._getExpressionFromAstNodes(oContext);
949
978
 
@@ -1006,7 +1035,7 @@ sap.ui.define([
1006
1035
  };
1007
1036
 
1008
1037
  //AST expression basic control for predefined table
1009
- sap.rules.ui.DecisionTableSettings.prototype._getASTExpressionBasicForPredefined = function (oContext, expressionID, expression,
1038
+ oDecisionTableSettings.prototype._getASTExpressionBasicForPredefined = function (oContext, expressionID, expression,
1010
1039
  businessDataType, astNodes) {
1011
1040
  var that = this;
1012
1041
  var sAttributeId = "";
@@ -1026,8 +1055,8 @@ sap.ui.define([
1026
1055
  if(expression && expression.relString) {
1027
1056
  expression.relString = expression.relString.replace(/\\/g,"\\\\").replace(/{/g, "\\{").replace(/}/g, "\\}");
1028
1057
  }
1029
- var oAstExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
1030
- var sbusinessDataType = businessDataType ? businessDataType : sap.rules.ui.ExpressionType.NonComparison;
1058
+ var oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
1059
+ var sbusinessDataType = businessDataType ? businessDataType : library.ExpressionType.NonComparison;
1031
1060
  var astExpressionBasic = new AstExpressionBasic({
1032
1061
  id: expressionID,
1033
1062
  astExpressionLanguage: oAstExpressionLanguage,
@@ -1058,7 +1087,7 @@ sap.ui.define([
1058
1087
  };
1059
1088
 
1060
1089
  //Parses the nodes generated from astEL to form understandable by backend
1061
- sap.rules.ui.DecisionTableSettings.prototype._getASTNodes = function (astNodes, oContext) {
1090
+ oDecisionTableSettings.prototype._getASTNodes = function (astNodes, oContext) {
1062
1091
  var modifiedNodes = []
1063
1092
  for (var node in astNodes) {
1064
1093
  var updatedAstNode = {};
@@ -1094,7 +1123,7 @@ sap.ui.define([
1094
1123
  return modifiedNodes;
1095
1124
  };
1096
1125
 
1097
- sap.rules.ui.DecisionTableSettings.prototype._getBindModelName = function () {
1126
+ oDecisionTableSettings.prototype._getBindModelName = function () {
1098
1127
  var path = "";
1099
1128
  var modelName = this.getModelName();
1100
1129
  if (modelName) {
@@ -1103,18 +1132,18 @@ sap.ui.define([
1103
1132
  return path;
1104
1133
  };
1105
1134
 
1106
- sap.rules.ui.DecisionTableSettings.prototype._getCellFormat = function () {
1135
+ oDecisionTableSettings.prototype._getCellFormat = function () {
1107
1136
  //Handling the valueOnly when the DecisionTableFormat is set to RuleFormat
1108
1137
  var sCellFormat = this.getProperty("cellFormat");
1109
1138
  var sdecisionTableFormat = this.getProperty("decisionTableFormat");
1110
- if (sdecisionTableFormat === sap.rules.ui.DecisionTableFormat.RuleFormat) {
1111
- return (this.getModel().getData().RuleFormat === sap.rules.ui.RuleFormat.Basic) ? true : false;
1139
+ if (sdecisionTableFormat === library.DecisionTableFormat.RuleFormat) {
1140
+ return (this.getModel().getData().RuleFormat === library.RuleFormat.Basic) ? true : false;
1112
1141
  }
1113
- return (sCellFormat !== sap.rules.ui.DecisionTableCellFormat.Text) ? true : false;
1142
+ return (sCellFormat !== library.DecisionTableCellFormat.Text) ? true : false;
1114
1143
  };
1115
1144
 
1116
1145
  //structure definition for the visibility of columns. This will be a part of the settings model
1117
- sap.rules.ui.DecisionTableSettings.prototype._getCellFormatAcccessOptions = function () {
1146
+ oDecisionTableSettings.prototype._getCellFormatAcccessOptions = function () {
1118
1147
  var sCellFormat = this.getProperty("cellFormat");
1119
1148
  var oCellFormatData = {
1120
1149
  CellFormat: sCellFormat,
@@ -1129,7 +1158,7 @@ sap.ui.define([
1129
1158
  return oCellFormatData;
1130
1159
  };
1131
1160
 
1132
- sap.rules.ui.DecisionTableSettings.prototype._getCellFormatData = function () {
1161
+ oDecisionTableSettings.prototype._getCellFormatData = function () {
1133
1162
  var sCellFormat = this.getProperty("cellFormat");
1134
1163
  var oCellFormatData = {
1135
1164
  CellFormat: sCellFormat,
@@ -1144,7 +1173,7 @@ sap.ui.define([
1144
1173
  return oCellFormatData;
1145
1174
  };
1146
1175
 
1147
- sap.rules.ui.DecisionTableSettings.prototype._getColumnInputMode = function (bValueOnly) {
1176
+ oDecisionTableSettings.prototype._getColumnInputMode = function (bValueOnly) {
1148
1177
  if (!bValueOnly) {
1149
1178
  return this.oBundle.getText("advancedMode");
1150
1179
  }
@@ -1152,14 +1181,14 @@ sap.ui.define([
1152
1181
  };
1153
1182
 
1154
1183
  //REL control for condition table
1155
- sap.rules.ui.DecisionTableSettings.prototype._getExpressionAdvanceColumn = function (oBindingContext) {
1156
- var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
1184
+ oDecisionTableSettings.prototype._getExpressionAdvanceColumn = function (oBindingContext) {
1185
+ var oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
1157
1186
 
1158
1187
  return new ExpressionAdvanced({
1159
1188
  expressionLanguage: oExpressionLanguage,
1160
1189
  placeholder: this.oBundle.getText("expressionPlaceHolder"),
1161
1190
  validateOnLoad: true,
1162
- type: sap.rules.ui.ExpressionType.NonComparison,
1191
+ type: library.ExpressionType.NonComparison,
1163
1192
  value: {
1164
1193
  path: "Condition/Expression",
1165
1194
  events: {
@@ -1198,7 +1227,7 @@ sap.ui.define([
1198
1227
  });
1199
1228
  };
1200
1229
 
1201
- sap.rules.ui.DecisionTableSettings.prototype._getExpressionFieldForCondition = function (oContext) {
1230
+ oDecisionTableSettings.prototype._getExpressionFieldForCondition = function (oContext) {
1202
1231
  var oControl;
1203
1232
  //Check expressionlanguage type
1204
1233
  if (this.getExpressionLanguage()) {
@@ -1209,7 +1238,7 @@ sap.ui.define([
1209
1238
  return oControl;
1210
1239
  };
1211
1240
 
1212
- sap.rules.ui.DecisionTableSettings.prototype._getExpressionFieldForPredefined = function (oContext, expressionID, expression,
1241
+ oDecisionTableSettings.prototype._getExpressionFieldForPredefined = function (oContext, expressionID, expression,
1213
1242
  businessDataType, astNodes) {
1214
1243
  var oControl;
1215
1244
  //Check expressionlanguage type
@@ -1221,9 +1250,9 @@ sap.ui.define([
1221
1250
  return oControl;
1222
1251
  };
1223
1252
 
1224
- sap.rules.ui.DecisionTableSettings.prototype._getExpressionFromAstNodes = function (oContext, astNodes) {
1253
+ oDecisionTableSettings.prototype._getExpressionFromAstNodes = function (oContext, astNodes) {
1225
1254
  var that = this;
1226
- var oAstExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
1255
+ var oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
1227
1256
  var termsProvider = oAstExpressionLanguage._astBunldeInstance.TermsProvider.TermsProvider;
1228
1257
  var displayExpression = "";
1229
1258
  var displayTermExpression = "";
@@ -1256,7 +1285,7 @@ sap.ui.define([
1256
1285
  return displayExpression;
1257
1286
  };
1258
1287
 
1259
- sap.rules.ui.DecisionTableSettings.prototype._getFixedOperatorDataForExpression = function (sExpression, bValueOnly, astControl) {
1288
+ oDecisionTableSettings.prototype._getFixedOperatorDataForExpression = function (sExpression, bValueOnly, astControl) {
1260
1289
  var fixOperatorEnabled = sExpression ? true : false;
1261
1290
  var fixedOperatorData = {
1262
1291
  fixOperatorEnumration: [{
@@ -1267,26 +1296,26 @@ sap.ui.define([
1267
1296
  };
1268
1297
  var oSuggestions = [];
1269
1298
  if (this.getExpressionLanguage() && fixOperatorEnabled) {
1270
- var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
1299
+ var oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
1271
1300
  var oFilter;
1272
1301
  if (!bValueOnly) {
1273
1302
  oFilter = [{
1274
- tokenType: sap.rules.ui.ExpressionTokenType.reservedWord,
1275
- tokenCategory: sap.rules.ui.ExpressionCategory.comparisonOp
1303
+ tokenType: library.ExpressionTokenType.reservedWord,
1304
+ tokenCategory: library.ExpressionCategory.comparisonOp
1276
1305
  }, {
1277
- tokenType: sap.rules.ui.ExpressionTokenType.reservedWord,
1278
- tokenCategory: sap.rules.ui.ExpressionCategory.comparisonBetweenOp
1306
+ tokenType: library.ExpressionTokenType.reservedWord,
1307
+ tokenCategory: library.ExpressionCategory.comparisonBetweenOp
1279
1308
  }, {
1280
- tokenType: sap.rules.ui.ExpressionTokenType.reservedWord,
1281
- tokenCategory: sap.rules.ui.ExpressionCategory.comparisonExistOp
1309
+ tokenType: library.ExpressionTokenType.reservedWord,
1310
+ tokenCategory: library.ExpressionCategory.comparisonExistOp
1282
1311
  }];
1283
1312
  } else {
1284
1313
  oFilter = [{
1285
- tokenType: sap.rules.ui.ExpressionTokenType.reservedWord,
1286
- tokenCategory: sap.rules.ui.ExpressionCategory.comparisonOp
1314
+ tokenType: library.ExpressionTokenType.reservedWord,
1315
+ tokenCategory: library.ExpressionCategory.comparisonOp
1287
1316
  }, {
1288
- tokenType: sap.rules.ui.ExpressionTokenType.reservedWord,
1289
- tokenCategory: sap.rules.ui.ExpressionCategory.comparisonBetweenOp
1317
+ tokenType: library.ExpressionTokenType.reservedWord,
1318
+ tokenCategory: library.ExpressionCategory.comparisonBetweenOp
1290
1319
  }];
1291
1320
  }
1292
1321
 
@@ -1359,7 +1388,7 @@ sap.ui.define([
1359
1388
  return fixedOperatorData;
1360
1389
  };
1361
1390
 
1362
- sap.rules.ui.DecisionTableSettings.prototype._getHitPoliciesData = function () {
1391
+ oDecisionTableSettings.prototype._getHitPoliciesData = function () {
1363
1392
  var hitPolicy = this.getProperty("hitPolicies");
1364
1393
  var length = hitPolicy.length;
1365
1394
  var oHitPolicyData = {
@@ -1375,26 +1404,26 @@ sap.ui.define([
1375
1404
  return oHitPolicyData;
1376
1405
  };
1377
1406
 
1378
- sap.rules.ui.DecisionTableSettings.prototype._getInputModeEnabled = function (sCellFormat, bValueOnly) {
1379
- if (sCellFormat !== sap.rules.ui.DecisionTableCellFormat.Both || bValueOnly === false) {
1407
+ oDecisionTableSettings.prototype._getInputModeEnabled = function (sCellFormat, bValueOnly) {
1408
+ if (sCellFormat !== library.DecisionTableCellFormat.Both || bValueOnly === false) {
1380
1409
  return false;
1381
1410
  }
1382
1411
  return true;
1383
1412
  };
1384
1413
 
1385
1414
  //Rebinding predefined table when result is change or refresh event
1386
- sap.rules.ui.DecisionTableSettings.prototype._getLatestResultDataObjects = function (newResultDataObjectId) {
1415
+ oDecisionTableSettings.prototype._getLatestResultDataObjects = function (newResultDataObjectId) {
1387
1416
  var that = this;
1388
1417
  var oModel = that.getModel().getData();
1389
1418
  var sProjectId = oModel.ProjectId;
1390
1419
  var settingsModel = that.getModel("settingsModel");
1391
1420
  var oExpressionLanguage;
1392
1421
  if (this.getExpressionLanguage()) {
1393
- oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
1422
+ oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
1394
1423
  } else {
1395
- oExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
1424
+ oExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
1396
1425
  }
1397
- var vocabularyModel = new sap.ui.model.odata.v2.ODataModel(oExpressionLanguage.getModel().sServiceUrl);
1426
+ var vocabularyModel = new ODataModel(oExpressionLanguage.getModel().sServiceUrl);
1398
1427
  var sPath = "/DataObjects(VocabularyId='" + sProjectId + "',Id='" + newResultDataObjectId + "')";
1399
1428
  //Resetting the path before reusing the factory function to load predefined results table
1400
1429
  // Error mentioned in the CSN : 1880262342
@@ -1405,7 +1434,7 @@ sap.ui.define([
1405
1434
  return that.oPredefinedTable;
1406
1435
  };
1407
1436
 
1408
- sap.rules.ui.DecisionTableSettings.prototype._getMessageByResultUpdates = function (resultUpdates) {
1437
+ oDecisionTableSettings.prototype._getMessageByResultUpdates = function (resultUpdates) {
1409
1438
  var messageRefreshWillDelete = this.oBundle.getText("refreshingWillDeleteMsg");
1410
1439
  var messageAreyouSure = this.oBundle.getText("refreshAreyouSureMsg");
1411
1440
  var countChanges = resultUpdates.addedColumns.length + resultUpdates.changedColumns.length + resultUpdates.removedColumns.length;
@@ -1430,7 +1459,7 @@ sap.ui.define([
1430
1459
  };
1431
1460
 
1432
1461
  //REL control for predefined
1433
- sap.rules.ui.DecisionTableSettings.prototype._getPredefinedExpressionAdvanced = function (oContext, expressionID, expression,
1462
+ oDecisionTableSettings.prototype._getPredefinedExpressionAdvanced = function (oContext, expressionID, expression,
1434
1463
  businessDataType) {
1435
1464
  var that = this;
1436
1465
  var sAttributeId = "";
@@ -1438,8 +1467,8 @@ sap.ui.define([
1438
1467
  if (oResultData && !sAttributeId) {
1439
1468
  sAttributeId = oResultData.DataObjectAttributeId ? oResultData.DataObjectAttributeId : oResultData.Id;
1440
1469
  }
1441
- var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
1442
- var sbusinessDataType = businessDataType ? businessDataType : sap.rules.ui.ExpressionType.NonComparison;
1470
+ var oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
1471
+ var sbusinessDataType = businessDataType ? businessDataType : library.ExpressionType.NonComparison;
1443
1472
 
1444
1473
  return new ExpressionAdvanced({
1445
1474
  expressionLanguage: oExpressionLanguage,
@@ -1458,12 +1487,12 @@ sap.ui.define([
1458
1487
  });
1459
1488
  };
1460
1489
 
1461
- sap.rules.ui.DecisionTableSettings.prototype._getResultsData = function () {
1490
+ oDecisionTableSettings.prototype._getResultsData = function () {
1462
1491
  var oExpressionLanguage;
1463
1492
  if (this.getAstExpressionLanguage()) {
1464
- oExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
1493
+ oExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
1465
1494
  } else {
1466
- oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
1495
+ oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
1467
1496
  }
1468
1497
  var oResultsEnumration = [{
1469
1498
  id: Constants.NO_RESULT,
@@ -1477,7 +1506,7 @@ sap.ui.define([
1477
1506
  return oResultsData;
1478
1507
  };
1479
1508
 
1480
- sap.rules.ui.DecisionTableSettings.prototype._getResultsUpdates = function (resultColumnsOld, resultColumnsNew) {
1509
+ oDecisionTableSettings.prototype._getResultsUpdates = function (resultColumnsOld, resultColumnsNew) {
1481
1510
  var addedColumns = [],
1482
1511
  removedColumns = [],
1483
1512
  changedColumns = [];
@@ -1524,7 +1553,7 @@ sap.ui.define([
1524
1553
  };
1525
1554
 
1526
1555
  //Read the existing visibility status from Odata
1527
- sap.rules.ui.DecisionTableSettings.prototype._getSelectedVisibilityStatus = function (sAccess) {
1556
+ oDecisionTableSettings.prototype._getSelectedVisibilityStatus = function (sAccess) {
1528
1557
  if (sAccess === this.hiddenModeText) {
1529
1558
  return Constants.KEY_HIDDEN;
1530
1559
  } else {
@@ -1532,12 +1561,12 @@ sap.ui.define([
1532
1561
  }
1533
1562
  };
1534
1563
 
1535
- sap.rules.ui.DecisionTableSettings.prototype._initServiceModel = function () {
1564
+ oDecisionTableSettings.prototype._initServiceModel = function () {
1536
1565
  var odataModel = this.getModel("oDataModel");
1537
1566
  var sServiceURL = odataModel.sServiceUrl;
1538
- var oModel = new sap.ui.model.odata.v2.ODataModel({
1567
+ var oModel = new ODataModel({
1539
1568
  serviceUrl: sServiceURL,
1540
- defaultBindingMode: sap.ui.model.BindingMode.TwoWay
1569
+ defaultBindingMode: BindingMode.TwoWay
1541
1570
  });
1542
1571
  var model = oModel.getMetaModel();
1543
1572
  if (model && model.oMetadata && model.oMetadata.bLoaded) {
@@ -1549,7 +1578,7 @@ sap.ui.define([
1549
1578
  }
1550
1579
  };
1551
1580
 
1552
- sap.rules.ui.DecisionTableSettings.prototype._initSettingsModel = function () {
1581
+ oDecisionTableSettings.prototype._initSettingsModel = function () {
1553
1582
  var initialData = {};
1554
1583
  initialData.hitPolicy = this._getHitPoliciesData();
1555
1584
  initialData.tableData = {};
@@ -1562,13 +1591,13 @@ sap.ui.define([
1562
1591
  initialData.resultAttributeChanged = false;
1563
1592
  initialData.refreshButtonClicked = false;
1564
1593
  initialData.results = this._getResultsData();
1565
- this._internalModel = new sap.ui.model.json.JSONModel(initialData);
1594
+ this._internalModel = new JSONModel(initialData);
1566
1595
  this.setModel(this._internalModel, "settingsModel");
1567
1596
  this._initServiceModel();
1568
1597
  };
1569
1598
 
1570
- sap.rules.ui.DecisionTableSettings.prototype._openWarningDialog = function (oSelect, oContext) {
1571
- var dialog = new sap.m.Dialog({
1599
+ oDecisionTableSettings.prototype._openWarningDialog = function (oSelect, oContext) {
1600
+ var dialog = new Dialog({
1572
1601
  title: this.oBundle.getText("changeInputModeDialogTitle"),
1573
1602
  width: "70%",
1574
1603
  type: 'Message',
@@ -1602,7 +1631,7 @@ sap.ui.define([
1602
1631
  };
1603
1632
 
1604
1633
  // Factory function to display and control access options column
1605
- sap.rules.ui.DecisionTableSettings.prototype._predefinedFactory = function (sId, oContext) {
1634
+ oDecisionTableSettings.prototype._predefinedFactory = function (sId, oContext) {
1606
1635
  //basic display of predefinedResults reads from oContext
1607
1636
  //colid is used only element. On refresh we wont get the Sequence, hence we use the name here
1608
1637
  var expressionID = "exp" + sId;
@@ -1641,25 +1670,25 @@ sap.ui.define([
1641
1670
 
1642
1671
  var sAccessKey = this._getSelectedVisibilityStatus(sSelectedKey);
1643
1672
 
1644
- return new sap.m.ColumnListItem({
1673
+ return new ColumnListItem({
1645
1674
  visible: true,
1646
- vAlign: sap.ui.core.VerticalAlign.Middle,
1675
+ vAlign: coreLibrary.VerticalAlign.Middle,
1647
1676
  cells: [
1648
- new sap.m.Label({
1677
+ new Label({
1649
1678
  visible: true,
1650
- design: sap.m.LabelDesign.Standard,
1679
+ design: mobileLibrary.LabelDesign.Standard,
1651
1680
  text: displayText,
1652
1681
  labelFor: expressionID,
1653
- textAlign: sap.ui.core.TextAlign.Begin,
1654
- textDirection: sap.ui.core.TextDirection.Inherit
1682
+ textAlign: coreLibrary.TextAlign.Begin,
1683
+ textDirection: coreLibrary.TextDirection.Inherit
1655
1684
  }),
1656
1685
 
1657
- new sap.m.Select({
1686
+ new Select({
1658
1687
  width: "65%",
1659
1688
  id: "select" + sId,
1660
1689
  items: {
1661
1690
  path: "settingsModel>/accessOptions/cellFormatEnumration",
1662
- template: new sap.ui.core.Item({
1691
+ template: new Item({
1663
1692
  key: "{settingsModel>key}",
1664
1693
  text: "{settingsModel>value}"
1665
1694
  })
@@ -1673,18 +1702,18 @@ sap.ui.define([
1673
1702
 
1674
1703
  this._getExpressionFieldForPredefined(oContext, expressionID, expression, businessDataType, astNodes),
1675
1704
 
1676
- new sap.ui.layout.HorizontalLayout({
1705
+ new HorizontalLayout({
1677
1706
  content: [
1678
- new sap.m.Button({
1679
- type: sap.m.ButtonType.Transparent,
1707
+ new Button({
1708
+ type: mobileLibrary.ButtonType.Transparent,
1680
1709
  icon: "sap-icon://arrow-top",
1681
1710
  visible: true,
1682
1711
  press: function (oEvent) {
1683
1712
  this._moveAttributePosition(oContext, Constants.UP);
1684
1713
  }.bind(this)
1685
1714
  }).setTooltip(this.oBundle.getText("MoveResultAttributeUP")),
1686
- new sap.m.Button({
1687
- type: sap.m.ButtonType.Transparent,
1715
+ new Button({
1716
+ type: mobileLibrary.ButtonType.Transparent,
1688
1717
  icon: "sap-icon://arrow-bottom",
1689
1718
  press: function (oEvent) {
1690
1719
  this._moveAttributePosition(oContext, Constants.DOWN);
@@ -1696,7 +1725,7 @@ sap.ui.define([
1696
1725
  });
1697
1726
  };
1698
1727
 
1699
- sap.rules.ui.DecisionTableSettings.prototype._moveAttributePosition = function (oContext, sDirection) {
1728
+ oDecisionTableSettings.prototype._moveAttributePosition = function (oContext, sDirection) {
1700
1729
  var settingsModel = this.getModel("settingsModel");
1701
1730
  var settingsData = settingsModel.getData();
1702
1731
  var oModel = this.getModel().getData();
@@ -1745,7 +1774,7 @@ sap.ui.define([
1745
1774
  this.oPredefinedTable.setBusyIndicatorDelay(0);
1746
1775
  };
1747
1776
 
1748
- sap.rules.ui.DecisionTableSettings.prototype._prepareNewRule = function () {
1777
+ oDecisionTableSettings.prototype._prepareNewRule = function () {
1749
1778
  this._updateDecisionTableHeader();
1750
1779
  this._createDefaultColumn();
1751
1780
  //Set default result only in case of ABAP
@@ -1754,7 +1783,7 @@ sap.ui.define([
1754
1783
  }
1755
1784
  };
1756
1785
 
1757
- sap.rules.ui.DecisionTableSettings.prototype._removeColumnFromJsonModel = function (sequence, status) {
1786
+ oDecisionTableSettings.prototype._removeColumnFromJsonModel = function (sequence, status) {
1758
1787
  var displayModel = this.getModel();
1759
1788
  var modelData = displayModel.getData();
1760
1789
  var aColumns = modelData.DecisionTable.DecisionTableColumns.results;
@@ -1781,7 +1810,7 @@ sap.ui.define([
1781
1810
  this._setDisplayModelData(modelData);
1782
1811
  };
1783
1812
 
1784
- sap.rules.ui.DecisionTableSettings.prototype._ruleResultColumns = function () {
1813
+ oDecisionTableSettings.prototype._ruleResultColumns = function () {
1785
1814
  var currentColumns = this.getModel().oData.DecisionTable.DecisionTableColumns.results;
1786
1815
 
1787
1816
  function isResult(currentColumn) {
@@ -1792,11 +1821,11 @@ sap.ui.define([
1792
1821
 
1793
1822
  // if the user chooses the result col to be hidden, enable expression advanced or read from the existing Odata entry
1794
1823
  // if the user chooses the result col to be editable, diable expression advanced and make it available in decision table
1795
- sap.rules.ui.DecisionTableSettings.prototype._setColumnAccessMode = function (oContext, oEvent) {
1824
+ oDecisionTableSettings.prototype._setColumnAccessMode = function (oContext, oEvent) {
1796
1825
  this.enableAccessValue = !this.enableAccessValue;
1797
1826
  var cell = oEvent.oSource.sId.split("select")[1];
1798
1827
  var updateCellID = "exp" + cell;
1799
- this.expressionControl = sap.ui.getCore().byId(updateCellID);
1828
+ this.expressionControl = Element.getElementById(updateCellID);
1800
1829
  //var resultEntryNumber = oContext.getProperty("Sequence");
1801
1830
  //resultEntryNumber = resultEntryNumber - 1;
1802
1831
  this.getModel("settingsModel").setProperty("/resultAttributeChanged", true);
@@ -1822,7 +1851,7 @@ sap.ui.define([
1822
1851
  "expId": expId
1823
1852
  };
1824
1853
 
1825
- var oEventBus = sap.ui.getCore().getEventBus();
1854
+ var oEventBus = EventBus.getInstance();
1826
1855
  oEventBus.publish("sap.ui.rules", "_onHiddenSelected", obj);
1827
1856
  this._updateResultAttributeJSON(oContext, Constants.HIDDEN, null, null, null, false, false, false);
1828
1857
  } else {
@@ -1834,7 +1863,7 @@ sap.ui.define([
1834
1863
  };
1835
1864
 
1836
1865
  // Function to enable /disable Apply based on hidden attributes
1837
- sap.rules.ui.DecisionTableSettings.prototype._updateApplyBtnActions = function() {
1866
+ oDecisionTableSettings.prototype._updateApplyBtnActions = function() {
1838
1867
  if (this._internalModel) {
1839
1868
  var predefinedResults = this._internalModel.oData.predefinedResults;
1840
1869
  var hiddenAttributeWithNoExpression = false;
@@ -1852,14 +1881,14 @@ sap.ui.define([
1852
1881
  }
1853
1882
  }
1854
1883
  if (hiddenAttributeWithNoExpression) {
1855
- sap.ui.getCore().byId("ApplyBtn").setEnabled(false);
1884
+ Element.getElementById("ApplyBtn").setEnabled(false);
1856
1885
  } else {
1857
- sap.ui.getCore().byId("ApplyBtn").setEnabled(true);
1886
+ Element.getElementById("ApplyBtn").setEnabled(true);
1858
1887
  }
1859
1888
  }
1860
1889
  };
1861
1890
 
1862
- sap.rules.ui.DecisionTableSettings.prototype._setDefaultResult = function () {
1891
+ oDecisionTableSettings.prototype._setDefaultResult = function () {
1863
1892
  var _displayModel = this.getModel();
1864
1893
  var modelData = _displayModel.getData();
1865
1894
  var resultsEnumration = this._internalModel.getData().results.resultsEnumration;
@@ -1872,25 +1901,25 @@ sap.ui.define([
1872
1901
  }
1873
1902
  };
1874
1903
 
1875
- sap.rules.ui.DecisionTableSettings.prototype._setDisplayModelData = function (modelData) {
1904
+ oDecisionTableSettings.prototype._setDisplayModelData = function (modelData) {
1876
1905
  this.resultCounter = 0;
1877
1906
  var displayModel = this.getModel();
1878
1907
  displayModel.setData(modelData);
1879
1908
  };
1880
1909
 
1881
- sap.rules.ui.DecisionTableSettings.prototype.setExpressionLanguage = function (oExpressionLanguage) {
1910
+ oDecisionTableSettings.prototype.setExpressionLanguage = function (oExpressionLanguage) {
1882
1911
  this.setAssociation("expressionLanguage", oExpressionLanguage, true);
1883
1912
  this._decisionTableHeaderSettingFormatter.setExpressionLanguage(oExpressionLanguage);
1884
1913
  };
1885
1914
 
1886
- sap.rules.ui.DecisionTableSettings.prototype._setExpressionRelevantOperators = function (displayExpression, colId, bValueOnly,
1915
+ oDecisionTableSettings.prototype._setExpressionRelevantOperators = function (displayExpression, colId, bValueOnly,
1887
1916
  astControl) {
1888
1917
  var oFixedOperatorData = this._getFixedOperatorDataForExpression(displayExpression, bValueOnly, astControl);
1889
1918
  this._internalModel.setProperty("/tableData/" + colId, oFixedOperatorData, false);
1890
1919
  this._updateRemoveRowEnabled();
1891
1920
  };
1892
1921
 
1893
- sap.rules.ui.DecisionTableSettings.prototype._tableColumnsFactory = function (sId, oContext) {
1922
+ oDecisionTableSettings.prototype._tableColumnsFactory = function (sId, oContext) {
1894
1923
  var that = this;
1895
1924
  var colId = oContext.getProperty("Id");
1896
1925
  var sequence = oContext.getProperty("Sequence");
@@ -1900,13 +1929,13 @@ sap.ui.define([
1900
1929
  var fixedOperator = oContext.getProperty("Condition/FixedOperator");
1901
1930
  var sOperator = this.getAstExpressionLanguage() ? this.astUtil._getCapitalOperatorName(fixedOperator) : fixedOperator;
1902
1931
 
1903
- return new sap.m.ColumnListItem({
1904
- visible: type === sap.rules.ui.DecisionTableColumn.Condition,
1932
+ return new ColumnListItem({
1933
+ visible: type === library.DecisionTableColumn.Condition,
1905
1934
  cells: [
1906
1935
  // gets the expression col
1907
1936
  this._getExpressionFieldForCondition(oContext),
1908
1937
 
1909
- new sap.m.Input({
1938
+ new Input({
1910
1939
  value: label,
1911
1940
  maxLength: Constants.MAX_LABEL_LENGTH,
1912
1941
  change: function (oEvent) {
@@ -1919,12 +1948,12 @@ sap.ui.define([
1919
1948
  }),
1920
1949
 
1921
1950
  // gets the vocab col
1922
- new sap.m.Select({
1951
+ new Select({
1923
1952
  width: "100%",
1924
1953
  showSecondaryValues: true,
1925
1954
  items: {
1926
1955
  path: "settingsModel>/tableData/" + colId + "/fixOperatorEnumration",
1927
- template: new sap.ui.core.ListItem({
1956
+ template: new ListItem({
1928
1957
  key: "{settingsModel>key}",
1929
1958
  text: "{settingsModel>key}",
1930
1959
  additionalText: "{settingsModel>value}"
@@ -1972,11 +2001,11 @@ sap.ui.define([
1972
2001
  }.bind(this)
1973
2002
 
1974
2003
  }),*/
1975
- new sap.ui.layout.HorizontalLayout({
2004
+ new HorizontalLayout({
1976
2005
  content: [
1977
- new sap.m.Button({
1978
- type: sap.m.ButtonType.Transparent,
1979
- icon: sap.ui.core.IconPool.getIconURI("sys-cancel"),
2006
+ new Button({
2007
+ type: mobileLibrary.ButtonType.Transparent,
2008
+ icon: IconPool.getIconURI("sys-cancel"),
1980
2009
  visible: "{settingsModel>/removeRowEnabled}",
1981
2010
  press: function (oEvent) {
1982
2011
  //Clear tableData since the columns will be build again
@@ -1985,9 +2014,9 @@ sap.ui.define([
1985
2014
  this._removeColumnFromJsonModel(sequence, status);
1986
2015
  }.bind(this)
1987
2016
  }).setTooltip(this.oBundle.getText("removeColumn")),
1988
- new sap.m.Button({
1989
- type: sap.m.ButtonType.Transparent,
1990
- icon: sap.ui.core.IconPool.getIconURI("add"),
2017
+ new Button({
2018
+ type: mobileLibrary.ButtonType.Transparent,
2019
+ icon: IconPool.getIconURI("add"),
1991
2020
  press: function (oEvent) {
1992
2021
  //Add coulmn from JSON model
1993
2022
  this._addColumnToJsonModel(sequence);
@@ -1999,23 +2028,23 @@ sap.ui.define([
1999
2028
  }).addStyleClass("sapRULDecisionTableSettingsConditionRow");
2000
2029
  };
2001
2030
 
2002
- sap.rules.ui.DecisionTableSettings.prototype._updateDecisionTableHeader = function () {
2031
+ oDecisionTableSettings.prototype._updateDecisionTableHeader = function () {
2003
2032
  var _displayModel = this.getModel();
2004
2033
  var oExpressionLanguage;
2005
2034
  if (this.getAstExpressionLanguage()) {
2006
- oExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
2035
+ oExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
2007
2036
  } else {
2008
- oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
2037
+ oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
2009
2038
  }
2010
2039
  var sExpressionLanguageVersion = oExpressionLanguage.getExpressionLanguageVersion();
2011
2040
  var modelData = _displayModel.getData();
2012
2041
  //Fullfill decisiontable header data
2013
- modelData.Type = sap.rules.ui.RuleType.DecisionTable;
2042
+ modelData.Type = library.RuleType.DecisionTable;
2014
2043
  //modelData.RuleFormat = sap.rules.ui.RuleFormat.Advanced;
2015
2044
  modelData.ExpressionLanguageVersion = sExpressionLanguageVersion;
2016
2045
  };
2017
2046
 
2018
- sap.rules.ui.DecisionTableSettings.prototype._updateRefreshFlags = function (needRefresh, isEnabled, bRefreshed) {
2047
+ oDecisionTableSettings.prototype._updateRefreshFlags = function (needRefresh, isEnabled, bRefreshed) {
2019
2048
  this.getModel().getData().needToRefresh = needRefresh;
2020
2049
  this.getModel("settingsModel").setProperty("/refreshButtonEnabled", isEnabled, null, true);
2021
2050
  /////////////////// Non ABAP Requires Predefined results table. Hence, calling function import before Apply/////////
@@ -2023,7 +2052,7 @@ sap.ui.define([
2023
2052
  this._callRefreshResultsFunctionImport();
2024
2053
  };
2025
2054
 
2026
- sap.rules.ui.DecisionTableSettings.prototype._updateRemoveRowEnabled = function () {
2055
+ oDecisionTableSettings.prototype._updateRemoveRowEnabled = function () {
2027
2056
  //var columns = this.conditionsTable.getAggregation("items");
2028
2057
  var columns = this.getModel().getProperty("/DecisionTable/DecisionTableColumns/results");
2029
2058
  var visibleCounter = 0;
@@ -2038,7 +2067,7 @@ sap.ui.define([
2038
2067
  };
2039
2068
 
2040
2069
  //Updates the array of DataObjectAttributes with properties when result/AccessMode/Expression is changed
2041
- sap.rules.ui.DecisionTableSettings.prototype._updateResultAttributeJSON = function (
2070
+ oDecisionTableSettings.prototype._updateResultAttributeJSON = function (
2042
2071
  oContext, sAccessMode, sExpression, astNodes, bResultChanged, isRefreshed, isSequenceChanged) {
2043
2072
  var sAttributeId = oContext.getProperty("DataObjectAttributeId") || oContext.getProperty("Id") || (oContext.DataObjectAttributeinfo ? oContext.DataObjectAttributeinfo.Id : undefined);
2044
2073
  var sDataPath = "/predefinedResults/" + sAttributeId;
@@ -2145,7 +2174,7 @@ sap.ui.define([
2145
2174
 
2146
2175
  };
2147
2176
 
2148
- sap.rules.ui.DecisionTableSettings.prototype.getButtons = function (oDialog) {
2177
+ oDecisionTableSettings.prototype.getButtons = function (oDialog) {
2149
2178
  var aButtons = [];
2150
2179
  //Create cancel button
2151
2180
  var oCancelButton = new Button({
@@ -2156,7 +2185,7 @@ sap.ui.define([
2156
2185
  }, this);
2157
2186
 
2158
2187
  //Create apply button
2159
- var oApplyBtn = sap.ui.getCore().byId("ApplyBtn");
2188
+ var oApplyBtn = Element.getElementById("ApplyBtn");
2160
2189
  if (!oApplyBtn) {
2161
2190
  oApplyBtn = new Button({
2162
2191
  text: this.oBundle.getText("applyChangesBtn"),
@@ -2166,7 +2195,7 @@ sap.ui.define([
2166
2195
 
2167
2196
  oApplyBtn.attachPress(function () {
2168
2197
  if (!this._applyButtonPressed) {
2169
- sap.ui.core.BusyIndicator.show();
2198
+ BusyIndicator.show();
2170
2199
  this.multiHeaderFlag = false; //flag for calculate only once header span for multi header in columnFactory function
2171
2200
  //In case of successfull apply, the oDialog is closed from the success callback
2172
2201
  this._applySettingsModelChangesToOData(oDialog);
@@ -2179,8 +2208,8 @@ sap.ui.define([
2179
2208
  return aButtons;
2180
2209
  };
2181
2210
 
2182
- sap.rules.ui.DecisionTableSettings.prototype.init = function () {
2183
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
2211
+ oDecisionTableSettings.prototype.init = function () {
2212
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
2184
2213
  this.editableModeText = Constants.EDITABLE;
2185
2214
  this.hiddenModeText = Constants.HIDDEN;
2186
2215
  this.needCreateLayout = true;
@@ -2208,7 +2237,7 @@ sap.ui.define([
2208
2237
 
2209
2238
  };
2210
2239
 
2211
- sap.rules.ui.DecisionTableSettings.prototype.onBeforeRendering = function () {
2240
+ oDecisionTableSettings.prototype.onBeforeRendering = function () {
2212
2241
  this.mNextColumnId = this._calcNextColumnId();
2213
2242
  if (this.firstLoad) {
2214
2243
  this._initSettingsModel();
@@ -2238,7 +2267,7 @@ sap.ui.define([
2238
2267
  };
2239
2268
 
2240
2269
  //In case of reference object we will have attribues with ":" which should be replace by /
2241
- sap.rules.ui.DecisionTableSettings.prototype._formatAttributeId = function (attributeId) {
2270
+ oDecisionTableSettings.prototype._formatAttributeId = function (attributeId) {
2242
2271
  var formattedAttributeId = attributeId;
2243
2272
  if(formattedAttributeId && formattedAttributeId.indexOf(":") > -1) {
2244
2273
  formattedAttributeId = formattedAttributeId.replace(/:/g, "/");
@@ -2249,13 +2278,13 @@ sap.ui.define([
2249
2278
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2250
2279
  ////////////// Closure - this code is relevant only when pressing "apply" ////////////////////
2251
2280
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2252
- sap.rules.ui.DecisionTableSettings.prototype._applySettingsModelChangesToOData = function (oDialog) {
2281
+ oDecisionTableSettings.prototype._applySettingsModelChangesToOData = function (oDialog) {
2253
2282
  var that = this;
2254
2283
  var _oExpressionLanguage;
2255
2284
  if (this.getExpressionLanguage()) {
2256
- _oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
2285
+ _oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
2257
2286
  } else {
2258
- _oExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
2287
+ _oExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
2259
2288
  }
2260
2289
  var nextColumnId = this.mNextColumnId;
2261
2290
  var oModel = this.getModel();
@@ -2418,7 +2447,7 @@ sap.ui.define([
2418
2447
  RuleId: mConditionColumnData.RuleId,
2419
2448
  Version: mConditionColumnData.Version,
2420
2449
  Id: mConditionColumnData.Id,
2421
- Type: sap.rules.ui.DecisionTableColumn.Condition,
2450
+ Type: library.DecisionTableColumn.Condition,
2422
2451
  Sequence: mSequence,
2423
2452
  Label: mLabel
2424
2453
  };
@@ -2439,7 +2468,7 @@ sap.ui.define([
2439
2468
  /////////////////////////////////////////////_validateConditionColumns ////////////////////////////////////////////
2440
2469
  var _validateConditionColumns = function (aSettingsModelColumns) {
2441
2470
  var settingsModelColumn;
2442
- var messageBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
2471
+ var messageBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
2443
2472
 
2444
2473
  for (var i = 0; i < aSettingsModelColumns.length; i++) {
2445
2474
  settingsModelColumn = aSettingsModelColumns[i];
@@ -2599,15 +2628,15 @@ sap.ui.define([
2599
2628
  oDataModel.submitChanges({
2600
2629
  groupId: changesGroupID.groupId,
2601
2630
  success: function () {
2602
- sap.ui.core.BusyIndicator.hide();
2603
- oDialog.setState(sap.ui.core.ValueState.Success);
2631
+ BusyIndicator.hide();
2632
+ oDialog.setState(coreLibrary.ValueState.Success);
2604
2633
  oDialog.close();
2605
2634
  return;
2606
2635
  }
2607
2636
  });
2608
2637
  } else {
2609
- sap.ui.core.BusyIndicator.hide();
2610
- oDialog.setState(sap.ui.core.ValueState.Success);
2638
+ BusyIndicator.hide();
2639
+ oDialog.setState(coreLibrary.ValueState.Success);
2611
2640
  oDialog.close();
2612
2641
  }
2613
2642
  }
@@ -2616,9 +2645,9 @@ sap.ui.define([
2616
2645
  };
2617
2646
 
2618
2647
  var submitSuccess = function (batchRequestResponse) {
2619
- var messageBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
2648
+ var messageBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
2620
2649
  var foundErrorInBatch = false;
2621
- sap.ui.core.BusyIndicator.hide();
2650
+ BusyIndicator.hide();
2622
2651
  var batchResponseArray = batchRequestResponse.__batchResponses["0"].__changeResponses;
2623
2652
  for (var responseEntry in batchResponseArray) {
2624
2653
  if (batchResponseArray[responseEntry].message) {
@@ -2626,11 +2655,11 @@ sap.ui.define([
2626
2655
  MessageBox.error(
2627
2656
  errorMessage, {
2628
2657
  title: messageBundle.getText("RequestFailedText"),
2629
- actions: [sap.m.MessageBox.Action.OK]
2658
+ actions: [MessageBox.Action.OK]
2630
2659
 
2631
2660
  }
2632
2661
  );
2633
- oDialog.setState(sap.ui.core.ValueState.Error);
2662
+ oDialog.setState(coreLibrary.ValueState.Error);
2634
2663
  foundErrorInBatch = true;
2635
2664
 
2636
2665
  }
@@ -2640,13 +2669,13 @@ sap.ui.define([
2640
2669
  if (bResultChanged) {
2641
2670
  getDTColResults();
2642
2671
  } else {
2643
- sap.ui.core.BusyIndicator.hide();
2644
- oDialog.setState(sap.ui.core.ValueState.Success);
2672
+ BusyIndicator.hide();
2673
+ oDialog.setState(coreLibrary.ValueState.Success);
2645
2674
  oDialog.close();
2646
2675
  }
2647
2676
  }
2648
2677
  if (!foundErrorInBatch) {
2649
- sap.m.MessageToast.show(that.oBundle.getText("settingsApplySuccess"));
2678
+ MessageToast.show(that.oBundle.getText("settingsApplySuccess"));
2650
2679
  }
2651
2680
 
2652
2681
  };
@@ -2666,7 +2695,7 @@ sap.ui.define([
2666
2695
  RuleId: sRuleId,
2667
2696
  Version: sVersion,
2668
2697
  Id: nextColumnId,
2669
- Type: sap.rules.ui.DecisionTableColumn.Result,
2698
+ Type: library.DecisionTableColumn.Result,
2670
2699
  Sequence: nextSequence
2671
2700
  };
2672
2701
 
@@ -2764,18 +2793,18 @@ sap.ui.define([
2764
2793
  /*work around for CSN : 1880262342 - After Refresh of table type DO -sumbitChanges call is never made if there are no attributes
2765
2794
  and no other changes are made in DT Settings*/
2766
2795
  if (bRefreshed && this.attributeListEmpty) {
2767
- oDialog.setState(sap.ui.core.ValueState.Success);
2768
- sap.ui.core.BusyIndicator.hide();
2796
+ oDialog.setState(coreLibrary.ValueState.Success);
2797
+ BusyIndicator.hide();
2769
2798
  oDialog.close();
2770
- sap.m.MessageToast.show(this.oBundle.getText("settingsApplySuccess"));
2799
+ MessageToast.show(this.oBundle.getText("settingsApplySuccess"));
2771
2800
  return;
2772
2801
  }
2773
2802
 
2774
2803
  if (!isNeedToSubmitChanges && !bResultChanged && !bRefreshed && !bAttributeChanged) {
2775
- oDialog.setState(sap.ui.core.ValueState.Success);
2776
- sap.ui.core.BusyIndicator.hide();
2804
+ oDialog.setState(coreLibrary.ValueState.Success);
2805
+ BusyIndicator.hide();
2777
2806
  oDialog.close();
2778
- sap.m.MessageToast.show(this.oBundle.getText("settingsApplySuccess"));
2807
+ MessageToast.show(this.oBundle.getText("settingsApplySuccess"));
2779
2808
  }
2780
2809
 
2781
2810
  };