@openui5/sap.m 1.105.1 → 1.107.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 +20 -17
- package/THIRDPARTY.txt +31 -21
- package/package.json +4 -4
- package/src/sap/m/.library +20 -1
- package/src/sap/m/AccButton.js +4 -3
- package/src/sap/m/ActionListItem.js +14 -11
- package/src/sap/m/ActionSelect.js +14 -11
- package/src/sap/m/ActionSheet.js +103 -101
- package/src/sap/m/ActionSheetRenderer.js +3 -3
- package/src/sap/m/ActionTile.js +90 -0
- package/src/sap/m/ActionTileContent.js +71 -0
- package/src/sap/m/ActionTileContentRenderer.js +108 -0
- package/src/sap/m/App.js +107 -104
- package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
- package/src/sap/m/Avatar.js +4 -3
- package/src/sap/m/AvatarColor.js +0 -1
- package/src/sap/m/AvatarImageFitType.js +0 -1
- package/src/sap/m/AvatarShape.js +0 -1
- package/src/sap/m/AvatarSize.js +0 -1
- package/src/sap/m/AvatarType.js +0 -1
- package/src/sap/m/Bar.js +103 -89
- package/src/sap/m/BarRenderer.js +3 -3
- package/src/sap/m/Breadcrumbs.js +4 -3
- package/src/sap/m/BusyDialog.js +1 -2
- package/src/sap/m/BusyIndicator.js +76 -73
- package/src/sap/m/Button.js +123 -120
- package/src/sap/m/Carousel.js +148 -147
- package/src/sap/m/CarouselLayout.js +1 -2
- package/src/sap/m/CarouselRenderer.js +3 -3
- package/src/sap/m/CheckBox.js +178 -175
- package/src/sap/m/CheckBoxRenderer.js +3 -3
- package/src/sap/m/ColorPalette.js +4 -3
- package/src/sap/m/ColorPalettePopover.js +24 -21
- package/src/sap/m/Column.js +5 -6
- package/src/sap/m/ColumnHeaderPopover.js +1 -2
- package/src/sap/m/ColumnListItem.js +39 -50
- package/src/sap/m/ColumnListItemRenderer.js +0 -3
- package/src/sap/m/ColumnPopoverActionItem.js +1 -2
- package/src/sap/m/ColumnPopoverCustomItem.js +1 -2
- package/src/sap/m/ColumnPopoverItem.js +1 -2
- package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
- package/src/sap/m/ColumnPopoverSortItem.js +1 -2
- package/src/sap/m/ComboBox.js +4 -3
- package/src/sap/m/ComboBoxBase.js +3 -4
- package/src/sap/m/ComboBoxTextField.js +4 -3
- package/src/sap/m/CustomAttribute.js +53 -0
- package/src/sap/m/CustomDynamicDateOption.js +1 -2
- package/src/sap/m/CustomListItem.js +24 -21
- package/src/sap/m/CustomTile.js +19 -16
- package/src/sap/m/CustomTreeItem.js +4 -3
- package/src/sap/m/DatePicker.js +148 -143
- package/src/sap/m/DateRangeSelection.js +45 -40
- package/src/sap/m/DateTimeField.js +11 -8
- package/src/sap/m/DateTimeInput.js +147 -142
- package/src/sap/m/DateTimePicker.js +83 -75
- package/src/sap/m/DateTimePickerRenderer.js +1 -1
- package/src/sap/m/Dialog.js +10 -7
- package/src/sap/m/DisplayListItem.js +23 -20
- package/src/sap/m/DraftIndicator.js +4 -3
- package/src/sap/m/DynamicDate.js +1 -1
- package/src/sap/m/DynamicDateFormat.js +4 -3
- package/src/sap/m/DynamicDateOption.js +1 -2
- package/src/sap/m/DynamicDateRange.js +11 -10
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -2
- package/src/sap/m/ExpandableText.js +4 -3
- package/src/sap/m/FacetFilter.js +112 -110
- package/src/sap/m/FacetFilterItem.js +27 -24
- package/src/sap/m/FacetFilterList.js +131 -132
- package/src/sap/m/FeedContent.js +4 -3
- package/src/sap/m/FeedInput.js +136 -133
- package/src/sap/m/FeedListItem.js +9 -6
- package/src/sap/m/FeedListItemAction.js +1 -2
- package/src/sap/m/FeedListItemRenderer.js +3 -3
- package/src/sap/m/Fiori20Adapter.js +2 -2
- package/src/sap/m/FlexBox.js +96 -93
- package/src/sap/m/FlexItemData.js +1 -2
- package/src/sap/m/FormattedText.js +4 -3
- package/src/sap/m/GenericTag.js +5 -4
- package/src/sap/m/GenericTile.js +65 -22
- package/src/sap/m/GenericTileLineModeRenderer.js +3 -3
- package/src/sap/m/GenericTileRenderer.js +36 -10
- package/src/sap/m/GroupHeaderListItem.js +35 -32
- package/src/sap/m/GrowingEnablement.js +23 -25
- package/src/sap/m/GrowingList.js +35 -32
- package/src/sap/m/HBox.js +9 -6
- package/src/sap/m/HeaderContainer.js +44 -43
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +232 -229
- package/src/sap/m/IconTabBarDragAndDropUtil.js +5 -4
- package/src/sap/m/IconTabBarSelectList.js +28 -25
- package/src/sap/m/IconTabFilter.js +1 -2
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -2
- package/src/sap/m/IconTabHeader.js +152 -166
- package/src/sap/m/IconTabSeparator.js +1 -2
- package/src/sap/m/IllustratedMessage.js +38 -3
- package/src/sap/m/IllustratedMessageSize.js +0 -1
- package/src/sap/m/IllustratedMessageType.js +0 -1
- package/src/sap/m/Illustration.js +11 -3
- package/src/sap/m/IllustrationPool.js +1 -1
- package/src/sap/m/IllustrationRenderer.js +1 -0
- package/src/sap/m/Image.js +270 -197
- package/src/sap/m/ImageContent.js +4 -3
- package/src/sap/m/ImageRenderer.js +66 -2
- package/src/sap/m/Input.js +375 -367
- package/src/sap/m/InputBase.js +143 -140
- package/src/sap/m/InputBaseRenderer.js +3 -3
- package/src/sap/m/InputListItem.js +26 -23
- package/src/sap/m/InputRenderer.js +4 -4
- package/src/sap/m/InstanceManager.js +6 -6
- package/src/sap/m/Label.js +110 -106
- package/src/sap/m/LightBox.js +5 -6
- package/src/sap/m/LightBoxItem.js +1 -2
- package/src/sap/m/Link.js +182 -179
- package/src/sap/m/LinkRenderer.js +5 -1
- package/src/sap/m/List.js +15 -12
- package/src/sap/m/ListBase.js +452 -458
- package/src/sap/m/ListItemBase.js +116 -107
- package/src/sap/m/ListItemBaseRenderer.js +1 -1
- package/src/sap/m/MaskEnabler.js +5 -5
- package/src/sap/m/MaskInput.js +4 -3
- package/src/sap/m/MaskInputRule.js +1 -2
- package/src/sap/m/Menu.js +1 -2
- package/src/sap/m/MenuButton.js +142 -135
- package/src/sap/m/MenuItem.js +1 -2
- package/src/sap/m/MenuListItem.js +49 -46
- package/src/sap/m/MessageItem.js +1 -2
- package/src/sap/m/MessageListItem.js +4 -3
- package/src/sap/m/MessagePage.js +124 -121
- package/src/sap/m/MessagePopover.js +6 -6
- package/src/sap/m/MessagePopoverItem.js +1 -2
- package/src/sap/m/MessageStrip.js +4 -3
- package/src/sap/m/MessageToast.js +6 -5
- package/src/sap/m/MessageView.js +6 -5
- package/src/sap/m/MultiComboBox.js +84 -87
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +4 -3
- package/src/sap/m/NavContainer.js +6 -15
- package/src/sap/m/NewsContent.js +4 -3
- package/src/sap/m/NotificationList.js +4 -3
- package/src/sap/m/NotificationListBase.js +5 -7
- package/src/sap/m/NotificationListGroup.js +4 -3
- package/src/sap/m/NotificationListItem.js +4 -12
- package/src/sap/m/NumericContent.js +8 -6
- package/src/sap/m/NumericInput.js +1 -1
- package/src/sap/m/NumericInputRenderer.js +3 -3
- package/src/sap/m/ObjectAttribute.js +77 -74
- package/src/sap/m/ObjectAttributeRenderer.js +3 -3
- package/src/sap/m/ObjectHeader.js +385 -380
- package/src/sap/m/ObjectHeaderRenderer.js +4 -3
- package/src/sap/m/ObjectIdentifier.js +111 -103
- package/src/sap/m/ObjectListItem.js +150 -145
- package/src/sap/m/ObjectMarker.js +4 -3
- package/src/sap/m/ObjectNumber.js +90 -87
- package/src/sap/m/ObjectStatus.js +84 -81
- package/src/sap/m/OverflowToolbar.js +4 -3
- package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
- package/src/sap/m/OverflowToolbarAssociativePopoverControls.js +0 -5
- package/src/sap/m/OverflowToolbarButton.js +2 -3
- package/src/sap/m/OverflowToolbarLayoutData.js +1 -2
- package/src/sap/m/OverflowToolbarToggleButton.js +1 -2
- package/src/sap/m/P13nAnyFilterItem.js +1 -2
- package/src/sap/m/P13nColumnsItem.js +1 -2
- package/src/sap/m/P13nColumnsPanel.js +4 -5
- package/src/sap/m/P13nConditionPanel.js +1 -2
- package/src/sap/m/P13nDialog.js +1 -2
- package/src/sap/m/P13nDimMeasureItem.js +1 -2
- package/src/sap/m/P13nDimMeasurePanel.js +6 -5
- package/src/sap/m/P13nFilterItem.js +1 -2
- package/src/sap/m/P13nFilterPanel.js +1 -2
- package/src/sap/m/P13nGroupItem.js +1 -2
- package/src/sap/m/P13nGroupPanel.js +1 -2
- package/src/sap/m/P13nItem.js +1 -2
- package/src/sap/m/P13nPanel.js +1 -2
- package/src/sap/m/P13nSelectionItem.js +1 -2
- package/src/sap/m/P13nSelectionPanel.js +1 -2
- package/src/sap/m/P13nSortItem.js +1 -2
- package/src/sap/m/P13nSortPanel.js +1 -2
- package/src/sap/m/PDFViewer.js +8 -5
- package/src/sap/m/Page.js +9 -7
- package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -2
- package/src/sap/m/PagingButton.js +4 -4
- package/src/sap/m/Panel.js +117 -113
- package/src/sap/m/PlanningCalendar.js +6 -7
- package/src/sap/m/PlanningCalendarHeader.js +135 -129
- package/src/sap/m/PlanningCalendarLegend.js +26 -23
- package/src/sap/m/PlanningCalendarRow.js +1 -2
- package/src/sap/m/PlanningCalendarView.js +1 -2
- package/src/sap/m/Popover.js +15 -16
- package/src/sap/m/PopoverRenderer.js +5 -4
- package/src/sap/m/ProgressIndicator.js +85 -82
- package/src/sap/m/ProgressIndicatorRenderer.js +1 -1
- package/src/sap/m/PullToRefresh.js +37 -35
- package/src/sap/m/QuickView.js +1 -2
- package/src/sap/m/QuickViewBase.js +1 -2
- package/src/sap/m/QuickViewCard.js +4 -3
- package/src/sap/m/QuickViewGroup.js +1 -2
- package/src/sap/m/QuickViewGroupElement.js +1 -2
- package/src/sap/m/QuickViewPage.js +1 -2
- package/src/sap/m/RadioButton.js +117 -114
- package/src/sap/m/RadioButtonGroup.js +90 -95
- package/src/sap/m/RangeSlider.js +9 -6
- package/src/sap/m/RangeSliderRenderer.js +2 -2
- package/src/sap/m/RatingIndicator.js +104 -100
- package/src/sap/m/RatingIndicatorRenderer.js +3 -5
- package/src/sap/m/ResponsivePopover.js +209 -209
- package/src/sap/m/ResponsiveScale.js +1 -2
- package/src/sap/m/ScrollBar.js +31 -28
- package/src/sap/m/ScrollContainer.js +9 -7
- package/src/sap/m/SearchField.js +185 -182
- package/src/sap/m/SearchFieldRenderer.js +1 -0
- package/src/sap/m/SegmentedButton.js +120 -118
- package/src/sap/m/SegmentedButtonItem.js +1 -2
- package/src/sap/m/Select.js +23 -10
- package/src/sap/m/SelectDialog.js +22 -17
- package/src/sap/m/SelectDialogBase.js +1 -2
- package/src/sap/m/SelectList.js +4 -3
- package/src/sap/m/SelectionDetails.js +97 -92
- package/src/sap/m/SelectionDetailsFacade.js +2 -2
- package/src/sap/m/SelectionDetailsItem.js +1 -2
- package/src/sap/m/SelectionDetailsItemLine.js +1 -2
- package/src/sap/m/Shell.js +111 -107
- package/src/sap/m/SimpleFixFlex.js +5 -5
- package/src/sap/m/SinglePlanningCalendar.js +344 -340
- package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarGrid.js +25 -10
- package/src/sap/m/SinglePlanningCalendarGridRenderer.js +8 -7
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +16 -7
- package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWeekView.js +15 -15
- package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +5 -4
- package/src/sap/m/SlideTile.js +10 -7
- package/src/sap/m/Slider.js +180 -175
- package/src/sap/m/SliderRenderer.js +4 -4
- package/src/sap/m/SliderTooltip.js +5 -5
- package/src/sap/m/SliderTooltipBase.js +4 -3
- package/src/sap/m/SliderTooltipContainer.js +10 -6
- package/src/sap/m/SplitApp.js +52 -49
- package/src/sap/m/SplitButton.js +103 -96
- package/src/sap/m/SplitContainer.js +407 -422
- package/src/sap/m/StandardDynamicDateOption.js +1 -2
- package/src/sap/m/StandardListItem.js +116 -113
- package/src/sap/m/StandardTile.js +64 -61
- package/src/sap/m/StandardTreeItem.js +20 -17
- package/src/sap/m/StepInput.js +4 -3
- package/src/sap/m/SuggestionItem.js +1 -2
- package/src/sap/m/SuggestionsPopover.js +1 -1
- package/src/sap/m/Switch.js +79 -74
- package/src/sap/m/SwitchRenderer.js +3 -3
- package/src/sap/m/TabContainer.js +4 -3
- package/src/sap/m/TabContainerItem.js +1 -2
- package/src/sap/m/TabStrip.js +13 -11
- package/src/sap/m/TabStripItem.js +1 -1
- package/src/sap/m/Table.js +177 -174
- package/src/sap/m/TablePersoController.js +6 -5
- package/src/sap/m/TablePersoDialog.js +6 -4
- package/src/sap/m/TablePersoProvider.js +1 -1
- package/src/sap/m/TableRenderer.js +1 -1
- package/src/sap/m/TableSelectDialog.js +1 -3
- package/src/sap/m/Text.js +4 -3
- package/src/sap/m/TextArea.js +87 -84
- package/src/sap/m/Tile.js +20 -17
- package/src/sap/m/TileContainer.js +73 -73
- package/src/sap/m/TileContent.js +57 -6
- package/src/sap/m/TimePicker.js +17 -12
- package/src/sap/m/TimePickerClock.js +2 -2
- package/src/sap/m/TimePickerClocks.js +4 -2
- package/src/sap/m/TimePickerClocksRenderer.js +3 -1
- package/src/sap/m/TimePickerInputs.js +4 -2
- package/src/sap/m/TimePickerInternals.js +11 -7
- package/src/sap/m/TimePickerSlider.js +5 -4
- package/src/sap/m/TimePickerSliders.js +11 -7
- package/src/sap/m/TimePickerSlidersRenderer.js +2 -2
- package/src/sap/m/Title.js +109 -106
- package/src/sap/m/TitlePropagationSupport.js +4 -4
- package/src/sap/m/ToDoCardRenderer.js +161 -0
- package/src/sap/m/ToggleButton.js +29 -26
- package/src/sap/m/Token.js +97 -94
- package/src/sap/m/Tokenizer.js +153 -150
- package/src/sap/m/Toolbar.js +104 -101
- package/src/sap/m/ToolbarLayoutData.js +1 -2
- package/src/sap/m/ToolbarSeparator.js +11 -8
- package/src/sap/m/ToolbarSpacer.js +16 -13
- package/src/sap/m/Tree.js +32 -29
- package/src/sap/m/TreeItemBase.js +8 -5
- package/src/sap/m/TreeItemBaseRenderer.js +3 -3
- package/src/sap/m/UploadCollection.js +8 -5
- package/src/sap/m/UploadCollectionItem.js +1 -2
- package/src/sap/m/UploadCollectionParameter.js +1 -2
- package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -2
- package/src/sap/m/VBox.js +9 -6
- package/src/sap/m/ValueStateHeader.js +1 -2
- package/src/sap/m/VariantItem.js +6 -1
- package/src/sap/m/VariantManagement.js +79 -8
- package/src/sap/m/ViewSettingsCustomItem.js +1 -2
- package/src/sap/m/ViewSettingsCustomTab.js +1 -2
- package/src/sap/m/ViewSettingsDialog.js +189 -188
- package/src/sap/m/ViewSettingsFilterItem.js +1 -2
- package/src/sap/m/ViewSettingsItem.js +1 -2
- package/src/sap/m/VisibleItem.js +1 -1
- package/src/sap/m/WheelSlider.js +5 -4
- package/src/sap/m/WheelSliderContainer.js +4 -2
- package/src/sap/m/WheelSliderContainerRenderer.js +2 -2
- package/src/sap/m/Wizard.js +13 -3
- package/src/sap/m/WizardProgressNavigator.js +52 -49
- package/src/sap/m/WizardStep.js +6 -3
- package/src/sap/m/_thirdparty/purify.js +1622 -0
- package/src/sap/m/changeHandler/AddTableColumn.js +1 -1
- package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
- package/src/sap/m/changeHandler/CombineButtons.js +4 -3
- 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/library.js +40 -116
- package/src/sap/m/messagebundle.properties +22 -10
- package/src/sap/m/messagebundle_ar.properties +20 -6
- package/src/sap/m/messagebundle_bg.properties +19 -5
- package/src/sap/m/messagebundle_ca.properties +19 -5
- package/src/sap/m/messagebundle_cs.properties +30 -16
- package/src/sap/m/messagebundle_cy.properties +19 -5
- package/src/sap/m/messagebundle_da.properties +19 -5
- package/src/sap/m/messagebundle_de.properties +20 -6
- package/src/sap/m/messagebundle_el.properties +19 -5
- package/src/sap/m/messagebundle_en.properties +18 -4
- package/src/sap/m/messagebundle_en_GB.properties +18 -4
- package/src/sap/m/messagebundle_en_US_sappsd.properties +19 -3
- package/src/sap/m/messagebundle_en_US_saprigi.properties +23 -9
- package/src/sap/m/messagebundle_en_US_saptrc.properties +16 -2
- package/src/sap/m/messagebundle_es.properties +19 -5
- package/src/sap/m/messagebundle_es_MX.properties +19 -5
- package/src/sap/m/messagebundle_et.properties +19 -5
- package/src/sap/m/messagebundle_fi.properties +19 -5
- package/src/sap/m/messagebundle_fr.properties +20 -6
- package/src/sap/m/messagebundle_fr_CA.properties +20 -6
- package/src/sap/m/messagebundle_hi.properties +19 -5
- package/src/sap/m/messagebundle_hr.properties +20 -6
- package/src/sap/m/messagebundle_hu.properties +19 -5
- package/src/sap/m/messagebundle_id.properties +19 -5
- package/src/sap/m/messagebundle_it.properties +20 -6
- package/src/sap/m/messagebundle_iw.properties +19 -5
- package/src/sap/m/messagebundle_ja.properties +19 -5
- package/src/sap/m/messagebundle_kk.properties +19 -5
- package/src/sap/m/messagebundle_ko.properties +20 -6
- package/src/sap/m/messagebundle_lt.properties +20 -6
- package/src/sap/m/messagebundle_lv.properties +19 -5
- package/src/sap/m/messagebundle_ms.properties +19 -5
- package/src/sap/m/messagebundle_nl.properties +19 -5
- package/src/sap/m/messagebundle_no.properties +19 -5
- package/src/sap/m/messagebundle_pl.properties +19 -5
- package/src/sap/m/messagebundle_pt.properties +19 -5
- package/src/sap/m/messagebundle_pt_PT.properties +19 -5
- package/src/sap/m/messagebundle_ro.properties +19 -5
- package/src/sap/m/messagebundle_ru.properties +19 -5
- package/src/sap/m/messagebundle_sh.properties +20 -6
- package/src/sap/m/messagebundle_sk.properties +19 -5
- package/src/sap/m/messagebundle_sl.properties +20 -6
- package/src/sap/m/messagebundle_sv.properties +19 -5
- package/src/sap/m/messagebundle_th.properties +19 -5
- package/src/sap/m/messagebundle_tr.properties +19 -5
- package/src/sap/m/messagebundle_uk.properties +19 -5
- package/src/sap/m/messagebundle_vi.properties +19 -5
- package/src/sap/m/messagebundle_zh_CN.properties +19 -5
- package/src/sap/m/messagebundle_zh_TW.properties +19 -5
- 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 +21 -7
- package/src/sap/m/p13n/Container.js +1 -1
- package/src/sap/m/p13n/Engine.js +84 -79
- package/src/sap/m/p13n/GroupController.js +3 -4
- package/src/sap/m/p13n/GroupPanel.js +1 -1
- package/src/sap/m/p13n/MetadataHelper.js +8 -0
- package/src/sap/m/p13n/Popup.js +1 -1
- package/src/sap/m/p13n/QueryPanel.js +1 -1
- package/src/sap/m/p13n/SelectionController.js +8 -7
- package/src/sap/m/p13n/SelectionPanel.js +37 -15
- package/src/sap/m/p13n/SortController.js +3 -4
- package/src/sap/m/p13n/SortPanel.js +3 -3
- package/src/sap/m/p13n/modification/FlexModificationHandler.js +1 -1
- package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +1 -1
- package/src/sap/m/p13n/modification/ModificationHandler.js +11 -0
- package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/m/p13n/modules/StateHandlerRegistry.js +1 -1
- package/src/sap/m/p13n/modules/UIManager.js +1 -1
- package/src/sap/m/plugins/CellSelector.js +459 -76
- package/src/sap/m/plugins/ColumnResizer.js +1 -2
- package/src/sap/m/plugins/DataStateIndicator.js +1 -2
- package/src/sap/m/plugins/PasteProvider.js +1 -2
- package/src/sap/m/plugins/PluginBase.js +1 -2
- 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/Panel.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 -2
- package/src/sap/m/semantic/CancelAction.js +1 -2
- package/src/sap/m/semantic/DeleteAction.js +1 -2
- package/src/sap/m/semantic/DetailPage.js +1 -2
- package/src/sap/m/semantic/DiscussInJamAction.js +1 -2
- package/src/sap/m/semantic/EditAction.js +1 -2
- package/src/sap/m/semantic/FavoriteAction.js +1 -2
- package/src/sap/m/semantic/FilterAction.js +1 -2
- package/src/sap/m/semantic/FilterSelect.js +1 -2
- package/src/sap/m/semantic/FlagAction.js +1 -2
- package/src/sap/m/semantic/ForwardAction.js +1 -2
- package/src/sap/m/semantic/FullscreenPage.js +1 -2
- package/src/sap/m/semantic/GroupAction.js +1 -2
- package/src/sap/m/semantic/GroupSelect.js +1 -2
- package/src/sap/m/semantic/MainAction.js +1 -2
- package/src/sap/m/semantic/MasterPage.js +1 -2
- package/src/sap/m/semantic/MessagesIndicator.js +1 -2
- package/src/sap/m/semantic/MultiSelectAction.js +1 -2
- package/src/sap/m/semantic/NegativeAction.js +1 -2
- package/src/sap/m/semantic/OpenInAction.js +1 -2
- package/src/sap/m/semantic/PositiveAction.js +1 -2
- package/src/sap/m/semantic/PrintAction.js +1 -2
- package/src/sap/m/semantic/SaveAction.js +1 -2
- package/src/sap/m/semantic/Segment.js +1 -2
- package/src/sap/m/semantic/SegmentedContainer.js +1 -1
- package/src/sap/m/semantic/SemanticButton.js +1 -2
- package/src/sap/m/semantic/SemanticConfiguration.js +1 -2
- package/src/sap/m/semantic/SemanticControl.js +1 -2
- package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -2
- package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -2
- package/src/sap/m/semantic/SemanticPage.js +4 -3
- package/src/sap/m/semantic/SemanticSelect.js +1 -2
- package/src/sap/m/semantic/SemanticToggleButton.js +1 -2
- package/src/sap/m/semantic/SendEmailAction.js +1 -2
- package/src/sap/m/semantic/SendMessageAction.js +1 -2
- package/src/sap/m/semantic/ShareInJamAction.js +1 -2
- package/src/sap/m/semantic/ShareMenu.js +1 -2
- package/src/sap/m/semantic/ShareMenuPage.js +1 -2
- package/src/sap/m/semantic/SortAction.js +1 -2
- package/src/sap/m/semantic/SortSelect.js +1 -2
- package/src/sap/m/table/Util.js +17 -5
- 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 +1 -1
- package/src/sap/m/table/columnmenu/ItemBase.js +2 -2
- package/src/sap/m/table/columnmenu/ItemContainer.js +1 -1
- package/src/sap/m/table/columnmenu/Menu.js +64 -22
- package/src/sap/m/table/columnmenu/QuickAction.js +16 -8
- package/src/sap/m/table/columnmenu/QuickActionBase.js +19 -4
- package/src/sap/m/table/columnmenu/QuickActionContainer.js +1 -1
- package/src/sap/m/table/columnmenu/QuickActionItem.js +5 -6
- package/src/sap/m/table/columnmenu/QuickGroup.js +9 -3
- 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 +11 -12
- package/src/sap/m/table/columnmenu/QuickTotal.js +9 -3
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
- package/src/sap/m/themes/base/ActionTile.less +239 -0
- package/src/sap/m/themes/base/Bar.less +6 -0
- package/src/sap/m/themes/base/Carousel.less +8 -8
- package/src/sap/m/themes/base/CellSelector.less +109 -2
- package/src/sap/m/themes/base/DisplayListItem.less +3 -3
- package/src/sap/m/themes/base/GenericTile.less +7 -0
- package/src/sap/m/themes/base/IconTabBar.less +2 -0
- package/src/sap/m/themes/base/Link.less +4 -0
- package/src/sap/m/themes/base/Page.less +2 -1
- package/src/sap/m/themes/base/library.source.less +1 -0
- package/src/sap/m/upload/UploadSet.js +295 -13
- package/src/sap/m/upload/UploadSetItem.js +1 -2
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
- package/src/sap/m/upload/Uploader.js +0 -1
- package/src/sap/m/upload/UploaderHttpRequestMethod.js +0 -1
package/src/sap/m/Image.js
CHANGED
|
@@ -9,13 +9,14 @@ sap.ui.define([
|
|
|
9
9
|
'./library',
|
|
10
10
|
'sap/ui/core/Control',
|
|
11
11
|
'sap/ui/base/DataType',
|
|
12
|
+
'sap/base/security/URLListValidator',
|
|
12
13
|
'./ImageRenderer',
|
|
13
14
|
"sap/ui/events/KeyCodes",
|
|
14
15
|
"sap/ui/thirdparty/jquery",
|
|
15
16
|
"sap/base/security/encodeCSS",
|
|
16
17
|
"sap/ui/core/library"
|
|
17
18
|
],
|
|
18
|
-
function(library, Control, DataType, ImageRenderer, KeyCodes, jQuery, encodeCSS, coreLibrary) {
|
|
19
|
+
function(library, Control, DataType, URLListValidator, ImageRenderer, KeyCodes, jQuery, encodeCSS, coreLibrary) {
|
|
19
20
|
"use strict";
|
|
20
21
|
|
|
21
22
|
|
|
@@ -57,207 +58,210 @@ sap.ui.define([
|
|
|
57
58
|
* @implements sap.ui.core.IFormContent
|
|
58
59
|
*
|
|
59
60
|
* @author SAP SE
|
|
60
|
-
* @version 1.
|
|
61
|
+
* @version 1.107.0
|
|
61
62
|
*
|
|
62
63
|
* @public
|
|
63
64
|
* @alias sap.m.Image
|
|
64
|
-
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
65
65
|
*/
|
|
66
|
-
var Image = Control.extend("sap.m.Image", /** @lends sap.m.Image.prototype */ {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
66
|
+
var Image = Control.extend("sap.m.Image", /** @lends sap.m.Image.prototype */ {
|
|
67
|
+
metadata : {
|
|
68
|
+
|
|
69
|
+
interfaces : ["sap.ui.core.IFormContent"],
|
|
70
|
+
library : "sap.m",
|
|
71
|
+
designtime: "sap/m/designtime/Image.designtime",
|
|
72
|
+
properties : {
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Relative or absolute path to URL where the image file is stored.
|
|
76
|
+
*
|
|
77
|
+
* The path will be adapted to the density-aware format according to the density of the device
|
|
78
|
+
* following the naming convention [imageName]@[densityValue].[extension].
|
|
79
|
+
*/
|
|
80
|
+
src : {type : "sap.ui.core.URI", group : "Data", defaultValue : null},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* When the empty value is kept, the original size is not changed.
|
|
84
|
+
*
|
|
85
|
+
* It is also possible to make settings for width or height only, in which case the original
|
|
86
|
+
* ratio between width/height is maintained. When the <code>mode</code> property is set to
|
|
87
|
+
* <code>sap.m.ImageMode.Background</code>, this property always needs to be set.
|
|
88
|
+
* Otherwise the output DOM element has a 0 size.
|
|
89
|
+
*/
|
|
90
|
+
width : {type : "sap.ui.core.CSSSize", group : "Appearance", defaultValue : null},
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* When the empty value is kept, the original size is not changed.
|
|
94
|
+
*
|
|
95
|
+
* It is also possible to make settings for width or height only, in which case the original
|
|
96
|
+
* ratio between width/height is maintained. When the <code>mode</code> property is set to
|
|
97
|
+
* <code>sap.m.ImageMode.Background</code>, this property always needs to be set.
|
|
98
|
+
* Otherwise the output DOM element has a 0 size.
|
|
99
|
+
*/
|
|
100
|
+
height : {type : "sap.ui.core.CSSSize", group : "Appearance", defaultValue : null},
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A decorative image is included for design reasons; accessibility tools will ignore decorative images.
|
|
104
|
+
*
|
|
105
|
+
* Note: If the image has an image map (<code>useMap</code> is set), this property will be overridden
|
|
106
|
+
* (the image will not be rendered as decorative). A decorative image has no <code>ALT</code> attribute,
|
|
107
|
+
* so the <code>alt</code> property is ignored if the image is decorative.
|
|
108
|
+
*/
|
|
109
|
+
decorative : {type : "boolean", group : "Accessibility", defaultValue : true},
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The alternative text that is displayed in case the image is not available, or cannot be displayed.
|
|
113
|
+
*
|
|
114
|
+
* If the image is set to decorative, this property is ignored.
|
|
115
|
+
*/
|
|
116
|
+
alt : {type : "string", group : "Accessibility", defaultValue : null},
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The name of the image map that defines the clickable areas.
|
|
120
|
+
*/
|
|
121
|
+
useMap : {type : "string", group : "Misc", defaultValue : null},
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* If this is set to <code>true</code>, one or more network requests will be made
|
|
125
|
+
* that try to obtain the density perfect version of the image.
|
|
126
|
+
*
|
|
127
|
+
* By default, this is set to <code>false</code>, so the <code>src</code> image is loaded
|
|
128
|
+
* directly without attempting to fetch the density perfect image for high-density devices.
|
|
129
|
+
*
|
|
130
|
+
* <b>Note:</b> Before 1.60, the default value was set to <code>true</code>, which
|
|
131
|
+
* brought redundant network requests for apps that used the default but did not
|
|
132
|
+
* provide density perfect image versions on server-side.
|
|
133
|
+
* You should set this property to <code>true</code> only if you also provide the
|
|
134
|
+
* corresponding image versions for high-density devices.
|
|
135
|
+
*/
|
|
136
|
+
densityAware : {type : "boolean", group : "Misc", defaultValue : false},
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The source property which is used when the image is pressed.
|
|
140
|
+
*/
|
|
141
|
+
activeSrc : {type : "sap.ui.core.URI", group : "Data", defaultValue : ""},
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Defines how the <code>src</code> and the <code>activeSrc</code> is output to the DOM Element.
|
|
145
|
+
*
|
|
146
|
+
* When set to <code>sap.m.ImageMode.Image</code>, which is the default value, the <code>src</code>
|
|
147
|
+
* (<code>activeSrc</code>) is set to the <code>src</code> attribute of the <img> tag. When
|
|
148
|
+
* set to <code>sap.m.ImageMode.Background</code>, the <code>src</code> (<code>activeSrc</code>)
|
|
149
|
+
* is set to the CSS style <code>background-image</code> and the root DOM element is rendered as a
|
|
150
|
+
* <span> tag instead of an <img> tag.
|
|
151
|
+
* @since 1.30.0
|
|
152
|
+
*/
|
|
153
|
+
mode : {type : "sap.m.ImageMode", group : "Misc", defaultValue : "Image"},
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Defines the size of the image in <code>sap.m.ImageMode.Background</code> mode.
|
|
157
|
+
*
|
|
158
|
+
* This property is set on the output DOM element using the CSS style <code>background-size</code>.
|
|
159
|
+
* It takes effect only when the <code>mode</code> property is set to <code>sap.m.ImageMode.Background</code>.
|
|
160
|
+
* @since 1.30.0
|
|
161
|
+
*/
|
|
162
|
+
backgroundSize : {type : "string", group : "Appearance", defaultValue : "cover"},
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Defines the position of the image in <code>sap.m.ImageMode.Background</code> mode.
|
|
166
|
+
*
|
|
167
|
+
* This property is set on the output DOM element using the CSS style <code>background-position</code>.
|
|
168
|
+
* It takes effect only when the <code>mode</code> property is set to <code>sap.m.ImageMode.Background</code>.
|
|
169
|
+
* @since 1.30.0
|
|
170
|
+
*/
|
|
171
|
+
backgroundPosition : {type : "string", group : "Appearance", defaultValue : "initial"},
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Defines whether the source image is repeated when the output DOM element is bigger than the source.
|
|
175
|
+
*
|
|
176
|
+
* This property is set on the output DOM element using the CSS style <code>background-repeat</code>.
|
|
177
|
+
* It takes effect only when the <code>mode</code> property is set to <code>sap.m.ImageMode.Background</code>.
|
|
178
|
+
* @since 1.30.0
|
|
179
|
+
*/
|
|
180
|
+
backgroundRepeat : {type : "string", group : "Appearance", defaultValue : "no-repeat"},
|
|
181
|
+
/**
|
|
182
|
+
* Enables lazy loading for images that are offscreen. If set to <code>true</code>, the property
|
|
183
|
+
* ensures that offscreen images are loaded early enough so that they have finished loading once
|
|
184
|
+
* the user scrolls near them.
|
|
185
|
+
*
|
|
186
|
+
* <b>Note:</b> Keep in mind that the property uses the loading attribute of HTML <code><img></code> element
|
|
187
|
+
* which is not supported for Internet Explorer.
|
|
188
|
+
*
|
|
189
|
+
* @since 1.87
|
|
190
|
+
*/
|
|
191
|
+
lazyLoading : {type : "boolean", defaultValue : false },
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Defines the aria-haspopup attribute of the <code>Image</code>.
|
|
195
|
+
*
|
|
196
|
+
* <b>Guidance for choosing appropriate value:</b>
|
|
197
|
+
* <ul>
|
|
198
|
+
* <li> We recommend you to use the property only when press handler is set.</li>
|
|
199
|
+
* <li> If you use controls based on <code>sap.m.Popover</code> or <code>sap.m.Dialog</code>,
|
|
200
|
+
* then you must use <code>AriaHasPopup.Dialog</code> (both <code>sap.m.Popover</code> and
|
|
201
|
+
* <code>sap.m.Dialog</code> have role "dialog" assigned internally).</li>
|
|
202
|
+
* <li> If you use other controls, or directly <code>sap.ui.core.Popup</code>, you need to check
|
|
203
|
+
* the container role/type and map the value of <code>ariaHasPopup</code> accordingly.</li>
|
|
204
|
+
* </ul>
|
|
205
|
+
*
|
|
206
|
+
* @since 1.87.0
|
|
207
|
+
*/
|
|
208
|
+
ariaHasPopup : {type : "sap.ui.core.aria.HasPopup", group : "Accessibility", defaultValue : AriaHasPopup.None}
|
|
209
|
+
},
|
|
210
|
+
aggregations : {
|
|
211
|
+
/**
|
|
212
|
+
* A <code>sap.m.LightBox</code> instance that will be opened automatically when the user interacts
|
|
213
|
+
* with the <code>Image</code> control.
|
|
214
|
+
*
|
|
215
|
+
* The <code>tap</code> event will still be fired.
|
|
216
|
+
*/
|
|
217
|
+
detailBox: {type: 'sap.m.LightBox', multiple: false, bindable: "bindable"}
|
|
218
|
+
},
|
|
219
|
+
associations : {
|
|
220
|
+
/**
|
|
221
|
+
* Association to controls / ids which describe this control (see WAI-ARIA attribute aria-describedby).
|
|
222
|
+
*/
|
|
223
|
+
ariaDescribedBy : {type : "sap.ui.core.Control", multiple : true, singularName : "ariaDescribedBy"},
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledBy).
|
|
227
|
+
*/
|
|
228
|
+
ariaLabelledBy: {type : "sap.ui.core.Control", multiple : true, singularName : "ariaLabelledBy"},
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Association to controls / IDs which are details to this control (see WAI-ARIA attribute aria-details).
|
|
232
|
+
* @since 1.79
|
|
233
|
+
*/
|
|
234
|
+
ariaDetails: {type : "sap.ui.core.Control", multiple : true, singularName : "ariaDetails"}
|
|
235
|
+
},
|
|
236
|
+
events : {
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Event is fired when the user clicks on the control. (This event is deprecated, use the press event instead)
|
|
240
|
+
*/
|
|
241
|
+
tap : {},
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Event is fired when the user clicks on the control.
|
|
245
|
+
*/
|
|
246
|
+
press : {},
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Event is fired when the image resource is loaded.
|
|
250
|
+
* @since 1.36.2
|
|
251
|
+
*/
|
|
252
|
+
load : {},
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Event is fired when the image resource can't be loaded. If densityAware is set to true, the event is fired when none of the fallback resources can be loaded.
|
|
256
|
+
* @since 1.36.2
|
|
257
|
+
*/
|
|
258
|
+
error : {}
|
|
259
|
+
},
|
|
260
|
+
dnd: { draggable: true, droppable: false }
|
|
208
261
|
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
* with the <code>Image</code> control.
|
|
213
|
-
*
|
|
214
|
-
* The <code>tap</code> event will still be fired.
|
|
215
|
-
*/
|
|
216
|
-
detailBox: {type: 'sap.m.LightBox', multiple: false, bindable: "bindable"}
|
|
217
|
-
},
|
|
218
|
-
associations : {
|
|
219
|
-
/**
|
|
220
|
-
* Association to controls / ids which describe this control (see WAI-ARIA attribute aria-describedby).
|
|
221
|
-
*/
|
|
222
|
-
ariaDescribedBy : {type : "sap.ui.core.Control", multiple : true, singularName : "ariaDescribedBy"},
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledBy).
|
|
226
|
-
*/
|
|
227
|
-
ariaLabelledBy: {type : "sap.ui.core.Control", multiple : true, singularName : "ariaLabelledBy"},
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Association to controls / IDs which are details to this control (see WAI-ARIA attribute aria-details).
|
|
231
|
-
* @since 1.79
|
|
232
|
-
*/
|
|
233
|
-
ariaDetails: {type : "sap.ui.core.Control", multiple : true, singularName : "ariaDetails"}
|
|
234
|
-
},
|
|
235
|
-
events : {
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Event is fired when the user clicks on the control. (This event is deprecated, use the press event instead)
|
|
239
|
-
*/
|
|
240
|
-
tap : {},
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Event is fired when the user clicks on the control.
|
|
244
|
-
*/
|
|
245
|
-
press : {},
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Event is fired when the image resource is loaded.
|
|
249
|
-
* @since 1.36.2
|
|
250
|
-
*/
|
|
251
|
-
load : {},
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Event is fired when the image resource can't be loaded. If densityAware is set to true, the event is fired when none of the fallback resources can be loaded.
|
|
255
|
-
* @since 1.36.2
|
|
256
|
-
*/
|
|
257
|
-
error : {}
|
|
258
|
-
},
|
|
259
|
-
dnd: { draggable: true, droppable: false }
|
|
260
|
-
}});
|
|
262
|
+
|
|
263
|
+
renderer: ImageRenderer
|
|
264
|
+
});
|
|
261
265
|
|
|
262
266
|
Image._currentDevicePixelRatio = (function() {
|
|
263
267
|
|
|
@@ -282,6 +286,10 @@ sap.ui.define([
|
|
|
282
286
|
return ratio;
|
|
283
287
|
}());
|
|
284
288
|
|
|
289
|
+
Image.prototype.init = function () {
|
|
290
|
+
this._oSvgCachedData = {};
|
|
291
|
+
};
|
|
292
|
+
|
|
285
293
|
/**
|
|
286
294
|
* Function is called when image is loaded successfully.
|
|
287
295
|
*
|
|
@@ -418,6 +426,17 @@ sap.ui.define([
|
|
|
418
426
|
return this.setAggregation("detailBox", oLightBox);
|
|
419
427
|
};
|
|
420
428
|
|
|
429
|
+
Image.prototype.setSrc = function (sSrc) {
|
|
430
|
+
var oPreviousSrc = this.getSrc(),
|
|
431
|
+
oResult = this.setProperty("src", sSrc);
|
|
432
|
+
|
|
433
|
+
if (sSrc && oPreviousSrc !== this.getSrc() && this.getMode() === ImageMode.InlineSvg) {
|
|
434
|
+
sSrc.endsWith("svg") && this._loadSvg();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return oResult;
|
|
438
|
+
};
|
|
439
|
+
|
|
421
440
|
/*
|
|
422
441
|
* @override
|
|
423
442
|
*/
|
|
@@ -450,6 +469,10 @@ sap.ui.define([
|
|
|
450
469
|
var $DomNode = this.getDetailBox() ? this.$().find(".sapMImg") : this.$();
|
|
451
470
|
$DomNode.off("load").off("error");
|
|
452
471
|
}
|
|
472
|
+
|
|
473
|
+
if (this.getMode() === ImageMode.InlineSvg) {
|
|
474
|
+
this._loadSvg();
|
|
475
|
+
}
|
|
453
476
|
};
|
|
454
477
|
|
|
455
478
|
/**
|
|
@@ -501,6 +524,8 @@ sap.ui.define([
|
|
|
501
524
|
if (this._fnLightBoxOpen) {
|
|
502
525
|
this._fnLightBoxOpen = null;
|
|
503
526
|
}
|
|
527
|
+
|
|
528
|
+
this._oSvgCachedData = null;
|
|
504
529
|
};
|
|
505
530
|
|
|
506
531
|
/**
|
|
@@ -600,6 +625,54 @@ sap.ui.define([
|
|
|
600
625
|
oEvent.preventDefault();
|
|
601
626
|
};
|
|
602
627
|
|
|
628
|
+
/**
|
|
629
|
+
* Loads "svg"
|
|
630
|
+
* @private
|
|
631
|
+
*/
|
|
632
|
+
Image.prototype._loadSvg = function() {
|
|
633
|
+
var that = this,
|
|
634
|
+
sSrc = this.getSrc(),
|
|
635
|
+
oSvg;
|
|
636
|
+
|
|
637
|
+
if (!this._oSvgCachedData[sSrc]) {
|
|
638
|
+
that._oSvgCachedData[sSrc] = {};
|
|
639
|
+
jQuery.get(this.getSrc(), function(data) {
|
|
640
|
+
oSvg = jQuery(data).find('svg')[0];
|
|
641
|
+
|
|
642
|
+
if (oSvg) {
|
|
643
|
+
sap.ui.require(["sap/m/_thirdparty/purify"],
|
|
644
|
+
function(DOMPurify) {
|
|
645
|
+
that._oSvgCachedData[sSrc].oSvgDomRef = DOMPurify.sanitize(oSvg, {RETURN_DOM: true});
|
|
646
|
+
that.invalidate();
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
})
|
|
650
|
+
.done(function() {
|
|
651
|
+
that.fireLoad();
|
|
652
|
+
})
|
|
653
|
+
.fail(function() {
|
|
654
|
+
that.fireError();
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
Image.prototype._getSvgCachedData = function () {
|
|
660
|
+
var sSrc = this.getSrc();
|
|
661
|
+
|
|
662
|
+
if (this._oSvgCachedData[sSrc]
|
|
663
|
+
&& typeof this._oSvgCachedData[sSrc].oSvgDomRef === "object") {
|
|
664
|
+
return this._oSvgCachedData[sSrc].oSvgDomRef;
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Checks if href is valid
|
|
670
|
+
* @private
|
|
671
|
+
*/
|
|
672
|
+
Image.prototype._isHrefValid = function (sURL) {
|
|
673
|
+
return URLListValidator.validate(sURL);
|
|
674
|
+
};
|
|
675
|
+
|
|
603
676
|
/**
|
|
604
677
|
* Update the source image either on the output DOM element (when in sap.m.ImageMode.Image mode) or on the window.Image object (when in sap.m.ImageMode.Background mode)
|
|
605
678
|
* @private
|
|
@@ -33,12 +33,11 @@ sap.ui.define([
|
|
|
33
33
|
* @extends sap.ui.core.Control
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.107.0
|
|
37
37
|
* @since 1.38
|
|
38
38
|
*
|
|
39
39
|
* @public
|
|
40
40
|
* @alias sap.m.ImageContent
|
|
41
|
-
* @ui5-metamodel This control will also be described in the UI5 (legacy) designtime metamodel
|
|
42
41
|
*/
|
|
43
42
|
var ImageContent = Control.extend("sap.m.ImageContent", /** @lends sap.m.ImageContent.prototype */ {
|
|
44
43
|
metadata: {
|
|
@@ -67,7 +66,9 @@ sap.ui.define([
|
|
|
67
66
|
*/
|
|
68
67
|
press: {}
|
|
69
68
|
}
|
|
70
|
-
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
renderer: ImageContentRenderer
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
/* --- Lifecycle Handling --- */
|
|
@@ -42,6 +42,8 @@ sap.ui.define(['sap/m/library', "sap/base/security/encodeCSS", "sap/ui/core/libr
|
|
|
42
42
|
aDescribedBy = oImage.getAriaDescribedBy(),
|
|
43
43
|
aDetails = oImage.getAriaDetails(),
|
|
44
44
|
bIsImageMode = sMode === ImageMode.Image,
|
|
45
|
+
bIsSvgMode = sMode === ImageMode.InlineSvg,
|
|
46
|
+
bIsBackGroundMode = sMode === ImageMode.Background,
|
|
45
47
|
bLazyLoading = oImage.getLazyLoading(),
|
|
46
48
|
sAriaHasPopup = oImage.getAriaHasPopup();
|
|
47
49
|
|
|
@@ -61,6 +63,8 @@ sap.ui.define(['sap/m/library', "sap/base/security/encodeCSS", "sap/ui/core/libr
|
|
|
61
63
|
oRm.attr("loading", "lazy");
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
} else if (bIsSvgMode) {
|
|
67
|
+
oRm.openStart("div", oImage);
|
|
64
68
|
} else {
|
|
65
69
|
oRm.openStart("span", !oLightBox ? oImage : oImage.getId() + "-inner");
|
|
66
70
|
}
|
|
@@ -84,7 +88,7 @@ sap.ui.define(['sap/m/library', "sap/base/security/encodeCSS", "sap/ui/core/libr
|
|
|
84
88
|
|
|
85
89
|
if (bIsImageMode) {
|
|
86
90
|
oRm.attr("src", oImage._getDensityAwareSrc());
|
|
87
|
-
} else {
|
|
91
|
+
} else if (bIsBackGroundMode) {
|
|
88
92
|
// preload the image with a window.Image instance. The source uri is set to the output DOM node via CSS style 'background-image' after the source image is loaded (in onload function)
|
|
89
93
|
oImage._preLoadImage(oImage._getDensityAwareSrc());
|
|
90
94
|
if (oImage._isValidBackgroundSizeValue(oImage.getBackgroundSize())) {
|
|
@@ -141,12 +145,72 @@ sap.ui.define(['sap/m/library', "sap/base/security/encodeCSS", "sap/ui/core/libr
|
|
|
141
145
|
oRm.style("width", oImage.getWidth());
|
|
142
146
|
oRm.style("height", oImage.getHeight());
|
|
143
147
|
|
|
144
|
-
|
|
148
|
+
if (bIsImageMode) {
|
|
149
|
+
oRm.voidEnd();
|
|
150
|
+
} else if (bIsSvgMode) {
|
|
151
|
+
oRm.openEnd();
|
|
152
|
+
this._renderSvg(oRm, oImage);
|
|
153
|
+
oRm.close("div");
|
|
154
|
+
} else {
|
|
155
|
+
oRm.openEnd().close("span");
|
|
156
|
+
}
|
|
145
157
|
|
|
146
158
|
if (oLightBox) {
|
|
147
159
|
oRm.close("span");
|
|
148
160
|
}
|
|
149
161
|
};
|
|
150
162
|
|
|
163
|
+
ImageRenderer._renderSvg = function(oRm, oImage) {
|
|
164
|
+
var oSvg = oImage._getSvgCachedData(),
|
|
165
|
+
oChildren;
|
|
166
|
+
|
|
167
|
+
if (!oSvg) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
oChildren = oSvg.children;
|
|
172
|
+
this._renderSvgChildren(oRm, oChildren, oImage);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
ImageRenderer._renderSvgAttributes = function (oRm, aAttributes, oImage) {
|
|
176
|
+
for (var i = 0; i < aAttributes.length; i++) {
|
|
177
|
+
var oAttr = aAttributes[i],
|
|
178
|
+
iNamespaceIndex = oAttr.name.indexOf(":"),
|
|
179
|
+
sAttributeName = iNamespaceIndex < 0 ? oAttr.name : oAttr.name.slice(iNamespaceIndex + 1);
|
|
180
|
+
|
|
181
|
+
if (sAttributeName === "href" && !oImage._isHrefValid(oAttr.value)) {
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
oRm.attr(sAttributeName, oAttr.value);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
ImageRenderer._renderSvgChildren = function (oRm, oChildren, oImage) {
|
|
190
|
+
var aChildren = [].slice.call(oChildren).filter(function (oChild) {
|
|
191
|
+
return (oChild.nodeType !== Node.TEXT_NODE)
|
|
192
|
+
// Do not return empty textContent -> line spaces/endings
|
|
193
|
+
|| (oChild.nodeType === Node.TEXT_NODE && oChild.textContent.trim() !== "");
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
aChildren.forEach(function (oChild) {
|
|
197
|
+
var sTagName = oChild.tagName,
|
|
198
|
+
aAttributes = oChild.attributes,
|
|
199
|
+
oChildren = oChild.childNodes;
|
|
200
|
+
|
|
201
|
+
if (oChild.nodeType !== Node.TEXT_NODE) {
|
|
202
|
+
oRm.openStart(sTagName);
|
|
203
|
+
this._renderSvgAttributes(oRm, aAttributes, oImage);
|
|
204
|
+
oRm.openEnd();
|
|
205
|
+
|
|
206
|
+
oChildren.length && this._renderSvgChildren(oRm, oChildren, oImage);
|
|
207
|
+
oRm.close(sTagName);
|
|
208
|
+
|
|
209
|
+
} else {
|
|
210
|
+
oChild.textContent.length && oRm.text(oChild.textContent.trim());
|
|
211
|
+
}
|
|
212
|
+
}, this);
|
|
213
|
+
};
|
|
214
|
+
|
|
151
215
|
return ImageRenderer;
|
|
152
216
|
}, /* bExport= */ true);
|