@openui5/sap.ui.documentation 1.110.0 → 1.111.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 +7 -7
- package/src/sap/ui/documentation/.library +1 -1
- package/src/sap/ui/documentation/library.js +2 -2
- package/src/sap/ui/documentation/messagebundle_es.properties +2 -2
- package/src/sap/ui/documentation/messagebundle_pt.properties +2 -2
- package/src/sap/ui/documentation/sdk/controller/App.controller.js +61 -81
- package/src/sap/ui/documentation/sdk/controller/Entity.controller.js +3 -1
- package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +18 -3
- package/src/sap/ui/documentation/sdk/controller/util/ThemePicker.js +195 -0
- package/src/sap/ui/documentation/sdk/controller/util/XML2JSONUtils.js +66 -14
- package/src/sap/ui/documentation/sdk/css/style.css +8 -2
- package/src/sap/ui/documentation/sdk/manifest.json +7 -1
- package/src/sap/ui/documentation/sdk/model/formatter.js +21 -1
- package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +1 -11
- package/src/sap/ui/documentation/sdk/view/SubApiDetail.view.xml +6 -6
- package/src/sap/ui/documentation/sdk/view/TopicDetail.view.xml +2 -2
- package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +6 -108
- package/src/sap/ui/documentation/sdk/view/WelcomeCustomRowOpenUI5.fragment.xml +46 -0
- package/src/sap/ui/documentation/sdk/view/WelcomeCustomRowSAPUI5.fragment.xml +114 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.documentation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.111.1",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.documentation",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
19
|
-
"@openui5/sap.ui.layout": "1.
|
|
20
|
-
"@openui5/themelib_sap_belize": "1.
|
|
21
|
-
"@openui5/themelib_sap_fiori_3": "1.
|
|
22
|
-
"@openui5/themelib_sap_horizon": "1.
|
|
17
|
+
"@openui5/sap.m": "1.111.1",
|
|
18
|
+
"@openui5/sap.ui.core": "1.111.1",
|
|
19
|
+
"@openui5/sap.ui.layout": "1.111.1",
|
|
20
|
+
"@openui5/themelib_sap_belize": "1.111.1",
|
|
21
|
+
"@openui5/themelib_sap_fiori_3": "1.111.1",
|
|
22
|
+
"@openui5/themelib_sap_horizon": "1.111.1"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.111.1</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library for the Demokit 2.0.</documentation>
|
|
12
12
|
|
|
@@ -25,13 +25,13 @@ sap.ui.define([
|
|
|
25
25
|
* @namespace
|
|
26
26
|
* @alias sap.ui.documentation
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.111.1
|
|
29
29
|
* @since 1.48
|
|
30
30
|
* @public
|
|
31
31
|
*/
|
|
32
32
|
var thisLibrary = sap.ui.getCore().initLibrary({
|
|
33
33
|
name : 'sap.ui.documentation',
|
|
34
|
-
version: '1.
|
|
34
|
+
version: '1.111.1',
|
|
35
35
|
dependencies : ['sap.ui.core','sap.m'],
|
|
36
36
|
types: [],
|
|
37
37
|
interfaces: [],
|
|
@@ -5,7 +5,7 @@ APP_TABHEADER_ITEM_API_REFERENCE=Referencia de la API
|
|
|
5
5
|
APP_TABHEADER_ITEM_SAMPLES=Muestras
|
|
6
6
|
APP_TABHEADER_ITEM_DEMO_APPS=Aplicaciones de demostraci\u00F3n
|
|
7
7
|
APP_TABHEADER_ITEM_TOOLS=Herramientas
|
|
8
|
-
APP_CHANGE_VERSION_BTN=
|
|
8
|
+
APP_CHANGE_VERSION_BTN=Modificar versi\u00F3n
|
|
9
9
|
APP_VERSION_BETA_VERSION=Versi\u00F3n beta
|
|
10
10
|
APP_VERSION_VERSION=Versi\u00F3n
|
|
11
11
|
APP_VERSION_NOT_PRODUCTIVE=- no para uso productivo.
|
|
@@ -209,7 +209,7 @@ CODE_BACK_BTN_TOOLTIP=Volver a la muestra
|
|
|
209
209
|
CODE_API_REFERENCE=Referencia de la API
|
|
210
210
|
CODE_DOWNLOAD_BTN=Descargar
|
|
211
211
|
|
|
212
|
-
CHANGE_VERSION_DIALOG_TITLE=
|
|
212
|
+
CHANGE_VERSION_DIALOG_TITLE=Modificar versi\u00F3n
|
|
213
213
|
CHANGE_VERSION_DIALOG_CLOSE_BTN=Cerrar
|
|
214
214
|
CHANGE_VERSION_DIALOG_APPLY_BTN=Aplicar
|
|
215
215
|
CHANGE_VERSION_DIALOG_LATEST_BTN=\u00DAltimo
|
|
@@ -5,7 +5,7 @@ APP_TABHEADER_ITEM_API_REFERENCE=Refer\u00EAncia de API
|
|
|
5
5
|
APP_TABHEADER_ITEM_SAMPLES=Amostras
|
|
6
6
|
APP_TABHEADER_ITEM_DEMO_APPS=Aplicativos de demonstra\u00E7\u00E3o
|
|
7
7
|
APP_TABHEADER_ITEM_TOOLS=Ferramentas
|
|
8
|
-
APP_CHANGE_VERSION_BTN=
|
|
8
|
+
APP_CHANGE_VERSION_BTN=Modificar vers\u00E3o
|
|
9
9
|
APP_VERSION_BETA_VERSION=Vers\u00E3o beta
|
|
10
10
|
APP_VERSION_VERSION=Vers\u00E3o
|
|
11
11
|
APP_VERSION_NOT_PRODUCTIVE=\u2013 n\u00E3o para uso produtivo.
|
|
@@ -209,7 +209,7 @@ CODE_BACK_BTN_TOOLTIP=Voltar \u00E0 amostra
|
|
|
209
209
|
CODE_API_REFERENCE=Refer\u00EAncia de API
|
|
210
210
|
CODE_DOWNLOAD_BTN=Baixar
|
|
211
211
|
|
|
212
|
-
CHANGE_VERSION_DIALOG_TITLE=
|
|
212
|
+
CHANGE_VERSION_DIALOG_TITLE=Modificar vers\u00E3o
|
|
213
213
|
CHANGE_VERSION_DIALOG_CLOSE_BTN=Encerrar
|
|
214
214
|
CHANGE_VERSION_DIALOG_APPLY_BTN=Aplicar
|
|
215
215
|
CHANGE_VERSION_DIALOG_LATEST_BTN=\u00DAltimo
|
|
@@ -31,7 +31,8 @@ sap.ui.define([
|
|
|
31
31
|
"sap/m/Button",
|
|
32
32
|
"sap/m/Toolbar",
|
|
33
33
|
"sap/ui/documentation/sdk/util/Resources",
|
|
34
|
-
'sap/base/util/LoaderExtensions'
|
|
34
|
+
'sap/base/util/LoaderExtensions',
|
|
35
|
+
"sap/ui/documentation/sdk/controller/util/ThemePicker"
|
|
35
36
|
], function(
|
|
36
37
|
KeyCodes,
|
|
37
38
|
jQuery,
|
|
@@ -59,7 +60,8 @@ sap.ui.define([
|
|
|
59
60
|
Button,
|
|
60
61
|
Toolbar,
|
|
61
62
|
ResourcesUtil,
|
|
62
|
-
LoaderExtensions
|
|
63
|
+
LoaderExtensions,
|
|
64
|
+
ThemePicker
|
|
63
65
|
) {
|
|
64
66
|
"use strict";
|
|
65
67
|
|
|
@@ -94,22 +96,10 @@ sap.ui.define([
|
|
|
94
96
|
CHANGE_SETTINGS_TEXT = "settings",
|
|
95
97
|
CHANGE_COOKIE_PREFERENCES_TEXT = "cookie_preferences",
|
|
96
98
|
DEMOKIT_DEFAULT_LANGUAGE = "en",
|
|
97
|
-
DEMOKIT_APPEARANCE_KEY_LIGHT = "light",
|
|
98
|
-
DEMOKIT_APPEARANCE_KEY_DARK = "dark",
|
|
99
|
-
DEMOKIT_APPEARANCE_KEY_HCB = "hcb",
|
|
100
|
-
DEMOKIT_APPEARANCE_KEY_HCW = "hcw",
|
|
101
|
-
DEMOKIT_APPEARANCE_KEY_AUTO = "auto",
|
|
102
|
-
DEMOKIT_APPEARANCE = Object.create(null),
|
|
103
99
|
DEMOKIT_CONFIGURATION_LANGUAGE = "language",
|
|
104
100
|
DEMOKIT_CONFIGURATION_APPEARANCE = "appearance",
|
|
105
101
|
SITEMAP = "sitemap";
|
|
106
102
|
|
|
107
|
-
DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_LIGHT] = "sap_horizon";
|
|
108
|
-
DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_DARK] = "sap_horizon_dark";
|
|
109
|
-
DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_HCB] = "sap_horizon_hcb";
|
|
110
|
-
DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_HCW] = "sap_horizon_hcw";
|
|
111
|
-
DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_AUTO] = "sap_horizon"; // fallback if window.matchMedia is not supported
|
|
112
|
-
|
|
113
103
|
return BaseController.extend("sap.ui.documentation.sdk.controller.App", {
|
|
114
104
|
formatter: globalFormatter,
|
|
115
105
|
|
|
@@ -167,7 +157,10 @@ sap.ui.define([
|
|
|
167
157
|
"<a href='https://sdk.openui5.org/1.71.46/'>https://sdk.openui5.org/1.71.46/</a>"
|
|
168
158
|
});
|
|
169
159
|
|
|
170
|
-
var oComponent = this.getOwnerComponent()
|
|
160
|
+
var oComponent = this.getOwnerComponent(),
|
|
161
|
+
oController = this;
|
|
162
|
+
|
|
163
|
+
ThemePicker.init(oController);
|
|
171
164
|
|
|
172
165
|
this.MENU_LINKS_MAP = {
|
|
173
166
|
"legal": "https://www.sap.com/corporate/en/legal/impressum.html",
|
|
@@ -225,10 +218,6 @@ sap.ui.define([
|
|
|
225
218
|
|
|
226
219
|
NewsInfo.prepareNewsData(this._oConfigUtil);
|
|
227
220
|
|
|
228
|
-
this._bSupportsPrefersColorScheme = !!(window.matchMedia &&
|
|
229
|
-
(window.matchMedia('(prefers-color-scheme: dark)').matches ||
|
|
230
|
-
window.matchMedia('(prefers-color-scheme: light)').matches));
|
|
231
|
-
|
|
232
221
|
ResizeHandler.register(this.oHeader, this.onHeaderResize.bind(this));
|
|
233
222
|
this.oRouter.attachRouteMatched(this.onRouteChange.bind(this));
|
|
234
223
|
this.oRouter.attachBypassed(this.onRouteNotFound.bind(this));
|
|
@@ -476,7 +465,7 @@ sap.ui.define([
|
|
|
476
465
|
}.bind(this));
|
|
477
466
|
} else if (sTargetText === CHANGE_VERSION_TEXT) {
|
|
478
467
|
this.onChangeVersionButtonPress();
|
|
479
|
-
} else if (
|
|
468
|
+
} else if (ThemePicker._getTheme()[sTargetText]) {
|
|
480
469
|
this._updateAppearance(sTargetText);
|
|
481
470
|
} else if (sTarget === SITEMAP) {
|
|
482
471
|
this.onSiteMapPress();
|
|
@@ -707,67 +696,13 @@ sap.ui.define([
|
|
|
707
696
|
* If the keyword is "auto" the appearance will be updated to light or dark depending on the
|
|
708
697
|
* user's OS settings.
|
|
709
698
|
* @param {string} sKey the appearance keyword
|
|
699
|
+
* @param {object} oComponent the component where the theme will be changed
|
|
710
700
|
* @private
|
|
711
701
|
*/
|
|
712
702
|
_updateAppearance: function(sKey) {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
this._attachPrefersColorSchemeChangeListener();
|
|
716
|
-
} else {
|
|
717
|
-
Core.applyTheme(DEMOKIT_APPEARANCE[sKey]);
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
this._sLastKnownAppearanceKey = sKey;
|
|
721
|
-
|
|
722
|
-
this.bus.publish("themeChanged", "onDemoKitThemeChanged", {sThemeActive: DEMOKIT_APPEARANCE[sKey]});
|
|
723
|
-
|
|
724
|
-
if (this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_REQUIRED_COOKIES) === "1") {
|
|
725
|
-
this._oConfigUtil.setCookie(DEMOKIT_CONFIGURATION_APPEARANCE, sKey);
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
|
-
|
|
729
|
-
/**
|
|
730
|
-
* Toggles the appearance of the Demo Kit to light or dark depending on the incoming argument.
|
|
731
|
-
* @param {boolean} bIsDark whether the new appearance should be dark
|
|
732
|
-
* @private
|
|
733
|
-
*/
|
|
734
|
-
_toggleLightOrDarkAppearance: function (bIsDark) {
|
|
735
|
-
if (bIsDark) {
|
|
736
|
-
// dark mode
|
|
737
|
-
Core.applyTheme(DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_DARK]);
|
|
738
|
-
} else {
|
|
739
|
-
// light mode or unsupported prefers-color-scheme
|
|
740
|
-
Core.applyTheme(DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_LIGHT]);
|
|
741
|
-
}
|
|
742
|
-
},
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* Attaches an event listener to the 'change' event of the prefers-color-scheme media.
|
|
746
|
-
* Depending on the change and the last known appearance, the appearance of the Demo Kit is changed to light, dark, hcb or hcw.
|
|
747
|
-
* @private
|
|
748
|
-
*/
|
|
749
|
-
_attachPrefersColorSchemeChangeListener: function() {
|
|
750
|
-
var that = this;
|
|
751
|
-
|
|
752
|
-
if (!this._bAttachedPrefersColorSchemeChangeListener) {
|
|
753
|
-
var oQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
754
|
-
var toggleAppearance = function(e) {
|
|
755
|
-
if (that._sLastKnownAppearanceKey === DEMOKIT_APPEARANCE_KEY_AUTO) {
|
|
756
|
-
that._toggleLightOrDarkAppearance(e.matches);
|
|
757
|
-
that.bus.publish("themeChanged", "onDemoKitThemeChanged", {
|
|
758
|
-
sThemeActive: DEMOKIT_APPEARANCE[e.matches ? DEMOKIT_APPEARANCE_KEY_DARK : DEMOKIT_APPEARANCE_KEY_LIGHT]
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
};
|
|
762
|
-
if (oQuery.addEventListener) {
|
|
763
|
-
oQuery.addEventListener('change', toggleAppearance);
|
|
764
|
-
} else { // Safari 13 and older only supports deprecated MediaQueryList.addListener
|
|
765
|
-
oQuery.addListener(toggleAppearance);
|
|
766
|
-
}
|
|
767
|
-
this._bAttachedPrefersColorSchemeChangeListener = true;
|
|
768
|
-
}
|
|
703
|
+
var oComponent = this;
|
|
704
|
+
ThemePicker._updateAppearance(sKey, oComponent);
|
|
769
705
|
},
|
|
770
|
-
|
|
771
706
|
/**
|
|
772
707
|
* Creates configuration for the application regarding the URI input.
|
|
773
708
|
* @private
|
|
@@ -794,7 +729,7 @@ sap.ui.define([
|
|
|
794
729
|
if (sConf === DEMOKIT_CONFIGURATION_LANGUAGE) {
|
|
795
730
|
Core.getConfiguration().setLanguage(DEMOKIT_DEFAULT_LANGUAGE);
|
|
796
731
|
} else if (sConf === DEMOKIT_CONFIGURATION_APPEARANCE) {
|
|
797
|
-
this._updateAppearance(
|
|
732
|
+
this._updateAppearance(ThemePicker._getTheme().auto);
|
|
798
733
|
}
|
|
799
734
|
}, this);
|
|
800
735
|
|
|
@@ -1181,8 +1116,8 @@ sap.ui.define([
|
|
|
1181
1116
|
bPhoneSize = oViewModel.getProperty("/bPhoneSize");
|
|
1182
1117
|
|
|
1183
1118
|
// Version switch should not be shown on phone sizes or when no versions are found
|
|
1184
|
-
oViewModel.setProperty("/bShowVersionSwitchInHeader", !bPhoneSize && !!this._aNeoAppVersions);
|
|
1185
|
-
oViewModel.setProperty("/bShowVersionSwitchInMenu", bPhoneSize && !!this._aNeoAppVersions);
|
|
1119
|
+
oViewModel.setProperty("/bShowVersionSwitchInHeader", !bPhoneSize && !!this._aNeoAppVersions.length);
|
|
1120
|
+
oViewModel.setProperty("/bShowVersionSwitchInMenu", bPhoneSize && !!this._aNeoAppVersions.length);
|
|
1186
1121
|
},
|
|
1187
1122
|
|
|
1188
1123
|
_createVersionDialog: function () {
|
|
@@ -1645,6 +1580,41 @@ sap.ui.define([
|
|
|
1645
1580
|
});
|
|
1646
1581
|
},
|
|
1647
1582
|
|
|
1583
|
+
_getCurrentYear: function () {
|
|
1584
|
+
return new Date().getFullYear();
|
|
1585
|
+
},
|
|
1586
|
+
|
|
1587
|
+
_getCurrentQuarter: function () {
|
|
1588
|
+
var oDate = new Date(),
|
|
1589
|
+
iMonth = oDate.getMonth(),
|
|
1590
|
+
iQuarter = Math.floor(iMonth / 3) + 1;
|
|
1591
|
+
|
|
1592
|
+
return iQuarter;
|
|
1593
|
+
},
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Filters versions in the given JSON object that have passed their end of cloud maintenance date.
|
|
1597
|
+
* @function
|
|
1598
|
+
* @param {Object} oVersionOverviewJson - A JSON object containing version information.
|
|
1599
|
+
* @returns {Array} An array of versions that have not passed their end of cloud maintenance date.
|
|
1600
|
+
*/
|
|
1601
|
+
_filterVersionsPastEOCP: function (oVersionOverviewJson) {
|
|
1602
|
+
var aVersions = oVersionOverviewJson.patches;
|
|
1603
|
+
|
|
1604
|
+
return aVersions.filter(function (oVersion) {
|
|
1605
|
+
var sVersionEOCP = oVersion.extended_eocp || oVersion.eocp || "",
|
|
1606
|
+
iQuarter = Number(sVersionEOCP.substring(1, 2)),
|
|
1607
|
+
iYear = Number(sVersionEOCP.substring(3));
|
|
1608
|
+
|
|
1609
|
+
if (!sVersionEOCP) {
|
|
1610
|
+
return true;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
return iYear > this._getCurrentYear() ||
|
|
1614
|
+
iYear === this._getCurrentYear() && iQuarter >= this._getCurrentQuarter();
|
|
1615
|
+
}.bind(this));
|
|
1616
|
+
},
|
|
1617
|
+
|
|
1648
1618
|
_processVersionOverview: function(oVersionOverviewJson) {
|
|
1649
1619
|
var aVersions = oVersionOverviewJson.versions,
|
|
1650
1620
|
aResult = [];
|
|
@@ -1712,18 +1682,28 @@ sap.ui.define([
|
|
|
1712
1682
|
// Success
|
|
1713
1683
|
function(oValues) {
|
|
1714
1684
|
var aNeoAppVersions = this._processNeoAppJSON(oValues[0]),
|
|
1715
|
-
aHiddenValues = this._processVersionOverview(oValues[1])
|
|
1685
|
+
aHiddenValues = this._processVersionOverview(oValues[1]),
|
|
1686
|
+
aFilteredVersionsEOCP = this._filterVersionsPastEOCP(oValues[1]);
|
|
1716
1687
|
|
|
1717
1688
|
if (Array.isArray(aNeoAppVersions)) {
|
|
1718
1689
|
aNeoAppVersions = aNeoAppVersions.filter(function(oVersion) {
|
|
1719
1690
|
return aHiddenValues.indexOf(oVersion.version) === -1;
|
|
1720
1691
|
});
|
|
1721
1692
|
|
|
1693
|
+
// Filters "aNeoAppVersions" array by removing elements
|
|
1694
|
+
// that don't have a matching version in "aFilteredVersionsEOCP" array.
|
|
1695
|
+
aNeoAppVersions = aNeoAppVersions.filter(function(oVersion) {
|
|
1696
|
+
return aFilteredVersionsEOCP.find(function(oFilteredVersion) {
|
|
1697
|
+
return oFilteredVersion.version === oVersion.version;
|
|
1698
|
+
});
|
|
1699
|
+
});
|
|
1700
|
+
|
|
1722
1701
|
this._aNeoAppVersions = aNeoAppVersions;
|
|
1723
1702
|
// Make version select visible
|
|
1724
1703
|
this._updateVersionSwitchVisibility();
|
|
1725
1704
|
this.getModel("versionData").setProperty("/latestVersion", this._aNeoAppVersions[0].version);
|
|
1726
1705
|
} else {
|
|
1706
|
+
this._aNeoAppVersions = [];
|
|
1727
1707
|
Log.warning("No multi-version environment detected");
|
|
1728
1708
|
}
|
|
1729
1709
|
}.bind(this),
|
|
@@ -42,6 +42,10 @@ sap.ui.define([
|
|
|
42
42
|
"fields": "properties",
|
|
43
43
|
"special settings": "specialsettings"
|
|
44
44
|
},
|
|
45
|
+
EXTERNAL_BASE_TYPES: [
|
|
46
|
+
"Date",
|
|
47
|
+
"Object"
|
|
48
|
+
],
|
|
45
49
|
formatter: formatter,
|
|
46
50
|
|
|
47
51
|
onInit: function () {
|
|
@@ -391,9 +395,15 @@ sap.ui.define([
|
|
|
391
395
|
this._oHeaderLayoutUtil = {
|
|
392
396
|
|
|
393
397
|
_getControlSampleBlock: function (oControlData, oEntityData) {
|
|
398
|
+
var sStereotype = oControlData && oControlData['ui5-metadata'] && oControlData['ui5-metadata'].stereotype || '';
|
|
399
|
+
if (typeof sStereotype === 'string' && sStereotype.length > 0) {
|
|
400
|
+
// stereotype with starting capital char and spacer at the end
|
|
401
|
+
sStereotype = sStereotype.charAt(0).toUpperCase() + sStereotype.slice(1) + ' ';
|
|
402
|
+
}
|
|
403
|
+
|
|
394
404
|
return _getHBox({
|
|
395
405
|
items: [
|
|
396
|
-
_getLabel({design: "Bold", text: "
|
|
406
|
+
_getLabel({design: "Bold", text: sStereotype + "Sample:"}),
|
|
397
407
|
_getLink({
|
|
398
408
|
emphasized: true,
|
|
399
409
|
text: oEntityData.sample,
|
|
@@ -448,15 +458,20 @@ sap.ui.define([
|
|
|
448
458
|
}, true);
|
|
449
459
|
},
|
|
450
460
|
_getExtendsBlock: function (oControlData, oEntityData) {
|
|
461
|
+
// whether the base class can be linked to
|
|
462
|
+
var bExtendsAPIEntity =
|
|
463
|
+
oControlData.isDerived
|
|
464
|
+
&& !this.EXTERNAL_BASE_TYPES.includes(oControlData.extendsText);
|
|
465
|
+
|
|
451
466
|
return _getHBox({
|
|
452
467
|
items: [
|
|
453
468
|
_getLabel({text: "Extends:"}),
|
|
454
469
|
_getLink({
|
|
455
470
|
text: oControlData.extendsText,
|
|
456
471
|
href: "api/" + oControlData.extendsText,
|
|
457
|
-
visible:
|
|
472
|
+
visible: bExtendsAPIEntity
|
|
458
473
|
}),
|
|
459
|
-
_getText({text: oControlData.extendsText, visible: !
|
|
474
|
+
_getText({text: oControlData.extendsText, visible: !bExtendsAPIEntity})
|
|
460
475
|
]
|
|
461
476
|
}, true);
|
|
462
477
|
},
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 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
|
+
"sap/ui/core/Core",
|
|
9
|
+
"sap/base/util/UriParameters"
|
|
10
|
+
], function(
|
|
11
|
+
Core,
|
|
12
|
+
UriParameters
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Utility used for changing the themes inside applications.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
var ThemePicker = {};
|
|
21
|
+
|
|
22
|
+
var CONFIGURATION_APPEARANCE = "appearance",
|
|
23
|
+
APPEARANCE_KEY_LIGHT = "light",
|
|
24
|
+
APPEARANCE_KEY_DARK = "dark",
|
|
25
|
+
APPEARANCE_KEY_HCB = "hcb",
|
|
26
|
+
APPEARANCE_KEY_HCW = "hcw",
|
|
27
|
+
APPEARANCE_KEY_AUTO = "auto",
|
|
28
|
+
APPEARANCE = Object.create(null);
|
|
29
|
+
|
|
30
|
+
APPEARANCE[APPEARANCE_KEY_LIGHT] = "sap_horizon";
|
|
31
|
+
APPEARANCE[APPEARANCE_KEY_DARK] = "sap_horizon_dark";
|
|
32
|
+
APPEARANCE[APPEARANCE_KEY_HCB] = "sap_horizon_hcb";
|
|
33
|
+
APPEARANCE[APPEARANCE_KEY_HCW] = "sap_horizon_hcw";
|
|
34
|
+
APPEARANCE[APPEARANCE_KEY_AUTO] = "sap_horizon"; // fallback if window.matchMedia is not supported
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
ThemePicker.init = function(oComponent) {
|
|
38
|
+
this.oComponent = oComponent;
|
|
39
|
+
|
|
40
|
+
this._oConfigUtil = oComponent.getOwnerComponent().getConfigUtil();
|
|
41
|
+
this._oCookieNames = this._oConfigUtil.COOKIE_NAMES;
|
|
42
|
+
|
|
43
|
+
this.bus = Core.getEventBus();
|
|
44
|
+
|
|
45
|
+
this._createConfigurationBasedOnURIInput();
|
|
46
|
+
|
|
47
|
+
this._bSupportsPrefersColorScheme = !!(window.matchMedia &&
|
|
48
|
+
(window.matchMedia('(prefers-color-scheme: dark)').matches ||
|
|
49
|
+
window.matchMedia('(prefers-color-scheme: light)').matches));
|
|
50
|
+
|
|
51
|
+
if (this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_REQUIRED_COOKIES) === "1" && this._aConfiguration.length > 0) {
|
|
52
|
+
ThemePicker._applyCookiesConfiguration(this._aConfiguration);
|
|
53
|
+
} else {
|
|
54
|
+
ThemePicker._applyDefaultConfiguration(this._aConfiguration);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Stores and returns the available themes.
|
|
61
|
+
* @private
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
ThemePicker._getTheme = function() {
|
|
65
|
+
return APPEARANCE;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Updates the appearance of the Demo Kit depending of the incoming appearance keyword.
|
|
70
|
+
* If the keyword is "auto" the appearance will be updated to light or dark depending on the
|
|
71
|
+
* user's OS settings.
|
|
72
|
+
* @param {string} sKey the appearance keyword
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
ThemePicker._updateAppearance = function(sKey) {
|
|
76
|
+
|
|
77
|
+
if (sKey === APPEARANCE_KEY_AUTO && this._bSupportsPrefersColorScheme) {
|
|
78
|
+
this._toggleLightOrDarkAppearance(window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
79
|
+
this._attachPrefersColorSchemeChangeListener();
|
|
80
|
+
} else {
|
|
81
|
+
Core.applyTheme(this._getTheme()[sKey]);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
this._sLastKnownAppearanceKey = sKey;
|
|
85
|
+
|
|
86
|
+
this.bus.publish("themeChanged", "onThemeChanged", {sThemeActive: this._getTheme()[sKey]});
|
|
87
|
+
|
|
88
|
+
if (this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_REQUIRED_COOKIES) === "1") {
|
|
89
|
+
this._oConfigUtil.setCookie(CONFIGURATION_APPEARANCE, sKey);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Toggles the appearance of the Demo Kit to light or dark depending on the incoming argument.
|
|
95
|
+
* @param {boolean} bIsDark whether the new appearance should be dark
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
ThemePicker._toggleLightOrDarkAppearance = function (bIsDark) {
|
|
99
|
+
if (bIsDark) {
|
|
100
|
+
// dark mode
|
|
101
|
+
Core.applyTheme(this._getTheme().dark);
|
|
102
|
+
} else {
|
|
103
|
+
// light mode or unsupported prefers-color-scheme
|
|
104
|
+
Core.applyTheme(this._getTheme().light);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Attaches an event listener to the 'change' event of the prefers-color-scheme media.
|
|
110
|
+
* Depending on the change and the last known appearance, the appearance of the Demo Kit is changed to light, dark, hcb or hcw.
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
ThemePicker._attachPrefersColorSchemeChangeListener = function() {
|
|
114
|
+
var that = this,
|
|
115
|
+
oQuery,
|
|
116
|
+
toggleAppearance;
|
|
117
|
+
|
|
118
|
+
if (!this._bAttachedPrefersColorSchemeChangeListener) {
|
|
119
|
+
oQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
120
|
+
|
|
121
|
+
toggleAppearance = function(e) {
|
|
122
|
+
if (that._sLastKnownAppearanceKey === APPEARANCE_KEY_AUTO) {
|
|
123
|
+
this._toggleLightOrDarkAppearance(e.matches);
|
|
124
|
+
that.bus.publish("themeChanged", "onThemeChanged", {
|
|
125
|
+
sThemeActive: APPEARANCE[e.matches ? APPEARANCE_KEY_DARK : APPEARANCE_KEY_LIGHT]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
if (oQuery.addEventListener) {
|
|
131
|
+
oQuery.addEventListener('change', toggleAppearance);
|
|
132
|
+
} else { // Safari 13 and older only supports deprecated MediaQueryList.addListener
|
|
133
|
+
oQuery.addListener(toggleAppearance);
|
|
134
|
+
}
|
|
135
|
+
this._bAttachedPrefersColorSchemeChangeListener = true;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Applies configuration for the application regarding the cookies.
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
ThemePicker._applyCookiesConfiguration = function () {
|
|
144
|
+
var sCookieValue, sConf, i;
|
|
145
|
+
|
|
146
|
+
for (i = 0; i < this._aConfiguration.length; i++) {
|
|
147
|
+
sConf = this._aConfiguration[i];
|
|
148
|
+
sCookieValue = this._oConfigUtil.getCookieValue(sConf);
|
|
149
|
+
|
|
150
|
+
if (sCookieValue !== "") {
|
|
151
|
+
if (sConf === CONFIGURATION_APPEARANCE) {
|
|
152
|
+
this._updateAppearance(sCookieValue, this.oComponent);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// If we have available value for the given cookie we remove it from the configuration array.
|
|
156
|
+
this._aConfiguration.splice(i, 1);
|
|
157
|
+
i--;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// If we still have configurations which are not set by their cookie values, we apply their default values.
|
|
162
|
+
if (this._aConfiguration.length > 0) {
|
|
163
|
+
this._applyDefaultConfiguration();
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Applies configuration for the application regarding the default values.
|
|
169
|
+
* @private
|
|
170
|
+
*/
|
|
171
|
+
ThemePicker._applyDefaultConfiguration = function () {
|
|
172
|
+
this._aConfiguration.forEach(function(sConf){
|
|
173
|
+
if (sConf === CONFIGURATION_APPEARANCE) {
|
|
174
|
+
this._updateAppearance(APPEARANCE_KEY_AUTO);
|
|
175
|
+
}
|
|
176
|
+
}, this);
|
|
177
|
+
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Creates configuration for the application regarding the URI input.
|
|
182
|
+
* @private
|
|
183
|
+
*/
|
|
184
|
+
ThemePicker._createConfigurationBasedOnURIInput = function () {
|
|
185
|
+
var oUriParams = UriParameters.fromQuery(window.location.search);
|
|
186
|
+
this._aConfiguration = [];
|
|
187
|
+
|
|
188
|
+
if (!(oUriParams.has('sap-ui-theme') || oUriParams.has('sap-theme'))) {
|
|
189
|
+
this._aConfiguration.push(CONFIGURATION_APPEARANCE);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
return ThemePicker;
|
|
194
|
+
|
|
195
|
+
});
|
|
@@ -5,29 +5,52 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define(["sap/ui/thirdparty/jquery"],
|
|
8
|
-
function(jQuery) {
|
|
8
|
+
function (jQuery) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
function buildDocuJSON(xml, oConfig) {
|
|
12
12
|
var xmlDom = xml2dom(xml, oConfig);
|
|
13
13
|
var aSingles = ["topictitle1", "shortdesc"];
|
|
14
|
+
var aPreservedSingles = oConfig.preservedContent && oConfig.preservedContent.length
|
|
15
|
+
&& oConfig.preservedContent.map(function (e) { return e.className; });
|
|
14
16
|
|
|
15
|
-
var
|
|
17
|
+
var getPreservedTags = function (className) {
|
|
18
|
+
var preservedTags;
|
|
19
|
+
|
|
20
|
+
oConfig.preservedContent.forEach(function (item) {
|
|
21
|
+
if (item.className === className) {
|
|
22
|
+
preservedTags = item.preservedTags;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return preservedTags;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var getNodeText = function (className, nodeHTML) {
|
|
30
|
+
var bIsNodePreserved = aPreservedSingles && aPreservedSingles.indexOf(className) > -1;
|
|
31
|
+
|
|
32
|
+
if (bIsNodePreserved) {
|
|
33
|
+
return jQuery("<div></div>").html(removeHTMLTags(nodeHTML, getPreservedTags(className))).html();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return jQuery("<div></div>").html(removeHTMLTags(nodeHTML)).text();
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var processSingleNode = function (className, xmlDOMObj) {
|
|
16
40
|
var oXMLDOM = xmlDOMObj || xmlDom;
|
|
17
41
|
var oNodes = oXMLDOM.getElementsByClassName(className);
|
|
42
|
+
|
|
18
43
|
if (oNodes.length === 0) {
|
|
19
44
|
return '';
|
|
20
45
|
}
|
|
21
|
-
var nodeText = jQuery("<div></div>").html(removeHTMLTags(oNodes[0].innerHTML)).text();
|
|
22
|
-
return oNodes && oNodes.length > 0 && ("innerHTML" in oNodes[0]) && nodeText || '';
|
|
23
|
-
};
|
|
24
46
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
var nodeHTML = oNodes[0].innerHTML,
|
|
48
|
+
nodeText = getNodeText(className, nodeHTML);
|
|
49
|
+
|
|
50
|
+
return oNodes && oNodes.length > 0 && ("innerHTML" in oNodes[0]) && nodeText || '';
|
|
28
51
|
};
|
|
29
52
|
|
|
30
|
-
var fixImgLocation = function(element) {
|
|
53
|
+
var fixImgLocation = function (element) {
|
|
31
54
|
var images = element.querySelectorAll("img");
|
|
32
55
|
|
|
33
56
|
for (var i = 0; i < images.length; i++) {
|
|
@@ -41,7 +64,7 @@ sap.ui.define(["sap/ui/thirdparty/jquery"],
|
|
|
41
64
|
return element.innerHTML;
|
|
42
65
|
};
|
|
43
66
|
|
|
44
|
-
var processSections = function() {
|
|
67
|
+
var processSections = function () {
|
|
45
68
|
/* "Invalid DOM Elements" (ones that should not be added to the body) are:
|
|
46
69
|
- all scripts
|
|
47
70
|
- element with class topictitle1 (this is used as title)
|
|
@@ -72,11 +95,11 @@ sap.ui.define(["sap/ui/thirdparty/jquery"],
|
|
|
72
95
|
|
|
73
96
|
fixImgLocation(wrapperContainer);
|
|
74
97
|
|
|
75
|
-
json['html'] =
|
|
98
|
+
json['html'] = wrapperContainer.innerHTML;
|
|
76
99
|
};
|
|
77
100
|
|
|
78
101
|
var json = {}, mdEditLink;
|
|
79
|
-
aSingles.forEach(function(singleNode, idx){
|
|
102
|
+
aSingles.forEach(function (singleNode, idx) {
|
|
80
103
|
json[singleNode] = processSingleNode(singleNode);
|
|
81
104
|
});
|
|
82
105
|
|
|
@@ -104,10 +127,39 @@ sap.ui.define(["sap/ui/thirdparty/jquery"],
|
|
|
104
127
|
}
|
|
105
128
|
}
|
|
106
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Removes HTML tags from a string, except for those specified in the preservedTags array.
|
|
132
|
+
* @param {string} txt - The input string.
|
|
133
|
+
* @param {string[]} [preservedTags] - An optional array of HTML tags to preserve.
|
|
134
|
+
* @return {string} The input string with HTML tags removed.
|
|
135
|
+
*/
|
|
136
|
+
function removeHTMLTags(txt, preservedTags) {
|
|
137
|
+
if (preservedTags === undefined || preservedTags.length === 0) {
|
|
138
|
+
return removeAllHTMLTags(txt);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return txt.replace(/<\/?([^>]+)>/g, function (match, tag) {
|
|
142
|
+
if (preservedTags.indexOf(tag) === -1) {
|
|
143
|
+
return '';
|
|
144
|
+
}
|
|
145
|
+
return match;
|
|
146
|
+
}).replace(/\s{2,}/g, ' ');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Removes all HTML tags from a string.
|
|
151
|
+
* @param {string} txt - The input string.
|
|
152
|
+
* @return {string} The input string with all HTML tags removed.
|
|
153
|
+
*/
|
|
154
|
+
function removeAllHTMLTags(txt) {
|
|
155
|
+
return txt.replace(/<[^>]*>/g, ' ').replace(/\s{2,}/g, ' ');
|
|
156
|
+
}
|
|
157
|
+
|
|
107
158
|
return {
|
|
108
|
-
DomXml2JSON
|
|
159
|
+
DomXml2JSON: buildDocuJSON,
|
|
109
160
|
XML2DOM: xml2dom,
|
|
110
|
-
XML2JSON: buildDocuJSON
|
|
161
|
+
XML2JSON: buildDocuJSON,
|
|
162
|
+
removeHTMLTags: removeHTMLTags
|
|
111
163
|
};
|
|
112
164
|
|
|
113
165
|
});
|
|
@@ -318,6 +318,10 @@ html.sap-desktop .sapContrast.sapMSlt.sapUiDocumentationSelect:not(.sapMSltExpan
|
|
|
318
318
|
font-family: "72Black", "72Blackfull", "72", "72full", Arial, Helvetica, sans-serif;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
.sapUiDocumentationTopicSubtitle code {
|
|
322
|
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
323
|
+
}
|
|
324
|
+
|
|
321
325
|
.sapUiMedia-Std-Phone .sapUiDocumentationTopicTitle {
|
|
322
326
|
font-size: 1.5rem;
|
|
323
327
|
}
|
|
@@ -328,11 +332,13 @@ html.sap-desktop .sapContrast.sapMSlt.sapUiDocumentationSelect:not(.sapMSltExpan
|
|
|
328
332
|
padding-right: 2rem;
|
|
329
333
|
}
|
|
330
334
|
|
|
331
|
-
.sapUiTheme-sap_horizon .sapFDynamicPageHeader.sapFDynamicPageHeaderWithContent .sapMText
|
|
335
|
+
.sapUiTheme-sap_horizon .sapFDynamicPageHeader.sapFDynamicPageHeaderWithContent .sapMText,
|
|
336
|
+
.sapUiTheme-sap_horizon .sapFDynamicPageHeaderWithContent .sapUiDocumentationTopicSubtitle {
|
|
332
337
|
color: #556b82;
|
|
333
338
|
}
|
|
334
339
|
|
|
335
|
-
.sapUiTheme-sap_horizon_dark .sapFDynamicPageHeader.sapFDynamicPageHeaderWithContent .sapMText
|
|
340
|
+
.sapUiTheme-sap_horizon_dark .sapFDynamicPageHeader.sapFDynamicPageHeaderWithContent .sapMText,
|
|
341
|
+
.sapUiTheme-sap_horizon_dark .sapFDynamicPageHeaderWithContent .sapUiDocumentationTopicSubtitle {
|
|
336
342
|
color: #8396a8;
|
|
337
343
|
}
|
|
338
344
|
|
|
@@ -72,7 +72,13 @@
|
|
|
72
72
|
"config": {
|
|
73
73
|
"docuPath": "./docs/topics/",
|
|
74
74
|
"exploredURI": "./",
|
|
75
|
-
"topicHtmlMainDivId": "d4h5-main-container"
|
|
75
|
+
"topicHtmlMainDivId": "d4h5-main-container",
|
|
76
|
+
"preservedContent": [
|
|
77
|
+
{
|
|
78
|
+
"className": "shortdesc",
|
|
79
|
+
"preservedTags": ["code"]
|
|
80
|
+
}
|
|
81
|
+
]
|
|
76
82
|
},
|
|
77
83
|
"routing": {
|
|
78
84
|
"config": {
|
|
@@ -9,8 +9,10 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/base/Object",
|
|
10
10
|
"sap/base/util/merge",
|
|
11
11
|
"sap/ui/documentation/sdk/controller/util/JSDocUtil",
|
|
12
|
+
"sap/base/security/sanitizeHTML",
|
|
13
|
+
"sap/ui/documentation/sdk/controller/util/URLUtil",
|
|
12
14
|
"sap/base/strings/formatMessage"
|
|
13
|
-
], function (BaseObject, merge, JSDocUtil,
|
|
15
|
+
], function (BaseObject, merge, JSDocUtil, sanitizeHTML, URLUtil, formatMessage) {
|
|
14
16
|
"use strict";
|
|
15
17
|
|
|
16
18
|
// regexp for an extra route parameter in the format: a single 'p' letter followed by a digit
|
|
@@ -281,6 +283,24 @@ sap.ui.define([
|
|
|
281
283
|
return formatMessage(sMsg, sParam);
|
|
282
284
|
},
|
|
283
285
|
|
|
286
|
+
//Formatter for links, coming from api.json text in static documentation format
|
|
287
|
+
formatMessageStripLinks: function (sText) {
|
|
288
|
+
var bStatic = window['sap-ui-documentation-static'];
|
|
289
|
+
|
|
290
|
+
if (sText) {
|
|
291
|
+
|
|
292
|
+
sText = sanitizeHTML(sText, {
|
|
293
|
+
uriRewriter: function(sUrl) {
|
|
294
|
+
if (bStatic && URLUtil.hasSEOOptimizedFormat("/" + sUrl)) {
|
|
295
|
+
sUrl = URLUtil.convertToNonSEOFormat(sUrl).replace(/^\//, "");
|
|
296
|
+
}
|
|
297
|
+
return sUrl;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
return sText;
|
|
302
|
+
},
|
|
303
|
+
|
|
284
304
|
/**
|
|
285
305
|
* Formats the value of the <code>visibile</code> property of the cards in the Tools section
|
|
286
306
|
*
|
|
@@ -249,11 +249,6 @@ sap.ui.define([
|
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
// The links from the static documentation are already preprocessed at build-time
|
|
253
|
-
// to the correct format, so we do not need to adjust them here at run-time
|
|
254
|
-
if (window['sap-ui-documentation-static'] && oAnchorElement.classList.contains('sap-doc')) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
252
|
sTarget = getHref(oAnchorElement);
|
|
258
253
|
|
|
259
254
|
bParsed = /^blob:/.test(sTarget)
|
|
@@ -305,11 +300,6 @@ sap.ui.define([
|
|
|
305
300
|
oUri;
|
|
306
301
|
|
|
307
302
|
if (oAnchorElement) {
|
|
308
|
-
// The links from the static documentation are already preprocessed at build-time
|
|
309
|
-
// to the correct format, so we do not need to adjust them here at run-time
|
|
310
|
-
if (window['sap-ui-documentation-static'] && oAnchorElement.classList.contains('sap-doc')) {
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
303
|
sTargetHref = getHref(oAnchorElement);
|
|
314
304
|
bNewWindow = bCtrlHold || !getSameWindow(oAnchorElement);
|
|
315
305
|
}
|
|
@@ -679,7 +669,7 @@ sap.ui.define([
|
|
|
679
669
|
}
|
|
680
670
|
|
|
681
671
|
function isAnchorElement(oAnchorElement, bSameWindow) {
|
|
682
|
-
if (oAnchorElement && oAnchorElement.nodeName === "A") {
|
|
672
|
+
if (oAnchorElement && oAnchorElement.nodeName === "A" || oAnchorElement.nodeName === "AREA") {
|
|
683
673
|
return bSameWindow ? getSameWindow(oAnchorElement) : true;
|
|
684
674
|
}
|
|
685
675
|
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
<template:if test="{=${data>/deprecatedText} !== undefined}">
|
|
56
56
|
<m:MessageStrip
|
|
57
|
-
text="{/deprecatedText}"
|
|
57
|
+
text="{path : '/deprecatedText', formatter: '.formatter.formatMessageStripLinks'}"
|
|
58
58
|
type="Error"
|
|
59
59
|
showIcon="true"
|
|
60
60
|
showCloseButton="false"
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
</layout:HorizontalLayout>
|
|
296
296
|
<m:MessageStrip
|
|
297
297
|
visible="{=${deprecatedText} !== undefined}"
|
|
298
|
-
text="{deprecatedText}"
|
|
298
|
+
text="{path : 'deprecatedText', formatter: 'sap.ui.documentation.sdk.model.formatter.formatMessageStripLinks'}"
|
|
299
299
|
type="Error"
|
|
300
300
|
showIcon="true"
|
|
301
301
|
showCloseButton="false"
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
</layout:HorizontalLayout>
|
|
498
498
|
<template:if test="{=${event>deprecated} !== undefined}">
|
|
499
499
|
<m:MessageStrip
|
|
500
|
-
text="{event>deprecatedText}"
|
|
500
|
+
text="{path : 'event>deprecatedText', formatter: 'sap.ui.documentation.sdk.model.formatter.formatMessageStripLinks'}"
|
|
501
501
|
type="Error"
|
|
502
502
|
showIcon="true"
|
|
503
503
|
showCloseButton="false"
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
<custom:JSDocText sanitizeContent="false" text="{path: 'parameter>description', formatter: 'sap.ui.base.ManagedObject.escapeSettingsValue'}"/>
|
|
527
527
|
<m:MessageStrip
|
|
528
528
|
visible="{=${parameter>deprecated} !== undefined}"
|
|
529
|
-
text="{parameter>deprecatedText}"
|
|
529
|
+
text="{path : 'parameter>deprecatedText', formatter: 'sap.ui.documentation.sdk.model.formatter.formatMessageStripLinks'}"
|
|
530
530
|
type="Error"
|
|
531
531
|
showIcon="true"
|
|
532
532
|
showCloseButton="false"
|
|
@@ -614,9 +614,9 @@
|
|
|
614
614
|
<m:ObjectStatus visible="{=${method>since} !== undefined}" text="Since: {method>since}"/>
|
|
615
615
|
</layout:HorizontalLayout>
|
|
616
616
|
</m:FlexBox>
|
|
617
|
-
<template:if test="{=${method>
|
|
617
|
+
<template:if test="{=${method>deprecatedText} !== undefined}">
|
|
618
618
|
<m:MessageStrip
|
|
619
|
-
text="{method>deprecatedText}"
|
|
619
|
+
text="{ path: 'method>deprecatedText', formatter: 'sap.ui.documentation.sdk.model.formatter.formatMessageStripLinks' }"
|
|
620
620
|
type="Error"
|
|
621
621
|
showIcon="true"
|
|
622
622
|
showCloseButton="false"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
</title>
|
|
42
42
|
|
|
43
43
|
<header>
|
|
44
|
-
<DynamicPageHeader pinnable="
|
|
44
|
+
<DynamicPageHeader pinnable="false">
|
|
45
45
|
<content>
|
|
46
|
-
<m:
|
|
46
|
+
<m:FormattedText htmlText="{/shortdesc}" class="sapUiDocumentationTopicSubtitle"></m:FormattedText>
|
|
47
47
|
</content>
|
|
48
48
|
</DynamicPageHeader>
|
|
49
49
|
</header>
|
|
@@ -169,115 +169,13 @@
|
|
|
169
169
|
</l:BlockLayoutCell>
|
|
170
170
|
</l:BlockLayoutRow>
|
|
171
171
|
|
|
172
|
-
<l:BlockLayoutRow>
|
|
173
|
-
<
|
|
174
|
-
backgroundColorSet="ColorSet10"
|
|
175
|
-
backgroundColorShade="ShadeB">
|
|
176
|
-
<l:VerticalLayout
|
|
177
|
-
width="100%">
|
|
178
|
-
<custom:TitleLink
|
|
179
|
-
href="topic/bf2d55eaa33b44a78ef95e7946d658e8"
|
|
180
|
-
text="{i18n>WELCOME_BLOCK_4_TITLE}"
|
|
181
|
-
class="sapUiSmallMarginBottom"
|
|
182
|
-
titleStyle="H2"/>
|
|
183
|
-
<Text
|
|
184
|
-
text="{i18n>WELCOME_BLOCK_4_TEXT_1}"
|
|
185
|
-
class="sapUiSmallMarginBottom"/>
|
|
186
|
-
<HBox>
|
|
187
|
-
<core:Icon
|
|
188
|
-
src="sap-icon://accept"
|
|
189
|
-
size="0.875rem"
|
|
190
|
-
color="Default"
|
|
191
|
-
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
192
|
-
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_2}"/>
|
|
193
|
-
</HBox>
|
|
194
|
-
<HBox>
|
|
195
|
-
<core:Icon
|
|
196
|
-
src="sap-icon://accept"
|
|
197
|
-
size="0.875rem"
|
|
198
|
-
color="Default"
|
|
199
|
-
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
200
|
-
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_3}"/>
|
|
201
|
-
</HBox>
|
|
202
|
-
<HBox>
|
|
203
|
-
<core:Icon
|
|
204
|
-
src="sap-icon://accept"
|
|
205
|
-
size="0.875rem"
|
|
206
|
-
color="Default"
|
|
207
|
-
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
208
|
-
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_4}"/>
|
|
209
|
-
</HBox>
|
|
210
|
-
<HBox>
|
|
211
|
-
<core:Icon
|
|
212
|
-
src="sap-icon://accept"
|
|
213
|
-
size="0.875rem"
|
|
214
|
-
color="Default"
|
|
215
|
-
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
216
|
-
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_5}"/>
|
|
217
|
-
</HBox>
|
|
218
|
-
<HBox>
|
|
219
|
-
<core:Icon
|
|
220
|
-
src="sap-icon://accept"
|
|
221
|
-
size="0.875rem"
|
|
222
|
-
color="Default"
|
|
223
|
-
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
224
|
-
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_6}"/>
|
|
225
|
-
</HBox>
|
|
226
|
-
<HBox>
|
|
227
|
-
<core:Icon
|
|
228
|
-
src="sap-icon://accept"
|
|
229
|
-
size="0.875rem"
|
|
230
|
-
color="Default"
|
|
231
|
-
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
232
|
-
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_7}"/>
|
|
233
|
-
</HBox>
|
|
234
|
-
<HBox>
|
|
235
|
-
<core:Icon
|
|
236
|
-
src="sap-icon://accept"
|
|
237
|
-
size="0.875rem"
|
|
238
|
-
color="Default"
|
|
239
|
-
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
240
|
-
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_8}"/>
|
|
241
|
-
</HBox>
|
|
242
|
-
</l:VerticalLayout>
|
|
243
|
-
</l:BlockLayoutCell>
|
|
244
|
-
|
|
245
|
-
<l:BlockLayoutCell
|
|
246
|
-
backgroundColorSet="ColorSet10"
|
|
247
|
-
backgroundColorShade="ShadeA">
|
|
248
|
-
<l:Grid
|
|
249
|
-
defaultSpan="L6 M12 S12"
|
|
250
|
-
hSpacing="0"
|
|
251
|
-
vSpacing="0">
|
|
252
|
-
<l:VerticalLayout width="100%">
|
|
253
|
-
<html:div class="sapUIDisclaimerLink sapUiSmallMarginBottom">
|
|
254
|
-
<custom:TitleLink
|
|
255
|
-
href="https://experience.sap.com/fiori-design/"
|
|
256
|
-
text="{i18n>WELCOME_BLOCK_5_TITLE}"
|
|
257
|
-
titleStyle="H2"
|
|
258
|
-
target="_blank"/>
|
|
259
|
-
<Image
|
|
260
|
-
src="./resources/sap/ui/documentation/sdk/images/link-sap.png"
|
|
261
|
-
tooltip="{i18n>LEGAL_DISCLAIMER_EXTERNAL_TOOLTIP}"
|
|
262
|
-
width="1.25rem"
|
|
263
|
-
press="onDisclaimerLinkPress"/>
|
|
264
|
-
</html:div>
|
|
265
|
-
<Text
|
|
266
|
-
text="{i18n>WELCOME_BLOCK_5_TEXT}"
|
|
267
|
-
class="sapUiSmallMarginBottom"/>
|
|
268
|
-
</l:VerticalLayout>
|
|
269
|
-
<Image
|
|
270
|
-
src="./resources/sap/ui/documentation/sdk/images/Fiori_design_examples.png"
|
|
271
|
-
alt="{i18n>WELCOME_BLOCK_5_IMG_ALT}"
|
|
272
|
-
densityAware="false"
|
|
273
|
-
width="100%">
|
|
274
|
-
<layoutData>
|
|
275
|
-
<l:GridData span="L6 M12 S12"/>
|
|
276
|
-
</layoutData>
|
|
277
|
-
</Image>
|
|
278
|
-
</l:Grid>
|
|
279
|
-
</l:BlockLayoutCell>
|
|
172
|
+
<l:BlockLayoutRow visible="{= ${versionData>/isOpenUI5}}">
|
|
173
|
+
<core:Fragment fragmentName="sap.ui.documentation.sdk.view.WelcomeCustomRowOpenUI5" type="XML" />
|
|
280
174
|
</l:BlockLayoutRow>
|
|
175
|
+
<l:BlockLayoutRow visible="{= !${versionData>/isOpenUI5}}">
|
|
176
|
+
<core:Fragment fragmentName="sap.ui.documentation.sdk.view.WelcomeCustomRowSAPUI5" type="XML" />
|
|
177
|
+
</l:BlockLayoutRow>
|
|
178
|
+
|
|
281
179
|
<!-- This block layout row will be commented until BGSOFUIPIRIN-5473 is completely finished-->
|
|
282
180
|
<!-- <l:BlockLayoutRow>-->
|
|
283
181
|
<!-- <l:BlockLayoutCell-->
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns="sap.m"
|
|
3
|
+
xmlns:core="sap.ui.core"
|
|
4
|
+
xmlns:custom="sap.ui.documentation"
|
|
5
|
+
xmlns:html="http://www.w3.org/1999/xhtml"
|
|
6
|
+
xmlns:l="sap.ui.layout">
|
|
7
|
+
<l:BlockLayoutCell
|
|
8
|
+
backgroundColorSet="ColorSet10"
|
|
9
|
+
backgroundColorShade="ShadeC">
|
|
10
|
+
<l:VerticalLayout
|
|
11
|
+
width="100%">
|
|
12
|
+
<html:div class="sapUIDisclaimerLink sapUiSmallMarginBottom">
|
|
13
|
+
<custom:TitleLink
|
|
14
|
+
href="https://experience.sap.com/fiori-design/"
|
|
15
|
+
text="{i18n>WELCOME_BLOCK_5_TITLE}"
|
|
16
|
+
titleStyle="H2"
|
|
17
|
+
target="_blank"/>
|
|
18
|
+
<Image
|
|
19
|
+
src="./resources/sap/ui/documentation/sdk/images/link-sap.png"
|
|
20
|
+
tooltip="{i18n>LEGAL_DISCLAIMER_EXTERNAL_TOOLTIP}"
|
|
21
|
+
width="1.25rem"
|
|
22
|
+
press="onDisclaimerLinkPress"/>
|
|
23
|
+
</html:div>
|
|
24
|
+
<Text
|
|
25
|
+
text="{i18n>WELCOME_BLOCK_5_TEXT}"
|
|
26
|
+
class="sapUiSmallMarginBottom"/>
|
|
27
|
+
</l:VerticalLayout>
|
|
28
|
+
</l:BlockLayoutCell>
|
|
29
|
+
|
|
30
|
+
<l:BlockLayoutCell
|
|
31
|
+
backgroundColorSet="ColorSet10"
|
|
32
|
+
backgroundColorShade="ShadeC">
|
|
33
|
+
<HBox alignItems="Center" justifyContent="Center" width="100%" height="100%">
|
|
34
|
+
<Image
|
|
35
|
+
src="./resources/sap/ui/documentation/sdk/images/Fiori_design_examples.png"
|
|
36
|
+
densityAware="false"
|
|
37
|
+
class="sapUiTinyMarginBeginEnd"
|
|
38
|
+
width="100%"
|
|
39
|
+
alt="{i18n>WELCOME_BLOCK_5_IMG_ALT}">
|
|
40
|
+
<layoutData>
|
|
41
|
+
<FlexItemData maxWidth="37.5rem" />
|
|
42
|
+
</layoutData>
|
|
43
|
+
</Image>
|
|
44
|
+
</HBox>
|
|
45
|
+
</l:BlockLayoutCell>
|
|
46
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns="sap.m"
|
|
3
|
+
xmlns:core="sap.ui.core"
|
|
4
|
+
xmlns:custom="sap.ui.documentation"
|
|
5
|
+
xmlns:html="http://www.w3.org/1999/xhtml"
|
|
6
|
+
xmlns:l="sap.ui.layout">
|
|
7
|
+
<l:BlockLayoutCell
|
|
8
|
+
backgroundColorSet="ColorSet10"
|
|
9
|
+
backgroundColorShade="ShadeB">
|
|
10
|
+
<l:VerticalLayout
|
|
11
|
+
width="100%">
|
|
12
|
+
<custom:TitleLink
|
|
13
|
+
href="topic/bf2d55eaa33b44a78ef95e7946d658e8"
|
|
14
|
+
text="{i18n>WELCOME_BLOCK_4_TITLE}"
|
|
15
|
+
class="sapUiSmallMarginBottom"
|
|
16
|
+
titleStyle="H2"/>
|
|
17
|
+
<Text
|
|
18
|
+
text="{i18n>WELCOME_BLOCK_4_TEXT_1}"
|
|
19
|
+
class="sapUiSmallMarginBottom"/>
|
|
20
|
+
<HBox>
|
|
21
|
+
<core:Icon
|
|
22
|
+
src="sap-icon://accept"
|
|
23
|
+
size="0.875rem"
|
|
24
|
+
color="Default"
|
|
25
|
+
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
26
|
+
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_2}"/>
|
|
27
|
+
</HBox>
|
|
28
|
+
<HBox>
|
|
29
|
+
<core:Icon
|
|
30
|
+
src="sap-icon://accept"
|
|
31
|
+
size="0.875rem"
|
|
32
|
+
color="Default"
|
|
33
|
+
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
34
|
+
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_3}"/>
|
|
35
|
+
</HBox>
|
|
36
|
+
<HBox>
|
|
37
|
+
<core:Icon
|
|
38
|
+
src="sap-icon://accept"
|
|
39
|
+
size="0.875rem"
|
|
40
|
+
color="Default"
|
|
41
|
+
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
42
|
+
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_4}"/>
|
|
43
|
+
</HBox>
|
|
44
|
+
<HBox>
|
|
45
|
+
<core:Icon
|
|
46
|
+
src="sap-icon://accept"
|
|
47
|
+
size="0.875rem"
|
|
48
|
+
color="Default"
|
|
49
|
+
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
50
|
+
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_5}"/>
|
|
51
|
+
</HBox>
|
|
52
|
+
<HBox>
|
|
53
|
+
<core:Icon
|
|
54
|
+
src="sap-icon://accept"
|
|
55
|
+
size="0.875rem"
|
|
56
|
+
color="Default"
|
|
57
|
+
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
58
|
+
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_6}"/>
|
|
59
|
+
</HBox>
|
|
60
|
+
<HBox>
|
|
61
|
+
<core:Icon
|
|
62
|
+
src="sap-icon://accept"
|
|
63
|
+
size="0.875rem"
|
|
64
|
+
color="Default"
|
|
65
|
+
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
66
|
+
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_7}"/>
|
|
67
|
+
</HBox>
|
|
68
|
+
<HBox>
|
|
69
|
+
<core:Icon
|
|
70
|
+
src="sap-icon://accept"
|
|
71
|
+
size="0.875rem"
|
|
72
|
+
color="Default"
|
|
73
|
+
class="sapUiTinyMarginBegin sapUiSmallMarginEnd"/>
|
|
74
|
+
<Text text="{i18n>WELCOME_BLOCK_4_TEXT_8}"/>
|
|
75
|
+
</HBox>
|
|
76
|
+
</l:VerticalLayout>
|
|
77
|
+
</l:BlockLayoutCell>
|
|
78
|
+
|
|
79
|
+
<l:BlockLayoutCell
|
|
80
|
+
backgroundColorSet="ColorSet10"
|
|
81
|
+
backgroundColorShade="ShadeA">
|
|
82
|
+
<l:Grid
|
|
83
|
+
defaultSpan="L6 M12 S12"
|
|
84
|
+
hSpacing="0"
|
|
85
|
+
vSpacing="0">
|
|
86
|
+
<l:VerticalLayout width="100%">
|
|
87
|
+
<html:div class="sapUIDisclaimerLink sapUiSmallMarginBottom">
|
|
88
|
+
<custom:TitleLink
|
|
89
|
+
href="https://experience.sap.com/fiori-design/"
|
|
90
|
+
text="{i18n>WELCOME_BLOCK_5_TITLE}"
|
|
91
|
+
titleStyle="H2"
|
|
92
|
+
target="_blank"/>
|
|
93
|
+
<Image
|
|
94
|
+
src="./resources/sap/ui/documentation/sdk/images/link-sap.png"
|
|
95
|
+
tooltip="{i18n>LEGAL_DISCLAIMER_EXTERNAL_TOOLTIP}"
|
|
96
|
+
width="1.25rem"
|
|
97
|
+
press="onDisclaimerLinkPress"/>
|
|
98
|
+
</html:div>
|
|
99
|
+
<Text
|
|
100
|
+
text="{i18n>WELCOME_BLOCK_5_TEXT}"
|
|
101
|
+
class="sapUiSmallMarginBottom"/>
|
|
102
|
+
</l:VerticalLayout>
|
|
103
|
+
<Image
|
|
104
|
+
src="./resources/sap/ui/documentation/sdk/images/Fiori_design_examples.png"
|
|
105
|
+
alt="{i18n>WELCOME_BLOCK_5_IMG_ALT}"
|
|
106
|
+
densityAware="false"
|
|
107
|
+
width="100%">
|
|
108
|
+
<layoutData>
|
|
109
|
+
<l:GridData span="L6 M12 S12"/>
|
|
110
|
+
</layoutData>
|
|
111
|
+
</Image>
|
|
112
|
+
</l:Grid>
|
|
113
|
+
</l:BlockLayoutCell>
|
|
114
|
+
</core:FragmentDefinition>
|