@openui5/sap.ui.documentation 1.93.3 → 1.96.2
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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +6 -6
- package/src/sap/ui/documentation/.library +1 -6
- package/src/sap/ui/documentation/library.js +7 -5
- package/src/sap/ui/documentation/messagebundle.properties +11 -2
- package/src/sap/ui/documentation/messagebundle_ar.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_bg.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_ca.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_cs.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_cy.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_da.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_de.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_el.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_en.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_en_GB.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_es.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_es_MX.properties +9 -4
- package/src/sap/ui/documentation/messagebundle_et.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_fi.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_fr.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_fr_CA.properties +8 -3
- package/src/sap/ui/documentation/messagebundle_hi.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_hr.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_hu.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_id.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_it.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_iw.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_ja.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_kk.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_ko.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_lt.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_lv.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_ms.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_nl.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_no.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_pl.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_pt.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_pt_PT.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_ro.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_ru.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_sh.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_sk.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_sl.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_sv.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_th.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_tr.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_uk.properties +10 -5
- package/src/sap/ui/documentation/messagebundle_vi.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_zh_CN.properties +7 -2
- package/src/sap/ui/documentation/messagebundle_zh_TW.properties +7 -2
- package/src/sap/ui/documentation/sdk/Component.js +3 -2
- package/src/sap/ui/documentation/sdk/controller/ApiDetail.controller.js +9 -4
- package/src/sap/ui/documentation/sdk/controller/ApiDetailIndexDeprecatedExperimental.controller.js +1 -38
- package/src/sap/ui/documentation/sdk/controller/App.controller.js +24 -9
- package/src/sap/ui/documentation/sdk/controller/Code.controller.js +1 -2
- package/src/sap/ui/documentation/sdk/controller/Entity.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +59 -24
- package/src/sap/ui/documentation/sdk/controller/SampleBaseController.js +6 -4
- package/src/sap/ui/documentation/sdk/controller/SampleNotFound.controller.js +14 -0
- package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +5 -38
- package/src/sap/ui/documentation/sdk/controller/TopicDetail.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +1 -1
- package/src/sap/ui/documentation/sdk/css/style.css +5 -5
- package/src/sap/ui/documentation/sdk/index.html +55 -0
- package/src/sap/ui/documentation/sdk/manifest.json +11 -0
- package/src/sap/ui/documentation/sdk/model/formatter.js +1 -1
- package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +33 -24
- package/src/sap/ui/documentation/sdk/util/Resources.js +14 -4
- package/src/sap/ui/documentation/sdk/view/App.view.xml +9 -1
- package/src/sap/ui/documentation/sdk/view/ChangeVersionDialog.fragment.xml +16 -6
- package/src/sap/ui/documentation/sdk/view/ReleaseDialog.fragment.xml +1 -1
- package/src/sap/ui/documentation/sdk/view/SampleNotFound.view.xml +17 -0
- package/src/sap/ui/documentation/sdk/view/SubApiDetail.view.xml +3 -18
- package/src/sap/ui/documentation/sdk/view/Tools.view.xml +2 -2
- package/src/sap/ui/documentation/themes/base/Documentation.less +7 -6
- package/ui5.yaml +5 -2
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-css.js +0 -160
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-feature.js +0 -33
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-properties.js +0 -22
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-text.js +0 -11
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/prettify.css +0 -232
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/prettify.js +0 -1740
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/run-prettify.js +0 -27
- package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/run_prettify.js +0 -34
package/src/sap/ui/documentation/sdk/controller/ApiDetailIndexDeprecatedExperimental.controller.js
CHANGED
|
@@ -34,7 +34,6 @@ sap.ui.define([
|
|
|
34
34
|
oRouter.getRoute("since").attachPatternMatched(this._onTopicMatched, this);
|
|
35
35
|
|
|
36
36
|
this._hasMatched = false;
|
|
37
|
-
this._aVisitedTabs = [];
|
|
38
37
|
},
|
|
39
38
|
|
|
40
39
|
_onTopicMatched: function (oEvent) {
|
|
@@ -43,8 +42,7 @@ sap.ui.define([
|
|
|
43
42
|
experimental: APIInfo.getExperimentalPromise,
|
|
44
43
|
deprecated: APIInfo.getDeprecatedPromise,
|
|
45
44
|
since: APIInfo.getSincePromise
|
|
46
|
-
}[sRouteName]
|
|
47
|
-
oPage;
|
|
45
|
+
}[sRouteName];
|
|
48
46
|
|
|
49
47
|
if (this._hasMatched) {
|
|
50
48
|
return;
|
|
@@ -53,42 +51,14 @@ sap.ui.define([
|
|
|
53
51
|
|
|
54
52
|
// Cache allowed members for the filtering
|
|
55
53
|
this._aAllowedMembers = this.getModel("versionData").getProperty("/allowedMembers");
|
|
56
|
-
oPage = this.getView().byId("objectPage");
|
|
57
54
|
|
|
58
55
|
fnDataGetterRef().then(function (oData) {
|
|
59
56
|
oData = this._filterVisibleElements(oData);
|
|
60
57
|
this._oModel.setData(oData);
|
|
61
58
|
|
|
62
|
-
oPage.addEventDelegate({"onAfterRendering": this._prettify.bind(this)});
|
|
63
|
-
if (oPage.getUseIconTabBar()) {
|
|
64
|
-
// add support to prettify tab content lazily (i.e. only for *opened* tabs) to avoid traversing *all* tabs in advance
|
|
65
|
-
oPage.attachNavigate(this._attachPrettifyTab.bind(this));
|
|
66
|
-
}
|
|
67
59
|
}.bind(this));
|
|
68
60
|
},
|
|
69
61
|
|
|
70
|
-
/**
|
|
71
|
-
* Attach listeners that prettify the tab content upon its rendering
|
|
72
|
-
* @param {oEvent} tab navigate event
|
|
73
|
-
* @private
|
|
74
|
-
*/
|
|
75
|
-
_attachPrettifyTab: function(oEvent) {
|
|
76
|
-
// in our use-case each tab contains a single subSection => only this subSection needs to be processed
|
|
77
|
-
var oSubSection = oEvent.getParameter("subSection"),
|
|
78
|
-
sId = oSubSection.getId(),
|
|
79
|
-
aBlocks;
|
|
80
|
-
|
|
81
|
-
//attach listeners that prettify the tab content upon its rendering
|
|
82
|
-
if (this._aVisitedTabs.indexOf(sId) < 0) { // avoid adding listeners to the same tab twice
|
|
83
|
-
aBlocks = oSubSection.getBlocks();
|
|
84
|
-
aBlocks.forEach(function(oBlock) {
|
|
85
|
-
oBlock.addEventDelegate({"onAfterRendering": this._prettify.bind(this)});
|
|
86
|
-
}.bind(this));
|
|
87
|
-
|
|
88
|
-
this._aVisitedTabs.push(sId);
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
|
|
92
62
|
/**
|
|
93
63
|
* Filter all items to be listed depending on their visibility.
|
|
94
64
|
* Note: This method modifies the passed oData reference object.
|
|
@@ -116,13 +86,6 @@ sap.ui.define([
|
|
|
116
86
|
return oFilteredData;
|
|
117
87
|
},
|
|
118
88
|
|
|
119
|
-
_prettify: function () {
|
|
120
|
-
// Google Prettify requires this class
|
|
121
|
-
jQuery('pre').addClass('prettyprint');
|
|
122
|
-
|
|
123
|
-
window.prettyPrint();
|
|
124
|
-
},
|
|
125
|
-
|
|
126
89
|
/**
|
|
127
90
|
* Modify all deprecated and experimental links
|
|
128
91
|
* @private
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/* global URLSearchParams */
|
|
8
|
-
|
|
9
7
|
sap.ui.define([
|
|
10
8
|
"sap/ui/events/KeyCodes",
|
|
11
9
|
"sap/ui/thirdparty/jquery",
|
|
@@ -78,10 +76,17 @@ sap.ui.define([
|
|
|
78
76
|
home: MAIN_WEB_PAGE_TITLE
|
|
79
77
|
};
|
|
80
78
|
|
|
79
|
+
function getResourcePath(sResource) {
|
|
80
|
+
|
|
81
|
+
return ResourcesUtil.getResourcesVersion() && !self['sap-ui-documentation-config'] ?
|
|
82
|
+
window.origin + sResource :
|
|
83
|
+
ResourcesUtil.getResourceOriginPath(sResource);
|
|
84
|
+
|
|
85
|
+
}
|
|
81
86
|
// shortcut for sap.m.URLHelper
|
|
82
87
|
var URLHelper = mobileLibrary.URLHelper,
|
|
83
|
-
sNeoAppJsonPath =
|
|
84
|
-
sVersionOverviewJsonPath =
|
|
88
|
+
sNeoAppJsonPath = getResourcePath("/neo-app.json"), /* Load neo-app.json always from root URL */
|
|
89
|
+
sVersionOverviewJsonPath = getResourcePath("/versionoverview.json"), /* Load versionoverview.json always from root URL */
|
|
85
90
|
ABOUT_TEXT = "about",
|
|
86
91
|
FEEDBACK_TEXT = "feedback",
|
|
87
92
|
FEEDBACK_URL = "https://demokit-feedback-proxy.cfapps.eu12.hana.ondemand.com/issue",
|
|
@@ -1030,14 +1035,22 @@ sap.ui.define([
|
|
|
1030
1035
|
this.oRouter.navTo("sitemap", {});
|
|
1031
1036
|
},
|
|
1032
1037
|
|
|
1038
|
+
onLatestVersionItemPress: function() {
|
|
1039
|
+
if (ResourcesUtil.getResourcesVersion()) {
|
|
1040
|
+
window.sessionStorage.removeItem("versionPrefixPath");
|
|
1041
|
+
window.location.reload();
|
|
1042
|
+
} else {
|
|
1043
|
+
window.location.href = "/";
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
|
|
1033
1047
|
onVersionItemPress: function (oEvent) {
|
|
1034
|
-
var oSelectedItem =
|
|
1035
|
-
oCustomData = oSelectedItem.getCustomData()[0]
|
|
1036
|
-
bUseUnifiedResourceOrigin = new URLSearchParams(window.location.search).get('sap-ui-xx-unifiedResources') != null;
|
|
1048
|
+
var oSelectedItem = sap.ui.getCore().byId("versionList").getSelectedItem(),
|
|
1049
|
+
oCustomData = oSelectedItem.getCustomData()[0];
|
|
1037
1050
|
|
|
1038
1051
|
if (oCustomData && oCustomData.getKey() === "path") {
|
|
1039
1052
|
|
|
1040
|
-
if (
|
|
1053
|
+
if (ResourcesUtil.getHasProxy()) {
|
|
1041
1054
|
window.sessionStorage.setItem("versionPrefixPath", oCustomData.getValue());
|
|
1042
1055
|
window.location.reload();
|
|
1043
1056
|
} else {
|
|
@@ -1509,6 +1522,7 @@ sap.ui.define([
|
|
|
1509
1522
|
this._aNeoAppVersions = aNeoAppVersions;
|
|
1510
1523
|
// Make version select visible
|
|
1511
1524
|
this._updateVersionSwitchVisibility();
|
|
1525
|
+
this.getModel("versionData").setProperty("/latestVersion", this._aNeoAppVersions[0].version);
|
|
1512
1526
|
} else {
|
|
1513
1527
|
Log.warning("No multi-version environment detected");
|
|
1514
1528
|
}
|
|
@@ -1521,7 +1535,8 @@ sap.ui.define([
|
|
|
1521
1535
|
},
|
|
1522
1536
|
|
|
1523
1537
|
_getUI5Version: function () {
|
|
1524
|
-
return
|
|
1538
|
+
return ResourcesUtil.getResourcesVersion() ?
|
|
1539
|
+
window.sessionStorage.getItem("versionPrefixPath") : this.getModel("versionData").getProperty("/version");
|
|
1525
1540
|
},
|
|
1526
1541
|
|
|
1527
1542
|
_getUI5VersionGav: function () {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
sap.ui.define([
|
|
8
9
|
"sap/ui/thirdparty/jquery",
|
|
9
10
|
"sap/ui/documentation/sdk/controller/SampleBaseController",
|
|
@@ -16,7 +17,8 @@ sap.ui.define([
|
|
|
16
17
|
"sap/ui/core/HTML",
|
|
17
18
|
"sap/m/library",
|
|
18
19
|
"sap/base/Log",
|
|
19
|
-
"sap/ui/core/Fragment"
|
|
20
|
+
"sap/ui/core/Fragment",
|
|
21
|
+
"sap/ui/documentation/sdk/util/Resources"
|
|
20
22
|
], function(
|
|
21
23
|
jQuery,
|
|
22
24
|
SampleBaseController,
|
|
@@ -29,7 +31,8 @@ sap.ui.define([
|
|
|
29
31
|
HTML,
|
|
30
32
|
mobileLibrary,
|
|
31
33
|
Log,
|
|
32
|
-
Fragment
|
|
34
|
+
Fragment,
|
|
35
|
+
ResourcesUtil
|
|
33
36
|
) {
|
|
34
37
|
"use strict";
|
|
35
38
|
|
|
@@ -52,8 +55,6 @@ sap.ui.define([
|
|
|
52
55
|
rtaLoaded: false
|
|
53
56
|
});
|
|
54
57
|
|
|
55
|
-
this._sDefaultSampleTheme = 'sap_fiori_3';
|
|
56
|
-
|
|
57
58
|
this._sId = null; // Used to hold sample ID
|
|
58
59
|
this._sEntityId = null; // Used to hold entity ID for the sample currently shown
|
|
59
60
|
|
|
@@ -64,6 +65,10 @@ sap.ui.define([
|
|
|
64
65
|
]).then(this._loadRTA.bind(this));
|
|
65
66
|
|
|
66
67
|
this.getView().setModel(this.oModel);
|
|
68
|
+
|
|
69
|
+
this.bus = sap.ui.getCore().getEventBus();
|
|
70
|
+
this.setDefaultSampleTheme();
|
|
71
|
+
this.bus.subscribe("themeChanged", "onDemoKitThemeChanged", this.onDemoKitThemeChanged, this);
|
|
67
72
|
},
|
|
68
73
|
|
|
69
74
|
/* =========================================================== */
|
|
@@ -140,7 +145,7 @@ sap.ui.define([
|
|
|
140
145
|
var oSampleConfig = oConfig && oConfig.sample || {};
|
|
141
146
|
|
|
142
147
|
// only have the option to run standalone if there is an iframe
|
|
143
|
-
oModelData.showNewTab = !!oSampleConfig.iframe;
|
|
148
|
+
oModelData.showNewTab = !!oSampleConfig.iframe || ResourcesUtil.getHasProxy();
|
|
144
149
|
oModelData.id = oSample.id;
|
|
145
150
|
oModelData.name = oSample.name;
|
|
146
151
|
oModelData.details = oSample.details;
|
|
@@ -164,7 +169,7 @@ sap.ui.define([
|
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
|
|
167
|
-
if (oSampleConfig.iframe) {
|
|
172
|
+
if (oSampleConfig.iframe || ResourcesUtil.getHasProxy()) {
|
|
168
173
|
oComponentContainer = this._createIframe(oComponentContainer, oSampleConfig.iframe);
|
|
169
174
|
} else {
|
|
170
175
|
this.sIFrameUrl = null;
|
|
@@ -172,7 +177,7 @@ sap.ui.define([
|
|
|
172
177
|
}
|
|
173
178
|
|
|
174
179
|
// Sets the current iframe URL or restores it to "undefined"
|
|
175
|
-
oModelData.iframe = oSampleConfig.iframe;
|
|
180
|
+
oModelData.iframe = oSampleConfig.iframe || ResourcesUtil.getHasProxy();
|
|
176
181
|
|
|
177
182
|
// handle stretch content
|
|
178
183
|
var bStretch = !!oSampleConfig.stretch;
|
|
@@ -303,6 +308,17 @@ sap.ui.define([
|
|
|
303
308
|
|
|
304
309
|
// combine namespace with the file name again
|
|
305
310
|
this.sIFrameUrl = sap.ui.require.toUrl((sIframePath + "/" + sIframeWithoutUI5Ending).replace(/\./g, "/")) + sFileEnding || ".html";
|
|
311
|
+
} else if (ResourcesUtil.getHasProxy()) {
|
|
312
|
+
var sSamplePath = ResourcesUtil.getResourceOriginPath(sap.ui.require.toUrl(this._sId.replace(/\./g, "/"))),
|
|
313
|
+
sSampleOrigin = (window['sap-ui-documentation-config'] && window['sap-ui-documentation-config'].demoKitResourceOrigin) || "",
|
|
314
|
+
sSampleVersion = ResourcesUtil.getResourcesVersion();
|
|
315
|
+
|
|
316
|
+
this.sIFrameUrl =
|
|
317
|
+
"resources/sap/ui/documentation/sdk/index.html" +
|
|
318
|
+
"?sap-ui-xx-sample-id=" + sSampleId
|
|
319
|
+
+ "&&sap-ui-xx-sample-path=" + sSamplePath
|
|
320
|
+
+ "&&sap-ui-xx-sample-origin=" + sSampleOrigin
|
|
321
|
+
+ "&&sap-ui-xx-sample-version=" + sSampleVersion;
|
|
306
322
|
} else {
|
|
307
323
|
Log.error("no iframe source was provided");
|
|
308
324
|
return;
|
|
@@ -325,7 +341,7 @@ sap.ui.define([
|
|
|
325
341
|
oSampleFrame.sap.ui.getCore().attachInit(function () {
|
|
326
342
|
var bCompact = jQuery(document.body).hasClass("sapUiSizeCompact");
|
|
327
343
|
|
|
328
|
-
oSampleFrameCore.applyTheme(this._oCore.getConfiguration().getTheme());
|
|
344
|
+
oSampleFrameCore.applyTheme(ResourcesUtil.getHasProxy() ? this._sDefaultSampleTheme : this._oCore.getConfiguration().getTheme());
|
|
329
345
|
oSampleFrameCore.getConfiguration().setRTL(this._oCore.getConfiguration().getRTL());
|
|
330
346
|
oSampleFrame.jQuery('body')
|
|
331
347
|
.toggleClass("sapUiSizeCompact", bCompact)
|
|
@@ -365,14 +381,26 @@ sap.ui.define([
|
|
|
365
381
|
return oMainComponent.runAsOwner(function(){
|
|
366
382
|
return Component.create({
|
|
367
383
|
id: sCompId,
|
|
368
|
-
name: sCompName
|
|
369
|
-
manifest: false
|
|
384
|
+
name: sCompName
|
|
370
385
|
}).then(function (oComponent) {
|
|
371
386
|
return new ComponentContainer({component : oComponent});
|
|
372
387
|
});
|
|
373
388
|
});
|
|
374
389
|
},
|
|
375
390
|
|
|
391
|
+
setDefaultSampleTheme: function() {
|
|
392
|
+
var sSampleVersion = ResourcesUtil.getResourcesVersion();
|
|
393
|
+
this._sDefaultSampleTheme = sSampleVersion && parseInt(sSampleVersion.slice(3,5)) < 68 ?
|
|
394
|
+
"sap_belize" : sap.ui.getCore().getConfiguration().getTheme();
|
|
395
|
+
},
|
|
396
|
+
|
|
397
|
+
onDemoKitThemeChanged: function(sChannelId, sEventId, oData) {
|
|
398
|
+
if (this._oHtmlControl) {
|
|
399
|
+
this._oHtmlControl.$()[0].contentWindow.sap.ui.getCore().applyTheme(oData.sThemeActive);
|
|
400
|
+
}
|
|
401
|
+
this.setDefaultSampleTheme();
|
|
402
|
+
},
|
|
403
|
+
|
|
376
404
|
onNavBack : function (oEvt) {
|
|
377
405
|
this.getRouter().navTo("entity", { id : this.entityId });
|
|
378
406
|
},
|
|
@@ -401,9 +429,11 @@ sap.ui.define([
|
|
|
401
429
|
return;
|
|
402
430
|
}
|
|
403
431
|
|
|
432
|
+
this.sIFrameUrl = this.sIFrameUrl.replace(oIFrameURL.search, "");
|
|
433
|
+
|
|
404
434
|
oIFrameURL.searchParams.set(sSearchParam, sNewVal);
|
|
405
435
|
|
|
406
|
-
this.sIFrameUrl
|
|
436
|
+
this.sIFrameUrl = this.sIFrameUrl + decodeURI(oIFrameURL.search);
|
|
407
437
|
},
|
|
408
438
|
|
|
409
439
|
_loadRTA: function () {
|
|
@@ -444,25 +474,30 @@ sap.ui.define([
|
|
|
444
474
|
|
|
445
475
|
onToggleAdaptationMode : function (oEvt) {
|
|
446
476
|
sap.ui.require([
|
|
447
|
-
"sap/ui/rta/
|
|
477
|
+
"sap/ui/rta/api/startKeyUserAdaptation"
|
|
448
478
|
], function (
|
|
449
|
-
|
|
479
|
+
startKeyUserAdaptation
|
|
450
480
|
) {
|
|
451
481
|
if (!this._oRTA) {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
this._oRTA.destroy();
|
|
461
|
-
delete this._oRTA;
|
|
482
|
+
startKeyUserAdaptation({
|
|
483
|
+
rootControl : this.byId("page").getContent()[0].getComponentInstance()
|
|
484
|
+
}).then(function(oRta) {
|
|
485
|
+
this._oRTA = oRta;
|
|
486
|
+
this._oRTA.attachStop(function () {
|
|
487
|
+
this._oRTA.destroy();
|
|
488
|
+
delete this._oRTA;
|
|
489
|
+
}.bind(this));
|
|
462
490
|
}.bind(this));
|
|
463
|
-
this._oRTA.start();
|
|
464
491
|
}
|
|
465
492
|
}.bind(this));
|
|
493
|
+
},
|
|
494
|
+
|
|
495
|
+
onRouteNotFound: function() {
|
|
496
|
+
var sNotFoundTitle = this.getModel("i18n").getProperty("NOT_FOUND_SAMPLE_TITLE");
|
|
497
|
+
|
|
498
|
+
this.getRouter().myNavToWithoutHash("sap.ui.documentation.sdk.view.SampleNotFound", "XML", false);
|
|
499
|
+
setTimeout(this.appendPageTitle.bind(this, sNotFoundTitle));
|
|
500
|
+
return;
|
|
466
501
|
}
|
|
467
502
|
});
|
|
468
503
|
}
|
|
@@ -8,8 +8,10 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/documentation/sdk/controller/BaseController",
|
|
9
9
|
"sap/ui/thirdparty/URI",
|
|
10
10
|
"sap/base/Log",
|
|
11
|
-
"sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil"
|
|
12
|
-
|
|
11
|
+
"sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil",
|
|
12
|
+
"sap/ui/documentation/sdk/util/Resources"
|
|
13
|
+
|
|
14
|
+
], function (BaseController, URI, Log, ResourceDownloadUtil, ResourcesUtil) {
|
|
13
15
|
"use strict";
|
|
14
16
|
|
|
15
17
|
var TMPL_REF = sap.ui.require.toUrl("sap/ui/documentation/sdk/tmpl"),
|
|
@@ -40,7 +42,7 @@ sap.ui.define([
|
|
|
40
42
|
"sap/ui/core/util/File"
|
|
41
43
|
], function (JSZip, File) {
|
|
42
44
|
var oZipFile = new JSZip(),
|
|
43
|
-
sRef = sap.ui.require.toUrl((this._sId).replace(/\./g, "/")),
|
|
45
|
+
sRef = ResourcesUtil.getResourceOriginPath(sap.ui.require.toUrl((this._sId).replace(/\./g, "/"))),
|
|
44
46
|
oData = this.oModel.getData(),
|
|
45
47
|
aExtraFiles = oData.includeInDownload || [],
|
|
46
48
|
oManifestFile,
|
|
@@ -88,7 +90,7 @@ sap.ui.define([
|
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
// iframe examples have a separate index file and a component file to describe it
|
|
91
|
-
if (!oData.iframe) {
|
|
93
|
+
if (!oData.iframe || ResourcesUtil.getHasProxy()) {
|
|
92
94
|
bHasManifest = oData.files.some(function (oFile) {
|
|
93
95
|
return oFile.name === "manifest.json";
|
|
94
96
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"./BaseController"
|
|
9
|
+
], function (BaseController) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
return BaseController.extend("sap.ui.documentation.sdk.controller.SampleNotFound", {
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -154,7 +154,7 @@ sap.ui.define([
|
|
|
154
154
|
}
|
|
155
155
|
this._sHljsDelayedCallID = setTimeout(function () {
|
|
156
156
|
//The event is called even if all the sub-sections are un-stashed so apply the class and highlights only when we have un-processed targets.
|
|
157
|
-
var $aNotApplied =
|
|
157
|
+
var $aNotApplied = this._objectPage.$().find("pre:not(.hljs)");
|
|
158
158
|
if ($aNotApplied.length > 0 && window.hljs) {
|
|
159
159
|
$aNotApplied.addClass('hljs');
|
|
160
160
|
document.querySelectorAll('pre').forEach(function(block) {
|
|
@@ -168,7 +168,7 @@ sap.ui.define([
|
|
|
168
168
|
setTimeout(function () {
|
|
169
169
|
|
|
170
170
|
if (this._sEntityType) {
|
|
171
|
-
this.
|
|
171
|
+
this.scrollToEntity(this._sEntityType, this._sEntityId);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
// Add listener's with a slight delay so they don't break scroll to entity
|
|
@@ -246,33 +246,12 @@ sap.ui.define([
|
|
|
246
246
|
|
|
247
247
|
onJSDocLinkClick: function (oEvent) {
|
|
248
248
|
var oClassList = oEvent.target.classList,
|
|
249
|
-
|
|
250
|
-
bExternalLink = oClassList.contains("sapUISDKExternalLink"),
|
|
251
|
-
sLinkTarget = decodeURIComponent(oEvent.target.getAttribute("data-target")),
|
|
252
|
-
sEntityType;
|
|
253
|
-
|
|
254
|
-
// Not a JSDocLink - we do nothing
|
|
255
|
-
if (!bJSDocLink && !bExternalLink) {
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
249
|
+
bExternalLink = oClassList.contains("sapUISDKExternalLink");
|
|
258
250
|
|
|
259
251
|
if (bExternalLink) {
|
|
260
252
|
this.onDisclaimerLinkPress(oEvent);
|
|
261
253
|
return;
|
|
262
254
|
}
|
|
263
|
-
|
|
264
|
-
if (oClassList.contains("scrollToMethod")) {
|
|
265
|
-
sEntityType = "methods";
|
|
266
|
-
} else if (oClassList.contains("scrollToEvent")) {
|
|
267
|
-
sEntityType = "events";
|
|
268
|
-
} else if (oClassList.contains("scrollToAnnotation")) {
|
|
269
|
-
sEntityType = "annotations";
|
|
270
|
-
} else {
|
|
271
|
-
// We do not scroll
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
this._scrollToEntity(sEntityType, sLinkTarget);
|
|
276
255
|
},
|
|
277
256
|
|
|
278
257
|
/* =========================================================== */
|
|
@@ -305,19 +284,7 @@ sap.ui.define([
|
|
|
305
284
|
}
|
|
306
285
|
},
|
|
307
286
|
|
|
308
|
-
|
|
309
|
-
this._scrollToEntity("methods", oEvent.getSource().getText());
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
scrollToEvent: function (oEvent) {
|
|
313
|
-
this._scrollToEntity("events", oEvent.getSource().getText());
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
scrollToAnnotation: function (oEvent) {
|
|
317
|
-
this._scrollToEntity("annotations", oEvent.getSource().getText());
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
_scrollToEntity: function (sSectionId, sSubSectionTitle) {
|
|
287
|
+
scrollToEntity: function (sSectionId, sSubSectionTitle) {
|
|
321
288
|
|
|
322
289
|
var aFilteredSubSections,
|
|
323
290
|
aSubSections,
|
|
@@ -679,7 +646,7 @@ sap.ui.define([
|
|
|
679
646
|
},
|
|
680
647
|
|
|
681
648
|
onAnnotationsLinkPress: function () {
|
|
682
|
-
this.
|
|
649
|
+
this.scrollToEntity("annotations", "Summary");
|
|
683
650
|
},
|
|
684
651
|
|
|
685
652
|
backToSearch: function () {
|
|
@@ -283,7 +283,7 @@ sap.ui.define([
|
|
|
283
283
|
sTopicId = aUrlParts[0],
|
|
284
284
|
sSubTopicId = aUrlParts[1];
|
|
285
285
|
|
|
286
|
-
this.sTopicId = sTopicId;
|
|
286
|
+
this.sTopicId = sTopicId.replace(".html", "");
|
|
287
287
|
this.sSubTopicId = sSubTopicId;
|
|
288
288
|
this.sTopicURL = ResourcesUtil.getResourceOriginPath(this._oConfig.docuPath + sTopicId + (sTopicId.match(/\.html/) ? "" : ".html"));
|
|
289
289
|
this.sSubTopicId = event.getParameter("arguments").subId || sSubTopicId;
|
|
@@ -27,7 +27,7 @@ sap.ui.define([],
|
|
|
27
27
|
{
|
|
28
28
|
"id": "ui5Inspector",
|
|
29
29
|
"text": "UI5 Inspector",
|
|
30
|
-
"href": "https://
|
|
30
|
+
"href": "https://github.com/SAP/ui5-inspector"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"id": "cardExplorer",
|
|
@@ -424,6 +424,11 @@ code {
|
|
|
424
424
|
#sampleFrame {
|
|
425
425
|
width : 100%;
|
|
426
426
|
height : 100%;
|
|
427
|
+
position: absolute;
|
|
428
|
+
top: 0;
|
|
429
|
+
left: 0;
|
|
430
|
+
right: 0;
|
|
431
|
+
bottom: 0;
|
|
427
432
|
}
|
|
428
433
|
|
|
429
434
|
/* util */
|
|
@@ -1503,11 +1508,6 @@ html.sapUiTheme-sap_belize_hcb .sapUiDocumentationTopicsIframe {
|
|
|
1503
1508
|
background: #fff;
|
|
1504
1509
|
}
|
|
1505
1510
|
|
|
1506
|
-
/* Prettified text looks bigger when viewed from mac, even if it has the same font size */
|
|
1507
|
-
html[data-sap-ui-os="mac"] pre.prettyprint.prettyprinted {
|
|
1508
|
-
font-size: 0.8rem;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
1511
|
/*
|
|
1512
1512
|
* API Detail page specific CSS improving readability
|
|
1513
1513
|
* Note: Keep in mind this is applicable only for the sap_belize and sap_belize_plus themes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html style="height: 100%;">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>SAPUI5 Navigation</title>
|
|
7
|
+
<script>
|
|
8
|
+
|
|
9
|
+
var sSampleId = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-id'),
|
|
10
|
+
sSamplePath = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-path'),
|
|
11
|
+
sOrigin = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-origin'),
|
|
12
|
+
sVersion = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-version'),
|
|
13
|
+
|
|
14
|
+
oPath = {};
|
|
15
|
+
if (!sOrigin || sOrigin == ".") {
|
|
16
|
+
sOrigin = window.location.origin + (window.location.pathname.includes("testsuite") ? "/testsuite" : "");
|
|
17
|
+
} else {
|
|
18
|
+
sOrigin = sOrigin + sVersion;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
oPath[sSampleId.replace(/\./g, "/")] = sSamplePath;
|
|
22
|
+
oPath["sap/ui/demo/mock"] = sOrigin + "/test-resources/sap/ui/documentation/sdk";
|
|
23
|
+
oPath["test-resources/sap/ui/documentation/sdk"] = ".";
|
|
24
|
+
oPath["sap/uxap/sample"] = sOrigin + "/test-resources/sap/uxap/demokit/sample";
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
document.write("<script src=" + sOrigin + '/resources/sap-ui-core.js' + " id='sap-ui-bootstrap' " +
|
|
29
|
+
"data-sap-ui-libs='sap.m' data-sap-ui-bindingSyntax='complex' data-sap-ui-compatVersion='edge'></scr" + "ipt>");
|
|
30
|
+
document.write("<base href=" + sOrigin + "/>");
|
|
31
|
+
|
|
32
|
+
</script>
|
|
33
|
+
</head>
|
|
34
|
+
<body class="sapUiBody sapUiSizeCompact" id="content">
|
|
35
|
+
<script>
|
|
36
|
+
sap.ui.getCore().attachInit(function () {
|
|
37
|
+
sap.ui.require([
|
|
38
|
+
"sap/ui/core/ComponentContainer"
|
|
39
|
+
], function (ComponentContainer) {
|
|
40
|
+
|
|
41
|
+
sap.ui.loader.config({
|
|
42
|
+
paths: oPath
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
var oContainer = new ComponentContainer({
|
|
46
|
+
name : sSampleId,
|
|
47
|
+
height : "100%",
|
|
48
|
+
manifest: false
|
|
49
|
+
}).placeAt('content');
|
|
50
|
+
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
@@ -32,6 +32,13 @@
|
|
|
32
32
|
"async": true,
|
|
33
33
|
"id": "app"
|
|
34
34
|
},
|
|
35
|
+
"resources": {
|
|
36
|
+
"css": [
|
|
37
|
+
{
|
|
38
|
+
"uri": "css/style.css"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
35
42
|
"dependencies": {
|
|
36
43
|
"minUI5Version": "1.46.0",
|
|
37
44
|
"libs": {
|
|
@@ -462,6 +469,10 @@
|
|
|
462
469
|
"viewLevel": 2,
|
|
463
470
|
"controlAggregation": "detailPages"
|
|
464
471
|
},
|
|
472
|
+
"sampleNotFound": {
|
|
473
|
+
"viewName": "SampleNotFound",
|
|
474
|
+
"viewId": "sampleNotFound"
|
|
475
|
+
},
|
|
465
476
|
"notFound": {
|
|
466
477
|
"viewName": "NotFound",
|
|
467
478
|
"viewId": "notFound"
|
|
@@ -206,7 +206,7 @@ sap.ui.define([
|
|
|
206
206
|
target = target.slice(0, iHashIndex) + '/methods/' + target.slice(iHashIndex + 1);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
return "<a
|
|
209
|
+
return "<a href=\"api/" + target + "\" target=\"_self\">" + text + "</a>";
|
|
210
210
|
|
|
211
211
|
}
|
|
212
212
|
});
|