@openui5/sap.ui.documentation 1.103.1 → 1.104.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.
Files changed (39) hide show
  1. package/.reuse/dep5 +17 -0
  2. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
  3. package/THIRDPARTY.txt +35 -2
  4. package/package.json +6 -6
  5. package/src/sap/ui/documentation/.library +1 -1
  6. package/src/sap/ui/documentation/library.js +2 -2
  7. package/src/sap/ui/documentation/sdk/controller/App.controller.js +3 -3
  8. package/src/sap/ui/documentation/sdk/controller/Code.controller.js +1 -1
  9. package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +2 -2
  10. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +53 -21
  11. package/src/sap/ui/documentation/sdk/controller/VersionNotFound.controller.js +19 -12
  12. package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +7 -3
  13. package/src/sap/ui/documentation/sdk/controller/util/URLUtil.js +117 -0
  14. package/src/sap/ui/documentation/sdk/css/style.css +22 -13
  15. package/src/sap/ui/documentation/sdk/index.html +20 -1
  16. package/src/sap/ui/documentation/sdk/model/formatter.js +25 -0
  17. package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/styles.css +47 -1
  18. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +7 -0
  19. package/src/sap/ui/documentation/sdk/view/ApiDetailInitial.view.xml +13 -13
  20. package/src/sap/ui/documentation/sdk/view/Controls.view.xml +19 -19
  21. package/src/sap/ui/documentation/sdk/view/Entity.view.xml +2 -2
  22. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +12 -3
  23. package/src/sap/ui/documentation/sdk/view/TopicDetailInitial.view.xml +12 -12
  24. package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +26 -26
  25. package/src/sap/ui/documentation/sdk/view/appSettingsDialog.fragment.xml +6 -4
  26. package/src/sap/ui/documentation/themes/base/DemokitTreeItem.less +5 -9
  27. package/src/sap/ui/documentation/themes/base/LightTable.less +49 -40
  28. package/src/sap/ui/documentation/themes/base/ObjectPageSubSection.less +9 -0
  29. package/src/sap/ui/documentation/themes/base/Search.less +1 -0
  30. package/src/sap/ui/documentation/themes/base/library.source.less +1 -0
  31. package/src/sap/ui/documentation/themes/sap_horizon/Link.less +3 -0
  32. package/src/sap/ui/documentation/themes/sap_horizon/Search.less +3 -0
  33. package/src/sap/ui/documentation/themes/sap_horizon/SplitButton.less +5 -0
  34. package/src/sap/ui/documentation/themes/sap_horizon/library.source.less +5 -1
  35. package/src/sap/ui/documentation/themes/sap_horizon_dark/Documentation.less +17 -0
  36. package/src/sap/ui/documentation/themes/sap_horizon_dark/Link.less +3 -0
  37. package/src/sap/ui/documentation/themes/sap_horizon_dark/Search.less +3 -0
  38. package/src/sap/ui/documentation/themes/sap_horizon_dark/SplitButton.less +5 -0
  39. package/src/sap/ui/documentation/themes/sap_horizon_dark/library.source.less +6 -1
package/.reuse/dep5 CHANGED
@@ -137,6 +137,11 @@ Copyright: jQuery Foundation and other contributors
137
137
  License: MIT
138
138
  Comment: these files belong to: QUnit 2
139
139
 
140
+ Files: src/sap.ui.core/test/sap/ui/core/qunit/thirdparty/qunit-2.18.*
141
+ Copyright: jQuery Foundation and other contributors
142
+ License: MIT
143
+ Comment: these files belong to: QUnit 2.18
144
+
140
145
  Files: src/sap.ui.core/src/sap/ui/thirdparty/jquery-compat.js
141
146
  Copyright: OpenJS Foundation and other contributors
142
147
  License: MIT
@@ -234,6 +239,11 @@ Copyright: 2010-2017, Christian Johansen, christian@cjohansen.no
234
239
  License: BSD-3-Clause
235
240
  Comment: these files belong to: SinonJS
236
241
 
242
+ Files: src/sap.ui.core/test/sap/ui/core/qunit/thirdparty/sinon-14.0.*
243
+ Copyright: 2010-2022, Christian Johansen, christian@cjohansen.no
244
+ License: BSD-3-Clause
245
+ Comment: these files belong to: SinonJS 14
246
+
237
247
  Files: src/sap.ui.core/src/sap/ui/thirdparty/sinon-qunit.js
238
248
  Copyright: 2010-2011, Christian Johansen
239
249
  License: BSD-3-Clause
@@ -339,6 +349,13 @@ Copyright:
339
349
  License: Apache-2.0 and ISC
340
350
  Comment: these files contain content from SAP and node-lru-cache: LRUPersistentCache.js is overall written by SAP, but portions ('Least Recently Used' logic) are taken from the node-lru-cache project (see https://github.com/isaacs/node-lru-cache/blob/v2.7.3/README.md) and modified.
341
351
 
352
+ Files: src/sap.ui.core/test/sap/ui/core/qunit/i18n/helper/_timezones.js
353
+ Copyright:
354
+ 2009-2022 SAP SE or an SAP affiliate company and OpenUI5 contributors
355
+ Arthur David Olson, Paul Eggert and other contributors
356
+ License: Apache-2.0 and LicenseRef-tzdata-PublicDomain
357
+ Comment: these files contain content from SAP and Time Zone Database: _timezones.js is overall written by SAP, but the list of IANA timezone IDs is taken from the Timezone Database
358
+
342
359
 
343
360
  # Library: sap.ui.documentation:
344
361
 
@@ -0,0 +1,5 @@
1
+ Unless specified below, all files in the tz code and data (including
2
+ this LICENSE file) are in the public domain.
3
+
4
+ If the files date.c, newstrftime.3, and strftime.c are present, they
5
+ contain material derived from BSD and use the BSD 3-clause license.
package/THIRDPARTY.txt CHANGED
@@ -76,6 +76,12 @@ License: MIT
76
76
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
77
77
  Contained in: src/sap.ui.core/src/sap/ui/thirdparty/qunit-2.*
78
78
 
79
+ Component: QUnit 2.18, version: 2.18.0
80
+ Copyright: jQuery Foundation and other contributors
81
+ License: MIT
82
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
83
+ Contained in: src/sap.ui.core/test/sap/ui/core/qunit/thirdparty/qunit-2.18.*
84
+
79
85
  Component: jQuery-Migrate, version: 3.3.1
80
86
  Copyright: OpenJS Foundation and other contributors
81
87
  License: MIT
@@ -191,13 +197,19 @@ License: BSD-3-Clause
191
197
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
192
198
  Contained in: src/sap.ui.core/src/sap/ui/thirdparty/sinon-4.js
193
199
 
200
+ Component: SinonJS 14, version: 14.0.0
201
+ Copyright: 2010-2022, Christian Johansen, christian@cjohansen.no
202
+ License: BSD-3-Clause
203
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
204
+ Contained in: src/sap.ui.core/test/sap/ui/core/qunit/thirdparty/sinon-14.0.*
205
+
194
206
  Component: Sinon-qunit, version: 2.0.0
195
207
  Copyright: 2010-2011, Christian Johansen
196
208
  License: BSD-3-Clause
197
209
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
198
210
  Contained in: src/sap.ui.core/src/sap/ui/thirdparty/sinon-qunit.js
199
211
 
200
- Component: URI.js, version: 1.19.10
212
+ Component: URI.js, version: 1.19.11
201
213
  Copyright: Rodney Rehm
202
214
  License: MIT
203
215
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
@@ -315,6 +327,12 @@ License: ISC
315
327
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/ISC.txt
316
328
  Contained in: src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js
317
329
 
330
+ Component: Time Zone Database, version: 2022a
331
+ Copyright: Arthur David Olson, Paul Eggert and other contributors
332
+ License: LicenseRef-tzdata-PublicDomain
333
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/LicenseRef-tzdata-PublicDomain.txt
334
+ Contained in: src/sap.ui.core/test/sap/ui/core/qunit/i18n/helper/_timezones.js
335
+
318
336
 
319
337
  Library: sap.ui.documentation:
320
338
 
@@ -450,7 +468,7 @@ License: Apache-2.0
450
468
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
451
469
  Contained in: lib/jsdoc/ui5/plugin.js
452
470
 
453
- Component: SAP Theming Base Content, version: 11.1.39
471
+ Component: SAP Theming Base Content, version: 11.1.40
454
472
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
455
473
  License: Apache-2.0
456
474
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
@@ -980,6 +998,21 @@ END of license: LicenseRef-JSONinJSPublicDomain
980
998
  =================================
981
999
 
982
1000
 
1001
+ =================================
1002
+ BEGIN of license: LicenseRef-tzdata-PublicDomain
1003
+ =================================
1004
+
1005
+ Unless specified below, all files in the tz code and data (including
1006
+ this LICENSE file) are in the public domain.
1007
+
1008
+ If the files date.c, newstrftime.3, and strftime.c are present, they
1009
+ contain material derived from BSD and use the BSD 3-clause license.
1010
+
1011
+ =================================
1012
+ END of license: LicenseRef-tzdata-PublicDomain
1013
+ =================================
1014
+
1015
+
983
1016
  =================================
984
1017
  BEGIN of license: MIT
985
1018
  =================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.documentation",
3
- "version": "1.103.1",
3
+ "version": "1.104.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,10 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.103.1",
18
- "@openui5/sap.ui.core": "1.103.1",
19
- "@openui5/sap.ui.layout": "1.103.1",
20
- "@openui5/themelib_sap_belize": "1.103.1",
21
- "@openui5/themelib_sap_fiori_3": "1.103.1"
17
+ "@openui5/sap.m": "1.104.0",
18
+ "@openui5/sap.ui.core": "1.104.0",
19
+ "@openui5/sap.ui.layout": "1.104.0",
20
+ "@openui5/themelib_sap_belize": "1.104.0",
21
+ "@openui5/themelib_sap_fiori_3": "1.104.0"
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.103.1</version>
9
+ <version>1.104.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.103.1
28
+ * @version 1.104.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.103.1',
34
+ version: '1.104.0',
35
35
  dependencies : ['sap.ui.core','sap.m'],
36
36
  types: [],
37
37
  interfaces: [],
@@ -102,9 +102,9 @@ sap.ui.define([
102
102
  DEMOKIT_CONFIGURATION_APPEARANCE = "appearance",
103
103
  SITEMAP = "sitemap";
104
104
 
105
- DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_LIGHT] = "sap_fiori_3";
106
- DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_DARK] = "sap_fiori_3_dark";
107
- DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_AUTO] = "sap_fiori_3"; // fallback if window.matchMedia is not supported
105
+ DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_LIGHT] = "sap_horizon";
106
+ DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_DARK] = "sap_horizon_dark";
107
+ DEMOKIT_APPEARANCE[DEMOKIT_APPEARANCE_KEY_AUTO] = "sap_horizon"; // fallback if window.matchMedia is not supported
108
108
 
109
109
  return BaseController.extend("sap.ui.documentation.sdk.controller.App", {
110
110
  formatter: globalFormatter,
@@ -219,7 +219,7 @@ sap.ui.define([
219
219
  sEditorTheme = "github";
220
220
  } else if (sTheme === "sap_fiori_3") {
221
221
  sEditorTheme = "crimson_editor";
222
- } else if (sTheme === "sap_fiori_3_dark") {
222
+ } else if (sTheme === "sap_fiori_3_dark" || sTheme === "sap_horizon_dark") {
223
223
  sEditorTheme = "clouds_midnight";
224
224
  }
225
225
  this._getCodeEditor().setColorTheme(sEditorTheme);
@@ -51,12 +51,12 @@ sap.ui.define([
51
51
  _sStorageKey: "UI5_EXPLORED_LIST_SETTINGS_FROM_1_48",
52
52
  _oViewSettings: {
53
53
  densityMode: COMPACT,
54
- themeActive: "sap_fiori_3",
54
+ themeActive: "sap_horizon",
55
55
  rtl: false
56
56
  },
57
57
  _oDefaultSettings: {
58
58
  densityMode: COMPACT,
59
- themeActive: "sap_fiori_3",
59
+ themeActive: "sap_horizon",
60
60
  rtl: false
61
61
  },
62
62
  _oListSettings: {
@@ -18,7 +18,6 @@ sap.ui.define([
18
18
  "sap/ui/core/HTML",
19
19
  "sap/m/library",
20
20
  "sap/base/Log",
21
- "sap/base/util/UriParameters",
22
21
  "sap/ui/core/Fragment",
23
22
  "sap/ui/documentation/sdk/util/Resources",
24
23
  "./config/sampleForwardingConfig",
@@ -36,7 +35,6 @@ sap.ui.define([
36
35
  HTML,
37
36
  mobileLibrary,
38
37
  Log,
39
- UriParameters,
40
38
  Fragment,
41
39
  ResourcesUtil,
42
40
  sampleForwardingConfig,
@@ -95,11 +93,18 @@ sap.ui.define([
95
93
  * @private
96
94
  */
97
95
  _onSampleMatched: function (event) {
96
+ var bShouldRedirect = new URLSearchParams(window.location.search).has("dk-sample-standalone");
97
+
98
98
  this._sId = event.getParameter("arguments").sampleId;
99
99
  this._sEntityId = event.getParameter("arguments").entityId;
100
100
 
101
101
  this.byId("page").setBusy(true);
102
102
 
103
+ // check whether to open sample standalone
104
+ if (bShouldRedirect) {
105
+ this._handleRedirect();
106
+ }
107
+
103
108
  if (sampleForwardingConfig[this._sId]) {
104
109
  return this.router.navTo("sample", {
105
110
  entityId: sampleForwardingConfig[this._sId].entityId,
@@ -207,6 +212,42 @@ sap.ui.define([
207
212
  });
208
213
  },
209
214
 
215
+ /**
216
+ * Handles redirection from DemoKit to the sample page, rather than loading it as an iFrame.
217
+ * The 'dk-sample-standalone' query parameter must be in the URI to take effect.
218
+ * @private
219
+ */
220
+ _handleRedirect : function () {
221
+ this._initIframeURL();
222
+ this._applySearchParamValueToIframeURL('sap-ui-theme', this._sDefaultSampleTheme);
223
+ this.sIFrameUrl += "&dk-sample-standalone";
224
+ URLHelper.redirect(this.sIFrameUrl, false);
225
+ },
226
+
227
+ /**
228
+ * Initializes the URL of the sample itself, loaded either in an iFrame or standalone.
229
+ * @private
230
+ */
231
+ _initIframeURL : function () {
232
+ var sSampleOrigin = (window['sap-ui-documentation-config'] && window['sap-ui-documentation-config'].demoKitResourceOrigin) || "",
233
+ sSampleVersion = ResourcesUtil.getResourcesVersion(),
234
+ sSampleSearchParams = "";
235
+
236
+ // Assigning allowed query parameters from Demo Kit URL
237
+ ALLOWLIST_SAMPLES_SEARCH_PARAMS.forEach(function (oParam, index) {
238
+ if (new URL(document.location.href).searchParams.get(oParam)) {
239
+ sSampleSearchParams += (sSampleSearchParams === "" ? "?" : "&") + oParam + "=" + new URL(document.location.href).searchParams.get(oParam);
240
+ }
241
+ });
242
+
243
+ sSampleSearchParams = (sSampleSearchParams === "" ? "?" : sSampleSearchParams + "&") +
244
+ "sap-ui-xx-sample-id=" + this._sId
245
+ + "&sap-ui-xx-sample-origin=" + sSampleOrigin + sSampleVersion
246
+ + "&sap-ui-xx-dk-origin=" + window.location.origin;
247
+
248
+ this.sIFrameUrl = ResourcesUtil.getResourceOrigin() + "/resources/sap/ui/documentation/sdk/index.html" + sSampleSearchParams;
249
+ },
250
+
210
251
  /**
211
252
  * Opens the View settings dialog
212
253
  * @public
@@ -361,7 +402,11 @@ sap.ui.define([
361
402
  this.getRouter().navTo("apiId", {id: this.entityId});
362
403
  },
363
404
 
364
- onNewTab : function () {
405
+ onNewTab: function () {
406
+ if (this.oModel.getProperty("/iframe")) {
407
+ URLHelper.redirect(this.sIFrameUrl, true);
408
+ return;
409
+ }
365
410
  // this._applySearchParamValueToIframeURL('sap-ui-theme', this._sDefaultSampleTheme);
366
411
  this.loadSampleSettings(function(eMessage){
367
412
  this._applySearchParamValueToIframeURL('sap-ui-theme', eMessage.data.data.theme);
@@ -369,7 +414,9 @@ sap.ui.define([
369
414
  this._applySearchParamValueToIframeURL('sap-ui-density', eMessage.data.data.density);
370
415
  }.bind(this)).then(function(){
371
416
  URLHelper.redirect(this.sIFrameUrl, true);
372
- }.bind(this));
417
+ }.bind(this)).catch(function(err){
418
+ Log.error(err);
419
+ });
373
420
  },
374
421
 
375
422
  onPreviousSample: function (oEvent) {
@@ -429,7 +476,7 @@ sap.ui.define([
429
476
 
430
477
  _createIframe : function () {
431
478
  return new Promise(function (resolve, reject) {
432
- var sSampleId = this._sId,
479
+ var sSampleId,
433
480
  sIframePath = "",
434
481
  rExtractFilename = /\/([^\/]*)$/,// extracts everything after the last slash (e.g. some/path/index.html -> index.html)
435
482
  rStripUI5Ending = /\..+$/,// removes everything after the first dot in the filename (e.g. someFile.qunit.html -> .qunit.html)
@@ -440,23 +487,8 @@ sap.ui.define([
440
487
 
441
488
  this.fResolve = resolve;
442
489
  this.fReject = reject;
443
- var sSampleOrigin = (window['sap-ui-documentation-config'] && window['sap-ui-documentation-config'].demoKitResourceOrigin) || "",
444
- sSampleVersion = ResourcesUtil.getResourcesVersion(),
445
- sSampleSearchParams = "";
446
-
447
- // Assigning allowed query parameters from Demo Kit URL
448
- ALLOWLIST_SAMPLES_SEARCH_PARAMS.forEach(function(oParam, index){
449
- if (new URL(document.location.href).searchParams.get(oParam)){
450
- sSampleSearchParams += (sSampleSearchParams === "" ? "?" : "&") + oParam + "=" + new URL(document.location.href).searchParams.get(oParam);
451
- }
452
- });
453
-
454
- sSampleSearchParams = (sSampleSearchParams === "" ? "?" : sSampleSearchParams + "&") +
455
- "sap-ui-xx-sample-id=" + sSampleId
456
- + "&sap-ui-xx-sample-origin=" + sSampleOrigin + sSampleVersion
457
- + "&sap-ui-xx-dk-origin=" + window.location.origin;
458
490
 
459
- this.sIFrameUrl = ResourcesUtil.getResourceOrigin() + "/resources/sap/ui/documentation/sdk/index.html" + sSampleSearchParams;
491
+ this._initIframeURL();
460
492
 
461
493
  if (this._oHtmlControl) {
462
494
  this._oHtmlControl.destroy();
@@ -7,12 +7,12 @@
7
7
  sap.ui.define([
8
8
  "./BaseController",
9
9
  "sap/ui/thirdparty/jquery",
10
- "sap/ui/thirdparty/URI",
10
+ "sap/ui/documentation/sdk/controller/util/URLUtil",
11
11
  "sap/m/library"
12
12
  ], function (
13
13
  BaseController,
14
14
  jQuery,
15
- URI,
15
+ DemokitURLUtil,
16
16
  mLib
17
17
  ) {
18
18
  "use strict";
@@ -44,22 +44,29 @@ sap.ui.define([
44
44
  _onVersionInfo: function (oVersionInfo) {
45
45
  var oMessagePage = this.getView().byId("page"),
46
46
  oReadMoreBtn = this.getView().byId("readMoreButton"),
47
- reVersion = new RegExp("^([0-9]+)(?:\\.([0-9]+)(?:\\.([0-9]+))?)?(.+)?"),
48
- oURI = new URI(document.location.href),
49
- aSegments = oURI.segment(),
50
- sVersion,
47
+ sUrl = document.location.href,
48
+ sRedirectUrl,
49
+ sVersion = DemokitURLUtil.parseVersion(sUrl),
51
50
  isRemoved = false;
52
51
 
53
52
  oMessagePage.setBusy(false);
54
53
 
55
- for (var i = 0, l = aSegments.length; i < l; i++) {
56
- if (reVersion.test(aSegments[i])) {
57
- sVersion = aSegments[i];
58
- break;
59
- }
54
+ isRemoved = this._isVersionRemoved(oVersionInfo, sVersion);
55
+
56
+ if (isRemoved && DemokitURLUtil.requestsDemokitView(sUrl)) {
57
+ // redirect to the latest (version-less) URL
58
+ sRedirectUrl = DemokitURLUtil.removeVersion(sUrl);
59
+ mLib.URLHelper.redirect(sRedirectUrl);
60
+ return;
60
61
  }
61
62
 
62
- isRemoved = this._isVersionRemoved(oVersionInfo, sVersion);
63
+ if (DemokitURLUtil.hasSEOOptimizedFormat(sUrl)) {
64
+ // 404 may be due to server not supporting SEO-optimized urls =>
65
+ // redirect to the corresponding non-optimized URL
66
+ sRedirectUrl = DemokitURLUtil.convertToNonSEOFormat(sUrl);
67
+ mLib.URLHelper.redirect(sRedirectUrl);
68
+ return;
69
+ }
63
70
 
64
71
  if (isRemoved) {
65
72
  // show removed message
@@ -58,7 +58,8 @@ sap.ui.define([],
58
58
  {
59
59
  "id": "liveEditor",
60
60
  "text": "Live Editor",
61
- "href": "liveEditor"
61
+ "href": "liveEditor",
62
+ "hideOnPhone": true
62
63
  },
63
64
  {
64
65
  "id": "fioriTools",
@@ -68,12 +69,15 @@ sap.ui.define([],
68
69
  {
69
70
  "id": "flexibleProgrammingModelExplorer",
70
71
  "text": "Flexible Programming Model Explorer",
71
- "href": "https://sapui5.hana.ondemand.com/test-resources/sap/fe/core/fpmExplorer/index.html#/overview/introduction"
72
+ "href": "test-resources/sap/fe/core/fpmExplorer/index.html#/overview/introduction",
73
+ "isDistributionScope": true,
74
+ "hideOnPhone": true
72
75
  },
73
76
  {
74
77
  "id": "accessibilityGuide",
75
78
  "text": "Accessibility Guide",
76
- "href": "test-resources/sap/m/demokit/accessibilityGuide/webapp/index.html"
79
+ "href": "test-resources/sap/m/demokit/accessibilityGuide/webapp/index.html",
80
+ "hideOnPhone": true
77
81
  }
78
82
  ];
79
83
 
@@ -0,0 +1,117 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ // Provides reuse functionality for parsing and manipulating demokit urls
8
+ sap.ui.define(["sap/ui/thirdparty/URI"], function(URI) {
9
+
10
+ "use strict";
11
+
12
+ var reVersion = new RegExp("^([0-9]+)(?:\\.([0-9]+)(?:\\.([0-9]+))?)?(.+)?"),
13
+ // compiling a single RegExp seems a less readable option
14
+ // so bellow are the patterns for individual Demokit sections
15
+ aDemokitPaths = [
16
+ /^\/controls/,
17
+ /^\/group/,
18
+ /^\/entity/,
19
+ /^\/sample/,
20
+ /^\/downloads/,
21
+ /^\/api/,
22
+ /^\/topic/,
23
+ /^\/liveEditor/,
24
+ /^\/sitemap\//,
25
+ /\/sitemap$/,
26
+ /^\/demoapps/,
27
+ /^\/tools/,
28
+ /^\/news\//,
29
+ /\/news$/,
30
+ /^\/search\//,
31
+ /^\/license[.]txt/,
32
+ /^\/docs\/guide/,
33
+ /^\/docs\/api\/symbols/
34
+ ];
35
+
36
+ function pathMatchesDemokitRoute (path) {
37
+ return aDemokitPaths.some(function(regexp) {
38
+ return regexp.test(path);
39
+ });
40
+ }
41
+
42
+ return {
43
+ parseVersion: function(sUrl) {
44
+ var oURI = new URI(sUrl),
45
+ aSegments = oURI.segment(),
46
+ sVersion;
47
+
48
+ for (var i = 0, l = aSegments.length; i < l; i++) {
49
+ if (reVersion.test(aSegments[i])) {
50
+ sVersion = aSegments[i];
51
+ break;
52
+ }
53
+ if (pathMatchesDemokitRoute("/" + aSegments[i] + "/")) {
54
+ break; // version not found
55
+ }
56
+ }
57
+ return sVersion;
58
+ },
59
+
60
+ removeVersion: function(sUrl) {
61
+ var oURI = new URI(sUrl),
62
+ sPath = oURI.path(),
63
+ sVersion = this.parseVersion(sUrl);
64
+
65
+ // remove the version string from <code>sPath</code>
66
+ if (sVersion) {
67
+ sPath = sPath.substring(sPath.indexOf(sVersion) + sVersion.length);
68
+ oURI.path(sPath);
69
+ return oURI.href();
70
+ }
71
+ return sUrl;
72
+ },
73
+
74
+ requestsDemokitView: function(sUrl) {
75
+ if (this.hasSEOOptimizedFormat(sUrl)) {
76
+ return true;
77
+ }
78
+
79
+ return pathMatchesDemokitRoute(new URI(sUrl).fragment());
80
+ },
81
+
82
+ hasSEOOptimizedFormat: function(sUrl) {
83
+ var sPath = new URI(sUrl).path();
84
+
85
+ if (pathMatchesDemokitRoute(sPath)) {
86
+ return true;
87
+ }
88
+
89
+ sUrl = this.removeVersion(sUrl);
90
+ sPath = new URI(sUrl).path();
91
+ return pathMatchesDemokitRoute(sPath);
92
+ },
93
+
94
+ convertToNonSEOFormat: function(sUrl) {
95
+ var oURI = new URI(sUrl),
96
+ sViewPath = new URI(this.removeVersion(sUrl)).path(),
97
+ sFragment = oURI.fragment(),
98
+ sNewPath,
99
+ sNewFragment;
100
+
101
+ // move the <code>sViewPath</code> from the URL path into the URL fragment:
102
+ sNewPath = oURI.path().replace(sViewPath, "/");
103
+ sNewFragment = sViewPath;
104
+
105
+ if (sFragment) {
106
+ // preserve any existing fragment part by appending at the end
107
+ sNewFragment += encodeURIComponent("#") + sFragment;
108
+ }
109
+
110
+ oURI.path(sNewPath);
111
+ oURI.fragment(sNewFragment);
112
+
113
+ return oURI.href();
114
+ }
115
+ };
116
+
117
+ });
@@ -219,8 +219,10 @@ html:not(.sapUiMedia-StdExt-Phone) .sapUiDocumentationFooter {
219
219
  height: 3rem;
220
220
  }
221
221
 
222
- .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect,
223
- .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltArrow {
222
+ .sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect,
223
+ .sapUiTheme-sap_fiori_3_dark .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect,
224
+ .sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltArrow,
225
+ .sapUiTheme-sap_fiori_3_dark .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltArrow {
224
226
  border:none;
225
227
  background: #2f3c48;
226
228
  }
@@ -246,8 +248,10 @@ html:not(.sapUiMedia-StdExt-Phone) .sapUiDocumentationFooter {
246
248
  }
247
249
 
248
250
  /* Menu Select`s hover bakground */
249
- .sapContrast.sapUiDocumentationSelect.sapMSltHoverable:not(.sapMSltState):not(.sapMSltIconOnly):hover,
250
- .sapContrast .sapUiDocumentationSelect.sapMSltHoverable:not(.sapMSltState):not(.sapMSltIconOnly):hover {
251
+ .sapUiTheme-sap_fiori_3 .sapContrast.sapUiDocumentationSelect.sapMSltHoverable:not(.sapMSltState):not(.sapMSltIconOnly):hover,
252
+ .sapUiTheme-sap_fiori_3_dark .sapContrast.sapUiDocumentationSelect.sapMSltHoverable:not(.sapMSltState):not(.sapMSltIconOnly):hover,
253
+ .sapUiTheme-sap_fiori_3 .sapContrast .sapUiDocumentationSelect.sapMSltHoverable:not(.sapMSltState):not(.sapMSltIconOnly):hover,
254
+ .sapUiTheme-sap_fiori_3_dark .sapContrast .sapUiDocumentationSelect.sapMSltHoverable:not(.sapMSltState):not(.sapMSltIconOnly):hover {
251
255
  background: #2f3c48;
252
256
  }
253
257
 
@@ -275,7 +279,8 @@ html.sap-desktop .sapContrast.sapMSlt.sapUiDocumentationSelect:not(.sapMSltExpan
275
279
  }
276
280
 
277
281
  /* Menu Select`s label */
278
- .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltLabel {
282
+ .sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltLabel,
283
+ .sapUiTheme-sap_fiori_3_dark .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltLabel {
279
284
  color: #91c8f6;
280
285
  font-size: 1rem;
281
286
  border-bottom: 0.1625rem solid;
@@ -290,7 +295,8 @@ html.sap-desktop .sapContrast.sapMSlt.sapUiDocumentationSelect:not(.sapMSltExpan
290
295
  }
291
296
 
292
297
  /* Menu Select`s arrow color on press */
293
- .sapTntToolHeader .sapMSlt.sapMSltPressed > .sapMSltArrow::before {
298
+ :not(.sapUiTheme-sap_fiori_3) .sapTntToolHeader .sapMSlt.sapMSltPressed > .sapMSltArrow::before,
299
+ :not(.sapUiTheme-sap_fiori_3_dark) .sapTntToolHeader .sapMSlt.sapMSltPressed > .sapMSltArrow::before {
294
300
  color: #cae4fb;
295
301
  }
296
302
 
@@ -981,11 +987,13 @@ html.sapUiTheme-sap_belize_hcw .sapUiJSD a {
981
987
  color: #000000;
982
988
  }
983
989
 
984
- html:not(.sapUiTheme-sap_belize_hcb):not(.sapUiTheme-sap_belize_hcw):not(.sapUiTheme-sap_fiori_3_hcb):not(.sapUiTheme-sap_fiori_3_hcw) .sapUiJSD a {
990
+ html:not(.sapUiTheme-sap_belize_hcb):not(.sapUiTheme-sap_belize_hcw):not(.sapUiTheme-sap_fiori_3_hcb):not(.sapUiTheme-sap_fiori_3_hcw)
991
+ .sapUiJSD a {
985
992
  color: #0070b1;
986
993
  }
987
994
 
988
- html:not(.sapUiTheme-sap_belize_hcb):not(.sapUiTheme-sap_belize_hcw):not(.sapUiTheme-sap_fiori_3_hcb):not(.sapUiTheme-sap_fiori_3_hcw) .sapUiJSD a,
995
+ html:not(.sapUiTheme-sap_belize_hcb):not(.sapUiTheme-sap_belize_hcw):not(.sapUiTheme-sap_fiori_3_hcb):not(.sapUiTheme-sap_fiori_3_hcw):not(.sapUiTheme-sap_horizon):not(.sapUiTheme-sap_horizon_dark)
996
+ .sapUiJSD a,
989
997
  html.sapUiTheme-sap_fiori_3_hcb .sapUiJSD a:hover,
990
998
  html.sapUiTheme-sap_fiori_3_hcw .sapUiJSD a:hover,
991
999
  html.sapUiTheme-sap_belize_hcb .sapUiJSD a:hover,
@@ -1800,11 +1808,6 @@ html[dir="rtl"] .sapUiDemoKitTreeItemIcon {
1800
1808
  background: #ffffff;
1801
1809
  }
1802
1810
 
1803
- .sapUiTheme-sap_fiori_3 .sapUiDemokit .sapUiHomePage .sapMTitleStyleH1,
1804
- .sapUiTheme-sap_fiori_3 .sapUiDemokit .sapUiDemoApps .sapMTitleStyleH1 {
1805
- font-size: 1.625rem;
1806
- }
1807
-
1808
1811
  .sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect,
1809
1812
  .sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect:hover,
1810
1813
  .sapUiTheme-sap_fiori_3 .sapTntToolHeader .sapMSlt.menuSelect.sapUiDocumentationSelect .sapMSltArrow,
@@ -1839,4 +1842,10 @@ html[dir="rtl"] .sapUiDemoKitTreeItemIcon {
1839
1842
  .sapUiForcedHidden .editorSrcWindow {
1840
1843
  width: 0;
1841
1844
  height: 0;
1845
+ }
1846
+
1847
+ /* override default 3rem on desktop */
1848
+ .sapUiDemokit .sapUiHomePage .sapMTitleStyleH1,
1849
+ .sapUiDemokit .sapUiDemoApps .sapMTitleStyleH1 {
1850
+ font-size: 1.625rem;
1842
1851
  }
@@ -177,13 +177,32 @@
177
177
 
178
178
  var oContainer = new ComponentContainer({component : oComponent, height: "100%"})
179
179
  .placeAt("content");
180
+ var oConfig = oComponent.getMetadata().getConfig();
181
+ var bOpenStandalone = new URLSearchParams(window.location.search).has("dk-sample-standalone");
182
+
183
+ // if dk-sample-standalone is used,
184
+ // display message for samples with own index.html
185
+ if (bOpenStandalone && oConfig.sample && oConfig.sample.iframe) {
186
+ sap.ui.require([
187
+ "sap/m/IllustratedMessage",
188
+ "sap/m/IllustratedMessageType"
189
+ ], function (IllustratedMessage, IllustratedMessageType) {
190
+ oContainer.destroy();
191
+ new IllustratedMessage({
192
+ title: "Sample unsupported",
193
+ description: "Samples with own index.html are currently unsupported by dk-sample-standalone.",
194
+ illustrationType: IllustratedMessageType.PageNotFound
195
+ }).placeAt("content");
196
+ });
197
+ }
198
+
180
199
  var oMessage = {};
181
200
  var objRta = null;
182
201
  oMessage.type = "INIT";
183
202
  oMessage.data = {
184
203
  "msg": "fired after component container is placed in DOM"
185
204
  };
186
- oMessage.config = oComponent.getMetadata().getConfig();
205
+ oMessage.config = oConfig;
187
206
  window.parent.postMessage(oMessage, getUrlParam('sap-ui-xx-dk-origin'));
188
207
 
189
208
  window.addEventListener("message", function(eMessage){