@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
@@ -8,7 +8,7 @@
8
8
  // Provides this._validatecontrol sap.rules.ui.
9
9
  sap.ui.define([
10
10
  "sap/base/Log",
11
- "jquery.sap.global",
11
+ "sap/ui/thirdparty/jquery",
12
12
  "./library",
13
13
  "sap/rules/ui/DecisionTableCell",
14
14
  "sap/rules/ui/RuleBase",
@@ -33,20 +33,41 @@ sap.ui.define([
33
33
  "sap/m/FlexBox",
34
34
  "sap/m/MessageStrip",
35
35
  "sap/rules/ui/DecisionTableSettingsOld",
36
+ "sap/rules/ui/DecisionTableSettings",
36
37
  "sap/rules/ui/type/DecisionTableCell",
37
38
  "sap/rules/ui/ast/constants/Constants",
38
39
  "sap/rules/ui/services/AstExpressionLanguage",
39
40
  "sap/rules/ui/ast/util/AstUtil",
40
41
  "sap/rules/ui/Constants",
41
42
  "sap/ui/core/LocaleData",
43
+ "sap/ui/model/json/JSONModel",
44
+ "sap/m/MessageToast",
45
+ "sap/m/Title",
46
+ "sap/m/library",
47
+ /*"sap/ui/model/Context",*/
48
+ "sap/ui/core/library",
49
+ "sap/ui/table/library",
50
+ "sap/ui/core/EventBus",
51
+ "sap/ui/base/Event",
52
+ "sap/ui/model/Sorter",
53
+ "sap/base/i18n/Formatting",
54
+ "sap/ui/core/format/DateFormat",
55
+ "sap/ui/core/Lib",
56
+ "sap/ui/core/Element",
57
+ "sap/ui/model/odata/v2/Context",
58
+ "sap/ui/table/rowmodes/Fixed",
42
59
  "./DecisionTableRenderer"
43
60
 
44
61
  ], function (Log, jQuery, library, DecisionTableCell, RuleBase, Utils, Table, Column, OverflowToolbar, Popover, Menu, Dialog, MenuButton, Button,
45
62
  ToolbarSpacer, Text, Input, ObjectIdentifier, Link, Label, BusyIndicator, DisplayListItem, MenuItem, FlexBox, MessageStrip,
46
- DecisionTableSettingsOld, DecisionTableCellFormatter, ConstantUtils, AstExpressionLanguage, AstUtil, Constants, LocaleData, DecisionTableRenderer) {
63
+ DecisionTableSettingsOld, DecisionTableSettings, DecisionTableCellFormatter, ConstantUtils, AstExpressionLanguage, AstUtil, Constants, LocaleData, JSONModel,
64
+ MessageToast, Title, mobileLibrary, /*Context,*/ coreLibrary,
65
+ TableLibrary, EventBus, Event, Sorter,
66
+ Formatting, DateFormat, coreLib, Element, Context, RowmodesFixed, DecisionTableRenderer) {
47
67
 
48
68
  "use strict";
49
69
 
70
+ var ButtonType = mobileLibrary.ButtonType;
50
71
  /**
51
72
  * Constructor for a new DecisionTable Control.
52
73
  *
@@ -58,7 +79,7 @@ sap.ui.define([
58
79
  * @extends Control
59
80
  *
60
81
  * @author SAP SE
61
- * @version 1.120.1
82
+ * @version 1.122.0
62
83
  *
63
84
  * @constructor
64
85
  * @private
@@ -89,11 +110,11 @@ sap.ui.define([
89
110
  },
90
111
  cellFormat: {
91
112
  type: "sap.rules.ui.DecisionTableCellFormat",
92
- defaultValue: sap.rules.ui.DecisionTableCellFormat.Both
113
+ defaultValue: library.DecisionTableCellFormat.Both
93
114
  },
94
115
  hitPolicies: {
95
116
  type: "sap.rules.ui.RuleHitPolicy[]",
96
- defaultValue: [sap.rules.ui.RuleHitPolicy.FirstMatch, sap.rules.ui.RuleHitPolicy.AllMatch]
117
+ defaultValue: [library.RuleHitPolicy.FirstMatch, library.RuleHitPolicy.AllMatch]
97
118
  },
98
119
  lineActionBuffer: {
99
120
  type: "any",
@@ -104,7 +125,7 @@ sap.ui.define([
104
125
  },
105
126
  decisionTableFormat: {
106
127
  type: "sap.rules.ui.DecisionTableFormat",
107
- defaultValue: sap.rules.ui.DecisionTableFormat.CellFormat
128
+ defaultValue: library.DecisionTableFormat.CellFormat
108
129
  },
109
130
  threshold: {
110
131
  type: "int",
@@ -154,7 +175,7 @@ sap.ui.define([
154
175
  var oErrorLabel = new MessageStrip({
155
176
  showCloseButton: true,
156
177
  showIcon: true,
157
- type: sap.ui.core.MessageType.Error,
178
+ type: coreLibrary.MessageType.Error,
158
179
  visible: false
159
180
  }).addStyleClass("sapUiTinyMargin");
160
181
  this.setAggregation("_errorsText", oErrorLabel, true);
@@ -204,7 +225,7 @@ sap.ui.define([
204
225
 
205
226
  _addNodeObject: function (astNode) {
206
227
  var oNodeArray = [];
207
- var oAstExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
228
+ var oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
208
229
  var oAstUtil = oAstExpressionLanguage._astBunldeInstance.ASTUtil;
209
230
 
210
231
  var updatedAstNode = [];
@@ -232,9 +253,8 @@ sap.ui.define([
232
253
 
233
254
  _addTable: function () {
234
255
  var oTable = new Table({
235
- visibleRowCount: this.VISIBLEROWCOUNT,
236
256
  threshold: this.THRESHOLD,
237
- visibleRowCountMode: sap.ui.table.VisibleRowCountMode.Fixed,
257
+ rowMode:new RowmodesFixed({ rowCount:this.VISIBLEROWCOUNT, rowContentHeight:50 }),
238
258
  selectionMode: {
239
259
  parts: [{
240
260
  path: "dtModel>/editable"
@@ -247,6 +267,13 @@ sap.ui.define([
247
267
  enableColumnReordering: false,
248
268
  busy: "{dtModel>/busyTableState}"
249
269
  });
270
+ oTable.attachRowsUpdated(function() {
271
+ for (const oRow of oTable.getRows()) {
272
+ for (const oCell of oRow.getCells()) {
273
+ this._updateTableCell(oCell, oRow.getBindingContext())
274
+ }
275
+ }
276
+ })
250
277
  oTable._updateTableCell = this._updateTableCell;
251
278
  oTable.setBusyIndicatorDelay(0);
252
279
  this.setAggregation("_table", oTable, true);
@@ -260,7 +287,7 @@ sap.ui.define([
260
287
  design: "Transparent",
261
288
  enabled: "{dtModel>/editable}"
262
289
  });
263
- var oTitle = new sap.m.Title({
290
+ var oTitle = new Title({
264
291
  text: this.oBundle.getText("decisionTable"),
265
292
  tooltip:this.oBundle.getText("decisionTable")
266
293
  });
@@ -282,7 +309,7 @@ sap.ui.define([
282
309
  text: this.oBundle.getText("deleteRow"),
283
310
  press: [this._deleteRowWorkaround, this],
284
311
  visible: "{dtModel>/editable}",
285
- type: sap.m.ButtonType.Transparent,
312
+ type: ButtonType.Transparent,
286
313
  enabled: {
287
314
  parts: [{
288
315
  path: "dtModel>/newTable"
@@ -296,7 +323,7 @@ sap.ui.define([
296
323
  var oCopyLink = new Button({
297
324
  text: this.oBundle.getText("copyRow"),
298
325
  press: [this._copyRow, this],
299
- type: sap.m.ButtonType.Transparent,
326
+ type: ButtonType.Transparent,
300
327
  visible: {
301
328
  parts: [{
302
329
  path: "dtModel>/editable"
@@ -317,7 +344,7 @@ sap.ui.define([
317
344
 
318
345
  var oCutLink = new Button({
319
346
  text: this.oBundle.getText("cutRow"),
320
- type: sap.m.ButtonType.Transparent,
347
+ type: ButtonType.Transparent,
321
348
  press: [this._cutRow, this],
322
349
  visible: {
323
350
  parts: [{
@@ -339,7 +366,7 @@ sap.ui.define([
339
366
 
340
367
  var oPasteLink = new MenuButton({
341
368
  text: this.oBundle.getText("pasteRow"),
342
- type: sap.m.ButtonType.Transparent,
369
+ type: ButtonType.Transparent,
343
370
  visible: {
344
371
  parts: [{
345
372
  path: "dtModel>/editable"
@@ -447,7 +474,7 @@ sap.ui.define([
447
474
  _onColumnResize: function () {
448
475
  this.columnResized = true;
449
476
  var obj = { "colResize" : true };
450
- var oEventBus = sap.ui.getCore().getEventBus();
477
+ var oEventBus = EventBus.getInstance();
451
478
  oEventBus.publish("sap.ui.rules","_onColumnResized", obj);
452
479
  },
453
480
 
@@ -458,7 +485,7 @@ sap.ui.define([
458
485
  if(this.getAstExpressionLanguage()){
459
486
  expandPath = "Cells/DecisionTableRowCellASTs";
460
487
  }
461
- var oSorter = new sap.ui.model.Sorter("Sequence");
488
+ var oSorter = new Sorter("Sequence");
462
489
 
463
490
  oTable.bindRows({
464
491
  path: bindingPath,
@@ -543,7 +570,7 @@ sap.ui.define([
543
570
  }.bind(this);
544
571
 
545
572
  var submitError = function (e) {
546
- sap.m.MessageToast.show(e);
573
+ MessageToast.show(e);
547
574
  }.bind(this);
548
575
 
549
576
  var callFunctionSuccess = function (response) {
@@ -600,7 +627,7 @@ sap.ui.define([
600
627
 
601
628
  //Closes cell popover
602
629
  _closePopover: function () {
603
- var pop = sap.ui.getCore().byId("popover");
630
+ var pop = Element.getElementById("popover");
604
631
  if (pop) {
605
632
  pop.close();
606
633
  }
@@ -653,8 +680,8 @@ sap.ui.define([
653
680
  });
654
681
 
655
682
  relativePath = this._getBindModelName();
656
- this.firstResultColumnBound = oContext.getProperty(relativePath + "Type") === sap.rules.ui.DecisionTableColumn.Result;
657
- if (columnType === sap.rules.ui.DecisionTableColumn.Result) {
683
+ this.firstResultColumnBound = oContext.getProperty(relativePath + "Type") === library.DecisionTableColumn.Result;
684
+ if (columnType === library.DecisionTableColumn.Result) {
658
685
 
659
686
  if (this.getAstExpressionLanguage()) {
660
687
  column.bindProperty("visible", {
@@ -717,7 +744,7 @@ sap.ui.define([
717
744
 
718
745
  _convertAndValidate: function () {
719
746
  var ruleData = this._getRuleData();
720
- var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
747
+ var oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
721
748
  if (oExpressionLanguage) {
722
749
  var validateResults = {};
723
750
  if (oExpressionLanguage && ruleData) {
@@ -792,10 +819,10 @@ sap.ui.define([
792
819
  }).addStyleClass("sapRULDecisionTableColumnHeaderLabel");
793
820
 
794
821
  //Condition header text
795
- if (columnType === sap.rules.ui.DecisionTableColumn.Condition) {
822
+ if (columnType === library.DecisionTableColumn.Condition) {
796
823
  sPath = oContext.getModel().createKey("/DecisionTableColumnConditions", oHeaderKey);
797
824
  sDTColPath = oContext.getModel().createKey("/DecisionTableColumns", oHeaderKey);
798
- oAstContext = new sap.ui.model.Context(oContext.getModel(), sPath);
825
+ oAstContext = new Context(oContext.getModel(), sPath);
799
826
  if (this.getAstExpressionLanguage()) {
800
827
  displayExpression = oDtControl._getExpressionFromAstNodes(oAstContext);
801
828
  }
@@ -846,7 +873,7 @@ sap.ui.define([
846
873
  });
847
874
 
848
875
  //Result header text
849
- } else if (columnType === sap.rules.ui.DecisionTableColumn.Result) {
876
+ } else if (columnType === library.DecisionTableColumn.Result) {
850
877
  var sResultPath = oContext.getModel().createKey("/DecisionTableColumnResults", oHeaderKey);
851
878
  headerPath = relativePath + sResultPath;
852
879
  oText.bindText({
@@ -889,7 +916,7 @@ sap.ui.define([
889
916
  formatter: function (sType, iSequence) {
890
917
  if (iSequence === 1) {
891
918
  return oBundle.getText("conditionIfColumn");
892
- } else if (sType === sap.rules.ui.DecisionTableColumn.Result) {
919
+ } else if (sType === library.DecisionTableColumn.Result) {
893
920
  return oBundle.getText("resultThenColumn");
894
921
  } else {
895
922
  return "";
@@ -913,7 +940,7 @@ sap.ui.define([
913
940
  _createNewDecisionTableSettings: function () {
914
941
  var oModel = this._getModel();
915
942
  var oContext = this.getBindingContext();
916
- var oDecisionTableSettings = new sap.rules.ui.DecisionTableSettings({
943
+ var oDecisionTableSettings = new DecisionTableSettings({
917
944
  hitPolicies: "{dtModel>/hitPolicies}",
918
945
  newDecisionTable: this._internalModel.getProperty("/newTable"),
919
946
  cellFormat: "{dtModel>/cellFormat}",
@@ -929,7 +956,7 @@ sap.ui.define([
929
956
  var settingModelDataStr = JSON.stringify(this._settingsModel.getData());
930
957
  var settingModelData = JSON.parse(settingModelDataStr);
931
958
 
932
- var settingModel = new sap.ui.model.json.JSONModel(settingModelData);
959
+ var settingModel = new JSONModel(settingModelData);
933
960
 
934
961
  oDecisionTableSettings.setModel(settingModel);
935
962
 
@@ -979,7 +1006,7 @@ sap.ui.define([
979
1006
  });
980
1007
  this._markSelection(true);
981
1008
  oTable.setSelectedIndex(-1);
982
- sap.m.MessageToast.show(this.oBundle.getText(operation + "RowSuccess"));
1009
+ MessageToast.show(this.oBundle.getText(operation + "RowSuccess"));
983
1010
  },
984
1011
 
985
1012
  _cutRow: function () {
@@ -1030,7 +1057,7 @@ sap.ui.define([
1030
1057
  },
1031
1058
 
1032
1059
  _decideSelectionMode: function (editable) {
1033
- return editable ? sap.ui.table.SelectionMode.MultiToggle : sap.ui.table.SelectionMode.None;
1060
+ return editable ? TableLibrary.SelectionMode.MultiToggle : TableLibrary.SelectionMode.None;
1034
1061
  },
1035
1062
 
1036
1063
  _decideSettingsEnablement: function (enableSettings, editable) {
@@ -1062,7 +1089,7 @@ sap.ui.define([
1062
1089
  rowPath: null,
1063
1090
  operation: null
1064
1091
  });
1065
- sap.m.MessageToast.show(this.oBundle.getText("deleteRowSuccess"));
1092
+ MessageToast.show(this.oBundle.getText("deleteRowSuccess"));
1066
1093
  },
1067
1094
 
1068
1095
  _deleteRowWorkaround: function () {
@@ -1086,7 +1113,7 @@ sap.ui.define([
1086
1113
 
1087
1114
  _displayHeaderErrorMessages: function (headerErrorsArray, columnErrorsMap) {
1088
1115
  var oText = this.getAggregation("_errorsText");
1089
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
1116
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
1090
1117
  var errorHeaderMessage = this._concatinateHeaderErrors(headerErrorsArray);
1091
1118
  oText.setText(this.oBundle.getText("errorInTableHeader") + errorHeaderMessage); // + "\n" + errorColumnsHeaderMessage);
1092
1119
  oText.setVisible(true);
@@ -1223,7 +1250,7 @@ sap.ui.define([
1223
1250
 
1224
1251
  _getExpressionFromAstNodes: function (oContext) {
1225
1252
  var that = this;
1226
- var oAstExpressionLanguage = sap.ui.getCore().byId(this.getAstExpressionLanguage());
1253
+ var oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
1227
1254
  var termsProvider = oAstExpressionLanguage._astBunldeInstance.TermsProvider.TermsProvider;
1228
1255
  var displayExpression = "";
1229
1256
  var displayTermExpression = "";
@@ -1324,7 +1351,7 @@ sap.ui.define([
1324
1351
  _getOutputColumnDescription: function (oName, oLabel) {
1325
1352
  var expLanguage;
1326
1353
  if (this.getExpressionLanguage()) {
1327
- expLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
1354
+ expLanguage = Element.getElementById(this.getExpressionLanguage());
1328
1355
  if (expLanguage && expLanguage._isDataExist()) {
1329
1356
  var ResultID = this.getBindingContext().getProperty("ResultDataObjectId");
1330
1357
  var desc = expLanguage.getResultColumnDescription(oName, ResultID, oLabel);
@@ -1480,9 +1507,9 @@ sap.ui.define([
1480
1507
  this.iNumOfCondition = 0;
1481
1508
  this.iNumOfResults = 0;
1482
1509
  for (i = 0; i < aColumns.length; i++) {
1483
- if (aColumns[i].Type === sap.rules.ui.DecisionTableColumn.Condition) {
1510
+ if (aColumns[i].Type === library.DecisionTableColumn.Condition) {
1484
1511
  this.iNumOfCondition++;
1485
- } else if (aColumns[i].Type === sap.rules.ui.DecisionTableColumn.Result) {
1512
+ } else if (aColumns[i].Type === library.DecisionTableColumn.Result) {
1486
1513
  this.iNumOfResults++;
1487
1514
  }
1488
1515
  }
@@ -1501,9 +1528,9 @@ sap.ui.define([
1501
1528
  var vocaDataReceived = false;
1502
1529
  var oEL;
1503
1530
  if (this.getAstExpressionLanguage()) {
1504
- oEL = sap.ui.getCore().byId(this.getAstExpressionLanguage());
1531
+ oEL = Element.getElementById(this.getAstExpressionLanguage());
1505
1532
  } else {
1506
- oEL = sap.ui.getCore().byId(this.getExpressionLanguage());
1533
+ oEL = Element.getElementById(this.getExpressionLanguage());
1507
1534
  }
1508
1535
  if (oEL && oEL._isDataExist()) {
1509
1536
  vocaDataReceived = true;
@@ -1522,9 +1549,9 @@ sap.ui.define([
1522
1549
  },
1523
1550
 
1524
1551
  _initDisplayModel: function () {
1525
- this._displayModel = new sap.ui.model.json.JSONModel();
1552
+ this._displayModel = new JSONModel();
1526
1553
  this.setModel(this._displayModel, "displayModel");
1527
- this._settingsModel = new sap.ui.model.json.JSONModel();
1554
+ this._settingsModel = new JSONModel();
1528
1555
  this.setModel(this._settingsModel, "settingModel");
1529
1556
  },
1530
1557
 
@@ -1546,7 +1573,7 @@ sap.ui.define([
1546
1573
  data.selectedRow = null;
1547
1574
  data.conditionCellAstValues = [];
1548
1575
  data.ruleBindingPath = "";
1549
- this._internalModel = new sap.ui.model.json.JSONModel(data);
1576
+ this._internalModel = new JSONModel(data);
1550
1577
  this.setModel(this._internalModel, "dtModel");
1551
1578
  },
1552
1579
 
@@ -1562,7 +1589,7 @@ sap.ui.define([
1562
1589
  if (rowPath) {
1563
1590
  var firstVisibleRow = oTable.getFirstVisibleRow();
1564
1591
  var rowIndex = oModel.getProperty(rowPath).Sequence - 1;
1565
- if ((rowIndex - firstVisibleRow > -1) && (rowIndex - firstVisibleRow < oTable.getVisibleRowCount())) {
1592
+ if ((rowIndex - firstVisibleRow > -1) && (rowIndex - firstVisibleRow < oTable.getRowMode().getRowCount())) {
1566
1593
  var oRow = oTable.getRows()[rowIndex - firstVisibleRow];
1567
1594
  var oCells = oRow.getCells();
1568
1595
  if (oCells) {
@@ -1598,7 +1625,7 @@ sap.ui.define([
1598
1625
  var dialogState = oDialog.getState();
1599
1626
  oDialog.destroy();
1600
1627
  //User press on "Apply" (and not on "Cancel")
1601
- if (dialogState === sap.ui.core.ValueState.Success) {
1628
+ if (dialogState === coreLibrary.ValueState.Success) {
1602
1629
  this._initDisplayModel();
1603
1630
  this._refreshBinding();
1604
1631
  }
@@ -1621,7 +1648,7 @@ sap.ui.define([
1621
1648
  columnErrorsMap = this._buildMessagesStructure(validateResults, columnErrorsMap, headerErrorsArray);
1622
1649
  for (var cell in columnErrorsMap) {
1623
1650
  if (columnErrorsMap.hasOwnProperty(cell) && (typeof columnErrorsMap[cell] === "string") && columnErrorsMap[cell] !== "null") {
1624
- cellValueStateMap[cell] = sap.ui.core.ValueState.Error;
1651
+ cellValueStateMap[cell] = coreLibrary.ValueState.Error;
1625
1652
  }
1626
1653
  }
1627
1654
  this._displayErrorMessages(headerErrorsArray, columnErrorsMap);
@@ -1671,10 +1698,10 @@ sap.ui.define([
1671
1698
  }
1672
1699
  oTable.setSelectedIndex(-1);
1673
1700
  if (operation === "insertBefore" || operation === "insertAfter") {
1674
- sap.m.MessageToast.show(this.oBundle.getText("addRowSuccess"));
1701
+ MessageToast.show(this.oBundle.getText("addRowSuccess"));
1675
1702
  }
1676
1703
  if (operation === "paste") {
1677
- sap.m.MessageToast.show(this.oBundle.getText("pasteSuccess"));
1704
+ MessageToast.show(this.oBundle.getText("pasteSuccess"));
1678
1705
  }
1679
1706
  },
1680
1707
 
@@ -1692,7 +1719,7 @@ sap.ui.define([
1692
1719
  if (rowBinding) {
1693
1720
  rowBinding.refresh();
1694
1721
  }
1695
- var oEventBus = sap.ui.getCore().getEventBus();
1722
+ var oEventBus = EventBus.getInstance();
1696
1723
  oEventBus.publish("sap.ui.rules", "refreshDTRuleModel");
1697
1724
  },
1698
1725
 
@@ -1734,10 +1761,10 @@ sap.ui.define([
1734
1761
  if (bNewRule) {
1735
1762
  var oEL;
1736
1763
  if (this.getAstExpressionLanguage()) {
1737
- oEL = sap.ui.getCore().byId(this.getAstExpressionLanguage());
1764
+ oEL = Element.getElementById(this.getAstExpressionLanguage());
1738
1765
  sVersion = "2.0.0";
1739
1766
  } else {
1740
- oEL = sap.ui.getCore().byId(this.getExpressionLanguage());
1767
+ oEL = Element.getElementById(this.getExpressionLanguage());
1741
1768
  sVersion = oEL.getExpressionLanguageVersion();
1742
1769
  }
1743
1770
  oModel.setProperty("ExpressionLanguageVersion", sVersion, oContext, true);
@@ -1758,14 +1785,14 @@ sap.ui.define([
1758
1785
  iVisibleRowCount = Math.min(oRowBinding.getLength(), this.VISIBLEROWCOUNT);
1759
1786
  }
1760
1787
 
1761
- var currVisibleRowCount = oTable.getVisibleRowCount();
1788
+ var currVisibleRowCount = oTable.getRowMode().getRowCount();
1762
1789
  if (currVisibleRowCount !== iVisibleRowCount) {
1763
- oTable.setVisibleRowCount(iVisibleRowCount);
1790
+ oTable.getRowMode().setRowCount(iVisibleRowCount);
1764
1791
  }
1765
1792
  if ((this.dataBucket && this.dataBucket.rows && this.dataBucket.rows.results.length === 0) || !this.getEditable()) {
1766
- oTable.setSelectionMode(sap.ui.table.SelectionMode.None);
1793
+ oTable.setSelectionMode(TableLibrary.SelectionMode.None);
1767
1794
  } else {
1768
- oTable.setSelectionMode(sap.ui.table.SelectionMode.MultiToggle);
1795
+ oTable.setSelectionMode(TableLibrary.SelectionMode.MultiToggle);
1769
1796
  }
1770
1797
  },
1771
1798
 
@@ -1792,7 +1819,7 @@ sap.ui.define([
1792
1819
  this._internalModel.setProperty("/busyTableState", tableIsBusy);
1793
1820
  },
1794
1821
 
1795
- _updateTableCell: function (oCell, oRowContext, dtDomElement, rowIndex) {
1822
+ _updateTableCell: function (oCell, oRowContext) {
1796
1823
  //jQuery(oCell.getDomRef()).parent().parent().parent().removeClass("sapRULDecisionTableSCellMarked");
1797
1824
  oCell.removeStyleClass("sapRULDecisionTableSCellMarked");
1798
1825
  var path = "null";
@@ -1804,7 +1831,7 @@ sap.ui.define([
1804
1831
  var rowId = oRowContext.getProperty("Id");
1805
1832
  var ruleId = oRowContext.getProperty("RuleId");
1806
1833
  var version = oRowContext.getProperty("Version");
1807
- var oModel = oRowContext.getModel();
1834
+ var oModel = oRowContext.getModel();
1808
1835
 
1809
1836
  var headerPath = '';
1810
1837
  var rulePath = '';
@@ -1816,7 +1843,7 @@ sap.ui.define([
1816
1843
  Version: version
1817
1844
  };
1818
1845
  var cellBindingPath = oModel.createKey("/DecisionTableRowCells", oCellProperties);
1819
- var oCellContext = new sap.ui.model.Context(oModel, cellBindingPath);
1846
+ var oCellContext = new Context(oModel, cellBindingPath);
1820
1847
 
1821
1848
  //Condition path from model
1822
1849
  var oProperties = {
@@ -1859,7 +1886,7 @@ sap.ui.define([
1859
1886
  headerPath = "/" + oModel.createKey("DecisionTableColumnResults", cellKeyProperties);
1860
1887
  rulePath = "/" + oModel.createKey("Rules", ruleKeyProperties);
1861
1888
  oCell.setTypePath(headerPath + '/BusinessDataType');
1862
- if (sap.ui.getCore().byId(oParent.getAstExpressionLanguage())) {
1889
+ if (Element.getElementById(oParent.getAstExpressionLanguage())) {
1863
1890
  var sResultDataObjectId = oParent.getModel("settingModel").getData().ResultDataObjectId;
1864
1891
  var sAttributeId = oModel.getProperty(headerPath + '/DataObjectAttributeId');
1865
1892
  oCell.setAttributeInfoPath("/" + sResultDataObjectId + "/" + that.getParent()._formatAttributeId(sAttributeId));
@@ -1907,7 +1934,7 @@ sap.ui.define([
1907
1934
  this._initDisplayModel();
1908
1935
  this._initDataBucket();
1909
1936
  this.bindProperty("busy", "dtModel>/busyState");
1910
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
1937
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
1911
1938
  this._addToolBar();
1912
1939
  this._addTable();
1913
1940
  this._addErrorLabel();
@@ -1967,7 +1994,7 @@ sap.ui.define([
1967
1994
  if (!bindingContextPath || !oModel) {
1968
1995
  return;
1969
1996
  }
1970
- var oContext = new sap.ui.model.Context(oModel, bindingContextPath);
1997
+ var oContext = new Context(oModel, bindingContextPath);
1971
1998
  this._internalModel.setProperty("/ruleBindingPath", bindingContextPath);
1972
1999
  this.setBindingContext(oContext);
1973
2000
  this._bindRule();
@@ -1978,7 +2005,7 @@ sap.ui.define([
1978
2005
  /** Control's properties getters/setters */
1979
2006
  setAstExpressionLanguage: function (value) {
1980
2007
  this.setAssociation("astExpressionLanguage", value, true);
1981
- var astExpressionLanguage = (value instanceof Object) ? value : sap.ui.getCore().byId(value);
2008
+ var astExpressionLanguage = (value instanceof Object) ? value : Element.getElementById(value);
1982
2009
  if (!astExpressionLanguage) {
1983
2010
  return this;
1984
2011
  }
@@ -1993,7 +2020,7 @@ sap.ui.define([
1993
2020
  }
1994
2021
 
1995
2022
  if (astExpressionLanguage._isDataExist()) {
1996
- var oEvent = new sap.ui.base.Event("", "", {
2023
+ var oEvent = new Event("", "", {
1997
2024
  data: true
1998
2025
  });
1999
2026
  this._handleVocabularyDataChanged(oEvent);
@@ -2068,7 +2095,7 @@ sap.ui.define([
2068
2095
  setExpressionLanguage: function (value) {
2069
2096
  this.setAssociation("expressionLanguage", value, true);
2070
2097
  this._decisionTableCellFormatter.setExpressionLanguage(this.getExpressionLanguage());
2071
- var expressionLanguage = (value instanceof Object) ? value : sap.ui.getCore().byId(value);
2098
+ var expressionLanguage = (value instanceof Object) ? value : Element.getElementById(value);
2072
2099
  if (!expressionLanguage) {
2073
2100
  return this;
2074
2101
  }
@@ -2083,7 +2110,7 @@ sap.ui.define([
2083
2110
  }
2084
2111
 
2085
2112
  if (expressionLanguage._isDataExist()) {
2086
- var oEvent = new sap.ui.base.Event("", "", {
2113
+ var oEvent = new Event("", "", {
2087
2114
  data: true
2088
2115
  });
2089
2116
  this._handleVocabularyDataChanged(oEvent);
@@ -2113,13 +2140,13 @@ sap.ui.define([
2113
2140
  * @private
2114
2141
  * @param {map} mParameters? -
2115
2142
  */
2116
- sap.rules.ui.DecisionTable.prototype._saveWorkAround = function (mParameters, toastMessage) {
2143
+ oDecisionTable.prototype._saveWorkAround = function (mParameters, toastMessage) {
2117
2144
  var oModel = this._getModel();
2118
2145
  oModel.submitChanges(mParameters);
2119
- sap.m.MessageToast.show(toastMessage);
2146
+ MessageToast.show(toastMessage);
2120
2147
  };
2121
2148
 
2122
- sap.rules.ui.DecisionTable.prototype.includes = function (parent, str) {
2149
+ oDecisionTable.prototype.includes = function (parent, str) {
2123
2150
  var returnValue = false;
2124
2151
 
2125
2152
  if (parent.indexOf(str) !== -1) {
@@ -2129,33 +2156,33 @@ sap.ui.define([
2129
2156
  return returnValue;
2130
2157
  };
2131
2158
 
2132
- sap.rules.ui.DecisionTable.prototype._getLocaleData = function () {
2133
- var oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
2159
+ oDecisionTable.prototype._getLocaleData = function () {
2160
+ var oLocale = Formatting.getLanguageTag();
2134
2161
  return LocaleData.getInstance(oLocale);
2135
2162
  };
2136
2163
 
2137
- sap.rules.ui.DecisionTable.prototype._getDateFormatter = function () {
2164
+ oDecisionTable.prototype._getDateFormatter = function () {
2138
2165
  var oLocaleData = this._getLocaleData();
2139
2166
  var datePattern = oLocaleData.getDatePattern('medium');
2140
- var dateFormatter = sap.ui.core.format.DateFormat.getDateInstance({
2167
+ var dateFormatter = DateFormat.getDateInstance({
2141
2168
  pattern: datePattern
2142
2169
  });
2143
2170
  return dateFormatter;
2144
2171
  };
2145
2172
 
2146
- sap.rules.ui.DecisionTable.prototype._getDateTimeFormatter = function () {
2173
+ oDecisionTable.prototype._getDateTimeFormatter = function () {
2147
2174
  var oLocaleData = this._getLocaleData();
2148
2175
  var datePattern = oLocaleData.getDatePattern('medium');
2149
2176
  var timePattern = oLocaleData.getTimePattern('medium');
2150
- var dateTimeFormatter = sap.ui.core.format.DateFormat.getDateTimeInstance({
2177
+ var dateTimeFormatter = DateFormat.getDateTimeInstance({
2151
2178
  pattern: datePattern + " " + timePattern
2152
2179
  });
2153
2180
  return dateTimeFormatter;
2154
2181
  };
2155
2182
 
2156
- sap.rules.ui.DecisionTable.prototype.VISIBLEROWCOUNT = 30;
2183
+ oDecisionTable.prototype.VISIBLEROWCOUNT = 30;
2157
2184
 
2158
- sap.rules.ui.DecisionTable.prototype.THRESHOLD = 30;
2185
+ oDecisionTable.prototype.THRESHOLD = 30;
2159
2186
 
2160
2187
  return oDecisionTable;
2161
2188