@openui5/sap.ui.documentation 1.99.1 → 1.102.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 (96) hide show
  1. package/.eslintrc.json +17 -0
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +6 -6
  4. package/src/sap/ui/documentation/.library +1 -1
  5. package/src/sap/ui/documentation/TitleLink.js +1 -2
  6. package/src/sap/ui/documentation/library.js +14 -18
  7. package/src/sap/ui/documentation/messagebundle.properties +4 -2
  8. package/src/sap/ui/documentation/messagebundle_ar.properties +3 -1
  9. package/src/sap/ui/documentation/messagebundle_bg.properties +3 -1
  10. package/src/sap/ui/documentation/messagebundle_ca.properties +3 -1
  11. package/src/sap/ui/documentation/messagebundle_cs.properties +3 -1
  12. package/src/sap/ui/documentation/messagebundle_cy.properties +3 -1
  13. package/src/sap/ui/documentation/messagebundle_da.properties +3 -1
  14. package/src/sap/ui/documentation/messagebundle_de.properties +3 -1
  15. package/src/sap/ui/documentation/messagebundle_el.properties +3 -1
  16. package/src/sap/ui/documentation/messagebundle_en.properties +3 -1
  17. package/src/sap/ui/documentation/messagebundle_en_GB.properties +3 -1
  18. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +2 -1
  19. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +43 -10
  20. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +3 -1
  21. package/src/sap/ui/documentation/messagebundle_es.properties +3 -1
  22. package/src/sap/ui/documentation/messagebundle_es_MX.properties +3 -1
  23. package/src/sap/ui/documentation/messagebundle_et.properties +3 -1
  24. package/src/sap/ui/documentation/messagebundle_fi.properties +3 -1
  25. package/src/sap/ui/documentation/messagebundle_fr.properties +3 -1
  26. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +3 -1
  27. package/src/sap/ui/documentation/messagebundle_hi.properties +3 -1
  28. package/src/sap/ui/documentation/messagebundle_hr.properties +3 -1
  29. package/src/sap/ui/documentation/messagebundle_hu.properties +3 -1
  30. package/src/sap/ui/documentation/messagebundle_id.properties +3 -1
  31. package/src/sap/ui/documentation/messagebundle_it.properties +3 -1
  32. package/src/sap/ui/documentation/messagebundle_iw.properties +3 -1
  33. package/src/sap/ui/documentation/messagebundle_ja.properties +3 -1
  34. package/src/sap/ui/documentation/messagebundle_kk.properties +3 -1
  35. package/src/sap/ui/documentation/messagebundle_ko.properties +4 -2
  36. package/src/sap/ui/documentation/messagebundle_lt.properties +3 -1
  37. package/src/sap/ui/documentation/messagebundle_lv.properties +3 -1
  38. package/src/sap/ui/documentation/messagebundle_ms.properties +3 -1
  39. package/src/sap/ui/documentation/messagebundle_nl.properties +3 -1
  40. package/src/sap/ui/documentation/messagebundle_no.properties +3 -1
  41. package/src/sap/ui/documentation/messagebundle_pl.properties +3 -1
  42. package/src/sap/ui/documentation/messagebundle_pt.properties +3 -1
  43. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +3 -1
  44. package/src/sap/ui/documentation/messagebundle_ro.properties +3 -1
  45. package/src/sap/ui/documentation/messagebundle_ru.properties +3 -1
  46. package/src/sap/ui/documentation/messagebundle_sh.properties +3 -1
  47. package/src/sap/ui/documentation/messagebundle_sk.properties +3 -1
  48. package/src/sap/ui/documentation/messagebundle_sl.properties +3 -1
  49. package/src/sap/ui/documentation/messagebundle_sv.properties +3 -1
  50. package/src/sap/ui/documentation/messagebundle_th.properties +3 -1
  51. package/src/sap/ui/documentation/messagebundle_tr.properties +3 -1
  52. package/src/sap/ui/documentation/messagebundle_uk.properties +3 -1
  53. package/src/sap/ui/documentation/messagebundle_vi.properties +3 -1
  54. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +3 -1
  55. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +16 -14
  56. package/src/sap/ui/documentation/sdk/Component.js +1 -5
  57. package/src/sap/ui/documentation/sdk/controller/ApiDetail.controller.js +7 -13
  58. package/src/sap/ui/documentation/sdk/controller/ApiDetailIndexDeprecatedExperimental.controller.js +1 -3
  59. package/src/sap/ui/documentation/sdk/controller/ApiMaster.controller.js +0 -2
  60. package/src/sap/ui/documentation/sdk/controller/App.controller.js +0 -2
  61. package/src/sap/ui/documentation/sdk/controller/BaseController.js +1 -1
  62. package/src/sap/ui/documentation/sdk/controller/Code.controller.js +11 -6
  63. package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +11 -15
  64. package/src/sap/ui/documentation/sdk/controller/Entity.controller.js +1 -2
  65. package/src/sap/ui/documentation/sdk/controller/LiveEditor.controller.js +1 -2
  66. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +181 -303
  67. package/src/sap/ui/documentation/sdk/controller/SampleBaseController.js +3 -4
  68. package/src/sap/ui/documentation/sdk/controller/SearchPage.controller.js +4 -5
  69. package/src/sap/ui/documentation/sdk/controller/SubApiDetail.controller.js +8 -9
  70. package/src/sap/ui/documentation/sdk/controller/TermsOfUse.controller.js +3 -2
  71. package/src/sap/ui/documentation/sdk/controller/TopicDetail.controller.js +17 -19
  72. package/src/sap/ui/documentation/sdk/controller/TopicDetailInitial.controller.js +2 -2
  73. package/src/sap/ui/documentation/sdk/controller/VersionNotFound.controller.js +2 -0
  74. package/src/sap/ui/documentation/sdk/controller/Welcome.controller.js +3 -3
  75. package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +3 -4
  76. package/src/sap/ui/documentation/sdk/controller/util/ControlsInfo.js +7 -6
  77. package/src/sap/ui/documentation/sdk/controller/util/DataTable.js +1 -1
  78. package/src/sap/ui/documentation/sdk/controller/util/DataTableHelper.js +1 -1
  79. package/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js +1 -1
  80. package/src/sap/ui/documentation/sdk/controller/util/ResourceDownloadUtil.js +1 -1
  81. package/src/sap/ui/documentation/sdk/controller/util/ToolsInfo.js +5 -0
  82. package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterDropDown.js +0 -2
  83. package/src/sap/ui/documentation/sdk/controller/util/datatable/filters/DataTableFilterRange.js +2 -4
  84. package/src/sap/ui/documentation/sdk/controller/util/overlay/Overlay.js +1 -1
  85. package/src/sap/ui/documentation/sdk/cookieSettingsDialog/controller/CookieSettingsDialog.controller.js +1 -2
  86. package/src/sap/ui/documentation/sdk/images/tools/AccessibilityGuide.png +0 -0
  87. package/src/sap/ui/documentation/sdk/index.html +196 -25
  88. package/src/sap/ui/documentation/sdk/model/formatter.js +1 -1
  89. package/src/sap/ui/documentation/sdk/model/libraryData.js +18 -4
  90. package/src/sap/ui/documentation/sdk/util/DocumentationRouter.js +8 -4
  91. package/src/sap/ui/documentation/sdk/util/Resources.js +5 -2
  92. package/src/sap/ui/documentation/sdk/view/Sample.view.xml +2 -2
  93. package/src/sap/ui/documentation/sdk/view/Tools.view.xml +19 -0
  94. package/src/sap/ui/documentation/themes/sap_horizon_dark/library.source.less +9 -0
  95. package/src/sap/ui/documentation/themes/sap_horizon_hcb/library.source.less +9 -0
  96. package/src/sap/ui/documentation/themes/sap_horizon_hcw/library.source.less +9 -0
@@ -5,14 +5,13 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/thirdparty/jquery",
9
- "sap/ui/documentation/sdk/controller/BaseController",
8
+ "sap/ui/documentation/sdk/controller/BaseController",
10
9
  "sap/ui/documentation/sdk/controller/util/SearchUtil",
11
10
  "sap/ui/documentation/sdk/controller/util/Highlighter",
12
11
  "sap/ui/model/json/JSONModel",
13
- "sap/m/GroupHeaderListItem",
14
- "sap/base/Log"
15
- ], function(jQuery, BaseController, SearchUtil, Highlighter, JSONModel, GroupHeaderListItem, Log) {
12
+ "sap/m/GroupHeaderListItem",
13
+ "sap/base/Log"
14
+ ], function(BaseController, SearchUtil, Highlighter, JSONModel, GroupHeaderListItem, Log) {
16
15
  "use strict";
17
16
 
18
17
  return BaseController.extend("sap.ui.documentation.sdk.controller.SearchPage", {
@@ -7,10 +7,7 @@
7
7
  sap.ui.define([
8
8
  "sap/ui/thirdparty/jquery",
9
9
  "sap/ui/documentation/sdk/controller/BaseController",
10
- "sap/ui/model/json/JSONModel",
11
- "sap/ui/documentation/sdk/controller/util/ControlsInfo",
12
10
  "sap/ui/documentation/sdk/util/ToggleFullScreenHandler",
13
- "sap/ui/documentation/sdk/controller/util/APIInfo",
14
11
  "sap/ui/documentation/sdk/model/formatter",
15
12
  "sap/m/Image",
16
13
  "sap/m/Label",
@@ -23,9 +20,12 @@ sap.ui.define([
23
20
  "sap/m/library",
24
21
  "sap/ui/core/library",
25
22
  "sap/m/CustomListItem",
26
- "sap/m/List"
27
- ], function (jQuery, BaseController, JSONModel, ControlsInfo, ToggleFullScreenHandler, APIInfo,
28
- formatter, Image, Label, Link, Text, HBox, ObjectAttribute, ObjectStatus, Popover, library, coreLibrary, CustomListItem, List) {
23
+ "sap/m/List",
24
+ "sap/ui/dom/includeStylesheet",
25
+ "sap/ui/dom/includeScript"
26
+ ], function (jQuery, BaseController, ToggleFullScreenHandler,
27
+ formatter, Image, Label, Link, Text, HBox, ObjectAttribute, ObjectStatus, Popover,
28
+ library, coreLibrary, CustomListItem, List, includeStylesheet, includeScript) {
29
29
  "use strict";
30
30
 
31
31
  // shortcut for sap.m.FlexWrap
@@ -48,9 +48,8 @@ sap.ui.define([
48
48
 
49
49
  if ( !window.hljs ) {
50
50
  //solarized-light
51
- jQuery.sap.includeStyleSheet("resources/sap/ui/documentation/sdk/thirdparty/highlight.js/styles.css");
52
- jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js" });
53
-
51
+ includeStylesheet("resources/sap/ui/documentation/sdk/thirdparty/highlight.js/styles.css");
52
+ includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js" });
54
53
  }
55
54
  },
56
55
 
@@ -5,8 +5,9 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/documentation/sdk/controller/BaseController"
9
- ], function (BaseController) {
8
+ "sap/ui/documentation/sdk/controller/BaseController",
9
+ "sap/ui/thirdparty/jquery"
10
+ ], function (BaseController, jQuery) {
10
11
  "use strict";
11
12
 
12
13
  return BaseController.extend("sap.ui.documentation.sdk.controller.TermsOfUse", {
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "jquery.sap.global",
8
+ "sap/ui/thirdparty/jquery",
9
9
  "sap/ui/core/ResizeHandler",
10
10
  "sap/ui/documentation/sdk/controller/BaseController",
11
11
  "sap/ui/model/json/JSONModel",
@@ -15,15 +15,14 @@ sap.ui.define([
15
15
  "sap/ui/documentation/sdk/util/Resources",
16
16
  "sap/ui/documentation/sdk/controller/util/ResponsiveImageMap",
17
17
  "sap/ui/documentation/sdk/controller/util/SidyBySideImageMap",
18
- "sap/ui/core/HTML",
19
- "sap/base/Log",
20
18
  "sap/m/LightBox",
21
19
  "sap/m/LightBoxItem",
22
20
  "./util/DataTableHelper",
23
21
  "./util/DataTable",
24
22
  "sap/m/Button",
25
- "sap/m/MessageToast"
26
-
23
+ "sap/m/MessageToast",
24
+ "sap/ui/dom/includeStylesheet",
25
+ "sap/ui/dom/includeScript"
27
26
  ],
28
27
  function (
29
28
  jQuery,
@@ -36,14 +35,14 @@ sap.ui.define([
36
35
  ResourcesUtil,
37
36
  ResponsiveImageMap,
38
37
  SidyBySideImageMap,
39
- HTML,
40
- Log,
41
38
  LightBox,
42
39
  LightBoxItem,
43
40
  DataTableHelper,
44
41
  DataTable,
45
42
  Button,
46
- MessageToast
43
+ MessageToast,
44
+ includeStylesheet,
45
+ includeScript
47
46
  ) {
48
47
  "use strict";
49
48
 
@@ -78,30 +77,29 @@ sap.ui.define([
78
77
 
79
78
  if ( !window.hljs ) {
80
79
  //solarized-light
81
- jQuery.sap.includeStyleSheet("resources/sap/ui/documentation/sdk/thirdparty/highlight.js/styles.css");
82
- jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js" });
83
-
80
+ includeStylesheet("resources/sap/ui/documentation/sdk/thirdparty/highlight.js/styles.css");
81
+ includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/highlight.js/highlight.js" });
84
82
  }
85
83
 
86
- jQuery.sap.includeStyleSheet("resources/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-1.10.15/css/dataTables.jqueryui.css");
87
- jQuery.sap.includeStyleSheet("resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/css/buttons.jqueryui.css");
84
+ includeStylesheet("resources/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-1.10.15/css/dataTables.jqueryui.css");
85
+ includeStylesheet("resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/css/buttons.jqueryui.css");
88
86
 
89
87
  // order is important
90
- jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-1.10.15/js/jquery.dataTables.js" })
88
+ includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-1.10.15/js/jquery.dataTables.js" })
91
89
  .then(function () {
92
- return jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-1.10.15/js/dataTables.jqueryui.js" });
90
+ return includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/DataTables-1.10.15/js/dataTables.jqueryui.js" });
93
91
  })
94
92
  .then(function () {
95
- return jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/dataTables.buttons.js" });
93
+ return includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/dataTables.buttons.js" });
96
94
  })
97
95
  .then(function () {
98
- return jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/buttons.jqueryui.js" });
96
+ return includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/buttons.jqueryui.js" });
99
97
  })
100
98
  .then(function () {
101
- return jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/buttons.html5.js" });
99
+ return includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/buttons.html5.js" });
102
100
  })
103
101
  .then(function () {
104
- return jQuery.sap.includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/buttons.colVis.js" });
102
+ return includeScript({ url: "resources/sap/ui/documentation/sdk/thirdparty/DataTables/Buttons-1.4.0/js/buttons.colVis.js" });
105
103
  })
106
104
  .then(function () {
107
105
  dataTablesConfigURL = ResourcesUtil.getResourceOriginPath(oConfig.docuPath + 'dataTablesConfig.json');
@@ -8,7 +8,7 @@ sap.ui.define([
8
8
  "sap/ui/documentation/sdk/controller/BaseController",
9
9
  "sap/ui/Device",
10
10
  "sap/ui/thirdparty/jquery"
11
- ], function(BaseController, Device, jQuery0) {
11
+ ], function(BaseController, Device, jQuery) {
12
12
  "use strict";
13
13
 
14
14
  var GIT_HUB_URL = "https://github.com/SAP/openui5-docs";
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * to show disclaimer message if such is available in the loaded json file.
36
36
  */
37
37
  handleDocumentationDisclaimer: function () {
38
- jQuery0.ajax(this.getConfig().docuPath + "disclaimer.json", {dataType: "json"}).then(function (oData) {
38
+ jQuery.ajax(this.getConfig().docuPath + "disclaimer.json", {dataType: "json"}).then(function (oData) {
39
39
  var oView = this.getView();
40
40
  if (oData.showDisclaimer && oData.message) {
41
41
  oView.byId("disclaimerBlock").setVisible(true);
@@ -6,10 +6,12 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "./BaseController",
9
+ "sap/ui/thirdparty/jquery",
9
10
  "sap/ui/thirdparty/URI",
10
11
  "sap/m/library"
11
12
  ], function (
12
13
  BaseController,
14
+ jQuery,
13
15
  URI,
14
16
  mLib
15
17
  ) {
@@ -7,10 +7,10 @@
7
7
  sap.ui.define([
8
8
  "sap/ui/documentation/sdk/controller/BaseController",
9
9
  "sap/ui/Device",
10
+ "sap/ui/VersionInfo",
10
11
  "sap/ui/model/json/JSONModel",
11
- "sap/ui/model/resource/ResourceModel",
12
12
  "sap/base/Log"
13
- ], function (BaseController, Device, JSONModel, ResourceModel, Log) {
13
+ ], function (BaseController, Device, VersionInfo, JSONModel, Log) {
14
14
  "use strict";
15
15
 
16
16
  return BaseController.extend("sap.ui.documentation.sdk.controller.Welcome", {
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  onInit: function () {
23
23
  this.getRouter().getRoute("welcome").attachPatternMatched(this._onMatched, this);
24
24
 
25
- sap.ui.getVersionInfo({async: true}).then(function (oVersionInfo) {
25
+ VersionInfo.load().then(function (oVersionInfo) {
26
26
  var oModel = new JSONModel({
27
27
  isOpenUI5: oVersionInfo && oVersionInfo.gav && /openui5/i.test(oVersionInfo.gav)
28
28
  });
@@ -93,10 +93,9 @@ sap.ui.define([
93
93
 
94
94
  _getRouteConfig: function(sRouteName) {
95
95
  var oConfig = this._getSapUI5ConfigEntry(),
96
- aRoutes = oConfig.routing.routes,
97
- aRoute = jQuery.grep(aRoutes, function(oRoute){return oRoute.name === sRouteName; }),
98
- oRoute = aRoute.length && aRoute[0];
99
- return oRoute;
96
+ aRoutes = oConfig.routing.routes;
97
+
98
+ return aRoutes.find(function(oRoute){return oRoute.name === sRouteName; });
100
99
  },
101
100
 
102
101
  _getSapUI5ConfigEntry: function () {
@@ -5,8 +5,8 @@
5
5
  */
6
6
 
7
7
  // Provides information about 'explored' samples.
8
- sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/base/Log"],
9
- function(jQuery, library, Log) {
8
+ sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/base/Log", "sap/ui/documentation/sdk/util/Resources"],
9
+ function(jQuery, library, Log, ResourcesUtil) {
10
10
  "use strict";
11
11
 
12
12
  var oPromise;
@@ -52,7 +52,8 @@ sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/
52
52
  "Data Binding",
53
53
  "Data Visualization",
54
54
  "Map",
55
- "Utility"
55
+ "Utility",
56
+ "Web Components"
56
57
  ];
57
58
  var afilterProps = ["namespace", "since", "category"]; // content density are set manually
58
59
  var oFilterSets = {
@@ -118,7 +119,7 @@ sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/
118
119
  oDoc.explored.samplesRef.forEach(function (oItem) {
119
120
  (function() {
120
121
  var paths = {};
121
- paths[oItem.namespace.replace(/\./g, "/")] = "" + oItem.ref || ".";
122
+ paths[oItem.namespace.replace(/\./g, "/")] = "" + ResourcesUtil.getResourceOriginPath(oItem.ref || ".");
122
123
  sap.ui.loader.config({paths: paths});
123
124
  }());
124
125
  });
@@ -126,7 +127,7 @@ sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/
126
127
  // register a single namespace
127
128
  (function() {
128
129
  var paths = {};
129
- paths[oDoc.explored.samplesRef.namespace.replace(/\./g, "/")] = "" + oDoc.explored.samplesRef.ref || ".";
130
+ paths[oDoc.explored.samplesRef.namespace.replace(/\./g, "/")] = "" + ResourcesUtil.getResourceOriginPath(oDoc.explored.samplesRef.ref || ".");
130
131
  sap.ui.loader.config({paths: paths});
131
132
  }());
132
133
  }
@@ -420,4 +421,4 @@ sap.ui.define(["sap/ui/thirdparty/jquery", 'sap/ui/documentation/library', "sap/
420
421
 
421
422
  return ControlsInfo;
422
423
 
423
- }, /* bExport= */ true);
424
+ }, /* bExport= */ true);
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "jquery.sap.global",
8
+ "sap/ui/thirdparty/jquery",
9
9
  "sap/m/Input",
10
10
  "sap/m/library",
11
11
  "../config/datatable",
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "jquery.sap.global",
8
+ "sap/ui/thirdparty/jquery",
9
9
  "./DataTableUtil"
10
10
  ], function (
11
11
  $,
@@ -206,7 +206,7 @@
206
206
  /**
207
207
  * Searches the index, given a search string
208
208
  *
209
- * @param sQuery, the search string
209
+ * @param sQuery - the search string
210
210
  * @returns {Promise<any>}
211
211
  */
212
212
  function searchIndex(sQuery, oOptions) {
@@ -57,7 +57,7 @@ sap.ui.define([], function() {
57
57
  },
58
58
 
59
59
  _getExpectedResponseType: function(sResourceUrl, bTreatAsText) {
60
- if (sResourceUrl.match(/.+(.js|.json|.less|.xml|.html|.properties|.css|.svg|.md|.txt|.yaml|.yml)$/i) || bTreatAsText) { // supported text types
60
+ if (sResourceUrl.match(/.+(.js|.json|.less|.xml|.html|.properties|.css|.svg|.md|.txt|.feature|.yaml|.yml)$/i) || bTreatAsText) { // supported text types
61
61
  return "text";
62
62
  }
63
63
 
@@ -69,6 +69,11 @@ sap.ui.define([],
69
69
  "id": "flexibleProgrammingModelExplorer",
70
70
  "text": "Flexible Programming Model Explorer",
71
71
  "href": "https://sapui5.hana.ondemand.com/test-resources/sap/fe/core/fpmExplorer/index.html#/overview/introduction"
72
+ },
73
+ {
74
+ "id": "accessibilityGuide",
75
+ "text": "Accessibility Guide",
76
+ "href": "test-resources/sap/m/demokit/accessibilityGuide/webapp/index.html"
72
77
  }
73
78
  ];
74
79
 
@@ -6,11 +6,9 @@
6
6
 
7
7
  sap.ui.define(
8
8
  [
9
- "jquery.sap.global",
10
9
  'sap/ui/core/Control',
11
10
  './DataTableFilterDropDownRenderer'
12
11
  ], function (
13
- $,
14
12
  Control,
15
13
  DataTableFilterDropDownRenderer
16
14
  ) {
@@ -6,11 +6,9 @@
6
6
 
7
7
  sap.ui.define(
8
8
  [
9
- "jquery.sap.global",
10
9
  'sap/ui/core/Control',
11
10
  './DataTableFilterRangeRenderer'
12
11
  ], function (
13
- $,
14
12
  Control,
15
13
  DataTableFilterRangeRenderer
16
14
  ) {
@@ -44,8 +42,8 @@ sap.ui.define(
44
42
  oFrom = this.getAggregation("from");
45
43
  oTo = this.getAggregation("to");
46
44
 
47
- [oFrom, oTo].forEach(function (oConrtol) {
48
- oConrtol.attachLiveChange(function () {
45
+ [oFrom, oTo].forEach(function (oControl) {
46
+ oControl.attachLiveChange(function () {
49
47
  oValue = {
50
48
  from: oFrom.getValue(),
51
49
  to: oTo.getValue()
@@ -4,7 +4,7 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- sap.ui.define(["sap/base/Log", "./shapes/ShapeFactory"], function (Log, ShapeFactory) {
7
+ sap.ui.define(["./shapes/ShapeFactory"], function (ShapeFactory) {
8
8
  "use strict";
9
9
 
10
10
  var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
@@ -6,12 +6,11 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/ui/core/mvc/Controller",
9
- "sap/m/library",
10
9
  "sap/ui/model/json/JSONModel",
11
10
  "sap/ui/core/Fragment",
12
11
  "sap/ui/model/resource/ResourceModel",
13
12
  "sap/ui/core/Core"
14
- ], function (Controller, mobileLibrary, JSONModel, Fragment, ResourceModel, Core) {
13
+ ], function (Controller, JSONModel, Fragment, ResourceModel, Core) {
15
14
  "use strict";
16
15
 
17
16
  return Controller.extend("sap.ui.documentation.sdk.cookieSettingsDialog.controller.CookieSettingsDialog", {
@@ -7,27 +7,30 @@
7
7
  <title>SAPUI5 Navigation</title>
8
8
  <script>
9
9
 
10
- var sSampleId = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-id'),
11
- sSamplePath = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-path'),
12
- sOrigin = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-origin'),
13
- sVersion = new window.URLSearchParams(window.location.search).get('sap-ui-xx-sample-version'),
14
- sOriginEncoded,
15
- oBaseTag,
16
- oScriptTag,
17
- oPath = {};
18
-
19
- if (!sOrigin || sOrigin == ".") {
20
- sOrigin = window.location.origin + (window.location.pathname.includes("testsuite") ? "/testsuite" : "");
10
+ var getUrlParam = function(sParamName) {
11
+ return new window.URLSearchParams(window.location.search).get(sParamName);
12
+ };
13
+
14
+ var sSampleId = getUrlParam('sap-ui-xx-sample-id'),
15
+ sOrigin = getUrlParam('sap-ui-xx-sample-origin'),
16
+ sPresetTheme = getUrlParam('sap-ui-theme') || 'sap_fiori_3',
17
+ sPresetRTL = getUrlParam('sap-ui-rtl') || false,
18
+ oPath = {},
19
+ sOriginEncoded,
20
+ oBaseTag,
21
+ oScriptTag;
22
+
23
+ if (sOrigin === "" || sOrigin === ".") {
24
+ var sHref = document.location.href;
25
+ sOrigin = sHref.substring(0, sHref.lastIndexOf('resources/sap/ui/documentation/sdk/') - 1);
21
26
  } else {
22
- sOrigin = new URL(sOrigin, document.baseURI).pathname + sVersion;
27
+ sOrigin = new URL(sOrigin, document.baseURI).pathname;
23
28
  }
24
29
 
25
30
  sOriginEncoded = encodeURI(sOrigin);
26
31
 
27
- oPath[sSampleId.replace(/\./g, "/")] = encodeURI(sSamplePath);
28
32
  oPath["sap/ui/demo/mock"] = sOriginEncoded + "/test-resources/sap/ui/documentation/sdk";
29
33
  oPath["test-resources/sap/ui/documentation/sdk"] = ".";
30
- oPath["sap/uxap/sample"] = sOriginEncoded + "/test-resources/sap/uxap/demokit/sample";
31
34
 
32
35
  oBaseTag = document.createElement("base");
33
36
  oBaseTag.setAttribute("href", sOriginEncoded + "/");
@@ -39,29 +42,197 @@
39
42
  oScriptTag.setAttribute("data-sap-ui-compatVersion", "edge");
40
43
  oScriptTag.dataset.sapUiAsync = true;
41
44
  oScriptTag.dataset.sapUiLibs = "sap.m";
45
+ oScriptTag.dataset.sapUiRtl = sPresetRTL;
42
46
  oScriptTag.dataset.sapUiResourceroots = JSON.stringify(oPath);
47
+ oScriptTag.dataset.sapUiTheme = sPresetTheme;
43
48
 
44
49
  document.write(oScriptTag.outerHTML);
45
-
46
50
  </script>
47
51
  </head>
48
52
  <body class="sapUiBody sapUiSizeCompact" id="content">
49
53
  <script>
50
54
  sap.ui.getCore().attachInit(function () {
51
55
  sap.ui.require([
52
- "sap/ui/core/ComponentContainer"
53
- ], function (ComponentContainer) {
56
+ "sap/ui/core/ComponentContainer",
57
+ "sap/ui/core/Component",
58
+ "sap/ui/documentation/library",
59
+ "sap/ui/documentation/sdk/controller/util/ControlsInfo",
60
+ "sap/base/Log"
61
+ ], function (ComponentContainer, Component, library, ControlsInfo, Log) {
54
62
 
55
- sap.ui.loader.config({
56
- paths: oPath
57
- });
63
+ var oLibraryInfoSingleton = library._getLibraryInfoSingleton();
64
+ oLibraryInfoSingleton.getResourceUrl = undefined;
65
+
66
+ var loadInfo = function() {
67
+ return new Promise(function (resolve) {
68
+ var fnCallback = function(oAppInfo) {
69
+ if (oAppInfo && oAppInfo.libraries) {
70
+ var aLibPromises = [];
71
+ oAppInfo.libraries.forEach(function(oLib) {
72
+ var oLibPromise = new Promise(function(innResolve) {
73
+ oLibraryInfoSingleton._getDocuIndex(oLib.name, function(oDoc) {
74
+ if (!oDoc.explored) {
75
+ innResolve();
76
+ return;
77
+ }
78
+
79
+ if (Array.isArray(oDoc.explored.samplesRef)) {
80
+ // register an array of namespaces
81
+ oDoc.explored.samplesRef.forEach(function (oItem) {
82
+ var paths = {};
83
+ paths[oItem.namespace.replace(/\./g, "/")] = "" + (oItem.ref || ".");
84
+ sap.ui.loader.config({paths: paths});
85
+ });
86
+ } else {
87
+ // register a single namespace
88
+
89
+ var paths = {};
90
+ paths[oDoc.explored.samplesRef.namespace.replace(/\./g, "/")] = "" + (oDoc.explored.samplesRef.ref || ".");
91
+ sap.ui.loader.config({paths: paths});
92
+ }
93
+ innResolve();
94
+ });
95
+ });
96
+ aLibPromises.push(oLibPromise);
97
+ });
98
+ }
99
+ Promise.all(aLibPromises).then(function(){
100
+ resolve();
101
+ })
102
+ };
103
+
104
+ jQuery.ajax({
105
+ url: sap.ui.require.toUrl("sap-ui-version.json"),
106
+ dataType: "json",
107
+ error: function(xhr, status, e) {
108
+ Log.error("failed to load library list from '" + sUrl + "': " + status + ", " + e);
109
+ resolve();
110
+ },
111
+ success : function(oAppInfo, sStatus, oXHR) {
112
+ if (!oAppInfo) {
113
+ Log.error("failed to load library list from '" + sUrl + "': " + sStatus + ", Data: " + oAppInfo);
114
+ resolve();
115
+ return;
116
+ }
117
+
118
+ fnCallback(oAppInfo);
119
+ }
120
+ });
121
+ });
122
+ }
123
+ loadInfo().then(function(){
58
124
 
59
- var oContainer = new ComponentContainer({
60
- name : sSampleId,
61
- height : "100%",
62
- manifest: false
63
- }).placeAt('content');
125
+ Log.info("Samples paths added successfully");
64
126
 
127
+ var sCompId = 'sampleComp-' + sSampleId;
128
+ var sCompName = sSampleId;
129
+
130
+ Promise.all([
131
+ sap.ui.getCore().loadLibrary("sap.ui.fl", {async: true}),
132
+ sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true})
133
+ ]).then(function () {
134
+ sap.ui.require([
135
+ "sap/ui/fl/Utils",
136
+ "sap/ui/fl/FakeLrepConnectorLocalStorage",
137
+ "sap/ui/core/util/reflection/JsControlTreeModifier"
138
+ ], function(Utils,
139
+ FakeLrepConnectorLocalStorage,
140
+ JsControlTreeModifier) {
141
+ // fake stable IDs
142
+ JsControlTreeModifier.checkControlId = function () {
143
+ return true;
144
+ };
145
+ Utils.checkControlId = function() {
146
+ return true;
147
+ };
148
+
149
+ FakeLrepConnectorLocalStorage.enableFakeConnector({
150
+ "isProductiveSystem": true
151
+ });
152
+ window.parent.postMessage({
153
+ type: "RTA",
154
+ data: {
155
+ "msg": "RTA is loaded"
156
+ }
157
+ }, getUrlParam('sap-ui-xx-dk-origin'))
158
+ });
159
+ });
160
+
161
+ Component.create({
162
+ id: sCompId,
163
+ name: sCompName
164
+ }).then(function (oComponent) {
165
+
166
+ var oContainer = new ComponentContainer({component : oComponent, height: "100%"})
167
+ .placeAt("content");
168
+ var oMessage = {};
169
+ oMessage.type = "INIT";
170
+ oMessage.data = {
171
+ "msg": "fired after component container is placed in DOM"
172
+ };
173
+ oMessage.config = oComponent.getMetadata().getConfig();
174
+ window.parent.postMessage(oMessage, getUrlParam('sap-ui-xx-dk-origin'));
175
+
176
+ window.addEventListener("message", function(eMessage){
177
+ if (eMessage.data.type === "EXIT") {
178
+ oComponent.destroy();
179
+ } else if (eMessage.data.type === "RTA") {
180
+ enableRta();
181
+ } else if (eMessage.data.type === "SETTINGS") {
182
+ if (eMessage.data.reason === "get") {
183
+ window.parent.postMessage({
184
+ type: "SETTINGS",
185
+ data: {
186
+ "density": document.body.classList[1],
187
+ "theme": sap.ui.getCore().getConfiguration().getTheme(),
188
+ "RTL": sap.ui.getCore().getConfiguration().getRTL()
189
+ }
190
+ }, getUrlParam('sap-ui-xx-dk-origin'));
191
+ } else if (eMessage.data.reason === "set") {
192
+ var sBodyDensityClass = Array.prototype.find.call(document.body.classList, function(el){
193
+ return el.includes("sapUiSize");
194
+ });
195
+ sBodyDensityClass ? document.body.classList.replace(sBodyDensityClass, eMessage.data.data.density) :
196
+ document.body.classList.add(eMessage.data.data.density);
197
+ sap.ui.getCore().getConfiguration().setRTL(eMessage.data.data.RTL);
198
+ sap.ui.getCore().applyTheme(eMessage.data.data.theme);
199
+ }
200
+ }
201
+ });
202
+
203
+ function enableRta() {
204
+ sap.ui.require([
205
+ "sap/ui/rta/api/startKeyUserAdaptation"
206
+ ], function (
207
+ startKeyUserAdaptation
208
+ ) {
209
+ startKeyUserAdaptation({
210
+ rootControl: oContainer.getComponentInstance()
211
+ }).then(function (oRta) {
212
+ oContainer.$().css({
213
+ "padding-top": "2.5rem",
214
+ "box-sizing": "border-box"
215
+ });
216
+ oRta.attachStop(function () {
217
+ oContainer.$().css({
218
+ "padding-top": "0",
219
+ "box-sizing": "content-box"
220
+ });
221
+ oRta.destroy();
222
+ });
223
+ });
224
+ });
225
+ };
226
+ }).catch(function(err){
227
+ window.parent.postMessage({
228
+ type: "ERR",
229
+ data: {
230
+ "msg": err
231
+ }
232
+ }, getUrlParam('sap-ui-xx-dk-origin'));
233
+ });
234
+
235
+ });
65
236
  });
66
237
  });
67
238
  </script>
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * Formats a library namespace to link to the API reference if it starts with sap.
24
24
  *
25
25
  * @public
26
- * @param {string} sNamespace value to be formatted
26
+ * @param {string} sLink value to be formatted
27
27
  * @returns {string} formatted link
28
28
  */
29
29
  crossLink: function (sLink) {