@openui5/sap.ui.documentation 1.96.2 → 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 (70) 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 +1 -1
  5. package/src/sap/ui/documentation/library.js +2 -2
  6. package/src/sap/ui/documentation/messagebundle.properties +28 -2
  7. package/src/sap/ui/documentation/messagebundle_ar.properties +16 -1
  8. package/src/sap/ui/documentation/messagebundle_bg.properties +16 -1
  9. package/src/sap/ui/documentation/messagebundle_ca.properties +16 -1
  10. package/src/sap/ui/documentation/messagebundle_cs.properties +16 -1
  11. package/src/sap/ui/documentation/messagebundle_cy.properties +16 -1
  12. package/src/sap/ui/documentation/messagebundle_da.properties +16 -1
  13. package/src/sap/ui/documentation/messagebundle_de.properties +16 -1
  14. package/src/sap/ui/documentation/messagebundle_el.properties +16 -1
  15. package/src/sap/ui/documentation/messagebundle_en.properties +16 -1
  16. package/src/sap/ui/documentation/messagebundle_en_GB.properties +16 -1
  17. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +16 -1
  18. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +2 -7
  19. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +16 -1
  20. package/src/sap/ui/documentation/messagebundle_es.properties +16 -1
  21. package/src/sap/ui/documentation/messagebundle_es_MX.properties +18 -3
  22. package/src/sap/ui/documentation/messagebundle_et.properties +16 -1
  23. package/src/sap/ui/documentation/messagebundle_fi.properties +16 -1
  24. package/src/sap/ui/documentation/messagebundle_fr.properties +16 -1
  25. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +16 -1
  26. package/src/sap/ui/documentation/messagebundle_hi.properties +16 -1
  27. package/src/sap/ui/documentation/messagebundle_hr.properties +16 -1
  28. package/src/sap/ui/documentation/messagebundle_hu.properties +16 -1
  29. package/src/sap/ui/documentation/messagebundle_id.properties +17 -2
  30. package/src/sap/ui/documentation/messagebundle_it.properties +16 -1
  31. package/src/sap/ui/documentation/messagebundle_iw.properties +16 -1
  32. package/src/sap/ui/documentation/messagebundle_ja.properties +16 -1
  33. package/src/sap/ui/documentation/messagebundle_kk.properties +16 -1
  34. package/src/sap/ui/documentation/messagebundle_ko.properties +16 -1
  35. package/src/sap/ui/documentation/messagebundle_lt.properties +16 -1
  36. package/src/sap/ui/documentation/messagebundle_lv.properties +16 -1
  37. package/src/sap/ui/documentation/messagebundle_ms.properties +16 -1
  38. package/src/sap/ui/documentation/messagebundle_nl.properties +16 -1
  39. package/src/sap/ui/documentation/messagebundle_no.properties +16 -1
  40. package/src/sap/ui/documentation/messagebundle_pl.properties +16 -1
  41. package/src/sap/ui/documentation/messagebundle_pt.properties +16 -1
  42. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +16 -1
  43. package/src/sap/ui/documentation/messagebundle_ro.properties +16 -1
  44. package/src/sap/ui/documentation/messagebundle_ru.properties +16 -1
  45. package/src/sap/ui/documentation/messagebundle_sh.properties +16 -1
  46. package/src/sap/ui/documentation/messagebundle_sk.properties +16 -1
  47. package/src/sap/ui/documentation/messagebundle_sl.properties +16 -1
  48. package/src/sap/ui/documentation/messagebundle_sv.properties +16 -1
  49. package/src/sap/ui/documentation/messagebundle_th.properties +16 -1
  50. package/src/sap/ui/documentation/messagebundle_tr.properties +16 -1
  51. package/src/sap/ui/documentation/messagebundle_uk.properties +30 -15
  52. package/src/sap/ui/documentation/messagebundle_vi.properties +16 -1
  53. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +16 -1
  54. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +16 -1
  55. package/src/sap/ui/documentation/sdk/controller/App.controller.js +77 -1
  56. package/src/sap/ui/documentation/sdk/controller/News.controller.js +77 -0
  57. package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +16 -0
  58. package/src/sap/ui/documentation/sdk/controller/util/NewsInfo.js +188 -0
  59. package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +7 -1
  60. package/src/sap/ui/documentation/sdk/css/style.css +31 -0
  61. package/src/sap/ui/documentation/sdk/images/tools/FlexibleProgrammingModelExplorer.jpg +0 -0
  62. package/src/sap/ui/documentation/sdk/manifest.json +12 -0
  63. package/src/sap/ui/documentation/sdk/view/App.view.xml +18 -0
  64. package/src/sap/ui/documentation/sdk/view/ChangeVersionDialog.fragment.xml +1 -2
  65. package/src/sap/ui/documentation/sdk/view/News.view.xml +68 -0
  66. package/src/sap/ui/documentation/sdk/view/NewsPopover.fragment.xml +51 -0
  67. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +23 -25
  68. package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +40 -6
  69. package/src/sap/ui/documentation/themes/base/Documentation.less +1 -7
  70. package/ui5.yaml +4 -1
@@ -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];
@@ -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
+ });
@@ -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,
@@ -0,0 +1,188 @@
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
+ // Provides reuse functionality for reading news from news RSS files
8
+ sap.ui.define([
9
+ "sap/ui/core/Core",
10
+ "sap/ui/thirdparty/jquery",
11
+ "sap/ui/documentation/sdk/util/Resources",
12
+ "sap/base/Log"
13
+ ],
14
+ function(Core, jQuery, ResourcesUtil, Log) {
15
+ "use strict";
16
+
17
+ var _oNewsDataCache = {},
18
+ _aNewNews = [],
19
+ _aOldNews = [],
20
+ _sPreparationFailureMessage = null,
21
+ _bInitiallySplit = false,
22
+ _sOldNewsLocalStorageKey = 'OLD_NEWS_IDS',
23
+ _sLocalStorageNewsName,
24
+ _oConfigUtilInstance;
25
+
26
+ function prepareNewsData(oConfigUtilInstance) {
27
+
28
+ if (_oNewsDataCache["newsRSS"]) {
29
+ return Promise.resolve(_oNewsDataCache["newsRSS"]);
30
+ }
31
+
32
+ _oConfigUtilInstance = oConfigUtilInstance;
33
+ _sLocalStorageNewsName = _oConfigUtilInstance.LOCAL_STORAGE_NAMES[_sOldNewsLocalStorageKey];
34
+
35
+ return _requireConfigJSON()
36
+ .then(_requireFeedXML)
37
+ .then(_parseDateToLocaleString)
38
+ .then(_splitNewAndOldItems)
39
+ .catch(function (vReason) {
40
+ _sPreparationFailureMessage = vReason.message;
41
+ Log.error(_sPreparationFailureMessage);
42
+ })
43
+ .finally(_publishNewsChangedEvent);
44
+ }
45
+
46
+ function _splitNewAndOldItems() {
47
+
48
+ if (_bInitiallySplit) {
49
+ return Promise.resolve();
50
+ }
51
+
52
+ var aLocalStorageCachedIDs = _oConfigUtilInstance.getLocalStorageItem(_sLocalStorageNewsName);
53
+
54
+ return new Promise(function (resolve) {
55
+
56
+ var aItems = _oNewsDataCache["newsRSS"].items,
57
+ oCurrItem;
58
+
59
+ if (Array.isArray(aLocalStorageCachedIDs)) {
60
+ for (var i = 0; i < aItems.length; i++) {
61
+ oCurrItem = aItems[i];
62
+ if (aLocalStorageCachedIDs.indexOf(oCurrItem.id) !== -1) {
63
+ _aOldNews.push(oCurrItem);
64
+ } else {
65
+ _aNewNews.push(oCurrItem);
66
+ }
67
+ }
68
+ } else {
69
+ _aNewNews = aItems.slice();
70
+ }
71
+ _bInitiallySplit = true;
72
+ resolve();
73
+ });
74
+ }
75
+
76
+ function getPreparationFailureMessage() {
77
+ return _sPreparationFailureMessage;
78
+ }
79
+
80
+ function getNewNewsArray() {
81
+ return _aNewNews;
82
+ }
83
+
84
+ function getOldNewsArray() {
85
+ return _aOldNews;
86
+ }
87
+
88
+ function moveNewItemToOld(oItem) {
89
+ var iIndexInNewArr = _aNewNews.indexOf(oItem),
90
+ aLocalStorageIDs = _oConfigUtilInstance.getLocalStorageItem(_sLocalStorageNewsName) || [];
91
+
92
+ if (iIndexInNewArr > -1) {
93
+ _aNewNews.splice(iIndexInNewArr, 1);
94
+ }
95
+
96
+ _aOldNews.push(oItem);
97
+ aLocalStorageIDs.push(oItem.id);
98
+
99
+ _oConfigUtilInstance.setLocalStorageItem(_sLocalStorageNewsName, aLocalStorageIDs);
100
+ _publishNewsChangedEvent();
101
+ }
102
+
103
+ function moveAllNewItemsToOld() {
104
+ var aLocalStorageIDs = _oConfigUtilInstance.getLocalStorageItem(_sLocalStorageNewsName) || [],
105
+ oCurrItem;
106
+
107
+ for (var i = 0; i < _aNewNews.length; i++) {
108
+ oCurrItem = _aNewNews[i];
109
+ _aOldNews.push(oCurrItem);
110
+ aLocalStorageIDs.push(oCurrItem.id);
111
+ }
112
+
113
+ _aNewNews = [];
114
+ _oConfigUtilInstance.setLocalStorageItem(_sLocalStorageNewsName, aLocalStorageIDs);
115
+
116
+ _publishNewsChangedEvent();
117
+ }
118
+
119
+ function _parseDateToLocaleString() {
120
+ var aItems = _oNewsDataCache["newsRSS"].items;
121
+
122
+ aItems.forEach(function(oItem) {
123
+ oItem.updated = new Date(oItem.updated).toLocaleString();
124
+ });
125
+ }
126
+
127
+ function _publishNewsChangedEvent() {
128
+ Core.getEventBus().publish("newsChanged", "onDemoKitNewsChanged");
129
+ }
130
+
131
+ function _requireConfigJSON() {
132
+ return new Promise(function (resolve) {
133
+ jQuery.ajax(ResourcesUtil.getResourceOriginPath("/news-config.json"), {
134
+ type: "GET",
135
+ dataType: "JSON",
136
+ success : function(oResult) {
137
+ resolve(oResult);
138
+ },
139
+ error : function () {
140
+ Log.error("failed to load news-config.json");
141
+ resolve();
142
+ }
143
+ });
144
+ });
145
+ }
146
+
147
+ function _requireFeedXML(oJSON) {
148
+ return new Promise(function (resolve) {
149
+ jQuery.ajax(ResourcesUtil.getResourceOriginPath(oJSON.feedPath), {
150
+ type: "GET",
151
+ dataType: "xml",
152
+ success : function(oResult) {
153
+
154
+ var items = [];
155
+ jQuery('item', oResult).each( function() {
156
+ var item = {};
157
+ item.title = jQuery(this).find('title').eq(0).text();
158
+ item.link = jQuery(this).find('link').eq(0).text();
159
+ item.description = jQuery(this).find('description').eq(0).text();
160
+ item.updated = jQuery(this).find('pubDate').eq(0).text();
161
+ item.id = jQuery(this).find('guid').eq(0).text();
162
+ items.push(item);
163
+ });
164
+
165
+ _oNewsDataCache["newsRSS"] = {"items" : items};
166
+ resolve(
167
+ _oNewsDataCache["newsRSS"]
168
+ );
169
+ },
170
+ error : function () {
171
+ Log.error("failed to load news rss");
172
+ _oNewsDataCache["newsRSS"] = null;
173
+ resolve();
174
+ }
175
+ });
176
+ });
177
+ }
178
+
179
+ return {
180
+ moveAllNewItemsToOld: moveAllNewItemsToOld,
181
+ moveNewItemToOld: moveNewItemToOld,
182
+ prepareNewsData: prepareNewsData,
183
+ getPreparationFailureMessage: getPreparationFailureMessage,
184
+ getNewNewsArray: getNewNewsArray,
185
+ getOldNewsArray: getOldNewsArray
186
+ };
187
+
188
+ });
@@ -12,7 +12,8 @@ sap.ui.define([],
12
12
  var aTools = [
13
13
  {
14
14
  "id": "uiThemeDesigner",
15
- "text": "UI Theme Designer"
15
+ "text": "UI Theme Designer",
16
+ "href": "https://www.sap.com/community/topics/ui-theme-designer.html"
16
17
  },
17
18
  {
18
19
  "id": "businessApplicationStudio",
@@ -63,6 +64,11 @@ sap.ui.define([],
63
64
  "id": "fioriTools",
64
65
  "text": "SAP Fiori Tools",
65
66
  "href": "https://help.sap.com/viewer/product/SAP_FIORI_tools/Latest/en-US"
67
+ },
68
+ {
69
+ "id": "flexibleProgrammingModelExplorer",
70
+ "text": "Flexible Programming Model Explorer",
71
+ "href": "https://sapui5.hana.ondemand.com/test-resources/sap/fe/core/fpmExplorer/index.html#/overview/introduction"
66
72
  }
67
73
  ];
68
74
 
@@ -11,6 +11,22 @@
11
11
  vertical-align: bottom;
12
12
  }
13
13
 
14
+ .newsButton.sapMBtn .sapMBadgeTopRight.sapMBadge .sapMBadgeIndicator {
15
+ position: absolute;
16
+ top: 0;
17
+ right: 0;
18
+ padding: 0;
19
+ }
20
+
21
+ .sapUiSizeCompact .newsButton.sapMBtn .sapMBadgeTopRight.sapMBadge .sapMBadgeIndicator {
22
+ top: -0.25rem;
23
+ right: -0.125rem;
24
+ }
25
+
26
+ .sapUiDemokitCustomNLI.sapMNLI {
27
+ cursor: default;
28
+ }
29
+
14
30
  .aboutDialog .sapMMsgStrip .sapMFT {
15
31
  word-break: break-word;
16
32
  }
@@ -1089,6 +1105,21 @@ html:not(.sapUiTheme-sap_belize_hcw):not(.sapUiTheme-sap_belize_hcb):not(.sapUiT
1089
1105
  }
1090
1106
  }
1091
1107
 
1108
+ .sapUiDemokit .videoWrapper {
1109
+ position: relative;
1110
+ padding-bottom: 56.25%;
1111
+ height: 0;
1112
+ }
1113
+
1114
+ .sapUiDemokit .videoWrapper iframe {
1115
+ position: absolute;
1116
+ top: 0;
1117
+ left: 0;
1118
+ width: 100%;
1119
+ height: 100%;
1120
+ border: none;
1121
+ }
1122
+
1092
1123
  /* ==========================================================================
1093
1124
  Documentation Page Header styles
1094
1125
  ========================================================================== */
@@ -297,6 +297,13 @@
297
297
  "tools"
298
298
  ]
299
299
  },
300
+ {
301
+ "pattern": "news",
302
+ "name": "news",
303
+ "target": [
304
+ "news"
305
+ ]
306
+ },
300
307
  {
301
308
  "pattern": "search/{searchParam}:?options:",
302
309
  "name": "search",
@@ -422,6 +429,11 @@
422
429
  "viewLevel": 2,
423
430
  "viewId": "tools"
424
431
  },
432
+ "news": {
433
+ "viewName": "News",
434
+ "viewLevel": 2,
435
+ "viewId": "news"
436
+ },
425
437
  "apiDetailInitial": {
426
438
  "viewName": "ApiDetailInitial",
427
439
  "viewId": "apiDetailInitial",
@@ -97,6 +97,24 @@
97
97
  </layoutData>
98
98
  </Button>
99
99
 
100
+ <Button
101
+ visible="{=!${news>/newsPreparationFailureMessage}}"
102
+ id="notificationsButton"
103
+ tooltip="{i18n>APP_NEWS_BTN_TOOLTIP}"
104
+ press="handleNewsPress"
105
+ icon="sap-icon://bell"
106
+ type="Transparent"
107
+ class="newsButton">
108
+ <customData>
109
+ <BadgeCustomData
110
+ key="badge"
111
+ value="{news>/newsCount}"/>
112
+ </customData>
113
+ <layoutData>
114
+ <OverflowToolbarLayoutData priority="NeverOverflow" />
115
+ </layoutData>
116
+ </Button>
117
+
100
118
  <MenuButton tooltip="{i18n>APP_INFORMATION_BTN_TOOLTIP}" id="aboutMenuButton" icon="sap-icon://action-settings" type="Transparent" visible="{=!${appView>/bSearchMode}}">
101
119
  <layoutData>
102
120
  <OverflowToolbarLayoutData priority="NeverOverflow" />
@@ -47,8 +47,7 @@
47
47
  }]
48
48
  }">
49
49
  <StandardTreeItem
50
- title="{path: 'version'}{= ${path: 'version'} === ${versionData>/latestVersion} ? ' (Latest)' : ''}"
51
- type="{= ${path: 'path'} ? 'Active' : 'Inactive'}">
50
+ title="{path: 'version'}{= ${path: 'version'} === ${versionData>/latestVersion} ? ' (Latest)' : ''}">
52
51
  <customData>
53
52
  <core:CustomData key="path" value="{path: 'path'}" />
54
53
  </customData>
@@ -0,0 +1,68 @@
1
+ <mvc:View controllerName="sap.ui.documentation.sdk.controller.News"
2
+ xmlns:mvc="sap.ui.core.mvc"
3
+ xmlns="sap.m"
4
+ xmlns:l="sap.ui.layout"
5
+ xmlns:core="sap.ui.core">
6
+
7
+ <MessagePage
8
+ visible="{=!!${/preparationFailureMessage}}"
9
+ text="{i18n>NEWS_PREP_FAILURE_TITLE}"
10
+ description="{/preparationFailureMessage}"
11
+ showHeader="false"
12
+ icon="sap-icon://message-warning"/>
13
+ <VBox visible="{=!${/preparationFailureMessage}}">
14
+ <NotificationList>
15
+
16
+ <NotificationListGroup
17
+ items="{path: '/new', templateShareable: false}"
18
+ title="{i18n>NEWS_NEW_GROUP_TITLE}"
19
+ showCloseButton="false">
20
+
21
+ <buttons>
22
+ <Button text="{i18n>NEWS_BTN_MARK_AS_READ}" press="handleMarkAsRead" />
23
+ </buttons>
24
+
25
+ <NotificationListItem
26
+ title="{title}"
27
+ description="{description}"
28
+ datetime="{updated}"
29
+ close="handleNewsItemClose"
30
+ class="sapUiDemokitCustomNLI">
31
+ <buttons>
32
+ <Button visible="{= %{link} !== ''}" text="{i18n>NEWS_BTN_VISIT_LINK}" press="handleVisitLink">
33
+ <customData>
34
+ <core:CustomData key="newsLink" value="{link}"/>
35
+ </customData>
36
+ </Button>
37
+ </buttons>
38
+ <customData>
39
+ <core:CustomData key="newsID" value="{id}"/>
40
+ </customData>
41
+ </NotificationListItem>
42
+
43
+ </NotificationListGroup>
44
+
45
+ <NotificationListGroup
46
+ items="{path: '/old', templateShareable: false}"
47
+ title="{i18n>NEWS_READ_GROUP_TITLE}"
48
+ showCloseButton="false">
49
+
50
+ <NotificationListItem
51
+ title="{title}"
52
+ description="{description}"
53
+ datetime="{updated}"
54
+ showCloseButton="false"
55
+ class="sapUiDemokitCustomNLI">
56
+ <buttons>
57
+ <Button visible="{= %{link} !== ''}" text="{i18n>NEWS_BTN_VISIT_LINK}" press="handleVisitLink">
58
+ <customData>
59
+ <core:CustomData key="newsLink" value="{link}"/>
60
+ </customData>
61
+ </Button>
62
+ </buttons>
63
+ </NotificationListItem>
64
+
65
+ </NotificationListGroup>
66
+ </NotificationList>
67
+ </VBox>
68
+ </mvc:View>
@@ -0,0 +1,51 @@
1
+ <core:FragmentDefinition
2
+ xmlns="sap.m"
3
+ xmlns:core="sap.ui.core">
4
+ <ResponsivePopover
5
+ id="myPopover"
6
+ placement="Bottom"
7
+ title="{i18n>APP_NEWS_BTN_TOOLTIP}">
8
+ <beginButton>
9
+ <Button
10
+ id="dismissAllNotifications"
11
+ text="{i18n>APP_NEWS_DISMISS_ALL_BTN}"
12
+ press="handleDismissAllPress"
13
+ enabled="{= %{news>/newsCount} > 0}" />
14
+ </beginButton>
15
+ <endButton>
16
+ <Button
17
+ id="showAllNotifications"
18
+ text="{i18n>APP_NEWS_SHOW_ALL_BTN}"
19
+ press="handleShowAllPress" />
20
+ </endButton>
21
+ <VBox>
22
+ <NotificationList
23
+ noDataText="{i18n>APP_NEWS_NO_NEW_TEXT}"
24
+ items="{path: 'news>/items', templateShareable: false}"
25
+ >
26
+ <layoutData>
27
+ <FlexItemData maxHeight="450px" />
28
+ </layoutData>
29
+
30
+ <NotificationListItem
31
+ title="{news>title}"
32
+ description="{news>description}"
33
+ datetime="{news>updated}"
34
+ close="handleNewsItemClose"
35
+ class="sapUiDemokitCustomNLI">
36
+ <buttons>
37
+ <Button visible="{= %{news>link} !== ''}" text="{i18n>NEWS_BTN_VISIT_LINK}" press="handleVisitNewsLink">
38
+ <customData>
39
+ <core:CustomData key="newsLink" value="{news>link}"/>
40
+ </customData>
41
+ </Button>
42
+ </buttons>
43
+ <customData>
44
+ <core:CustomData key="newsID" value="{news>id}"/>
45
+ </customData>
46
+ </NotificationListItem>
47
+
48
+ </NotificationList>
49
+ </VBox>
50
+ </ResponsivePopover>
51
+ </core:FragmentDefinition>