@openui5/sap.ui.documentation 1.103.0 → 1.105.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 (50) hide show
  1. package/.reuse/dep5 +18 -1
  2. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
  3. package/THIRDPARTY.txt +36 -3
  4. package/package.json +6 -6
  5. package/src/sap/ui/documentation/.library +6 -6
  6. package/src/sap/ui/documentation/library.js +2 -2
  7. package/src/sap/ui/documentation/sdk/Component.js +9 -11
  8. package/src/sap/ui/documentation/sdk/controller/App.controller.js +9 -5
  9. package/src/sap/ui/documentation/sdk/controller/Code.controller.js +1 -1
  10. package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +2 -2
  11. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +53 -21
  12. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +20 -1
  13. package/src/sap/ui/documentation/sdk/controller/VersionNotFound.controller.js +19 -12
  14. package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +2 -3
  15. package/src/sap/ui/documentation/sdk/controller/util/DataTable.js +9 -4
  16. package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +7 -3
  17. package/src/sap/ui/documentation/sdk/controller/util/URLUtil.js +121 -0
  18. package/src/sap/ui/documentation/sdk/css/style.css +56 -33
  19. package/src/sap/ui/documentation/sdk/images/tools/AccessibilityGuide.png +0 -0
  20. package/src/sap/ui/documentation/sdk/index.html +20 -1
  21. package/src/sap/ui/documentation/sdk/manifest.json +5 -0
  22. package/src/sap/ui/documentation/sdk/model/formatter.js +26 -1
  23. package/src/sap/ui/documentation/sdk/model/libraryData.js +13 -2
  24. package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/styles.css +47 -1
  25. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +7 -0
  26. package/src/sap/ui/documentation/sdk/view/ApiDetailInitial.view.xml +13 -13
  27. package/src/sap/ui/documentation/sdk/view/Controls.view.xml +19 -19
  28. package/src/sap/ui/documentation/sdk/view/Entity.view.xml +2 -2
  29. package/src/sap/ui/documentation/sdk/view/SubApiDetail.view.xml +30 -7
  30. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +12 -3
  31. package/src/sap/ui/documentation/sdk/view/TopicDetailInitial.view.xml +12 -12
  32. package/src/sap/ui/documentation/sdk/view/VisibilityInformation.fragment.xml +12 -0
  33. package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +26 -26
  34. package/src/sap/ui/documentation/sdk/view/appSettingsDialog.fragment.xml +6 -4
  35. package/src/sap/ui/documentation/themes/base/DemokitTreeItem.less +5 -9
  36. package/src/sap/ui/documentation/themes/base/LightTable.less +49 -40
  37. package/src/sap/ui/documentation/themes/base/ObjectPageSubSection.less +16 -0
  38. package/src/sap/ui/documentation/themes/base/Search.less +1 -0
  39. package/src/sap/ui/documentation/themes/base/library.source.less +1 -0
  40. package/src/sap/ui/documentation/themes/sap_horizon/Link.less +3 -0
  41. package/src/sap/ui/documentation/themes/sap_horizon/Panel.less +3 -0
  42. package/src/sap/ui/documentation/themes/sap_horizon/Search.less +3 -0
  43. package/src/sap/ui/documentation/themes/sap_horizon/SplitButton.less +5 -0
  44. package/src/sap/ui/documentation/themes/sap_horizon/library.source.less +6 -1
  45. package/src/sap/ui/documentation/themes/sap_horizon_dark/Documentation.less +17 -0
  46. package/src/sap/ui/documentation/themes/sap_horizon_dark/Link.less +3 -0
  47. package/src/sap/ui/documentation/themes/sap_horizon_dark/Panel.less +3 -0
  48. package/src/sap/ui/documentation/themes/sap_horizon_dark/Search.less +3 -0
  49. package/src/sap/ui/documentation/themes/sap_horizon_dark/SplitButton.less +5 -0
  50. package/src/sap/ui/documentation/themes/sap_horizon_dark/library.source.less +7 -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
@@ -154,7 +159,7 @@ Copyright:
154
159
  License: Apache-2.0 and MIT
155
160
  Comment: these files contain content from SAP and jQuery.rtl-scroll-type: _FeatureDetection.js is overall written by SAP, but contains code which is inspired by jQuery.rtl-scroll-type
156
161
 
157
- Files: src/sap.ui.core/src/sap/ui/thirdparty/qunit-composite*
162
+ Files: src/sap.ui.core/src/sap/ui/thirdparty/qunit-composite.*
158
163
  Copyright: jQuery Foundation and other contributors
159
164
  License: MIT
160
165
  Comment: these files belong to: QUnit Composite
@@ -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
@@ -98,7 +104,7 @@ Component: QUnit Composite, version: 1.0.2-pre
98
104
  Copyright: jQuery Foundation and other contributors
99
105
  License: MIT
100
106
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
101
- Contained in: src/sap.ui.core/src/sap/ui/thirdparty/qunit-composite*
107
+ Contained in: src/sap.ui.core/src/sap/ui/thirdparty/qunit-composite.*
102
108
 
103
109
  Component: JUnit Reporter for QUnit, version: 1.1.1
104
110
  Copyright: jQuery Foundation and other contributors
@@ -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.0",
3
+ "version": "1.105.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.0",
18
- "@openui5/sap.ui.core": "1.103.0",
19
- "@openui5/sap.ui.layout": "1.103.0",
20
- "@openui5/themelib_sap_belize": "1.103.0",
21
- "@openui5/themelib_sap_fiori_3": "1.103.0"
17
+ "@openui5/sap.m": "1.105.0",
18
+ "@openui5/sap.ui.core": "1.105.0",
19
+ "@openui5/sap.ui.layout": "1.105.0",
20
+ "@openui5/themelib_sap_belize": "1.105.0",
21
+ "@openui5/themelib_sap_fiori_3": "1.105.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.0</version>
9
+ <version>1.105.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library for the Demokit 2.0.</documentation>
12
12
 
@@ -47,27 +47,27 @@
47
47
  </packaging>
48
48
  <!-- Thirdparty references -->
49
49
  <thirdparty xmlns="http://www.sap.com/ui5/buildext/thirdparty" >
50
- <lib name="esprima" displayName="Esprima" version="1.2.2" homepage="http://esprima.org">
50
+ <lib name="esprima" displayName="Esprima" version="1.2.2" homepage="http://esprima.org" id="73554900106100003281">
51
51
  <license url="http://esprima.org/doc/index.html#license" type="BSD-2-Clause" />
52
52
  <copyright>2013 Ariya Hidayat and other contributors</copyright>
53
53
  <pattern>sap/ui/documentation/sdk/thirdparty/esprima.js</pattern>
54
54
  </lib>
55
- <lib name="highlight.js" displayName="highlight.js" version="10.4.1" homepage="https://highlightjs.org/">
55
+ <lib name="highlight.js" displayName="highlight.js" version="10.4.1" homepage="https://highlightjs.org/" id="73555000106100051976">
56
56
  <license url="https://github.com/highlightjs/highlight.js/blob/10.4.1/LICENSE" type="BSD-3-Clause" />
57
57
  <copyright>2006-2020, Ivan Sagalaev</copyright>
58
58
  <pattern>sap/ui/documentation/sdk/thirdparty/highlight.js/*</pattern>
59
59
  </lib>
60
- <lib name="elasticlunr" displayName="Elasticlunr" version="0.9.5" homepage="http://elasticlunr.com/">
60
+ <lib name="elasticlunr" displayName="Elasticlunr" version="0.9.5" homepage="http://elasticlunr.com/" id="73554900106100021592">
61
61
  <license url="https://github.com/weixsong/elasticlunr.js/blob/v0.9.5/LICENSE" type="MIT" />
62
62
  <copyright>2017 Wei Song and Oliver Nightingale</copyright>
63
63
  <pattern>sap/ui/documentation/sdk/thirdparty/elasticlunr.js</pattern>
64
64
  </lib>
65
- <lib name="datatables" displayName="DataTables" version="1.10.15" homepage="https://datatables.net/">
65
+ <lib name="datatables" displayName="DataTables" version="1.10.15" homepage="https://datatables.net/" id="73555000106100009470">
66
66
  <license url="https://datatables.net/license/" type="MIT" />
67
67
  <copyright>2008-2017 SpryMedia Ltd</copyright>
68
68
  <pattern>sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-1.10.15/*</pattern>
69
69
  </lib>
70
- <lib name="datatables-buttons" displayName="Buttons extension for DataTables" version="1.4.0" homepage="https://datatables.net/extensions/buttons/">
70
+ <lib name="datatables-buttons" displayName="Buttons extension for DataTables" version="1.4.0" homepage="https://datatables.net/extensions/buttons/" id="73555000106100007649">
71
71
  <license url="https://datatables.net/license/" type="MIT" />
72
72
  <copyright>2016 SpryMedia Ltd</copyright>
73
73
  <pattern>sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/*</pattern>
@@ -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.0
28
+ * @version 1.105.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.0',
34
+ version: '1.105.0',
35
35
  dependencies : ['sap.ui.core','sap.m'],
36
36
  types: [],
37
37
  interfaces: [],
@@ -76,18 +76,14 @@ sap.ui.define([
76
76
  getCookiesManagement: function() {
77
77
  var sId = "sap.ui.documentation.sdk.cookieSettingsDialog";
78
78
 
79
- if (!this._oCookiesComponent) {
80
- this._oCookiesComponent = this.runAsOwner(function() {
81
- this._oCookiesComponent = sap.ui.getCore().createComponent({
82
- id: 'cookiesComp-' + sId,
83
- name: sId
84
- });
85
-
86
- return this._oCookiesComponent;
87
- }.bind(this));
79
+ if (!this._pCookiesComponent) {
80
+ this._pCookiesComponent = this.createComponent({
81
+ usage: "cookieSettingsDialog",
82
+ id: 'cookiesComp-' + sId
83
+ });
88
84
  }
89
85
 
90
- return this._oCookiesComponent;
86
+ return this._pCookiesComponent;
91
87
  },
92
88
 
93
89
  /**
@@ -100,7 +96,9 @@ sap.ui.define([
100
96
  this._oErrorHandler.destroy();
101
97
  this._oConfigUtil.destroy();
102
98
  this._oConfigUtil = null;
103
- this._oCookiesComponent && this._oCookiesComponent.destroy();
99
+ this._pCookiesComponent && this._pCookiesComponent.then(function(oCookiesMgmtComponent) {
100
+ oCookiesMgmtComponent.destroy();
101
+ });
104
102
  // call the base component's destroy function
105
103
  UIComponent.prototype.destroy.apply(this, arguments);
106
104
  },
@@ -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,
@@ -266,7 +266,9 @@ sap.ui.define([
266
266
  }
267
267
  }.bind(this));
268
268
 
269
- oComponent.getCookiesManagement().enable(oComponent.getRootControl());
269
+ oComponent.getCookiesManagement().then(function(oCookieMgmtComponent) {
270
+ oCookieMgmtComponent.enable(oComponent.getRootControl());
271
+ });
270
272
 
271
273
  },
272
274
 
@@ -464,7 +466,9 @@ sap.ui.define([
464
466
  } else if (sTargetText === CHANGE_SETTINGS_TEXT) {
465
467
  this.settingsDialogOpen();
466
468
  } else if (sTargetText === CHANGE_COOKIE_PREFERENCES_TEXT) {
467
- this.getOwnerComponent().getCookiesManagement().cookieSettingsDialogOpen({ showCookieDetails: true }, this.getView());
469
+ this.getOwnerComponent().getCookiesManagement().then(function(oCookieMgmtComponent) {
470
+ oCookieMgmtComponent.cookieSettingsDialogOpen({ showCookieDetails: true }, this.getView());
471
+ }.bind(this));
468
472
  } else if (sTargetText === CHANGE_VERSION_TEXT) {
469
473
  this.onChangeVersionButtonPress();
470
474
  } else if (DEMOKIT_APPEARANCE[sTargetText]) {
@@ -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();
@@ -6,6 +6,7 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/ui/thirdparty/jquery",
9
+ "sap/ui/core/Fragment",
9
10
  "sap/ui/documentation/sdk/controller/BaseController",
10
11
  "sap/ui/documentation/sdk/util/ToggleFullScreenHandler",
11
12
  "sap/ui/documentation/sdk/model/formatter",
@@ -23,7 +24,7 @@ sap.ui.define([
23
24
  "sap/m/List",
24
25
  "sap/ui/dom/includeStylesheet",
25
26
  "sap/ui/dom/includeScript"
26
- ], function (jQuery, BaseController, ToggleFullScreenHandler,
27
+ ], function (jQuery, Fragment, BaseController, ToggleFullScreenHandler,
27
28
  formatter, Image, Label, Link, Text, HBox, ObjectAttribute, ObjectStatus, Popover,
28
29
  library, coreLibrary, CustomListItem, List, includeStylesheet, includeScript) {
29
30
  "use strict";
@@ -253,6 +254,24 @@ sap.ui.define([
253
254
  }
254
255
  },
255
256
 
257
+ onVisibilityInformationClick: function (oEvent) {
258
+ var oIcon = oEvent.getSource(),
259
+ oView = this.getView();
260
+
261
+ if (!this._oPopover) {
262
+ this._oPopover = Fragment.load({
263
+ name: "sap.ui.documentation.sdk.view.VisibilityInformation",
264
+ controller: this
265
+ }).then(function(oPopover) {
266
+ oView.addDependent(oPopover);
267
+ return oPopover;
268
+ });
269
+ }
270
+ this._oPopover.then(function(oPopover) {
271
+ oPopover.openBy(oIcon);
272
+ });
273
+ },
274
+
256
275
  /* =========================================================== */
257
276
  /* begin: internal methods aa*/
258
277
  /* =========================================================== */
@@ -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
@@ -7,9 +7,8 @@
7
7
  /* Utility class that facilitates route configuration handling */
8
8
  sap.ui.define([
9
9
  "sap/ui/base/Object",
10
- "sap/base/strings/capitalize",
11
- "sap/base/util/merge"
12
- ], function (BaseObject, capitalize, merge) {
10
+ "sap/base/strings/capitalize"
11
+ ], function (BaseObject, capitalize) {
13
12
  "use strict";
14
13
 
15
14
  return BaseObject.extend("sap.ui.documentation.sdk.controller.util.ConfigUtil", {
@@ -373,14 +373,19 @@ sap.ui.define([
373
373
  oOption = null;
374
374
  }
375
375
 
376
- if (oOption && oOption.length > 0) {
376
+ if (oOption && oOption.is("p")) {
377
+ var sText = oOption.text();
378
+ if (aOptions.indexOf(sText) < 0) {
379
+ aOptions.push(sText);
380
+ }
381
+ } else if (oOption && oOption.length > 0) {
377
382
  oOption.find('li').each(function (i, sOption) {
378
383
  if (aOptions.indexOf(sOption.textContent) < 0) {
379
384
  aOptions.push(sOption.textContent);
380
385
  }
381
386
  });
382
387
  } else {
383
- aOptions.push(sOption);
388
+ sOption && aOptions.push(sOption);
384
389
  }
385
390
 
386
391
  });
@@ -398,7 +403,7 @@ sap.ui.define([
398
403
  that.API = this.api();
399
404
 
400
405
  // Create new table row to append filters
401
- var oTableHeader = $('#' + sId + ' thead'),
406
+ var oTableHeader = $('#' + sId + ' > thead'),
402
407
  oNewTableRow = $('<tr/>'),
403
408
  oFilterHeader,
404
409
  oHighlighter,
@@ -449,7 +454,7 @@ sap.ui.define([
449
454
  control: oFilter.control
450
455
  });
451
456
  });
452
- oFilter.control.placeAt(oFilterHeader);
457
+ oFilter.control.placeAt(oFilterHeader[0]);
453
458
  }
454
459
 
455
460
  oNewTableRow.append(oFilterHeader);
@@ -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