@openui5/sap.ui.rta 1.97.1 → 1.100.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 +25 -30
- package/THIRDPARTY.txt +15 -22
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +224 -168
- package/src/sap/ui/rta/Utils.js +4 -6
- package/src/sap/ui/rta/appContexts/AppContextsOverviewDialog.js +76 -0
- package/src/sap/ui/rta/appContexts/Component.js +31 -0
- package/src/sap/ui/rta/appContexts/controller/ManageContexts.controller.js +323 -0
- package/src/sap/ui/rta/appContexts/controller/RestAPIConnector.js +22 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n.properties +47 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ar.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_bg.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ca.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_cs.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_cy.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_da.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_de.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_el.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_GB.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_sappsd.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saprigi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saptrc.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_es.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_es_MX.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_et.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr_CA.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hu.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_id.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_it.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_iw.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ja.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_kk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ko.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_lt.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_lv.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ms.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_nl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_no.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt_PT.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ro.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ru.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sh.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sv.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_th.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_tr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_uk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_vi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_CN.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_TW.properties +23 -0
- package/src/sap/ui/rta/appContexts/index.html +25 -0
- package/src/sap/ui/rta/appContexts/manifest.json +52 -0
- package/src/sap/ui/rta/appContexts/view/EditContextsDialog.fragment.xml +76 -0
- package/src/sap/ui/rta/appContexts/view/ManageContexts.view.xml +103 -0
- package/src/sap/ui/rta/appContexts/view/SaveAsContextsDialog.fragment.xml +76 -0
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +6 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +11 -11
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +3 -4
- package/src/sap/ui/rta/appVariant/Feature.js +22 -11
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +3 -2
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +3 -2
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +3 -2
- package/src/sap/ui/rta/command/Combine.js +5 -1
- package/src/sap/ui/rta/command/CommandFactory.js +17 -13
- package/src/sap/ui/rta/command/CompositeCommand.js +5 -5
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +11 -3
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +22 -27
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +37 -17
- package/src/sap/ui/rta/messagebundle_ar.properties +20 -9
- package/src/sap/ui/rta/messagebundle_bg.properties +22 -11
- package/src/sap/ui/rta/messagebundle_ca.properties +20 -9
- package/src/sap/ui/rta/messagebundle_cs.properties +20 -9
- package/src/sap/ui/rta/messagebundle_cy.properties +20 -9
- package/src/sap/ui/rta/messagebundle_da.properties +20 -9
- package/src/sap/ui/rta/messagebundle_de.properties +20 -9
- package/src/sap/ui/rta/messagebundle_el.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en_GB.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +39 -20
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +22 -11
- package/src/sap/ui/rta/messagebundle_es.properties +20 -9
- package/src/sap/ui/rta/messagebundle_es_MX.properties +24 -13
- package/src/sap/ui/rta/messagebundle_et.properties +21 -10
- package/src/sap/ui/rta/messagebundle_fi.properties +20 -9
- package/src/sap/ui/rta/messagebundle_fr.properties +20 -9
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +20 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +20 -9
- package/src/sap/ui/rta/messagebundle_hr.properties +20 -9
- package/src/sap/ui/rta/messagebundle_hu.properties +20 -9
- package/src/sap/ui/rta/messagebundle_id.properties +23 -12
- package/src/sap/ui/rta/messagebundle_it.properties +21 -10
- package/src/sap/ui/rta/messagebundle_iw.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ja.properties +20 -9
- package/src/sap/ui/rta/messagebundle_kk.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ko.properties +21 -10
- package/src/sap/ui/rta/messagebundle_lt.properties +20 -9
- package/src/sap/ui/rta/messagebundle_lv.properties +22 -11
- package/src/sap/ui/rta/messagebundle_ms.properties +20 -9
- package/src/sap/ui/rta/messagebundle_nl.properties +20 -9
- package/src/sap/ui/rta/messagebundle_no.properties +20 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +20 -9
- package/src/sap/ui/rta/messagebundle_pt.properties +20 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ro.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ru.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sh.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sk.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sl.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sv.properties +20 -9
- package/src/sap/ui/rta/messagebundle_th.properties +20 -9
- package/src/sap/ui/rta/messagebundle_tr.properties +20 -9
- package/src/sap/ui/rta/messagebundle_uk.properties +21 -10
- package/src/sap/ui/rta/messagebundle_vi.properties +20 -9
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +20 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +20 -9
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +11 -4
- package/src/sap/ui/rta/plugin/ControlVariant.js +5 -6
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
- package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +22 -9
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +35 -33
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +53 -121
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +0 -67
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +9 -10
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +17 -47
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +5 -6
- package/src/sap/ui/rta/service/Outline.js +6 -3
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +44 -61
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +1 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +12 -12
- package/src/sap/ui/rta/toolbar/Base.js +3 -3
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +19 -10
- package/src/sap/ui/rta/toolbar/translation/Translation.js +146 -56
- package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +8 -13
- package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +41 -0
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +37 -13
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +40 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +112 -60
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +6 -5
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +87 -103
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +37 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +5 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +14 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +5 -2
- package/src/sap/ui/rta/util/showMessageBox.js +4 -3
- package/src/sap/ui/rta/util/validateFlexEnabled.js +2 -1
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
|
|
26
26
|
* @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.100.0
|
|
29
29
|
* @constructor
|
|
30
30
|
* @private
|
|
31
31
|
* @since 1.48
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
|
|
24
24
|
* @extends sap.ui.rta.plugin.Remove
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.100.0
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.48
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @class The Remove allows trigger remove operations on the overlay
|
|
30
30
|
* @extends sap.ui.rta.plugin.Plugin
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.100.0
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @since 1.34
|
|
@@ -114,12 +114,25 @@ sap.ui.define([
|
|
|
114
114
|
/**
|
|
115
115
|
* Checks if Overlay control has a valid parent and if it is
|
|
116
116
|
* not the last visible control in the aggregation
|
|
117
|
+
* The removal of the last element in the aggregation can
|
|
118
|
+
* be defined by the parameter 'removeLastElement' in the
|
|
119
|
+
* designtime of the aggregation
|
|
117
120
|
*
|
|
118
121
|
* @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - overlays to be removed
|
|
119
122
|
* @return {boolean} Returns true if the control can be removed
|
|
120
123
|
* @private
|
|
121
124
|
*/
|
|
122
125
|
Remove.prototype._canBeRemovedFromAggregation = function(aElementOverlays) {
|
|
126
|
+
//Check if designtime allows removing last visible element
|
|
127
|
+
var fnCheckDesignTimeSettings = function (oOverlay) {
|
|
128
|
+
var oParentOverlay = oOverlay.getParentAggregationOverlay();
|
|
129
|
+
if (oParentOverlay) {
|
|
130
|
+
var oAction = this.getAction(oParentOverlay);
|
|
131
|
+
return !!(oAction && oAction.removeLastElement);
|
|
132
|
+
}
|
|
133
|
+
return false;
|
|
134
|
+
}.bind(this);
|
|
135
|
+
|
|
123
136
|
var oOverlay = aElementOverlays[0];
|
|
124
137
|
var oElement = oOverlay.getElement();
|
|
125
138
|
var oParent = oElement.getParent();
|
|
@@ -130,22 +143,22 @@ sap.ui.define([
|
|
|
130
143
|
if (!Array.isArray(aElements)) {
|
|
131
144
|
return true;
|
|
132
145
|
}
|
|
133
|
-
if
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Fallback to 1 if no overlay is selected
|
|
146
|
+
// check if selected Overlays are the last visible elements in aggregation
|
|
138
147
|
var iNumberOfSelectedOverlays = aElementOverlays.length;
|
|
139
148
|
var aInvisibleElements = aElements.filter(function(oElement) {
|
|
140
149
|
var oElementOverlay = OverlayRegistry.getOverlay(oElement);
|
|
141
150
|
return !(oElementOverlay && oElementOverlay.getElementVisibility());
|
|
142
151
|
});
|
|
143
|
-
|
|
152
|
+
var bIsLastVisibleElement = (aInvisibleElements.length + iNumberOfSelectedOverlays === aElements.length);
|
|
153
|
+
if (bIsLastVisibleElement) {
|
|
154
|
+
return fnCheckDesignTimeSettings(oOverlay);
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
144
157
|
};
|
|
145
158
|
|
|
146
159
|
/**
|
|
147
160
|
* @param {sap.ui.dt.Overlay} oOverlay overlay object
|
|
148
|
-
* @return {
|
|
161
|
+
* @return {string} Returns the confirmation text
|
|
149
162
|
* @private
|
|
150
163
|
*/
|
|
151
164
|
Remove.prototype._getConfirmationText = function(oOverlay) {
|
|
@@ -323,4 +336,4 @@ sap.ui.define([
|
|
|
323
336
|
};
|
|
324
337
|
|
|
325
338
|
return Remove;
|
|
326
|
-
});
|
|
339
|
+
});
|
|
@@ -9,20 +9,16 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/rta/Utils",
|
|
10
10
|
"sap/ui/dt/OverlayRegistry",
|
|
11
11
|
"sap/ui/events/KeyCodes",
|
|
12
|
-
"sap/ui/dt/Overlay",
|
|
13
12
|
"sap/base/util/restricted/_intersection",
|
|
14
|
-
"sap/m/InstanceManager"
|
|
15
|
-
"sap/ui/Device"
|
|
13
|
+
"sap/m/InstanceManager"
|
|
16
14
|
],
|
|
17
15
|
function (
|
|
18
16
|
Plugin,
|
|
19
17
|
Utils,
|
|
20
18
|
OverlayRegistry,
|
|
21
19
|
KeyCodes,
|
|
22
|
-
Overlay,
|
|
23
20
|
_intersection,
|
|
24
|
-
InstanceManager
|
|
25
|
-
Device
|
|
21
|
+
InstanceManager
|
|
26
22
|
) {
|
|
27
23
|
"use strict";
|
|
28
24
|
|
|
@@ -34,7 +30,7 @@ function (
|
|
|
34
30
|
* @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
|
|
35
31
|
* @extends sap.ui.rta.plugin.Plugin
|
|
36
32
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
33
|
+
* @version 1.100.0
|
|
38
34
|
* @constructor
|
|
39
35
|
* @private
|
|
40
36
|
* @since 1.34
|
|
@@ -125,6 +121,18 @@ function (
|
|
|
125
121
|
return false;
|
|
126
122
|
};
|
|
127
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Sets the value of the isActive property.
|
|
126
|
+
* When set to false, de-select all overlays.
|
|
127
|
+
* @param {boolean} bValue - Value to be set
|
|
128
|
+
*/
|
|
129
|
+
Selection.prototype.setIsActive = function(bValue) {
|
|
130
|
+
this.setProperty("isActive", bValue);
|
|
131
|
+
if (bValue === false) {
|
|
132
|
+
this._deselectOverlays();
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
128
136
|
/**
|
|
129
137
|
* Register an overlay
|
|
130
138
|
*
|
|
@@ -244,11 +252,14 @@ function (
|
|
|
244
252
|
};
|
|
245
253
|
|
|
246
254
|
Selection.prototype._selectOverlay = function (oEvent) {
|
|
255
|
+
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
247
256
|
if (!this.getIsActive()) {
|
|
248
|
-
|
|
257
|
+
// Propagation should be stopped at the root overlay to prevent the selection of the underlying elements
|
|
258
|
+
if (oOverlay.isRoot()) {
|
|
259
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
260
|
+
}
|
|
249
261
|
return;
|
|
250
262
|
}
|
|
251
|
-
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
252
263
|
var bMultiSelection = oEvent.metaKey || oEvent.ctrlKey;
|
|
253
264
|
var bContextMenu = oEvent.type === "contextmenu";
|
|
254
265
|
|
|
@@ -281,7 +292,11 @@ function (
|
|
|
281
292
|
// In Visualization Mode we must prevent MouseDown-Event for Overlays
|
|
282
293
|
// We have to close open PopOvers from the ChangeVisualization because they
|
|
283
294
|
// should close on MouseDown
|
|
284
|
-
|
|
295
|
+
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
296
|
+
// Propagation should be stopped at the root overlay to prevent the selection of the underlying elements
|
|
297
|
+
if (oOverlay.isRoot()) {
|
|
298
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
299
|
+
}
|
|
285
300
|
InstanceManager.getOpenPopovers().forEach(function(oPopOver) {
|
|
286
301
|
if (oPopOver._bOpenedByChangeIndicator) {
|
|
287
302
|
oPopOver.close();
|
|
@@ -289,25 +304,6 @@ function (
|
|
|
289
304
|
});
|
|
290
305
|
return;
|
|
291
306
|
}
|
|
292
|
-
// set focus after clicking, needed only for internet explorer
|
|
293
|
-
if (Device.browser.name === "ie") {
|
|
294
|
-
// when the EasyAdd Button is clicked, we don't want to focus/stopPropagation.
|
|
295
|
-
// but when the OverlayScrollContainer is the target, we want it to behave like a click on an overlay
|
|
296
|
-
var oTarget = OverlayRegistry.getOverlay(oEvent.target.id);
|
|
297
|
-
var bTargetIsScrollContainer = jQuery(oEvent.target).hasClass("sapUiDtOverlayScrollContainer");
|
|
298
|
-
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
299
|
-
if (
|
|
300
|
-
oOverlay
|
|
301
|
-
&& (bTargetIsScrollContainer || oTarget instanceof Overlay)
|
|
302
|
-
) {
|
|
303
|
-
if (oOverlay.getSelectable()) {
|
|
304
|
-
oOverlay.focus();
|
|
305
|
-
oEvent.stopPropagation();
|
|
306
|
-
} else {
|
|
307
|
-
oOverlay.getDomRef().blur();
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
307
|
};
|
|
312
308
|
|
|
313
309
|
/**
|
|
@@ -316,11 +312,14 @@ function (
|
|
|
316
312
|
* @private
|
|
317
313
|
*/
|
|
318
314
|
Selection.prototype._onMouseover = function(oEvent) {
|
|
315
|
+
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
319
316
|
if (!this.getIsActive()) {
|
|
320
|
-
|
|
317
|
+
// Propagation should be stopped at the root overlay to prevent the selection of the underlying elements
|
|
318
|
+
if (oOverlay.isRoot()) {
|
|
319
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
320
|
+
}
|
|
321
321
|
return;
|
|
322
322
|
}
|
|
323
|
-
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
324
323
|
if (oOverlay.isSelectable()) {
|
|
325
324
|
if (oOverlay !== this._oHoverTarget) {
|
|
326
325
|
this._removePreviousHover();
|
|
@@ -337,11 +336,14 @@ function (
|
|
|
337
336
|
* @private
|
|
338
337
|
*/
|
|
339
338
|
Selection.prototype._onMouseleave = function(oEvent) {
|
|
339
|
+
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
340
340
|
if (!this.getIsActive()) {
|
|
341
|
-
|
|
341
|
+
// Propagation should be stopped at the root overlay to prevent the selection of the underlying elements
|
|
342
|
+
if (oOverlay.isRoot()) {
|
|
343
|
+
preventEventDefaultAndPropagation(oEvent);
|
|
344
|
+
}
|
|
342
345
|
return;
|
|
343
346
|
}
|
|
344
|
-
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id);
|
|
345
347
|
if (oOverlay.isSelectable()) {
|
|
346
348
|
this._removePreviousHover();
|
|
347
349
|
preventEventDefaultAndPropagation(oEvent);
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.100.0
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.94
|
|
38
38
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -82,12 +82,20 @@ sap.ui.define([
|
|
|
82
82
|
function checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin) {
|
|
83
83
|
var mParents = AdditionalElementsUtils.getParents(bSibling, oSourceElementOverlay, oPlugin);
|
|
84
84
|
var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
85
|
+
var aAddODataPropertyActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("addODataProperty", mParents.parent) : [];
|
|
86
|
+
if (aAddODataPropertyActions.length > 0) {
|
|
87
87
|
Log.error("Outdated addODataProperty action in designtime metadata in "
|
|
88
88
|
+ oDesignTimeMetadata.getData().designtimeModule
|
|
89
89
|
+ " or propagated or via instance specific designtime metadata.");
|
|
90
90
|
}
|
|
91
|
+
var aAddActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent) : [];
|
|
92
|
+
aAddActions.forEach(function(mAddAction) {
|
|
93
|
+
if (mAddAction["custom"]) {
|
|
94
|
+
Log.error("Outdated custom add action in designtime metadata in "
|
|
95
|
+
+ oDesignTimeMetadata.getData().designtimeModule
|
|
96
|
+
+ " or propagated or via instance specific designtime metadata.");
|
|
97
|
+
}
|
|
98
|
+
});
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
function getInvisibleElements (oParentOverlay, sAggregationName, oPlugin) {
|
|
@@ -224,26 +232,27 @@ sap.ui.define([
|
|
|
224
232
|
}
|
|
225
233
|
|
|
226
234
|
function checkAndEnrichReveal(mReveal, mInvisibleElement, oPlugin, sTargetAggregation) {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
235
|
+
var oInvisibleElement = mInvisibleElement.element;
|
|
236
|
+
var oDesignTimeMetadata;
|
|
237
|
+
var mRevealAction;
|
|
238
|
+
var bRevealEnabled = false;
|
|
239
|
+
var oHasChangeHandlerPromise = Promise.resolve(false);
|
|
240
|
+
var sSourceAggregation = mInvisibleElement.sourceAggregation;
|
|
241
|
+
|
|
242
|
+
var oOverlay = OverlayRegistry.getOverlay(oInvisibleElement);
|
|
243
|
+
if (oOverlay) {
|
|
244
|
+
oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
|
|
245
|
+
|
|
246
|
+
mRevealAction = oDesignTimeMetadata && oDesignTimeMetadata.getAction("reveal", oInvisibleElement);
|
|
247
|
+
if (mRevealAction && mRevealAction.changeType) {
|
|
248
|
+
var oRevealSelector = oInvisibleElement;
|
|
249
|
+
if (mRevealAction.changeOnRelevantContainer) {
|
|
250
|
+
oRevealSelector = oOverlay.getRelevantContainer();
|
|
251
|
+
}
|
|
245
252
|
|
|
246
|
-
|
|
253
|
+
oHasChangeHandlerPromise = oPlugin.hasChangeHandler(mRevealAction.changeType, oRevealSelector).then(function(bHasChangeHandler) {
|
|
254
|
+
// Element can be made invalid while the check is running (e.g. destroyed during undo of split)
|
|
255
|
+
if (ElementUtil.isElementValid(oInvisibleElement)) {
|
|
247
256
|
var mParents = AdditionalElementsUtils.getParents(true, oOverlay, oPlugin);
|
|
248
257
|
if (bHasChangeHandler) {
|
|
249
258
|
if (mRevealAction.changeOnRelevantContainer) {
|
|
@@ -263,32 +272,32 @@ sap.ui.define([
|
|
|
263
272
|
return Utils.checkTargetZone(oAggregationOverlay, oOverlay, oPlugin);
|
|
264
273
|
}
|
|
265
274
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
275
|
+
}
|
|
276
|
+
return bRevealEnabled;
|
|
277
|
+
});
|
|
269
278
|
}
|
|
279
|
+
}
|
|
270
280
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
281
|
+
return oHasChangeHandlerPromise.then(function(bIncludeReveal) {
|
|
282
|
+
if (bIncludeReveal) {
|
|
283
|
+
mReveal.elements.push({
|
|
284
|
+
element: oInvisibleElement,
|
|
285
|
+
designTimeMetadata: oDesignTimeMetadata,
|
|
286
|
+
action: mRevealAction,
|
|
287
|
+
sourceAggregation: sSourceAggregation,
|
|
288
|
+
targetAggregation: sTargetAggregation
|
|
289
|
+
});
|
|
290
|
+
var mName = oDesignTimeMetadata.getName(oInvisibleElement);
|
|
291
|
+
if (mName) {
|
|
292
|
+
mReveal.controlTypeNames.push(mName);
|
|
284
293
|
}
|
|
285
|
-
|
|
286
|
-
|
|
294
|
+
}
|
|
295
|
+
return mReveal;
|
|
287
296
|
});
|
|
288
297
|
}
|
|
289
298
|
|
|
290
299
|
/**
|
|
291
|
-
* Calculate a structure with all "add/reveal
|
|
300
|
+
* Calculate a structure with all "add/reveal" action relevant data collected per aggregation:
|
|
292
301
|
* <pre>
|
|
293
302
|
* {
|
|
294
303
|
* <aggregationName> : {
|
|
@@ -304,11 +313,6 @@ sap.ui.define([
|
|
|
304
313
|
* sourceAggregation: <aggregation where this element is currently located>
|
|
305
314
|
* }],
|
|
306
315
|
* controlTypeNames : string[] <all controlTypeNames collected via designTimeMetadata>
|
|
307
|
-
* },
|
|
308
|
-
* addViaCustom : {
|
|
309
|
-
* designTimeMetadata : <sap.ui.dt.ElementDesignTimeMetadata of parent>,
|
|
310
|
-
* action : <add.custom action section from designTimeMetadata>
|
|
311
|
-
* items : <add.custom action's array of items from the getItems() function>
|
|
312
316
|
* }
|
|
313
317
|
* },
|
|
314
318
|
* <aggregationName2> : ...
|
|
@@ -320,7 +324,7 @@ sap.ui.define([
|
|
|
320
324
|
* @param {sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin} oPlugin - Instance of the AdditionalElementsPlugin
|
|
321
325
|
* @param {boolean} [bInvalidate] - Option to prevent cached actions to be returned
|
|
322
326
|
*
|
|
323
|
-
* @return {Promise} Resolving to a structure with all "add/reveal
|
|
327
|
+
* @return {Promise} Resolving to a structure with all "add/reveal" action relevant data collected
|
|
324
328
|
*/
|
|
325
329
|
ActionExtractor.getActions = function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate) {
|
|
326
330
|
var sSiblingOrChild = bSibling ? "asSibling" : "asChild";
|
|
@@ -330,16 +334,14 @@ sap.ui.define([
|
|
|
330
334
|
|
|
331
335
|
var oRevealActionsPromise = this._getRevealActions(bSibling, oSourceElementOverlay, oPlugin);
|
|
332
336
|
var oAddPropertyActionsPromise = this._getAddViaDelegateActions(bSibling, oSourceElementOverlay, oPlugin);
|
|
333
|
-
var oCustomAddActionsPromise = this._getCustomAddActions(bSibling, oSourceElementOverlay, oPlugin);
|
|
334
337
|
|
|
335
338
|
return Promise.all([
|
|
336
339
|
oRevealActionsPromise,
|
|
337
340
|
oAddPropertyActionsPromise,
|
|
338
|
-
oCustomAddActionsPromise,
|
|
339
341
|
checkInvalidAddActions(bSibling, oSourceElementOverlay, oPlugin)
|
|
340
342
|
]).then(function(aAllActions) {
|
|
341
343
|
//join and condense all action data
|
|
342
|
-
var mAllActions = merge(aAllActions[0], aAllActions[1]
|
|
344
|
+
var mAllActions = merge(aAllActions[0], aAllActions[1]);
|
|
343
345
|
oSourceElementOverlay._mAddActions = oSourceElementOverlay._mAddActions || {asSibling: {}, asChild: {}};
|
|
344
346
|
oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
|
|
345
347
|
return mAllActions;
|
|
@@ -350,7 +352,7 @@ sap.ui.define([
|
|
|
350
352
|
* Returns the already calculated actions of an Overlay, or undefined if no actions available
|
|
351
353
|
* @param {boolean} bSibling - Indicates if the elements should be added as sibling (true) or child (false) to the overlay
|
|
352
354
|
* @param {sap.ui.dt.ElementOverlay} oOverlay - Elements will be added in relation (sibling/parent) to this overlay
|
|
353
|
-
* @returns {object/undefined} - Object with all "add/reveal
|
|
355
|
+
* @returns {object/undefined} - Object with all "add/reveal" action relevant data collected or undefined if no actions available
|
|
354
356
|
*/
|
|
355
357
|
ActionExtractor.getActionsOrUndef = function(bSibling, oOverlay) {
|
|
356
358
|
var sSiblingOrChild = bSibling ? "asSibling" : "asChild";
|
|
@@ -431,75 +433,5 @@ sap.ui.define([
|
|
|
431
433
|
}.bind(this));
|
|
432
434
|
};
|
|
433
435
|
|
|
434
|
-
/**
|
|
435
|
-
* Return the CustomAdd action data (parameters + elements) for an Overlay.
|
|
436
|
-
* @param {boolean} bSibling - If source element overlay should be sibling or parent to the newly added fields
|
|
437
|
-
* @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay where the action is triggered
|
|
438
|
-
* @param {sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin} oPlugin - Instance of the AdditionalElementsPlugin
|
|
439
|
-
*
|
|
440
|
-
* @returns {Promise<object>} CustomAdd action data
|
|
441
|
-
*/
|
|
442
|
-
ActionExtractor._getCustomAddActions = function(bSibling, oOverlay, oPlugin) {
|
|
443
|
-
var mParents = AdditionalElementsUtils.getParents(bSibling, oOverlay, oPlugin);
|
|
444
|
-
var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
|
|
445
|
-
var aActions = oDesignTimeMetadata && oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent, undefined, "custom") || [];
|
|
446
|
-
|
|
447
|
-
function getAction(mAction, oCheckElement) {
|
|
448
|
-
var aItems = [];
|
|
449
|
-
return Promise.resolve()
|
|
450
|
-
.then(function () {
|
|
451
|
-
if (mAction && typeof mAction.getItems === "function") {
|
|
452
|
-
var oCheckElementOverlay = OverlayRegistry.getOverlay(oCheckElement);
|
|
453
|
-
if (oPlugin.hasStableId(oCheckElementOverlay)) {
|
|
454
|
-
return mAction.getItems(oCheckElement);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
return aItems;
|
|
458
|
-
})
|
|
459
|
-
.then(function (aItemsFromAction) {
|
|
460
|
-
aItems = aItemsFromAction || [];
|
|
461
|
-
var aChangeHandlerPromises = aItems.reduce(function (aPromises, oItem) {
|
|
462
|
-
// adjust relevant container
|
|
463
|
-
if (oItem.changeSpecificData.changeOnRelevantContainer) {
|
|
464
|
-
oCheckElement = mParents.relevantContainer;
|
|
465
|
-
}
|
|
466
|
-
if (oItem.changeSpecificData.changeType) {
|
|
467
|
-
aPromises.push(oPlugin.hasChangeHandler(oItem.changeSpecificData.changeType, oCheckElement));
|
|
468
|
-
}
|
|
469
|
-
return aPromises;
|
|
470
|
-
}, []);
|
|
471
|
-
|
|
472
|
-
return Promise.all(aChangeHandlerPromises);
|
|
473
|
-
})
|
|
474
|
-
.then(function (aHasChangeHandlerForCustomItems) {
|
|
475
|
-
if (aHasChangeHandlerForCustomItems.indexOf(false) === -1) {
|
|
476
|
-
return {
|
|
477
|
-
aggregationName: mAction.aggregation,
|
|
478
|
-
addViaCustom: {
|
|
479
|
-
designTimeMetadata: oDesignTimeMetadata,
|
|
480
|
-
action: mAction,
|
|
481
|
-
items: aItems
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
return undefined;
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
var oCheckElement = mParents.parent;
|
|
490
|
-
return aActions.reduce(function(oPreviousPromise, oAction) {
|
|
491
|
-
return oPreviousPromise.then(function(oReturn) {
|
|
492
|
-
return getAction.call(this, oAction, oCheckElement).then(function(mAction) {
|
|
493
|
-
if (mAction) {
|
|
494
|
-
oReturn[mAction.aggregationName] = {
|
|
495
|
-
addViaCustom: mAction.addViaCustom
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
return oReturn;
|
|
499
|
-
});
|
|
500
|
-
}.bind(this));
|
|
501
|
-
}.bind(this), Promise.resolve({}));
|
|
502
|
-
};
|
|
503
|
-
|
|
504
436
|
return ActionExtractor;
|
|
505
437
|
});
|
|
@@ -126,15 +126,6 @@ sap.ui.define([
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
function _assignCustomItemIds(sParentId, oCustomItem) {
|
|
130
|
-
oCustomItem.type = "custom";
|
|
131
|
-
if (oCustomItem.id) {
|
|
132
|
-
oCustomItem.itemId = sParentId + "-" + oCustomItem.id;
|
|
133
|
-
oCustomItem.key = oCustomItem.itemId;
|
|
134
|
-
}
|
|
135
|
-
return oCustomItem;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
129
|
function _oPropertyToAdditionalElementInfo (oProperty) {
|
|
139
130
|
return {
|
|
140
131
|
selected: false,
|
|
@@ -409,18 +400,6 @@ sap.ui.define([
|
|
|
409
400
|
return bIncludeElement;
|
|
410
401
|
}
|
|
411
402
|
|
|
412
|
-
function _enhanceByCustomItems(oInvisibleElement, mActions, bIncludeElement, oElement) {
|
|
413
|
-
var mCustom = mActions.addViaCustom;
|
|
414
|
-
if (mCustom && bIncludeElement) {
|
|
415
|
-
mCustom.items.forEach(function(oCustomItem) {
|
|
416
|
-
_assignCustomItemIds(oElement.getParent().getId(), oCustomItem);
|
|
417
|
-
if (oCustomItem.itemId === oInvisibleElement.getId()) {
|
|
418
|
-
_enhanceInvisibleElement(oInvisibleElement, oCustomItem);
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
403
|
function _getModelName(mAddViaDelegate) {
|
|
425
404
|
//ManagedObject jsdoc tells to use undefined for default model, therefore it
|
|
426
405
|
//is necessary to return undefined if modelName or whole delegateInfo is missing
|
|
@@ -462,8 +441,6 @@ sap.ui.define([
|
|
|
462
441
|
|
|
463
442
|
var bIncludeElement = _enhanceByMetadata(oElement, sAggregationName, oInvisibleElement, mActions, aRepresentedProperties, aProperties);
|
|
464
443
|
|
|
465
|
-
_enhanceByCustomItems(oInvisibleElement, mActions, bIncludeElement, oElement);
|
|
466
|
-
|
|
467
444
|
if (bIncludeElement) {
|
|
468
445
|
aAllElementData.push({
|
|
469
446
|
element: oInvisibleElement,
|
|
@@ -518,50 +495,6 @@ sap.ui.define([
|
|
|
518
495
|
}).then(function(aUnrepresentedProperties) {
|
|
519
496
|
return aUnrepresentedProperties.map(_oPropertyToAdditionalElementInfo);
|
|
520
497
|
});
|
|
521
|
-
},
|
|
522
|
-
|
|
523
|
-
getCustomAddItems: function(oElement, mAction) {
|
|
524
|
-
return new Promise(function(fnResolve) {
|
|
525
|
-
if (Array.isArray(mAction.items)) {
|
|
526
|
-
// remove items already rendered
|
|
527
|
-
fnResolve(
|
|
528
|
-
mAction.items
|
|
529
|
-
.map(_assignCustomItemIds.bind(null, oElement.getParent().getId()))
|
|
530
|
-
.filter(function(oCustomItem) {
|
|
531
|
-
if (!oCustomItem.id) {
|
|
532
|
-
Log.error("CustomAdd item with label " + oCustomItem.label + " does not contain an 'id' property", "sap.ui.rta.plugin.AdditionalElementsAnalyzer#showAvailableElements");
|
|
533
|
-
return false;
|
|
534
|
-
}
|
|
535
|
-
return !ElementUtil.getElementInstance(oCustomItem.itemId);
|
|
536
|
-
})
|
|
537
|
-
);
|
|
538
|
-
} else {
|
|
539
|
-
fnResolve();
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
},
|
|
543
|
-
|
|
544
|
-
getFilteredItemsList: function(aAnalyzerValues) {
|
|
545
|
-
// promise index 0: invisible, 1: addViaOData/addViaDelegate, 2: custom
|
|
546
|
-
var aInvisibleElements = aAnalyzerValues[0];
|
|
547
|
-
var iCustomItemsIndex = 2;
|
|
548
|
-
var aCustomItems = aAnalyzerValues[iCustomItemsIndex];
|
|
549
|
-
if (aCustomItems) {
|
|
550
|
-
var aInvisibleElementIds = aInvisibleElements.map(
|
|
551
|
-
function (oInvisibleItem) {
|
|
552
|
-
return oInvisibleItem.elementId;
|
|
553
|
-
}
|
|
554
|
-
);
|
|
555
|
-
// filter for hidden custom items in the array
|
|
556
|
-
aAnalyzerValues[iCustomItemsIndex] = aCustomItems
|
|
557
|
-
.filter(function(oCustomItem) {
|
|
558
|
-
return !oCustomItem.itemId || aInvisibleElementIds.indexOf(oCustomItem.itemId) === -1;
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
return aAnalyzerValues
|
|
562
|
-
.reduce(function (aAllElements, aAnalyzerValue) {
|
|
563
|
-
return aAllElements.concat(aAnalyzerValue);
|
|
564
|
-
}, []);
|
|
565
498
|
}
|
|
566
499
|
};
|
|
567
500
|
return oAnalyzer;
|