@openui5/sap.m 1.120.6 → 1.121.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 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +4 -4
- package/src/sap/m/.library +18 -2
- package/src/sap/m/AccButton.js +1 -1
- package/src/sap/m/ActionListItem.js +1 -1
- package/src/sap/m/ActionSelect.js +11 -11
- package/src/sap/m/ActionSheet.js +12 -8
- package/src/sap/m/ActionSheetRenderer.js +4 -4
- package/src/sap/m/ActionTile.js +7 -1
- package/src/sap/m/ActionTileContent.js +86 -7
- package/src/sap/m/ActionTileContentRenderer.js +4 -41
- package/src/sap/m/AdditionalTextButton.js +1 -1
- package/src/sap/m/App.js +1 -1
- package/src/sap/m/AssociativeOverflowToolbar.js +6 -6
- package/src/sap/m/Avatar.js +32 -14
- package/src/sap/m/Bar.js +5 -5
- package/src/sap/m/BarRenderer.js +3 -3
- package/src/sap/m/Breadcrumbs.js +12 -4
- package/src/sap/m/BreadcrumbsRenderer.js +1 -1
- package/src/sap/m/BusyDialog.js +19 -33
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +8 -8
- package/src/sap/m/ButtonRenderer.js +0 -4
- package/src/sap/m/Carousel.js +53 -25
- package/src/sap/m/CarouselLayout.js +14 -3
- package/src/sap/m/CarouselRenderer.js +4 -4
- package/src/sap/m/CheckBox.js +46 -5
- package/src/sap/m/CheckBoxRenderer.js +10 -3
- package/src/sap/m/ColorPalette.js +4 -2
- package/src/sap/m/ColorPalettePopover.js +5 -3
- package/src/sap/m/ColorPaletteRenderer.js +3 -3
- package/src/sap/m/Column.js +3 -4
- package/src/sap/m/ColumnHeaderPopover.js +1 -1
- package/src/sap/m/ColumnListItem.js +59 -20
- package/src/sap/m/ColumnListItemRenderer.js +8 -9
- 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 +6 -6
- package/src/sap/m/ComboBox.js +16 -9
- package/src/sap/m/ComboBoxBase.js +10 -9
- package/src/sap/m/ComboBoxTextField.js +6 -4
- package/src/sap/m/ContentConfig.js +142 -0
- 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 +19 -18
- package/src/sap/m/DatePickerRenderer.js +3 -3
- package/src/sap/m/DateRangeSelection.js +16 -13
- package/src/sap/m/DateRangeSelectionRenderer.js +3 -3
- package/src/sap/m/DateTimeField.js +17 -9
- package/src/sap/m/DateTimeInput.js +6 -4
- package/src/sap/m/DateTimePicker.js +39 -30
- package/src/sap/m/DateTimePickerRenderer.js +4 -2
- package/src/sap/m/Dialog.js +21 -9
- package/src/sap/m/DialogRenderer.js +10 -3
- package/src/sap/m/DisplayListItem.js +1 -1
- package/src/sap/m/DraftIndicator.js +5 -5
- package/src/sap/m/DynamicDate.js +5 -3
- package/src/sap/m/DynamicDateFormat.js +7 -6
- package/src/sap/m/DynamicDateOption.js +10 -5
- package/src/sap/m/DynamicDateRange.js +56 -43
- package/src/sap/m/DynamicDateUtil.js +3 -3
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
- package/src/sap/m/ExpandableText.js +5 -9
- package/src/sap/m/ExpandableTextRenderer.js +3 -3
- package/src/sap/m/FacetFilter.js +17 -8
- package/src/sap/m/FacetFilterItem.js +1 -1
- package/src/sap/m/FacetFilterList.js +7 -7
- package/src/sap/m/FacetFilterRenderer.js +4 -4
- package/src/sap/m/FeedContent.js +1 -1
- package/src/sap/m/FeedInput.js +1 -1
- package/src/sap/m/FeedListItem.js +4 -4
- package/src/sap/m/FeedListItemAction.js +1 -1
- package/src/sap/m/FeedListItemRenderer.js +3 -3
- package/src/sap/m/Fiori20Adapter.js +9 -9
- package/src/sap/m/FlexBox.js +2 -2
- package/src/sap/m/FlexItemData.js +17 -17
- package/src/sap/m/FormattedText.js +7 -6
- package/src/sap/m/GenericTag.js +1 -1
- package/src/sap/m/GenericTagRenderer.js +5 -5
- package/src/sap/m/GenericTile.js +102 -14
- package/src/sap/m/GenericTileLineModeRenderer.js +3 -3
- package/src/sap/m/GenericTileRenderer.js +3 -3
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GroupHeaderListItemRenderer.js +3 -3
- package/src/sap/m/GrowingEnablement.js +7 -6
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +5 -5
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +4 -4
- package/src/sap/m/IconTabBarDragAndDropUtil.js +5 -5
- package/src/sap/m/IconTabBarSelectList.js +2 -2
- package/src/sap/m/IconTabFilter.js +27 -15
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +4 -4
- package/src/sap/m/IconTabHeader.js +61 -28
- package/src/sap/m/IconTabHeaderRenderer.js +5 -5
- package/src/sap/m/IconTabSeparator.js +7 -7
- package/src/sap/m/IllustratedMessage.js +8 -6
- package/src/sap/m/IllustratedMessageType.js +12 -0
- package/src/sap/m/Illustration.js +4 -4
- package/src/sap/m/IllustrationPool.js +3 -3
- package/src/sap/m/Image.js +6 -3
- package/src/sap/m/ImageContent.js +1 -1
- package/src/sap/m/Input.js +65 -36
- package/src/sap/m/InputBase.js +33 -8
- package/src/sap/m/InputBaseRenderer.js +3 -3
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/InputRenderer.js +5 -6
- package/src/sap/m/Label.js +6 -6
- package/src/sap/m/LightBox.js +4 -4
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +30 -6
- package/src/sap/m/LinkRenderer.js +4 -4
- package/src/sap/m/LinkTileContent.js +1 -1
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +43 -24
- package/src/sap/m/ListItemBase.js +7 -6
- package/src/sap/m/ListItemBaseRenderer.js +3 -0
- package/src/sap/m/MaskEnabler.js +8 -6
- package/src/sap/m/MaskInput.js +1 -1
- package/src/sap/m/MaskInputRenderer.js +2 -2
- package/src/sap/m/MaskInputRule.js +1 -1
- package/src/sap/m/Menu.js +19 -17
- package/src/sap/m/MenuButton.js +8 -6
- package/src/sap/m/MenuItem.js +9 -9
- package/src/sap/m/MenuListItem.js +5 -4
- package/src/sap/m/MessageBox.js +5 -3
- package/src/sap/m/MessageItem.js +1 -1
- package/src/sap/m/MessageListItem.js +4 -3
- package/src/sap/m/MessagePage.js +4 -2
- package/src/sap/m/MessagePopover.js +9 -6
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +9 -7
- package/src/sap/m/MessageStripRenderer.js +5 -2
- package/src/sap/m/MessageStripUtilities.js +6 -4
- package/src/sap/m/MessageToast.js +8 -7
- package/src/sap/m/MessageView.js +29 -6
- package/src/sap/m/MessageViewRenderer.js +2 -2
- package/src/sap/m/MultiComboBox.js +36 -17
- package/src/sap/m/MultiComboBoxRenderer.js +4 -4
- package/src/sap/m/MultiEditField.js +4 -4
- package/src/sap/m/MultiInput.js +66 -19
- package/src/sap/m/MultiInputRenderer.js +3 -3
- package/src/sap/m/NavContainer.js +14 -9
- package/src/sap/m/NewsContent.js +1 -1
- package/src/sap/m/NotificationList.js +1 -1
- package/src/sap/m/NotificationListBase.js +4 -4
- package/src/sap/m/NotificationListGroup.js +4 -4
- package/src/sap/m/NotificationListItem.js +4 -4
- package/src/sap/m/NumericContent.js +6 -6
- package/src/sap/m/NumericInput.js +1 -1
- package/src/sap/m/NumericInputRenderer.js +6 -6
- package/src/sap/m/ObjectAttribute.js +7 -6
- package/src/sap/m/ObjectAttributeRenderer.js +3 -3
- package/src/sap/m/ObjectHeader.js +15 -11
- package/src/sap/m/ObjectHeaderRenderer.js +4 -4
- package/src/sap/m/ObjectIdentifier.js +37 -8
- package/src/sap/m/ObjectIdentifierRenderer.js +3 -3
- package/src/sap/m/ObjectListItem.js +4 -4
- package/src/sap/m/ObjectMarker.js +6 -4
- package/src/sap/m/ObjectNumber.js +4 -3
- package/src/sap/m/ObjectNumberRenderer.js +6 -6
- package/src/sap/m/ObjectStatus.js +28 -22
- package/src/sap/m/ObjectStatusRenderer.js +26 -20
- package/src/sap/m/OverflowToolbar.js +2 -2
- package/src/sap/m/OverflowToolbarAssociativePopover.js +3 -3
- package/src/sap/m/OverflowToolbarButton.js +1 -1
- package/src/sap/m/OverflowToolbarLayoutData.js +2 -2
- package/src/sap/m/OverflowToolbarMenuButton.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 +33 -11
- package/src/sap/m/P13nConditionPanel.js +6 -4
- package/src/sap/m/P13nDialog.js +27 -13
- package/src/sap/m/P13nDimMeasureItem.js +1 -1
- package/src/sap/m/P13nDimMeasurePanel.js +18 -12
- package/src/sap/m/P13nFilterItem.js +1 -1
- package/src/sap/m/P13nFilterPanel.js +71 -49
- package/src/sap/m/P13nGroupItem.js +1 -1
- package/src/sap/m/P13nGroupPanel.js +5 -4
- 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 +28 -7
- package/src/sap/m/P13nSortItem.js +1 -1
- package/src/sap/m/P13nSortPanel.js +6 -5
- package/src/sap/m/PDFViewer.js +3 -6
- package/src/sap/m/Page.js +4 -8
- package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/m/PagingButton.js +5 -4
- package/src/sap/m/Panel.js +10 -5
- package/src/sap/m/PlanningCalendar.js +160 -109
- package/src/sap/m/PlanningCalendarHeader.js +9 -7
- package/src/sap/m/PlanningCalendarLegend.js +5 -5
- package/src/sap/m/PlanningCalendarRow.js +26 -15
- package/src/sap/m/PlanningCalendarView.js +1 -4
- package/src/sap/m/Popover.js +19 -21
- package/src/sap/m/PopoverRenderer.js +4 -4
- package/src/sap/m/ProgressIndicator.js +15 -13
- package/src/sap/m/ProgressIndicatorRenderer.js +3 -4
- package/src/sap/m/PullToRefresh.js +4 -3
- 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/QuickViewCardRenderer.js +3 -3
- package/src/sap/m/QuickViewGroup.js +1 -1
- package/src/sap/m/QuickViewGroupElement.js +1 -1
- package/src/sap/m/QuickViewPage.js +29 -17
- package/src/sap/m/RadioButton.js +4 -4
- package/src/sap/m/RadioButtonGroup.js +38 -5
- package/src/sap/m/RadioButtonGroupRenderer.js +4 -4
- package/src/sap/m/RadioButtonRenderer.js +3 -3
- package/src/sap/m/RangeSlider.js +9 -7
- package/src/sap/m/RangeSliderRenderer.js +2 -2
- package/src/sap/m/RatingIndicator.js +7 -6
- package/src/sap/m/RatingIndicatorRenderer.js +4 -4
- package/src/sap/m/ResponsivePopover.js +1 -3
- package/src/sap/m/ResponsiveScale.js +1 -1
- package/src/sap/m/ScrollBar.js +3 -3
- package/src/sap/m/ScrollContainer.js +6 -6
- package/src/sap/m/SearchField.js +1 -1
- package/src/sap/m/SegmentedButton.js +7 -5
- package/src/sap/m/SegmentedButtonItem.js +1 -1
- package/src/sap/m/Select.js +30 -16
- package/src/sap/m/SelectDialog.js +5 -3
- package/src/sap/m/SelectDialogBase.js +6 -6
- package/src/sap/m/SelectList.js +6 -6
- package/src/sap/m/SelectionDetails.js +7 -3
- 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 +4 -4
- package/src/sap/m/ShellRenderer.js +3 -2
- package/src/sap/m/SimpleFixFlex.js +1 -1
- package/src/sap/m/SinglePlanningCalendar.js +41 -9
- package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarGrid.js +122 -54
- package/src/sap/m/SinglePlanningCalendarGridRenderer.js +22 -20
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +315 -61
- package/src/sap/m/SinglePlanningCalendarMonthGridRenderer.js +88 -35
- package/src/sap/m/SinglePlanningCalendarMonthView.js +3 -4
- package/src/sap/m/SinglePlanningCalendarView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWeekView.js +5 -5
- package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +6 -5
- package/src/sap/m/SlideTile.js +6 -6
- package/src/sap/m/SlideTileRenderer.js +1 -3
- package/src/sap/m/Slider.js +38 -11
- package/src/sap/m/SliderRenderer.js +4 -4
- package/src/sap/m/SliderTooltip.js +4 -4
- package/src/sap/m/SliderTooltipBase.js +1 -1
- package/src/sap/m/SliderTooltipContainer.js +10 -8
- package/src/sap/m/SliderTooltipRenderer.js +3 -3
- package/src/sap/m/SplitApp.js +2 -1
- package/src/sap/m/SplitButton.js +5 -3
- package/src/sap/m/SplitContainer.js +20 -11
- package/src/sap/m/StandardDynamicDateOption.js +16 -12
- package/src/sap/m/StandardListItem.js +4 -3
- package/src/sap/m/StandardListItemRenderer.js +3 -3
- package/src/sap/m/StandardTile.js +1 -1
- package/src/sap/m/StandardTreeItem.js +1 -1
- package/src/sap/m/StepInput.js +6 -4
- package/src/sap/m/Suggest.js +5 -5
- package/src/sap/m/SuggestionItem.js +1 -1
- package/src/sap/m/SuggestionsList.js +9 -7
- package/src/sap/m/SuggestionsListRenderer.js +2 -2
- package/src/sap/m/SuggestionsPopover.js +1 -1
- package/src/sap/m/Switch.js +13 -11
- package/src/sap/m/SwitchRenderer.js +3 -3
- package/src/sap/m/TabContainer.js +9 -6
- package/src/sap/m/TabContainerItem.js +5 -8
- package/src/sap/m/TabStrip.js +23 -12
- package/src/sap/m/TabStripItem.js +7 -10
- package/src/sap/m/TabStripRenderer.js +2 -2
- package/src/sap/m/Table.js +4 -5
- package/src/sap/m/TablePersoController.js +10 -8
- package/src/sap/m/TablePersoDialog.js +19 -16
- package/src/sap/m/TablePersoProvider.js +1 -1
- package/src/sap/m/TableRenderer.js +4 -4
- package/src/sap/m/TableSelectDialog.js +5 -3
- package/src/sap/m/Text.js +36 -39
- package/src/sap/m/TextArea.js +5 -3
- package/src/sap/m/TextRenderer.js +2 -7
- package/src/sap/m/Tile.js +1 -1
- package/src/sap/m/TileAttribute.js +64 -0
- package/src/sap/m/TileAttributeRenderer.js +70 -0
- package/src/sap/m/TileContainer.js +10 -8
- package/src/sap/m/TileContent.js +8 -4
- package/src/sap/m/TileRenderer.js +3 -3
- package/src/sap/m/TimePicker.js +24 -19
- package/src/sap/m/TimePickerClock.js +4 -3
- package/src/sap/m/TimePickerClocks.js +1 -1
- package/src/sap/m/TimePickerInputs.js +1 -1
- package/src/sap/m/TimePickerInternals.js +12 -10
- package/src/sap/m/TimePickerSlider.js +9 -7
- package/src/sap/m/TimePickerSliders.js +17 -13
- package/src/sap/m/TimePickerSlidersRenderer.js +3 -3
- package/src/sap/m/Title.js +5 -4
- package/src/sap/m/TitlePropagationSupport.js +4 -4
- package/src/sap/m/ToggleButton.js +4 -3
- package/src/sap/m/Token.js +6 -6
- package/src/sap/m/Tokenizer.js +16 -10
- package/src/sap/m/Toolbar.js +4 -4
- 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 +4 -2
- package/src/sap/m/TreeItemBase.js +4 -3
- package/src/sap/m/TreeItemBaseRenderer.js +3 -3
- package/src/sap/m/UploadCollection.js +28 -24
- package/src/sap/m/UploadCollectionItem.js +1 -1
- package/src/sap/m/UploadCollectionParameter.js +1 -1
- package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
- package/src/sap/m/VBox.js +1 -1
- package/src/sap/m/ValueStateHeader.js +5 -5
- package/src/sap/m/VariantItem.js +8 -3
- package/src/sap/m/VariantManagement.js +112 -33
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +34 -21
- package/src/sap/m/ViewSettingsFilterItem.js +1 -1
- package/src/sap/m/ViewSettingsItem.js +9 -2
- package/src/sap/m/VisibleItem.js +1 -1
- package/src/sap/m/WheelSlider.js +4 -3
- package/src/sap/m/WheelSliderContainer.js +1 -1
- package/src/sap/m/WheelSliderContainerRenderer.js +3 -3
- package/src/sap/m/Wizard.js +17 -15
- package/src/sap/m/WizardProgressNavigator.js +18 -2
- package/src/sap/m/WizardProgressNavigatorRenderer.js +9 -5
- package/src/sap/m/WizardRenderer.js +6 -4
- package/src/sap/m/WizardStep.js +9 -11
- package/src/sap/m/changeHandler/AddTableColumn.js +3 -7
- package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
- package/src/sap/m/changeHandler/CombineButtons.js +4 -4
- package/src/sap/m/changeHandler/MoveTableColumns.js +3 -2
- package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
- package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
- package/src/sap/m/delegate/ValueStateMessage.js +3 -3
- package/src/sap/m/designtime/IconTabBar.designtime.js +3 -2
- package/src/sap/m/designtime/Link.designtime.js +4 -4
- package/src/sap/m/designtime/MenuButton.designtime.js +3 -0
- package/src/sap/m/designtime/ObjectIdentifier.designtime.js +0 -4
- package/src/sap/m/designtime/messagebundle_en_US_saprigi.properties +91 -91
- package/src/sap/m/flexibility/EngineFlex.js +14 -8
- package/src/sap/m/flexibility/MenuButton.flexibility.js +1 -0
- package/src/sap/m/inputUtils/SuggestionsPopoverPopoverMixin.js +4 -4
- package/src/sap/m/library.js +181 -59
- package/src/sap/m/messagebundle.properties +113 -90
- package/src/sap/m/messagebundle_ar.properties +16 -10
- package/src/sap/m/messagebundle_bg.properties +19 -13
- package/src/sap/m/messagebundle_ca.properties +16 -10
- package/src/sap/m/messagebundle_cnr.properties +21 -15
- package/src/sap/m/messagebundle_cs.properties +16 -10
- package/src/sap/m/messagebundle_cy.properties +19 -13
- package/src/sap/m/messagebundle_da.properties +14 -8
- package/src/sap/m/messagebundle_de.properties +12 -6
- package/src/sap/m/messagebundle_el.properties +27 -21
- package/src/sap/m/messagebundle_en.properties +1164 -22
- package/src/sap/m/messagebundle_en_GB.properties +23 -17
- package/src/sap/m/messagebundle_en_US_saprigi.properties +34 -22
- package/src/sap/m/messagebundle_es.properties +19 -13
- package/src/sap/m/messagebundle_es_MX.properties +18 -12
- package/src/sap/m/messagebundle_et.properties +14 -8
- package/src/sap/m/messagebundle_fi.properties +21 -15
- package/src/sap/m/messagebundle_fr.properties +15 -9
- package/src/sap/m/messagebundle_fr_CA.properties +11 -5
- package/src/sap/m/messagebundle_hi.properties +24 -18
- package/src/sap/m/messagebundle_hr.properties +15 -9
- package/src/sap/m/messagebundle_hu.properties +20 -14
- package/src/sap/m/messagebundle_id.properties +15 -9
- package/src/sap/m/messagebundle_it.properties +17 -11
- package/src/sap/m/messagebundle_iw.properties +13 -7
- package/src/sap/m/messagebundle_ja.properties +23 -17
- package/src/sap/m/messagebundle_kk.properties +14 -8
- package/src/sap/m/messagebundle_ko.properties +18 -12
- package/src/sap/m/messagebundle_lt.properties +17 -11
- package/src/sap/m/messagebundle_lv.properties +26 -20
- package/src/sap/m/messagebundle_mk.properties +20 -14
- package/src/sap/m/messagebundle_ms.properties +13 -7
- package/src/sap/m/messagebundle_nl.properties +16 -10
- package/src/sap/m/messagebundle_no.properties +15 -9
- package/src/sap/m/messagebundle_pl.properties +16 -10
- package/src/sap/m/messagebundle_pt.properties +16 -10
- package/src/sap/m/messagebundle_pt_PT.properties +13 -7
- package/src/sap/m/messagebundle_ro.properties +13 -7
- package/src/sap/m/messagebundle_ru.properties +15 -9
- package/src/sap/m/messagebundle_sh.properties +21 -15
- package/src/sap/m/messagebundle_sk.properties +13 -7
- package/src/sap/m/messagebundle_sl.properties +14 -8
- package/src/sap/m/messagebundle_sr.properties +21 -15
- package/src/sap/m/messagebundle_sv.properties +15 -9
- package/src/sap/m/messagebundle_th.properties +12 -6
- package/src/sap/m/messagebundle_tr.properties +15 -9
- package/src/sap/m/messagebundle_uk.properties +15 -9
- package/src/sap/m/messagebundle_vi.properties +16 -10
- package/src/sap/m/messagebundle_zh_CN.properties +12 -6
- package/src/sap/m/messagebundle_zh_TW.properties +12 -6
- package/src/sap/m/p13n/.eslintrc.json +19 -0
- package/src/sap/m/p13n/AbstractContainer.js +43 -29
- package/src/sap/m/p13n/AbstractContainerItem.js +8 -8
- package/src/sap/m/p13n/BasePanel.js +123 -76
- package/src/sap/m/p13n/Container.js +80 -50
- package/src/sap/m/p13n/Engine.js +331 -294
- package/src/sap/m/p13n/FilterController.js +335 -0
- package/src/sap/m/p13n/FilterPanel.js +291 -0
- package/src/sap/m/p13n/FlexUtil.js +23 -21
- package/src/sap/m/p13n/GroupController.js +97 -85
- package/src/sap/m/p13n/GroupPanel.js +30 -25
- package/src/sap/m/p13n/MetadataHelper.js +65 -21
- package/src/sap/m/p13n/PersistenceProvider.js +11 -9
- package/src/sap/m/p13n/Popup.js +63 -45
- package/src/sap/m/p13n/QueryPanel.js +117 -93
- package/src/sap/m/p13n/SelectionController.js +302 -237
- package/src/sap/m/p13n/SelectionPanel.js +117 -83
- package/src/sap/m/p13n/SortController.js +100 -89
- package/src/sap/m/p13n/SortPanel.js +46 -31
- package/src/sap/m/p13n/enums/PersistenceMode.js +57 -0
- package/src/sap/m/p13n/{enum → enums}/ProcessingStrategy.js +10 -8
- package/src/sap/m/p13n/handler/xConfigHandler.js +175 -161
- package/src/sap/m/p13n/modification/FlexModificationHandler.js +151 -133
- package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +28 -28
- package/src/sap/m/p13n/modification/ModificationHandler.js +15 -15
- package/src/sap/m/p13n/modules/AdaptationProvider.js +7 -7
- package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +20 -18
- package/src/sap/m/p13n/modules/StateHandlerRegistry.js +7 -7
- package/src/sap/m/p13n/modules/UIManager.js +119 -117
- package/src/sap/m/p13n/modules/xConfigAPI.js +74 -68
- package/src/sap/m/plugins/CellSelector.js +142 -26
- package/src/sap/m/plugins/ColumnResizer.js +12 -17
- package/src/sap/m/plugins/ContextMenuSetting.js +155 -0
- package/src/sap/m/plugins/CopyProvider.js +170 -110
- package/src/sap/m/plugins/DataStateIndicator.js +9 -6
- package/src/sap/m/plugins/PasteProvider.js +18 -10
- package/src/sap/m/plugins/PluginBase.js +39 -15
- 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 +3 -3
- 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 +3 -3
- package/src/sap/m/semantic/MessagesIndicator.js +1 -1
- package/src/sap/m/semantic/MultiSelectAction.js +3 -3
- 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 -5
- 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 +4 -2
- 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 +6 -12
- 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/ColumnWidthController.js +2 -3
- package/src/sap/m/table/Util.js +67 -40
- package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
- package/src/sap/m/table/columnmenu/Entry.js +1 -1
- package/src/sap/m/table/columnmenu/Item.js +5 -5
- package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
- package/src/sap/m/table/columnmenu/Menu.js +14 -21
- package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
- package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
- package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickGroup.js +7 -5
- package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickSort.js +6 -4
- package/src/sap/m/table/columnmenu/QuickSortItem.js +6 -4
- package/src/sap/m/table/columnmenu/QuickTotal.js +7 -5
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
- package/src/sap/m/themes/base/ActionSheet.less +10 -3
- package/src/sap/m/themes/base/ActionTile.less +7 -4
- package/src/sap/m/themes/base/Carousel.less +1 -1
- package/src/sap/m/themes/base/ContextMenuSetting.less +3 -0
- package/src/sap/m/themes/base/IconTabBar.less +2 -2
- package/src/sap/m/themes/base/Label.less +2 -1
- package/src/sap/m/themes/base/Link.less +1 -1
- package/src/sap/m/themes/base/ListItemBase.less +1 -1
- package/src/sap/m/themes/base/MenuButton.less +2 -2
- package/src/sap/m/themes/base/MessageView.less +6 -0
- package/src/sap/m/themes/base/MultiComboBox.less +7 -4
- package/src/sap/m/themes/base/NumericContent.less +2 -2
- package/src/sap/m/themes/base/ObjectListItem.less +1 -1
- package/src/sap/m/themes/base/ObjectNumber.less +4 -4
- package/src/sap/m/themes/base/ObjectStatus.less +263 -160
- package/src/sap/m/themes/base/Panel.less +18 -4
- package/src/sap/m/themes/base/Popover.less +5 -0
- package/src/sap/m/themes/base/SinglePlanningCalendarMonthGrid.less +21 -0
- package/src/sap/m/themes/base/StandardListItem.less +1 -1
- package/src/sap/m/themes/base/SuggestionItem.less +6 -0
- package/src/sap/m/themes/base/Table.less +0 -5
- package/src/sap/m/themes/base/TablePersoDialog.less +4 -2
- package/src/sap/m/themes/base/Text.less +2 -1
- package/src/sap/m/themes/base/UploadCollection.less +2 -2
- package/src/sap/m/themes/base/UploadSet.less +55 -0
- package/src/sap/m/themes/base/VariantManagement.less +2 -1
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-NewMail.svg +27 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-SignOut.svg +24 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NewMail.svg +9 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SignOut.svg +12 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-NewMail.svg +59 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-SignOut.svg +113 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-NewMail.svg +27 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-SignOut.svg +23 -0
- package/src/sap/m/themes/base/library.source.less +2 -1
- package/src/sap/m/upload/ActionsPlaceholder.js +1 -1
- package/src/sap/m/upload/Column.js +1 -1
- package/src/sap/m/upload/FilePreviewDialog.js +5 -5
- package/src/sap/m/upload/FilterPanel.js +5 -3
- package/src/sap/m/upload/UploadSet.js +122 -61
- package/src/sap/m/upload/UploadSetItem.js +31 -7
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
- package/src/sap/m/upload/UploadSetwithTable.js +7 -6
- package/src/sap/m/upload/UploadSetwithTableItem.js +5 -5
- package/src/sap/m/upload/UploaderTableItem.js +1 -1
- package/src/sap/m/upload/p13n/PersManager.js +4 -2
- package/src/sap/m/upload/p13n/mediator/BaseMediator.js +1 -1
- package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +5 -4
- package/src/sap/m/upload/p13n/mediator/FilterMediator.js +5 -2
- package/src/sap/m/upload/p13n/mediator/GroupMediator.js +5 -4
- package/src/sap/m/upload/p13n/mediator/SortMediator.js +5 -4
- package/src/sap/m/upload/p13n/modules/PersPopupManager.js +3 -3
- package/LICENSES/BSD-2-Clause.txt +0 -22
- package/src/sap/m/CustomAttribute.js +0 -53
- package/src/sap/m/p13n/enum/PersistenceMode.js +0 -55
|
@@ -37,22 +37,47 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
37
37
|
*
|
|
38
38
|
* @extends sap.ui.core.Element
|
|
39
39
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.121.0
|
|
41
41
|
*
|
|
42
42
|
* @public
|
|
43
43
|
* @since 1.110
|
|
44
44
|
* @alias sap.m.plugins.CopyProvider
|
|
45
|
+
* @borrows sap.m.plugins.PluginBase.findOn as findOn
|
|
45
46
|
*/
|
|
46
47
|
const CopyProvider = PluginBase.extend("sap.m.plugins.CopyProvider", /** @lends sap.m.plugins.CopyProvider.prototype */ { metadata: {
|
|
47
48
|
library: "sap.m",
|
|
48
49
|
properties: {
|
|
49
50
|
/**
|
|
50
51
|
* Callback function to extract the cell data that is copied to the clipboard.
|
|
52
|
+
* <ul>
|
|
53
|
+
* <li>If an array is returned, then each array value will be copied as a separate cell into the clipboard.</li>
|
|
54
|
+
* <li>If <code>undefined</code> or <code>null</code> is returned, then the cell will be excluded from copying.</li>
|
|
55
|
+
* <li>If an object is returned, then it must have the following properties:
|
|
56
|
+
* <ul>
|
|
57
|
+
* <li><code>text</code>: (mandatory) The cell data to be copied to the clipboard as <code>text/plain</code> MIME type.</li>
|
|
58
|
+
* <li><code>html</code>: (optional) The cell data to be copied to the clipboard as <code>text/html</code> MIME type.</li>
|
|
59
|
+
* </ul>
|
|
60
|
+
* </li>
|
|
61
|
+
* </ul>
|
|
62
|
+
*
|
|
63
|
+
* <b>Note:</b> The <code>CopyProvider</code> uses the <code>text/html</code> MIME type to display the merged cell data shown in a UI5 table as a single cell in the clipboard. This allows users
|
|
64
|
+
* in applications supporting <code>text/html</code> MIME type, such as <code>Spreadsheet</code>, to preserve the cell data format that appears in a UI5 table.
|
|
65
|
+
* The <code>CopyProvider</code> also uses the <code>text/plain</code> MIME type to display the merged cell data shown in a UI5 table as separate clipboard cells. This allows users
|
|
66
|
+
* to edit plain data with applications like <code>SpreadSheet</code>, then copy and paste the data back into a UI5 table, preserving data integrity without in-cell formatting.<br>
|
|
67
|
+
* Spreadsheet-like applications supporting <code>text/html</code> MIME type typically prioritize <code>text/html</code> clipboard data during paste. This means that
|
|
68
|
+
* the data format copied from a UI5 table is preserved with the default paste operation. Users wanting to make edits can access the individual and unformatted cell data in the clipboard,
|
|
69
|
+
* which is stored in the text/plain MIME type, by selecting the "Paste Special" option and then choosing "Unicode Text" in spreadsheet applications.<br>
|
|
70
|
+
*
|
|
71
|
+
* <b>Note:</b> Using <code>text/html</code> MIME type as a clipboard item might not be supported on all platforms. In such cases, the <code>CopyProvider</code> writes only <code>text/plain</code> data
|
|
72
|
+
* to the clipboard. Refer to the <code>bIncludeHtmlMimeType</code> parameter and do not return the object type if this value is <code>false</code>.<br>
|
|
73
|
+
*
|
|
74
|
+
* <b>Note:</b> Even if the user is on a platform supporting <code>text/html</code> MIME type as a clipboard item, currently, any HTML tags are not allowed; all data is encoded.
|
|
51
75
|
*
|
|
52
76
|
* @callback sap.m.plugins.CopyProvider.extractDataHandler
|
|
53
77
|
* @param {sap.ui.model.Context|sap.m.ColumnListItem} oContextOrRow The binding context of the selected row or the row instance if there is no binding
|
|
54
78
|
* @param {sap.m.Column|sap.ui.table.Column|sap.ui.mdc.table.Column} oColumn The related column instance of selected cells
|
|
55
|
-
* @
|
|
79
|
+
* @param {boolean} bIncludeHtmlMimeType Indicates whether writing <code>text/html</code> MIME type to the clipboard is supported
|
|
80
|
+
* @returns {*|{text: *, html: *}|Array.<*>|undefined|null} The cell data to be copied to the clipboard
|
|
56
81
|
* @public
|
|
57
82
|
*/
|
|
58
83
|
/**
|
|
@@ -165,6 +190,8 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
165
190
|
return /\n|\r|\t/.test(sCellData) ? '"' + sCellData.replaceAll('"', '""') + '"' : sCellData;
|
|
166
191
|
}
|
|
167
192
|
|
|
193
|
+
CopyProvider.findOn = PluginBase.findOn;
|
|
194
|
+
|
|
168
195
|
CopyProvider.prototype._shouldManageExtractData = function() {
|
|
169
196
|
const oControl = this.getControl();
|
|
170
197
|
const oParent = this.getParent();
|
|
@@ -189,17 +216,23 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
189
216
|
this._oDelegate = { onkeydown: this.onkeydown, onBeforeRendering: this.onBeforeRendering };
|
|
190
217
|
oControl.addEventDelegate(this._oDelegate, this);
|
|
191
218
|
|
|
192
|
-
this._oCopyButton?.setEnabled(true);
|
|
193
219
|
this._shouldManageExtractData() && this.setExtractData(this._extractData.bind(this));
|
|
194
|
-
|
|
220
|
+
|
|
221
|
+
this._handleCellSelectorSelectionChange();
|
|
222
|
+
this._handleControlSelectionChange();
|
|
223
|
+
this._updateCopyButtonVisibility();
|
|
224
|
+
this._updateCopyButtonEnabled();
|
|
195
225
|
};
|
|
196
226
|
|
|
197
227
|
CopyProvider.prototype.onDeactivate = function(oControl) {
|
|
198
228
|
oControl.removeEventDelegate(this._oDelegate, this);
|
|
199
229
|
this._oDelegate = null;
|
|
200
230
|
|
|
201
|
-
this._oCopyButton?.setEnabled(false);
|
|
202
231
|
this._shouldManageExtractData() && this.setExtractData();
|
|
232
|
+
|
|
233
|
+
this._handleCellSelectorSelectionChange();
|
|
234
|
+
this._handleControlSelectionChange();
|
|
235
|
+
this._updateCopyButtonEnabled();
|
|
203
236
|
};
|
|
204
237
|
|
|
205
238
|
CopyProvider.prototype.setVisible = function(bVisible) {
|
|
@@ -229,21 +262,22 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
229
262
|
*/
|
|
230
263
|
CopyProvider.prototype.getCopyButton = function(mSettings) {
|
|
231
264
|
if (!this._oCopyButton) {
|
|
232
|
-
const
|
|
265
|
+
const oBundle = coreLib.getResourceBundleFor("sap.m");
|
|
266
|
+
const sText = oBundle.getText("COPYPROVIDER_COPY");
|
|
233
267
|
this._oCopyButton = new OverflowToolbarButton({
|
|
234
268
|
icon: "sap-icon://copy",
|
|
235
|
-
enabled: this.
|
|
269
|
+
enabled: this._getEffectiveEnabled(),
|
|
236
270
|
visible: this._getEffectiveVisible(),
|
|
237
271
|
text: sText,
|
|
238
272
|
tooltip: sText,
|
|
239
|
-
press:
|
|
240
|
-
// TBD Button should be disabled when no selection is available. Until then only when the button is pressed a user message should be shown.
|
|
241
|
-
this._bActivatedByButton = true;
|
|
242
|
-
this.copySelectionData(true);
|
|
243
|
-
this._bActivatedByButton = false;
|
|
244
|
-
}.bind(this),
|
|
273
|
+
press: this.copySelectionData.bind(this, true),
|
|
245
274
|
...mSettings
|
|
246
275
|
});
|
|
276
|
+
sap.ui.require(["sap/ui/core/ShortcutHintsMixin"], (ShortcutHintsMixin) => {
|
|
277
|
+
ShortcutHintsMixin.addConfig(this._oCopyButton, {
|
|
278
|
+
message: oBundle.getText(Device.os.macintosh ? "COPYPROVIDER_SHORTCUT_MAC" : "COPYPROVIDER_SHORTCUT_WIN")
|
|
279
|
+
}, this.getParent());
|
|
280
|
+
});
|
|
247
281
|
}
|
|
248
282
|
return this._oCopyButton;
|
|
249
283
|
};
|
|
@@ -263,10 +297,11 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
263
297
|
* if the {@link sap.m.plugins.CellSelector CellSelector} plugin is also enabled for the table.
|
|
264
298
|
* <b>Note: </b> The returned array might be a sparse array if the {@link #getCopySparse copySparse} property is <code>true</code>.
|
|
265
299
|
*
|
|
266
|
-
* @
|
|
300
|
+
* @param {boolean} bIncludeHtmlMimeType Determines whether the selection data to be returned includes <code>text/html</code> MIME type values, if the platform supports <code>text/html</code> MIME type as a clipboard item
|
|
301
|
+
* @returns {Array.<Array.<*>>|{text: Array.<Array.<*>>, html: Array.<Array.<*>>}} Two-dimensional data extracted from the selection, or an object with <code>text</code> and <code>html</code> keys, each with two-dimensional data extracted from the selection if <code>bIncludeHtmlMimeType</code> parameter is <code>true</code> and the platform supports <code>text/html</code> MIME type as a clipboard item.
|
|
267
302
|
* @public
|
|
268
303
|
*/
|
|
269
|
-
CopyProvider.prototype.getSelectionData = function(
|
|
304
|
+
CopyProvider.prototype.getSelectionData = function(bIncludeHtmlMimeType = false) {
|
|
270
305
|
const oControl = this.getControl();
|
|
271
306
|
const fnExtractData = this.getExtractData();
|
|
272
307
|
if (!oControl || !fnExtractData) {
|
|
@@ -294,31 +329,26 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
294
329
|
const bCellSelectorRowContextsMustBeMerged = Boolean(aCellSelectorRowContexts.length);
|
|
295
330
|
const bSelectedRowContextsMustBeSparse = bCellSelectorRowContextsMustBeMerged || bCopySparse;
|
|
296
331
|
|
|
297
|
-
|
|
298
|
-
|
|
332
|
+
this._iSelectedRows = 0;
|
|
333
|
+
this._iSelectedCells = 0;
|
|
299
334
|
|
|
300
335
|
if (this.getCopyPreference() == CopyPreference.Full || !bCellSelectorRowContextsMustBeMerged) {
|
|
301
336
|
aSelectedRowContexts = this.getConfig("selectedContexts", oControl, bSelectedRowContextsMustBeSparse);
|
|
302
337
|
Object.assign(aAllSelectedRowContexts, aSelectedRowContexts);
|
|
303
|
-
|
|
304
|
-
if (obj) {
|
|
305
|
-
counter++;
|
|
306
|
-
}
|
|
307
|
-
return counter;
|
|
308
|
-
}, 0);
|
|
338
|
+
this._iSelectedRows = aSelectedRowContexts.filter(Boolean).length;
|
|
309
339
|
}
|
|
310
340
|
|
|
311
341
|
if (bCellSelectorRowContextsMustBeMerged) {
|
|
312
342
|
Object.assign(aAllSelectedRowContexts, Array(mCellSelectionRange.from.rowIndex).concat(aCellSelectorRowContexts));
|
|
313
|
-
|
|
343
|
+
this._iSelectedCells = aCellSelectorRowContexts.length * (Math.abs(mCellSelectionRange.to.colIndex - mCellSelectionRange.from.colIndex) + 1);
|
|
314
344
|
}
|
|
315
345
|
|
|
316
346
|
const aHtmlSelectionData = [];
|
|
317
347
|
const aTextSelectionData = [];
|
|
318
348
|
let bHtmlMimeTypeProvided = false;
|
|
319
349
|
|
|
320
|
-
if (
|
|
321
|
-
|
|
350
|
+
if (bIncludeHtmlMimeType && !isHtmlMimeTypeAllowed()) {
|
|
351
|
+
bIncludeHtmlMimeType = false;
|
|
322
352
|
}
|
|
323
353
|
|
|
324
354
|
for (let iContextIndex = 0; iContextIndex < aAllSelectedRowContexts.length; iContextIndex++) {
|
|
@@ -340,12 +370,12 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
340
370
|
const bContextFromSelectedRows = (oRowContext == aSelectedRowContexts[iContextIndex]);
|
|
341
371
|
aSelectableColumns.forEach((oColumn, iColumnIndex) => {
|
|
342
372
|
if (bContextFromSelectedRows || (iColumnIndex >= mCellSelectionRange?.from.colIndex && iColumnIndex <= mCellSelectionRange?.to.colIndex)) {
|
|
343
|
-
const vCellData = fnExtractData(oRowContext, oColumn,
|
|
373
|
+
const vCellData = fnExtractData(oRowContext, oColumn, bIncludeHtmlMimeType);
|
|
344
374
|
if (!isCellDataCopyable(vCellData)) {
|
|
345
375
|
return;
|
|
346
376
|
}
|
|
347
377
|
|
|
348
|
-
if (
|
|
378
|
+
if (bIncludeHtmlMimeType && vCellData.hasOwnProperty("html")) {
|
|
349
379
|
bHtmlMimeTypeProvided = true;
|
|
350
380
|
pushCellDataTo(vCellData.html, aHtmlRowData);
|
|
351
381
|
}
|
|
@@ -368,15 +398,10 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
368
398
|
}
|
|
369
399
|
}
|
|
370
400
|
|
|
371
|
-
|
|
401
|
+
return (bHtmlMimeTypeProvided) ? {
|
|
372
402
|
text: aTextSelectionData,
|
|
373
403
|
html: aHtmlSelectionData
|
|
374
404
|
} : aTextSelectionData;
|
|
375
|
-
|
|
376
|
-
res.__iRows = iRows;
|
|
377
|
-
res.__iCells = iCells;
|
|
378
|
-
|
|
379
|
-
return res;
|
|
380
405
|
};
|
|
381
406
|
|
|
382
407
|
/**
|
|
@@ -393,12 +418,6 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
393
418
|
const vSelectionData = this.getSelectionData(true);
|
|
394
419
|
const aTextSelectionData = vSelectionData.text || vSelectionData;
|
|
395
420
|
if (!aTextSelectionData.length || bFireCopyEvent && !this.fireCopy({data: aTextSelectionData}, true)) {
|
|
396
|
-
|
|
397
|
-
// TBD Button should be disabled when no selection is available. Until then only when the button is pressed a user message should be shown.
|
|
398
|
-
if (this._bActivatedByButton && !aTextSelectionData.length) {
|
|
399
|
-
this._notifyUser(0, 0);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
421
|
return Promise.resolve();
|
|
403
422
|
}
|
|
404
423
|
|
|
@@ -411,12 +430,10 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
411
430
|
return aRows.map(stringifyForTextMimeType).join("\t");
|
|
412
431
|
}).join("\n");
|
|
413
432
|
|
|
414
|
-
let res = null;
|
|
415
|
-
|
|
416
433
|
if (!aHtmlSelectionData.length) {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
434
|
+
return navigator.clipboard.writeText(sClipboardText).then(() => {
|
|
435
|
+
this._notifyUser();
|
|
436
|
+
});
|
|
420
437
|
}
|
|
421
438
|
|
|
422
439
|
const sHtmlMimeType = "text/html";
|
|
@@ -429,24 +446,25 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
429
446
|
[sHtmlMimeType]: new Blob([sClipboardHtml], {type: sHtmlMimeType})
|
|
430
447
|
});
|
|
431
448
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
449
|
+
return navigator.clipboard.write([oClipboardItem]).then(() => {
|
|
450
|
+
this._notifyUser();
|
|
451
|
+
});
|
|
435
452
|
};
|
|
436
453
|
|
|
437
454
|
/**
|
|
438
455
|
* This hook gets called by the CellSelector when the selectable state is changed.
|
|
439
456
|
*
|
|
440
|
-
* @param {
|
|
457
|
+
* @param {sap.m.plugins.CellSelector} oCellSelector The CellSelector instance
|
|
441
458
|
* @private
|
|
442
459
|
* @ui5-restricted sap.m.plugins.CellSelector
|
|
443
460
|
*/
|
|
444
|
-
CopyProvider.prototype.onCellSelectorSelectableChange = function(
|
|
445
|
-
this.
|
|
461
|
+
CopyProvider.prototype.onCellSelectorSelectableChange = function(oCellSelector) {
|
|
462
|
+
this._handleCellSelectorSelectionChange(oCellSelector);
|
|
446
463
|
this._updateCopyButtonVisibility();
|
|
447
464
|
};
|
|
448
465
|
|
|
449
466
|
CopyProvider.prototype.onBeforeRendering = function() {
|
|
467
|
+
this._handleControlSelectionChange();
|
|
450
468
|
this._updateCopyButtonVisibility();
|
|
451
469
|
};
|
|
452
470
|
|
|
@@ -459,13 +477,48 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
459
477
|
return;
|
|
460
478
|
}
|
|
461
479
|
|
|
480
|
+
const oSelection = window.getSelection();
|
|
481
|
+
if (oSelection.toString() && oSelection.containsNode(oEvent.target, true)) {
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
|
|
462
485
|
oEvent.setMarked();
|
|
463
486
|
oEvent.preventDefault();
|
|
464
487
|
this.copySelectionData(true);
|
|
465
488
|
};
|
|
466
489
|
|
|
490
|
+
CopyProvider.prototype._handleControlSelectionChange = function() {
|
|
491
|
+
const oControl = this.getControl();
|
|
492
|
+
this.getConfig("detachSelectionChange", oControl, this._updateCopyButtonEnabled, this);
|
|
493
|
+
if (this.isActive() && this.getConfig("isSelectable", oControl)) {
|
|
494
|
+
this.getConfig("attachSelectionChange", oControl, this._updateCopyButtonEnabled, this);
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
CopyProvider.prototype._handleCellSelectorSelectionChange = function(oCellSelector) {
|
|
499
|
+
oCellSelector ??= this.getPlugin("sap.m.plugins.CellSelector");
|
|
500
|
+
if (!oCellSelector) {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
oCellSelector.detachEvent("selectionChange", this._updateCopyButtonEnabled, this);
|
|
505
|
+
if (this.isActive() && oCellSelector.isSelectable()) {
|
|
506
|
+
oCellSelector.attachEvent("selectionChange", this._updateCopyButtonEnabled, this);
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
|
|
467
510
|
CopyProvider.prototype._isControlSelectable = function() {
|
|
468
|
-
return Boolean(
|
|
511
|
+
return Boolean(
|
|
512
|
+
this.getConfig("isSelectable", this.getControl()) ||
|
|
513
|
+
this.getPlugin("sap.m.plugins.CellSelector")?.isSelectable()
|
|
514
|
+
);
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
CopyProvider.prototype._hasControlSelection = function() {
|
|
518
|
+
return Boolean(
|
|
519
|
+
this.getConfig("hasSelection", this.getControl()) ||
|
|
520
|
+
this.getPlugin("sap.m.plugins.CellSelector")?.hasSelection()
|
|
521
|
+
);
|
|
469
522
|
};
|
|
470
523
|
|
|
471
524
|
CopyProvider.prototype._getEffectiveVisible = function() {
|
|
@@ -476,7 +529,15 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
476
529
|
this._oCopyButton?.setVisible(this._getEffectiveVisible());
|
|
477
530
|
};
|
|
478
531
|
|
|
479
|
-
CopyProvider.prototype.
|
|
532
|
+
CopyProvider.prototype._getEffectiveEnabled = function() {
|
|
533
|
+
return this.isActive() ? this._hasControlSelection() : false;
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
CopyProvider.prototype._updateCopyButtonEnabled = function() {
|
|
537
|
+
this._oCopyButton?.setEnabled(this._getEffectiveEnabled());
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
CopyProvider.prototype._extractData = function(oRowContext, oColumn, bIncludeHtmlMimeType) {
|
|
480
541
|
if (!this._mColumnClipboardSettings) {
|
|
481
542
|
this._mColumnClipboardSettings = new WeakMap();
|
|
482
543
|
}
|
|
@@ -508,7 +569,7 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
508
569
|
aPropertyValues[0] = fnUnitFormatter(aPropertyValues[0], aPropertyValues[1]);
|
|
509
570
|
}
|
|
510
571
|
|
|
511
|
-
if (!
|
|
572
|
+
if (!bIncludeHtmlMimeType) {
|
|
512
573
|
return aPropertyValues;
|
|
513
574
|
}
|
|
514
575
|
|
|
@@ -525,66 +586,34 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
525
586
|
};
|
|
526
587
|
|
|
527
588
|
/**
|
|
528
|
-
* Shows a notification message
|
|
589
|
+
* Shows the user a notification message about the result of the copy action.
|
|
529
590
|
*
|
|
530
|
-
* When a message text is given a MessageBox with the given state is shown.
|
|
531
|
-
* When the message is <code>""</code> and the state is <code>Error</code> a default error message is displayed.
|
|
532
|
-
* Otherwise an information message based on the number of selected rows and / or cells is shown.
|
|
533
|
-
*
|
|
534
|
-
* @param {int} iRows The count of selected rows
|
|
535
|
-
* @param {int} iCells The count of selected cells
|
|
536
|
-
* @param {string} [sMessageText] An optional message text
|
|
537
|
-
* @param {string} [sState="Error"] The sverity of the optional message
|
|
538
591
|
* @returns {Promise}
|
|
539
592
|
* @private
|
|
540
593
|
*/
|
|
541
|
-
CopyProvider.prototype._notifyUser = function(
|
|
542
|
-
const
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
const bPreferCells = this.getCopyPreference() === "Cells";
|
|
565
|
-
|
|
566
|
-
sap.ui.require(["sap/m/MessageToast"], function(MessageToast) {
|
|
567
|
-
let sMsg;
|
|
568
|
-
if (iRows == 1 && iCells <= 0) {
|
|
569
|
-
sMsg = oBundle.getText("COPYPROVIDER_SELECT_ROW_SINGLE_MSG");
|
|
570
|
-
} else if (iRows > 1 && iCells <= 0) {
|
|
571
|
-
sMsg = oBundle.getText("COPYPROVIDER_SELECT_ROW_MULTI_MSG");
|
|
572
|
-
} else if (iCells == 1 && (iRows == 0 || bPreferCells)) {
|
|
573
|
-
sMsg = oBundle.getText("COPYPROVIDER_SELECT_CELL_SINGLE_MSG");
|
|
574
|
-
} else if (iCells > 1 && (iRows == 0 || bPreferCells)) {
|
|
575
|
-
sMsg = oBundle.getText("COPYPROVIDER_SELECT_CELL_MULTI_MSG");
|
|
576
|
-
} else if (iRows > 0 && iCells > 0) {
|
|
577
|
-
sMsg = oBundle.getText("COPYPROVIDER_SELECT_ROW_AND_CELL_MSG");
|
|
578
|
-
}
|
|
579
|
-
if (sMsg) {
|
|
580
|
-
MessageToast.show(sMsg);
|
|
581
|
-
resolve();
|
|
582
|
-
} else {
|
|
583
|
-
reject();
|
|
584
|
-
}
|
|
585
|
-
});
|
|
586
|
-
}
|
|
587
|
-
}.bind(this));
|
|
594
|
+
CopyProvider.prototype._notifyUser = function() {
|
|
595
|
+
const iRows = this._iSelectedRows;
|
|
596
|
+
const iCells = this._iSelectedCells;
|
|
597
|
+
const bPreferCells = this.getCopyPreference() === "Cells";
|
|
598
|
+
|
|
599
|
+
return new Promise((resolve) => {
|
|
600
|
+
sap.ui.require(["sap/m/MessageToast"], (MessageToast) => {
|
|
601
|
+
let sBundleKey;
|
|
602
|
+
if (iRows && !iCells) {
|
|
603
|
+
sBundleKey = (iRows == 1) ? "ROW_SINGLE" : "ROW_MULTI";
|
|
604
|
+
} else if (iCells && (!iRows || bPreferCells)) {
|
|
605
|
+
sBundleKey = (iCells == 1) ? "CELL_SINGLE" : "CELL_MULTI";
|
|
606
|
+
} else if (iRows > 0 && iCells > 0) {
|
|
607
|
+
sBundleKey = "ROW_AND_CELL";
|
|
608
|
+
}
|
|
609
|
+
if (sBundleKey) {
|
|
610
|
+
const oBundle = coreLib.getResourceBundleFor("sap.m");
|
|
611
|
+
const sMessage = oBundle.getText("COPYPROVIDER_SELECT_" + sBundleKey + "_MSG");
|
|
612
|
+
MessageToast.show(sMessage);
|
|
613
|
+
}
|
|
614
|
+
resolve();
|
|
615
|
+
});
|
|
616
|
+
});
|
|
588
617
|
};
|
|
589
618
|
|
|
590
619
|
/**
|
|
@@ -592,6 +621,7 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
592
621
|
*/
|
|
593
622
|
PluginBase.setConfigs({
|
|
594
623
|
"sap.m.Table": {
|
|
624
|
+
_oWM: new WeakMap(),
|
|
595
625
|
allowForCopySelector: ".sapMLIBFocusable,.sapMLIBSelectM,.sapMLIBSelectS",
|
|
596
626
|
selectedContexts: function(oTable, bSparse) {
|
|
597
627
|
const aSelectedContexts = [];
|
|
@@ -612,6 +642,25 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
612
642
|
},
|
|
613
643
|
isSelectable: function(oTable) {
|
|
614
644
|
return oTable.getMode().includes("Select");
|
|
645
|
+
},
|
|
646
|
+
hasSelection: function(oTable) {
|
|
647
|
+
return Boolean(oTable.getSelectedItem());
|
|
648
|
+
},
|
|
649
|
+
attachSelectionChange: function(oTable, fnHandler, oListener) {
|
|
650
|
+
// removal of the selected item might cause a selection change
|
|
651
|
+
const oDelegate = { onBeforeRendering: fnHandler };
|
|
652
|
+
this._oWM.set(oTable, oDelegate);
|
|
653
|
+
oTable.addEventDelegate(oDelegate, oListener);
|
|
654
|
+
|
|
655
|
+
// the binding update might cause a selection change
|
|
656
|
+
oTable.attachUpdateFinished(fnHandler, oListener);
|
|
657
|
+
oTable.attachEvent("itemSelectedChange", fnHandler, oListener);
|
|
658
|
+
},
|
|
659
|
+
detachSelectionChange: function(oTable, fnHandler, oListener) {
|
|
660
|
+
const oDelegate = this._oWM.get(oTable);
|
|
661
|
+
oTable.removeEventDelegate(oDelegate, oListener);
|
|
662
|
+
oTable.detachUpdateFinished(fnHandler, oListener);
|
|
663
|
+
oTable.detachEvent("itemSelectedChange", fnHandler, oListener);
|
|
615
664
|
}
|
|
616
665
|
},
|
|
617
666
|
"sap.ui.table.Table": {
|
|
@@ -639,6 +688,17 @@ sap.ui.define(["./PluginBase", "sap/base/Log", "sap/base/strings/formatMessage",
|
|
|
639
688
|
},
|
|
640
689
|
isSelectable: function(oTable) {
|
|
641
690
|
return oTable.getSelectionMode() != "None";
|
|
691
|
+
},
|
|
692
|
+
hasSelection: function(oTable) {
|
|
693
|
+
return oTable._getSelectionPlugin().getSelectedCount() > 0;
|
|
694
|
+
},
|
|
695
|
+
attachSelectionChange: function(oTable, fnHandler, oListener) {
|
|
696
|
+
oTable._getSelectionPlugin().attachSelectionChange(fnHandler, oListener);
|
|
697
|
+
oTable.attachRowsUpdated(fnHandler, oListener);
|
|
698
|
+
},
|
|
699
|
+
detachSelectionChange: function(oTable, fnHandler, oListener) {
|
|
700
|
+
oTable._getSelectionPlugin().detachSelectionChange(fnHandler, oListener);
|
|
701
|
+
oTable.detachRowsUpdated(fnHandler, oListener);
|
|
642
702
|
}
|
|
643
703
|
}
|
|
644
704
|
}, CopyProvider);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define(["./PluginBase", "sap/ui/core/
|
|
8
|
-
function(PluginBase,
|
|
7
|
+
sap.ui.define(["./PluginBase", "sap/ui/base/ManagedObjectObserver", "sap/ui/core/Lib", "sap/ui/core/Messaging"],
|
|
8
|
+
function(PluginBase, ManagedObjectObserver, Library, Messaging) {
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -19,11 +19,12 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/base/ManagedObjectObs
|
|
|
19
19
|
*
|
|
20
20
|
* @extends sap.ui.core.Element
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.121.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @since 1.73
|
|
26
26
|
* @alias sap.m.plugins.DataStateIndicator
|
|
27
|
+
* @borrows sap.m.plugins.PluginBase.findOn as findOn
|
|
27
28
|
*/
|
|
28
29
|
var DataStateIndicator = PluginBase.extend("sap.m.plugins.DataStateIndicator", /** @lends sap.m.plugins.DataStateIndicator.prototype */ { metadata: {
|
|
29
30
|
library: "sap.m",
|
|
@@ -96,6 +97,8 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/base/ManagedObjectObs
|
|
|
96
97
|
}
|
|
97
98
|
}});
|
|
98
99
|
|
|
100
|
+
DataStateIndicator.findOn = PluginBase.findOn;
|
|
101
|
+
|
|
99
102
|
DataStateIndicator.prototype.onActivate = function(oControl) {
|
|
100
103
|
this._bFiltering = false;
|
|
101
104
|
var sBindingName = this._getBindingName();
|
|
@@ -325,7 +328,7 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/base/ManagedObjectObs
|
|
|
325
328
|
}
|
|
326
329
|
|
|
327
330
|
if (bUpdateMessageModel) {
|
|
328
|
-
|
|
331
|
+
Messaging.getMessageModel().checkUpdate(true, true);
|
|
329
332
|
}
|
|
330
333
|
} else {
|
|
331
334
|
this.showMessage("");
|
|
@@ -467,7 +470,7 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/base/ManagedObjectObs
|
|
|
467
470
|
var oMetadata = this.getControl().getMetadata();
|
|
468
471
|
var sLibraryName = oMetadata.getLibraryName();
|
|
469
472
|
var sControlName = oMetadata.getName().split(".").pop().toUpperCase();
|
|
470
|
-
var oResourceBundle =
|
|
473
|
+
var oResourceBundle = Library.getResourceBundleFor(sLibraryName);
|
|
471
474
|
var sControlBundleText = sControlName + "_" + sBundleText;
|
|
472
475
|
|
|
473
476
|
if (oResourceBundle.hasText(sControlBundleText)) {
|
|
@@ -478,7 +481,7 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/base/ManagedObjectObs
|
|
|
478
481
|
return oResourceBundle.getText(sBundleText);
|
|
479
482
|
}
|
|
480
483
|
|
|
481
|
-
return
|
|
484
|
+
return Library.getResourceBundleFor("sap.m").getText(sBundleText);
|
|
482
485
|
};
|
|
483
486
|
|
|
484
487
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define(["./PluginBase", "sap/ui/core/
|
|
7
|
+
sap.ui.define(["./PluginBase", "sap/ui/core/Element", "sap/ui/core/Lib", "sap/ui/core/util/PasteHelper", "sap/ui/Device"], function(PluginBase, Element, Library, PasteHelper, Device) {
|
|
8
8
|
"use strict";
|
|
9
9
|
|
|
10
10
|
/*global ClipboardEvent, DataTransfer */
|
|
@@ -28,11 +28,12 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/core/util/PasteHelper
|
|
|
28
28
|
*
|
|
29
29
|
* @extends sap.ui.core.Element
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.121.0
|
|
32
32
|
*
|
|
33
33
|
* @public
|
|
34
34
|
* @since 1.91
|
|
35
35
|
* @alias sap.m.plugins.PasteProvider
|
|
36
|
+
* @borrows sap.m.plugins.PluginBase.findOn as findOn
|
|
36
37
|
*/
|
|
37
38
|
var PasteProvider = PluginBase.extend("sap.m.plugins.PasteProvider", /** @lends sap.m.plugins.PasteProvider.prototype */ { metadata: {
|
|
38
39
|
library: "sap.m",
|
|
@@ -71,6 +72,8 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/core/util/PasteHelper
|
|
|
71
72
|
var oActivePlugin = null;
|
|
72
73
|
var sPasteRegionSelector = "[data-sap-ui-pasteregion]";
|
|
73
74
|
|
|
75
|
+
PasteProvider.findOn = PluginBase.findOn;
|
|
76
|
+
|
|
74
77
|
PasteProvider.prototype.onActivate = function(oControl) {
|
|
75
78
|
oControl.attachEvent(this.getConfig("pressEvent"), this._onPress, this);
|
|
76
79
|
};
|
|
@@ -125,7 +128,7 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/core/util/PasteHelper
|
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
function getPasteForDomRef() {
|
|
128
|
-
var oPasteFor =
|
|
131
|
+
var oPasteFor = Element.getElementById(oActivePlugin.getPasteFor());
|
|
129
132
|
var oPasteForDomRef = oPasteFor && oPasteFor.getDomRef();
|
|
130
133
|
if (!oPasteForDomRef) {
|
|
131
134
|
return;
|
|
@@ -148,12 +151,12 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/core/util/PasteHelper
|
|
|
148
151
|
return oPopover.openBy(oControl);
|
|
149
152
|
}
|
|
150
153
|
|
|
151
|
-
sap.ui.require(["sap/ui/
|
|
152
|
-
var sMessage, oRB =
|
|
154
|
+
sap.ui.require(["sap/ui/core/HTML", "sap/ui/core/Icon", "sap/m/Popover"], function(HTML, Icon, Popover) {
|
|
155
|
+
var sMessage, oRB = Library.getResourceBundleFor("sap.m");
|
|
153
156
|
var bDesktop = Device.system.desktop && !Device.os.ios && !Device.os.android;
|
|
154
157
|
if (bDesktop) {
|
|
155
158
|
var sShortCut = oRB.getText("PASTEPROVIDER_SHORTCUT_" + (Device.os.name == "mac" ? "MAC" : "WIN"));
|
|
156
|
-
sMessage = oRB.getText("PASTEPROVIDER_DESKTOP_MSG", '<span class="sapMPluginsPasteProviderShortCut">' + sShortCut + '</span>');
|
|
159
|
+
sMessage = oRB.getText("PASTEPROVIDER_DESKTOP_MSG", ['<span class="sapMPluginsPasteProviderShortCut">' + sShortCut + '</span>']);
|
|
157
160
|
} else {
|
|
158
161
|
sMessage = oRB.getText("PASTEPROVIDER_MOBILE_MSG");
|
|
159
162
|
}
|
|
@@ -204,14 +207,19 @@ sap.ui.define(["./PluginBase", "sap/ui/core/Core", "sap/ui/core/util/PasteHelper
|
|
|
204
207
|
PluginBase.setConfigs({
|
|
205
208
|
"sap.m.Button": {
|
|
206
209
|
pressEvent: "press",
|
|
207
|
-
onActivate: function(oButton) {
|
|
210
|
+
onActivate: function(oButton, oPlugin) {
|
|
208
211
|
if (!oButton.getText() && !oButton.getIcon() && !oButton.getTooltip_AsString()) {
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
const oBundle = Library.getResourceBundleFor("sap.m");
|
|
213
|
+
const sText = oBundle.getText("PASTEPROVIDER_PASTE");
|
|
214
|
+
oButton.setTooltip(sText).setIcon("sap-icon://paste");
|
|
211
215
|
if (oButton.isA("sap.m.OverflowToolbarButton")) {
|
|
212
216
|
oButton.setText(sText);
|
|
213
217
|
}
|
|
214
|
-
|
|
218
|
+
sap.ui.require(["sap/ui/core/ShortcutHintsMixin"], function(ShortcutHintsMixin) {
|
|
219
|
+
ShortcutHintsMixin.addConfig(oButton, {
|
|
220
|
+
message: oBundle.getText(Device.os.macintosh ? "PASTEPROVIDER_SHORTCUT_MAC" : "PASTEPROVIDER_SHORTCUT_WIN")
|
|
221
|
+
}, Element.getElementById(oPlugin.getPasteFor()) || oButton);
|
|
222
|
+
});
|
|
215
223
|
}
|
|
216
224
|
}
|
|
217
225
|
}
|