@sapui5/sap.rules.ui 1.107.0 → 1.108.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.
Files changed (70) hide show
  1. package/package.json +1 -1
  2. package/src/sap/rules/ui/.library +1 -1
  3. package/src/sap/rules/ui/AstExpressionBasic.js +27 -6
  4. package/src/sap/rules/ui/AstExpressionBasicRenderer.js +71 -55
  5. package/src/sap/rules/ui/AutoCompleteSuggestionContent.js +5 -3
  6. package/src/sap/rules/ui/AutoCompleteSuggestionContentRenderer.js +39 -40
  7. package/src/sap/rules/ui/BindingSpy.js +1 -1
  8. package/src/sap/rules/ui/DecisionTable.js +2157 -2154
  9. package/src/sap/rules/ui/DecisionTableCell.js +7 -4
  10. package/src/sap/rules/ui/DecisionTableCellAstExpressionBasic.js +7 -4
  11. package/src/sap/rules/ui/DecisionTableCellAstExpressionBasicRenderer.js +5 -3
  12. package/src/sap/rules/ui/DecisionTableCellExpressionAdvanced.js +238 -236
  13. package/src/sap/rules/ui/DecisionTableCellExpressionAdvancedRenderer.js +6 -4
  14. package/src/sap/rules/ui/DecisionTableCellExpressionBasic.js +7 -4
  15. package/src/sap/rules/ui/DecisionTableCellExpressionBasicRenderer.js +6 -4
  16. package/src/sap/rules/ui/DecisionTableCellRenderer.js +10 -10
  17. package/src/sap/rules/ui/DecisionTableConfiguration.js +1 -1
  18. package/src/sap/rules/ui/DecisionTableRenderer.js +163 -161
  19. package/src/sap/rules/ui/DecisionTableSettings.js +6 -4
  20. package/src/sap/rules/ui/DecisionTableSettingsOld.js +963 -961
  21. package/src/sap/rules/ui/DecisionTableSettingsOldRenderer.js +9 -10
  22. package/src/sap/rules/ui/DecisionTableSettingsRenderer.js +9 -10
  23. package/src/sap/rules/ui/ExpressionAdvanced.js +1726 -1724
  24. package/src/sap/rules/ui/ExpressionAdvancedRenderer.js +8 -8
  25. package/src/sap/rules/ui/ExpressionBase.js +1 -1
  26. package/src/sap/rules/ui/ExpressionBasic.js +7 -4
  27. package/src/sap/rules/ui/ExpressionBasicRenderer.js +8 -7
  28. package/src/sap/rules/ui/InstructionRenderer.js +73 -33
  29. package/src/sap/rules/ui/RuleBase.js +1 -1
  30. package/src/sap/rules/ui/RuleBuilder.js +433 -430
  31. package/src/sap/rules/ui/RuleBuilderRenderer.js +8 -9
  32. package/src/sap/rules/ui/TextRule.js +7 -4
  33. package/src/sap/rules/ui/TextRuleConfiguration.js +1 -1
  34. package/src/sap/rules/ui/TextRuleRenderer.js +45 -44
  35. package/src/sap/rules/ui/TextRuleSettings.js +6 -4
  36. package/src/sap/rules/ui/TextRuleSettingsRenderer.js +9 -9
  37. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanel.js +4 -3
  38. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAdvancedFunctionPanelRenderer.js +10 -11
  39. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanel.js +100 -98
  40. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionAggregateFunctionPanelRenderer.js +9 -10
  41. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanel.js +4 -3
  42. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionArrayOperatorPanelRenderer.js +10 -10
  43. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanel.js +109 -107
  44. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionComparisionOperatorPanelRenderer.js +39 -40
  45. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanel.js +5 -3
  46. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionDateAndTimePanelRenderer.js +10 -10
  47. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanel.js +840 -838
  48. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFixedValuePanelRenderer.js +40 -40
  49. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanel.js +4 -3
  50. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionFunctionalOperatorPanelRenderer.js +10 -11
  51. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanel.js +112 -110
  52. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLogicalOperatorPanelRenderer.js +39 -40
  53. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanel.js +100 -98
  54. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionLoopFunctionPanelRenderer.js +9 -10
  55. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanel.js +122 -119
  56. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMathematicalOperatorPanelRenderer.js +39 -40
  57. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanel.js +5 -2
  58. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionMiscellaneousOperatorPanelRenderer.js +10 -11
  59. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanel.js +4 -3
  60. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionOperationsPanelRenderer.js +10 -11
  61. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanel.js +4 -3
  62. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionRangeOperatorPanelRenderer.js +10 -11
  63. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanel.js +108 -106
  64. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionSelectFunctionPanelRenderer.js +40 -40
  65. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanel.js +254 -252
  66. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionTimeAndDurationFunctionPanelRenderer.js +40 -40
  67. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanel.js +631 -629
  68. package/src/sap/rules/ui/ast/autoCompleteContent/AutoSuggestionVocabularyPanelRenderer.js +40 -40
  69. package/src/sap/rules/ui/library.js +31 -10
  70. package/src/sap/rules/ui/type/ExpressionAbs.js +1 -1
@@ -1,253 +1,255 @@
1
- sap.ui.define([
2
- "sap/ui/thirdparty/jquery",
3
- "../../library",
4
- "sap/ui/core/Control",
5
- "sap/m/List",
6
- "sap/ui/model/json/JSONModel",
7
- "sap/m/ListMode",
8
- "sap/ui/core/CustomData",
9
- "sap/ui/model/Sorter",
10
- "sap/rules/ui/parser/infrastructure/util/utilsBase"
11
- ], function (jQuery, library, Control, ResponsivePopover, List, JSONModel, ListMode, CustomData, Sorter, infraUtils) {
12
- "use strict";
13
-
14
- var autoSuggestionTimeAndDurationFunctionPanel = Control.extend(
15
- "sap.rules.ui.ast.autoCompleteContent.AutoSuggestionTimeAndDurationFunctionPanel", {
16
- metadata: {
17
- library: "sap.rules.ui",
18
- properties: {
19
- reference: {
20
- type: "object",
21
- defaultValue: null,
22
- },
23
- dialogOpenedCallbackReference: {
24
- type: "object",
25
- defaultValue: null,
26
- },
27
- data: {
28
- type: "object",
29
- defaultValue: null
30
- },
31
- expand: {
32
- type: "boolean",
33
- defaultValue: false
34
- }
35
- },
36
- aggregations: {
37
- PanelLayout: {
38
- type: "sap.m.Panel",
39
- multiple: false
40
- }
41
- },
42
- events: {}
43
- },
44
-
45
- init: function () {
46
- this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
47
- this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
48
- this.needCreateLayout = true;
49
- this.AttributeSegmentSelected = true;
50
- this.dataObjectName = "";
51
- },
52
- onBeforeRendering: function () {
53
- this._reference = this.getReference();
54
- this._dialogOpenedCallbackReference = this.getDialogOpenedCallbackReference();
55
- if (this.needCreateLayout) {
56
- var layout = this._createLayout();
57
- this.setAggregation("PanelLayout", layout, true);
58
- this.needCreateLayout = false;
59
- }
60
- },
61
-
62
- initializeVariables: function () {
63
-
64
- },
65
-
66
- _createLayout: function () {
67
- var that = this;
68
- this.vocabularyData = this.getData();
69
- // create a Model with this data
70
- var model = new sap.ui.model.json.JSONModel();
71
-
72
- // create a list
73
- this.timeAndDurationFunctionlist = new sap.m.List({
74
- growingScrollToLoad: true,
75
- enableBusyIndicator: true,
76
- });
77
-
78
- /*Setting growing shows the growing trigger button with text as 2/14 which we do not need
79
- Hence, setting to top 5 and the rest will be shown in More link */
80
- var topFiveVocabularyData = [];
81
- for (var termCount = 0; termCount < 5 && termCount < this.vocabularyData.length; termCount++) {
82
- topFiveVocabularyData.push(this.vocabularyData[termCount]);
83
- }
84
- model.setData(topFiveVocabularyData);
85
-
86
- // bind the List items to the data collection
87
- this.timeAndDurationFunctionlist.bindItems({
88
- path: "/",
89
- sorter: new sap.ui.model.Sorter("name"),
90
- rememberSelections: false,
91
- mode: ListMode.SingleSelectMaster,
92
- template: new sap.m.DisplayListItem({
93
- label: "{name}",
94
- value: "{label}",
95
- type: "Active",
96
- press: function (oEvent) {
97
- that._reference(oEvent);
98
- }
99
- })
100
- });
101
-
102
- // set the model to the List, so it knows which data to use
103
- this.timeAndDurationFunctionlist.setModel(model);
104
- var moreTimeAndDurationLink = this.getMoreTimeAndDurationLink();
105
- var that = this;
106
-
107
- // add list to the panel
108
- var timeAndDurationFunctionslistPanel = new sap.m.Panel({
109
- headerText: this.oBundle.getText("timeAndDurationFunctionsPanelTitle"),
110
- expandable: true,
111
- expanded: this.getExpand(),
112
- content: this.timeAndDurationFunctionlist,
113
- width: "auto"
114
- });
115
-
116
- if (this.vocabularyData.length >= 5) {
117
- timeAndDurationFunctionslistPanel.addContent(moreTimeAndDurationLink);
118
- }
119
-
120
- return timeAndDurationFunctionslistPanel;
121
- },
122
-
123
- getMoreTimeAndDurationLink: function () {
124
- var that = this;
125
- var suggestionsData = this.getData();
126
- var moreTimeAndDurationLink = new sap.m.Link({
127
- text: this.oBundle.getText("more_link"),
128
- tooltip: this.oBundle.getText("more_link_tooltip"),
129
- enabled: true,
130
- press: function (oEvent) {
131
- that._setModal(true);
132
- that._dialogOpenedCallbackReference(true);
133
- if (that.vocabularyData) {
134
- that.getTimeAndDurationDialog();
135
- }
136
- }
137
- });
138
- return moreTimeAndDurationLink;
139
-
140
- },
141
-
142
- _setModal: function (value) {
143
- var pop = sap.ui.getCore().byId("popover");
144
- if (pop) {
145
- pop.setModal(value);
146
- }
147
- },
148
-
149
- getTimeAndDurationDialog: function () {
150
- var that = this;
151
- var searchFieldText = this.oBundle.getText("searchTextTimeAndDuration");
152
- var searchField = this.getSearchField(searchFieldText);
153
- this.detailedTimeAndDurationList = this.initializeTimeAndDurationList(this.vocabularyData);
154
- this.bindFilteredTermsToList(this.detailedTimeAndDurationList, "", false);
155
- var verticalLayoutForTimeAndDurationFunction = new sap.ui.layout.VerticalLayout({
156
- content: [searchField, that.detailedTimeAndDurationList]
157
- }).addStyleClass("sapAstVocabularyPanel");
158
-
159
- this.timeAndDurationDialog = new sap.m.Dialog({
160
- title: this.oBundle.getText("selectTimeAndDurationTitle"),
161
- contentWidth: "500px",
162
- contentHeight: "500px",
163
- showHeader: true,
164
- content: [verticalLayoutForTimeAndDurationFunction],
165
- afterClose: function () {
166
- that._dialogOpenedCallbackReference(false);
167
- },
168
- buttons: [
169
- new sap.m.Button({
170
- text: this.oBundle.getText("cancelBtn"),
171
- tooltip: this.oBundle.getText("cancelBtn"),
172
- press: function (event) {
173
- that._setModal(false);
174
- that.timeAndDurationDialog.close();
175
- }
176
- })
177
- ]
178
- });
179
- that.timeAndDurationDialog.open();
180
-
181
- },
182
-
183
- bindFilteredTermsToList: function (oList, searchText, requireSearch) {
184
- var model = new sap.ui.model.json.JSONModel(this.vocabularyData);
185
-
186
- var that = this;
187
- var datapath = "/";
188
- if (!oList) {
189
- oList = new sap.m.List({});
190
- }
191
- oList.setModel(model);
192
- oList.bindItems({
193
- path: datapath,
194
- template: new sap.m.DisplayListItem({
195
- label: "{name}",
196
- value: "{label}",
197
- type: "Active",
198
- press: function (oEvent) {
199
- that._setModal(false);
200
- if (that.timeAndDurationDialog.isOpen()) {
201
- that.timeAndDurationDialog.close();
202
- }
203
- that._reference(oEvent);
204
- }
205
- }),
206
- rememberSelections: false,
207
- mode: ListMode.SingleSelectMaster
208
- });
209
- if (requireSearch) {
210
- var filterArray = [];
211
- var filterProperty = "name";
212
- filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains, searchText));
213
- oList.getBinding("items").filter(filterArray);
214
- oList.getModel().refresh(true);
215
- }
216
- },
217
-
218
- initializeTimeAndDurationList: function (vocabularyData) {
219
- var model = new sap.ui.model.json.JSONModel(vocabularyData);
220
- var datapath = "/";
221
- var timeAndDurationlist = new sap.m.List({
222
- headerText: this.oBundle.getText("timeAndDuration")
223
- });
224
- timeAndDurationlist.setModel(model);
225
- timeAndDurationlist.bindItems({
226
- path: datapath,
227
- template: new sap.m.DisplayListItem({
228
- label: "{name}",
229
- value: "{label}",
230
- type: "Active",
231
- })
232
-
233
- });
234
- return timeAndDurationlist;
235
- },
236
-
237
- getSearchField: function (placeHolderText) {
238
- var that = this;
239
- this.searchField = new sap.m.SearchField({
240
- showSearchButton: false,
241
- width: "462px",
242
- placeholder: placeHolderText, //searchType,
243
- liveChange: function (oEvent) {
244
- that.bindFilteredTermsToList(that.detailedTimeAndDurationList, oEvent.getParameter("newValue"), true);
245
- }
246
- })
247
- return this.searchField;
248
- }
249
-
250
- });
251
-
252
- return autoSuggestionTimeAndDurationFunctionPanel;
1
+ sap.ui.define([
2
+ "sap/ui/thirdparty/jquery",
3
+ "../../library",
4
+ "sap/ui/core/Control",
5
+ "sap/m/List",
6
+ "sap/ui/model/json/JSONModel",
7
+ "sap/m/ListMode",
8
+ "sap/ui/core/CustomData",
9
+ "sap/ui/model/Sorter",
10
+ "sap/rules/ui/parser/infrastructure/util/utilsBase",
11
+ "./AutoSuggestionTimeAndDurationFunctionPanelRenderer"
12
+ ], function (jQuery, library, Control, List, JSONModel, ListMode, CustomData, Sorter, infraUtils, AutoSuggestionTimeAndDurationFunctionPanelRenderer) {
13
+ "use strict";
14
+
15
+ var autoSuggestionTimeAndDurationFunctionPanel = Control.extend(
16
+ "sap.rules.ui.ast.autoCompleteContent.AutoSuggestionTimeAndDurationFunctionPanel", {
17
+ metadata: {
18
+ library: "sap.rules.ui",
19
+ properties: {
20
+ reference: {
21
+ type: "object",
22
+ defaultValue: null,
23
+ },
24
+ dialogOpenedCallbackReference: {
25
+ type: "object",
26
+ defaultValue: null,
27
+ },
28
+ data: {
29
+ type: "object",
30
+ defaultValue: null
31
+ },
32
+ expand: {
33
+ type: "boolean",
34
+ defaultValue: false
35
+ }
36
+ },
37
+ aggregations: {
38
+ PanelLayout: {
39
+ type: "sap.m.Panel",
40
+ multiple: false
41
+ }
42
+ },
43
+ events: {}
44
+ },
45
+
46
+ init: function () {
47
+ this.oBundle = sap.ui.getCore().getLibraryResourceBundle("sap.rules.ui.i18n");
48
+ this.infraUtils = new sap.rules.ui.parser.infrastructure.util.utilsBase.utilsBaseLib();
49
+ this.needCreateLayout = true;
50
+ this.AttributeSegmentSelected = true;
51
+ this.dataObjectName = "";
52
+ },
53
+ onBeforeRendering: function () {
54
+ this._reference = this.getReference();
55
+ this._dialogOpenedCallbackReference = this.getDialogOpenedCallbackReference();
56
+ if (this.needCreateLayout) {
57
+ var layout = this._createLayout();
58
+ this.setAggregation("PanelLayout", layout, true);
59
+ this.needCreateLayout = false;
60
+ }
61
+ },
62
+
63
+ initializeVariables: function () {
64
+
65
+ },
66
+
67
+ _createLayout: function () {
68
+ var that = this;
69
+ this.vocabularyData = this.getData();
70
+ // create a Model with this data
71
+ var model = new sap.ui.model.json.JSONModel();
72
+
73
+ // create a list
74
+ this.timeAndDurationFunctionlist = new sap.m.List({
75
+ growingScrollToLoad: true,
76
+ enableBusyIndicator: true,
77
+ });
78
+
79
+ /*Setting growing shows the growing trigger button with text as 2/14 which we do not need
80
+ Hence, setting to top 5 and the rest will be shown in More link */
81
+ var topFiveVocabularyData = [];
82
+ for (var termCount = 0; termCount < 5 && termCount < this.vocabularyData.length; termCount++) {
83
+ topFiveVocabularyData.push(this.vocabularyData[termCount]);
84
+ }
85
+ model.setData(topFiveVocabularyData);
86
+
87
+ // bind the List items to the data collection
88
+ this.timeAndDurationFunctionlist.bindItems({
89
+ path: "/",
90
+ sorter: new sap.ui.model.Sorter("name"),
91
+ rememberSelections: false,
92
+ mode: ListMode.SingleSelectMaster,
93
+ template: new sap.m.DisplayListItem({
94
+ label: "{name}",
95
+ value: "{label}",
96
+ type: "Active",
97
+ press: function (oEvent) {
98
+ that._reference(oEvent);
99
+ }
100
+ })
101
+ });
102
+
103
+ // set the model to the List, so it knows which data to use
104
+ this.timeAndDurationFunctionlist.setModel(model);
105
+ var moreTimeAndDurationLink = this.getMoreTimeAndDurationLink();
106
+ var that = this;
107
+
108
+ // add list to the panel
109
+ var timeAndDurationFunctionslistPanel = new sap.m.Panel({
110
+ headerText: this.oBundle.getText("timeAndDurationFunctionsPanelTitle"),
111
+ expandable: true,
112
+ expanded: this.getExpand(),
113
+ content: this.timeAndDurationFunctionlist,
114
+ width: "auto"
115
+ });
116
+
117
+ if (this.vocabularyData.length >= 5) {
118
+ timeAndDurationFunctionslistPanel.addContent(moreTimeAndDurationLink);
119
+ }
120
+
121
+ return timeAndDurationFunctionslistPanel;
122
+ },
123
+
124
+ getMoreTimeAndDurationLink: function () {
125
+ var that = this;
126
+ var suggestionsData = this.getData();
127
+ var moreTimeAndDurationLink = new sap.m.Link({
128
+ text: this.oBundle.getText("more_link"),
129
+ tooltip: this.oBundle.getText("more_link_tooltip"),
130
+ enabled: true,
131
+ press: function (oEvent) {
132
+ that._setModal(true);
133
+ that._dialogOpenedCallbackReference(true);
134
+ if (that.vocabularyData) {
135
+ that.getTimeAndDurationDialog();
136
+ }
137
+ }
138
+ });
139
+ return moreTimeAndDurationLink;
140
+
141
+ },
142
+
143
+ _setModal: function (value) {
144
+ var pop = sap.ui.getCore().byId("popover");
145
+ if (pop) {
146
+ pop.setModal(value);
147
+ }
148
+ },
149
+
150
+ getTimeAndDurationDialog: function () {
151
+ var that = this;
152
+ var searchFieldText = this.oBundle.getText("searchTextTimeAndDuration");
153
+ var searchField = this.getSearchField(searchFieldText);
154
+ this.detailedTimeAndDurationList = this.initializeTimeAndDurationList(this.vocabularyData);
155
+ this.bindFilteredTermsToList(this.detailedTimeAndDurationList, "", false);
156
+ var verticalLayoutForTimeAndDurationFunction = new sap.ui.layout.VerticalLayout({
157
+ content: [searchField, that.detailedTimeAndDurationList]
158
+ }).addStyleClass("sapAstVocabularyPanel");
159
+
160
+ this.timeAndDurationDialog = new sap.m.Dialog({
161
+ title: this.oBundle.getText("selectTimeAndDurationTitle"),
162
+ contentWidth: "500px",
163
+ contentHeight: "500px",
164
+ showHeader: true,
165
+ content: [verticalLayoutForTimeAndDurationFunction],
166
+ afterClose: function () {
167
+ that._dialogOpenedCallbackReference(false);
168
+ },
169
+ buttons: [
170
+ new sap.m.Button({
171
+ text: this.oBundle.getText("cancelBtn"),
172
+ tooltip: this.oBundle.getText("cancelBtn"),
173
+ press: function (event) {
174
+ that._setModal(false);
175
+ that.timeAndDurationDialog.close();
176
+ }
177
+ })
178
+ ]
179
+ });
180
+ that.timeAndDurationDialog.open();
181
+
182
+ },
183
+
184
+ bindFilteredTermsToList: function (oList, searchText, requireSearch) {
185
+ var model = new sap.ui.model.json.JSONModel(this.vocabularyData);
186
+
187
+ var that = this;
188
+ var datapath = "/";
189
+ if (!oList) {
190
+ oList = new sap.m.List({});
191
+ }
192
+ oList.setModel(model);
193
+ oList.bindItems({
194
+ path: datapath,
195
+ template: new sap.m.DisplayListItem({
196
+ label: "{name}",
197
+ value: "{label}",
198
+ type: "Active",
199
+ press: function (oEvent) {
200
+ that._setModal(false);
201
+ if (that.timeAndDurationDialog.isOpen()) {
202
+ that.timeAndDurationDialog.close();
203
+ }
204
+ that._reference(oEvent);
205
+ }
206
+ }),
207
+ rememberSelections: false,
208
+ mode: ListMode.SingleSelectMaster
209
+ });
210
+ if (requireSearch) {
211
+ var filterArray = [];
212
+ var filterProperty = "name";
213
+ filterArray.push(new sap.ui.model.Filter(filterProperty, sap.ui.model.FilterOperator.Contains, searchText));
214
+ oList.getBinding("items").filter(filterArray);
215
+ oList.getModel().refresh(true);
216
+ }
217
+ },
218
+
219
+ initializeTimeAndDurationList: function (vocabularyData) {
220
+ var model = new sap.ui.model.json.JSONModel(vocabularyData);
221
+ var datapath = "/";
222
+ var timeAndDurationlist = new sap.m.List({
223
+ headerText: this.oBundle.getText("timeAndDuration")
224
+ });
225
+ timeAndDurationlist.setModel(model);
226
+ timeAndDurationlist.bindItems({
227
+ path: datapath,
228
+ template: new sap.m.DisplayListItem({
229
+ label: "{name}",
230
+ value: "{label}",
231
+ type: "Active",
232
+ })
233
+
234
+ });
235
+ return timeAndDurationlist;
236
+ },
237
+
238
+ getSearchField: function (placeHolderText) {
239
+ var that = this;
240
+ this.searchField = new sap.m.SearchField({
241
+ showSearchButton: false,
242
+ width: "462px",
243
+ placeholder: placeHolderText, //searchType,
244
+ liveChange: function (oEvent) {
245
+ that.bindFilteredTermsToList(that.detailedTimeAndDurationList, oEvent.getParameter("newValue"), true);
246
+ }
247
+ })
248
+ return this.searchField;
249
+ },
250
+ renderer: AutoSuggestionTimeAndDurationFunctionPanelRenderer
251
+
252
+ });
253
+
254
+ return autoSuggestionTimeAndDurationFunctionPanel;
253
255
  }, /* bExport= */ true);
@@ -1,44 +1,44 @@
1
- /*!
1
+ /*!
2
2
  * SAP UI development toolkit for HTML5 (SAPUI5)
3
3
 
4
4
  (c) Copyright 2009-2016 SAP SE. All rights reserved
5
-
6
- */
7
-
8
- sap.ui.define(['jquery.sap.global'],
9
-
10
- function (jQuery) {
11
- "use strict";
12
-
13
- /**
14
- * autoSuggestionTimeAndDurationFunctionPanelRenderer renderer.
15
- * @namespace
16
- */
17
- var autoSuggestionTimeAndDurationFunctionPanelRenderer = {};
18
-
19
- /**
20
- * Renders the HTML for the given control, using the provided
21
- * {@link sap.ui.core.RenderManager}.
22
- *
23
- * @param {sap.ui.core.RenderManager} oRm
24
- * the RenderManager that can be used for writing to
25
- * the Render-Output-Buffer
26
- * @param {sap.ui.core.Control} oControl
27
- * the control to be rendered
28
- */
29
- autoSuggestionTimeAndDurationFunctionPanelRenderer.render = function (oRm, oControl) {
30
-
31
- oRm.write("<div");
32
- oRm.writeControlData(oControl);
33
- oRm.addClass("sapAstAdvancedFunctionPanel");
34
- oRm.writeClasses();
35
- oRm.write(">");
36
- var autoSuggestionTimeAndDurationFunctionPanelRenderer = oControl.getAggregation("PanelLayout");
37
- oRm.renderControl(autoSuggestionTimeAndDurationFunctionPanelRenderer);
38
- oRm.write("</div>");
39
-
40
- };
41
-
42
- return autoSuggestionTimeAndDurationFunctionPanelRenderer;
43
-
5
+
6
+ */
7
+
8
+ sap.ui.define([],
9
+
10
+ function () {
11
+ "use strict";
12
+
13
+ /**
14
+ * autoSuggestionTimeAndDurationFunctionPanelRenderer renderer.
15
+ * @namespace
16
+ */
17
+ var autoSuggestionTimeAndDurationFunctionPanelRenderer = {
18
+ apiVersion: 2
19
+ };
20
+
21
+ /**
22
+ * Renders the HTML for the given control, using the provided
23
+ * {@link sap.ui.core.RenderManager}.
24
+ *
25
+ * @param {sap.ui.core.RenderManager} oRm
26
+ * the RenderManager that can be used for writing to
27
+ * the Render-Output-Buffer
28
+ * @param {sap.ui.core.Control} oControl
29
+ * the control to be rendered
30
+ */
31
+ autoSuggestionTimeAndDurationFunctionPanelRenderer.render = function (oRm, oControl) {
32
+
33
+ oRm.openStart("div", oControl);
34
+ oRm.class("sapAstAdvancedFunctionPanel");
35
+ oRm.openEnd();
36
+ var autoSuggestionTimeAndDurationFunctionPanelRenderer = oControl.getAggregation("PanelLayout");
37
+ oRm.renderControl(autoSuggestionTimeAndDurationFunctionPanelRenderer);
38
+ oRm.close("div");
39
+
40
+ };
41
+
42
+ return autoSuggestionTimeAndDurationFunctionPanelRenderer;
43
+
44
44
  }, /* bExport= */ true);