@openui5/sap.ui.documentation 1.94.0 → 1.97.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 (98) hide show
  1. package/.reuse/dep5 +12 -12
  2. package/THIRDPARTY.txt +21 -17
  3. package/package.json +6 -6
  4. package/src/sap/ui/documentation/.library +1 -6
  5. package/src/sap/ui/documentation/library.js +2 -2
  6. package/src/sap/ui/documentation/messagebundle.properties +39 -4
  7. package/src/sap/ui/documentation/messagebundle_ar.properties +23 -4
  8. package/src/sap/ui/documentation/messagebundle_bg.properties +23 -4
  9. package/src/sap/ui/documentation/messagebundle_ca.properties +21 -2
  10. package/src/sap/ui/documentation/messagebundle_cs.properties +21 -2
  11. package/src/sap/ui/documentation/messagebundle_cy.properties +23 -4
  12. package/src/sap/ui/documentation/messagebundle_da.properties +21 -2
  13. package/src/sap/ui/documentation/messagebundle_de.properties +21 -2
  14. package/src/sap/ui/documentation/messagebundle_el.properties +21 -2
  15. package/src/sap/ui/documentation/messagebundle_en.properties +21 -2
  16. package/src/sap/ui/documentation/messagebundle_en_GB.properties +21 -2
  17. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +23 -3
  18. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +23 -3
  19. package/src/sap/ui/documentation/messagebundle_es.properties +21 -2
  20. package/src/sap/ui/documentation/messagebundle_es_MX.properties +21 -2
  21. package/src/sap/ui/documentation/messagebundle_et.properties +21 -2
  22. package/src/sap/ui/documentation/messagebundle_fi.properties +23 -4
  23. package/src/sap/ui/documentation/messagebundle_fr.properties +23 -4
  24. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +24 -5
  25. package/src/sap/ui/documentation/messagebundle_hi.properties +23 -4
  26. package/src/sap/ui/documentation/messagebundle_hr.properties +23 -4
  27. package/src/sap/ui/documentation/messagebundle_hu.properties +23 -4
  28. package/src/sap/ui/documentation/messagebundle_id.properties +22 -3
  29. package/src/sap/ui/documentation/messagebundle_it.properties +23 -4
  30. package/src/sap/ui/documentation/messagebundle_iw.properties +21 -2
  31. package/src/sap/ui/documentation/messagebundle_ja.properties +21 -2
  32. package/src/sap/ui/documentation/messagebundle_kk.properties +23 -4
  33. package/src/sap/ui/documentation/messagebundle_ko.properties +21 -2
  34. package/src/sap/ui/documentation/messagebundle_lt.properties +21 -2
  35. package/src/sap/ui/documentation/messagebundle_lv.properties +23 -4
  36. package/src/sap/ui/documentation/messagebundle_ms.properties +21 -2
  37. package/src/sap/ui/documentation/messagebundle_nl.properties +21 -2
  38. package/src/sap/ui/documentation/messagebundle_no.properties +23 -4
  39. package/src/sap/ui/documentation/messagebundle_pl.properties +21 -2
  40. package/src/sap/ui/documentation/messagebundle_pt.properties +23 -4
  41. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +23 -4
  42. package/src/sap/ui/documentation/messagebundle_ro.properties +23 -4
  43. package/src/sap/ui/documentation/messagebundle_ru.properties +23 -4
  44. package/src/sap/ui/documentation/messagebundle_sh.properties +23 -4
  45. package/src/sap/ui/documentation/messagebundle_sk.properties +21 -2
  46. package/src/sap/ui/documentation/messagebundle_sl.properties +23 -4
  47. package/src/sap/ui/documentation/messagebundle_sv.properties +21 -2
  48. package/src/sap/ui/documentation/messagebundle_th.properties +21 -2
  49. package/src/sap/ui/documentation/messagebundle_tr.properties +21 -2
  50. package/src/sap/ui/documentation/messagebundle_uk.properties +34 -15
  51. package/src/sap/ui/documentation/messagebundle_vi.properties +23 -4
  52. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +23 -4
  53. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +23 -4
  54. package/src/sap/ui/documentation/sdk/Component.js +3 -2
  55. package/src/sap/ui/documentation/sdk/controller/ApiDetailIndexDeprecatedExperimental.controller.js +1 -38
  56. package/src/sap/ui/documentation/sdk/controller/App.controller.js +99 -16
  57. package/src/sap/ui/documentation/sdk/controller/News.controller.js +77 -0
  58. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +28 -30
  59. package/src/sap/ui/documentation/sdk/controller/SampleBaseController.js +6 -4
  60. package/src/sap/ui/documentation/sdk/controller/SampleNotFound.controller.js +14 -0
  61. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +1 -1
  62. package/src/sap/ui/documentation/sdk/controller/TopicDetail.controller.js +1 -1
  63. package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +16 -0
  64. package/src/sap/ui/documentation/sdk/controller/util/NewsInfo.js +188 -0
  65. package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +7 -1
  66. package/src/sap/ui/documentation/sdk/css/style.css +31 -5
  67. package/src/sap/ui/documentation/sdk/images/tools/FlexibleProgrammingModelExplorer.jpg +0 -0
  68. package/src/sap/ui/documentation/sdk/index.html +55 -0
  69. package/src/sap/ui/documentation/sdk/manifest.json +23 -0
  70. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +20 -12
  71. package/src/sap/ui/documentation/sdk/util/Resources.js +12 -7
  72. package/src/sap/ui/documentation/sdk/view/App.view.xml +27 -1
  73. package/src/sap/ui/documentation/sdk/view/ChangeVersionDialog.fragment.xml +16 -7
  74. package/src/sap/ui/documentation/sdk/view/News.view.xml +68 -0
  75. package/src/sap/ui/documentation/sdk/view/NewsPopover.fragment.xml +51 -0
  76. package/src/sap/ui/documentation/sdk/view/ReleaseDialog.fragment.xml +1 -1
  77. package/src/sap/ui/documentation/sdk/view/SampleNotFound.view.xml +17 -0
  78. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +25 -27
  79. package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +40 -6
  80. package/src/sap/ui/documentation/themes/base/Documentation.less +8 -13
  81. package/src/sap/ui/documentation/themes/sap_belize/library.source.less +3 -1
  82. package/src/sap/ui/documentation/themes/sap_belize_hcb/library.source.less +3 -1
  83. package/src/sap/ui/documentation/themes/sap_belize_hcw/library.source.less +3 -1
  84. package/src/sap/ui/documentation/themes/sap_belize_plus/library.source.less +3 -1
  85. package/src/sap/ui/documentation/themes/sap_fiori_3/library.source.less +3 -10
  86. package/src/sap/ui/documentation/themes/sap_fiori_3_dark/library.source.less +4 -11
  87. package/src/sap/ui/documentation/themes/sap_fiori_3_hcb/library.source.less +3 -1
  88. package/src/sap/ui/documentation/themes/sap_fiori_3_hcw/library.source.less +3 -1
  89. package/src/sap/ui/documentation/themes/sap_horizon/library.source.less +9 -0
  90. package/ui5.yaml +8 -2
  91. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-css.js +0 -160
  92. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-feature.js +0 -33
  93. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-properties.js +0 -22
  94. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/lang-text.js +0 -11
  95. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/prettify.css +0 -232
  96. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/prettify.js +0 -1740
  97. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/run-prettify.js +0 -27
  98. package/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/run_prettify.js +0 -34
@@ -4,12 +4,11 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- /* global URLSearchParams */
8
-
9
7
  sap.ui.define([
10
8
  "sap/ui/events/KeyCodes",
11
9
  "sap/ui/thirdparty/jquery",
12
10
  "sap/ui/documentation/sdk/controller/BaseController",
11
+ "sap/ui/documentation/sdk/controller/util/NewsInfo",
13
12
  "sap/ui/documentation/sdk/controller/util/SearchUtil",
14
13
  "sap/ui/core/mvc/Controller",
15
14
  "sap/ui/model/Filter",
@@ -38,6 +37,7 @@ sap.ui.define([
38
37
  KeyCodes,
39
38
  jQuery,
40
39
  BaseController,
40
+ NewsInfo,
41
41
  SearchUtil,
42
42
  Controller,
43
43
  Filter,
@@ -78,18 +78,17 @@ sap.ui.define([
78
78
  home: MAIN_WEB_PAGE_TITLE
79
79
  };
80
80
 
81
- function returnResourcePath(sParam) {
81
+ function getResourcePath(sResource) {
82
82
 
83
- return bUseUnifiedResourceOrigin && !self['sap-ui-documentation-config'] ?
84
- window.origin + sParam :
85
- ResourcesUtil.getResourceOriginPath(sParam);
83
+ return ResourcesUtil.getResourcesVersion() && !self['sap-ui-documentation-config'] ?
84
+ window.origin + sResource :
85
+ ResourcesUtil.getResourceOriginPath(sResource);
86
86
 
87
87
  }
88
88
  // shortcut for sap.m.URLHelper
89
- var bUseUnifiedResourceOrigin = new URLSearchParams(window.location.search).get('sap-ui-xx-unifiedResources') != null,
90
- URLHelper = mobileLibrary.URLHelper,
91
- sNeoAppJsonPath = returnResourcePath("/neo-app.json"), /* Load neo-app.json always from root URL */
92
- sVersionOverviewJsonPath = returnResourcePath("/versionoverview.json"), /* Load versionoverview.json always from root URL */
89
+ var URLHelper = mobileLibrary.URLHelper,
90
+ sNeoAppJsonPath = getResourcePath("/neo-app.json"), /* Load neo-app.json always from root URL */
91
+ sVersionOverviewJsonPath = getResourcePath("/versionoverview.json"), /* Load versionoverview.json always from root URL */
93
92
  ABOUT_TEXT = "about",
94
93
  FEEDBACK_TEXT = "feedback",
95
94
  FEEDBACK_URL = "https://demokit-feedback-proxy.cfapps.eu12.hana.ondemand.com/issue",
@@ -132,7 +131,8 @@ sap.ui.define([
132
131
  aResultArr.push({
133
132
  "groupTitle": sCurrGroupTitle,
134
133
  "version": sCurrGroupTitle + " (" + iCounter + " versions)",
135
- "nodes": aNodes
134
+ "nodes": aNodes,
135
+ "path": aNodes[0].path
136
136
  });
137
137
  }
138
138
 
@@ -197,6 +197,9 @@ sap.ui.define([
197
197
 
198
198
  }.bind(this));
199
199
 
200
+ this._oNewsModel = new JSONModel();
201
+ this.setModel(this._oNewsModel, "news");
202
+
200
203
  // Cache view reference
201
204
  this._oSupportedLangModel = new JSONModel();
202
205
 
@@ -216,6 +219,10 @@ sap.ui.define([
216
219
 
217
220
  this._oConfigUtil = this.getOwnerComponent().getConfigUtil();
218
221
  this._oCookieNames = this._oConfigUtil.COOKIE_NAMES;
222
+ this._sLocalStorageNewsName = this._oConfigUtil.LOCAL_STORAGE_NAMES['OLD_NEWS_IDS'];
223
+
224
+ NewsInfo.prepareNewsData(this._oConfigUtil);
225
+
219
226
  this._bSupportsPrefersColorScheme = !!(window.matchMedia &&
220
227
  (window.matchMedia('(prefers-color-scheme: dark)').matches ||
221
228
  window.matchMedia('(prefers-color-scheme: light)').matches));
@@ -235,6 +242,7 @@ sap.ui.define([
235
242
  }, this);
236
243
 
237
244
  this.bus = Core.getEventBus();
245
+ this.bus.subscribe("newsChanged", "onDemoKitNewsChanged", this._syncNewsModelWithNewsInfo, this);
238
246
 
239
247
  this._createConfigurationBasedOnURIInput();
240
248
 
@@ -291,6 +299,8 @@ sap.ui.define([
291
299
  jQuery(document.body).addClass(this.getOwnerComponent().getContentDensityClass());
292
300
 
293
301
  Device.orientation.attachHandler(this._onOrientationChange, this);
302
+
303
+ this._syncNewsModelWithNewsInfo();
294
304
  },
295
305
 
296
306
  onExit: function() {
@@ -382,6 +392,69 @@ sap.ui.define([
382
392
  }
383
393
  },
384
394
 
395
+ navigateToNews: function() {
396
+ this.getRouter().navTo("news");
397
+ },
398
+
399
+ handleNewsPress: function (oEvent) {
400
+ var oButton = oEvent.getSource(),
401
+ oView = this.getView();
402
+
403
+ if (this._oNewsModel.getProperty("/newsCount") === 0) {
404
+ this.navigateToNews();
405
+ } else if (!this._oNewsPopover) {
406
+ Fragment.load({
407
+ name: "sap.ui.documentation.sdk.view.NewsPopover",
408
+ controller: this
409
+ }).then(function(oPopover) {
410
+ oView.addDependent(oPopover);
411
+ this._oNewsPopover = oPopover;
412
+ this._oNewsPopover.openBy(oButton);
413
+ }.bind(this));
414
+ } else {
415
+ this._oNewsPopover.openBy(oButton);
416
+ }
417
+ },
418
+
419
+ handleShowAllPress: function () {
420
+ this._oNewsPopover.close();
421
+ this.navigateToNews();
422
+ },
423
+
424
+ handleDismissAllPress: function () {
425
+ NewsInfo.moveAllNewItemsToOld();
426
+ },
427
+
428
+ handleNewsItemClose: function (oEvent) {
429
+ var oItem = oEvent.getSource(),
430
+ iItemCustomId = oItem.getCustomData()[0].getValue(),
431
+ oItemInfoInItemsProperty = this._oNewsModel.getProperty("/items").find(function(oItem){
432
+ return oItem.id === iItemCustomId;
433
+ });
434
+
435
+ NewsInfo.moveNewItemToOld(oItemInfoInItemsProperty);
436
+ },
437
+
438
+ handleVisitNewsLink: function(oEvent) {
439
+ var oItem = oEvent.getSource(),
440
+ sItemLink = oItem.getCustomData()[0].getValue();
441
+
442
+ URLHelper.redirect(sItemLink, true);
443
+ },
444
+
445
+ _syncNewsModelWithNewsInfo: function() {
446
+ var aNewsInfoCopy,
447
+ sPreparationFailureMessage = NewsInfo.getPreparationFailureMessage();
448
+
449
+ if (!sPreparationFailureMessage) {
450
+ aNewsInfoCopy = NewsInfo.getNewNewsArray().slice();
451
+ this._oNewsModel.setProperty("/items", aNewsInfoCopy);
452
+ this._oNewsModel.setProperty("/newsCount", aNewsInfoCopy.length);
453
+ }
454
+
455
+ this._oNewsModel.setProperty("/newsPreparationFailureMessage", sPreparationFailureMessage);
456
+ },
457
+
385
458
  handleMenuItemClick: function (oEvent) {
386
459
  var sTargetText = oEvent.getParameter("item").getKey(),
387
460
  sTarget = this.MENU_LINKS_MAP[sTargetText];
@@ -1038,14 +1111,22 @@ sap.ui.define([
1038
1111
  this.oRouter.navTo("sitemap", {});
1039
1112
  },
1040
1113
 
1114
+ onLatestVersionItemPress: function() {
1115
+ if (ResourcesUtil.getResourcesVersion()) {
1116
+ window.sessionStorage.removeItem("versionPrefixPath");
1117
+ window.location.reload();
1118
+ } else {
1119
+ window.location.href = "/";
1120
+ }
1121
+ },
1122
+
1041
1123
  onVersionItemPress: function (oEvent) {
1042
- var oSelectedItem = oEvent.getParameter("listItem"),
1043
- oCustomData = oSelectedItem.getCustomData()[0],
1044
- bUseUnifiedResourceOrigin = new URLSearchParams(window.location.search).get('sap-ui-xx-unifiedResources') != null;
1124
+ var oSelectedItem = sap.ui.getCore().byId("versionList").getSelectedItem(),
1125
+ oCustomData = oSelectedItem.getCustomData()[0];
1045
1126
 
1046
1127
  if (oCustomData && oCustomData.getKey() === "path") {
1047
1128
 
1048
- if (bUseUnifiedResourceOrigin) {
1129
+ if (ResourcesUtil.getHasProxy()) {
1049
1130
  window.sessionStorage.setItem("versionPrefixPath", oCustomData.getValue());
1050
1131
  window.location.reload();
1051
1132
  } else {
@@ -1517,6 +1598,7 @@ sap.ui.define([
1517
1598
  this._aNeoAppVersions = aNeoAppVersions;
1518
1599
  // Make version select visible
1519
1600
  this._updateVersionSwitchVisibility();
1601
+ this.getModel("versionData").setProperty("/latestVersion", this._aNeoAppVersions[0].version);
1520
1602
  } else {
1521
1603
  Log.warning("No multi-version environment detected");
1522
1604
  }
@@ -1529,7 +1611,8 @@ sap.ui.define([
1529
1611
  },
1530
1612
 
1531
1613
  _getUI5Version: function () {
1532
- return this.getModel("versionData").getProperty("/version");
1614
+ return ResourcesUtil.getResourcesVersion() ?
1615
+ window.sessionStorage.getItem("versionPrefixPath") : this.getModel("versionData").getProperty("/version");
1533
1616
  },
1534
1617
 
1535
1618
  _getUI5VersionGav: function () {
@@ -0,0 +1,77 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/documentation/sdk/controller/BaseController",
9
+ 'sap/ui/model/json/JSONModel',
10
+ "sap/ui/documentation/sdk/controller/util/NewsInfo",
11
+ "sap/ui/core/Core",
12
+ "sap/m/library"
13
+ ],
14
+ function (BaseController, JSONModel, NewsInfo, Core, mobileLibrary) {
15
+ 'use strict';
16
+
17
+ return BaseController.extend('sap.ui.documentation.sdk.controller.News', {
18
+ onInit: function() {
19
+ this.getRouter().getRoute("news").attachPatternMatched(this._onMatched, this);
20
+
21
+ this._oModel = new JSONModel();
22
+ this.setModel(this._oModel);
23
+
24
+ NewsInfo.prepareNewsData(this.getOwnerComponent().getConfigUtil());
25
+
26
+ Core.getEventBus().subscribe("newsChanged", "onDemoKitNewsChanged", this._syncModelWithNewsInfo, this);
27
+ },
28
+
29
+ onAfterRendering: function() {
30
+ this._syncModelWithNewsInfo();
31
+ },
32
+
33
+ handleNewsItemClose: function (oEvent) {
34
+ var oItem = oEvent.getSource(),
35
+ iItemCustomId = oItem.getCustomData()[0].getValue(),
36
+ oItemInfoInItemsProperty = this._oModel.getProperty("/new").find(function(oItem){
37
+ return oItem.id === iItemCustomId;
38
+ });
39
+
40
+ NewsInfo.moveNewItemToOld(oItemInfoInItemsProperty);
41
+ },
42
+
43
+ handleMarkAsRead: function () {
44
+ NewsInfo.moveAllNewItemsToOld();
45
+ },
46
+
47
+ handleVisitLink: function(oEvent) {
48
+ var oItem = oEvent.getSource(),
49
+ sItemLink = oItem.getCustomData()[0].getValue();
50
+
51
+ mobileLibrary.URLHelper.redirect(sItemLink, true);
52
+ },
53
+
54
+ _syncModelWithNewsInfo: function() {
55
+ var sPreparationFailureMessage = NewsInfo.getPreparationFailureMessage();
56
+
57
+ if (!sPreparationFailureMessage) {
58
+ this._oModel.setProperty("/new", NewsInfo.getNewNewsArray().slice());
59
+ this._oModel.setProperty("/old", NewsInfo.getOldNewsArray().slice());
60
+ }
61
+ this._oModel.setProperty("/preparationFailureMessage", sPreparationFailureMessage);
62
+ },
63
+
64
+ /**
65
+ * Handles "demoapps" routing
66
+ * @function
67
+ * @private
68
+ */
69
+ _onMatched: function () {
70
+ try {
71
+ this.hideMasterSide();
72
+ } catch (e) {
73
+ // try-catch due to a bug in UI5 SplitApp, CL 1898264 should fix it
74
+ }
75
+ }
76
+ });
77
+ });
@@ -4,7 +4,6 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- /*global URLSearchParams*/
8
7
 
9
8
  sap.ui.define([
10
9
  "sap/ui/thirdparty/jquery",
@@ -56,11 +55,6 @@ sap.ui.define([
56
55
  rtaLoaded: false
57
56
  });
58
57
 
59
- this._sSampleVersion = window.sessionStorage.getItem("versionPrefixPath");
60
-
61
- this._sDefaultSampleTheme = (this._sSampleVersion && parseInt(this._sSampleVersion.slice(3,5)) < 68) ?
62
- "sap_belize" : sap.ui.getCore().getConfiguration().getTheme();
63
-
64
58
  this._sId = null; // Used to hold sample ID
65
59
  this._sEntityId = null; // Used to hold entity ID for the sample currently shown
66
60
 
@@ -72,8 +66,6 @@ sap.ui.define([
72
66
 
73
67
  this.getView().setModel(this.oModel);
74
68
 
75
- this.bUseUnifiedResourceOrigin = new URLSearchParams(window.location.search).get('sap-ui-xx-unifiedResources') != null;
76
-
77
69
  this.bus = sap.ui.getCore().getEventBus();
78
70
  this.setDefaultSampleTheme();
79
71
  this.bus.subscribe("themeChanged", "onDemoKitThemeChanged", this.onDemoKitThemeChanged, this);
@@ -153,7 +145,7 @@ sap.ui.define([
153
145
  var oSampleConfig = oConfig && oConfig.sample || {};
154
146
 
155
147
  // only have the option to run standalone if there is an iframe
156
- oModelData.showNewTab = !!oSampleConfig.iframe || this.bUseUnifiedResourceOrigin;
148
+ oModelData.showNewTab = !!oSampleConfig.iframe || ResourcesUtil.getHasProxy();
157
149
  oModelData.id = oSample.id;
158
150
  oModelData.name = oSample.name;
159
151
  oModelData.details = oSample.details;
@@ -177,7 +169,7 @@ sap.ui.define([
177
169
  }
178
170
  }
179
171
 
180
- if (oSampleConfig.iframe || this.bUseUnifiedResourceOrigin) {
172
+ if (oSampleConfig.iframe || ResourcesUtil.getHasProxy()) {
181
173
  oComponentContainer = this._createIframe(oComponentContainer, oSampleConfig.iframe);
182
174
  } else {
183
175
  this.sIFrameUrl = null;
@@ -185,7 +177,7 @@ sap.ui.define([
185
177
  }
186
178
 
187
179
  // Sets the current iframe URL or restores it to "undefined"
188
- oModelData.iframe = oSampleConfig.iframe || this.bUseUnifiedResourceOrigin;
180
+ oModelData.iframe = oSampleConfig.iframe || ResourcesUtil.getHasProxy();
189
181
 
190
182
  // handle stretch content
191
183
  var bStretch = !!oSampleConfig.stretch;
@@ -316,13 +308,13 @@ sap.ui.define([
316
308
 
317
309
  // combine namespace with the file name again
318
310
  this.sIFrameUrl = sap.ui.require.toUrl((sIframePath + "/" + sIframeWithoutUI5Ending).replace(/\./g, "/")) + sFileEnding || ".html";
319
- } else if (this.bUseUnifiedResourceOrigin) {
311
+ } else if (ResourcesUtil.getHasProxy()) {
320
312
  var sSamplePath = ResourcesUtil.getResourceOriginPath(sap.ui.require.toUrl(this._sId.replace(/\./g, "/"))),
321
313
  sSampleOrigin = (window['sap-ui-documentation-config'] && window['sap-ui-documentation-config'].demoKitResourceOrigin) || "",
322
- sSampleVersion = this._sSampleVersion || "";
314
+ sSampleVersion = ResourcesUtil.getResourcesVersion();
323
315
 
324
- this.sIFrameUrl = sap.ui.require.toUrl(
325
- "sap/ui/demo/mock/index.html") +
316
+ this.sIFrameUrl =
317
+ "resources/sap/ui/documentation/sdk/index.html" +
326
318
  "?sap-ui-xx-sample-id=" + sSampleId
327
319
  + "&&sap-ui-xx-sample-path=" + sSamplePath
328
320
  + "&&sap-ui-xx-sample-origin=" + sSampleOrigin
@@ -349,7 +341,7 @@ sap.ui.define([
349
341
  oSampleFrame.sap.ui.getCore().attachInit(function () {
350
342
  var bCompact = jQuery(document.body).hasClass("sapUiSizeCompact");
351
343
 
352
- oSampleFrameCore.applyTheme(this.bUseUnifiedResourceOrigin ? this._sDefaultSampleTheme : this._oCore.getConfiguration().getTheme());
344
+ oSampleFrameCore.applyTheme(ResourcesUtil.getHasProxy() ? this._sDefaultSampleTheme : this._oCore.getConfiguration().getTheme());
353
345
  oSampleFrameCore.getConfiguration().setRTL(this._oCore.getConfiguration().getRTL());
354
346
  oSampleFrame.jQuery('body')
355
347
  .toggleClass("sapUiSizeCompact", bCompact)
@@ -397,7 +389,8 @@ sap.ui.define([
397
389
  },
398
390
 
399
391
  setDefaultSampleTheme: function() {
400
- this._sDefaultSampleTheme = (this._sSampleVersion && parseInt(this._sSampleVersion.slice(3,5)) < 68) ?
392
+ var sSampleVersion = ResourcesUtil.getResourcesVersion();
393
+ this._sDefaultSampleTheme = sSampleVersion && parseInt(sSampleVersion.slice(3,5)) < 68 ?
401
394
  "sap_belize" : sap.ui.getCore().getConfiguration().getTheme();
402
395
  },
403
396
 
@@ -481,25 +474,30 @@ sap.ui.define([
481
474
 
482
475
  onToggleAdaptationMode : function (oEvt) {
483
476
  sap.ui.require([
484
- "sap/ui/rta/RuntimeAuthoring"
477
+ "sap/ui/rta/api/startKeyUserAdaptation"
485
478
  ], function (
486
- RuntimeAuthoring
479
+ startKeyUserAdaptation
487
480
  ) {
488
481
  if (!this._oRTA) {
489
- // default developerMode for CUSTOMER-layer is 'true'
490
- this._oRTA = new RuntimeAuthoring({
491
- rootControl : this.byId("page").getContent()[0],
492
- flexSettings: {
493
- developerMode: false
494
- }
495
- });
496
- this._oRTA.attachStop(function () {
497
- this._oRTA.destroy();
498
- delete this._oRTA;
482
+ startKeyUserAdaptation({
483
+ rootControl : this.byId("page").getContent()[0].getComponentInstance()
484
+ }).then(function(oRta) {
485
+ this._oRTA = oRta;
486
+ this._oRTA.attachStop(function () {
487
+ this._oRTA.destroy();
488
+ delete this._oRTA;
489
+ }.bind(this));
499
490
  }.bind(this));
500
- this._oRTA.start();
501
491
  }
502
492
  }.bind(this));
493
+ },
494
+
495
+ onRouteNotFound: function() {
496
+ var sNotFoundTitle = this.getModel("i18n").getProperty("NOT_FOUND_SAMPLE_TITLE");
497
+
498
+ this.getRouter().myNavToWithoutHash("sap.ui.documentation.sdk.view.SampleNotFound", "XML", false);
499
+ setTimeout(this.appendPageTitle.bind(this, sNotFoundTitle));
500
+ return;
503
501
  }
504
502
  });
505
503
  }
@@ -8,8 +8,10 @@ sap.ui.define([
8
8
  "sap/ui/documentation/sdk/controller/BaseController",
9
9
  "sap/ui/thirdparty/URI",
10
10
  "sap/base/Log",
11
- "sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil"
12
- ], function (BaseController, URI, Log, ResourceDownloadUtil) {
11
+ "sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil",
12
+ "sap/ui/documentation/sdk/util/Resources"
13
+
14
+ ], function (BaseController, URI, Log, ResourceDownloadUtil, ResourcesUtil) {
13
15
  "use strict";
14
16
 
15
17
  var TMPL_REF = sap.ui.require.toUrl("sap/ui/documentation/sdk/tmpl"),
@@ -40,7 +42,7 @@ sap.ui.define([
40
42
  "sap/ui/core/util/File"
41
43
  ], function (JSZip, File) {
42
44
  var oZipFile = new JSZip(),
43
- sRef = sap.ui.require.toUrl((this._sId).replace(/\./g, "/")),
45
+ sRef = ResourcesUtil.getResourceOriginPath(sap.ui.require.toUrl((this._sId).replace(/\./g, "/"))),
44
46
  oData = this.oModel.getData(),
45
47
  aExtraFiles = oData.includeInDownload || [],
46
48
  oManifestFile,
@@ -88,7 +90,7 @@ sap.ui.define([
88
90
  }
89
91
 
90
92
  // iframe examples have a separate index file and a component file to describe it
91
- if (!oData.iframe) {
93
+ if (!oData.iframe || ResourcesUtil.getHasProxy()) {
92
94
  bHasManifest = oData.files.some(function (oFile) {
93
95
  return oFile.name === "manifest.json";
94
96
  });
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "./BaseController"
9
+ ], function (BaseController) {
10
+ "use strict";
11
+
12
+ return BaseController.extend("sap.ui.documentation.sdk.controller.SampleNotFound", {
13
+ });
14
+ });
@@ -154,7 +154,7 @@ sap.ui.define([
154
154
  }
155
155
  this._sHljsDelayedCallID = setTimeout(function () {
156
156
  //The event is called even if all the sub-sections are un-stashed so apply the class and highlights only when we have un-processed targets.
157
- var $aNotApplied = jQuery('.sapUxAPObjectPageContainer .APIDetailMethodsSection pre:not(.hljs)', this._objectPage.$());
157
+ var $aNotApplied = this._objectPage.$().find("pre:not(.hljs)");
158
158
  if ($aNotApplied.length > 0 && window.hljs) {
159
159
  $aNotApplied.addClass('hljs');
160
160
  document.querySelectorAll('pre').forEach(function(block) {
@@ -283,7 +283,7 @@ sap.ui.define([
283
283
  sTopicId = aUrlParts[0],
284
284
  sSubTopicId = aUrlParts[1];
285
285
 
286
- this.sTopicId = sTopicId;
286
+ this.sTopicId = sTopicId.replace(".html", "");
287
287
  this.sSubTopicId = sSubTopicId;
288
288
  this.sTopicURL = ResourcesUtil.getResourceOriginPath(this._oConfig.docuPath + sTopicId + (sTopicId.match(/\.html/) ? "" : ".html"));
289
289
  this.sSubTopicId = event.getParameter("arguments").subId || sSubTopicId;
@@ -21,6 +21,10 @@ sap.ui.define([
21
21
  "DEMOKIT_IMPORTANT_MESSAGES_READ": "IMR"
22
22
  },
23
23
 
24
+ "LOCAL_STORAGE_NAMES": {
25
+ "OLD_NEWS_IDS": "dk_old_news_ids"
26
+ },
27
+
24
28
  constructor : function (oComponent) {
25
29
  this._oComponent = oComponent;
26
30
  },
@@ -68,6 +72,18 @@ sap.ui.define([
68
72
  return "";
69
73
  },
70
74
 
75
+ setLocalStorageItem: function (sItem, vValue) {
76
+ window.localStorage.setItem(sItem, JSON.stringify(vValue));
77
+ },
78
+
79
+ getLocalStorageItem: function (sItem) {
80
+ return JSON.parse(window.localStorage.getItem(sItem));
81
+ },
82
+
83
+ removeLocalStorageItem: function (sItem) {
84
+ window.localStorage.removeItem(sItem);
85
+ },
86
+
71
87
  _getMasterTargetName: function(sRouteName) {
72
88
  var oRouteConfig = this._getRouteConfig(sRouteName),
73
89
  bIsSplitView = oRouteConfig && oRouteConfig.target.length === 2,