@openui5/sap.ui.documentation 1.121.1 → 1.122.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 (106) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +7 -7
  3. package/src/sap/ui/documentation/.library +1 -1
  4. package/src/sap/ui/documentation/DemoKitCardHeader.js +70 -0
  5. package/src/sap/ui/documentation/library.js +3 -3
  6. package/src/sap/ui/documentation/messagebundle.properties +113 -82
  7. package/src/sap/ui/documentation/messagebundle_ar.properties +61 -41
  8. package/src/sap/ui/documentation/messagebundle_bg.properties +62 -42
  9. package/src/sap/ui/documentation/messagebundle_ca.properties +61 -41
  10. package/src/sap/ui/documentation/messagebundle_cnr.properties +63 -43
  11. package/src/sap/ui/documentation/messagebundle_cs.properties +61 -41
  12. package/src/sap/ui/documentation/messagebundle_cy.properties +61 -41
  13. package/src/sap/ui/documentation/messagebundle_da.properties +61 -41
  14. package/src/sap/ui/documentation/messagebundle_de.properties +62 -42
  15. package/src/sap/ui/documentation/messagebundle_el.properties +61 -41
  16. package/src/sap/ui/documentation/messagebundle_en.properties +61 -429
  17. package/src/sap/ui/documentation/messagebundle_en_GB.properties +61 -41
  18. package/src/sap/ui/documentation/messagebundle_es.properties +61 -41
  19. package/src/sap/ui/documentation/messagebundle_es_MX.properties +61 -41
  20. package/src/sap/ui/documentation/messagebundle_et.properties +61 -41
  21. package/src/sap/ui/documentation/messagebundle_fi.properties +61 -41
  22. package/src/sap/ui/documentation/messagebundle_fr.properties +61 -41
  23. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +62 -42
  24. package/src/sap/ui/documentation/messagebundle_hi.properties +61 -41
  25. package/src/sap/ui/documentation/messagebundle_hr.properties +61 -41
  26. package/src/sap/ui/documentation/messagebundle_hu.properties +61 -41
  27. package/src/sap/ui/documentation/messagebundle_id.properties +61 -41
  28. package/src/sap/ui/documentation/messagebundle_it.properties +62 -42
  29. package/src/sap/ui/documentation/messagebundle_iw.properties +61 -41
  30. package/src/sap/ui/documentation/messagebundle_ja.properties +62 -42
  31. package/src/sap/ui/documentation/messagebundle_kk.properties +61 -41
  32. package/src/sap/ui/documentation/messagebundle_ko.properties +61 -41
  33. package/src/sap/ui/documentation/messagebundle_lt.properties +61 -41
  34. package/src/sap/ui/documentation/messagebundle_lv.properties +61 -41
  35. package/src/sap/ui/documentation/messagebundle_mk.properties +65 -45
  36. package/src/sap/ui/documentation/messagebundle_ms.properties +61 -41
  37. package/src/sap/ui/documentation/messagebundle_nl.properties +61 -41
  38. package/src/sap/ui/documentation/messagebundle_no.properties +61 -41
  39. package/src/sap/ui/documentation/messagebundle_pl.properties +61 -41
  40. package/src/sap/ui/documentation/messagebundle_pt.properties +61 -41
  41. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +61 -41
  42. package/src/sap/ui/documentation/messagebundle_ro.properties +62 -42
  43. package/src/sap/ui/documentation/messagebundle_ru.properties +61 -41
  44. package/src/sap/ui/documentation/messagebundle_sh.properties +63 -43
  45. package/src/sap/ui/documentation/messagebundle_sk.properties +61 -41
  46. package/src/sap/ui/documentation/messagebundle_sl.properties +61 -41
  47. package/src/sap/ui/documentation/messagebundle_sr.properties +61 -41
  48. package/src/sap/ui/documentation/messagebundle_sv.properties +61 -41
  49. package/src/sap/ui/documentation/messagebundle_th.properties +61 -41
  50. package/src/sap/ui/documentation/messagebundle_tr.properties +61 -41
  51. package/src/sap/ui/documentation/messagebundle_uk.properties +62 -42
  52. package/src/sap/ui/documentation/messagebundle_vi.properties +63 -43
  53. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +61 -41
  54. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +61 -41
  55. package/src/sap/ui/documentation/sdk/controller/App.controller.js +3 -3
  56. package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +15 -9
  57. package/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js +2 -2
  58. package/src/sap/ui/documentation/sdk/controller/ReleaseNotes.controller.js +7 -2
  59. package/src/sap/ui/documentation/sdk/controller/Resources.controller.js +79 -0
  60. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +5 -3
  61. package/src/sap/ui/documentation/sdk/controller/Sitemap.controller.js +10 -11
  62. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +5 -4
  63. package/src/sap/ui/documentation/sdk/controller/util/{ToolsInfo.js → ResourcesInfo.js} +52 -44
  64. package/src/sap/ui/documentation/sdk/controller/util/URLUtil.js +1 -0
  65. package/src/sap/ui/documentation/sdk/css/style.css +0 -73
  66. package/src/sap/ui/documentation/sdk/index.js +16 -4
  67. package/src/sap/ui/documentation/sdk/manifest.json +11 -4
  68. package/src/sap/ui/documentation/sdk/model/LiveEditorData.json +1 -1
  69. package/src/sap/ui/documentation/sdk/model/formatter.js +2 -2
  70. package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js +3 -3
  71. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +6 -4
  72. package/src/sap/ui/documentation/sdk/util/LiveEditorOutput.js +8 -7
  73. package/src/sap/ui/documentation/sdk/view/App.view.xml +5 -5
  74. package/src/sap/ui/documentation/sdk/view/DemoApps.view.xml +26 -26
  75. package/src/sap/ui/documentation/sdk/view/Resources.view.xml +725 -0
  76. package/src/sap/ui/documentation/sdk/view/Sitemap.view.xml +2 -2
  77. package/src/sap/ui/documentation/themes/base/DemoApps.less +149 -91
  78. package/src/sap/ui/documentation/themes/base/Resources.less +181 -0
  79. package/src/sap/ui/documentation/themes/base/library.source.less +2 -1
  80. package/src/sap/ui/documentation/themes/sap_horizon_hcb/DemoApps.less +15 -4
  81. package/src/sap/ui/documentation/themes/sap_horizon_hcb/Resources.less +24 -0
  82. package/src/sap/ui/documentation/themes/sap_horizon_hcb/library.source.less +2 -1
  83. package/src/sap/ui/documentation/themes/sap_horizon_hcw/DemoApps.less +25 -11
  84. package/src/sap/ui/documentation/themes/sap_horizon_hcw/Resources.less +44 -0
  85. package/src/sap/ui/documentation/themes/sap_horizon_hcw/library.source.less +2 -1
  86. package/src/sap/ui/documentation/DemoAppsCardHeader.js +0 -62
  87. package/src/sap/ui/documentation/sdk/controller/Tools.controller.js +0 -106
  88. package/src/sap/ui/documentation/sdk/images/Tools_M_and_L_cropped.jpg +0 -0
  89. package/src/sap/ui/documentation/sdk/images/Tools_S_cropped.jpg +0 -0
  90. package/src/sap/ui/documentation/sdk/images/demoAppsTeaser.png +0 -0
  91. package/src/sap/ui/documentation/sdk/images/tools/AccessibilityGuide.png +0 -0
  92. package/src/sap/ui/documentation/sdk/images/tools/BusinessApplicationStudio.jpg +0 -0
  93. package/src/sap/ui/documentation/sdk/images/tools/CardExplorer.jpg +0 -0
  94. package/src/sap/ui/documentation/sdk/images/tools/FioriTools.png +0 -0
  95. package/src/sap/ui/documentation/sdk/images/tools/FlexibleProgrammingModelExplorer.jpg +0 -0
  96. package/src/sap/ui/documentation/sdk/images/tools/IconExplorer.jpg +0 -0
  97. package/src/sap/ui/documentation/sdk/images/tools/SupportAssistant.jpg +0 -0
  98. package/src/sap/ui/documentation/sdk/images/tools/ThemeDesigner.jpg +0 -0
  99. package/src/sap/ui/documentation/sdk/images/tools/ThemeParameterToolbox.jpg +0 -0
  100. package/src/sap/ui/documentation/sdk/images/tools/Tools_LiveEditor.jpg +0 -0
  101. package/src/sap/ui/documentation/sdk/images/tools/UI5EvoTooling.jpg +0 -0
  102. package/src/sap/ui/documentation/sdk/images/tools/UI5Inspector.jpg +0 -0
  103. package/src/sap/ui/documentation/sdk/images/tools/UI5TestRecorder.png +0 -0
  104. package/src/sap/ui/documentation/sdk/images/tools/UI5WebComponents.jpg +0 -0
  105. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +0 -475
  106. /package/src/sap/ui/documentation/sdk/images/{DemoApps_intro_card.svg → intro_card_stripe.svg} +0 -0
@@ -17,7 +17,9 @@ sap.ui.define([
17
17
  "sap/ui/model/Sorter",
18
18
  "sap/ui/util/Storage",
19
19
  "sap/ui/documentation/sdk/controller/util/Highlighter",
20
- "sap/ui/core/Fragment"
20
+ "sap/ui/core/Fragment",
21
+ "sap/base/i18n/Localization",
22
+ "sap/ui/core/Theming"
21
23
  ], function(
22
24
  EventBus,
23
25
  jQuery,
@@ -31,7 +33,9 @@ sap.ui.define([
31
33
  Sorter,
32
34
  Storage,
33
35
  Highlighter,
34
- Fragment
36
+ Fragment,
37
+ Localization,
38
+ Theming
35
39
  ) {
36
40
  "use strict";
37
41
 
@@ -140,12 +144,14 @@ sap.ui.define([
140
144
  //DOM rendering delay value is minimal by default, but some function may increase it if that function calls intensive DOM operation
141
145
  // (e.g. RTL change, that leads to new CSS to be requested and applied on entire DOM)
142
146
  this._iDomRenderingDelay = 0; // (ms)
147
+ this._fnBoundScrollToSelectedListItem = this._scrollToSelectedListItem.bind(this);
148
+ this._fnBoundOnLocalizationChange = this._onLocalizationChange.bind(this);
143
149
  this._getList().addEventDelegate({
144
150
  onAfterRendering : function() {
145
- setTimeout(this._scrollToSelectedListItem.bind(this), this._iDomRenderingDelay);
151
+ setTimeout(this._fnBoundScrollToSelectedListItem, this._iDomRenderingDelay);
146
152
  }}, this);
147
- this._oCore.attachThemeChanged(this._scrollToSelectedListItem, this); // theme change requires us to restore scroll position
148
- this._oCore.attachLocalizationChanged(this._onLocalizationChange, this);
153
+ Theming.attachApplied(this._fnBoundScrollToSelectedListItem); // theme change requires us to restore scroll position
154
+ Localization.attachChange(this._fnBoundOnLocalizationChange);
149
155
 
150
156
  // Subscribe to view event to apply to it the current configuration
151
157
  this._oView.addEventDelegate({
@@ -167,7 +173,7 @@ sap.ui.define([
167
173
  this._oViewSettings.densityMode = COZY;
168
174
  }
169
175
 
170
- this._oViewSettings.rtl = this._oCore.getConfiguration().getRTL();
176
+ this._oViewSettings.rtl = Localization.getRTL();
171
177
 
172
178
  // Keep default settings for density mode up to date
173
179
  this._oDefaultSettings.densityMode = this._oViewSettings.densityMode;
@@ -317,7 +323,7 @@ sap.ui.define([
317
323
  this._toggleListItem(oItemToSelect, true);
318
324
 
319
325
  if (!this._bNavToEntityViaList) {
320
- setTimeout(this._scrollToSelectedListItem.bind(this), 0);
326
+ setTimeout(this._fnBoundScrollToSelectedListItem, 0);
321
327
  }
322
328
  this._bNavToEntityViaList = false;
323
329
  },
@@ -432,8 +438,8 @@ sap.ui.define([
432
438
  * @override
433
439
  */
434
440
  onExit: function() {
435
- this._oCore.detachThemeChanged(this._scrollToSelectedListItem, this);
436
- this._oCore.detachLocalizationChanged(this._onLocalizationChange, this);
441
+ Theming.detachApplied(this._fnBoundScrollToSelectedListItem);
442
+ Localization.detachChange(this._fnBoundOnLocalizationChange);
437
443
  this.highlighter.destroy();
438
444
  },
439
445
 
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  var oModel = new JSONModel(aDemoApps);
45
45
  this.setModel(oModel);
46
46
 
47
- this.addCategoryClassToGridItems("sapUiDemoKitDemoAppsMainContent");
47
+ this.addCategoryClassToGridItems("sapUiDemoKitDemoAppsMain");
48
48
  }.bind(this));
49
49
  },
50
50
 
@@ -67,7 +67,7 @@ sap.ui.define([
67
67
  */
68
68
  addCategoryClassToGridItems(gridId) {
69
69
  this.byId(gridId).getItems().forEach(function(gridItem) {
70
- var cssClass = gridItem.data("demo-apps-category");
70
+ var cssClass = gridItem.data("demoAppsCategoryClass");
71
71
  gridItem.addStyleClass(cssClass);
72
72
  });
73
73
  },
@@ -41,7 +41,9 @@ sap.ui.define([
41
41
  iMajor,
42
42
  iMinor,
43
43
  sVersion,
44
- oVersions;
44
+ oVersions,
45
+ aNeoAppVersions = this._oNeoAppVersions || [],
46
+ versionFormat = new RegExp(/^(\d+\.)?(\d+\.)?(\*|\d+)$/);
45
47
 
46
48
  if (!(oAppInfo)) {
47
49
  return;
@@ -65,7 +67,10 @@ sap.ui.define([
65
67
  items : []
66
68
  };
67
69
 
68
- oVersions.items = this._oNeoAppVersions.reduce(function(result, oVersion) {
70
+ oVersions.items = aNeoAppVersions.reduce(function(result, oVersion) {
71
+ if (!versionFormat.test(oVersion.target.version)) {
72
+ return result;
73
+ }
69
74
  var sMajorMinorVersion = oVersion.target.version.split(".")[0] + "." + oVersion.target.version.split(".")[1];
70
75
 
71
76
  if (!result.some((o) => o.key == sMajorMinorVersion)) {
@@ -0,0 +1,79 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2024 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/documentation/sdk/controller/util/ResourcesInfo",
10
+ "sap/ui/documentation/sdk/model/formatter",
11
+ "sap/ui/util/openWindow",
12
+ "sap/ui/model/json/JSONModel"
13
+ ], function (BaseController, ResourcesInfo, formatter, openWindow, JSONModel) {
14
+ "use strict";
15
+
16
+ return BaseController.extend("sap.ui.documentation.sdk.controller.Resources", {
17
+
18
+ formatter: formatter,
19
+
20
+ /**
21
+ * Called when the controller is instantiated.
22
+ */
23
+ onInit: function () {
24
+ BaseController.prototype.onInit.call(this);
25
+
26
+ this._oRouter = this.getRouter();
27
+ this._oResourcesModel = new JSONModel();
28
+ this.setModel(this._oResourcesModel, "resources");
29
+
30
+ ResourcesInfo.getResourcesConfig().then(this.onResourceConfigLoaded.bind(this));
31
+
32
+ this._oRouter.getRoute("tools").attachPatternMatched(function() {
33
+ this._oRouter.navTo("resources");
34
+ }, this);
35
+
36
+ this._oRouter.getRoute("resources").attachPatternMatched(this.onPatternMatched, this);
37
+ },
38
+
39
+ /**
40
+ * Called when the configuration for tools are loaded.
41
+ * @param {object[]} aResourcesConfig - An array of objects where each object represents the configuration for a tool.
42
+ */
43
+ onResourceConfigLoaded: function (aResourcesConfig) {
44
+ var oData = {};
45
+
46
+ aResourcesConfig.forEach(function (oEntry) {
47
+ oData[oEntry.id] = oEntry;
48
+ }, this);
49
+
50
+ this._oResourcesModel.setData(oData);
51
+ this._oResourcesModel.setProperty("/_raw", aResourcesConfig);
52
+ },
53
+
54
+ /**
55
+ * Handles the press event of the card action button.
56
+ * Formats and opens the URL in a new window if it starts with "topic/".
57
+ *
58
+ * @param {sap.ui.base.Event} oEvent - The event object.
59
+ */
60
+ onButtonPress: function (oEvent) {
61
+ var sUrl = oEvent.getSource().data("href");
62
+
63
+ if (!sUrl) { return; }
64
+
65
+ if (sUrl.startsWith("topic/")) {
66
+ sUrl = formatter.formatHttpHrefForNewWindow(sUrl);
67
+ }
68
+
69
+ openWindow(sUrl, "_blank");
70
+ },
71
+
72
+ /**
73
+ * Called when the user navigates to this view.
74
+ */
75
+ onPatternMatched: function () {
76
+ this.hideMasterSide();
77
+ }
78
+ });
79
+ });
@@ -25,7 +25,8 @@ sap.ui.define([
25
25
  "sap/ui/documentation/sdk/util/Resources",
26
26
  "./config/sampleForwardingConfig",
27
27
  "sap/base/strings/capitalize",
28
- "sap/ui/core/Configuration"
28
+ "sap/ui/core/Configuration",
29
+ "sap/base/i18n/Localization"
29
30
  ], function(
30
31
  Element,
31
32
  EventBus,
@@ -46,7 +47,8 @@ sap.ui.define([
46
47
  ResourcesUtil,
47
48
  sampleForwardingConfig,
48
49
  capitalize,
49
- Configuration
50
+ Configuration,
51
+ Localization
50
52
  ) {
51
53
  "use strict";
52
54
 
@@ -75,7 +77,7 @@ sap.ui.define([
75
77
  showNewTab: false,
76
78
  rtaLoaded: false,
77
79
  density: this.getOwnerComponent().getContentDensityClass(),
78
- rtl: oConfiguration.getRTL(),
80
+ rtl: Localization.getRTL(),
79
81
  theme: oConfiguration.getTheme(),
80
82
  showWarning: false
81
83
  });
@@ -10,7 +10,7 @@ sap.ui.define([
10
10
  "sap/ui/documentation/sdk/controller/util/DocuInfo",
11
11
  "sap/ui/model/json/JSONModel",
12
12
  "sap/ui/documentation/sdk/controller/util/ControlsInfo",
13
- "sap/ui/documentation/sdk/controller/util/ToolsInfo",
13
+ "sap/ui/documentation/sdk/controller/util/ResourcesInfo",
14
14
  'sap/ui/documentation/sdk/model/libraryData'
15
15
  ], function (
16
16
  BaseController,
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  DocuInfo,
19
19
  JSONModel,
20
20
  ControlsInfo,
21
- ToolsInfo,
21
+ ResourcesInfo,
22
22
  libraryData
23
23
  ) {
24
24
  "use strict";
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  var RESOURCES_TYPES = {
27
27
  API: "api",
28
28
  TOPIC: "topic",
29
- TOOLS: "tools",
29
+ RESOURCES: "resources",
30
30
  ENTITY: "entity",
31
31
  DEMO_APPS: "demoApps"
32
32
  };
@@ -77,8 +77,8 @@ sap.ui.define([
77
77
  }
78
78
  };
79
79
 
80
- parsers[RESOURCES_TYPES.TOOLS] = {
81
- getData: ToolsInfo.getToolsConfig,
80
+ parsers[RESOURCES_TYPES.RESOURCES] = {
81
+ getData: ResourcesInfo.getResourcesConfig,
82
82
  formatNode: function (oNode) {
83
83
  return {
84
84
  name: oNode.text,
@@ -176,8 +176,8 @@ sap.ui.define([
176
176
  case RESOURCES_TYPES.DEMO_APPS:
177
177
  this._onDemoAppsData(oParams.data);
178
178
  break;
179
- case RESOURCES_TYPES.TOOLS:
180
- this._onToolsData(oParams.data);
179
+ case RESOURCES_TYPES.RESOURCES:
180
+ this._onResourcesData(oParams.data);
181
181
  break;
182
182
  }
183
183
  },
@@ -190,7 +190,6 @@ sap.ui.define([
190
190
  return DocuInfo.getDocuIndexPromise(this.getConfig());
191
191
  },
192
192
 
193
-
194
193
  /**
195
194
  * Populates the API Reference data
196
195
  * @private
@@ -243,11 +242,11 @@ sap.ui.define([
243
242
 
244
243
 
245
244
  /**
246
- * Populates the Tools data
245
+ * Populates the Resources data
247
246
  * @private
248
247
  */
249
- _onToolsData: function (oResult) {
250
- var sType = RESOURCES_TYPES.TOOLS;
248
+ _onResourcesData: function (oResult) {
249
+ var sType = RESOURCES_TYPES.RESOURCES;
251
250
 
252
251
  this._oData[sType] = formatNodes(oResult, sType);
253
252
  },
@@ -306,11 +306,12 @@ sap.ui.define([
306
306
  }
307
307
  },
308
308
 
309
- scrollToEntity: function (sSectionId, sSubSectionTitle) {
309
+ scrollToEntity: function (sSectionId, sEntityId) {
310
310
 
311
311
  var aFilteredSubSections,
312
312
  aSubSections,
313
- oSection;
313
+ oSection,
314
+ sSubSectionTitle;
314
315
 
315
316
  if (!sSectionId) {
316
317
  return;
@@ -325,10 +326,10 @@ sap.ui.define([
325
326
  }
326
327
 
327
328
  // If we have a target sub-section we will scroll to it else we will scroll directly to the section
328
- if (sSubSectionTitle) {
329
+ if (sEntityId) {
329
330
  // Let's ignore case when searching for the section especially like in this case
330
331
  // where sSubSectionTitle comes from the URL
331
- sSubSectionTitle = sSubSectionTitle.toLowerCase();
332
+ sSubSectionTitle = formatter.apiRefEntityName(sEntityId).toLowerCase();
332
333
 
333
334
  aSubSections = oSection.getSubSections();
334
335
  aFilteredSubSections = aSubSections.filter(function (oSubSection) {
@@ -4,31 +4,35 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- // Provides information about 'tools'.
7
+ // Provides information about 'resources'.
8
8
  sap.ui.define([],
9
9
  function () {
10
10
  "use strict";
11
11
 
12
- var aTools = [
12
+ var aResources = [
13
+ // #1 Category: Featured
13
14
  {
14
- "id": "uiThemeDesigner",
15
- "text": "UI Theme Designer",
16
- "href": "https://www.sap.com/community/topics/ui-theme-designer.html"
15
+ "id": "iconExplorer",
16
+ "text": "Icon Explorer",
17
+ "href": "test-resources/sap/m/demokit/iconExplorer/webapp/index.html"
17
18
  },
18
19
  {
19
- "id": "businessApplicationStudio",
20
- "text": "SAP Business Application Studio",
21
- "href": "http://www.sap.com/appstudio"
20
+ "id": "accessibilityGuide",
21
+ "text": "Accessibility Guide",
22
+ "href": "test-resources/sap/m/demokit/accessibilityGuide/webapp/index.html",
23
+ "hideOnPhone": true
22
24
  },
25
+
26
+ // #2 Category: Development Tools
23
27
  {
24
- "id": "ui5Tooling",
28
+ "id": "tooling",
25
29
  "text": "UI5 Tooling",
26
30
  "href": "https://github.com/SAP/ui5-tooling"
27
31
  },
28
32
  {
29
- "id": "ui5Inspector",
30
- "text": "UI5 Inspector",
31
- "href": "https://github.com/SAP/ui5-inspector"
33
+ "id": "fioriTools",
34
+ "text": "SAP Fiori tools",
35
+ "href": "https://help.sap.com/docs/SAP_FIORI_tools"
32
36
  },
33
37
  {
34
38
  "id": "cardExplorer",
@@ -36,14 +40,23 @@ sap.ui.define([],
36
40
  "href": "test-resources/sap/ui/integration/demokit/cardExplorer/index.html"
37
41
  },
38
42
  {
39
- "id": "supportAssistant",
40
- "text": "Support Assistant",
41
- "href": "topic/57ccd7d7103640e3a187ed55e1d2c163"
43
+ "id": "fpmExplorer",
44
+ "text": "Flexible Programming Model Explorer",
45
+ "href": "test-resources/sap/fe/core/fpmExplorer/index.html#/overview/introduction",
46
+ "isDistributionScope": true,
47
+ "hideOnPhone": true
42
48
  },
43
49
  {
44
- "id": "iconExplorer",
45
- "text": "Icon Explorer",
46
- "href": "test-resources/sap/m/demokit/iconExplorer/webapp/index.html"
50
+ "id": "businessAppStudio",
51
+ "text": "SAP Business Application Studio",
52
+ "href": "https://pages.community.sap.com/topics/business-application-studio"
53
+ },
54
+
55
+ // #3 Category: Customising
56
+ {
57
+ "id": "themeDesigner",
58
+ "text": "UI Theme Designer",
59
+ "href": "https://pages.community.sap.com/topics/ui-theme-designer"
47
60
  },
48
61
  {
49
62
  "id": "themeParameterToolbox",
@@ -51,46 +64,41 @@ sap.ui.define([],
51
64
  "href": "test-resources/sap/m/demokit/theming/webapp/index.html"
52
65
  },
53
66
  {
54
- "id": "ui5WebComponents",
55
- "text": "UI5 Web Components",
56
- "href": "https://sap.github.io/ui5-webcomponents/"
57
- },
58
- {
59
- "id": "liveEditor",
60
- "text": "Live Editor",
61
- "href": "liveEditor",
62
- "hideOnPhone": true
63
- },
64
- {
65
- "id": "fioriTools",
66
- "text": "SAP Fiori Tools",
67
- "href": "https://help.sap.com/viewer/product/SAP_FIORI_tools/Latest/en-US"
67
+ "id": "flexibility",
68
+ "text": "SAPUI5 Flexibility",
69
+ "href": "https://help.sap.com/docs/UI5_FLEXIBILITY"
68
70
  },
71
+
72
+ // #4 Category: Troubleshooting
69
73
  {
70
- "id": "flexibleProgrammingModelExplorer",
71
- "text": "Flexible Programming Model Explorer",
72
- "href": "test-resources/sap/fe/core/fpmExplorer/index.html#/overview/introduction",
73
- "isDistributionScope": true,
74
- "hideOnPhone": true
74
+ "id": "inspector",
75
+ "text": "UI5 Inspector",
76
+ "href": "https://sap.github.io/ui5-inspector/"
75
77
  },
76
78
  {
77
- "id": "accessibilityGuide",
78
- "text": "Accessibility Guide",
79
- "href": "test-resources/sap/m/demokit/accessibilityGuide/webapp/index.html",
80
- "hideOnPhone": true
79
+ "id": "supportAssistant",
80
+ "text": "Support Assistant",
81
+ "href": "topic/57ccd7d7103640e3a187ed55e1d2c163"
81
82
  },
83
+
84
+ // #5 Category: Testing
82
85
  {
83
- "id": "ui5TestRecorder",
86
+ "id": "testRecorder",
84
87
  "text": "Test Recorder",
85
88
  "href": "topic/2535ef9272064cb6bd6b44e5402d531d",
86
89
  "hideOnPhone": true
90
+ },
91
+ {
92
+ "id": "wdi5",
93
+ "text": "wdi5",
94
+ "href": "https://ui5-community.github.io/wdi5/#/"
87
95
  }
88
96
  ];
89
97
 
90
98
  return {
91
- getToolsConfig: function () {
99
+ getResourcesConfig: function () {
92
100
  // return promise to be consistent with other resource utils
93
- return Promise.resolve(aTools);
101
+ return Promise.resolve(aResources);
94
102
  }
95
103
  };
96
104
 
@@ -24,6 +24,7 @@ sap.ui.define(["sap/ui/thirdparty/URI"], function(URI) {
24
24
  /^(\/)?sitemap\//,
25
25
  /\/sitemap$/,
26
26
  /^(\/)?demoapps/,
27
+ /^(\/)?resources$/,
27
28
  /^(\/)?tools/,
28
29
  /^(\/)?news\//,
29
30
  /\/news$/,
@@ -1413,79 +1413,6 @@ html:not(.sapUiTheme-sap_belize_hcw):not(.sapUiTheme-sap_belize_hcb):not(.sapUiT
1413
1413
  }
1414
1414
  }
1415
1415
 
1416
- /* ==========================================================================
1417
- Tools Page Header styles
1418
- ========================================================================== */
1419
- .sapUiDemokit .sapMText.sapUiDocumentationToolsHeaderText {
1420
- top: 2.5rem;
1421
- left: 0;
1422
- font-size: 3rem !important;
1423
- margin-left: -0.2rem;
1424
- position: absolute;
1425
- padding-left: 2rem;
1426
- color: #ffffff;
1427
- text-shadow: 0 0 0.125rem #000000;
1428
- }
1429
-
1430
- /*SMALL*/
1431
- @media (max-width: 64rem) {
1432
- .sapUiDemokit .sapMText.sapUiDocumentationToolsHeaderText {
1433
- top: 1.25rem;
1434
- font-size: 1.625rem !important;
1435
- padding-left: 1rem;
1436
- margin-left: -0.0625rem;
1437
- }
1438
- }
1439
-
1440
- /*XTRA LARGE*/
1441
- @media (min-width: 90rem) {
1442
- .sapUiDemokit .sapMText.sapUiDocumentationToolsHeaderText {
1443
- top: 2.5rem;
1444
- font-size: 4rem !important;
1445
- padding-left: 3rem;
1446
- }
1447
- }
1448
-
1449
- .sapUiDemokit .sapMText.demokitInitialPagesBlueText {
1450
- color: #0070b1;
1451
- }
1452
-
1453
- .sapUiDemokit .toolsPageImage {
1454
- width: 100%;
1455
- }
1456
-
1457
- .sapUiDemokit .threeColumnLayoutCard {
1458
- height: 25rem;
1459
- }
1460
-
1461
- .sapUiDemokit .toolspageCardInfo {
1462
- display: block;
1463
- }
1464
-
1465
- @media (min-width: 1440px) {
1466
- .sapUiDemokit .toolpageResponsiveMargins {
1467
- margin: 1rem 2rem 0 2rem;
1468
- }
1469
- }
1470
-
1471
- @media (min-width: 1024px) and (max-width: 1439px) {
1472
- .sapUiDemokit .toolpageResponsiveMargins {
1473
- margin: 1rem 1rem 0 1rem;
1474
- }
1475
- }
1476
-
1477
- @media (max-width: 1024px) {
1478
- .sapUiDemokit .toolpageResponsiveMargins {
1479
- margin-top: 1rem;
1480
- }
1481
- }
1482
-
1483
- @media (min-width: 600px) and (max-width: 1439px) {
1484
- .sapUiDemokit .threeColumnLayoutCard {
1485
- height: 22rem;
1486
- }
1487
- }
1488
-
1489
1416
  /* FireFox does not handle aspect ratio optimization so this must be disabled for it only by resetting the element position */
1490
1417
  html[data-sap-ui-browser^="ff"] .sapUiDemokit .landingImage {
1491
1418
  position: relative;
@@ -25,6 +25,14 @@
25
25
  }
26
26
  };
27
27
 
28
+ const loadComponentModule = function(sCompName) {
29
+ return new Promise((resolve) => {
30
+ const componentModule =
31
+ `${sCompName.replace(/\./g, "/")}/Component`;
32
+ sap.ui.require([componentModule], resolve, resolve);
33
+ });
34
+ };
35
+
28
36
  window.onInit = function() {
29
37
  postMessageToOrigin({
30
38
  type: "LOAD"
@@ -34,8 +42,9 @@
34
42
  "sap/ui/core/ComponentContainer",
35
43
  "sap/ui/core/Component",
36
44
  "sap/ui/documentation/library",
37
- "sap/base/Log"
38
- ], function (Core, ComponentContainer, Component, library, Log) {
45
+ "sap/base/Log",
46
+ "sap/base/i18n/Localization"
47
+ ], function (Core, ComponentContainer, Component, library, Log, Localization) {
39
48
  var setDensityClass = function(sDensityClass) {
40
49
  var sBodyDensityClass = Array.prototype.find.call(document.body.classList, function(el){
41
50
  return el.includes("sapUiSize");
@@ -83,7 +92,7 @@
83
92
  loadInfo(),
84
93
  Core.loadLibrary("sap.ui.fl", {async: true}),
85
94
  Core.loadLibrary("sap.ui.rta", {async: true})
86
- ]).then(function(){
95
+ ]).then(async function(){
87
96
 
88
97
  Log.info("Samples paths added successfully");
89
98
  var sCompId = 'sampleComp-' + sSampleId;
@@ -114,6 +123,9 @@
114
123
  });
115
124
  });
116
125
 
126
+ // preprocessing: load Component.js before the factory call to prevent 404s to the "Component-preload.js" (does not exist in demokit samples)
127
+ await loadComponentModule(sCompName);
128
+
117
129
  Component.create({
118
130
  id: sCompId,
119
131
  name: sCompName
@@ -160,7 +172,7 @@
160
172
  data: {
161
173
  "density": document.body.classList[1],
162
174
  "theme": Core.getConfiguration().getTheme(),
163
- "RTL": Core.getConfiguration().getRTL()
175
+ "RTL": Localization.getRTL()
164
176
  }
165
177
  });
166
178
  } else if (eMessage.data.reason === "set") {
@@ -306,7 +306,14 @@
306
306
  "pattern": "tools",
307
307
  "name": "tools",
308
308
  "target": [
309
- "tools"
309
+ "resources"
310
+ ]
311
+ },
312
+ {
313
+ "pattern": "resources",
314
+ "name": "resources",
315
+ "target": [
316
+ "resources"
310
317
  ]
311
318
  },
312
319
  {
@@ -444,10 +451,10 @@
444
451
  "viewLevel": 2,
445
452
  "viewId": "demoApps"
446
453
  },
447
- "tools": {
448
- "viewName": "Tools",
454
+ "resources": {
455
+ "viewName": "Resources",
449
456
  "viewLevel": 2,
450
- "viewId": "tools"
457
+ "viewId": "resources"
451
458
  },
452
459
  "news": {
453
460
  "viewName": "News",
@@ -3,7 +3,7 @@
3
3
 
4
4
  "App.controller.js": "sap.ui.define([\n \"sap/ui/core/mvc/Controller\",\n \"sap/m/MessageToast\"\n ], function (Controller, MessageToast) {\n \"use strict\";\n return Controller.extend(\"HelloWorld.App\", {\n onShowHello : function () {\n MessageToast.show(\"Hello World\");\n }\n });\n });",
5
5
 
6
- "index.js": "sap.ui.getCore().attachInit(function () {\n sap.ui.require([\"sap/ui/core/mvc/XMLView\"], function(XMLView) {\n XMLView.create({\n viewName: \"HelloWorld.App\"}).then(function(myView) {\n myView.placeAt(\"content\");\n });\n });\n});",
6
+ "index.js": "sap.ui.require([\"sap/ui/core/Core\", \"sap/ui/core/mvc/XMLView\"], function(Core, XMLView) {\n \"use strict\";\n\n Core.ready()\n .then(function() {\n return XMLView.create({\n viewName: \"HelloWorld.App\"\n })\n .then(function(oView) {\n oView.placeAt(\"content\");\n });\n });\n});",
7
7
 
8
8
  "index.html": "// the html part of the sample is non-editable\n\n<!DOCTYPE html>\n <html>\n <head>\n <title>OpenUI5 Hello World App</title>\n <script\n id=\"sap-ui-bootstrap\"\n src=\"resources/sap-ui-core.js\"\n data-sap-ui-theme=\"sap_horizon\"\n data-sap-ui-libs=\"sap.m\"\n data-sap-ui-resourceroots='{\"HelloWorld\": \"./\"}'\n data-sap-ui-onInit=\"module:HelloWorld/index\"\n displayBlock=\"true\">\n <&sol;script>\n </head>\n <body class=\"sapUiBody\" id=\"content\">\n </body>\n </html>"
9
9
  }
@@ -258,7 +258,7 @@ sap.ui.define([
258
258
  * @returns {string} the formatted link
259
259
  */
260
260
  formatHttpHrefForNewWindow: function (sHref) {
261
- if (window['sap-ui-documentation-static'] && !/^https?:\/\//.test(sHref)) {
261
+ if (sHref && window['sap-ui-documentation-static'] && !/^https?:\/\//.test(sHref)) {
262
262
  sHref = "#/" + sHref;
263
263
  }
264
264
  return sHref;
@@ -289,7 +289,7 @@ sap.ui.define([
289
289
  * @returns {boolean} true if the card is visible
290
290
  * @protected
291
291
  */
292
- formatToolCardVisibility: function (oData) {
292
+ formatResourceCardVisibility: function (oData) {
293
293
  if (!oData) {
294
294
  return false;
295
295
  }