@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
|
@@ -8,17 +8,18 @@ sap.ui.define(["sap/rules/ui/ast/autoComplete/dataStructure/Stack",
|
|
|
8
8
|
"sap/rules/ui/ast/autoComplete/dataStructure/ComparisionOperatorStack",
|
|
9
9
|
"sap/rules/ui/ast/autoComplete/dataStructure/FunctionalStack",
|
|
10
10
|
"sap/rules/ui/ast/autoComplete/node/OperatorNode",
|
|
11
|
-
"sap/rules/ui/ast/autoComplete/dataStructure/ArrayAndRangeStack"
|
|
11
|
+
"sap/rules/ui/ast/autoComplete/dataStructure/ArrayAndRangeStack",
|
|
12
|
+
"sap/ui/core/Lib",
|
|
12
13
|
],
|
|
13
14
|
function (Stack, TermsProvider, OperatorProvider, FunctionProvider, astBundleLibrary, Constants, TermNode, ComparisionOperatorStack,
|
|
14
|
-
FunctionalStack, OperatorNode, ArrayAndRangeStack) {
|
|
15
|
+
FunctionalStack, OperatorNode, ArrayAndRangeStack, coreLib) {
|
|
15
16
|
'use strict';
|
|
16
17
|
|
|
17
18
|
var astLibInstance = astBundleLibrary.getInstance();
|
|
18
19
|
|
|
19
20
|
var AutoComplete = function () {
|
|
20
21
|
this._autoCompleteStack = new Stack();
|
|
21
|
-
this.oBundle =
|
|
22
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
AutoComplete.prototype._getAutoSuggestionSkeleton = function () {
|
|
@@ -4,14 +4,19 @@ 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
|
"./AutoSuggestionAdvancedFunctionPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
15
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionAdvancedFunctionPanelRenderer) {
|
|
13
16
|
"use strict";
|
|
14
17
|
|
|
18
|
+
var ListMode = mobileLibrary.ListMode;
|
|
19
|
+
|
|
15
20
|
var autoSuggestionAdvancedFunctionPanel = Control.extend(
|
|
16
21
|
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionAdvancedFunctionPanel", {
|
|
17
22
|
metadata: {
|
|
@@ -40,8 +45,8 @@ sap.ui.define([
|
|
|
40
45
|
},
|
|
41
46
|
|
|
42
47
|
init: function () {
|
|
43
|
-
this.oBundle =
|
|
44
|
-
this.infraUtils = new
|
|
48
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
49
|
+
this.infraUtils = new infraUtils.utilsBaseLib();
|
|
45
50
|
this.needCreateLayout = true;
|
|
46
51
|
this.AttributeSegmentSelected = true;
|
|
47
52
|
this.dataObjectName = "";
|
|
@@ -63,11 +68,11 @@ sap.ui.define([
|
|
|
63
68
|
var that = this;
|
|
64
69
|
var vocabularyData = this.getData();
|
|
65
70
|
// create a Model with this data
|
|
66
|
-
var model = new
|
|
71
|
+
var model = new JSONModel();
|
|
67
72
|
model.setData(vocabularyData);
|
|
68
73
|
|
|
69
74
|
// create a list
|
|
70
|
-
this.advancedFunctionlist = new
|
|
75
|
+
this.advancedFunctionlist = new List({
|
|
71
76
|
growing: true,
|
|
72
77
|
growingScrollToLoad: true,
|
|
73
78
|
enableBusyIndicator: true,
|
|
@@ -76,10 +81,10 @@ sap.ui.define([
|
|
|
76
81
|
// bind the List items to the data collection
|
|
77
82
|
this.advancedFunctionlist.bindItems({
|
|
78
83
|
path: "/",
|
|
79
|
-
sorter: new
|
|
84
|
+
sorter: new Sorter("name"),
|
|
80
85
|
rememberSelections: false,
|
|
81
86
|
mode: ListMode.SingleSelectMaster,
|
|
82
|
-
template: new
|
|
87
|
+
template: new DisplayListItem({
|
|
83
88
|
label: "{name}",
|
|
84
89
|
value: "{label}",
|
|
85
90
|
type: "Active",
|
|
@@ -94,7 +99,7 @@ sap.ui.define([
|
|
|
94
99
|
var that = this;
|
|
95
100
|
|
|
96
101
|
// add list to the panel
|
|
97
|
-
var advancedFunctionslistPanel = new
|
|
102
|
+
var advancedFunctionslistPanel = new Panel({
|
|
98
103
|
headerText: this.oBundle.getText("advancedFunctionPanelTitle"),
|
|
99
104
|
expandable: true,
|
|
100
105
|
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/AggregateFunctionDialog",
|
|
15
|
+
"sap/m/Panel",
|
|
16
|
+
"sap/m/Link",
|
|
17
|
+
"sap/ui/core/Lib",
|
|
18
|
+
"sap/ui/core/Element",
|
|
15
19
|
"./AutoSuggestionAggregateFunctionPanelRenderer"
|
|
16
20
|
|
|
17
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
18
|
-
LocaleData, Constants, AstExpressionLanguage, AggregateFunctionDialog, AutoSuggestionAggregateFunctionPanelRenderer) {
|
|
21
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils,
|
|
22
|
+
LocaleData, Constants, AstExpressionLanguage, AggregateFunctionDialog, Panel, Link, coreLib, Element, AutoSuggestionAggregateFunctionPanelRenderer) {
|
|
19
23
|
"use strict";
|
|
20
24
|
|
|
25
|
+
var ListMode = mobileLibrary.ListMode;
|
|
21
26
|
var autoSuggestionAggregateFunctionPanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionAggregateFunctionPanel", {
|
|
22
27
|
metadata: {
|
|
23
28
|
library: "sap.rules.ui",
|
|
@@ -54,9 +59,9 @@ 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.aggregateFunctionDialog = AggregateFunctionDialog.getInstance();
|
|
59
|
-
this.infraUtils = new
|
|
64
|
+
this.infraUtils = new infraUtils.utilsBaseLib();
|
|
60
65
|
this._oAstExpressionLanguage = new AstExpressionLanguage();
|
|
61
66
|
this.needCreateLayout = true;
|
|
62
67
|
|
|
@@ -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 AggregateFunctionsPanel = new
|
|
87
|
+
var AggregateFunctionsPanel = 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("aggregateFunctionPanelTitle"),
|
|
89
94
|
press: function (oEvent) {
|
|
@@ -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
|
"./AutoSuggestionArrayOperatorPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
15
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionArrayOperatorPanelRenderer) {
|
|
13
16
|
"use strict";
|
|
14
17
|
|
|
18
|
+
var ListMode = mobileLibrary.ListMode;
|
|
15
19
|
var autoSuggestionArrayOperatorPanel = Control.extend(
|
|
16
20
|
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionArrayOperatorPanel", {
|
|
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: "/array",
|
|
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 arrayOperatorslistPanel = new
|
|
101
|
+
var arrayOperatorslistPanel = new Panel({
|
|
98
102
|
headerText: this.oBundle.getText("arrayOperatorsPanelTitle"),
|
|
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
|
"./AutoSuggestionComparisionOperatorPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
15
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, DisplayListItem, Panel, coreLib, AutoSuggestionComparisionOperatorPanelRenderer) {
|
|
13
16
|
"use strict";
|
|
14
|
-
|
|
17
|
+
|
|
18
|
+
var ListMode = mobileLibrary.ListMode;
|
|
15
19
|
var autoSuggestionComparisionOperatorPanel = Control.extend(
|
|
16
20
|
"sap.rules.ui.ast.autoCompleteContent.AutoSuggestionComparisionOperatorPanel", {
|
|
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
|
// create a Model with this data
|
|
65
69
|
var vocabularyData = this.getData();
|
|
66
|
-
var model = new
|
|
70
|
+
var model = new JSONModel();
|
|
67
71
|
model.setData(vocabularyData);
|
|
68
72
|
|
|
69
73
|
// create a list
|
|
70
|
-
this.comparisionOperatorslist = new
|
|
74
|
+
this.comparisionOperatorslist = 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.comparisionOperatorslist.bindItems({
|
|
78
82
|
path: "/comparision",
|
|
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",
|
|
@@ -92,7 +96,7 @@ sap.ui.define([
|
|
|
92
96
|
// set the model to the List, so it knows which data to use
|
|
93
97
|
this.comparisionOperatorslist.setModel(model);
|
|
94
98
|
// add list to the panel
|
|
95
|
-
var comparisionOperatorsListPanel = new
|
|
99
|
+
var comparisionOperatorsListPanel = new Panel({
|
|
96
100
|
headerText: this.oBundle.getText("comparisonOperatorsPanelTitle"),
|
|
97
101
|
expandable: true,
|
|
98
102
|
expanded: this.getExpand(),
|
|
@@ -9,20 +9,29 @@ sap.ui.define([
|
|
|
9
9
|
"sap/m/DateTimePicker",
|
|
10
10
|
"sap/m/TimePicker",
|
|
11
11
|
"sap/ui/model/json/JSONModel",
|
|
12
|
-
"sap/m/
|
|
12
|
+
"sap/m/library",
|
|
13
13
|
"sap/ui/core/CustomData",
|
|
14
14
|
"sap/ui/model/Sorter",
|
|
15
15
|
"sap/ui/core/LocaleData",
|
|
16
16
|
"sap/rules/ui/Constants",
|
|
17
17
|
"sap/rules/ui/AstExpressionBasic",
|
|
18
18
|
"sap/rules/ui/services/AstExpressionLanguage",
|
|
19
|
+
"sap/base/i18n/Formatting",
|
|
20
|
+
"sap/ui/core/format/DateFormat",
|
|
21
|
+
"sap/m/Link",
|
|
22
|
+
"sap/m/Panel",
|
|
23
|
+
"sap/m/ToolbarSpacer",
|
|
24
|
+
"sap/ui/core/Lib",
|
|
25
|
+
"sap/ui/core/Element",
|
|
26
|
+
"sap/ui/core/library",
|
|
19
27
|
"./AutoSuggestionDateAndTimePanelRenderer"
|
|
20
28
|
|
|
21
|
-
], function (jQuery, library, Control, List, Dialog, Button, DatePicker, DateTimePicker, TimePicker, JSONModel,
|
|
29
|
+
], function (jQuery, library, Control, List, Dialog, Button, DatePicker, DateTimePicker, TimePicker, JSONModel, mobileLibrary, CustomData,
|
|
22
30
|
Sorter,
|
|
23
|
-
LocaleData, Constants, AstExpressionBasic, AstExpressionLanguage, AutoSuggestionDateAndTimePanelRenderer) {
|
|
31
|
+
LocaleData, Constants, AstExpressionBasic, AstExpressionLanguage, Formatting, DateFormat, Link, Panel, ToolbarSpacer, coreLib, Element, coreLibrary, AutoSuggestionDateAndTimePanelRenderer) {
|
|
24
32
|
"use strict";
|
|
25
33
|
|
|
34
|
+
var ListMode = mobileLibrary.ListMode;
|
|
26
35
|
var autoSuggestionDateAndTimePanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionDateAndTimePanel", {
|
|
27
36
|
metadata: {
|
|
28
37
|
library: "sap.rules.ui",
|
|
@@ -64,17 +73,17 @@ sap.ui.define([
|
|
|
64
73
|
|
|
65
74
|
init: function () {
|
|
66
75
|
this.needCreateLayout = true;
|
|
67
|
-
this.oBundle =
|
|
76
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
68
77
|
this.vocabularyInfo = this.getVocabularyInfo();
|
|
69
78
|
this.autoSuggestionData = this.getData();
|
|
70
79
|
|
|
71
80
|
// Date instance which is used to convert the selected date from calendar control to short format
|
|
72
|
-
var oLocale =
|
|
81
|
+
var oLocale = Formatting.getLanguageTag();
|
|
73
82
|
var oLocaleData = LocaleData.getInstance(oLocale);
|
|
74
83
|
|
|
75
|
-
this.oFormatDate =
|
|
84
|
+
this.oFormatDate = DateFormat.getInstance({
|
|
76
85
|
pattern: oLocaleData.getDatePattern('short'),
|
|
77
|
-
calendarType:
|
|
86
|
+
calendarType: coreLibrary.CalendarType.Gregorian
|
|
78
87
|
},
|
|
79
88
|
oLocale
|
|
80
89
|
);
|
|
@@ -92,7 +101,7 @@ sap.ui.define([
|
|
|
92
101
|
//creates calender control
|
|
93
102
|
_createDateTimeDialog: function () {
|
|
94
103
|
var that = this;
|
|
95
|
-
var oLocale =
|
|
104
|
+
var oLocale = Formatting.getLanguageTag();
|
|
96
105
|
var oLocaleData = LocaleData.getInstance(oLocale);
|
|
97
106
|
var dateFormatted = oLocaleData.getDatePattern('medium');
|
|
98
107
|
var timeFormat = oLocaleData.getTimePattern('medium');
|
|
@@ -162,13 +171,13 @@ sap.ui.define([
|
|
|
162
171
|
}
|
|
163
172
|
if (this._dateBusinessDataType === "D") {
|
|
164
173
|
date = new Date(sValue);
|
|
165
|
-
formatter =
|
|
174
|
+
formatter = DateFormat.getDateInstance({
|
|
166
175
|
pattern: "yyyy-MM-dd"
|
|
167
176
|
});
|
|
168
177
|
return formatter.format(date);
|
|
169
178
|
} else if (this._dateBusinessDataType === "U") {
|
|
170
179
|
date = new Date(sValue);
|
|
171
|
-
formatter =
|
|
180
|
+
formatter = DateFormat.getDateTimeInstance({
|
|
172
181
|
pattern: "yyyy-MM-dd'T'HH:mm:ss.sss'Z'"
|
|
173
182
|
});
|
|
174
183
|
return formatter.format(date);
|
|
@@ -177,7 +186,7 @@ sap.ui.define([
|
|
|
177
186
|
},
|
|
178
187
|
|
|
179
188
|
_setModal: function (value) {
|
|
180
|
-
var pop =
|
|
189
|
+
var pop = Element.getElementById("popover");
|
|
181
190
|
if (pop) {
|
|
182
191
|
pop.setModal(value);
|
|
183
192
|
}
|
|
@@ -219,7 +228,7 @@ sap.ui.define([
|
|
|
219
228
|
} else if (this._dateBusinessDataType === "U") {
|
|
220
229
|
this.textContent = this.oBundle.getText("select_date_time");
|
|
221
230
|
}
|
|
222
|
-
this.content = new
|
|
231
|
+
this.content = new Link({
|
|
223
232
|
wrapping: true,
|
|
224
233
|
text: this.textContent,
|
|
225
234
|
press: function (oEvent) {
|
|
@@ -227,7 +236,7 @@ sap.ui.define([
|
|
|
227
236
|
}
|
|
228
237
|
});
|
|
229
238
|
|
|
230
|
-
var dateAndTimePanel = new
|
|
239
|
+
var dateAndTimePanel = new Panel({
|
|
231
240
|
expandable: false,
|
|
232
241
|
expanded: true,
|
|
233
242
|
content: [this.content],
|
|
@@ -238,7 +247,7 @@ sap.ui.define([
|
|
|
238
247
|
|
|
239
248
|
_createBothDateAndTime: function() {
|
|
240
249
|
var that = this;
|
|
241
|
-
this.dateContent = new
|
|
250
|
+
this.dateContent = new Link({
|
|
242
251
|
wrapping: true,
|
|
243
252
|
text: this.oBundle.getText("select_date"),
|
|
244
253
|
press: function (oEvent) {
|
|
@@ -247,9 +256,9 @@ sap.ui.define([
|
|
|
247
256
|
}
|
|
248
257
|
});
|
|
249
258
|
|
|
250
|
-
this.toolBarSpacer = new
|
|
259
|
+
this.toolBarSpacer = new ToolbarSpacer({width: "1em"});
|
|
251
260
|
|
|
252
|
-
this.timeContent = new
|
|
261
|
+
this.timeContent = new Link({
|
|
253
262
|
wrapping: true,
|
|
254
263
|
text: this.oBundle.getText("select_date_time"),
|
|
255
264
|
press: function (oEvent) {
|
|
@@ -258,7 +267,7 @@ sap.ui.define([
|
|
|
258
267
|
}
|
|
259
268
|
});
|
|
260
269
|
|
|
261
|
-
var dateAndTimePanel = new
|
|
270
|
+
var dateAndTimePanel = new Panel({
|
|
262
271
|
headerText: this.oBundle.getText("dateTimePanelTitle"),
|
|
263
272
|
expandable: true,
|
|
264
273
|
expanded: false,
|