@sapui5/sap.rules.ui 1.121.0 → 1.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +101 -74
- package/src/sap/rules/ui/DecisionTableCell.js +63 -33
- 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 +254 -225
- package/src/sap/rules/ui/DecisionTableSettingsOld.js +59 -59
- 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 +1 -2
- package/src/sap/rules/ui/RuleBase.js +2 -3
- package/src/sap/rules/ui/RuleBuilder.js +23 -23
- package/src/sap/rules/ui/TextRule.js +70 -54
- 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_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 -6
- 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
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
// Provides control sap.rules.ui.
|
|
9
9
|
sap.ui.define([
|
|
10
|
-
"jquery.sap.global",
|
|
11
10
|
"sap/rules/ui/library",
|
|
12
11
|
"sap/ui/core/Control",
|
|
13
12
|
"sap/ui/layout/form/SimpleForm",
|
|
@@ -22,9 +21,10 @@ sap.ui.define([
|
|
|
22
21
|
"sap/rules/ui/ExpressionAdvanced",
|
|
23
22
|
"sap/ui/layout/VerticalLayout",
|
|
24
23
|
"sap/rules/ui/type/Expression",
|
|
24
|
+
"sap/ui/core/Lib",
|
|
25
25
|
"./DecisionTableSettingsOldRenderer"
|
|
26
26
|
],
|
|
27
|
-
function(
|
|
27
|
+
function(library, Control, SimpleForm, Label, Switch, Select, Table, Text, CheckBox, Input, Button, ExpressionAdvanced, VerticalLayout, ExpressionType, coreLib, DecisionTableSettingsOldRenderer) {
|
|
28
28
|
"use strict";
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* @extends Control
|
|
39
39
|
*
|
|
40
40
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
41
|
+
* @version 1.122.0
|
|
42
42
|
*
|
|
43
43
|
* @constructor
|
|
44
44
|
* @private
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
// },
|
|
56
56
|
hitPolicies: {
|
|
57
57
|
type: "sap.rules.ui.RuleHitPolicy[]",
|
|
58
|
-
defaultValue: [
|
|
58
|
+
defaultValue: [library.RuleHitPolicy.FirstMatch, library.RuleHitPolicy.AllMatch]
|
|
59
59
|
},
|
|
60
60
|
modelName: {
|
|
61
61
|
type: "string",
|
|
@@ -86,9 +86,9 @@ sap.ui.define([
|
|
|
86
86
|
renderer: DecisionTableSettingsOldRenderer
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
oDecisionTableSettingsOld.prototype.init = function() {
|
|
90
90
|
|
|
91
|
-
this.oBundle =
|
|
91
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
92
92
|
this.needCreateLayout = true;
|
|
93
93
|
this.firstLoad = true;
|
|
94
94
|
|
|
@@ -100,7 +100,7 @@ sap.ui.define([
|
|
|
100
100
|
this.setBusyIndicatorDelay(0);
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
oDecisionTableSettingsOld.prototype.onBeforeRendering = function() {
|
|
104
104
|
|
|
105
105
|
if (this.firstLoad) {
|
|
106
106
|
this._initSettingsModel();
|
|
@@ -140,14 +140,14 @@ sap.ui.define([
|
|
|
140
140
|
* Create DecisionTable structure for new rule
|
|
141
141
|
* @private
|
|
142
142
|
*/
|
|
143
|
-
|
|
143
|
+
oDecisionTableSettingsOld.prototype._prepareNewRule = function() {
|
|
144
144
|
|
|
145
145
|
var oModel = this._getModel();
|
|
146
146
|
var oContext = this.getBindingContext();
|
|
147
147
|
|
|
148
148
|
// rule's data
|
|
149
|
-
var ruleFormat =
|
|
150
|
-
oModel.setProperty("Type",
|
|
149
|
+
var ruleFormat = library.RuleFormat.Advanced; // TODO: take from configuration
|
|
150
|
+
oModel.setProperty("Type", library.RuleType.DecisionTable, oContext, true);
|
|
151
151
|
oModel.setProperty("RuleFormat", ruleFormat, oContext, true);
|
|
152
152
|
var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
|
|
153
153
|
var sExpressionLanguageVersion = oExpressionLanguage.getExpressionLanguageVersion();
|
|
@@ -191,7 +191,7 @@ sap.ui.define([
|
|
|
191
191
|
* @param {function} mParameters.error? - error handler
|
|
192
192
|
* @private
|
|
193
193
|
*/
|
|
194
|
-
|
|
194
|
+
oDecisionTableSettingsOld.prototype._createDecisionTable = function(oData, mParameters) {
|
|
195
195
|
var oModel = this._getModel();
|
|
196
196
|
var oContext = this.getBindingContext();
|
|
197
197
|
|
|
@@ -224,7 +224,7 @@ sap.ui.define([
|
|
|
224
224
|
* @param {function} mParameters.error? - error handler
|
|
225
225
|
* @private
|
|
226
226
|
*/
|
|
227
|
-
|
|
227
|
+
oDecisionTableSettingsOld.prototype._createRow = function(oData, mParameters) {
|
|
228
228
|
|
|
229
229
|
mParameters = mParameters ? mParameters : {};
|
|
230
230
|
|
|
@@ -253,7 +253,7 @@ sap.ui.define([
|
|
|
253
253
|
* @param {function} mParameters.error? - error handler
|
|
254
254
|
* @private
|
|
255
255
|
*/
|
|
256
|
-
|
|
256
|
+
oDecisionTableSettingsOld.prototype._createCondition = function(oData, mParameters) {
|
|
257
257
|
|
|
258
258
|
mParameters = mParameters ? mParameters : {};
|
|
259
259
|
|
|
@@ -263,7 +263,7 @@ sap.ui.define([
|
|
|
263
263
|
RuleId: oData.ruleId,
|
|
264
264
|
Version: oData.version,
|
|
265
265
|
Id: oData.colId,
|
|
266
|
-
Type:
|
|
266
|
+
Type: library.DecisionTableColumn.Condition
|
|
267
267
|
};
|
|
268
268
|
|
|
269
269
|
mParameters.properties = oColumnData;
|
|
@@ -294,7 +294,7 @@ sap.ui.define([
|
|
|
294
294
|
* @param {function} mParameters.error? - error handler
|
|
295
295
|
* @private
|
|
296
296
|
*/
|
|
297
|
-
|
|
297
|
+
oDecisionTableSettingsOld.prototype._createCellsForNewColumn = function(oData, mParameters) {
|
|
298
298
|
|
|
299
299
|
mParameters = mParameters ? mParameters : {};
|
|
300
300
|
|
|
@@ -331,7 +331,7 @@ sap.ui.define([
|
|
|
331
331
|
* @param {function} mParameters.error? - error handler
|
|
332
332
|
* @private
|
|
333
333
|
*/
|
|
334
|
-
|
|
334
|
+
oDecisionTableSettingsOld.prototype._createCellsForNewRow = function(oData, mParameters) {
|
|
335
335
|
|
|
336
336
|
mParameters = mParameters ? mParameters : {};
|
|
337
337
|
|
|
@@ -363,7 +363,7 @@ sap.ui.define([
|
|
|
363
363
|
* @returns {int} number of added columns
|
|
364
364
|
* @private
|
|
365
365
|
*/
|
|
366
|
-
|
|
366
|
+
oDecisionTableSettingsOld.prototype._createResult = function(oData, mParameters) {
|
|
367
367
|
|
|
368
368
|
var oContext = this.getBindingContext();
|
|
369
369
|
|
|
@@ -396,7 +396,7 @@ sap.ui.define([
|
|
|
396
396
|
* @param {function} mParameters.error? - error handler
|
|
397
397
|
* @private
|
|
398
398
|
*/
|
|
399
|
-
|
|
399
|
+
oDecisionTableSettingsOld.prototype._createResultParameter = function(oData, mParameters) {
|
|
400
400
|
|
|
401
401
|
mParameters = mParameters ? mParameters : {};
|
|
402
402
|
|
|
@@ -406,7 +406,7 @@ sap.ui.define([
|
|
|
406
406
|
RuleId: oData.ruleId,
|
|
407
407
|
Version: oData.version,
|
|
408
408
|
Id: oData.colId,
|
|
409
|
-
Type:
|
|
409
|
+
Type: library.DecisionTableColumn.Result
|
|
410
410
|
};
|
|
411
411
|
|
|
412
412
|
mParameters.properties = oColumnData;
|
|
@@ -437,7 +437,7 @@ sap.ui.define([
|
|
|
437
437
|
* @param {function} mParameters.error? - error handler
|
|
438
438
|
* @private
|
|
439
439
|
*/
|
|
440
|
-
|
|
440
|
+
oDecisionTableSettingsOld.prototype._removeColumn = function(oColumnContext, mParameters) {
|
|
441
441
|
var oModel = this._getModel();
|
|
442
442
|
|
|
443
443
|
var columnPath = oColumnContext.getPath();
|
|
@@ -465,7 +465,7 @@ sap.ui.define([
|
|
|
465
465
|
* @param {function} mParameters.error? - error handler
|
|
466
466
|
* @private
|
|
467
467
|
*/
|
|
468
|
-
|
|
468
|
+
oDecisionTableSettingsOld.prototype._removeCellsForColumn = function(oData, mParameters) {
|
|
469
469
|
var oModel = this._getModel();
|
|
470
470
|
var oContext = this.getBindingContext();
|
|
471
471
|
var rowKeys = oModel.getProperty("DecisionTable/DecisionTableRows", oContext);
|
|
@@ -480,7 +480,7 @@ sap.ui.define([
|
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
482
|
|
|
483
|
-
|
|
483
|
+
oDecisionTableSettingsOld.prototype._createTable = function() {
|
|
484
484
|
|
|
485
485
|
this.conditionsTable = new Table({
|
|
486
486
|
backgroundDesign: sap.m.BackgroundDesign.Solid,
|
|
@@ -537,7 +537,7 @@ sap.ui.define([
|
|
|
537
537
|
return this.conditionsTable;
|
|
538
538
|
};
|
|
539
539
|
|
|
540
|
-
|
|
540
|
+
oDecisionTableSettingsOld.prototype._createLayout = function() {
|
|
541
541
|
var oForm = new SimpleForm({
|
|
542
542
|
editable: true,
|
|
543
543
|
layout: "ResponsiveGridLayout",
|
|
@@ -591,26 +591,26 @@ sap.ui.define([
|
|
|
591
591
|
return oForm;
|
|
592
592
|
};
|
|
593
593
|
|
|
594
|
-
|
|
594
|
+
oDecisionTableSettingsOld.prototype._setFixedOperatorOnExpressionChange = function(displayExpression, colId) {
|
|
595
595
|
var oFixedOperatorData = this._getFixedOperatorDataForExpression(displayExpression);
|
|
596
596
|
this._internalModel.setProperty("/tableData/" + colId, oFixedOperatorData, true);
|
|
597
597
|
this._updateRemoveRowEnabled();
|
|
598
598
|
};
|
|
599
599
|
|
|
600
|
-
|
|
600
|
+
oDecisionTableSettingsOld.prototype.setExpressionLanguage = function (oExpressionLanguage){
|
|
601
601
|
this.setAssociation("expressionLanguage", oExpressionLanguage, true);
|
|
602
602
|
this._decisionTableHeaderSettingFormatter.setExpressionLanguage(oExpressionLanguage);
|
|
603
603
|
};
|
|
604
|
-
|
|
604
|
+
oDecisionTableSettingsOld.prototype._getColumnControlObject = function(oBindingContext) {
|
|
605
605
|
var mode = this._internalModel.getProperty("/advancedMode/current");
|
|
606
|
-
if (mode ===
|
|
606
|
+
if (mode === library.RuleFormat.Advanced) {
|
|
607
607
|
var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
|
|
608
608
|
|
|
609
609
|
return new ExpressionAdvanced({
|
|
610
610
|
expressionLanguage: oExpressionLanguage,
|
|
611
611
|
placeholder: this.oBundle.getText("expressionPlaceHolder"),
|
|
612
612
|
validateOnLoad: true,
|
|
613
|
-
type :
|
|
613
|
+
type : library.ExpressionType.NonComparison,
|
|
614
614
|
value: {
|
|
615
615
|
path: "Condition/Expression",
|
|
616
616
|
type: this._decisionTableHeaderSettingFormatter,
|
|
@@ -621,7 +621,7 @@ sap.ui.define([
|
|
|
621
621
|
var colId = oContext.getProperty("Id");
|
|
622
622
|
|
|
623
623
|
//Workaround to fix RULES-4723
|
|
624
|
-
var result = oExpressionLanguage.convertDecisionTableExpressionToDisplayValue(oSource.getValue(), "", "",
|
|
624
|
+
var result = oExpressionLanguage.convertDecisionTableExpressionToDisplayValue(oSource.getValue(), "", "", library.ExpressionType.All);
|
|
625
625
|
var value;
|
|
626
626
|
if (result.output.status === "Success" && result.output.converted) {
|
|
627
627
|
value = result.output.converted.header;
|
|
@@ -667,7 +667,7 @@ sap.ui.define([
|
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
669
|
|
|
670
|
-
|
|
670
|
+
oDecisionTableSettingsOld.prototype._tableColumnsFactory = function(sId, oContext) {
|
|
671
671
|
var ruleId = oContext.getProperty("RuleId");
|
|
672
672
|
var version = oContext.getProperty("Version");
|
|
673
673
|
var colId = oContext.getProperty("Id");
|
|
@@ -736,7 +736,7 @@ sap.ui.define([
|
|
|
736
736
|
* Create DecisionTable structure for new rule
|
|
737
737
|
* @private
|
|
738
738
|
*/
|
|
739
|
-
|
|
739
|
+
oDecisionTableSettingsOld.prototype._prepareNewRuleWorkaround = function() {
|
|
740
740
|
this._prepareNewRule();
|
|
741
741
|
this._saveWorkaround();
|
|
742
742
|
};
|
|
@@ -747,7 +747,7 @@ sap.ui.define([
|
|
|
747
747
|
* @param {map} mParameters? - Optional parameter map containing any of the following properties:
|
|
748
748
|
* @private
|
|
749
749
|
*/
|
|
750
|
-
|
|
750
|
+
oDecisionTableSettingsOld.prototype._addConditionWorkaround = function(oData, mParameters) {
|
|
751
751
|
|
|
752
752
|
this._createCondition(oData, mParameters);
|
|
753
753
|
this._saveWorkaround();
|
|
@@ -759,7 +759,7 @@ sap.ui.define([
|
|
|
759
759
|
* @param {map} mParameters? - Optional parameter map containing any of the following properties:
|
|
760
760
|
* @private
|
|
761
761
|
*/
|
|
762
|
-
|
|
762
|
+
oDecisionTableSettingsOld.prototype._removeColumnWorkaround = function(oColumnContext, mParameters) {
|
|
763
763
|
var oModel = this._getModel();
|
|
764
764
|
|
|
765
765
|
if (oModel.hasPendingChanges()) {
|
|
@@ -778,13 +778,13 @@ sap.ui.define([
|
|
|
778
778
|
* @private
|
|
779
779
|
* @param {map} mParameters? - Optional parameter map containing any of the following properties:
|
|
780
780
|
*/
|
|
781
|
-
|
|
781
|
+
oDecisionTableSettingsOld.prototype._saveWorkaround = function(mParameters) {
|
|
782
782
|
var oModel = this._getModel();
|
|
783
783
|
oModel.submitChanges(mParameters);
|
|
784
784
|
};
|
|
785
785
|
|
|
786
786
|
|
|
787
|
-
|
|
787
|
+
oDecisionTableSettingsOld.prototype._getModel = function() {
|
|
788
788
|
var modelName = this.getModelName();
|
|
789
789
|
if (modelName) {
|
|
790
790
|
return this.getModel(modelName);
|
|
@@ -792,7 +792,7 @@ sap.ui.define([
|
|
|
792
792
|
return this.getModel();
|
|
793
793
|
};
|
|
794
794
|
|
|
795
|
-
|
|
795
|
+
oDecisionTableSettingsOld.prototype._getBindModelName = function() {
|
|
796
796
|
var path = "";
|
|
797
797
|
var modelName = this.getModelName();
|
|
798
798
|
|
|
@@ -803,7 +803,7 @@ sap.ui.define([
|
|
|
803
803
|
return path;
|
|
804
804
|
};
|
|
805
805
|
|
|
806
|
-
|
|
806
|
+
oDecisionTableSettingsOld.prototype._initSettingsModel = function() {
|
|
807
807
|
var initialData = {};
|
|
808
808
|
|
|
809
809
|
initialData.advancedMode = this._getAdvancedModeData();
|
|
@@ -815,7 +815,7 @@ sap.ui.define([
|
|
|
815
815
|
this.setModel(this._internalModel, "settingsModel");
|
|
816
816
|
};
|
|
817
817
|
|
|
818
|
-
|
|
818
|
+
oDecisionTableSettingsOld.prototype._getAdvancedModeData = function() {
|
|
819
819
|
var mode;
|
|
820
820
|
var advancedModeData = {};
|
|
821
821
|
|
|
@@ -823,32 +823,32 @@ sap.ui.define([
|
|
|
823
823
|
var oContext = this.getBindingContext();
|
|
824
824
|
var ruleFormat = oContext.getProperty("RuleFormat");
|
|
825
825
|
|
|
826
|
-
if (ruleFormat ===
|
|
827
|
-
mode =
|
|
826
|
+
if (ruleFormat === library.RuleFormat.Advanced) {
|
|
827
|
+
mode = library.RuleFormat.Advanced;
|
|
828
828
|
} else {
|
|
829
|
-
mode =
|
|
829
|
+
mode = library.RuleFormat.Advanced; // TODO: should be: this.getRuleFormat();
|
|
830
830
|
}
|
|
831
831
|
|
|
832
832
|
switch (mode) {
|
|
833
|
-
case
|
|
833
|
+
case library.RuleFormat.All:
|
|
834
834
|
advancedModeData = {
|
|
835
|
-
current:
|
|
835
|
+
current: library.RuleFormat.Basic,
|
|
836
836
|
enabled: true,
|
|
837
837
|
visible: true
|
|
838
838
|
};
|
|
839
839
|
break;
|
|
840
840
|
|
|
841
|
-
case
|
|
841
|
+
case library.RuleFormat.Basic:
|
|
842
842
|
advancedModeData = {
|
|
843
|
-
current:
|
|
843
|
+
current: library.RuleFormat.Basic,
|
|
844
844
|
enabled: false,
|
|
845
845
|
visible: false
|
|
846
846
|
};
|
|
847
847
|
break;
|
|
848
848
|
|
|
849
|
-
case
|
|
849
|
+
case library.RuleFormat.Advanced:
|
|
850
850
|
advancedModeData = {
|
|
851
|
-
current:
|
|
851
|
+
current: library.RuleFormat.Advanced,
|
|
852
852
|
enabled: false,
|
|
853
853
|
visible: true
|
|
854
854
|
};
|
|
@@ -860,7 +860,7 @@ sap.ui.define([
|
|
|
860
860
|
return advancedModeData;
|
|
861
861
|
};
|
|
862
862
|
|
|
863
|
-
|
|
863
|
+
oDecisionTableSettingsOld.prototype._getHitPoliciesData = function() {
|
|
864
864
|
var hitPolicy = this.getProperty("hitPolicies");
|
|
865
865
|
var length = hitPolicy.length;
|
|
866
866
|
var oHitPolicyData = {
|
|
@@ -879,7 +879,7 @@ sap.ui.define([
|
|
|
879
879
|
return oHitPolicyData;
|
|
880
880
|
};
|
|
881
881
|
|
|
882
|
-
|
|
882
|
+
oDecisionTableSettingsOld.prototype._getFixedOperatorDataForExpression = function(sExpression) {
|
|
883
883
|
var fixOperatorEnabled = sExpression ? true : false;
|
|
884
884
|
var fixedOperatiorData = {
|
|
885
885
|
fixOperatorEnumration: [{
|
|
@@ -893,14 +893,14 @@ sap.ui.define([
|
|
|
893
893
|
var oSuggestions = [];
|
|
894
894
|
var oExpressionLanguage = sap.ui.getCore().byId(this.getExpressionLanguage());
|
|
895
895
|
var oFilter = [{
|
|
896
|
-
tokenType:
|
|
897
|
-
tokenCategory:
|
|
896
|
+
tokenType: library.ExpressionTokenType.reservedWord,
|
|
897
|
+
tokenCategory: library.ExpressionCategory.comparisonOp
|
|
898
898
|
}, {
|
|
899
|
-
tokenType:
|
|
900
|
-
tokenCategory:
|
|
899
|
+
tokenType: library.ExpressionTokenType.reservedWord,
|
|
900
|
+
tokenCategory: library.ExpressionCategory.comparisonBetweenOp
|
|
901
901
|
}, {
|
|
902
|
-
tokenType:
|
|
903
|
-
tokenCategory:
|
|
902
|
+
tokenType: library.ExpressionTokenType.reservedWord,
|
|
903
|
+
tokenCategory: library.ExpressionCategory.comparisonExistOp
|
|
904
904
|
}];
|
|
905
905
|
oSuggestions = oExpressionLanguage.getSuggestionsByCategories(sExpression, oFilter);
|
|
906
906
|
for (var i = 0; i < oSuggestions.length; i++) {
|
|
@@ -913,9 +913,9 @@ sap.ui.define([
|
|
|
913
913
|
return fixedOperatiorData;
|
|
914
914
|
};
|
|
915
915
|
|
|
916
|
-
|
|
916
|
+
oDecisionTableSettingsOld.prototype._setAdvancedMode = function(oControlEvent) {
|
|
917
917
|
var bAdvancedModeStatus = oControlEvent.getParameter("selected");
|
|
918
|
-
var ruleFormat = bAdvancedModeStatus ?
|
|
918
|
+
var ruleFormat = bAdvancedModeStatus ? library.RuleFormat.Advanced : library.RuleFormat.Basic;
|
|
919
919
|
|
|
920
920
|
var oRuleModel = this._getModel();
|
|
921
921
|
var oContextPath = this.getBindingContext().getPath();
|
|
@@ -925,14 +925,14 @@ sap.ui.define([
|
|
|
925
925
|
this.invalidate();
|
|
926
926
|
};
|
|
927
927
|
|
|
928
|
-
|
|
928
|
+
oDecisionTableSettingsOld.prototype._updateRemoveRowEnabled = function() {
|
|
929
929
|
var tableData = this._internalModel.getProperty("/tableData");
|
|
930
930
|
var len = Object.keys(tableData).length;
|
|
931
931
|
var enabled = len > 1;
|
|
932
932
|
this._internalModel.setProperty("/removeRowEnabled", enabled, null, true);
|
|
933
933
|
};
|
|
934
934
|
|
|
935
|
-
|
|
935
|
+
oDecisionTableSettingsOld.prototype.getButtons = function(oDialog) {
|
|
936
936
|
|
|
937
937
|
var aButtons = [];
|
|
938
938
|
|