@openui5/sap.ui.support 1.115.1 → 1.117.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.
package/.reuse/dep5 CHANGED
@@ -457,11 +457,6 @@ Comment: these files belong to: UI5 Web Components
457
457
 
458
458
  # Outside of Libraries:
459
459
 
460
- Files: src/testsuite-utils/src/main/resources/META-INF/less/less.js
461
- Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
462
- License: Apache-2.0
463
- Comment: these files belong to: LESS
464
-
465
460
  Files: lib/jsdoc/ui5/plugin.js
466
461
  Copyright:
467
462
  2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
package/THIRDPARTY.txt CHANGED
@@ -460,19 +460,13 @@ Contained in: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/*.*
460
460
 
461
461
  Outside of Libraries:
462
462
 
463
- Component: LESS, version: 1.6.3
464
- Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
465
- License: Apache-2.0
466
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
467
- Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
468
-
469
463
  Component: JSDoc 3, version: 3.6.7
470
464
  Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
471
465
  License: Apache-2.0
472
466
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
473
467
  Contained in: lib/jsdoc/ui5/plugin.js
474
468
 
475
- Component: SAP Theming Base Content, version: 11.3.0
469
+ Component: SAP Theming Base Content, version: 11.4.2
476
470
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
477
471
  License: Apache-2.0
478
472
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.support",
3
- "version": "1.115.1",
3
+ "version": "1.117.0",
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.115.1",
18
- "@openui5/sap.ui.codeeditor": "1.115.1",
19
- "@openui5/sap.ui.core": "1.115.1",
20
- "@openui5/sap.ui.fl": "1.115.1",
21
- "@openui5/sap.ui.layout": "1.115.1"
17
+ "@openui5/sap.m": "1.117.0",
18
+ "@openui5/sap.ui.codeeditor": "1.117.0",
19
+ "@openui5/sap.ui.core": "1.117.0",
20
+ "@openui5/sap.ui.fl": "1.117.0",
21
+ "@openui5/sap.ui.layout": "1.117.0"
22
22
  }
23
23
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.115.1</version>
9
+ <version>1.117.0</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.115.1
35
+ * @version 1.117.0
36
36
  * @public
37
37
  */
38
38
  var RuleAnalyzer = {
@@ -34,7 +34,7 @@ sap.ui.define(["sap/ui/thirdparty/jquery",
34
34
  * @namespace
35
35
  * @deprecated Since version 1.60.0. Please use sap/ui/support/RuleAnalyzer instead.
36
36
  * @author SAP SE
37
- * @version 1.115.1
37
+ * @version 1.117.0
38
38
  * @public
39
39
  */
40
40
  jQuery.sap.support = {
@@ -23,7 +23,7 @@ sap.ui.define(["sap/ui/core/library"],
23
23
  * @namespace
24
24
  * @alias sap.ui.support
25
25
  * @author SAP SE
26
- * @version 1.115.1
26
+ * @version 1.117.0
27
27
  * @since 1.50
28
28
  * @public
29
29
  */
@@ -37,7 +37,7 @@ sap.ui.define(["sap/ui/core/library"],
37
37
  controls: [],
38
38
  elements: [],
39
39
  noLibraryCSS: true,
40
- version: "1.115.1",
40
+ version: "1.117.0",
41
41
  extensions: {
42
42
  //Configuration used for rule loading of Support Assistant
43
43
  "sap.ui.support": {
@@ -128,7 +128,7 @@ function (Log, VersionInfo, ManagedObject, Core, Element, Component, Analyzer, C
128
128
  this._oCoreFacade = CoreFacade(Core);
129
129
  this._oExecutionScope = null;
130
130
  this._createElementSpies();
131
- Core.attachLibraryChanged(RuleSetLoader._onLibraryChanged);
131
+ Core.attachLibraryChanged(RuleSetLoader._onLibraryChanged.bind(RuleSetLoader));
132
132
 
133
133
  // Make sure that we load UI frame, when no parameter supplied
134
134
  // but tools is required to load, or when parameter is there
@@ -607,7 +607,7 @@ function (Log, VersionInfo, ManagedObject, Core, Element, Component, Analyzer, C
607
607
 
608
608
  var copyElementsFromCoreObject = function (coreObject, elemNames) {
609
609
  for (var i in coreObject) {
610
- if (Object.prototype.hasOwnProperty.call(coreObject,i)) {
610
+ if (Object.hasOwn(coreObject,i)) {
611
611
  var element = coreObject[i];
612
612
  var elementCopy = {
613
613
  content: [],
@@ -11,10 +11,9 @@ sap.ui.define([
11
11
  "sap/base/Log",
12
12
  "sap/base/util/Version",
13
13
  "sap/ui/support/library",
14
- "sap/ui/support/supportRules/Storage",
15
- "sap/ui/support/supportRules/Constants"
14
+ "sap/ui/support/supportRules/Storage"
16
15
  ],
17
- function (Log, Version, library, storage, constants) {
16
+ function (Log, Version, library, storage) {
18
17
  "use strict";
19
18
 
20
19
  /**
@@ -35,7 +34,7 @@ function (Log, Version, library, storage, constants) {
35
34
  * @private
36
35
  * @alias sap.ui.support.RuleSet
37
36
  * @author SAP SE
38
- * @version 1.115.1
37
+ * @version 1.117.0
39
38
  * @param {object} oSettings Name of the initiated
40
39
  */
41
40
  var RuleSet = function (oSettings) {
@@ -219,6 +218,31 @@ function (Log, Version, library, storage, constants) {
219
218
  }
220
219
  };
221
220
 
221
+ /**
222
+ * Merge the rules (or array of rules) of another RuleSet, into this RuleSet.
223
+ * @public
224
+ * @param {sap.ui.support.RuleSet|sap.ui.support.RuleConfiguration[]} vRuleSetOrRules Rules to be merged
225
+ */
226
+ RuleSet.prototype.mergeRuleSet = function (vRuleSetOrRules) {
227
+ var aRules = vRuleSetOrRules;
228
+
229
+ if (vRuleSetOrRules instanceof RuleSet) {
230
+ aRules = vRuleSetOrRules.getRules();
231
+ }
232
+
233
+ for (var i = 0; i < aRules.length; i++) {
234
+ var vRule = aRules[i];
235
+
236
+ if (Array.isArray(vRule)) {
237
+ for (var k = 0; k < vRule.length; k++) {
238
+ this.addRule(vRule[k]);
239
+ }
240
+ } else {
241
+ this.addRule(vRule);
242
+ }
243
+ }
244
+ };
245
+
222
246
  /**
223
247
  * Stores which rules are selected to be run by the analyzer on the next check
224
248
  * @public
@@ -63,6 +63,7 @@ sap.ui.define([
63
63
  var RuleSetLoader = {};
64
64
 
65
65
  RuleSetLoader._mRuleSets = {};
66
+ RuleSetLoader._mRequireLibraryRuleSet = {};
66
67
 
67
68
  RuleSetLoader.getRuleSets = function () {
68
69
  return this._mRuleSets;
@@ -85,39 +86,31 @@ sap.ui.define([
85
86
  * @returns {Promise<CommunicationBus>} mainPromise Has promises for all libraries regarding rulesets in the SupportAssistant
86
87
  */
87
88
  RuleSetLoader._fetchSupportRuleSets = function (fnReadyCbk, mLibraries) {
88
- var that = this,
89
- mLoadedLibraries = mLibraries || sap.ui.getCore().getLoadedLibraries(),
89
+ var mLoadedLibraries = mLibraries || sap.ui.getCore().getLoadedLibraries(),
90
90
  oLibNamesWithRulesPromise = this._fetchLibraryNamesWithSupportRules(mLoadedLibraries);
91
91
 
92
- var oMainPromise = new Promise(function (resolve) {
93
-
94
92
  // VersionInfo.load() returns the web application's version.
95
93
  // Temp Workaround: Using the core library's version correctly returns the version of the framework
96
- VersionInfo.load({ library: "sap.ui.core" }).then(function (oCoreLibInfo) {
94
+ return VersionInfo.load({ library: "sap.ui.core" })
95
+ .then(function (oCoreLibInfo) {
97
96
  RuleSet.versionInfo = oCoreLibInfo;
98
97
 
99
- oLibNamesWithRulesPromise.then(function (oLibNamesWithRules) {
100
- var libFetchPromises = that._fetchLibraryFiles(oLibNamesWithRules, RuleSetLoader._fetchRuleSet);
101
-
102
- Promise.all(libFetchPromises).then(function () {
103
- that._bRulesCreated = true;
104
- CommunicationBus.publish(channelNames.UPDATE_SUPPORT_RULES, {
105
- sRuleSet: RuleSerializer.serialize(that._mRuleSets),
106
- oVersionInfo: RuleSet.versionInfo
107
- });
108
- resolve();
109
-
110
- if (fnReadyCbk && typeof fnReadyCbk === "function") {
111
- fnReadyCbk();
112
- }
113
- });
98
+ return oLibNamesWithRulesPromise;
99
+ })
100
+ .then(function (oLibNamesWithRules) {
101
+ return Promise.all(this._fetchLibraryFiles(oLibNamesWithRules, this._fetchRuleSet));
102
+ }.bind(this))
103
+ .then(function () {
104
+ this._bRulesCreated = true;
105
+ CommunicationBus.publish(channelNames.UPDATE_SUPPORT_RULES, {
106
+ sRuleSet: RuleSerializer.serialize(this._mRuleSets),
107
+ oVersionInfo: RuleSet.versionInfo
114
108
  });
115
109
 
116
- });
117
-
118
- });
119
-
120
- return oMainPromise;
110
+ if (fnReadyCbk && typeof fnReadyCbk === "function") {
111
+ fnReadyCbk();
112
+ }
113
+ }.bind(this));
121
114
  };
122
115
 
123
116
  /**
@@ -222,7 +215,6 @@ sap.ui.define([
222
215
  */
223
216
  RuleSetLoader._fetchLibraryFiles = function (aLibNames, fnProcessFile, bSupressProgressReporting) {
224
217
  var aAjaxPromises = [],
225
- that = this,
226
218
  supportModulePath = sap.ui.require.toUrl("sap/ui/support"),
227
219
  supportModulesRoot = supportModulePath.replace("sap/ui/support", ""),
228
220
  bCanLoadInternalRules = Utils.canLoadInternalRules(),
@@ -243,44 +235,50 @@ sap.ui.define([
243
235
  CommunicationBus.publish(channelNames.CURRENT_LOADING_PROGRESS, { value: iPercentileProgressValue });
244
236
  }
245
237
 
238
+ // CHECK FOR PUBLIC RULES
246
239
  if (aLibNames.publicRules.length > 0) {
247
240
  aLibNames.publicRules.forEach(function (oLibName) {
248
- var libraryNames = that._registerLibraryPath(oLibName, supportModulePath, supportModulesRoot);
241
+ var customizableLibName = this._registerLibraryPath(oLibName, supportModulePath, supportModulesRoot).customizableLibName;
249
242
 
250
- if (libraryNames) {
251
- // CHECK FOR PUBLIC RULES
252
- var oLibPublicRulesPromise = that._requireRuleSet(libraryNames.customizableLibName, fnProcessFile);
243
+ if (this._mRequireLibraryRuleSet[customizableLibName]) {
244
+ return;
245
+ }
253
246
 
254
- // Do not report progress if in silent mode
255
- if (!bSilentMode && !bSupressProgressReporting) {
256
- oLibPublicRulesPromise.then(function () {
257
- reportCurrentLoadingProgress();
258
- });
259
- }
247
+ var oLibPublicRulesPromise = this._requireRuleSet(customizableLibName, fnProcessFile);
260
248
 
261
- aAjaxPromises.push(oLibPublicRulesPromise);
249
+ // Do not report progress if in silent mode
250
+ if (!bSilentMode && !bSupressProgressReporting) {
251
+ oLibPublicRulesPromise.then(function () {
252
+ reportCurrentLoadingProgress();
253
+ });
262
254
  }
263
- });
255
+
256
+ this._mRequireLibraryRuleSet[customizableLibName] = oLibPublicRulesPromise;
257
+ aAjaxPromises.push(oLibPublicRulesPromise);
258
+ }.bind(this));
264
259
  }
265
260
 
261
+ // CHECK FOR INTERNAL RULES
266
262
  if (bCanLoadInternalRules && aLibNames.internalRules.length > 0) {
267
263
  aLibNames.internalRules.forEach(function (oLibName) {
268
- var libraryNames = that._registerLibraryPath(oLibName, supportModulePath, supportModulesRoot);
264
+ var internalLibName = this._registerLibraryPath(oLibName, supportModulePath, supportModulesRoot).internalLibName;
269
265
 
270
- if (libraryNames) {
271
- // CHECK FOR INTERNAL RULES
272
- var oLibPrivateRulesPromise = that._requireRuleSet(libraryNames.internalLibName, fnProcessFile);
266
+ if (this._mRequireLibraryRuleSet[internalLibName]) {
267
+ return;
268
+ }
273
269
 
274
- // Do not report progress if in silent mode
275
- if (!bSilentMode && !bSupressProgressReporting) {
276
- oLibPrivateRulesPromise.then(function () {
277
- reportCurrentLoadingProgress();
278
- });
279
- }
270
+ var oLibPrivateRulesPromise = this._requireRuleSet(internalLibName, fnProcessFile);
280
271
 
281
- aAjaxPromises.push(oLibPrivateRulesPromise);
272
+ // Do not report progress if in silent mode
273
+ if (!bSilentMode && !bSupressProgressReporting) {
274
+ oLibPrivateRulesPromise.then(function () {
275
+ reportCurrentLoadingProgress();
276
+ });
282
277
  }
283
- });
278
+
279
+ this._mRequireLibraryRuleSet[internalLibName] = oLibPrivateRulesPromise;
280
+ aAjaxPromises.push(oLibPrivateRulesPromise);
281
+ }.bind(this));
284
282
  }
285
283
 
286
284
  return aAjaxPromises;
@@ -291,15 +289,11 @@ sap.ui.define([
291
289
  * @param {string} libraryName The name of the library
292
290
  * @param {string} supportModulePath Module path of the SupportAssistant
293
291
  * @param {string} supportModulesRoot Root path of the SupportAssistant
294
- * @returns {{internalLibName: string, customizableLibName: string}|null} Object, containing the library names
292
+ * @returns {{internalLibName: string, customizableLibName: string}} Object, containing the library names
295
293
  * for the internal rules or null if there isn't such a library loaded in the RuleSets array
296
294
  * @private
297
295
  */
298
296
  RuleSetLoader._registerLibraryPath = function (libraryName, supportModulePath, supportModulesRoot) {
299
- if (this._mRuleSets[libraryName]) {
300
- return null;
301
- }
302
-
303
297
  var libResourceName = libraryName.replace(/\./g, "/");
304
298
  var customizableLibResourceName = libResourceName;
305
299
  var loadFromSupportOrigin = this._getLoadFromSupportOrigin();
@@ -357,31 +351,30 @@ sap.ui.define([
357
351
  */
358
352
  RuleSetLoader._fetchRuleSet = function (sLibName) {
359
353
  try {
360
- var sNormalizedLibName,
361
- oLibSupportCopy,
362
- oLibrary,
363
- oLibSupport = ObjectPath.get(sLibName).library.support;
354
+ var sNormalizedLibName = sLibName.replace("." + sCustomSuffix, "").replace(".internal", ""),
355
+ oLibSupport = ObjectPath.get(sLibName).library.support,
356
+ oRuleSet = this._mRuleSets[sNormalizedLibName];
364
357
 
365
358
  if (!oLibSupport) {
366
359
  // This case usually happens when the library flag bExport is set to true.
367
360
  throw "The library.support file was not fetched successfully.";
368
361
  }
369
362
 
370
- sNormalizedLibName = sLibName.replace("." + sCustomSuffix, "").replace(".internal", "");
371
- oLibSupportCopy = extend({}, oLibSupport);
372
- oLibrary = this._mRuleSets[sNormalizedLibName];
373
-
374
- if (!(oLibSupportCopy.ruleset instanceof RuleSet)) {
375
- oLibSupportCopy = this._createRuleSet(oLibSupportCopy);
363
+ // ruleset already exists, just merge the new rules into it
364
+ if (oRuleSet) {
365
+ oRuleSet.ruleset.mergeRuleSet(oLibSupport.ruleset);
366
+ return;
376
367
  }
377
368
 
378
- if (oLibrary) {
379
- oLibrary.ruleset._mRules = extend(oLibrary.ruleset._mRules, oLibSupportCopy.ruleset._mRules);
369
+ // create the ruleset for the first time
370
+ if (oLibSupport.ruleset instanceof RuleSet) {
371
+ oRuleSet = extend({}, oLibSupport);
380
372
  } else {
381
- oLibrary = oLibSupportCopy;
373
+ oRuleSet = this._createRuleSet(oLibSupport);
382
374
  }
383
375
 
384
- this._mRuleSets[sNormalizedLibName] = oLibrary;
376
+ this._mRuleSets[sNormalizedLibName] = oRuleSet;
377
+
385
378
  } catch (e) {
386
379
  Log.error("[" + constants.SUPPORT_ASSISTANT_NAME + "] Failed to load RuleSet for " + sLibName + " library", e);
387
380
  }
@@ -439,9 +432,8 @@ sap.ui.define([
439
432
  * @param {Event} oEvent Contains information about the library and newly created rules
440
433
  */
441
434
  RuleSetLoader._onLibraryChanged = function (oEvent) {
442
- var that = this;
443
- if (oEvent.getParameter("stereotype") === "library" && RuleSetLoader._bRulesCreated) {
444
- that._oMainPromise = RuleSetLoader._fetchSupportRuleSets();
435
+ if (oEvent.getParameter("stereotype") === "library" && this._bRulesCreated) {
436
+ this._oMainPromise = this._fetchSupportRuleSets();
445
437
  }
446
438
  };
447
439
 
@@ -451,7 +443,7 @@ sap.ui.define([
451
443
  * @param {function} fnReadyCbk the function to be called after the rules are loaded initially.
452
444
  */
453
445
  RuleSetLoader.updateRuleSets = function (fnReadyCbk) {
454
- this._oMainPromise = RuleSetLoader._fetchSupportRuleSets(fnReadyCbk);
446
+ this._oMainPromise = this._fetchSupportRuleSets(fnReadyCbk);
455
447
  };
456
448
 
457
449
  /**
@@ -468,18 +460,7 @@ sap.ui.define([
468
460
  };
469
461
  var oRuleSet = new RuleSet(oLib);
470
462
 
471
- for (var i = 0; i < oLibrarySupport.ruleset.length; i++) {
472
- var ruleset = oLibrarySupport.ruleset[i];
473
-
474
- // If the ruleset contains arrays of rules make sure we add them.
475
- if (Array.isArray(ruleset)) {
476
- for (var k = 0; k < ruleset.length; k++) {
477
- oRuleSet.addRule(ruleset[k]);
478
- }
479
- } else {
480
- oRuleSet.addRule(ruleset);
481
- }
482
- }
463
+ oRuleSet.mergeRuleSet(oLibrarySupport.ruleset);
483
464
 
484
465
  return {
485
466
  lib: oLib,
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  *
54
54
  * @name sap.ui.support.Storage
55
55
  * @author SAP SE.
56
- * @version 1.115.1
56
+ * @version 1.117.0
57
57
  * @private
58
58
  */
59
59
  return /** @lends sap.ui.support.Storage */ {
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @alias sap.ui.support.WindowCommunicationBus
26
26
  * @author SAP SE
27
- * @version 1.115.1
27
+ * @version 1.117.0
28
28
  * @private
29
29
  */
30
30
  var WindowCommunicationBus = BaseObject.extend("sap.ui.support.supportRules.WindowCommunicationBus", {
@@ -91,7 +91,7 @@ sap.ui.define([
91
91
  *
92
92
  * @extends sap.ui.support.supportRules.ui.controllers.BaseController
93
93
  * @author SAP SE
94
- * @version 1.115.1
94
+ * @version 1.117.0
95
95
  * @private
96
96
  * @alias sap.ui.support.supportRules.ui.controllers.PresetsController
97
97
  */
package/ui5.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- specVersion: "2.0"
2
+ specVersion: "3.0"
3
3
  type: library
4
4
  metadata:
5
5
  name: sap.ui.support