@openui5/sap.ui.documentation 1.120.7 → 1.121.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 (103) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +7 -7
  4. package/src/sap/ui/documentation/.library +3 -9
  5. package/src/sap/ui/documentation/DemoAppsCardHeader.js +62 -0
  6. package/src/sap/ui/documentation/DemokitTreeItem.js +1 -0
  7. package/src/sap/ui/documentation/DemokitTreeItemRenderer.js +20 -13
  8. package/src/sap/ui/documentation/ParamText.js +2 -1
  9. package/src/sap/ui/documentation/library.js +23 -10
  10. package/src/sap/ui/documentation/messagebundle.properties +20 -20
  11. package/src/sap/ui/documentation/messagebundle_ar.properties +10 -10
  12. package/src/sap/ui/documentation/messagebundle_bg.properties +10 -10
  13. package/src/sap/ui/documentation/messagebundle_ca.properties +10 -10
  14. package/src/sap/ui/documentation/messagebundle_cnr.properties +10 -10
  15. package/src/sap/ui/documentation/messagebundle_cs.properties +10 -10
  16. package/src/sap/ui/documentation/messagebundle_cy.properties +10 -10
  17. package/src/sap/ui/documentation/messagebundle_da.properties +12 -12
  18. package/src/sap/ui/documentation/messagebundle_de.properties +16 -16
  19. package/src/sap/ui/documentation/messagebundle_el.properties +10 -10
  20. package/src/sap/ui/documentation/messagebundle_en.properties +398 -10
  21. package/src/sap/ui/documentation/messagebundle_en_GB.properties +10 -10
  22. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +2 -2
  23. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +10 -10
  24. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +2 -2
  25. package/src/sap/ui/documentation/messagebundle_es.properties +11 -11
  26. package/src/sap/ui/documentation/messagebundle_es_MX.properties +10 -10
  27. package/src/sap/ui/documentation/messagebundle_et.properties +10 -10
  28. package/src/sap/ui/documentation/messagebundle_fi.properties +10 -10
  29. package/src/sap/ui/documentation/messagebundle_fr.properties +10 -10
  30. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +10 -10
  31. package/src/sap/ui/documentation/messagebundle_hi.properties +10 -10
  32. package/src/sap/ui/documentation/messagebundle_hr.properties +11 -11
  33. package/src/sap/ui/documentation/messagebundle_hu.properties +10 -10
  34. package/src/sap/ui/documentation/messagebundle_id.properties +10 -10
  35. package/src/sap/ui/documentation/messagebundle_it.properties +11 -11
  36. package/src/sap/ui/documentation/messagebundle_iw.properties +10 -10
  37. package/src/sap/ui/documentation/messagebundle_ja.properties +10 -10
  38. package/src/sap/ui/documentation/messagebundle_kk.properties +10 -10
  39. package/src/sap/ui/documentation/messagebundle_ko.properties +11 -11
  40. package/src/sap/ui/documentation/messagebundle_lt.properties +10 -10
  41. package/src/sap/ui/documentation/messagebundle_lv.properties +10 -10
  42. package/src/sap/ui/documentation/messagebundle_mk.properties +15 -15
  43. package/src/sap/ui/documentation/messagebundle_ms.properties +10 -10
  44. package/src/sap/ui/documentation/messagebundle_nl.properties +10 -10
  45. package/src/sap/ui/documentation/messagebundle_no.properties +10 -10
  46. package/src/sap/ui/documentation/messagebundle_pl.properties +10 -10
  47. package/src/sap/ui/documentation/messagebundle_pt.properties +10 -10
  48. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +10 -10
  49. package/src/sap/ui/documentation/messagebundle_ro.properties +10 -10
  50. package/src/sap/ui/documentation/messagebundle_ru.properties +12 -12
  51. package/src/sap/ui/documentation/messagebundle_sh.properties +10 -10
  52. package/src/sap/ui/documentation/messagebundle_sk.properties +10 -10
  53. package/src/sap/ui/documentation/messagebundle_sl.properties +10 -10
  54. package/src/sap/ui/documentation/messagebundle_sr.properties +10 -10
  55. package/src/sap/ui/documentation/messagebundle_sv.properties +10 -10
  56. package/src/sap/ui/documentation/messagebundle_th.properties +10 -10
  57. package/src/sap/ui/documentation/messagebundle_tr.properties +10 -10
  58. package/src/sap/ui/documentation/messagebundle_uk.properties +10 -10
  59. package/src/sap/ui/documentation/messagebundle_vi.properties +10 -10
  60. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +10 -10
  61. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +10 -10
  62. package/src/sap/ui/documentation/sdk/controller/ApiMaster.controller.js +40 -30
  63. package/src/sap/ui/documentation/sdk/controller/App.controller.js +20 -12
  64. package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +3 -3
  65. package/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js +208 -459
  66. package/src/sap/ui/documentation/sdk/controller/LiveEditor.controller.js +9 -8
  67. package/src/sap/ui/documentation/sdk/controller/News.controller.js +3 -3
  68. package/src/sap/ui/documentation/sdk/controller/ReleaseNotes.controller.js +13 -12
  69. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +24 -18
  70. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +18 -1
  71. package/src/sap/ui/documentation/sdk/controller/util/APIInfo.js +3 -1
  72. package/src/sap/ui/documentation/sdk/controller/util/ControlsInfo.js +2 -1
  73. package/src/sap/ui/documentation/sdk/controller/util/NewsInfo.js +3 -3
  74. package/src/sap/ui/documentation/sdk/controller/util/ThemePicker.js +5 -3
  75. package/src/sap/ui/documentation/sdk/controller/util/URLUtil.js +16 -16
  76. package/src/sap/ui/documentation/sdk/cookieSettingsDialog/controller/CookieSettingsDialog.controller.js +8 -8
  77. package/src/sap/ui/documentation/sdk/images/DemoApps_intro_card.svg +8 -0
  78. package/src/sap/ui/documentation/sdk/index.js +1 -1
  79. package/src/sap/ui/documentation/sdk/model/formatter.js +323 -291
  80. package/src/sap/ui/documentation/sdk/model/libraryData.js +9 -26
  81. package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js +14905 -8737
  82. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +6 -3
  83. package/src/sap/ui/documentation/sdk/view/AboutDialog.fragment.xml +1 -1
  84. package/src/sap/ui/documentation/sdk/view/ApiMaster.view.xml +31 -28
  85. package/src/sap/ui/documentation/sdk/view/App.view.xml +5 -4
  86. package/src/sap/ui/documentation/sdk/view/DemoApps.view.xml +189 -141
  87. package/src/sap/ui/documentation/sdk/view/SubApiDetail.view.xml +34 -30
  88. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +2 -2
  89. package/src/sap/ui/documentation/themes/base/DemoApps.less +180 -0
  90. package/src/sap/ui/documentation/themes/base/DemokitTreeItem.less +20 -0
  91. package/src/sap/ui/documentation/themes/base/Documentation.less +6 -8
  92. package/src/sap/ui/documentation/themes/base/Search.less +1 -1
  93. package/src/sap/ui/documentation/themes/base/library.source.less +3 -2
  94. package/src/sap/ui/documentation/themes/sap_horizon_hcb/DemoApps.less +11 -0
  95. package/src/sap/ui/documentation/themes/sap_horizon_hcb/library.source.less +3 -1
  96. package/src/sap/ui/documentation/themes/sap_horizon_hcw/DemoApps.less +30 -0
  97. package/src/sap/ui/documentation/themes/sap_horizon_hcw/library.source.less +3 -1
  98. package/LICENSES/BSD-2-Clause.txt +0 -22
  99. package/src/sap/ui/documentation/sdk/images/DemoApps_M_and_L_cropped.jpg +0 -0
  100. package/src/sap/ui/documentation/sdk/images/DemoApps_S_cropped.jpg +0 -0
  101. package/src/sap/ui/documentation/sdk/thirdparty/esprima.js +0 -3756
  102. package/src/sap/ui/documentation/sdk/view/BlockLayoutCell.fragment.xml +0 -56
  103. package/src/sap/ui/documentation/sdk/view/BlockLayoutTeaserCell.fragment.xml +0 -60
@@ -5,12 +5,13 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/documentation/sdk/controller/BaseController",
9
- "sap/ui/model/json/JSONModel",
10
- "sap/ui/thirdparty/URI",
11
- "sap/uxap/ThrottledTaskHelper",
12
- "sap/ui/core/Core"
13
- ], function (BaseController, JSONModel, URI, ThrottledTask, Core) {
8
+ "sap/ui/core/EventBus",
9
+ "sap/ui/core/Theming",
10
+ "sap/ui/documentation/sdk/controller/BaseController",
11
+ "sap/ui/model/json/JSONModel",
12
+ "sap/ui/thirdparty/URI",
13
+ "sap/uxap/ThrottledTaskHelper"
14
+ ], function(EventBus, Theming, BaseController, JSONModel, URI, ThrottledTask) {
14
15
  "use strict";
15
16
 
16
17
  var SRC_FILE_NAMES = {
@@ -77,7 +78,7 @@ sap.ui.define([
77
78
  // throttle the output of src changes
78
79
  this._oThrottledTask = null;
79
80
 
80
- this.bus = Core.getEventBus();
81
+ this.bus = EventBus.getInstance();
81
82
  this.bus.subscribe("themeChanged", "onDemoKitThemeChanged", this.onDemoKitThemeChanged, this);
82
83
  },
83
84
 
@@ -168,7 +169,7 @@ sap.ui.define([
168
169
  return {
169
170
  src: oModulesToPost,
170
171
  moduleNameToRequire: sInitModuleName,
171
- activeTheme: Core.getConfiguration().getTheme().toLowerCase()
172
+ activeTheme: Theming.getTheme().toLowerCase()
172
173
  };
173
174
  },
174
175
 
@@ -5,13 +5,13 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/EventBus",
8
9
  "sap/ui/documentation/sdk/controller/BaseController",
9
10
  'sap/ui/model/json/JSONModel',
10
11
  "sap/ui/documentation/sdk/controller/util/NewsInfo",
11
- "sap/ui/core/Core",
12
12
  "sap/m/library"
13
13
  ],
14
- function (BaseController, JSONModel, NewsInfo, Core, mobileLibrary) {
14
+ function (EventBus, BaseController, JSONModel, NewsInfo, mobileLibrary) {
15
15
  'use strict';
16
16
 
17
17
  return BaseController.extend('sap.ui.documentation.sdk.controller.News', {
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
 
24
24
  NewsInfo.prepareNewsData(this.getOwnerComponent().getConfigUtil());
25
25
 
26
- Core.getEventBus().subscribe("newsChanged", "onDemoKitNewsChanged", this._syncModelWithNewsInfo, this);
26
+ EventBus.getInstance().subscribe("newsChanged", "onDemoKitNewsChanged", this._syncModelWithNewsInfo, this);
27
27
  },
28
28
 
29
29
  onAfterRendering: function() {
@@ -21,6 +21,8 @@ sap.ui.define([
21
21
  return BaseController.extend("sap.ui.documentation.sdk.controller.ReleaseNotes", {
22
22
 
23
23
  onInit: function() {
24
+ BaseController.prototype.onInit.call(this);
25
+
24
26
  this._oView = this.getView();
25
27
 
26
28
  // Async resource handling
@@ -33,9 +35,6 @@ sap.ui.define([
33
35
 
34
36
  this._oView.setModel(this._oModel);
35
37
  this._oView.setModel(this._oVersionModel, "select");
36
-
37
- library._getAppInfo(this._processAppInfo.bind(this));
38
-
39
38
  },
40
39
  _processAppInfo: function (oAppInfo) {
41
40
  var oVersion,
@@ -66,14 +65,15 @@ sap.ui.define([
66
65
  items : []
67
66
  };
68
67
 
69
- while (iMinor >= 28) {
70
- sVersion = iMajor + "." + iMinor;
71
- oVersions.items.push({
72
- key : sVersion,
73
- value : sVersion
74
- });
75
- iMinor = iMinor - (iMinor <= 60 ? 2 : 1);
76
- }
68
+ oVersions.items = this._oNeoAppVersions.reduce(function(result, oVersion) {
69
+ var sMajorMinorVersion = oVersion.target.version.split(".")[0] + "." + oVersion.target.version.split(".")[1];
70
+
71
+ if (!result.some((o) => o.key == sMajorMinorVersion)) {
72
+ result.push({ key: sMajorMinorVersion, value: sMajorMinorVersion });
73
+ }
74
+ return result;
75
+ }, []);
76
+
77
77
  this._oVersionModel.setData(oVersions);
78
78
 
79
79
  this.appendPageTitle(this.getModel("i18n").getProperty("RELEASE_NOTES_TITLE"));
@@ -81,7 +81,7 @@ sap.ui.define([
81
81
  _processLibInfo: function (aLibs, oLibInfos) {
82
82
  var iReleaseNotes,
83
83
  aReturnLibs = [],
84
- iLength = aLibs.length,
84
+ iLength = Array.isArray(aLibs) ? aLibs.length : 0,
85
85
  fnProcessLib,
86
86
  i;
87
87
 
@@ -126,6 +126,7 @@ sap.ui.define([
126
126
  // Store needed data
127
127
  this._oNeoAppVersions = oNeoAppJson[0].routes;
128
128
  this._sSapUiVersion = oSapUiVersionJson[0].version;
129
+ library._getAppInfo(this._processAppInfo.bind(this));
129
130
 
130
131
  // Make version select visible
131
132
  this._oView.byId("VersionSelect").setVisible(true);
@@ -6,6 +6,9 @@
6
6
 
7
7
 
8
8
  sap.ui.define([
9
+ "sap/ui/core/Element",
10
+ "sap/ui/core/EventBus",
11
+ "sap/ui/core/Theming",
9
12
  "sap/ui/documentation/sdk/controller/SampleBaseController",
10
13
  "sap/ui/model/json/JSONModel",
11
14
  "sap/ui/model/resource/ResourceModel",
@@ -18,13 +21,15 @@ sap.ui.define([
18
21
  "sap/ui/core/HTML",
19
22
  "sap/m/library",
20
23
  "sap/base/Log",
21
- "sap/ui/core/Core",
22
24
  "sap/ui/core/Fragment",
23
25
  "sap/ui/documentation/sdk/util/Resources",
24
26
  "./config/sampleForwardingConfig",
25
27
  "sap/base/strings/capitalize",
26
28
  "sap/ui/core/Configuration"
27
29
  ], function(
30
+ Element,
31
+ EventBus,
32
+ Theming,
28
33
  SampleBaseController,
29
34
  JSONModel,
30
35
  ResourceModel,
@@ -37,7 +42,6 @@ sap.ui.define([
37
42
  HTML,
38
43
  mobileLibrary,
39
44
  Log,
40
- Core,
41
45
  Fragment,
42
46
  ResourcesUtil,
43
47
  sampleForwardingConfig,
@@ -81,7 +85,7 @@ sap.ui.define([
81
85
 
82
86
  this.getView().setModel(this.oModel);
83
87
 
84
- this.bus = Core.getEventBus();
88
+ this.bus = EventBus.getInstance();
85
89
  this.setDefaultSampleTheme();
86
90
  this.bus.subscribe("themeChanged", "onDemoKitThemeChanged", this.onDemoKitThemeChanged, this);
87
91
 
@@ -102,18 +106,12 @@ sap.ui.define([
102
106
  * @private
103
107
  */
104
108
  _onSampleMatched: function (event) {
105
- var bShouldRedirect = new URLSearchParams(window.location.search).has("dk-sample-standalone");
106
109
 
107
110
  this._sId = event.getParameter("arguments").sampleId;
108
111
  this._sEntityId = event.getParameter("arguments").entityId;
109
112
 
110
113
  this.byId("page").setBusy(true);
111
114
 
112
- // check whether to open sample standalone
113
- if (bShouldRedirect) {
114
- this._handleRedirect();
115
- }
116
-
117
115
  if (sampleForwardingConfig[this._sId]) {
118
116
  return this.oRouter.navTo("sample", {
119
117
  entityId: sampleForwardingConfig[this._sId].entityId,
@@ -127,7 +125,9 @@ sap.ui.define([
127
125
  },
128
126
 
129
127
  _loadSample: function(oData) {
130
- var oPage = this._getPage(),
128
+ var searchParams = window.location.search,
129
+ bShouldRedirect = searchParams.includes("dk-sample-standalone"),
130
+ oPage = this._getPage(),
131
131
  oModelData = this.oModel.getData(),
132
132
  oSample = oData.samples[this._sId],
133
133
  oSampleContext;
@@ -147,6 +147,12 @@ sap.ui.define([
147
147
 
148
148
  oModelData.sEntityId = this.entityId;
149
149
 
150
+ // check whether to open sample standalone
151
+ if (bShouldRedirect) {
152
+ this._handleRedirect();
153
+ }
154
+
155
+
150
156
  // If we are in a scenario without contexts - this is the case for tutorials
151
157
  if (oSample.previousSampleId || oSample.nextSampleId) {
152
158
  oModelData.previousSampleId = oSample.previousSampleId;
@@ -321,16 +327,16 @@ sap.ui.define([
321
327
 
322
328
  applySampleSettings: function(eMessage) {
323
329
  if (eMessage.data.type === "SETTINGS") {
324
- var oThemeSelect = Core.byId("sample--ThemeSelect");
330
+ var oThemeSelect = Element.getElementById("sample--ThemeSelect");
325
331
 
326
332
  // Theme select
327
333
  oThemeSelect.setSelectedKey(eMessage.data.data.theme);
328
334
 
329
335
  // RTL
330
- Core.byId("sample--RTLSwitch").setState(eMessage.data.data.RTL);
336
+ Element.getElementById("sample--RTLSwitch").setState(eMessage.data.data.RTL);
331
337
 
332
338
  // Density mode select
333
- Core.byId("sample--DensityModeSwitch").setSelectedKey(this._presetDensity(eMessage.data.data.density, true));
339
+ Element.getElementById("sample--DensityModeSwitch").setSelectedKey(this._presetDensity(eMessage.data.data.density, true));
334
340
 
335
341
  }
336
342
  },
@@ -365,9 +371,9 @@ sap.ui.define([
365
371
  },
366
372
 
367
373
  handleSaveAppSettings: function () {
368
- var sDensityMode = Core.byId("sample--DensityModeSwitch").getSelectedKey(),
369
- sTheme = Core.byId("sample--ThemeSelect").getSelectedKey(),
370
- bRTL = Core.byId("sample--RTLSwitch").getState();
374
+ var sDensityMode = Element.getElementById("sample--DensityModeSwitch").getSelectedKey(),
375
+ sTheme = Element.getElementById("sample--ThemeSelect").getSelectedKey(),
376
+ bRTL = Element.getElementById("sample--RTLSwitch").getState();
371
377
 
372
378
  this._oSettingsDialog.close();
373
379
 
@@ -623,7 +629,7 @@ sap.ui.define([
623
629
 
624
630
  // combine namespace with the file name again
625
631
  this.sIFrameUrl = (sap.ui.require.toUrl((sIframePath + "/" + sIframeWithoutUI5Ending).replace(/\./g, "/")) + sFileEnding || ".html")
626
- + "?sap-ui-theme=" + Configuration.getTheme();
632
+ + "?sap-ui-theme=" + Theming.getTheme();
627
633
  this._oHtmlControl.getDomRef().src = this.sIFrameUrl;
628
634
  }
629
635
  this._oHtmlControl.getDomRef().contentWindow.postMessage({
@@ -671,7 +677,7 @@ sap.ui.define([
671
677
  setDefaultSampleTheme: function() {
672
678
  var sSampleVersion = ResourcesUtil.getResourcesVersion();
673
679
  this._sDefaultSampleTheme = sSampleVersion && parseInt(sSampleVersion.slice(3,5)) < 68 ?
674
- "sap_belize" : Configuration.getTheme();
680
+ "sap_belize" : Theming.getTheme();
675
681
  },
676
682
 
677
683
  onDemoKitThemeChanged: function(sChannelId, sEventId, oData) {
@@ -476,9 +476,26 @@ sap.ui.define([
476
476
  }, true);
477
477
  },
478
478
  _getSubclassesBlock: function (oControlData, oEntityData) {
479
- var aSubClasses = oEntityData.extendedBy || oEntityData.implementedBy,
479
+ var aSubClasses =
480
+ oEntityData.extendedBy ||
481
+ oEntityData.implementedBy,
482
+ fnFilterSubclassesByVisibility = function (aSubClasses) {
483
+ return aSubClasses.filter((oSubClassInfo) =>
484
+ this._aAllowedMembers.includes(
485
+ oSubClassInfo.visibility
486
+ )
487
+ );
488
+ }.bind(this),
489
+ fnGetSubclassesNames = function (aSubClasses) {
490
+ return aSubClasses.map(
491
+ (oSubClassInfo) => oSubClassInfo.name
492
+ );
493
+ },
480
494
  oSubClassesLink;
481
495
 
496
+ if (aSubClasses && typeof aSubClasses[0] === "object") {
497
+ aSubClasses = fnGetSubclassesNames(fnFilterSubclassesByVisibility(aSubClasses));
498
+ }
482
499
  this._aSubClasses = aSubClasses;
483
500
 
484
501
  if (aSubClasses.length === 1) {
@@ -20,6 +20,8 @@ sap.ui.define(["sap/ui/thirdparty/jquery",
20
20
 
21
21
  function getIndexJsonPromise() {
22
22
 
23
+ var sApiInfoRootURL = window['sap-ui-documentation-config'] && window['sap-ui-documentation-config'].apiInfoRootURL;
24
+
23
25
  if (oLibraryDataCache["index"]) {
24
26
  return Promise.resolve(oLibraryDataCache["index"]);
25
27
  }
@@ -27,7 +29,7 @@ sap.ui.define(["sap/ui/thirdparty/jquery",
27
29
  return new Promise(function (resolve, reject) {
28
30
  jQuery.ajax({
29
31
  async: true,
30
- url : ResourcesUtil.getResourceOriginPath("/docs/api/api-index.json"),
32
+ url : sApiInfoRootURL || ResourcesUtil.getResourceOriginPath("/docs/api/api-index.json"),
31
33
  dataType : 'json',
32
34
  success : function(vResponse) {
33
35
  var aResult = vResponse.symbols || [];
@@ -58,7 +58,8 @@ sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/
58
58
  "Map",
59
59
  "Utility",
60
60
  "Web Components",
61
- "Smart Controls"
61
+ "Smart Controls",
62
+ "Personalization"
62
63
  ];
63
64
  var afilterProps = ["namespace", "since", "category"]; // content density are set manually
64
65
  var oFilterSets = {
@@ -6,12 +6,12 @@
6
6
 
7
7
  // Provides reuse functionality for reading news from news RSS files
8
8
  sap.ui.define([
9
- "sap/ui/core/Core",
9
+ "sap/ui/core/EventBus",
10
10
  "sap/ui/thirdparty/jquery",
11
11
  "sap/ui/documentation/sdk/util/Resources",
12
12
  "sap/base/Log"
13
13
  ],
14
- function(Core, jQuery, ResourcesUtil, Log) {
14
+ function(EventBus, jQuery, ResourcesUtil, Log) {
15
15
  "use strict";
16
16
 
17
17
  var _oNewsDataCache = {},
@@ -125,7 +125,7 @@ sap.ui.define([
125
125
  }
126
126
 
127
127
  function _publishNewsChangedEvent() {
128
- Core.getEventBus().publish("newsChanged", "onDemoKitNewsChanged");
128
+ EventBus.getInstance().publish("newsChanged", "onDemoKitNewsChanged");
129
129
  }
130
130
 
131
131
  function _requireFeedXML(oJSON) {
@@ -5,9 +5,11 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/core/Core"
8
+ "sap/ui/core/Core",
9
+ "sap/ui/core/EventBus"
9
10
  ], function(
10
- Core
11
+ Core,
12
+ EventBus
11
13
  ) {
12
14
  "use strict";
13
15
 
@@ -38,7 +40,7 @@ sap.ui.define([
38
40
  this._oConfigUtil = oComponent.getOwnerComponent().getConfigUtil();
39
41
  this._oCookieNames = this._oConfigUtil.COOKIE_NAMES;
40
42
 
41
- this.bus = Core.getEventBus();
43
+ this.bus = EventBus.getInstance();
42
44
 
43
45
  this._createConfigurationBasedOnURIInput();
44
46
 
@@ -13,24 +13,24 @@ sap.ui.define(["sap/ui/thirdparty/URI"], function(URI) {
13
13
  // compiling a single RegExp seems a less readable option
14
14
  // so bellow are the patterns for individual Demokit sections
15
15
  aDemokitPaths = [
16
- /^\/controls/,
17
- /^\/group/,
18
- /^\/entity/,
19
- /^\/sample/,
20
- /^\/downloads/,
21
- /^\/api/,
22
- /^\/topic/,
23
- /^\/liveEditor/,
24
- /^\/sitemap\//,
16
+ /^(\/)?controls/,
17
+ /^(\/)?group/,
18
+ /^(\/)?entity/,
19
+ /^(\/)?sample/,
20
+ /^(\/)?downloads/,
21
+ /^(\/)?api/,
22
+ /^(\/)?topic/,
23
+ /^(\/)?liveEditor/,
24
+ /^(\/)?sitemap\//,
25
25
  /\/sitemap$/,
26
- /^\/demoapps/,
27
- /^\/tools/,
28
- /^\/news\//,
26
+ /^(\/)?demoapps/,
27
+ /^(\/)?tools/,
28
+ /^(\/)?news\//,
29
29
  /\/news$/,
30
- /^\/search\//,
31
- /^\/license[.]txt/,
32
- /^\/docs\/guide/,
33
- /^\/docs\/api\/symbols/
30
+ /^(\/)?search\//,
31
+ /^(\/)?license[.]txt/,
32
+ /^(\/)?docs\/guide/,
33
+ /^(\/)?docs\/api\/symbols/
34
34
  ];
35
35
 
36
36
  function pathMatchesDemokitRoute (path) {
@@ -5,12 +5,12 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Element",
8
9
  "sap/ui/core/mvc/Controller",
9
10
  "sap/ui/model/json/JSONModel",
10
11
  "sap/ui/core/Fragment",
11
- "sap/ui/model/resource/ResourceModel",
12
- "sap/ui/core/Core"
13
- ], function (Controller, JSONModel, Fragment, ResourceModel, Core) {
12
+ "sap/ui/model/resource/ResourceModel"
13
+ ], function (Element, Controller, JSONModel, Fragment, ResourceModel) {
14
14
  "use strict";
15
15
 
16
16
  return Controller.extend("sap.ui.documentation.sdk.cookieSettingsDialog.controller.CookieSettingsDialog", {
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
 
60
60
 
61
61
  oDialog.attachAfterOpen(function() {
62
- Core.byId("btnSetPreferences").focus();
62
+ Element.getElementById("btnSetPreferences").focus();
63
63
  });
64
64
 
65
65
 
@@ -90,7 +90,7 @@ sap.ui.define([
90
90
  },
91
91
 
92
92
  onSaveCookies: function() {
93
- var bHasConsentRequiredCookies = Core.byId("requiredCookiesSwitch").getState();
93
+ var bHasConsentRequiredCookies = Element.getElementById("requiredCookiesSwitch").getState();
94
94
 
95
95
  this._saveCookiePreference(this._oCookieNames.ALLOW_REQUIRED_COOKIES, bHasConsentRequiredCookies);
96
96
 
@@ -101,7 +101,7 @@ sap.ui.define([
101
101
  this._oModel.setProperty("/showCookieDetails", true);
102
102
  this._oCookieSettingsDialog.addStyleClass("cookiesDetailedView");
103
103
 
104
- this._focusButton(Core.byId("btnSavePreferences"));
104
+ this._focusButton(Element.getElementById("btnSavePreferences"));
105
105
  },
106
106
 
107
107
  onCancelPress: function() {
@@ -120,12 +120,12 @@ sap.ui.define([
120
120
  this._oModel.setProperty("/showCookieDetails", false);
121
121
  this._oCookieSettingsDialog.removeStyleClass("cookiesDetailedView");
122
122
 
123
- this._focusButton(Core.byId("btnSetPreferences"));
123
+ this._focusButton(Element.getElementById("btnSetPreferences"));
124
124
  },
125
125
 
126
126
  onCancelEditCookies: function() {
127
127
  this._oCookieSettingsDialog.close();
128
- Core.byId("requiredCookiesSwitch").setState(this._oCookiesUtil.getCookieValue(this._oCookieNames.ALLOW_REQUIRED_COOKIES) === "1");
128
+ Element.getElementById("requiredCookiesSwitch").setState(this._oCookiesUtil.getCookieValue(this._oCookieNames.ALLOW_REQUIRED_COOKIES) === "1");
129
129
  },
130
130
 
131
131
  _saveCookiePreference: function(sCookieName, bEnable) {
@@ -0,0 +1,8 @@
1
+ <svg width="1400" height="187" viewBox="0 0 1400 187" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path opacity="0.6" d="M745.399 259.91C956.984 150.88 1024.8 -35.9502 1024.8 -35.9502C1024.8 -35.9502 1087.48 -176.01 1028.94 -309.863C1028.94 -309.863 1041.46 -142.559 660.574 35.1895C279.691 212.938 397.064 390.686 397.064 390.686C416.997 372.927 435.97 360.919 473.564 350.828C536.439 333.976 634.99 316.973 745.399 259.91Z" fill="white" fill-opacity="0.32"/>
3
+ <path opacity="0.4" d="M756.297 337.155C919.792 337.155 1108.97 261.171 1202.58 91.4452C1217.21 64.957 1230.23 21.92 1236.74 -18.5944C1246.83 -83.1751 1248.09 -131.207 1236.18 -218.441C1236.18 -218.441 1205.2 -131.611 1024.8 -36.1523C959.202 -1.4906 875.386 33.1711 764.371 66.8741C334.238 197.398 397.315 390.484 397.315 390.484C465.085 345.833 465.488 337.155 756.297 337.155Z" fill="white" fill-opacity="0.32"/>
4
+ <path opacity="0.2" d="M756.302 337.155C906.626 337.155 1110.99 345.631 1217.17 256.429C1282.26 201.889 1341.7 129.79 1342.81 19.902C1342.81 19.902 1253.75 78.6806 1202.58 91.2941C1131.94 108.751 1004.32 135.592 887.754 128.983C492.086 106.531 397.32 390.283 397.32 390.283C451.869 340.233 518.276 337.155 756.302 337.155Z" fill="white" fill-opacity="0.32"/>
5
+ <path opacity="0.4" d="M745.397 259.91C956.982 150.88 1024.8 -35.9503 1024.8 -35.9503C959.202 -1.28862 875.386 33.3731 764.371 67.0761C334.238 197.6 397.315 390.686 397.315 390.686C417.247 372.926 436.221 360.918 473.814 350.828C536.437 333.976 634.988 316.973 745.397 259.91Z" fill="white" fill-opacity="0.32"/>
6
+ <path d="M474.021 350.828C536.644 333.976 635.195 316.822 745.604 260.011C809.552 227.038 867.24 183.138 916.063 130.295C906.576 130.295 897.14 129.942 887.754 129.437C492.086 106.985 397.32 390.737 397.32 390.737C414.506 374.447 435.232 362.359 457.874 355.419C462.97 353.956 468.117 352.291 474.021 350.828Z" fill="white" fill-opacity="0.32"/>
7
+ <path opacity="0.4" d="M2040.14 333.422C2040.14 133.12 2002.09 -31.4092 1939.22 -168.341C1945.22 -150.228 2066.88 230.244 1762.3 534.631C1588.41 708.495 1292.56 768.686 1054.68 578.576C1054.68 578.576 1084.96 1055.77 519.487 1126.15C150.261 1172.11 -140.295 936.898 -266.348 637.304C-354.049 428.93 -362.224 189.427 -261.806 -8.50313C-403.653 251.989 -350.113 569.242 -319.584 671.411C-171.329 1166.82 288.021 1527.86 831.692 1527.86C1495.31 1527.86 2040.14 996.938 2040.14 333.422Z" fill="white" fill-opacity="0.32"/>
8
+ </svg>
@@ -123,7 +123,7 @@
123
123
  var oContainer = new ComponentContainer({component : oComponent, height: "100%"})
124
124
  .placeAt("content");
125
125
 
126
- var bOpenStandalone = new URLSearchParams(window.location.search).has("dk-sample-standalone");
126
+ var bOpenStandalone = window.location.search.includes("dk-sample-standalone");
127
127
  // if dk-sample-standalone is used,
128
128
  // display message for samples with own index.html
129
129
  if (bOpenStandalone && oConfig.sample && oConfig.sample.iframe) {