@openui5/sap.ui.documentation 1.151.0 → 1.152.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 (66) hide show
  1. package/THIRDPARTY.txt +5 -5
  2. package/package.json +7 -7
  3. package/src/sap/ui/documentation/.library +1 -1
  4. package/src/sap/ui/documentation/library.js +2 -2
  5. package/src/sap/ui/documentation/messagebundle.properties +6 -0
  6. package/src/sap/ui/documentation/messagebundle_ar.properties +3 -0
  7. package/src/sap/ui/documentation/messagebundle_bg.properties +3 -0
  8. package/src/sap/ui/documentation/messagebundle_ca.properties +3 -0
  9. package/src/sap/ui/documentation/messagebundle_cnr.properties +3 -0
  10. package/src/sap/ui/documentation/messagebundle_cs.properties +3 -0
  11. package/src/sap/ui/documentation/messagebundle_cy.properties +3 -0
  12. package/src/sap/ui/documentation/messagebundle_da.properties +3 -0
  13. package/src/sap/ui/documentation/messagebundle_de.properties +3 -0
  14. package/src/sap/ui/documentation/messagebundle_el.properties +3 -0
  15. package/src/sap/ui/documentation/messagebundle_en.properties +3 -0
  16. package/src/sap/ui/documentation/messagebundle_en_GB.properties +3 -0
  17. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +3 -0
  18. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +3 -0
  19. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +3 -0
  20. package/src/sap/ui/documentation/messagebundle_es.properties +3 -0
  21. package/src/sap/ui/documentation/messagebundle_es_MX.properties +3 -0
  22. package/src/sap/ui/documentation/messagebundle_et.properties +3 -0
  23. package/src/sap/ui/documentation/messagebundle_fi.properties +3 -0
  24. package/src/sap/ui/documentation/messagebundle_fr.properties +3 -0
  25. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +3 -0
  26. package/src/sap/ui/documentation/messagebundle_hi.properties +3 -0
  27. package/src/sap/ui/documentation/messagebundle_hr.properties +3 -0
  28. package/src/sap/ui/documentation/messagebundle_hu.properties +3 -0
  29. package/src/sap/ui/documentation/messagebundle_id.properties +3 -0
  30. package/src/sap/ui/documentation/messagebundle_it.properties +3 -0
  31. package/src/sap/ui/documentation/messagebundle_iw.properties +3 -0
  32. package/src/sap/ui/documentation/messagebundle_ja.properties +3 -0
  33. package/src/sap/ui/documentation/messagebundle_kk.properties +3 -0
  34. package/src/sap/ui/documentation/messagebundle_ko.properties +3 -0
  35. package/src/sap/ui/documentation/messagebundle_lt.properties +3 -0
  36. package/src/sap/ui/documentation/messagebundle_lv.properties +3 -0
  37. package/src/sap/ui/documentation/messagebundle_mk.properties +3 -0
  38. package/src/sap/ui/documentation/messagebundle_ms.properties +3 -0
  39. package/src/sap/ui/documentation/messagebundle_nl.properties +3 -0
  40. package/src/sap/ui/documentation/messagebundle_no.properties +3 -0
  41. package/src/sap/ui/documentation/messagebundle_pl.properties +3 -0
  42. package/src/sap/ui/documentation/messagebundle_pt.properties +3 -0
  43. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +3 -0
  44. package/src/sap/ui/documentation/messagebundle_ro.properties +3 -0
  45. package/src/sap/ui/documentation/messagebundle_ru.properties +3 -0
  46. package/src/sap/ui/documentation/messagebundle_sh.properties +3 -0
  47. package/src/sap/ui/documentation/messagebundle_sk.properties +3 -0
  48. package/src/sap/ui/documentation/messagebundle_sl.properties +3 -0
  49. package/src/sap/ui/documentation/messagebundle_sr.properties +3 -0
  50. package/src/sap/ui/documentation/messagebundle_sv.properties +3 -0
  51. package/src/sap/ui/documentation/messagebundle_th.properties +3 -0
  52. package/src/sap/ui/documentation/messagebundle_tr.properties +3 -0
  53. package/src/sap/ui/documentation/messagebundle_uk.properties +3 -0
  54. package/src/sap/ui/documentation/messagebundle_vi.properties +3 -0
  55. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +3 -0
  56. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +3 -0
  57. package/src/sap/ui/documentation/sdk/controller/App.controller.js +332 -342
  58. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +5 -1
  59. package/src/sap/ui/documentation/sdk/controller/Welcome.controller.js +1 -1
  60. package/src/sap/ui/documentation/sdk/controller/util/SearchRenderer.js +167 -0
  61. package/src/sap/ui/documentation/sdk/controller/util/UsageTracker.js +27 -14
  62. package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js +3 -3
  63. package/src/sap/ui/documentation/sdk/view/App.view.xml +202 -192
  64. package/src/sap/ui/documentation/themes/base/Documentation.less +26 -141
  65. package/src/sap/ui/documentation/themes/sap_belize_base/Documentation.less +0 -140
  66. package/src/sap/ui/documentation/sdk/view/GlobalSearchPicker.fragment.xml +0 -73
@@ -1057,7 +1057,11 @@ sap.ui.define([
1057
1057
  showIcon: true,
1058
1058
  showCloseButton: false,
1059
1059
  enableFormattedText: true
1060
- }).addStyleClass("sapUiTinyMarginBottom sapUiTinyMarginTop")
1060
+ }).addStyleClass("sapUiTinyMarginBottom sapUiTinyMarginTop"),
1061
+ new ObjectStatus({
1062
+ visible: oProperty.since !== undefined,
1063
+ text: oProperty.since ? "Since: " + oProperty.since : ""
1064
+ })
1061
1065
  ]
1062
1066
  })
1063
1067
  ]
@@ -79,7 +79,7 @@ sap.ui.define([
79
79
  * Navigates to the tutorial overview
80
80
  */
81
81
  onGetStarted: function () {
82
- this.getRouter().parse("topic/8b49fc198bf04b2d9800fc37fecbb218");
82
+ this.getRouter().navTo("topicId", {id: "8b49fc198bf04b2d9800fc37fecbb218"});
83
83
  },
84
84
 
85
85
  /**
@@ -0,0 +1,167 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ sap.ui.define([
7
+ "sap/f/gen/ui5/webcomponents_fiori/dist/SearchItem",
8
+ "sap/f/gen/ui5/webcomponents_fiori/dist/SearchItemGroup"
9
+ ], function (SearchItem, SearchItemGroup) {
10
+ "use strict";
11
+
12
+ /**
13
+ * Renders search results into a ShellBarSearch control (sap.f wrapper).
14
+ *
15
+ * The controller passes an already-resolved control and a resolved i18n bundle;
16
+ * this module owns the item-tree construction and population of the suggestions.
17
+ */
18
+
19
+ var CATEGORY_DEFS = [
20
+ { key: "apiref", labelKey: "SEARCH_SUGGESTIONS_API_SECTION_TITLE", countKey: "APILength" },
21
+ { key: "topics", labelKey: "SEARCH_SUGGESTIONS_DOCUMENTATION_SECTION_TITLE", countKey: "DocLength" },
22
+ { key: "entity", labelKey: "SEARCH_SUGGESTIONS_SAMPLES_SECTION_TITLE", countKey: "SamplesLength" },
23
+ { key: "external", labelKey: "SEARCH_SUGGESTIONS_EXTERNAL_SECTION_TITLE", countKey: "ExternalLength" }
24
+ ];
25
+
26
+ /**
27
+ * Creates a SearchItem whose matched query text is highlighted.
28
+ *
29
+ * The sap.f SearchItem wrapper does not expose the underlying web component's
30
+ * `highlightText` property, so it is applied directly to the custom element after
31
+ * each rendering. The delegate re-applies it on every render (the suggestions
32
+ * popover renders lazily and can re-render), keeping highlighting robust.
33
+ *
34
+ * The delegate is bound to the item instance and is released together with the item
35
+ * when it is destroyed via `destroyAggregation("items")`, so no explicit cleanup is
36
+ * needed. If the item is destroyed or invalidated before rendering completes,
37
+ * highlighting is silently skipped (no error thrown).
38
+ *
39
+ * @param {object} mSettings - SearchItem constructor settings
40
+ * @param {string} [sQuery] - The query text to highlight within the item text (cleared when falsy)
41
+ * @returns {sap.f.gen.ui5.webcomponents_fiori.dist.SearchItem} The created search item
42
+ */
43
+ function createHighlightedItem(mSettings, sQuery) {
44
+ var oSearchItem = new SearchItem(mSettings);
45
+ oSearchItem.addEventDelegate({
46
+ onAfterRendering: function () {
47
+ var oDomRef = oSearchItem.getDomRef();
48
+ if (oDomRef) {
49
+ oDomRef.highlightText = sQuery || "";
50
+ }
51
+ }
52
+ });
53
+ return oSearchItem;
54
+ }
55
+
56
+ return {
57
+ /**
58
+ * Populates the ShellBarSearch control with result items and opens it.
59
+ *
60
+ * @param {object} oCtrl - The fiori:ShellBarSearch UI5 control
61
+ * @param {Array} aItems - Top-N result items from SearchUtil
62
+ * @param {object} oCounts - { AllLength, APILength, DocLength, SamplesLength, ExternalLength }
63
+ * @param {object} oBundle - Resolved i18n resource bundle
64
+ * @param {boolean} bPhone - Whether the current viewport is phone-sized
65
+ * @param {object} [oSearchModel] - Optional searchData JSONModel
66
+ */
67
+ render: function (oCtrl, aItems, oCounts, oBundle, bPhone, oSearchModel) {
68
+ // The i18n bundle loads asynchronously; if a search is rendered before it
69
+ // resolves (App startup race), skip this render — a later keystroke/open
70
+ // re-renders once the bundle is ready.
71
+ if (!oBundle) { return; }
72
+
73
+ oCtrl.destroyAggregation("items");
74
+
75
+ var sQuery = oSearchModel ? (oSearchModel.getProperty("/query") || "") : "";
76
+
77
+ var sResultsHeader = aItems.length > 0
78
+ ? oBundle.getText("SEARCH_SUGGESTIONS_TITLE_ALL")
79
+ : oBundle.getText("SEARCH_SUGGESTIONS_NO_RESULTS");
80
+
81
+ // Section 1: top results (or no-data placeholder)
82
+ var oResultsGroup = new SearchItemGroup(bPhone ? { headerText: sResultsHeader } : {});
83
+
84
+ if (aItems.length > 0) {
85
+ aItems.forEach(function (oDataItem) {
86
+ var oSearchItem = createHighlightedItem({
87
+ text: oDataItem.summary ? oDataItem.title + ": " + oDataItem.summary : (oDataItem.title || "")
88
+ }, sQuery);
89
+ oSearchItem.data("_payload", { type: "result", item: oDataItem });
90
+ oResultsGroup.addItem(oSearchItem);
91
+ });
92
+
93
+ // "All" entry at the bottom of the results, navigating to the full search results page.
94
+ var oAllItem = createHighlightedItem({
95
+ text: oBundle.getText("SEARCH_SUGGESTIONS_ALL_SECTION_TITLE") + " (" + (oCounts.AllLength || 0) + ")"
96
+ });
97
+ oAllItem.data("_payload", { type: "allResults" });
98
+ oResultsGroup.addItem(oAllItem);
99
+ } else {
100
+ var oNoDataItem = createHighlightedItem({ text: oBundle.getText("SEARCH_SUGGESTIONS_NO_RESULTS") });
101
+ oNoDataItem.data("_payload", { type: "noData" });
102
+ oResultsGroup.addItem(oNoDataItem);
103
+ }
104
+
105
+ oCtrl.addAggregation("items", oResultsGroup);
106
+
107
+ // Section 2: per-category counts
108
+ var aCategoryDefs = CATEGORY_DEFS
109
+ .map(function (o) { return { key: o.key, labelKey: o.labelKey, count: oCounts[o.countKey] || 0 }; })
110
+ .filter(function (o) { return o.count > 0; });
111
+
112
+ if (aCategoryDefs.length > 0) {
113
+ var oCategoryGroup = new SearchItemGroup({
114
+ headerText: oBundle.getText("SEARCH_SUGGESTIONS_BY_CATEGORY_TITLE")
115
+ });
116
+ oCategoryGroup.addStyleClass("sapUiDemokitSearchCategoryGroup");
117
+ aCategoryDefs.forEach(function (oDef) {
118
+ var oCatItem = createHighlightedItem({
119
+ text: oBundle.getText(oDef.labelKey) + " (" + oDef.count + ")"
120
+ });
121
+ oCatItem.data("_payload", { type: "category", key: oDef.key });
122
+ oCategoryGroup.addItem(oCatItem);
123
+ });
124
+ oCtrl.addAggregation("items", oCategoryGroup);
125
+ }
126
+
127
+ if (oSearchModel && !bPhone) {
128
+ oSearchModel.setProperty("/messageAreaText", sResultsHeader);
129
+ }
130
+ },
131
+
132
+ /**
133
+ * Populates the ShellBarSearch with the category list only (all counts zero).
134
+ * Used on phone when the popup opens before any search has been performed,
135
+ * matching the old GlobalSearchPicker's initial state.
136
+ *
137
+ * @param {object} oCtrl - The fiori:ShellBarSearch UI5 control
138
+ * @param {object} oBundle - Resolved i18n resource bundle
139
+ */
140
+ renderEmptyState: function (oCtrl, oBundle) {
141
+ if (!oBundle) { return; }
142
+
143
+ oCtrl.destroyAggregation("items");
144
+
145
+ var oCategoryGroup = new SearchItemGroup({
146
+ headerText: oBundle.getText("SEARCH_SUGGESTIONS_BY_CATEGORY_TITLE")
147
+ });
148
+ CATEGORY_DEFS.forEach(function (oDef) {
149
+ var oItem = createHighlightedItem({
150
+ text: oBundle.getText(oDef.labelKey) + " (0)"
151
+ });
152
+ oItem.data("_payload", { type: "category", key: oDef.key });
153
+ oCategoryGroup.addItem(oItem);
154
+ });
155
+ oCtrl.addAggregation("items", oCategoryGroup);
156
+ },
157
+
158
+ /**
159
+ * Removes all items from the ShellBarSearch control.
160
+ *
161
+ * @param {object} oCtrl - The fiori:ShellBarSearch UI5 control
162
+ */
163
+ clear: function (oCtrl) {
164
+ oCtrl.destroyAggregation("items");
165
+ }
166
+ };
167
+ });
@@ -20,22 +20,20 @@ sap.ui.define(
20
20
 
21
21
  const aNotFoundViews = ["sap.ui.documentation.sdk.view.NotFound", "sap.ui.documentation.sdk.view.SampleNotFound"];
22
22
 
23
- var PageInfo = function(oRouteConfig, oRouter, sURL, referrer) {
23
+ var PageInfo = function(oRouteConfig, oRouter, sURL, sReferrer) {
24
24
  sURL = sURL || window.location.href;
25
- referrer = referrer || document.referrer;
25
+ sReferrer = sReferrer || document.referrer;
26
26
  const oURL = new URL(sURL),
27
27
  sSectionTitle = oRouter.getRouteTopLevelTitle(oRouteConfig);
28
28
 
29
- var sHash = oURL.hash.replace(/\.html/, '');
30
-
31
29
  this.url = sURL;
32
- this.name = oURL.pathname + sHash;
30
+ this.name = composePageName(oURL);
33
31
  this.section = sSectionTitle || "/";
34
32
  this.title = undefined;
35
33
  this.language = oUserLanguageTag.language;
36
34
  this.locale = oUserLanguageTag.toString();
37
35
  this.country = "glo";
38
- this.referrer = document.referrer;
36
+ this.referrer = sReferrer;
39
37
  };
40
38
 
41
39
  PageInfo.prototype.toObject = function() {
@@ -74,6 +72,7 @@ sap.ui.define(
74
72
  this._oRouter = oComponent.getRouter();
75
73
  this._oConfig = oComponent.getConfig();
76
74
  this._oLastRouteParameters = null;
75
+ this._sLastLoggedPageUrl = null;
77
76
  this._isStarted = false;
78
77
  },
79
78
  start: function(sVersionName, aRouterEventsToLog) {
@@ -98,6 +97,7 @@ sap.ui.define(
98
97
  Localization.detachChange(this._updateLanguageTag);
99
98
  this._isStarted = false;
100
99
  this._oLastRouteParameters = null;
100
+ this._sLastLoggedPageUrl = null;
101
101
  },
102
102
  _initRemoteServiceConnector: function(sVersionName) {
103
103
  window.adobeDataLayer = window.adobeDataLayer || [];
@@ -142,6 +142,7 @@ sap.ui.define(
142
142
  this._oLastRouteParameters = oEventParameters;
143
143
  this._getPageInfoFromRoute(oEventParameters, function(oPageInfo) {
144
144
  this._logPageVisit(oPageInfo);
145
+ this._sLastLoggedPageUrl = oPageInfo.url;
145
146
  this._publishLoggedInfo(true);
146
147
  }.bind(this));
147
148
  },
@@ -171,7 +172,7 @@ sap.ui.define(
171
172
  },
172
173
  _getPageInfoFromRoute: function(oEventParameters, fnCallback) {
173
174
  var oRouteConfig = oEventParameters.config,
174
- oPageInfo = new PageInfo(oRouteConfig, this._oRouter);
175
+ oPageInfo = new PageInfo(oRouteConfig, this._oRouter, window.location.href, this._sLastLoggedPageUrl);
175
176
  this._getPageTitleFromRoute(oEventParameters, function(sPageTitle) {
176
177
  oPageInfo.title = sPageTitle;
177
178
  fnCallback(oPageInfo);
@@ -253,7 +254,7 @@ sap.ui.define(
253
254
  * Triggered when router does not find the route
254
255
  */
255
256
  _logPageNotFound: function (sHash) {
256
- sHash = sHash.replace(/\.html/, '');
257
+ const sNormalized = normalizeHash(sHash) || "/";
257
258
  this._addToLogs({
258
259
  event: "errorPage",
259
260
  page: {
@@ -263,7 +264,7 @@ sap.ui.define(
263
264
  error: {
264
265
  type: 404,
265
266
  pageUrl: window.location.href,
266
- pageName: sHash,
267
+ pageName: sNormalized,
267
268
  description: "page not found"
268
269
  }
269
270
  });
@@ -274,14 +275,13 @@ sap.ui.define(
274
275
  _logPageDataNotFound: function () {
275
276
  var oPageInfo;
276
277
  if (this._oLastRouteParameters) {
277
- var oRouteConfig = this._oRouter.getRouteConfig(this._oLastRouteParameters.name);
278
+ const oRouteConfig = this._oRouter.getRouteConfig(this._oLastRouteParameters.name);
278
279
  oPageInfo = new PageInfo(oRouteConfig, this._oRouter);
279
280
  } else {
280
- var oURL = new URL(window.location.href);
281
- var sHash = oURL.hash.replace(/\.html/, '');
281
+ const oURL = new URL(window.location.href);
282
282
  oPageInfo = {
283
- url: window.location.href,
284
- name: oURL.pathname + sHash,
283
+ url: oURL.href,
284
+ name: composePageName(oURL),
285
285
  section: "/"
286
286
  };
287
287
  }
@@ -358,6 +358,19 @@ sap.ui.define(
358
358
  }
359
359
  );
360
360
 
361
+ function normalizeHash(sHash) {
362
+ sHash = sHash.replace(/\.html/, '');
363
+ return sHash === "/" ? "" : sHash;
364
+ }
365
+
366
+ function composePageName(oURL) {
367
+ const sHash = normalizeHash(oURL.hash.replace(/^#/, ''));
368
+ if (sHash) {
369
+ return oURL.pathname + "#" + sHash;
370
+ }
371
+ return oURL.pathname;
372
+ }
373
+
361
374
  return UsageTracker;
362
375
  }
363
376
  );
@@ -998,10 +998,10 @@ var hljs = (function () {
998
998
  * @param {string} message
999
999
  */
1000
1000
  const deprecated = (version, message) => {
1001
- if (seenDeprecations[`1.151.0/${message}`]) return;
1001
+ if (seenDeprecations[`1.152.0/${message}`]) return;
1002
1002
 
1003
- console.log(`Deprecated as of 1.151.0. ${message}`);
1004
- seenDeprecations[`1.151.0/${message}`] = true;
1003
+ console.log(`Deprecated as of 1.152.0. ${message}`);
1004
+ seenDeprecations[`1.152.0/${message}`] = true;
1005
1005
  };
1006
1006
 
1007
1007
  /* eslint-disable no-throw-literal */