@openui5/sap.ui.documentation 1.136.1 → 1.138.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 (77) hide show
  1. package/REUSE.toml +0 -28
  2. package/THIRDPARTY.txt +1 -25
  3. package/package.json +7 -7
  4. package/src/sap/ui/documentation/.library +3 -3
  5. package/src/sap/ui/documentation/library.js +2 -2
  6. package/src/sap/ui/documentation/messagebundle.properties +14 -0
  7. package/src/sap/ui/documentation/messagebundle_ar.properties +7 -0
  8. package/src/sap/ui/documentation/messagebundle_bg.properties +7 -0
  9. package/src/sap/ui/documentation/messagebundle_ca.properties +7 -0
  10. package/src/sap/ui/documentation/messagebundle_cnr.properties +7 -0
  11. package/src/sap/ui/documentation/messagebundle_cs.properties +7 -0
  12. package/src/sap/ui/documentation/messagebundle_cy.properties +7 -0
  13. package/src/sap/ui/documentation/messagebundle_da.properties +7 -0
  14. package/src/sap/ui/documentation/messagebundle_de.properties +8 -1
  15. package/src/sap/ui/documentation/messagebundle_el.properties +7 -0
  16. package/src/sap/ui/documentation/messagebundle_en.properties +7 -0
  17. package/src/sap/ui/documentation/messagebundle_en_GB.properties +7 -0
  18. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +13 -0
  19. package/src/sap/ui/documentation/messagebundle_es.properties +7 -0
  20. package/src/sap/ui/documentation/messagebundle_es_MX.properties +7 -0
  21. package/src/sap/ui/documentation/messagebundle_et.properties +7 -0
  22. package/src/sap/ui/documentation/messagebundle_fi.properties +7 -0
  23. package/src/sap/ui/documentation/messagebundle_fr.properties +7 -0
  24. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +7 -0
  25. package/src/sap/ui/documentation/messagebundle_hi.properties +7 -0
  26. package/src/sap/ui/documentation/messagebundle_hr.properties +8 -1
  27. package/src/sap/ui/documentation/messagebundle_hu.properties +7 -0
  28. package/src/sap/ui/documentation/messagebundle_id.properties +7 -0
  29. package/src/sap/ui/documentation/messagebundle_it.properties +7 -0
  30. package/src/sap/ui/documentation/messagebundle_iw.properties +7 -0
  31. package/src/sap/ui/documentation/messagebundle_ja.properties +7 -0
  32. package/src/sap/ui/documentation/messagebundle_kk.properties +7 -0
  33. package/src/sap/ui/documentation/messagebundle_ko.properties +7 -0
  34. package/src/sap/ui/documentation/messagebundle_lt.properties +7 -0
  35. package/src/sap/ui/documentation/messagebundle_lv.properties +7 -0
  36. package/src/sap/ui/documentation/messagebundle_mk.properties +7 -0
  37. package/src/sap/ui/documentation/messagebundle_ms.properties +7 -0
  38. package/src/sap/ui/documentation/messagebundle_nl.properties +7 -0
  39. package/src/sap/ui/documentation/messagebundle_no.properties +7 -0
  40. package/src/sap/ui/documentation/messagebundle_pl.properties +7 -0
  41. package/src/sap/ui/documentation/messagebundle_pt.properties +7 -0
  42. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +7 -0
  43. package/src/sap/ui/documentation/messagebundle_ro.properties +7 -0
  44. package/src/sap/ui/documentation/messagebundle_ru.properties +7 -0
  45. package/src/sap/ui/documentation/messagebundle_sh.properties +7 -0
  46. package/src/sap/ui/documentation/messagebundle_sk.properties +7 -0
  47. package/src/sap/ui/documentation/messagebundle_sl.properties +7 -0
  48. package/src/sap/ui/documentation/messagebundle_sr.properties +7 -0
  49. package/src/sap/ui/documentation/messagebundle_sv.properties +7 -0
  50. package/src/sap/ui/documentation/messagebundle_th.properties +7 -0
  51. package/src/sap/ui/documentation/messagebundle_tr.properties +7 -0
  52. package/src/sap/ui/documentation/messagebundle_uk.properties +7 -0
  53. package/src/sap/ui/documentation/messagebundle_vi.properties +7 -0
  54. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +7 -0
  55. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +7 -0
  56. package/src/sap/ui/documentation/sdk/Component.js +15 -0
  57. package/src/sap/ui/documentation/sdk/controller/App.controller.js +48 -0
  58. package/src/sap/ui/documentation/sdk/controller/Code.controller.js +4 -3
  59. package/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js +22 -1
  60. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +198 -48
  61. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +5 -2
  62. package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +2 -1
  63. package/src/sap/ui/documentation/sdk/controller/util/ControlsInfo.js +2 -2
  64. package/src/sap/ui/documentation/sdk/controller/util/ResourcesInfo.js +1 -1
  65. package/src/sap/ui/documentation/sdk/model/formatter.js +5 -0
  66. package/src/sap/ui/documentation/sdk/model/messagesData.json +10 -0
  67. package/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-3.0.0/js/buttons.colVis.js +3 -1
  68. package/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-3.0.0/js/buttons.html5.js +3 -1
  69. package/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-3.0.0/js/buttons.jqueryui.js +3 -1
  70. package/src/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-3.0.0/js/dataTables.buttons.js +3 -1
  71. package/src/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-2.0.1/js/dataTables.jqueryui.js +3 -1
  72. package/src/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-2.0.1/js/dataTables.js +3 -1
  73. package/src/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js +3 -3
  74. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +1 -1
  75. package/src/sap/ui/documentation/sdk/view/App.view.xml +22 -1
  76. package/src/sap/ui/documentation/sdk/view/Code.view.xml +11 -5
  77. package/src/sap/ui/documentation/sdk/view/Sample.view.xml +3 -2
@@ -58,6 +58,15 @@ sap.ui.define([
58
58
  "sap-ui-language"
59
59
  ];
60
60
 
61
+ // Constants for better maintainability
62
+ var CONSTANTS = {
63
+ LEGACY_THEME_VERSION_THRESHOLD: 68,
64
+ LEGACY_DEFAULT_THEME: "sap_belize",
65
+ SETTINGS_TIMEOUT: 3000,
66
+ BUSY_DIALOG_TIMEOUT: 1000,
67
+ EXTERNAL_SAMPLE_RENDERING_DELAY: 100
68
+ };
69
+
61
70
  return SampleBaseController.extend("sap.ui.documentation.sdk.controller.Sample", {
62
71
  /* =========================================================== */
63
72
  /* lifecycle methods */
@@ -147,10 +156,9 @@ sap.ui.define([
147
156
 
148
157
  // check whether to open sample standalone
149
158
  if (bShouldRedirect) {
150
- this._handleRedirect();
159
+ this._handleRedirect(oSample);
151
160
  }
152
161
 
153
-
154
162
  // If we are in a scenario without contexts - this is the case for tutorials
155
163
  if (oSample.previousSampleId || oSample.nextSampleId) {
156
164
  oModelData.previousSampleId = oSample.previousSampleId;
@@ -180,7 +188,11 @@ sap.ui.define([
180
188
  oModelData.name = oSample.name;
181
189
  oModelData.details = oSample.details;
182
190
  oModelData.description = oSample.description;
183
- oModelData.showSettings = true;
191
+ oModelData.showSettings = !oSample.external; // Disable settings for external samples
192
+ oModelData.external = oSample.external;
193
+ oModelData.externalAppRef = oSample.externalAppRef;
194
+ oModelData.externalSourceRef = oSample.externalSourceRef;
195
+ oModelData.externalResourceRef = oSample.externalResourceRef;
184
196
 
185
197
  var sLocalStorageDKSamples = this._getChangedSamplesLocalStorage();
186
198
  if (sLocalStorageDKSamples && JSON.parse(sLocalStorageDKSamples).indexOf(oSample.id) > -1) {
@@ -238,20 +250,67 @@ sap.ui.define([
238
250
  /**
239
251
  * Handles redirection from DemoKit to the sample page, rather than loading it as an iFrame.
240
252
  * The 'dk-sample-standalone' query parameter must be in the URI to take effect.
253
+ * @param {object} oSample - The sample object containing metadata
241
254
  * @private
242
255
  */
243
- _handleRedirect : function () {
256
+ _handleRedirect : function (oSample) {
257
+ if (this._isExternalSample(oSample)) {
258
+ URLHelper.redirect(oSample.externalAppRef, false);
259
+ return;
260
+ }
261
+
244
262
  this._initIframeURL();
245
263
  this._applySearchParamValueToIframeURL('sap-ui-theme', this._sDefaultSampleTheme);
246
264
  this.sIFrameUrl += "&dk-sample-standalone";
247
265
  URLHelper.redirect(this.sIFrameUrl, false);
248
266
  },
249
267
 
268
+ /**
269
+ * Checks if the given sample is external
270
+ * @param {object} oSample - The sample object
271
+ * @returns {boolean} True if the sample is external
272
+ * @private
273
+ */
274
+ _isExternalSample: function(oSample) {
275
+ return oSample && oSample.external;
276
+ },
277
+
278
+ /**
279
+ * Gets the iframe content window safely
280
+ * @returns {Window|null} The iframe content window or null if not available
281
+ * @private
282
+ */
283
+ _getIframeContentWindow: function() {
284
+ var oIframeDomRef = this._oHtmlControl && this._oHtmlControl.getDomRef();
285
+ return oIframeDomRef ? oIframeDomRef.contentWindow : null;
286
+ },
287
+
288
+ /**
289
+ * Posts a message to the iframe content window safely
290
+ * @param {object} oMessage - The message to post
291
+ * @private
292
+ */
293
+ _postMessageToIframe: function(oMessage) {
294
+ var oContentWindow = this._getIframeContentWindow();
295
+ if (oContentWindow) {
296
+ oContentWindow.postMessage(oMessage, this.getOwnerComponent()._sSampleIframeOrigin);
297
+ }
298
+ },
299
+
250
300
  /**
251
301
  * Initializes the URL of the sample itself, loaded either in an iFrame or standalone.
252
302
  * @private
253
303
  */
254
304
  _initIframeURL : function () {
305
+ var oModelData = this.oModel && this.oModel.getData();
306
+
307
+ // Check if this is an external sample
308
+ if (oModelData && this._isExternalSample(oModelData) && oModelData.externalAppRef) {
309
+ this.sIFrameUrl = oModelData.externalAppRef;
310
+ // No need to proceed further for external samples
311
+ return;
312
+ }
313
+
255
314
  var sSampleOrigin = ResourcesUtil.getConfig(),
256
315
  sSampleVersion = ResourcesUtil.getResourcesVersion(),
257
316
  sSampleSearchParams = "";
@@ -341,22 +400,23 @@ sap.ui.define([
341
400
 
342
401
  loadSampleSettings: function(fnCallback) {
343
402
  return new Promise(function (resolve, reject) {
344
- var oIframe = this._oHtmlControl.getDomRef();
345
- oIframe.contentWindow.postMessage({
403
+ this._postMessageToIframe({
346
404
  type: "SETTINGS",
347
405
  reason: "get"
348
- }, this.getOwnerComponent()._sSampleIframeOrigin);
349
-
350
- window.addEventListener("message", loadSettings);
406
+ });
351
407
 
352
- function loadSettings(eMessage) {
408
+ var fnLoadSettings = function(eMessage) {
353
409
  fnCallback(eMessage);
354
- window.removeEventListener("message", loadSettings);
410
+ window.removeEventListener("message", fnLoadSettings);
355
411
  resolve();
356
- }
412
+ };
413
+
414
+ window.addEventListener("message", fnLoadSettings);
415
+
357
416
  setTimeout(function() {
417
+ window.removeEventListener("message", fnLoadSettings);
358
418
  reject("The sample iframe is not loading settings");
359
- },3000);
419
+ }, CONSTANTS.SETTINGS_TIMEOUT);
360
420
  }.bind(this));
361
421
  },
362
422
 
@@ -411,29 +471,37 @@ sap.ui.define([
411
471
  * @private
412
472
  */
413
473
  _applyAppConfiguration: function(sThemeActive, sDensityMode, bRTL){
414
- var oIframe = this._oHtmlControl.getDomRef();
474
+ var oModelData = this.oModel.getData();
475
+
476
+ // Skip settings application for external samples
477
+ if (this._isExternalSample(oModelData)) {
478
+ return;
479
+ }
415
480
 
416
481
  if (this.getModel().getProperty('/iframe')) {
417
482
  this._setStandAloneIndexIframeSetting(sThemeActive, sDensityMode, bRTL);
418
483
  } else {
419
- sDensityMode = this._presetDensity(sDensityMode);
420
- oIframe.contentWindow.postMessage({
484
+ this._postMessageToIframe({
421
485
  type: "SETTINGS",
422
486
  reason: "set",
423
487
  data: {
424
- "density": sDensityMode,
488
+ "density": this._presetDensity(sDensityMode),
425
489
  "RTL": bRTL,
426
490
  "theme": sThemeActive
427
491
  }
428
- }, this.getOwnerComponent()._sSampleIframeOrigin);
492
+ });
429
493
  }
430
494
  },
431
495
 
432
- _setStandAloneIndexIframeSetting(sThemeActive, sDensityMode, bRTL) {
496
+ _setStandAloneIndexIframeSetting: function(sThemeActive, sDensityMode, bRTL) {
433
497
  this._applySearchParamValueToIframeURL('sap-ui-theme', sThemeActive);
434
498
  this._applySearchParamValueToIframeURL('sap-ui-density', sDensityMode);
435
499
  this._applySearchParamValueToIframeURL('sap-ui-rtl', bRTL);
436
- this._oHtmlControl.getDomRef().src = this.sIFrameUrl;
500
+
501
+ var oIframeDomRef = this._oHtmlControl && this._oHtmlControl.getDomRef();
502
+ if (oIframeDomRef) {
503
+ oIframeDomRef.src = this.sIFrameUrl;
504
+ }
437
505
  },
438
506
 
439
507
  /**
@@ -444,7 +512,7 @@ sap.ui.define([
444
512
  this._oBusyDialog.open();
445
513
  setTimeout(function () {
446
514
  this._oBusyDialog.close();
447
- }.bind(this), 1000);
515
+ }.bind(this), CONSTANTS.BUSY_DIALOG_TIMEOUT);
448
516
  },
449
517
 
450
518
  _updateFileContent: function(sRef, sFile, bForceFetch) {
@@ -465,19 +533,37 @@ sap.ui.define([
465
533
  },
466
534
 
467
535
  onNewTab: function () {
536
+ var oModelData = this.oModel.getData();
537
+
538
+ // For external samples, open the external URL directly
539
+ if (this._isExternalSample(oModelData) && oModelData.externalAppRef) {
540
+ URLHelper.redirect(oModelData.externalAppRef, true);
541
+ return;
542
+ }
543
+
468
544
  if (this.oModel.getProperty("/iframe")) {
469
545
  URLHelper.redirect(this.sIFrameUrl, true);
470
546
  return;
471
547
  }
472
548
 
549
+ this._openNewTabWithSettings();
550
+ },
551
+
552
+ /**
553
+ * Opens a new tab with current sample settings applied
554
+ * @private
555
+ */
556
+ _openNewTabWithSettings: function() {
473
557
  this.loadSampleSettings(function(eMessage){
474
558
  this._applySearchParamValueToIframeURL('sap-ui-theme', eMessage.data.data.theme);
475
559
  this._applySearchParamValueToIframeURL('sap-ui-rtl', eMessage.data.data.RTL);
476
560
  this._applySearchParamValueToIframeURL('sap-ui-density', eMessage.data.data.density);
477
- }.bind(this)).then(function(){
561
+ }.bind(this))
562
+ .then(function(){
478
563
  URLHelper.redirect(this.sIFrameUrl, true);
479
- }.bind(this)).catch(function(err){
480
- Log.error(err);
564
+ }.bind(this))
565
+ .catch(function(err){
566
+ Log.error("Failed to load sample settings for new tab", err);
481
567
  });
482
568
  },
483
569
 
@@ -543,14 +629,10 @@ sap.ui.define([
543
629
 
544
630
  this._oHtmlControl = this._createHTMLControl()
545
631
  .addEventDelegate({
546
- onBeforeRendering: function () {
547
- window.removeEventListener("message", this.onMessage.bind(this));
548
- }.bind(this)
632
+ onBeforeRendering: this._onBeforeIframeRendering.bind(this)
549
633
  })
550
634
  .addEventDelegate({
551
- onAfterRendering: function () {
552
- window.addEventListener("message",this.onMessage.bind(this));
553
- }.bind(this)
635
+ onAfterRendering: this._onAfterIframeRendering.bind(this)
554
636
  });
555
637
 
556
638
  this._getPage().removeAllContent();
@@ -559,6 +641,31 @@ sap.ui.define([
559
641
  }.bind(this));
560
642
  },
561
643
 
644
+ /**
645
+ * Handler executed before the iframe rendering
646
+ * @private
647
+ */
648
+ _onBeforeIframeRendering: function() {
649
+ window.removeEventListener("message", this.onMessage.bind(this));
650
+ },
651
+
652
+ /**
653
+ * Handler executed after the iframe rendering
654
+ * @private
655
+ */
656
+ _onAfterIframeRendering: function() {
657
+ var oModelData = this.oModel.getData();
658
+
659
+ // For external samples, resolve immediately after rendering since they don't use our messaging protocol
660
+ if (this._isExternalSample(oModelData)) {
661
+ setTimeout(function() {
662
+ this.fResolve({});
663
+ }.bind(this), CONSTANTS.EXTERNAL_SAMPLE_RENDERING_DELAY);
664
+ } else {
665
+ window.addEventListener("message", this.onMessage.bind(this));
666
+ }
667
+ },
668
+
562
669
  _createHTMLControl: function () {
563
670
  return new HTML({
564
671
  id : "sampleFrame",
@@ -571,6 +678,12 @@ sap.ui.define([
571
678
  },
572
679
 
573
680
  onMessage: function(eMessage) {
681
+ var oModelData = this.oModel.getData();
682
+
683
+ if (this._isExternalSample(oModelData)) {
684
+ return;
685
+ }
686
+
574
687
  if (eMessage.origin !== this.getOwnerComponent()._sSampleIframeOrigin) {
575
688
  return;
576
689
  }
@@ -596,16 +709,21 @@ sap.ui.define([
596
709
  this.sIFrameUrl = sap.ui.require.toUrl(this._sId.replace(/\./g, "/")) + "/" + eMessage.data.config.sample.iframe;
597
710
  this._setStandAloneIndexIframeSetting(oSettingsData.theme, oSettingsData.density, oSettingsData.rtl);
598
711
  }
599
- this._oHtmlControl.getDomRef().contentWindow.postMessage({
600
- type: "SETTINGS",
601
- reason: "set",
602
- data: {
603
- "density": oSettingsData.density,
604
- "RTL": oSettingsData.rtl,
605
- "theme": oSettingsData.theme
606
- }
607
- }, this.getOwnerComponent()._sSampleIframeOrigin);
608
- this.fResolve(eMessage.data.config.sample);
712
+
713
+ // Skip settings initialization for external samples
714
+ if (!this._isExternalSample(oSettingsData)) {
715
+ this._postMessageToIframe({
716
+ type: "SETTINGS",
717
+ reason: "set",
718
+ data: {
719
+ "density": oSettingsData.density,
720
+ "RTL": oSettingsData.rtl,
721
+ "theme": oSettingsData.theme
722
+ }
723
+ });
724
+ }
725
+
726
+ this.fResolve(eMessage.data.config?.sample || {});
609
727
  },
610
728
  fnMessageLoad: function() {
611
729
  Log.info("Sample Iframe for sample " + this._sId + " is loaded");
@@ -640,15 +758,28 @@ sap.ui.define([
640
758
 
641
759
  setDefaultSampleTheme: function() {
642
760
  var sSampleVersion = ResourcesUtil.getResourcesVersion();
643
- this._sDefaultSampleTheme = sSampleVersion && parseInt(sSampleVersion.slice(3,5)) < 68 ?
644
- "sap_belize" : Theming.getTheme();
761
+ this._sDefaultSampleTheme = sSampleVersion && parseInt(sSampleVersion.slice(3,5)) < CONSTANTS.LEGACY_THEME_VERSION_THRESHOLD ?
762
+ CONSTANTS.LEGACY_DEFAULT_THEME : Theming.getTheme();
645
763
  },
646
764
 
647
765
  onNavBack : function (oEvt) {
648
766
  this.oRouter.navTo("entity", { id : this.entityId });
649
767
  },
650
768
 
651
- onNavToCode : function (evt) {
769
+ /**
770
+ * Handles the navigation to the code view or to the external source code
771
+ * @override
772
+ */
773
+ onNavToCode: function () {
774
+ var oModelData = this.oModel.getData();
775
+
776
+ // For external samples, redirect to the external source code repository
777
+ if (this._isExternalSample(oModelData) && oModelData.externalSourceRef) {
778
+ URLHelper.redirect(oModelData.externalSourceRef, true);
779
+ return;
780
+ }
781
+
782
+ // For internal samples, navigate to the code view as usual
652
783
  this.oRouter.navTo("code", {
653
784
  entityId: this.entityId,
654
785
  sampleId: this._sId
@@ -659,6 +790,26 @@ sap.ui.define([
659
790
  ToggleFullScreenHandler.updateMode(oEvt, this.getView(), this);
660
791
  },
661
792
 
793
+ /**
794
+ * Handles the download of the sample source code.
795
+ * If the sample is external, it redirects to the external URL instead.
796
+ * @override
797
+ */
798
+ onDownload: function () {
799
+ var oModelData = this.oModel.getData();
800
+
801
+ // For external samples, open the external URL directly since they don't have downloadable source files
802
+ if (this._isExternalSample(oModelData) && oModelData.externalResourceRef) {
803
+ URLHelper.redirect(oModelData.externalResourceRef, true);
804
+ return;
805
+ }
806
+
807
+ // Call the parent's download method for internal samples
808
+ if (SampleBaseController.prototype.onDownload) {
809
+ SampleBaseController.prototype.onDownload.call(this);
810
+ }
811
+ },
812
+
662
813
  _oRTA : null,
663
814
 
664
815
  _applySearchParamValueToIframeURL: function(sSearchParam, sNewVal) {
@@ -695,17 +846,17 @@ sap.ui.define([
695
846
  },
696
847
 
697
848
  onToggleAdaptationMode : function (oEvt) {
698
- if (!this._oHtmlControl || !this._oHtmlControl.getDomRef()) {
849
+ var oContentWindow = this._getIframeContentWindow();
850
+ if (!oContentWindow) {
699
851
  return false;
700
852
  }
701
853
 
702
- var oIframe = this._oHtmlControl.getDomRef();
703
- oIframe.contentWindow.postMessage({
854
+ this._postMessageToIframe({
704
855
  type: "RTA",
705
856
  data: {
706
857
  "msg": "Start the RTA"
707
858
  }
708
- }, this.getOwnerComponent()._sSampleIframeOrigin);
859
+ });
709
860
  },
710
861
 
711
862
  onRouteNotFound: function() {
@@ -713,7 +864,6 @@ sap.ui.define([
713
864
 
714
865
  this.oRouter.myNavToWithoutHash("sap.ui.documentation.sdk.view.SampleNotFound", "XML", false);
715
866
  setTimeout(this.appendPageTitle.bind(this, sNotFoundTitle));
716
- return;
717
867
  }
718
868
  });
719
869
  }
@@ -534,12 +534,15 @@ sap.ui.define([
534
534
  const versionData = this.getModel("versionData").getData();
535
535
  const isModuleAvailable = oControlData.module !== this.NOT_AVAILABLE;
536
536
  const library = versionData?.libraries?.find((lib) => lib.name === oEntityData.lib);
537
+ const version = library?.version?.includes("-SNAPSHOT") ? "" : library?.version;
538
+ const bIsOpenUI5Lib = library.npmPackageName?.startsWith("@openui5");
537
539
 
538
- if (!isModuleAvailable || !library?.version) {
540
+
541
+ if (!isModuleAvailable || !version || !bIsOpenUI5Lib) {
539
542
  return _getObjectAttributeBlock("Module", oControlData.module);
540
543
  }
541
544
 
542
- const sGitHubUrl = `https://github.com/SAP/openui5/blob/${library.version}/src/${oEntityData.lib}/src/${oControlData.module}.js`;
545
+ const sGitHubUrl = `https://github.com/SAP/openui5/blob/1.138.0/src/${oEntityData.lib}/src/${oControlData.module}.js`;
543
546
 
544
547
  return _getHBox({
545
548
  items: [
@@ -25,7 +25,8 @@ sap.ui.define([
25
25
  "COOKIE_NAMES": {
26
26
  "APPROVAL_REQUESTED": "dk_approval_requested",
27
27
  "ALLOW_FUNCTIONAL_COOKIES": "dk_allow_functional_cookies",
28
- "CONFIGURATION_APPEARANCE": "appearance"
28
+ "CONFIGURATION_APPEARANCE": "appearance",
29
+ "DEMOKIT_IMPORTANT_MESSAGES_READ": "dk_important_messages_read"
29
30
  },
30
31
 
31
32
  "LOCAL_STORAGE_NAMES": {
@@ -216,8 +216,8 @@ sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/
216
216
 
217
217
  oEnt.library = oDoc.library;
218
218
 
219
- // add entity
220
- if (aCategoryAllowList.indexOf(oEnt.category) > -1) {
219
+ // add entity (exclude hidden entities)
220
+ if (aCategoryAllowList.indexOf(oEnt.category) > -1 && !oEnt.hidden) {
221
221
  data.entities.push(oEnt);
222
222
  }
223
223
  });
@@ -41,7 +41,7 @@ sap.ui.define([],
41
41
  {
42
42
  "id": "linter",
43
43
  "text": "UI5 linter",
44
- "href": "https://github.com/SAP/ui5-linter"
44
+ "href": "https://github.com/UI5/linter"
45
45
  },
46
46
  {
47
47
  "id": "fpmExplorer",
@@ -125,6 +125,11 @@ sap.ui.define([
125
125
  return "";
126
126
  },
127
127
 
128
+ formatImportantMessage: function (sMsg, sParam) {
129
+ var sParam = this._getFullVersion();
130
+ return formatMessage(sMsg, sParam);
131
+ },
132
+
128
133
  formatIndexByVersionEntry: function (sControlName, sEntityName, sEntityType, bStatic, sText) {
129
134
  var sTitle = this.formatSenderLink(sControlName, sEntityName, sEntityType),
130
135
  sHref = this.formatApiHref(sControlName, sEntityName, sEntityType, bStatic),
@@ -4,5 +4,15 @@
4
4
  "type": "Information",
5
5
  "text": "Starting with version 1.88, {0} no longer supports Microsoft Internet Explorer 11.",
6
6
  "expire": "2021-04-30"
7
+ },
8
+ {
9
+ "id": "IM2",
10
+ "type": "Warning",
11
+ "versionValidator": ".*.legacy-free(-SNAPSHOT)?$",
12
+ "text": "This version ({0}) is intended for experimentation only and should not be used for productive purposes. For more information, see",
13
+ "expire": "2027-04-30",
14
+ "linkText": "the SAP Community blog post",
15
+ "mandatory": true,
16
+ "linkHref": "https://community.sap.com/t5/technology-blog-posts-by-sap/explore-sapui5-openui5-1-136-x-legacy-free/ba-p/14103271"
7
17
  }
8
18
  ]}
@@ -46,7 +46,9 @@
46
46
  }
47
47
  else {
48
48
  // Browser
49
- factory( jQuery, window, document );
49
+ // ##### BEGIN: MODIFIED BY SAP
50
+ factory( globalThis?.sap?.ui?.require?.("sap/ui/thirdparty/jquery") ?? jQuery, window, document );
51
+ // ##### END: MODIFIED BY SAP
50
52
  }
51
53
  }(function( $, window, document ) {
52
54
  'use strict';
@@ -49,7 +49,9 @@
49
49
  }
50
50
  else {
51
51
  // Browser
52
- factory( jQuery, window, document );
52
+ // ##### BEGIN: MODIFIED BY SAP
53
+ factory( globalThis?.sap?.ui?.require?.("sap/ui/thirdparty/jquery") ?? jQuery, window, document );
54
+ // ##### END: MODIFIED BY SAP
53
55
  }
54
56
  }(function( $, window, document ) {
55
57
  'use strict';
@@ -45,7 +45,9 @@
45
45
  }
46
46
  else {
47
47
  // Browser
48
- factory( jQuery, window, document );
48
+ // ##### BEGIN: MODIFIED BY SAP
49
+ factory( globalThis?.sap?.ui?.require?.("sap/ui/thirdparty/jquery") ?? jQuery, window, document );
50
+ // ##### END: MODIFIED BY SAP
49
51
  }
50
52
  }(function( $, window, document ) {
51
53
  'use strict';
@@ -41,7 +41,9 @@
41
41
  }
42
42
  else {
43
43
  // Browser
44
- factory( jQuery, window, document );
44
+ // ##### BEGIN: MODIFIED BY SAP
45
+ factory( globalThis?.sap?.ui?.require?.("sap/ui/thirdparty/jquery") ?? jQuery, window, document );
46
+ // ##### END: MODIFIED BY SAP
45
47
  }
46
48
  }(function( $, window, document ) {
47
49
  'use strict';
@@ -41,7 +41,9 @@
41
41
  }
42
42
  else {
43
43
  // Browser
44
- factory(jQuery, window, document);
44
+ // ##### BEGIN: MODIFIED BY SAP
45
+ factory(globalThis?.sap?.ui?.require?.("sap/ui/thirdparty/jquery") ?? jQuery, window, document);
46
+ // ##### END: MODIFIED BY SAP
45
47
  }
46
48
  }(function ($, window, document) {
47
49
  'use strict';
@@ -56,7 +56,9 @@
56
56
  }
57
57
  else {
58
58
  // Browser
59
- window.DataTable = factory(jQuery, window, document);
59
+ // ##### BEGIN: MODIFIED BY SAP
60
+ window.DataTable = factory(globalThis?.sap?.ui?.require?.("sap/ui/thirdparty/jquery") ?? jQuery, window, document);
61
+ // ##### END: MODIFIED BY SAP
60
62
  }
61
63
  }(function ($, window, document) {
62
64
  "use strict";
@@ -998,10 +998,10 @@ var hljs = (function () {
998
998
  * @param {string} message
999
999
  */
1000
1000
  const deprecated = (version, message) => {
1001
- if (seenDeprecations[`1.136.1/${message}`]) return;
1001
+ if (seenDeprecations[`1.138.0/${message}`]) return;
1002
1002
 
1003
- console.log(`Deprecated as of 1.136.1. ${message}`);
1004
- seenDeprecations[`1.136.1/${message}`] = true;
1003
+ console.log(`Deprecated as of 1.138.0. ${message}`);
1004
+ seenDeprecations[`1.138.0/${message}`] = true;
1005
1005
  };
1006
1006
 
1007
1007
  /* eslint-disable no-throw-literal */
@@ -328,7 +328,7 @@ sap.ui.define([
328
328
  }
329
329
 
330
330
  // Do not change href if it's already changed or if it's a stand-alone HTML page
331
- if (!sTargetHref || (oUri = URI(sTargetHref)).is("absolute") || oUri.suffix() === "html") {
331
+ if (!sTargetHref || (oUri = URI(sTargetHref)).is("absolute") || (sTargetHref.indexOf("#") <= 0 && oUri.suffix() === "html")) {
332
332
  return;
333
333
  }
334
334
 
@@ -71,7 +71,7 @@
71
71
  <OverflowToolbar class="sapUiDemoKitHeaderOTB" style="Clear">
72
72
  <ObjectStatus
73
73
  text="{ parts:
74
- ['appView>/bShowVersionSwitchButton', 'versionData>/isDevVersion', 'versionData>/version'],
74
+ ['appView>/bShowVersionSwitchButton', 'versionData>/isDevVersion', 'versionData>/fullVersion'],
75
75
  formatter: '.formatter.formatVersionStatus'
76
76
  }"
77
77
  state="Information"
@@ -294,6 +294,27 @@
294
294
  </tnt:sideContent>
295
295
 
296
296
  <tnt:mainContents>
297
+ <VBox items="{messagesData>/messages}" width="100%" class="sapUiTinyMarginTop" visible="{=!!${messagesData>/iVisibleMessagesCount}}">
298
+ <items>
299
+ <MessageStrip close="onCloseImportantMessage" text="{
300
+ parts: [
301
+ 'messagesData>text'
302
+ ],
303
+ formatter: '.formatter.formatImportantMessage'
304
+ }" class="sapUiTinyMarginBottom sapUiTinyMarginBeginEnd" showIcon="true" showCloseButton="{= !${messagesData>mandatory} }" visible="{messagesData>isMessageVisible}" type="{messagesData>type}">
305
+ <customData>
306
+ <core:CustomData key="messageID" value="{messagesData>id}" />
307
+ </customData>
308
+ <link>
309
+ <Link
310
+ visible="{= (!!${messagesData>linkText} &amp;&amp; !!${messagesData>linkHref}) }"
311
+ text="{messagesData>linkText}"
312
+ target="_blank"
313
+ href="{messagesData>linkHref}" />
314
+ </link>
315
+ </MessageStrip>
316
+ </items>
317
+ </VBox>
297
318
  <OverflowToolbar
298
319
  visible="{= (${appView>/bHasMaster} &amp;&amp; !${appView>/bLandscape}) &#124;&#124; ${appView>/bHasMaster} &amp;&amp; ${appView>/device/system/phone} }">
299
320
  <ToggleButton