@openui5/sap.ui.documentation 1.96.2 → 1.98.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 (164) hide show
  1. package/.reuse/dep5 +26 -31
  2. package/THIRDPARTY.txt +15 -21
  3. package/package.json +6 -6
  4. package/src/sap/ui/documentation/.library +2 -2
  5. package/src/sap/ui/documentation/BorrowedList.js +1 -1
  6. package/src/sap/ui/documentation/DemokitTreeItem.js +1 -1
  7. package/src/sap/ui/documentation/DemokitTreeItemRenderer.js +1 -1
  8. package/src/sap/ui/documentation/JSDocText.js +1 -1
  9. package/src/sap/ui/documentation/LightTable.js +1 -1
  10. package/src/sap/ui/documentation/ObjectPageSubSection.js +1 -1
  11. package/src/sap/ui/documentation/ParamText.js +1 -1
  12. package/src/sap/ui/documentation/Row.js +1 -1
  13. package/src/sap/ui/documentation/Search.js +1 -1
  14. package/src/sap/ui/documentation/TitleLink.js +1 -1
  15. package/src/sap/ui/documentation/WebPageTitleUtil.js +1 -1
  16. package/src/sap/ui/documentation/library.js +3 -3
  17. package/src/sap/ui/documentation/messagebundle.properties +56 -10
  18. package/src/sap/ui/documentation/messagebundle_ar.properties +32 -6
  19. package/src/sap/ui/documentation/messagebundle_bg.properties +31 -5
  20. package/src/sap/ui/documentation/messagebundle_ca.properties +32 -6
  21. package/src/sap/ui/documentation/messagebundle_cs.properties +32 -6
  22. package/src/sap/ui/documentation/messagebundle_cy.properties +32 -6
  23. package/src/sap/ui/documentation/messagebundle_da.properties +32 -6
  24. package/src/sap/ui/documentation/messagebundle_de.properties +32 -6
  25. package/src/sap/ui/documentation/messagebundle_el.properties +31 -5
  26. package/src/sap/ui/documentation/messagebundle_en.properties +32 -6
  27. package/src/sap/ui/documentation/messagebundle_en_GB.properties +32 -6
  28. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +35 -9
  29. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +4 -9
  30. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +35 -9
  31. package/src/sap/ui/documentation/messagebundle_es.properties +32 -6
  32. package/src/sap/ui/documentation/messagebundle_es_MX.properties +34 -8
  33. package/src/sap/ui/documentation/messagebundle_et.properties +32 -6
  34. package/src/sap/ui/documentation/messagebundle_fi.properties +33 -7
  35. package/src/sap/ui/documentation/messagebundle_fr.properties +32 -6
  36. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +32 -6
  37. package/src/sap/ui/documentation/messagebundle_hi.properties +32 -6
  38. package/src/sap/ui/documentation/messagebundle_hr.properties +32 -6
  39. package/src/sap/ui/documentation/messagebundle_hu.properties +31 -5
  40. package/src/sap/ui/documentation/messagebundle_id.properties +33 -7
  41. package/src/sap/ui/documentation/messagebundle_it.properties +32 -6
  42. package/src/sap/ui/documentation/messagebundle_iw.properties +32 -6
  43. package/src/sap/ui/documentation/messagebundle_ja.properties +32 -6
  44. package/src/sap/ui/documentation/messagebundle_kk.properties +32 -6
  45. package/src/sap/ui/documentation/messagebundle_ko.properties +32 -6
  46. package/src/sap/ui/documentation/messagebundle_lt.properties +32 -6
  47. package/src/sap/ui/documentation/messagebundle_lv.properties +31 -5
  48. package/src/sap/ui/documentation/messagebundle_ms.properties +32 -6
  49. package/src/sap/ui/documentation/messagebundle_nl.properties +32 -6
  50. package/src/sap/ui/documentation/messagebundle_no.properties +33 -7
  51. package/src/sap/ui/documentation/messagebundle_pl.properties +31 -5
  52. package/src/sap/ui/documentation/messagebundle_pt.properties +32 -6
  53. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +32 -6
  54. package/src/sap/ui/documentation/messagebundle_ro.properties +32 -6
  55. package/src/sap/ui/documentation/messagebundle_ru.properties +32 -6
  56. package/src/sap/ui/documentation/messagebundle_sh.properties +33 -7
  57. package/src/sap/ui/documentation/messagebundle_sk.properties +32 -6
  58. package/src/sap/ui/documentation/messagebundle_sl.properties +32 -6
  59. package/src/sap/ui/documentation/messagebundle_sv.properties +32 -6
  60. package/src/sap/ui/documentation/messagebundle_th.properties +32 -6
  61. package/src/sap/ui/documentation/messagebundle_tr.properties +32 -6
  62. package/src/sap/ui/documentation/messagebundle_uk.properties +47 -21
  63. package/src/sap/ui/documentation/messagebundle_vi.properties +32 -6
  64. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +32 -6
  65. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +32 -6
  66. package/src/sap/ui/documentation/sdk/Component.js +1 -1
  67. package/src/sap/ui/documentation/sdk/blocks/IndexEntry.js +1 -1
  68. package/src/sap/ui/documentation/sdk/controller/ApiDetail.controller.js +3 -3
  69. package/src/sap/ui/documentation/sdk/controller/ApiDetailIndexDeprecatedExperimental.controller.js +1 -1
  70. package/src/sap/ui/documentation/sdk/controller/ApiDetailInitial.controller.js +1 -1
  71. package/src/sap/ui/documentation/sdk/controller/ApiMaster.controller.js +1 -1
  72. package/src/sap/ui/documentation/sdk/controller/App.controller.js +78 -2
  73. package/src/sap/ui/documentation/sdk/controller/BaseController.js +1 -1
  74. package/src/sap/ui/documentation/sdk/controller/Code.controller.js +1 -1
  75. package/src/sap/ui/documentation/sdk/controller/Controls.controller.js +1 -1
  76. package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +7 -6
  77. package/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js +1 -1
  78. package/src/sap/ui/documentation/sdk/controller/Downloads.controller.js +1 -1
  79. package/src/sap/ui/documentation/sdk/controller/Entity.controller.js +1 -1
  80. package/src/sap/ui/documentation/sdk/controller/ErrorHandler.js +1 -1
  81. package/src/sap/ui/documentation/sdk/controller/Group.controller.js +1 -1
  82. package/src/sap/ui/documentation/sdk/controller/License.controller.js +1 -1
  83. package/src/sap/ui/documentation/sdk/controller/LiveEditor.controller.js +1 -1
  84. package/src/sap/ui/documentation/sdk/controller/MasterTreeBaseController.js +1 -1
  85. package/src/sap/ui/documentation/sdk/controller/News.controller.js +77 -0
  86. package/src/sap/ui/documentation/sdk/controller/NotFound.controller.js +1 -1
  87. package/src/sap/ui/documentation/sdk/controller/ReleaseNotes.controller.js +1 -1
  88. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +233 -23
  89. package/src/sap/ui/documentation/sdk/controller/SampleBaseController.js +1 -1
  90. package/src/sap/ui/documentation/sdk/controller/SampleNotFound.controller.js +1 -1
  91. package/src/sap/ui/documentation/sdk/controller/SearchPage.controller.js +1 -1
  92. package/src/sap/ui/documentation/sdk/controller/Sitemap.controller.js +1 -1
  93. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +1 -1
  94. package/src/sap/ui/documentation/sdk/controller/TermsOfUse.controller.js +1 -1
  95. package/src/sap/ui/documentation/sdk/controller/Tools.controller.js +1 -1
  96. package/src/sap/ui/documentation/sdk/controller/TopicDetail.controller.js +1 -1
  97. package/src/sap/ui/documentation/sdk/controller/TopicDetailInitial.controller.js +1 -1
  98. package/src/sap/ui/documentation/sdk/controller/TopicMaster.controller.js +1 -1
  99. package/src/sap/ui/documentation/sdk/controller/VersionNotFound.controller.js +106 -0
  100. package/src/sap/ui/documentation/sdk/controller/Welcome.controller.js +1 -1
  101. package/src/sap/ui/documentation/sdk/controller/config/datatable.js +1 -1
  102. package/src/sap/ui/documentation/sdk/controller/util/APIInfo.js +1 -1
  103. package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +17 -1
  104. package/src/sap/ui/documentation/sdk/controller/util/ControlsInfo.js +1 -1
  105. package/src/sap/ui/documentation/sdk/controller/util/DataTable.js +1 -1
  106. package/src/sap/ui/documentation/sdk/controller/util/DataTableHelper.js +1 -1
  107. package/src/sap/ui/documentation/sdk/controller/util/DataTableUtil.js +1 -1
  108. package/src/sap/ui/documentation/sdk/controller/util/DocuInfo.js +1 -1
  109. package/src/sap/ui/documentation/sdk/controller/util/EntityInfo.js +1 -1
  110. package/src/sap/ui/documentation/sdk/controller/util/Highlighter.js +1 -1
  111. package/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js +1 -1
  112. package/src/sap/ui/documentation/sdk/controller/util/JSDocUtil.js +1 -1
  113. package/src/sap/ui/documentation/sdk/controller/util/NewsInfo.js +188 -0
  114. package/src/sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil.js +1 -1
  115. package/src/sap/ui/documentation/sdk/controller/util/ResponsiveImageMap.js +1 -1
  116. package/src/sap/ui/documentation/sdk/controller/util/SearchUtil.js +1 -1
  117. package/src/sap/ui/documentation/sdk/controller/util/SidyBySideImageMap.js +1 -1
  118. package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +8 -2
  119. package/src/sap/ui/documentation/sdk/controller/util/Tooltip.js +1 -1
  120. package/src/sap/ui/documentation/sdk/controller/util/TreeUtil.js +1 -1
  121. package/src/sap/ui/documentation/sdk/controller/util/XML2JSONUtils.js +1 -1
  122. package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterDropDown.js +1 -1
  123. package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterDropDownRenderer.js +8 -2
  124. package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterRange.js +1 -1
  125. package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterRangeRenderer.js +1 -1
  126. package/src/sap/ui/documentation/sdk/controller/util/overlay/Overlay.js +1 -1
  127. package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Circle.js +1 -1
  128. package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Polygon.js +1 -1
  129. package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Rect.js +1 -1
  130. package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/Shape.js +1 -1
  131. package/src/sap/ui/documentation/sdk/controller/util/overlay/shapes/ShapeFactory.js +1 -1
  132. package/src/sap/ui/documentation/sdk/cookieSettingsDialog/Component.js +1 -1
  133. package/src/sap/ui/documentation/sdk/cookieSettingsDialog/controller/CookieSettingsDialog.controller.js +1 -1
  134. package/src/sap/ui/documentation/sdk/css/style.css +42 -2
  135. package/src/sap/ui/documentation/sdk/images/tools/FlexibleProgrammingModelExplorer.jpg +0 -0
  136. package/src/sap/ui/documentation/sdk/manifest.json +16 -0
  137. package/src/sap/ui/documentation/sdk/model/formatter.js +1 -1
  138. package/src/sap/ui/documentation/sdk/model/libraryData.js +1 -1
  139. package/src/sap/ui/documentation/sdk/model/models.js +1 -1
  140. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +4 -2
  141. package/src/sap/ui/documentation/sdk/util/LiveEditorOutput.js +1 -1
  142. package/src/sap/ui/documentation/sdk/util/Resources.js +1 -1
  143. package/src/sap/ui/documentation/sdk/util/ToggleFullScreenHandler.js +1 -1
  144. package/src/sap/ui/documentation/sdk/view/App.view.xml +18 -0
  145. package/src/sap/ui/documentation/sdk/view/ChangeVersionDialog.fragment.xml +1 -2
  146. package/src/sap/ui/documentation/sdk/view/News.view.xml +68 -0
  147. package/src/sap/ui/documentation/sdk/view/NewsPopover.fragment.xml +51 -0
  148. package/src/sap/ui/documentation/sdk/view/Sample.view.xml +5 -1
  149. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +23 -25
  150. package/src/sap/ui/documentation/sdk/view/VersionNotFound.view.xml +44 -0
  151. package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +90 -8
  152. package/src/sap/ui/documentation/sdk/view/appSettingsDialog.fragment.xml +1 -0
  153. package/src/sap/ui/documentation/themes/base/Documentation.less +1 -7
  154. package/src/sap/ui/documentation/themes/base/library.source.less +1 -1
  155. package/src/sap/ui/documentation/themes/sap_belize/library.source.less +1 -1
  156. package/src/sap/ui/documentation/themes/sap_belize_hcb/library.source.less +1 -1
  157. package/src/sap/ui/documentation/themes/sap_belize_hcw/library.source.less +1 -1
  158. package/src/sap/ui/documentation/themes/sap_belize_plus/library.source.less +1 -1
  159. package/src/sap/ui/documentation/themes/sap_fiori_3/library.source.less +1 -1
  160. package/src/sap/ui/documentation/themes/sap_fiori_3_dark/library.source.less +1 -1
  161. package/src/sap/ui/documentation/themes/sap_fiori_3_hcb/library.source.less +1 -1
  162. package/src/sap/ui/documentation/themes/sap_fiori_3_hcw/library.source.less +1 -1
  163. package/src/sap/ui/documentation/themes/sap_horizon/library.source.less +1 -1
  164. package/ui5.yaml +4 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -17,6 +17,7 @@ sap.ui.define([
17
17
  "sap/ui/core/HTML",
18
18
  "sap/m/library",
19
19
  "sap/base/Log",
20
+ "sap/base/util/UriParameters",
20
21
  "sap/ui/core/Fragment",
21
22
  "sap/ui/documentation/sdk/util/Resources"
22
23
  ], function(
@@ -31,6 +32,7 @@ sap.ui.define([
31
32
  HTML,
32
33
  mobileLibrary,
33
34
  Log,
35
+ UriParameters,
34
36
  Fragment,
35
37
  ResourcesUtil
36
38
  ) {
@@ -39,6 +41,10 @@ sap.ui.define([
39
41
  // shortcut for sap.m.URLHelper
40
42
  var URLHelper = mobileLibrary.URLHelper;
41
43
 
44
+ var COZY = "cozy",
45
+ COMPACT = "compact",
46
+ CONDENSED = "condensed";
47
+
42
48
  return SampleBaseController.extend("sap.ui.documentation.sdk.controller.Sample", {
43
49
  /* =========================================================== */
44
50
  /* lifecycle methods */
@@ -54,15 +60,28 @@ sap.ui.define([
54
60
  showNewTab: false,
55
61
  rtaLoaded: false
56
62
  });
63
+ this._oSampleIframeSettings = {
64
+ densityMode: COMPACT,
65
+ themeActive: "sap_fiori_3",
66
+ rtl: false
67
+ };
57
68
 
58
69
  this._sId = null; // Used to hold sample ID
59
70
  this._sEntityId = null; // Used to hold entity ID for the sample currently shown
60
71
 
61
72
  // Load runtime authoring asynchronously
62
- Promise.all([
63
- sap.ui.getCore().loadLibrary("sap.ui.fl", {async: true}),
64
- sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true})
65
- ]).then(this._loadRTA.bind(this));
73
+ if (!ResourcesUtil.getHasProxy()) {
74
+ Promise.all([
75
+ sap.ui.getCore().loadLibrary("sap.ui.fl", {async: true}),
76
+ sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true})
77
+ ]).then(function () {
78
+ sap.ui.require([
79
+ "sap/ui/fl/Utils",
80
+ "sap/ui/fl/FakeLrepConnectorLocalStorage",
81
+ "sap/ui/core/util/reflection/JsControlTreeModifier"
82
+ ], this._loadRTA.bind(this));
83
+ }.bind(this));
84
+ }
66
85
 
67
86
  this.getView().setModel(this.oModel);
68
87
 
@@ -145,11 +164,12 @@ sap.ui.define([
145
164
  var oSampleConfig = oConfig && oConfig.sample || {};
146
165
 
147
166
  // only have the option to run standalone if there is an iframe
148
- oModelData.showNewTab = !!oSampleConfig.iframe || ResourcesUtil.getHasProxy();
167
+ oModelData.showNewTab = !!oSampleConfig.iframe || !!ResourcesUtil.getHasProxy();
149
168
  oModelData.id = oSample.id;
150
169
  oModelData.name = oSample.name;
151
170
  oModelData.details = oSample.details;
152
171
  oModelData.description = oSample.description;
172
+ oModelData.showSettings = !!ResourcesUtil.getHasProxy();
153
173
 
154
174
  if (oSampleConfig) {
155
175
 
@@ -211,6 +231,141 @@ sap.ui.define([
211
231
  });
212
232
  },
213
233
 
234
+ /**
235
+ * Opens the View settings dialog
236
+ * @public
237
+ */
238
+ handleSettings: function () {
239
+ var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
240
+ oSampleFrameCore = oSampleFrame.sap.ui.getCore(),
241
+ oView;
242
+
243
+ if (!this._oMessageBundle) {
244
+ this._oMessageBundle = new oSampleFrame.sap.ui.model.resource.ResourceModel({
245
+ bundleName: "sap.ui.documentation.messagebundle"
246
+ });
247
+ }
248
+
249
+ if (!this._oSettingsDialog) {
250
+ this._oSettingsDialog = new oSampleFrame.sap.ui.xmlfragment("sap.ui.documentation.sdk.view.appSettingsDialog", this);
251
+
252
+ oView = oSampleFrameCore.byId("__xmlview0");
253
+ oView.setModel(this._oMessageBundle, "i18n");
254
+ oView.addDependent(this._oSettingsDialog);
255
+ }
256
+
257
+ setTimeout(function () {
258
+ var oAppSettings = oSampleFrameCore.getConfiguration(),
259
+ oThemeSelect = oSampleFrameCore.byId("ThemeSelect"),
260
+ sUriParamTheme = UriParameters.fromQuery(window.location.search).get("sap-theme"),
261
+ bDensityMode = this._oSampleIframeSettings.densityMode;
262
+
263
+ // Theme select
264
+ oThemeSelect.setSelectedKey(sUriParamTheme ? sUriParamTheme : oAppSettings.getTheme());
265
+
266
+ // RTL
267
+ oSampleFrameCore.byId("RTLSwitch").setState(oAppSettings.getRTL());
268
+
269
+ // Density mode select
270
+ oSampleFrameCore.byId("DensityModeSwitch").setSelectedKey(bDensityMode);
271
+
272
+ this._oSettingsDialog.open();
273
+ }.bind(this), 0);
274
+ },
275
+
276
+ /**
277
+ * Closes the View settings dialog
278
+ * @public
279
+ */
280
+ handleCloseAppSettings: function () {
281
+ this._oSettingsDialog.close();
282
+ },
283
+
284
+ handleSaveAppSettings: function () {
285
+ var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
286
+ oSampleFrameCore = oSampleFrame.sap.ui.getCore(),
287
+ sDensityMode = oSampleFrameCore.byId("DensityModeSwitch").getSelectedKey(),
288
+ sTheme = oSampleFrameCore.byId("ThemeSelect").getSelectedKey(),
289
+ bRTL = oSampleFrameCore.byId("RTLSwitch").getState(),
290
+ oView = oSampleFrameCore.byId("__xmlview0");
291
+
292
+ this._oSettingsDialog.close();
293
+
294
+ // Lazy loading of busy dialog
295
+ if (!this._oBusyDialog) {
296
+ oSampleFrame.sap.ui.require(["sap/m/BusyDialog"], function () {
297
+ this._oBusyDialog = new oSampleFrame.sap.m.BusyDialog();
298
+ oView.addDependent(this._oBusyDialog);
299
+ this._handleBusyDialog();
300
+ }.bind(this));
301
+ } else {
302
+ this._handleBusyDialog();
303
+ }
304
+
305
+ // handle settings change
306
+ this._applyAppConfiguration(sTheme, sDensityMode, bRTL);
307
+ },
308
+
309
+ /**
310
+ * Apply content configuration
311
+ * @param {string} sThemeActive name of the theme
312
+ * @param {string} sDensityMode content density mode
313
+ * @param {boolean} bRTL right to left mode
314
+ * @private
315
+ */
316
+ _applyAppConfiguration: function(sThemeActive, sDensityMode, bRTL){
317
+ var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
318
+ oSampleFrameCore = oSampleFrame.sap.ui.getCore();
319
+
320
+ if (this._oSampleIframeSettings.densityMode !== sDensityMode) {
321
+ this._oSampleIframeSettings.densityMode = sDensityMode;
322
+ this._toggleContentDensityClasses(oSampleFrame.jQuery("body"), sDensityMode);
323
+ }
324
+
325
+ if (this._oSampleIframeSettings.rtl !== bRTL) {
326
+ oSampleFrameCore.getConfiguration().setRTL(bRTL);
327
+ this._oSampleIframeSettings.rtl = bRTL;
328
+ }
329
+
330
+ if (oSampleFrameCore.getConfiguration().getTheme() !== sThemeActive) {
331
+ oSampleFrameCore.applyTheme(sThemeActive);
332
+ this._oSampleIframeSettings.themeActive = sThemeActive;
333
+ } else if (this._oSampleIframeSettings.densityMode !== sDensityMode) {
334
+ // Notify Core for content density change only if no theme change happened
335
+ oSampleFrameCore.notifyContentDensityChanged();
336
+ }
337
+ },
338
+
339
+ /**
340
+ * Toggles content density classes in the provided html body
341
+ * @param {object} oBody the html body to set the correct class on
342
+ * @param {string} sDensityMode content density mode
343
+ * @private
344
+ */
345
+ _toggleContentDensityClasses: function(oBody, sDensityMode){
346
+ switch (sDensityMode) {
347
+ case COMPACT:
348
+ oBody.toggleClass("sapUiSizeCompact", true).toggleClass("sapUiSizeCozy", false).toggleClass("sapUiSizeCondensed", false);
349
+ break;
350
+ case CONDENSED:
351
+ oBody.toggleClass("sapUiSizeCondensed", true).toggleClass("sapUiSizeCozy", false).toggleClass("sapUiSizeCompact", true);
352
+ break;
353
+ default:
354
+ oBody.toggleClass("sapUiSizeCozy", true).toggleClass("sapUiSizeCondensed", false).toggleClass("sapUiSizeCompact", false);
355
+ }
356
+ },
357
+
358
+ /**
359
+ * Handles View settings dialog
360
+ * @public
361
+ */
362
+ _handleBusyDialog : function () {
363
+ this._oBusyDialog.open();
364
+ setTimeout(function () {
365
+ this._oBusyDialog.close();
366
+ }.bind(this), 1000);
367
+ },
368
+
214
369
  _updateFileContent: function(sRef, sFile) {
215
370
  this.fetchSourceFile(sRef + "/" + sFile).then(function(vContent) {
216
371
  var aFiles = this.oModel.getProperty("/files");
@@ -325,6 +480,20 @@ sap.ui.define([
325
480
  }
326
481
 
327
482
  if (!this._oHtmlControl) {
483
+ var oComponent = this.getOwnerComponent();
484
+
485
+ // Guarantees the sample initially to have the same content density, as the whole Demo Kit
486
+ switch (oComponent.getContentDensityClass()) {
487
+ case "sapUiSizeCompact":
488
+ this._oSampleIframeSettings.densityMode = COMPACT;
489
+ break;
490
+ case "sapUiSizeCondensed":
491
+ this._oSampleIframeSettings.densityMode = CONDENSED;
492
+ break;
493
+ default:
494
+ this._oSampleIframeSettings.densityMode = COZY;
495
+ }
496
+
328
497
  this._oHtmlControl = new HTML({
329
498
  id : "sampleFrame",
330
499
  content : '<iframe src="' + this.sIFrameUrl + '" id="sampleFrame" frameBorder="0"></iframe>'
@@ -335,17 +504,58 @@ sap.ui.define([
335
504
  if (!this._oHtmlControl._jQueryHTMLControlLoadEventAttached) {
336
505
  this._oHtmlControl.$().on("load", function () {
337
506
  var oSampleFrame = this._oHtmlControl.$()[0].contentWindow,
338
- oSampleFrameCore = oSampleFrame.sap.ui.getCore();
507
+ oSampleFrameCore = oSampleFrame.sap.ui.getCore(),
508
+ oFrame = document.getElementById("sampleFrame");
509
+
510
+ this._oMessageBundle = null;
511
+ this._oSettingsDialog = null;
512
+ this._oBusyDialog = null;
513
+
514
+ if (this.oModel.getData().iframe) {
515
+ Promise.all([
516
+ oSampleFrameCore.loadLibrary("sap.ui.fl", {async: true}),
517
+ oSampleFrameCore.loadLibrary("sap.ui.rta", {async: true})
518
+ ]).then(function () {
519
+ oSampleFrame.sap.ui.require([
520
+ "sap/ui/fl/Utils",
521
+ "sap/ui/fl/FakeLrepConnectorLocalStorage",
522
+ "sap/ui/core/util/reflection/JsControlTreeModifier"
523
+ ], this._loadRTA.bind(this));
524
+ }.bind(this));
525
+
526
+
527
+ oFrame.onToggleAdaptationMode = function () {
528
+ oSampleFrame.sap.ui.require([
529
+ "sap/ui/rta/api/startKeyUserAdaptation"
530
+ ], function (
531
+ startKeyUserAdaptation
532
+ ) {
533
+ if (!this._oRTA) {
534
+ var oContainer = oSampleFrameCore.byId("__container0");
535
+
536
+ startKeyUserAdaptation({
537
+ rootControl : oContainer.getComponentInstance()
538
+ }).then(function(oRta) {
539
+ this._oRTA = oRta;
540
+ oContainer.$().css({"padding-top": "2.5rem", "box-sizing": "border-box"});
541
+ this._oRTA.attachStop(function () {
542
+ oContainer.$().css({"padding-top": "0", "box-sizing": "content-box"});
543
+ this._oRTA.destroy();
544
+ delete this._oRTA;
545
+ }.bind(this));
546
+ }.bind(this));
547
+ }
548
+ }.bind(this));
549
+ };
550
+ }
339
551
 
340
552
  // Apply theme settings to iframe sample
341
553
  oSampleFrame.sap.ui.getCore().attachInit(function () {
342
- var bCompact = jQuery(document.body).hasClass("sapUiSizeCompact");
343
-
344
- oSampleFrameCore.applyTheme(ResourcesUtil.getHasProxy() ? this._sDefaultSampleTheme : this._oCore.getConfiguration().getTheme());
345
- oSampleFrameCore.getConfiguration().setRTL(this._oCore.getConfiguration().getRTL());
346
- oSampleFrame.jQuery('body')
347
- .toggleClass("sapUiSizeCompact", bCompact)
348
- .toggleClass("sapUiSizeCozy", !bCompact);
554
+ oSampleFrameCore.applyTheme(ResourcesUtil.getHasProxy() ?
555
+ this._oSampleIframeSettings.themeActive : this._oCore.getConfiguration().getTheme());
556
+ oSampleFrameCore.getConfiguration().setRTL(ResourcesUtil.getHasProxy() ?
557
+ this._oSampleIframeSettings.rtl : this._oCore.getConfiguration().getRTL());
558
+ this._toggleContentDensityClasses(oSampleFrame.jQuery('body'), this._oSampleIframeSettings.densityMode);
349
559
 
350
560
  // Notify Core for content density change
351
561
  oSampleFrameCore.notifyContentDensityChanged();
@@ -395,7 +605,7 @@ sap.ui.define([
395
605
  },
396
606
 
397
607
  onDemoKitThemeChanged: function(sChannelId, sEventId, oData) {
398
- if (this._oHtmlControl) {
608
+ if (this._oHtmlControl && !ResourcesUtil.getHasProxy()) {
399
609
  this._oHtmlControl.$()[0].contentWindow.sap.ui.getCore().applyTheme(oData.sThemeActive);
400
610
  }
401
611
  this.setDefaultSampleTheme();
@@ -436,12 +646,7 @@ sap.ui.define([
436
646
  this.sIFrameUrl = this.sIFrameUrl + decodeURI(oIFrameURL.search);
437
647
  },
438
648
 
439
- _loadRTA: function () {
440
- sap.ui.require([
441
- "sap/ui/fl/Utils",
442
- "sap/ui/fl/FakeLrepConnectorLocalStorage",
443
- "sap/ui/core/util/reflection/JsControlTreeModifier"
444
- ], function (
649
+ _loadRTA: function (
445
650
  Utils,
446
651
  FakeLrepConnectorLocalStorage,
447
652
  JsControlTreeModifier
@@ -469,18 +674,23 @@ sap.ui.define([
469
674
  this._oRTA = null;
470
675
  }
471
676
  }, this);
472
- }.bind(this));
473
677
  },
474
678
 
475
679
  onToggleAdaptationMode : function (oEvt) {
680
+ if (this.oModel.getData().iframe) {
681
+ window.document.getElementsByTagName("iframe")[0].onToggleAdaptationMode();
682
+ return;
683
+ }
476
684
  sap.ui.require([
477
685
  "sap/ui/rta/api/startKeyUserAdaptation"
478
686
  ], function (
479
687
  startKeyUserAdaptation
480
688
  ) {
481
689
  if (!this._oRTA) {
690
+ var oContainer = this.byId("page").getContent()[0];
691
+
482
692
  startKeyUserAdaptation({
483
- rootControl : this.byId("page").getContent()[0].getComponentInstance()
693
+ rootControl : oContainer.getComponentInstance()
484
694
  }).then(function(oRta) {
485
695
  this._oRTA = oRta;
486
696
  this._oRTA.attachStop(function () {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -0,0 +1,106 @@
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
+ sap.ui.define([
8
+ "./BaseController",
9
+ "sap/ui/thirdparty/URI",
10
+ "sap/m/library"
11
+ ], function (
12
+ BaseController,
13
+ URI,
14
+ mLib
15
+ ) {
16
+ "use strict";
17
+
18
+ return BaseController.extend("sap.ui.documentation.sdk.controller.VersionNotFound", {
19
+ onInit: function () {
20
+ // Load VersionInfo model promise
21
+ this._loadVersionInfo()
22
+ .then(this._onVersionInfo.bind(this))
23
+ .catch(this._onError.bind(this));
24
+ },
25
+
26
+ onReadMore: function () {
27
+ mLib.URLHelper.redirect("https://blogs.sap.com/2021/01/26/removing-outdated-ui5-versions-from-ui5-cdn/");
28
+ },
29
+
30
+ onHomePress: function () {
31
+ // initialize the UI component
32
+ mLib.URLHelper.redirect("/");
33
+ },
34
+
35
+ _onError: function () {
36
+ var oMessagePage = this.getView().byId("page");
37
+
38
+ oMessagePage.setBusy(false);
39
+ oMessagePage.setText(this._getLibraryResourceBundle().getText("NOT_FOUND_UNAVAILABLE_TEXT"));
40
+ },
41
+
42
+ _onVersionInfo: function (oVersionInfo) {
43
+ var oMessagePage = this.getView().byId("page"),
44
+ oReadMoreBtn = this.getView().byId("readMoreButton"),
45
+ reVersion = new RegExp("^([0-9]+)(?:\\.([0-9]+)(?:\\.([0-9]+))?)?(.+)?"),
46
+ oURI = new URI(document.location.href),
47
+ aSegments = oURI.segment(),
48
+ sVersion,
49
+ isRemoved = false;
50
+
51
+ oMessagePage.setBusy(false);
52
+
53
+ for (var i = 0, l = aSegments.length; i < l; i++) {
54
+ if (reVersion.test(aSegments[i])) {
55
+ sVersion = aSegments[i];
56
+ break;
57
+ }
58
+ }
59
+
60
+ isRemoved = this._isVersionRemoved(oVersionInfo, sVersion);
61
+
62
+ if (isRemoved) {
63
+ // show removed message
64
+ oMessagePage.setText(this._getLibraryResourceBundle().getText("NOT_FOUND_REMOVED_TEXT"));
65
+ oReadMoreBtn.setVisible(true);
66
+ } else {
67
+ // show unavailable message
68
+ oReadMoreBtn.setVisible(false);
69
+ oMessagePage.setText(this._getLibraryResourceBundle().getText("NOT_FOUND_UNAVAILABLE_TEXT"));
70
+ }
71
+ },
72
+
73
+ _isVersionRemoved: function (oVersionInfo, sVersion) {
74
+ var aPatches = oVersionInfo.patches,
75
+ iVersionIndex,
76
+ reVersion;
77
+
78
+ iVersionIndex = aPatches.findIndex(function (oData) {
79
+ reVersion = new RegExp(oData.version);
80
+ return oData.removed && reVersion.test(sVersion);
81
+ });
82
+
83
+ return iVersionIndex > -1;
84
+ },
85
+
86
+ _getLibraryResourceBundle: function () {
87
+ return sap.ui.getCore().getLibraryResourceBundle("sap.ui.documentation");
88
+ },
89
+
90
+ _loadVersionInfo: function () {
91
+ return new Promise(function (resolve, reject) {
92
+ jQuery.ajax({
93
+ async: true,
94
+ url: "/versionoverview.json",
95
+ dataType: 'json',
96
+ success: function (oResponse) {
97
+ resolve(oResponse);
98
+ },
99
+ error: function (err) {
100
+ reject(err);
101
+ }
102
+ });
103
+ });
104
+ }
105
+ });
106
+ });
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -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,
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6