@openui5/sap.ui.support 1.93.3 → 1.96.1

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 (30) hide show
  1. package/.reuse/dep5 +6 -11
  2. package/THIRDPARTY.txt +10 -16
  3. package/package.json +6 -6
  4. package/src/sap/ui/support/.library +1 -1
  5. package/src/sap/ui/support/RuleAnalyzer.js +1 -1
  6. package/src/sap/ui/support/jQuery.sap.support.js +1 -1
  7. package/src/sap/ui/support/library.js +7 -7
  8. package/src/sap/ui/support/supportRules/IssueManager.js +9 -9
  9. package/src/sap/ui/support/supportRules/RuleSet.js +2 -3
  10. package/src/sap/ui/support/supportRules/Storage.js +1 -1
  11. package/src/sap/ui/support/supportRules/WindowCommunicationBus.js +1 -1
  12. package/src/sap/ui/support/supportRules/report/IssueRenderer.js +1 -45
  13. package/src/sap/ui/support/supportRules/report/ReportProvider.js +92 -115
  14. package/src/sap/ui/support/supportRules/report/resources/ReportTemplate.html +43 -95
  15. package/src/sap/ui/support/supportRules/report/resources/images/checked.svg +2 -0
  16. package/src/sap/ui/support/supportRules/report/resources/images/collapsed.svg +2 -0
  17. package/src/sap/ui/support/supportRules/report/resources/images/expanded.svg +2 -0
  18. package/src/sap/ui/support/supportRules/report/resources/images/unchecked.svg +2 -0
  19. package/src/sap/ui/support/supportRules/report/resources/{filter.js → index.js} +56 -0
  20. package/src/sap/ui/support/supportRules/report/resources/styles.css +104 -0
  21. package/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js +2 -2
  22. package/src/sap/ui/support/supportRules/ui/controllers/PresetsController.js +1 -1
  23. package/src/sap/ui/support/supportRules/ui/external/ElementTree.js +20 -1
  24. package/src/sap/ui/support/supportRules/ui/models/CustomListSelection.js +2 -2
  25. package/src/sap/ui/support/supportRules/ui/overlay.html +3 -3
  26. package/src/sap/ui/support/supportRules/ui/styles/overlay.css +20 -1
  27. package/ui5.yaml +4 -1
  28. package/src/sap/ui/support/supportRules/report/resources/collapseExpand.css +0 -33
  29. package/src/sap/ui/support/supportRules/report/resources/collapseExpand.js +0 -60
  30. package/src/sap/ui/support/supportRules/report/resources/filter.css +0 -19
package/.reuse/dep5 CHANGED
@@ -309,7 +309,7 @@ License: MIT
309
309
  Comment: these files belong to: lodash
310
310
 
311
311
  Files: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
312
- Copyright: 2018 Mathias Nater
312
+ Copyright: 2021 Mathias Nater
313
313
  License: MIT
314
314
  Comment: these files belong to: Hyphenopoly
315
315
 
@@ -347,11 +347,6 @@ Copyright: 2013 Ariya Hidayat and other contributors
347
347
  License: BSD-2-Clause
348
348
  Comment: these files belong to: Esprima
349
349
 
350
- Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
351
- Copyright: 2006 Google Inc.
352
- License: Apache-2.0
353
- Comment: these files belong to: google-code-prettify
354
-
355
350
  Files: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/highlight.js/*
356
351
  Copyright: 2006-2020, Ivan Sagalaev
357
352
  License: BSD-3-Clause
@@ -405,6 +400,11 @@ Copyright: 2014 Vitaly Puzrin, Alex Kocharin
405
400
  License: MIT
406
401
  Comment: these files belong to: Markdown-it
407
402
 
403
+ Files: src/sap.ui.integration/test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
404
+ Copyright: 2015-2017 Evgeny Poberezkin
405
+ License: MIT
406
+ Comment: these files belong to: ajv
407
+
408
408
 
409
409
  # Library: sap.ui.mdc:
410
410
 
@@ -452,11 +452,6 @@ Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
452
452
  License: Apache-2.0
453
453
  Comment: these files belong to: LESS
454
454
 
455
- Files: ../test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
456
- Copyright: 2015-2017 Evgeny Poberezkin
457
- License: MIT
458
- Comment: these files belong to: ajv
459
-
460
455
  Files: lib/jsdoc/ui5/plugin.js
461
456
  Copyright:
462
457
  2009-2021 SAP SE or an SAP affiliate company and OpenUI5 contributors
package/THIRDPARTY.txt CHANGED
@@ -6,7 +6,7 @@ The full text of all referenced licenses is appended at the end of this file.
6
6
 
7
7
  Library: sap.ui.codeeditor:
8
8
 
9
- Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.4
9
+ Component: Ace (Ajax.org Cloud9 Editor), version: 1.4.13
10
10
  Copyright: 2010, Ajax.org B.V.
11
11
  License: BSD-3-Clause
12
12
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-3-Clause.txt
@@ -279,8 +279,8 @@ License: MIT
279
279
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
280
280
  Contained in: src/sap.ui.core/src/sap/ui/base/util/restricted/_/lodash.custom.js
281
281
 
282
- Component: Hyphenopoly, version: 2.4.0
283
- Copyright: 2018 Mathias Nater
282
+ Component: Hyphenopoly, version: 3.4.0
283
+ Copyright: 2021 Mathias Nater
284
284
  License: MIT
285
285
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
286
286
  Contained in: src/sap.ui.core/src/sap/ui/thirdparty/hyphenopoly/*
@@ -324,12 +324,6 @@ License: BSD-2-Clause
324
324
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/BSD-2-Clause.txt
325
325
  Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/esprima.js
326
326
 
327
- Component: google-code-prettify, version: 20130304
328
- Copyright: 2006 Google Inc.
329
- License: Apache-2.0
330
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
331
- Contained in: src/sap.ui.documentation/src/sap/ui/documentation/sdk/thirdparty/google-code-prettify/*
332
-
333
327
  Component: highlight.js, version: 10.4.1
334
328
  Copyright: 2006-2020, Ivan Sagalaev
335
329
  License: BSD-3-Clause
@@ -376,7 +370,7 @@ License: Unicode-DFS-2015
376
370
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Unicode-DFS-2015.txt
377
371
  Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/webcomponents/Unicode-Data-Files-LICENSE.txt
378
372
 
379
- Component: Adaptive Cards, version: 1.2.3
373
+ Component: Adaptive Cards, version: 2.9.0
380
374
  Copyright: 2017 Microsoft
381
375
  License: MIT
382
376
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
@@ -395,6 +389,12 @@ License: MIT
395
389
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
396
390
  Contained in: src/sap.ui.integration/src/sap/ui/integration/thirdparty/markdown-it.js
397
391
 
392
+ Component: ajv, version: 6.12.3
393
+ Copyright: 2015-2017 Evgeny Poberezkin
394
+ License: MIT
395
+ License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
396
+ Contained in: src/sap.ui.integration/test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
397
+
398
398
 
399
399
  Library: sap.ui.mdc:
400
400
 
@@ -450,12 +450,6 @@ License: Apache-2.0
450
450
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
451
451
  Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
452
452
 
453
- Component: ajv, version: 6.12.3
454
- Copyright: 2015-2017 Evgeny Poberezkin
455
- License: MIT
456
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
457
- Contained in: ../test/sap/ui/integration/demokit/cardExplorer/webapp/thirdparty/ajv/ajv.min.js
458
-
459
453
  Component: JSDoc 3, version: 3.6.7
460
454
  Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
461
455
  License: Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.support",
3
- "version": "1.93.3",
3
+ "version": "1.96.1",
4
4
  "description": "OpenUI5 UI Library sap.ui.support",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,10 +14,10 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.93.3",
18
- "@openui5/sap.ui.codeeditor": "1.93.3",
19
- "@openui5/sap.ui.core": "1.93.3",
20
- "@openui5/sap.ui.fl": "1.93.3",
21
- "@openui5/sap.ui.layout": "1.93.3"
17
+ "@openui5/sap.m": "1.96.1",
18
+ "@openui5/sap.ui.codeeditor": "1.96.1",
19
+ "@openui5/sap.ui.core": "1.96.1",
20
+ "@openui5/sap.ui.fl": "1.96.1",
21
+ "@openui5/sap.ui.layout": "1.96.1"
22
22
  }
23
23
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.93.3</version>
9
+ <version>1.96.1</version>
10
10
 
11
11
  <documentation>UI5 library: sap.ui.support</documentation>
12
12
 
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @namespace
33
33
  * @alias sap.ui.support.RuleAnalyzer
34
34
  * @author SAP SE
35
- * @version 1.93.3
35
+ * @version 1.96.1
36
36
  * @public
37
37
  */
38
38
  var RuleAnalyzer = {
@@ -32,7 +32,7 @@ sap.ui.define(["sap/ui/support/supportRules/Main",
32
32
  * @deprecated Since version 1.60.0. Please use sap/ui/support/RuleAnalyzer instead.
33
33
  * @alias jQuery.sap.support
34
34
  * @author SAP SE
35
- * @version 1.93.3
35
+ * @version 1.96.1
36
36
  * @public
37
37
  */
38
38
  jQuery.sap.support = {
@@ -23,7 +23,7 @@ sap.ui.define(["sap/ui/core/library"],
23
23
  * @namespace
24
24
  * @name sap.ui.support
25
25
  * @author SAP SE
26
- * @version 1.93.3
26
+ * @version 1.96.1
27
27
  * @since 1.50
28
28
  * @public
29
29
  */
@@ -41,7 +41,7 @@ sap.ui.define(["sap/ui/core/library"],
41
41
  controls: [],
42
42
  elements: [],
43
43
  noLibraryCSS: true,
44
- version: "1.93.3",
44
+ version: "1.96.1",
45
45
  extensions: {
46
46
  //Configuration used for rule loading of Support Assistant
47
47
  "sap.ui.support": {
@@ -53,7 +53,7 @@ sap.ui.define(["sap/ui/core/library"],
53
53
  /**
54
54
  * Defines severity types.
55
55
  * @enum {string}
56
- * @since 1.93.3
56
+ * @since 1.96.1
57
57
  * @public
58
58
  */
59
59
  sap.ui.support.Severity = {
@@ -77,7 +77,7 @@ sap.ui.define(["sap/ui/core/library"],
77
77
  /**
78
78
  * Defines the Audiences.
79
79
  * @enum {string}
80
- * @since 1.93.3
80
+ * @since 1.96.1
81
81
  * @public
82
82
  */
83
83
  sap.ui.support.Audiences = {
@@ -101,7 +101,7 @@ sap.ui.define(["sap/ui/core/library"],
101
101
  /**
102
102
  * Issue Categories.
103
103
  * @enum {string}
104
- * @since 1.93.3
104
+ * @since 1.96.1
105
105
  * @public
106
106
  */
107
107
  sap.ui.support.Categories = {
@@ -170,7 +170,7 @@ sap.ui.define(["sap/ui/core/library"],
170
170
  /**
171
171
  * Analysis history formats.
172
172
  * @enum {string}
173
- * @since 1.93.3
173
+ * @since 1.96.1
174
174
  * @public
175
175
  */
176
176
  sap.ui.support.HistoryFormats = {
@@ -189,7 +189,7 @@ sap.ui.define(["sap/ui/core/library"],
189
189
  /**
190
190
  * Contains the available system presets.
191
191
  * @enum {object}
192
- * @since 1.93.3
192
+ * @since 1.96.1
193
193
  * @public
194
194
  */
195
195
  sap.ui.support.SystemPresets = {
@@ -337,26 +337,26 @@ sap.ui.define(["jquery.sap.global", "sap/ui/base/Object", "sap/ui/support/librar
337
337
  * @returns {string} String containing the formatted name.
338
338
  */
339
339
  _getFormattedName: function(oValues) {
340
- var sHighColor = "",
341
- sMediumColor = "",
342
- sLowColor = "";
340
+ var sHighClass = "",
341
+ sMediumClass = "",
342
+ sLowClass = "";
343
343
 
344
344
  if (oValues.highCount > 0) {
345
- sHighColor = "color: " + constants.SUPPORT_ASSISTANT_SEVERITY_HIGH_COLOR + ";";
345
+ sHighClass = "issueSeverityHigh";
346
346
  }
347
347
 
348
348
  if (oValues.mediumCount > 0) {
349
- sMediumColor = "color: " + constants.SUPPORT_ASSISTANT_SEVERITY_MEDIUM_COLOR + ";";
349
+ sMediumClass = "issueSeverityMedium";
350
350
  }
351
351
 
352
352
  if (oValues.lowCount > 0) {
353
- sLowColor = "color: " + constants.SUPPORT_ASSISTANT_SEVERITY_LOW_COLOR + ";";
353
+ sLowClass = "issueSeverityLow";
354
354
  }
355
355
 
356
356
  return oValues.name +
357
- " (<span style=\"" + sHighColor + "\"> " + oValues.highCount + " " + oValues.highName + ", </span> " +
358
- "<span style=\"" + sMediumColor + "\"> " + oValues.mediumCount + " " + oValues.mediumName + ", </span> " +
359
- "<span style=\"" + sLowColor + "\"> " + oValues.lowCount + " " + oValues.lowName + "</span> )";
357
+ " (<span class=\"" + sHighClass + "\"> " + oValues.highCount + " " + oValues.highName + ", </span> " +
358
+ "<span class=\"" + sMediumClass + "\"> " + oValues.mediumCount + " " + oValues.mediumName + ", </span> " +
359
+ "<span class=\"" + sLowClass + "\"> " + oValues.lowCount + " " + oValues.lowName + "</span> )";
360
360
  },
361
361
 
362
362
  /**
@@ -38,7 +38,7 @@ function (jQuery, library, storage, constants) {
38
38
  * @name sap.ui.support.RuleSet
39
39
  * @memberof sap.ui.support
40
40
  * @author SAP SE
41
- * @version 1.93.3
41
+ * @version 1.96.1
42
42
  * @param {object} oSettings Name of the initiated
43
43
  * @returns {void}
44
44
  */
@@ -141,8 +141,7 @@ function (jQuery, library, storage, constants) {
141
141
  return "Support rule with the id " + oSettings.id + " needs a description.";
142
142
  }
143
143
 
144
- // eslint-disable-next-line no-unsafe-negation
145
- if (!oSettings.resolution && (!oSettings.resolutionurls || !oSettings.resolutionurls.length > 0)) {
144
+ if (!oSettings.resolution && (!oSettings.resolutionurls || oSettings.resolutionurls.length === 0)) {
146
145
  jQuery.sap.log.error("Support rule with the id " + oSettings.id + " needs either a resolution or resolutionurls or should have a ticket handler function");
147
146
  return "Support rule with the id " + oSettings.id + " needs either a resolution or resolutionurls or should have a ticket handler function";
148
147
  }
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @name sap.ui.support.Storage
58
58
  * @alias sap.ui.support.Storage
59
59
  * @author SAP SE.
60
- * @version 1.93.3
60
+ * @version 1.96.1
61
61
  * @private
62
62
  * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
63
63
  */
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @name sap.ui.support.WindowCommunicationBus
27
27
  * @memberof sap.ui.support
28
28
  * @author SAP SE
29
- * @version 1.93.3
29
+ * @version 1.96.1
30
30
  * @private
31
31
  */
32
32
  var WindowCommunicationBus = BaseObject.extend("sap.ui.support.supportRules.WindowCommunicationBus", {
@@ -10,8 +10,6 @@
10
10
  sap.ui.define(['jquery.sap.global'], function(jQuery) {
11
11
  'use strict';
12
12
 
13
- var _OPARenderingInitialized = false;
14
-
15
13
  function getEscapedString(value) {
16
14
  if (value) {
17
15
  if (Array.isArray(value)) {
@@ -179,49 +177,7 @@ sap.ui.define(['jquery.sap.global'], function(jQuery) {
179
177
  return '<div>' + content + '</div>';
180
178
  }
181
179
 
182
- /* eslint-disable no-undef */
183
- /**
184
- * Creates an html string containing the issues and appends it to the OPA html page
185
- * @param {Object} issues - the issues in viewmodel format
186
- * @returns {String}
187
- */
188
- function renderIssuesForOPA(issues) {
189
- if (!jQuery("#qunit") || !issues) {
190
- return;
191
- }
192
-
193
- // TODO: Add rendered issues to a buffer and render all of them at the same time at the end of the OPA test.
194
- var element = jQuery(this.render(issues));
195
- jQuery("#qunit").append(element);
196
-
197
- if (!_OPARenderingInitialized) {
198
- var styles = [
199
- jQuery.sap.getResourcePath('sap/ui/support/supportRules/report/resources/styles.css'),
200
- jQuery.sap.getResourcePath('sap/ui/support/supportRules/report/resources/collapseExpand.css'),
201
- jQuery.sap.getResourcePath('sap/ui/support/supportRules/report/resources/filter.css')
202
- ];
203
- var collapseExpandUrl = jQuery.sap.getResourcePath('sap/ui/support/supportRules/report/resources/collapseExpand.js');
204
- var filterUrl = jQuery.sap.getResourcePath('sap/ui/support/supportRules/report/resources/filter.js');
205
-
206
- jQuery.each(styles, function (index, value) {
207
- jQuery('<link>').appendTo('head').attr({ type: 'text/css', rel: 'stylesheet', href: value });
208
- });
209
- jQuery.getScript(collapseExpandUrl, function () {
210
- window.sapUiSupportReport.collapseExpand.init();
211
- });
212
- jQuery.getScript(filterUrl, function () {
213
- window.sapUiSupportReport.filter.init();
214
- });
215
- _OPARenderingInitialized = true;
216
- } else {
217
- window.sapUiSupportReport.collapseExpand.init();
218
- window.sapUiSupportReport.filter.init();
219
- }
220
- }
221
- /* eslint-enable no-undef */
222
-
223
180
  return {
224
- render: render,
225
- renderIssuesForOPA: renderIssuesForOPA
181
+ render: render
226
182
  };
227
183
  }, true);
@@ -7,20 +7,12 @@
7
7
  /**
8
8
  * Creates a report from data.
9
9
  */
10
- sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/support/supportRules/report/Archiver',
11
- 'sap/ui/support/supportRules/report/IssueRenderer'], function(jQuery, Handlebars, Archiver, IssueRenderer) {
10
+ sap.ui.define(['jquery.sap.global', 'sap/ui/support/supportRules/report/Archiver',
11
+ 'sap/ui/support/supportRules/report/IssueRenderer'], function(jQuery, Archiver, IssueRenderer) {
12
12
  'use strict';
13
13
 
14
14
  // Private fields
15
15
  var resourcesBaseUrl = jQuery.sap.getResourcePath('sap/ui/support/supportRules/report/resources');
16
- var resources = [
17
- { url: resourcesBaseUrl + '/ReportTemplate.html', type: 'template' },
18
- { url: resourcesBaseUrl + '/styles.css', type: 'css' },
19
- { url: resourcesBaseUrl + '/filter.css', type: 'css' },
20
- { url: resourcesBaseUrl + '/collapseExpand.css', type: 'css' },
21
- { url: resourcesBaseUrl + '/filter.js', type: 'js' },
22
- { url: resourcesBaseUrl + '/collapseExpand.js', type: 'js' }
23
- ];
24
16
 
25
17
  /*
26
18
  * Functions taken from core.support.plugins.TechInfo.js
@@ -63,21 +55,13 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
63
55
  function getResource(resource) {
64
56
  return jQuery.ajax({
65
57
  type: 'GET',
66
- url: resource.url,
58
+ url: resourcesBaseUrl + "/" + resource,
67
59
  dataType: 'text'
68
60
  }).then(function (text) {
69
- return { content: text, type: resource.type };
61
+ return text;
70
62
  });
71
63
  }
72
64
 
73
- function getResources() {
74
- var deferreds = [];
75
- for (var i = 0; i < resources.length; i++) {
76
- deferreds.push(getResource(resources[i]));
77
- }
78
- return jQuery.when.apply(jQuery, deferreds);
79
- }
80
-
81
65
  /*
82
66
  * Modified version of the function onsapUiSupportTechInfoData from core.support.plugins.TechInfo.js
83
67
  */
@@ -85,7 +69,7 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
85
69
  var content = '';
86
70
 
87
71
  if (!technicalInfo) {
88
- return new Handlebars.SafeString(content);
72
+ return content;
89
73
  }
90
74
 
91
75
  try {
@@ -141,7 +125,7 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
141
125
  jQuery.sap.log.warning('There was a problem extracting technical info.');
142
126
  }
143
127
 
144
- return new Handlebars.SafeString(content);
128
+ return content;
145
129
  }
146
130
 
147
131
  function getComponentPart(value) {
@@ -157,7 +141,7 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
157
141
  var content = '';
158
142
 
159
143
  if (!appInfo) {
160
- return new Handlebars.SafeString(content);
144
+ return content;
161
145
  }
162
146
 
163
147
  content += '<table class="sapUiTable"><tr><th>Component ID</th><th>Type</th><th>Title</th><th>Subtitle</th><th>Application version</th><th>Description</th><th>BCP Component</th></tr>';
@@ -186,7 +170,7 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
186
170
  content = '';
187
171
  }
188
172
 
189
- return new Handlebars.SafeString(content);
173
+ return content;
190
174
  }
191
175
 
192
176
  function getGlobalScope(displaySettings) {
@@ -249,14 +233,14 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
249
233
  content = '';
250
234
  }
251
235
 
252
- return new Handlebars.SafeString(content);
236
+ return content;
253
237
  }
254
238
 
255
239
  function getRules(groups) {
256
240
  var content = '';
257
241
 
258
242
  if (!groups) {
259
- return new Handlebars.SafeString(content);
243
+ return content;
260
244
  }
261
245
 
262
246
  try {
@@ -302,115 +286,110 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
302
286
  content = '';
303
287
  }
304
288
 
305
- return new Handlebars.SafeString(content);
289
+ return content;
306
290
  }
307
291
 
308
- function getResourcesHtml(resources, type) {
309
- var content = '';
310
-
311
- if (type !== 'script' && type !== 'style') {
312
- return content;
313
- }
292
+ function getIssues(issues) {
293
+ return IssueRenderer.render(issues, true);
294
+ }
314
295
 
315
- for (var i = 0; i < resources.length; i++) {
316
- switch (type) {
317
- case 'script': content += '<script>' + resources[i] + '</script>\n'; break;
318
- case 'style': content += '<style type="text/css">' + resources[i] + '</style>\n'; break;
319
- }
296
+ function getRulePreset(oRulePreset) {
297
+ if (!oRulePreset) {
298
+ return "none";
320
299
  }
321
300
 
322
- return new Handlebars.SafeString(content);
301
+ return "<strong>" + oRulePreset.title + "/" + oRulePreset.id + "</strong>";
323
302
  }
324
303
 
325
- Handlebars.registerHelper('getTechnicalInformation', function (technicalInfo) {
326
- return getTechnicalInformation(technicalInfo);
327
- });
328
- Handlebars.registerHelper('getRules', function (rules) {
329
- return getRules(rules);
330
- });
331
- Handlebars.registerHelper('getIssues', function (issues) {
332
- return new Handlebars.SafeString(IssueRenderer.render(issues, true));
333
- });
334
- Handlebars.registerHelper('getAppInfo', function (appInfo) {
335
- return getAppInfo(appInfo);
336
- });
337
- Handlebars.registerHelper('getScope', function (scope) {
338
- return getScope(scope);
339
- });
340
- Handlebars.registerHelper('getScripts', function (scripts) {
341
- return getResourcesHtml(scripts, 'script');
342
- });
343
- Handlebars.registerHelper('getStyles', function (styles) {
344
- return getResourcesHtml(styles, 'style');
345
- });
346
-
347
304
  // Public functions
348
305
 
349
306
  /**
350
307
  * Creates an html string containing the whole report.
351
308
  * @param {Object} oData - the data required to create a report
352
- * @returns {String}
309
+ * @param {String} [sBaseUrl] - the base path to javascript and css resources
310
+ * @returns {String} the complete html.
353
311
  */
354
- function getReportHtml(oData) {
355
- return getResources().then(function () {
356
- var styles = [],
357
- scripts = [],
358
- html = '',
359
- i,
360
- template = {},
361
- reportContext = {};
362
-
363
- for (i = 0; i < arguments.length; i++) {
364
- switch (arguments[i].type) {
365
- case 'template': html = arguments[i].content; break;
366
- case 'css': styles.push(arguments[i].content); break;
367
- case 'js': scripts.push(arguments[i].content); break;
368
- }
369
- }
312
+ function getReportHtml(oData, sBaseUrl) {
313
+ if (!sBaseUrl) {
314
+ sBaseUrl = resourcesBaseUrl + "/";
315
+ }
370
316
 
371
- template = Handlebars.compile(html);
372
-
373
- reportContext = {
374
- technicalInfo: oData.technical,
375
- issues: oData.issues,
376
- appInfo: oData.application,
377
- rules: oData.rules,
378
- rulePreset: oData.rulePreset,
379
- metadata: {
380
- title: oData.name + ' Analysis Results',
381
- title_TechnicalInfo: 'Technical Information',
382
- title_Issues: 'Issues',
383
- title_AppInfo: 'Application Information',
384
- title_SelectedRules: 'Available and (<span class="checked"></span>) Selected Rules',
385
- timestamp: new Date(),
386
- scope: oData.scope,
387
- analysisDuration: oData.analysisDuration,
388
- analysisDurationTitle: oData.analysisDurationTitle,
389
- styles: styles,
390
- scripts: scripts
391
- }
317
+ return getResource("ReportTemplate.html").then(function(sTemplate) {
318
+ var oContext = {
319
+ baseUrl: sBaseUrl,
320
+ technicalInfo: getTechnicalInformation(oData.technical),
321
+ issues: getIssues(oData.issues),
322
+ appInfo: getAppInfo(oData.application),
323
+ rules: getRules(oData.rules),
324
+ rulePreset: getRulePreset(oData.rulePreset),
325
+ metadataTitle: oData.name + ' Analysis Results',
326
+ metadataTitleTechnicalInfo: 'Technical Information',
327
+ metadataTitleIssues: 'Issues',
328
+ metadataTitleAppInfo: 'Application Information',
329
+ metadataTitleSelectedRules: 'Available and (<span class="checked"></span>) Selected Rules',
330
+ metadataTimestamp: new Date(),
331
+ metadataScope: getScope(oData.scope),
332
+ metadataAnalysisDuration: oData.analysisDuration,
333
+ metadataAnalysisDurationTitle: oData.analysisDurationTitle
392
334
  };
393
335
 
394
- return template(reportContext);
336
+ return replacePlaceholders(sTemplate, oContext);
395
337
  });
396
338
  }
397
339
 
340
+ /**
341
+ * Replace any placeholder like {{placeholder}} with the corresponding value from oContext.
342
+ * @param {String} sTemplate the string template containing the placeholders.
343
+ * @param {Object} oContext the object containing the values for the placeholders.
344
+ * @returns {String} the processed template.
345
+ */
346
+ function replacePlaceholders(sTemplate, oContext) {
347
+ var sPlaceholder,
348
+ sValue;
349
+
350
+ for (sPlaceholder in oContext) {
351
+ sValue = oContext[sPlaceholder];
352
+ sTemplate = sTemplate.replace(new RegExp("\{\{" + sPlaceholder + "\}\}", "ig"), sValue);
353
+ }
354
+
355
+ return sTemplate;
356
+ }
357
+
398
358
  /**
399
359
  * Creates a zip file containing the report.html, appInfo.json, technicalInfo.json, issues.json.
400
360
  * @param {Object} oData - the data required to create a report
401
361
  */
402
362
  function downloadReportZip(oData) {
403
- this.getReportHtml(oData).done(function (html) {
404
- var report = '<!DOCTYPE HTML><html><head><title>Report</title></head><body><div id="sap-report-content">' + html + '</div></body></html>';
405
- var issues = { 'issues': oData.issues };
406
- var appInfos = { 'appInfos': oData.application };
407
- var technicalInfo = { 'technicalInfo': oData.technical };
408
- var archiver = new Archiver();
363
+ var aPromises = [
364
+ this.getReportHtml(oData, "./"),
365
+ getResource("styles.css"),
366
+ getResource("index.js"),
367
+ getResource("images/checked.svg"),
368
+ getResource("images/collapsed.svg"),
369
+ getResource("images/expanded.svg"),
370
+ getResource("images/unchecked.svg")
371
+ ];
372
+
373
+ Promise.all(aPromises).then(function (resources) {
374
+ var issues = { 'issues': oData.issues },
375
+ appInfos = { 'appInfos': oData.application },
376
+ technicalInfo = { 'technicalInfo': oData.technical },
377
+ archiver = new Archiver();
378
+
409
379
  archiver.add('technicalInfo.json', technicalInfo, 'json');
410
380
  archiver.add('issues.json', issues, 'json');
411
381
  archiver.add('appInfos.json', appInfos, 'json');
412
- archiver.add('report.html', report);
382
+ archiver.add('report.html', resources[0]);
413
383
  archiver.add('abap.json', oData.abap, 'json');
384
+ archiver.add('styles.css', resources[1], 'css');
385
+ archiver.add('index.js', resources[2], 'js');
386
+
387
+
388
+ archiver.add('images/checked.svg', resources[3], 'svg');
389
+ archiver.add('images/collapsed.svg', resources[4], 'svg');
390
+ archiver.add('images/expanded.svg', resources[5], 'svg');
391
+ archiver.add('images/unchecked.svg', resources[6], 'svg');
392
+
414
393
  archiver.download("SupportAssistantReport");
415
394
  archiver.clear();
416
395
  });
@@ -423,21 +402,19 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/thirdparty/handlebars', 'sap/ui/supp
423
402
  function openReport(oData) {
424
403
  // Create a hidden anchor. Open window outside of the promise otherwise browsers blocks the window.open.
425
404
  var content = '';
426
- var a = jQuery('<a style="display: none;"></a>');
405
+ var a = jQuery('<a class="sapUiHidden"></a>');
427
406
  a.on('click', function () {
428
407
  var reportWindow = window.open('', '_blank');
429
408
  reportWindow.opener = null;
430
409
 
431
410
  jQuery(reportWindow.document).ready(function () {
432
- // Sometimes document.write overwrites the document html and sometimes it appends to it so we need a wrapper div.
433
- if (reportWindow.document.getElementById('sap-report-content')) {
434
- reportWindow.document.getElementById('sap-report-content').innerHtml = content;
435
- } else {
436
- reportWindow.document.write('<div id="sap-report-content">' + content + '</div>');
437
- }
438
- reportWindow.document.title = 'Report';
411
+ // make sure everything is cleared before writing the new report
412
+ reportWindow.document.documentElement.innerHTML = '';
413
+
414
+ reportWindow.document.write(content);
439
415
  });
440
416
  });
417
+
441
418
  jQuery('body').append(a);
442
419
 
443
420
  this.getReportHtml(oData).then(function (html) {
@@ -1,97 +1,45 @@
1
- <style type="text/css">
2
- body {
3
- font-family: "72-Web", Arial, Helvetica, sans-serif;
4
- }
5
- main > header > h1 {
6
- font-size: 1.8em;
7
- }
8
- section h1 {
9
- font-size: 1.2em;
10
- }
11
- table {
12
- font-size: 0.9em;
13
- }
14
- .sapUiSupportTechInfoCntnt td:first-child {
15
- width: 12%;
16
- }
17
- .sapUiSupportTechInfoCntnt .sapUiSupportTitle td {
18
- padding-top: 10px;
19
- }
20
- .sapUiSupportTechInfoCntnt .sapUiSupportTitle label {
21
- padding-left: 4px;
22
- font-size: 18px;
23
- font-weight: bold;
24
- }
25
- .sapUiIssueGroupContent {
26
- margin-top: 8px;
27
- }
28
- .unchecked::before {
29
- vertical-align: middle;
30
- display: inline-block;
31
- width: 16px;
32
- height: 16px;
33
- content: "";
34
- background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23333333'><path d='M42,3 C42.8125041,3 43.515622,3.28124719 44.109375,3.84375 C44.703128,4.40625281 45,5.12499563 45,6 L45,42 C45,42.8750044 44.703128,43.5937472 44.109375,44.15625 C43.515622,44.7187528 42.8125041,45 42,45 L6,45 C5.12499563,45 4.40625281,44.7187528 3.84375,44.15625 C3.28124719,43.5937472 3,42.8750044 3,42 L3,6 C3,5.12499563 3.28124719,4.40625281 3.84375,3.84375 C4.40625281,3.28124719 5.12499563,3 6,3 L42,3 Z M42,6 L6,6 L6,42 L42,42 L42,6 Z'></path></svg>") no-repeat;
35
- }
36
- .checked::before {
37
- vertical-align: middle;
38
- display: inline-block;
39
- width: 16px;
40
- height: 16px;
41
- content: "";
42
- background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23333333'><path d='M42,30 L45,30 L45,42 C45,42.8750044 44.703128,43.5937472 44.109375,44.15625 C43.515622,44.7187528 42.8125041,45 42,45 L6,45 C5.12499563,45 4.40625281,44.7187528 3.84375,44.15625 C3.28124719,43.5937472 3,42.8750044 3,42 L3,6 C3,5.18749594 3.28124719,4.48437797 3.84375,3.890625 C4.40625281,3.29687203 5.12499563,3 6,3 L18,3 L18,6 L6,6 L6,42 L42,42 L42,30 Z M47.625,2.34375 C48.0625022,2.78125219 48.1250016,3.28124719 47.8125,3.84375 L30.46875,29.34375 C30.2812491,29.7187519 29.9687522,29.9374997 29.53125,30 C29.0937478,30.0625003 28.7187516,29.9375016 28.40625,29.625 L16.6875,16.59375 C16.1249972,16.0312472 16.1249972,15.4687528 16.6875,14.90625 L18.65625,12.9375 C19.2812531,12.3124969 19.8749972,12.3124969 20.4375,12.9375 L27.9375,20.4375 C28.2500016,20.7500016 28.609373,20.8750003 29.015625,20.8125 C29.421877,20.7499997 29.7187491,20.5000022 29.90625,20.0625 L43.59375,0.65625 C43.7812509,0.281248125 44.078123,0.0625003125 44.484375,0 C44.890627,-0.0625003125 45.2499984,0.0624984375 45.5625,0.375 L47.625,2.34375 Z'></path></svg>") no-repeat;
43
- }
44
- td .unchecked::before,
45
- td .checked::before {
46
- margin-right: 8px;
47
- }
48
- </style>
49
-
50
- {{getStyles metadata.styles}}
51
-
52
- <main>
53
- <header>
54
- <h1>{{metadata.title}}</h1>
55
- <div>Generated on (<time>{{metadata.timestamp}}</time>)</div>
56
- <div class="bottom-margin-small">{{metadata.analysisDurationTitle}}: <time>{{metadata.analysisDuration}}</time></div>
57
- <div>{{getScope metadata.scope}}</div>
58
- </header>
59
- <div>
60
- <section id="section_selected-rules">
61
- <div class="expandable-control collapsed-content" data-expandableElement="selectedRulesContent"><h1 class="expandable-title">{{{metadata.title_SelectedRules}}}</h1></div>
62
- <div id="selectedRulesContent">
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <title>Support Assistant Report</title>
5
+ <link rel="stylesheet" href="{{baseUrl}}styles.css">
6
+ </head>
7
+ <body>
8
+ <div id="sap-report-content">
9
+ <main>
10
+ <header>
11
+ <h1>{{metadataTitle}}</h1>
12
+ <div>Generated on (<time>{{metadataTimestamp}}</time>)</div>
13
+ <div class="bottom-margin-small">{{metadataAnalysisDurationTitle}}: <time>{{metadataAnalysisDuration}}</time></div>
14
+ <div>{{metadataScope}}</div>
15
+ </header>
63
16
  <div>
64
- Rule Preset / ID :
65
- {{#if rulePreset}}
66
- <strong>{{rulePreset.title}} / {{rulePreset.id}}</strong>
67
- {{else}}
68
- none
69
- {{/if}}
17
+ <section id="section_selected-rules">
18
+ <div class="expandable-control collapsed-content" data-expandableElement="selectedRulesContent"><h1 class="expandable-title">{{metadataTitleSelectedRules}}</h1></div>
19
+ <div id="selectedRulesContent">
20
+ <div>
21
+ Rule Preset / ID : {{rulePreset}}
22
+ </div>
23
+ {{rules}}
24
+ </div>
25
+ </section>
26
+ <section id="section_technical-details">
27
+ <div class="expandable-control collapsed-content" data-expandableElement="technicalInfoContent"><h1 class="expandable-title">{{metadataTitleTechnicalInfo}}</h1></div>
28
+ <div id="technicalInfoContent">{{technicalInfo}}</div>
29
+ </section>
30
+ <section id="section_app-info">
31
+ <div class="expandable-control collapsed-content" data-expandableElement="appInfoContent"><h1 class="expandable-title">{{metadataTitleAppInfo}}</h1></div>
32
+ <div id="appInfoContent">{{appInfo}}</div>
33
+ </section>
34
+ <section id="section_issues">
35
+ <div class="expandable-control collapsed-content" data-expandableElement="issuesContent"><h1 class="expandable-title">{{metadataTitleIssues}}</h1></div>
36
+ <div id="issuesContent">{{issues}}</div>
37
+ </section>
70
38
  </div>
71
- {{getRules rules}}
72
- </div>
73
- </section>
74
- <section id="section_technical-details">
75
- <div class="expandable-control collapsed-content" data-expandableElement="technicalInfoContent"><h1 class="expandable-title">{{metadata.title_TechnicalInfo}}</h1></div>
76
- <div id="technicalInfoContent">{{getTechnicalInformation technicalInfo}}</div>
77
- </section>
78
- <section id="section_app-info">
79
- <div class="expandable-control collapsed-content" data-expandableElement="appInfoContent"><h1 class="expandable-title">{{metadata.title_AppInfo}}</h1></div>
80
- <div id="appInfoContent">{{getAppInfo appInfo}}</div>
81
- </section>
82
- <section id="section_issues">
83
- <div class="expandable-control collapsed-content" data-expandableElement="issuesContent"><h1 class="expandable-title">{{metadata.title_Issues}}</h1></div>
84
- <div id="issuesContent">{{getIssues issues}}</div>
85
- </section>
86
- </div>
87
- <footer>
88
- </footer>
89
- </main>
90
-
91
- {{getScripts metadata.scripts}}
92
-
93
- <script>
94
- window.sapUiSupportReport.collapseExpand.init();
95
- window.sapUiSupportReport.filter.init();
96
- </script>
97
-
39
+ <footer>
40
+ </footer>
41
+ </main>
42
+ </div>
43
+ <script src="{{baseUrl}}index.js"></script>
44
+ </body>
45
+ </html>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23333333'><path d='M42,30 L45,30 L45,42 C45,42.8750044 44.703128,43.5937472 44.109375,44.15625 C43.515622,44.7187528 42.8125041,45 42,45 L6,45 C5.12499563,45 4.40625281,44.7187528 3.84375,44.15625 C3.28124719,43.5937472 3,42.8750044 3,42 L3,6 C3,5.18749594 3.28124719,4.48437797 3.84375,3.890625 C4.40625281,3.29687203 5.12499563,3 6,3 L18,3 L18,6 L6,6 L6,42 L42,42 L42,30 Z M47.625,2.34375 C48.0625022,2.78125219 48.1250016,3.28124719 47.8125,3.84375 L30.46875,29.34375 C30.2812491,29.7187519 29.9687522,29.9374997 29.53125,30 C29.0937478,30.0625003 28.7187516,29.9375016 28.40625,29.625 L16.6875,16.59375 C16.1249972,16.0312472 16.1249972,15.4687528 16.6875,14.90625 L18.65625,12.9375 C19.2812531,12.3124969 19.8749972,12.3124969 20.4375,12.9375 L27.9375,20.4375 C28.2500016,20.7500016 28.609373,20.8750003 29.015625,20.8125 C29.421877,20.7499997 29.7187491,20.5000022 29.90625,20.0625 L43.59375,0.65625 C43.7812509,0.281248125 44.078123,0.0625003125 44.484375,0 C44.890627,-0.0625003125 45.2499984,0.0624984375 45.5625,0.375 L47.625,2.34375 Z'></path></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23346187'><path d='M31.96875,21.84375 C32.5937531,22.4687531 32.90625,23.1874959 32.90625,24 C32.90625,24.8125041 32.5937531,25.5312469 31.96875,26.15625 L16.5,41.625 C15.7499963,42.3125034 15.0312534,42.3125034 14.34375,41.625 C13.6562466,40.9374966 13.6562466,40.2187538 14.34375,39.46875 L29.34375,24.5625 C29.7187519,24.1874981 29.7187519,23.8125019 29.34375,23.4375 L14.4375,8.53125 C14.1249984,8.21874844 13.96875,7.87500188 13.96875,7.5 C13.96875,7.12499813 14.1249984,6.78125156 14.4375,6.46875 C14.7500016,6.15624844 15.0937481,6 15.46875,6 C15.8437519,6 16.1874984,6.15624844 16.5,6.46875 L31.96875,21.84375 Z'></path></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23346187'><path d='M39.46875,17.53125 C40.1562534,16.7812462 40.8749963,16.7812462 41.625,17.53125 C41.9375016,17.8437516 42.09375,18.1874981 42.09375,18.5625 C42.09375,18.9375019 41.9375016,19.2812484 41.625,19.59375 L26.15625,35.0625 C25.5312469,35.6250028 24.8125041,35.90625 24,35.90625 C23.1874959,35.90625 22.5000028,35.6250028 21.9375,35.0625 L6.375,19.59375 C6.06249844,19.2812484 5.90625,18.921877 5.90625,18.515625 C5.90625,18.109373 6.06249844,17.7500016 6.375,17.4375 C6.68750156,17.1249984 7.04687297,16.96875 7.453125,16.96875 C7.85937703,16.96875 8.21874844,17.1249984 8.53125,17.4375 L23.53125,32.4375 C23.8437516,32.8125019 24.1874981,32.8125019 24.5625,32.4375 L39.46875,17.53125 Z'></path></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23333333'><path d='M42,3 C42.8125041,3 43.515622,3.28124719 44.109375,3.84375 C44.703128,4.40625281 45,5.12499563 45,6 L45,42 C45,42.8750044 44.703128,43.5937472 44.109375,44.15625 C43.515622,44.7187528 42.8125041,45 42,45 L6,45 C5.12499563,45 4.40625281,44.7187528 3.84375,44.15625 C3.28124719,43.5937472 3,42.8750044 3,42 L3,6 C3,5.12499563 3.28124719,4.40625281 3.84375,3.84375 C4.40625281,3.28124719 5.12499563,3 6,3 L42,3 Z M42,6 L6,6 L6,42 L42,42 L42,6 Z'></path></svg>
@@ -4,6 +4,59 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
+ window.sapUiSupportReport = window.sapUiSupportReport || {};
8
+ window.sapUiSupportReport.collapseExpand = (function() {
9
+ 'use strict';
10
+
11
+ function collapseExpandClickHandler(event) {
12
+ var toExpandElementId = this.getAttribute('data-expandableElement');
13
+ var expandableElement = document.getElementById(toExpandElementId);
14
+ var toExpand = expandableElement.classList.contains('collapsed');
15
+
16
+ if (toExpand) {
17
+ expandableElement.classList.remove('collapsed');
18
+ expandableElement.classList.add('expanded');
19
+ this.classList.remove('collapsed-content');
20
+ this.classList.add('expanded-content');
21
+ } else {
22
+ expandableElement.classList.remove('expanded');
23
+ expandableElement.classList.add('collapsed');
24
+ this.classList.remove('expanded-content');
25
+ this.classList.add('collapsed-content');
26
+ }
27
+ }
28
+
29
+ function init() {
30
+ try {
31
+ var expandableElements = document.getElementsByClassName('expandable-control');
32
+ if (!expandableElements) {
33
+ return;
34
+ }
35
+
36
+ for (var i = 0; i < expandableElements.length; i++) {
37
+ expandableElements[i].addEventListener('click', collapseExpandClickHandler);
38
+
39
+ // Set the default collapsed/expanded state of the expandable content.
40
+ var elementToExpandId = expandableElements[i].getAttribute('data-expandableElement');
41
+ var elementToExpand = document.getElementById(elementToExpandId);
42
+ if (expandableElements[i].classList.contains('collapsed-content')) {
43
+ elementToExpand.classList.add('collapsed');
44
+ } else {
45
+ elementToExpand.classList.add('expanded');
46
+ }
47
+ }
48
+ } catch (ex) {
49
+ /* eslint-disable no-console */
50
+ console.log('There was a problem initializing collapse/expand functionality.');
51
+ /* eslint-enable no-console */
52
+ }
53
+ }
54
+
55
+ return {
56
+ init: init
57
+ };
58
+ }());
59
+
7
60
  window.sapUiSupportReport = window.sapUiSupportReport || {};
8
61
  window.sapUiSupportReport.filter = (function () {
9
62
  'use strict';
@@ -109,3 +162,6 @@ window.sapUiSupportReport.filter = (function () {
109
162
  init: init
110
163
  };
111
164
  }());
165
+
166
+ window.sapUiSupportReport.collapseExpand.init();
167
+ window.sapUiSupportReport.filter.init();
@@ -1,3 +1,107 @@
1
+ /* General */
2
+ body {
3
+ font-family: "72-Web", Arial, Helvetica, sans-serif;
4
+ }
5
+ main > header > h1 {
6
+ font-size: 1.8em;
7
+ }
8
+ section h1 {
9
+ font-size: 1.2em;
10
+ }
11
+ table {
12
+ font-size: 0.9em;
13
+ }
14
+ .sapUiSupportTechInfoCntnt td:first-child {
15
+ width: 12%;
16
+ }
17
+ .sapUiSupportTechInfoCntnt .sapUiSupportTitle td {
18
+ padding-top: 10px;
19
+ }
20
+ .sapUiSupportTechInfoCntnt .sapUiSupportTitle label {
21
+ padding-left: 4px;
22
+ font-size: 18px;
23
+ font-weight: bold;
24
+ }
25
+ .sapUiIssueGroupContent {
26
+ margin-top: 8px;
27
+ }
28
+ .unchecked::before {
29
+ vertical-align: middle;
30
+ display: inline-block;
31
+ width: 16px;
32
+ height: 16px;
33
+ content: "";
34
+ background: url("./images/unchecked.svg") no-repeat;
35
+ }
36
+ .checked::before {
37
+ vertical-align: middle;
38
+ display: inline-block;
39
+ width: 16px;
40
+ height: 16px;
41
+ content: "";
42
+ background: url("./images/checked.svg") no-repeat;
43
+ }
44
+ td .unchecked::before,
45
+ td .checked::before {
46
+ margin-right: 8px;
47
+ }
48
+
49
+ /* Filters functionality */
50
+ .filters {
51
+ margin: 10px;
52
+ font-size: 1em;
53
+ }
54
+ .filter {
55
+ padding: 5px;
56
+ display: inline-block;
57
+ cursor: pointer;
58
+ border-radius: 5px;
59
+ }
60
+ .filter-active {
61
+ background-color: #ddd;
62
+ box-shadow: 1px 1px 5px #888888;
63
+ }
64
+ .filtered {
65
+ display: none;
66
+ }
67
+
68
+ /* Expand/Collapse functionality */
69
+ .expandable-control {
70
+ cursor: pointer;
71
+ }
72
+ .expanded {
73
+ padding-left: 30px;
74
+ }
75
+ .expanded > tr > td:first-child {
76
+ padding-left: 35px;
77
+ }
78
+ .collapsed {
79
+ display: none;
80
+ }
81
+ .expanded-content > .expandable-title::before {
82
+ margin-right: 8px;
83
+ vertical-align: middle;
84
+ display: inline-block;
85
+ width: 16px;
86
+ height: 16px;
87
+ content: "";
88
+ background: url("./images/expanded.svg") no-repeat;
89
+ }
90
+ .collapsed-content > .expandable-title::before {
91
+ margin-right: 8px;
92
+ vertical-align: middle;
93
+ display: inline-block;
94
+ width: 16px;
95
+ height: 16px;
96
+ content: "";
97
+ background: url("./images/collapsed.svg") no-repeat;
98
+ }
99
+ .expanded-content > h1.expandable-title::before,
100
+ .collapsed-content > h1.expandable-title::before {
101
+ width: 22px;
102
+ height: 22px;
103
+ }
104
+
1
105
  /* Table */
2
106
  table.sapUiTable {
3
107
  margin-top: 5px;
@@ -315,11 +315,11 @@ sap.ui.define([
315
315
  var currentPreset = this.model.getProperty("/selectionPresetsCurrent"),
316
316
  oExecutionContext = this._getExecutionContext();
317
317
 
318
- // eslint-disable-next-line no-unsafe-negation
319
- if (!currentPreset.selections.length > 0) {
318
+ if (currentPreset.selections.length === 0) {
320
319
  MessageToast.show("Select some rules to be analyzed.");
321
320
  return;
322
321
  }
322
+
323
323
  if (oExecutionContext.type === "components" && oExecutionContext.components.length === 0) {
324
324
  MessageToast.show("Please select some components to be analyzed.");
325
325
  return;
@@ -89,7 +89,7 @@ sap.ui.define([
89
89
  *
90
90
  * @extends sap.ui.support.supportRules.ui.controllers.BaseController
91
91
  * @author SAP SE
92
- * @version 1.93.3
92
+ * @version 1.96.1
93
93
  * @private
94
94
  * @alias sap.ui.support.supportRules.ui.controllers.PresetsController
95
95
  */
@@ -60,7 +60,7 @@ sap.ui.define(["jquery.sap.global"],
60
60
  * @private
61
61
  */
62
62
  function _getElementTreeLeftColumnOfListItem(controls, paddingLeft) {
63
- var html = "<offset style=\"padding-left:" + paddingLeft + "px\" >";
63
+ var html = "<offset data-indent=\"" + paddingLeft + "\" >";
64
64
 
65
65
  if (controls.content.length > 0) {
66
66
  html += "<arrow down=\"true\"></arrow>";
@@ -334,6 +334,25 @@ sap.ui.define(["jquery.sap.global"],
334
334
  var controls = this.getData().controls;
335
335
 
336
336
  this._treeContainer.innerHTML = this._createTreeHTML(controls);
337
+
338
+ this._provideIndentation();
339
+ };
340
+
341
+ /**
342
+ * Sets the padding for each row in the element tree.
343
+ * @private
344
+ */
345
+ ElementTree.prototype._provideIndentation = function () {
346
+ var aOffsets = this._treeContainer.getElementsByTagName("offset"),
347
+ oOffset,
348
+ iIndex;
349
+
350
+ for (iIndex = 0; iIndex < aOffsets.length; iIndex++) {
351
+ oOffset = aOffsets[iIndex];
352
+ if (oOffset.dataset && oOffset.dataset.indent) {
353
+ oOffset.style.paddingLeft = oOffset.dataset.indent + "px";
354
+ }
355
+ }
337
356
  };
338
357
 
339
358
  /**
@@ -196,7 +196,7 @@ sap.ui.define([
196
196
  },
197
197
 
198
198
  _getContextByIndex: function(iRowIndex) {
199
- return this._getBinding().getContexts(iRowIndex, 1)[0];
199
+ return this._getBinding().getContexts(iRowIndex, 1, undefined, true)[0];
200
200
  },
201
201
 
202
202
  _getSelectionModel: function(bForceInit) {
@@ -405,4 +405,4 @@ sap.ui.define([
405
405
 
406
406
  return Selection;
407
407
 
408
- });
408
+ });
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE HTML>
2
- <html style="height: 100%;">
2
+ <html>
3
3
 
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -17,8 +17,8 @@
17
17
  </script>
18
18
  </head>
19
19
 
20
- <body class="sapUiBody" style="height: 100%; background-color: #3f5161; overflow: hidden">
21
- <div id="content" style="height: 100%"></div>
20
+ <body class="sapUiBody">
21
+ <div id="content" class="sapUiSupportToolContent"></div>
22
22
  </body>
23
23
 
24
24
  </html>
@@ -1,10 +1,20 @@
1
1
  @import url("ControlTree.css");
2
2
 
3
+ html {
4
+ height: 100%;
5
+ }
6
+
3
7
  body {
4
- background: #fff;
8
+ height: 100%;
9
+ background-color: #3f5161;
10
+ overflow: hidden;
5
11
  content: "SupportTools loading...";
6
12
  }
7
13
 
14
+ .sapUiSupportToolContent {
15
+ height: 100%;
16
+ }
17
+
8
18
  .sapUiSupportToolSettingsPopoverPadding {
9
19
  padding-left: 1rem;
10
20
  padding-bottom: 0.5rem;
@@ -213,3 +223,12 @@ body {
213
223
  padding-right: 0.2rem;
214
224
  }
215
225
 
226
+ .issueSeverityHigh {
227
+ color: #bb0000;
228
+ }
229
+ .issueSeverityMedium {
230
+ color: #e78c07;
231
+ }
232
+ .issueSeverityLow {
233
+ color:#5e696e;
234
+ }
package/ui5.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- specVersion: "1.1"
2
+ specVersion: "2.0"
3
3
  type: library
4
4
  metadata:
5
5
  name: sap.ui.support
@@ -7,3 +7,6 @@ metadata:
7
7
  OpenUI5
8
8
  * (c) Copyright 2009-${currentYear} SAP SE or an SAP affiliate company.
9
9
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
10
+ resources:
11
+ configuration:
12
+ propertiesFileSourceEncoding: ISO-8859-1
@@ -1,33 +0,0 @@
1
- /* Expand/Collapse functionality */
2
- .expanded {
3
- padding-left: 30px;
4
- }
5
- .expanded > tr > td:first-child {
6
- padding-left: 35px;
7
- }
8
- .collapsed {
9
- display: none;
10
- }
11
- .expanded-content > .expandable-title::before {
12
- margin-right: 8px;
13
- vertical-align: middle;
14
- display: inline-block;
15
- width: 16px;
16
- height: 16px;
17
- content: "";
18
- background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23346187'><path d='M39.46875,17.53125 C40.1562534,16.7812462 40.8749963,16.7812462 41.625,17.53125 C41.9375016,17.8437516 42.09375,18.1874981 42.09375,18.5625 C42.09375,18.9375019 41.9375016,19.2812484 41.625,19.59375 L26.15625,35.0625 C25.5312469,35.6250028 24.8125041,35.90625 24,35.90625 C23.1874959,35.90625 22.5000028,35.6250028 21.9375,35.0625 L6.375,19.59375 C6.06249844,19.2812484 5.90625,18.921877 5.90625,18.515625 C5.90625,18.109373 6.06249844,17.7500016 6.375,17.4375 C6.68750156,17.1249984 7.04687297,16.96875 7.453125,16.96875 C7.85937703,16.96875 8.21874844,17.1249984 8.53125,17.4375 L23.53125,32.4375 C23.8437516,32.8125019 24.1874981,32.8125019 24.5625,32.4375 L39.46875,17.53125 Z'></path></svg>") no-repeat;
19
- }
20
- .collapsed-content > .expandable-title::before {
21
- margin-right: 8px;
22
- vertical-align: middle;
23
- display: inline-block;
24
- width: 16px;
25
- height: 16px;
26
- content: "";
27
- background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='%23346187'><path d='M31.96875,21.84375 C32.5937531,22.4687531 32.90625,23.1874959 32.90625,24 C32.90625,24.8125041 32.5937531,25.5312469 31.96875,26.15625 L16.5,41.625 C15.7499963,42.3125034 15.0312534,42.3125034 14.34375,41.625 C13.6562466,40.9374966 13.6562466,40.2187538 14.34375,39.46875 L29.34375,24.5625 C29.7187519,24.1874981 29.7187519,23.8125019 29.34375,23.4375 L14.4375,8.53125 C14.1249984,8.21874844 13.96875,7.87500188 13.96875,7.5 C13.96875,7.12499813 14.1249984,6.78125156 14.4375,6.46875 C14.7500016,6.15624844 15.0937481,6 15.46875,6 C15.8437519,6 16.1874984,6.15624844 16.5,6.46875 L31.96875,21.84375 Z'></path></svg>") no-repeat;
28
- }
29
- .expanded-content > h1.expandable-title::before,
30
- .collapsed-content > h1.expandable-title::before {
31
- width: 22px;
32
- height: 22px;
33
- }
@@ -1,60 +0,0 @@
1
- /*!
2
- * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
- */
6
-
7
- window.sapUiSupportReport = window.sapUiSupportReport || {};
8
- window.sapUiSupportReport.collapseExpand = (function() {
9
- 'use strict';
10
-
11
- function collapseExpandClickHandler(event) {
12
- var toExpandElementId = this.getAttribute('data-expandableElement');
13
- var expandableElement = document.getElementById(toExpandElementId);
14
- var toExpand = expandableElement.classList.contains('collapsed');
15
-
16
- if (toExpand) {
17
- expandableElement.classList.remove('collapsed');
18
- expandableElement.classList.add('expanded');
19
- this.classList.remove('collapsed-content');
20
- this.classList.add('expanded-content');
21
- } else {
22
- expandableElement.classList.remove('expanded');
23
- expandableElement.classList.add('collapsed');
24
- this.classList.remove('expanded-content');
25
- this.classList.add('collapsed-content');
26
- }
27
- }
28
-
29
- function init() {
30
- try {
31
- var expandableElements = document.getElementsByClassName('expandable-control');
32
- if (!expandableElements) {
33
- return;
34
- }
35
-
36
- for (var i = 0; i < expandableElements.length; i++) {
37
- expandableElements[i].addEventListener('click', collapseExpandClickHandler);
38
-
39
- // Set the default collapsed/expanded state of the expandable content.
40
- var elementToExpandId = expandableElements[i].getAttribute('data-expandableElement');
41
- var elementToExpand = document.getElementById(elementToExpandId);
42
- if (expandableElements[i].classList.contains('collapsed-content')) {
43
- elementToExpand.classList.add('collapsed');
44
- } else {
45
- elementToExpand.classList.add('expanded');
46
- }
47
-
48
- expandableElements[i].style = 'cursor: pointer;';
49
- }
50
- } catch (ex) {
51
- /* eslint-disable no-console */
52
- console.log('There was a problem initializing collapse/expand functionality.');
53
- /* eslint-enable no-console */
54
- }
55
- }
56
-
57
- return {
58
- init: init
59
- };
60
- }());
@@ -1,19 +0,0 @@
1
- /* Filters functionality */
2
- .filters {
3
- margin: 10px;
4
- font-size: 1em;
5
- }
6
- .filter {
7
- padding: 5px;
8
- display: inline-block;
9
- cursor: pointer;
10
- border-radius: 5px;
11
- }
12
- .filter-active {
13
- background-color: #ddd;
14
- box-shadow: 1px 1px 5px #888888;
15
- }
16
- .filtered {
17
- display: none;
18
- }
19
-