@openui5/sap.ui.documentation 1.96.1 → 1.97.1

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 (162) hide show
  1. package/.reuse/dep5 +1 -1
  2. package/THIRDPARTY.txt +2 -1
  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 +36 -2
  18. package/src/sap/ui/documentation/messagebundle_ar.properties +16 -1
  19. package/src/sap/ui/documentation/messagebundle_bg.properties +16 -1
  20. package/src/sap/ui/documentation/messagebundle_ca.properties +16 -1
  21. package/src/sap/ui/documentation/messagebundle_cs.properties +16 -1
  22. package/src/sap/ui/documentation/messagebundle_cy.properties +16 -1
  23. package/src/sap/ui/documentation/messagebundle_da.properties +16 -1
  24. package/src/sap/ui/documentation/messagebundle_de.properties +16 -1
  25. package/src/sap/ui/documentation/messagebundle_el.properties +16 -1
  26. package/src/sap/ui/documentation/messagebundle_en.properties +16 -1
  27. package/src/sap/ui/documentation/messagebundle_en_GB.properties +16 -1
  28. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +16 -1
  29. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +2 -7
  30. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +16 -1
  31. package/src/sap/ui/documentation/messagebundle_es.properties +16 -1
  32. package/src/sap/ui/documentation/messagebundle_es_MX.properties +18 -3
  33. package/src/sap/ui/documentation/messagebundle_et.properties +16 -1
  34. package/src/sap/ui/documentation/messagebundle_fi.properties +16 -1
  35. package/src/sap/ui/documentation/messagebundle_fr.properties +16 -1
  36. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +16 -1
  37. package/src/sap/ui/documentation/messagebundle_hi.properties +16 -1
  38. package/src/sap/ui/documentation/messagebundle_hr.properties +16 -1
  39. package/src/sap/ui/documentation/messagebundle_hu.properties +16 -1
  40. package/src/sap/ui/documentation/messagebundle_id.properties +17 -2
  41. package/src/sap/ui/documentation/messagebundle_it.properties +16 -1
  42. package/src/sap/ui/documentation/messagebundle_iw.properties +16 -1
  43. package/src/sap/ui/documentation/messagebundle_ja.properties +16 -1
  44. package/src/sap/ui/documentation/messagebundle_kk.properties +16 -1
  45. package/src/sap/ui/documentation/messagebundle_ko.properties +16 -1
  46. package/src/sap/ui/documentation/messagebundle_lt.properties +16 -1
  47. package/src/sap/ui/documentation/messagebundle_lv.properties +16 -1
  48. package/src/sap/ui/documentation/messagebundle_ms.properties +16 -1
  49. package/src/sap/ui/documentation/messagebundle_nl.properties +16 -1
  50. package/src/sap/ui/documentation/messagebundle_no.properties +16 -1
  51. package/src/sap/ui/documentation/messagebundle_pl.properties +16 -1
  52. package/src/sap/ui/documentation/messagebundle_pt.properties +16 -1
  53. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +16 -1
  54. package/src/sap/ui/documentation/messagebundle_ro.properties +16 -1
  55. package/src/sap/ui/documentation/messagebundle_ru.properties +16 -1
  56. package/src/sap/ui/documentation/messagebundle_sh.properties +16 -1
  57. package/src/sap/ui/documentation/messagebundle_sk.properties +16 -1
  58. package/src/sap/ui/documentation/messagebundle_sl.properties +16 -1
  59. package/src/sap/ui/documentation/messagebundle_sv.properties +16 -1
  60. package/src/sap/ui/documentation/messagebundle_th.properties +16 -1
  61. package/src/sap/ui/documentation/messagebundle_tr.properties +16 -1
  62. package/src/sap/ui/documentation/messagebundle_uk.properties +27 -12
  63. package/src/sap/ui/documentation/messagebundle_vi.properties +16 -1
  64. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +16 -1
  65. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +16 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +31 -0
  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 +1 -1
  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/Tools.view.xml +23 -25
  149. package/src/sap/ui/documentation/sdk/view/VersionNotFound.view.xml +44 -0
  150. package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +40 -6
  151. package/src/sap/ui/documentation/themes/base/Documentation.less +1 -7
  152. package/src/sap/ui/documentation/themes/base/library.source.less +1 -1
  153. package/src/sap/ui/documentation/themes/sap_belize/library.source.less +1 -1
  154. package/src/sap/ui/documentation/themes/sap_belize_hcb/library.source.less +1 -1
  155. package/src/sap/ui/documentation/themes/sap_belize_hcw/library.source.less +1 -1
  156. package/src/sap/ui/documentation/themes/sap_belize_plus/library.source.less +1 -1
  157. package/src/sap/ui/documentation/themes/sap_fiori_3/library.source.less +1 -1
  158. package/src/sap/ui/documentation/themes/sap_fiori_3_dark/library.source.less +1 -1
  159. package/src/sap/ui/documentation/themes/sap_fiori_3_hcb/library.source.less +1 -1
  160. package/src/sap/ui/documentation/themes/sap_fiori_3_hcw/library.source.less +1 -1
  161. package/src/sap/ui/documentation/themes/sap_horizon/library.source.less +1 -1
  162. 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
  sap.ui.define(['sap/uxap/BlockBase', "sap/ui/documentation/sdk/model/formatter"],
@@ -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
 
@@ -8,6 +8,7 @@ sap.ui.define([
8
8
  "sap/ui/events/KeyCodes",
9
9
  "sap/ui/thirdparty/jquery",
10
10
  "sap/ui/documentation/sdk/controller/BaseController",
11
+ "sap/ui/documentation/sdk/controller/util/NewsInfo",
11
12
  "sap/ui/documentation/sdk/controller/util/SearchUtil",
12
13
  "sap/ui/core/mvc/Controller",
13
14
  "sap/ui/model/Filter",
@@ -36,6 +37,7 @@ sap.ui.define([
36
37
  KeyCodes,
37
38
  jQuery,
38
39
  BaseController,
40
+ NewsInfo,
39
41
  SearchUtil,
40
42
  Controller,
41
43
  Filter,
@@ -129,7 +131,8 @@ sap.ui.define([
129
131
  aResultArr.push({
130
132
  "groupTitle": sCurrGroupTitle,
131
133
  "version": sCurrGroupTitle + " (" + iCounter + " versions)",
132
- "nodes": aNodes
134
+ "nodes": aNodes,
135
+ "path": aNodes[0].path
133
136
  });
134
137
  }
135
138
 
@@ -194,6 +197,9 @@ sap.ui.define([
194
197
 
195
198
  }.bind(this));
196
199
 
200
+ this._oNewsModel = new JSONModel();
201
+ this.setModel(this._oNewsModel, "news");
202
+
197
203
  // Cache view reference
198
204
  this._oSupportedLangModel = new JSONModel();
199
205
 
@@ -213,6 +219,10 @@ sap.ui.define([
213
219
 
214
220
  this._oConfigUtil = this.getOwnerComponent().getConfigUtil();
215
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
+
216
226
  this._bSupportsPrefersColorScheme = !!(window.matchMedia &&
217
227
  (window.matchMedia('(prefers-color-scheme: dark)').matches ||
218
228
  window.matchMedia('(prefers-color-scheme: light)').matches));
@@ -232,6 +242,7 @@ sap.ui.define([
232
242
  }, this);
233
243
 
234
244
  this.bus = Core.getEventBus();
245
+ this.bus.subscribe("newsChanged", "onDemoKitNewsChanged", this._syncNewsModelWithNewsInfo, this);
235
246
 
236
247
  this._createConfigurationBasedOnURIInput();
237
248
 
@@ -288,6 +299,8 @@ sap.ui.define([
288
299
  jQuery(document.body).addClass(this.getOwnerComponent().getContentDensityClass());
289
300
 
290
301
  Device.orientation.attachHandler(this._onOrientationChange, this);
302
+
303
+ this._syncNewsModelWithNewsInfo();
291
304
  },
292
305
 
293
306
  onExit: function() {
@@ -379,6 +392,69 @@ sap.ui.define([
379
392
  }
380
393
  },
381
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
+
382
458
  handleMenuItemClick: function (oEvent) {
383
459
  var sTargetText = oEvent.getParameter("item").getKey(),
384
460
  sTarget = this.MENU_LINKS_MAP[sTargetText];
@@ -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
 
@@ -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,77 @@
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
+ "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
+ });
@@ -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
 
@@ -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,