@sapui5/sap.rules.ui 1.121.0 → 1.123.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/package.json +1 -1
  2. package/src/sap/rules/ui/.library +1 -1
  3. package/src/sap/rules/ui/AstExpressionBasic.js +25 -18
  4. package/src/sap/rules/ui/AstExpressionBasicRenderer.js +6 -4
  5. package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +36 -34
  6. package/src/sap/rules/ui/BindingSpy.js +3 -4
  7. package/src/sap/rules/ui/DecisionTable.js +113 -74
  8. package/src/sap/rules/ui/DecisionTableCell.js +67 -34
  9. package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +17 -13
  10. package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +40 -32
  11. package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +21 -19
  12. package/src/sap/rules/ui/DecisionTableConfiguration.js +5 -6
  13. package/src/sap/rules/ui/DecisionTableRenderer.js +6 -5
  14. package/src/sap/rules/ui/DecisionTableSettings.js +264 -232
  15. package/src/sap/rules/ui/DecisionTableSettingsOld.js +61 -61
  16. package/src/sap/rules/ui/ExpressionAdvanced.js +135 -111
  17. package/src/sap/rules/ui/ExpressionBase.js +1 -1
  18. package/src/sap/rules/ui/ExpressionBasic.js +17 -12
  19. package/src/sap/rules/ui/InstructionRenderer.js +30 -26
  20. package/src/sap/rules/ui/RuleBase.js +2 -3
  21. package/src/sap/rules/ui/RuleBuilder.js +29 -23
  22. package/src/sap/rules/ui/TextRule.js +78 -62
  23. package/src/sap/rules/ui/TextRuleConfiguration.js +2 -3
  24. package/src/sap/rules/ui/TextRuleSettings.js +133 -116
  25. package/src/sap/rules/ui/ast/autoComplete/AutoComplete.js +4 -3
  26. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +15 -10
  27. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +14 -9
  28. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +14 -10
  29. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +15 -11
  30. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +26 -17
  31. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +75 -53
  32. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +14 -10
  33. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +14 -10
  34. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +14 -9
  35. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +14 -10
  36. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +14 -10
  37. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +14 -10
  38. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +14 -10
  39. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +14 -9
  40. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +35 -23
  41. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +93 -73
  42. package/src/sap/rules/ui/ast/util/AggregateFunctionDialog.js +172 -157
  43. package/src/sap/rules/ui/ast/util/LoopFunctionDialog.js +186 -163
  44. package/src/sap/rules/ui/ast/util/SelectFunctionDialog.js +205 -182
  45. package/src/sap/rules/ui/ast/util/utilsBase.js +85 -0
  46. package/src/sap/rules/ui/codemirror/addon/hint/show-hint.js +8 -4
  47. package/src/sap/rules/ui/i18n/messagebundle.properties +9 -1
  48. package/src/sap/rules/ui/i18n/messagebundle_ar.properties +1 -1
  49. package/src/sap/rules/ui/i18n/messagebundle_cnr.properties +34 -34
  50. package/src/sap/rules/ui/i18n/messagebundle_en_US_saprigi.properties +285 -285
  51. package/src/sap/rules/ui/i18n/messagebundle_hu.properties +1 -1
  52. package/src/sap/rules/ui/i18n/messagebundle_mk.properties +3 -3
  53. package/src/sap/rules/ui/i18n/messagebundle_sh.properties +88 -88
  54. package/src/sap/rules/ui/i18n/messagebundle_uk.properties +5 -5
  55. package/src/sap/rules/ui/library.js +6 -7
  56. package/src/sap/rules/ui/parser/businessLanguage/lib/IDPParser.js +115 -114
  57. package/src/sap/rules/ui/parser/businessLanguage/lib/antlr3_all_min.js +4 -4
  58. package/src/sap/rules/ui/parser/businessLanguage/lib/autoCompleteUtils.js +4 -3
  59. package/src/sap/rules/ui/parser/businessLanguage/lib/conversionUtils.js +10 -6
  60. package/src/sap/rules/ui/parser/businessLanguage/lib/entityModel.js +8 -7
  61. package/src/sap/rules/ui/parser/businessLanguage/lib/entityModelConstractor.js +17 -16
  62. package/src/sap/rules/ui/parser/businessLanguage/lib/parsingBackendMediator.js +10 -9
  63. package/src/sap/rules/ui/parser/businessLanguage/lib/termsUtils.js +4 -3
  64. package/src/sap/rules/ui/parser/i18n/messages_descriptions_cnr.properties +57 -57
  65. package/src/sap/rules/ui/parser/i18n/messages_descriptions_en_US_saprigi.properties +210 -210
  66. package/src/sap/rules/ui/parser/i18n/messages_descriptions_mk.properties +1 -1
  67. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +90 -90
  68. package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +1 -1
  69. package/src/sap/rules/ui/parser/i18n/messages_descriptions_uk.properties +2 -2
  70. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_cnr.properties +19 -19
  71. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_en_US_saprigi.properties +26 -26
  72. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_mk.properties +2 -2
  73. package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
  74. package/src/sap/rules/ui/parser/infrastructure/errorHandling/hrfException.js +3 -3
  75. package/src/sap/rules/ui/parser/infrastructure/locale/lib/resourceBundleContext.js +4 -3
  76. package/src/sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector.js +8 -7
  77. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBody.js +8 -7
  78. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyConvertor.js +4 -3
  79. package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyValidator.js +9 -8
  80. package/src/sap/rules/ui/providers/ValueHelpDialogProvider.js +63 -46
  81. package/src/sap/rules/ui/providers/ValueHelpProvider.js +8 -7
  82. package/src/sap/rules/ui/services/AstExpressionLanguage.js +12 -10
  83. package/src/sap/rules/ui/services/ExpressionLanguage.js +89 -83
  84. package/src/sap/rules/ui/type/DecisionTableCell.js +2 -2
  85. package/src/sap/rules/ui/type/DecisionTableHeader.js +3 -3
  86. package/src/sap/rules/ui/type/Expression.js +3 -3
  87. package/src/sap/rules/ui/type/ExpressionAbs.js +5 -5
@@ -2,49 +2,49 @@
2
2
 
3
3
 
4
4
 
5
- 1000=Uspe\u0161na validacija
6
- 1001=Neuspe\u0161na validacija
5
+ 1000=Uspje\u0161na validacija
6
+ 1001=Neuspje\u0161na validacija
7
7
 
8
8
 
9
- 2000=Uspe\u0161no kreiranje, \u010Ditanje, a\u017Euriranje i brisanje resursa
10
- 2001=Neuspe\u0161no kreiranje, \u010Ditanje, a\u017Euriranje i brisanje resursa
9
+ 2000=Uspje\u0161no kreiranje, \u010Ditanje, a\u017Euriranje i brisanje resursa
10
+ 2001=Neuspje\u0161no kreiranje, \u010Ditanje, a\u017Euriranje i brisanje resursa
11
11
 
12
12
 
13
- 3000=Uspe\u0161no pozivanje parametara
14
- 3001=Neuspe\u0161no pozivanje parametara
13
+ 3000=Uspje\u0161no pozivanje parametara
14
+ 3001=Neuspje\u0161no pozivanje parametara
15
15
 
16
16
 
17
- 4000=Uspe\u0161no kori\u0161\u0107enje usluge pravila
18
- 4001=Neuspe\u0161no kori\u0161\u0107enje usluge pravila
17
+ 4000=Uspje\u0161no kori\u0161\u0107enje usluge pravila
18
+ 4001=Neuspje\u0161no kori\u0161\u0107enje usluge pravila
19
19
 
20
20
 
21
- 5000=Uspe\u0161no potpuno aktiviranje
22
- 5001=Neuspe\u0161no potpuno aktiviranje
21
+ 5000=Uspje\u0161no potpuno aktiviranje
22
+ 5001=Neuspje\u0161no potpuno aktiviranje
23
23
 
24
24
 
25
- 6000=Uspe\u0161no aktiviranje
26
- 6001=Neuspe\u0161no aktiviranje
25
+ 6000=Uspje\u0161no aktiviranje
26
+ 6001=Neuspje\u0161no aktiviranje
27
27
 
28
28
 
29
- 7000=Uspe\u0161no naknadno aktiviranje
30
- 7001=Neuspe\u0161no naknadno aktiviranje
29
+ 7000=Uspje\u0161no naknadno aktiviranje
30
+ 7001=Neuspje\u0161no naknadno aktiviranje
31
31
 
32
32
 
33
- 8000=Uspe\u0161ne usluge vremena izvo\u0111enja
34
- 8001=Neuspe\u0161ne usluge vremena izvo\u0111enja
33
+ 8000=Uspje\u0161ne usluge vremena izvo\u0111enja
34
+ 8001=Neuspje\u0161ne usluge vremena izvo\u0111enja
35
35
 
36
- 9000=Uspe\u0161no kreiranje dispe\u010Dera
37
- 9001=Neuspe\u0161no kreiranje dispe\u010Dera
36
+ 9000=Uspje\u0161no kreiranje dispe\u010Dera
37
+ 9001=Neuspje\u0161no kreiranje dispe\u010Dera
38
38
 
39
- 10000=Uspe\u0161na HRF tehni\u010Dna konfiguracija
40
- 10001=Neuspe\u0161na HRF tehni\u010Dna konfiguracija
39
+ 10000=Uspje\u0161na HRF tehni\u010Dna konfiguracija
40
+ 10001=Neuspje\u0161na HRF tehni\u010Dna konfiguracija
41
41
 
42
42
 
43
- 11000=Uspe\u0161na kompilacija
44
- 11001=Neuspe\u0161na kompilacija
43
+ 11000=Uspje\u0161na kompilacija
44
+ 11001=Neuspje\u0161na kompilacija
45
45
 
46
- 12000=Uspe\u0161na validacija pravila
47
- 12001=Neuspe\u0161na validacija pravila
46
+ 12000=Uspje\u0161na validacija pravila
47
+ 12001=Neuspje\u0161na validacija pravila
48
48
 
49
- 13000=Uspe\u0161na validacija usluge pravila
50
- 13001=Neuspe\u0161na validacija usluge pravila
49
+ 13000=Uspje\u0161na validacija usluge pravila
50
+ 13001=Neuspje\u0161na validacija usluge pravila
@@ -1,5 +1,5 @@
1
- sap.ui.define([
2
- ], function() {
1
+ sap.ui.define(["sap/base/Log"
2
+ ], function(Logger) {
3
3
  "use strict";
4
4
 
5
5
  function HrfMessage (code, params) {
@@ -77,7 +77,7 @@ sap.ui.define([
77
77
  }
78
78
 
79
79
  traceMassage += "\n----------------------------\n+++ End of HRF Exception +++\n----------------------------\n";
80
- jQuery.sap.log.error (traceMassage);
80
+ Logger.error (traceMassage);
81
81
  }
82
82
 
83
83
  setTraced (exception, true);
@@ -1,6 +1,7 @@
1
1
  sap.ui.define([
2
- "sap/ui/model/resource/ResourceModel"
3
- ], function (ResourceModel) {
2
+ "sap/ui/model/resource/ResourceModel",
3
+ "sap/base/Log"
4
+ ], function (ResourceModel, Logger) {
4
5
  'use strict';
5
6
 
6
7
  var resourceBundleContext = {};
@@ -31,7 +32,7 @@ sap.ui.define([
31
32
  }
32
33
  }
33
34
  }
34
- jQuery.sap.log.debug("code: " + messageKey + ", params: " + paramsArray + "\nMessage: " + sMsg);
35
+ Logger.debug("code: " + messageKey + ", params: " + paramsArray + "\nMessage: " + sMsg);
35
36
  return sMsg;
36
37
  }
37
38
  };
@@ -3,8 +3,9 @@ sap.ui.define([
3
3
  "sap/rules/ui/parser/infrastructure/messageHandling/lib/opMessages",
4
4
  "sap/rules/ui/parser/infrastructure/locale/lib/constants",
5
5
  "sap/rules/ui/parser/infrastructure/errorHandling/hrfException",
6
- "sap/rules/ui/parser/infrastructure/locale/lib/resourceBundle"
7
- ], function(messagesListLib, opMessagesLib, localePropertiesEnums, hrfException, resourceBundleLib) {
6
+ "sap/rules/ui/parser/infrastructure/locale/lib/resourceBundle",
7
+ "sap/base/Log"
8
+ ], function(messagesListLib, opMessagesLib, localePropertiesEnums, hrfException, resourceBundleLib, Logger) {
8
9
  "use strict";
9
10
 
10
11
  var messagesList = messagesListLib.messages;
@@ -61,7 +62,7 @@ sap.ui.define([
61
62
 
62
63
  function initializeSubject() {
63
64
  if (!currentDetail || !currentDetail.subject) {
64
- jQuery.sap.log.error("ResponseCollector addMessage: no subject was defined");
65
+ Logger.error("ResponseCollector addMessage: no subject was defined");
65
66
  addNewSubject("GENERAL", false);
66
67
  }
67
68
 
@@ -207,16 +208,16 @@ sap.ui.define([
207
208
 
208
209
  switch (severity) {
209
210
  case SEVERITY_LEVEL.error:
210
- jQuery.sap.log.error (traceMassage + "\n\nCall stack:\n----------\n" + (new Error()).stack + '\n\n-------------------------------------');
211
+ Logger.error (traceMassage + "\n\nCall stack:\n----------\n" + (new Error()).stack + '\n\n-------------------------------------');
211
212
  break;
212
213
  case SEVERITY_LEVEL.info:
213
- jQuery.sap.log.info(traceMassage);
214
+ Logger.info(traceMassage);
214
215
  break;
215
216
  case SEVERITY_LEVEL.debug:
216
- jQuery.sap.log.debug(traceMassage);
217
+ Logger.debug(traceMassage);
217
218
  break;
218
219
  case SEVERITY_LEVEL.warn:
219
- jQuery.sap.log.error(traceMassage);
220
+ Logger.error(traceMassage);
220
221
  break;
221
222
  }
222
223
  }
@@ -4,9 +4,10 @@ sap.ui.define([
4
4
  "sap/rules/ui/parser/infrastructure/errorHandling/hrfException",
5
5
  "sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector",
6
6
  "sap/rules/ui/parser/infrastructure/util/utilsBase",
7
- "sap/rules/ui/parser/ruleBody/lib/decisionTableCell"
7
+ "sap/rules/ui/parser/ruleBody/lib/decisionTableCell",
8
+ "sap/base/Log"
8
9
  ], function(parsingBackendMediator, ruleBodyConstants, hrfException, ResponseCollector, utilsBaseLib,
9
- decisionTableCellLib) {
10
+ decisionTableCellLib, Logger) {
10
11
  "use strict";
11
12
 
12
13
  var parser = new parsingBackendMediator.parsingBackendMediatorLib();
@@ -53,7 +54,7 @@ sap.ui.define([
53
54
  */
54
55
  RuleBody.prototype.traverse = function traverse(ruleBody, vocabulary, vocaRTServ, traversalParts, pathPrefix) {
55
56
 
56
- jQuery.sap.log.debug("Traverse rule --> " + JSON.stringify(ruleBody));
57
+ Logger.debug("Traverse rule --> " + JSON.stringify(ruleBody));
57
58
 
58
59
  //the default is to do traversal on all ruleBody parts
59
60
  this.initTraversalParts(traversalParts);
@@ -463,9 +464,9 @@ sap.ui.define([
463
464
  RuleBody.prototype.getParserAST = function getParserAST(expression, parserMode, variables, contentType, flags) {
464
465
  var parsedBusinessRule = parser.parseInputRT(expression, parserMode, this.vocaRTServ, variables, contentType, this.vocabulary, flags);
465
466
 
466
- jQuery.sap.log.debug("****************************************************************************************************");
467
- jQuery.sap.log.debug("expresstion to parser: " + expression + " type: " + contentType + " vocabulary: " + this.vocabulary + " " + parserMode);
468
- jQuery.sap.log.debug("*****************************************************************************************************");
467
+ Logger.debug("****************************************************************************************************");
468
+ Logger.debug("expresstion to parser: " + expression + " type: " + contentType + " vocabulary: " + this.vocabulary + " " + parserMode);
469
+ Logger.debug("*****************************************************************************************************");
469
470
 
470
471
  if (parsedBusinessRule === undefined ||
471
472
  (parsedBusinessRule === null && expressionEmpty(expression) === false)) {
@@ -479,7 +480,7 @@ sap.ui.define([
479
480
  }
480
481
  }
481
482
 
482
- jQuery.sap.log.debug (JSON.stringify(parsedBusinessRule));
483
+ Logger.debug (JSON.stringify(parsedBusinessRule));
483
484
  return parsedBusinessRule;
484
485
  };
485
486
 
@@ -6,9 +6,10 @@ sap.ui.define([
6
6
  "sap/rules/ui/parser/businessLanguage/lib/valueHelpValidator",
7
7
  "sap/rules/ui/parser/ruleBody/lib/decisionTableCell",
8
8
  "sap/rules/ui/parser/businessLanguage/lib/ASTConvertor",
9
- "sap/rules/ui/parser/AST/lib/bundleAst"
9
+ "sap/rules/ui/parser/AST/lib/bundleAst",
10
+ "sap/base/Log"
10
11
  ], function(ruleBodyValidatorLib, constants, parserConstants, utilsBase, valueHelpValidatorLib,
11
- decisionTableCellLib, ASTConvertorLib, ) {
12
+ decisionTableCellLib, ASTConvertorLib, bundleAst, Logger) {
12
13
  "use strict";
13
14
 
14
15
  var bundleApi = RulesAPI_Ast;
@@ -18,7 +19,7 @@ sap.ui.define([
18
19
 
19
20
  function RuleBodyConvertor(oDataRule) {
20
21
 
21
- jQuery.sap.log.debug("CTOR - Rule Convertor");
22
+ Logger.debug("CTOR - Rule Convertor");
22
23
  this.oDataRule = oDataRule;
23
24
  ruleBodyValidatorLib.RuleBodyValidator.call(this);
24
25
 
@@ -9,16 +9,17 @@ sap.ui.define([
9
9
  "sap/rules/ui/parser/infrastructure/util/utilsBase",
10
10
  "sap/rules/ui/parser/infrastructure/util/constants",
11
11
  "sap/rules/ui/parser/ruleBody/lib/decisionTableCell",
12
- "sap/rules/ui/parser/resources/dependencies/lib/constants"
12
+ "sap/rules/ui/parser/resources/dependencies/lib/constants",
13
+ "sap/base/Log"
13
14
  ], function(ruleBodyBase, ruleBodyConstants, RelConstants, dependenciesObjectsLib, dependenciesHandlerLib,
14
- vocConstants, ResponseCollectorLib, utilsBaseLib, utilConstantsLib, decisionTableCellLib, depConstants) {
15
+ vocConstants, ResponseCollectorLib, utilsBaseLib, utilConstantsLib, decisionTableCellLib, depConstants, Logger) {
15
16
  "use strict";
16
17
 
17
18
  var utilsLib = new utilsBaseLib.utilsBaseLib();
18
19
  var ResponseCollector = ResponseCollectorLib.ResponseCollector;
19
20
  function RuleBodyValidator() {
20
21
 
21
- jQuery.sap.log.debug("CTOR - Rule Validator");
22
+ Logger.debug("CTOR - Rule Validator");
22
23
  ruleBodyBase.RuleBody.call(this); //improve inheritance writing
23
24
 
24
25
  this.initValidation();
@@ -337,7 +338,7 @@ sap.ui.define([
337
338
  * handles Text Condition
338
339
  */
339
340
  RuleBodyValidator.prototype.handleTextCondition = function handleTextCondition(condition, result, pathPrefix) {
340
- jQuery.sap.log.debug("Validate Condition");
341
+ Logger.debug("Validate Condition");
341
342
 
342
343
  this.currentParserResult = this.getParserAST(condition, RelConstants.VALIDATE_MODE, null, RelConstants.TYPE_BOOLEAN, this.flags);
343
344
 
@@ -1016,7 +1017,7 @@ sap.ui.define([
1016
1017
  */
1017
1018
  RuleBodyValidator.prototype.validateHeader = function validateHeader(header) {
1018
1019
 
1019
- jQuery.sap.log.debug("validate header");
1020
+ Logger.debug("validate header");
1020
1021
 
1021
1022
  if (header.hasOwnProperty(ruleBodyConstants.RULE_CELL_TYPE)) {
1022
1023
 
@@ -1678,7 +1679,7 @@ sap.ui.define([
1678
1679
  RuleBodyValidator.prototype.validateBusinessRule = function validateBusinessRule(ruleBody, vocabulary, vocaRTServ, flags, output, pathPrefixMap, traversalParts) {
1679
1680
  var result = {};
1680
1681
 
1681
- jQuery.sap.log.debug("flags " + JSON.stringify(flags));
1682
+ Logger.debug("flags " + JSON.stringify(flags));
1682
1683
 
1683
1684
  // Updating the AST need
1684
1685
  this.needDeserializeInput = decisionTableCellLib.needDeserializeInput(flags, ruleBody.relVersion, vocaRTServ);
@@ -1733,14 +1734,14 @@ sap.ui.define([
1733
1734
  if (this.flags[ruleBodyConstants.outputFlagsEnum.dependenciesOutput] &&
1734
1735
  this.status === ruleBodyConstants.RULE_SUCCESS && this.dependenciesByFlags) {
1735
1736
  result.dependencies = this.depHandler.getDependencies();
1736
- jQuery.sap.log.debug("getDependencies");
1737
+ Logger.debug("getDependencies");
1737
1738
  }
1738
1739
 
1739
1740
  // Getting root object context result
1740
1741
  if (this.flags[ruleBodyConstants.outputFlagsEnum.rootObjectContextOutput] &&
1741
1742
  this.status === ruleBodyConstants.RULE_SUCCESS) {
1742
1743
  result[ruleBodyConstants.outputPropertiesEnum.rootObjectContext] = this.getRootObjectContext();
1743
- jQuery.sap.log.debug("getRootObjectContext");
1744
+ Logger.debug("getRootObjectContext");
1744
1745
  }
1745
1746
 
1746
1747
  return result;
@@ -7,13 +7,30 @@
7
7
 
8
8
  sap.ui.define([
9
9
  "sap/rules/ui/Constants",
10
- "sap/ui/core/LocaleData"
11
- ], function(Constants,LocaleData) {
10
+ "sap/ui/core/LocaleData",
11
+ "sap/ui/model/json/JSONModel",
12
+ "sap/ui/comp/valuehelpdialog/ValueHelpDialog",
13
+ "sap/ui/table/Column",
14
+ "sap/m/Text",
15
+ "sap/ui/core/library",
16
+ "sap/base/i18n/Formatting",
17
+ "sap/ui/core/format/DateFormat",
18
+ "sap/ui/comp/smartfilterbar/SmartFilterBar",
19
+ "sap/ui/model/odata/v2/ODataModel",
20
+ "sap/ui/comp/smartfilterbar/ControlConfiguration",
21
+ "sap/ui/model/Filter",
22
+ "sap/ui/model/FilterOperator",
23
+ "sap/m/Label",
24
+ "sap/ui/core/Lib",
25
+ "sap/ui/core/Element"
26
+
27
+ ], function(Constants,LocaleData, JSONModel, valuehelpdialog, TableColumn, Text, coreLibrary, Formatting, DateFormat, SmartFilterBar, ODataModel, Element, ControlConfiguration,
28
+ Filter, FilterOperator, Label, coreLib) {
12
29
  "use strict";
13
30
  var valueHelpDialogProvider = {};
14
31
 
15
32
  valueHelpDialogProvider._createCpValueHelp = function(valueHelpInfo, curPos, bReplaceWord, bValuehelpLinkPress) {
16
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
33
+ this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
17
34
  var bAddSpace = false;
18
35
  var basePath = "";
19
36
 
@@ -29,7 +46,7 @@ sap.ui.define([
29
46
  if (tokens && tokens.length > 0) {
30
47
  bAddSpace = (tokens[tokens.length - 1].tokenType !== "whitespace");
31
48
  }
32
- basePath = sap.ui.getCore().byId(this.getExpressionLanguage()).getModel().sServiceUrl;
49
+ basePath = Element.getElementById(this.getExpressionLanguage()).getModel().sServiceUrl;
33
50
  }
34
51
  this.businessDataType = this.valueHelpMetadata.businessDataType;
35
52
  this.serviceUrl = this.valueHelpMetadata.serviceURL;
@@ -41,7 +58,7 @@ sap.ui.define([
41
58
  if (this.oDialog) {
42
59
  this.oDialog.destroy();
43
60
  }
44
- sap.ui.core.BusyIndicator.show(0);
61
+ coreLibrary.BusyIndicator.show(0);
45
62
 
46
63
  this._createDialog(basePath, valueHelpInfo, curPos, this.businessDataType, bAddSpace, bReplaceWord, bValuehelpLinkPress);
47
64
  };
@@ -62,8 +79,8 @@ sap.ui.define([
62
79
  // createDialog > _createValueHelpDialog
63
80
  valueHelpDialogProvider._createValueHelpDialogOLD = function(data, curPos, businessDataType) {
64
81
  var that = this;
65
- var model = new sap.ui.model.json.JSONModel(data.results);
66
- this.oValueHelpDialog = new sap.ui.comp.valuehelpdialog.ValueHelpDialog({
82
+ var model = new JSONModel(data.results);
83
+ this.oValueHelpDialog = new ValueHelpDialog({
67
84
  supportMultiselect: false,
68
85
  supportRanges: false,
69
86
  horizontalScrolling: false,
@@ -73,19 +90,19 @@ sap.ui.define([
73
90
  beforeOpen: function() {
74
91
  this.oValueHelpDialog.setModel(model, "valueHelpModel");
75
92
  this.oValueHelpDialog.getTable()
76
- .addColumn(new sap.ui.table.Column({
77
- label: new sap.m.Text({
93
+ .addColumn(new TableColumn({
94
+ label: new Text({
78
95
  text: that.oBundle.getText("valueHelpKeyColumnHeader")
79
96
  }),
80
- template: new sap.m.Text({
97
+ template: new Text({
81
98
  text: "{valueHelpModel>Value}"
82
99
  })
83
100
  }))
84
- .addColumn(new sap.ui.table.Column({
85
- label: new sap.m.Text({
101
+ .addColumn(new TableColumn({
102
+ label: new Text({
86
103
  text: that.oBundle.getText("valueHelpDescriptionColumnHeader")
87
104
  }),
88
- template: new sap.m.Text({
105
+ template: new Text({
89
106
  text: "{valueHelpModel>Description}"
90
107
  })
91
108
  }))
@@ -136,8 +153,8 @@ sap.ui.define([
136
153
  attributePath = attributePath = attributePath.replace(":","%3A");
137
154
  }
138
155
  this.attributeName = expressionData.oData[attributePath].Name;
139
- sap.ui.core.BusyIndicator.show(0);
140
- this.oValueHelpDialog = new sap.ui.comp.valuehelpdialog.ValueHelpDialog({
156
+ coreLibrary.BusyIndicator.show(0);
157
+ this.oValueHelpDialog = new ValueHelpDialog({
141
158
  supportMultiselect: false,
142
159
  supportRanges: false,
143
160
  horizontalScrolling: false,
@@ -156,7 +173,7 @@ sap.ui.define([
156
173
  value = parseInt(value);
157
174
  }
158
175
  if (that.basicMode) {
159
- var oValueHelpCtrl = sap.ui.getCore().byId("valueHelpCtrl");
176
+ var oValueHelpCtrl = Element.getElementById("valueHelpCtrl");
160
177
  oValueHelpCtrl.setValue(value);
161
178
  oValueHelpCtrl.fireChange();
162
179
  } else{
@@ -179,7 +196,7 @@ sap.ui.define([
179
196
  that.oValueHelpDialog.destroy();
180
197
  that.focus(that.codeMirror);
181
198
  that.oFilterBar.destroy();
182
- sap.ui.core.BusyIndicator.hide();
199
+ coreLibrary.BusyIndicator.hide();
183
200
  }
184
201
  });
185
202
  };
@@ -244,7 +261,7 @@ sap.ui.define([
244
261
  cursorPos = this.codeMirror.findPosH(cursorPosition, sFormatedValue.length, "char", true);
245
262
  this.codeMirror.setCursor(cursorPos); // set the cursor past the new selection
246
263
  }
247
- var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
264
+ var oExpressionLanguage = Element.getElementById(this.getExpressionLanguage());
248
265
  this.getFormattingTokens(oExpressionLanguage);
249
266
  this.ValueHelpRequested = false;
250
267
  };
@@ -263,7 +280,7 @@ sap.ui.define([
263
280
 
264
281
  // Utility function to update Modal Property of modal
265
282
  valueHelpDialogProvider._updateModal = function(modalValue) {
266
- var pop = sap.ui.getCore().byId("popover");
283
+ var pop = Element.getElementById("popover");
267
284
  if (pop) {
268
285
  pop.setModal(modalValue);
269
286
  }
@@ -274,12 +291,12 @@ sap.ui.define([
274
291
  */
275
292
  valueHelpDialogProvider._formatDate = function(value) {
276
293
  // Date instance which is used to convert the selected date from calendar control to short format
277
- var oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
294
+ var oLocale = Formatting.getLanguageTag();
278
295
  var oLocaleData = LocaleData.getInstance(oLocale);
279
296
 
280
- this.oFormatDate = sap.ui.core.format.DateFormat.getInstance({
297
+ this.oFormatDate = DateFormat.getInstance({
281
298
  pattern: oLocaleData.getDatePattern('short'),
282
- calendarType: sap.ui.core.CalendarType.Gregorian
299
+ calendarType: coreLibrary.CalendarType.Gregorian
283
300
  },
284
301
  oLocale
285
302
  );
@@ -298,7 +315,7 @@ sap.ui.define([
298
315
  } else {
299
316
  this.entitySet = valueHelpInfo.metadata.entitySet;
300
317
  }
301
- this.oFilterBar = new sap.ui.comp.smartfilterbar.SmartFilterBar({
318
+ this.oFilterBar = new SmartFilterBar({
302
319
  entitySet: that.entitySet,
303
320
  enableBasicSearch: true,
304
321
  advancedMode: true,
@@ -311,7 +328,7 @@ sap.ui.define([
311
328
  },
312
329
  controlConfiguration: [that._createControlConfiguration()]
313
330
  });
314
- var oModel = new sap.ui.model.odata.v2.ODataModel(basePath);
331
+ var oModel = new ODataModel(basePath);
315
332
  this.oFilterBar.setModel(oModel);
316
333
  };
317
334
 
@@ -319,7 +336,7 @@ sap.ui.define([
319
336
  * Creating the Control Configuration for the smartFilter of the valueHelp Dialog.
320
337
  */
321
338
  valueHelpDialogProvider._createControlConfiguration = function() {
322
- var aControlConfiguration = [new sap.ui.comp.smartfilterbar.ControlConfiguration({
339
+ var aControlConfiguration = [new ControlConfiguration({
323
340
  hasValueHelpDialog: true,
324
341
  key: "Value",
325
342
  label: "Value",
@@ -327,7 +344,7 @@ sap.ui.define([
327
344
  width: "100px",
328
345
  index: 1
329
346
 
330
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
347
+ }), new ControlConfiguration({
331
348
  hasValueHelpDialog: true,
332
349
  key: "Description",
333
350
  label: "Description",
@@ -335,7 +352,7 @@ sap.ui.define([
335
352
  width: "100px",
336
353
  index: 2
337
354
 
338
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
355
+ }), new ControlConfiguration({
339
356
  hasValueHelpDialog: true,
340
357
  key: "VocabularyId",
341
358
  label: "VocabularyId",
@@ -343,7 +360,7 @@ sap.ui.define([
343
360
  visible: false,
344
361
  index: 3
345
362
 
346
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
363
+ }), new ControlConfiguration({
347
364
  hasValueHelpDialog: true,
348
365
  key: "DataObjectId",
349
366
  label: "DataObjectId",
@@ -352,7 +369,7 @@ sap.ui.define([
352
369
  groupId: "abc",
353
370
  index: 4
354
371
 
355
- }), new sap.ui.comp.smartfilterbar.ControlConfiguration({
372
+ }), new ControlConfiguration({
356
373
  hasValueHelpDialog: true,
357
374
  key: "AttributeId",
358
375
  label: "AttributeId",
@@ -361,7 +378,7 @@ sap.ui.define([
361
378
  index: 5
362
379
 
363
380
  }),
364
- new sap.ui.comp.smartfilterbar.ControlConfiguration({
381
+ new ControlConfiguration({
365
382
  hasValueHelpDialog: true,
366
383
  key: "Version",
367
384
  label: "Version",
@@ -402,7 +419,7 @@ sap.ui.define([
402
419
  this._addValueHelpColumn(mEntities.valueHelp.properties[i], oTable);
403
420
  }
404
421
 
405
- var oModel = new sap.ui.model.odata.v2.ODataModel(basePath);
422
+ var oModel = new ODataModel(basePath);
406
423
  oTable.setModel(oModel);
407
424
  oTable.bindRows(mEntities.valueHelp.collection, null, aFilterParams);
408
425
  oTable.getBinding("rows").attachDataReceived(this._handleRowsDataReceived, this);
@@ -422,13 +439,13 @@ sap.ui.define([
422
439
 
423
440
  // Utility function to create columns for the table.
424
441
  valueHelpDialogProvider._addValueHelpColumn = function(oColumName, oTable) {
425
- var oColumn = new sap.ui.table.Column().setLabel(new sap.m.Label({
442
+ var oColumn = new TableColumn().setLabel(new Label({
426
443
  text: oColumName
427
444
  }));
428
445
  if (oColumName === Constants.PROPERTY_VALUE) {
429
446
  oColumn.setSortProperty(oColumName);
430
447
  }
431
- oTable.addColumn(oColumn.setTemplate(new sap.m.Text().bindProperty("text", oColumName)));
448
+ oTable.addColumn(oColumn.setTemplate(new Text().bindProperty("text", oColumName)));
432
449
  };
433
450
 
434
451
  /*
@@ -447,9 +464,9 @@ sap.ui.define([
447
464
  valueHelpDialogProvider._fetchFilterParams = function(valueHelpInfo) {
448
465
  var that = this;
449
466
  var aSearchParams = [];
450
- var aFilterParams = [new sap.ui.model.Filter("AttributeId", sap.ui.model.FilterOperator.EQ, this.attributeId),
451
- new sap.ui.model.Filter("DataObjectId", sap.ui.model.FilterOperator.EQ, this.dataObjectId),
452
- new sap.ui.model.Filter("VocabularyId", sap.ui.model.FilterOperator.EQ, this.vocabularyId)
467
+ var aFilterParams = [new Filter("AttributeId", FilterOperator.EQ, this.attributeId),
468
+ new Filter("DataObjectId", FilterOperator.EQ, this.dataObjectId),
469
+ new Filter("VocabularyId", FilterOperator.EQ, this.vocabularyId)
453
470
  ];
454
471
 
455
472
  var aFilters = this.oFilterBar.getFilters();
@@ -459,8 +476,8 @@ sap.ui.define([
459
476
  searchParam = this.oFilterBar.getParameters().custom.search;
460
477
  aSearchParams = this._getSearchFilters(searchParam);
461
478
  aFilters = that._formatFilterParams(aFilters);
462
- aFilterParams.push(new sap.ui.model.Filter({
463
- filters: [new sap.ui.model.Filter(aFilters), new sap.ui.model.Filter(aSearchParams)],
479
+ aFilterParams.push(new Filter({
480
+ filters: [new Filter(aFilters), new Filter(aSearchParams)],
464
481
  and: true
465
482
  }));
466
483
  } else if (!jQuery.isEmptyObject(searchParam)) {
@@ -573,9 +590,9 @@ sap.ui.define([
573
590
  valueHelpDialogProvider._manageParam = function(sPath, operator, value1, value2) {
574
591
  var filterParam = [];
575
592
  if (value1 && value2) {
576
- filterParam = new sap.ui.model.Filter({
577
- filters: [new sap.ui.model.Filter(sPath, sap.ui.model.FilterOperator.GT, value1),
578
- new sap.ui.model.Filter(sPath, sap.ui.model.FilterOperator.LT, value2)
593
+ filterParam = new Filter({
594
+ filters: [new Filter(sPath, FilterOperator.GT, value1),
595
+ new Filter(sPath, FilterOperator.LT, value2)
579
596
  ],
580
597
  and: true
581
598
  });
@@ -585,9 +602,9 @@ sap.ui.define([
585
602
 
586
603
  // Utility function to form the search filter params.
587
604
  valueHelpDialogProvider._getSearchFilters = function(searchParam) {
588
- return new sap.ui.model.Filter({
589
- filters: [new sap.ui.model.Filter(Constants.PROPERTY_VALUE, sap.ui.model.FilterOperator.EQ, searchParam),
590
- new sap.ui.model.Filter(Constants.PROPERTY_DESCRIPTION, sap.ui.model.FilterOperator.EQ, searchParam)
605
+ return new Filter({
606
+ filters: [new Filter(Constants.PROPERTY_VALUE, FilterOperator.EQ, searchParam),
607
+ new Filter(Constants.PROPERTY_DESCRIPTION, FilterOperator.EQ, searchParam)
591
608
  ],
592
609
  and: false
593
610
  });
@@ -595,12 +612,12 @@ sap.ui.define([
595
612
 
596
613
  valueHelpDialogProvider.setValueStateFilter = function(oEvent) {
597
614
  var sId = oEvent.getSource().sId;
598
- this._valueFieldValue = sap.ui.getCore().byId(sId + "-filterItemControlA_-Value");
615
+ this._valueFieldValue = Element.getElementById(sId + "-filterItemControlA_-Value");
599
616
  if (this._valueFieldValue) {
600
617
  this._valueFieldValue.setValueState("None");
601
618
  this._valueFieldValue.setValueStateText("");
602
619
  }
603
- this._valueFieldDescription = sap.ui.getCore().byId(sId + "-filterItemControlA_-Description");
620
+ this._valueFieldDescription = Element.getElementById(sId + "-filterItemControlA_-Description");
604
621
  if (this._valueFieldDescription) {
605
622
  this._valueFieldDescription.setValueState("None");
606
623
  this._valueFieldDescription.setValueStateText("");
@@ -8,9 +8,10 @@
8
8
  // ValueList In/Out/InOut parameter to set data)
9
9
  // -----------------------------------------------------------------------------
10
10
  sap.ui.define([
11
- 'jquery.sap.global', 'sap/m/List', 'sap/m/PlacementType', 'sap/m/ResponsivePopover', 'sap/m/StandardListItem',
12
- 'sap/ui/comp/providers/ValueHelpProvider', 'sap/ui/model/json/JSONModel'
13
- ], function(jQuery, List, PlacementType, ResponsivePopover, StandardListItem, ValueListProvider, JSONModel) {
11
+ 'sap/m/List', 'sap/m/ResponsivePopover', 'sap/m/StandardListItem',
12
+ 'sap/ui/comp/providers/ValueHelpProvider', 'sap/ui/model/json/JSONModel',"sap/m/MultiInput"
13
+ /*'sap/rules/ui/ExpressionAdvanced',*/ /*'sap/rules/ui/DecisionTableCellExpressionAdvanced'*/
14
+ ], function(List,ResponsivePopover, StandardListItem, ValueListProvider, JSONModel, MultiInput /*ExpressionAdvanced,*/ /*DecisionTableCellExpressionAdvanced*/) {
14
15
  "use strict";
15
16
 
16
17
  /**
@@ -42,7 +43,7 @@ sap.ui.define([
42
43
  // First close the dialog, since when used in an aggregation - some model updates (setting IN/OUT params to ODataModel) destroy this
43
44
  // instance/control!
44
45
  this._onCancel();
45
- if (this.oControl instanceof sap.m.MultiInput) {
46
+ if (this.oControl instanceof MultiInput) {
46
47
  // Clearing typed text if value is not selected from suggestion list but rather from ValueHelpDialog
47
48
  this.oControl.setValue("");
48
49
  this.oControl.setTokens(aTokens);
@@ -74,7 +75,7 @@ sap.ui.define([
74
75
  aRowData.push(oRowData);
75
76
  }
76
77
  }
77
- if (this.oControl instanceof sap.rules.ui.ExpressionAdvanced) {
78
+ if (this.oControl /*instanceof ExpressionAdvanced TODO:Change by Harsh*/) {
78
79
  this.oControl.setTextOnCursor(sKey, this._cursorPosition, this._bReplaceWord, this._businessDataType, this._bAddSpace);
79
80
  // Manually trigger the change event on sapUI5 control since it doesn't do this internally on setValue!
80
81
  this.oControl.fireChange({
@@ -93,7 +94,7 @@ sap.ui.define([
93
94
  ValueListProvider.prototype._onInitialise.apply(this, [oControlEvent]);
94
95
  var oExpressionAdvanced = this.oControl;
95
96
  var oPopOver = oExpressionAdvanced.getParent();
96
- if (oExpressionAdvanced instanceof sap.rules.ui.DecisionTableCellExpressionAdvanced) {
97
+ if (oExpressionAdvanced /*instanceof DecisionTableCellExpressionAdvanced TODO:Change by Harsh*/) {
97
98
  oExpressionAdvanced.setBusy(true);
98
99
  oPopOver.setModal(true);
99
100
  } else if (this._popover) {
@@ -105,7 +106,7 @@ sap.ui.define([
105
106
  this.oValueHelpDialog.close();
106
107
  var oExpressionAdvanced = this.oControl;
107
108
  var oPopOver = oExpressionAdvanced.getParent();
108
- if (oExpressionAdvanced instanceof sap.rules.ui.DecisionTableCellExpressionAdvanced) {
109
+ if (oExpressionAdvanced /*instanceof DecisionTableCellExpressionAdvanced TODO:Change by Harsh*/) {
109
110
  oPopOver.setModal(false);
110
111
  oExpressionAdvanced.setBusy(false);
111
112
  } else if (this._popover) {