@openui5/sap.ui.documentation 1.108.0 → 1.109.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 CHANGED
@@ -478,7 +478,7 @@ License: Apache-2.0
478
478
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
479
479
  Contained in: lib/jsdoc/ui5/plugin.js
480
480
 
481
- Component: SAP Theming Base Content, version: 11.1.40
481
+ Component: SAP Theming Base Content, version: 11.1.44
482
482
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
483
483
  License: Apache-2.0
484
484
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.documentation",
3
- "version": "1.108.0",
3
+ "version": "1.109.0",
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,11 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.108.0",
18
- "@openui5/sap.ui.core": "1.108.0",
19
- "@openui5/sap.ui.layout": "1.108.0",
20
- "@openui5/themelib_sap_belize": "1.108.0",
21
- "@openui5/themelib_sap_fiori_3": "1.108.0"
17
+ "@openui5/sap.m": "1.109.0",
18
+ "@openui5/sap.ui.core": "1.109.0",
19
+ "@openui5/sap.ui.layout": "1.109.0",
20
+ "@openui5/themelib_sap_belize": "1.109.0",
21
+ "@openui5/themelib_sap_fiori_3": "1.109.0",
22
+ "@openui5/themelib_sap_horizon": "1.109.0"
22
23
  }
23
24
  }
@@ -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.108.0</version>
9
+ <version>1.109.0</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.108.0
28
+ * @version 1.109.0
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.108.0',
34
+ version: '1.109.0',
35
35
  dependencies : ['sap.ui.core','sap.m'],
36
36
  types: [],
37
37
  interfaces: [],
@@ -66,9 +66,6 @@ sap.ui.define([
66
66
  // shortcut for sap.m.SplitAppMode
67
67
  var SplitAppMode = mobileLibrary.SplitAppMode;
68
68
 
69
- // Shortcut for sap.m.URLHelper
70
- var URLHelper = mobileLibrary.URLHelper;
71
-
72
69
  var MAIN_WEB_PAGE_TITLE = "Demo Kit - \uFFFD SDK",
73
70
  WEB_PAGE_TITLE = {
74
71
  topic: "Documentation - " + MAIN_WEB_PAGE_TITLE,
@@ -163,8 +160,7 @@ sap.ui.define([
163
160
  "Check at <a href = 'https://sdk.openui5.org/versionoverview.html'>https://sdk.openui5.org/versionoverview.html</a> " +
164
161
  "which versions are available. " +
165
162
  "You can view the version-specific Demo Kit by adding the version number to the URL, e.g. " +
166
- "<a href='https://sdk.openui5.org/1.71.46/'>https://sdk.openui5.org/1.71.46/</a>",
167
- bUseFeedbackDialog: false // enable to restore previous feedback dialog and hide the Qualtrics surveys
163
+ "<a href='https://sdk.openui5.org/1.71.46/'>https://sdk.openui5.org/1.71.46/</a>"
168
164
  });
169
165
 
170
166
  var oComponent = this.getOwnerComponent();
@@ -462,17 +458,12 @@ sap.ui.define([
462
458
 
463
459
  handleMenuItemClick: function (oEvent) {
464
460
  var sTargetText = oEvent.getParameter("item").getKey(),
465
- sTarget = this.MENU_LINKS_MAP[sTargetText],
466
- bUseFeedbackDialog = this.getModel("appView").getProperty("/bUseFeedbackDialog");
461
+ sTarget = this.MENU_LINKS_MAP[sTargetText];
467
462
 
468
463
  if (sTargetText === ABOUT_TEXT) {
469
464
  this.aboutDialogOpen();
470
465
  } else if (sTargetText === FEEDBACK_TEXT) {
471
- if (!bUseFeedbackDialog) {
472
- this.launchSurvey(oEvent, true);
473
- } else {
474
- this.feedbackDialogOpen();
475
- }
466
+ this.feedbackDialogOpen();
476
467
  } else if (sTargetText === CHANGE_SETTINGS_TEXT) {
477
468
  this.settingsDialogOpen();
478
469
  } else if (sTargetText === CHANGE_COOKIE_PREFERENCES_TEXT) {
@@ -1288,7 +1279,7 @@ sap.ui.define([
1288
1279
  },
1289
1280
 
1290
1281
  /**
1291
- * Opens the Qualtrics UX survey when the feedback button gets pressed.
1282
+ * Opens the Qualtrics UX survey when the feedback button is pressed.
1292
1283
  * There are two available surveys - a short one (all year round), and quarterly survey.
1293
1284
  *
1294
1285
  * Depending on the number of available surveys:
@@ -5,21 +5,22 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/thirdparty/jquery",
9
- "sap/ui/documentation/sdk/controller/BaseController",
10
- "sap/ui/model/resource/ResourceModel",
8
+ "sap/base/Log",
9
+ "sap/m/MessageBox",
10
+ "sap/m/MessageToast",
11
11
  "sap/ui/Device",
12
- "sap/ui/model/json/JSONModel",
12
+ "sap/ui/VersionInfo",
13
+ "sap/ui/documentation/sdk/controller/BaseController",
13
14
  "sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil",
14
15
  "sap/ui/documentation/sdk/model/formatter",
15
- "sap/m/MessageBox",
16
- "sap/m/MessageToast",
16
+ 'sap/ui/documentation/sdk/model/libraryData',
17
17
  "sap/ui/model/Filter",
18
18
  "sap/ui/model/FilterOperator",
19
- 'sap/ui/documentation/sdk/model/libraryData',
20
- "sap/base/Log"
21
- ], function(jQuery, BaseController, ResourceModel, Device, JSONModel, ResourceDownloadUtil, formatter, MessageBox,
22
- MessageToast, Filter, FilterOperator, libraryData, Log) {
19
+ "sap/ui/model/json/JSONModel",
20
+ "sap/ui/model/resource/ResourceModel",
21
+ "sap/ui/thirdparty/jquery"
22
+ ], function(Log, MessageBox, MessageToast, Device, VersionInfo, BaseController, ResourceDownloadUtil,
23
+ formatter, libraryData, Filter, FilterOperator, JSONModel, ResourceModel, jQuery) {
23
24
  "use strict";
24
25
 
25
26
  return BaseController.extend("sap.ui.documentation.sdk.controller.DemoApps", {
@@ -49,7 +50,7 @@ sap.ui.define([
49
50
 
50
51
  this.getRouter().getRoute("demoapps").attachPatternMatched(this._onMatched, this);
51
52
 
52
- sap.ui.getVersionInfo({async: true}).then(function (oVersionInfo) {
53
+ VersionInfo.load().then(function (oVersionInfo) {
53
54
  var oViewModel = new JSONModel({
54
55
  isOpenUI5: oVersionInfo && oVersionInfo.gav && /openui5/i.test(oVersionInfo.gav)
55
56
  });
@@ -195,7 +195,7 @@ sap.ui.define([
195
195
  }
196
196
  }
197
197
  // Sets the current iframe URL or restores it to "undefined"
198
- oModelData.iframe = oSampleConfig.iframe;
198
+ oModelData.iframe = oSampleConfig.iframe || null;
199
199
  oPage.setProperty("enableScrolling", !!oSampleConfig.stretch, true);
200
200
  }
201
201
 
@@ -7,52 +7,61 @@
7
7
  // Provides reuse functionality for reading documentation from metamodel entities
8
8
  sap.ui.define([
9
9
  './APIInfo',
10
- "sap/base/util/ObjectPath"
10
+ "sap/base/util/ObjectPath",
11
+ "sap/ui/VersionInfo"
11
12
  ],
12
- function(APIInfo, ObjectPath) {
13
+ function(APIInfo, ObjectPath, VersionInfo) {
13
14
  "use strict";
14
15
 
15
16
  function findLibraryFromEntityName(sEntityName) {
16
- var oVersionInfo = sap.ui.getVersionInfo(),
17
- oLibrary,
18
- iLen,
19
- i;
20
-
21
- if ( oVersionInfo && Array.isArray(oVersionInfo.libraries) ) {
22
- iLen = oVersionInfo.libraries.length;
23
- for (i = 0; i < iLen; i++) {
24
- oLibrary = oVersionInfo.libraries[i];
25
- if ( sEntityName === oLibrary.name || sEntityName.indexOf(oLibrary.name + ".") === 0 ) {
26
- return oLibrary.name;
17
+ return VersionInfo.load().catch(function() {}).then(function(oVersionInfo) {
18
+ if ( oVersionInfo && Array.isArray(oVersionInfo.libraries) ) {
19
+ var iLen = oVersionInfo.libraries.length;
20
+ for (var i = 0; i < iLen; i++) {
21
+ var oLibrary = oVersionInfo.libraries[i];
22
+ if ( sEntityName === oLibrary.name || sEntityName.indexOf(oLibrary.name + ".") === 0 ) {
23
+ return oLibrary.name;
24
+ }
27
25
  }
28
26
  }
29
- }
30
27
 
31
- // fallback to core (this ensures that the extraordinary packages of sap.ui.core are found, but doesn't work as
32
- // soon as other libs do the same)
33
- return "sap.ui.core";
28
+ // fallback to core (this ensures that the extraordinary packages of sap.ui.core are found, but doesn't work as
29
+ // soon as other libs do the same)
30
+ return "sap.ui.core";
31
+ });
34
32
  }
35
33
 
36
- function getAsync(sEntityName, sLibraryName) {
37
- var oEntityDoc;
34
+ function findLibraryName(sEntityName, sLibraryName) {
38
35
 
39
- if (!sLibraryName) {
40
- var oClass = ObjectPath.get(sEntityName || "");
41
- if (oClass && oClass.getMetadata) {
42
- var oMetadata = oClass.getMetadata();
43
- if (oMetadata.getLibraryName) {
44
- sLibraryName = oMetadata.getLibraryName();
45
- } else {
46
- sLibraryName = "sap.ui.core";
47
- }
36
+ // if library name is provided, go with it
37
+ if (sLibraryName) {
38
+ return Promise.resolve(sLibraryName);
39
+ }
40
+
41
+ // check if sEntityName represents a subclass of BaseObject and if so, use the metadata
42
+ // TODO this relies on global names and needs to be refactored
43
+ var oClass = ObjectPath.get(sEntityName || "");
44
+ if (oClass && oClass.getMetadata) {
45
+ var oMetadata = oClass.getMetadata();
46
+ if (oMetadata.getLibraryName) {
47
+ sLibraryName = oMetadata.getLibraryName();
48
48
  } else {
49
- sLibraryName = findLibraryFromEntityName(sEntityName);
49
+ sLibraryName = "sap.ui.core";
50
50
  }
51
+ return Promise.resolve(sLibraryName);
51
52
  }
52
53
 
53
- // If we have APIInfo json file we return a new promise which will return the oEntityDoc
54
- return APIInfo.getLibraryElementsJSONPromise(sLibraryName).then(function (oEntityCollection) {
55
- var oEntity;
54
+ return findLibraryFromEntityName(sEntityName);
55
+ }
56
+
57
+ function getAsync(sEntityName, sLibraryName) {
58
+
59
+ return findLibraryName(sEntityName, sLibraryName).then(function(sLibraryName) {
60
+ // If we have APIInfo json file, we return a new promise which will return the oEntityDoc
61
+ return APIInfo.getLibraryElementsJSONPromise(sLibraryName);
62
+ }).then(function (oEntityCollection) {
63
+ var oEntity,
64
+ oEntityDoc;
56
65
 
57
66
  // Find single entity entry
58
67
  for (var i = 0, iLen = oEntityCollection.length; i < iLen; i++) {
@@ -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 () {
@@ -8,7 +8,10 @@
8
8
  "sap.ui5": {
9
9
  "dependencies": {
10
10
  "libs": {
11
- "sap.m": {}
11
+ "sap.f": {},
12
+ "sap.m": {},
13
+ "sap.ui.core": {},
14
+ "sap.ui.layout": {}
12
15
  }
13
16
  },
14
17
  "resources": {
@@ -315,7 +315,7 @@ html.sap-desktop .sapContrast.sapMSlt.sapUiDocumentationSelect:not(.sapMSltExpan
315
315
  /* Topics - dynamic page */
316
316
  .sapUiDocumentationTopicTitle {
317
317
  font-size: 2rem;
318
- font-family: "72Black", "72", "72full", Arial, Helvetica, sans-serif;
318
+ font-family: "72Black", "72Blackfull", "72", "72full", Arial, Helvetica, sans-serif;
319
319
  }
320
320
 
321
321
  .sapUiMedia-Std-Phone .sapUiDocumentationTopicTitle {
@@ -90,14 +90,7 @@
90
90
 
91
91
  <custom:Search id="searchControl" toggle="onToggleSearchMode" search="onSearch" liveChange="onSearchLiveChange" width="{= (${appView>/bPhoneSize} &amp;&amp; ${appView>/bSearchMode}) ? '100%' : ''}"/>
92
92
 
93
- <Button id="feedBackDialogButton" tooltip="{i18n>APP_FEEDBACK_BTN_TOOLTIP}" press="feedbackDialogOpen" icon="sap-icon://comment" type="Transparent" visible="{=${appView>/bUseFeedbackDialog} &amp;&amp; !${appView>/bPhoneSize} &amp;&amp; !${appView>/bSearchMode}}">
94
-
95
- <layoutData>
96
- <OverflowToolbarLayoutData priority="NeverOverflow" />
97
- </layoutData>
98
- </Button>
99
-
100
- <Button id="surveyButton" class="surveyButton" tooltip="{i18n>APP_FEEDBACK_BTN_TOOLTIP}" press="launchSurvey" icon="sap-icon://feedback" type="Transparent" visible="{=!${appView>/bUseFeedbackDialog} &amp;&amp; !${appView>/bPhoneSize} &amp;&amp; !${appView>/bSearchMode}}">
93
+ <Button id="surveyButton" class="surveyButton" tooltip="{i18n>APP_FEEDBACK_BTN_TOOLTIP}" press="launchSurvey" icon="sap-icon://feedback" type="Transparent" visible="{= !${appView>/bPhoneSize} &amp;&amp; !${appView>/bSearchMode} }">
101
94
  <customData>
102
95
  <BadgeCustomData
103
96
  visible="{appView>/bShowLongSurvey}"
@@ -158,8 +151,8 @@
158
151
  <MenuItem icon="sap-icon://document-text" text="{i18n>APP_INFORMATION_BTN_TERMS_OF_USE}" key="terms_of_use" visible="{versionData>/isOpenUI5}"/>
159
152
  <MenuItem icon="sap-icon://tree" text="{i18n>APP_INFORMATION_BTN_SITEMAP}" key="sitemap" visible="{versionData>/isOpenUI5}"/>
160
153
  <MenuItem icon="sap-icon://hello-world" text="{i18n>APP_SETTINGS_DIALOG_LANGUAGE}" key="settings"/>
161
- <MenuItem icon="sap-icon://customize" text="{i18n>APP_SETTINGS_DIALOG_COOKIE_PREFERENCES}" key="cookie_preferences"
162
- visible="{= ${versionData>/enableAdvancedCookieSettings}}"/>
154
+ <MenuItem icon="sap-icon://customize" text="{i18n>APP_SETTINGS_DIALOG_COOKIE_PREFERENCES}" key="cookie_preferences" visible="{= ${versionData>/enableAdvancedCookieSettings}}"/>
155
+ <MenuItem icon="sap-icon://feedback" text="{i18n>APP_FEEDBACK_BTN_TOOLTIP}" key="feedback" />
163
156
  </items>
164
157
  </Menu>
165
158
  </menu>