@openui5/sap.ui.documentation 1.131.0 → 1.132.0
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 +7 -7
- package/src/sap/ui/documentation/.library +2 -2
- package/src/sap/ui/documentation/BorrowedList.js +1 -1
- package/src/sap/ui/documentation/DemokitTreeItem.js +1 -1
- package/src/sap/ui/documentation/DemokitTreeItemRenderer.js +1 -1
- package/src/sap/ui/documentation/DivContainer.js +1 -1
- package/src/sap/ui/documentation/JSDocText.js +1 -1
- package/src/sap/ui/documentation/JSDocType.js +72 -0
- package/src/sap/ui/documentation/LightTable.js +1 -1
- package/src/sap/ui/documentation/ObjectPageSubSection.js +1 -1
- package/src/sap/ui/documentation/ParamText.js +1 -1
- package/src/sap/ui/documentation/Row.js +1 -1
- package/src/sap/ui/documentation/Search.js +1 -1
- package/src/sap/ui/documentation/TitleLink.js +1 -1
- package/src/sap/ui/documentation/WebPageTitleUtil.js +1 -1
- package/src/sap/ui/documentation/library.js +3 -3
- package/src/sap/ui/documentation/messagebundle.properties +11 -3
- package/src/sap/ui/documentation/messagebundle_ar.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_bg.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_ca.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_cnr.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_cs.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_cy.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_da.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_de.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_el.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_en.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_en_GB.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +1 -0
- package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +456 -452
- package/src/sap/ui/documentation/messagebundle_es.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_es_MX.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_et.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_fi.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_fr.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_fr_CA.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_hi.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_hr.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_hu.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_id.properties +8 -5
- package/src/sap/ui/documentation/messagebundle_it.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_iw.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_ja.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_kk.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_ko.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_lt.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_lv.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_mk.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_ms.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_nl.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_no.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_pl.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_pt.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_pt_PT.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_ro.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_ru.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_sh.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_sk.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_sl.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_sr.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_sv.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_th.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_tr.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_uk.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_vi.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_zh_CN.properties +6 -3
- package/src/sap/ui/documentation/messagebundle_zh_TW.properties +6 -3
- package/src/sap/ui/documentation/sdk/Component.js +26 -13
- package/src/sap/ui/documentation/sdk/blocks/IndexEntry.js +1 -1
- package/src/sap/ui/documentation/sdk/blocks/IndexEntryController.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/ApiDetail.controller.js +2 -2
- package/src/sap/ui/documentation/sdk/controller/ApiDetailIndexDeprecatedExperimental.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/ApiDetailInitial.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/ApiMaster.controller.js +7 -5
- package/src/sap/ui/documentation/sdk/controller/App.controller.js +33 -32
- package/src/sap/ui/documentation/sdk/controller/BPSupport.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/BaseController.js +52 -9
- package/src/sap/ui/documentation/sdk/controller/Code.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Controls.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Downloads.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Entity.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/ErrorHandler.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Group.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/License.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/LiveEditor.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/MasterTreeBaseController.js +3 -3
- package/src/sap/ui/documentation/sdk/controller/News.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/NotFound.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/ReleaseNotes.controller.js +3 -2
- package/src/sap/ui/documentation/sdk/controller/Resources.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/SampleBaseController.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/SampleNotFound.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/SearchPage.controller.js +8 -2
- package/src/sap/ui/documentation/sdk/controller/Sitemap.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +1 -2
- package/src/sap/ui/documentation/sdk/controller/TermsOfUse.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/TopicDetail.controller.js +18 -33
- package/src/sap/ui/documentation/sdk/controller/TopicDetailInitial.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/TopicMaster.controller.js +5 -4
- package/src/sap/ui/documentation/sdk/controller/VersionNotFound.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/Welcome.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/config/datatable.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/config/sampleForwardingConfig.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/APIInfo.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/ControlsInfo.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/CookiesConsentManager.js +332 -0
- package/src/sap/ui/documentation/sdk/controller/util/DataTable.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/DataTableHelper.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/DataTableUtil.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/DocuInfo.js +14 -4
- package/src/sap/ui/documentation/sdk/controller/util/DocumentationLoader.js +37 -0
- package/src/sap/ui/documentation/sdk/controller/util/EntityInfo.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/Highlighter.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js +11 -2
- package/src/sap/ui/documentation/sdk/controller/util/JSDocUtil.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/NewsInfo.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/ResourcesInfo.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/ResponsiveImageMap.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/SearchUtil.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/SidyBySideImageMap.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/ThemePicker.js +23 -9
- package/src/sap/ui/documentation/sdk/controller/util/Tooltip.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/TreeUtil.js +35 -3
- package/src/sap/ui/documentation/sdk/controller/util/URLUtil.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/UsageTracker.js +316 -0
- package/src/sap/ui/documentation/sdk/controller/util/XML2JSONUtils.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterDropDown.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterDropDownRenderer.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterRange.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterRangeRenderer.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/overlay/Overlay.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Circle.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Polygon.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Rect.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Shape.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/ShapeFactory.js +1 -1
- package/src/sap/ui/documentation/sdk/controls/FileEditor.js +1 -1
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/Component.js +3 -3
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/controller/CookieSettingsDialog.controller.js +1 -1
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_en_US_saptrc.properties +10 -10
- package/src/sap/ui/documentation/sdk/css/style.css +4 -0
- package/src/sap/ui/documentation/sdk/index.js +1 -1
- package/src/sap/ui/documentation/sdk/manifest.json +59 -30
- package/src/sap/ui/documentation/sdk/model/ExploreSettingsModel.js +1 -1
- package/src/sap/ui/documentation/sdk/model/formatter.js +35 -1
- package/src/sap/ui/documentation/sdk/model/libraryData.js +1 -1
- package/src/sap/ui/documentation/sdk/model/models.js +1 -1
- package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js +3 -3
- package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +52 -5
- package/src/sap/ui/documentation/sdk/util/FileUtils.js +1 -1
- package/src/sap/ui/documentation/sdk/util/LiveEditorOutput.js +1 -1
- package/src/sap/ui/documentation/sdk/util/Resources.js +1 -1
- package/src/sap/ui/documentation/sdk/util/ToggleFullScreenHandler.js +1 -1
- package/src/sap/ui/documentation/sdk/view/App.view.xml +4 -3
- package/src/sap/ui/documentation/sdk/view/Footer.fragment.xml +6 -2
- package/src/sap/ui/documentation/sdk/view/FooterMaster.fragment.xml +1 -0
- package/src/sap/ui/documentation/sdk/view/GlobalSearchPicker.fragment.xml +9 -0
- package/src/sap/ui/documentation/sdk/view/SearchPage.view.xml +44 -0
- package/src/sap/ui/documentation/sdk/view/SubApiDetail.view.xml +29 -51
- package/src/sap/ui/documentation/themes/base/JSDocType.less +20 -0
- package/src/sap/ui/documentation/themes/base/library.source.less +2 -1
- package/src/sap/ui/documentation/themes/sap_belize/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_belize_base/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_belize_hcb/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_belize_hcw/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_belize_plus/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_fiori_3/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_fiori_3_dark/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_fiori_3_hcb/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_fiori_3_hcw/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_horizon/Link.less +8 -2
- package/src/sap/ui/documentation/themes/sap_horizon/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_horizon_dark/Link.less +8 -2
- package/src/sap/ui/documentation/themes/sap_horizon_dark/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_horizon_hcb/library.source.less +1 -1
- package/src/sap/ui/documentation/themes/sap_horizon_hcw/library.source.less +1 -1
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileOverview This module provides a factory for creating a consent manager based on the configuration.
|
|
9
|
+
* The consent manager is responsible for checking the user's consent for using cookies and tracking.
|
|
10
|
+
* The consent manager is also responsible for showing the consent dialog.
|
|
11
|
+
* The consent manager is created based on the configuration.
|
|
12
|
+
* If the configuration includes usage tracking, a third-party consent manager is created.
|
|
13
|
+
* If the configuration does not include usage tracking, a default consent manager is created.
|
|
14
|
+
* The third-party consent manager is responsible for checking the user's consent for using cookies and tracking
|
|
15
|
+
* by using the TrustArc API.
|
|
16
|
+
* The default consent manager is responsible for checking the user's consent for using cookies and tracking
|
|
17
|
+
* by using the cookie settings dialog.
|
|
18
|
+
**/
|
|
19
|
+
sap.ui.define(
|
|
20
|
+
["sap/ui/base/Object", "sap/ui/thirdparty/URI", "sap/base/Log"],
|
|
21
|
+
function (BaseObject, URI, Log) {
|
|
22
|
+
"use strict";
|
|
23
|
+
|
|
24
|
+
const TRUST_ARC = {
|
|
25
|
+
BASE_URL: "https://consent.trustarc.com/notice",
|
|
26
|
+
URL_QUERY: "?domain=ui5.sap.com&c=teconsent>m=1&pcookie&js=nj¬iceType=bb&pn=1-0&privacypolicylink=https%3A%2F%2Fwww.sap.com%2Fabout%2Flegal%2Fprivacy.html&text=true>m=1",
|
|
27
|
+
get COMPLETE_URL() {
|
|
28
|
+
return this.BASE_URL + this.URL_QUERY;
|
|
29
|
+
},
|
|
30
|
+
CONSENT_BAR_ID: "teconsent",
|
|
31
|
+
get CONSENT_BAR_HTML() {
|
|
32
|
+
return `<div id="consent_blackbar" style="position: fixed; bottom: 0px; z-index: 1000000; width: 100%;"></div>
|
|
33
|
+
<div id="${this.CONSENT_BAR_ID}"></div>`;
|
|
34
|
+
},
|
|
35
|
+
CATEGORIES: {
|
|
36
|
+
"REQUIRED_COOKIES": "Required Cookies",
|
|
37
|
+
"FUNCTIONAL_COOKIES": "Functional Cookies",
|
|
38
|
+
"ADVERTISING_COOKIES": "Advertising Cookies"
|
|
39
|
+
},
|
|
40
|
+
CONSENT_DECISION:{
|
|
41
|
+
FOR_CATEGORY: {
|
|
42
|
+
"PENDING": 0,
|
|
43
|
+
"REQUIRED_COOKIES_PEMITTED": 1,
|
|
44
|
+
"FUNCTIONAL_COOKIES_PEMITTED": 2,
|
|
45
|
+
"ADVERTISING_COOKIES_PEMITTED": 3
|
|
46
|
+
},
|
|
47
|
+
FOR_DOMAIN: {
|
|
48
|
+
"OPTED_OUT": 0,
|
|
49
|
+
"OPTED_IN": 1,
|
|
50
|
+
"NO_PREFERENCE": 2
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const TRACKED_HOSTNAMES = {
|
|
56
|
+
// complementary list and regex for the hostnames that should be tracked
|
|
57
|
+
"LIST": ["ui5.sap.com", "sdk.openui5.org", "openui5nightly.hana.ondemand.com"],
|
|
58
|
+
"REGEX": /^sapui5([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?\.hana\.ondemand\.com$/
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// shorthand for TrustArc constants
|
|
62
|
+
const oCookieCategories = TRUST_ARC.CATEGORIES,
|
|
63
|
+
oCategoryDecisionType = TRUST_ARC.CONSENT_DECISION.FOR_CATEGORY,
|
|
64
|
+
oDomainDecisionType = TRUST_ARC.CONSENT_DECISION.FOR_DOMAIN;
|
|
65
|
+
|
|
66
|
+
var DefaultConsentManager = BaseObject.extend(
|
|
67
|
+
"sap.ui.documentation.sdk.controller.util.DefaultConsentManager",
|
|
68
|
+
{
|
|
69
|
+
constructor: function (oComponent, oConfig) {
|
|
70
|
+
this._oCmponent = oComponent;
|
|
71
|
+
this._oConfigUtil = oComponent.getConfigUtil();
|
|
72
|
+
this._sConsentDialogComponentId = oConfig.defaultConsentDialogComponentId;
|
|
73
|
+
this._oConsentDialogComponent = null;
|
|
74
|
+
this._oLoadPromise = null;
|
|
75
|
+
this._load();
|
|
76
|
+
},
|
|
77
|
+
_load: function() {
|
|
78
|
+
if (!this._oLoadPromise) {
|
|
79
|
+
this._oLoadPromise = this._oCmponent.createComponent({
|
|
80
|
+
usage: "cookieSettingsDialog",
|
|
81
|
+
id: 'cookiesComp-' + this._sConsentDialogComponentId
|
|
82
|
+
}).then(function(oConsentDialogComponent) {
|
|
83
|
+
this._oConsentDialogComponent = oConsentDialogComponent;
|
|
84
|
+
oConsentDialogComponent.enable(this._oCmponent.getRootControl());
|
|
85
|
+
}.bind(this));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return this._oLoadPromise;
|
|
89
|
+
},
|
|
90
|
+
checkUserAcceptsRequiredCookies(fnCallback) {
|
|
91
|
+
var bAccepts = this._oConfigUtil.getCookieValue(this._oConfigUtil.COOKIE_NAMES.ALLOW_REQUIRED_COOKIES) === "1";
|
|
92
|
+
fnCallback(bAccepts);
|
|
93
|
+
},
|
|
94
|
+
checkUserAcceptsUsageTracking(fnCallback) {
|
|
95
|
+
fnCallback(false); // no usage tracking provisioned in this case
|
|
96
|
+
},
|
|
97
|
+
showPreferencesDialog: function(oRootView) {
|
|
98
|
+
this._load().then(function() {
|
|
99
|
+
this._oConsentDialogComponent.openCookieSettingsDialog({ showCookieDetails: true }, oRootView);
|
|
100
|
+
}.bind(this));
|
|
101
|
+
},
|
|
102
|
+
supportsWaitForPreferencesSubmission() {
|
|
103
|
+
return false;
|
|
104
|
+
},
|
|
105
|
+
waitForPreferencesSubmission: function () {
|
|
106
|
+
throw new Error("Not supported. Check supportsWaitForPreferencesSubmission method first.");
|
|
107
|
+
},
|
|
108
|
+
exit: function () {
|
|
109
|
+
if (this._oConsentDialogComponent) {
|
|
110
|
+
this._oConsentDialogComponent.destroy();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
var ThirdPartyConsentManager = DefaultConsentManager.extend(
|
|
117
|
+
"sap.ui.documentation.sdk.controller.util.ThirdPartyConsentManager",
|
|
118
|
+
{
|
|
119
|
+
constructor: function () {
|
|
120
|
+
this._oGetDecisionPromise = null;
|
|
121
|
+
},
|
|
122
|
+
// override
|
|
123
|
+
checkUserAcceptsRequiredCookies(fnCallback) {
|
|
124
|
+
this.getConsentDecision(function(iConsentDecision) {
|
|
125
|
+
fnCallback(iConsentDecision >= oCategoryDecisionType.REQUIRED_COOKIES_PEMITTED);
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
// override
|
|
129
|
+
checkUserAcceptsUsageTracking(fnCallback) {
|
|
130
|
+
this.getConsentDecision(function(iConsentDecision) {
|
|
131
|
+
var bAccepts = iConsentDecision >= oCategoryDecisionType.FUNCTIONAL_COOKIES_PEMITTED;
|
|
132
|
+
if (bAccepts) {
|
|
133
|
+
var oAddionalPreferences = this._getAdditionalPreferences(oCookieCategories.FUNCTIONAL_COOKIES);
|
|
134
|
+
if (oAddionalPreferences) {
|
|
135
|
+
bAccepts = Object.values(oAddionalPreferences.domains).every(function (oDecisionForDomain) {
|
|
136
|
+
return parseInt(oDecisionForDomain) === oDomainDecisionType.OPTED_IN;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
fnCallback(bAccepts);
|
|
141
|
+
}.bind(this));
|
|
142
|
+
},
|
|
143
|
+
getConsentDecision: function (fnCallback) {
|
|
144
|
+
var iConsentDecision = this._getConsentDecisionSync(),
|
|
145
|
+
bDecisionAvailable = iConsentDecision > oCategoryDecisionType.PENDING;
|
|
146
|
+
if (bDecisionAvailable) {
|
|
147
|
+
fnCallback(iConsentDecision);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this._getConsentDecisionAsync().then(fnCallback);
|
|
151
|
+
},
|
|
152
|
+
_getConsentDecisionSync: function() {
|
|
153
|
+
return window.truste?.cma?.callApi("getConsentDecision", document.domain)?.consentDecision;
|
|
154
|
+
},
|
|
155
|
+
_getConsentDecisionAsync: function () {
|
|
156
|
+
if (!this._oGetDecisionPromise) {
|
|
157
|
+
this._oGetDecisionPromise = new Promise(function(resolve, reject) {
|
|
158
|
+
function onTrustArcReady() {
|
|
159
|
+
var iConsentDecision = this._getConsentDecisionSync();
|
|
160
|
+
if (iConsentDecision === oCategoryDecisionType.PENDING) { // user has not made a decision yet
|
|
161
|
+
this.waitForPreferencesSubmission()
|
|
162
|
+
.then(function() {
|
|
163
|
+
resolve(this._getConsentDecisionSync());
|
|
164
|
+
}.bind(this));
|
|
165
|
+
} else {
|
|
166
|
+
resolve(iConsentDecision);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (!this._isTrustArcReady()) {
|
|
171
|
+
this._load()
|
|
172
|
+
.then(this._waitForTrustArcReady.bind(this))
|
|
173
|
+
.then(onTrustArcReady.bind(this));
|
|
174
|
+
} else {
|
|
175
|
+
onTrustArcReady.call(this);
|
|
176
|
+
}
|
|
177
|
+
}.bind(this));
|
|
178
|
+
}
|
|
179
|
+
return this._oGetDecisionPromise;
|
|
180
|
+
},
|
|
181
|
+
_getAdditionalPreferences: function (sConsentCategory) {
|
|
182
|
+
var oCategories = window.truste?.cma?.callApi("getConsentCategories",document.domain)?.categories,
|
|
183
|
+
bAdditionalPreferencesDefined = oCategories && oCategories[sConsentCategory];
|
|
184
|
+
if (bAdditionalPreferencesDefined) {
|
|
185
|
+
return oCategories[sConsentCategory];
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
_isTrustArcReady: function() {
|
|
189
|
+
return typeof truste !== 'undefined' && window.truste.cma;
|
|
190
|
+
},
|
|
191
|
+
_waitForTrustArcReady: function () {
|
|
192
|
+
return new Promise(function(resolve, reject) {
|
|
193
|
+
var checkInterval = setInterval(function() {
|
|
194
|
+
if (typeof truste !== 'undefined' && window.truste.cma) {
|
|
195
|
+
clearInterval(checkInterval);
|
|
196
|
+
Log.trace('TrustArc API is ready');
|
|
197
|
+
resolve();
|
|
198
|
+
}
|
|
199
|
+
}, 100); // Check every 100 milliseconds
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
// override
|
|
203
|
+
supportsWaitForPreferencesSubmission() {
|
|
204
|
+
return true;
|
|
205
|
+
},
|
|
206
|
+
// override
|
|
207
|
+
waitForPreferencesSubmission: function () {
|
|
208
|
+
return new Promise(function(resolve, reject) {
|
|
209
|
+
var oMessage = this._composeApiRequest("getConsentDecision");
|
|
210
|
+
window.top.postMessage(oMessage,"*");
|
|
211
|
+
var fnListener = function(oEvent) {
|
|
212
|
+
var oData = JSON.parse(oEvent.data);
|
|
213
|
+
if (oData.source === "preference_manager" && oData.message === "submit_preferences") {
|
|
214
|
+
resolve();
|
|
215
|
+
window.removeEventListener("message", fnListener);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
window.addEventListener("message", fnListener, false);
|
|
219
|
+
}.bind(this));
|
|
220
|
+
},
|
|
221
|
+
_composeApiRequest: function(sAction) {
|
|
222
|
+
const apiObject = {
|
|
223
|
+
PrivacyManagerAPI:{
|
|
224
|
+
action: sAction,
|
|
225
|
+
timestamp: new Date().getTime(),
|
|
226
|
+
self: document.domain
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
return JSON.stringify(apiObject);
|
|
230
|
+
},
|
|
231
|
+
// override
|
|
232
|
+
_load: function() {
|
|
233
|
+
return new Promise(function(resolve, reject) {
|
|
234
|
+
if (this._isTrustArcScriptIncluded()) {
|
|
235
|
+
resolve();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
var oConsetBarElement = this._appendTrustArcConsentBar(),
|
|
239
|
+
oScript = this._createTrustArcScriptElement();
|
|
240
|
+
oScript.addEventListener("load", function() {
|
|
241
|
+
Log.trace('TrustArc initialization stript loaded successfully');
|
|
242
|
+
resolve();
|
|
243
|
+
});
|
|
244
|
+
oScript.addEventListener('error', function(oError) {
|
|
245
|
+
Log.error("Error loading TrustArc initialization stript ", oError);
|
|
246
|
+
reject();
|
|
247
|
+
});
|
|
248
|
+
this._appendDOMElementAfter(oScript, oConsetBarElement);
|
|
249
|
+
}.bind(this));
|
|
250
|
+
},
|
|
251
|
+
_appendTrustArcConsentBar: function() {
|
|
252
|
+
var oConsentElement = document.getElementById(TRUST_ARC.CONSENT_BAR_ID);
|
|
253
|
+
if (!oConsentElement) {
|
|
254
|
+
var oRootDOMElement = this._createHTMLforTrustArc();
|
|
255
|
+
document.body.insertBefore(oRootDOMElement, document.body.firstChild);
|
|
256
|
+
oConsentElement = document.getElementById(TRUST_ARC.CONSENT_BAR_ID);
|
|
257
|
+
}
|
|
258
|
+
return oConsentElement;
|
|
259
|
+
},
|
|
260
|
+
_createHTMLforTrustArc: function() {
|
|
261
|
+
var oRootDOMElement = document.createElement("div");
|
|
262
|
+
oRootDOMElement.innerHTML = TRUST_ARC.CONSENT_BAR_HTML;
|
|
263
|
+
return oRootDOMElement;
|
|
264
|
+
},
|
|
265
|
+
_appendDOMElementAfter: function(newElement, referenceElement) {
|
|
266
|
+
const parent = referenceElement.parentNode;
|
|
267
|
+
if (parent.lastChild === referenceElement) {
|
|
268
|
+
parent.appendChild(newElement);
|
|
269
|
+
} else {
|
|
270
|
+
parent.insertBefore(newElement, referenceElement.nextSibling);
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
_createTrustArcScriptElement: function() {
|
|
274
|
+
var oScript = document.createElement("script");
|
|
275
|
+
oScript.src = TRUST_ARC.COMPLETE_URL;
|
|
276
|
+
oScript.async = true;
|
|
277
|
+
oScript.crossOrigin = "anonymous";
|
|
278
|
+
return oScript;
|
|
279
|
+
},
|
|
280
|
+
_isTrustArcScriptIncluded: function() {
|
|
281
|
+
const scripts = document.getElementsByTagName('script');
|
|
282
|
+
for (let i = 0; i < scripts.length; i++) {
|
|
283
|
+
const src = scripts[i].getAttribute('src');
|
|
284
|
+
if (src && src.startsWith(TRUST_ARC.BASE_URL)) {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return false;
|
|
289
|
+
},
|
|
290
|
+
// override
|
|
291
|
+
showPreferencesDialog: function() {
|
|
292
|
+
this._load().then(function () {
|
|
293
|
+
var consentBarLinkSelector = "#" + TRUST_ARC.CONSENT_BAR_ID + " a",
|
|
294
|
+
consentBarLink = document.querySelector(consentBarLinkSelector);
|
|
295
|
+
if (consentBarLink) {
|
|
296
|
+
this._simulateClick(consentBarLink);
|
|
297
|
+
}
|
|
298
|
+
}.bind(this));
|
|
299
|
+
},
|
|
300
|
+
_simulateClick: function (element) {
|
|
301
|
+
var event = new MouseEvent('click', {
|
|
302
|
+
view: window,
|
|
303
|
+
bubbles: true,
|
|
304
|
+
cancelable: true
|
|
305
|
+
});
|
|
306
|
+
element.dispatchEvent(event);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
var CookiesConsentManager = {
|
|
312
|
+
create: function (oComponent, oConfig) {
|
|
313
|
+
if (this._configIncludesUsageTracking()) {
|
|
314
|
+
return new ThirdPartyConsentManager(oComponent, oConfig);
|
|
315
|
+
} else {
|
|
316
|
+
return new DefaultConsentManager(oComponent, oConfig);
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
_configIncludesUsageTracking: function () {
|
|
321
|
+
var oUri = new URI(window.location.href),
|
|
322
|
+
sHostname = oUri.hostname();
|
|
323
|
+
return TRACKED_HOSTNAMES.LIST.includes(sHostname) ||
|
|
324
|
+
TRACKED_HOSTNAMES.REGEX.test(sHostname) ||
|
|
325
|
+
(oUri.hasQuery("sap-ui-xx-tracking") && // temporary feature flag
|
|
326
|
+
oUri.query(true)["sap-ui-xx-tracking"] === "aa");
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
return CookiesConsentManager;
|
|
331
|
+
}
|
|
332
|
+
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides reuse functionality for reading documentation topics from index.json files.
|
|
8
|
-
sap.ui.define(["sap/ui/thirdparty/jquery", "sap/ui/documentation/sdk/util/Resources"],
|
|
9
|
-
function (jQuery, ResourcesUtil) {
|
|
8
|
+
sap.ui.define(["sap/ui/thirdparty/jquery", "sap/ui/documentation/sdk/util/Resources", "sap/ui/documentation/sdk/controller/util/TreeUtil"],
|
|
9
|
+
function (jQuery, ResourcesUtil, TreeUtil) {
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
var oCachedData;
|
|
@@ -33,7 +33,17 @@ sap.ui.define(["sap/ui/thirdparty/jquery", "sap/ui/documentation/sdk/util/Resour
|
|
|
33
33
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
|
|
37
|
+
function _getDocumentTitle(sTopicId, oConfig) {
|
|
38
|
+
return _getDocuIndexPromise(oConfig).then(function (oData) {
|
|
39
|
+
var oTreeUtil = TreeUtil.getInstance(TreeUtil.treeTypes.Documentation, "key", "links");
|
|
40
|
+
var oTopicInfo = oTreeUtil.getNodeById(sTopicId, oData);
|
|
41
|
+
return oTopicInfo?.text;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
36
45
|
return {
|
|
37
|
-
getDocuIndexPromise: _getDocuIndexPromise
|
|
46
|
+
getDocuIndexPromise: _getDocuIndexPromise,
|
|
47
|
+
getDocumentTitle: _getDocumentTitle
|
|
38
48
|
};
|
|
39
49
|
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 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/documentation/sdk/controller/util/ResourceDownloadUtil",
|
|
9
|
+
"sap/ui/documentation/sdk/controller/util/XML2JSONUtils"], function(ResourceDownloadUtil, XML2JSONUtils) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
var _fetchPromises = {};
|
|
13
|
+
var _oAppConfig;
|
|
14
|
+
|
|
15
|
+
var Loader = {
|
|
16
|
+
fetch: function (sUrl) {
|
|
17
|
+
|
|
18
|
+
if (!(sUrl in _fetchPromises)) {
|
|
19
|
+
_fetchPromises[sUrl] = this._fetch(sUrl);
|
|
20
|
+
}
|
|
21
|
+
return _fetchPromises[sUrl];
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
_fetch: function(sUrl) {
|
|
25
|
+
return ResourceDownloadUtil.fetch(sUrl).then(function(sContent) {
|
|
26
|
+
return XML2JSONUtils.XML2JSON(sContent, _oAppConfig);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
getInstance: function(oAppConfig) {
|
|
33
|
+
_oAppConfig = oAppConfig;
|
|
34
|
+
return Loader;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}, /* bExport= */ true);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
/* global fetch */
|
|
@@ -539,11 +539,13 @@
|
|
|
539
539
|
aDataAPI = [],
|
|
540
540
|
aDataDoc = [],
|
|
541
541
|
aDataExplored = [],
|
|
542
|
+
aDataExternal = [],
|
|
542
543
|
aFilteredData = [],
|
|
543
544
|
iAllLength = 0,
|
|
544
545
|
iAPILength = 0,
|
|
545
546
|
iDocLength = 0,
|
|
546
547
|
iExploredLength = 0,
|
|
548
|
+
iExternalLength = 0,
|
|
547
549
|
sPreferencedCategory = oOptions.sPreferencedCategory,
|
|
548
550
|
bIncludeDeprecated = oOptions.includeDeprecated;
|
|
549
551
|
|
|
@@ -615,6 +617,11 @@
|
|
|
615
617
|
iAPILength++;
|
|
616
618
|
}
|
|
617
619
|
|
|
620
|
+
if (oDoc.external) {
|
|
621
|
+
aDataExternal.push(oObject);
|
|
622
|
+
iExternalLength++;
|
|
623
|
+
}
|
|
624
|
+
|
|
618
625
|
if (bShouldAddToSearchResults) {
|
|
619
626
|
aData.push(oObject);
|
|
620
627
|
iAllLength++;
|
|
@@ -639,11 +646,13 @@
|
|
|
639
646
|
aDataAPI: aDataAPI,
|
|
640
647
|
aDataDoc : aDataDoc,
|
|
641
648
|
aDataExplored: aDataExplored,
|
|
649
|
+
aDataExternal: aDataExternal,
|
|
642
650
|
filteredData : aFilteredData,
|
|
643
651
|
AllLength: iAllLength,
|
|
644
652
|
APILength: iAPILength,
|
|
645
653
|
DocLength : iDocLength,
|
|
646
|
-
ExploredLength : iExploredLength
|
|
654
|
+
ExploredLength : iExploredLength,
|
|
655
|
+
ExternalLength : iExternalLength
|
|
647
656
|
};
|
|
648
657
|
}
|
|
649
658
|
|