@openui5/sap.ui.mdc 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.
- package/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +236 -334
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +150 -22
- package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
- package/src/sap/ui/mdc/ChartNew.js +107 -66
- package/src/sap/ui/mdc/Control.js +4 -3
- package/src/sap/ui/mdc/Element.js +5 -4
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -10
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +160 -79
- package/src/sap/ui/mdc/TableDelegate.js +20 -3
- package/src/sap/ui/mdc/ValueHelp.js +1474 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
- package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
- package/src/sap/ui/mdc/chart/Item.js +2 -3
- package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
- package/src/sap/ui/mdc/condition/Operator.js +4 -4
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
- package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +19 -4
- package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +38 -14
- package/src/sap/ui/mdc/field/FieldBase.js +92 -41
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +7 -1
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +1 -1
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/BooleanContent.js +15 -3
- package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
- package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
- package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
- package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
- package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
- package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +203 -197
- package/src/sap/ui/mdc/library.js +588 -8
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialog.js +2 -2
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +31 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +35 -28
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
- package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +3 -2
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +22 -24
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
- package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
- package/src/sap/ui/mdc/table/Column.js +35 -9
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +0 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
- package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
- package/src/sap/ui/mdc/ui/Container.js +2 -2
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/FilterUtil.js +12 -1
- package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +22 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +401 -93
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
|
@@ -5,8 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/m/OverflowToolbar",
|
|
9
|
-
|
|
8
|
+
"sap/m/OverflowToolbar",
|
|
9
|
+
"sap/m/OverflowToolbarRenderer",
|
|
10
|
+
"sap/m/OverflowToolbarPriority",
|
|
11
|
+
"sap/m/ToolbarSpacer",
|
|
12
|
+
"sap/m/ToolbarSeparator",
|
|
13
|
+
"sap/ui/mdc/enum/ActionToolbarActionAlignment",
|
|
14
|
+
"sap/ui/mdc/p13n/subcontroller/ActionToolbarController",
|
|
15
|
+
"sap/ui/mdc/p13n/Engine"
|
|
16
|
+
], function(OverflowToolbar, OverflowToolbarRenderer, OverflowToolbarPriority, ToolbarSpacer, ToolbarSeparator, ActionToolbarActionAlignment, ActionToolbarController, Engine) {
|
|
10
17
|
"use strict";
|
|
11
18
|
|
|
12
19
|
/**
|
|
@@ -21,11 +28,12 @@ sap.ui.define([
|
|
|
21
28
|
* @class The column for the metadata driven table, that hold the template to be shown when the rows has data.
|
|
22
29
|
* @extends sap.m.OverflowToolbar
|
|
23
30
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
31
|
+
* @version 1.96.1
|
|
25
32
|
* @constructor
|
|
26
33
|
* @private
|
|
27
|
-
* @experimental
|
|
28
34
|
* @since 1.58
|
|
35
|
+
* @experimental As of version 1.58
|
|
36
|
+
* @ui5-restricted sap.ui.mdc
|
|
29
37
|
* @alias sap.ui.mdc.ActionToolbar
|
|
30
38
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
31
39
|
*/
|
|
@@ -33,6 +41,7 @@ sap.ui.define([
|
|
|
33
41
|
var ActionToolbar = OverflowToolbar.extend("sap.ui.mdc.ActionToolbar", {
|
|
34
42
|
metadata: {
|
|
35
43
|
library: "sap.ui.mdc",
|
|
44
|
+
designtime: "sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime",
|
|
36
45
|
defaultAggregation: "actions",
|
|
37
46
|
properties: {
|
|
38
47
|
/**
|
|
@@ -65,7 +74,7 @@ sap.ui.define([
|
|
|
65
74
|
* Further actions in the toolbar.
|
|
66
75
|
*/
|
|
67
76
|
actions: {
|
|
68
|
-
type: "sap.ui.
|
|
77
|
+
type: "sap.ui.mdc.actiontoolbar.ActionToolbarAction",
|
|
69
78
|
multiple: true
|
|
70
79
|
},
|
|
71
80
|
|
|
@@ -81,411 +90,304 @@ sap.ui.define([
|
|
|
81
90
|
renderer: OverflowToolbarRenderer
|
|
82
91
|
});
|
|
83
92
|
|
|
84
|
-
var
|
|
85
|
-
"begin",
|
|
93
|
+
var aAggregations = [
|
|
94
|
+
"begin",
|
|
95
|
+
"between",
|
|
96
|
+
"actions",
|
|
97
|
+
"end"
|
|
86
98
|
];
|
|
87
99
|
|
|
88
|
-
function
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var res = oToolbar.addContent(oObj);
|
|
99
|
-
oToolbar._editctx = false;
|
|
100
|
-
return res;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function _insert(oToolbar, oObj, iIndex) {
|
|
104
|
-
oToolbar._editctx = true;
|
|
105
|
-
var res = oToolbar.insertContent(oObj, iIndex);
|
|
106
|
-
oToolbar._editctx = false;
|
|
107
|
-
return res;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function _remove(oToolbar, oObj) {
|
|
111
|
-
oToolbar._editctx = true;
|
|
112
|
-
var res = oToolbar.removeContent(oObj);
|
|
113
|
-
oToolbar._editctx = false;
|
|
114
|
-
return res;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function _destroy(oToolbar) {
|
|
118
|
-
oToolbar._editctx = true;
|
|
119
|
-
var res = oToolbar.destroyContent();
|
|
120
|
-
oToolbar._editctx = false;
|
|
121
|
-
return res;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function _checkModifyContent(oToolbar, sAggregationName) {
|
|
125
|
-
if (sAggregationName === "content" && !oToolbar._editctx) {
|
|
126
|
-
throw new Error("Mutator functions of the content aggregation of the ActionToolbar '" + oToolbar.getId() + "' must not be used.");
|
|
127
|
-
}
|
|
128
|
-
}
|
|
100
|
+
var fnGetOverflowToolbarConfig = function() {
|
|
101
|
+
var oConfig = {
|
|
102
|
+
canOverflow: true,
|
|
103
|
+
getCustomImportance: function() {
|
|
104
|
+
return OverflowToolbarPriority.NeverOverflow;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
return oConfig;
|
|
109
|
+
};
|
|
129
110
|
|
|
130
111
|
ActionToolbar.prototype.init = function() {
|
|
112
|
+
OverflowToolbar.prototype.init.apply(this, arguments);
|
|
131
113
|
// Separator between begin (title) and between (variant) content of the toolbar.
|
|
132
|
-
this.
|
|
114
|
+
this._oBeginSeparator = new ToolbarSeparator({
|
|
115
|
+
visible: false
|
|
116
|
+
});
|
|
117
|
+
this._oBeginSeparator.getOverflowToolbarConfig = fnGetOverflowToolbarConfig;
|
|
118
|
+
// Separator between actions and end content of the toolbar.
|
|
119
|
+
this._oEndActionsBeginSeparator = new ToolbarSeparator({
|
|
133
120
|
visible: false
|
|
134
121
|
});
|
|
122
|
+
this._oEndActionsBeginSeparator.getOverflowToolbarConfig = fnGetOverflowToolbarConfig;
|
|
123
|
+
// Separator between end and actions content of the toolbar.
|
|
124
|
+
this._oEndActionsEndSeparator = new ToolbarSeparator({
|
|
125
|
+
visible: false
|
|
126
|
+
});
|
|
127
|
+
this._oEndActionsEndSeparator.getOverflowToolbarConfig = fnGetOverflowToolbarConfig;
|
|
135
128
|
// Spacer added to right align actions and end aggregation of the toolbar.
|
|
136
129
|
this._oSpacer = new ToolbarSpacer();
|
|
137
130
|
|
|
138
|
-
if (OverflowToolbar.prototype.init) {
|
|
139
|
-
OverflowToolbar.prototype.init.apply(this, arguments);
|
|
140
|
-
}
|
|
141
|
-
// Add TitleSeparator, Spacer and ActionSeparator(not yet used) to the content of the toolbar (ordered)
|
|
142
|
-
_add(this, this._oTitleSeparator);
|
|
143
|
-
_add(this, this._oSpacer);
|
|
144
|
-
|
|
145
131
|
this.setUseAsHeader(true);
|
|
146
|
-
|
|
132
|
+
|
|
133
|
+
Engine.getInstance().registerAdaptation(this, {
|
|
134
|
+
controller: {
|
|
135
|
+
actionsKey: ActionToolbarController
|
|
136
|
+
}
|
|
137
|
+
});
|
|
147
138
|
};
|
|
148
139
|
|
|
149
140
|
ActionToolbar.prototype.exit = function() {
|
|
150
|
-
this
|
|
151
|
-
this.
|
|
152
|
-
|
|
153
|
-
_destroy(this);
|
|
154
|
-
|
|
155
|
-
if (OverflowToolbar.prototype.exit) {
|
|
156
|
-
OverflowToolbar.prototype.exit.apply(this, arguments);
|
|
141
|
+
OverflowToolbar.prototype.exit.apply(this, arguments);
|
|
142
|
+
if (this._oBeginSeparator) {
|
|
143
|
+
this._oBeginSeparator.destroy();
|
|
157
144
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
ActionToolbar.prototype._getState = function(sAggregationName) {
|
|
161
|
-
var iAggregationIndex = _getAggregationIndex(this, sAggregationName);
|
|
162
|
-
if (iAggregationIndex >= 0) {
|
|
163
|
-
return {
|
|
164
|
-
aggregationIndex: iAggregationIndex,
|
|
165
|
-
separatorIndex: [
|
|
166
|
-
this.indexOfContent(this._oTitleSeparator), this.indexOfContent(this._oSpacer)
|
|
167
|
-
]
|
|
168
|
-
};
|
|
145
|
+
if (this._oEndActionsBeginSeparator) {
|
|
146
|
+
this._oEndActionsBeginSeparator.destroy();
|
|
169
147
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// According to visual designs currently no separator between actions and end content, only title separator is handled below
|
|
174
|
-
/* Begin Title Separator handling */
|
|
175
|
-
ActionToolbar.prototype.onAfterRendering = function() {
|
|
176
|
-
OverflowToolbar.prototype.onAfterRendering.apply(this, arguments);
|
|
177
|
-
this._updateSeparator();
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
ActionToolbar.prototype._onContentPropertyChangedOverflowToolbar = function(oEvent) {
|
|
181
|
-
if (this._bIsBeingDestroyed) {
|
|
182
|
-
return;
|
|
148
|
+
if (this._oEndActionsEndSeparator) {
|
|
149
|
+
this._oEndActionsEndSeparator.destroy();
|
|
183
150
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this._updateSeparator();
|
|
151
|
+
if (this._oSpacer) {
|
|
152
|
+
this._oSpacer.destroy();
|
|
187
153
|
}
|
|
188
154
|
};
|
|
189
155
|
|
|
190
|
-
ActionToolbar.prototype.
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
return aArray ? aArray.some(function(oCtr) {
|
|
194
|
-
// visible="true" and does not have "0px" width
|
|
195
|
-
var bHasWidth = oCtr.getWidth ? oCtr.getWidth() !== "0px" : true;
|
|
196
|
-
return oCtr.getVisible() && bHasWidth;
|
|
197
|
-
}) : false;
|
|
198
|
-
};
|
|
199
|
-
var bHasBegin = fHasVisible(this.getBegin());
|
|
200
|
-
var bHasBetween = fHasVisible(this.getBetween());
|
|
201
|
-
this._oTitleSeparator.setVisible(bHasBegin && bHasBetween);
|
|
156
|
+
ActionToolbar.prototype.addAggregation = function(sAggregationName, oControl) {
|
|
157
|
+
if (sAggregationName === "content") {
|
|
158
|
+
throw new Error("Mutator functions of the content aggregation of the ActionToolbar '" + this.getId() + "' must not be used.");
|
|
202
159
|
}
|
|
203
|
-
};
|
|
204
|
-
/* End Separator handling */
|
|
205
160
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
};
|
|
161
|
+
var aArguments = arguments;
|
|
162
|
+
if (aAggregations.includes(sAggregationName)) {
|
|
163
|
+
this._registerControlListener(oControl);
|
|
164
|
+
this._resetAndInvalidateToolbar(false);
|
|
211
165
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
return this._aActions.indexOf(oObject);
|
|
215
|
-
}
|
|
216
|
-
var oInfo = this._getState(sAggregationName);
|
|
217
|
-
if (oInfo) {
|
|
218
|
-
var iIdx = this.indexOfContent(oObject);
|
|
219
|
-
if (iIdx < 0) {
|
|
220
|
-
return -1;
|
|
221
|
-
}
|
|
222
|
-
var iPrevSepIdx = oInfo.aggregationIndex == 0 ? -1 : oInfo.separatorIndex[oInfo.aggregationIndex - 1];
|
|
223
|
-
var iNextSepIdx = oInfo.aggregationIndex == 2 ? this.getContent().length : oInfo.separatorIndex[oInfo.aggregationIndex];
|
|
224
|
-
if (iIdx < iPrevSepIdx || iIdx > iNextSepIdx) {
|
|
225
|
-
return -1;
|
|
166
|
+
if (oControl) {
|
|
167
|
+
this._moveControlInSuitableCollection(oControl, this._getControlPriority(oControl));
|
|
226
168
|
}
|
|
227
|
-
return iIdx - iPrevSepIdx - 1;
|
|
228
|
-
}
|
|
229
|
-
return OverflowToolbar.prototype.indexOfAggregation.apply(this, arguments);
|
|
230
|
-
};
|
|
231
169
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
170
|
+
this._informNewFlexibleContentAdded(oControl);
|
|
171
|
+
|
|
172
|
+
var vContent = this._callToolbarMethod("addAggregation", aArguments);
|
|
173
|
+
this._updateSeparators();
|
|
235
174
|
|
|
236
|
-
|
|
237
|
-
var oInfo = this._getState(sAggregationName);
|
|
238
|
-
if (oInfo) {
|
|
239
|
-
var aContent = this.getContent();
|
|
240
|
-
return aContent.slice(oInfo.aggregationIndex === 0 ? 0 : (oInfo.separatorIndex[oInfo.aggregationIndex - 1] + 1), oInfo.aggregationIndex >= oInfo.separatorIndex.length ? aContent.length : oInfo.separatorIndex[oInfo.aggregationIndex]);
|
|
175
|
+
return vContent;
|
|
241
176
|
}
|
|
242
|
-
return OverflowToolbar.prototype.getAggregation.apply(this, arguments);
|
|
243
|
-
};
|
|
244
177
|
|
|
245
|
-
|
|
246
|
-
return this._aActions;
|
|
178
|
+
return OverflowToolbar.prototype.addAggregation.apply(this, arguments);
|
|
247
179
|
};
|
|
248
180
|
|
|
249
|
-
ActionToolbar.prototype.
|
|
250
|
-
if (sAggregationName === "
|
|
251
|
-
|
|
252
|
-
return this._addAction(oObject);
|
|
253
|
-
}
|
|
254
|
-
return this._addAction(new ActionToolbarAction({
|
|
255
|
-
action: oObject
|
|
256
|
-
}));
|
|
181
|
+
ActionToolbar.prototype.destroyAggregation = function(sAggregationName) {
|
|
182
|
+
if (sAggregationName === "content") {
|
|
183
|
+
throw new Error("Mutator functions of the content aggregation of the ActionToolbar '" + this.getId() + "' must not be used.");
|
|
257
184
|
}
|
|
258
|
-
|
|
259
|
-
if (
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
var iIdx = this.indexOfContent(oObject);
|
|
264
|
-
if (iIdx >= 0) {
|
|
265
|
-
_remove(this, oObject);
|
|
266
|
-
this.addAggregation(sAggregationName, oObject);
|
|
267
|
-
} else {
|
|
268
|
-
_insert(this, oObject, oInfo.aggregationIndex >= oInfo.separatorIndex.length ? this.getContent().length : oInfo.separatorIndex[oInfo.aggregationIndex]);
|
|
185
|
+
|
|
186
|
+
if (aAggregations.includes(sAggregationName)) {
|
|
187
|
+
var aContentToDelete = this.removeAllAggregation(sAggregationName);
|
|
188
|
+
for (var i = 0; i < aContentToDelete.length; i++) {
|
|
189
|
+
aContentToDelete[i].destroy();
|
|
269
190
|
}
|
|
270
|
-
this.
|
|
191
|
+
this._updateSeparators();
|
|
192
|
+
|
|
271
193
|
return this;
|
|
272
194
|
}
|
|
273
|
-
|
|
274
|
-
return OverflowToolbar.prototype.
|
|
195
|
+
|
|
196
|
+
return OverflowToolbar.prototype.destroyAggregation.apply(this, arguments);
|
|
275
197
|
};
|
|
276
198
|
|
|
277
|
-
ActionToolbar.prototype.insertAggregation = function(sAggregationName,
|
|
278
|
-
if (sAggregationName === "
|
|
279
|
-
|
|
280
|
-
return this._addAction(oObject);
|
|
281
|
-
}
|
|
282
|
-
return this._addAction(new ActionToolbarAction({
|
|
283
|
-
action: oObject
|
|
284
|
-
}));
|
|
199
|
+
ActionToolbar.prototype.insertAggregation = function(sAggregationName, oControl, iIndex) {
|
|
200
|
+
if (sAggregationName === "content") {
|
|
201
|
+
throw new Error("Mutator functions of the content aggregation of the ActionToolbar '" + this.getId() + "' must not be used.");
|
|
285
202
|
}
|
|
286
|
-
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
iIdx = this.indexOfAggregation(sAggregationName, oObject);
|
|
294
|
-
if (iIdx >= 0 && iIndex > iIdx) {
|
|
295
|
-
iIndex--;
|
|
296
|
-
}
|
|
297
|
-
_remove(this, oObject);
|
|
298
|
-
this.insertAggregation(sAggregationName, oObject, iIndex);
|
|
299
|
-
} else {
|
|
300
|
-
var iLen = this.getAggregation(sAggregationName).length;
|
|
301
|
-
if (iIndex < 0) {
|
|
302
|
-
iIdx = 0;
|
|
303
|
-
} else if (iIndex > iLen) {
|
|
304
|
-
iIdx = iLen;
|
|
305
|
-
} else {
|
|
306
|
-
iIdx = iIndex;
|
|
307
|
-
}
|
|
308
|
-
var iPrevSepIdx = oInfo.aggregationIndex == 0 ? -1 : oInfo.separatorIndex[oInfo.aggregationIndex - 1];
|
|
309
|
-
_insert(this, oObject, iIdx + iPrevSepIdx + 1);
|
|
203
|
+
|
|
204
|
+
if (aAggregations.includes(sAggregationName)) {
|
|
205
|
+
this._registerControlListener(oControl);
|
|
206
|
+
this._resetAndInvalidateToolbar(false);
|
|
207
|
+
|
|
208
|
+
if (oControl) {
|
|
209
|
+
this._moveControlInSuitableCollection(oControl, this._getControlPriority(oControl));
|
|
310
210
|
}
|
|
311
|
-
|
|
312
|
-
|
|
211
|
+
|
|
212
|
+
this._informNewFlexibleContentAdded(oControl);
|
|
213
|
+
|
|
214
|
+
var vContent = this._callToolbarMethod("insertAggregation", arguments);
|
|
215
|
+
this._updateSeparators();
|
|
216
|
+
|
|
217
|
+
return vContent;
|
|
313
218
|
}
|
|
314
|
-
|
|
219
|
+
|
|
315
220
|
return OverflowToolbar.prototype.insertAggregation.apply(this, arguments);
|
|
316
221
|
};
|
|
317
222
|
|
|
318
|
-
ActionToolbar.prototype.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
var aAggregation = this.getAggregation(sAggregationName);
|
|
322
|
-
var aActionsInAggregation;
|
|
323
|
-
var oLastAddedAction;
|
|
324
|
-
var iActionIndex = 0;
|
|
325
|
-
|
|
326
|
-
if (sAlignment === ActionToolbarActionAlignment.End) {
|
|
327
|
-
if (oActionToolbarAction.getVisible() && !this._aggregationContainsActionSeparatorBefore(sAggregationName)) {
|
|
328
|
-
this.addAggregation(sAggregationName, oActionToolbarAction.getSeparatorBefore());
|
|
329
|
-
}
|
|
330
|
-
this.addAggregation(sAggregationName, oActionToolbarAction);
|
|
331
|
-
if (!this._aActions.includes(oActionToolbarAction)) {
|
|
332
|
-
this._aActions.push(oActionToolbarAction);
|
|
333
|
-
}
|
|
334
|
-
} else if (sAlignment === ActionToolbarActionAlignment.Begin && aAggregation[0] !== oActionToolbarAction) {
|
|
335
|
-
aActionsInAggregation = this._getActionsInAggregationWithAlignment(sAggregationName, sAlignment);
|
|
336
|
-
if (aActionsInAggregation.length) {
|
|
337
|
-
oLastAddedAction = aActionsInAggregation[aActionsInAggregation.length - 1];
|
|
338
|
-
iActionIndex = this.indexOfAggregation(sAggregationName, oLastAddedAction) + 1;
|
|
339
|
-
}
|
|
340
|
-
this.insertAggregation(sAggregationName, oActionToolbarAction, iActionIndex);
|
|
341
|
-
|
|
342
|
-
if (oActionToolbarAction.getVisible() && !this._aggregationContainsActionSeparatorAfter(sAggregationName)) {
|
|
343
|
-
this.insertAggregation(sAggregationName, oActionToolbarAction.getSeparatorAfter(), iActionIndex + 1);
|
|
344
|
-
}
|
|
345
|
-
if (!this._aActions.includes(oActionToolbarAction)) {
|
|
346
|
-
this._aActions.push(oActionToolbarAction);
|
|
347
|
-
}
|
|
223
|
+
ActionToolbar.prototype.removeAllAggregation = function(sAggregationName) {
|
|
224
|
+
if (sAggregationName === "content") {
|
|
225
|
+
throw new Error("Mutator functions of the content aggregation of the ActionToolbar '" + this.getId() + "' must not be used.");
|
|
348
226
|
}
|
|
349
|
-
|
|
350
|
-
return this;
|
|
227
|
+
|
|
228
|
+
return OverflowToolbar.prototype.removeAllAggregation.apply(this, arguments);
|
|
351
229
|
};
|
|
352
230
|
|
|
353
|
-
ActionToolbar.prototype.
|
|
354
|
-
|
|
231
|
+
ActionToolbar.prototype.removeAggregation = function(sAggregationName, vObject) {
|
|
232
|
+
if (sAggregationName === "content") {
|
|
233
|
+
throw new Error("Mutator functions of the content aggregation of the ActionToolbar '" + this.getId() + "' must not be used.");
|
|
234
|
+
}
|
|
355
235
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
236
|
+
if (aAggregations.includes(sAggregationName)) {
|
|
237
|
+
var vContent = this._callToolbarMethod("removeAggregation", arguments);
|
|
238
|
+
if (vContent) {
|
|
239
|
+
this._getPopover().removeAssociatedContent(vContent.getId());
|
|
240
|
+
}
|
|
241
|
+
this._resetAndInvalidateToolbar(false);
|
|
360
242
|
|
|
361
|
-
|
|
362
|
-
|
|
243
|
+
this._deregisterControlListener(vContent);
|
|
244
|
+
this._removeContentFromControlsCollections(vContent);
|
|
245
|
+
this._updateSeparators();
|
|
246
|
+
|
|
247
|
+
return vContent;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return OverflowToolbar.prototype.removeAggregation.apply(this, arguments);
|
|
363
251
|
};
|
|
364
252
|
|
|
365
|
-
ActionToolbar.prototype.
|
|
366
|
-
|
|
253
|
+
ActionToolbar.prototype.setUseAsHeader = function(bHeader) {
|
|
254
|
+
this.setProperty("useAsHeader", bHeader, true);
|
|
255
|
+
this.toggleStyleClass("sapMTBHeader-CTX", !!bHeader);
|
|
256
|
+
return this;
|
|
367
257
|
};
|
|
368
258
|
|
|
369
|
-
ActionToolbar.prototype.
|
|
370
|
-
return this.
|
|
371
|
-
|
|
259
|
+
ActionToolbar.prototype.getEndActionsBegin = function() {
|
|
260
|
+
return this.getActionsWithLayoutInformation({
|
|
261
|
+
aggregationName: "end",
|
|
262
|
+
alignment: ActionToolbarActionAlignment.Begin
|
|
372
263
|
});
|
|
373
264
|
};
|
|
374
265
|
|
|
375
|
-
ActionToolbar.prototype.
|
|
376
|
-
return this.
|
|
377
|
-
|
|
266
|
+
ActionToolbar.prototype.getEndActionsEnd = function() {
|
|
267
|
+
return this.getActionsWithLayoutInformation({
|
|
268
|
+
aggregationName: "end",
|
|
269
|
+
alignment: ActionToolbarActionAlignment.End
|
|
378
270
|
});
|
|
379
271
|
};
|
|
380
272
|
|
|
381
|
-
ActionToolbar.prototype.
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
273
|
+
ActionToolbar.prototype.getActionsWithLayoutInformation = function(oLayoutInformation) {
|
|
274
|
+
return this.getActions().filter(function(oActionToolbarAction) {
|
|
275
|
+
var oActionLayoutInformation = oActionToolbarAction.getLayoutInformation();
|
|
276
|
+
return oActionLayoutInformation.aggregationName === oLayoutInformation.aggregationName && oActionLayoutInformation.alignment === oLayoutInformation.alignment;
|
|
277
|
+
});
|
|
386
278
|
};
|
|
387
279
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
_checkModifyContent(this, sAggregationName);
|
|
395
|
-
return OverflowToolbar.prototype.removeAggregation.apply(this, arguments);
|
|
280
|
+
// According to visual designs currently no separator between actions and end content, only title separator is handled below
|
|
281
|
+
/* Begin Title Separator handling */
|
|
282
|
+
ActionToolbar.prototype.onAfterRendering = function() {
|
|
283
|
+
OverflowToolbar.prototype.onAfterRendering.apply(this, arguments);
|
|
284
|
+
this._updateSeparators();
|
|
396
285
|
};
|
|
397
286
|
|
|
398
|
-
ActionToolbar.prototype.
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
var aActionsInAggregation;
|
|
402
|
-
var oActionInAggregation;
|
|
403
|
-
var oRemoved;
|
|
404
|
-
var iSeparatorIndex;
|
|
405
|
-
|
|
406
|
-
var iIndex = this._aActions.indexOf(oActionToolbarAction);
|
|
407
|
-
if (iIndex > -1) {
|
|
408
|
-
this._aActions.splice(iIndex, 1);
|
|
287
|
+
ActionToolbar.prototype._onContentPropertyChangedOverflowToolbar = function(oEvent) {
|
|
288
|
+
if (this._bIsBeingDestroyed) {
|
|
289
|
+
return;
|
|
409
290
|
}
|
|
291
|
+
OverflowToolbar.prototype._onContentPropertyChangedOverflowToolbar.apply(this, arguments);
|
|
292
|
+
if (oEvent.getParameter("name") === "visible" || oEvent.getParameter("name") === "width" && oEvent.getSource() != this._oBeginSeparator) {
|
|
293
|
+
this._updateSeparators();
|
|
294
|
+
}
|
|
295
|
+
};
|
|
410
296
|
|
|
411
|
-
|
|
297
|
+
ActionToolbar.prototype._hasVisible = function(aArray) {
|
|
298
|
+
var aPopoverContent = this.getAggregation("_popover") ? this.getAggregation("_popover")._getAllContent() : [];
|
|
412
299
|
|
|
413
|
-
|
|
414
|
-
return
|
|
300
|
+
var aVisibleContent = aArray.filter(function (oControl) {
|
|
301
|
+
return aPopoverContent.indexOf(oControl) === -1;
|
|
302
|
+
});
|
|
303
|
+
return aVisibleContent.some(function(oControl) {
|
|
304
|
+
// visible="true" and does not have "0px" width
|
|
305
|
+
var bHasWidth = oControl.getWidth ? oControl.getWidth() !== "0px" : true;
|
|
306
|
+
return oControl.getVisible() && bHasWidth;
|
|
415
307
|
});
|
|
416
|
-
if (aActionsInAggregation.length > 0) {
|
|
417
|
-
oActionInAggregation = aActionsInAggregation[0];
|
|
418
|
-
iSeparatorIndex = this.indexOfAggregation(sAggregationName, oActionInAggregation);
|
|
419
|
-
if (sAlignment === ActionToolbarActionAlignment.Begin && oActionToolbarAction.getVisible() && !this._aggregationContainsActionSeparatorAfter(sAggregationName)) {
|
|
420
|
-
iSeparatorIndex = iSeparatorIndex + 1;
|
|
421
|
-
this.insertAggregation(sAggregationName, oActionInAggregation.getSeparatorAfter(), iSeparatorIndex);
|
|
422
|
-
} else if (sAlignment === ActionToolbarActionAlignment.End && oActionToolbarAction.getVisible() && !this._aggregationContainsActionSeparatorBefore(sAggregationName)) {
|
|
423
|
-
this.insertAggregation(sAggregationName, oActionInAggregation.getSeparatorBefore(), iSeparatorIndex);
|
|
424
|
-
}
|
|
425
|
-
oActionInAggregation.updateSeparators();
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
return oRemoved;
|
|
429
308
|
};
|
|
430
309
|
|
|
431
|
-
ActionToolbar.prototype.
|
|
432
|
-
|
|
433
|
-
|
|
310
|
+
ActionToolbar.prototype._updateSeparators = function() {
|
|
311
|
+
var bHasEnd = this._hasVisible(this.getEnd());
|
|
312
|
+
|
|
313
|
+
if (this._oBeginSeparator) {
|
|
314
|
+
var bHasBegin = this._hasVisible(this.getBegin());
|
|
315
|
+
var bHasBetween = this._hasVisible(this.getBetween());
|
|
316
|
+
this._oBeginSeparator.setVisible(bHasBegin && bHasBetween);
|
|
434
317
|
}
|
|
435
|
-
if (
|
|
436
|
-
var
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
this.
|
|
441
|
-
|
|
318
|
+
if (this._oEndActionsBeginSeparator) {
|
|
319
|
+
var bHasEndActionsBegin = this._hasVisible(this.getEndActionsBegin());
|
|
320
|
+
this._oEndActionsBeginSeparator.setVisible(bHasEnd && bHasEndActionsBegin);
|
|
321
|
+
}
|
|
322
|
+
if (this._oEndActionsEndSeparator) {
|
|
323
|
+
var bHasEndActionsEnd = this._hasVisible(this.getEndActionsEnd());
|
|
324
|
+
this._oEndActionsEndSeparator.setVisible(bHasEnd && bHasEndActionsEnd);
|
|
442
325
|
}
|
|
443
|
-
_checkModifyContent(this, sAggregationName);
|
|
444
|
-
return OverflowToolbar.prototype.removeAllAggregation.apply(this, arguments);
|
|
445
326
|
};
|
|
446
327
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
return aRemovedContent;
|
|
328
|
+
/*
|
|
329
|
+
* Overwrite generated functions to use internal array to look for aggregation
|
|
330
|
+
*/
|
|
331
|
+
ActionToolbar.prototype.indexOfContent = function(oObject) {
|
|
332
|
+
return this.getContent().indexOf(oObject);
|
|
453
333
|
};
|
|
454
334
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
335
|
+
// Overwrite content aggregation functions
|
|
336
|
+
ActionToolbar.prototype.getContent = function() {
|
|
337
|
+
var aContent = this.getBegin();
|
|
338
|
+
aContent.push(this._oBeginSeparator);
|
|
339
|
+
aContent = aContent.concat(this.getBetween());
|
|
340
|
+
aContent.push(this._oSpacer);
|
|
341
|
+
aContent = aContent.concat(this.getEndActionsBegin());
|
|
342
|
+
aContent.push(this._oEndActionsBeginSeparator);
|
|
343
|
+
aContent = aContent.concat(this.getEnd());
|
|
344
|
+
aContent.push(this._oEndActionsEndSeparator);
|
|
345
|
+
aContent = aContent.concat(this.getEndActionsEnd());
|
|
346
|
+
|
|
347
|
+
return aContent;
|
|
466
348
|
};
|
|
467
349
|
|
|
468
|
-
ActionToolbar.prototype.
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
}
|
|
479
|
-
var res = OverflowToolbar.prototype.propagateProperties.apply(this, arguments);
|
|
480
|
-
for (iIndex = 0; iIndex < aContent.length; iIndex++) {
|
|
481
|
-
if (aContent[iIndex].__aAPIParentInfos) {
|
|
482
|
-
aContent[iIndex].aAPIParentInfos = aContent[iIndex].__aAPIParentInfos;
|
|
483
|
-
aContent[iIndex].__aAPIParentInfos = null;
|
|
350
|
+
ActionToolbar.prototype.getCurrentState = function() {
|
|
351
|
+
var aActions = [], sId;
|
|
352
|
+
|
|
353
|
+
this.getActions().forEach(function(oAction, iIndex) {
|
|
354
|
+
sId = oAction && oAction.getId();
|
|
355
|
+
if (oAction.getVisible()){
|
|
356
|
+
aActions.push({
|
|
357
|
+
name: sId,
|
|
358
|
+
alignment: oAction.getLayoutInformation().alignment
|
|
359
|
+
});
|
|
484
360
|
}
|
|
485
|
-
}
|
|
486
|
-
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
return {
|
|
364
|
+
items: aActions
|
|
365
|
+
};
|
|
487
366
|
};
|
|
488
367
|
|
|
489
|
-
|
|
368
|
+
ActionToolbar.prototype.initPropertyHelper = function() {
|
|
369
|
+
return Promise.resolve({
|
|
370
|
+
getProperties: function() {
|
|
371
|
+
|
|
372
|
+
var aItems = [];
|
|
373
|
+
this.getActions().forEach(function(oAction){
|
|
374
|
+
aItems.push({
|
|
375
|
+
name: oAction.getId(),
|
|
376
|
+
alignment: oAction.getLayoutInformation().alignment,
|
|
377
|
+
getName: function() {
|
|
378
|
+
return oAction.getId();
|
|
379
|
+
},
|
|
380
|
+
getLabel: function() {
|
|
381
|
+
return oAction.getLabel();
|
|
382
|
+
},
|
|
383
|
+
visible: true
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
return aItems;
|
|
388
|
+
}.bind(this)
|
|
389
|
+
});
|
|
390
|
+
};
|
|
490
391
|
|
|
491
|
-
|
|
392
|
+
return ActionToolbar;
|
|
393
|
+
});
|