@openui5/sap.m 1.100.0 → 1.102.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +18 -0
- package/THIRDPARTY.txt +5 -5
- package/package.json +4 -4
- package/src/sap/m/.library +2 -1
- package/src/sap/m/AccButton.js +1 -1
- package/src/sap/m/ActionListItem.js +1 -1
- package/src/sap/m/ActionSelect.js +1 -1
- package/src/sap/m/ActionSheet.js +10 -3
- package/src/sap/m/App.js +1 -1
- package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
- package/src/sap/m/Avatar.js +1 -1
- package/src/sap/m/Bar.js +12 -21
- package/src/sap/m/Breadcrumbs.js +3 -3
- package/src/sap/m/BreadcrumbsRenderer.js +0 -5
- package/src/sap/m/BusyDialog.js +1 -1
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +1 -1
- package/src/sap/m/Carousel.js +4 -1
- package/src/sap/m/CarouselLayout.js +1 -1
- package/src/sap/m/CarouselRenderer.js +2 -1
- package/src/sap/m/CheckBox.js +1 -1
- package/src/sap/m/ColorPalette.js +13 -1
- package/src/sap/m/ColorPalettePopover.js +1 -1
- package/src/sap/m/Column.js +10 -1
- package/src/sap/m/ColumnHeaderPopover.js +1 -1
- package/src/sap/m/ColumnListItem.js +1 -1
- package/src/sap/m/ColumnListItemRenderer.js +1 -0
- package/src/sap/m/ColumnPopoverActionItem.js +1 -1
- package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
- package/src/sap/m/ColumnPopoverItem.js +1 -1
- package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
- package/src/sap/m/ColumnPopoverSortItem.js +1 -1
- package/src/sap/m/ComboBox.js +22 -2
- package/src/sap/m/ComboBoxBase.js +4 -2
- package/src/sap/m/ComboBoxTextField.js +1 -1
- package/src/sap/m/CustomDynamicDateOption.js +1 -1
- package/src/sap/m/CustomListItem.js +1 -1
- package/src/sap/m/CustomTile.js +1 -1
- package/src/sap/m/CustomTreeItem.js +1 -1
- package/src/sap/m/DatePicker.js +53 -7
- package/src/sap/m/DatePickerRenderer.js +0 -1
- package/src/sap/m/DateRangeSelection.js +42 -4
- package/src/sap/m/DateTimeField.js +5 -2
- package/src/sap/m/DateTimeInput.js +1 -1
- package/src/sap/m/DateTimePicker.js +40 -53
- package/src/sap/m/DateTimePickerRenderer.js +2 -2
- package/src/sap/m/Dialog.js +21 -8
- package/src/sap/m/DialogRenderer.js +1 -1
- package/src/sap/m/DisplayListItem.js +1 -1
- package/src/sap/m/DraftIndicator.js +1 -1
- package/src/sap/m/DynamicDate.js +1 -1
- package/src/sap/m/DynamicDateFormat.js +5 -4
- package/src/sap/m/DynamicDateOption.js +12 -2
- package/src/sap/m/DynamicDateRange.js +107 -16
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
- package/src/sap/m/ExpandableText.js +1 -1
- package/src/sap/m/FacetFilter.js +8 -1
- package/src/sap/m/FacetFilterItem.js +1 -1
- package/src/sap/m/FacetFilterList.js +1 -1
- package/src/sap/m/FeedContent.js +1 -1
- package/src/sap/m/FeedInput.js +2 -2
- package/src/sap/m/FeedListItem.js +1 -1
- package/src/sap/m/FeedListItemAction.js +1 -1
- package/src/sap/m/Fiori20Adapter.js +2 -2
- package/src/sap/m/FlexBox.js +1 -1
- package/src/sap/m/FlexItemData.js +1 -1
- package/src/sap/m/FormattedText.js +10 -10
- package/src/sap/m/GenericTag.js +1 -1
- package/src/sap/m/GenericTagRenderer.js +10 -2
- package/src/sap/m/GenericTile.js +132 -16
- package/src/sap/m/GenericTileLineModeRenderer.js +80 -3
- package/src/sap/m/GenericTileRenderer.js +174 -87
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GrowingEnablement.js +127 -93
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +41 -21
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +3 -3
- package/src/sap/m/IconTabBarSelectList.js +1 -1
- package/src/sap/m/IconTabFilter.js +1 -1
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
- package/src/sap/m/IconTabHeader.js +1 -1
- package/src/sap/m/IconTabSeparator.js +1 -1
- package/src/sap/m/IllustratedMessage.js +19 -1
- package/src/sap/m/Illustration.js +1 -1
- package/src/sap/m/Image.js +1 -1
- package/src/sap/m/ImageContent.js +1 -1
- package/src/sap/m/Input.js +4 -10
- package/src/sap/m/InputBase.js +5 -5
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/Label.js +1 -1
- package/src/sap/m/LightBox.js +1 -1
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +1 -1
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +52 -20
- package/src/sap/m/ListBaseRenderer.js +19 -3
- package/src/sap/m/ListItemBase.js +7 -5
- package/src/sap/m/MaskEnabler.js +1 -1
- package/src/sap/m/MaskInput.js +1 -1
- package/src/sap/m/MaskInputRule.js +1 -1
- package/src/sap/m/Menu.js +1 -1
- package/src/sap/m/MenuButton.js +5 -1
- package/src/sap/m/MenuItem.js +1 -1
- package/src/sap/m/MenuListItem.js +1 -1
- package/src/sap/m/MessageBox.js +1 -1
- package/src/sap/m/MessageItem.js +1 -1
- package/src/sap/m/MessageListItem.js +1 -1
- package/src/sap/m/MessagePage.js +1 -1
- package/src/sap/m/MessagePopover.js +18 -36
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +1 -1
- package/src/sap/m/MessageToast.js +1 -1
- package/src/sap/m/MessageView.js +1 -1
- package/src/sap/m/MultiComboBox.js +3 -2
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +8 -3
- package/src/sap/m/NavContainer.js +40 -40
- package/src/sap/m/NewsContent.js +1 -1
- package/src/sap/m/NotificationList.js +1 -1
- package/src/sap/m/NotificationListBase.js +175 -79
- package/src/sap/m/NotificationListGroup.js +1 -2
- package/src/sap/m/NotificationListGroupRenderer.js +4 -16
- package/src/sap/m/NotificationListItem.js +5 -16
- package/src/sap/m/NotificationListItemRenderer.js +0 -1
- package/src/sap/m/NumericContent.js +1 -1
- package/src/sap/m/NumericInput.js +3 -2
- package/src/sap/m/NumericInputRenderer.js +13 -1
- package/src/sap/m/ObjectAttribute.js +1 -1
- package/src/sap/m/ObjectAttributeRenderer.js +1 -1
- package/src/sap/m/ObjectHeader.js +1 -1
- package/src/sap/m/ObjectIdentifier.js +1 -1
- package/src/sap/m/ObjectListItem.js +1 -1
- package/src/sap/m/ObjectMarker.js +34 -10
- package/src/sap/m/ObjectMarkerRenderer.js +14 -2
- package/src/sap/m/ObjectNumber.js +1 -1
- package/src/sap/m/ObjectStatus.js +1 -1
- package/src/sap/m/OverflowToolbar.js +17 -1
- package/src/sap/m/OverflowToolbarAssociativePopover.js +2 -2
- package/src/sap/m/OverflowToolbarButton.js +1 -1
- package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
- package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/P13nAnyFilterItem.js +1 -1
- package/src/sap/m/P13nColumnsItem.js +1 -1
- package/src/sap/m/P13nColumnsPanel.js +1 -1
- package/src/sap/m/P13nConditionPanel.js +9 -12
- package/src/sap/m/P13nDialog.js +1 -1
- package/src/sap/m/P13nDimMeasureItem.js +1 -1
- package/src/sap/m/P13nDimMeasurePanel.js +1 -1
- package/src/sap/m/P13nFilterItem.js +1 -1
- package/src/sap/m/P13nFilterPanel.js +1 -1
- package/src/sap/m/P13nGroupItem.js +1 -1
- package/src/sap/m/P13nGroupPanel.js +1 -1
- package/src/sap/m/P13nItem.js +1 -1
- package/src/sap/m/P13nPanel.js +1 -1
- package/src/sap/m/P13nSelectionItem.js +1 -1
- package/src/sap/m/P13nSelectionPanel.js +1 -1
- package/src/sap/m/P13nSortItem.js +1 -1
- package/src/sap/m/P13nSortPanel.js +1 -1
- package/src/sap/m/PDFViewer.js +3 -3
- package/src/sap/m/PDFViewerRenderer.js +15 -7
- package/src/sap/m/Page.js +4 -4
- package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/m/PagingButton.js +1 -1
- package/src/sap/m/Panel.js +1 -1
- package/src/sap/m/PlanningCalendar.js +14 -14
- package/src/sap/m/PlanningCalendarHeader.js +1 -4
- package/src/sap/m/PlanningCalendarLegend.js +1 -1
- package/src/sap/m/PlanningCalendarRow.js +1 -1
- package/src/sap/m/PlanningCalendarView.js +1 -1
- package/src/sap/m/Popover.js +15 -10
- package/src/sap/m/ProgressIndicator.js +1 -1
- package/src/sap/m/PullToRefresh.js +1 -1
- package/src/sap/m/QuickView.js +1 -1
- package/src/sap/m/QuickViewBase.js +1 -1
- package/src/sap/m/QuickViewCard.js +1 -1
- package/src/sap/m/QuickViewGroup.js +1 -1
- package/src/sap/m/QuickViewGroupElement.js +1 -1
- package/src/sap/m/QuickViewPage.js +1 -1
- package/src/sap/m/RadioButton.js +2 -2
- package/src/sap/m/RadioButtonGroup.js +3 -2
- package/src/sap/m/RangeSlider.js +19 -4
- package/src/sap/m/RatingIndicator.js +1 -1
- package/src/sap/m/ResponsivePopover.js +1 -1
- package/src/sap/m/ResponsiveScale.js +1 -1
- package/src/sap/m/ScrollBar.js +1 -1
- package/src/sap/m/ScrollContainer.js +1 -1
- package/src/sap/m/SearchField.js +1 -1
- package/src/sap/m/SegmentedButton.js +5 -3
- package/src/sap/m/SegmentedButtonItem.js +1 -1
- package/src/sap/m/Select.js +24 -3
- package/src/sap/m/SelectDialog.js +14 -18
- package/src/sap/m/SelectDialogBase.js +1 -1
- package/src/sap/m/SelectList.js +1 -1
- package/src/sap/m/SelectionDetails.js +1 -1
- package/src/sap/m/SelectionDetailsFacade.js +2 -2
- package/src/sap/m/SelectionDetailsItem.js +1 -1
- package/src/sap/m/SelectionDetailsItemLine.js +1 -1
- package/src/sap/m/Shell.js +1 -1
- package/src/sap/m/SimpleFixFlex.js +1 -1
- package/src/sap/m/SinglePlanningCalendar.js +1 -1
- package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarGrid.js +94 -52
- package/src/sap/m/SinglePlanningCalendarGridRenderer.js +10 -9
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +22 -10
- package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
- package/src/sap/m/SlideTile.js +1 -1
- package/src/sap/m/Slider.js +1 -1
- package/src/sap/m/SliderTooltip.js +1 -1
- package/src/sap/m/SliderTooltipBase.js +1 -1
- package/src/sap/m/SliderTooltipContainer.js +5 -1
- package/src/sap/m/SplitApp.js +1 -1
- package/src/sap/m/SplitButton.js +1 -1
- package/src/sap/m/SplitContainer.js +1 -1
- package/src/sap/m/StandardDynamicDateOption.js +36 -13
- package/src/sap/m/StandardListItem.js +3 -3
- package/src/sap/m/StandardListItemRenderer.js +1 -1
- package/src/sap/m/StandardTile.js +1 -1
- package/src/sap/m/StandardTreeItem.js +1 -1
- package/src/sap/m/StepInput.js +3 -3
- package/src/sap/m/SuggestionItem.js +1 -1
- package/src/sap/m/SuggestionsPopover.js +5 -13
- package/src/sap/m/Switch.js +1 -1
- package/src/sap/m/TabContainer.js +1 -1
- package/src/sap/m/TabContainerItem.js +1 -1
- package/src/sap/m/TabStrip.js +5 -3
- package/src/sap/m/TabStripItem.js +1 -1
- package/src/sap/m/Table.js +34 -3
- package/src/sap/m/TablePersoController.js +1 -1
- package/src/sap/m/TablePersoDialog.js +1 -1
- package/src/sap/m/TablePersoProvider.js +1 -1
- package/src/sap/m/TableRenderer.js +9 -4
- package/src/sap/m/TableSelectDialog.js +13 -9
- package/src/sap/m/Text.js +1 -1
- package/src/sap/m/TextArea.js +1 -1
- package/src/sap/m/Tile.js +1 -1
- package/src/sap/m/TileContainer.js +1 -1
- package/src/sap/m/TileContent.js +8 -14
- package/src/sap/m/TileContentRenderer.js +16 -7
- package/src/sap/m/TimePicker.js +52 -60
- package/src/sap/m/TimePickerClock.js +1 -1
- package/src/sap/m/TimePickerClocks.js +1 -1
- package/src/sap/m/TimePickerInputs.js +1 -1
- package/src/sap/m/TimePickerInternals.js +1 -1
- package/src/sap/m/TimePickerRenderer.js +0 -1
- package/src/sap/m/TimePickerSlider.js +1 -1
- package/src/sap/m/TimePickerSliders.js +1 -1
- package/src/sap/m/Title.js +1 -1
- package/src/sap/m/TitlePropagationSupport.js +1 -1
- package/src/sap/m/ToggleButton.js +1 -1
- package/src/sap/m/Token.js +1 -1
- package/src/sap/m/Tokenizer.js +15 -3
- package/src/sap/m/Toolbar.js +7 -1
- package/src/sap/m/ToolbarLayoutData.js +1 -1
- package/src/sap/m/ToolbarSeparator.js +1 -1
- package/src/sap/m/ToolbarSpacer.js +1 -1
- package/src/sap/m/Tree.js +1 -1
- package/src/sap/m/TreeItemBase.js +1 -1
- package/src/sap/m/UploadCollection.js +1 -1
- package/src/sap/m/UploadCollectionItem.js +2 -1
- package/src/sap/m/UploadCollectionParameter.js +2 -1
- package/src/sap/m/UploadCollectionToolbarPlaceholder.js +2 -1
- package/src/sap/m/VBox.js +1 -1
- package/src/sap/m/ValueStateHeader.js +1 -1
- package/src/sap/m/VariantManagement.js +2492 -0
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +8 -9
- package/src/sap/m/ViewSettingsFilterItem.js +1 -1
- package/src/sap/m/ViewSettingsItem.js +1 -1
- package/src/sap/m/VisibleItem.js +2 -2
- package/src/sap/m/WheelSlider.js +1 -1
- package/src/sap/m/WheelSliderContainer.js +1 -1
- package/src/sap/m/Wizard.js +22 -4
- package/src/sap/m/WizardProgressNavigator.js +10 -3
- package/src/sap/m/WizardStep.js +1 -1
- package/src/sap/m/changeHandler/AddTableColumn.js +3 -5
- package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
- package/src/sap/m/changeHandler/CombineButtons.js +1 -1
- package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
- package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
- package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
- package/src/sap/m/designtime/ListBase.designtime.js +3 -0
- package/src/sap/m/designtime/VariantManagement.designtime.js +56 -0
- package/src/sap/m/inputUtils/SuggestionsPopoverDialogMixin.js +22 -16
- package/src/sap/m/inputUtils/SuggestionsPopoverPopoverMixin.js +10 -2
- package/src/sap/m/inputUtils/highlightDOMElements.js +3 -2
- package/src/sap/m/library.js +55 -19
- package/src/sap/m/messagebundle.properties +168 -27
- package/src/sap/m/messagebundle_ar.properties +104 -14
- package/src/sap/m/messagebundle_bg.properties +104 -14
- package/src/sap/m/messagebundle_ca.properties +104 -14
- package/src/sap/m/messagebundle_cs.properties +104 -14
- package/src/sap/m/messagebundle_cy.properties +104 -14
- package/src/sap/m/messagebundle_da.properties +104 -14
- package/src/sap/m/messagebundle_de.properties +104 -14
- package/src/sap/m/messagebundle_el.properties +104 -14
- package/src/sap/m/messagebundle_en.properties +103 -13
- package/src/sap/m/messagebundle_en_GB.properties +103 -13
- package/src/sap/m/messagebundle_en_US_sappsd.properties +102 -12
- package/src/sap/m/messagebundle_en_US_saprigi.properties +102 -12
- package/src/sap/m/messagebundle_en_US_saptrc.properties +102 -12
- package/src/sap/m/messagebundle_es.properties +104 -14
- package/src/sap/m/messagebundle_es_MX.properties +104 -14
- package/src/sap/m/messagebundle_et.properties +104 -14
- package/src/sap/m/messagebundle_fi.properties +103 -13
- package/src/sap/m/messagebundle_fr.properties +105 -15
- package/src/sap/m/messagebundle_fr_CA.properties +104 -14
- package/src/sap/m/messagebundle_hi.properties +104 -14
- package/src/sap/m/messagebundle_hr.properties +104 -14
- package/src/sap/m/messagebundle_hu.properties +104 -14
- package/src/sap/m/messagebundle_id.properties +104 -14
- package/src/sap/m/messagebundle_it.properties +112 -22
- package/src/sap/m/messagebundle_iw.properties +104 -14
- package/src/sap/m/messagebundle_ja.properties +104 -14
- package/src/sap/m/messagebundle_kk.properties +104 -14
- package/src/sap/m/messagebundle_ko.properties +105 -15
- package/src/sap/m/messagebundle_lt.properties +104 -14
- package/src/sap/m/messagebundle_lv.properties +103 -13
- package/src/sap/m/messagebundle_ms.properties +104 -14
- package/src/sap/m/messagebundle_nl.properties +103 -13
- package/src/sap/m/messagebundle_no.properties +104 -14
- package/src/sap/m/messagebundle_pl.properties +104 -14
- package/src/sap/m/messagebundle_pt.properties +112 -22
- package/src/sap/m/messagebundle_pt_PT.properties +104 -14
- package/src/sap/m/messagebundle_ro.properties +104 -14
- package/src/sap/m/messagebundle_ru.properties +104 -14
- package/src/sap/m/messagebundle_sh.properties +104 -14
- package/src/sap/m/messagebundle_sk.properties +104 -14
- package/src/sap/m/messagebundle_sl.properties +104 -14
- package/src/sap/m/messagebundle_sv.properties +105 -15
- package/src/sap/m/messagebundle_th.properties +104 -14
- package/src/sap/m/messagebundle_tr.properties +104 -14
- package/src/sap/m/messagebundle_uk.properties +104 -14
- package/src/sap/m/messagebundle_vi.properties +104 -14
- package/src/sap/m/messagebundle_zh_CN.properties +104 -14
- package/src/sap/m/messagebundle_zh_TW.properties +104 -14
- package/src/sap/m/p13n/AbstractContainer.js +2 -2
- package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
- package/src/sap/m/p13n/BasePanel.js +9 -3
- package/src/sap/m/p13n/Container.js +11 -4
- package/src/sap/m/p13n/GroupPanel.js +17 -5
- package/src/sap/m/p13n/Popup.js +9 -2
- package/src/sap/m/p13n/QueryPanel.js +89 -37
- package/src/sap/m/p13n/SelectionPanel.js +30 -5
- package/src/sap/m/p13n/SortPanel.js +27 -13
- package/src/sap/m/plugins/ColumnResizer.js +41 -6
- package/src/sap/m/plugins/DataStateIndicator.js +3 -2
- package/src/sap/m/plugins/PasteProvider.js +1 -1
- package/src/sap/m/plugins/PluginBase.js +1 -1
- package/src/sap/m/rules/CheckBox.support.js +1 -1
- package/src/sap/m/rules/Image.support.js +1 -1
- package/src/sap/m/rules/Link.support.js +1 -1
- package/src/sap/m/rules/MessagePage.support.js +1 -1
- package/src/sap/m/rules/ObjectHeader.support.js +6 -6
- package/src/sap/m/rules/ObjectListItem.support.js +1 -1
- package/src/sap/m/rules/ObjectMarker.support.js +1 -1
- package/src/sap/m/rules/ObjectStatus.support.js +1 -1
- package/src/sap/m/rules/Select.support.js +1 -1
- package/src/sap/m/rules/Table.support.js +3 -3
- package/src/sap/m/semantic/AddAction.js +1 -1
- package/src/sap/m/semantic/CancelAction.js +1 -1
- package/src/sap/m/semantic/DeleteAction.js +1 -1
- package/src/sap/m/semantic/DetailPage.js +1 -1
- package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/m/semantic/EditAction.js +1 -1
- package/src/sap/m/semantic/FavoriteAction.js +1 -1
- package/src/sap/m/semantic/FilterAction.js +1 -1
- package/src/sap/m/semantic/FilterSelect.js +1 -1
- package/src/sap/m/semantic/FlagAction.js +1 -1
- package/src/sap/m/semantic/ForwardAction.js +1 -1
- package/src/sap/m/semantic/FullscreenPage.js +1 -1
- package/src/sap/m/semantic/GroupAction.js +1 -1
- package/src/sap/m/semantic/GroupSelect.js +1 -1
- package/src/sap/m/semantic/MainAction.js +1 -1
- package/src/sap/m/semantic/MasterPage.js +1 -1
- package/src/sap/m/semantic/MessagesIndicator.js +1 -1
- package/src/sap/m/semantic/MultiSelectAction.js +1 -1
- package/src/sap/m/semantic/NegativeAction.js +1 -1
- package/src/sap/m/semantic/OpenInAction.js +1 -1
- package/src/sap/m/semantic/PositiveAction.js +1 -1
- package/src/sap/m/semantic/PrintAction.js +1 -1
- package/src/sap/m/semantic/SaveAction.js +1 -1
- package/src/sap/m/semantic/Segment.js +1 -1
- package/src/sap/m/semantic/SegmentedContainer.js +1 -1
- package/src/sap/m/semantic/SemanticButton.js +1 -1
- package/src/sap/m/semantic/SemanticConfiguration.js +7 -14
- package/src/sap/m/semantic/SemanticControl.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/semantic/SemanticPage.js +1 -1
- package/src/sap/m/semantic/SemanticSelect.js +1 -1
- package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
- package/src/sap/m/semantic/SendEmailAction.js +1 -1
- package/src/sap/m/semantic/SendMessageAction.js +1 -1
- package/src/sap/m/semantic/ShareInJamAction.js +1 -1
- package/src/sap/m/semantic/ShareMenu.js +1 -1
- package/src/sap/m/semantic/ShareMenuPage.js +1 -1
- package/src/sap/m/semantic/SortAction.js +1 -1
- package/src/sap/m/semantic/SortSelect.js +1 -1
- package/src/sap/m/table/Util.js +98 -16
- package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
- package/src/sap/m/table/columnmenu/Entry.js +1 -11
- package/src/sap/m/table/columnmenu/Item.js +1 -1
- package/src/sap/m/table/columnmenu/ItemBase.js +11 -1
- package/src/sap/m/table/columnmenu/ItemContainer.js +29 -0
- package/src/sap/m/table/columnmenu/Menu.js +222 -34
- package/src/sap/m/table/columnmenu/MenuRenderer.js +5 -28
- package/src/sap/m/table/columnmenu/QuickAction.js +14 -3
- package/src/sap/m/table/columnmenu/QuickActionBase.js +11 -1
- package/src/sap/m/table/columnmenu/QuickActionContainer.js +29 -0
- package/src/sap/m/table/columnmenu/QuickActionItem.js +5 -5
- package/src/sap/m/table/columnmenu/QuickGroup.js +20 -16
- package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickSort.js +2 -1
- package/src/sap/m/table/columnmenu/QuickSortItem.js +29 -28
- package/src/sap/m/table/columnmenu/QuickTotal.js +20 -25
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
- package/src/sap/m/themes/base/ActionListItem.less +1 -1
- package/src/sap/m/themes/base/Avatar.less +11 -5
- package/src/sap/m/themes/base/Button.less +1 -6
- package/src/sap/m/themes/base/Carousel.less +72 -87
- package/src/sap/m/themes/base/CheckBox.less +0 -1
- package/src/sap/m/themes/base/ColumnListItem.less +0 -3
- package/src/sap/m/themes/base/ColumnMenu.less +12 -4
- package/src/sap/m/themes/base/Dialog.less +10 -6
- package/src/sap/m/themes/base/GenericTile.less +758 -179
- package/src/sap/m/themes/base/IconTabBar.less +45 -14
- package/src/sap/m/themes/base/IconTabBarSelectList.less +5 -4
- package/src/sap/m/themes/base/Input.less +1 -1
- package/src/sap/m/themes/base/InputBase.less +114 -11
- package/src/sap/m/themes/base/Label.less +3 -0
- package/src/sap/m/themes/base/LightBox.less +9 -7
- package/src/sap/m/themes/base/Link.less +12 -4
- package/src/sap/m/themes/base/ListBase.less +4 -0
- package/src/sap/m/themes/base/ListItemBase.less +1 -12
- package/src/sap/m/themes/base/MenuButton.less +16 -0
- package/src/sap/m/themes/base/MessageBox.less +5 -5
- package/src/sap/m/themes/base/MultiInput.less +1 -1
- package/src/sap/m/themes/base/NewsContent.less +0 -9
- package/src/sap/m/themes/base/NotificationListBase.less +9 -14
- package/src/sap/m/themes/base/NotificationListGroup.less +30 -44
- package/src/sap/m/themes/base/NotificationListItem.less +14 -18
- package/src/sap/m/themes/base/ObjectAttribute.less +1 -1
- package/src/sap/m/themes/base/ObjectListItem.less +3 -0
- package/src/sap/m/themes/base/ObjectMarker.less +3 -1
- package/src/sap/m/themes/base/ObjectStatus.less +8 -0
- package/src/sap/m/themes/base/Panel.less +1 -1
- package/src/sap/m/themes/base/Popover.less +10 -7
- package/src/sap/m/themes/base/QuickView.less +14 -2
- package/src/sap/m/themes/base/RadioButton.less +21 -3
- package/src/sap/m/themes/base/RatingIndicator.less +4 -0
- package/src/sap/m/themes/base/SinglePlanningCalendarGrid.less +3 -29
- package/src/sap/m/themes/base/SlideTile.less +18 -0
- package/src/sap/m/themes/base/Slider.less +18 -18
- package/src/sap/m/themes/base/StandardListItem.less +5 -9
- package/src/sap/m/themes/base/SuggestionsPopover.less +1 -1
- package/src/sap/m/themes/base/Table.less +18 -21
- package/src/sap/m/themes/base/TextArea.less +32 -0
- package/src/sap/m/themes/base/Token.less +17 -15
- package/src/sap/m/themes/base/Tokenizer.less +2 -2
- package/src/sap/m/themes/base/Toolbar.less +1 -1
- package/src/sap/m/themes/base/UploadCollection.less +2 -0
- package/src/sap/m/themes/base/ValueStateMessage.less +3 -3
- package/src/sap/m/themes/base/VariantManagement.less +97 -0
- package/src/sap/m/themes/base/Wizard.less +5 -4
- package/src/sap/m/themes/base/WizardProgressNavigator.less +8 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-EmptyCalendar.svg +73 -72
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-EmptyList.svg +33 -18
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-NoEntries.svg +1 -3
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-NoNotifications.svg +3 -5
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-SimpleBell.svg +12 -9
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-SimpleCalendar.svg +41 -40
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-SleepingBell.svg +29 -22
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-Tent.svg +28 -23
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-Connection.svg +27 -27
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-EmptyCalendar.svg +86 -85
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-EmptyList.svg +42 -26
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-NoData.svg +0 -2
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-NoEntries.svg +0 -2
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-SimpleBell.svg +15 -12
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-SimpleCalendar.svg +43 -42
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-SleepingBell.svg +49 -42
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-Tent.svg +58 -53
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-EmptyCalendar.svg +42 -41
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-EmptyList.svg +24 -16
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-NoEntries.svg +10 -20
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-NoNotifications.svg +8 -13
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-SimpleBell.svg +11 -8
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-SimpleCalendar.svg +37 -39
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-SleepingBell.svg +38 -22
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-Tent.svg +28 -23
- package/src/sap/m/themes/base/library.source.less +1 -0
- package/src/sap/m/themes/sap_hcb/Carousel.less +3 -7
- package/src/sap/m/themes/sap_hcb/ComboBoxBase.less +0 -12
- package/src/sap/m/themes/sap_hcb/InputBase.less +7 -42
- package/src/sap/m/themes/sap_hcb/Panel.less +4 -0
- package/src/sap/m/themes/sap_hcb/Popover.less +3 -0
- package/src/sap/m/themes/sap_hcb/Slider.less +11 -0
- package/src/sap/m/themes/sap_hcb/Token.less +4 -0
- package/src/sap/m/themes/sap_hcb/Tokenizer.less +1 -0
- package/src/sap/m/themes/sap_hcb/ValueStateHeader.less +4 -0
- package/src/sap/m/themes/sap_hcb/ValueStateMessage.less +12 -1
- package/src/sap/m/upload/UploadSet.js +162 -17
- package/src/sap/m/upload/UploadSetItem.js +24 -1
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +45 -0
package/src/sap/m/table/Util.js
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/m/library",
|
|
9
9
|
"sap/ui/core/Core",
|
|
10
|
-
"sap/ui/core/theming/Parameters"
|
|
11
|
-
|
|
10
|
+
"sap/ui/core/theming/Parameters",
|
|
11
|
+
"sap/m/IllustratedMessage"
|
|
12
|
+
], function(MLibrary, Core, ThemeParameters, IllustratedMessage) {
|
|
12
13
|
"use strict";
|
|
13
14
|
/*global Intl*/
|
|
14
15
|
|
|
@@ -17,7 +18,7 @@ sap.ui.define([
|
|
|
17
18
|
* @namespace
|
|
18
19
|
* @alias module:sap/m/table/Util
|
|
19
20
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
21
|
+
* @version 1.102.1
|
|
21
22
|
* @since 1.96.0
|
|
22
23
|
* @private
|
|
23
24
|
* @experimental Since 1.96.0. This class is experimental and the API might be changed in future.
|
|
@@ -63,6 +64,7 @@ sap.ui.define([
|
|
|
63
64
|
* @param {object} [mSettings] The settings object
|
|
64
65
|
* @param {int} [mSettings.maxWidth=19] The maximum content width of the field in rem
|
|
65
66
|
* @param {int} [mSettings.defaultWidth=8] The default column content width when type check fails
|
|
67
|
+
* @param {float} [mSettings.gap=0] The additional content width in rem
|
|
66
68
|
* @returns {float} The calculated width of the ODataType converted to rem
|
|
67
69
|
* @private
|
|
68
70
|
*/
|
|
@@ -71,12 +73,17 @@ sap.ui.define([
|
|
|
71
73
|
var aDateParameters = [2023, 9, 26, 22, 47, 58, 999];
|
|
72
74
|
var oUTCDate = new Date(Date.UTC.apply(0, aDateParameters));
|
|
73
75
|
var oLocalDate = new (Function.prototype.bind.apply(Date, [null].concat(aDateParameters)))();
|
|
74
|
-
var mNumericLimits = { Byte: 3, SByte: 3, Int16: 5, Int32: 9, Int64: 12, Single: 6, Float: 12, Double: 13, Decimal: 15 };
|
|
76
|
+
var mNumericLimits = { Byte: 3, SByte: 3, Int16: 5, Int32: 9, Int64: 12, Single: 6, Float: 12, Double: 13, Decimal: 15, Integer: 9 };
|
|
75
77
|
Core.attachThemeChanged(function() { fBooleanWidth = 0; });
|
|
76
78
|
|
|
77
79
|
return function(oType, mSettings) {
|
|
78
80
|
|
|
79
81
|
var sType = oType.getMetadata().getName().split(".").pop();
|
|
82
|
+
var iMaxWidth = mSettings && mSettings.maxWidth || 19;
|
|
83
|
+
var iGap = mSettings && mSettings.gap || 0;
|
|
84
|
+
var applySettings = function(fCalculatedWidth) {
|
|
85
|
+
return Math.min(fCalculatedWidth + iGap, iMaxWidth);
|
|
86
|
+
};
|
|
80
87
|
|
|
81
88
|
if (sType == "Boolean") {
|
|
82
89
|
if (!fBooleanWidth) {
|
|
@@ -85,17 +92,12 @@ sap.ui.define([
|
|
|
85
92
|
var fNoWidth = Util.measureText(oResourceBundle.getText("NO"));
|
|
86
93
|
fBooleanWidth = Math.max(fYesWidth, fNoWidth);
|
|
87
94
|
}
|
|
88
|
-
return fBooleanWidth;
|
|
95
|
+
return applySettings(fBooleanWidth);
|
|
89
96
|
}
|
|
90
97
|
|
|
91
98
|
if (sType == "String" || oType.isA("sap.ui.model.odata.type.String")) {
|
|
92
|
-
var iMaxWidth = mSettings && mSettings.maxWidth || 19;
|
|
93
99
|
var iMaxLength = parseInt(oType.getConstraints().maxLength) || 0;
|
|
94
|
-
|
|
95
|
-
if (!iMaxLength) {
|
|
96
|
-
return Math.max(Math.min(10, iMaxWidth), iMaxWidth * 0.75);
|
|
97
|
-
}
|
|
98
|
-
if (iMaxLength * 0.25 > iMaxWidth) {
|
|
100
|
+
if (!iMaxLength || iMaxLength * 0.25 > iMaxWidth) {
|
|
99
101
|
return iMaxWidth;
|
|
100
102
|
}
|
|
101
103
|
|
|
@@ -105,11 +107,12 @@ sap.ui.define([
|
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
var fWidth = Math.log(fSampleWidth - iMaxWidth * 0.16) / Math.log(iMaxWidth / 3) * (iMaxWidth / 2) * Math.pow(iMaxWidth / 19, 1 / fSampleWidth);
|
|
108
|
-
return Math.min(fWidth, fSampleWidth
|
|
110
|
+
return applySettings(Math.min(fWidth, fSampleWidth));
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
if (sType.startsWith("Date") || sType.startsWith("Time")) {
|
|
112
|
-
var
|
|
114
|
+
var mFormatOptions = oType.getFormatOptions();
|
|
115
|
+
var oDate = mFormatOptions.UTC ? oUTCDate : oLocalDate;
|
|
113
116
|
var sSample = oDate.toLocaleDateString();
|
|
114
117
|
|
|
115
118
|
if (sType == "TimeOfDay") {
|
|
@@ -118,12 +121,12 @@ sap.ui.define([
|
|
|
118
121
|
} else if (oType.isA("sap.ui.model.odata.type.Time")) {
|
|
119
122
|
sSample = oType.formatValue({ __edmType: "Edm.Time", ms: oUTCDate.valueOf() }, "string");
|
|
120
123
|
} else {
|
|
121
|
-
sSample = oType.formatValue(oDate, "string");
|
|
124
|
+
sSample = oType.formatValue(mFormatOptions.interval ? [oDate, new Date(oDate * 1.009)] : oDate, "string");
|
|
122
125
|
((oType.oFormat && oType.oFormat.oFormatOptions && oType.oFormat.oFormatOptions.pattern) || "").replace(/[MELVec]{3,4}/, function(sWideFormat) {
|
|
123
126
|
sSample += (sWideFormat.length == 4 ? "---" : "-");
|
|
124
127
|
});
|
|
125
128
|
}
|
|
126
|
-
return Util.measureText(sSample);
|
|
129
|
+
return applySettings(Util.measureText(sSample));
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
if (mNumericLimits[sType]) {
|
|
@@ -132,7 +135,7 @@ sap.ui.define([
|
|
|
132
135
|
iPrecision = Math.min(iPrecision, mNumericLimits[sType]);
|
|
133
136
|
var sNumber = 2 * Math.pow(10, iPrecision - iScale - 1);
|
|
134
137
|
sNumber = oType.formatValue(sNumber, "string");
|
|
135
|
-
return Util.measureText(sNumber);
|
|
138
|
+
return applySettings(Util.measureText(sNumber));
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
return mSettings && mSettings.defaultWidth || 8;
|
|
@@ -190,6 +193,85 @@ sap.ui.define([
|
|
|
190
193
|
};
|
|
191
194
|
})();
|
|
192
195
|
|
|
196
|
+
/**
|
|
197
|
+
* Calculates the width of a table column.
|
|
198
|
+
*
|
|
199
|
+
* @param {sap.ui.model.odata.type.ODataType[]} vTypes The ODataType instances
|
|
200
|
+
* @param {string} [sHeader] The header of the column
|
|
201
|
+
* @param {object} [mSettings] The settings object
|
|
202
|
+
* @param {int} [mSettings.minWidth=2] The minimum content width of the field in rem
|
|
203
|
+
* @param {int} [mSettings.maxWidth=19] The maximum content width of the field in rem
|
|
204
|
+
* @param {int} [mSettings.padding=1] The sum of column padding and border in rem
|
|
205
|
+
* @param {float} [mSettings.gap=0] The additional content width in rem
|
|
206
|
+
* @param {boolean} [mSettings.verticalArrangement=false] Whether the fields are arranged vertically
|
|
207
|
+
* @param {int} [mSettings.defaultWidth=8] The default column content width when type check fails
|
|
208
|
+
* @returns {string} The calculated width of the column
|
|
209
|
+
* @private
|
|
210
|
+
* @ui5-restricted sap.fe, sap.ui.mdc, sap.ui.comp
|
|
211
|
+
* @since 1.101
|
|
212
|
+
*/
|
|
213
|
+
Util.calcColumnWidth = function(vTypes, sHeader, mSettings) {
|
|
214
|
+
if (!Array.isArray(vTypes)) {
|
|
215
|
+
vTypes = [vTypes];
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
mSettings = Object.assign({
|
|
219
|
+
minWidth: 2,
|
|
220
|
+
maxWidth: 19,
|
|
221
|
+
defaultWidth: 8,
|
|
222
|
+
padding: 1,
|
|
223
|
+
gap: 0,
|
|
224
|
+
verticalArrangement: false
|
|
225
|
+
}, mSettings);
|
|
226
|
+
|
|
227
|
+
var fHeaderWidth = 0;
|
|
228
|
+
var iMinWidth = Math.max(1, mSettings.minWidth);
|
|
229
|
+
var iMaxWidth = Math.max(iMinWidth, mSettings.maxWidth);
|
|
230
|
+
|
|
231
|
+
var fContentWidth = mSettings.gap + vTypes.reduce(function(fInnerWidth, vType) {
|
|
232
|
+
var oType = vType, oTypeSettings = {
|
|
233
|
+
defaultWidth: mSettings.defaultWidth,
|
|
234
|
+
maxWidth: mSettings.maxWidth
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
if (Array.isArray(vType)) {
|
|
238
|
+
// for internal usage (mdc/Table) every field can provide own width settings
|
|
239
|
+
// in this case we get [<TypeInstance>, <TypeSettings>][] instead of <TypeInstance>[]
|
|
240
|
+
oType = vType[0];
|
|
241
|
+
oTypeSettings = vType[1] || oTypeSettings;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
var fTypeWidth = Util.calcTypeWidth(oType, oTypeSettings);
|
|
245
|
+
return mSettings.verticalArrangement ? Math.max(fInnerWidth, fTypeWidth) : fInnerWidth + fTypeWidth + (fInnerWidth && 0.5);
|
|
246
|
+
}, 0);
|
|
247
|
+
|
|
248
|
+
if (sHeader) {
|
|
249
|
+
fHeaderWidth = Util.calcHeaderWidth(sHeader, fContentWidth, iMaxWidth, iMinWidth);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
fContentWidth = Math.max(iMinWidth, fContentWidth, fHeaderWidth);
|
|
253
|
+
fContentWidth = Math.min(fContentWidth, iMaxWidth);
|
|
254
|
+
fContentWidth = Math.round(fContentWidth * 100) / 100;
|
|
255
|
+
|
|
256
|
+
return fContentWidth + mSettings.padding + "rem";
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Returns an instance of <code>sap.m.IllustratedMessage</code> in case there are no visible columns in the table.
|
|
261
|
+
*
|
|
262
|
+
* @returns {sap.m.IllustratedMessage} The message to be displayed when the table has no visible columns
|
|
263
|
+
* @private
|
|
264
|
+
*/
|
|
265
|
+
Util.getNoColumnsIllustratedMessage = function() {
|
|
266
|
+
var oResourceBundle = Core.getLibraryResourceBundle("sap.m");
|
|
267
|
+
|
|
268
|
+
return new IllustratedMessage({
|
|
269
|
+
illustrationType: MLibrary.IllustratedMessageType.AddColumn,
|
|
270
|
+
title: oResourceBundle.getText("TABLE_NO_COLUMNS_TITLE"),
|
|
271
|
+
description: oResourceBundle.getText("TABLE_NO_COLUMNS_DESCRIPTION")
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
|
|
193
275
|
return Util;
|
|
194
276
|
|
|
195
277
|
});
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @extends sap.ui.core.Element
|
|
24
24
|
*
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.102.1
|
|
27
27
|
*
|
|
28
28
|
* @private
|
|
29
29
|
* @experimental
|
|
@@ -87,15 +87,5 @@ sap.ui.define([
|
|
|
87
87
|
throw new Error(this + " does not implement #getContent");
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
Entry.prototype.setVisible = function (bVisible) {
|
|
91
|
-
if (this.getVisible() == bVisible) {
|
|
92
|
-
return this;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
this.setProperty("visible", bVisible);
|
|
96
|
-
this.getMenu() && this.getMenu()._setItemVisibility(this, bVisible);
|
|
97
|
-
return this;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
90
|
return Entry;
|
|
101
91
|
});
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @extends sap.m.table.columnmenu.Entry
|
|
24
24
|
*
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.102.1
|
|
27
27
|
*
|
|
28
28
|
* @private
|
|
29
29
|
* @experimental
|
|
@@ -148,5 +148,15 @@ sap.ui.define([
|
|
|
148
148
|
this.getMenu() && this.getMenu()._updateButtonState(this);
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
+
ItemBase.prototype.setVisible = function (bVisible) {
|
|
152
|
+
if (this.getVisible() == bVisible) {
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
this.setProperty("visible", bVisible);
|
|
157
|
+
this.getMenu() && this.getMenu()._setItemVisibility(this, bVisible);
|
|
158
|
+
return this;
|
|
159
|
+
};
|
|
160
|
+
|
|
151
161
|
return ItemBase;
|
|
152
162
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/m/table/columnmenu/ItemBase"
|
|
8
|
+
], function(
|
|
9
|
+
ItemBase
|
|
10
|
+
) {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
var ItemContainer = ItemBase.extend("sap.m.table.columnmenu.ItemContainer", {
|
|
14
|
+
metadata: {
|
|
15
|
+
library: "sap.m",
|
|
16
|
+
aggregations: {
|
|
17
|
+
items: {type: "sap.m.table.columnmenu.ItemBase"}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
ItemContainer.prototype.getEffectiveItems = function() {
|
|
23
|
+
return this.getItems().reduce(function(aItems, oItem) {
|
|
24
|
+
return aItems.concat(oItem.getEffectiveItems());
|
|
25
|
+
}, []);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return ItemContainer;
|
|
29
|
+
});
|
|
@@ -9,28 +9,46 @@ sap.ui.define([
|
|
|
9
9
|
"sap/m/Toolbar",
|
|
10
10
|
"sap/m/ToolbarSpacer",
|
|
11
11
|
"sap/m/library",
|
|
12
|
+
'sap/ui/Device',
|
|
12
13
|
"sap/ui/core/Control",
|
|
13
14
|
"sap/ui/core/Core",
|
|
14
15
|
"sap/ui/core/library",
|
|
15
16
|
"sap/ui/thirdparty/jquery",
|
|
17
|
+
"sap/ui/dom/containsOrEquals",
|
|
18
|
+
"sap/ui/events/ControlEvents",
|
|
16
19
|
"sap/base/strings/capitalize",
|
|
17
20
|
"sap/m/p13n/AbstractContainerItem",
|
|
18
21
|
"sap/m/p13n/Container",
|
|
19
|
-
"sap/m/table/columnmenu/MenuRenderer"
|
|
22
|
+
"sap/m/table/columnmenu/MenuRenderer",
|
|
23
|
+
"sap/ui/layout/form/Form",
|
|
24
|
+
"sap/ui/layout/GridData",
|
|
25
|
+
"sap/ui/layout/form/ResponsiveGridLayout",
|
|
26
|
+
"sap/ui/layout/form/FormContainer",
|
|
27
|
+
"sap/ui/layout/form/FormElement",
|
|
28
|
+
"sap/m/Label"
|
|
20
29
|
], function (
|
|
21
30
|
ResponsivePopover,
|
|
22
31
|
Button,
|
|
23
32
|
Toolbar,
|
|
24
33
|
ToolbarSpacer,
|
|
25
34
|
library,
|
|
35
|
+
Device,
|
|
26
36
|
Control,
|
|
27
37
|
Core,
|
|
28
38
|
coreLibrary,
|
|
29
39
|
jQuery,
|
|
40
|
+
containsOrEquals,
|
|
41
|
+
ControlEvents,
|
|
30
42
|
capitalize,
|
|
31
43
|
AbstractContainerItem,
|
|
32
44
|
Container,
|
|
33
|
-
MenuRenderer
|
|
45
|
+
MenuRenderer,
|
|
46
|
+
Form,
|
|
47
|
+
GridData,
|
|
48
|
+
ResponsiveGridLayout,
|
|
49
|
+
FormContainer,
|
|
50
|
+
FormElement,
|
|
51
|
+
Label
|
|
34
52
|
) {
|
|
35
53
|
"use strict";
|
|
36
54
|
|
|
@@ -57,7 +75,7 @@ sap.ui.define([
|
|
|
57
75
|
* @extends sap.ui.core.Control
|
|
58
76
|
*
|
|
59
77
|
* @author SAP SE
|
|
60
|
-
* @version 1.
|
|
78
|
+
* @version 1.102.1
|
|
61
79
|
*
|
|
62
80
|
* @private
|
|
63
81
|
* @experimental
|
|
@@ -69,16 +87,44 @@ sap.ui.define([
|
|
|
69
87
|
library: "sap.m",
|
|
70
88
|
interfaces: ["sap.ui.core.IColumnHeaderMenu"],
|
|
71
89
|
aggregations: {
|
|
90
|
+
/**
|
|
91
|
+
* Defines the quick actions of the column menu.
|
|
92
|
+
*/
|
|
72
93
|
quickActions: { type: "sap.m.table.columnmenu.QuickActionBase" },
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Defines the items of the column menu.
|
|
97
|
+
*/
|
|
73
98
|
items: { type: "sap.m.table.columnmenu.ItemBase" },
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Defines quick actions that are control-specific.
|
|
102
|
+
* @private
|
|
103
|
+
*/
|
|
74
104
|
_quickActions: { type: "sap.m.table.columnmenu.QuickActionBase", visibility: "hidden" },
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Defines menu items that are control-specific.
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
75
110
|
_items: { type: "sap.m.table.columnmenu.ItemBase", visibility: "hidden" }
|
|
76
111
|
}
|
|
77
|
-
}
|
|
112
|
+
},
|
|
113
|
+
renderer: MenuRenderer
|
|
78
114
|
});
|
|
79
115
|
|
|
80
116
|
var DEFAULT_KEY = "$default";
|
|
81
117
|
var ARIA_POPUP_TYPE = HasPopup.Dialog;
|
|
118
|
+
var MENU_WIDTH = "500px";
|
|
119
|
+
|
|
120
|
+
Menu.prototype.init = function() {
|
|
121
|
+
this.fAnyEventHandlerProxy = jQuery.proxy(function(oEvent){
|
|
122
|
+
if (!this._oPopover.isOpen() || !this.getDomRef() || (oEvent.type != "mousedown" && oEvent.type != "touchstart")) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.handleOuterEvent(this.getId(), oEvent);
|
|
126
|
+
}, this);
|
|
127
|
+
};
|
|
82
128
|
|
|
83
129
|
Menu.prototype.applySettings = function (mSettings) {
|
|
84
130
|
// Only works in JS views, but that's fine. This is only convenience for controls.
|
|
@@ -101,12 +147,16 @@ sap.ui.define([
|
|
|
101
147
|
}
|
|
102
148
|
|
|
103
149
|
this._initPopover();
|
|
150
|
+
this._createQuickActionGrids();
|
|
104
151
|
|
|
105
|
-
if (
|
|
106
|
-
this.
|
|
152
|
+
if (this._oItemsContainer) {
|
|
153
|
+
this._oItemsContainer.destroy();
|
|
154
|
+
this._oItemsContainer = null;
|
|
107
155
|
}
|
|
156
|
+
this._initItemsContainer();
|
|
108
157
|
|
|
109
158
|
this._oPopover.openBy(oAnchor);
|
|
159
|
+
ControlEvents.bindAnyEvent(this.fAnyEventHandlerProxy);
|
|
110
160
|
};
|
|
111
161
|
|
|
112
162
|
/**
|
|
@@ -130,6 +180,7 @@ sap.ui.define([
|
|
|
130
180
|
if (this._oPopover) {
|
|
131
181
|
this._oPopover.close();
|
|
132
182
|
}
|
|
183
|
+
ControlEvents.unbindAnyEvent(this.fAnyEventHandlerProxy);
|
|
133
184
|
};
|
|
134
185
|
|
|
135
186
|
Menu.prototype.exit = function () {
|
|
@@ -140,6 +191,7 @@ sap.ui.define([
|
|
|
140
191
|
if (this._oItemsContainer) {
|
|
141
192
|
delete this._oItemsContainer;
|
|
142
193
|
}
|
|
194
|
+
ControlEvents.unbindAnyEvent(this.fAnyEventHandlerProxy);
|
|
143
195
|
};
|
|
144
196
|
|
|
145
197
|
Menu.prototype._addAllToPrivateAggregation = function (mSettings, sAggregationName) {
|
|
@@ -161,7 +213,7 @@ sap.ui.define([
|
|
|
161
213
|
showHeader: false,
|
|
162
214
|
placement: library.PlacementType.Bottom,
|
|
163
215
|
content: new AssociativeControl({control: this, height: true}),
|
|
164
|
-
contentWidth:
|
|
216
|
+
contentWidth: MENU_WIDTH,
|
|
165
217
|
horizontalScrolling: false,
|
|
166
218
|
verticalScrolling: false,
|
|
167
219
|
afterClose: [this.close, this]
|
|
@@ -172,30 +224,84 @@ sap.ui.define([
|
|
|
172
224
|
"onAfterRendering": this._focusItem
|
|
173
225
|
}, this);
|
|
174
226
|
|
|
175
|
-
if (this.getItems().length
|
|
227
|
+
if (this.getItems().length === 0 && !this.getAggregation("_items")) {
|
|
176
228
|
this._oPopover.attachAfterOpen(this._focusInitialQuickAction.bind(this));
|
|
229
|
+
} else {
|
|
230
|
+
// focus the first visible menu item
|
|
231
|
+
this._oPopover.attachAfterOpen(function () {
|
|
232
|
+
var oItem = this._oItemsContainer._getNavigationList().getItems().find(function (oItem) {
|
|
233
|
+
return oItem.getVisible();
|
|
234
|
+
});
|
|
235
|
+
oItem && oItem.focus();
|
|
236
|
+
}.bind(this));
|
|
237
|
+
}
|
|
238
|
+
this._oPopover._oControl.oPopup.setAutoClose(false);
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
Menu.prototype.onsapfocusleave = function(oEvent){
|
|
242
|
+
if (!this._oPopover.isOpen()) {
|
|
243
|
+
return;
|
|
177
244
|
}
|
|
245
|
+
this.handleOuterEvent(this.getId(), oEvent);
|
|
178
246
|
};
|
|
179
247
|
|
|
248
|
+
Menu.prototype.handleOuterEvent = function(oMenuId, oEvent) {
|
|
249
|
+
var isInMenuHierarchy = false,
|
|
250
|
+
touchEnabled = Device.support.touch || Device.system.combi;
|
|
251
|
+
|
|
252
|
+
if (oEvent.type == "mousedown" || oEvent.type == "touchstart") {
|
|
253
|
+
// Suppress the delayed mouse event from mobile browser
|
|
254
|
+
if (touchEnabled && (oEvent.isMarked("delayedMouseEvent") || oEvent.isMarked("cancelAutoClose"))) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (containsOrEquals(this.getDomRef(), oEvent.target) || containsOrEquals(Core.getStaticAreaRef(), oEvent.target) ||
|
|
259
|
+
isInControlTree(this, Core.byId(oEvent.target.id))) {
|
|
260
|
+
isInMenuHierarchy = true;
|
|
261
|
+
}
|
|
262
|
+
} else if (oEvent.type == "sapfocusleave") {
|
|
263
|
+
if (touchEnabled) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if (oEvent.relatedControlId) {
|
|
268
|
+
if (containsOrEquals(this.getDomRef(), jQuery(document.getElementById(oEvent.relatedControlId)).get(0)) ||
|
|
269
|
+
isInControlTree(this, Core.byId(oEvent.relatedControlId))) {
|
|
270
|
+
isInMenuHierarchy = true;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (!isInMenuHierarchy) {
|
|
276
|
+
this.close();
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
function isInControlTree(oParent, oChild) {
|
|
281
|
+
var temp = oChild.getParent();
|
|
282
|
+
if (!temp) {
|
|
283
|
+
return false;
|
|
284
|
+
} else if (temp === oParent) {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
return isInControlTree(oParent, temp);
|
|
288
|
+
}
|
|
289
|
+
|
|
180
290
|
Menu.prototype._initItemsContainer = function () {
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
var aApplicationMenuItems = this.getItems().reduce(function (aItems, oItem) {
|
|
185
|
-
return aItems.concat(oItem.getEffectiveItems());
|
|
186
|
-
}, []);
|
|
291
|
+
var aMenuItems = this._getAllEffectiveItems();
|
|
292
|
+
var bHasQuickActions = this._hasQuickActions();
|
|
293
|
+
var bHasitems = this._hasItems();
|
|
187
294
|
|
|
188
295
|
if (!this._oItemsContainer) {
|
|
189
296
|
this._createItemsContainer();
|
|
190
297
|
}
|
|
191
298
|
|
|
192
|
-
|
|
299
|
+
aMenuItems.forEach(function (oColumnMenuItem, iIndex) {
|
|
193
300
|
this._addView(oColumnMenuItem);
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
iIndex == 0 && this._oItemsContainer.addSeparator();
|
|
301
|
+
|
|
302
|
+
if (bHasQuickActions && bHasitems && iIndex === 0) {
|
|
303
|
+
this._oItemsContainer.addSeparator();
|
|
304
|
+
}
|
|
199
305
|
}.bind(this));
|
|
200
306
|
};
|
|
201
307
|
|
|
@@ -245,12 +351,12 @@ sap.ui.define([
|
|
|
245
351
|
var sKey = oMenu._oItemsContainer.getCurrentViewKey();
|
|
246
352
|
if (oMenu._fireEvent(Core.byId(sKey), "cancel")) {
|
|
247
353
|
oMenu.close();
|
|
248
|
-
oMenu.exit();
|
|
249
354
|
}
|
|
250
355
|
}
|
|
251
356
|
});
|
|
252
357
|
this._oBtnOk = new Button({
|
|
253
358
|
text: this._getResourceText("table.COLUMNMENU_CONFIRM"),
|
|
359
|
+
type: library.ButtonType.Emphasized,
|
|
254
360
|
press: function () {
|
|
255
361
|
var sKey = oMenu._oItemsContainer.getCurrentViewKey();
|
|
256
362
|
if (oMenu._fireEvent(Core.byId(sKey), "confirm")) {
|
|
@@ -275,9 +381,8 @@ sap.ui.define([
|
|
|
275
381
|
if (mParameters.target !== "$default") {
|
|
276
382
|
var oContainerItem = oMenu._oItemsContainer.getView(mParameters.target);
|
|
277
383
|
var oColumnMenuItem = oMenu._getItemFromContainerItem(oContainerItem);
|
|
278
|
-
if (oColumnMenuItem &&
|
|
384
|
+
if (oColumnMenuItem && !oMenu._fireEvent(oColumnMenuItem, "press")) {
|
|
279
385
|
oEvent.preventDefault();
|
|
280
|
-
return;
|
|
281
386
|
}
|
|
282
387
|
}
|
|
283
388
|
},
|
|
@@ -326,22 +431,48 @@ sap.ui.define([
|
|
|
326
431
|
return sText ? this.oResourceBundle.getText(sText, vValue) : this.oResourceBundle;
|
|
327
432
|
};
|
|
328
433
|
|
|
434
|
+
Menu.prototype._getAllEffectiveQuickActions = function() {
|
|
435
|
+
var aQuickActions = (this.getAggregation("_quickActions") || []).concat(this.getQuickActions());
|
|
436
|
+
return aQuickActions.reduce(function (a, oQuickAction) {
|
|
437
|
+
return a.concat(oQuickAction.getEffectiveQuickActions());
|
|
438
|
+
}, []).filter(function (oQuickAction) {
|
|
439
|
+
return oQuickAction.getVisible();
|
|
440
|
+
});
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
Menu.prototype._hasQuickActions = function() {
|
|
444
|
+
return this._getAllEffectiveQuickActions().length > 0;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
Menu.prototype._getAllEffectiveItems = function() {
|
|
448
|
+
var aItems = (this.getAggregation("_items") || []).concat(this.getItems());
|
|
449
|
+
return aItems.reduce(function(a, oItem) {
|
|
450
|
+
return a.concat(oItem.getEffectiveItems());
|
|
451
|
+
}, []).filter(function (oItem) {
|
|
452
|
+
return oItem.getVisible();
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
Menu.prototype._hasItems = function() {
|
|
457
|
+
return this._getAllEffectiveItems().length > 0;
|
|
458
|
+
};
|
|
459
|
+
|
|
329
460
|
Menu.prototype._getItemFromContainerItem = function (oContainerItem) {
|
|
330
461
|
// Low performance as linear search has to be done
|
|
331
|
-
|
|
332
|
-
return item.getId()
|
|
462
|
+
return this._getAllEffectiveItems().find(function(item) {
|
|
463
|
+
return item.getId() === oContainerItem.getKey();
|
|
333
464
|
});
|
|
334
|
-
if (!oItem) {
|
|
335
|
-
oItem = this.getAggregation("items") && this.getAggregation("items").find(function(item) {
|
|
336
|
-
return item.getId() == oContainerItem.getKey();
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
return oItem;
|
|
340
465
|
};
|
|
341
466
|
|
|
342
467
|
Menu.prototype._updateButtonState = function (oItem) {
|
|
343
|
-
this._oItemsContainer
|
|
468
|
+
if (!this._oItemsContainer) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
if (this._oItemsContainer.getCurrentViewKey() === DEFAULT_KEY) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
344
474
|
this._oItemsContainer.getHeader().getContentRight()[0].setVisible(oItem.getButtonSettings()["reset"]["visible"]);
|
|
475
|
+
this._oItemsContainer.getHeader().getContentRight()[0].setEnabled(oItem.getButtonSettings()["reset"]["enabled"]);
|
|
345
476
|
this._oBtnOk.setVisible(oItem.getButtonSettings()["confirm"]["visible"]);
|
|
346
477
|
this._oBtnCancel.setVisible(oItem.getButtonSettings()["cancel"]["visible"]);
|
|
347
478
|
};
|
|
@@ -359,14 +490,14 @@ sap.ui.define([
|
|
|
359
490
|
|
|
360
491
|
Menu.prototype._focusInitialQuickAction = function () {
|
|
361
492
|
// Does not work with content, which contains multiple items
|
|
362
|
-
if (this.getItems().length
|
|
493
|
+
if (this.getItems().length === 0 && !this.getAggregation("_items")) {
|
|
363
494
|
var aQuickActions = [];
|
|
364
495
|
if (this.getAggregation("_quickActions")) {
|
|
365
496
|
aQuickActions = this.getAggregation("_quickActions")[0].getEffectiveQuickActions();
|
|
366
497
|
} else if (this.getQuickActions().length > 0) {
|
|
367
498
|
aQuickActions = this.getQuickActions()[0].getEffectiveQuickActions();
|
|
368
499
|
}
|
|
369
|
-
aQuickActions.length > 0 && aQuickActions[0].getContent().focus();
|
|
500
|
+
aQuickActions.length > 0 && aQuickActions[0].getContent()[0].focus();
|
|
370
501
|
}
|
|
371
502
|
};
|
|
372
503
|
|
|
@@ -378,5 +509,62 @@ sap.ui.define([
|
|
|
378
509
|
oListItem && oListItem.setVisible(bVisible);
|
|
379
510
|
};
|
|
380
511
|
|
|
512
|
+
Menu.prototype._createQuickActionGrids = function () {
|
|
513
|
+
var oFormContainer;
|
|
514
|
+
if (this._oForm) {
|
|
515
|
+
oFormContainer = this._oForm.getFormContainers()[0];
|
|
516
|
+
oFormContainer.destroyFormElements();
|
|
517
|
+
} else {
|
|
518
|
+
oFormContainer = new FormContainer();
|
|
519
|
+
this._oForm = new Form({
|
|
520
|
+
layout: new ResponsiveGridLayout({
|
|
521
|
+
labelSpanXL: 3,
|
|
522
|
+
labelSpanL: 3,
|
|
523
|
+
labelSpanM: 3,
|
|
524
|
+
labelSpanS: 12,
|
|
525
|
+
adjustLabelSpan: false
|
|
526
|
+
}),
|
|
527
|
+
editable: true,
|
|
528
|
+
formContainers: oFormContainer
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
var aEffectiveQuickActions = this._getAllEffectiveQuickActions();
|
|
533
|
+
aEffectiveQuickActions.forEach(function (oEffectiveQuickAction) {
|
|
534
|
+
if (!oEffectiveQuickAction.getVisible()) {
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
// Create label
|
|
538
|
+
var oGridData = new GridData({span: "XL4 L4 M4 S12"});
|
|
539
|
+
var oLabel = new Label({
|
|
540
|
+
text: oEffectiveQuickAction.getLabel(),
|
|
541
|
+
layoutData: oGridData,
|
|
542
|
+
vAlign: sap.ui.core.VerticalAlign.Middle,
|
|
543
|
+
wrapping: true
|
|
544
|
+
}).setWidth("100%");
|
|
545
|
+
oLabel.addStyleClass("sapMTCMenuQALabel");
|
|
546
|
+
|
|
547
|
+
// Create content
|
|
548
|
+
var aControls = [];
|
|
549
|
+
var aContent = oEffectiveQuickAction.getContent();
|
|
550
|
+
|
|
551
|
+
aContent.forEach(function (oItem) {
|
|
552
|
+
if (oItem.getLayoutData()) {
|
|
553
|
+
oGridData = oItem.getLayoutData().clone();
|
|
554
|
+
} else {
|
|
555
|
+
var iSpan = Math.floor(8 / aContent.length);
|
|
556
|
+
var iSpanS = aContent.length > 2 ? 12 : Math.floor(12 / aContent.length);
|
|
557
|
+
oGridData = new GridData({spanS: iSpanS, spanM: iSpan, spanL: iSpan, spanXL: iSpan});
|
|
558
|
+
}
|
|
559
|
+
var oControl = new AssociativeControl({control: oItem.setWidth("100%")});
|
|
560
|
+
oControl.setLayoutData(oGridData);
|
|
561
|
+
aControls.push(oControl);
|
|
562
|
+
}, this);
|
|
563
|
+
oFormContainer.addFormElement(new FormElement({label: oLabel, fields: aControls}));
|
|
564
|
+
}, this);
|
|
565
|
+
|
|
566
|
+
this.addDependent(this._oForm);
|
|
567
|
+
};
|
|
568
|
+
|
|
381
569
|
return Menu;
|
|
382
570
|
});
|