@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.
- package/package.json +1 -1
- package/src/sap/rules/ui/.library +1 -1
- package/src/sap/rules/ui/AstExpressionBasic.js +25 -18
- package/src/sap/rules/ui/AstExpressionBasicRenderer.js +6 -4
- package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +36 -34
- package/src/sap/rules/ui/BindingSpy.js +3 -4
- package/src/sap/rules/ui/DecisionTable.js +113 -74
- package/src/sap/rules/ui/DecisionTableCell.js +67 -34
- package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +17 -13
- package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +40 -32
- package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +21 -19
- package/src/sap/rules/ui/DecisionTableConfiguration.js +5 -6
- package/src/sap/rules/ui/DecisionTableRenderer.js +6 -5
- package/src/sap/rules/ui/DecisionTableSettings.js +264 -232
- package/src/sap/rules/ui/DecisionTableSettingsOld.js +61 -61
- package/src/sap/rules/ui/ExpressionAdvanced.js +135 -111
- package/src/sap/rules/ui/ExpressionBase.js +1 -1
- package/src/sap/rules/ui/ExpressionBasic.js +17 -12
- package/src/sap/rules/ui/InstructionRenderer.js +30 -26
- package/src/sap/rules/ui/RuleBase.js +2 -3
- package/src/sap/rules/ui/RuleBuilder.js +29 -23
- package/src/sap/rules/ui/TextRule.js +78 -62
- package/src/sap/rules/ui/TextRuleConfiguration.js +2 -3
- package/src/sap/rules/ui/TextRuleSettings.js +133 -116
- package/src/sap/rules/ui/ast/autoComplete/AutoComplete.js +4 -3
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +15 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +15 -11
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +26 -17
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +75 -53
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +14 -10
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +14 -9
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +35 -23
- package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +93 -73
- package/src/sap/rules/ui/ast/util/AggregateFunctionDialog.js +172 -157
- package/src/sap/rules/ui/ast/util/LoopFunctionDialog.js +186 -163
- package/src/sap/rules/ui/ast/util/SelectFunctionDialog.js +205 -182
- package/src/sap/rules/ui/ast/util/utilsBase.js +85 -0
- package/src/sap/rules/ui/codemirror/addon/hint/show-hint.js +8 -4
- package/src/sap/rules/ui/i18n/messagebundle.properties +9 -1
- package/src/sap/rules/ui/i18n/messagebundle_ar.properties +1 -1
- package/src/sap/rules/ui/i18n/messagebundle_cnr.properties +34 -34
- package/src/sap/rules/ui/i18n/messagebundle_en_US_saprigi.properties +285 -285
- package/src/sap/rules/ui/i18n/messagebundle_hu.properties +1 -1
- package/src/sap/rules/ui/i18n/messagebundle_mk.properties +3 -3
- package/src/sap/rules/ui/i18n/messagebundle_sh.properties +88 -88
- package/src/sap/rules/ui/i18n/messagebundle_uk.properties +5 -5
- package/src/sap/rules/ui/library.js +6 -7
- package/src/sap/rules/ui/parser/businessLanguage/lib/IDPParser.js +115 -114
- package/src/sap/rules/ui/parser/businessLanguage/lib/antlr3_all_min.js +4 -4
- package/src/sap/rules/ui/parser/businessLanguage/lib/autoCompleteUtils.js +4 -3
- package/src/sap/rules/ui/parser/businessLanguage/lib/conversionUtils.js +10 -6
- package/src/sap/rules/ui/parser/businessLanguage/lib/entityModel.js +8 -7
- package/src/sap/rules/ui/parser/businessLanguage/lib/entityModelConstractor.js +17 -16
- package/src/sap/rules/ui/parser/businessLanguage/lib/parsingBackendMediator.js +10 -9
- package/src/sap/rules/ui/parser/businessLanguage/lib/termsUtils.js +4 -3
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_cnr.properties +57 -57
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_en_US_saprigi.properties +210 -210
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_mk.properties +1 -1
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +90 -90
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +1 -1
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_uk.properties +2 -2
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_cnr.properties +19 -19
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_en_US_saprigi.properties +26 -26
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_mk.properties +2 -2
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
- package/src/sap/rules/ui/parser/infrastructure/errorHandling/hrfException.js +3 -3
- package/src/sap/rules/ui/parser/infrastructure/locale/lib/resourceBundleContext.js +4 -3
- package/src/sap/rules/ui/parser/infrastructure/messageHandling/lib/responseCollector.js +8 -7
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBody.js +8 -7
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyConvertor.js +4 -3
- package/src/sap/rules/ui/parser/ruleBody/lib/ruleBodyValidator.js +9 -8
- package/src/sap/rules/ui/providers/ValueHelpDialogProvider.js +63 -46
- package/src/sap/rules/ui/providers/ValueHelpProvider.js +8 -7
- package/src/sap/rules/ui/services/AstExpressionLanguage.js +12 -10
- package/src/sap/rules/ui/services/ExpressionLanguage.js +89 -83
- package/src/sap/rules/ui/type/DecisionTableCell.js +2 -2
- package/src/sap/rules/ui/type/DecisionTableHeader.js +3 -3
- package/src/sap/rules/ui/type/Expression.js +3 -3
- package/src/sap/rules/ui/type/ExpressionAbs.js +5 -5
|
@@ -2,49 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
1000=
|
|
6
|
-
1001=
|
|
5
|
+
1000=Uspje\u0161na validacija
|
|
6
|
+
1001=Neuspje\u0161na validacija
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
2000=
|
|
10
|
-
2001=
|
|
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=
|
|
14
|
-
3001=
|
|
13
|
+
3000=Uspje\u0161no pozivanje parametara
|
|
14
|
+
3001=Neuspje\u0161no pozivanje parametara
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
4000=
|
|
18
|
-
4001=
|
|
17
|
+
4000=Uspje\u0161no kori\u0161\u0107enje usluge pravila
|
|
18
|
+
4001=Neuspje\u0161no kori\u0161\u0107enje usluge pravila
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
5000=
|
|
22
|
-
5001=
|
|
21
|
+
5000=Uspje\u0161no potpuno aktiviranje
|
|
22
|
+
5001=Neuspje\u0161no potpuno aktiviranje
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
6000=
|
|
26
|
-
6001=
|
|
25
|
+
6000=Uspje\u0161no aktiviranje
|
|
26
|
+
6001=Neuspje\u0161no aktiviranje
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
7000=
|
|
30
|
-
7001=
|
|
29
|
+
7000=Uspje\u0161no naknadno aktiviranje
|
|
30
|
+
7001=Neuspje\u0161no naknadno aktiviranje
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
8000=
|
|
34
|
-
8001=
|
|
33
|
+
8000=Uspje\u0161ne usluge vremena izvo\u0111enja
|
|
34
|
+
8001=Neuspje\u0161ne usluge vremena izvo\u0111enja
|
|
35
35
|
|
|
36
|
-
9000=
|
|
37
|
-
9001=
|
|
36
|
+
9000=Uspje\u0161no kreiranje dispe\u010Dera
|
|
37
|
+
9001=Neuspje\u0161no kreiranje dispe\u010Dera
|
|
38
38
|
|
|
39
|
-
10000=
|
|
40
|
-
10001=
|
|
39
|
+
10000=Uspje\u0161na HRF tehni\u010Dna konfiguracija
|
|
40
|
+
10001=Neuspje\u0161na HRF tehni\u010Dna konfiguracija
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
11000=
|
|
44
|
-
11001=
|
|
43
|
+
11000=Uspje\u0161na kompilacija
|
|
44
|
+
11001=Neuspje\u0161na kompilacija
|
|
45
45
|
|
|
46
|
-
12000=
|
|
47
|
-
12001=
|
|
46
|
+
12000=Uspje\u0161na validacija pravila
|
|
47
|
+
12001=Neuspje\u0161na validacija pravila
|
|
48
48
|
|
|
49
|
-
13000=
|
|
50
|
-
13001=
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
211
|
+
Logger.error (traceMassage + "\n\nCall stack:\n----------\n" + (new Error()).stack + '\n\n-------------------------------------');
|
|
211
212
|
break;
|
|
212
213
|
case SEVERITY_LEVEL.info:
|
|
213
|
-
|
|
214
|
+
Logger.info(traceMassage);
|
|
214
215
|
break;
|
|
215
216
|
case SEVERITY_LEVEL.debug:
|
|
216
|
-
|
|
217
|
+
Logger.debug(traceMassage);
|
|
217
218
|
break;
|
|
218
219
|
case SEVERITY_LEVEL.warn:
|
|
219
|
-
|
|
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
|
-
|
|
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
|
-
|
|
467
|
-
|
|
468
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
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
|
|
66
|
-
this.oValueHelpDialog = new
|
|
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
|
|
77
|
-
label: new
|
|
93
|
+
.addColumn(new TableColumn({
|
|
94
|
+
label: new Text({
|
|
78
95
|
text: that.oBundle.getText("valueHelpKeyColumnHeader")
|
|
79
96
|
}),
|
|
80
|
-
template: new
|
|
97
|
+
template: new Text({
|
|
81
98
|
text: "{valueHelpModel>Value}"
|
|
82
99
|
})
|
|
83
100
|
}))
|
|
84
|
-
.addColumn(new
|
|
85
|
-
label: new
|
|
101
|
+
.addColumn(new TableColumn({
|
|
102
|
+
label: new Text({
|
|
86
103
|
text: that.oBundle.getText("valueHelpDescriptionColumnHeader")
|
|
87
104
|
}),
|
|
88
|
-
template: new
|
|
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
|
-
|
|
140
|
-
this.oValueHelpDialog = new
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
294
|
+
var oLocale = Formatting.getLanguageTag();
|
|
278
295
|
var oLocaleData = LocaleData.getInstance(oLocale);
|
|
279
296
|
|
|
280
|
-
this.oFormatDate =
|
|
297
|
+
this.oFormatDate = DateFormat.getInstance({
|
|
281
298
|
pattern: oLocaleData.getDatePattern('short'),
|
|
282
|
-
calendarType:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
451
|
-
new
|
|
452
|
-
new
|
|
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
|
|
463
|
-
filters: [new
|
|
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
|
|
577
|
-
filters: [new
|
|
578
|
-
new
|
|
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
|
|
589
|
-
filters: [new
|
|
590
|
-
new
|
|
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 =
|
|
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 =
|
|
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
|
-
'
|
|
12
|
-
'sap/ui/comp/providers/ValueHelpProvider', 'sap/ui/model/json/JSONModel'
|
|
13
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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) {
|