@openui5/sap.ui.documentation 1.84.27 → 1.84.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.documentation",
3
- "version": "1.84.27",
3
+ "version": "1.84.29",
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,10 +14,10 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.84.27",
18
- "@openui5/sap.ui.core": "1.84.27",
19
- "@openui5/sap.ui.layout": "1.84.27",
20
- "@openui5/themelib_sap_belize": "1.84.27",
21
- "@openui5/themelib_sap_fiori_3": "1.84.27"
17
+ "@openui5/sap.m": "1.84.29",
18
+ "@openui5/sap.ui.core": "1.84.29",
19
+ "@openui5/sap.ui.layout": "1.84.29",
20
+ "@openui5/themelib_sap_belize": "1.84.29",
21
+ "@openui5/themelib_sap_fiori_3": "1.84.29"
22
22
  }
23
23
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.84.27</version>
9
+ <version>1.84.29</version>
10
10
 
11
11
  <documentation>SAPUI5 library for the Demokit 2.0.</documentation>
12
12
 
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  // delegate further initialization of this library to the Core
22
22
  sap.ui.getCore().initLibrary({
23
23
  name : 'sap.ui.documentation',
24
- version: '1.84.27',
24
+ version: '1.84.29',
25
25
  dependencies : ['sap.ui.core','sap.m'],
26
26
  types: [],
27
27
  interfaces: [],
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @namespace
48
48
  * @name sap.ui.documentation
49
49
  * @author SAP SE
50
- * @version 1.84.27
50
+ * @version 1.84.29
51
51
  * @public
52
52
  */
53
53
  var thisLibrary = sap.ui.documentation;
@@ -360,20 +360,12 @@ APP_SETTINGS_DIALOG_CANCEL_BTN = Cancel
360
360
 
361
361
  #XHED: The title of the dialog for configuring the cookie settings
362
362
  COOKIE_SETTINGS_DIALOG_TITLE = Your Cookie Settings
363
- #XTXT: Summary note that explains why we use cookies
364
- COOKIE_SETTINGS_DIALOG_SUMMARY = We use cookies and SAP Web Analytics to improve your experience on our site. By continuing to use this site, you consent to use our cookies.
365
363
  #XTXT: Title of the section about the required cookies used in the application
366
364
  COOKIE_SETTINGS_DIALOG_REQUIRED_COOKIES_TITLE = Required Cookies
367
365
  #XTXT: Summary note that explains what are the required cookies in the application
368
366
  COOKIE_SETTINGS_DIALOG_REQUIRED_COOKIES_SUMMARY = These cookies are required to enable core site functionality.
369
367
  #XTXT: Detailed note that explains why we use the required cookies in the application
370
368
  COOKIE_SETTINGS_DIALOG_REQUIRED_COOKIES_TEXT = We use cookies to improve your experience on our site. By continuing to use this site, you consent to use our cookies.
371
- #XTXT: Title of the section about the extra functional cookies used in the application
372
- COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_TITLE = Functional Cookies
373
- #XTXT: Summary note that explains what are the functional cookies in the application
374
- COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_SUMMARY = These cookies are used to analyse site usage for the purpose of measuring and improving site performance.
375
- #XTXT: Detailed note that explains why we use the functional cookies in the application
376
- COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_TEXT = This site uses SAP Web Analytics to analyze how users use this site. The information generated (including a part of your IP address and a browser ID) will be transmitted to and stored by SAP on its servers. Cookies are used to identify your repeat visit and your visit origin page. We will use this information only for the purpose of evaluating website usage and compiling reports on website activity for website operators - and finally, to improve the site. If you would like to opt-in for SAP Web Analytics tracking, please specify your preference using the "On"/"Off" switch above. By opt-in, you consent to the processing of analytics data about you in the manner and for the purposes set out above.
377
369
  #XTXT: Title of the panel that contains more detailed information
378
370
  COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_MORE_INFO = More Info
379
371
  #XTXT: Title of the button to accept all cookies
@@ -85,24 +85,20 @@ sap.ui.define([
85
85
 
86
86
  onAcceptAllCookies: function () {
87
87
  this._saveCookiePreference(this._oCookieNames.ALLOW_REQUIRED_COOKIES, true);
88
- this._saveCookiePreference(this._oCookieNames.ALLOW_USAGE_TRACKING, true);
89
88
 
90
89
  this._oCookieSettingsDialog.close();
91
90
  },
92
91
 
93
92
  onRejectAllCookies: function () {
94
93
  this._saveCookiePreference(this._oCookieNames.ALLOW_REQUIRED_COOKIES, false);
95
- this._saveCookiePreference(this._oCookieNames.ALLOW_USAGE_TRACKING, false);
96
94
 
97
95
  this._oCookieSettingsDialog.close();
98
96
  },
99
97
 
100
98
  onSaveCookies: function() {
101
- var bHasConsentRequiredCookies = Core.byId("requiredCookiesSwitch").getState(),
102
- bHasConsentFunctionalCookies = Core.byId("functionalCookiesSwitch").getState();
99
+ var bHasConsentRequiredCookies = Core.byId("requiredCookiesSwitch").getState();
103
100
 
104
101
  this._saveCookiePreference(this._oCookieNames.ALLOW_REQUIRED_COOKIES, bHasConsentRequiredCookies);
105
- this._saveCookiePreference(this._oCookieNames.ALLOW_USAGE_TRACKING, bHasConsentFunctionalCookies);
106
102
 
107
103
  this._oCookieSettingsDialog.close();
108
104
  },
@@ -124,18 +120,11 @@ sap.ui.define([
124
120
  onCancelEditCookies: function() {
125
121
  this._oCookieSettingsDialog.close();
126
122
  Core.byId("requiredCookiesSwitch").setState(this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_REQUIRED_COOKIES) === "1");
127
- Core.byId("functionalCookiesSwitch").setState(this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_USAGE_TRACKING) === "1");
128
123
  },
129
124
 
130
125
  _saveCookiePreference: function(sCookieName, bEnable) {
131
126
  var sValue = bEnable ? "1" : "0";
132
127
 
133
- if ((sCookieName === this._oCookieNames.ALLOW_USAGE_TRACKING)
134
- && bEnable
135
- && this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_USAGE_TRACKING) !== "1") {
136
- this._oConfigUtil.enableUsageTracking();
137
- }
138
-
139
128
  this._oConfigUtil.setCookie(sCookieName, sValue);
140
129
  this._oModel.setProperty("/" + sCookieName, sValue);
141
130
  },
@@ -156,10 +145,8 @@ sap.ui.define([
156
145
  // when the user opens the edit dialog for a first time, show the cookies enabled
157
146
  // the user will then edit and save his choice
158
147
  oData[this._oCookieNames.ALLOW_REQUIRED_COOKIES] = "1";
159
- oData[this._oCookieNames.ALLOW_USAGE_TRACKING] = "1";
160
148
  } else {
161
149
  oData[this._oCookieNames.ALLOW_REQUIRED_COOKIES] = this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_REQUIRED_COOKIES);
162
- oData[this._oCookieNames.ALLOW_USAGE_TRACKING] = this._oConfigUtil.getCookieValue(this._oCookieNames.ALLOW_USAGE_TRACKING);
163
150
  }
164
151
 
165
152
  this._oModel.setData(oData, true /* merge */);
@@ -15,8 +15,7 @@ sap.ui.define([
15
15
 
16
16
  "COOKIE_NAMES": {
17
17
  "APPROVAL_REQUESTED": "dk_approval_requested",
18
- "ALLOW_REQUIRED_COOKIES": "dk_allow_required_cookies",
19
- "ALLOW_USAGE_TRACKING": "dk_allow_usage_tracking"
18
+ "ALLOW_REQUIRED_COOKIES": "dk_allow_required_cookies"
20
19
  },
21
20
 
22
21
  constructor : function (oComponent) {
@@ -66,10 +65,6 @@ sap.ui.define([
66
65
  return "";
67
66
  },
68
67
 
69
- enableUsageTracking: function() {
70
- window["swa"] && window["swa"].enable();
71
- },
72
-
73
68
  _getMasterTargetName: function(sRouteName) {
74
69
  var oRouteConfig = this._getRouteConfig(sRouteName),
75
70
  bIsSplitView = oRouteConfig && oRouteConfig.target.length === 2,
@@ -131,7 +131,8 @@ function() {
131
131
 
132
132
  Highlighter.prototype._processNode = function (oNode) {
133
133
  var sText, oRegEx, i, j, oMatches, sCurrentMatch,
134
- oCurrentMatch, aBlockedIndices, iCurrMatchIndex;
134
+ oCurrentMatch, aBlockedIndices, iCurrMatchIndex,
135
+ oHighligtedNode;
135
136
 
136
137
  if (oNode.nodeName === "IFRAME") {
137
138
  this._highlightSubTree(oNode.contentDocument.body);
@@ -168,8 +169,8 @@ function() {
168
169
  }
169
170
 
170
171
  if (Object.keys(oMatches).length !== 0) {
171
- sText = this._highlightTerms(oMatches, sText);
172
- this._replaceNode(oNode, sText);
172
+ oHighligtedNode = this._createHighlightedNode(oMatches, sText);
173
+ this._replaceNode(oNode, oHighligtedNode);
173
174
  }
174
175
  }
175
176
  };
@@ -195,17 +196,13 @@ function() {
195
196
  });
196
197
  };
197
198
 
198
- Highlighter.prototype._replaceNode = function (oNode, sHtml) {
199
- var oWrapper;
199
+ Highlighter.prototype._replaceNode = function (oNode, oHighligtedNode) {
200
200
 
201
201
  if (oNode.parentNode) {
202
- oWrapper = document.createElement('span');
203
- oWrapper.innerHTML = sHtml;
204
-
205
- oNode.parentNode.replaceChild(oWrapper, oNode);
202
+ oNode.parentNode.replaceChild(oHighligtedNode, oNode);
206
203
 
207
204
  // we cache which nodes are replaced with such as highlighted spans
208
- this._aPreviouslyHighlightedNodes.push(oWrapper); // Highlighted Node with span
205
+ this._aPreviouslyHighlightedNodes.push(oHighligtedNode); // Highlighted Node with span
209
206
  this._aPreviouslyOriginalNodes.push(oNode); // Original Node
210
207
  }
211
208
  };
@@ -230,27 +227,50 @@ function() {
230
227
  this._toggleMutationObserver(true);
231
228
  };
232
229
 
233
- Highlighter.prototype._highlightTerms = function (oMatches, sText) {
234
- var sOpeningTag = this._bUseExternalStyles ? '<span class="highlightedText">'
235
- : '<span class="defaultHighlightedText">',
236
- sClosingTag = '</span>',
237
- sCurrMatch,
238
- iUpdatedIndex,
239
- iCounter = 0,
240
- iIndex;
230
+ Highlighter.prototype._createHighlightedNode = function (oTokensToHighlight, sText) {
231
+ var oRootNode = document.createElement("span"),
232
+ aAllTokens = [],
233
+ fnSort = function(a, b) {return a > b;},
234
+ aIndices = Object.keys(oTokensToHighlight).sort(fnSort),
235
+ iIndex,
236
+ iStartIndex = 0;
237
+
238
+ // split the <code>sText</code> into tokens,
239
+ // including both the tokens to highlight
240
+ // and the remaing parts of the <code>sText</code> string
241
+ for (var i = 0; i < aIndices.length; i++) {
242
+ var iTokenIndex = Number(aIndices[i]),
243
+ sToken = oTokensToHighlight[iTokenIndex],
244
+ iTokenLength = sToken.length,
245
+ sBeforeToken = sText.substring(iStartIndex, iTokenIndex);
246
+
247
+ if (sBeforeToken.length) {
248
+ aAllTokens.push(sBeforeToken);
249
+ }
250
+ aAllTokens.push(sToken);
251
+
252
+ // shift the <code>iStartIndex</code> to the
253
+ // remaining part of the <code>sText</code> string
254
+ iStartIndex = iTokenIndex + iTokenLength;
255
+ }
241
256
 
242
- for (iIndex in oMatches) {
243
- iUpdatedIndex = +iIndex + (iCounter * (sOpeningTag.length + sClosingTag.length));
257
+ if (iStartIndex < sText.length) {
258
+ aAllTokens.push(sText.substring(iStartIndex));
259
+ }
244
260
 
245
- sCurrMatch = oMatches[iIndex];
246
- sText = sText.substring(0, iUpdatedIndex)
247
- + sOpeningTag + sCurrMatch + sClosingTag
248
- + sText.substring(iUpdatedIndex + sCurrMatch.length);
261
+ // wrap each token in a span
262
+ // and append to the root span
263
+ for (iIndex in aAllTokens) {
264
+ var oNextNode = document.createElement("span");
265
+ oNextNode.innerText = aAllTokens[iIndex];
266
+ if (Object.values(oTokensToHighlight).indexOf(aAllTokens[iIndex]) > -1) {
267
+ oNextNode.classList.add("defaultHighlightedText");
268
+ }
249
269
 
250
- iCounter++;
270
+ oRootNode.appendChild(oNextNode);
251
271
  }
252
272
 
253
- return sText;
273
+ return oRootNode;
254
274
  };
255
275
 
256
276
  Highlighter.prototype._addMutationObserver = function () {
@@ -19,16 +19,6 @@
19
19
  <Switch id="requiredCookiesSwitch" class="cookieStateSwitch"
20
20
  state="{path: 'cookieData>/dk_allow_required_cookies', type: 'sap.ui.model.type.Boolean', formatter: '.formatter.formatCookieValue'}"/>
21
21
  </CustomListItem>
22
-
23
- <CustomListItem class="cookieSetting sapUiSmallMarginTop">
24
- <Title text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_TITLE}"/>
25
- <Text class="cookieSummaryText" text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_SUMMARY}"/>
26
- <Panel headerText="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_MORE_INFO}" expandable="true" class="sapUiTinyMarginTop">
27
- <Text text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_TEXT}"/>
28
- </Panel>
29
- <Switch id="functionalCookiesSwitch" class="cookieStateSwitch"
30
- state="{path: 'cookieData>/dk_allow_usage_tracking', type: 'sap.ui.model.type.Boolean', formatter: '.formatter.formatCookieValue'}"/>
31
- </CustomListItem>
32
22
  </List>
33
23
  </html:div>
34
24
  </content>