@sapui5/sap.ushell_abap 1.94.0 → 1.96.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 +1 -1
- package/src/main/js/sap/ui2/srvc/ODataWrapper.js +1 -1
- package/src/main/js/sap/ushell_abap/.library +4 -9
- package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +12 -5
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +11 -7
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +47 -32
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +46 -38
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +438 -398
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +25 -15
- package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +3 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +16 -7
- package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +8 -8
- package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +11 -4
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +9 -3
- package/src/main/js/sap/ushell_abap/bootstrap/evo/XhrLogonEventHandler.js +13 -11
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +8 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.constants.js +9 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.get.server.config.Urls.js +12 -5
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +21 -22
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +8 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.server.config.js +6 -3
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +10 -5
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.ui5.boot.handler.js +7 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhr.handler.js +10 -3
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +21 -16
- package/src/main/js/sap/ushell_abap/library.js +2 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/AllCatalogs.js +186 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +704 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +930 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +1027 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipDefinition.js +216 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +933 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Error.js +45 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +647 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataService.js +251 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +1262 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +920 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageBuildingService.js +1498 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageSet.js +466 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/RemoteCatalogService.js +52 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +767 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/chipdefinition.xsd +139 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +244 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/bag.js +150 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +165 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +330 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/fullscreen.js +70 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/navigation.js +50 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/preview.js +289 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/refresh.js +43 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/search.js +115 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/types.js +9 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/url.js +105 -0
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/visible.js +128 -0
- package/ui5.yaml +30 -0
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/Component.js +0 -426
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/css/style.css +0 -1
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n.properties +0 -56
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ar.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_bg.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ca.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_cs.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_cy.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_da.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_de.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_el.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_GB.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_US_sappsd.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_US_saprigi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_en_US_saptrc.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_es.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_es_MX.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_et.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_fi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_fr.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_fr_CA.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_hi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_hr.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_hu.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_id.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_it.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_iw.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ja.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_kk.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ko.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_lt.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_lv.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ms.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_nl.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_no.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_pl.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_pt.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_pt_PT.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ro.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_ru.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sh.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sk.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sl.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_sv.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_th.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_tr.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_uk.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_vi.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_zh_CN.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/i18n/i18n_zh_TW.properties +0 -36
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/manifest.json +0 -153
- package/src/main/js/sap/ushell_abap/plugins/fcc-transport-ui/model/models.js +0 -14
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview The Unified Shell's page building adapter for the ABAP platform.
|
|
5
|
-
* @version 1.
|
|
5
|
+
* @version 1.96.1
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/thirdparty/URI",
|
|
@@ -14,9 +14,12 @@ sap.ui.define([
|
|
|
14
14
|
"sap/ushell/Config",
|
|
15
15
|
"sap/base/util/deepExtend",
|
|
16
16
|
"sap/ushell/utils/chipsUtils",
|
|
17
|
-
"sap/ui2/
|
|
18
|
-
"sap/ui2/
|
|
19
|
-
"sap/ui2/
|
|
17
|
+
"sap/ushell_abap/pbServices/ui2/ChipInstance",
|
|
18
|
+
"sap/ushell_abap/pbServices/ui2/Catalog",
|
|
19
|
+
"sap/ushell_abap/pbServices/ui2/ChipDefinition",
|
|
20
|
+
"sap/ushell_abap/pbServices/ui2/Utils",
|
|
21
|
+
"sap/ushell_abap/pbServices/ui2/Page",
|
|
22
|
+
"sap/ushell_abap/pbServices/ui2/Error"
|
|
20
23
|
], function (
|
|
21
24
|
URI,
|
|
22
25
|
ManifestPropertyHelper,
|
|
@@ -26,10 +29,13 @@ sap.ui.define([
|
|
|
26
29
|
GenericTile,
|
|
27
30
|
Config,
|
|
28
31
|
deepExtend,
|
|
29
|
-
chipsUtils
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
chipsUtils,
|
|
33
|
+
ChipInstance,
|
|
34
|
+
Catalog,
|
|
35
|
+
ChipDefinition,
|
|
36
|
+
Utils,
|
|
37
|
+
Page,
|
|
38
|
+
SrvcError
|
|
33
39
|
) {
|
|
34
40
|
"use strict";
|
|
35
41
|
|
|
@@ -71,7 +77,7 @@ sap.ui.define([
|
|
|
71
77
|
|
|
72
78
|
// Stores a boolean that indicates whether a target mapping is supported on the current device.
|
|
73
79
|
// One should use makeTargetMappingSupportKey to store and retrieve values to/from this map.
|
|
74
|
-
oTargetMappingSupport = new
|
|
80
|
+
oTargetMappingSupport = new Utils.Map(),
|
|
75
81
|
|
|
76
82
|
oAdapterConfig = (oAdapterConfiguration && oAdapterConfiguration.config) || {},
|
|
77
83
|
oTargetMappingServiceConfig = oAdapterConfig.services && oAdapterConfig.services.targetMappings,
|
|
@@ -97,9 +103,9 @@ sap.ui.define([
|
|
|
97
103
|
}
|
|
98
104
|
|
|
99
105
|
/**
|
|
100
|
-
* Robust call to <code>sap.ui2.
|
|
106
|
+
* Robust call to <code>sap.ushell_abap.pbServices.ui2.ChipInstance#getImplementationAsSapui5()</code>.
|
|
101
107
|
*
|
|
102
|
-
* @param {sap.ui2.
|
|
108
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile Title object
|
|
103
109
|
* @param {string} sTitle Title string
|
|
104
110
|
* @param {string} sMessage Message string
|
|
105
111
|
* @returns {sap.ui.core.Control} Implementation
|
|
@@ -131,10 +137,10 @@ sap.ui.define([
|
|
|
131
137
|
* @param {string} sTextName Text name to check for
|
|
132
138
|
* @returns {string} Value for sTextName, or undefined if not found
|
|
133
139
|
* @private
|
|
134
|
-
* @see sap.ui2.
|
|
135
|
-
* @see sap.ui2.
|
|
136
|
-
* @see sap.ui2.
|
|
137
|
-
* @see sap.ui2.
|
|
140
|
+
* @see sap.ushell_abap.pbServices.ui2.ChipInstance#getBag
|
|
141
|
+
* @see sap.ushell_abap.pbServices.ui2.ChipInstance#getBagIds
|
|
142
|
+
* @see sap.ushell_abap.pbServices.ui2.Bag#getText
|
|
143
|
+
* @see sap.ushell_abap.pbServices.ui2.Bag#getTextNames
|
|
138
144
|
*/
|
|
139
145
|
LaunchPageAdapter.prototype._getBagText = function (oChip, sBagId, sTextName) {
|
|
140
146
|
// calling getBag directly, will create the bag if it does not exist yet!
|
|
@@ -156,7 +162,7 @@ sap.ui.define([
|
|
|
156
162
|
* @param {string} sPropertyName Name of the property which is expected on the parsed object value from sConfigParameterId
|
|
157
163
|
* @returns {string} Value for sPropertyName, or undefined if not found or an error occurred (e.g. due to failed parsing)
|
|
158
164
|
* @private
|
|
159
|
-
* @see sap.ui2.
|
|
165
|
+
* @see sap.ushell_abap.pbServices.ui2.ChipInstance#getConfigurationParameter
|
|
160
166
|
*/
|
|
161
167
|
LaunchPageAdapter.prototype._getConfigurationProperty = function (oChip, sConfigParameterId, sPropertyName) {
|
|
162
168
|
var sTileConfig,
|
|
@@ -190,7 +196,7 @@ sap.ui.define([
|
|
|
190
196
|
* @since 1.11.0
|
|
191
197
|
*/
|
|
192
198
|
LaunchPageAdapter.prototype._orderBasedOnConfiguration = function (oConfiguration, aElements) {
|
|
193
|
-
var aOrder = (oConfiguration &&
|
|
199
|
+
var aOrder = (oConfiguration && Utils.isArray(oConfiguration.order) ? oConfiguration.order : []),
|
|
194
200
|
mElementsById = {},
|
|
195
201
|
aOrderedElements = [],
|
|
196
202
|
oElement,
|
|
@@ -199,7 +205,7 @@ sap.ui.define([
|
|
|
199
205
|
n;
|
|
200
206
|
|
|
201
207
|
// append link tiles as they are exposed together with tiles via getGroupTiles
|
|
202
|
-
aOrder = aOrder.concat(oConfiguration &&
|
|
208
|
+
aOrder = aOrder.concat(oConfiguration && Utils.isArray(oConfiguration.linkOrder) ? oConfiguration.linkOrder : []);
|
|
203
209
|
|
|
204
210
|
// create a map of instances by ID
|
|
205
211
|
for (i = 0, n = aElements.length; i < n; i += 1) {
|
|
@@ -234,7 +240,7 @@ sap.ui.define([
|
|
|
234
240
|
* linkOrder: ["linkTileId1", "linkTileId2"]
|
|
235
241
|
* }
|
|
236
242
|
* </code>
|
|
237
|
-
* @param {sap.ui2.
|
|
243
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile The tile to be removed
|
|
238
244
|
* @param {string} sCurrentTileType "link" or "tile"
|
|
239
245
|
* @returns {integer} the index of the oTile if found. Otherwise -1 is returned
|
|
240
246
|
* @private
|
|
@@ -293,7 +299,7 @@ sap.ui.define([
|
|
|
293
299
|
/**
|
|
294
300
|
* Calculates the layout object for the given Page. The layout
|
|
295
301
|
*
|
|
296
|
-
* @param {sap.ui2.
|
|
302
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oPage The Page the layout is calculated for.
|
|
297
303
|
* @param {sap.ushell_abap.adapters.abap.LaunchPageAdapter} oAdapter The instance of the LaunchPageAdapter (this).
|
|
298
304
|
* @returns {object} The calculated Page layout
|
|
299
305
|
* <code>
|
|
@@ -326,7 +332,7 @@ sap.ui.define([
|
|
|
326
332
|
/**
|
|
327
333
|
* Orders the pages of _oCurrentPageSet based on the configuration maintained in _oCurrentPageSet and returns the result.
|
|
328
334
|
*
|
|
329
|
-
* @returns {sap.ui2.
|
|
335
|
+
* @returns {sap.ushell_abap.pbServices.ui2.Page[]}
|
|
330
336
|
* @private
|
|
331
337
|
*/
|
|
332
338
|
function getOrderedPages () {
|
|
@@ -374,7 +380,7 @@ sap.ui.define([
|
|
|
374
380
|
* Checks if the provided group should be visible or hidden.
|
|
375
381
|
* It is decided according the group ID (oGroup should have a getId function).
|
|
376
382
|
*
|
|
377
|
-
* @param {sap.ui2.
|
|
383
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oGroup The group to be checked.
|
|
378
384
|
* @returns {boolean} true\false accordingly.
|
|
379
385
|
* @private
|
|
380
386
|
*/
|
|
@@ -436,7 +442,7 @@ sap.ui.define([
|
|
|
436
442
|
* Triggers loading of all ChipInstances of the given pages and calls fnLocalChipsLoaded
|
|
437
443
|
* when all local CHIP instances are completely loaded.
|
|
438
444
|
*
|
|
439
|
-
* @param {sap.ui2.
|
|
445
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page[]} aPages the pages
|
|
440
446
|
* @param {function} fnLocalChipsLoaded Success handler which is called as soon as all LOCAL CHIPs are completely loaded.
|
|
441
447
|
* @private
|
|
442
448
|
*/
|
|
@@ -589,7 +595,7 @@ sap.ui.define([
|
|
|
589
595
|
sUrl += (sUrl.indexOf("?") < 0 ? "?" : "&") + "sap-ui2-cache-disable=" + sUI2CacheDisable;
|
|
590
596
|
}
|
|
591
597
|
|
|
592
|
-
|
|
598
|
+
Utils.get(
|
|
593
599
|
sUrl,
|
|
594
600
|
false, /*xml=*/
|
|
595
601
|
function (sDirectStartResult) {
|
|
@@ -622,7 +628,7 @@ sap.ui.define([
|
|
|
622
628
|
* This is the case for the results of {@link #addTile}, but not for {@link #addBookmark}.
|
|
623
629
|
* Such wrappers must be unwrapped by {@link #moveTile} or else the title becomes "hard coded" in the newly created CHIP instance.
|
|
624
630
|
*
|
|
625
|
-
* @param {sap.ui2.
|
|
631
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile
|
|
626
632
|
* @returns {boolean}
|
|
627
633
|
*/
|
|
628
634
|
LaunchPageAdapter.prototype._isWrapperOnly = function (oTile) {
|
|
@@ -636,12 +642,12 @@ sap.ui.define([
|
|
|
636
642
|
/**
|
|
637
643
|
* Wraps the given CHIPs as CHIP instances, filtering out action CHIPs.
|
|
638
644
|
*
|
|
639
|
-
* @param {sap.ui2.
|
|
640
|
-
* @
|
|
645
|
+
* @param {sap.ushell_abap.pbServices.ui2.Factory} oFactory The factory to create new chip instances.
|
|
646
|
+
* @param {sap.ushell_abap.pbServices.ui2.Chip[]} aChips A list of chips.
|
|
647
|
+
* @returns {sap.ushell_abap.pbServices.ui2.ChipInstance[]} A list of chip instances.
|
|
641
648
|
*/
|
|
642
|
-
function wrapAsChipInstances (aChips) {
|
|
643
|
-
var aChipInstances = []
|
|
644
|
-
oFactory = sap.ushell.Container.getService("PageBuilding").getFactory();
|
|
649
|
+
function wrapAsChipInstances (oFactory, aChips) {
|
|
650
|
+
var aChipInstances = [];
|
|
645
651
|
|
|
646
652
|
aChips.forEach(function (oChip) {
|
|
647
653
|
var oRemoteCatalog = oChip.getRemoteCatalog(),
|
|
@@ -663,11 +669,11 @@ sap.ui.define([
|
|
|
663
669
|
/**
|
|
664
670
|
* Wraps the current <code>allCatalogs</code> collection into black box objects.
|
|
665
671
|
*
|
|
666
|
-
* @returns {
|
|
667
|
-
*
|
|
672
|
+
* @returns {object[]} A list of catalog objects.
|
|
673
|
+
* @param {sap.ushell_abap.pbServices.ui2.Factory} oFactory The factory to create new chip instances.
|
|
668
674
|
* TODO cache result?!
|
|
669
675
|
*/
|
|
670
|
-
function wrapCatalogs () {
|
|
676
|
+
function wrapCatalogs (oFactory) {
|
|
671
677
|
var oAllCatalogs = that._oCurrentPageSet.getDefaultPage().getAllCatalogs(),
|
|
672
678
|
oCatalog,
|
|
673
679
|
aCatalogs = oAllCatalogs.getCatalogs(),
|
|
@@ -686,7 +692,7 @@ sap.ui.define([
|
|
|
686
692
|
: oCatalog.getTitle(),
|
|
687
693
|
tiles: oCatalog.isStub()
|
|
688
694
|
? []
|
|
689
|
-
: wrapAsChipInstances(oCatalog.getChips()),
|
|
695
|
+
: wrapAsChipInstances(oFactory, oCatalog.getChips()),
|
|
690
696
|
ui2catalog: oCatalog // for convenience
|
|
691
697
|
});
|
|
692
698
|
}
|
|
@@ -696,7 +702,7 @@ sap.ui.define([
|
|
|
696
702
|
|
|
697
703
|
/**
|
|
698
704
|
* Tells whether the given CHIP instance is a static or dynamic app launcher
|
|
699
|
-
* @param {sap.ui2.
|
|
705
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
|
|
700
706
|
* @returns {boolean}
|
|
701
707
|
*/
|
|
702
708
|
function isAppLauncher (oChipInstance) {
|
|
@@ -706,7 +712,7 @@ sap.ui.define([
|
|
|
706
712
|
|
|
707
713
|
/**
|
|
708
714
|
* Tells whether the given CHIP instance is a card
|
|
709
|
-
* @param {sap.ui2.
|
|
715
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
|
|
710
716
|
* @returns {boolean}
|
|
711
717
|
*/
|
|
712
718
|
function isCard (oChipInstance) {
|
|
@@ -716,7 +722,7 @@ sap.ui.define([
|
|
|
716
722
|
|
|
717
723
|
/**
|
|
718
724
|
* Tells whether the given CHIP instance is remote
|
|
719
|
-
* @param {sap.ui2.
|
|
725
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
|
|
720
726
|
* @returns {boolean}
|
|
721
727
|
*/
|
|
722
728
|
function isRemoteChipInstance (oChipInstance) {
|
|
@@ -729,7 +735,7 @@ sap.ui.define([
|
|
|
729
735
|
*
|
|
730
736
|
* Note: If this method returns false does not mean that the later loading will not fail
|
|
731
737
|
*
|
|
732
|
-
* @param {sap.ui2.
|
|
738
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
|
|
733
739
|
* @returns {boolean}
|
|
734
740
|
*/
|
|
735
741
|
function isBrokenChip (oChipInstance) {
|
|
@@ -741,7 +747,7 @@ sap.ui.define([
|
|
|
741
747
|
* Returns the tile configuration of the given (app launcher) CHIP instance.
|
|
742
748
|
* It logs an error message if the tile configuration cannot be parsed.
|
|
743
749
|
*
|
|
744
|
-
* @param {sap.ui2.
|
|
750
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance must not be a stub anymore. Also it's CHIP must not be a stub anymore.
|
|
745
751
|
* @returns {object} the tile configuration
|
|
746
752
|
*/
|
|
747
753
|
function getAppLauncherTileConfiguration (oChipInstance) {
|
|
@@ -765,7 +771,7 @@ sap.ui.define([
|
|
|
765
771
|
* Returns the tile configuration of the given (Smart Business) CHIP instance.
|
|
766
772
|
* It logs an error message if the tile configuration cannot be parsed.
|
|
767
773
|
*
|
|
768
|
-
* @param {sap.ui2.
|
|
774
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance must not be a stub anymore. Also it's CHIP must not be a stub anymore.
|
|
769
775
|
* @returns {object} the tile configuration in style of an applauncer
|
|
770
776
|
*/
|
|
771
777
|
function getSmartBusinessTileConfiguration (oChipInstance) {
|
|
@@ -800,7 +806,7 @@ sap.ui.define([
|
|
|
800
806
|
* Returns the tile configuration of the given custom CHIP instance, but only if it uses the same configuration structure
|
|
801
807
|
* as the standard static and dynamic app launcher or if it uses the Smart Business tiles' configuration structure.
|
|
802
808
|
*
|
|
803
|
-
* @param {sap.ui2.
|
|
809
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance It's CHIP may still be a stub.
|
|
804
810
|
* @returns {object} the tile configuration or an empty object
|
|
805
811
|
*/
|
|
806
812
|
function getCustomTileConfiguration (oChipInstance) {
|
|
@@ -885,7 +891,7 @@ sap.ui.define([
|
|
|
885
891
|
};
|
|
886
892
|
|
|
887
893
|
/**
|
|
888
|
-
* @returns {sap.ui2.
|
|
894
|
+
* @returns {sap.ushell_abap.pbServices.ui2.Map} all supported target mappings
|
|
889
895
|
*/
|
|
890
896
|
this.getTargetMappingSupport = function () {
|
|
891
897
|
return oTargetMappingSupport;
|
|
@@ -967,8 +973,8 @@ sap.ui.define([
|
|
|
967
973
|
* It logs at most two messages (one warning and one error), grouping errors by groups and error type.
|
|
968
974
|
* </p>
|
|
969
975
|
*
|
|
970
|
-
* @param {sap.ui2.
|
|
971
|
-
* @param {sap.ui2.
|
|
976
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page[]} aPages an array of all the pages.
|
|
977
|
+
* @param {sap.ushell_abap.pbServices.ui2.Map} oTargetMappingSupport a map containing whether an intent is supported taking into
|
|
972
978
|
* account its form factor.
|
|
973
979
|
* @private
|
|
974
980
|
*/
|
|
@@ -983,8 +989,8 @@ sap.ui.define([
|
|
|
983
989
|
/**
|
|
984
990
|
* Finds errors on tiles in all Groups.
|
|
985
991
|
*
|
|
986
|
-
* @param {array} aPages an array of <code>sap.ui2.
|
|
987
|
-
* @param {sap.ui2.
|
|
992
|
+
* @param {array} aPages an array of <code>sap.ushell_abap.pbServices.ui2.Page</code> objects representing groups of tiles.
|
|
993
|
+
* @param {sap.ushell_abap.pbServices.ui2.Map} oTargetMappingSupport a map containing whether an intent is supported taking into
|
|
988
994
|
* account its form factor.
|
|
989
995
|
* @returns {array} An array describing each error found.
|
|
990
996
|
* @private
|
|
@@ -1003,8 +1009,8 @@ sap.ui.define([
|
|
|
1003
1009
|
/**
|
|
1004
1010
|
* Finds possible errors on tiles in a given Group.
|
|
1005
1011
|
*
|
|
1006
|
-
* @param {object} oPage an <code>sap.ui2.
|
|
1007
|
-
* @param {sap.ui2.
|
|
1012
|
+
* @param {object} oPage an <code>sap.ushell_abap.pbServices.ui2.Page</code> object representing a group of tiles.
|
|
1013
|
+
* @param {sap.ushell_abap.pbServices.ui2.Map} oTargetMappingSupport a map containing whether an intent is supported taking into
|
|
1008
1014
|
* account its form factor.
|
|
1009
1015
|
* @returns {array} An array describing each error found
|
|
1010
1016
|
* @private
|
|
@@ -1220,136 +1226,132 @@ sap.ui.define([
|
|
|
1220
1226
|
|
|
1221
1227
|
/**
|
|
1222
1228
|
* Returns the groups of the user. This is an asynchronous function using a jQuery.Promise.
|
|
1223
|
-
* In case of success its <code>done</code> function is called and gets an array of <code>sap.ui2.
|
|
1229
|
+
* In case of success its <code>done</code> function is called and gets an array of <code>sap.ushell_abap.pbServices.ui2.Page</code> objects.
|
|
1224
1230
|
* These page objects can be passed in to all functions expecting a group.
|
|
1225
1231
|
*
|
|
1226
1232
|
* The first group in this list is considered the default group.
|
|
1227
1233
|
*
|
|
1228
1234
|
* In case of error the promise's <code>fail</code> function is called.
|
|
1229
1235
|
*
|
|
1230
|
-
* @returns {
|
|
1236
|
+
* @returns {jQuery.Promise} jQuery.Promise object.
|
|
1231
1237
|
* @since 1.11.0
|
|
1232
1238
|
*/
|
|
1233
1239
|
this.getGroups = function () {
|
|
1234
|
-
|
|
1235
|
-
oDeferred, // the deferred used for page set loading
|
|
1236
|
-
oMappingPromise, // the promise of readMappingTargets
|
|
1237
|
-
oUshellPbs; // ushell service PageBuilding
|
|
1238
|
-
|
|
1239
|
-
if (that._bPageSetFullyLoaded) {
|
|
1240
|
+
if (this._bPageSetFullyLoaded) {
|
|
1240
1241
|
// return the already known page set (the order is recomputed because the page set might have changed it since last call)
|
|
1241
|
-
return
|
|
1242
|
+
return new jQuery.Deferred().resolve(getOrderedPages()).promise();
|
|
1242
1243
|
}
|
|
1243
1244
|
if (!oGetGroupsDeferred) {
|
|
1244
1245
|
// start a new request and remember it in oGetGroupsDeferred, so that parallel calls don't start another one
|
|
1245
1246
|
oGetGroupsDeferred = new jQuery.Deferred();
|
|
1246
|
-
oDeferred = new jQuery.Deferred();
|
|
1247
|
-
oUshellPbs = sap.ushell.Container.getService("PageBuilding");
|
|
1247
|
+
var oDeferred = new jQuery.Deferred();
|
|
1248
1248
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
.put(sDEFAULT_PAGE_ID, oLaunchPageServiceConfig.cacheId);
|
|
1253
|
-
}
|
|
1254
|
-
if (oLaunchPageServiceConfig && oLaunchPageServiceConfig["sap-ui2-cache-disable"]
|
|
1255
|
-
&& oUshellPbs.getFactory().getPageBuildingService().readPageSet) {
|
|
1256
|
-
var oAppendedParameters = oUshellPbs.getFactory().getPageBuildingService().readPageSet.appendedParameters || {};
|
|
1257
|
-
oAppendedParameters["sap-ui2-cache-disable"] = oLaunchPageServiceConfig["sap-ui2-cache-disable"];
|
|
1258
|
-
oUshellPbs.getFactory().getPageBuildingService().readPageSet.appendedParameters = oAppendedParameters;
|
|
1259
|
-
}
|
|
1249
|
+
sap.ushell.Container.getServiceAsync("PageBuilding")
|
|
1250
|
+
.then(function (PageBuildingService) {
|
|
1251
|
+
var fnReadPageSet = PageBuildingService.getFactory().getPageBuildingService().readPageSet;
|
|
1260
1252
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
);
|
|
1272
|
-
|
|
1273
|
-
oTargetMappingSupport.put(sKey,
|
|
1274
|
-
// make sure it's boolean
|
|
1275
|
-
oTargetMappingSupport.get(sKey)
|
|
1276
|
-
|| !!(oTargetMapping.formFactors && oTargetMapping.formFactors[sFormFactor]));
|
|
1277
|
-
});
|
|
1278
|
-
});
|
|
1279
|
-
|
|
1280
|
-
/* In spaces mode we will create an empty page inside an empty pageset.
|
|
1281
|
-
This is needed because the appfinder and search integration request the classic homepage content which is not available in spaces mode.
|
|
1282
|
-
For consistency reasons it should then also not be availabe from the search results.
|
|
1283
|
-
The empty pageset has all needed functions the real pageset has.
|
|
1284
|
-
Functions which should not be used in spaces mode throw an error
|
|
1285
|
-
*/
|
|
1286
|
-
if (Config.last("/core/spaces/enabled")) {
|
|
1287
|
-
sap.ushell.Container.getServiceAsync("PageBuilding").then(function (oPageBuilding) {
|
|
1288
|
-
var oFactory = oPageBuilding.getFactory();
|
|
1289
|
-
|
|
1290
|
-
var oFakeDefaultPage = new sap.ui2.srvc.Page(oFactory, {
|
|
1291
|
-
id: PAGE_ID_WITHOUT_TM
|
|
1292
|
-
});
|
|
1253
|
+
if (oLaunchPageServiceConfig && oLaunchPageServiceConfig.cacheId) {
|
|
1254
|
+
// add PageSet cache buster token if configured
|
|
1255
|
+
fnReadPageSet.cacheBusterTokens
|
|
1256
|
+
.put(sDEFAULT_PAGE_ID, oLaunchPageServiceConfig.cacheId);
|
|
1257
|
+
}
|
|
1258
|
+
if (oLaunchPageServiceConfig && oLaunchPageServiceConfig["sap-ui2-cache-disable"] && fnReadPageSet) {
|
|
1259
|
+
var oAppendedParameters = fnReadPageSet.appendedParameters || {};
|
|
1260
|
+
oAppendedParameters["sap-ui2-cache-disable"] = oLaunchPageServiceConfig["sap-ui2-cache-disable"];
|
|
1261
|
+
fnReadPageSet.appendedParameters = oAppendedParameters;
|
|
1262
|
+
}
|
|
1293
1263
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
}
|
|
1313
|
-
resetPage: function () {
|
|
1314
|
-
},
|
|
1315
|
-
getConfiguration: function () {
|
|
1316
|
-
return "{}";
|
|
1317
|
-
},
|
|
1318
|
-
setConfiguration: function () {
|
|
1319
|
-
},
|
|
1320
|
-
filter: function () {
|
|
1321
|
-
}
|
|
1322
|
-
};
|
|
1264
|
+
/*
|
|
1265
|
+
The target mappings are used in the classic homepage and in spaces mode.
|
|
1266
|
+
*/
|
|
1267
|
+
var oMappingPromise = this._readTargetMappings()
|
|
1268
|
+
.done(function (oTargetMappings) {
|
|
1269
|
+
var sFormFactor = Utils.getFormFactor();
|
|
1270
|
+
|
|
1271
|
+
oTargetMappings.results.forEach(function (oTargetMapping) {
|
|
1272
|
+
var sKey = LaunchPageAdapter.prototype._makeTargetMappingSupportKey(
|
|
1273
|
+
oTargetMapping.semanticObject,
|
|
1274
|
+
oTargetMapping.semanticAction
|
|
1275
|
+
);
|
|
1276
|
+
|
|
1277
|
+
oTargetMappingSupport.put(sKey,
|
|
1278
|
+
// make sure it's boolean
|
|
1279
|
+
oTargetMappingSupport.get(sKey)
|
|
1280
|
+
|| !!(oTargetMapping.formFactors && oTargetMapping.formFactors[sFormFactor]));
|
|
1281
|
+
});
|
|
1282
|
+
});
|
|
1323
1283
|
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
that._loadApplaunchersAndDelayLoadingOfOtherChips(oPageSet.getPages(),
|
|
1338
|
-
oDeferred.resolve.bind(oDeferred, oPageSet));
|
|
1339
|
-
});
|
|
1284
|
+
/*
|
|
1285
|
+
In spaces mode we will create an empty page inside an empty pageset.
|
|
1286
|
+
This is needed because the appfinder and search integration request the classic homepage content which is not available in spaces mode.
|
|
1287
|
+
For consistency reasons it should then also not be availabe from the search results.
|
|
1288
|
+
The empty pageset has all needed functions the real pageset has.
|
|
1289
|
+
Functions which should not be used in spaces mode throw an error
|
|
1290
|
+
*/
|
|
1291
|
+
if (Config.last("/core/spaces/enabled")) {
|
|
1292
|
+
var oFactory = PageBuildingService.getFactory();
|
|
1293
|
+
|
|
1294
|
+
var oFakeDefaultPage = new Page(oFactory, {
|
|
1295
|
+
id: PAGE_ID_WITHOUT_TM
|
|
1296
|
+
});
|
|
1340
1297
|
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1298
|
+
that._oCurrentPageSet = {
|
|
1299
|
+
getDefaultPage: function () {
|
|
1300
|
+
return oFakeDefaultPage;
|
|
1301
|
+
},
|
|
1302
|
+
getPages: function () {
|
|
1303
|
+
return [oFakeDefaultPage];
|
|
1304
|
+
},
|
|
1305
|
+
appendPage: function () {
|
|
1306
|
+
throw new Error("Not implemented in Pages Runtime");
|
|
1307
|
+
},
|
|
1308
|
+
isPageRemovable: function () {
|
|
1309
|
+
return false;
|
|
1310
|
+
},
|
|
1311
|
+
removePage: function () {
|
|
1312
|
+
throw new Error("Not implemented in Pages Runtime");
|
|
1313
|
+
},
|
|
1314
|
+
isPageResettable: function () {
|
|
1315
|
+
return true;
|
|
1316
|
+
},
|
|
1317
|
+
resetPage: function () {
|
|
1318
|
+
},
|
|
1319
|
+
getConfiguration: function () {
|
|
1320
|
+
return "{}";
|
|
1321
|
+
},
|
|
1322
|
+
setConfiguration: function () {
|
|
1323
|
+
},
|
|
1324
|
+
filter: function () {
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1344
1327
|
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1328
|
+
oGetGroupsDeferred.resolve([]);
|
|
1329
|
+
} else {
|
|
1330
|
+
var oPageSetsPromise = PageBuildingService.getPageSet(sDEFAULT_PAGE_ID);
|
|
1331
|
+
|
|
1332
|
+
oPageSetsPromise
|
|
1333
|
+
.fail(oDeferred.reject.bind(oDeferred))
|
|
1334
|
+
.done(function (oPageSet) {
|
|
1335
|
+
this._oCurrentPageSet = oPageSet;
|
|
1336
|
+
// remove unsupported pages before loading their chip instances
|
|
1337
|
+
this._oCurrentPageSet.filter([sDEFAULT_PAGE_ID], [sDEFAULT_CATALOG_ID]);
|
|
1338
|
+
// Trigger load of all CHIP instances, but wait for the locals only
|
|
1339
|
+
this._loadApplaunchersAndDelayLoadingOfOtherChips(oPageSet.getPages(), oDeferred.resolve.bind(oDeferred, oPageSet));
|
|
1340
|
+
}.bind(this));
|
|
1341
|
+
|
|
1342
|
+
jQuery.when(oMappingPromise, oDeferred)
|
|
1343
|
+
.done(function (oTargetMappings, oPageSet) {
|
|
1344
|
+
this._bPageSetFullyLoaded = true;
|
|
1345
|
+
|
|
1346
|
+
if (jQuery.sap.log.getLevel() >= jQuery.sap.log.Level.DEBUG) { // sap-ui-debug = true
|
|
1347
|
+
this._findAndReportTileErrors(oPageSet.getPages(), oTargetMappingSupport);
|
|
1348
|
+
}
|
|
1348
1349
|
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1350
|
+
oGetGroupsDeferred.resolve(getOrderedPages());
|
|
1351
|
+
}.bind(this))
|
|
1352
|
+
.fail(oGetGroupsDeferred.reject.bind(oGetGroupsDeferred));
|
|
1353
|
+
}
|
|
1354
|
+
}.bind(this));
|
|
1353
1355
|
}
|
|
1354
1356
|
|
|
1355
1357
|
return oGetGroupsDeferred.promise();
|
|
@@ -1358,7 +1360,7 @@ sap.ui.define([
|
|
|
1358
1360
|
/**
|
|
1359
1361
|
* Returns the default group. This is an asynchronous function using a jQuery.Promise.
|
|
1360
1362
|
* In case of success its <code>done</code> function is called and gets the
|
|
1361
|
-
* <code>sap.ui2.
|
|
1363
|
+
* <code>sap.ushell_abap.pbServices.ui2.Page</code> object representing the default group.
|
|
1362
1364
|
*
|
|
1363
1365
|
* In case of error the promise's <code>fail</code> function is called.
|
|
1364
1366
|
*
|
|
@@ -1379,7 +1381,7 @@ sap.ui.define([
|
|
|
1379
1381
|
/**
|
|
1380
1382
|
* Returns the title of the given group.
|
|
1381
1383
|
*
|
|
1382
|
-
* @param {sap.ui2.
|
|
1384
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oGroup the group (as received via #getGroups())
|
|
1383
1385
|
* @returns {string} the group title
|
|
1384
1386
|
* @since 1.11.0
|
|
1385
1387
|
*/
|
|
@@ -1390,7 +1392,7 @@ sap.ui.define([
|
|
|
1390
1392
|
/**
|
|
1391
1393
|
* Returns the unique identifier of the given group.
|
|
1392
1394
|
*
|
|
1393
|
-
* @param {sap.ui2.
|
|
1395
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oGroup the group (as received via #getGroups())
|
|
1394
1396
|
* @returns {string} the group id
|
|
1395
1397
|
* @since 1.11.0
|
|
1396
1398
|
*/
|
|
@@ -1401,8 +1403,8 @@ sap.ui.define([
|
|
|
1401
1403
|
/**
|
|
1402
1404
|
* Returns the tiles of the given group.
|
|
1403
1405
|
*
|
|
1404
|
-
* @param {sap.ui2.
|
|
1405
|
-
* @returns {sap.ui2.
|
|
1406
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oGroup the group
|
|
1407
|
+
* @returns {sap.ushell_abap.pbServices.ui2.ChipInstance[]} the tiles in the order to be displayed.
|
|
1406
1408
|
* @since 1.11.0
|
|
1407
1409
|
*/
|
|
1408
1410
|
this.getGroupTiles = function (oGroup) {
|
|
@@ -1419,12 +1421,12 @@ sap.ui.define([
|
|
|
1419
1421
|
|
|
1420
1422
|
/**
|
|
1421
1423
|
* Adds a new group. This is an asynchronous function using a jQuery.Promise.
|
|
1422
|
-
* In case of success its <code>done</code> function is called and gets the added group as a <code>sap.ui2.
|
|
1424
|
+
* In case of success its <code>done</code> function is called and gets the added group as a <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1423
1425
|
*
|
|
1424
1426
|
* Intention: the page builder adds this group to the end of the home screen.
|
|
1425
1427
|
*
|
|
1426
1428
|
* In case of error the promise's <code>fail</code> function is called and gets the
|
|
1427
|
-
* consistent backend state of all groups as array of <code>sap.ui2.
|
|
1429
|
+
* consistent backend state of all groups as array of <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1428
1430
|
*
|
|
1429
1431
|
* @param {string} sTitle the title of the new group
|
|
1430
1432
|
* @returns {object} a jQuery.Promise.
|
|
@@ -1445,7 +1447,7 @@ sap.ui.define([
|
|
|
1445
1447
|
* In case of success its <code>done</code> function is called.
|
|
1446
1448
|
*
|
|
1447
1449
|
* In case of error the promise's <code>fail</code> function is called and gets the
|
|
1448
|
-
* consistent backend state of all groups as array of <code>sap.ui2.
|
|
1450
|
+
* consistent backend state of all groups as array of <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1449
1451
|
*
|
|
1450
1452
|
* @param {object} oGroup the group to be removed
|
|
1451
1453
|
* @returns {object} a jQuery.Promise
|
|
@@ -1469,9 +1471,9 @@ sap.ui.define([
|
|
|
1469
1471
|
* This is an asynchronous function using a jQuery.Promise. In case of success its <code>done</code> function is called.
|
|
1470
1472
|
*
|
|
1471
1473
|
* In case of error the promise's <code>fail</code> function is called and gets the
|
|
1472
|
-
* consistent backend state of all groups as array of <code>sap.ui2.
|
|
1474
|
+
* consistent backend state of all groups as array of <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1473
1475
|
*
|
|
1474
|
-
* @param {sap.ui2.
|
|
1476
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oGroup the group to be reset
|
|
1475
1477
|
* @returns {object} a jQuery.Promise
|
|
1476
1478
|
* @since 1.11.0
|
|
1477
1479
|
*/
|
|
@@ -1548,7 +1550,7 @@ sap.ui.define([
|
|
|
1548
1550
|
*
|
|
1549
1551
|
* <p>This function will log a warning if a falsy value is returned.
|
|
1550
1552
|
*
|
|
1551
|
-
* @param {sap.ui2.
|
|
1553
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the group tile or catalog tile
|
|
1552
1554
|
* @returns {boolean} <code>true</code> if the tile's target intent is supported
|
|
1553
1555
|
* @since 1.21.0
|
|
1554
1556
|
*/
|
|
@@ -1586,8 +1588,8 @@ sap.ui.define([
|
|
|
1586
1588
|
/**
|
|
1587
1589
|
* Implements the functionality described in the public <code>#isTileIntentSupported</code> without logging.
|
|
1588
1590
|
*
|
|
1589
|
-
* @param {sap.ui2.
|
|
1590
|
-
* @param {sap.ui2.
|
|
1591
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the group tile or catalog tile
|
|
1592
|
+
* @param {sap.ushell_abap.pbServices.ui2.Map} oTargetMappingSupport the tile target mapping support
|
|
1591
1593
|
* @returns {object} An object reporting the support of the tile intent that
|
|
1592
1594
|
* looks like the following objects based on whether the tile intent is supported:
|
|
1593
1595
|
* <pre>
|
|
@@ -1658,7 +1660,7 @@ sap.ui.define([
|
|
|
1658
1660
|
// the assumption is that currently launcher tiles are always local CHIPs and for those getGroups is waiting.
|
|
1659
1661
|
// Thus this Error should newer be reached.
|
|
1660
1662
|
// If stub launchers shall be supported, it must found a way how to decided if they are supported.
|
|
1661
|
-
throw new
|
|
1663
|
+
throw new SrvcError("Applauncher Tile not loaded completely",
|
|
1662
1664
|
"sap.ushell_abap.adapters.abap.LaunchPageAdapter");
|
|
1663
1665
|
}
|
|
1664
1666
|
|
|
@@ -1703,7 +1705,7 @@ sap.ui.define([
|
|
|
1703
1705
|
* Moves a group to a new index. This is an asynchronous function using a jQuery.Promise.
|
|
1704
1706
|
* In case of success its <code>done</code> function is called.
|
|
1705
1707
|
* In case of error the promise's <code>fail</code> function is called and gets the
|
|
1706
|
-
* consistent backend state of all groups as array of <code>sap.ui2.
|
|
1708
|
+
* consistent backend state of all groups as array of <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1707
1709
|
*
|
|
1708
1710
|
* @param {object} oGroup the group to be moved
|
|
1709
1711
|
* @param {integer} iNewIndex the new index for the group
|
|
@@ -1766,12 +1768,12 @@ sap.ui.define([
|
|
|
1766
1768
|
/**
|
|
1767
1769
|
* Adds a tile to the end of a group. The group is optional. If no group is given, use the default group.
|
|
1768
1770
|
* This is an asynchronous function using a jQuery.Promise.
|
|
1769
|
-
* In case of success its <code>done</code> function is called and gets the new tile as a <code>sap.ui2.
|
|
1771
|
+
* In case of success its <code>done</code> function is called and gets the new tile as a <code>sap.ushell_abap.pbServices.ui2.ChipInstance</code>.
|
|
1770
1772
|
* In case of error the promise's <code>fail</code> function is called and gets the
|
|
1771
|
-
* consistent backend state of all groups as array of <code>sap.ui2.
|
|
1773
|
+
* consistent backend state of all groups as array of <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1772
1774
|
*
|
|
1773
|
-
* @param {sap.ui2.
|
|
1774
|
-
* @param {sap.ui2.
|
|
1775
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oCatalogTile an 'anonymous' catalog tile from the catalog browser
|
|
1776
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} [oGroup] the group
|
|
1775
1777
|
* @returns {object} a jQuery.Promise
|
|
1776
1778
|
* @since 1.11.0
|
|
1777
1779
|
*/
|
|
@@ -1800,10 +1802,10 @@ sap.ui.define([
|
|
|
1800
1802
|
* Removes the given tile from the given group. This is an asynchronous function using a jQuery.Promise.
|
|
1801
1803
|
* In case of success its <code>done</code> function is called.
|
|
1802
1804
|
* In case of error the promise's <code>fail</code> function is called and gets the
|
|
1803
|
-
* consistent backend state of all groups as array of <code>sap.ui2.
|
|
1805
|
+
* consistent backend state of all groups as array of <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1804
1806
|
*
|
|
1805
|
-
* @param {sap.ui2.
|
|
1806
|
-
* @param {sap.ui2.
|
|
1807
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oGroup the group containing the tile
|
|
1808
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the tile
|
|
1807
1809
|
* @returns {object} a jQuery.Promise
|
|
1808
1810
|
* @since 1.11.0
|
|
1809
1811
|
*/
|
|
@@ -1820,31 +1822,25 @@ sap.ui.define([
|
|
|
1820
1822
|
* Moves a tile to another location in the same or a different group. This is an asynchronous function using a jQuery.Promise.
|
|
1821
1823
|
* In case of success its <code>done</code> function is called and gets the new target tile (which may be identical).
|
|
1822
1824
|
* In case of error the promise's <code>fail</code> function is called and gets the
|
|
1823
|
-
* consistent backend state of all groups as array of <code>sap.ui2.
|
|
1825
|
+
* consistent backend state of all groups as array of <code>sap.ushell_abap.pbServices.ui2.Page</code>.
|
|
1824
1826
|
*
|
|
1825
|
-
* @param {sap.ui2.
|
|
1827
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the tile to be moved
|
|
1826
1828
|
* @param {integer} iSourceIndex the index in the source group
|
|
1827
1829
|
* @param {integer} iTargetIndex the index in the target group, in case this parameter is not supplied we assume the
|
|
1828
1830
|
* move tile is within the source group using iSourceIndex
|
|
1829
|
-
* @param {sap.ui2.
|
|
1830
|
-
* @param {sap.ui2.
|
|
1831
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} oSourceGroup the tile's group
|
|
1832
|
+
* @param {sap.ushell_abap.pbServices.ui2.Page} [oTargetGroup] the group the tile will be placed in or tile's group if not supplied
|
|
1831
1833
|
* @param {string} [sNewTileType] (added with 1.60) The new type of the tile
|
|
1832
|
-
* @returns {
|
|
1834
|
+
* @returns {jQuery.Promise} A jQuery.Promise
|
|
1833
1835
|
* @since 1.11.0
|
|
1834
1836
|
*/
|
|
1835
1837
|
this.moveTile = function (oTile, iSourceIndex, iTargetIndex, oSourceGroup, oTargetGroup, sNewTileType) {
|
|
1836
1838
|
var oDeferred = new jQuery.Deferred(),
|
|
1837
1839
|
bIsWrapperOnly = this._isWrapperOnly(oTile),
|
|
1838
|
-
|
|
1839
|
-
oBagsContents = new sap.ui2.srvc.Map(),
|
|
1840
|
+
oBagsContents = new Utils.Map(),
|
|
1840
1841
|
oCreatedChipInstance,
|
|
1841
|
-
aBagIds,
|
|
1842
|
-
oSourceLayout,
|
|
1843
|
-
oTargetLayout,
|
|
1844
|
-
aTargetChipInstances,
|
|
1845
1842
|
fnFailure = oDeferred.reject.bind(oDeferred, getOrderedPages()),
|
|
1846
|
-
iCalls = 2
|
|
1847
|
-
sOldTileType;
|
|
1843
|
+
iCalls = 2;
|
|
1848
1844
|
|
|
1849
1845
|
function resolveMoveBetweenGroups (oNewChipInstance) {
|
|
1850
1846
|
iCalls -= 1;
|
|
@@ -1860,9 +1856,10 @@ sap.ui.define([
|
|
|
1860
1856
|
if (!oTargetGroup) {
|
|
1861
1857
|
oTargetGroup = oSourceGroup;
|
|
1862
1858
|
}
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1859
|
+
|
|
1860
|
+
var oSourceLayout = calculateCurrentLayout(oSourceGroup, this);
|
|
1861
|
+
var oTargetLayout = calculateCurrentLayout(oTargetGroup, this);
|
|
1862
|
+
var sOldTileType = this.getTileType(oTile);
|
|
1866
1863
|
|
|
1867
1864
|
iSourceIndex = removeFromLayout(oSourceLayout, oTile, sOldTileType);
|
|
1868
1865
|
if (iSourceIndex < 0) {
|
|
@@ -1875,74 +1872,78 @@ sap.ui.define([
|
|
|
1875
1872
|
addToLayout(oSourceLayout, oTile.getId(), iTargetIndex, sNewTileType);
|
|
1876
1873
|
oSourceGroup.setLayout(JSON.stringify(oSourceLayout), oDeferred.resolve.bind(oDeferred, oTile), fnFailure);
|
|
1877
1874
|
} else {
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
aBagIds = oTile.getBagIds();
|
|
1882
|
-
aBagIds.forEach(function (sBagId) {
|
|
1883
|
-
var oBagContent = {
|
|
1884
|
-
texts: [],
|
|
1885
|
-
properties: []
|
|
1886
|
-
},
|
|
1887
|
-
oBag = oTile.getBag(sBagId);
|
|
1888
|
-
// ignore contents of CHIP bags
|
|
1889
|
-
oBag.getOwnTextNames().forEach(function (sName) {
|
|
1890
|
-
oBagContent.texts.push({ name: sName, value: oBag.getText(sName) });
|
|
1891
|
-
});
|
|
1892
|
-
oBag.getOwnPropertyNames().forEach(function (sName) {
|
|
1893
|
-
oBagContent.properties.push({ name: sName, value: oBag.getProperty(sName) });
|
|
1894
|
-
});
|
|
1895
|
-
if (oBagContent.texts.length > 0 || oBagContent.properties.length > 0) {
|
|
1896
|
-
oBagsContents.put(sBagId, oBagContent);
|
|
1897
|
-
}
|
|
1898
|
-
});
|
|
1899
|
-
|
|
1900
|
-
// one $batch to add tile to target group, remove old tile, update layout of source group
|
|
1901
|
-
oPbs.openBatchQueue();
|
|
1875
|
+
sap.ushell.Container.getServiceAsync("PageBuilding")
|
|
1876
|
+
.then(function (PageBuildingService) {
|
|
1877
|
+
var oActualPageBuildingService = PageBuildingService.getFactory().getPageBuildingService();
|
|
1902
1878
|
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
function (oNewChipInstance) {
|
|
1906
|
-
var oCurrentBag, oBagContent;
|
|
1907
|
-
aTargetChipInstances.splice(iTargetIndex, 0, oNewChipInstance);
|
|
1908
|
-
// Note: additional requests after the $batch required, because new ID was previously unknown.
|
|
1909
|
-
// So this requests could not be batched together
|
|
1910
|
-
|
|
1911
|
-
// Add bags to CHIP instance in target group
|
|
1879
|
+
// store bag contents for later storing them in the new CHIP instances
|
|
1880
|
+
var aBagIds = oTile.getBagIds();
|
|
1912
1881
|
aBagIds.forEach(function (sBagId) {
|
|
1913
|
-
oBagContent =
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1882
|
+
var oBagContent = {
|
|
1883
|
+
texts: [],
|
|
1884
|
+
properties: []
|
|
1885
|
+
},
|
|
1886
|
+
oBag = oTile.getBag(sBagId);
|
|
1887
|
+
// ignore contents of CHIP bags
|
|
1888
|
+
oBag.getOwnTextNames().forEach(function (sName) {
|
|
1889
|
+
oBagContent.texts.push({ name: sName, value: oBag.getText(sName) });
|
|
1890
|
+
});
|
|
1891
|
+
oBag.getOwnPropertyNames().forEach(function (sName) {
|
|
1892
|
+
oBagContent.properties.push({ name: sName, value: oBag.getProperty(sName) });
|
|
1893
|
+
});
|
|
1894
|
+
if (oBagContent.texts.length > 0 || oBagContent.properties.length > 0) {
|
|
1895
|
+
oBagsContents.put(sBagId, oBagContent);
|
|
1927
1896
|
}
|
|
1928
1897
|
});
|
|
1929
|
-
// update order of tiles, which is stored in the layout property
|
|
1930
|
-
addToLayout(oTargetLayout, oNewChipInstance.getId(), iTargetIndex, sNewTileType);
|
|
1931
|
-
oTargetGroup.setLayout(JSON.stringify(oTargetLayout),
|
|
1932
|
-
resolveMoveBetweenGroups.bind(this, oNewChipInstance), fnFailure);
|
|
1933
|
-
}, fnFailure, oTile.isStub()); // do not load the tile if first load failed
|
|
1934
|
-
oSourceGroup.removeChipInstance(oTile, resolveMoveBetweenGroups, fnFailure);
|
|
1935
|
-
oSourceGroup.setLayout(JSON.stringify(oSourceLayout), /*fnSuccess*/undefined, fnFailure);
|
|
1936
1898
|
|
|
1937
|
-
|
|
1899
|
+
// one $batch to add tile to target group, remove old tile, update layout of source group
|
|
1900
|
+
oActualPageBuildingService.openBatchQueue();
|
|
1901
|
+
|
|
1902
|
+
var aTargetChipInstances = this.getGroupTiles(oTargetGroup);
|
|
1903
|
+
|
|
1904
|
+
oTargetGroup.addChipInstance(bIsWrapperOnly ? oTile.getChip() : oTile, function (oNewChipInstance) {
|
|
1905
|
+
var oCurrentBag, oBagContent;
|
|
1906
|
+
aTargetChipInstances.splice(iTargetIndex, 0, oNewChipInstance);
|
|
1907
|
+
// Note: additional requests after the $batch required, because new ID was previously unknown.
|
|
1908
|
+
// So this requests could not be batched together
|
|
1909
|
+
|
|
1910
|
+
// Add bags to CHIP instance in target group
|
|
1911
|
+
aBagIds.forEach(function (sBagId) {
|
|
1912
|
+
oBagContent = oBagsContents.get(sBagId);
|
|
1913
|
+
if (oBagContent) {
|
|
1914
|
+
oCurrentBag = oNewChipInstance.getBag(sBagId);
|
|
1915
|
+
oBagContent.texts.forEach(function (oText) {
|
|
1916
|
+
oCurrentBag.setText(oText.name, oText.value);
|
|
1917
|
+
});
|
|
1918
|
+
oBagContent.properties.forEach(function (oProperty) {
|
|
1919
|
+
oCurrentBag.setProperty(oProperty.name, oProperty.value);
|
|
1920
|
+
});
|
|
1921
|
+
oCurrentBag.save(function () {
|
|
1922
|
+
// don't wait for the save operation for performance reasons
|
|
1923
|
+
}, function () {
|
|
1924
|
+
jQuery.sap.log.error("Bag " + sBagId + ": could not be saved", null, sCOMPONENT);
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
});
|
|
1928
|
+
// update order of tiles which is stored in the layout property
|
|
1929
|
+
addToLayout(oTargetLayout, oNewChipInstance.getId(), iTargetIndex, sNewTileType);
|
|
1930
|
+
oTargetGroup.setLayout(JSON.stringify(oTargetLayout), resolveMoveBetweenGroups.bind(this, oNewChipInstance), fnFailure);
|
|
1931
|
+
}, fnFailure, oTile.isStub()); // do not load the tile if first load failed
|
|
1932
|
+
|
|
1933
|
+
oSourceGroup.removeChipInstance(oTile, resolveMoveBetweenGroups, fnFailure);
|
|
1934
|
+
oSourceGroup.setLayout(JSON.stringify(oSourceLayout), /*fnSuccess*/undefined, fnFailure);
|
|
1935
|
+
|
|
1936
|
+
oActualPageBuildingService.submitBatchQueue(undefined, fnFailure);
|
|
1937
|
+
}.bind(this));
|
|
1938
1938
|
}
|
|
1939
|
+
|
|
1939
1940
|
return oDeferred.promise();
|
|
1940
1941
|
};
|
|
1941
1942
|
|
|
1942
1943
|
/**
|
|
1943
1944
|
* Returns the tile's unique identifier
|
|
1944
1945
|
*
|
|
1945
|
-
* @param {sap.ui2.
|
|
1946
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the tile
|
|
1946
1947
|
* @returns {string} the id
|
|
1947
1948
|
* @since 1.11.0
|
|
1948
1949
|
*/
|
|
@@ -1953,7 +1954,7 @@ sap.ui.define([
|
|
|
1953
1954
|
/**
|
|
1954
1955
|
* Returns the CHIP's type. This is even possible if the tile is not fully loaded so far.
|
|
1955
1956
|
*
|
|
1956
|
-
* @param {sap.ui2.
|
|
1957
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance the CHIP instance
|
|
1957
1958
|
* @returns {string} the type. either <code>"tile"</code> or <code>"link"</code> or <code>"card"</code>.
|
|
1958
1959
|
* @since 1.32.0
|
|
1959
1960
|
*/
|
|
@@ -1989,7 +1990,7 @@ sap.ui.define([
|
|
|
1989
1990
|
/**
|
|
1990
1991
|
* Returns a promise for the card's manifest. The promise is resolved synchronously.
|
|
1991
1992
|
*
|
|
1992
|
-
* @param {sap.ui2.
|
|
1993
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} card the CHIP instance
|
|
1993
1994
|
* @returns {object} The card's manifest
|
|
1994
1995
|
* @private
|
|
1995
1996
|
*/
|
|
@@ -2013,7 +2014,7 @@ sap.ui.define([
|
|
|
2013
2014
|
/**
|
|
2014
2015
|
* Returns the tile's title.
|
|
2015
2016
|
*
|
|
2016
|
-
* @param {sap.ui2.
|
|
2017
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the tile
|
|
2017
2018
|
* @returns {string} the title, might be <code>undefined</code> if tile has not finished loading (see {@link #getTileView}).
|
|
2018
2019
|
* @since 1.11.0
|
|
2019
2020
|
*/
|
|
@@ -2028,7 +2029,7 @@ sap.ui.define([
|
|
|
2028
2029
|
* <br>
|
|
2029
2030
|
* Note: this function became async since 1.23.0.
|
|
2030
2031
|
*
|
|
2031
|
-
* @param {sap.ui2.
|
|
2032
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile The tile's chip data
|
|
2032
2033
|
* @returns {object} jQuery.Promise object that is resolved to an instance of sap.m.GenericTile
|
|
2033
2034
|
* @since 1.11.0
|
|
2034
2035
|
*/
|
|
@@ -2096,7 +2097,7 @@ sap.ui.define([
|
|
|
2096
2097
|
// For AppLaunchers, there is an optimization (requested by RT) to call it sync
|
|
2097
2098
|
// as the resources are already bundled and loaded at startup.
|
|
2098
2099
|
// As a result, the Home will initially at least display app launchers.
|
|
2099
|
-
|
|
2100
|
+
Utils.callHandler(doResolve, doReject, /*async*/!isAppLauncher(oTile));
|
|
2100
2101
|
} else { // failed
|
|
2101
2102
|
doReject();
|
|
2102
2103
|
}
|
|
@@ -2118,7 +2119,7 @@ sap.ui.define([
|
|
|
2118
2119
|
/**
|
|
2119
2120
|
* Returns the tile size in the format <code>1x1</code> or <code>1x2</code>.
|
|
2120
2121
|
*
|
|
2121
|
-
* @param {sap.ui2.
|
|
2122
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the tile
|
|
2122
2123
|
* @returns {string} the tile size
|
|
2123
2124
|
* @since 1.11.0
|
|
2124
2125
|
*/
|
|
@@ -2132,7 +2133,7 @@ sap.ui.define([
|
|
|
2132
2133
|
* Refresh a tile with its latest data.
|
|
2133
2134
|
* Only dynamic data should be updated, not the tile configuration itself.
|
|
2134
2135
|
*
|
|
2135
|
-
* @param {sap.ui2.
|
|
2136
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the tile
|
|
2136
2137
|
*/
|
|
2137
2138
|
this.refreshTile = function (oTile) {
|
|
2138
2139
|
oTile.refresh();
|
|
@@ -2241,20 +2242,23 @@ sap.ui.define([
|
|
|
2241
2242
|
* but with the advantage of improved responsiveness.
|
|
2242
2243
|
*
|
|
2243
2244
|
* @example
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2247
|
-
*
|
|
2248
|
-
*
|
|
2249
|
-
*
|
|
2250
|
-
*
|
|
2251
|
-
*
|
|
2252
|
-
*
|
|
2253
|
-
*
|
|
2245
|
+
* sap.ushell.Container.getServiceAsync("LaunchPage")
|
|
2246
|
+
* .then(function (LaunchPageService) {
|
|
2247
|
+
* LaunchPageService.getCatalogs()
|
|
2248
|
+
* .fail(function (sErrorMessage) { // string
|
|
2249
|
+
* // handle error situation
|
|
2250
|
+
* })
|
|
2251
|
+
* .progress(function (oCatalog) { // object
|
|
2252
|
+
* // do s.th. with single catalog
|
|
2253
|
+
* })
|
|
2254
|
+
* .done(function (aCatalogs) { // object[]
|
|
2255
|
+
* aCatalogs.forEach(function (oCatalog) {
|
|
2256
|
+
* // do s.th. with single catalog
|
|
2257
|
+
* });
|
|
2258
|
+
* });
|
|
2254
2259
|
* });
|
|
2255
|
-
* });
|
|
2256
2260
|
*
|
|
2257
|
-
* @returns {
|
|
2261
|
+
* @returns {jQuery.Promise} A jQuery Promise which informs about success or failure
|
|
2258
2262
|
* of this asynchronous operation. In case of success, an array of black-box catalog objects is provided (which might be empty).
|
|
2259
2263
|
* In case of failure, an error message is passed. Progress notifications are sent for each single catalog,
|
|
2260
2264
|
* providing a single black-box catalog object each time.
|
|
@@ -2265,146 +2269,182 @@ sap.ui.define([
|
|
|
2265
2269
|
oOldGetCatalogsDeferred = oGetCatalogsDeferred,
|
|
2266
2270
|
bRefreshRequired = bCatalogsValid === false;
|
|
2267
2271
|
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2272
|
+
// Note: bCatalogsValid can be undefined, false, true
|
|
2273
|
+
if (oOldGetCatalogsDeferred && !oOldGetCatalogsDeferred.$notified && !bRefreshRequired) {
|
|
2274
|
+
// re-use existing Deferred object; we cannot miss any notifications!
|
|
2275
|
+
oDeferred = oOldGetCatalogsDeferred;
|
|
2276
|
+
} else {
|
|
2277
|
+
oGetCatalogsDeferred = new jQuery.Deferred();
|
|
2278
|
+
oDeferred = oGetCatalogsDeferred;
|
|
2279
|
+
oDeferred
|
|
2280
|
+
.done(function () {
|
|
2281
|
+
if (oDeferred === oGetCatalogsDeferred) {
|
|
2282
|
+
// only the last call is allowed to change "global" variables
|
|
2283
|
+
bCatalogsValid = true;
|
|
2284
|
+
}
|
|
2285
|
+
})
|
|
2286
|
+
.always(function () {
|
|
2287
|
+
if (oDeferred === oGetCatalogsDeferred) {
|
|
2288
|
+
// only the last call is allowed to change "global" variables
|
|
2289
|
+
oGetCatalogsDeferred = null;
|
|
2290
|
+
}
|
|
2291
|
+
});
|
|
2284
2292
|
|
|
2285
|
-
|
|
2293
|
+
if (oOldGetCatalogsDeferred) {
|
|
2294
|
+
if (bRefreshRequired) {
|
|
2295
|
+
bCatalogsValid = undefined; // not yet valid, refresh is in progress...
|
|
2296
|
+
}
|
|
2297
|
+
// if we cannot reuse the old Deferred object, wait until it is done;
|
|
2298
|
+
// after invalidation, wait until old operations are complete and then start a new roundtrip
|
|
2299
|
+
oOldGetCatalogsDeferred
|
|
2300
|
+
.always(function () {
|
|
2301
|
+
this._startLoading(oDeferred, bRefreshRequired);
|
|
2302
|
+
}.bind(this));
|
|
2303
|
+
} else {
|
|
2304
|
+
this._startLoading(oDeferred, bRefreshRequired);
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2286
2307
|
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2308
|
+
return oDeferred.promise();
|
|
2309
|
+
};
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* Resolves the promise to return the user's catalogs by refreshing the first remote catalog found, failing gracefully.
|
|
2313
|
+
*
|
|
2314
|
+
* @param {jQuery.Deferred} oDeferred A jQuery.Deferred to be resolved, rejected or notified.
|
|
2315
|
+
* @returns {Promise<sap.ushell.services.PageBuilding>} A promise that is resolved once the PageBuilding service is retrieved.
|
|
2316
|
+
* @private
|
|
2317
|
+
*/
|
|
2318
|
+
this._refreshRemoteCatalogs = function (oDeferred) {
|
|
2319
|
+
return sap.ushell.Container.getServiceAsync("PageBuilding")
|
|
2320
|
+
.then(function (PageBuildingService) {
|
|
2321
|
+
var iPendingRequests = 0;
|
|
2322
|
+
var oFactory = PageBuildingService.getFactory();
|
|
2323
|
+
var aWrappedCatalogs = wrapCatalogs(oFactory);
|
|
2324
|
+
|
|
2325
|
+
aWrappedCatalogs.forEach(function (oWrappedCatalog) {
|
|
2326
|
+
var oCatalog = oWrappedCatalog.ui2catalog;
|
|
2327
|
+
// TODO Improve performance: One invalid remote catalog causes refresh of all
|
|
2328
|
+
if (oCatalog.isStub() || oCatalog.getType() === "H" || oCatalog.getType() === "REMOTE") {
|
|
2329
|
+
iPendingRequests += 1;
|
|
2330
|
+
|
|
2331
|
+
oCatalog.refresh(function () {
|
|
2332
|
+
oWrappedCatalog.title = oCatalog.getTitle();
|
|
2333
|
+
oWrappedCatalog.tiles = wrapAsChipInstances(oFactory, oCatalog.getChips());
|
|
2334
|
+
// TODO oRemoteCatalogWrapper.errorMessage once wrappers are cached
|
|
2335
|
+
|
|
2336
|
+
oDeferred.notify(oWrappedCatalog);
|
|
2337
|
+
|
|
2338
|
+
iPendingRequests -= 1;
|
|
2339
|
+
if (iPendingRequests <= 0) {
|
|
2340
|
+
oDeferred.resolve(aWrappedCatalogs);
|
|
2341
|
+
}
|
|
2342
|
+
}, function (sMessage) {
|
|
2343
|
+
// log errors, but do not fail
|
|
2344
|
+
jQuery.sap.log.error("Failed to load catalog: " + sMessage, oCatalog.toString(), sCOMPONENT);
|
|
2345
|
+
oWrappedCatalog.errorMessage = sMessage || "Error"; // not undefined!
|
|
2296
2346
|
|
|
2347
|
+
oDeferred.notify(oWrappedCatalog);
|
|
2348
|
+
|
|
2349
|
+
iPendingRequests -= 1;
|
|
2350
|
+
if (iPendingRequests <= 0) {
|
|
2351
|
+
oDeferred.resolve(aWrappedCatalogs);
|
|
2352
|
+
}
|
|
2353
|
+
});
|
|
2354
|
+
} else {
|
|
2297
2355
|
oDeferred.notify(oWrappedCatalog);
|
|
2356
|
+
oDeferred.$notified = true; // notifications have already been sent
|
|
2357
|
+
}
|
|
2358
|
+
});
|
|
2298
2359
|
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
oDeferred.resolve(aWrappedCatalogs);
|
|
2302
|
-
}
|
|
2303
|
-
});
|
|
2304
|
-
} else {
|
|
2305
|
-
oDeferred.notify(oWrappedCatalog);
|
|
2306
|
-
oDeferred.$notified = true; // notifications have already been sent
|
|
2360
|
+
if (iPendingRequests <= 0) {
|
|
2361
|
+
oDeferred.resolve(aWrappedCatalogs);
|
|
2307
2362
|
}
|
|
2308
2363
|
});
|
|
2364
|
+
};
|
|
2309
2365
|
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2366
|
+
/**
|
|
2367
|
+
* Resolves the promise to return the user's catalogs...by just knowing them already.
|
|
2368
|
+
*
|
|
2369
|
+
* @param {jQuery.Deferred} oDeferred A jQuery.Deferred to be resolved, rejected or notified.
|
|
2370
|
+
* @returns {Promise<sap.ushell.services.PageBuilding>} A promise that is resolved once the PageBuilding service is retrieved.
|
|
2371
|
+
* @private
|
|
2372
|
+
*/
|
|
2373
|
+
this._useKnownCatalogs = function (oDeferred) {
|
|
2374
|
+
return sap.ushell.Container.getServiceAsync("PageBuilding")
|
|
2375
|
+
.then(function (PageBuildingService) {
|
|
2376
|
+
var aWrappedCatalogs = wrapCatalogs(PageBuildingService.getFactory());
|
|
2314
2377
|
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
function useKnownCatalogs () {
|
|
2319
|
-
var aWrappedCatalogs = wrapCatalogs();
|
|
2378
|
+
aWrappedCatalogs.forEach(function (oWrappedCatalog) {
|
|
2379
|
+
oDeferred.notify(oWrappedCatalog);
|
|
2380
|
+
});
|
|
2320
2381
|
|
|
2321
|
-
|
|
2322
|
-
oDeferred.notify(oWrappedCatalog);
|
|
2382
|
+
oDeferred.resolve(aWrappedCatalogs);
|
|
2323
2383
|
});
|
|
2384
|
+
};
|
|
2324
2385
|
|
|
2325
|
-
|
|
2326
|
-
|
|
2386
|
+
/**
|
|
2387
|
+
* Resolves the promise to return the user's catalogs either by loading them, refreshing them, or just knowing them already.
|
|
2388
|
+
*
|
|
2389
|
+
* @param {jQuery.Deferred} oDeferred A jQuery.Deferred to be resolved, rejected or notified.
|
|
2390
|
+
* @param {boolean} bRefreshRequired Whether or not the catalogs should be loaded again.
|
|
2391
|
+
* @private
|
|
2392
|
+
*/
|
|
2393
|
+
this._doGetCatalogs = function (oDeferred, bRefreshRequired) {
|
|
2394
|
+
var oAllCatalogs = this._oCurrentPageSet.getDefaultPage().getAllCatalogs();
|
|
2327
2395
|
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
if (oAllCatalogs.isStub()) {
|
|
2337
|
-
oAllCatalogs.load(refreshRemoteCatalogs, oDeferred.reject.bind(oDeferred),
|
|
2338
|
-
"type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG'" +
|
|
2339
|
-
" or type eq 'REMOTE'",
|
|
2340
|
-
/*bPartially*/true, /*sorting field*/ "title", /*useCache*/ true);
|
|
2341
|
-
} else {
|
|
2342
|
-
// Make sure that oDeferred is not notified _before_ progress handler has been registered!
|
|
2343
|
-
// Delay calls in case we are still synchronous!
|
|
2344
|
-
sap.ui2.srvc.call(
|
|
2345
|
-
bRefreshRequired ? refreshRemoteCatalogs : useKnownCatalogs,
|
|
2346
|
-
oDeferred.reject.bind(oDeferred),
|
|
2347
|
-
bSynchronous // = bAsync
|
|
2348
|
-
);
|
|
2349
|
-
}
|
|
2396
|
+
if (oAllCatalogs.isStub()) {
|
|
2397
|
+
oAllCatalogs.load(function () {
|
|
2398
|
+
this._refreshRemoteCatalogs(oDeferred);
|
|
2399
|
+
}.bind(this), oDeferred.reject, "type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG' or type eq 'REMOTE'", true, "title", true);
|
|
2400
|
+
} else if (bRefreshRequired) {
|
|
2401
|
+
this._refreshRemoteCatalogs(oDeferred);
|
|
2402
|
+
} else {
|
|
2403
|
+
this._useKnownCatalogs(oDeferred);
|
|
2350
2404
|
}
|
|
2405
|
+
};
|
|
2351
2406
|
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
var oCacheTokens = sap.ushell.Container.getService("PageBuilding").getFactory().getPageBuildingService()
|
|
2362
|
-
.readAllCatalogs.cacheBusterTokens;
|
|
2363
|
-
oCacheTokens.put(sDEFAULT_PAGE_ID, oTargetMappingServiceConfig.cacheId);
|
|
2364
|
-
if (Config.last("/core/spaces/enabled")) {
|
|
2365
|
-
oCacheTokens.put(PAGE_ID_WITHOUT_TM, oTargetMappingServiceConfig.cacheId);
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2407
|
+
/**
|
|
2408
|
+
* Starts loading of catalogs, after parallel calls and invalidation have been taken care of.
|
|
2409
|
+
*
|
|
2410
|
+
* @param {jQuery.Deferred} oDeferred A jQuery.Deferred to be resolved, rejected or notified.
|
|
2411
|
+
* @param {boolean} bRefreshRequired Whether or not the catalogs should be loaded again.
|
|
2412
|
+
* @private
|
|
2413
|
+
*/
|
|
2414
|
+
this._startLoading = function (oDeferred, bRefreshRequired) {
|
|
2415
|
+
var oPromise;
|
|
2368
2416
|
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
}
|
|
2417
|
+
if (oTargetMappingServiceConfig && oTargetMappingServiceConfig.cacheId) {
|
|
2418
|
+
// add cache buster token for the allCatalogs request.
|
|
2419
|
+
// Reuse TargetMappings token as it is also invalidated in case the user's catalogs changed
|
|
2420
|
+
oPromise = sap.ushell.Container.getServiceAsync("PageBuilding")
|
|
2421
|
+
.then(function (PageBuildingService) {
|
|
2422
|
+
var oCacheTokens = PageBuildingService.getFactory().getPageBuildingService().readAllCatalogs.cacheBusterTokens;
|
|
2376
2423
|
|
|
2377
|
-
|
|
2378
|
-
if (oGetCatalogsDeferred && !oGetCatalogsDeferred.$notified && !bRefreshRequired) {
|
|
2379
|
-
// re-use existing Deferred object; we cannot miss any notifications!
|
|
2380
|
-
oDeferred = oGetCatalogsDeferred;
|
|
2381
|
-
} else {
|
|
2382
|
-
oDeferred = oGetCatalogsDeferred = new jQuery.Deferred();
|
|
2383
|
-
oDeferred.done(function () {
|
|
2384
|
-
if (oDeferred === oGetCatalogsDeferred) {
|
|
2385
|
-
// only the last call is allowed to change "global" variables
|
|
2386
|
-
bCatalogsValid = true;
|
|
2387
|
-
}
|
|
2388
|
-
}).always(function () {
|
|
2389
|
-
if (oDeferred === oGetCatalogsDeferred) {
|
|
2390
|
-
// only the last call is allowed to change "global" variables
|
|
2391
|
-
oGetCatalogsDeferred = null;
|
|
2392
|
-
}
|
|
2393
|
-
});
|
|
2424
|
+
oCacheTokens.put(sDEFAULT_PAGE_ID, oTargetMappingServiceConfig.cacheId);
|
|
2394
2425
|
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
} else {
|
|
2403
|
-
startLoading(true);
|
|
2404
|
-
}
|
|
2426
|
+
if (Config.last("/core/spaces/enabled")) {
|
|
2427
|
+
oCacheTokens.put(PAGE_ID_WITHOUT_TM, oTargetMappingServiceConfig.cacheId);
|
|
2428
|
+
}
|
|
2429
|
+
})
|
|
2430
|
+
.catch(oDeferred.reject);
|
|
2431
|
+
} else {
|
|
2432
|
+
oPromise = Promise.resolve();
|
|
2405
2433
|
}
|
|
2406
2434
|
|
|
2407
|
-
|
|
2435
|
+
oPromise
|
|
2436
|
+
.then(function () {
|
|
2437
|
+
if (that._bPageSetFullyLoaded) {
|
|
2438
|
+
this._doGetCatalogs(oDeferred, bRefreshRequired);
|
|
2439
|
+
} else {
|
|
2440
|
+
this.getGroups()
|
|
2441
|
+
.done(function () {
|
|
2442
|
+
this._doGetCatalogs(oDeferred, bRefreshRequired);
|
|
2443
|
+
}.bind(this))
|
|
2444
|
+
.fail(oDeferred.reject);
|
|
2445
|
+
}
|
|
2446
|
+
}.bind(this))
|
|
2447
|
+
.catch(oDeferred.reject);
|
|
2408
2448
|
};
|
|
2409
2449
|
|
|
2410
2450
|
/**
|
|
@@ -2475,7 +2515,7 @@ sap.ui.define([
|
|
|
2475
2515
|
|
|
2476
2516
|
/**
|
|
2477
2517
|
* Returns the catalog's tiles. This is an asynchronous function using a jQuery.Promise.
|
|
2478
|
-
* In case of success its <code>done</code> function is called and gets the tiles as array of <code>sap.ui2.
|
|
2518
|
+
* In case of success its <code>done</code> function is called and gets the tiles as array of <code>sap.ushell_abap.pbServices.ui2.Chip</code>.
|
|
2479
2519
|
* In case of error the promise's <code>fail</code> function is called.
|
|
2480
2520
|
*
|
|
2481
2521
|
* @param {object} oConfigCatalog the catalog
|
|
@@ -2686,7 +2726,7 @@ sap.ui.define([
|
|
|
2686
2726
|
sCatalogDescription = oCatalogTile.getChip().getDescription();
|
|
2687
2727
|
|
|
2688
2728
|
function addKeywords (oKeywordsSet, aKeywordsList) {
|
|
2689
|
-
if (
|
|
2729
|
+
if (Utils.isArray(aKeywordsList)) {
|
|
2690
2730
|
aKeywordsList.forEach(function (sKeyword) {
|
|
2691
2731
|
if (oKeywordsSet.hasOwnProperty(sKeyword)) {
|
|
2692
2732
|
return;
|
|
@@ -2700,7 +2740,7 @@ sap.ui.define([
|
|
|
2700
2740
|
function getKeywordsDefinedInCatalogTileData (oCatalogTile) {
|
|
2701
2741
|
var sKeywordsText = LaunchPageAdapter.prototype._getBagText(oCatalogTile, "tileProperties", "display_search_keywords");
|
|
2702
2742
|
|
|
2703
|
-
if (!
|
|
2743
|
+
if (!Utils.isString(sKeywordsText) || sKeywordsText === "") {
|
|
2704
2744
|
return [];
|
|
2705
2745
|
}
|
|
2706
2746
|
|
|
@@ -2824,7 +2864,7 @@ sap.ui.define([
|
|
|
2824
2864
|
oConfiguration.service_refresh_interval = oParameters.serviceRefreshInterval || 0;
|
|
2825
2865
|
oConfiguration.service_url = oParameters.serviceUrl;
|
|
2826
2866
|
}
|
|
2827
|
-
if (oGroup && !(oGroup instanceof
|
|
2867
|
+
if (oGroup && !(oGroup instanceof Page)) {
|
|
2828
2868
|
// same behavior like addCatalogTileToGroup of the Bookmark service:
|
|
2829
2869
|
// if the group is unknown don't use the default group but reject.
|
|
2830
2870
|
oDeferred.reject("The given object is not a group");
|
|
@@ -2885,7 +2925,7 @@ sap.ui.define([
|
|
|
2885
2925
|
var oChipConfig = oBookmarkConfig.vizConfig["sap.flp"].chipConfig;
|
|
2886
2926
|
var oDeferred = new jQuery.Deferred();
|
|
2887
2927
|
|
|
2888
|
-
if (oGroup && !(oGroup instanceof
|
|
2928
|
+
if (oGroup && !(oGroup instanceof Page)) {
|
|
2889
2929
|
// same behavior like addCatalogTileToGroup of the Bookmark service:
|
|
2890
2930
|
// if the group is unknown don't use the default group but reject.
|
|
2891
2931
|
oDeferred.reject("The given object is not a group");
|
|
@@ -3104,7 +3144,7 @@ sap.ui.define([
|
|
|
3104
3144
|
/**
|
|
3105
3145
|
* Tells whether the given CHIP instance represents a bookmark matching the given identifier.
|
|
3106
3146
|
*
|
|
3107
|
-
* @param {sap.ui2.
|
|
3147
|
+
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
|
|
3108
3148
|
* @param {string | object} vIdentifier the url as string or an identifier object
|
|
3109
3149
|
* @returns {boolean}
|
|
3110
3150
|
* @see #addBookmark
|
|
@@ -3130,7 +3170,7 @@ sap.ui.define([
|
|
|
3130
3170
|
* This is a potentially asynchronous operation in case the user's groups have not yet been loaded completely!
|
|
3131
3171
|
*
|
|
3132
3172
|
* @param {string} sUrl The URL of the bookmarks to be visited, exactly as specified to {@link #addBookmark}.
|
|
3133
|
-
* @param {function(sap.ui2.
|
|
3173
|
+
* @param {function(sap.ushell_abap.pbServices.ui2.ChipInstance)} [fnVisitor] The asynchronous visitor function returning a
|
|
3134
3174
|
* <code>jQuery.Deferred</code> object's promise.
|
|
3135
3175
|
* In case of success, no details are expected. In case of failure, an error message is passed.
|
|
3136
3176
|
* @returns {object} A <code>jQuery.Deferred</code> object's promise which informs about success or failure
|
|
@@ -3533,7 +3573,7 @@ sap.ui.define([
|
|
|
3533
3573
|
.then(function (oPageBuildingService) {
|
|
3534
3574
|
var oUI2PageBuildingService = oPageBuildingService.getFactory().getPageBuildingService();
|
|
3535
3575
|
return new Promise(function (resolve, reject) {
|
|
3536
|
-
// There is no good way to access the raw data as it is normalized and well hidden in closures in sap.ui2
|
|
3576
|
+
// There is no good way to access the raw data as it is normalized and well hidden in closures in sap.ushell_abap.pbServices.ui2
|
|
3537
3577
|
// Therefore we trigger the allCatalogs request again which reads from the cache of the OData wrapper
|
|
3538
3578
|
oUI2PageBuildingService.readAllCatalogs(PAGE_ID_WITHOUT_TM, resolve, reject,
|
|
3539
3579
|
"type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG' or type eq 'REMOTE'", "title", true);
|