@openui5/sap.ui.mdc 1.96.5 → 1.99.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 +26 -31
- package/THIRDPARTY.txt +15 -21
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +7 -9
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -2
- package/src/sap/ui/mdc/BaseDelegate.js +1 -1
- package/src/sap/ui/mdc/Chart.js +1100 -1796
- package/src/sap/ui/mdc/ChartDelegate.js +429 -270
- package/src/sap/ui/mdc/ChartRenderer.js +73 -77
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +3 -2
- package/src/sap/ui/mdc/FilterBar.js +3 -2
- package/src/sap/ui/mdc/FilterField.js +25 -8
- package/src/sap/ui/mdc/Link.js +23 -4
- package/src/sap/ui/mdc/LinkDelegate.js +3 -3
- package/src/sap/ui/mdc/MultiValueField.js +21 -6
- package/src/sap/ui/mdc/Table.js +204 -161
- package/src/sap/ui/mdc/TableDelegate.js +47 -17
- package/src/sap/ui/mdc/ValueHelp.js +51 -15
- package/src/sap/ui/mdc/ValueHelpDelegate.js +20 -0
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +2 -2
- package/src/sap/ui/mdc/{chartNew/ChartSelectionDetailsNew.js → chart/ChartSelectionDetails.js} +8 -8
- package/src/sap/ui/mdc/{chartNew/ChartToolbarNew.js → chart/ChartToolbar.js} +49 -13
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +55 -54
- package/src/sap/ui/mdc/{chartNew/DrillBreadcrumbsNew.js → chart/DrillBreadcrumbs.js} +3 -3
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +38 -249
- package/src/sap/ui/mdc/chart/Item.js +62 -92
- package/src/sap/ui/mdc/{chartNew/PropertyHelperNew.js → chart/PropertyHelper.js} +3 -3
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +17 -21
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- 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 +261 -44
- package/src/sap/ui/mdc/condition/Operator.js +9 -9
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +437 -0
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +80 -5
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +97 -0
- package/src/sap/ui/mdc/designtime/field/FieldBase.designtime.js +104 -0
- package/src/sap/ui/mdc/designtime/field/FilterField.designtime.js +22 -0
- package/src/sap/ui/mdc/designtime/field/MultiValueField.designtime.js +23 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +60 -20
- 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 +9 -9
- package/src/sap/ui/mdc/field/ConditionsType.js +7 -7
- 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 +75 -27
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +311 -0
- package/src/sap/ui/mdc/field/FieldBase.js +85 -52
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +0 -3
- package/src/sap/ui/mdc/field/FieldHelpBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -10
- 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 -7
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +20 -0
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +7 -3
- 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 +10 -2
- 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/TokenDisplay.js +70 -0
- package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +24 -0
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +80 -0
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +69 -0
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +2 -1
- package/src/sap/ui/mdc/field/content/BooleanContent.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +28 -26
- package/src/sap/ui/mdc/field/content/DateContent.js +128 -2
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +9 -1
- package/src/sap/ui/mdc/field/content/DefaultContent.js +36 -14
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -1
- package/src/sap/ui/mdc/field/content/TimeContent.js +8 -1
- package/src/sap/ui/mdc/field/content/UnitContent.js +23 -4
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +359 -142
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +8 -2
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +3 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +7 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +6 -4
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +4 -3
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +9 -3
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +110 -0
- package/src/sap/ui/mdc/flexibility/SortFlex.js +2 -2
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +6 -6
- package/src/sap/ui/mdc/library.js +62 -43
- 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 +2 -2
- 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/Log.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +140 -177
- 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/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 +68 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +47 -6
- package/src/sap/ui/mdc/messagebundle_bg.properties +61 -20
- package/src/sap/ui/mdc/messagebundle_ca.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_cs.properties +60 -19
- package/src/sap/ui/mdc/messagebundle_cy.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_da.properties +52 -11
- package/src/sap/ui/mdc/messagebundle_de.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_el.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_en.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +51 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +51 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +59 -18
- package/src/sap/ui/mdc/messagebundle_et.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_fi.properties +51 -10
- package/src/sap/ui/mdc/messagebundle_fr.properties +50 -9
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_hi.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_hr.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_hu.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +61 -20
- package/src/sap/ui/mdc/messagebundle_iw.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_ja.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_kk.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_ko.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_lt.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_lv.properties +49 -8
- package/src/sap/ui/mdc/messagebundle_ms.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_nl.properties +49 -8
- package/src/sap/ui/mdc/messagebundle_no.properties +53 -12
- package/src/sap/ui/mdc/messagebundle_pl.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_pt.properties +52 -11
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_ro.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_ru.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sh.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sk.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_sv.properties +47 -6
- package/src/sap/ui/mdc/messagebundle_th.properties +48 -7
- package/src/sap/ui/mdc/messagebundle_tr.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_uk.properties +49 -8
- package/src/sap/ui/mdc/messagebundle_vi.properties +45 -4
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +46 -5
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +45 -4
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +19 -5
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +16 -11
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +2 -3
- package/src/sap/ui/mdc/odata/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +29 -483
- package/src/sap/ui/mdc/odata/v4/{ChartPropertyHelperNew.js → ChartPropertyHelper.js} +5 -5
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +160 -116
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/{ChartDelegateNew.js → ChartDelegate.js} +215 -116
- package/src/sap/ui/mdc/p13n/Engine.js +61 -20
- package/src/sap/ui/mdc/p13n/FlexUtil.js +11 -118
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +8 -8
- package/src/sap/ui/mdc/p13n/PersistenceProvider.js +21 -10
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +40 -6
- package/src/sap/ui/mdc/p13n/UIManager.js +15 -12
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +4 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +9 -6
- package/src/sap/ui/mdc/p13n/{DefaultProviderRegistry.js → modules/DefaultProviderRegistry.js} +2 -2
- package/src/sap/ui/mdc/p13n/modules/StateHandlerRegistry.js +86 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +19 -3
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1092 -48
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +72 -0
- package/src/sap/ui/mdc/p13n/panels/ListView.js +6 -2
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +156 -11
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +15 -26
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +14 -7
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +173 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +10 -17
- package/src/sap/ui/mdc/table/Column.js +35 -10
- package/src/sap/ui/mdc/table/CreationRow.js +14 -13
- package/src/sap/ui/mdc/table/GridTableType.js +13 -13
- package/src/sap/ui/mdc/table/PropertyHelper.js +64 -27
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +26 -29
- package/src/sap/ui/mdc/table/RowSettings.js +7 -5
- package/src/sap/ui/mdc/table/TableTypeBase.js +6 -6
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +15 -71
- package/src/sap/ui/mdc/themes/base/Chart.less +3 -0
- package/src/sap/ui/mdc/themes/base/FieldBase.less +0 -5
- package/src/sap/ui/mdc/themes/base/TokenDisplay.less +89 -0
- package/src/sap/ui/mdc/themes/base/TokenizerDisplay.less +90 -0
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +15 -4
- package/src/sap/ui/mdc/themes/base/library.source.less +3 -0
- 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 +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +1 -1
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/FormatUtil.js +3 -3
- package/src/sap/ui/mdc/util/IdentifierUtil.js +6 -6
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +148 -325
- package/src/sap/ui/mdc/util/TypeUtil.js +5 -4
- package/src/sap/ui/mdc/valuehelp/Dialog.js +12 -8
- package/src/sap/ui/mdc/valuehelp/Popover.js +14 -2
- package/src/sap/ui/mdc/valuehelp/base/Container.js +33 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +36 -5
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +43 -15
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +2 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +28 -32
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -5
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +50 -10
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +57 -26
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -1
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsBase.js +3 -3
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ActionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsBase.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/AssertionsViz.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/{chartNew → chart}/ChartNew.js +0 -0
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +289 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +7 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +9 -9
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +12 -11
- package/test/sap/ui/mdc/testutils/opa/link/Actions.js +85 -0
- package/test/sap/ui/mdc/testutils/opa/link/Assertions.js +79 -0
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +112 -0
- package/test/sap/ui/mdc/testutils/opa/link/waitForLink.js +50 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +362 -233
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +27 -26
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Actions.js +54 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Assertions.js +5 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +40 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/Util.js +28 -0
- package/src/sap/ui/mdc/ChartDelegateNew.js +0 -395
- package/src/sap/ui/mdc/ChartNew.js +0 -1114
- package/src/sap/ui/mdc/ChartNewRenderer.js +0 -91
- package/src/sap/ui/mdc/chart/DimensionItem.js +0 -281
- package/src/sap/ui/mdc/chart/MeasureItem.js +0 -318
- package/src/sap/ui/mdc/chart/MetadataDelegate.js +0 -31
- package/src/sap/ui/mdc/chart/SelectionHandler.js +0 -127
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +0 -328
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +0 -295
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +0 -212
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -72
- package/src/sap/ui/mdc/chartNew/SelectionDetailsActionsNew.js +0 -34
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +0 -91
- package/src/sap/ui/mdc/link/SelectionDialog.control.xml +0 -66
- package/src/sap/ui/mdc/link/SelectionDialog.js +0 -213
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +0 -86
- package/src/sap/ui/mdc/odata/v4/ChartDelegateNew.js +0 -35
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +0 -1171
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +0 -111
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +0 -322
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +0 -133
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +0 -203
|
@@ -14,9 +14,10 @@ sap.ui.define([
|
|
|
14
14
|
"sap/ui/core/library",
|
|
15
15
|
"sap/ui/mdc/p13n/StateUtil",
|
|
16
16
|
"sap/ui/core/Element",
|
|
17
|
-
"sap/ui/mdc/p13n/DefaultProviderRegistry",
|
|
18
|
-
"sap/ui/mdc/p13n/UIManager"
|
|
19
|
-
|
|
17
|
+
"sap/ui/mdc/p13n/modules/DefaultProviderRegistry",
|
|
18
|
+
"sap/ui/mdc/p13n/UIManager",
|
|
19
|
+
"sap/ui/mdc/p13n/modules/StateHandlerRegistry"
|
|
20
|
+
], function (AdaptationProvider, merge, Log, PropertyHelper, FlexModificationHandler, MessageStrip, coreLibrary, StateUtil, Element, DefaultProviderRegistry, UIManager, StateHandlerRegistry) {
|
|
20
21
|
"use strict";
|
|
21
22
|
|
|
22
23
|
var ERROR_INSTANCING = "Engine: This class is a singleton. Please use the getInstance() method instead.";
|
|
@@ -39,7 +40,7 @@ sap.ui.define([
|
|
|
39
40
|
* @extends sap.ui.base.Object
|
|
40
41
|
*
|
|
41
42
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
43
|
+
* @version 1.99.0
|
|
43
44
|
*
|
|
44
45
|
* @private
|
|
45
46
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -56,12 +57,16 @@ sap.ui.define([
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
this._aRegistry = [];
|
|
60
|
+
this._aStateHandlers = [];
|
|
59
61
|
|
|
60
62
|
//Default Provider Registry to be used for internal PersistenceProvider functionality access
|
|
61
63
|
this.defaultProviderRegistry = DefaultProviderRegistry.getInstance();
|
|
62
64
|
|
|
63
65
|
//UIManager to be used for p13n UI creation
|
|
64
66
|
this.uimanager = UIManager.getInstance(this);
|
|
67
|
+
|
|
68
|
+
//Default state Handler Registry to be used for state event handling
|
|
69
|
+
this.stateHandlerRegistry = StateHandlerRegistry.getInstance();
|
|
65
70
|
}
|
|
66
71
|
});
|
|
67
72
|
|
|
@@ -187,7 +192,7 @@ sap.ui.define([
|
|
|
187
192
|
return this.initAdaptation(vControl, sKey).then(function(){
|
|
188
193
|
|
|
189
194
|
var oController = this.getController(vControl, sKey);
|
|
190
|
-
var
|
|
195
|
+
var mChangeOperations = oController.getChangeOperations();
|
|
191
196
|
|
|
192
197
|
var oRegistryEntry = this._getRegistryEntry(vControl);
|
|
193
198
|
var oCurrentState = oController.getCurrentState();
|
|
@@ -198,9 +203,9 @@ sap.ui.define([
|
|
|
198
203
|
applyAbsolute: bApplyAbsolute,
|
|
199
204
|
changedState: aNewState,
|
|
200
205
|
control: oController.getAdaptationControl(),
|
|
201
|
-
changeOperations:
|
|
206
|
+
changeOperations: mChangeOperations,
|
|
202
207
|
deltaAttributes: ["name"],
|
|
203
|
-
propertyInfo: oRegistryEntry.helper.getProperties().map(function(a){return {name: a.
|
|
208
|
+
propertyInfo: oRegistryEntry.helper.getProperties().map(function(a){return {name: a.name};})
|
|
204
209
|
};
|
|
205
210
|
|
|
206
211
|
//Only execute change calculation in case there is a difference (--> example: press 'Ok' without a difference)
|
|
@@ -230,12 +235,22 @@ sap.ui.define([
|
|
|
230
235
|
|
|
231
236
|
aKeys = aKeys instanceof Array ? aKeys : [aKeys];
|
|
232
237
|
|
|
238
|
+
var aSelectors = [];
|
|
239
|
+
|
|
240
|
+
aKeys.forEach(function(sKey) {
|
|
241
|
+
aSelectors = aSelectors.concat(this.getController(oControl, sKey).getSelectorForReset());
|
|
242
|
+
}.bind(this));
|
|
243
|
+
|
|
233
244
|
var oResetConfig = {
|
|
245
|
+
selectors: aSelectors,
|
|
234
246
|
selector: oControl
|
|
235
247
|
};
|
|
236
248
|
|
|
237
249
|
var oModificationSetting = this._determineModification(oControl);
|
|
238
250
|
return oModificationSetting.handler.reset(oResetConfig, oModificationSetting.payload).then(function(){
|
|
251
|
+
//trigger statehandlerregistry notification
|
|
252
|
+
this.stateHandlerRegistry.fireChange(oControl);
|
|
253
|
+
|
|
239
254
|
//Re-Init housekeeping after update
|
|
240
255
|
return this.initAdaptation(oControl, aKeys).then(function(oPropertyHelper){
|
|
241
256
|
aKeys.forEach(function(sKey){
|
|
@@ -283,7 +298,15 @@ sap.ui.define([
|
|
|
283
298
|
Engine.prototype._processChanges = function(vControl, aChanges) {
|
|
284
299
|
if (aChanges instanceof Array && aChanges.length > 0) {
|
|
285
300
|
var oModificationSetting = this._determineModification(vControl);
|
|
286
|
-
return oModificationSetting.handler.processChanges(aChanges, oModificationSetting.payload)
|
|
301
|
+
return oModificationSetting.handler.processChanges(aChanges, oModificationSetting.payload)
|
|
302
|
+
.then(function(aChanges){
|
|
303
|
+
var oControl = Engine.getControlInstance(vControl);
|
|
304
|
+
this.stateHandlerRegistry.fireChange(oControl);
|
|
305
|
+
if (oControl._onChangeAppliance instanceof Function) {
|
|
306
|
+
oControl._onChangeAppliance.call(oControl);
|
|
307
|
+
}
|
|
308
|
+
return aChanges;
|
|
309
|
+
}.bind(this));
|
|
287
310
|
} else {
|
|
288
311
|
return Promise.resolve([]);
|
|
289
312
|
}
|
|
@@ -306,9 +329,10 @@ sap.ui.define([
|
|
|
306
329
|
var fResolveRTA;
|
|
307
330
|
|
|
308
331
|
//var aVMs = Engine.hasForReference(oControl, "sap.ui.fl.variants.VariantManagement");
|
|
332
|
+
// TODO: clarify if we need this error handling / what to do with the Link if we want to keep it
|
|
309
333
|
var aPVs = Engine.hasForReference(oControl, "sap.ui.mdc.p13n.PersistenceProvider");
|
|
310
334
|
|
|
311
|
-
if (aPVs.length > 0) {
|
|
335
|
+
if (aPVs.length > 0 && !oControl.isA("sap.ui.mdc.link.Panel")) {
|
|
312
336
|
return Promise.reject("Please do not use a PeristenceProvider in RTA.");
|
|
313
337
|
}
|
|
314
338
|
|
|
@@ -319,7 +343,10 @@ sap.ui.define([
|
|
|
319
343
|
fResolveRTA = resolve;
|
|
320
344
|
});
|
|
321
345
|
|
|
322
|
-
oModificationHandler.processChanges =
|
|
346
|
+
oModificationHandler.processChanges = function(aChanges) {
|
|
347
|
+
fResolveRTA(aChanges);
|
|
348
|
+
return Promise.resolve(aChanges);
|
|
349
|
+
};
|
|
323
350
|
|
|
324
351
|
this._setModificationHandler(oControl, oModificationHandler);
|
|
325
352
|
|
|
@@ -329,6 +356,9 @@ sap.ui.define([
|
|
|
329
356
|
oCustomHeader.getContentRight()[0].setVisible(false);
|
|
330
357
|
}
|
|
331
358
|
oContainer.addStyleClass(mPropertyBag.styleClass);
|
|
359
|
+
if (mPropertyBag.fnAfterClose instanceof Function) {
|
|
360
|
+
oContainer.attachAfterClose(mPropertyBag.fnAfterClose);
|
|
361
|
+
}
|
|
332
362
|
});
|
|
333
363
|
|
|
334
364
|
oRTAPromise.then(function(){
|
|
@@ -598,7 +628,8 @@ sap.ui.define([
|
|
|
598
628
|
*
|
|
599
629
|
* @returns {object} The requested UI settings of the control instance and provided keys
|
|
600
630
|
*/
|
|
601
|
-
Engine.prototype.getUISettings = function(vControl,
|
|
631
|
+
Engine.prototype.getUISettings = function(vControl, vKeys) {
|
|
632
|
+
var aKeys = Array.isArray(vKeys) ? vKeys : [vKeys];
|
|
602
633
|
this.verifyController(vControl, aKeys);
|
|
603
634
|
var oPropertyHelper = this._getRegistryEntry(vControl).helper;
|
|
604
635
|
var mUiSettings = {};
|
|
@@ -607,6 +638,8 @@ sap.ui.define([
|
|
|
607
638
|
var oController = this.getController(vControl, sKey);
|
|
608
639
|
var pAdaptationUI = oController.getAdaptationUI(oPropertyHelper);
|
|
609
640
|
//Check faceless controller implementations and skip them
|
|
641
|
+
|
|
642
|
+
//TODO: error handling for non promises
|
|
610
643
|
if (pAdaptationUI instanceof Promise){
|
|
611
644
|
mUiSettings[sKey] = {};
|
|
612
645
|
mUiSettings[sKey] = {
|
|
@@ -777,8 +810,8 @@ sap.ui.define([
|
|
|
777
810
|
* Determines and registeres the ModificationHandler per control instance
|
|
778
811
|
*
|
|
779
812
|
* @private
|
|
780
|
-
* @param {
|
|
781
|
-
* @param {
|
|
813
|
+
* @param {string} sControlId The control id
|
|
814
|
+
* @param {string} sAncestorControlId The control ancestor id
|
|
782
815
|
*
|
|
783
816
|
* @returns {boolean} Returns whether an according ancestor could be found.
|
|
784
817
|
*/
|
|
@@ -954,27 +987,27 @@ sap.ui.define([
|
|
|
954
987
|
* @param {object[]} [aCustomPropertyInfo] A custom set of propertyinfo.
|
|
955
988
|
*
|
|
956
989
|
*/
|
|
957
|
-
Engine.prototype._retrievePropertyHelper = function(vControl, aCustomPropertyInfo){
|
|
990
|
+
Engine.prototype._retrievePropertyHelper = function (vControl, aCustomPropertyInfo) {
|
|
958
991
|
|
|
959
992
|
var oRegistryEntry = this._getRegistryEntry(vControl);
|
|
960
993
|
var oControl = Engine.getControlInstance(vControl);
|
|
961
994
|
|
|
962
995
|
if (aCustomPropertyInfo) {
|
|
963
|
-
if (oRegistryEntry.helper){
|
|
996
|
+
if (oRegistryEntry.helper) {
|
|
964
997
|
oRegistryEntry.helper.destroy();
|
|
965
998
|
}
|
|
966
999
|
oRegistryEntry.helper = new PropertyHelper(aCustomPropertyInfo);
|
|
967
1000
|
return Promise.resolve(oRegistryEntry.helper);
|
|
968
|
-
|
|
1001
|
+
}
|
|
969
1002
|
|
|
970
1003
|
if (oRegistryEntry.helper) {
|
|
971
1004
|
return Promise.resolve(oRegistryEntry.helper);
|
|
972
1005
|
}
|
|
973
1006
|
|
|
974
|
-
return oControl.initPropertyHelper().then(function(oPropertyHelper){
|
|
1007
|
+
return oControl.initPropertyHelper().then(function (oPropertyHelper) {
|
|
975
1008
|
oRegistryEntry.helper = oPropertyHelper;
|
|
976
1009
|
return oPropertyHelper;
|
|
977
|
-
}, function(sHelperError){
|
|
1010
|
+
}, function (sHelperError) {
|
|
978
1011
|
throw new Error(sHelperError);
|
|
979
1012
|
});
|
|
980
1013
|
};
|
|
@@ -998,11 +1031,17 @@ sap.ui.define([
|
|
|
998
1031
|
* This method can be used for debugging to retrieve the complete registry.
|
|
999
1032
|
*/
|
|
1000
1033
|
Engine.prototype._getRegistry = function() {
|
|
1001
|
-
var oRegistry = {
|
|
1034
|
+
var oRegistry = {
|
|
1035
|
+
stateHandlerRegistry: this.stateHandlerRegistry,
|
|
1036
|
+
defaultProviderRegistry: this.defaultProviderRegistry,
|
|
1037
|
+
controlRegistry: {}
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1002
1040
|
this._aRegistry.forEach(function(sKey){
|
|
1003
1041
|
var oControl = sap.ui.getCore().byId(sKey);
|
|
1004
|
-
oRegistry[sKey] = _mRegistry.get(oControl);
|
|
1042
|
+
oRegistry.controlRegistry[sKey] = _mRegistry.get(oControl);
|
|
1005
1043
|
});
|
|
1044
|
+
|
|
1006
1045
|
return oRegistry;
|
|
1007
1046
|
};
|
|
1008
1047
|
|
|
@@ -1017,6 +1056,8 @@ sap.ui.define([
|
|
|
1017
1056
|
_mRegistry.delete(this);
|
|
1018
1057
|
this.defaultProviderRegistry.destroy();
|
|
1019
1058
|
this.defaultProviderRegistry = null;
|
|
1059
|
+
this.stateHandlerRegistry.destroy();
|
|
1060
|
+
this.stateHandlerRegistry = null;
|
|
1020
1061
|
this.uimanager.destroy();
|
|
1021
1062
|
this.uimanager = null;
|
|
1022
1063
|
};
|
|
@@ -10,101 +10,6 @@ sap.ui.define([
|
|
|
10
10
|
|
|
11
11
|
var FlexUtil = {
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Generates a set of changes based on the given arrays for a specified control
|
|
15
|
-
*
|
|
16
|
-
* @public
|
|
17
|
-
*
|
|
18
|
-
* @param {object} mDeltaInfo Map containing the necessary information to calculate the diff as change objects
|
|
19
|
-
* @param {array} mDeltaInfo.existingState An array describing the control state before a adaptation
|
|
20
|
-
* @param {array} mDeltaInfo.changedState An array describing the control state after a certain adaptation
|
|
21
|
-
* @param {object} mDeltaInfo.control Control instance which is being used to generate the changes
|
|
22
|
-
* @param {object} mDeltaInfo.changeOperations Map containing the changeOperations for the given Control instance
|
|
23
|
-
* @param {string} mDeltaInfo.changeOperations.add Name of the control specific 'add' changehandler
|
|
24
|
-
* @param {string} mDeltaInfo.changeOperations.remove Name of the control specific 'remove' changehandler
|
|
25
|
-
* @param {string} [mDeltaInfo.changeOperations.move] Name of the control specific 'move' changehandler
|
|
26
|
-
* @param {string} [mDeltaInfo.generator] Name of the change generator (E.g. the namespace of the UI creating the change object)
|
|
27
|
-
*
|
|
28
|
-
* @returns {array} Array containing the delta based created changes
|
|
29
|
-
*/
|
|
30
|
-
getArrayDeltaChanges: function (mDeltaInfo) {
|
|
31
|
-
|
|
32
|
-
var aExistingArray = mDeltaInfo.existingState;
|
|
33
|
-
var aChangedArray = mDeltaInfo.changedState;
|
|
34
|
-
var oControl = mDeltaInfo.control;
|
|
35
|
-
var sInsertOperation = mDeltaInfo.changeOperations.add;
|
|
36
|
-
var sRemoveOperation = mDeltaInfo.changeOperations.remove;
|
|
37
|
-
var sMoveOperation = mDeltaInfo.changeOperations.move;
|
|
38
|
-
var sGenerator = mDeltaInfo.generator;
|
|
39
|
-
|
|
40
|
-
var aDeltaAttributes = mDeltaInfo.deltaAttributes || [];
|
|
41
|
-
|
|
42
|
-
var fnSymbol = function(o) {
|
|
43
|
-
var sDiff = "";
|
|
44
|
-
aDeltaAttributes.forEach(function(sAttribute){
|
|
45
|
-
sDiff = sDiff + o[sAttribute];
|
|
46
|
-
});
|
|
47
|
-
return sDiff;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var aResults = diff(aExistingArray, aChangedArray, fnSymbol);
|
|
51
|
-
// Function to match field with exising field in the given array
|
|
52
|
-
var fMatch = function (oField, aArray) {
|
|
53
|
-
return aArray.filter(function (oExistingField) {
|
|
54
|
-
return oExistingField && (oExistingField.name === oField.name);
|
|
55
|
-
})[0];
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
var aChanges = [];
|
|
59
|
-
var aProcessedArray = aExistingArray.slice(0);
|
|
60
|
-
|
|
61
|
-
aResults.forEach(function (oResult) {
|
|
62
|
-
// Begin --> hack for handling result returned by diff
|
|
63
|
-
if (oResult.type === "delete" && aProcessedArray[oResult.index] === undefined) {
|
|
64
|
-
aProcessedArray.splice(oResult.index, 1);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var oProp, oExistingProp, iLength;
|
|
69
|
-
if (oResult.type === "insert") {
|
|
70
|
-
oExistingProp = fMatch(aChangedArray[oResult.index], aProcessedArray);
|
|
71
|
-
if (oExistingProp) {
|
|
72
|
-
oExistingProp.index = aProcessedArray.indexOf(oExistingProp);
|
|
73
|
-
aProcessedArray.splice(oExistingProp.index, 1, undefined);
|
|
74
|
-
aChanges.push(FlexUtil.createAddRemoveChange(oControl, sRemoveOperation, FlexUtil._getChangeContent(oExistingProp, aDeltaAttributes), sGenerator));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// End hack
|
|
78
|
-
oProp = oResult.type === "delete" ? aProcessedArray[oResult.index] : aChangedArray[oResult.index];
|
|
79
|
-
oProp.index = oResult.index;
|
|
80
|
-
if (oResult.type === "delete") {
|
|
81
|
-
aProcessedArray.splice(oProp.index, 1);
|
|
82
|
-
} else {
|
|
83
|
-
aProcessedArray.splice(oProp.index, 0, oProp);
|
|
84
|
-
}
|
|
85
|
-
// Move operation shows up as insert followed by delete OR delete followed by insert
|
|
86
|
-
if (sMoveOperation) {
|
|
87
|
-
iLength = aChanges.length;
|
|
88
|
-
// Get the last added change
|
|
89
|
-
if (iLength) {
|
|
90
|
-
oExistingProp = aChanges[iLength - 1];
|
|
91
|
-
oExistingProp = oExistingProp ? oExistingProp.changeSpecificData.content : undefined;
|
|
92
|
-
}
|
|
93
|
-
// Matching property exists with a different index --> then this is a move operation
|
|
94
|
-
if (oExistingProp && oExistingProp.name === oProp.name && oResult.index != oExistingProp.index) {
|
|
95
|
-
// remove the last insert/delete operation
|
|
96
|
-
aChanges.pop();
|
|
97
|
-
aChanges.push(FlexUtil.createMoveChange(oExistingProp.id, oExistingProp.name, oResult.index, sMoveOperation, oControl, sMoveOperation !== "moveSort", sGenerator));
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
aChanges.push(FlexUtil.createAddRemoveChange(oControl, oResult.type === "delete" ? sRemoveOperation : sInsertOperation, FlexUtil._getChangeContent(oProp, aDeltaAttributes), sGenerator));
|
|
103
|
-
|
|
104
|
-
});
|
|
105
|
-
return aChanges;
|
|
106
|
-
},
|
|
107
|
-
|
|
108
13
|
getPropertySetterChanges: function(mDeltaInfo) {
|
|
109
14
|
var oControl = mDeltaInfo.control;
|
|
110
15
|
var aExistingState = mDeltaInfo.existingState;
|
|
@@ -124,7 +29,7 @@ sap.ui.define([
|
|
|
124
29
|
var vNewValue = oItem[sSetAttribute];
|
|
125
30
|
var bValueChanged = vOldValue !== vNewValue;
|
|
126
31
|
if (bValueChanged) {
|
|
127
|
-
aSetterChanges.push(this.
|
|
32
|
+
aSetterChanges.push(this.createChange(oControl, sOperation, {
|
|
128
33
|
name: oItem.name,
|
|
129
34
|
value: oItem[sSetAttribute]
|
|
130
35
|
}));
|
|
@@ -193,7 +98,14 @@ sap.ui.define([
|
|
|
193
98
|
Log.warning("property '" + sFieldPath + "' not supported");
|
|
194
99
|
continue;
|
|
195
100
|
}
|
|
196
|
-
|
|
101
|
+
|
|
102
|
+
var aFilterConditionChanges = FlexUtil._diffConditionPath(sFieldPath, mNewConditionState[sFieldPath], mPreviousConditionState[sFieldPath], oAdaptationControl);
|
|
103
|
+
|
|
104
|
+
if (oAdaptationControl && oAdaptationControl.createPropertyInfoChanges && (aFilterConditionChanges.length > 0)) {
|
|
105
|
+
aFilterConditionChanges = oAdaptationControl.createPropertyInfoChanges(sFieldPath).concat(aFilterConditionChanges);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
aConditionChanges = aConditionChanges.concat(aFilterConditionChanges);
|
|
197
109
|
}
|
|
198
110
|
|
|
199
111
|
return aConditionChanges;
|
|
@@ -274,7 +186,8 @@ sap.ui.define([
|
|
|
274
186
|
|
|
275
187
|
return aChanges;
|
|
276
188
|
},
|
|
277
|
-
|
|
189
|
+
|
|
190
|
+
createChange: function(oControl, sOperation, oContent){
|
|
278
191
|
var oAddRemoveChange = {
|
|
279
192
|
selectorElement: oControl,
|
|
280
193
|
changeSpecificData: {
|
|
@@ -285,26 +198,6 @@ sap.ui.define([
|
|
|
285
198
|
return oAddRemoveChange;
|
|
286
199
|
},
|
|
287
200
|
|
|
288
|
-
createMoveChange: function (sId, sPropertyName, iNewIndex, sMoveOperation, oControl, bPersistId) {
|
|
289
|
-
var oMoveChange = {
|
|
290
|
-
selectorElement: oControl,
|
|
291
|
-
changeSpecificData: {
|
|
292
|
-
changeType: sMoveOperation,
|
|
293
|
-
content: {
|
|
294
|
-
id: sId,
|
|
295
|
-
name: sPropertyName,
|
|
296
|
-
index: iNewIndex
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
if (!bPersistId) {
|
|
302
|
-
delete oMoveChange.changeSpecificData.content.id;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
return oMoveChange;
|
|
306
|
-
},
|
|
307
|
-
|
|
308
201
|
createConditionChange: function(sChangeType, oControl, sFieldPath, oCondition) {
|
|
309
202
|
var oConditionChange = {
|
|
310
203
|
selectorElement: oControl,
|
|
@@ -31,8 +31,8 @@ sap.ui.define([
|
|
|
31
31
|
* @param {object} oP13nUI Control displayed in the content area
|
|
32
32
|
* @param {object} mDialogSettings Settings to overwrite popover default properties, such as: <code>contentHeight</code>
|
|
33
33
|
* @param {object} [mDialogSettings.reset] Reset settings for the custom header creation
|
|
34
|
-
* @param {
|
|
35
|
-
* @param {
|
|
34
|
+
* @param {function} [mDialogSettings.reset.onExecute] Callback executed upon triggering a reset
|
|
35
|
+
* @param {string} [mDialogSettings.reset.warningText] Warning which is displyed prior to executing the reset
|
|
36
36
|
*
|
|
37
37
|
* @returns {Promise} promise resolving in the Popover instance
|
|
38
38
|
*/
|
|
@@ -76,8 +76,8 @@ sap.ui.define([
|
|
|
76
76
|
* @param {object} oP13nUI Control displayed in the content area
|
|
77
77
|
* @param {object} mDialogSettings Settings to overwrite dialog default properties, such as: <code>contentHeight</code>
|
|
78
78
|
* @param {object} [mDialogSettings.reset] Reset settings for the custom header creation
|
|
79
|
-
* @param {
|
|
80
|
-
* @param {
|
|
79
|
+
* @param {function} [mDialogSettings.reset.onExecute] Callback executed upon triggering a reset
|
|
80
|
+
* @param {string} [mDialogSettings.reset.warningText] Warning which is displyed prior to executing the reset
|
|
81
81
|
*
|
|
82
82
|
* @returns {Promise} Promise resolving in the Dialog instance
|
|
83
83
|
*/
|
|
@@ -149,9 +149,9 @@ sap.ui.define([
|
|
|
149
149
|
/**
|
|
150
150
|
*
|
|
151
151
|
* @param {object} mSettings Settings object to create a customHeader including a reset Button
|
|
152
|
-
* @param {
|
|
152
|
+
* @param {string} mSettings.title Title for the custom reset header
|
|
153
153
|
* @param {function} mSettings.reset Control specific reset handling
|
|
154
|
-
* @param {
|
|
154
|
+
* @param {string} [mSettings.warningText] Text which is displayed prior to executing to reset execution
|
|
155
155
|
*
|
|
156
156
|
* @returns {sap.m.Bar} The created custom header Bar
|
|
157
157
|
*/
|
|
@@ -196,7 +196,7 @@ sap.ui.define([
|
|
|
196
196
|
prepareAdaptationData: function(vProperties, fnEnhace, bGroupData) {
|
|
197
197
|
|
|
198
198
|
var oPropertyHelper =
|
|
199
|
-
|
|
199
|
+
vProperties && vProperties.getProperties instanceof Function ?
|
|
200
200
|
vProperties : new P13nPropertyHelper(vProperties);
|
|
201
201
|
|
|
202
202
|
var aItems = [];
|
|
@@ -216,7 +216,7 @@ sap.ui.define([
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
mItem.name = oProperty.name;
|
|
219
|
-
mItem.label = oProperty.
|
|
219
|
+
mItem.label = oProperty.label || oProperty.name;
|
|
220
220
|
mItem.tooltip = oProperty.tooltip;
|
|
221
221
|
|
|
222
222
|
if (mItemsGrouped) {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/ui/core/Control", "sap/ui/fl/variants/VariantManagement", "sap/ui/fl/Utils", "sap/ui/mdc/enum/PersistenceMode"
|
|
8
|
-
], function(CoreControl, VariantManagement, Utils, mode) {
|
|
7
|
+
"sap/ui/core/Control", "sap/ui/fl/variants/VariantManagement", "sap/ui/fl/Utils", "sap/ui/mdc/enum/PersistenceMode", "sap/ui/layout/VerticalLayout"
|
|
8
|
+
], function(CoreControl, VariantManagement, Utils, mode, VerticalLayout) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -78,12 +78,23 @@ sap.ui.define([
|
|
|
78
78
|
this._bmodeLocked = true;
|
|
79
79
|
|
|
80
80
|
if (this.getMode() === mode.Transient) {
|
|
81
|
-
|
|
81
|
+
var oVM = new VariantManagement(this.getId() + "--vm", {"for": this.getAssociation("for")});
|
|
82
82
|
this._oModelPromise.then(function (oModel) {
|
|
83
|
-
|
|
84
|
-
}
|
|
83
|
+
oVM.setModel(oModel, Utils.VARIANT_MODEL_NAME);
|
|
84
|
+
});
|
|
85
|
+
this._oWrapper = new VerticalLayout(this.getId() + "--accWrapper", {
|
|
86
|
+
content: [
|
|
87
|
+
oVM
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
this._oWrapper.onAfterRendering = function() {
|
|
92
|
+
VerticalLayout.prototype.onAfterRendering.apply(this, arguments);
|
|
93
|
+
this.getDomRef().setAttribute("aria-hidden", true);
|
|
94
|
+
};
|
|
95
|
+
|
|
85
96
|
var oStatic = sap.ui.getCore().getUIArea(sap.ui.getCore().getStaticAreaRef());
|
|
86
|
-
oStatic.addContent(this.
|
|
97
|
+
oStatic.addContent(this._oWrapper);
|
|
87
98
|
}
|
|
88
99
|
|
|
89
100
|
return this;
|
|
@@ -109,12 +120,12 @@ sap.ui.define([
|
|
|
109
120
|
};
|
|
110
121
|
|
|
111
122
|
PersistenceProvider.prototype.exit = function () {
|
|
112
|
-
if (this.
|
|
123
|
+
if (this._oWrapper) {
|
|
113
124
|
var oStatic = sap.ui.getCore().getUIArea(sap.ui.getCore().getStaticAreaRef());
|
|
114
|
-
oStatic.removeContent(this.
|
|
125
|
+
oStatic.removeContent(this._oWrapper);
|
|
115
126
|
|
|
116
|
-
this.
|
|
117
|
-
this.
|
|
127
|
+
this._oWrapper.destroy();
|
|
128
|
+
this._oWrapper = null;
|
|
118
129
|
}
|
|
119
130
|
|
|
120
131
|
this._oModelPromise = null;
|
|
@@ -79,6 +79,16 @@ sap.ui.define([
|
|
|
79
79
|
* Country: {
|
|
80
80
|
* aggregated: false
|
|
81
81
|
* }
|
|
82
|
+
* },
|
|
83
|
+
* //The supplementaryConfig can be used to modify control specific attributes, for example the column width in the Table
|
|
84
|
+
* supplementaryConfig: {
|
|
85
|
+
* aggregations: {
|
|
86
|
+
* columns: {
|
|
87
|
+
* Category: {
|
|
88
|
+
* width: "150px"
|
|
89
|
+
* }
|
|
90
|
+
* }
|
|
91
|
+
* }
|
|
82
92
|
* }
|
|
83
93
|
* }
|
|
84
94
|
*
|
|
@@ -108,6 +118,32 @@ sap.ui.define([
|
|
|
108
118
|
});
|
|
109
119
|
},
|
|
110
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Attaches an event handler to the <code>StateUtil</code>.
|
|
123
|
+
* The event handler may be fired every time a user triggers a personalization change for a control instance during runtime.
|
|
124
|
+
*
|
|
125
|
+
* @private
|
|
126
|
+
* @ui5-restricted sap.fe
|
|
127
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
128
|
+
* @param {function} fnListener fnFunction The handler function to call when the event occurs
|
|
129
|
+
*/
|
|
130
|
+
attachStateChange: function(fnListener) {
|
|
131
|
+
sap.ui.mdc.p13n.Engine.getInstance().stateHandlerRegistry.attachChange(fnListener);
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Removes a previously attached state change event handler from the <code>StateUtil</code> class.
|
|
136
|
+
* The passed parameters must match those used for registration with {@link StateUtil#attachChange} beforehand.
|
|
137
|
+
*
|
|
138
|
+
* @private
|
|
139
|
+
* @ui5-restricted sap.fe
|
|
140
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
141
|
+
* @param {function} fnListener fnFunction The handler function to detach from the event
|
|
142
|
+
*/
|
|
143
|
+
detachStateChange: function(fnListener) {
|
|
144
|
+
sap.ui.mdc.p13n.Engine.getInstance().stateHandlerRegistry.detachChange(fnListener);
|
|
145
|
+
},
|
|
146
|
+
|
|
111
147
|
_externalizeKeys: function(oInternalState) {
|
|
112
148
|
var mKeysForState = {
|
|
113
149
|
Sort: "sorters",
|
|
@@ -115,7 +151,8 @@ sap.ui.define([
|
|
|
115
151
|
Aggregate: "aggregations",
|
|
116
152
|
Filter: "filter",
|
|
117
153
|
Item: "items",
|
|
118
|
-
Column: "items"
|
|
154
|
+
Column: "items",
|
|
155
|
+
ColumnWidth: "supplementaryConfig"
|
|
119
156
|
};
|
|
120
157
|
var oTransformedState = {};
|
|
121
158
|
|
|
@@ -124,10 +161,6 @@ sap.ui.define([
|
|
|
124
161
|
var sTransformedKey = sExternalKey || sProvidedEngineKey;//no external key --> provide internal key
|
|
125
162
|
oTransformedState[sTransformedKey] = oInternalState[sProvidedEngineKey];
|
|
126
163
|
});
|
|
127
|
-
//TODO: Remove once the stateUtil for columnWidth is introduced
|
|
128
|
-
if (oTransformedState.ColumnWidth) {
|
|
129
|
-
delete oTransformedState.ColumnWidth;
|
|
130
|
-
}
|
|
131
164
|
return oTransformedState;
|
|
132
165
|
},
|
|
133
166
|
|
|
@@ -137,7 +170,8 @@ sap.ui.define([
|
|
|
137
170
|
groupLevels: ["Group"],
|
|
138
171
|
aggregations: ["Aggregate"],
|
|
139
172
|
filter: ["Filter"],
|
|
140
|
-
items: ["Item", "Column"]
|
|
173
|
+
items: ["Item", "Column"],
|
|
174
|
+
supplementaryConfig: ["ColumnWidth"]
|
|
141
175
|
};
|
|
142
176
|
|
|
143
177
|
var oTransformedState = {};
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/base/Object",
|
|
9
9
|
"sap/ui/mdc/p13n/P13nBuilder",
|
|
10
|
-
"sap/
|
|
10
|
+
"sap/m/p13n/Container",
|
|
11
|
+
"sap/m/p13n/AbstractContainerItem",
|
|
11
12
|
"sap/base/util/UriParameters",
|
|
12
13
|
"sap/base/Log"
|
|
13
|
-
], function (BaseObject, P13nBuilder,
|
|
14
|
+
], function (BaseObject, P13nBuilder, P13nContainer, AbstractContainerItem, SAPUriParameters, Log) {
|
|
14
15
|
"use strict";
|
|
15
16
|
|
|
16
17
|
var ERROR_INSTANCING = "UIManager: This class is a singleton and should not be used without an AdaptationProvider. Please use 'sap.ui.mdc.p13n.Engine.getInstance().uimanager' instead";
|
|
@@ -31,7 +32,7 @@ sap.ui.define([
|
|
|
31
32
|
* @extends sap.ui.base.Object
|
|
32
33
|
*
|
|
33
34
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
35
|
+
* @version 1.99.0
|
|
35
36
|
*
|
|
36
37
|
* @private
|
|
37
38
|
* @ui5-restricted sap.ui.mdc
|
|
@@ -141,7 +142,7 @@ sap.ui.define([
|
|
|
141
142
|
var bWrapperUsed = aKeys.length > 1;
|
|
142
143
|
var oAdaptationUI;
|
|
143
144
|
var oContent = oP13nControl.getContent()[0];
|
|
144
|
-
if (bWrapperUsed && oContent.isA("sap.
|
|
145
|
+
if (bWrapperUsed && oContent.isA("sap.m.p13n.Container") && oContent.getView(sKey)) {
|
|
145
146
|
oAdaptationUI = oContent.getView(sKey).getContent();
|
|
146
147
|
} else {
|
|
147
148
|
oAdaptationUI = oContent;
|
|
@@ -206,11 +207,15 @@ sap.ui.define([
|
|
|
206
207
|
}.bind(this));
|
|
207
208
|
|
|
208
209
|
return Promise.all(aPAdaptationUI).then(function(aUIs){
|
|
209
|
-
var oPopupContent = bUseP13nContainer ? new
|
|
210
|
+
var oPopupContent = bUseP13nContainer ? new P13nContainer() : aUIs[0].panel;
|
|
210
211
|
if (bUseP13nContainer) {
|
|
211
212
|
aUIs.forEach(function(mUI){
|
|
212
213
|
if (mUI.panel) {
|
|
213
|
-
oPopupContent.
|
|
214
|
+
oPopupContent.addView(new AbstractContainerItem({
|
|
215
|
+
key: mUI.key,
|
|
216
|
+
text: mUI.tab,
|
|
217
|
+
content: mUI.panel
|
|
218
|
+
}));
|
|
214
219
|
}
|
|
215
220
|
});
|
|
216
221
|
oPopupContent.switchView(aUIs[0].key);
|
|
@@ -359,7 +364,7 @@ sap.ui.define([
|
|
|
359
364
|
|
|
360
365
|
var mSettings = Object.assign({
|
|
361
366
|
verticalScrolling: true,
|
|
362
|
-
reset: mUISettings.reset,
|
|
367
|
+
reset: mUISettings.reset || {},
|
|
363
368
|
afterClose: function(oEvt) {
|
|
364
369
|
var oDialog = oEvt.getSource();
|
|
365
370
|
if (oDialog) {
|
|
@@ -370,11 +375,9 @@ sap.ui.define([
|
|
|
370
375
|
}, mUISettings.containerSettings);
|
|
371
376
|
|
|
372
377
|
if (mUISettings.resetEnabled){
|
|
373
|
-
mSettings.reset = {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}.bind(this)
|
|
377
|
-
};
|
|
378
|
+
mSettings.reset.onExecute = function() {
|
|
379
|
+
this.oAdaptationProvider.reset(oControl, aKeys);
|
|
380
|
+
}.bind(this);
|
|
378
381
|
}
|
|
379
382
|
|
|
380
383
|
mSettings.confirm = {
|
|
@@ -54,8 +54,11 @@ sap.ui.define([
|
|
|
54
54
|
|
|
55
55
|
FlexModificationHandler.prototype.reset = function(mPropertyBag, oModificationPayload){
|
|
56
56
|
var sPersistenceMode = oModificationPayload.mode;
|
|
57
|
+
|
|
57
58
|
var bIsGlobal = sPersistenceMode === mode.Global;
|
|
58
|
-
|
|
59
|
+
var bIsAutoGlobal = !oModificationPayload.hasVM && oModificationPayload.hasPP && sPersistenceMode === mode.Auto;
|
|
60
|
+
|
|
61
|
+
return (bIsGlobal || bIsAutoGlobal) ? FlexUtil.reset.call(this, mPropertyBag) : FlexUtil.restore.call(this, mPropertyBag);
|
|
59
62
|
};
|
|
60
63
|
|
|
61
64
|
FlexModificationHandler.prototype.isModificationSupported = function(mPropertyBag, oModificationPayload){
|