@sapui5/sap.rules.ui 1.120.1 → 1.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +301 -0
- 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 +252 -252
- package/src/sap/rules/ui/i18n/messagebundle_sh.properties +108 -108
- package/src/sap/rules/ui/i18n/messagebundle_sr.properties +301 -0
- 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 +213 -0
- 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 +210 -210
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sh.properties +123 -123
- package/src/sap/rules/ui/parser/i18n/messages_descriptions_sr.properties +213 -0
- 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 +50 -0
- 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 +26 -26
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sh.properties +26 -26
- package/src/sap/rules/ui/parser/i18n/op_messages_descriptions_sr.properties +50 -0
- 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
package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js
CHANGED
|
@@ -4,14 +4,18 @@ sap.ui.define([
|
|
|
4
4
|
"sap/ui/core/Control",
|
|
5
5
|
"sap/m/List",
|
|
6
6
|
"sap/ui/model/json/JSONModel",
|
|
7
|
-
"sap/m/
|
|
7
|
+
"sap/m/library",
|
|
8
8
|
"sap/ui/core/CustomData",
|
|
9
9
|
"sap/ui/model/Sorter",
|
|
10
|
-
"sap/rules/ui/
|
|
10
|
+
"sap/rules/ui/ast/util/utilsBase",
|
|
11
|
+
"sap/m/DisplayListItem",
|
|
12
|
+
"sap/m/Panel",
|
|
13
|
+
"sap/ui/core/Lib",
|
|
11
14
|
"./AutoSuggestionMiscellaneousOperatorPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
15
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionMiscellaneousOperatorPanelRenderer) {
|
|
13
16
|
"use strict";
|
|
14
17
|
|
|
18
|
+
var ListMode = mobileLibrary.ListMode;
|
|
15
19
|
var AutoSuggestionMiscellaneousOperatorPanel = Control.extend(
|
|
16
20
|
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionMiscellaneousOperatorPanel", {
|
|
17
21
|
metadata: {
|
|
@@ -40,8 +44,8 @@ sap.ui.define([
|
|
|
40
44
|
},
|
|
41
45
|
|
|
42
46
|
init: function () {
|
|
43
|
-
this.oBundle =
|
|
44
|
-
this.infraUtils = new
|
|
47
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
48
|
+
this.infraUtils = new infraUtils.utilsBaseLib();
|
|
45
49
|
this.needCreateLayout = true;
|
|
46
50
|
this.AttributeSegmentSelected = true;
|
|
47
51
|
this.dataObjectName = "";
|
|
@@ -63,11 +67,11 @@ sap.ui.define([
|
|
|
63
67
|
var that = this;
|
|
64
68
|
var vocabularyData = this.getData();
|
|
65
69
|
// create a Model with this data
|
|
66
|
-
var model = new
|
|
70
|
+
var model = new JSONModel();
|
|
67
71
|
model.setData(vocabularyData);
|
|
68
72
|
|
|
69
73
|
// create a list
|
|
70
|
-
this.miscellaneousOperatorslist = new
|
|
74
|
+
this.miscellaneousOperatorslist = new List({
|
|
71
75
|
growing: true,
|
|
72
76
|
growingScrollToLoad: true,
|
|
73
77
|
enableBusyIndicator: true,
|
|
@@ -76,10 +80,10 @@ sap.ui.define([
|
|
|
76
80
|
// bind the List items to the data collection
|
|
77
81
|
this.miscellaneousOperatorslist.bindItems({
|
|
78
82
|
path: "/miscellaneous",
|
|
79
|
-
sorter: new
|
|
83
|
+
sorter: new Sorter("name"),
|
|
80
84
|
rememberSelections: false,
|
|
81
85
|
mode: ListMode.SingleSelectMaster,
|
|
82
|
-
template: new
|
|
86
|
+
template: new DisplayListItem({
|
|
83
87
|
label: "{name}",
|
|
84
88
|
value: "{label}",
|
|
85
89
|
type: "Active",
|
|
@@ -94,7 +98,7 @@ sap.ui.define([
|
|
|
94
98
|
var that = this;
|
|
95
99
|
|
|
96
100
|
// add list to the panel
|
|
97
|
-
var miscellaneousOperatorslistPanel = new
|
|
101
|
+
var miscellaneousOperatorslistPanel = new Panel({
|
|
98
102
|
headerText: this.oBundle.getText("miscOperatorsPanelTitle"),
|
|
99
103
|
expandable: true,
|
|
100
104
|
expanded: this.getExpand(),
|
|
@@ -4,14 +4,18 @@ sap.ui.define([
|
|
|
4
4
|
"sap/ui/core/Control",
|
|
5
5
|
"sap/m/List",
|
|
6
6
|
"sap/ui/model/json/JSONModel",
|
|
7
|
-
"sap/m/
|
|
7
|
+
"sap/m/library",
|
|
8
8
|
"sap/ui/core/CustomData",
|
|
9
9
|
"sap/ui/model/Sorter",
|
|
10
|
-
"sap/rules/ui/
|
|
10
|
+
"sap/rules/ui/ast/util/utilsBase",
|
|
11
|
+
"sap/m/DisplayListItem",
|
|
12
|
+
"sap/m/Panel",
|
|
13
|
+
"sap/ui/core/Lib",
|
|
11
14
|
"./AutoSuggestionOperationsPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
15
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionOperationsPanelRenderer) {
|
|
13
16
|
"use strict";
|
|
14
17
|
|
|
18
|
+
var ListMode = mobileLibrary.ListMode;
|
|
15
19
|
var autoSuggestionOperationsPanel = Control.extend(
|
|
16
20
|
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionOperationsPanel", {
|
|
17
21
|
metadata: {
|
|
@@ -36,8 +40,8 @@ sap.ui.define([
|
|
|
36
40
|
},
|
|
37
41
|
|
|
38
42
|
init: function () {
|
|
39
|
-
this.oBundle =
|
|
40
|
-
this.infraUtils = new
|
|
43
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
44
|
+
this.infraUtils = new infraUtils.utilsBaseLib();
|
|
41
45
|
this.needCreateLayout = true;
|
|
42
46
|
this.AttributeSegmentSelected = true;
|
|
43
47
|
this.dataObjectName = "";
|
|
@@ -59,11 +63,11 @@ sap.ui.define([
|
|
|
59
63
|
var that = this;
|
|
60
64
|
var operationsData = this.getData();
|
|
61
65
|
// create a Model with this data
|
|
62
|
-
var model = new
|
|
66
|
+
var model = new JSONModel();
|
|
63
67
|
model.setData(operationsData);
|
|
64
68
|
|
|
65
69
|
// create a list
|
|
66
|
-
this.Operationslist = new
|
|
70
|
+
this.Operationslist = new List({
|
|
67
71
|
growing: true,
|
|
68
72
|
growingScrollToLoad: true,
|
|
69
73
|
enableBusyIndicator: true,
|
|
@@ -72,10 +76,10 @@ sap.ui.define([
|
|
|
72
76
|
// bind the List items to the data collection
|
|
73
77
|
this.Operationslist.bindItems({
|
|
74
78
|
path: "/",
|
|
75
|
-
sorter: new
|
|
79
|
+
sorter: new Sorter("name"),
|
|
76
80
|
rememberSelections: false,
|
|
77
81
|
mode: ListMode.SingleSelectMaster,
|
|
78
|
-
template: new
|
|
82
|
+
template: new DisplayListItem({
|
|
79
83
|
label: "{name}",
|
|
80
84
|
value: "{label}",
|
|
81
85
|
type: "Active",
|
|
@@ -90,7 +94,7 @@ sap.ui.define([
|
|
|
90
94
|
var that = this;
|
|
91
95
|
|
|
92
96
|
// add list to the panel
|
|
93
|
-
var OperationslistPanel = new
|
|
97
|
+
var OperationslistPanel = new Panel({
|
|
94
98
|
headerText: this.oBundle.getText("OperationsPanelTitle"),
|
|
95
99
|
expandable: true,
|
|
96
100
|
expanded: true,
|
|
@@ -4,14 +4,18 @@ sap.ui.define([
|
|
|
4
4
|
"sap/ui/core/Control",
|
|
5
5
|
"sap/m/List",
|
|
6
6
|
"sap/ui/model/json/JSONModel",
|
|
7
|
-
"sap/m/
|
|
7
|
+
"sap/m/library",
|
|
8
8
|
"sap/ui/core/CustomData",
|
|
9
9
|
"sap/ui/model/Sorter",
|
|
10
|
-
"sap/rules/ui/
|
|
10
|
+
"sap/rules/ui/ast/util/utilsBase",
|
|
11
|
+
"sap/m/DisplayListItem",
|
|
12
|
+
"sap/m/Panel",
|
|
13
|
+
"sap/ui/core/Lib",
|
|
11
14
|
"./AutoSuggestionRangeOperatorPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
15
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionRangeOperatorPanelRenderer) {
|
|
13
16
|
"use strict";
|
|
14
17
|
|
|
18
|
+
var ListMode = mobileLibrary.ListMode;
|
|
15
19
|
var autoSuggestionRangeOperatorPanel = Control.extend(
|
|
16
20
|
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionRangeOperatorPanel", {
|
|
17
21
|
metadata: {
|
|
@@ -40,8 +44,8 @@ sap.ui.define([
|
|
|
40
44
|
},
|
|
41
45
|
|
|
42
46
|
init: function () {
|
|
43
|
-
this.oBundle =
|
|
44
|
-
this.infraUtils = new
|
|
47
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
48
|
+
this.infraUtils = new infraUtils.utilsBaseLib();
|
|
45
49
|
this.needCreateLayout = true;
|
|
46
50
|
this.AttributeSegmentSelected = true;
|
|
47
51
|
this.dataObjectName = "";
|
|
@@ -63,11 +67,11 @@ sap.ui.define([
|
|
|
63
67
|
var that = this;
|
|
64
68
|
var vocabularyData = this.getData();
|
|
65
69
|
// create a Model with this data
|
|
66
|
-
var model = new
|
|
70
|
+
var model = new JSONModel();
|
|
67
71
|
model.setData(vocabularyData);
|
|
68
72
|
|
|
69
73
|
// create a list
|
|
70
|
-
this.arrayOperatorslist = new
|
|
74
|
+
this.arrayOperatorslist = new List({
|
|
71
75
|
growing: true,
|
|
72
76
|
growingScrollToLoad: true,
|
|
73
77
|
enableBusyIndicator: true,
|
|
@@ -76,10 +80,10 @@ sap.ui.define([
|
|
|
76
80
|
// bind the List items to the data collection
|
|
77
81
|
this.arrayOperatorslist.bindItems({
|
|
78
82
|
path: "/range",
|
|
79
|
-
sorter: new
|
|
83
|
+
sorter: new Sorter("name"),
|
|
80
84
|
rememberSelections: false,
|
|
81
85
|
mode: ListMode.SingleSelectMaster,
|
|
82
|
-
template: new
|
|
86
|
+
template: new DisplayListItem({
|
|
83
87
|
label: "{name}",
|
|
84
88
|
value: "{label}",
|
|
85
89
|
type: "Active",
|
|
@@ -94,7 +98,7 @@ sap.ui.define([
|
|
|
94
98
|
var that = this;
|
|
95
99
|
|
|
96
100
|
// add list to the panel
|
|
97
|
-
var rangeOperatorslistPanel = new
|
|
101
|
+
var rangeOperatorslistPanel = new Panel({
|
|
98
102
|
headerText: this.oBundle.getText("rangeOperatorsPanelTitle"),
|
|
99
103
|
expandable: true,
|
|
100
104
|
expanded: this.getExpand(),
|
|
@@ -4,20 +4,25 @@ sap.ui.define([
|
|
|
4
4
|
"sap/ui/core/Control",
|
|
5
5
|
"sap/m/List",
|
|
6
6
|
"sap/ui/model/json/JSONModel",
|
|
7
|
-
"sap/m/
|
|
7
|
+
"sap/m/library",
|
|
8
8
|
"sap/ui/core/CustomData",
|
|
9
9
|
"sap/ui/model/Sorter",
|
|
10
|
-
"sap/rules/ui/
|
|
10
|
+
"sap/rules/ui/ast/util/utilsBase",
|
|
11
11
|
"sap/ui/core/LocaleData",
|
|
12
12
|
"sap/rules/ui/Constants",
|
|
13
13
|
"sap/rules/ui/services/AstExpressionLanguage",
|
|
14
14
|
"sap/rules/ui/ast/util/SelectFunctionDialog",
|
|
15
|
+
"sap/m/Panel",
|
|
16
|
+
"sap/m/Link",
|
|
17
|
+
"sap/ui/core/Lib",
|
|
18
|
+
"sap/ui/core/Element",
|
|
15
19
|
"./AutoSuggestionSelectFunctionPanelRenderer"
|
|
16
20
|
|
|
17
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
18
|
-
LocaleData, Constants, AstExpressionLanguage, SelectFunctionDialog, AutoSuggestionSelectFunctionPanelRenderer) {
|
|
21
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils,
|
|
22
|
+
LocaleData, Constants, AstExpressionLanguage, SelectFunctionDialog, Panel, Link, coreLib, Element, AutoSuggestionSelectFunctionPanelRenderer) {
|
|
19
23
|
"use strict";
|
|
20
24
|
|
|
25
|
+
var ListMode = mobileLibrary.ListMode;
|
|
21
26
|
var autoSuggestionSelectFunctionPanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionSelectFunctionPanel", {
|
|
22
27
|
metadata: {
|
|
23
28
|
library: "sap.rules.ui",
|
|
@@ -54,7 +59,7 @@ sap.ui.define([
|
|
|
54
59
|
},
|
|
55
60
|
|
|
56
61
|
init: function () {
|
|
57
|
-
this.oBundle =
|
|
62
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
58
63
|
this.selectFunctionDialog = SelectFunctionDialog.getInstance();
|
|
59
64
|
this._oAstExpressionLanguage = new AstExpressionLanguage();
|
|
60
65
|
this.needCreateLayout = true;
|
|
@@ -72,18 +77,18 @@ sap.ui.define([
|
|
|
72
77
|
},
|
|
73
78
|
|
|
74
79
|
onAfterRendering: function () {
|
|
75
|
-
this._oAstExpressionLanguage =
|
|
80
|
+
this._oAstExpressionLanguage = Element.getElementById(this.getAstExpressionLanguage());
|
|
76
81
|
},
|
|
77
82
|
initializeVariables: function () {
|
|
78
83
|
|
|
79
84
|
},
|
|
80
85
|
_createLayout: function () {
|
|
81
86
|
var that = this;
|
|
82
|
-
var selectFunctionsPanel = new
|
|
87
|
+
var selectFunctionsPanel = new Panel({
|
|
83
88
|
expandable: false,
|
|
84
89
|
expanded: true,
|
|
85
90
|
width: "auto",
|
|
86
|
-
content: [new
|
|
91
|
+
content: [new Link({
|
|
87
92
|
wrapping: true,
|
|
88
93
|
text: this.oBundle.getText("selectFunctionPanelTitle"),
|
|
89
94
|
press: function (oEvent) {
|
|
@@ -97,7 +102,7 @@ sap.ui.define([
|
|
|
97
102
|
},
|
|
98
103
|
|
|
99
104
|
_setModal: function (value) {
|
|
100
|
-
var pop =
|
|
105
|
+
var pop = Element.getElementById("popover");
|
|
101
106
|
if (pop) {
|
|
102
107
|
pop.setModal(value);
|
|
103
108
|
}
|
package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js
CHANGED
|
@@ -4,14 +4,26 @@ sap.ui.define([
|
|
|
4
4
|
"sap/ui/core/Control",
|
|
5
5
|
"sap/m/List",
|
|
6
6
|
"sap/ui/model/json/JSONModel",
|
|
7
|
-
"sap/m/
|
|
7
|
+
"sap/m/library",
|
|
8
8
|
"sap/ui/core/CustomData",
|
|
9
9
|
"sap/ui/model/Sorter",
|
|
10
|
-
"sap/rules/ui/
|
|
10
|
+
"sap/rules/ui/ast/util/utilsBase",
|
|
11
|
+
"sap/m/DisplayListItem",
|
|
12
|
+
"sap/m/Panel",
|
|
13
|
+
"sap/m/Link",
|
|
14
|
+
"sap/m/Dialog",
|
|
15
|
+
"sap/ui/layout/VerticalLayout",
|
|
16
|
+
"sap/m/Button",
|
|
17
|
+
"sap/ui/model/Filter",
|
|
18
|
+
"sap/ui/model/FilterOperator",
|
|
19
|
+
"sap/m/SearchField",
|
|
20
|
+
"sap/ui/core/Lib",
|
|
21
|
+
"sap/ui/core/Element",
|
|
11
22
|
"./AutoSuggestionTimeAndDurationFunctionPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
23
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, Link, Dialog, VerticalLayout, Button, Filter, FilterOperator, SearchField, coreLib, Element, AutoSuggestionTimeAndDurationFunctionPanelRenderer) {
|
|
13
24
|
"use strict";
|
|
14
25
|
|
|
26
|
+
var ListMode = mobileLibrary.ListMode;
|
|
15
27
|
var autoSuggestionTimeAndDurationFunctionPanel = Control.extend(
|
|
16
28
|
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionTimeAndDurationFunctionPanel", {
|
|
17
29
|
metadata: {
|
|
@@ -44,8 +56,8 @@ sap.ui.define([
|
|
|
44
56
|
},
|
|
45
57
|
|
|
46
58
|
init: function () {
|
|
47
|
-
this.oBundle =
|
|
48
|
-
this.infraUtils = new
|
|
59
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
60
|
+
this.infraUtils = new infraUtils.utilsBaseLib();
|
|
49
61
|
this.needCreateLayout = true;
|
|
50
62
|
this.AttributeSegmentSelected = true;
|
|
51
63
|
this.dataObjectName = "";
|
|
@@ -68,10 +80,10 @@ sap.ui.define([
|
|
|
68
80
|
var that = this;
|
|
69
81
|
this.vocabularyData = this.getData();
|
|
70
82
|
// create a Model with this data
|
|
71
|
-
var model = new
|
|
83
|
+
var model = new JSONModel();
|
|
72
84
|
|
|
73
85
|
// create a list
|
|
74
|
-
this.timeAndDurationFunctionlist = new
|
|
86
|
+
this.timeAndDurationFunctionlist = new List({
|
|
75
87
|
growingScrollToLoad: true,
|
|
76
88
|
enableBusyIndicator: true,
|
|
77
89
|
});
|
|
@@ -87,10 +99,10 @@ sap.ui.define([
|
|
|
87
99
|
// bind the List items to the data collection
|
|
88
100
|
this.timeAndDurationFunctionlist.bindItems({
|
|
89
101
|
path: "/",
|
|
90
|
-
sorter: new
|
|
102
|
+
sorter: new Sorter("name"),
|
|
91
103
|
rememberSelections: false,
|
|
92
104
|
mode: ListMode.SingleSelectMaster,
|
|
93
|
-
template: new
|
|
105
|
+
template: new DisplayListItem({
|
|
94
106
|
label: "{name}",
|
|
95
107
|
value: "{label}",
|
|
96
108
|
type: "Active",
|
|
@@ -106,7 +118,7 @@ sap.ui.define([
|
|
|
106
118
|
var that = this;
|
|
107
119
|
|
|
108
120
|
// add list to the panel
|
|
109
|
-
var timeAndDurationFunctionslistPanel = new
|
|
121
|
+
var timeAndDurationFunctionslistPanel = new Panel({
|
|
110
122
|
headerText: this.oBundle.getText("timeAndDurationFunctionsPanelTitle"),
|
|
111
123
|
expandable: true,
|
|
112
124
|
expanded: this.getExpand(),
|
|
@@ -124,7 +136,7 @@ sap.ui.define([
|
|
|
124
136
|
getMoreTimeAndDurationLink: function () {
|
|
125
137
|
var that = this;
|
|
126
138
|
var suggestionsData = this.getData();
|
|
127
|
-
var moreTimeAndDurationLink = new
|
|
139
|
+
var moreTimeAndDurationLink = new Link({
|
|
128
140
|
text: this.oBundle.getText("more_link"),
|
|
129
141
|
tooltip: this.oBundle.getText("more_link_tooltip"),
|
|
130
142
|
enabled: true,
|
|
@@ -141,7 +153,7 @@ sap.ui.define([
|
|
|
141
153
|
},
|
|
142
154
|
|
|
143
155
|
_setModal: function (value) {
|
|
144
|
-
var pop =
|
|
156
|
+
var pop = Element.getElementById("popover");
|
|
145
157
|
if (pop) {
|
|
146
158
|
pop.setModal(value);
|
|
147
159
|
}
|
|
@@ -153,11 +165,11 @@ sap.ui.define([
|
|
|
153
165
|
var searchField = this.getSearchField(searchFieldText);
|
|
154
166
|
this.detailedTimeAndDurationList = this.initializeTimeAndDurationList(this.vocabularyData);
|
|
155
167
|
this.bindFilteredTermsToList(this.detailedTimeAndDurationList, "", false);
|
|
156
|
-
var verticalLayoutForTimeAndDurationFunction = new
|
|
168
|
+
var verticalLayoutForTimeAndDurationFunction = new VerticalLayout({
|
|
157
169
|
content: [searchField, that.detailedTimeAndDurationList]
|
|
158
170
|
}).addStyleClass("sapAstVocabularyPanel");
|
|
159
171
|
|
|
160
|
-
this.timeAndDurationDialog = new
|
|
172
|
+
this.timeAndDurationDialog = new Dialog({
|
|
161
173
|
title: this.oBundle.getText("selectTimeAndDurationTitle"),
|
|
162
174
|
contentWidth: "500px",
|
|
163
175
|
contentHeight: "500px",
|
|
@@ -167,7 +179,7 @@ sap.ui.define([
|
|
|
167
179
|
that._dialogOpenedCallbackReference(false);
|
|
168
180
|
},
|
|
169
181
|
buttons: [
|
|
170
|
-
new
|
|
182
|
+
new Button({
|
|
171
183
|
text: this.oBundle.getText("cancelBtn"),
|
|
172
184
|
tooltip: this.oBundle.getText("cancelBtn"),
|
|
173
185
|
press: function (event) {
|
|
@@ -182,17 +194,17 @@ sap.ui.define([
|
|
|
182
194
|
},
|
|
183
195
|
|
|
184
196
|
bindFilteredTermsToList: function (oList, searchText, requireSearch) {
|
|
185
|
-
var model = new
|
|
197
|
+
var model = new JSONModel(this.vocabularyData);
|
|
186
198
|
|
|
187
199
|
var that = this;
|
|
188
200
|
var datapath = "/";
|
|
189
201
|
if (!oList) {
|
|
190
|
-
oList = new
|
|
202
|
+
oList = new List({});
|
|
191
203
|
}
|
|
192
204
|
oList.setModel(model);
|
|
193
205
|
oList.bindItems({
|
|
194
206
|
path: datapath,
|
|
195
|
-
template: new
|
|
207
|
+
template: new DisplayListItem({
|
|
196
208
|
label: "{name}",
|
|
197
209
|
value: "{label}",
|
|
198
210
|
type: "Active",
|
|
@@ -210,22 +222,22 @@ sap.ui.define([
|
|
|
210
222
|
if (requireSearch) {
|
|
211
223
|
var filterArray = [];
|
|
212
224
|
var filterProperty = "name";
|
|
213
|
-
filterArray.push(new
|
|
225
|
+
filterArray.push(new Filter(filterProperty, FilterOperator.Contains, searchText));
|
|
214
226
|
oList.getBinding("items").filter(filterArray);
|
|
215
227
|
oList.getModel().refresh(true);
|
|
216
228
|
}
|
|
217
229
|
},
|
|
218
230
|
|
|
219
231
|
initializeTimeAndDurationList: function (vocabularyData) {
|
|
220
|
-
var model = new
|
|
232
|
+
var model = new JSONModel(vocabularyData);
|
|
221
233
|
var datapath = "/";
|
|
222
|
-
var timeAndDurationlist = new
|
|
234
|
+
var timeAndDurationlist = new List({
|
|
223
235
|
headerText: this.oBundle.getText("timeAndDuration")
|
|
224
236
|
});
|
|
225
237
|
timeAndDurationlist.setModel(model);
|
|
226
238
|
timeAndDurationlist.bindItems({
|
|
227
239
|
path: datapath,
|
|
228
|
-
template: new
|
|
240
|
+
template: new DisplayListItem({
|
|
229
241
|
label: "{name}",
|
|
230
242
|
value: "{label}",
|
|
231
243
|
type: "Active",
|
|
@@ -237,7 +249,7 @@ sap.ui.define([
|
|
|
237
249
|
|
|
238
250
|
getSearchField: function (placeHolderText) {
|
|
239
251
|
var that = this;
|
|
240
|
-
this.searchField = new
|
|
252
|
+
this.searchField = new SearchField({
|
|
241
253
|
showSearchButton: false,
|
|
242
254
|
width: "462px",
|
|
243
255
|
placeholder: placeHolderText, //searchType,
|