@openui5/sap.ui.documentation 1.145.1 → 1.147.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 (68) hide show
  1. package/REUSE.toml +0 -51
  2. package/THIRDPARTY.txt +6 -50
  3. package/package.json +7 -7
  4. package/src/sap/ui/documentation/.library +1 -1
  5. package/src/sap/ui/documentation/LightTable.js +20 -46
  6. package/src/sap/ui/documentation/ObjectPageSection.js +108 -0
  7. package/src/sap/ui/documentation/ObjectPageSubSection.js +114 -15
  8. package/src/sap/ui/documentation/Row.js +146 -7
  9. package/src/sap/ui/documentation/library.js +2 -2
  10. package/src/sap/ui/documentation/messagebundle.properties +12 -0
  11. package/src/sap/ui/documentation/messagebundle_de.properties +1 -1
  12. package/src/sap/ui/documentation/messagebundle_en.properties +2 -2
  13. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +3 -0
  14. package/src/sap/ui/documentation/sdk/Component.js +6 -0
  15. package/src/sap/ui/documentation/sdk/controller/App.controller.js +1 -1
  16. package/src/sap/ui/documentation/sdk/controller/Code.controller.js +1 -0
  17. package/src/sap/ui/documentation/sdk/controller/ErrorHandler.js +1 -0
  18. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +10 -5
  19. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +525 -17
  20. package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +1 -0
  21. package/src/sap/ui/documentation/sdk/controller/util/CookiesConsentManager.js +1 -0
  22. package/src/sap/ui/documentation/sdk/controller/util/ResourcesInfo.js +5 -0
  23. package/src/sap/ui/documentation/sdk/controller/util/UsageTracker.js +1 -0
  24. package/src/sap/ui/documentation/sdk/cookieSettingsDialog/controller/CookieSettingsDialog.controller.js +1 -0
  25. package/src/sap/ui/documentation/sdk/cookieSettingsDialog/view/CookieSettingsDialog.fragment.xml +5 -5
  26. package/src/sap/ui/documentation/sdk/css/style.css +23 -0
  27. package/src/sap/ui/documentation/sdk/index.js +6 -0
  28. package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js +3 -3
  29. package/src/sap/ui/documentation/sdk/view/AboutDialog.fragment.xml +6 -6
  30. package/src/sap/ui/documentation/sdk/view/ApiDetailInitial.view.xml +2 -2
  31. package/src/sap/ui/documentation/sdk/view/ApiMaster.view.xml +6 -6
  32. package/src/sap/ui/documentation/sdk/view/App.view.xml +11 -11
  33. package/src/sap/ui/documentation/sdk/view/ChangeVersionDialog.fragment.xml +4 -4
  34. package/src/sap/ui/documentation/sdk/view/Code.view.xml +16 -16
  35. package/src/sap/ui/documentation/sdk/view/Controls.view.xml +2 -2
  36. package/src/sap/ui/documentation/sdk/view/ControlsMaster.view.xml +6 -6
  37. package/src/sap/ui/documentation/sdk/view/Entity.view.xml +3 -3
  38. package/src/sap/ui/documentation/sdk/view/FioriDevelopmentRowSAPUI5.fragment.xml +1 -1
  39. package/src/sap/ui/documentation/sdk/view/Footer.fragment.xml +2 -2
  40. package/src/sap/ui/documentation/sdk/view/FooterMaster.fragment.xml +1 -1
  41. package/src/sap/ui/documentation/sdk/view/GlobalSearchPicker.fragment.xml +6 -6
  42. package/src/sap/ui/documentation/sdk/view/Group.view.xml +1 -1
  43. package/src/sap/ui/documentation/sdk/view/LiveEditor.view.xml +4 -4
  44. package/src/sap/ui/documentation/sdk/view/News.view.xml +4 -4
  45. package/src/sap/ui/documentation/sdk/view/NewsPopover.fragment.xml +4 -4
  46. package/src/sap/ui/documentation/sdk/view/NotFound.view.xml +1 -1
  47. package/src/sap/ui/documentation/sdk/view/ReleaseDialog.fragment.xml +1 -1
  48. package/src/sap/ui/documentation/sdk/view/ReleaseNotes.view.xml +1 -1
  49. package/src/sap/ui/documentation/sdk/view/Resources.view.xml +24 -1
  50. package/src/sap/ui/documentation/sdk/view/Sample.view.xml +15 -15
  51. package/src/sap/ui/documentation/sdk/view/SampleNotFound.view.xml +2 -2
  52. package/src/sap/ui/documentation/sdk/view/SearchPage.view.xml +9 -9
  53. package/src/sap/ui/documentation/sdk/view/Sitemap.view.xml +1 -1
  54. package/src/sap/ui/documentation/sdk/view/SubApiDetail.view.xml +76 -77
  55. package/src/sap/ui/documentation/sdk/view/TopicDetail.view.xml +3 -3
  56. package/src/sap/ui/documentation/sdk/view/TopicDetailInitial.view.xml +4 -4
  57. package/src/sap/ui/documentation/sdk/view/TopicMaster.view.xml +5 -5
  58. package/src/sap/ui/documentation/sdk/view/VersionNotFound.view.xml +3 -3
  59. package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +13 -13
  60. package/src/sap/ui/documentation/sdk/view/WelcomeCustomRowOpenUI5.fragment.xml +1 -1
  61. package/src/sap/ui/documentation/sdk/view/appSettingsDialog.fragment.xml +2 -2
  62. package/src/sap/ui/documentation/sdk/view/globalSettingsDialog.fragment.xml +2 -2
  63. package/src/sap/ui/documentation/sdk/view/viewSettingsDialog.fragment.xml +1 -1
  64. package/src/sap/ui/documentation/sdk/view/warningSampleDialog.fragment.xml +1 -1
  65. package/src/sap/ui/documentation/themes/base/Documentation.less +4 -4
  66. package/src/sap/ui/documentation/themes/base/LightTable.less +29 -0
  67. package/src/sap/ui/documentation/themes/sap_belize_base/Documentation.less +4 -4
  68. package/src/sap/ui/documentation/themes/sap_horizon_dark/Documentation.less +1 -1
package/REUSE.toml CHANGED
@@ -613,57 +613,6 @@ SPDX-License-Identifier = "MIT"
613
613
  SPDX-FileComment = "these files belong to: hammer.js"
614
614
 
615
615
 
616
- # Library: sap.ui.webc.common:
617
-
618
- [[annotations]]
619
- path = [
620
- "src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/**",
621
- "src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theming/**",
622
- "src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/localization/**",
623
- "src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/**",
624
- "src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/**",
625
- "src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-business-suite/**"
626
- ]
627
- precedence = "aggregate"
628
- SPDX-FileCopyrightText = "SAP"
629
- SPDX-License-Identifier = "Apache-2.0"
630
- SPDX-FileComment = "these files belong to: UI5 Web Components"
631
-
632
- [[annotations]]
633
- path = "src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/lit-html/**"
634
- precedence = "aggregate"
635
- SPDX-FileCopyrightText = "Google LLC"
636
- SPDX-License-Identifier = "BSD-3-Clause"
637
- SPDX-FileComment = "these files belong to: lit-html"
638
-
639
-
640
- # Library: sap.ui.webc.fiori:
641
-
642
- [[annotations]]
643
- path = "src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/**"
644
- precedence = "aggregate"
645
- SPDX-FileCopyrightText = "SAP"
646
- SPDX-License-Identifier = "Apache-2.0"
647
- SPDX-FileComment = "these files belong to: UI5 Web Components"
648
-
649
- [[annotations]]
650
- path = "src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/lib/zxing.js"
651
- precedence = "aggregate"
652
- SPDX-FileCopyrightText = "2005 Sun Microsystems, Inc.; 2010-2014 University of Manchester; 2010-2015 Stian Soiland-Reyes; 2015 Peter Hull"
653
- SPDX-License-Identifier = "Apache-2.0"
654
- SPDX-FileComment = "these files belong to: ZXing"
655
-
656
-
657
- # Library: sap.ui.webc.main:
658
-
659
- [[annotations]]
660
- path = "src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/**"
661
- precedence = "aggregate"
662
- SPDX-FileCopyrightText = "SAP"
663
- SPDX-License-Identifier = "Apache-2.0"
664
- SPDX-FileComment = "these files belong to: UI5 Web Components"
665
-
666
-
667
616
  # Outside of Libraries:
668
617
 
669
618
  [[annotations]]
package/THIRDPARTY.txt CHANGED
@@ -6,31 +6,31 @@ The full text of all referenced licenses is appended at the end of this file.
6
6
 
7
7
  Library: sap.f:
8
8
 
9
- Component: UI5 Web Components, version: 2.15.0
9
+ Component: UI5 Web Components, version: 2.19.2
10
10
  Copyright: SAP
11
11
  License: Apache-2.0
12
12
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
13
13
  Contained in: src/sap.f/src/sap/f/thirdparty/**
14
14
 
15
- Component: UI5 Web Components Fiori, version: 2.15.0
15
+ Component: UI5 Web Components Fiori, version: 2.19.2
16
16
  Copyright: SAP
17
17
  License: Apache-2.0
18
18
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
19
19
  Contained in: src/sap.f/src/sap/f/thirdparty/**
20
20
 
21
- Component: UI5 Web Components Icons, version: 2.15.0
21
+ Component: UI5 Web Components Icons, version: 2.19.2
22
22
  Copyright: SAP
23
23
  License: Apache-2.0
24
24
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
25
25
  Contained in: src/sap.f/src/sap/f/thirdparty/**
26
26
 
27
- Component: UI5 Web Components Icons Business Suite, version: 2.15.0
27
+ Component: UI5 Web Components Icons Business Suite, version: 2.19.2
28
28
  Copyright: SAP
29
29
  License: Apache-2.0
30
30
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
31
31
  Contained in: src/sap.f/src/sap/f/thirdparty/**
32
32
 
33
- Component: UI5 Web Components Icons TNT, version: 2.15.0
33
+ Component: UI5 Web Components Icons TNT, version: 2.19.2
34
34
  Copyright: SAP
35
35
  License: Apache-2.0
36
36
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
@@ -446,50 +446,6 @@ License Text: https://github.com/UI5/openui5/blob/master/LICENSES/MIT.txt
446
446
  Contained in: src/sap.ui.mdc/test/sap/ui/mdc/demokit/sample/Chart/ChartJS/control/hammerjs.js
447
447
 
448
448
 
449
- Library: sap.ui.webc.common:
450
-
451
- Component: UI5 Web Components, version: 1.18.0
452
- Copyright: SAP
453
- License: Apache-2.0
454
- License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
455
- Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/base/**
456
- src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/theming/**
457
- src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/localization/**
458
- src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/**
459
- src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-tnt/**
460
- src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons-business-suite/**
461
-
462
- Component: lit-html, version: 2.2.2
463
- Copyright: Google LLC
464
- License: BSD-3-Clause
465
- License Text: https://github.com/UI5/openui5/blob/master/LICENSES/BSD-3-Clause.txt
466
- Contained in: src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/lit-html/**
467
-
468
-
469
- Library: sap.ui.webc.fiori:
470
-
471
- Component: UI5 Web Components, version: 1.18.0
472
- Copyright: SAP
473
- License: Apache-2.0
474
- License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
475
- Contained in: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/thirdparty/**
476
-
477
- Component: ZXing, version: 0.17.1
478
- Copyright: 2005 Sun Microsystems, Inc.; 2010-2014 University of Manchester; 2010-2015 Stian Soiland-Reyes; 2015 Peter Hull
479
- License: Apache-2.0
480
- License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
481
- Contained in: src/sap.ui.webc.fiori/src/sap/ui/webc/fiori/lib/zxing.js
482
-
483
-
484
- Library: sap.ui.webc.main:
485
-
486
- Component: UI5 Web Components, version: 1.18.0
487
- Copyright: SAP
488
- License: Apache-2.0
489
- License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
490
- Contained in: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/**
491
-
492
-
493
449
  Outside of Libraries:
494
450
 
495
451
  Component: JSDoc 3, version: 3.6.7
@@ -498,7 +454,7 @@ License: Apache-2.0
498
454
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
499
455
  Contained in: lib/jsdoc/ui5/plugin.js
500
456
 
501
- Component: SAP Theming Base Content, version: 11.32.2-20250827135846+79bb30d311678435d61b21db26ecbe07d6b05079
457
+ Component: SAP Theming Base Content, version: 11.34.0
502
458
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
503
459
  License: Apache-2.0
504
460
  License Text: https://github.com/UI5/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.documentation",
3
- "version": "1.145.1",
3
+ "version": "1.147.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.documentation",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,11 +14,11 @@
14
14
  "url": "https://github.com/UI5/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.145.1",
18
- "@openui5/sap.ui.core": "1.145.1",
19
- "@openui5/sap.ui.layout": "1.145.1",
20
- "@openui5/themelib_sap_belize": "1.145.1",
21
- "@openui5/themelib_sap_fiori_3": "1.145.1",
22
- "@openui5/themelib_sap_horizon": "1.145.1"
17
+ "@openui5/sap.m": "1.147.0",
18
+ "@openui5/sap.ui.core": "1.147.0",
19
+ "@openui5/sap.ui.layout": "1.147.0",
20
+ "@openui5/themelib_sap_belize": "1.147.0",
21
+ "@openui5/themelib_sap_fiori_3": "1.147.0",
22
+ "@openui5/themelib_sap_horizon": "1.147.0"
23
23
  }
24
24
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2026 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.145.1</version>
9
+ <version>1.147.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library for the Demokit 2.0.</documentation>
12
12
 
@@ -37,68 +37,42 @@ sap.ui.define(['sap/ui/core/Control'],
37
37
  }
38
38
  },
39
39
  renderer: {
40
- apiVersion: 2,
40
+ apiVersion: 2,
41
41
 
42
- render: function(oRm, oControl) {
43
- var aRows = oControl.getRows(),
44
- aControls,
42
+ render: function(oRm, oControl) {
43
+ var aRows = oControl.getRows(),
45
44
  aColumnTitles = oControl.getColumnTitles(),
46
- aLen,
47
- a,
48
45
  iLen,
49
46
  i;
50
47
 
51
- oRm.openStart("div", oControl);
52
- oRm.class("sapUiDocLightTable");
53
- oRm.class("columns-" + oControl.getColumnCount());
54
- oRm.openEnd();
48
+ oRm.openStart("div", oControl);
49
+ oRm.class("sapUiDocLightTable");
50
+ oRm.class("columns-" + oControl.getColumnCount());
51
+ oRm.openEnd();
55
52
 
56
- // Column titles
57
- oRm.openStart("div")
58
- .class("head")
59
- .openEnd();
60
-
61
- for (i = 0, iLen = aColumnTitles.length; i < iLen; i++) {
62
- oRm.openStart("div")
63
- .class("cell")
64
- .openEnd();
65
-
66
- oRm.text(aColumnTitles[i])
67
- .close("div");
68
- }
69
-
70
- oRm.close("div");
71
-
72
- // Rows
73
- for (i = 0, iLen = aRows.length; i < iLen; i++) {
53
+ // Column titles
74
54
  oRm.openStart("div")
75
- .class("row")
55
+ .class("head")
76
56
  .openEnd();
77
57
 
78
- aControls = aRows[i].getContent();
79
- for (a = 0, aLen = aControls.length; a < aLen; a++) {
58
+ for (i = 0, iLen = aColumnTitles.length; i < iLen; i++) {
80
59
  oRm.openStart("div")
81
60
  .class("cell")
82
61
  .openEnd();
83
62
 
84
- // Handle inline title
85
- if (a > 0) {
86
- oRm.openStart("div")
87
- .class("inTitle")
88
- .openEnd()
89
- .text(aColumnTitles[a] + ":")
90
- .close("div");
91
- }
63
+ oRm.text(aColumnTitles[i])
64
+ .close("div");
65
+ }
66
+
67
+ oRm.close("div");
92
68
 
93
- oRm.renderControl(aControls[a]);
94
- oRm.close("div");
69
+ // Render rows (each row handles its own rendering including subRows)
70
+ for (i = 0, iLen = aRows.length; i < iLen; i++) {
71
+ oRm.renderControl(aRows[i]);
95
72
  }
96
73
 
97
74
  oRm.close("div");
98
75
  }
99
-
100
- oRm.close("div");
101
76
  }
102
- }});
103
-
104
- });
77
+ });
78
+ });
@@ -0,0 +1,108 @@
1
+
2
+ /*!\n * OpenUI5
3
+ * (c) Copyright 2026 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.\n */
5
+ sap.ui.define([
6
+ 'sap/uxap/ObjectPageSection',
7
+ 'sap/uxap/ObjectPageSectionRenderer',
8
+ 'sap/ui/core/Icon',
9
+ 'sap/ui/core/RenderManager',
10
+ 'sap/ui/core/Core'
11
+ ], function(ObjectPageSection, ObjectPageSectionRenderer, Icon, RenderManager, Core) {
12
+ "use strict";
13
+
14
+ /**
15
+ * @class
16
+ * Custom ObjectPageSection control which supports a showBookmarkIcon property.
17
+ * When showBookmarkIcon=true, a chain-link icon is injected into the DOM right after
18
+ * the section title in onAfterRendering — no renderer override needed.
19
+ * Clicking the icon fires the bookmarkIconPress event.
20
+ * @extends sap.uxap.ObjectPageSection
21
+ * @private
22
+ * @ui5-restricted sdk
23
+ */
24
+ var SDKObjectPageSection = ObjectPageSection.extend("sap.ui.documentation.ObjectPageSection", {
25
+ metadata: {
26
+ library: "sap.ui.documentation",
27
+ properties: {
28
+ /**
29
+ * When true, a chain-link icon is injected after the section title.
30
+ * Clicking the icon fires the bookmarkIconPress event.
31
+ */
32
+ showBookmarkIcon: { type: "boolean", defaultValue: false }
33
+ },
34
+ aggregations: {
35
+ /**
36
+ * Internal bookmark icon. The Section is the ManagedObject parent,
37
+ * so lifecycle (destroy) is handled automatically.
38
+ * Not intended for external use.
39
+ */
40
+ _bookmarkIcon: { type: "sap.ui.core.Icon", multiple: false, visibility: "hidden" }
41
+ },
42
+ events: {
43
+ /**
44
+ * Fired when the chain-link icon is pressed. Use to copy the section URL to clipboard.
45
+ */
46
+ bookmarkIconPress: {}
47
+ }
48
+ },
49
+ renderer: ObjectPageSectionRenderer
50
+ });
51
+
52
+ /**
53
+ * After the base renderer writes the section DOM, injects the bookmark icon
54
+ * right after the title element using a RenderManager flush into a placeholder span.
55
+ * This avoids copying/maintaining the ObjectPageSectionRenderer.
56
+ * @override
57
+ */
58
+ SDKObjectPageSection.prototype.onAfterRendering = function () {
59
+ ObjectPageSection.prototype.onAfterRendering?.apply(this, arguments);
60
+
61
+ if (!this.getShowBookmarkIcon() || !this.getTitleVisible()) {
62
+ return;
63
+ }
64
+
65
+ var oTitleControl = this._getTitleControl();
66
+ var oTitleDom = oTitleControl && oTitleControl.getDomRef();
67
+ if (!oTitleDom) {
68
+ return;
69
+ }
70
+
71
+ // Insert a placeholder <span> directly after the title element.
72
+ // The base renderer recreates the section DOM on every render cycle, so the
73
+ // placeholder is also recreated fresh each time (no stale-DOM risk).
74
+ var oPlaceholder = document.createElement("span");
75
+ oTitleDom.parentNode.insertBefore(oPlaceholder, oTitleDom.nextSibling);
76
+
77
+ // Render the icon into the placeholder (RenderManager.flush replaces
78
+ // the placeholder's children with the icon's DOM).
79
+ var oRm = new RenderManager().getInterface();
80
+ oRm.renderControl(this._getBookmarkIcon());
81
+ oRm.flush(oPlaceholder, true);
82
+ oRm.destroy();
83
+ };
84
+
85
+ /**
86
+ * Lazy getter for the internal bookmark icon.
87
+ * Creates the icon on first call and stores it in the _bookmarkIcon hidden aggregation.
88
+ * @returns {sap.ui.core.Icon}
89
+ * @private
90
+ */
91
+ SDKObjectPageSection.prototype._getBookmarkIcon = function () {
92
+ var oIcon = this.getAggregation("_bookmarkIcon");
93
+ if (!oIcon) {
94
+ oIcon = new Icon({
95
+ src: "sap-icon://chain-link",
96
+ tooltip: Core.getLibraryResourceBundle("sap.ui.documentation").getText("API_DETAIL_BOOKMARK_TOOLTIP"),
97
+ decorative: false,
98
+ press: function () {
99
+ this.fireBookmarkIconPress();
100
+ }.bind(this)
101
+ }).addStyleClass("sapUiDocSectionLinkIcon");
102
+ this.setAggregation("_bookmarkIcon", oIcon, true); // suppress invalidate
103
+ }
104
+ return oIcon;
105
+ };
106
+
107
+ return SDKObjectPageSection;
108
+ });
@@ -1,4 +1,3 @@
1
-
2
1
  /*!
3
2
  * OpenUI5
4
3
  * (c) Copyright 2026 SAP SE or an SAP affiliate company.
@@ -7,24 +6,123 @@
7
6
  sap.ui.define([
8
7
  'sap/ui/core/Control',
9
8
  'sap/uxap/ObjectPageSubSection',
10
- 'sap/uxap/ObjectPageSubSectionRenderer'
11
- ], function(Control, ObjectPageSubSection, ObjectPageSubSectionRenderer) {
9
+ 'sap/uxap/ObjectPageSubSectionRenderer',
10
+ 'sap/m/OverflowToolbarLayoutData',
11
+ 'sap/m/library',
12
+ 'sap/ui/core/Icon',
13
+ 'sap/ui/core/Core'
14
+ ], function(Control, ObjectPageSubSection, ObjectPageSubSectionRenderer, OverflowToolbarLayoutData, mobileLibrary, Icon, Core) {
12
15
  "use strict";
13
16
 
17
+ var OverflowToolbarPriority = mobileLibrary.OverflowToolbarPriority;
18
+
14
19
  /**
15
20
  * @class
16
- * Custom ObjectPageSubSection control which internally does not uses Grid control.
21
+ * Custom ObjectPageSubSection control which:
22
+ * - Does not use the Grid control internally (uses a simple Container instead)
23
+ * - Supports a showBookmarkIcon property: when true, a chain-link icon is inserted
24
+ * into the internal OverflowToolbar right after the title. Clicking the icon
25
+ * fires the bookmarkIconPress event.
26
+ *
17
27
  * @extends sap.uxap.ObjectPageSubSection
18
28
  * @private
19
29
  * @ui5-restricted sdk
20
30
  */
21
31
  var SDKObjectPageSubSection = ObjectPageSubSection.extend("sap.ui.documentation.ObjectPageSubSection", {
22
32
  metadata: {
23
- library: "sap.ui.documentation"
33
+ library: "sap.ui.documentation",
34
+ properties: {
35
+ /**
36
+ * When true, a chain-link icon is rendered inside the subsection toolbar
37
+ * right after the title. Clicking the icon fires the bookmarkIconPress event.
38
+ */
39
+ showBookmarkIcon: { type: "boolean", defaultValue: false }
40
+ },
41
+ events: {
42
+ /**
43
+ * Fired when the chain-link icon is pressed. Use to copy the subsection URL to clipboard.
44
+ */
45
+ bookmarkIconPress: {}
46
+ }
24
47
  },
25
48
  renderer: ObjectPageSubSectionRenderer
26
49
  });
27
50
 
51
+ /**
52
+ * Override to create and insert the bookmark icon into the OverflowToolbar when
53
+ * showBookmarkIcon is set to true. The icon is NOT stored in a ManagedObject aggregation
54
+ * on this control - it lives only in the toolbar (its true parent), with a plain JS
55
+ * reference kept in this._oBookmarkIcon. The toolbar (a hidden child of this SubSection
56
+ * via _headerToolbar) owns the icon lifecycle.
57
+ * This mirrors how sap.uxap.ObjectPageSubSection handles its "actions" aggregation.
58
+ * @override
59
+ */
60
+ SDKObjectPageSubSection.prototype.setShowBookmarkIcon = function (bValue) {
61
+ this.setProperty("showBookmarkIcon", bValue, true); // suppress invalidate — toolbar insertion handles rendering
62
+
63
+ if (bValue) {
64
+ if (!this._oBookmarkIcon) {
65
+ this._oBookmarkIcon = new Icon({
66
+ src: "sap-icon://chain-link",
67
+ tooltip: Core.getLibraryResourceBundle("sap.ui.documentation").getText("API_DETAIL_BOOKMARK_TOOLTIP"),
68
+ decorative: false,
69
+ layoutData: new OverflowToolbarLayoutData({
70
+ priority: OverflowToolbarPriority.NeverOverflow
71
+ }),
72
+ press: function () {
73
+ this.fireBookmarkIconPress();
74
+ }.bind(this)
75
+ }).addStyleClass("sapUiDocSectionLinkIcon");
76
+ }
77
+ // Insert at index 1: after Title (0), before ToolbarSpacer (was 1, now shifts to 2).
78
+ // insertAggregation reparents the icon to the toolbar; the toolbar (child of this
79
+ // SubSection via _headerToolbar) then owns the icon lifecycle.
80
+ this._getHeaderToolbar()?.insertAggregation("content", this._oBookmarkIcon, 1);
81
+ } else if (this._oBookmarkIcon) {
82
+ // Remove from toolbar but keep the instance — re-inserted if showBookmarkIcon is set to true again
83
+ this._getHeaderToolbar()?.removeContent(this._oBookmarkIcon);
84
+ }
85
+
86
+ return this;
87
+ };
88
+
89
+ /**
90
+ * Clean up the bookmark icon on control exit.
91
+ * The icon may be detached from the toolbar (showBookmarkIcon=false) so we destroy it explicitly.
92
+ * @override
93
+ */
94
+ SDKObjectPageSubSection.prototype.exit = function () {
95
+ if (this._oBookmarkIcon) {
96
+ this._oBookmarkIcon.destroy();
97
+ this._oBookmarkIcon = null;
98
+ }
99
+ ObjectPageSubSection.prototype.exit?.apply(this, arguments);
100
+ };
101
+
102
+ // -----------------------------------------------------------------------
103
+ // Action aggregation overrides
104
+ // -----------------------------------------------------------------------
105
+
106
+ // Number of fixed toolbar slots when showBookmarkIcon=true:
107
+ // [Title(0), BookmarkIcon(1), ToolbarSpacer(2)] = 3
108
+ SDKObjectPageSubSection.NUMBER_OF_ADDITIONAL_ACTIONS_BOOKMARKABLE = 3;
109
+
110
+ /**
111
+ * Returns the number of fixed toolbar slots before user-added actions.
112
+ * Overrides the base to account for the optional bookmark icon slot.
113
+ * @returns {int}
114
+ * @override
115
+ */
116
+ SDKObjectPageSubSection.prototype._getActionsOffset = function () {
117
+ return this.getShowBookmarkIcon()
118
+ ? SDKObjectPageSubSection.NUMBER_OF_ADDITIONAL_ACTIONS_BOOKMARKABLE
119
+ : ObjectPageSubSection.NUMBER_OF_ADDITIONAL_ACTIONS;
120
+ };
121
+
122
+ // -----------------------------------------------------------------------
123
+ // Grid override - replace with simple Container
124
+ // -----------------------------------------------------------------------
125
+
28
126
  var Container = Control.extend("sap.ui.documentation.Container", {
29
127
  metadata: {
30
128
  library: "sap.ui.documentation",
@@ -37,19 +135,20 @@ sap.ui.define([
37
135
  apiVersion: 2,
38
136
 
39
137
  render: function (oRm, oControl) {
40
- var aContent = oControl.getContent(),
41
- iLen,
42
- i;
138
+ var aContent = oControl.getContent(),
139
+ iLen,
140
+ i;
43
141
 
44
- oRm.openStart("div", oControl).openEnd();
142
+ oRm.openStart("div", oControl).openEnd();
45
143
 
46
- for (i = 0, iLen = aContent.length; i < iLen; i++) {
47
- oRm.renderControl(aContent[i]);
48
- }
144
+ for (i = 0, iLen = aContent.length; i < iLen; i++) {
145
+ oRm.renderControl(aContent[i]);
146
+ }
49
147
 
50
- oRm.close("div");
148
+ oRm.close("div");
149
+ }
51
150
  }
52
- }});
151
+ });
53
152
 
54
153
  SDKObjectPageSubSection.prototype._getGrid = function () {
55
154
  if (!this.getAggregation("_grid")) {
@@ -62,4 +161,4 @@ sap.ui.define([
62
161
  };
63
162
 
64
163
  return SDKObjectPageSubSection;
65
- });
164
+ });