@openui5/sap.ui.dt 1.93.3 → 1.96.2
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 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +2 -2
- package/src/sap/ui/dt/.library +1 -1
- package/src/sap/ui/dt/AggregationDesignTimeMetadata.js +1 -1
- package/src/sap/ui/dt/AggregationOverlay.js +1 -1
- package/src/sap/ui/dt/ControlObserver.js +1 -1
- package/src/sap/ui/dt/DOMUtil.js +1 -1
- package/src/sap/ui/dt/DesignTime.js +1 -1
- package/src/sap/ui/dt/DesignTimeMetadata.js +1 -1
- package/src/sap/ui/dt/ElementDesignTimeMetadata.js +2 -2
- package/src/sap/ui/dt/ElementOverlay.js +8 -1
- package/src/sap/ui/dt/ElementUtil.js +73 -1
- package/src/sap/ui/dt/ManagedObjectObserver.js +1 -1
- package/src/sap/ui/dt/MetadataPropagationUtil.js +1 -1
- package/src/sap/ui/dt/MutationObserver.js +1 -1
- package/src/sap/ui/dt/Overlay.js +1 -1
- package/src/sap/ui/dt/OverlayRegistry.js +1 -1
- package/src/sap/ui/dt/OverlayUtil.js +50 -16
- package/src/sap/ui/dt/Plugin.js +1 -1
- package/src/sap/ui/dt/ScrollbarSynchronizer.js +1 -1
- package/src/sap/ui/dt/SelectionManager.js +1 -1
- package/src/sap/ui/dt/SelectionMode.js +1 -1
- package/src/sap/ui/dt/TaskManager.js +1 -1
- package/src/sap/ui/dt/TaskRunner.js +1 -1
- package/src/sap/ui/dt/Util.js +1 -5
- package/src/sap/ui/dt/enablement/ElementEnablementTest.js +1 -1
- package/src/sap/ui/dt/enablement/Test.js +1 -1
- package/src/sap/ui/dt/enablement/Util.js +1 -1
- package/src/sap/ui/dt/enablement/report/LibraryReport.js +1 -1
- package/src/sap/ui/dt/enablement/report/QUnitReport.js +1 -1
- package/src/sap/ui/dt/enablement/report/Statistic.js +1 -1
- package/src/sap/ui/dt/enablement/report/StatisticRenderer.js +1 -1
- package/src/sap/ui/dt/enablement/report/Table.js +1 -1
- package/src/sap/ui/dt/enablement/report/TableRenderer.js +1 -1
- package/src/sap/ui/dt/library.js +2 -2
- package/src/sap/ui/dt/plugin/ContextMenu.js +122 -374
- package/src/sap/ui/dt/plugin/ControlDragDrop.js +1 -1
- package/src/sap/ui/dt/plugin/CutPaste.js +1 -1
- package/src/sap/ui/dt/plugin/DragDrop.js +1 -1
- package/src/sap/ui/dt/plugin/ElementMover.js +39 -42
- package/src/sap/ui/dt/plugin/MouseSelection.js +1 -1
- package/src/sap/ui/dt/plugin/TabHandling.js +39 -7
- package/src/sap/ui/dt/plugin/ToolHooks.js +1 -1
- package/src/sap/ui/dt/themes/base/ContextMenu.less +104 -75
- package/src/sap/ui/dt/util/ZIndexManager.js +1 -1
- package/ui5.yaml +4 -1
- package/src/sap/ui/dt/ContextMenuControl.js +0 -929
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:
|
|
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.
|
|
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:
|
|
283
|
-
Copyright:
|
|
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:
|
|
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.dt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.96.2",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.dt",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.
|
|
17
|
+
"@openui5/sap.ui.core": "1.96.2"
|
|
18
18
|
}
|
|
19
19
|
}
|
package/src/sap/ui/dt/.library
CHANGED
|
@@ -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.
|
|
9
|
+
<version>1.96.2</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAP UI library: sap.ui.dt (by SAP, Author)</documentation>
|
|
12
12
|
|
package/src/sap/ui/dt/DOMUtil.js
CHANGED
|
@@ -28,7 +28,7 @@ function(
|
|
|
28
28
|
* @extends sap.ui.dt.DesignTimeMetadata
|
|
29
29
|
*
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.96.2
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
@@ -200,7 +200,7 @@ function(
|
|
|
200
200
|
* @public
|
|
201
201
|
*/
|
|
202
202
|
ElementDesignTimeMetadata.prototype.getAggregationDisplayName = function(sAggregationName, oElement) {
|
|
203
|
-
var vDisplayNames = this.getAggregation(sAggregationName).displayName;
|
|
203
|
+
var vDisplayNames = this.getAggregation(sAggregationName) && this.getAggregation(sAggregationName).displayName;
|
|
204
204
|
if (typeof vDisplayNames === "function") {
|
|
205
205
|
vDisplayNames = vDisplayNames(oElement);
|
|
206
206
|
}
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
* @extends sap.ui.dt.Overlay
|
|
56
56
|
*
|
|
57
57
|
* @author SAP SE
|
|
58
|
-
* @version 1.
|
|
58
|
+
* @version 1.96.2
|
|
59
59
|
*
|
|
60
60
|
* @constructor
|
|
61
61
|
* @private
|
|
@@ -124,6 +124,13 @@ sap.ui.define([
|
|
|
124
124
|
},
|
|
125
125
|
metadataScope: {
|
|
126
126
|
type: "string"
|
|
127
|
+
},
|
|
128
|
+
/**
|
|
129
|
+
* Whether the next KeyUp event on the overlay should be ignored (e.g. for Rename)
|
|
130
|
+
*/
|
|
131
|
+
ignoreEnterKeyUpOnce: {
|
|
132
|
+
type: "boolean",
|
|
133
|
+
defaultValue: false
|
|
127
134
|
}
|
|
128
135
|
},
|
|
129
136
|
events: {
|
|
@@ -9,6 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/thirdparty/jquery",
|
|
10
10
|
"sap/ui/base/Object",
|
|
11
11
|
"sap/ui/dt/Util",
|
|
12
|
+
"sap/ui/dt/DOMUtil",
|
|
12
13
|
"sap/ui/core/Element",
|
|
13
14
|
"sap/ui/core/Component",
|
|
14
15
|
"sap/base/util/isPlainObject",
|
|
@@ -18,6 +19,7 @@ function(
|
|
|
18
19
|
jQuery,
|
|
19
20
|
BaseObject,
|
|
20
21
|
Util,
|
|
22
|
+
DOMUtil,
|
|
21
23
|
Element,
|
|
22
24
|
Component,
|
|
23
25
|
isPlainObject,
|
|
@@ -31,7 +33,7 @@ function(
|
|
|
31
33
|
* @class Utility functionality to work with elements, e.g. iterate through aggregations, find parents, ...
|
|
32
34
|
*
|
|
33
35
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
36
|
+
* @version 1.96.2
|
|
35
37
|
*
|
|
36
38
|
* @private
|
|
37
39
|
* @static
|
|
@@ -355,6 +357,27 @@ function(
|
|
|
355
357
|
return true;
|
|
356
358
|
};
|
|
357
359
|
|
|
360
|
+
/**
|
|
361
|
+
* Checks whether specified Element is a direct template clone (e.g. the list items of a sap.m.ListItem)
|
|
362
|
+
*
|
|
363
|
+
* @param {sap.ui.base.Object} oObject - Object for validation
|
|
364
|
+
* @returns {boolean} <code>true</code> if object is a direct clone of the template
|
|
365
|
+
*/
|
|
366
|
+
ElementUtil.isElementDirectTemplateChild = function (oObject) {
|
|
367
|
+
var mLocationInTemplate = ElementUtil.getAggregationInformation(oObject);
|
|
368
|
+
|
|
369
|
+
if (mLocationInTemplate.templateId) {
|
|
370
|
+
var sTemplateId = ElementUtil.extractTemplateId(mLocationInTemplate);
|
|
371
|
+
|
|
372
|
+
// If the stack only has one element, this element is a direct child of the template aggregation
|
|
373
|
+
if (sTemplateId && mLocationInTemplate.stack.length === 1) {
|
|
374
|
+
return true;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
return false;
|
|
379
|
+
};
|
|
380
|
+
|
|
358
381
|
/**
|
|
359
382
|
* Checks whether specified Element is a valid ManagedObject. The allowed objects must be
|
|
360
383
|
* descendants of sap.ui.core.Element or sap.ui.core.Component classes.
|
|
@@ -548,5 +571,54 @@ function(
|
|
|
548
571
|
return iTargetIndex;
|
|
549
572
|
};
|
|
550
573
|
|
|
574
|
+
/**
|
|
575
|
+
* Checks if an aggregation is valid for an element being moved
|
|
576
|
+
*
|
|
577
|
+
* @param {sap.ui.dt.AggregationOverlay} oAggregationOverlay - Aggregation overlay to be checked for target zone
|
|
578
|
+
* @param {sap.ui.dt.ElementOverlay} oMovedOverlay - Overlay being moved
|
|
579
|
+
* @param {boolean} bOverlayNotInDom - Flag defining if overlay is not in DOM
|
|
580
|
+
* @returns {Promise.<boolean>} Resolved promise with <code>true</code> if the aggregation overlay is a valid target zone for the overlay
|
|
581
|
+
*/
|
|
582
|
+
ElementUtil.checkTargetZone = function(oAggregationOverlay, oMovedOverlay, bOverlayNotInDom) {
|
|
583
|
+
var oGeometry = oAggregationOverlay.getGeometry();
|
|
584
|
+
var bGeometryVisible = oGeometry && oGeometry.size.height > 0 && oGeometry.size.width > 0;
|
|
585
|
+
var oParentElement = oAggregationOverlay.getElement();
|
|
586
|
+
|
|
587
|
+
var oMovedElement = oMovedOverlay.getElement();
|
|
588
|
+
var sAggregationName = oAggregationOverlay.getAggregationName();
|
|
589
|
+
if (!oMovedElement || !ElementUtil.isValidForAggregation(oParentElement, sAggregationName, oMovedElement)) {
|
|
590
|
+
return Promise.resolve(false);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// checks related to visibility
|
|
594
|
+
function fnCheckAggregationOverlayVisibility(oAggregationOverlay, oParentElement) {
|
|
595
|
+
// this function can get called on overlay registration, when there are no overlays in dom yet. In this case, DOMUtil.isVisible is always false.
|
|
596
|
+
var oAggregationOverlayDomRef = oAggregationOverlay.getDomRef();
|
|
597
|
+
var bAggregationOverlayVisibility = DOMUtil.isVisible(oAggregationOverlayDomRef);
|
|
598
|
+
|
|
599
|
+
// if there is no aggregation overlay domRef available the further check for domRef of the corresponding element is not required
|
|
600
|
+
if (!oAggregationOverlayDomRef) {
|
|
601
|
+
return bAggregationOverlayVisibility;
|
|
602
|
+
}
|
|
603
|
+
// additional check for corresponding element DomRef visibiltiy required for target zone checks during navigation mode.
|
|
604
|
+
// during navigation mode the domRef of valid overlays is given and the offsetWidth is 0. Therefor we need to check the visibility of the corresponding element additionally
|
|
605
|
+
var oParentElementDomRef = oParentElement && oParentElement.getDomRef && oParentElement.getDomRef();
|
|
606
|
+
var bAggregationElementVisibility = oParentElementDomRef ? DOMUtil.isVisible(oParentElementDomRef) : true;
|
|
607
|
+
return bAggregationOverlayVisibility || bAggregationElementVisibility;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
if (
|
|
611
|
+
(bOverlayNotInDom && !bGeometryVisible)
|
|
612
|
+
|| !bOverlayNotInDom && !fnCheckAggregationOverlayVisibility(oAggregationOverlay, oParentElement)
|
|
613
|
+
|| !(oParentElement && oParentElement.getVisible && oParentElement.getVisible())
|
|
614
|
+
// an aggregation can still have visible = true even if it has been removed from its parent
|
|
615
|
+
|| !oParentElement.getParent()
|
|
616
|
+
) {
|
|
617
|
+
return Promise.resolve(false);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return Promise.resolve(true);
|
|
621
|
+
};
|
|
622
|
+
|
|
551
623
|
return ElementUtil;
|
|
552
624
|
}, /* bExport= */true);
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The ManagedObjectObserver observes changes of a ManagedObject and propagates them via events.
|
|
26
26
|
* @extends sap.ui.base.ManagedObject
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.96.2
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.30
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @class The MutationObserver observes changes of a ManagedObject and propagates them via events.
|
|
31
31
|
* @extends sap.ui.base.ManagedObject
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.96.2
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.30
|
package/src/sap/ui/dt/Overlay.js
CHANGED
|
@@ -22,7 +22,7 @@ function(
|
|
|
22
22
|
*
|
|
23
23
|
* @class Utility functionality to work with overlays
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.96.2
|
|
26
26
|
* @private
|
|
27
27
|
* @static
|
|
28
28
|
* @since 1.30
|
|
@@ -434,13 +434,13 @@ function(
|
|
|
434
434
|
};
|
|
435
435
|
|
|
436
436
|
/**
|
|
437
|
-
* Gets all the Overlays inside the relevant container
|
|
438
|
-
* and have DesignTime Metadata.
|
|
437
|
+
* Gets all the Overlays with DesignTime Metadata inside the relevant container
|
|
439
438
|
* @param {sap.ui.dt.ElementOverlay} oOverlay Overlay from which we get the aggregations
|
|
439
|
+
* @param {boolean} bIncludeOtherAggregations Include also overlays from other aggregations from the parent
|
|
440
440
|
* @returns {sap.ui.dt.ElementOverlay[]} Returns an array with all the overlays in it
|
|
441
441
|
* @protected
|
|
442
442
|
*/
|
|
443
|
-
OverlayUtil.findAllOverlaysInContainer = function(oOverlay) {
|
|
443
|
+
OverlayUtil.findAllOverlaysInContainer = function(oOverlay, bIncludeOtherAggregations) {
|
|
444
444
|
// The root control has no relevant container, therefore we use the element itself
|
|
445
445
|
var oRelevantContainer = oOverlay.getRelevantContainer() || oOverlay.getElement();
|
|
446
446
|
var oRelevantContainerOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
|
|
@@ -452,16 +452,17 @@ function(
|
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
// Get all the siblings and parents of the overlay
|
|
455
|
-
var mRelevantOverlays = OverlayUtil._findAllSiblingsAndParents(oOverlay, oRelevantContainerOverlay, 0);
|
|
455
|
+
var mRelevantOverlays = OverlayUtil._findAllSiblingsAndParents(oOverlay, oRelevantContainerOverlay, 0, bIncludeOtherAggregations);
|
|
456
456
|
|
|
457
457
|
if (mRelevantOverlays[0]) {
|
|
458
458
|
for (var iLevel in mRelevantOverlays) {
|
|
459
459
|
aRelevantOverlays = aRelevantOverlays.concat(mRelevantOverlays[iLevel]);
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
// the overlay and its siblings are on the first level of the relevantOverlays. From those overlays we also need to get the children
|
|
463
462
|
var aChildren = [];
|
|
464
|
-
mRelevantOverlays[0]
|
|
463
|
+
var aOverlaysToGetChildrenFrom = bIncludeOtherAggregations ? aRelevantOverlays : mRelevantOverlays[0];
|
|
464
|
+
|
|
465
|
+
aOverlaysToGetChildrenFrom.forEach(function(oOverlay) {
|
|
465
466
|
aChildren = aChildren.concat(OverlayUtil._findAllChildrenInContainer(oOverlay, oRelevantContainer));
|
|
466
467
|
});
|
|
467
468
|
|
|
@@ -480,23 +481,49 @@ function(
|
|
|
480
481
|
};
|
|
481
482
|
|
|
482
483
|
/**
|
|
483
|
-
* This function returns all the siblings and parents inside the relevant container.
|
|
484
|
+
* This function returns all the siblings and parents inside the relevant container.
|
|
484
485
|
* @param {sap.ui.dt.ElementOverlay} oOverlay Overlay from which we get the aggregations
|
|
485
486
|
* @param {sap.ui.dt.ElementOverlay} oRelevantContainerOverlay Relevant container overlay
|
|
486
487
|
* @param {int} iLevel Current level in the hierarchy
|
|
488
|
+
* @param {boolean} bIncludeOtherAggregations Include also overlays from other aggregations from the parent
|
|
487
489
|
* @returns {object} Returns a map with all siblings sorted by the level
|
|
488
490
|
* @private
|
|
489
491
|
*/
|
|
490
|
-
OverlayUtil._findAllSiblingsAndParents = function(oOverlay, oRelevantContainerOverlay, iLevel) {
|
|
491
|
-
var
|
|
492
|
-
if (!
|
|
492
|
+
OverlayUtil._findAllSiblingsAndParents = function(oOverlay, oRelevantContainerOverlay, iLevel, bIncludeOtherAggregations) {
|
|
493
|
+
var oParentOverlay = oOverlay.getParentElementOverlay();
|
|
494
|
+
if (!oParentOverlay) {
|
|
493
495
|
return [];
|
|
494
496
|
}
|
|
495
497
|
|
|
496
|
-
|
|
497
|
-
var
|
|
498
|
-
var
|
|
499
|
-
|
|
498
|
+
function getChildrenFromAllAggregations(oParentOverlay) {
|
|
499
|
+
var aAllAggregationNames = oParentOverlay.getAggregationNames();
|
|
500
|
+
var aAllAggregationChildren = [];
|
|
501
|
+
|
|
502
|
+
// Collect children from all aggregations of the parent
|
|
503
|
+
aAllAggregationNames.forEach(function(sAggregationName) {
|
|
504
|
+
var oAggregationOverlay = oParentOverlay.getAggregationOverlay(sAggregationName);
|
|
505
|
+
var aAggregationChildren = oAggregationOverlay ? oAggregationOverlay.getChildren() : [];
|
|
506
|
+
aAllAggregationChildren = aAggregationChildren.concat(aAllAggregationChildren);
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
return aAllAggregationChildren;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
if (oParentOverlay !== oRelevantContainerOverlay) {
|
|
513
|
+
var mParents;
|
|
514
|
+
var aOverlays;
|
|
515
|
+
mParents = OverlayUtil._findAllSiblingsAndParents(oParentOverlay, oRelevantContainerOverlay, iLevel + 1, bIncludeOtherAggregations);
|
|
516
|
+
if (bIncludeOtherAggregations) {
|
|
517
|
+
var aAllAggregationChildren = [];
|
|
518
|
+
mParents[iLevel + 1].forEach(function(oParent) {
|
|
519
|
+
aAllAggregationChildren.concat(getChildrenFromAllAggregations(oParent));
|
|
520
|
+
});
|
|
521
|
+
mParents[iLevel] = aAllAggregationChildren;
|
|
522
|
+
return mParents;
|
|
523
|
+
}
|
|
524
|
+
aOverlays = mParents[iLevel + 1].map(function(oParent) {
|
|
525
|
+
var sParentAggregationName = oOverlay.getParentAggregationOverlay().getAggregationName();
|
|
526
|
+
var oAggregationOverlay = oParent.getAggregationOverlay(sParentAggregationName);
|
|
500
527
|
return oAggregationOverlay ? oAggregationOverlay.getChildren() : [];
|
|
501
528
|
}).reduce(function(a, b) {
|
|
502
529
|
return a.concat(b);
|
|
@@ -505,7 +532,14 @@ function(
|
|
|
505
532
|
return mParents;
|
|
506
533
|
}
|
|
507
534
|
|
|
508
|
-
var aChildren =
|
|
535
|
+
var aChildren = [];
|
|
536
|
+
|
|
537
|
+
if (bIncludeOtherAggregations) {
|
|
538
|
+
aChildren = getChildrenFromAllAggregations(oParentOverlay);
|
|
539
|
+
} else {
|
|
540
|
+
var sParentAggregationName = oOverlay.getParentAggregationOverlay().getAggregationName();
|
|
541
|
+
aChildren = oOverlay.getParentElementOverlay().getAggregationOverlay(sParentAggregationName).getChildren();
|
|
542
|
+
}
|
|
509
543
|
var mReturn = {};
|
|
510
544
|
mReturn[iLevel] = aChildren;
|
|
511
545
|
return mReturn;
|
package/src/sap/ui/dt/Plugin.js
CHANGED
|
@@ -16,7 +16,7 @@ sap.ui.define(function() {
|
|
|
16
16
|
* @namespace
|
|
17
17
|
* @name sap.ui.dt.SelectionMode
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.96.2
|
|
20
20
|
* @experimental This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
21
21
|
* @private
|
|
22
22
|
*/
|
package/src/sap/ui/dt/Util.js
CHANGED
|
@@ -8,15 +8,11 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/thirdparty/jquery",
|
|
9
9
|
"sap/ui/Device",
|
|
10
10
|
"sap/ui/base/ManagedObject",
|
|
11
|
-
"sap/base/util/includes",
|
|
12
|
-
"sap/base/util/isPlainObject",
|
|
13
11
|
"sap/ui/dt/DesignTimeStatus"
|
|
14
12
|
], function(
|
|
15
13
|
jQuery,
|
|
16
14
|
Device,
|
|
17
15
|
ManagedObject,
|
|
18
|
-
includes,
|
|
19
|
-
isPlainObject,
|
|
20
16
|
DesignTimeStatus
|
|
21
17
|
) {
|
|
22
18
|
"use strict";
|
|
@@ -28,7 +24,7 @@ sap.ui.define([
|
|
|
28
24
|
* Utilities for sap.ui.dt library
|
|
29
25
|
*
|
|
30
26
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
27
|
+
* @version 1.96.2
|
|
32
28
|
*
|
|
33
29
|
* @private
|
|
34
30
|
* @static
|