@sapui5/sap.fe.navigation 1.102.2 → 1.104.1

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.
@@ -3,345 +3,350 @@
3
3
  (c) Copyright 2009-2021 SAP SE. All rights reserved
4
4
 
5
5
  */
6
- sap.ui.define(["./NavError", "sap/ui/base/Object", "sap/base/util/extend", "sap/base/util/each", "sap/base/Log"], function(
7
- NavError,
8
- BaseObject,
9
- extend,
10
- each,
11
- Log
12
- ) {
13
- "use strict";
14
-
15
- /**
16
- * @class
17
- * This is the successor of {@link sap.ui.generic.app.navigation.service.PresentationVariant}.<br>
18
- * Creates a new instance of a PresentationVariant class. If no parameter is passed,
19
- * an new empty instance is created whose ID has been set to <code>""</code>.
20
- * Passing a JSON-serialized string complying to the Selection Variant Specification will parse it,
21
- * and the newly created instance will contain the same information.
22
- * @extends sap.ui.base.Object
23
- * @class
24
- * @public
25
- * @since 1.83.0
26
- * @alias sap.fe.navigation.PresentationVariant
27
- * @param {string|object} [vPresentationVariant] If of type <code>string</code>, the selection variant is JSON-formatted;
28
- * if of type <code>object</code>, the object represents a selection variant
29
- * @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
30
- * <table>
31
- * <tr><th>NavError code</th><th>Description</th></tr>
32
- * <tr><td>PresentationVariant.INVALID_INPUT_TYPE</td><td>Indicates that the data format of the selection variant provided is inconsistent</td></tr>
33
- * <tr><td>PresentationVariant.UNABLE_TO_PARSE_INPUT</td><td>Indicates that the provided string is not a JSON-formatted string</td></tr>
34
- * <tr><td>PresentationVariant.INPUT_DOES_NOT_CONTAIN_SELECTIONVARIANT_ID</td><td>Indicates that the PresentationVariantID cannot be retrieved</td></tr>
35
- * <tr><td>PresentationVariant.PARAMETER_WITHOUT_VALUE</td><td>Indicates that there was an attempt to specify a parameter, but without providing any value (not even an empty value)</td></tr>
36
- * <tr><td>PresentationVariant.SELECT_OPTION_WITHOUT_PROPERTY_NAME</td><td>Indicates that a selection option has been defined, but the Ranges definition is missing</td></tr>
37
- * <tr><td>PresentationVariant.SELECT_OPTION_RANGES_NOT_ARRAY</td><td>Indicates that the Ranges definition is not an array</td></tr>
38
- * </table>
39
- * These exceptions can only be thrown if the parameter <code>vPresentationVariant</code> has been provided.
40
- */
41
- var PresentationVariant = BaseObject.extend(
42
- "sap.fe.navigation.PresentationVariant",
43
- /** @lends sap.fe.navigation.PresentationVariant */ {
44
- constructor: function(vPresentationVariant) {
45
- this._sId = "";
46
-
47
- if (vPresentationVariant !== undefined) {
48
- if (typeof vPresentationVariant === "string") {
49
- this._parseFromString(vPresentationVariant);
50
- } else if (typeof vPresentationVariant === "object") {
51
- this._parseFromObject(vPresentationVariant);
52
- } else {
6
+ sap.ui.define(
7
+ ["./NavError", "sap/ui/base/Object", "sap/base/util/extend", "sap/base/util/each", "sap/base/Log"],
8
+ function (NavError, BaseObject, extend, each, Log) {
9
+ "use strict";
10
+
11
+ /**
12
+ * @class
13
+ * This is the successor of {@link sap.ui.generic.app.navigation.service.PresentationVariant}.<br>
14
+ * Creates a new instance of a PresentationVariant class. If no parameter is passed,
15
+ * an new empty instance is created whose ID has been set to <code>""</code>.
16
+ * Passing a JSON-serialized string complying to the Selection Variant Specification will parse it,
17
+ * and the newly created instance will contain the same information.
18
+ * @extends sap.ui.base.Object
19
+ * @class
20
+ * @public
21
+ * @since 1.83.0
22
+ * @name sap.fe.navigation.PresentationVariant
23
+ * @param {string|object} [vPresentationVariant] If of type <code>string</code>, the selection variant is JSON-formatted;
24
+ * if of type <code>object</code>, the object represents a selection variant
25
+ * @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
26
+ * <table>
27
+ * <tr><th>NavError code</th><th>Description</th></tr>
28
+ * <tr><td>PresentationVariant.INVALID_INPUT_TYPE</td><td>Indicates that the data format of the selection variant provided is inconsistent</td></tr>
29
+ * <tr><td>PresentationVariant.UNABLE_TO_PARSE_INPUT</td><td>Indicates that the provided string is not a JSON-formatted string</td></tr>
30
+ * <tr><td>PresentationVariant.INPUT_DOES_NOT_CONTAIN_SELECTIONVARIANT_ID</td><td>Indicates that the PresentationVariantID cannot be retrieved</td></tr>
31
+ * <tr><td>PresentationVariant.PARAMETER_WITHOUT_VALUE</td><td>Indicates that there was an attempt to specify a parameter, but without providing any value (not even an empty value)</td></tr>
32
+ * <tr><td>PresentationVariant.SELECT_OPTION_WITHOUT_PROPERTY_NAME</td><td>Indicates that a selection option has been defined, but the Ranges definition is missing</td></tr>
33
+ * <tr><td>PresentationVariant.SELECT_OPTION_RANGES_NOT_ARRAY</td><td>Indicates that the Ranges definition is not an array</td></tr>
34
+ * </table>
35
+ * These exceptions can only be thrown if the parameter <code>vPresentationVariant</code> has been provided.
36
+ */
37
+ return BaseObject.extend(
38
+ "sap.fe.navigation.PresentationVariant",
39
+ /** @lends sap.fe.navigation.PresentationVariant.prototype */ {
40
+ constructor: function (vPresentationVariant) {
41
+ this._sId = "";
42
+
43
+ if (vPresentationVariant !== undefined) {
44
+ if (typeof vPresentationVariant === "string") {
45
+ this._parseFromString(vPresentationVariant);
46
+ } else if (typeof vPresentationVariant === "object") {
47
+ this._parseFromObject(vPresentationVariant);
48
+ } else {
49
+ throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
50
+ }
51
+ }
52
+ },
53
+
54
+ /**
55
+ * Returns the identification of the selection variant.
56
+ *
57
+ * @returns {string} The identification of the selection variant as made available during construction
58
+ * @public
59
+ */
60
+ getID: function () {
61
+ return this._sId;
62
+ },
63
+
64
+ /**
65
+ * Sets the identification of the selection variant.
66
+ *
67
+ * @param {string} sId The new identification of the selection variant
68
+ * @public
69
+ */
70
+ setID: function (sId) {
71
+ this._sId = sId;
72
+ },
73
+
74
+ /**
75
+ * Sets the text / description of the selection variant.
76
+ *
77
+ * @param {string} sNewText The new description to be used
78
+ * @public
79
+ * @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
80
+ * <table>
81
+ * <tr><th>NavError code</th><th>Description</th></tr>
82
+ * <tr><td>PresentationVariant.INVALID_INPUT_TYPE</td><td>Indicates that an input parameter has an invalid type</td></tr>
83
+ * </table>
84
+ */
85
+ setText: function (sNewText) {
86
+ if (typeof sNewText !== "string") {
53
87
  throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
54
88
  }
55
- }
56
- },
57
-
58
- /**
59
- * Returns the identification of the selection variant.
60
- * @returns {string} The identification of the selection variant as made available during construction
61
- * @public
62
- */
63
- getID: function() {
64
- return this._sId;
65
- },
66
-
67
- /**
68
- * Sets the identification of the selection variant.
69
- * @param {string} sId The new identification of the selection variant
70
- * @public
71
- */
72
- setID: function(sId) {
73
- this._sId = sId;
74
- },
75
-
76
- /**
77
- * Sets the text / description of the selection variant.
78
- * @param {string} sNewText The new description to be used
79
- * @public
80
- * @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
81
- * <table>
82
- * <tr><th>NavError code</th><th>Description</th></tr>
83
- * <tr><td>PresentationVariant.INVALID_INPUT_TYPE</td><td>Indicates that an input parameter has an invalid type</td></tr>
84
- * </table>
85
- */
86
- setText: function(sNewText) {
87
- if (typeof sNewText !== "string") {
88
- throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
89
- }
90
- this._sText = sNewText;
91
- },
92
-
93
- /**
94
- * Returns the current text / description of this selection variant.
95
- * @returns {string} The current description of this selection variant.
96
- * @public
97
- */
98
- getText: function() {
99
- return this._sText;
100
- },
101
-
102
- /**
103
- * Sets the context URL.
104
- * @param {string} sURL The URL of the context
105
- * @public
106
- * @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
107
- * <table>
108
- * <tr><th>NavError code</th><th>Description</th></tr>
109
- * <tr><td>PresentationVariant.INVALID_INPUT_TYPE</td><td>Indicates that an input parameter has an invalid type</td></tr>
110
- * </table>
111
- */
112
- setContextUrl: function(sURL) {
113
- if (typeof sURL !== "string") {
114
- throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
115
- }
116
- this._sCtxUrl = sURL;
117
- },
118
-
119
- /**
120
- * Gets the current context URL intended for the query.
121
- * @returns {string} The current context URL for the query
122
- * @public
123
- */
124
- getContextUrl: function() {
125
- return this._sCtxUrl;
126
- },
127
-
128
- /**
129
- * Returns <code>true</code> if the presentation variant does not contain any properties.
130
- * nor ranges.
131
- * @returns {boolean} If set to <code>true</code> there are no current properties set; <code>false</code> otherwise.
132
- * @public
133
- */
134
- isEmpty: function() {
135
- return (
136
- Object.keys(this.getTableVisualization()).length === 0 &&
137
- Object.keys(this.getChartVisualization()).length === 0 &&
138
- Object.keys(this.getProperties()).length === 0
139
- );
140
- },
141
-
142
- /**
143
- * Sets the more trivial properties. Basically all properties with the exception of the Visualization.
144
- *
145
- * @param {map} mProperties The properties to be used.
146
- * @public
147
- */
148
- setProperties: function(mProperties) {
149
- this._mProperties = extend({}, mProperties);
150
- },
151
-
152
- /**
153
- * Gets the more trivial properties. Basically all properties with the exception of the Visualization.
154
- * @returns {map} The current properties.
155
- * @public
156
- */
157
- getProperties: function() {
158
- return this._mProperties;
159
- },
160
-
161
- /**
162
- * Sets the table visualization property.
163
- *
164
- * @param {map} mProperties An object containing the properties to be used for the table visualization.
165
- * @public
166
- */
167
- setTableVisualization: function(mProperties) {
168
- this._mVisTable = extend({}, mProperties);
169
- },
170
-
171
- /**
172
- * Gets the table visualization property.
173
- *
174
- * @returns {map} An object containing the properties to be used for the table visualization.
175
- * @public
176
- */
177
- getTableVisualization: function() {
178
- return this._mVisTable;
179
- },
180
-
181
- /**
182
- * Sets the chart visualization property.
183
- *
184
- * @param {map} mProperties An object containing the properties to be used for the chart visualization.
185
- * @public
186
- */
187
- setChartVisualization: function(mProperties) {
188
- this._mVisChart = extend({}, mProperties);
189
- },
190
-
191
- /**
192
- * Gets the chart visualization property.
193
- *
194
- * @returns {map} An object containing the properties to be used for the chart visualization.
195
- * @public
196
- */
197
- getChartVisualization: function() {
198
- return this._mVisChart;
199
- },
200
-
201
- /**
202
- * Returns the external representation of the selection variant as JSON object.
203
- * @returns {object} The external representation of this instance as a JSON object
204
- * @public
205
- */
206
- toJSONObject: function() {
207
- var oExternalPresentationVariant = {
208
- Version: {
209
- // Version attributes are not part of the official specification,
210
- Major: "1", // but could be helpful later for implementing a proper lifecycle/interoperability
211
- Minor: "0",
212
- Patch: "0"
213
- },
214
- PresentationVariantID: this._sId
215
- };
216
-
217
- if (this._sCtxUrl) {
218
- oExternalPresentationVariant.ContextUrl = this._sCtxUrl;
219
- }
220
-
221
- if (this._sText) {
222
- oExternalPresentationVariant.Text = this._sText;
223
- } else {
224
- oExternalPresentationVariant.Text = "Presentation Variant with ID " + this._sId;
225
- }
226
-
227
- this._serializeProperties(oExternalPresentationVariant);
228
- this._serializeVisualizations(oExternalPresentationVariant);
229
-
230
- return oExternalPresentationVariant;
231
- },
89
+ this._sText = sNewText;
90
+ },
91
+
92
+ /**
93
+ * Returns the current text / description of this selection variant.
94
+ *
95
+ * @returns {string} The current description of this selection variant.
96
+ * @public
97
+ */
98
+ getText: function () {
99
+ return this._sText;
100
+ },
101
+
102
+ /**
103
+ * Sets the context URL.
104
+ *
105
+ * @param {string} sURL The URL of the context
106
+ * @public
107
+ * @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
108
+ * <table>
109
+ * <tr><th>NavError code</th><th>Description</th></tr>
110
+ * <tr><td>PresentationVariant.INVALID_INPUT_TYPE</td><td>Indicates that an input parameter has an invalid type</td></tr>
111
+ * </table>
112
+ */
113
+ setContextUrl: function (sURL) {
114
+ if (typeof sURL !== "string") {
115
+ throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
116
+ }
117
+ this._sCtxUrl = sURL;
118
+ },
119
+
120
+ /**
121
+ * Gets the current context URL intended for the query.
122
+ *
123
+ * @returns {string} The current context URL for the query
124
+ * @public
125
+ */
126
+ getContextUrl: function () {
127
+ return this._sCtxUrl;
128
+ },
129
+
130
+ /**
131
+ * Returns <code>true</code> if the presentation variant does not contain any properties.
132
+ * nor ranges.
133
+ *
134
+ * @returns {boolean} If set to <code>true</code> there are no current properties set; <code>false</code> otherwise.
135
+ * @public
136
+ */
137
+ isEmpty: function () {
138
+ return (
139
+ Object.keys(this.getTableVisualization()).length === 0 &&
140
+ Object.keys(this.getChartVisualization()).length === 0 &&
141
+ Object.keys(this.getProperties()).length === 0
142
+ );
143
+ },
144
+
145
+ /**
146
+ * Sets the more trivial properties. Basically all properties with the exception of the Visualization.
147
+ *
148
+ * @param {any} mProperties The properties to be used.
149
+ * @public
150
+ */
151
+ setProperties: function (mProperties) {
152
+ this._mProperties = extend({}, mProperties);
153
+ },
154
+
155
+ /**
156
+ * Gets the more trivial properties. Basically all properties with the exception of the Visualization.
157
+ *
158
+ * @returns {any} The current properties.
159
+ * @public
160
+ */
161
+ getProperties: function () {
162
+ return this._mProperties;
163
+ },
164
+
165
+ /**
166
+ * Sets the table visualization property.
167
+ *
168
+ * @param {any} mProperties An object containing the properties to be used for the table visualization.
169
+ * @public
170
+ */
171
+ setTableVisualization: function (mProperties) {
172
+ this._mVisTable = extend({}, mProperties);
173
+ },
174
+
175
+ /**
176
+ * Gets the table visualization property.
177
+ *
178
+ * @returns {any} An object containing the properties to be used for the table visualization.
179
+ * @public
180
+ */
181
+ getTableVisualization: function () {
182
+ return this._mVisTable;
183
+ },
184
+
185
+ /**
186
+ * Sets the chart visualization property.
187
+ *
188
+ * @param {any} mProperties An object containing the properties to be used for the chart visualization.
189
+ * @public
190
+ */
191
+ setChartVisualization: function (mProperties) {
192
+ this._mVisChart = extend({}, mProperties);
193
+ },
194
+
195
+ /**
196
+ * Gets the chart visualization property.
197
+ *
198
+ * @returns {any} An object containing the properties to be used for the chart visualization.
199
+ * @public
200
+ */
201
+ getChartVisualization: function () {
202
+ return this._mVisChart;
203
+ },
204
+
205
+ /**
206
+ * Returns the external representation of the selection variant as JSON object.
207
+ *
208
+ * @returns {object} The external representation of this instance as a JSON object
209
+ * @public
210
+ */
211
+ toJSONObject: function () {
212
+ var oExternalPresentationVariant = {
213
+ Version: {
214
+ // Version attributes are not part of the official specification,
215
+ Major: "1", // but could be helpful later for implementing a proper lifecycle/interoperability
216
+ Minor: "0",
217
+ Patch: "0"
218
+ },
219
+ PresentationVariantID: this._sId
220
+ };
221
+
222
+ if (this._sCtxUrl) {
223
+ oExternalPresentationVariant.ContextUrl = this._sCtxUrl;
224
+ }
232
225
 
233
- /**
234
- * Serializes this instance into a JSON-formatted string.
235
- * @returns {string} The JSON-formatted representation of this instance in stringified format
236
- * @public
237
- */
238
- toJSONString: function() {
239
- return JSON.stringify(this.toJSONObject());
240
- },
226
+ if (this._sText) {
227
+ oExternalPresentationVariant.Text = this._sText;
228
+ } else {
229
+ oExternalPresentationVariant.Text = "Presentation Variant with ID " + this._sId;
230
+ }
241
231
 
242
- _serializeProperties: function(oExternalPresentationVariant) {
243
- if (!this.getProperties()) {
244
- return;
245
- }
232
+ this._serializeProperties(oExternalPresentationVariant);
233
+ this._serializeVisualizations(oExternalPresentationVariant);
234
+
235
+ return oExternalPresentationVariant;
236
+ },
237
+
238
+ /**
239
+ * Serializes this instance into a JSON-formatted string.
240
+ *
241
+ * @returns {string} The JSON-formatted representation of this instance in stringified format
242
+ * @public
243
+ */
244
+ toJSONString: function () {
245
+ return JSON.stringify(this.toJSONObject());
246
+ },
247
+
248
+ _serializeProperties: function (oExternalPresentationVariant) {
249
+ if (!this.getProperties()) {
250
+ return;
251
+ }
246
252
 
247
- extend(oExternalPresentationVariant, this.getProperties());
248
- },
253
+ extend(oExternalPresentationVariant, this.getProperties());
254
+ },
249
255
 
250
- _serializeVisualizations: function(oExternalPresentationVariant) {
251
- if (this.getTableVisualization()) {
252
- if (!oExternalPresentationVariant.Visualizations) {
253
- oExternalPresentationVariant.Visualizations = [];
256
+ _serializeVisualizations: function (oExternalPresentationVariant) {
257
+ if (this.getTableVisualization()) {
258
+ if (!oExternalPresentationVariant.Visualizations) {
259
+ oExternalPresentationVariant.Visualizations = [];
260
+ }
261
+ oExternalPresentationVariant.Visualizations.push(this.getTableVisualization());
254
262
  }
255
- oExternalPresentationVariant.Visualizations.push(this.getTableVisualization());
256
- }
257
263
 
258
- if (this.getChartVisualization()) {
259
- if (!oExternalPresentationVariant.Visualizations) {
260
- oExternalPresentationVariant.Visualizations = [];
264
+ if (this.getChartVisualization()) {
265
+ if (!oExternalPresentationVariant.Visualizations) {
266
+ oExternalPresentationVariant.Visualizations = [];
267
+ }
268
+ oExternalPresentationVariant.Visualizations.push(this.getChartVisualization());
261
269
  }
262
- oExternalPresentationVariant.Visualizations.push(this.getChartVisualization());
263
- }
264
- },
270
+ },
265
271
 
266
- _parseFromString: function(sJSONString) {
267
- if (sJSONString === undefined) {
268
- throw new NavError("PresentationVariant.UNABLE_TO_PARSE_INPUT");
269
- }
272
+ _parseFromString: function (sJSONString) {
273
+ if (sJSONString === undefined) {
274
+ throw new NavError("PresentationVariant.UNABLE_TO_PARSE_INPUT");
275
+ }
270
276
 
271
- if (typeof sJSONString !== "string") {
272
- throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
273
- }
277
+ if (typeof sJSONString !== "string") {
278
+ throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
279
+ }
274
280
 
275
- var oInput = JSON.parse(sJSONString);
276
- // the input needs to be an JSON string by specification
277
-
278
- this._parseFromObject(oInput);
279
- },
280
-
281
- _parseFromObject: function(oInput) {
282
- if (oInput.PresentationVariantID === undefined) {
283
- // Do not throw an error, but only write a warning into the log.
284
- // The PresentationVariantID is mandatory according to the specification document version 1.0,
285
- // but this document is not a universally valid standard.
286
- // It is said that the "implementation of the SmartFilterBar" may supersede the specification.
287
- // Thus, also allow an initial PresentationVariantID.
288
- // throw new sap.fe.navigation.NavError("PresentationVariant.INPUT_DOES_NOT_CONTAIN_SELECTIONVARIANT_ID");
289
- Log.warning("PresentationVariantID is not defined");
290
- oInput.PresentationVariantID = "";
291
- }
281
+ var oInput = JSON.parse(sJSONString);
282
+ // the input needs to be an JSON string by specification
283
+
284
+ this._parseFromObject(oInput);
285
+ },
286
+
287
+ _parseFromObject: function (oInput) {
288
+ if (oInput.PresentationVariantID === undefined) {
289
+ // Do not throw an error, but only write a warning into the log.
290
+ // The PresentationVariantID is mandatory according to the specification document version 1.0,
291
+ // but this document is not a universally valid standard.
292
+ // It is said that the "implementation of the SmartFilterBar" may supersede the specification.
293
+ // Thus, also allow an initial PresentationVariantID.
294
+ // throw new sap.fe.navigation.NavError("PresentationVariant.INPUT_DOES_NOT_CONTAIN_SELECTIONVARIANT_ID");
295
+ Log.warning("PresentationVariantID is not defined");
296
+ oInput.PresentationVariantID = "";
297
+ }
292
298
 
293
- var oInputCopy = extend({}, oInput);
294
- delete oInputCopy.Version;
299
+ var oInputCopy = extend({}, oInput);
300
+ delete oInputCopy.Version;
295
301
 
296
- this.setID(oInput.PresentationVariantID);
297
- delete oInputCopy.PresentationVariantID;
302
+ this.setID(oInput.PresentationVariantID);
303
+ delete oInputCopy.PresentationVariantID;
298
304
 
299
- if (oInput.ContextUrl !== undefined && oInput.ContextUrl !== "") {
300
- this.setContextUrl(oInput.ContextUrl);
301
- delete oInputCopy.ContextUrl;
302
- }
305
+ if (oInput.ContextUrl !== undefined && oInput.ContextUrl !== "") {
306
+ this.setContextUrl(oInput.ContextUrl);
307
+ delete oInputCopy.ContextUrl;
308
+ }
303
309
 
304
- if (oInput.Text !== undefined) {
305
- this.setText(oInput.Text);
306
- delete oInputCopy.Text;
307
- }
310
+ if (oInput.Text !== undefined) {
311
+ this.setText(oInput.Text);
312
+ delete oInputCopy.Text;
313
+ }
308
314
 
309
- if (oInput.Visualizations) {
310
- this._parseVisualizations(oInput.Visualizations);
311
- delete oInputCopy.Visualizations;
312
- }
315
+ if (oInput.Visualizations) {
316
+ this._parseVisualizations(oInput.Visualizations);
317
+ delete oInputCopy.Visualizations;
318
+ }
313
319
 
314
- this._parseProperties(oInputCopy);
315
- },
320
+ this._parseProperties(oInputCopy);
321
+ },
316
322
 
317
- _parseProperties: function(oInput) {
318
- var mProperties = {};
323
+ _parseProperties: function (oInput) {
324
+ var mProperties = {};
319
325
 
320
- each(oInput, function(sKey, vValue) {
321
- mProperties[sKey] = vValue;
322
- });
326
+ each(oInput, function (sKey, vValue) {
327
+ mProperties[sKey] = vValue;
328
+ });
323
329
 
324
- this.setProperties(mProperties);
325
- },
330
+ this.setProperties(mProperties);
331
+ },
326
332
 
327
- _parseVisualizations: function(aVisualizations) {
328
- if (!Array.isArray(aVisualizations)) {
329
- throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
330
- }
331
- if (typeof aVisualizations.length > 2) {
332
- throw new NavError("PresentationVariant.TOO_MANY_VISUALIZATIONS");
333
- }
333
+ _parseVisualizations: function (aVisualizations) {
334
+ if (!Array.isArray(aVisualizations)) {
335
+ throw new NavError("PresentationVariant.INVALID_INPUT_TYPE");
336
+ }
337
+ if (typeof aVisualizations.length > 2) {
338
+ throw new NavError("PresentationVariant.TOO_MANY_VISUALIZATIONS");
339
+ }
334
340
 
335
- for (var i = 0; i < aVisualizations.length; i++) {
336
- if (aVisualizations[i].Type && aVisualizations[i].Type.indexOf("Chart") >= 0) {
337
- this.setChartVisualization(aVisualizations[i]);
338
- } else {
339
- this.setTableVisualization(aVisualizations[i]);
341
+ for (var i = 0; i < aVisualizations.length; i++) {
342
+ if (aVisualizations[i].Type && aVisualizations[i].Type.indexOf("Chart") >= 0) {
343
+ this.setChartVisualization(aVisualizations[i]);
344
+ } else {
345
+ this.setTableVisualization(aVisualizations[i]);
346
+ }
340
347
  }
341
348
  }
342
349
  }
343
- }
344
- );
345
-
346
- return PresentationVariant;
347
- });
350
+ );
351
+ }
352
+ );