@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
|
@@ -4,14 +4,34 @@ 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/Panel",
|
|
12
|
+
"sap/ui/layout/HorizontalLayout",
|
|
13
|
+
"sap/m/Label",
|
|
14
|
+
"sap/m/Link",
|
|
15
|
+
"sap/m/Select",
|
|
16
|
+
"sap/m/TextArea",
|
|
17
|
+
"sap/m/Dialog",
|
|
18
|
+
"sap/m/Button",
|
|
19
|
+
"sap/m/CustomListItem",
|
|
20
|
+
"sap/m/DisplayListItem",
|
|
21
|
+
"sap/ui/layout/VerticalLayout",
|
|
22
|
+
"sap/m/SegmentedButton",
|
|
23
|
+
"sap/m/SegmentedButtonItem",
|
|
24
|
+
"sap/ui/model/Filter",
|
|
25
|
+
"sap/ui/model/FilterOperator",
|
|
26
|
+
"sap/m/SearchField",
|
|
27
|
+
"sap/ui/core/Lib",
|
|
28
|
+
"sap/ui/core/Element",
|
|
11
29
|
"./AutoSuggestionVocabularyPanelRenderer"
|
|
12
|
-
], function (jQuery, library, Control, List, JSONModel,
|
|
30
|
+
], function (jQuery, library, Control, List, JSONModel, mobileLibrary, CustomData, Sorter, infraUtils, Panel, HorizontalLayout, Label, Link, Select, TextArea, Dialog, Button, CustomListItem, DisplayListItem, VerticalLayout, SegButton,
|
|
31
|
+
SegButtonItem, Filter, FilterOperator, SearchField, coreLib, Element, AutoSuggestionVocabularyPanelRenderer) {
|
|
13
32
|
"use strict";
|
|
14
33
|
|
|
34
|
+
var ListMode = mobileLibrary.ListMode;
|
|
15
35
|
var autoSuggestionVocabularyPanel = Control.extend("sap.rules.ui.ast.autoCompleteContent.AutoSuggestionVocabularyPanel", {
|
|
16
36
|
metadata: {
|
|
17
37
|
library: "sap.rules.ui",
|
|
@@ -43,8 +63,8 @@ sap.ui.define([
|
|
|
43
63
|
},
|
|
44
64
|
|
|
45
65
|
init: function () {
|
|
46
|
-
this.oBundle =
|
|
47
|
-
this.infraUtils = new
|
|
66
|
+
this.oBundle = coreLib.getResourceBundleFor("sap.rules.ui.i18n");
|
|
67
|
+
this.infraUtils = new infraUtils.utilsBaseLib();
|
|
48
68
|
this.needCreateLayout = true;
|
|
49
69
|
this.AttributeSegmentSelected = true;
|
|
50
70
|
this.dataObjectName = "";
|
|
@@ -64,27 +84,27 @@ sap.ui.define([
|
|
|
64
84
|
},
|
|
65
85
|
|
|
66
86
|
_createAggregateFunctionSection: function () {
|
|
67
|
-
var AggregateFunctionsPanel = new
|
|
87
|
+
var AggregateFunctionsPanel = new Panel({
|
|
68
88
|
expandable: false,
|
|
69
89
|
expanded: true,
|
|
70
90
|
width: "auto",
|
|
71
|
-
content: [new
|
|
91
|
+
content: [new Link({
|
|
72
92
|
wrapping: true,
|
|
73
93
|
text: this.oBundle.getText("aggregateFunctionPanelTitle"),
|
|
74
94
|
press: function (oEvent) {
|
|
75
|
-
var functionAndOfLayout = new
|
|
95
|
+
var functionAndOfLayout = new HorizontalLayout({
|
|
76
96
|
content: [
|
|
77
|
-
new
|
|
97
|
+
new Label({
|
|
78
98
|
text: this.oBundle.getText("function") + ": "
|
|
79
99
|
}),
|
|
80
|
-
new
|
|
100
|
+
new Select({
|
|
81
101
|
width: "200px",
|
|
82
102
|
height: "60px"
|
|
83
103
|
}),
|
|
84
|
-
new
|
|
104
|
+
new Label({
|
|
85
105
|
text: " " + this.oBundle.getText("oflabel") + " "
|
|
86
106
|
}),
|
|
87
|
-
new
|
|
107
|
+
new TextArea({
|
|
88
108
|
value: "",
|
|
89
109
|
showExceededText: true,
|
|
90
110
|
width: "150%",
|
|
@@ -93,12 +113,12 @@ sap.ui.define([
|
|
|
93
113
|
]
|
|
94
114
|
});
|
|
95
115
|
|
|
96
|
-
var whereLayout = new
|
|
116
|
+
var whereLayout = new HorizontalLayout({
|
|
97
117
|
content: [
|
|
98
|
-
new
|
|
118
|
+
new Label({
|
|
99
119
|
text: this.oBundle.getText("where_label") + ":"
|
|
100
120
|
}),
|
|
101
|
-
new
|
|
121
|
+
new TextArea({
|
|
102
122
|
value: "",
|
|
103
123
|
showExceededText: true,
|
|
104
124
|
width: "300px"
|
|
@@ -106,12 +126,12 @@ sap.ui.define([
|
|
|
106
126
|
]
|
|
107
127
|
});
|
|
108
128
|
|
|
109
|
-
var GroupByLayout = new
|
|
129
|
+
var GroupByLayout = new HorizontalLayout({
|
|
110
130
|
content: [
|
|
111
|
-
new
|
|
131
|
+
new Label({
|
|
112
132
|
text: this.oBundle.getText("group_by") + ": "
|
|
113
133
|
}),
|
|
114
|
-
new
|
|
134
|
+
new TextArea({
|
|
115
135
|
value: "",
|
|
116
136
|
showExceededText: true,
|
|
117
137
|
width: "300px"
|
|
@@ -119,12 +139,12 @@ sap.ui.define([
|
|
|
119
139
|
]
|
|
120
140
|
});
|
|
121
141
|
|
|
122
|
-
var FunctionLabelLayout = new
|
|
142
|
+
var FunctionLabelLayout = new HorizontalLayout({
|
|
123
143
|
content: [
|
|
124
|
-
new
|
|
144
|
+
new Label({
|
|
125
145
|
text: this.oBundle.getText("function_label") + ":",
|
|
126
146
|
}),
|
|
127
|
-
new
|
|
147
|
+
new TextArea({
|
|
128
148
|
value: "",
|
|
129
149
|
enabled: false,
|
|
130
150
|
width: "300px"
|
|
@@ -132,11 +152,11 @@ sap.ui.define([
|
|
|
132
152
|
]
|
|
133
153
|
});
|
|
134
154
|
|
|
135
|
-
var verticalLayoutForAggregateFunction = new
|
|
155
|
+
var verticalLayoutForAggregateFunction = new VerticalLayout({
|
|
136
156
|
content: [functionAndOfLayout, whereLayout, GroupByLayout, FunctionLabelLayout]
|
|
137
157
|
});
|
|
138
158
|
var that = this;
|
|
139
|
-
var aggregateFunctionsDialog = new
|
|
159
|
+
var aggregateFunctionsDialog = new Dialog({
|
|
140
160
|
title: this.oBundle.getText("configure_aggr_title"),
|
|
141
161
|
contentWidth: "800px",
|
|
142
162
|
contentHeight: "500px",
|
|
@@ -146,14 +166,14 @@ sap.ui.define([
|
|
|
146
166
|
that._dialogOpenedCallbackReference(false);
|
|
147
167
|
},
|
|
148
168
|
buttons: [
|
|
149
|
-
new
|
|
169
|
+
new Button({
|
|
150
170
|
text: this.oBundle.getText("applyChangesBtn"),
|
|
151
171
|
tooltip: this.oBundle.getText("applyChangesBtn"),
|
|
152
172
|
press: function (event) {
|
|
153
173
|
aggregateFunctionsDialog.close();
|
|
154
174
|
}
|
|
155
175
|
}),
|
|
156
|
-
new
|
|
176
|
+
new Button({
|
|
157
177
|
text: this.oBundle.getText("cancelBtn"),
|
|
158
178
|
tooltip: this.oBundle.getText("cancelBtn"),
|
|
159
179
|
press: function (event) {
|
|
@@ -168,7 +188,7 @@ sap.ui.define([
|
|
|
168
188
|
})]
|
|
169
189
|
})
|
|
170
190
|
|
|
171
|
-
var AggregateFunctionsItem = new
|
|
191
|
+
var AggregateFunctionsItem = new CustomListItem({
|
|
172
192
|
content: AggregateFunctionsPanel
|
|
173
193
|
})
|
|
174
194
|
return AggregateFunctionsItem;
|
|
@@ -178,7 +198,7 @@ sap.ui.define([
|
|
|
178
198
|
var that = this;
|
|
179
199
|
this.VocabularyTerms = this.getData();
|
|
180
200
|
// create a Model with this data
|
|
181
|
-
var model = new
|
|
201
|
+
var model = new JSONModel();
|
|
182
202
|
|
|
183
203
|
/*Setting growing shows the growing trigger button with text as 2/14 which we do not need
|
|
184
204
|
Hence, setting to top 5 and the rest will be shown in More link */
|
|
@@ -189,7 +209,7 @@ sap.ui.define([
|
|
|
189
209
|
model.setData(topFiveVocabularyData);
|
|
190
210
|
|
|
191
211
|
// create a list
|
|
192
|
-
this.vocabularylist = new
|
|
212
|
+
this.vocabularylist = new List({
|
|
193
213
|
growingScrollToLoad: true,
|
|
194
214
|
enableBusyIndicator: true
|
|
195
215
|
});
|
|
@@ -198,10 +218,10 @@ sap.ui.define([
|
|
|
198
218
|
// bind the List items to the data collection
|
|
199
219
|
this.vocabularylist.bindItems({
|
|
200
220
|
path: "/",
|
|
201
|
-
sorter: new
|
|
221
|
+
sorter: new Sorter("label"),
|
|
202
222
|
rememberSelections: false,
|
|
203
223
|
mode: ListMode.SingleSelectMaster,
|
|
204
|
-
template: new
|
|
224
|
+
template: new DisplayListItem({
|
|
205
225
|
label: "{label}",
|
|
206
226
|
type: "Active",
|
|
207
227
|
press: function (oEvent) {
|
|
@@ -216,7 +236,7 @@ sap.ui.define([
|
|
|
216
236
|
var moreVocabularyLink = this.getMoreVocabulariesLink();
|
|
217
237
|
|
|
218
238
|
// add list to the panel
|
|
219
|
-
var vocabularyListPanel = new
|
|
239
|
+
var vocabularyListPanel = new Panel({
|
|
220
240
|
headerText: this.oBundle.getText("vocabularyPanelTitle"),
|
|
221
241
|
expandable: true,
|
|
222
242
|
expanded: true,
|
|
@@ -232,7 +252,7 @@ sap.ui.define([
|
|
|
232
252
|
},
|
|
233
253
|
|
|
234
254
|
_setModal: function (value) {
|
|
235
|
-
var pop =
|
|
255
|
+
var pop = Element.getElementById("popover");
|
|
236
256
|
if (pop) {
|
|
237
257
|
pop.setModal(value);
|
|
238
258
|
}
|
|
@@ -240,7 +260,7 @@ sap.ui.define([
|
|
|
240
260
|
|
|
241
261
|
getMoreVocabulariesLink: function () {
|
|
242
262
|
var that = this;
|
|
243
|
-
var moreVocabularyLink = new
|
|
263
|
+
var moreVocabularyLink = new Link({
|
|
244
264
|
text: this.oBundle.getText("more_link"),
|
|
245
265
|
tooltip: this.oBundle.getText("more_link_tooltip"),
|
|
246
266
|
enabled: true,
|
|
@@ -281,11 +301,11 @@ sap.ui.define([
|
|
|
281
301
|
var searchField = this.getSearchField(searchFieldText);
|
|
282
302
|
this.detailedVocabularyList = this.initializeVocabularyList(this.VocabularyTerms);
|
|
283
303
|
this.bindFilteredTermsToList(this.detailedVocabularyList, "DataObjects", "", false);
|
|
284
|
-
var verticalLayoutForVocabularyFunction = new
|
|
304
|
+
var verticalLayoutForVocabularyFunction = new VerticalLayout({
|
|
285
305
|
content: [searchField, that.detailedVocabularyList]
|
|
286
306
|
}).addStyleClass("sapAstVocabularyPanel");
|
|
287
307
|
|
|
288
|
-
this.dataObjectsDialog = new
|
|
308
|
+
this.dataObjectsDialog = new Dialog({
|
|
289
309
|
title: this.oBundle.getText("selectVocabularyTitle"),
|
|
290
310
|
contentWidth: "500px",
|
|
291
311
|
contentHeight: "500px",
|
|
@@ -295,7 +315,7 @@ sap.ui.define([
|
|
|
295
315
|
that._dialogOpenedCallbackReference(false);
|
|
296
316
|
},
|
|
297
317
|
buttons: [
|
|
298
|
-
new
|
|
318
|
+
new Button({
|
|
299
319
|
text: this.oBundle.getText("cancelBtn"),
|
|
300
320
|
tooltip: this.oBundle.getText("cancelBtn"),
|
|
301
321
|
press: function (event) {
|
|
@@ -324,10 +344,10 @@ sap.ui.define([
|
|
|
324
344
|
this.detailedVocabularyList = this.initializeVocabularyList(this.VocabularyTerms);
|
|
325
345
|
this.bindFilteredAttributesAndAssociationsToList(this.detailedVocabularyList, "Attributes", "E", false);
|
|
326
346
|
|
|
327
|
-
var verticalLayoutForAttributesFunction = new
|
|
347
|
+
var verticalLayoutForAttributesFunction = new VerticalLayout({
|
|
328
348
|
content: [segmentedButton, searchField, that.detailedVocabularyList]
|
|
329
349
|
}).addStyleClass("sapAstVocabularyPanel");
|
|
330
|
-
that.attributesDialog = new
|
|
350
|
+
that.attributesDialog = new Dialog({
|
|
331
351
|
title: this.oBundle.getText("selectAttrAssocTitle"),
|
|
332
352
|
contentWidth: "500px",
|
|
333
353
|
contentHeight: "500px",
|
|
@@ -337,7 +357,7 @@ sap.ui.define([
|
|
|
337
357
|
that._dialogOpenedCallbackReference(false);
|
|
338
358
|
},
|
|
339
359
|
buttons: [
|
|
340
|
-
new
|
|
360
|
+
new Button({
|
|
341
361
|
text: this.oBundle.getText("cancelBtn"),
|
|
342
362
|
tooltip: this.oBundle.getText("cancelBtn"),
|
|
343
363
|
press: function (event) {
|
|
@@ -354,8 +374,8 @@ sap.ui.define([
|
|
|
354
374
|
|
|
355
375
|
getAttributesSegmentedButtons: function () {
|
|
356
376
|
var that = this;
|
|
357
|
-
var SegmentedButton = new
|
|
358
|
-
items: [new
|
|
377
|
+
var SegmentedButton = new SegButton({
|
|
378
|
+
items: [new SegButtonItem({
|
|
359
379
|
text: this.oBundle.getText("attributes"),
|
|
360
380
|
width: "230px",
|
|
361
381
|
press: function () {
|
|
@@ -367,7 +387,7 @@ sap.ui.define([
|
|
|
367
387
|
that.bindFilteredAttributesAndAssociationsToList(that.detailedVocabularyList, "Attributes", "E", false);
|
|
368
388
|
}
|
|
369
389
|
}),
|
|
370
|
-
new
|
|
390
|
+
new SegButtonItem({
|
|
371
391
|
text: this.oBundle.getText("associations"),
|
|
372
392
|
width: "230px",
|
|
373
393
|
press: function () {
|
|
@@ -385,7 +405,7 @@ sap.ui.define([
|
|
|
385
405
|
},
|
|
386
406
|
|
|
387
407
|
bindFilteredTermsToList: function (oList, objectPath, searchText, requireSearch) {
|
|
388
|
-
var model = new
|
|
408
|
+
var model = new JSONModel(this.VocabularyTerms);
|
|
389
409
|
for (var entry in model.oData) {
|
|
390
410
|
if (model.oData[entry].type === "T") {
|
|
391
411
|
model.oData[entry].displayType = "Table";
|
|
@@ -410,13 +430,13 @@ sap.ui.define([
|
|
|
410
430
|
var that = this;
|
|
411
431
|
var datapath = "/";
|
|
412
432
|
if (!oList) {
|
|
413
|
-
oList = new
|
|
433
|
+
oList = new List({});
|
|
414
434
|
}
|
|
415
435
|
oList.setModel(model);
|
|
416
436
|
oList.bindItems({
|
|
417
437
|
path: datapath,
|
|
418
|
-
sorter: new
|
|
419
|
-
template: new
|
|
438
|
+
sorter: new Sorter("type"),
|
|
439
|
+
template: new DisplayListItem({
|
|
420
440
|
label: "{label}",
|
|
421
441
|
value: "{displayType}",
|
|
422
442
|
type: "Active",
|
|
@@ -441,18 +461,18 @@ sap.ui.define([
|
|
|
441
461
|
if (requireSearch) {
|
|
442
462
|
var filterArray = [];
|
|
443
463
|
var filterProperty = "label";
|
|
444
|
-
filterArray.push(new
|
|
464
|
+
filterArray.push(new Filter(filterProperty, FilterOperator.Contains, searchText));
|
|
445
465
|
oList.getBinding("items").filter(filterArray);
|
|
446
466
|
oList.getModel().refresh(true);
|
|
447
467
|
}
|
|
448
468
|
},
|
|
449
469
|
|
|
450
470
|
bindFilteredAttributesAndAssociationsToList: function (oList, objectPath, searchText, requireSearch) {
|
|
451
|
-
var model = new
|
|
471
|
+
var model = new JSONModel(this.VocabularyTerms);
|
|
452
472
|
var that = this;
|
|
453
473
|
var datapath = "/";
|
|
454
474
|
if (!oList) {
|
|
455
|
-
oList = new
|
|
475
|
+
oList = new List({});
|
|
456
476
|
}
|
|
457
477
|
if(model && model.oData){
|
|
458
478
|
for (var entry in model.oData) {
|
|
@@ -469,8 +489,8 @@ sap.ui.define([
|
|
|
469
489
|
oList.setModel(model);
|
|
470
490
|
oList.bindItems({
|
|
471
491
|
path: datapath,
|
|
472
|
-
sorter: new
|
|
473
|
-
template: new
|
|
492
|
+
sorter: new Sorter("label"),
|
|
493
|
+
template: new DisplayListItem({
|
|
474
494
|
label: "{label}",
|
|
475
495
|
value: "{displayType}",
|
|
476
496
|
type: "Active",
|
|
@@ -486,14 +506,14 @@ sap.ui.define([
|
|
|
486
506
|
|
|
487
507
|
if (requireSearch) {
|
|
488
508
|
if(objectPath === "AO") {
|
|
489
|
-
oList.getBinding("items").filter(new
|
|
509
|
+
oList.getBinding("items").filter(new Filter({
|
|
490
510
|
filters: [
|
|
491
511
|
this.getSearchFiltersAttributesAssociation(searchText,objectPath)
|
|
492
512
|
],
|
|
493
513
|
and: true
|
|
494
514
|
}));
|
|
495
515
|
} else {
|
|
496
|
-
oList.getBinding("items").filter(new
|
|
516
|
+
oList.getBinding("items").filter(new Filter({
|
|
497
517
|
filters: [
|
|
498
518
|
this.getSearchFiltersReference(searchText),
|
|
499
519
|
this.getSearchFiltersAttributesAssociation(searchText,objectPath)
|
|
@@ -505,12 +525,12 @@ sap.ui.define([
|
|
|
505
525
|
var filterArray = [];
|
|
506
526
|
var filterProperty = "type";
|
|
507
527
|
if (searchText === "E") {
|
|
508
|
-
filterArray.push(new
|
|
509
|
-
filterArray.push(new
|
|
528
|
+
filterArray.push(new Filter(filterProperty, FilterOperator.Contains, searchText));
|
|
529
|
+
filterArray.push(new Filter(filterProperty, FilterOperator.Contains, "R"));
|
|
510
530
|
} else {
|
|
511
|
-
filterArray.push(new
|
|
531
|
+
filterArray.push(new Filter(filterProperty, FilterOperator.Contains, searchText));
|
|
512
532
|
}
|
|
513
|
-
oList.getBinding("items").filter(new
|
|
533
|
+
oList.getBinding("items").filter(new Filter({
|
|
514
534
|
filters: filterArray,
|
|
515
535
|
and: false
|
|
516
536
|
}));
|
|
@@ -519,20 +539,20 @@ sap.ui.define([
|
|
|
519
539
|
},
|
|
520
540
|
|
|
521
541
|
getSearchFiltersReference: function(searchText) {
|
|
522
|
-
return new
|
|
542
|
+
return new Filter({
|
|
523
543
|
filters: [
|
|
524
|
-
new
|
|
525
|
-
new
|
|
544
|
+
new Filter("type", FilterOperator.Contains, "R"),
|
|
545
|
+
new Filter("label", FilterOperator.Contains, searchText)
|
|
526
546
|
],
|
|
527
547
|
and: true,
|
|
528
548
|
});
|
|
529
549
|
},
|
|
530
550
|
|
|
531
551
|
getSearchFiltersAttributesAssociation: function(searchText,type) {
|
|
532
|
-
return new
|
|
552
|
+
return new Filter({
|
|
533
553
|
filters: [
|
|
534
|
-
new
|
|
535
|
-
new
|
|
554
|
+
new Filter("type", FilterOperator.Contains, type),
|
|
555
|
+
new Filter("label", FilterOperator.Contains, searchText)
|
|
536
556
|
],
|
|
537
557
|
and: true,
|
|
538
558
|
});
|
|
@@ -540,18 +560,18 @@ sap.ui.define([
|
|
|
540
560
|
|
|
541
561
|
getDataObjectFilter: function () {
|
|
542
562
|
if (this.AttributeSegmentSelected) {
|
|
543
|
-
return new
|
|
563
|
+
return new Filter("DataObjectId", FilterOperator.Contains, this.dataObjectId)
|
|
544
564
|
}
|
|
545
565
|
if (this.AssociationSegmentSelected) {
|
|
546
|
-
return new
|
|
566
|
+
return new Filter("SourceDataObjectId", FilterOperator.Contains, this.dataObjectId)
|
|
547
567
|
}
|
|
548
568
|
},
|
|
549
569
|
|
|
550
570
|
getSearchFilters: function (searchText) {
|
|
551
|
-
return new
|
|
571
|
+
return new Filter({
|
|
552
572
|
filters: [
|
|
553
|
-
new
|
|
554
|
-
new
|
|
573
|
+
new Filter("name", FilterOperator.Contains, searchText),
|
|
574
|
+
new Filter("label", FilterOperator.Contains, searchText)
|
|
555
575
|
],
|
|
556
576
|
and: false
|
|
557
577
|
});
|
|
@@ -559,7 +579,7 @@ sap.ui.define([
|
|
|
559
579
|
|
|
560
580
|
getSearchField: function (placeHolderText) {
|
|
561
581
|
var that = this;
|
|
562
|
-
this.searchField = new
|
|
582
|
+
this.searchField = new SearchField({
|
|
563
583
|
showSearchButton: false,
|
|
564
584
|
width: "462px",
|
|
565
585
|
placeholder: placeHolderText, //searchType,
|
|
@@ -600,16 +620,16 @@ sap.ui.define([
|
|
|
600
620
|
},
|
|
601
621
|
|
|
602
622
|
initializeVocabularyList: function (vocabularyData) {
|
|
603
|
-
var model = new
|
|
623
|
+
var model = new JSONModel(vocabularyData);
|
|
604
624
|
var datapath = "/";
|
|
605
|
-
var vocabularylist = new
|
|
625
|
+
var vocabularylist = new List({
|
|
606
626
|
headerText: this.oBundle.getText("vocabulary")
|
|
607
627
|
});
|
|
608
628
|
vocabularylist.setModel(model);
|
|
609
629
|
vocabularylist.bindItems({
|
|
610
630
|
path: datapath,
|
|
611
|
-
sorter: new
|
|
612
|
-
template: new
|
|
631
|
+
sorter: new Sorter("label"),
|
|
632
|
+
template: new DisplayListItem({
|
|
613
633
|
label: "{label}",
|
|
614
634
|
value: "{type}",
|
|
615
635
|
type: "Active",
|