@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
@@ -6,10 +6,16 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/ui/thirdparty/jquery",
9
+ "sap/base/Log",
9
10
  "sap/ui/core/Fragment",
11
+ "sap/ui/documentation/sdk/controller/util/APIInfo",
10
12
  "sap/ui/documentation/sdk/controller/BaseController",
11
13
  "sap/ui/documentation/sdk/util/ToggleFullScreenHandler",
12
14
  "sap/ui/documentation/sdk/model/formatter",
15
+ "sap/ui/documentation/Row",
16
+ "sap/ui/documentation/ParamText",
17
+ "sap/ui/documentation/JSDocType",
18
+ "sap/ui/documentation/JSDocText",
13
19
  "sap/m/Image",
14
20
  "sap/m/Label",
15
21
  "sap/m/Link",
@@ -19,14 +25,20 @@ sap.ui.define([
19
25
  "sap/m/ObjectStatus",
20
26
  "sap/m/Popover",
21
27
  "sap/m/library",
28
+ "sap/m/MessageToast",
22
29
  "sap/ui/core/library",
23
30
  "sap/m/CustomListItem",
24
31
  "sap/m/List",
25
32
  "sap/ui/dom/includeStylesheet",
26
- "sap/ui/dom/includeScript"
27
- ], function (jQuery, Fragment, BaseController, ToggleFullScreenHandler,
28
- formatter, Image, Label, Link, Text, HBox, ObjectAttribute, ObjectStatus, Popover,
29
- library, coreLibrary, CustomListItem, List, includeStylesheet, includeScript) {
33
+ "sap/ui/dom/includeScript",
34
+ "sap/uxap/ObjectPageSection",
35
+ "sap/ui/documentation/ObjectPageSubSection",
36
+ "sap/ui/core/HTML",
37
+ "sap/ui/core/Core"
38
+ ], function (jQuery, Log, Fragment, APIInfo, BaseController, ToggleFullScreenHandler,
39
+ formatter, Row, ParamText, JSDocType, JSDocText, Image, Label, Link, Text, HBox, ObjectAttribute, ObjectStatus, Popover,
40
+ library, MessageToast, coreLibrary, CustomListItem, List, includeStylesheet, includeScript,
41
+ ObjectPageSection, ObjectPageSubSection, HTML, Core) {
30
42
  "use strict";
31
43
 
32
44
  // shortcut for sap.m.FlexWrap
@@ -122,21 +134,56 @@ sap.ui.define([
122
134
  this._oModel.setProperty("/ui5-metadata/associations", bHasSelfAssoc ? this._selfAssociations : this._allAssociations);
123
135
  }
124
136
 
125
- if (this._oModel.getProperty("/hasFAQ")) {
126
- var sLibName = this._oEntityData.lib,
127
- sLibPath = sLibName.replace(/\./g, '/'),
128
- sFile = this._oEntityData.name.replace(sLibName, "").replace(/^[.]/, "").replace(/\./g, '/') + ".html";
129
- jQuery.ajax({
130
- type: "GET",
131
- url: './docs/api/' + sLibPath +
132
- '/demokit/faq/' + sFile,
133
- success: function (data) {
134
- this._oModel.setProperty("/faqContent", data);
135
- }.bind(this)
137
+ var sLibName = this._oEntityData.lib,
138
+ sLibPath = sLibName.replace(/\./g, '/'),
139
+ sComponentPath = this._oEntityData.name.replace(sLibName, "").replace(/^[.]/, "").replace(/\./g, '/'),
140
+ aSectionTypes = (this._oControlData.customSections || []).map(function(section) {
141
+ var sType = typeof section === 'string' ? section : section.name;
142
+ return {
143
+ type: sType,
144
+ property: sType + "Content",
145
+ displayTitle: sType.charAt(0).toUpperCase() + sType.slice(1),
146
+ sectionId: sType.toLowerCase(),
147
+ hasSubsections: section.hasSubsections || false,
148
+ subsections: section.subsections || null
149
+ };
136
150
  });
137
- }
138
151
 
139
- // Attach the model to the view
152
+ var fnLoadContent = function(sUrl, sProperty) {
153
+ return new Promise(function(resolve) {
154
+ jQuery.ajax({
155
+ url: sUrl,
156
+ success: function(data) {
157
+ this._oModel.setProperty("/" + sProperty, data);
158
+ resolve(true);
159
+ }.bind(this),
160
+ error: function() { resolve(false); }
161
+ });
162
+ }.bind(this));
163
+ }.bind(this);
164
+
165
+ var aContentPromises = aSectionTypes.map(function(oSection) {
166
+ var aPromises = [];
167
+ var sBaseUrl = './docs/api/' + sLibPath + '/demokit/sections/' + sComponentPath + '/';
168
+
169
+ if (oSection.hasSubsections) {
170
+ // Load main + subsections
171
+ aPromises.push(fnLoadContent(sBaseUrl + oSection.type + '.html', oSection.type + "_mainContent"));
172
+ oSection.subsections.forEach(function(sub) {
173
+ aPromises.push(fnLoadContent(sBaseUrl + oSection.type + '/' + sub + '.html', oSection.type + "_" + sub + "Content"));
174
+ });
175
+ } else {
176
+ // Load single section
177
+ aPromises.push(fnLoadContent(sBaseUrl + oSection.type + '.html', oSection.property));
178
+ }
179
+
180
+ return Promise.all(aPromises).then(function() { return oSection; });
181
+ });
182
+
183
+ Promise.all(aContentPromises).then(function(aSections) {
184
+ aSections.forEach(this._createAndAddSection, this);
185
+ }.bind(this));
186
+
140
187
  this.setModel(this._oModel);
141
188
 
142
189
  // Build needed resources and pre-process data
@@ -223,6 +270,42 @@ sap.ui.define([
223
270
  ToggleFullScreenHandler.updateMode(oEvent, this._oContainerView, this._oContainerController);
224
271
  },
225
272
 
273
+ onSectionLinkIconPress: function (oEvent) {
274
+ var oSection = oEvent.getSource();
275
+ this._copyBookmarkURL(oSection, null);
276
+ },
277
+
278
+ onSubSectionLinkIconPress: function (oEvent) {
279
+ // SubSection fires the event directly - one getParent() to reach the Section
280
+ var oSubSection = oEvent.getSource(),
281
+ oSection = oSubSection.getParent();
282
+ this._copyBookmarkURL(oSection, oSubSection);
283
+ },
284
+
285
+ /**
286
+ * Updates the browser URL to reflect the given section/subsection and copies
287
+ * it to the clipboard, then scrolls to the target.
288
+ * @param {sap.uxap.ObjectPageSection} oSection
289
+ * @param {sap.uxap.ObjectPageSubSection|null} oSubSection null for section-only links
290
+ * @private
291
+ */
292
+ _copyBookmarkURL: function (oSection, oSubSection) {
293
+ var oI18n = Core.getLibraryResourceBundle("sap.ui.documentation"),
294
+ oTarget = oSubSection || oSection;
295
+
296
+ this._modifyURL(oSection, oSubSection, true);
297
+
298
+ if (navigator.clipboard) {
299
+ navigator.clipboard.writeText(window.location.href).then(function () {
300
+ MessageToast.show(oI18n.getText("API_DETAIL_BOOKMARK_COPIED"));
301
+ }).catch(function () {
302
+ MessageToast.show(oI18n.getText("API_DETAIL_BOOKMARK_URL_UPDATED"));
303
+ });
304
+ }
305
+
306
+ this._objectPage.scrollToSection(oTarget.getId(), 250);
307
+ },
308
+
226
309
  onBorrowedPropCheckboxClick: function (oEvent) {
227
310
  var bChecked = oEvent.getParameter("selected");
228
311
 
@@ -305,6 +388,40 @@ sap.ui.define([
305
388
  }
306
389
  },
307
390
 
391
+ /**
392
+ * Applies syntax highlighting to a LightTable after it is re-rendered.
393
+ * Attaches an onAfterRendering delegate to the LightTable, applies highlighting,
394
+ * and then removes the delegate.
395
+ * @param {sap.ui.documentation.LightTable} oLightTable The LightTable control to apply highlighting to
396
+ * @private
397
+ */
398
+ _applyHljsToLightTable: function(oLightTable) {
399
+ if (!oLightTable || !window.hljs) {
400
+ return;
401
+ }
402
+
403
+ var oDelegate = {
404
+ onAfterRendering: function() {
405
+ // Find unprocessed pre elements within the LightTable's DOM
406
+ var oDomRef = oLightTable.getDomRef();
407
+ if (oDomRef) {
408
+ var aPreElements = oDomRef.querySelectorAll('pre:not(.hljs)');
409
+ if (aPreElements.length > 0) {
410
+ aPreElements.forEach(function(oElement) {
411
+ oElement.classList.add('hljs');
412
+ window.hljs.highlightElement(oElement);
413
+ });
414
+ }
415
+ }
416
+ // Remove the delegate after execution
417
+ oLightTable.removeEventDelegate(oDelegate);
418
+ }
419
+ };
420
+
421
+ // Attach the delegate to the LightTable
422
+ oLightTable.addEventDelegate(oDelegate);
423
+ },
424
+
308
425
  scrollToEntity: function (sSectionId, sEntityId) {
309
426
 
310
427
  var aFilteredSubSections,
@@ -657,6 +774,366 @@ sap.ui.define([
657
774
  return this._oPopover;
658
775
  },
659
776
 
777
+ /**
778
+ * Handles the typedef toggle event
779
+ * @param {sap.ui.base.Event} oEvent The event object
780
+ */
781
+ onTypedefToggle: function(oEvent) {
782
+ var oRow = oEvent.getSource(),
783
+ oLightTable = this._findParentLightTable(oRow),
784
+ sTypedefName = oRow?.getTypedefName();
785
+
786
+ if (!sTypedefName || !oLightTable) {
787
+ return;
788
+ }
789
+
790
+ if (oRow.getExpanded()) {
791
+ oRow.setExpanded(false);
792
+
793
+ oLightTable.invalidate();
794
+ this._applyHljsToLightTable(oLightTable);
795
+
796
+ return;
797
+ }
798
+
799
+ if (oRow.getSubRows().length > 0) {
800
+ // Already loaded typedef properties, just expand
801
+ oRow.setExpanded(true);
802
+
803
+ oLightTable.invalidate();
804
+ this._applyHljsToLightTable(oLightTable);
805
+
806
+ return;
807
+ }
808
+
809
+ // Find the typedef entity in the API index first
810
+ var oTypedefInfo = this._findTypedefInApiIndex(sTypedefName);
811
+
812
+ if (oTypedefInfo) {
813
+ // Fetch complete typedef data from API.json including inherited properties
814
+ this._collectTypedefPropertiesWithInheritance(oTypedefInfo)
815
+ .then(function(aTypedefProperties) {
816
+ // Add Row controls to the LightTable for each typedef property
817
+ if (aTypedefProperties && aTypedefProperties.length > 0) {
818
+ this._addTypedefSubRows(oRow, aTypedefProperties);
819
+
820
+ oRow.setExpanded(true);
821
+ oLightTable.invalidate();
822
+ this._applyHljsToLightTable(oLightTable);
823
+ }
824
+ }.bind(this))
825
+ .catch(function(oError) {
826
+ // Handle error silently
827
+ Log.error("Error loading typedef data: " + oError);
828
+ });
829
+ }
830
+ },
831
+
832
+ /**
833
+ * Collects typedef properties including inherited properties from base typedefs.
834
+ * Traverses the inheritance chain and concatenates all properties.
835
+ * @param {object} oTypedefInfo Initial typedef info from API index
836
+ * @returns {Promise} Promise that resolves with array of all typedef properties (own + inherited)
837
+ * @private
838
+ */
839
+ _collectTypedefPropertiesWithInheritance: function(oTypedefInfo) {
840
+ var aInheritanceChain = [],
841
+ aRequiredLibs = [];
842
+
843
+ // Build the inheritance chain by traversing the extends property
844
+ // Also collect all required libraries for loading
845
+ return this._buildTypedefInheritanceChain(oTypedefInfo)
846
+ .then(function(oChainResult) {
847
+ aInheritanceChain = oChainResult.chain;
848
+ aRequiredLibs = oChainResult.libs;
849
+
850
+ // Generate promises for all required libraries
851
+ var aPromises = aRequiredLibs.map(function(sLibName) {
852
+ return APIInfo.getLibraryElementsJSONPromise(sLibName);
853
+ });
854
+
855
+ return Promise.all(aPromises);
856
+ })
857
+ .then(function(aLibResults) {
858
+ // Combine all library elements into one array
859
+ var aAllLibraryElements = [];
860
+ aLibResults.forEach(function(aSingleLibraryElements) {
861
+ aAllLibraryElements = aAllLibraryElements.concat(aSingleLibraryElements);
862
+ });
863
+
864
+ // Collect properties from all typedefs in the inheritance chain
865
+ var aAllProperties = [],
866
+ aPropertyNames = []; // Track property names to handle overrides
867
+
868
+ // Process inheritance chain in order (current typedef first, then base typedefs)
869
+ aInheritanceChain.forEach(function(sTypedefName, iIndex) {
870
+ var oTypedefData = this._findEntityInLibraryData(aAllLibraryElements, sTypedefName);
871
+
872
+ if (oTypedefData?.properties) {
873
+ oTypedefData.properties.forEach(function(oProperty) {
874
+ // Only add property if it's not already defined (handle overrides)
875
+ if (aPropertyNames.indexOf(oProperty.name) === -1) {
876
+ // Clone the property to avoid modifying the original
877
+ var oClone = jQuery.extend(true, {}, oProperty);
878
+ oClone.depth = 1;
879
+
880
+ // Mark inherited properties (not from the first typedef in chain)
881
+ if (iIndex > 0) {
882
+ oClone.borrowedFrom = sTypedefName;
883
+ }
884
+
885
+ aAllProperties.push(oClone);
886
+ aPropertyNames.push(oProperty.name);
887
+ }
888
+ });
889
+ }
890
+ }.bind(this));
891
+
892
+ return aAllProperties;
893
+ }.bind(this));
894
+ },
895
+
896
+ /**
897
+ * Builds the inheritance chain for a typedef by following the extends property.
898
+ * @param {object} oTypedefInfo Initial typedef info from API index
899
+ * @returns {Promise} Promise that resolves with object containing chain array and libs array
900
+ * @private
901
+ */
902
+ _buildTypedefInheritanceChain: function(oTypedefInfo) {
903
+ var aInheritanceChain = [oTypedefInfo.name],
904
+ aRequiredLibs = [];
905
+
906
+ // Add the initial library
907
+ if (oTypedefInfo.lib && aRequiredLibs.indexOf(oTypedefInfo.lib) === -1) {
908
+ aRequiredLibs.push(oTypedefInfo.lib);
909
+ }
910
+
911
+ // Load the initial typedef to get its extends property
912
+ return this._loadCompleteTypedefData(oTypedefInfo)
913
+ .then(function(oFullTypedefData) {
914
+ // Check if typedef has a base typedef (extends property)
915
+ if (!oFullTypedefData.extends) {
916
+ return {
917
+ chain: aInheritanceChain,
918
+ libs: aRequiredLibs
919
+ };
920
+ }
921
+
922
+ // Build the rest of the inheritance chain
923
+ return this._traverseTypedefInheritanceChain(
924
+ oFullTypedefData.extends,
925
+ aInheritanceChain,
926
+ aRequiredLibs
927
+ );
928
+ }.bind(this));
929
+ },
930
+
931
+ /**
932
+ * Recursively traverses the typedef inheritance chain.
933
+ * @param {string} sBaseTypedefName Name of the base typedef to process
934
+ * @param {array} aInheritanceChain Current inheritance chain array
935
+ * @param {array} aRequiredLibs Current required libraries array
936
+ * @returns {Promise} Promise that resolves with object containing chain and libs arrays
937
+ * @private
938
+ */
939
+ _traverseTypedefInheritanceChain: function(sBaseTypedefName, aInheritanceChain, aRequiredLibs) {
940
+ // Find the base typedef in the API index
941
+ var oBaseTypedefInfo = this._findTypedefInApiIndex(sBaseTypedefName);
942
+
943
+ // If base typedef not found, stop traversal
944
+ if (!oBaseTypedefInfo) {
945
+ return Promise.resolve({
946
+ chain: aInheritanceChain,
947
+ libs: aRequiredLibs
948
+ });
949
+ }
950
+
951
+ // Add to inheritance chain
952
+ aInheritanceChain.push(sBaseTypedefName);
953
+
954
+ // Add library if not already included
955
+ if (oBaseTypedefInfo.lib && aRequiredLibs.indexOf(oBaseTypedefInfo.lib) === -1) {
956
+ aRequiredLibs.push(oBaseTypedefInfo.lib);
957
+ }
958
+
959
+ // Load the base typedef to check if it also has a parent
960
+ return this._loadCompleteTypedefData(oBaseTypedefInfo)
961
+ .then(function(oBaseTypedefData) {
962
+ // If this typedef also extends another, continue traversal
963
+ if (oBaseTypedefData.extends) {
964
+ return this._traverseTypedefInheritanceChain(
965
+ oBaseTypedefData.extends,
966
+ aInheritanceChain,
967
+ aRequiredLibs
968
+ );
969
+ }
970
+
971
+ // No more parents, return the complete chain
972
+ return {
973
+ chain: aInheritanceChain,
974
+ libs: aRequiredLibs
975
+ };
976
+ }.bind(this))
977
+ .catch(function() {
978
+ // If loading fails, return what we have so far
979
+ return {
980
+ chain: aInheritanceChain,
981
+ libs: aRequiredLibs
982
+ };
983
+ });
984
+ },
985
+
986
+ /**
987
+ * Adds Row controls to the LightTable for typedef properties
988
+ * @param {sap.ui.documentation.Row} oParentRow The parent row being expanded
989
+ * @param {array} aTypedefProperties Array of typedef properties to add as rows
990
+ * @private
991
+ */
992
+ _addTypedefSubRows: function(oParentRow, aTypedefProperties) {
993
+ // Create sub-row controls for typedef properties
994
+ var aSubRows = aTypedefProperties.map(function(oProperty) {
995
+ return new Row({
996
+ content: [
997
+ new ParamText({
998
+ text: oProperty.name,
999
+ phoneText: oProperty.phoneName,
1000
+ depth: oProperty.depth || 1,
1001
+ optional: oProperty.optional
1002
+ }),
1003
+ new JSDocType({
1004
+ typeInfo: oProperty.typeInfo
1005
+ }),
1006
+ new Text({
1007
+ text: oProperty.defaultValue || "",
1008
+ wrapping: false
1009
+ }),
1010
+ new JSDocText({
1011
+ sanitizeContent: false,
1012
+ text: this.formatter.escapeSettingsValue(oProperty.description)
1013
+ })
1014
+ ]
1015
+ }).addStyleClass("subrow");
1016
+ }.bind(this));
1017
+
1018
+ // Add sub-rows to the parent row
1019
+ aSubRows.forEach(function(oSubRow) {
1020
+ oParentRow.addSubRow(oSubRow);
1021
+ });
1022
+ },
1023
+
1024
+ /**
1025
+ * Finds the parent LightTable control of a given control
1026
+ * @param {sap.ui.core.Control} oControl - The control to find the parent LightTable for
1027
+ * @returns {sap.ui.documentation.LightTable|null} The parent LightTable control or null if not found
1028
+ * @private
1029
+ */
1030
+ _findParentLightTable: function(oControl) {
1031
+ var oParent = oControl?.getParent();
1032
+
1033
+ while (oParent) {
1034
+ if (oParent.isA("sap.ui.documentation.LightTable")) {
1035
+ return oParent;
1036
+ }
1037
+ oParent = oParent.getParent();
1038
+ }
1039
+
1040
+ return null;
1041
+ },
1042
+
1043
+ /**
1044
+ * Finds a typedef entity in the API index
1045
+ * @param {string} sTypedefName The name of the typedef to find
1046
+ * @returns {object} The typedef entity data or null if not found
1047
+ * @private
1048
+ */
1049
+ _findTypedefInApiIndex: function(sTypedefName) {
1050
+ var oTypedefData = null;
1051
+
1052
+ // Recursive function to find the typedef in the API index
1053
+ function findSymbol(aNodes) {
1054
+ if (!aNodes) {
1055
+ return false;
1056
+ }
1057
+
1058
+ return aNodes.some(function(oNode) {
1059
+ var bFound = oNode.name === sTypedefName;
1060
+ if (bFound) {
1061
+ oTypedefData = oNode;
1062
+ return true;
1063
+ } else if (oNode.nodes && sTypedefName.startsWith(oNode.name + ".")) {
1064
+ return findSymbol(oNode.nodes);
1065
+ }
1066
+ return false;
1067
+ });
1068
+ }
1069
+
1070
+ // Search in the API index
1071
+ if (this._aApiIndex) {
1072
+ findSymbol(this._aApiIndex);
1073
+ }
1074
+
1075
+ return oTypedefData;
1076
+ },
1077
+
1078
+ /**
1079
+ * Loads complete typedef data from API.json files
1080
+ * @param {object} oTypedefInfo Initial typedef info from API index
1081
+ * @returns {Promise} Promise that resolves with the complete typedef data
1082
+ * @private
1083
+ */
1084
+ _loadCompleteTypedefData: function(oTypedefInfo) {
1085
+ // Get the library name from the typedef info
1086
+ var sLibName = oTypedefInfo.lib;
1087
+
1088
+ if (!sLibName) {
1089
+ return Promise.reject("Library name not found for typedef");
1090
+ }
1091
+
1092
+ // Use APIInfo to load the library's API.json data
1093
+ return APIInfo.getLibraryElementsJSONPromise(sLibName)
1094
+ .then(function(aLibData) {
1095
+ try {
1096
+ // Find the complete typedef data in the library elements
1097
+ var oTypedefData = this._findEntityInLibraryData(aLibData, oTypedefInfo.name);
1098
+
1099
+ if (oTypedefData) {
1100
+ return oTypedefData;
1101
+ } else {
1102
+ return Promise.reject("Typedef not found in library data");
1103
+ }
1104
+ } catch (oProcessError) {
1105
+ return Promise.reject("Error processing typedef data: " + oProcessError);
1106
+ }
1107
+ }.bind(this))
1108
+ .catch(function(oError) {
1109
+ return Promise.reject("Error loading library data: " + oError);
1110
+ });
1111
+ },
1112
+
1113
+ /**
1114
+ * Finds an entity in library data loaded from API.json
1115
+ * @param {array} aLibraryData Array of library elements from API.json
1116
+ * @param {string} sEntityName Name of the entity to find
1117
+ * @returns {object} The entity data or null if not found
1118
+ * @private
1119
+ */
1120
+ _findEntityInLibraryData: function(aLibraryData, sEntityName) {
1121
+ // Find entity in loaded libs data
1122
+ for (var i = 0, iLen = aLibraryData.length; i < iLen; i++) {
1123
+ var oLibItem = aLibraryData[i];
1124
+ if (oLibItem.name === sEntityName) {
1125
+ // Check if we are allowed to display the requested symbol
1126
+ // BCP: 1870269087 item may not have visibility info at all. In this case we show the item
1127
+ if (oLibItem.visibility === undefined || this._aAllowedMembers.indexOf(oLibItem.visibility) >= 0) {
1128
+ return oLibItem;
1129
+ } else {
1130
+ return null;
1131
+ }
1132
+ }
1133
+ }
1134
+ return null;
1135
+ },
1136
+
660
1137
  /**
661
1138
  * Builds the header layout structure.
662
1139
  * The header displays the entity data in 3 columns
@@ -727,6 +1204,37 @@ sap.ui.define([
727
1204
  }, this);
728
1205
  },
729
1206
 
1207
+ /**
1208
+ * Creates and adds a dynamic section to the ObjectPageLayout
1209
+ * @param {object} oSectionConfig Section configuration object
1210
+ * @private
1211
+ */
1212
+ _createAndAddSection: function(oSectionConfig) {
1213
+ var fnCreateSubSection = function(sProperty, sTitle) {
1214
+ var oHTML = new HTML({content: "{/" + sProperty + "}"});
1215
+ oHTML.setModel(this._oModel);
1216
+ return new ObjectPageSubSection(sTitle ? {title: sTitle, blocks: [oHTML]} : {blocks: [oHTML]});
1217
+ }.bind(this);
1218
+
1219
+ var aSubSections = [];
1220
+ if (oSectionConfig.hasSubsections) {
1221
+ aSubSections.push(fnCreateSubSection(oSectionConfig.type + "_mainContent", "Overview"));
1222
+ oSectionConfig.subsections.forEach(function(sub) {
1223
+ aSubSections.push(fnCreateSubSection(oSectionConfig.type + "_" + sub + "Content", sub));
1224
+ });
1225
+ } else {
1226
+ aSubSections.push(fnCreateSubSection(oSectionConfig.property));
1227
+ }
1228
+
1229
+ var oPageSection = new ObjectPageSection({
1230
+ id: this.createId(oSectionConfig.sectionId),
1231
+ title: oSectionConfig.displayTitle,
1232
+ titleUppercase: false,
1233
+ subSections: aSubSections
1234
+ });
1235
+ oPageSection.addStyleClass("sectionContent");
1236
+ this._objectPage.addSection(oPageSection);
1237
+ },
730
1238
  onAnnotationsLinkPress: function () {
731
1239
  this.scrollToEntity("annotations", "Summary");
732
1240
  },
@@ -34,6 +34,7 @@ sap.ui.define([
34
34
  },
35
35
 
36
36
  constructor : function (oComponent) {
37
+ BaseObject.call(this);
37
38
  this._oComponent = oComponent;
38
39
  },
39
40
 
@@ -74,6 +74,7 @@ sap.ui.define(
74
74
  "sap.ui.documentation.sdk.controller.util.DefaultConsentManager",
75
75
  {
76
76
  constructor: function (oComponent, oConfig) {
77
+ BaseObject.call(this);
77
78
  this._oCmponent = oComponent;
78
79
  this._oConfigUtil = oComponent.getConfigUtil();
79
80
  this._sConsentDialogComponentId = oConfig.defaultConsentDialogComponentId;
@@ -54,6 +54,11 @@ sap.ui.define([],
54
54
  "text": "UI5 MCP server",
55
55
  "href": "https://github.com/UI5/mcp-server"
56
56
  },
57
+ {
58
+ "id": "fioriMcpServer",
59
+ "text": "SAP Fiori MCP server",
60
+ "href": "https://github.com/SAP/open-ux-tools/tree/main/packages/fiori-mcp-server"
61
+ },
57
62
  {
58
63
  "id": "businessAppStudio",
59
64
  "text": "SAP Business Application Studio",
@@ -69,6 +69,7 @@ sap.ui.define(
69
69
  "sap.ui.documentation.sdk.controller.util.UsageTracker",
70
70
  {
71
71
  constructor: function (oComponent) {
72
+ BaseObject.call(this);
72
73
  this._oComponent = oComponent;
73
74
  this._oRouter = oComponent.getRouter();
74
75
  this._oConfig = oComponent.getConfig();
@@ -16,6 +16,7 @@ sap.ui.define([
16
16
  return Controller.extend("sap.ui.documentation.sdk.cookieSettingsDialog.controller.CookieSettingsDialog", {
17
17
 
18
18
  constructor: function() {
19
+ Controller.call(this);
19
20
  this._oCookiesUtil = null;
20
21
  this._oRootView = null;
21
22
  this._oInitOptions = null;
@@ -30,19 +30,19 @@
30
30
  </custom:DivContainer>
31
31
  </content>
32
32
  <buttons>
33
- <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_ACCEPT_ALL}" type="Emphasized" press="onAcceptAllCookies" visible="{=! ${cookieData>/showCookieDetails} }">
33
+ <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_ACCEPT_ALL}" type="Emphasized" press=".onAcceptAllCookies" visible="{=! ${cookieData>/showCookieDetails} }">
34
34
  <layoutData>
35
35
  <OverflowToolbarLayoutData priority="NeverOverflow"/>
36
36
  </layoutData>
37
37
  </Button>
38
- <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_SET_PREFERENCES}" id="btnSetPreferences" type="Ghost" press="showCookieDetails" visible="{= !${cookieData>/showCookieDetails} &amp;&amp; ${cookieData>/enableAdvancedSettings} }"></Button>
39
- <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_REJECT_ALL}" press="onRejectAllCookies" visible="{=! ${cookieData>/showCookieDetails} }">
38
+ <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_SET_PREFERENCES}" id="btnSetPreferences" type="Ghost" press=".showCookieDetails" visible="{= !${cookieData>/showCookieDetails} &amp;&amp; ${cookieData>/enableAdvancedSettings} }"></Button>
39
+ <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_REJECT_ALL}" press=".onRejectAllCookies" visible="{=! ${cookieData>/showCookieDetails} }">
40
40
  <layoutData>
41
41
  <OverflowToolbarLayoutData priority="NeverOverflow"/>
42
42
  </layoutData>
43
43
  </Button>
44
- <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_SAVE_PREFERENCES}" id="btnSavePreferences" type="Emphasized" press="onSaveCookies" visible="{cookieData>/showCookieDetails}"></Button>
45
- <Button text="{i18n>COOKIE_SETTINGS_DIALOG_CANCEL_BTN}" press="onCancelPress" visible="{= ${cookieData>/showCookieDetails} }"></Button>
44
+ <Button text="{i18n>COOKIE_SETTINGS_DIALOG_FUNCTIONAL_COOKIES_SAVE_PREFERENCES}" id="btnSavePreferences" type="Emphasized" press=".onSaveCookies" visible="{cookieData>/showCookieDetails}"></Button>
45
+ <Button text="{i18n>COOKIE_SETTINGS_DIALOG_CANCEL_BTN}" press=".onCancelPress" visible="{= ${cookieData>/showCookieDetails} }"></Button>
46
46
  </buttons>
47
47
  </Dialog>
48
48
  </core:FragmentDefinition>