@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.
- package/package.json +3 -4
- package/src/sap/fe/navigation/.library +1 -1
- package/src/sap/fe/navigation/NavError.js +4 -4
- package/src/sap/fe/navigation/NavigationHandler.js +381 -287
- package/src/sap/fe/navigation/PresentationVariant.js +321 -316
- package/src/sap/fe/navigation/SelectionVariant.js +26 -6
- package/src/sap/fe/navigation/library.js +19 -2
|
@@ -19,7 +19,7 @@ sap.ui.define(
|
|
|
19
19
|
* @class
|
|
20
20
|
* @public
|
|
21
21
|
* @since 1.83.0
|
|
22
|
-
* @
|
|
22
|
+
* @name sap.fe.navigation.SelectionVariant
|
|
23
23
|
* @param {string|object} [vSelectionVariant] If of type <code>string</code>, the selection variant is JSON-formatted;
|
|
24
24
|
* if of type <code>object</code>, the object represents a selection variant
|
|
25
25
|
* @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
|
|
@@ -34,9 +34,9 @@ sap.ui.define(
|
|
|
34
34
|
* </table>
|
|
35
35
|
* These exceptions can only be thrown if the parameter <code>vSelectionVariant</code> has been provided.
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
return BaseObject.extend(
|
|
38
38
|
"sap.fe.navigation.SelectionVariant",
|
|
39
|
-
/** @lends sap.fe.navigation.SelectionVariant */
|
|
39
|
+
/** @lends sap.fe.navigation.SelectionVariant.prototype */
|
|
40
40
|
{
|
|
41
41
|
_rVALIDATE_SIGN: new RegExp("[E|I]"),
|
|
42
42
|
_rVALIDATE_OPTION: new RegExp("EQ|NE|LE|GE|LT|GT|BT|CP"),
|
|
@@ -60,6 +60,7 @@ sap.ui.define(
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Returns the identification of the selection variant.
|
|
63
|
+
*
|
|
63
64
|
* @returns {string} The identification of the selection variant as made available during construction
|
|
64
65
|
* @public
|
|
65
66
|
*/
|
|
@@ -69,6 +70,7 @@ sap.ui.define(
|
|
|
69
70
|
|
|
70
71
|
/**
|
|
71
72
|
* Sets the identification of the selection variant.
|
|
73
|
+
*
|
|
72
74
|
* @param {string} sId The new identification of the selection variant
|
|
73
75
|
* @public
|
|
74
76
|
*/
|
|
@@ -78,6 +80,7 @@ sap.ui.define(
|
|
|
78
80
|
|
|
79
81
|
/**
|
|
80
82
|
* Sets the text / description of the selection variant.
|
|
83
|
+
*
|
|
81
84
|
* @param {string} sNewText The new description to be used
|
|
82
85
|
* @public
|
|
83
86
|
* @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
|
|
@@ -95,6 +98,7 @@ sap.ui.define(
|
|
|
95
98
|
|
|
96
99
|
/**
|
|
97
100
|
* Returns the current text / description of this selection variant.
|
|
101
|
+
*
|
|
98
102
|
* @returns {string} The current description of this selection variant.
|
|
99
103
|
* @public
|
|
100
104
|
*/
|
|
@@ -104,6 +108,7 @@ sap.ui.define(
|
|
|
104
108
|
|
|
105
109
|
/**
|
|
106
110
|
* Sets the context URL intended for the parameters.
|
|
111
|
+
*
|
|
107
112
|
* @param {string} sURL The URL of the parameter context
|
|
108
113
|
* @public
|
|
109
114
|
* @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
|
|
@@ -121,6 +126,7 @@ sap.ui.define(
|
|
|
121
126
|
|
|
122
127
|
/**
|
|
123
128
|
* Gets the current context URL intended for the parameters.
|
|
129
|
+
*
|
|
124
130
|
* @returns {string} The current context URL for the parameters
|
|
125
131
|
* @public
|
|
126
132
|
*/
|
|
@@ -130,6 +136,7 @@ sap.ui.define(
|
|
|
130
136
|
|
|
131
137
|
/**
|
|
132
138
|
* Gets the current context URL intended for the filters.
|
|
139
|
+
*
|
|
133
140
|
* @returns {string} The current context URL for the filters
|
|
134
141
|
* @public
|
|
135
142
|
*/
|
|
@@ -139,6 +146,7 @@ sap.ui.define(
|
|
|
139
146
|
|
|
140
147
|
/**
|
|
141
148
|
* Sets the context URL intended for the filters.
|
|
149
|
+
*
|
|
142
150
|
* @param {string} sURL The URL of the filters
|
|
143
151
|
* @public
|
|
144
152
|
* @throws An instance of {@link sap.fe.navigation.NavError} in case of input errors. Valid error codes are:
|
|
@@ -157,6 +165,7 @@ sap.ui.define(
|
|
|
157
165
|
/**
|
|
158
166
|
* Sets the value of a parameter called <code>sName</code> to the new value <code>sValue</code>.
|
|
159
167
|
* If the parameter has already been set before, its value is overwritten.
|
|
168
|
+
*
|
|
160
169
|
* @param {string} sName The name of the parameter to be set; the <code>null</code> value is not allowed
|
|
161
170
|
* @param {string} sValue The value of the parameter to be set
|
|
162
171
|
* @returns {object} This instance to allow method chaining
|
|
@@ -195,6 +204,7 @@ sap.ui.define(
|
|
|
195
204
|
|
|
196
205
|
/**
|
|
197
206
|
* Removes a parameter called <code>sName</code> from the selection variant.
|
|
207
|
+
*
|
|
198
208
|
* @param {string} sName The name of the parameter to be removed
|
|
199
209
|
* @returns {object} This instance to allow method chaining
|
|
200
210
|
* @public
|
|
@@ -222,6 +232,7 @@ sap.ui.define(
|
|
|
222
232
|
* Renames a parameter called <code>sNameOld</code> to <code>sNameNew</code>. If a parameter or a select option with
|
|
223
233
|
* the name <code>sNameNew</code> already exist, an error is thrown. If a parameter with the name <code>sNameOld</code>
|
|
224
234
|
* does not exist, nothing is changed.
|
|
235
|
+
*
|
|
225
236
|
* @param {string} sNameOld The current name of the parameter to be renamed
|
|
226
237
|
* @param {string} sNameNew The new name of the parameter
|
|
227
238
|
* @returns {object} This instance to allow method chaining
|
|
@@ -258,6 +269,7 @@ sap.ui.define(
|
|
|
258
269
|
/**
|
|
259
270
|
* Returns the value of the parameter called <code>sName</code> if it has been set.
|
|
260
271
|
* If the parameter has never been set or has been removed, <code>undefined</code> is returned.
|
|
272
|
+
*
|
|
261
273
|
* @param {string} sName The name of the parameter to be returned
|
|
262
274
|
* @returns {string} The value of parameter <code>sName</code>; returning the value <code>null</code> not possible
|
|
263
275
|
* @public
|
|
@@ -286,6 +298,7 @@ sap.ui.define(
|
|
|
286
298
|
|
|
287
299
|
/**
|
|
288
300
|
* Adds a new range to the list of select options for a given parameter.
|
|
301
|
+
*
|
|
289
302
|
* @param {string} sPropertyName The name of the property for which the selection range is added
|
|
290
303
|
* @param {string} sSign The sign of the range (<b>I</b>nclude or <b>E</b>xclude)
|
|
291
304
|
* @param {string} sOption The option of the range (<b>EQ</b> for "equals", <b>NE</b> for "not equals",
|
|
@@ -311,7 +324,6 @@ sap.ui.define(
|
|
|
311
324
|
* <tr><td>SelectionVariant.PARAMETER_SELOPT_COLLISION</td><td>Indicates that another parameter with the same name as the property name already exists</td></tr>
|
|
312
325
|
* </table>
|
|
313
326
|
*/
|
|
314
|
-
|
|
315
327
|
addSelectOption: function (sPropertyName, sSign, sOption, sLow, sHigh, sText) {
|
|
316
328
|
/* {string} sLow The single value or the lower boundary of the interval; the <code>null</code> value is not allowed
|
|
317
329
|
* (see specification "Selection Variants for UI Navigation in Fiori", section 2.4.2.1)
|
|
@@ -399,6 +411,7 @@ sap.ui.define(
|
|
|
399
411
|
|
|
400
412
|
/**
|
|
401
413
|
* Removes a select option called <code>sName</code> from the selection variant.
|
|
414
|
+
*
|
|
402
415
|
* @param {string} sName The name of the select option to be removed
|
|
403
416
|
* @returns {object} This instance to allow method chaining.
|
|
404
417
|
* @public
|
|
@@ -427,6 +440,7 @@ sap.ui.define(
|
|
|
427
440
|
* Renames a select option called <code>sNameOld</code> to <code>sNameNew</code>. If a select option or a parameter
|
|
428
441
|
* with the name <code>sNameNew</code> already exist, an error is thrown. If a select option with the name <code>sNameOld</code>
|
|
429
442
|
* does not exist, nothing is changed.
|
|
443
|
+
*
|
|
430
444
|
* @param {string} sNameOld The current name of the select option property to be renamed
|
|
431
445
|
* @param {string} sNameNew The new name of the select option property
|
|
432
446
|
* @returns {object} This instance to allow method chaining
|
|
@@ -462,6 +476,7 @@ sap.ui.define(
|
|
|
462
476
|
|
|
463
477
|
/**
|
|
464
478
|
* Returns the set of select options/ranges available for a given property name.
|
|
479
|
+
*
|
|
465
480
|
* @param {string} sPropertyName The name of the property for which the set of select options/ranges is returned
|
|
466
481
|
* @returns {Array} If <code>sPropertyName</code> is an invalid name of a property or no range exists, <code>undefined</code>
|
|
467
482
|
* is returned; otherwise, an immutable array of ranges is returned. Each entry of the array is an object with the
|
|
@@ -499,6 +514,7 @@ sap.ui.define(
|
|
|
499
514
|
|
|
500
515
|
/**
|
|
501
516
|
* Returns the names of the properties available for this instance.
|
|
517
|
+
*
|
|
502
518
|
* @returns {Array} The list of property names available for this instance
|
|
503
519
|
* @public
|
|
504
520
|
*/
|
|
@@ -508,6 +524,7 @@ sap.ui.define(
|
|
|
508
524
|
|
|
509
525
|
/**
|
|
510
526
|
* Returns the names of the parameter and select option properties available for this instance.
|
|
527
|
+
*
|
|
511
528
|
* @returns {Array} The list of parameter and select option property names available for this instance
|
|
512
529
|
* @public
|
|
513
530
|
*/
|
|
@@ -517,6 +534,7 @@ sap.ui.define(
|
|
|
517
534
|
|
|
518
535
|
/**
|
|
519
536
|
* Adds a set of select options to the list of select options for a given parameter.
|
|
537
|
+
*
|
|
520
538
|
* @param {string} sPropertyName The name of the property for which the set of select options is added
|
|
521
539
|
* @param {Array} aSelectOptions Set of select options to be added
|
|
522
540
|
* @returns {object} This instance to allow method chaining
|
|
@@ -552,6 +570,7 @@ sap.ui.define(
|
|
|
552
570
|
* made. If the latter succeeds, the single value is converted to fit into an array of selections to make it
|
|
553
571
|
* type compatible with ranges. This array is then returned. <br />
|
|
554
572
|
* If neither a select option nor a parameter could be found, <code>undefined</code> is returned.
|
|
573
|
+
*
|
|
555
574
|
* @param {string} sName The name of the attribute for which the value is retrieved
|
|
556
575
|
* @returns {Array} The ranges in the select options for the specified property or a range-converted representation of a parameter is returned.
|
|
557
576
|
* If both lookups fail, <code>undefined</code> is returned. <br />
|
|
@@ -598,6 +617,7 @@ sap.ui.define(
|
|
|
598
617
|
/**
|
|
599
618
|
* Returns <code>true</code> if the selection variant does neither contain parameters
|
|
600
619
|
* nor ranges.
|
|
620
|
+
*
|
|
601
621
|
* @returns {boolean} If set to <code>true</code> there are no parameters and no select options available in
|
|
602
622
|
* the selection variant; <code>false</code> otherwise.
|
|
603
623
|
* @public
|
|
@@ -608,6 +628,7 @@ sap.ui.define(
|
|
|
608
628
|
|
|
609
629
|
/**
|
|
610
630
|
* Returns the external representation of the selection variant as JSON object.
|
|
631
|
+
*
|
|
611
632
|
* @returns {object} The external representation of this instance as a JSON object
|
|
612
633
|
* @public
|
|
613
634
|
*/
|
|
@@ -646,6 +667,7 @@ sap.ui.define(
|
|
|
646
667
|
|
|
647
668
|
/**
|
|
648
669
|
* Serializes this instance into a JSON-formatted string.
|
|
670
|
+
*
|
|
649
671
|
* @returns {string} The JSON-formatted representation of this instance in stringified format
|
|
650
672
|
* @public
|
|
651
673
|
*/
|
|
@@ -777,8 +799,6 @@ sap.ui.define(
|
|
|
777
799
|
}
|
|
778
800
|
}
|
|
779
801
|
);
|
|
780
|
-
|
|
781
|
-
return SelectionVariant;
|
|
782
802
|
},
|
|
783
803
|
true
|
|
784
804
|
);
|
|
@@ -25,7 +25,8 @@ sap.ui.define(
|
|
|
25
25
|
// delegate further initialization of this library to the Core
|
|
26
26
|
var thisLib = sap.ui.getCore().initLibrary({
|
|
27
27
|
name: "sap.fe.navigation",
|
|
28
|
-
|
|
28
|
+
// eslint-disable-next-line no-template-curly-in-string
|
|
29
|
+
version: "1.104.1",
|
|
29
30
|
dependencies: ["sap.ui.core"],
|
|
30
31
|
types: ["sap.fe.navigation.NavType", "sap.fe.navigation.ParamHandlingMode", "sap.fe.navigation.SuppressionBehavior"],
|
|
31
32
|
interfaces: [],
|
|
@@ -47,6 +48,7 @@ sap.ui.define(
|
|
|
47
48
|
thisLib.ParamHandlingMode = {
|
|
48
49
|
/**
|
|
49
50
|
* The conflict resolution favors the SelectionVariant over URL parameters
|
|
51
|
+
*
|
|
50
52
|
* @public
|
|
51
53
|
*/
|
|
52
54
|
SelVarWins: "SelVarWins",
|
|
@@ -55,12 +57,14 @@ sap.ui.define(
|
|
|
55
57
|
* The conflict resolution favors the URL parameters over the SelectionVariant. Caution: In case of cross-app navigation
|
|
56
58
|
* a navigation parameter value from the source app is overwritten by a default, if a default is maintained in the launchpad
|
|
57
59
|
* designer for this parameter in the target app!
|
|
60
|
+
*
|
|
58
61
|
* @public
|
|
59
62
|
*/
|
|
60
63
|
URLParamWins: "URLParamWins",
|
|
61
64
|
|
|
62
65
|
/**
|
|
63
66
|
* The conflict resolution adds URL parameters to the SelectionVariant
|
|
67
|
+
*
|
|
64
68
|
* @public
|
|
65
69
|
*/
|
|
66
70
|
InsertInSelOpt: "InsertInSelOpt"
|
|
@@ -69,6 +73,7 @@ sap.ui.define(
|
|
|
69
73
|
/**
|
|
70
74
|
* This is the successor of {@link sap.ui.generic.app.navigation.service.NavType}.<br>
|
|
71
75
|
* A static enumeration type which indicates the type of inbound navigation.
|
|
76
|
+
*
|
|
72
77
|
* @enum {string}
|
|
73
78
|
* @name sap.fe.navigation.NavType
|
|
74
79
|
* @readonly
|
|
@@ -78,24 +83,28 @@ sap.ui.define(
|
|
|
78
83
|
thisLib.NavType = {
|
|
79
84
|
/**
|
|
80
85
|
* Initial startup without any navigation or default parameters
|
|
86
|
+
*
|
|
81
87
|
* @public
|
|
82
88
|
*/
|
|
83
89
|
initial: "initial",
|
|
84
90
|
|
|
85
91
|
/**
|
|
86
92
|
* Basic cross-app navigation with URL parameters only (without sap-xapp-state) or initial start with default parameters
|
|
93
|
+
*
|
|
87
94
|
* @public
|
|
88
95
|
*/
|
|
89
96
|
URLParams: "URLParams",
|
|
90
97
|
|
|
91
98
|
/**
|
|
92
99
|
* Cross-app navigation with sap-xapp-state parameter (and URL parameters), defaulted parameters may be added
|
|
100
|
+
*
|
|
93
101
|
* @public
|
|
94
102
|
*/
|
|
95
103
|
xAppState: "xAppState",
|
|
96
104
|
|
|
97
105
|
/**
|
|
98
106
|
* Back navigation with sap-iapp-state parameter
|
|
107
|
+
*
|
|
99
108
|
* @public
|
|
100
109
|
*/
|
|
101
110
|
iAppState: "iAppState"
|
|
@@ -107,7 +116,8 @@ sap.ui.define(
|
|
|
107
116
|
* <code>undefined</code> or <code>""</code> (empty string) shall be suppressed, before they are mixed in to the selection variant in the
|
|
108
117
|
* method {@link sap.fe.navigation.NavigationHandler.mixAttributesAndSelectionVariant mixAttributesAndSelectionVariant}
|
|
109
118
|
* of the {@link sap.fe.navigation.NavigationHandler NavigationHandler}.
|
|
110
|
-
*
|
|
119
|
+
*
|
|
120
|
+
* @enum {number}
|
|
111
121
|
* @name sap.fe.navigation.SuppressionBehavior
|
|
112
122
|
* @readonly
|
|
113
123
|
* @public
|
|
@@ -117,6 +127,7 @@ sap.ui.define(
|
|
|
117
127
|
/**
|
|
118
128
|
* Standard suppression behavior: semantic attributes with a <code>null</code> or an <code>undefined</code> value are ignored,
|
|
119
129
|
* the remaining attributes are mixed in to the selection variant
|
|
130
|
+
*
|
|
120
131
|
* @public
|
|
121
132
|
*/
|
|
122
133
|
standard: 0,
|
|
@@ -124,18 +135,21 @@ sap.ui.define(
|
|
|
124
135
|
/**
|
|
125
136
|
* Semantic attributes with an empty string are ignored, the remaining attributes are mixed in to the selection variant.
|
|
126
137
|
* Warning! Consider the impact on Boolean variable values!
|
|
138
|
+
*
|
|
127
139
|
* @public
|
|
128
140
|
*/
|
|
129
141
|
ignoreEmptyString: 1,
|
|
130
142
|
|
|
131
143
|
/**
|
|
132
144
|
* Semantic attributes with a <code>null</code> value lead to an {@link sap.fin.central.lib.error.Error error} of type NavigationHandler.INVALID_INPUT
|
|
145
|
+
*
|
|
133
146
|
* @public
|
|
134
147
|
*/
|
|
135
148
|
raiseErrorOnNull: 2,
|
|
136
149
|
|
|
137
150
|
/**
|
|
138
151
|
* Semantic attributes with an <code>undefined</code> value lead to an {@link sap.fin.central.lib.error.Error error} of type NavigationHandler.INVALID_INPUT
|
|
152
|
+
*
|
|
139
153
|
* @public
|
|
140
154
|
*/
|
|
141
155
|
raiseErrorOnUndefined: 4
|
|
@@ -143,6 +157,7 @@ sap.ui.define(
|
|
|
143
157
|
|
|
144
158
|
/**
|
|
145
159
|
* A static enumeration type which indicates the Odata version used for runnning the Navigation Handler.
|
|
160
|
+
*
|
|
146
161
|
* @enum {string}
|
|
147
162
|
* @name sap.fe.navigation.Mode
|
|
148
163
|
* @readonly
|
|
@@ -152,12 +167,14 @@ sap.ui.define(
|
|
|
152
167
|
thisLib.Mode = {
|
|
153
168
|
/**
|
|
154
169
|
* This is used for ODataV2 services to do some internal tasks like creation of appstate, removal of sensitive data etc.,
|
|
170
|
+
*
|
|
155
171
|
* @public
|
|
156
172
|
*/
|
|
157
173
|
ODataV2: "ODataV2",
|
|
158
174
|
|
|
159
175
|
/**
|
|
160
176
|
* This is used for ODataV4 services to do some internal tasks like creation of appstate, removal of sensitive data etc.,
|
|
177
|
+
*
|
|
161
178
|
* @public
|
|
162
179
|
*/
|
|
163
180
|
ODataV4: "ODataV4"
|