@openui5/sap.ui.mdc 1.108.2 → 1.110.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 +16 -16
- package/THIRDPARTY.txt +2 -2
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +2 -2
- package/src/sap/ui/mdc/ActionToolbar.js +5 -5
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +1 -1
- package/src/sap/ui/mdc/BaseDelegate.js +1 -1
- package/src/sap/ui/mdc/Chart.js +32 -34
- package/src/sap/ui/mdc/ChartDelegate.js +23 -19
- package/src/sap/ui/mdc/ChartRenderer.js +1 -1
- package/src/sap/ui/mdc/Control.js +2 -2
- package/src/sap/ui/mdc/Delegate.js +1 -1
- package/src/sap/ui/mdc/Element.js +2 -2
- package/src/sap/ui/mdc/Field.js +30 -20
- package/src/sap/ui/mdc/FilterBar.js +13 -8
- package/src/sap/ui/mdc/FilterBarDelegate.js +14 -10
- package/src/sap/ui/mdc/FilterField.js +8 -15
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/LinkDelegate.js +4 -2
- package/src/sap/ui/mdc/MultiValueField.js +2 -2
- package/src/sap/ui/mdc/Table.js +375 -632
- package/src/sap/ui/mdc/TableDelegate.js +34 -7
- package/src/sap/ui/mdc/ValueHelp.js +38 -21
- package/src/sap/ui/mdc/ValueHelpDelegate.js +86 -52
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +86 -65
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +7 -12
- package/src/sap/ui/mdc/chart/ChartImplementationContainer.js +6 -6
- package/src/sap/ui/mdc/chart/ChartImplementationContainerRenderer.js +1 -1
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +3 -3
- package/src/sap/ui/mdc/chart/ChartSettings.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +22 -9
- package/src/sap/ui/mdc/chart/ChartTypeButton.js +22 -20
- package/src/sap/ui/mdc/chart/DrillBreadcrumbs.js +1 -1
- package/src/sap/ui/mdc/chart/DrillStackHandler.js +4 -6
- package/src/sap/ui/mdc/chart/Item.js +1 -1
- package/src/sap/ui/mdc/chart/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +4 -5
- package/src/sap/ui/mdc/condition/ConditionConverter.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionModel.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionModelPropertyBinding.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionValidateException.js +62 -0
- package/src/sap/ui/mdc/condition/FilterConverter.js +8 -4
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +4 -16
- package/src/sap/ui/mdc/condition/Operator.js +2 -2
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +4 -2
- package/src/sap/ui/mdc/condition/RangeOperator.js +2 -2
- package/src/sap/ui/mdc/designtime/Util.js +1 -1
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +2 -2
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbarAction.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +2 -2
- package/src/sap/ui/mdc/designtime/field/Field.designtime.js +3 -4
- package/src/sap/ui/mdc/designtime/field/FieldBase.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/field/FilterField.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/field/MultiValueField.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +2 -2
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/library.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/link/Panel.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/link/PanelItem.designtime.js +7 -6
- package/src/sap/ui/mdc/designtime/p13n/PersistenceProvider.designtime.js +1 -1
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +2 -2
- package/src/sap/ui/mdc/enum/ActionToolbarActionAlignment.js +1 -1
- package/src/sap/ui/mdc/enum/BaseType.js +1 -1
- package/src/sap/ui/mdc/enum/ConditionValidated.js +1 -1
- package/src/sap/ui/mdc/enum/ContentMode.js +1 -1
- package/src/sap/ui/mdc/enum/EditMode.js +1 -1
- package/src/sap/ui/mdc/enum/FieldDisplay.js +1 -1
- package/src/sap/ui/mdc/enum/OutParameterMode.js +1 -1
- package/src/sap/ui/mdc/enum/PersistenceMode.js +1 -1
- package/src/sap/ui/mdc/enum/ProcessingStrategy.js +1 -1
- package/src/sap/ui/mdc/enum/PropagationReason.js +1 -1
- package/src/sap/ui/mdc/enum/SelectType.js +1 -1
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +3 -2
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +3 -2
- package/src/sap/ui/mdc/field/ConditionType.js +31 -15
- package/src/sap/ui/mdc/field/ConditionsType.js +98 -23
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +3 -2
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +2 -2
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +42 -7
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +2 -2
- package/src/sap/ui/mdc/field/FieldBase.js +131 -236
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +2 -35
- package/src/sap/ui/mdc/field/FieldBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/field/FieldHelpBase.js +9 -7
- package/src/sap/ui/mdc/field/FieldHelpBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/field/FieldInfoBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldInput.js +2 -2
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +2 -2
- package/src/sap/ui/mdc/field/FieldInputRenderer.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +2 -2
- package/src/sap/ui/mdc/field/FieldMultiInputRenderer.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +3 -2
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +3 -2
- package/src/sap/ui/mdc/field/FieldValueHelpDelegate.js +2 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +8 -7
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +10 -9
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +3 -2
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +8 -7
- package/src/sap/ui/mdc/field/InParameter.js +3 -2
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -2
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +2 -2
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +2 -2
- package/src/sap/ui/mdc/field/OutParameter.js +3 -2
- package/src/sap/ui/mdc/field/TokenDisplay.js +2 -2
- package/src/sap/ui/mdc/field/TokenDisplayRenderer.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +2 -2
- package/src/sap/ui/mdc/field/TokenizerDisplayRenderer.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +3 -2
- package/src/sap/ui/mdc/field/content/BooleanContent.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +12 -13
- package/src/sap/ui/mdc/field/content/DateContent.js +4 -4
- package/src/sap/ui/mdc/field/content/DateTimeContent.js +1 -1
- package/src/sap/ui/mdc/field/content/DefaultContent.js +15 -5
- package/src/sap/ui/mdc/field/content/LinkContent.js +1 -2
- package/src/sap/ui/mdc/field/content/SearchContent.js +47 -5
- package/src/sap/ui/mdc/field/content/TimeContent.js +1 -1
- package/src/sap/ui/mdc/field/content/UnitContent.js +8 -19
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +60 -29
- package/src/sap/ui/mdc/filterbar/FilterBarBaseRenderer.js +1 -1
- package/src/sap/ui/mdc/filterbar/IFilterContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/filterbar/aligned/FilterContainer.js +1 -1
- package/src/sap/ui/mdc/filterbar/aligned/FilterItemLayout.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +27 -4
- package/src/sap/ui/mdc/filterbar/p13n/FilterColumnLayout.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +5 -1
- package/src/sap/ui/mdc/filterbar/p13n/GroupContainer.js +6 -2
- package/src/sap/ui/mdc/filterbar/p13n/TableContainer.js +5 -1
- package/src/sap/ui/mdc/filterbar/vh/CollectiveSearchSelect.js +16 -3
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +35 -2
- package/src/sap/ui/mdc/filterbar/vh/FilterBarDelegate.js +24 -0
- package/src/sap/ui/mdc/filterbar/vh/FilterContainer.js +2 -2
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +2 -2
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ChartTypeFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +2 -2
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +2 -2
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/PanelItem.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/PropertyInfoFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/SortFlex.js +3 -3
- package/src/sap/ui/mdc/flexibility/Table.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/Util.js +2 -2
- package/src/sap/ui/mdc/flexibility/xConfigFlex.js +6 -6
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +1 -1
- package/src/sap/ui/mdc/library.js +61 -30
- package/src/sap/ui/mdc/link/ContactDetails.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +2 -2
- package/src/sap/ui/mdc/link/ContactDetailsRenderer.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +2 -2
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +2 -2
- package/src/sap/ui/mdc/link/LinkItem.js +3 -2
- package/src/sap/ui/mdc/link/Log.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +25 -13
- package/src/sap/ui/mdc/link/PanelItem.js +2 -2
- package/src/sap/ui/mdc/link/PanelRenderer.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +2 -2
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +2 -2
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +2 -2
- package/src/sap/ui/mdc/messagebundle.properties +7 -3
- package/src/sap/ui/mdc/messagebundle_ar.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_bg.properties +33 -30
- package/src/sap/ui/mdc/messagebundle_ca.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +7 -4
- package/src/sap/ui/mdc/messagebundle_cy.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_de.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_en.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +0 -1
- package/src/sap/ui/mdc/messagebundle_es.properties +9 -6
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_et.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_fr.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_hr.properties +11 -8
- package/src/sap/ui/mdc/messagebundle_hu.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_id.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_iw.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_ja.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +11 -8
- package/src/sap/ui/mdc/messagebundle_ko.properties +4 -1
- package/src/sap/ui/mdc/messagebundle_lt.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_ms.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +7 -4
- package/src/sap/ui/mdc/messagebundle_no.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_pl.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_pt.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_ru.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -7
- package/src/sap/ui/mdc/messagebundle_sv.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_th.properties +7 -4
- package/src/sap/ui/mdc/messagebundle_tr.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_vi.properties +5 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +6 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +5 -2
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +10 -5
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +4 -4
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +3 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +10 -10
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +7 -3
- package/src/sap/ui/mdc/odata/TypeUtil.js +4 -4
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +1 -7
- package/src/sap/ui/mdc/odata/v4/FieldValueHelpDelegate.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ODataMetaModelUtil.js +2 -2
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +3 -3
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +9 -1
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +34 -65
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +1 -1
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +53 -53
- package/src/sap/ui/mdc/p13n/Engine.js +4 -4
- package/src/sap/ui/mdc/p13n/FlexUtil.js +1 -1
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +1 -1
- package/src/sap/ui/mdc/p13n/PersistenceProvider.js +4 -154
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +2 -2
- package/src/sap/ui/mdc/p13n/StateUtil.js +16 -2
- package/src/sap/ui/mdc/p13n/UIManager.js +3 -4
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +3 -2
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +4 -2
- package/src/sap/ui/mdc/p13n/panels/FilterPanel.js +23 -12
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +15 -7
- package/src/sap/ui/mdc/p13n/panels/LinkSelectionPanel.js +3 -2
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +7 -11
- package/src/sap/ui/mdc/p13n/subcontroller/AdaptFiltersController.js +21 -9
- package/src/sap/ui/mdc/p13n/subcontroller/AggregateController.js +13 -8
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +2 -2
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +12 -28
- package/src/sap/ui/mdc/p13n/subcontroller/ChartTypeController.js +8 -4
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +7 -15
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnWidthController.js +7 -7
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +18 -9
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -5
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +6 -5
- package/src/sap/ui/mdc/p13n/subcontroller/SelectionController.js +76 -0
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +5 -5
- package/src/sap/ui/mdc/table/Column.js +101 -22
- package/src/sap/ui/mdc/table/ColumnSettings.js +41 -0
- package/src/sap/ui/mdc/table/CreationRow.js +11 -12
- package/src/sap/ui/mdc/table/GridTableType.js +331 -107
- package/src/sap/ui/mdc/table/PropertyHelper.js +14 -8
- package/src/sap/ui/mdc/table/ResponsiveColumnSettings.js +76 -0
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +312 -97
- package/src/sap/ui/mdc/table/RowActionItem.js +9 -3
- package/src/sap/ui/mdc/table/RowSettings.js +3 -3
- package/src/sap/ui/mdc/table/TableSettings.js +12 -13
- package/src/sap/ui/mdc/table/TableTypeBase.js +124 -41
- package/src/sap/ui/mdc/table/TreeTableType.js +106 -0
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +3 -3
- package/src/sap/ui/mdc/table/menu/Item.js +4 -7
- package/src/sap/ui/mdc/table/menu/ItemContainer.js +1 -1
- package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +3 -4
- package/src/sap/ui/mdc/themes/base/AdaptFiltersPanel.less +1 -5
- package/src/sap/ui/mdc/themes/base/Chart.less +1 -0
- package/src/sap/ui/mdc/themes/base/FieldBase.less +8 -2
- package/src/sap/ui/mdc/themes/base/PersonalizationDialog.less +7 -7
- package/src/sap/ui/mdc/themes/base/library.source.less +1 -1
- package/src/sap/ui/mdc/util/Common.js +1 -1
- package/src/sap/ui/mdc/util/DateUtil.js +3 -2
- package/src/sap/ui/mdc/util/FilterUtil.js +1 -1
- package/src/sap/ui/mdc/util/FormatUtil.js +1 -1
- package/src/sap/ui/mdc/util/IdentifierUtil.js +1 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +10 -10
- package/src/sap/ui/mdc/util/PropertyHelper.js +3 -3
- package/src/sap/ui/mdc/util/TypeUtil.js +33 -2
- package/src/sap/ui/mdc/util/loadModules.js +1 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +39 -9
- package/src/sap/ui/mdc/valuehelp/Popover.js +30 -5
- package/src/sap/ui/mdc/valuehelp/base/Container.js +8 -6
- package/src/sap/ui/mdc/valuehelp/base/Content.js +28 -5
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +2 -2
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +33 -32
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +5 -4
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +8 -2
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +7 -3
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +11 -4
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +16 -14
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +56 -73
- package/test/sap/ui/mdc/testutils/opa/field/Actions.js +4 -2
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +8 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +16 -25
- package/test/sap/ui/mdc/testutils/opa/p13n/Assertions.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/waitForPanelInP13n.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/table/Actions.js +291 -67
- package/test/sap/ui/mdc/testutils/opa/table/Assertions.js +4 -81
- package/test/sap/ui/mdc/testutils/opa/table/JSDoc.md +0 -50
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +7 -51
- package/test/sap/ui/mdc/testutils/opa/table/Util.js +0 -1
- package/test/sap/ui/mdc/testutils/opa/table/waitForTable.js +30 -5
- package/src/sap/ui/mdc/p13n/AdaptationProvider.js +0 -67
- package/src/sap/ui/mdc/p13n/modification/FlexModificationHandler.js +0 -76
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +0 -87
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +0 -149
- package/src/sap/ui/mdc/p13n/modules/StateHandlerRegistry.js +0 -86
- package/src/sap/ui/mdc/p13n/modules/xConfigAPI.js +0 -219
package/src/sap/ui/mdc/Table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -9,21 +9,19 @@ sap.ui.define([
|
|
|
9
9
|
"./ActionToolbar",
|
|
10
10
|
"./table/TableSettings",
|
|
11
11
|
"./table/GridTableType",
|
|
12
|
+
"./table/TreeTableType",
|
|
12
13
|
"./table/ResponsiveTableType",
|
|
13
14
|
"./table/PropertyHelper",
|
|
14
15
|
"./mixin/FilterIntegrationMixin",
|
|
15
16
|
"./library",
|
|
16
17
|
"sap/m/Text",
|
|
17
18
|
"sap/m/Title",
|
|
18
|
-
"sap/m/ColumnHeaderPopover",
|
|
19
|
-
"sap/m/ColumnPopoverSelectListItem",
|
|
20
19
|
"sap/m/OverflowToolbar",
|
|
21
20
|
"sap/m/library",
|
|
22
21
|
"sap/m/table/Util",
|
|
23
22
|
"sap/m/table/columnmenu/Menu",
|
|
24
23
|
"sap/ui/core/Core",
|
|
25
24
|
"sap/ui/core/format/NumberFormat",
|
|
26
|
-
"sap/ui/core/dnd/DragDropInfo",
|
|
27
25
|
"sap/ui/core/Item",
|
|
28
26
|
"sap/ui/core/format/ListFormat",
|
|
29
27
|
"sap/ui/core/library",
|
|
@@ -44,27 +42,26 @@ sap.ui.define([
|
|
|
44
42
|
"sap/ui/mdc/actiontoolbar/ActionToolbarAction",
|
|
45
43
|
"sap/ui/mdc/table/menu/QuickActionContainer",
|
|
46
44
|
"sap/ui/mdc/table/menu/ItemContainer",
|
|
47
|
-
"sap/ui/core/theming/Parameters"
|
|
45
|
+
"sap/ui/core/theming/Parameters",
|
|
46
|
+
"sap/base/Log"
|
|
48
47
|
], function(
|
|
49
48
|
Control,
|
|
50
49
|
ActionToolbar,
|
|
51
50
|
TableSettings,
|
|
52
51
|
GridTableType,
|
|
52
|
+
TreeTableType,
|
|
53
53
|
ResponsiveTableType,
|
|
54
54
|
PropertyHelper,
|
|
55
55
|
FilterIntegrationMixin,
|
|
56
56
|
library,
|
|
57
57
|
Text,
|
|
58
58
|
Title,
|
|
59
|
-
ColumnHeaderPopover,
|
|
60
|
-
ColumnPopoverSelectListItem,
|
|
61
59
|
OverflowToolbar,
|
|
62
60
|
MLibrary,
|
|
63
61
|
MTableUtil,
|
|
64
62
|
ColumnMenu,
|
|
65
63
|
Core,
|
|
66
64
|
NumberFormat,
|
|
67
|
-
DragDropInfo,
|
|
68
65
|
Item,
|
|
69
66
|
ListFormat,
|
|
70
67
|
coreLibrary,
|
|
@@ -85,7 +82,8 @@ sap.ui.define([
|
|
|
85
82
|
ActionToolbarAction,
|
|
86
83
|
QuickActionContainer,
|
|
87
84
|
ItemContainer,
|
|
88
|
-
ThemeParameters
|
|
85
|
+
ThemeParameters,
|
|
86
|
+
Log
|
|
89
87
|
) {
|
|
90
88
|
"use strict";
|
|
91
89
|
|
|
@@ -107,15 +105,12 @@ sap.ui.define([
|
|
|
107
105
|
}
|
|
108
106
|
return internalMap.get(oTable);
|
|
109
107
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
MessageToast.show(oRb.getText(sTextKey, aValues));
|
|
117
|
-
});
|
|
118
|
-
}
|
|
108
|
+
var mTypeMap = {
|
|
109
|
+
"Table": GridTableType,
|
|
110
|
+
"TreeTable": TreeTableType,
|
|
111
|
+
"ResponsiveTable": ResponsiveTableType,
|
|
112
|
+
"null": GridTableType // default
|
|
113
|
+
};
|
|
119
114
|
|
|
120
115
|
/**
|
|
121
116
|
* Constructor for a new <code>MDCTable</code>.
|
|
@@ -135,7 +130,7 @@ sap.ui.define([
|
|
|
135
130
|
* @since 1.58
|
|
136
131
|
* @alias sap.ui.mdc.Table
|
|
137
132
|
* @ui5-restricted sap.fe
|
|
138
|
-
* MDC_PUBLIC_CANDIDATE
|
|
133
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
139
134
|
*/
|
|
140
135
|
var Table = Control.extend("sap.ui.mdc.Table", {
|
|
141
136
|
metadata: {
|
|
@@ -490,8 +485,9 @@ sap.ui.define([
|
|
|
490
485
|
/**
|
|
491
486
|
* Defines the custom visualization if there is no data to show in the table.
|
|
492
487
|
*
|
|
493
|
-
* <b>Note:</b> If {@link sap.m.IllustratedMessage} control is set for the <code>noData</code> aggregation and its
|
|
494
|
-
* then the table automatically offers a no data text with
|
|
488
|
+
* <b>Note:</b> If {@link sap.m.IllustratedMessage} control is set for the <code>noData</code> aggregation and its
|
|
489
|
+
* {@link sap.m.IllustratedMessage#getTitle title} property is not set then the table automatically offers a no data text with
|
|
490
|
+
* fitting {@link sap.m.IllustratedMessage.IllustratedMessageType illustration}.
|
|
495
491
|
* @since 1.106
|
|
496
492
|
*/
|
|
497
493
|
noData: { type: "sap.ui.core.Control", multiple: false, altTypes: ["string"] }
|
|
@@ -569,6 +565,14 @@ sap.ui.define([
|
|
|
569
565
|
*/
|
|
570
566
|
userExportSettings: {
|
|
571
567
|
type: "object"
|
|
568
|
+
},
|
|
569
|
+
/**
|
|
570
|
+
* Contains an array of {@link sap.ui.export.util.Filter} objects.
|
|
571
|
+
*
|
|
572
|
+
* @since 1.110
|
|
573
|
+
*/
|
|
574
|
+
filterSettings: {
|
|
575
|
+
type: "object[]"
|
|
572
576
|
}
|
|
573
577
|
}
|
|
574
578
|
},
|
|
@@ -591,10 +595,10 @@ sap.ui.define([
|
|
|
591
595
|
constructor: function() {
|
|
592
596
|
this._oTableReady = new Deferred();
|
|
593
597
|
this._oFullInitialize = new Deferred();
|
|
594
|
-
this._bUseColumnMenu = UriParameters.fromQuery(window.location.search).get("sap-ui-xx-columnmenu") === "true";
|
|
595
598
|
|
|
596
599
|
Control.apply(this, arguments);
|
|
597
600
|
this.bCreated = true;
|
|
601
|
+
this._updateAdaptation();
|
|
598
602
|
this._doOneTimeOperations();
|
|
599
603
|
this._initializeContent();
|
|
600
604
|
},
|
|
@@ -667,17 +671,29 @@ sap.ui.define([
|
|
|
667
671
|
|
|
668
672
|
// indicates whether binding the table is inevitable or not
|
|
669
673
|
this._bForceRebind = true;
|
|
670
|
-
|
|
671
|
-
this._aSupportedP13nModes = Object.keys(P13nMode);
|
|
672
|
-
this._updateAdaptation();
|
|
673
674
|
};
|
|
674
675
|
|
|
675
676
|
/**
|
|
676
677
|
* @inheritDoc
|
|
677
678
|
*/
|
|
678
|
-
Table.prototype.applySettings = function() {
|
|
679
|
+
Table.prototype.applySettings = function(mSettings, oScope) {
|
|
680
|
+
// Some settings rely on the existence of a (table-)type instance. If the type is applied before other settings, initialization of a
|
|
681
|
+
// (incorrect) default type instance can be avoided.
|
|
682
|
+
// The delegate must be part of the early settings, because it can only be applied once (see sap.ui.mdc.mixin.DelegateMixin).
|
|
683
|
+
if (mSettings && "type" in mSettings) {
|
|
684
|
+
var mEarlySettings = {type: mSettings.type};
|
|
685
|
+
|
|
686
|
+
if ("delegate" in mSettings) {
|
|
687
|
+
mEarlySettings.delegate = mSettings.delegate;
|
|
688
|
+
delete mSettings.delegate;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
delete mSettings.type;
|
|
692
|
+
Control.prototype.applySettings.call(this, mEarlySettings, oScope);
|
|
693
|
+
}
|
|
694
|
+
|
|
679
695
|
this._setPropertyHelperClass(PropertyHelper);
|
|
680
|
-
Control.prototype.applySettings.
|
|
696
|
+
Control.prototype.applySettings.call(this, mSettings, oScope);
|
|
681
697
|
this.initControlDelegate();
|
|
682
698
|
};
|
|
683
699
|
|
|
@@ -695,7 +711,7 @@ sap.ui.define([
|
|
|
695
711
|
* @returns {Promise} A <code>Promise</code> that resolves after the table has been initialized
|
|
696
712
|
* @private
|
|
697
713
|
* @ui5-restricted sap.fe
|
|
698
|
-
* MDC_PUBLIC_CANDIDATE
|
|
714
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
699
715
|
*/
|
|
700
716
|
Table.prototype.initialized = function() {
|
|
701
717
|
return this._oTableReady.promise;
|
|
@@ -709,6 +725,10 @@ sap.ui.define([
|
|
|
709
725
|
return this._oTable || this._oFullInitialize.promise;
|
|
710
726
|
};
|
|
711
727
|
|
|
728
|
+
Table.prototype.getCopyProviderPluginOwner = function() {
|
|
729
|
+
return this._oTable || this._oFullInitialize.promise;
|
|
730
|
+
};
|
|
731
|
+
|
|
712
732
|
Table.prototype.setDataStateIndicator = function(oDataStateIndicator) {
|
|
713
733
|
this._handleDataStateEvents(this.getDataStateIndicator(), "detach");
|
|
714
734
|
this.setAggregation("dataStateIndicator", oDataStateIndicator, true);
|
|
@@ -731,7 +751,10 @@ sap.ui.define([
|
|
|
731
751
|
Table.prototype._onApplyMessageFilter = function(oEvent) {
|
|
732
752
|
this._oMessageFilter = oEvent.getParameter("filter");
|
|
733
753
|
oEvent.preventDefault();
|
|
734
|
-
|
|
754
|
+
|
|
755
|
+
if (this.isTableBound()) {
|
|
756
|
+
this.rebind();
|
|
757
|
+
}
|
|
735
758
|
};
|
|
736
759
|
|
|
737
760
|
/**
|
|
@@ -741,40 +764,19 @@ sap.ui.define([
|
|
|
741
764
|
Table.prototype._onClearMessageFilter = function(oEvent) {
|
|
742
765
|
this._oMessageFilter = null;
|
|
743
766
|
oEvent.preventDefault();
|
|
744
|
-
this._rebind();
|
|
745
|
-
};
|
|
746
767
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
var sType, oType = sType = oTypeInput || this.getType();
|
|
750
|
-
if (!oType) {
|
|
751
|
-
sType = TableType.Table; // back to the default behaviour
|
|
752
|
-
} else if (typeof oType === "object") {
|
|
753
|
-
if (oType.isA("sap.ui.mdc.table.ResponsiveTableType")) {
|
|
754
|
-
sType = TableType.ResponsiveTable;
|
|
755
|
-
} else {
|
|
756
|
-
sType = TableType.Table;
|
|
757
|
-
}
|
|
768
|
+
if (this.isTableBound()) {
|
|
769
|
+
this.rebind();
|
|
758
770
|
}
|
|
759
|
-
return sType;
|
|
760
771
|
};
|
|
761
772
|
|
|
762
|
-
Table.prototype._isOfType = function(sType) {
|
|
763
|
-
|
|
764
|
-
};
|
|
773
|
+
Table.prototype._isOfType = function(sType, bIncludeSubTypes) {
|
|
774
|
+
var oType = this._getType();
|
|
765
775
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
if (oType && typeof oType === "object") {
|
|
769
|
-
oType.updateTableSettings();
|
|
776
|
+
if (bIncludeSubTypes) {
|
|
777
|
+
return oType.isA(mTypeMap[sType].getMetadata().getName());
|
|
770
778
|
} else {
|
|
771
|
-
|
|
772
|
-
oType = ResponsiveTableType;
|
|
773
|
-
} else {
|
|
774
|
-
oType = GridTableType;
|
|
775
|
-
}
|
|
776
|
-
// Use defaults from Type
|
|
777
|
-
oType.updateDefault(this._oTable);
|
|
779
|
+
return oType.constructor === mTypeMap[sType];
|
|
778
780
|
}
|
|
779
781
|
};
|
|
780
782
|
|
|
@@ -789,34 +791,14 @@ sap.ui.define([
|
|
|
789
791
|
* @returns {Promise} A <code>Promise</code> that resolves after the table scrolls to the row with the given index
|
|
790
792
|
* @private
|
|
791
793
|
* @ui5-restricted sap.fe
|
|
792
|
-
* MDC_PUBLIC_CANDIDATE
|
|
794
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
793
795
|
*/
|
|
794
796
|
Table.prototype.scrollToIndex = function(iIndex) {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
if (typeof iIndex !== "number") {
|
|
801
|
-
return reject("The iIndex parameter has to be a number");
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
if (this._isOfType(TableType.ResponsiveTable)) {
|
|
805
|
-
this._oTable.scrollToIndex(iIndex).then(resolve).catch(reject);
|
|
806
|
-
} else {
|
|
807
|
-
if (iIndex === -1) {
|
|
808
|
-
iIndex = this._getRowCount(false);
|
|
809
|
-
}
|
|
797
|
+
if (typeof iIndex !== "number") {
|
|
798
|
+
return Promise.reject("The iIndex parameter has to be a number");
|
|
799
|
+
}
|
|
810
800
|
|
|
811
|
-
|
|
812
|
-
this._oTable.attachEventOnce("rowsUpdated", function() {
|
|
813
|
-
resolve();
|
|
814
|
-
});
|
|
815
|
-
} else {
|
|
816
|
-
resolve();
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
}.bind(this));
|
|
801
|
+
return this._getType().scrollToIndex(iIndex);
|
|
820
802
|
};
|
|
821
803
|
|
|
822
804
|
/**
|
|
@@ -831,7 +813,7 @@ sap.ui.define([
|
|
|
831
813
|
* @returns {Promise} A <code>Promise</code> that resolves after the focus has been set
|
|
832
814
|
* @private
|
|
833
815
|
* @ui5-restricted sap.fe
|
|
834
|
-
* MDC_PUBLIC_CANDIDATE
|
|
816
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
835
817
|
*/
|
|
836
818
|
Table.prototype.focusRow = function(iIndex, bFirstInteractiveElement) {
|
|
837
819
|
return this.scrollToIndex(iIndex).then(function() {
|
|
@@ -840,66 +822,74 @@ sap.ui.define([
|
|
|
840
822
|
};
|
|
841
823
|
|
|
842
824
|
Table.prototype.setType = function(vType) {
|
|
843
|
-
|
|
844
|
-
|
|
825
|
+
if (!this.bCreated || this.getType() == vType) {
|
|
826
|
+
return this.setAggregation("type", vType, true);
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
// Remove the toolbar from the table to avoid its destruction when the table is destroyed. Do this only when a toolbar exists to not
|
|
830
|
+
// create an unnecessary default type instance. Because the removal operation is specific to a table type, the old type has to remove the
|
|
831
|
+
// toolbar before the new type is set.
|
|
832
|
+
if (this._oToolbar) {
|
|
833
|
+
this._getType().removeToolbar();
|
|
834
|
+
}
|
|
845
835
|
|
|
836
|
+
this._destroyDefaultType();
|
|
846
837
|
this.setAggregation("type", vType, true);
|
|
847
838
|
|
|
848
|
-
if (
|
|
849
|
-
//
|
|
850
|
-
this.
|
|
851
|
-
|
|
839
|
+
if (this._oTable) {
|
|
840
|
+
// store and remove the noData otherwise it gets destroyed
|
|
841
|
+
var vNoData = this.getNoData();
|
|
842
|
+
this.setNoData();
|
|
843
|
+
this._vNoData = vNoData;
|
|
844
|
+
|
|
845
|
+
this._oTable.destroy("KeepDom");
|
|
846
|
+
this._oTable = null;
|
|
847
|
+
this._bTableExists = false;
|
|
848
|
+
} else {
|
|
849
|
+
// reject any pending promise
|
|
850
|
+
this._onAfterTableCreated();
|
|
851
|
+
this._onAfterFullInitialization();
|
|
852
852
|
}
|
|
853
853
|
|
|
854
|
-
if (this.
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
} else {
|
|
859
|
-
this._oTable.removeExtension(this._oToolbar);
|
|
860
|
-
}
|
|
854
|
+
if (this._oRowTemplate) {
|
|
855
|
+
this._oRowTemplate.destroy();
|
|
856
|
+
this._oRowTemplate = null;
|
|
857
|
+
}
|
|
861
858
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
859
|
+
// recreate the defers when switching table
|
|
860
|
+
this._oTableReady = new Deferred();
|
|
861
|
+
this._oFullInitialize = new Deferred();
|
|
862
|
+
this._bFullyInitialized = false;
|
|
863
|
+
this._initializeContent();
|
|
866
864
|
|
|
867
|
-
this._oTable.destroy("KeepDom");
|
|
868
|
-
this._oTable = null;
|
|
869
|
-
this._bTableExists = false;
|
|
870
|
-
} else {
|
|
871
|
-
// reject any pending promise
|
|
872
|
-
this._onAfterTableCreated();
|
|
873
|
-
this._onAfterFullInitialization();
|
|
874
|
-
}
|
|
875
|
-
if (this._oTemplate) {
|
|
876
|
-
this._oTemplate.destroy();
|
|
877
|
-
this._oTemplate = null;
|
|
878
|
-
}
|
|
879
|
-
// recreate the defers when switching table
|
|
880
|
-
this._oTableReady = new Deferred();
|
|
881
|
-
this._oFullInitialize = new Deferred();
|
|
882
|
-
this._bFullyInitialized = false;
|
|
883
|
-
this._initializeContent();
|
|
884
|
-
}
|
|
885
865
|
return this;
|
|
886
866
|
};
|
|
887
|
-
|
|
867
|
+
|
|
868
|
+
Table.prototype._getType = function() {
|
|
869
|
+
var vType = this.getType();
|
|
870
|
+
|
|
871
|
+
if (!this._oDefaultType && (typeof vType === "string" || vType === null)) {
|
|
872
|
+
this._oDefaultType = new mTypeMap[vType]();
|
|
873
|
+
this.addDependent(this._oDefaultType);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
return this._oDefaultType || this.getType();
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
Table.prototype._destroyDefaultType = function() {
|
|
880
|
+
if (this._oDefaultType) {
|
|
881
|
+
this._oDefaultType.destroy();
|
|
882
|
+
delete this._oDefaultType;
|
|
883
|
+
}
|
|
884
|
+
};
|
|
888
885
|
|
|
889
886
|
Table.prototype.setRowSettings = function(oRowSettings) {
|
|
890
887
|
this.setAggregation("rowSettings", oRowSettings, true);
|
|
888
|
+
this._getType().updateRowSettings();
|
|
891
889
|
|
|
892
|
-
if (this.
|
|
893
|
-
// Apply the new setting to the existing table
|
|
894
|
-
this._oRowActions = {};
|
|
895
|
-
if (this._isOfType(TableType.ResponsiveTable)) {
|
|
896
|
-
ResponsiveTableType.updateRowSettings(this, oRowSettings, this._onResponsiveRowActionPress);
|
|
897
|
-
} else {
|
|
898
|
-
GridTableType.updateRowSettings(this._oTable, oRowSettings, [this._onRowActionPress, this]);
|
|
899
|
-
}
|
|
900
|
-
|
|
890
|
+
if (this.isTableBound()) {
|
|
901
891
|
this._bForceRebind = true;
|
|
902
|
-
this.
|
|
892
|
+
this.rebind();
|
|
903
893
|
}
|
|
904
894
|
|
|
905
895
|
return this;
|
|
@@ -941,20 +931,14 @@ sap.ui.define([
|
|
|
941
931
|
};
|
|
942
932
|
|
|
943
933
|
Table.prototype.setSelectionMode = function(sMode) {
|
|
944
|
-
var sOldMode = this.getSelectionMode();
|
|
945
934
|
this.setProperty("selectionMode", sMode, true);
|
|
946
|
-
|
|
947
|
-
this._updateSelectionBehavior();
|
|
948
|
-
}
|
|
935
|
+
this._getType().updateSelectionSettings();
|
|
949
936
|
return this;
|
|
950
937
|
};
|
|
951
938
|
|
|
952
939
|
Table.prototype.setMultiSelectMode = function(sMultiSelectMode) {
|
|
953
|
-
var sOldMultiSelectMode = this.getMultiSelectMode();
|
|
954
940
|
this.setProperty("multiSelectMode", sMultiSelectMode, true);
|
|
955
|
-
|
|
956
|
-
this._updateMultiSelectMode();
|
|
957
|
-
}
|
|
941
|
+
this._getType().updateSelectionSettings();
|
|
958
942
|
return this;
|
|
959
943
|
};
|
|
960
944
|
|
|
@@ -973,7 +957,7 @@ sap.ui.define([
|
|
|
973
957
|
this.setProperty("enableColumnResize", bEnableColumnResize, true);
|
|
974
958
|
|
|
975
959
|
if (this.getEnableColumnResize() !== bOldEnableColumnResize) {
|
|
976
|
-
this.
|
|
960
|
+
this._updateColumnResize();
|
|
977
961
|
this._updateAdaptation();
|
|
978
962
|
}
|
|
979
963
|
|
|
@@ -1032,12 +1016,12 @@ sap.ui.define([
|
|
|
1032
1016
|
controller: {}
|
|
1033
1017
|
};
|
|
1034
1018
|
var mRegistryOptions = {
|
|
1035
|
-
Column: ColumnController,
|
|
1036
|
-
Sort: SortController,
|
|
1037
|
-
Group: GroupController,
|
|
1038
|
-
Filter: FilterController,
|
|
1039
|
-
Aggregate: AggregateController,
|
|
1040
|
-
ColumnWidth: ColumnWidthController
|
|
1019
|
+
Column: new ColumnController({control: this}),
|
|
1020
|
+
Sort: new SortController({control: this}),
|
|
1021
|
+
Group: new GroupController({control: this}),
|
|
1022
|
+
Filter: new FilterController({control: this}),
|
|
1023
|
+
Aggregate: new AggregateController({control: this}),
|
|
1024
|
+
ColumnWidth: new ColumnWidthController({control: this})
|
|
1041
1025
|
};
|
|
1042
1026
|
|
|
1043
1027
|
this.getActiveP13nModes().forEach(function(sMode){
|
|
@@ -1048,7 +1032,7 @@ sap.ui.define([
|
|
|
1048
1032
|
oRegisterConfig.controller["ColumnWidth"] = mRegistryOptions["ColumnWidth"];
|
|
1049
1033
|
}
|
|
1050
1034
|
|
|
1051
|
-
this.getEngine().
|
|
1035
|
+
this.getEngine().register(this, oRegisterConfig);
|
|
1052
1036
|
};
|
|
1053
1037
|
|
|
1054
1038
|
function updateP13nSettings(oTable) {
|
|
@@ -1133,28 +1117,16 @@ sap.ui.define([
|
|
|
1133
1117
|
}
|
|
1134
1118
|
|
|
1135
1119
|
var oFilterInfoBar = getFilterInfoBar(oTable);
|
|
1120
|
+
var oInvisibleText = getFilterInfoBarInvisibleText(oTable);
|
|
1136
1121
|
|
|
1137
1122
|
if (!oFilterInfoBar) {
|
|
1138
1123
|
oFilterInfoBar = createFilterInfoBar(oTable);
|
|
1139
1124
|
}
|
|
1140
1125
|
|
|
1141
|
-
|
|
1142
|
-
if (oTable._oTable.getInfoToolbar() !== oFilterInfoBar) {
|
|
1143
|
-
oTable._oTable.setInfoToolbar(oFilterInfoBar);
|
|
1144
|
-
}
|
|
1145
|
-
} else if (oTable._oTable.indexOfExtension(oFilterInfoBar) === -1) {
|
|
1146
|
-
oTable._oTable.insertExtension(oFilterInfoBar, 1);
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
var oInvisibleText = getFilterInfoBarInvisibleText(oTable);
|
|
1150
|
-
oTable._oTable.addAriaLabelledBy(oInvisibleText.getId());
|
|
1126
|
+
oTable._getType().insertFilterInfoBar(oFilterInfoBar, oInvisibleText.getId());
|
|
1151
1127
|
}
|
|
1152
1128
|
|
|
1153
1129
|
function getFilterInfoBarInvisibleText(oTable) {
|
|
1154
|
-
if (!oTable) {
|
|
1155
|
-
return null;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
1130
|
if (!oTable._oFilterInfoBarInvisibleText) {
|
|
1159
1131
|
oTable._oFilterInfoBarInvisibleText = new InvisibleText().toStatic();
|
|
1160
1132
|
}
|
|
@@ -1221,7 +1193,7 @@ sap.ui.define([
|
|
|
1221
1193
|
}
|
|
1222
1194
|
|
|
1223
1195
|
iThreshold = this.getThreshold() > -1 ? this.getThreshold() : undefined;
|
|
1224
|
-
if (this.
|
|
1196
|
+
if (this._isOfType(TableType.ResponsiveTable)) {
|
|
1225
1197
|
this._oTable.setGrowingThreshold(iThreshold);
|
|
1226
1198
|
} else {
|
|
1227
1199
|
this._oTable.setThreshold(iThreshold);
|
|
@@ -1257,13 +1229,13 @@ sap.ui.define([
|
|
|
1257
1229
|
|
|
1258
1230
|
if (vNoData && vNoData.isA && vNoData.isA("sap.m.IllustratedMessage")) {
|
|
1259
1231
|
this._sLastNoDataTitle = "";
|
|
1260
|
-
vNoData.setEnableVerticalResponsiveness(!this.
|
|
1232
|
+
vNoData.setEnableVerticalResponsiveness(!this._isOfType(TableType.ResponsiveTable));
|
|
1261
1233
|
|
|
1262
1234
|
var oNoColumnsMessage = this._oTable.getAggregation("_noColumnsMessage");
|
|
1263
1235
|
if (!oNoColumnsMessage) {
|
|
1264
1236
|
var fnOpenColumnsPanel = TableSettings.showPanel.bind(TableSettings, this, "Columns");
|
|
1265
1237
|
oNoColumnsMessage = MTableUtil.getNoColumnsIllustratedMessage(fnOpenColumnsPanel);
|
|
1266
|
-
oNoColumnsMessage.setEnableVerticalResponsiveness(!this.
|
|
1238
|
+
oNoColumnsMessage.setEnableVerticalResponsiveness(!this._isOfType(TableType.ResponsiveTable));
|
|
1267
1239
|
this._oTable.setAggregation("_noColumnsMessage", oNoColumnsMessage);
|
|
1268
1240
|
}
|
|
1269
1241
|
}
|
|
@@ -1305,15 +1277,13 @@ sap.ui.define([
|
|
|
1305
1277
|
vNoData.setIllustrationType(IllustratedMessageType.EmptyList);
|
|
1306
1278
|
vNoData.setTitle(oRb.getText("table.NO_DATA"));
|
|
1307
1279
|
}
|
|
1280
|
+
} else if (isFiltered(this)) {
|
|
1281
|
+
vNoData.setTitle(oRb.getText("table.NO_RESULTS_TITLE"));
|
|
1282
|
+
vNoData.setDescription(oRb.getText("table.NO_RESULTS_DESCRIPTION"));
|
|
1283
|
+
vNoData.setIllustrationType(IllustratedMessageType.NoFilterResults);
|
|
1308
1284
|
} else {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
vNoData.setDescription(oRb.getText("table.NO_RESULTS_DESCRIPTION"));
|
|
1312
|
-
vNoData.setIllustrationType(IllustratedMessageType.NoFilterResults);
|
|
1313
|
-
} else {
|
|
1314
|
-
vNoData.setTitle(oRb.getText("table.NO_DATA")).setDescription(" ");
|
|
1315
|
-
vNoData.setIllustrationType(IllustratedMessageType.NoEntries);
|
|
1316
|
-
}
|
|
1285
|
+
vNoData.setTitle(oRb.getText("table.NO_DATA")).setDescription(" ");
|
|
1286
|
+
vNoData.setIllustrationType(IllustratedMessageType.NoEntries);
|
|
1317
1287
|
}
|
|
1318
1288
|
this._sLastNoDataTitle = vNoData.getTitle();
|
|
1319
1289
|
};
|
|
@@ -1356,27 +1326,15 @@ sap.ui.define([
|
|
|
1356
1326
|
return oRb.getText("table.NO_DATA");
|
|
1357
1327
|
};
|
|
1358
1328
|
|
|
1359
|
-
Table.prototype.
|
|
1360
|
-
|
|
1361
|
-
return;
|
|
1362
|
-
}
|
|
1363
|
-
var oType = this._bMobileTable ? ResponsiveTableType : GridTableType;
|
|
1364
|
-
// For ResponsiveTable itemPress event is registered during creation
|
|
1365
|
-
oType.updateRowActions(this, this.getRowSettings(), this._bMobileTable ? this._onResponsiveRowActionPress : this._onRowActionPress);
|
|
1329
|
+
Table.prototype._updateRowActions = function() {
|
|
1330
|
+
this._getType().updateRowActions();
|
|
1366
1331
|
};
|
|
1367
1332
|
|
|
1368
1333
|
Table.prototype._initializeContent = function() {
|
|
1369
|
-
var oType
|
|
1370
|
-
// We also can use here static map instead of if else in the future
|
|
1371
|
-
if (this._isOfType(TableType.ResponsiveTable)) {
|
|
1372
|
-
oType = ResponsiveTableType;
|
|
1373
|
-
} else {
|
|
1374
|
-
oType = GridTableType;
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1334
|
+
var oType = this._getType();
|
|
1377
1335
|
var aInitPromises = [
|
|
1378
1336
|
this.awaitControlDelegate(),
|
|
1379
|
-
oType.
|
|
1337
|
+
oType.loadModules()
|
|
1380
1338
|
];
|
|
1381
1339
|
|
|
1382
1340
|
if (this.isFilteringEnabled()) {
|
|
@@ -1391,7 +1349,7 @@ sap.ui.define([
|
|
|
1391
1349
|
}
|
|
1392
1350
|
|
|
1393
1351
|
var oDelegate = this.getControlDelegate();
|
|
1394
|
-
|
|
1352
|
+
|
|
1395
1353
|
this._updateAdaptation();
|
|
1396
1354
|
|
|
1397
1355
|
if (oDelegate.preInit) {
|
|
@@ -1401,8 +1359,7 @@ sap.ui.define([
|
|
|
1401
1359
|
}
|
|
1402
1360
|
|
|
1403
1361
|
// The table type might be switched while the necessary libs, modules are being loaded; hence the below checks
|
|
1404
|
-
if (!this._bTableExists &&
|
|
1405
|
-
this._bMobileTable = sType === "ResponsiveTable";
|
|
1362
|
+
if (!this._bTableExists && oType.constructor === this._getType().constructor) {
|
|
1406
1363
|
this._createContent();
|
|
1407
1364
|
this._bTableExists = true;
|
|
1408
1365
|
}
|
|
@@ -1421,18 +1378,23 @@ sap.ui.define([
|
|
|
1421
1378
|
};
|
|
1422
1379
|
|
|
1423
1380
|
Table.prototype._onAfterTableCreated = function(bResult) {
|
|
1424
|
-
this._oTableReady
|
|
1381
|
+
if (this._oTableReady) {
|
|
1382
|
+
this._oTableReady[bResult ? "resolve" : "reject"](this);
|
|
1383
|
+
}
|
|
1425
1384
|
};
|
|
1426
1385
|
|
|
1427
1386
|
Table.prototype._onAfterFullInitialization = function(bResult) {
|
|
1428
|
-
this._oFullInitialize
|
|
1387
|
+
if (this._oFullInitialize) {
|
|
1388
|
+
this._oFullInitialize[bResult ? "resolve" : "reject"](this);
|
|
1389
|
+
}
|
|
1429
1390
|
};
|
|
1430
1391
|
|
|
1431
1392
|
Table.prototype._createContent = function() {
|
|
1432
1393
|
this._createToolbar();
|
|
1433
1394
|
this._createTable();
|
|
1434
|
-
this.
|
|
1435
|
-
this.
|
|
1395
|
+
this._updateColumnResize();
|
|
1396
|
+
this._updateRowActions();
|
|
1397
|
+
this._updateExportButton();
|
|
1436
1398
|
this.getColumns().forEach(this._insertInnerColumn, this);
|
|
1437
1399
|
this.setAggregation("_content", this._oTable);
|
|
1438
1400
|
this._onAfterTableCreated(true); // Resolve any pending promise if table exists
|
|
@@ -1447,7 +1409,15 @@ sap.ui.define([
|
|
|
1447
1409
|
}
|
|
1448
1410
|
|
|
1449
1411
|
if (this.getAutoBindOnInit()) {
|
|
1450
|
-
this.
|
|
1412
|
+
var oEngine = this.getEngine();
|
|
1413
|
+
|
|
1414
|
+
if (oEngine.isModificationSupported(this)) {
|
|
1415
|
+
oEngine.waitForChanges(this).then(function() {
|
|
1416
|
+
this.rebind();
|
|
1417
|
+
}.bind(this));
|
|
1418
|
+
} else {
|
|
1419
|
+
this.rebind();
|
|
1420
|
+
}
|
|
1451
1421
|
}
|
|
1452
1422
|
|
|
1453
1423
|
return this.awaitPropertyHelper();
|
|
@@ -1469,7 +1439,6 @@ sap.ui.define([
|
|
|
1469
1439
|
Table.prototype.setHeader = function(sText) {
|
|
1470
1440
|
this.setProperty("header", sText, true);
|
|
1471
1441
|
this._updateHeaderText();
|
|
1472
|
-
this._updateExportState(true);
|
|
1473
1442
|
return this;
|
|
1474
1443
|
};
|
|
1475
1444
|
|
|
@@ -1488,15 +1457,8 @@ sap.ui.define([
|
|
|
1488
1457
|
};
|
|
1489
1458
|
|
|
1490
1459
|
Table.prototype.setEnableExport = function(bEnableExport) {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
if (bEnableExport && !this._oExportButton && this._oToolbar) {
|
|
1494
|
-
this._oToolbar.addEnd(this._getExportButton());
|
|
1495
|
-
} else if (this._oExportButton) {
|
|
1496
|
-
this._oExportButton.setVisible(bEnableExport);
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1460
|
+
this.setProperty("enableExport", bEnableExport, true);
|
|
1461
|
+
this._updateExportButton();
|
|
1500
1462
|
return this;
|
|
1501
1463
|
};
|
|
1502
1464
|
|
|
@@ -1535,7 +1497,7 @@ sap.ui.define([
|
|
|
1535
1497
|
* </ul>
|
|
1536
1498
|
*
|
|
1537
1499
|
* @param {boolean} bShowP13nButton
|
|
1538
|
-
*
|
|
1500
|
+
* @experimental This setting is only temporary and will be replaced with an alternative API in future releases.
|
|
1539
1501
|
* @since 1.108
|
|
1540
1502
|
* @private
|
|
1541
1503
|
* @ui5-restricted sap.fe
|
|
@@ -1555,7 +1517,8 @@ sap.ui.define([
|
|
|
1555
1517
|
this._oTitle = new Title(this.getId() + "-title", {
|
|
1556
1518
|
text: this.getHeader(),
|
|
1557
1519
|
width: this.getHeaderVisible() ? undefined : "0px",
|
|
1558
|
-
level: this.getHeaderLevel()
|
|
1520
|
+
level: this.getHeaderLevel(),
|
|
1521
|
+
titleStyle: TitleLevel.H4
|
|
1559
1522
|
});
|
|
1560
1523
|
// Create Toolbar
|
|
1561
1524
|
this._oToolbar = new ActionToolbar(this.getId() + "-toolbar", {
|
|
@@ -1565,12 +1528,13 @@ sap.ui.define([
|
|
|
1565
1528
|
],
|
|
1566
1529
|
end: [
|
|
1567
1530
|
this._getPasteButton(),
|
|
1568
|
-
this._getP13nButton()
|
|
1569
|
-
this._getExportButton()
|
|
1531
|
+
this._getP13nButton()
|
|
1570
1532
|
]
|
|
1571
1533
|
});
|
|
1572
1534
|
}
|
|
1573
|
-
|
|
1535
|
+
|
|
1536
|
+
this._oToolbar.setStyle(this._isOfType(TableType.ResponsiveTable) ? ToolbarStyle.Standard : ToolbarStyle.Clear);
|
|
1537
|
+
|
|
1574
1538
|
return this._oToolbar;
|
|
1575
1539
|
};
|
|
1576
1540
|
|
|
@@ -1736,19 +1700,24 @@ sap.ui.define([
|
|
|
1736
1700
|
};
|
|
1737
1701
|
|
|
1738
1702
|
Table.prototype.getSupportedP13nModes = function() {
|
|
1739
|
-
|
|
1703
|
+
var aSupportedP13nModes = getIntersection(Object.keys(P13nMode), this._getType().getSupportedP13nModes());
|
|
1704
|
+
|
|
1705
|
+
if (this.bDelegateInitialized) {
|
|
1706
|
+
aSupportedP13nModes = getIntersection(aSupportedP13nModes, this.getControlDelegate().getSupportedP13nModes(this));
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
return aSupportedP13nModes;
|
|
1740
1710
|
};
|
|
1741
1711
|
|
|
1742
1712
|
Table.prototype.getActiveP13nModes = function() {
|
|
1743
|
-
|
|
1744
|
-
|
|
1713
|
+
return getIntersection(this.getP13nMode(), this.getSupportedP13nModes());
|
|
1714
|
+
};
|
|
1745
1715
|
|
|
1746
|
-
|
|
1747
|
-
|
|
1716
|
+
function getIntersection(aArr1, aArr2) {
|
|
1717
|
+
return aArr1.filter(function(sValue) {
|
|
1718
|
+
return aArr2.includes(sValue);
|
|
1748
1719
|
});
|
|
1749
|
-
|
|
1750
|
-
return aP13nModes;
|
|
1751
|
-
};
|
|
1720
|
+
}
|
|
1752
1721
|
|
|
1753
1722
|
Table.prototype._getP13nButton = function() {
|
|
1754
1723
|
if (!this._oP13nButton) {
|
|
@@ -1777,51 +1746,48 @@ sap.ui.define([
|
|
|
1777
1746
|
}
|
|
1778
1747
|
};
|
|
1779
1748
|
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
if (!this.
|
|
1788
|
-
|
|
1749
|
+
Table.prototype._isExportEnabled = function() {
|
|
1750
|
+
return this.getEnableExport() && this.bDelegateInitialized && this.getControlDelegate().isExportSupported(this);
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
Table.prototype._updateExportButton = function() {
|
|
1754
|
+
var bNeedExportButton = this._oToolbar != null && this._isExportEnabled();
|
|
1755
|
+
|
|
1756
|
+
if (bNeedExportButton && !this._oExportButton) {
|
|
1757
|
+
this._oExportButton = this._createExportButton();
|
|
1789
1758
|
}
|
|
1790
1759
|
|
|
1791
1760
|
if (!this._oExportButton) {
|
|
1792
|
-
|
|
1793
|
-
"default": [
|
|
1794
|
-
function() {
|
|
1795
|
-
this._onExport();
|
|
1796
|
-
}, this
|
|
1797
|
-
],
|
|
1798
|
-
"exportAs": [
|
|
1799
|
-
function() {
|
|
1800
|
-
this._onExport(true);
|
|
1801
|
-
}, this
|
|
1802
|
-
]
|
|
1803
|
-
});
|
|
1761
|
+
return;
|
|
1804
1762
|
}
|
|
1805
1763
|
|
|
1806
|
-
this.
|
|
1807
|
-
|
|
1764
|
+
if (this._oToolbar && !this._oToolbar.getEnd().includes(this._oExportButton)) {
|
|
1765
|
+
this._oToolbar.addEnd(this._oExportButton);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
this._oExportButton.setEnabled(this._getRowCount(false) > 0);
|
|
1769
|
+
this._oExportButton.setVisible(this._isExportEnabled());
|
|
1808
1770
|
};
|
|
1809
1771
|
|
|
1810
1772
|
/**
|
|
1811
|
-
*
|
|
1812
|
-
*
|
|
1813
|
-
* If the header text of the table is changed, then the cached file name of the export is also updated accordingly.
|
|
1814
|
-
* @param {boolean} bUpdateFilename Used for updating the file name in the cached export config
|
|
1773
|
+
* Returns the export button if <code>enableExport</code> is <code>true</code>.
|
|
1815
1774
|
*
|
|
1775
|
+
* @returns {null|sap.m.MenuButton} If <code>enableExport</code> property is set to <code>false</code> then returns null else export button
|
|
1816
1776
|
* @private
|
|
1817
1777
|
*/
|
|
1818
|
-
Table.prototype.
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1778
|
+
Table.prototype._createExportButton = function() {
|
|
1779
|
+
return TableSettings.createExportButton(this.getId(), {
|
|
1780
|
+
"default": [
|
|
1781
|
+
function() {
|
|
1782
|
+
this._onExport();
|
|
1783
|
+
}, this
|
|
1784
|
+
],
|
|
1785
|
+
"exportAs": [
|
|
1786
|
+
function() {
|
|
1787
|
+
this._onExport(true);
|
|
1788
|
+
}, this
|
|
1789
|
+
]
|
|
1790
|
+
});
|
|
1825
1791
|
};
|
|
1826
1792
|
|
|
1827
1793
|
/**
|
|
@@ -1868,6 +1834,8 @@ sap.ui.define([
|
|
|
1868
1834
|
Table.prototype._onExport = function(bExportAs) {
|
|
1869
1835
|
var that = this;
|
|
1870
1836
|
return this._createExportColumnConfiguration().then(function(aSheetColumns) {
|
|
1837
|
+
var sExportFunctionName, fnGetColumnLabel, mExportSettings, oRowBinding;
|
|
1838
|
+
|
|
1871
1839
|
// If no columns exist, show message and return without exporting
|
|
1872
1840
|
if (!aSheetColumns || !aSheetColumns.length) {
|
|
1873
1841
|
sap.ui.require(["sap/m/MessageBox"], function(MessageBox) {
|
|
@@ -1878,9 +1846,10 @@ sap.ui.define([
|
|
|
1878
1846
|
return;
|
|
1879
1847
|
}
|
|
1880
1848
|
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1849
|
+
oRowBinding = that.getRowBinding();
|
|
1850
|
+
fnGetColumnLabel = that._getColumnLabel.bind(that);
|
|
1851
|
+
sExportFunctionName = bExportAs ? "exportAs" : "export";
|
|
1852
|
+
mExportSettings = {
|
|
1884
1853
|
workbook: {
|
|
1885
1854
|
columns: aSheetColumns,
|
|
1886
1855
|
context: {
|
|
@@ -1891,30 +1860,71 @@ sap.ui.define([
|
|
|
1891
1860
|
fileName: that.getHeader()
|
|
1892
1861
|
};
|
|
1893
1862
|
|
|
1894
|
-
that.
|
|
1863
|
+
that._getExportHandler().then(function(oHandler) {
|
|
1864
|
+
oHandler[sExportFunctionName](mExportSettings, fnGetColumnLabel);
|
|
1865
|
+
});
|
|
1866
|
+
});
|
|
1867
|
+
};
|
|
1868
|
+
|
|
1869
|
+
/**
|
|
1870
|
+
* Loads the export library and export capabilities in parallel and
|
|
1871
|
+
* returns an initialized <code>ExportHandler</code> instance. The
|
|
1872
|
+
* instance will be cached for subsequent calls.
|
|
1873
|
+
*
|
|
1874
|
+
* @returns {Promise<sap.ui.export.ExportHandler>} Promise that resolves with an initialized <code>ExportHandler</code> instance
|
|
1875
|
+
* @private
|
|
1876
|
+
*/
|
|
1877
|
+
Table.prototype._getExportHandler = function() {
|
|
1878
|
+
var that = this;
|
|
1879
|
+
|
|
1880
|
+
if (this._oExportHandler) {
|
|
1881
|
+
return Promise.resolve(this._oExportHandler);
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
return new Promise(function(fnResolve, fnReject) {
|
|
1885
|
+
Promise.all([
|
|
1886
|
+
that._loadExportLibrary(),
|
|
1887
|
+
that.getControlDelegate().fetchExportCapabilities(that)
|
|
1888
|
+
]).then(function(aResult) {
|
|
1889
|
+
var oExportCapabilities = aResult[1];
|
|
1890
|
+
|
|
1895
1891
|
sap.ui.require(["sap/ui/export/ExportHandler"], function(ExportHandler) {
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
if (!that._oExportHandler) {
|
|
1900
|
-
oHandler = new ExportHandler(oExportCapabilities);
|
|
1901
|
-
|
|
1902
|
-
oHandler.attachBeforeExport(function(oEvent) {
|
|
1903
|
-
that.fireBeforeExport({
|
|
1904
|
-
exportSettings: oEvent.getParameter('exportSettings'),
|
|
1905
|
-
userExportSettings: oEvent.getParameter('userExportSettings')
|
|
1906
|
-
});
|
|
1907
|
-
});
|
|
1908
|
-
that._oExportHandler = oHandler;
|
|
1909
|
-
}
|
|
1910
|
-
if (bExportAs) {
|
|
1911
|
-
that._oExportHandler.exportAs(mExportSettings, fnGetColumnLabel);
|
|
1912
|
-
} else {
|
|
1913
|
-
that._oExportHandler.export(mExportSettings, fnGetColumnLabel);
|
|
1914
|
-
}
|
|
1915
|
-
});
|
|
1892
|
+
that._oExportHandler = new ExportHandler(oExportCapabilities);
|
|
1893
|
+
that._oExportHandler.attachBeforeExport(that._onBeforeExport, that);
|
|
1894
|
+
fnResolve(that._oExportHandler);
|
|
1916
1895
|
});
|
|
1896
|
+
}).catch(fnReject);
|
|
1897
|
+
});
|
|
1898
|
+
};
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* Generic event hander for <code>beforeExport</code> event of
|
|
1902
|
+
* the referenced <code>ExportHandler</code>. The event parameters
|
|
1903
|
+
* will be enhanced with table specific information and its own
|
|
1904
|
+
* <code>beforeExport</code> is fired.
|
|
1905
|
+
*
|
|
1906
|
+
* @param {sap.ui.base.Event} oEvent <code>beforeExport</code> event of the ExportHandler
|
|
1907
|
+
* @private
|
|
1908
|
+
*/
|
|
1909
|
+
Table.prototype._onBeforeExport = function(oEvent) {
|
|
1910
|
+
var aFilters = oEvent.getParameter("filterSettings");
|
|
1911
|
+
var oHelper = this.getPropertyHelper();
|
|
1912
|
+
|
|
1913
|
+
aFilters.forEach(function(oFilter) {
|
|
1914
|
+
var oProperty = oHelper.getProperties().find(function(oPropertyInfo) {
|
|
1915
|
+
return oPropertyInfo.path === oFilter.getProperty();
|
|
1917
1916
|
});
|
|
1917
|
+
|
|
1918
|
+
if (oProperty) {
|
|
1919
|
+
oFilter.setLabel(oProperty.label);
|
|
1920
|
+
oFilter.setType(oProperty.typeConfig.typeInstance);
|
|
1921
|
+
}
|
|
1922
|
+
});
|
|
1923
|
+
|
|
1924
|
+
this.fireBeforeExport({
|
|
1925
|
+
exportSettings: oEvent.getParameter("exportSettings"),
|
|
1926
|
+
userExportSettings: oEvent.getParameter("userExportSettings"),
|
|
1927
|
+
filterSettings: aFilters
|
|
1918
1928
|
});
|
|
1919
1929
|
};
|
|
1920
1930
|
|
|
@@ -1943,7 +1953,7 @@ sap.ui.define([
|
|
|
1943
1953
|
}
|
|
1944
1954
|
|
|
1945
1955
|
if ((oEvent.metaKey || oEvent.ctrlKey) && oEvent.shiftKey && oEvent.which === KeyCodes.E) {
|
|
1946
|
-
if (this.
|
|
1956
|
+
if (this._oExportButton && this._oExportButton.getEnabled() && this._isExportEnabled()) {
|
|
1947
1957
|
this._onExport(true);
|
|
1948
1958
|
oEvent.setMarked();
|
|
1949
1959
|
oEvent.preventDefault();
|
|
@@ -1965,96 +1975,18 @@ sap.ui.define([
|
|
|
1965
1975
|
};
|
|
1966
1976
|
|
|
1967
1977
|
Table.prototype._createTable = function() {
|
|
1968
|
-
var
|
|
1969
|
-
var oRowSettings = this.getRowSettings() ? this.getRowSettings().getAllSettings() : {};
|
|
1970
|
-
|
|
1971
|
-
if (this._bMobileTable) {
|
|
1972
|
-
this._oTable = ResponsiveTableType.createTable(this.getId() + "-innerTable", {
|
|
1973
|
-
autoPopinMode: true,
|
|
1974
|
-
contextualWidth: "Auto",
|
|
1975
|
-
growing: true,
|
|
1976
|
-
sticky: [
|
|
1977
|
-
"ColumnHeaders", "HeaderToolbar", "InfoToolbar"
|
|
1978
|
-
],
|
|
1979
|
-
itemPress: [
|
|
1980
|
-
this._onItemPress, this
|
|
1981
|
-
],
|
|
1982
|
-
selectionChange: [
|
|
1983
|
-
this._onSelectionChange, this
|
|
1984
|
-
],
|
|
1985
|
-
growingThreshold: iThreshold,
|
|
1986
|
-
noData: this._getNoDataText(),
|
|
1987
|
-
headerToolbar: this._oToolbar,
|
|
1988
|
-
ariaLabelledBy: [
|
|
1989
|
-
this._oTitle
|
|
1990
|
-
]
|
|
1991
|
-
});
|
|
1992
|
-
this._oTemplate = ResponsiveTableType.createTemplate(this.getId() + "-innerTableRow", oRowSettings);
|
|
1993
|
-
this._sAggregation = "items";
|
|
1994
|
-
// map bindItems to bindRows for Mobile Table to enable reuse of rebind mechanism
|
|
1995
|
-
this._oTable.bindRows = this._oTable.bindItems;
|
|
1996
|
-
// Enable active column headers by default
|
|
1997
|
-
this._oTable.bActiveHeaders = true;
|
|
1998
|
-
this._oTable.attachEvent("columnPress", this._onResponsiveTableColumnPress, this);
|
|
1999
|
-
} else {
|
|
2000
|
-
this._oTable = GridTableType.createTable(this.getId() + "-innerTable", {
|
|
2001
|
-
enableBusyIndicator: true,
|
|
2002
|
-
enableColumnReordering: false,
|
|
2003
|
-
threshold: iThreshold,
|
|
2004
|
-
cellClick: [
|
|
2005
|
-
this._onCellClick, this
|
|
2006
|
-
],
|
|
2007
|
-
noData: this._getNoDataText(),
|
|
2008
|
-
extension: [
|
|
2009
|
-
this._oToolbar
|
|
2010
|
-
],
|
|
2011
|
-
ariaLabelledBy: [
|
|
2012
|
-
this._oTitle
|
|
2013
|
-
],
|
|
2014
|
-
plugins: [
|
|
2015
|
-
GridTableType.createMultiSelectionPlugin(this, [
|
|
2016
|
-
this._onRowSelectionChange, this
|
|
2017
|
-
])
|
|
2018
|
-
],
|
|
2019
|
-
columnSelect: [
|
|
2020
|
-
this._onGridTableColumnPress, this
|
|
2021
|
-
],
|
|
2022
|
-
rowSettingsTemplate: oRowSettings
|
|
2023
|
-
});
|
|
2024
|
-
this._sAggregation = "rows";
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
// Update defaults from TableType
|
|
2028
|
-
this._updateTypeSettings();
|
|
1978
|
+
var oType = this._getType();
|
|
2029
1979
|
|
|
2030
|
-
|
|
2031
|
-
this.
|
|
1980
|
+
this._oTable = oType.createTable(this.getId() + "-innerTable");
|
|
1981
|
+
this._oRowTemplate = oType.createRowTemplate(this.getId() + "-innerTableRow");
|
|
2032
1982
|
|
|
2033
|
-
|
|
2034
|
-
this._updateMultiSelectMode();
|
|
2035
|
-
|
|
2036
|
-
var oDDI = new DragDropInfo({
|
|
2037
|
-
sourceAggregation: "columns",
|
|
2038
|
-
targetAggregation: "columns",
|
|
2039
|
-
dropPosition: "Between",
|
|
2040
|
-
enabled: this.getActiveP13nModes().includes(P13nMode.Column),
|
|
2041
|
-
drop: [
|
|
2042
|
-
this._onColumnRearrange, this
|
|
2043
|
-
]
|
|
2044
|
-
});
|
|
2045
|
-
oDDI.bIgnoreMetadataCheck = true;
|
|
2046
|
-
this._oTable.addDragDropConfig(oDDI);
|
|
2047
|
-
|
|
2048
|
-
this._oTable.setBusyIndicatorDelay(this.getBusyIndicatorDelay());
|
|
1983
|
+
oType.updateTable();
|
|
2049
1984
|
|
|
2050
1985
|
// let the inner table get the nodata aggregation from the mdc table
|
|
2051
1986
|
if (this.getNoData()) {
|
|
2052
1987
|
this.setNoData(this.getNoData());
|
|
2053
1988
|
}
|
|
2054
1989
|
|
|
2055
|
-
// Attach paste event
|
|
2056
|
-
this._oTable.attachPaste(this._onInnerTablePaste, this);
|
|
2057
|
-
|
|
2058
1990
|
if (this.isFilteringEnabled()) {
|
|
2059
1991
|
insertFilterInfoBar(this);
|
|
2060
1992
|
}
|
|
@@ -2065,157 +1997,50 @@ sap.ui.define([
|
|
|
2065
1997
|
*
|
|
2066
1998
|
* @private
|
|
2067
1999
|
*/
|
|
2068
|
-
Table.prototype.
|
|
2069
|
-
|
|
2070
|
-
return;
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
var bEnableColumnResizer = this.getEnableColumnResize();
|
|
2074
|
-
var oTableType = this._bMobileTable ? ResponsiveTableType : GridTableType;
|
|
2000
|
+
Table.prototype._updateColumnResize = function() {
|
|
2001
|
+
var oType = this._getType();
|
|
2075
2002
|
|
|
2076
|
-
if (
|
|
2077
|
-
|
|
2003
|
+
if (this.getEnableColumnResize()) {
|
|
2004
|
+
oType.enableColumnResize();
|
|
2078
2005
|
} else {
|
|
2079
|
-
|
|
2080
|
-
}
|
|
2081
|
-
};
|
|
2082
|
-
|
|
2083
|
-
Table.prototype._updateSelectionBehavior = function() {
|
|
2084
|
-
var oTableType = this._bMobileTable ? ResponsiveTableType : GridTableType;
|
|
2085
|
-
oTableType.updateSelection(this);
|
|
2086
|
-
};
|
|
2087
|
-
|
|
2088
|
-
Table.prototype._updateMultiSelectMode = function() {
|
|
2089
|
-
if (this._bMobileTable) {
|
|
2090
|
-
ResponsiveTableType.updateMultiSelectMode(this);
|
|
2006
|
+
oType.disableColumnResize();
|
|
2091
2007
|
}
|
|
2092
2008
|
};
|
|
2093
2009
|
|
|
2094
|
-
Table.prototype.
|
|
2095
|
-
|
|
2096
|
-
var oDroppedColumn = oEvent.getParameter("droppedControl");
|
|
2097
|
-
if (oDraggedColumn === oDroppedColumn) {
|
|
2098
|
-
return;
|
|
2099
|
-
}
|
|
2100
|
-
var sDropPosition = oEvent.getParameter("dropPosition");
|
|
2101
|
-
var iDraggedIndex = this._oTable.indexOfColumn(oDraggedColumn);
|
|
2102
|
-
var iDroppedIndex = this._oTable.indexOfColumn(oDroppedColumn);
|
|
2103
|
-
var iNewIndex = iDroppedIndex + (sDropPosition == "Before" ? 0 : 1) + (iDraggedIndex < iDroppedIndex ? -1 : 0);
|
|
2104
|
-
|
|
2105
|
-
TableSettings.moveColumn(this, iDraggedIndex, iNewIndex);
|
|
2010
|
+
Table.prototype._onColumnMove = function(mPropertyBag) {
|
|
2011
|
+
TableSettings.moveColumn(this, mPropertyBag.column, mPropertyBag.newIndex);
|
|
2106
2012
|
};
|
|
2107
2013
|
|
|
2108
|
-
Table.prototype._onColumnPress = function(
|
|
2014
|
+
Table.prototype._onColumnPress = function(mPropertyBag) {
|
|
2109
2015
|
if (this._bSuppressOpenMenu) {
|
|
2110
2016
|
return;
|
|
2111
2017
|
}
|
|
2112
2018
|
|
|
2113
|
-
var
|
|
2114
|
-
iIndex = oParent.indexOfColumn(oColumn),
|
|
2115
|
-
oMDCColumn = this.getColumns()[iIndex];
|
|
2019
|
+
var oColumn = mPropertyBag.column;
|
|
2116
2020
|
|
|
2117
2021
|
this._fullyInitialized().then(function() {
|
|
2118
|
-
if (this.
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
this.
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
});
|
|
2126
|
-
}
|
|
2127
|
-
this._oQuickActionContainer.setAssociation("column", oMDCColumn);
|
|
2128
|
-
this._oItemContainer.setAssociation("column", oMDCColumn);
|
|
2129
|
-
|
|
2130
|
-
Promise.all([
|
|
2131
|
-
this._oQuickActionContainer.initializeQuickActions(),
|
|
2132
|
-
this._oItemContainer.initializeItems()
|
|
2133
|
-
]).then(function() {
|
|
2134
|
-
if (this._oQuickActionContainer.hasQuickActions() || this._oItemContainer.hasItems()) {
|
|
2135
|
-
this._oColumnHeaderMenu.openBy(oColumn);
|
|
2136
|
-
}
|
|
2137
|
-
}.bind(this));
|
|
2138
|
-
} else {
|
|
2139
|
-
var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.mdc"),
|
|
2140
|
-
bResizeButton = this._bMobileTable && this.getEnableColumnResize();
|
|
2141
|
-
|
|
2142
|
-
if (this._oPopover) {
|
|
2143
|
-
this._oPopover.destroy();
|
|
2144
|
-
this._oPopover = null;
|
|
2145
|
-
}
|
|
2146
|
-
if (this.isSortingEnabled()) {
|
|
2147
|
-
var aAscendItems = [] , aDescendItems = [];
|
|
2148
|
-
var aSortableProperties = this.getPropertyHelper().getProperty(oMDCColumn.getDataProperty()).getSortableProperties();
|
|
2149
|
-
aSortableProperties.forEach(function(oProperty) {
|
|
2150
|
-
aAscendItems.push(new Item({
|
|
2151
|
-
text: oProperty.label,
|
|
2152
|
-
key: oProperty.name
|
|
2153
|
-
}));
|
|
2154
|
-
aDescendItems.push(new Item({
|
|
2155
|
-
text: oProperty.label,
|
|
2156
|
-
key: oProperty.name
|
|
2157
|
-
}));
|
|
2158
|
-
});
|
|
2159
|
-
|
|
2160
|
-
// create ColumnHeaderPopover
|
|
2161
|
-
if (aAscendItems.length > 0) {
|
|
2162
|
-
this._oPopover = new ColumnHeaderPopover({
|
|
2163
|
-
items: [
|
|
2164
|
-
new ColumnPopoverSelectListItem({
|
|
2165
|
-
items: aAscendItems,
|
|
2166
|
-
label: oResourceBundle.getText("table.SETTINGS_ASCENDING"),
|
|
2167
|
-
icon: "sap-icon://sort-ascending",
|
|
2168
|
-
action: [SortOrder.Ascending, this._onCustomSort, this]
|
|
2169
|
-
}),
|
|
2170
|
-
new ColumnPopoverSelectListItem({
|
|
2171
|
-
items: aDescendItems,
|
|
2172
|
-
label: oResourceBundle.getText("table.SETTINGS_DESCENDING"),
|
|
2173
|
-
icon: "sap-icon://sort-descending",
|
|
2174
|
-
action: [SortOrder.Descending, this._onCustomSort, this]
|
|
2175
|
-
})
|
|
2176
|
-
]
|
|
2177
|
-
});
|
|
2178
|
-
oColumn.addDependent(this._oPopover);
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
var oDelegate = this.getControlDelegate();
|
|
2183
|
-
var aHeaderItems = (oDelegate.addColumnMenuItems && oDelegate.addColumnMenuItems(this, oMDCColumn)) || [];
|
|
2184
|
-
var aFilterableProperties = this.getPropertyHelper().getProperty(oMDCColumn.getDataProperty()).getFilterableProperties();
|
|
2185
|
-
|
|
2186
|
-
if (this.isFilteringEnabled() && aFilterableProperties.length > 0) {
|
|
2187
|
-
var oFilter = new ColumnPopoverSelectListItem({
|
|
2188
|
-
label: oResourceBundle.getText("table.SETTINGS_FILTER"),
|
|
2189
|
-
icon: "sap-icon://filter",
|
|
2190
|
-
action: [aFilterableProperties, onShowFilterDialog, this]
|
|
2191
|
-
});
|
|
2192
|
-
aHeaderItems.unshift(oFilter);
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
|
-
if (bResizeButton) {
|
|
2196
|
-
var oColumnResize = ResponsiveTableType.startColumnResize(this._oTable, oColumn);
|
|
2197
|
-
oColumnResize && aHeaderItems.push(oColumnResize);
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
aHeaderItems.forEach(function(oItem) {
|
|
2201
|
-
this._createPopover(oItem, oColumn);
|
|
2202
|
-
}, this);
|
|
2203
|
-
this._oPopover && this._oPopover.openBy(oColumn);
|
|
2022
|
+
if (!this._oColumnHeaderMenu) {
|
|
2023
|
+
this._oQuickActionContainer = new QuickActionContainer({table: this});
|
|
2024
|
+
this._oItemContainer = new ItemContainer({table: this});
|
|
2025
|
+
this._oColumnHeaderMenu = new ColumnMenu({
|
|
2026
|
+
_quickActions: [this._oQuickActionContainer],
|
|
2027
|
+
_items: [this._oItemContainer]
|
|
2028
|
+
});
|
|
2204
2029
|
}
|
|
2030
|
+
this._oQuickActionContainer.setAssociation("column", oColumn);
|
|
2031
|
+
this._oItemContainer.setAssociation("column", oColumn);
|
|
2032
|
+
|
|
2033
|
+
Promise.all([
|
|
2034
|
+
this._oQuickActionContainer.initializeQuickActions(),
|
|
2035
|
+
this._oItemContainer.initializeItems()
|
|
2036
|
+
]).then(function() {
|
|
2037
|
+
if (this._oQuickActionContainer.hasQuickActions() || this._oItemContainer.hasItems()) {
|
|
2038
|
+
this._oColumnHeaderMenu.openBy(oColumn);
|
|
2039
|
+
}
|
|
2040
|
+
}.bind(this));
|
|
2205
2041
|
}.bind(this));
|
|
2206
2042
|
};
|
|
2207
2043
|
|
|
2208
|
-
Table.prototype._createPopover = function(oItem, oColumn) {
|
|
2209
|
-
if (this._oPopover) {
|
|
2210
|
-
this._oPopover.addItem(oItem);
|
|
2211
|
-
} else {
|
|
2212
|
-
this._oPopover = new ColumnHeaderPopover({
|
|
2213
|
-
items: oItem
|
|
2214
|
-
});
|
|
2215
|
-
oColumn.addDependent(this._oPopover);
|
|
2216
|
-
}
|
|
2217
|
-
};
|
|
2218
|
-
|
|
2219
2044
|
Table.prototype._onCustomSort = function(oEvent, sSortOrder) {
|
|
2220
2045
|
var sSortProperty = oEvent.getParameter("property");
|
|
2221
2046
|
|
|
@@ -2230,14 +2055,26 @@ sap.ui.define([
|
|
|
2230
2055
|
TableSettings.createSort(this, sSortProperty, sSortOrder, true);
|
|
2231
2056
|
};
|
|
2232
2057
|
|
|
2233
|
-
Table.prototype.
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2058
|
+
Table.prototype._onRowPress = function(mPropertyBag) {
|
|
2059
|
+
if (this.getSelectionMode() !== SelectionMode.SingleMaster) {
|
|
2060
|
+
this.fireRowPress({
|
|
2061
|
+
bindingContext: mPropertyBag.bindingContext
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2064
|
+
};
|
|
2065
|
+
|
|
2066
|
+
Table.prototype._onSelectionChange = function(mPropertyBag) {
|
|
2067
|
+
if (!this._bSelectionChangedByAPI) {
|
|
2068
|
+
this.fireSelectionChange({
|
|
2069
|
+
bindingContext: mPropertyBag.bindingContext,
|
|
2070
|
+
selected: mPropertyBag.selected,
|
|
2071
|
+
selectAll: mPropertyBag.selectAll
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
};
|
|
2239
2075
|
|
|
2240
|
-
|
|
2076
|
+
Table.prototype._onColumnResize = function(mPropertyBag) {
|
|
2077
|
+
TableSettings.createColumnWidth(this, mPropertyBag.column.getDataProperty(), mPropertyBag.width);
|
|
2241
2078
|
};
|
|
2242
2079
|
|
|
2243
2080
|
Table.prototype._onCustomGroup = function (sSortProperty) {
|
|
@@ -2329,14 +2166,14 @@ sap.ui.define([
|
|
|
2329
2166
|
};
|
|
2330
2167
|
|
|
2331
2168
|
Table.prototype._setMobileColumnTemplate = function(oColumn, iIndex) {
|
|
2332
|
-
if (!this.
|
|
2169
|
+
if (!this._oRowTemplate) {
|
|
2333
2170
|
return;
|
|
2334
2171
|
}
|
|
2335
2172
|
|
|
2336
2173
|
var oCellTemplate = oColumn.getTemplateClone();
|
|
2337
2174
|
|
|
2338
2175
|
if (iIndex >= 0) {
|
|
2339
|
-
this.
|
|
2176
|
+
this._oRowTemplate.insertCell(oCellTemplate, iIndex);
|
|
2340
2177
|
this._oTable.getItems().forEach(function(oItem) {
|
|
2341
2178
|
// ignore group headers since it does not have "cells" aggregation
|
|
2342
2179
|
if (oItem.isA("sap.m.GroupHeaderListItem")) {
|
|
@@ -2347,12 +2184,12 @@ sap.ui.define([
|
|
|
2347
2184
|
oItem.insertAggregation("cells", new InvisibleText(), iIndex, true);
|
|
2348
2185
|
});
|
|
2349
2186
|
} else {
|
|
2350
|
-
this.
|
|
2187
|
+
this._oRowTemplate.addCell(oCellTemplate);
|
|
2351
2188
|
}
|
|
2352
2189
|
};
|
|
2353
2190
|
|
|
2354
2191
|
Table.prototype._updateMobileColumnTemplate = function(oMDCColumn, iIndex) {
|
|
2355
|
-
if (!this.
|
|
2192
|
+
if (!this._oRowTemplate) {
|
|
2356
2193
|
return;
|
|
2357
2194
|
}
|
|
2358
2195
|
|
|
@@ -2361,10 +2198,10 @@ sap.ui.define([
|
|
|
2361
2198
|
|
|
2362
2199
|
// Remove cell template when column is hidden
|
|
2363
2200
|
// Remove template cell from ColumnListItem (template)
|
|
2364
|
-
if (this.
|
|
2201
|
+
if (this._oRowTemplate) {
|
|
2365
2202
|
oCellTemplate = oMDCColumn.getTemplateClone();
|
|
2366
|
-
iCellIndex = this.
|
|
2367
|
-
removeMobileItemCell(this.
|
|
2203
|
+
iCellIndex = this._oRowTemplate.indexOfCell(oCellTemplate);
|
|
2204
|
+
removeMobileItemCell(this._oRowTemplate, iCellIndex, iIndex);
|
|
2368
2205
|
}
|
|
2369
2206
|
|
|
2370
2207
|
// Remove cells from actual rendered items, as this is not done automatically
|
|
@@ -2390,95 +2227,17 @@ sap.ui.define([
|
|
|
2390
2227
|
}
|
|
2391
2228
|
}
|
|
2392
2229
|
|
|
2393
|
-
Table.prototype._onItemPress = function(oEvent) {
|
|
2394
|
-
if (this.getSelectionMode() !== library.SelectionMode.SingleMaster) {
|
|
2395
|
-
this.fireRowPress({
|
|
2396
|
-
bindingContext: oEvent.getParameter("listItem").getBindingContext()
|
|
2397
|
-
});
|
|
2398
|
-
}
|
|
2399
|
-
ResponsiveTableType._onRowActionPress.apply(this, [oEvent]);
|
|
2400
|
-
};
|
|
2401
|
-
|
|
2402
|
-
Table.prototype._onSelectionChange = function(oEvent) {
|
|
2403
|
-
var bSelectAll = oEvent.getParameter("selectAll");
|
|
2404
|
-
|
|
2405
|
-
this.fireSelectionChange({
|
|
2406
|
-
bindingContext: oEvent.getParameter("listItem").getBindingContext(),
|
|
2407
|
-
selected: oEvent.getParameter("selected"),
|
|
2408
|
-
selectAll: bSelectAll
|
|
2409
|
-
});
|
|
2410
|
-
|
|
2411
|
-
if (bSelectAll) {
|
|
2412
|
-
var oRowBinding = this.getRowBinding();
|
|
2413
|
-
|
|
2414
|
-
if (oRowBinding && this._oTable) {
|
|
2415
|
-
var iBindingRowCount = oRowBinding.getLength();
|
|
2416
|
-
var iTableRowCount = this._oTable.getItems().filter(function(oItem) {
|
|
2417
|
-
return !oItem.isGroupHeader();
|
|
2418
|
-
}).length;
|
|
2419
|
-
var bIsLengthFinal = oRowBinding.isLengthFinal();
|
|
2420
|
-
|
|
2421
|
-
if (iTableRowCount != iBindingRowCount || !bIsLengthFinal) {
|
|
2422
|
-
showMessage("table.SELECTION_LIMIT_MESSAGE", [
|
|
2423
|
-
iTableRowCount
|
|
2424
|
-
]);
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
};
|
|
2429
|
-
|
|
2430
|
-
Table.prototype._onResponsiveTableColumnPress = function(oEvent) {
|
|
2431
|
-
this._onColumnPress(oEvent.getParameter("column"));
|
|
2432
|
-
};
|
|
2433
|
-
|
|
2434
|
-
// GridTable
|
|
2435
|
-
Table.prototype._onCellClick = function(oEvent) {
|
|
2436
|
-
if (this.getSelectionMode() === library.SelectionMode.SingleMaster) {
|
|
2437
|
-
return;
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
this.fireRowPress({
|
|
2441
|
-
bindingContext: oEvent.getParameter("rowBindingContext")
|
|
2442
|
-
});
|
|
2443
|
-
};
|
|
2444
|
-
|
|
2445
|
-
Table.prototype._onRowSelectionChange = function(oEvent) {
|
|
2446
|
-
if (!this._bSelectionChangedByAPI) { // TODO Table / Plugin needs to ensure that events are only fired when "relevant" for the app.
|
|
2447
|
-
this.fireSelectionChange({
|
|
2448
|
-
bindingContext: oEvent.getParameter("rowContext"),
|
|
2449
|
-
selected: oEvent.getSource().isIndexSelected(oEvent.getParameter("rowIndex")),
|
|
2450
|
-
selectAll: oEvent.getParameter("selectAll")
|
|
2451
|
-
});
|
|
2452
|
-
}
|
|
2453
|
-
};
|
|
2454
|
-
|
|
2455
|
-
Table.prototype._onGridTableColumnPress = function(oEvent) {
|
|
2456
|
-
oEvent.preventDefault();
|
|
2457
|
-
this._onColumnPress(oEvent.getParameter("column"));
|
|
2458
|
-
};
|
|
2459
|
-
|
|
2460
2230
|
/**
|
|
2461
2231
|
* Gets contexts that have been selected by the user.
|
|
2462
2232
|
*
|
|
2463
2233
|
* @returns {sap.ui.model.Context[]} The selected contexts
|
|
2464
2234
|
* @private
|
|
2465
2235
|
* @ui5-restricted sap.fe
|
|
2466
|
-
* MDC_PUBLIC_CANDIDATE
|
|
2236
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
2467
2237
|
* @experimental The API is subject to change.
|
|
2468
2238
|
*/
|
|
2469
2239
|
Table.prototype.getSelectedContexts = function() {
|
|
2470
|
-
|
|
2471
|
-
if (this._bMobileTable) {
|
|
2472
|
-
return this._oTable.getSelectedContexts();
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
var aSelectedIndices = this._oTable.getPlugins()[0].getSelectedIndices();
|
|
2476
|
-
|
|
2477
|
-
return aSelectedIndices.map(function(iIndex) {
|
|
2478
|
-
return this._oTable.getContextByIndex(iIndex);
|
|
2479
|
-
}, this);
|
|
2480
|
-
}
|
|
2481
|
-
return [];
|
|
2240
|
+
return this._getType().getSelectedContexts();
|
|
2482
2241
|
};
|
|
2483
2242
|
|
|
2484
2243
|
/**
|
|
@@ -2486,24 +2245,16 @@ sap.ui.define([
|
|
|
2486
2245
|
*
|
|
2487
2246
|
* @private
|
|
2488
2247
|
* @ui5-restricted sap.fe
|
|
2489
|
-
* MDC_PUBLIC_CANDIDATE
|
|
2248
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
2490
2249
|
*/
|
|
2491
2250
|
Table.prototype.clearSelection = function() {
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
} else {
|
|
2496
|
-
this._bSelectionChangedByAPI = true;
|
|
2497
|
-
this._oTable.getPlugins()[0].clearSelection();
|
|
2498
|
-
this._bSelectionChangedByAPI = false;
|
|
2499
|
-
}
|
|
2500
|
-
}
|
|
2251
|
+
this._bSelectionChangedByAPI = true;
|
|
2252
|
+
this._getType().clearSelection();
|
|
2253
|
+
this._bSelectionChangedByAPI = false;
|
|
2501
2254
|
};
|
|
2502
2255
|
|
|
2503
2256
|
Table.prototype._registerInnerFilter = function(oFilter) {
|
|
2504
|
-
oFilter.attachSearch(
|
|
2505
|
-
this._rebind();
|
|
2506
|
-
}, this);
|
|
2257
|
+
oFilter.attachSearch(this._rebind, this);
|
|
2507
2258
|
};
|
|
2508
2259
|
|
|
2509
2260
|
/**
|
|
@@ -2512,10 +2263,10 @@ sap.ui.define([
|
|
|
2512
2263
|
* @returns {boolean} Whether the table is bound
|
|
2513
2264
|
* @private
|
|
2514
2265
|
* @ui5-restricted sap.fe
|
|
2515
|
-
* MDC_PUBLIC_CANDIDATE
|
|
2266
|
+
* @MDC_PUBLIC_CANDIDATE
|
|
2516
2267
|
*/
|
|
2517
2268
|
Table.prototype.isTableBound = function() {
|
|
2518
|
-
return this.
|
|
2269
|
+
return this._getType().isTableBound();
|
|
2519
2270
|
};
|
|
2520
2271
|
|
|
2521
2272
|
/**
|
|
@@ -2535,8 +2286,8 @@ sap.ui.define([
|
|
|
2535
2286
|
|
|
2536
2287
|
if (oBindingInfo.path) {
|
|
2537
2288
|
this._oTable.setShowOverlay(false);
|
|
2538
|
-
if (this.
|
|
2539
|
-
oBindingInfo.template = this.
|
|
2289
|
+
if (this._oRowTemplate) {
|
|
2290
|
+
oBindingInfo.template = this._oRowTemplate;
|
|
2540
2291
|
} else {
|
|
2541
2292
|
delete oBindingInfo.template;
|
|
2542
2293
|
}
|
|
@@ -2577,6 +2328,8 @@ sap.ui.define([
|
|
|
2577
2328
|
* @private
|
|
2578
2329
|
*/
|
|
2579
2330
|
Table.prototype._onBindingChange = function() {
|
|
2331
|
+
this._updateExportButton();
|
|
2332
|
+
|
|
2580
2333
|
/* skip calling of _updateHeaderText till data is received otherwise _announceTableUpdate
|
|
2581
2334
|
will be called to early and the user gets an incorrect announcement via screen reader of the actual table state*/
|
|
2582
2335
|
if (this._bIgnoreChange) {
|
|
@@ -2592,7 +2345,6 @@ sap.ui.define([
|
|
|
2592
2345
|
*/
|
|
2593
2346
|
Table.prototype._updateTableHeaderState = function() {
|
|
2594
2347
|
this._updateHeaderText();
|
|
2595
|
-
this._updateExportState();
|
|
2596
2348
|
};
|
|
2597
2349
|
|
|
2598
2350
|
Table.prototype._updateHeaderText = function() {
|
|
@@ -2653,7 +2405,6 @@ sap.ui.define([
|
|
|
2653
2405
|
var oPropertyHelper = this.getPropertyHelper();
|
|
2654
2406
|
|
|
2655
2407
|
aColumns.forEach(function(oColumn) {
|
|
2656
|
-
var oInnerColumn = oColumn.getInnerColumn();
|
|
2657
2408
|
var oProperty = oPropertyHelper.getProperty(oColumn.getDataProperty());
|
|
2658
2409
|
var aSortableProperties = oProperty ? oProperty.getSortableProperties().map(function(oProperty) {
|
|
2659
2410
|
return oProperty.name;
|
|
@@ -2661,13 +2412,13 @@ sap.ui.define([
|
|
|
2661
2412
|
var oSortCondition = this._getSortedProperties().find(function(oSortCondition) {
|
|
2662
2413
|
return aSortableProperties.includes(oSortCondition.name);
|
|
2663
2414
|
});
|
|
2664
|
-
var sSortOrder =
|
|
2415
|
+
var sSortOrder = SortOrder.None;
|
|
2665
2416
|
|
|
2666
|
-
if (
|
|
2667
|
-
|
|
2668
|
-
} else {
|
|
2669
|
-
oInnerColumn.setSorted(!!oSortCondition).setSortOrder(sSortOrder);
|
|
2417
|
+
if (oSortCondition) {
|
|
2418
|
+
sSortOrder = oSortCondition.descending ? SortOrder.Descending : SortOrder.Ascending;
|
|
2670
2419
|
}
|
|
2420
|
+
|
|
2421
|
+
this._getType().updateSortIndicator(oColumn, sSortOrder);
|
|
2671
2422
|
}, this);
|
|
2672
2423
|
};
|
|
2673
2424
|
|
|
@@ -2678,7 +2429,7 @@ sap.ui.define([
|
|
|
2678
2429
|
* @returns {int} the row count
|
|
2679
2430
|
*/
|
|
2680
2431
|
Table.prototype._getRowCount = function(bConsiderTotal) {
|
|
2681
|
-
var oRowBinding = this.
|
|
2432
|
+
var oRowBinding = this.getRowBinding();
|
|
2682
2433
|
|
|
2683
2434
|
if (!oRowBinding) {
|
|
2684
2435
|
return bConsiderTotal ? undefined : 0;
|
|
@@ -2714,19 +2465,12 @@ sap.ui.define([
|
|
|
2714
2465
|
* @returns {sap.ui.model.Binding} the row/items binding
|
|
2715
2466
|
*/
|
|
2716
2467
|
Table.prototype.getRowBinding = function() {
|
|
2717
|
-
return this.
|
|
2468
|
+
return this._getType().getRowBinding();
|
|
2718
2469
|
};
|
|
2719
2470
|
|
|
2720
|
-
/**
|
|
2721
|
-
* Returns the row/items binding of the internal table.
|
|
2722
|
-
*
|
|
2723
|
-
* @private
|
|
2724
|
-
* @returns {sap.ui.model.Binding} the row/items binding
|
|
2725
|
-
*/
|
|
2726
2471
|
Table.prototype._getRowBinding = function() {
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
}
|
|
2472
|
+
Log.error(this + ": The method '_getRowBinding' must not be used will be deleted soon. Use 'getRowBinding' instead.");
|
|
2473
|
+
return this.getRowBinding();
|
|
2730
2474
|
};
|
|
2731
2475
|
|
|
2732
2476
|
// TODO Util
|
|
@@ -2792,15 +2536,12 @@ sap.ui.define([
|
|
|
2792
2536
|
return aSorters;
|
|
2793
2537
|
};
|
|
2794
2538
|
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2539
|
+
Table.prototype._onPaste = function(mPropertyBag) {
|
|
2540
|
+
if (this.getEnablePaste()) {
|
|
2541
|
+
this.firePaste({
|
|
2542
|
+
data: mPropertyBag.data
|
|
2543
|
+
});
|
|
2800
2544
|
}
|
|
2801
|
-
this.firePaste({
|
|
2802
|
-
data: oEvent.getParameter("data")
|
|
2803
|
-
});
|
|
2804
2545
|
};
|
|
2805
2546
|
|
|
2806
2547
|
//Due to flexibility handling an additional invalidation on the inner control might be necessary
|
|
@@ -2819,12 +2560,14 @@ sap.ui.define([
|
|
|
2819
2560
|
* @private
|
|
2820
2561
|
*/
|
|
2821
2562
|
Table.prototype.exit = function() {
|
|
2563
|
+
this._destroyDefaultType();
|
|
2564
|
+
|
|
2822
2565
|
// Always destroy the template
|
|
2823
|
-
if (this.
|
|
2824
|
-
this.
|
|
2566
|
+
if (this._oRowTemplate) {
|
|
2567
|
+
this._oRowTemplate.destroy();
|
|
2825
2568
|
}
|
|
2826
2569
|
|
|
2827
|
-
this.
|
|
2570
|
+
this._oRowTemplate = null;
|
|
2828
2571
|
this._oTable = null;
|
|
2829
2572
|
// Destroy toolbar if Table is not yet created, normally it is destroyed automatically due to table being destroyed!
|
|
2830
2573
|
if (this._oToolbar && !this._bTableExists) {
|