@openui5/sap.ui.documentation 1.101.0 → 1.102.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/THIRDPARTY.txt +1 -1
- package/package.json +6 -6
- package/src/sap/ui/documentation/.library +1 -1
- package/src/sap/ui/documentation/library.js +2 -2
- package/src/sap/ui/documentation/messagebundle.properties +4 -2
- package/src/sap/ui/documentation/messagebundle_ar.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_bg.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_ca.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_cs.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_cy.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_da.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_de.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_el.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_en.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_en_GB.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +2 -1
- package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +43 -10
- package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_es.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_es_MX.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_et.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_fi.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_fr.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_fr_CA.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_hi.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_hr.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_hu.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_id.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_it.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_iw.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_ja.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_kk.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_ko.properties +4 -2
- package/src/sap/ui/documentation/messagebundle_lt.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_lv.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_ms.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_nl.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_no.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_pl.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_pt.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_pt_PT.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_ro.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_ru.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_sh.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_sk.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_sl.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_sv.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_th.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_tr.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_uk.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_vi.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_zh_CN.properties +3 -1
- package/src/sap/ui/documentation/messagebundle_zh_TW.properties +16 -14
- package/src/sap/ui/documentation/sdk/controller/BaseController.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Code.controller.js +2 -3
- package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +76 -64
- package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +5 -0
- package/src/sap/ui/documentation/sdk/images/tools/AccessibilityGuide.png +0 -0
- package/src/sap/ui/documentation/sdk/index.html +29 -15
- package/src/sap/ui/documentation/sdk/model/libraryData.js +9 -0
- package/src/sap/ui/documentation/sdk/view/Tools.view.xml +19 -0
|
@@ -47,6 +47,11 @@ sap.ui.define([
|
|
|
47
47
|
// shortcut for sap.m.URLHelper
|
|
48
48
|
var URLHelper = mobileLibrary.URLHelper;
|
|
49
49
|
|
|
50
|
+
var ALLOWLIST_SAMPLES_SEARCH_PARAMS = [
|
|
51
|
+
"sap-ui-rtl",
|
|
52
|
+
"sap-ui-language"
|
|
53
|
+
];
|
|
54
|
+
|
|
50
55
|
return SampleBaseController.extend("sap.ui.documentation.sdk.controller.Sample", {
|
|
51
56
|
/* =========================================================== */
|
|
52
57
|
/* lifecycle methods */
|
|
@@ -408,71 +413,78 @@ sap.ui.define([
|
|
|
408
413
|
this.fResolve = resolve;
|
|
409
414
|
this.fReject = reject;
|
|
410
415
|
var sSampleOrigin = (window['sap-ui-documentation-config'] && window['sap-ui-documentation-config'].demoKitResourceOrigin) || "",
|
|
411
|
-
sSampleVersion = ResourcesUtil.getResourcesVersion()
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
//vlaid only for samples that contains own index.html
|
|
431
|
-
// strip the file extension to be able to use jQuery.sap.getModulePath
|
|
432
|
-
aFileNameMatches = rExtractFilename.exec(vIframe);
|
|
433
|
-
sFileName = (aFileNameMatches && aFileNameMatches.length > 1 ? aFileNameMatches[1] : vIframe);
|
|
434
|
-
sFileEnding = rStripUI5Ending.exec(sFileName)[0];
|
|
435
|
-
var sIframeWithoutUI5Ending = sFileName.replace(rStripUI5Ending, "");
|
|
436
|
-
|
|
437
|
-
// combine namespace with the file name again
|
|
438
|
-
this.sIFrameUrl = (sap.ui.require.toUrl((sIframePath + "/" + sIframeWithoutUI5Ending).replace(/\./g, "/")) + sFileEnding || ".html")
|
|
439
|
-
+ "?sap-ui-theme=" + sap.ui.getCore().getConfiguration().getTheme();
|
|
440
|
-
this._oHtmlControl.getDomRef().src = this.sIFrameUrl;
|
|
441
|
-
}
|
|
442
|
-
this._oHtmlControl.getDomRef().contentWindow.postMessage({
|
|
443
|
-
type: "SETTINGS",
|
|
444
|
-
reason: "set",
|
|
445
|
-
data: {
|
|
446
|
-
"density": this.getOwnerComponent().getContentDensityClass(),
|
|
447
|
-
"RTL": oConfiguration.getRTL(),
|
|
448
|
-
"theme": oConfiguration.getTheme()
|
|
449
|
-
}
|
|
450
|
-
}, this.getOwnerComponent()._sSampleIframeOrigin);
|
|
451
|
-
this.fResolve(eMessage.data.config.sample);
|
|
452
|
-
} else if (eMessage.data.type === "ERR") {
|
|
453
|
-
this.fReject(eMessage.data.data.msg);
|
|
454
|
-
} else if (eMessage.data.type === "RTA") {
|
|
455
|
-
this._loadRTA.call(this);
|
|
456
|
-
}
|
|
457
|
-
}.bind(this);
|
|
458
|
-
|
|
459
|
-
this._oHtmlControl = new HTML({
|
|
460
|
-
id : "sampleFrame",
|
|
461
|
-
content : '<iframe src="' + this.sIFrameUrl + '" id="sampleFrame" frameBorder="0"></iframe>'
|
|
462
|
-
}).addEventDelegate({
|
|
463
|
-
onBeforeRendering: function () {
|
|
464
|
-
window.removeEventListener("message", fnMessage);
|
|
465
|
-
}
|
|
466
|
-
})
|
|
467
|
-
.addEventDelegate({
|
|
468
|
-
onAfterRendering: function () {
|
|
469
|
-
window.addEventListener("message", fnMessage);
|
|
470
|
-
}
|
|
471
|
-
});
|
|
472
|
-
} else {
|
|
473
|
-
// If we already have the control just navigate to the new URL
|
|
474
|
-
this._oHtmlControl.getDomRef().src = this.sIFrameUrl;
|
|
416
|
+
sSampleVersion = ResourcesUtil.getResourcesVersion(),
|
|
417
|
+
sSampleSearchParams = "";
|
|
418
|
+
|
|
419
|
+
// Assigning allowed query parameters from Demo Kit URL
|
|
420
|
+
ALLOWLIST_SAMPLES_SEARCH_PARAMS.forEach(function(oParam, index){
|
|
421
|
+
if (new URL(document.location.href).searchParams.get(oParam)){
|
|
422
|
+
sSampleSearchParams += (sSampleSearchParams === "" ? "?" : "&") + oParam + "=" + new URL(document.location.href).searchParams.get(oParam);
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
sSampleSearchParams = (sSampleSearchParams === "" ? "?" : sSampleSearchParams + "&") +
|
|
427
|
+
"sap-ui-xx-sample-id=" + sSampleId
|
|
428
|
+
+ "&sap-ui-xx-sample-origin=" + sSampleOrigin + sSampleVersion
|
|
429
|
+
+ "&sap-ui-xx-dk-origin=" + window.location.origin;
|
|
430
|
+
|
|
431
|
+
this.sIFrameUrl = ResourcesUtil.getResourceOrigin() + "/resources/sap/ui/documentation/sdk/index.html" + sSampleSearchParams;
|
|
432
|
+
|
|
433
|
+
if (this._oHtmlControl) {
|
|
434
|
+
this._oHtmlControl.destroy();
|
|
475
435
|
}
|
|
436
|
+
|
|
437
|
+
var fnMessage = function (eMessage) {
|
|
438
|
+
if (eMessage.data.type === "INIT") {
|
|
439
|
+
var oConfiguration = sap.ui.getCore().getConfiguration();
|
|
440
|
+
if (eMessage.data.config && eMessage.data.config.sample && eMessage.data.config.sample.iframe) {
|
|
441
|
+
sSampleId = this._sId;
|
|
442
|
+
vIframe = eMessage.data.config.sample.iframe;
|
|
443
|
+
sIframePath = this._resolveIframePath(sSampleId, vIframe);
|
|
444
|
+
|
|
445
|
+
//vlaid only for samples that contains own index.html
|
|
446
|
+
// strip the file extension to be able to use jQuery.sap.getModulePath
|
|
447
|
+
aFileNameMatches = rExtractFilename.exec(vIframe);
|
|
448
|
+
sFileName = (aFileNameMatches && aFileNameMatches.length > 1 ? aFileNameMatches[1] : vIframe);
|
|
449
|
+
sFileEnding = rStripUI5Ending.exec(sFileName)[0];
|
|
450
|
+
var sIframeWithoutUI5Ending = sFileName.replace(rStripUI5Ending, "");
|
|
451
|
+
|
|
452
|
+
// combine namespace with the file name again
|
|
453
|
+
this.sIFrameUrl = (sap.ui.require.toUrl((sIframePath + "/" + sIframeWithoutUI5Ending).replace(/\./g, "/")) + sFileEnding || ".html")
|
|
454
|
+
+ "?sap-ui-theme=" + sap.ui.getCore().getConfiguration().getTheme();
|
|
455
|
+
this._oHtmlControl.getDomRef().src = this.sIFrameUrl;
|
|
456
|
+
}
|
|
457
|
+
this._oHtmlControl.getDomRef().contentWindow.postMessage({
|
|
458
|
+
type: "SETTINGS",
|
|
459
|
+
reason: "set",
|
|
460
|
+
data: {
|
|
461
|
+
"density": this.getOwnerComponent().getContentDensityClass(),
|
|
462
|
+
"RTL": oConfiguration.getRTL(),
|
|
463
|
+
"theme": oConfiguration.getTheme()
|
|
464
|
+
}
|
|
465
|
+
}, this.getOwnerComponent()._sSampleIframeOrigin);
|
|
466
|
+
this.fResolve(eMessage.data.config.sample);
|
|
467
|
+
} else if (eMessage.data.type === "ERR") {
|
|
468
|
+
this.fReject(eMessage.data.data.msg);
|
|
469
|
+
} else if (eMessage.data.type === "RTA") {
|
|
470
|
+
this._loadRTA.call(this);
|
|
471
|
+
}
|
|
472
|
+
}.bind(this);
|
|
473
|
+
|
|
474
|
+
this._oHtmlControl = new HTML({
|
|
475
|
+
id : "sampleFrame",
|
|
476
|
+
content : '<iframe src="' + this.sIFrameUrl + '" id="sampleFrame" frameBorder="0"></iframe>'
|
|
477
|
+
}).addEventDelegate({
|
|
478
|
+
onBeforeRendering: function () {
|
|
479
|
+
window.removeEventListener("message", fnMessage);
|
|
480
|
+
}
|
|
481
|
+
})
|
|
482
|
+
.addEventDelegate({
|
|
483
|
+
onAfterRendering: function () {
|
|
484
|
+
window.addEventListener("message", fnMessage);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
|
|
476
488
|
this.byId("page").removeAllContent();
|
|
477
489
|
this.byId("page").addContent(this._oHtmlControl);
|
|
478
490
|
|
|
@@ -69,6 +69,11 @@ sap.ui.define([],
|
|
|
69
69
|
"id": "flexibleProgrammingModelExplorer",
|
|
70
70
|
"text": "Flexible Programming Model Explorer",
|
|
71
71
|
"href": "https://sapui5.hana.ondemand.com/test-resources/sap/fe/core/fpmExplorer/index.html#/overview/introduction"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "accessibilityGuide",
|
|
75
|
+
"text": "Accessibility Guide",
|
|
76
|
+
"href": "test-resources/sap/m/demokit/accessibilityGuide/webapp/index.html"
|
|
72
77
|
}
|
|
73
78
|
];
|
|
74
79
|
|
|
Binary file
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval';"/>
|
|
6
7
|
<title>SAPUI5 Navigation</title>
|
|
7
8
|
<script>
|
|
8
9
|
|
|
@@ -10,32 +11,42 @@
|
|
|
10
11
|
return new window.URLSearchParams(window.location.search).get(sParamName);
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
var encodeOrigin = function (sResourceOrigin) {
|
|
14
|
-
return sResourceOrigin
|
|
15
|
-
.replaceAll("&", "&")
|
|
16
|
-
.replaceAll("<", "<")
|
|
17
|
-
.replaceAll(">", ">")
|
|
18
|
-
.replaceAll("\"", """)
|
|
19
|
-
.replaceAll("’", "'");
|
|
20
|
-
};
|
|
21
|
-
|
|
22
14
|
var sSampleId = getUrlParam('sap-ui-xx-sample-id'),
|
|
23
15
|
sOrigin = getUrlParam('sap-ui-xx-sample-origin'),
|
|
24
16
|
sPresetTheme = getUrlParam('sap-ui-theme') || 'sap_fiori_3',
|
|
25
17
|
sPresetRTL = getUrlParam('sap-ui-rtl') || false,
|
|
26
|
-
oPath = {}
|
|
18
|
+
oPath = {},
|
|
19
|
+
sOriginEncoded,
|
|
20
|
+
oBaseTag,
|
|
21
|
+
oScriptTag;
|
|
27
22
|
|
|
28
23
|
if (sOrigin === "" || sOrigin === ".") {
|
|
29
24
|
var sHref = document.location.href;
|
|
30
25
|
sOrigin = sHref.substring(0, sHref.lastIndexOf('resources/sap/ui/documentation/sdk/') - 1);
|
|
26
|
+
} else {
|
|
27
|
+
sOrigin = new URL(sOrigin, document.baseURI).pathname;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
sOriginEncoded = encodeURI(sOrigin);
|
|
31
|
+
|
|
32
|
+
oPath["sap/ui/demo/mock"] = sOriginEncoded + "/test-resources/sap/ui/documentation/sdk";
|
|
34
33
|
oPath["test-resources/sap/ui/documentation/sdk"] = ".";
|
|
35
34
|
|
|
36
|
-
document.
|
|
37
|
-
|
|
38
|
-
document.
|
|
35
|
+
oBaseTag = document.createElement("base");
|
|
36
|
+
oBaseTag.setAttribute("href", sOriginEncoded + "/");
|
|
37
|
+
document.head.appendChild(oBaseTag);
|
|
38
|
+
|
|
39
|
+
oScriptTag = document.createElement("script");
|
|
40
|
+
oScriptTag.setAttribute("src", sOriginEncoded + "/resources/sap-ui-core.js");
|
|
41
|
+
oScriptTag.setAttribute("id", "sap-ui-bootstrap");
|
|
42
|
+
oScriptTag.setAttribute("data-sap-ui-compatVersion", "edge");
|
|
43
|
+
oScriptTag.dataset.sapUiAsync = true;
|
|
44
|
+
oScriptTag.dataset.sapUiLibs = "sap.m";
|
|
45
|
+
oScriptTag.dataset.sapUiRtl = sPresetRTL;
|
|
46
|
+
oScriptTag.dataset.sapUiResourceroots = JSON.stringify(oPath);
|
|
47
|
+
oScriptTag.dataset.sapUiTheme = sPresetTheme;
|
|
48
|
+
|
|
49
|
+
document.write(oScriptTag.outerHTML);
|
|
39
50
|
</script>
|
|
40
51
|
</head>
|
|
41
52
|
<body class="sapUiBody sapUiSizeCompact" id="content">
|
|
@@ -49,6 +60,9 @@
|
|
|
49
60
|
"sap/base/Log"
|
|
50
61
|
], function (ComponentContainer, Component, library, ControlsInfo, Log) {
|
|
51
62
|
|
|
63
|
+
var oLibraryInfoSingleton = library._getLibraryInfoSingleton();
|
|
64
|
+
oLibraryInfoSingleton.getResourceUrl = undefined;
|
|
65
|
+
|
|
52
66
|
var loadInfo = function() {
|
|
53
67
|
return new Promise(function (resolve) {
|
|
54
68
|
var fnCallback = function(oAppInfo) {
|
|
@@ -56,7 +70,7 @@
|
|
|
56
70
|
var aLibPromises = [];
|
|
57
71
|
oAppInfo.libraries.forEach(function(oLib) {
|
|
58
72
|
var oLibPromise = new Promise(function(innResolve) {
|
|
59
|
-
|
|
73
|
+
oLibraryInfoSingleton._getDocuIndex(oLib.name, function(oDoc) {
|
|
60
74
|
if (!oDoc.explored) {
|
|
61
75
|
innResolve();
|
|
62
76
|
return;
|
|
@@ -12,6 +12,10 @@ sap.ui.define([
|
|
|
12
12
|
],function(library, Log, extend, isPlainObject) {
|
|
13
13
|
"use strict";
|
|
14
14
|
|
|
15
|
+
var IGNORED_GATEGORIES = {
|
|
16
|
+
Template: "Template"
|
|
17
|
+
};
|
|
18
|
+
|
|
15
19
|
// function to compute the app objects for a demo object
|
|
16
20
|
function createDemoAppData(oDemoAppMetadata, sLibUrl, sLibNamespace) {
|
|
17
21
|
// transform simple demo app link to a configuration object
|
|
@@ -91,6 +95,11 @@ sap.ui.define([
|
|
|
91
95
|
if (oDemo.links && oDemo.links.length > 0) {
|
|
92
96
|
for (var j = 0; j < oDemo.links.length; j++) {
|
|
93
97
|
var oDemoAppData = createDemoAppData(oDemo.links[j], oDocIndicies[aLibs[i]].libraryUrl, oDemo.text);
|
|
98
|
+
|
|
99
|
+
if (IGNORED_GATEGORIES[oDemoAppData.category]) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
|
|
94
103
|
oData.demoApps.push(oDemoAppData);
|
|
95
104
|
|
|
96
105
|
// push demo app into helper structure
|
|
@@ -427,6 +427,25 @@
|
|
|
427
427
|
</VBox>
|
|
428
428
|
</f:content>
|
|
429
429
|
</f:Card>
|
|
430
|
+
<!-- Accessibility Guide -->
|
|
431
|
+
<f:Card class="threeColumnLayoutCard" visible="{=! (${device>/system/phone} || ${device>/browser/msie}) }">
|
|
432
|
+
<f:content>
|
|
433
|
+
<VBox justifyContent="SpaceBetween">
|
|
434
|
+
<VBox class="sapUiSmallMargin toolspageCardInfo">
|
|
435
|
+
<html:div class="sapUIDisclaimerLink sapUiSmallMarginBottom">
|
|
436
|
+
<custom:TitleLink
|
|
437
|
+
level="H1"
|
|
438
|
+
titleStyle="H1"
|
|
439
|
+
text="{/accessibilityGuide/text}"
|
|
440
|
+
href="{/accessibilityGuide/href}"
|
|
441
|
+
target="_blank"/>
|
|
442
|
+
</html:div>
|
|
443
|
+
<Text class="sapUiSmallMarginBottom" text="{i18n>TOOLS_CARD_15_TEXT}" />
|
|
444
|
+
</VBox>
|
|
445
|
+
<Image src="./resources/sap/ui/documentation/sdk/images/tools/AccessibilityGuide.png" class="toolsPageImage" alt="{i18n>TOOLS_CARD_15_IMG_ALT}"/>
|
|
446
|
+
</VBox>
|
|
447
|
+
</f:content>
|
|
448
|
+
</f:Card>
|
|
430
449
|
</l:Grid>
|
|
431
450
|
<l:BlockLayout>
|
|
432
451
|
<l:BlockLayoutRow>
|