@openui5/sap.m 1.123.1 → 1.124.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/package.json +4 -4
- package/src/sap/m/.library +6 -1
- package/src/sap/m/AccButton.js +1 -1
- package/src/sap/m/ActionListItem.js +1 -1
- package/src/sap/m/ActionSelect.js +2 -2
- package/src/sap/m/ActionSheet.js +1 -1
- package/src/sap/m/ActionTile.js +33 -11
- package/src/sap/m/ActionTileContent.js +9 -4
- package/src/sap/m/AdditionalTextButton.js +1 -1
- package/src/sap/m/App.js +1 -1
- package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
- package/src/sap/m/Avatar.js +53 -13
- package/src/sap/m/AvatarColor.js +3 -1
- package/src/sap/m/AvatarImageFitType.js +3 -1
- package/src/sap/m/AvatarRenderer.js +4 -3
- package/src/sap/m/AvatarShape.js +3 -1
- package/src/sap/m/AvatarSize.js +3 -1
- package/src/sap/m/AvatarType.js +3 -1
- package/src/sap/m/Bar.js +1 -1
- package/src/sap/m/Breadcrumbs.js +1 -1
- package/src/sap/m/BusyDialog.js +1 -1
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +1 -1
- package/src/sap/m/Carousel.js +1 -1
- package/src/sap/m/CarouselLayout.js +1 -1
- package/src/sap/m/CheckBox.js +1 -1
- package/src/sap/m/ColorPalette.js +1 -1
- package/src/sap/m/ColorPalettePopover.js +1 -1
- package/src/sap/m/Column.js +1 -1
- package/src/sap/m/ColumnHeaderPopover.js +1 -1
- package/src/sap/m/ColumnListItem.js +1 -1
- package/src/sap/m/ColumnPopoverActionItem.js +1 -1
- package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
- package/src/sap/m/ColumnPopoverItem.js +1 -1
- package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
- package/src/sap/m/ColumnPopoverSortItem.js +1 -1
- package/src/sap/m/ComboBox.js +1 -1
- package/src/sap/m/ComboBoxBase.js +2 -1
- package/src/sap/m/ComboBoxTextField.js +1 -1
- package/src/sap/m/ContentConfig.js +1 -1
- package/src/sap/m/CustomListItem.js +1 -1
- package/src/sap/m/CustomTile.js +1 -1
- package/src/sap/m/CustomTreeItem.js +1 -1
- package/src/sap/m/DatePicker.js +1 -1
- package/src/sap/m/DateRangeSelection.js +2 -2
- package/src/sap/m/DateTimeField.js +1 -1
- package/src/sap/m/DateTimeInput.js +1 -1
- package/src/sap/m/DateTimePicker.js +1 -3
- package/src/sap/m/Dialog.js +1 -1
- package/src/sap/m/DisplayListItem.js +1 -1
- package/src/sap/m/DraftIndicator.js +1 -1
- package/src/sap/m/DynamicDate.js +1 -1
- package/src/sap/m/DynamicDateOption.js +1 -1
- package/src/sap/m/DynamicDateRange.js +2 -6
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
- package/src/sap/m/ExpandableText.js +1 -1
- package/src/sap/m/FacetFilter.js +1 -1
- package/src/sap/m/FacetFilterItem.js +1 -1
- package/src/sap/m/FacetFilterList.js +1 -1
- package/src/sap/m/FeedContent.js +1 -1
- package/src/sap/m/FeedInput.js +1 -1
- package/src/sap/m/FeedListItem.js +1 -1
- package/src/sap/m/FeedListItemAction.js +1 -1
- package/src/sap/m/Fiori20Adapter.js +2 -2
- package/src/sap/m/FlexBox.js +1 -1
- package/src/sap/m/FlexItemData.js +1 -1
- package/src/sap/m/FormattedText.js +1 -1
- package/src/sap/m/GenericTag.js +1 -1
- package/src/sap/m/GenericTile.js +40 -17
- package/src/sap/m/GenericTileRenderer.js +103 -11
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +8 -2
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/HeaderContainerRenderer.js +3 -0
- package/src/sap/m/IconTabBar.js +1 -1
- package/src/sap/m/IconTabBarSelectList.js +1 -1
- package/src/sap/m/IconTabFilter.js +2 -2
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
- package/src/sap/m/IconTabHeader.js +1 -1
- package/src/sap/m/IconTabSeparator.js +1 -1
- package/src/sap/m/IllustratedMessage.js +19 -3
- package/src/sap/m/IllustratedMessageSize.js +3 -1
- package/src/sap/m/IllustratedMessageType.js +3 -1
- package/src/sap/m/Illustration.js +1 -1
- package/src/sap/m/Image.js +1 -1
- package/src/sap/m/ImageContent.js +1 -1
- package/src/sap/m/Input.js +53 -34
- package/src/sap/m/InputBase.js +5 -9
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/InputRenderer.js +6 -9
- package/src/sap/m/Label.js +1 -1
- package/src/sap/m/LightBox.js +1 -1
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +1 -1
- package/src/sap/m/LinkTileContent.js +1 -1
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +6 -6
- package/src/sap/m/ListItemBase.js +3 -6
- package/src/sap/m/MaskEnabler.js +1 -1
- package/src/sap/m/MaskInput.js +1 -1
- package/src/sap/m/MaskInputRule.js +1 -1
- package/src/sap/m/Menu.js +1 -1
- package/src/sap/m/MenuButton.js +1 -1
- package/src/sap/m/MenuItem.js +1 -1
- package/src/sap/m/MenuListItem.js +1 -1
- package/src/sap/m/MessageBox.js +25 -7
- package/src/sap/m/MessageItem.js +1 -1
- package/src/sap/m/MessageListItem.js +3 -6
- package/src/sap/m/MessagePage.js +1 -1
- package/src/sap/m/MessagePopover.js +1 -1
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +4 -4
- package/src/sap/m/MessageToast.js +1 -1
- package/src/sap/m/MessageView.js +3 -4
- package/src/sap/m/MultiComboBox.js +1 -6
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +36 -3
- package/src/sap/m/NavContainer.js +1 -1
- package/src/sap/m/NewsContent.js +1 -1
- package/src/sap/m/NotificationList.js +1 -1
- package/src/sap/m/NotificationListBase.js +1 -1
- package/src/sap/m/NotificationListGroup.js +1 -1
- package/src/sap/m/NotificationListItem.js +1 -1
- package/src/sap/m/NumericContent.js +1 -1
- package/src/sap/m/NumericInput.js +1 -1
- package/src/sap/m/ObjectAttribute.js +1 -1
- package/src/sap/m/ObjectHeader.js +1 -1
- package/src/sap/m/ObjectIdentifier.js +1 -1
- package/src/sap/m/ObjectListItem.js +1 -1
- package/src/sap/m/ObjectMarker.js +1 -1
- package/src/sap/m/ObjectNumber.js +1 -1
- package/src/sap/m/ObjectStatus.js +1 -1
- package/src/sap/m/OverflowToolbar.js +1 -1
- package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
- package/src/sap/m/OverflowToolbarAssociativePopoverControls.js +1 -1
- package/src/sap/m/OverflowToolbarButton.js +1 -1
- package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
- package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
- package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/P13nAnyFilterItem.js +2 -1
- package/src/sap/m/P13nColumnsItem.js +2 -2
- package/src/sap/m/P13nColumnsPanel.js +2 -2
- package/src/sap/m/P13nConditionPanel.js +2 -1
- package/src/sap/m/P13nDialog.js +4 -7
- package/src/sap/m/P13nDimMeasureItem.js +2 -2
- package/src/sap/m/P13nDimMeasurePanel.js +2 -2
- package/src/sap/m/P13nFilterItem.js +2 -1
- package/src/sap/m/P13nFilterPanel.js +3 -1
- package/src/sap/m/P13nGroupItem.js +2 -2
- package/src/sap/m/P13nGroupPanel.js +2 -2
- package/src/sap/m/P13nItem.js +2 -1
- package/src/sap/m/P13nOperationsHelper.js +2 -0
- package/src/sap/m/P13nPanel.js +2 -1
- package/src/sap/m/P13nSelectionItem.js +2 -1
- package/src/sap/m/P13nSelectionPanel.js +2 -1
- package/src/sap/m/P13nSortItem.js +2 -2
- package/src/sap/m/P13nSortPanel.js +2 -2
- package/src/sap/m/PDFViewer.js +1 -1
- package/src/sap/m/Page.js +12 -6
- package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/m/PagingButton.js +1 -1
- package/src/sap/m/Panel.js +1 -1
- package/src/sap/m/PlanningCalendar.js +1 -1
- package/src/sap/m/PlanningCalendarHeader.js +1 -1
- package/src/sap/m/PlanningCalendarLegend.js +1 -1
- package/src/sap/m/PlanningCalendarRow.js +1 -1
- package/src/sap/m/PlanningCalendarView.js +1 -1
- package/src/sap/m/Popover.js +1 -1
- package/src/sap/m/ProgressIndicator.js +1 -1
- package/src/sap/m/PullToRefresh.js +1 -1
- package/src/sap/m/QuickView.js +1 -1
- package/src/sap/m/QuickViewBase.js +1 -1
- package/src/sap/m/QuickViewCard.js +1 -1
- package/src/sap/m/QuickViewGroup.js +1 -1
- package/src/sap/m/QuickViewGroupElement.js +1 -1
- package/src/sap/m/QuickViewPage.js +1 -1
- package/src/sap/m/RadioButton.js +1 -1
- package/src/sap/m/RadioButtonGroup.js +1 -1
- package/src/sap/m/RangeSlider.js +1 -1
- package/src/sap/m/RatingIndicator.js +1 -1
- package/src/sap/m/ResponsivePopover.js +1 -1
- package/src/sap/m/ResponsiveScale.js +1 -1
- package/src/sap/m/ScrollBar.js +1 -1
- package/src/sap/m/ScrollContainer.js +1 -1
- package/src/sap/m/SearchField.js +1 -1
- package/src/sap/m/SegmentedButton.js +1 -1
- package/src/sap/m/SegmentedButtonItem.js +1 -1
- package/src/sap/m/Select.js +1 -1
- package/src/sap/m/SelectDialog.js +1 -1
- package/src/sap/m/SelectDialogBase.js +1 -1
- package/src/sap/m/SelectList.js +1 -1
- package/src/sap/m/SelectionDetails.js +1 -1
- package/src/sap/m/SelectionDetailsFacade.js +2 -2
- package/src/sap/m/SelectionDetailsItem.js +1 -1
- package/src/sap/m/SelectionDetailsItemLine.js +1 -1
- package/src/sap/m/Shell.js +1 -1
- package/src/sap/m/SimpleFixFlex.js +1 -1
- package/src/sap/m/SinglePlanningCalendar.js +1 -1
- package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarGrid.js +1 -3
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
- package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
- package/src/sap/m/SlideTile.js +1 -1
- package/src/sap/m/Slider.js +1 -1
- package/src/sap/m/SliderTooltip.js +1 -1
- package/src/sap/m/SliderTooltipBase.js +1 -1
- package/src/sap/m/SliderTooltipContainer.js +1 -1
- package/src/sap/m/SplitApp.js +1 -1
- package/src/sap/m/SplitButton.js +1 -1
- package/src/sap/m/SplitContainer.js +1 -1
- package/src/sap/m/StandardDynamicDateOption.js +1 -1
- package/src/sap/m/StandardListItem.js +1 -1
- package/src/sap/m/StandardTile.js +1 -1
- package/src/sap/m/StandardTreeItem.js +1 -1
- package/src/sap/m/StepInput.js +1 -1
- package/src/sap/m/SuggestionItem.js +1 -1
- package/src/sap/m/SuggestionsPopover.js +1 -1
- package/src/sap/m/Switch.js +1 -1
- package/src/sap/m/TabContainer.js +16 -1
- package/src/sap/m/TabContainerItem.js +1 -1
- package/src/sap/m/TabStrip.js +1 -1
- package/src/sap/m/TabStripItem.js +1 -1
- package/src/sap/m/Table.js +3 -3
- package/src/sap/m/TablePersoController.js +1 -1
- package/src/sap/m/TablePersoDialog.js +1 -1
- package/src/sap/m/TablePersoProvider.js +1 -1
- package/src/sap/m/TableSelectDialog.js +1 -1
- package/src/sap/m/Text.js +1 -1
- package/src/sap/m/TextArea.js +1 -1
- package/src/sap/m/Tile.js +1 -1
- package/src/sap/m/TileContainer.js +1 -1
- package/src/sap/m/TileContent.js +1 -1
- package/src/sap/m/TileInfo.js +65 -0
- package/src/sap/m/TimePicker.js +1 -1
- package/src/sap/m/TimePickerClock.js +5 -3
- package/src/sap/m/TimePickerClocks.js +1 -1
- package/src/sap/m/TimePickerInputs.js +1 -1
- package/src/sap/m/TimePickerInternals.js +1 -1
- package/src/sap/m/TimePickerSlider.js +1 -1
- package/src/sap/m/TimePickerSliders.js +1 -1
- package/src/sap/m/Title.js +1 -1
- package/src/sap/m/TitlePropagationSupport.js +1 -1
- package/src/sap/m/ToggleButton.js +1 -1
- package/src/sap/m/Token.js +1 -1
- package/src/sap/m/Tokenizer.js +1 -3
- package/src/sap/m/Toolbar.js +1 -1
- package/src/sap/m/ToolbarLayoutData.js +1 -1
- package/src/sap/m/ToolbarSeparator.js +1 -1
- package/src/sap/m/ToolbarSpacer.js +1 -1
- package/src/sap/m/Tree.js +1 -1
- package/src/sap/m/TreeItemBase.js +1 -1
- package/src/sap/m/UploadCollection.js +1 -1
- package/src/sap/m/UploadCollectionItem.js +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 +1 -1
- package/src/sap/m/VariantManagement.js +1 -2
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +1 -1
- package/src/sap/m/ViewSettingsFilterItem.js +1 -1
- package/src/sap/m/ViewSettingsItem.js +1 -1
- package/src/sap/m/VisibleItem.js +1 -1
- package/src/sap/m/WheelSlider.js +1 -1
- package/src/sap/m/WheelSliderContainer.js +1 -1
- package/src/sap/m/Wizard.js +1 -1
- package/src/sap/m/WizardProgressNavigator.js +1 -1
- package/src/sap/m/WizardStep.js +1 -1
- package/src/sap/m/changeHandler/AddTableColumn.js +1 -2
- package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
- package/src/sap/m/changeHandler/CombineButtons.js +1 -1
- package/src/sap/m/changeHandler/MoveTableColumns.js +1 -1
- package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
- package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
- package/src/sap/m/designtime/Table.designtime.js +1 -2
- package/src/sap/m/designtime/messagebundle_sh.properties +5 -5
- package/src/sap/m/flexibility/Table.flexibility.js +14 -2
- package/src/sap/m/library.js +252 -3
- package/src/sap/m/messagebundle.properties +3 -0
- package/src/sap/m/messagebundle_ar.properties +2 -0
- package/src/sap/m/messagebundle_bg.properties +2 -0
- package/src/sap/m/messagebundle_ca.properties +2 -0
- package/src/sap/m/messagebundle_cnr.properties +2 -0
- package/src/sap/m/messagebundle_cs.properties +2 -0
- package/src/sap/m/messagebundle_cy.properties +2 -0
- package/src/sap/m/messagebundle_da.properties +2 -0
- package/src/sap/m/messagebundle_de.properties +2 -0
- package/src/sap/m/messagebundle_el.properties +2 -0
- package/src/sap/m/messagebundle_en.properties +2 -0
- package/src/sap/m/messagebundle_en_GB.properties +2 -0
- package/src/sap/m/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/m/messagebundle_es.properties +2 -0
- package/src/sap/m/messagebundle_es_MX.properties +2 -0
- package/src/sap/m/messagebundle_et.properties +2 -0
- package/src/sap/m/messagebundle_fi.properties +2 -0
- package/src/sap/m/messagebundle_fr.properties +3 -1
- package/src/sap/m/messagebundle_fr_CA.properties +2 -0
- package/src/sap/m/messagebundle_hi.properties +2 -0
- package/src/sap/m/messagebundle_hr.properties +2 -0
- package/src/sap/m/messagebundle_hu.properties +2 -0
- package/src/sap/m/messagebundle_id.properties +2 -0
- package/src/sap/m/messagebundle_it.properties +2 -0
- package/src/sap/m/messagebundle_iw.properties +2 -0
- package/src/sap/m/messagebundle_ja.properties +2 -0
- package/src/sap/m/messagebundle_kk.properties +2 -0
- package/src/sap/m/messagebundle_ko.properties +2 -0
- package/src/sap/m/messagebundle_lt.properties +2 -0
- package/src/sap/m/messagebundle_lv.properties +2 -0
- package/src/sap/m/messagebundle_mk.properties +2 -0
- package/src/sap/m/messagebundle_ms.properties +2 -0
- package/src/sap/m/messagebundle_nl.properties +2 -0
- package/src/sap/m/messagebundle_no.properties +2 -0
- package/src/sap/m/messagebundle_pl.properties +2 -0
- package/src/sap/m/messagebundle_pt.properties +2 -0
- package/src/sap/m/messagebundle_pt_PT.properties +2 -0
- package/src/sap/m/messagebundle_ro.properties +2 -0
- package/src/sap/m/messagebundle_ru.properties +2 -0
- package/src/sap/m/messagebundle_sh.properties +259 -257
- package/src/sap/m/messagebundle_sk.properties +2 -0
- package/src/sap/m/messagebundle_sl.properties +2 -0
- package/src/sap/m/messagebundle_sr.properties +2 -0
- package/src/sap/m/messagebundle_sv.properties +2 -0
- package/src/sap/m/messagebundle_th.properties +2 -0
- package/src/sap/m/messagebundle_tr.properties +2 -0
- package/src/sap/m/messagebundle_uk.properties +2 -0
- package/src/sap/m/messagebundle_vi.properties +2 -0
- package/src/sap/m/messagebundle_zh_CN.properties +3 -1
- package/src/sap/m/messagebundle_zh_TW.properties +2 -0
- 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 +1 -1
- package/src/sap/m/p13n/Container.js +1 -1
- package/src/sap/m/p13n/Engine.js +3 -6
- package/src/sap/m/p13n/FilterController.js +1 -1
- package/src/sap/m/p13n/FilterPanel.js +1 -1
- package/src/sap/m/p13n/GroupController.js +1 -1
- package/src/sap/m/p13n/GroupPanel.js +2 -1
- package/src/sap/m/p13n/Popup.js +10 -3
- package/src/sap/m/p13n/QueryPanel.js +1 -1
- package/src/sap/m/p13n/SelectionController.js +13 -8
- package/src/sap/m/p13n/SelectionPanel.js +1 -1
- package/src/sap/m/p13n/SortController.js +1 -1
- package/src/sap/m/p13n/SortPanel.js +1 -1
- package/src/sap/m/p13n/handler/xConfigHandler.js +6 -10
- 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 +7 -1
- package/src/sap/m/p13n/modules/xConfigAPI.js +67 -4
- package/src/sap/m/plugins/CellSelector.js +238 -133
- package/src/sap/m/plugins/ColumnResizer.js +1 -1
- package/src/sap/m/plugins/ContextMenuSetting.js +1 -1
- package/src/sap/m/plugins/CopyProvider.js +6 -4
- package/src/sap/m/plugins/DataStateIndicator.js +1 -1
- package/src/sap/m/plugins/PasteProvider.js +1 -1
- package/src/sap/m/plugins/PluginBase.js +1 -1
- package/src/sap/m/plugins/UploadSetwithTable.js +2067 -0
- package/src/sap/m/rules/Table.support.js +2 -3
- package/src/sap/m/semantic/AddAction.js +1 -1
- package/src/sap/m/semantic/CancelAction.js +1 -1
- package/src/sap/m/semantic/DeleteAction.js +1 -1
- package/src/sap/m/semantic/DetailPage.js +1 -1
- package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/m/semantic/EditAction.js +1 -1
- package/src/sap/m/semantic/FavoriteAction.js +1 -1
- package/src/sap/m/semantic/FilterAction.js +1 -1
- package/src/sap/m/semantic/FilterSelect.js +1 -1
- package/src/sap/m/semantic/FlagAction.js +1 -1
- package/src/sap/m/semantic/ForwardAction.js +1 -1
- package/src/sap/m/semantic/FullscreenPage.js +1 -1
- package/src/sap/m/semantic/GroupAction.js +1 -1
- package/src/sap/m/semantic/GroupSelect.js +1 -1
- package/src/sap/m/semantic/MainAction.js +1 -1
- package/src/sap/m/semantic/MasterPage.js +1 -1
- package/src/sap/m/semantic/MessagesIndicator.js +1 -1
- package/src/sap/m/semantic/MultiSelectAction.js +1 -1
- package/src/sap/m/semantic/NegativeAction.js +1 -1
- package/src/sap/m/semantic/OpenInAction.js +1 -1
- package/src/sap/m/semantic/PositiveAction.js +1 -1
- package/src/sap/m/semantic/PrintAction.js +1 -1
- package/src/sap/m/semantic/SaveAction.js +1 -1
- package/src/sap/m/semantic/Segment.js +1 -1
- package/src/sap/m/semantic/SegmentedContainer.js +1 -1
- package/src/sap/m/semantic/SemanticButton.js +1 -1
- package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
- package/src/sap/m/semantic/SemanticControl.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/semantic/SemanticPage.js +1 -1
- package/src/sap/m/semantic/SemanticSelect.js +1 -1
- package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
- package/src/sap/m/semantic/SendEmailAction.js +1 -1
- package/src/sap/m/semantic/SendMessageAction.js +1 -1
- package/src/sap/m/semantic/ShareInJamAction.js +1 -1
- package/src/sap/m/semantic/ShareMenu.js +1 -1
- package/src/sap/m/semantic/ShareMenuPage.js +1 -1
- package/src/sap/m/semantic/SortAction.js +1 -1
- package/src/sap/m/semantic/SortSelect.js +1 -1
- package/src/sap/m/table/ColumnWidthController.js +1 -1
- package/src/sap/m/table/Util.js +1 -1
- 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 +1 -1
- package/src/sap/m/table/columnmenu/Menu.js +1 -1
- 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 +1 -1
- package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
- package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickTotal.js +1 -1
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
- package/src/sap/m/themes/base/ActionTile.less +171 -152
- package/src/sap/m/themes/base/ActionTileContent.less +62 -0
- package/src/sap/m/themes/base/CellSelector.less +77 -5
- package/src/sap/m/themes/base/Dialog.less +0 -4
- package/src/sap/m/themes/base/GenericTile.less +397 -12
- package/src/sap/m/themes/base/HeaderContainer.less +8 -0
- package/src/sap/m/themes/base/IconTabBar.less +18 -0
- package/src/sap/m/themes/base/ObjectNumber.less +7 -1
- package/src/sap/m/themes/base/ObjectStatus.less +5 -0
- package/src/sap/m/themes/base/Title.less +1 -1
- package/src/sap/m/themes/base/Toolbar.less +4 -0
- package/src/sap/m/themes/base/UploadSetwithTable.less +20 -0
- package/src/sap/m/themes/base/VariantManagement.less +3 -0
- package/src/sap/m/themes/base/library.source.less +1 -0
- package/src/sap/m/upload/ActionsPlaceholder.js +12 -2
- package/src/sap/m/upload/Column.js +1 -1
- package/src/sap/m/upload/FilePreviewDialog.js +6 -6
- package/src/sap/m/upload/UploadItem.js +322 -0
- package/src/sap/m/upload/UploadItemConfiguration.js +191 -0
- package/src/sap/m/upload/UploadSet.js +1 -1
- package/src/sap/m/upload/UploadSetItem.js +4 -5
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
- package/src/sap/m/upload/UploadSetwithTable.js +4 -3
- package/src/sap/m/upload/UploadSetwithTableItem.js +2 -3
- package/src/sap/m/upload/UploaderTableItem.js +19 -12
- package/src/sap/m/upload/p13n/PersManager.js +1 -1
- package/src/sap/m/upload/p13n/mediator/BaseMediator.js +4 -4
- package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +1 -1
- package/src/sap/m/upload/p13n/mediator/FilterMediator.js +1 -1
- package/src/sap/m/upload/p13n/mediator/GroupMediator.js +1 -1
- package/src/sap/m/upload/p13n/mediator/SortMediator.js +1 -1
- package/src/sap/m/upload/p13n/modules/PersPopupManager.js +3 -3
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides Element sap.m.upload.UploadItem.
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/ui/core/IconPool",
|
|
10
|
+
"sap/base/Log",
|
|
11
|
+
"sap/ui/core/Lib",
|
|
12
|
+
"sap/ui/core/Element"
|
|
13
|
+
], function (IconPool, Log, Library, Element) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for a new UploadItem.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} [sId] Id for the new control, it is generated automatically if no ID is provided.
|
|
20
|
+
* @param {object} [mSettings] Initial settings for the new control.
|
|
21
|
+
* @class
|
|
22
|
+
* <code>sap.m.upload.UploadItem</code> represents one item to be uploaded using the {@link sap.m.plugins.UploadSetwithTable UploadSetwithTable}
|
|
23
|
+
*
|
|
24
|
+
* <b>Note:</b> This element should only be used within the {@link sap.m.plugins.UploadSetwithTable UploadSetwithTable} plugin.
|
|
25
|
+
* @extends sap.ui.core.Element
|
|
26
|
+
* @author SAP SE
|
|
27
|
+
* @constructor
|
|
28
|
+
* @experimental Since 1.124
|
|
29
|
+
* @public
|
|
30
|
+
* @since 1.124
|
|
31
|
+
* @version 1.124.0
|
|
32
|
+
* @alias sap.m.upload.UploadItem
|
|
33
|
+
*/
|
|
34
|
+
var UploadItem = Element.extend("sap.m.upload.UploadItem", {
|
|
35
|
+
metadata: {
|
|
36
|
+
library: "sap.m",
|
|
37
|
+
properties: {
|
|
38
|
+
/**
|
|
39
|
+
* Specifies the name of the uploaded file.
|
|
40
|
+
*/
|
|
41
|
+
fileName: {type: "string", defaultValue: null},
|
|
42
|
+
/**
|
|
43
|
+
* Specifies the MIME type of the file.
|
|
44
|
+
*/
|
|
45
|
+
mediaType: {type: "string", defaultValue: null},
|
|
46
|
+
/**
|
|
47
|
+
* Specifies the URL where the file is located.
|
|
48
|
+
*/
|
|
49
|
+
url: {type: "string", defaultValue: null},
|
|
50
|
+
/**
|
|
51
|
+
* URL where the uploaded files are stored. If empty, uploadUrl from the uploader is considered.
|
|
52
|
+
*/
|
|
53
|
+
uploadUrl: {type: "string", defaultValue: null},
|
|
54
|
+
/**
|
|
55
|
+
* State of the item relevant to its upload process.
|
|
56
|
+
*/
|
|
57
|
+
uploadState: {type: "sap.m.UploadState", defaultValue: null},
|
|
58
|
+
/**
|
|
59
|
+
* Specifies whether the item can be previewed.
|
|
60
|
+
*/
|
|
61
|
+
previewable: {type: "boolean", defaultValue: true},
|
|
62
|
+
/**
|
|
63
|
+
* Specifies file size of the item in bytes.
|
|
64
|
+
*/
|
|
65
|
+
fileSize: {type: "float", defaultValue: 0}
|
|
66
|
+
},
|
|
67
|
+
aggregations: {
|
|
68
|
+
/**
|
|
69
|
+
* Header fields to be included in the header section of an XMLHttpRequest (XHR) request
|
|
70
|
+
*/
|
|
71
|
+
headerFields: {type: "sap.ui.core.Item", multiple: true, singularName: "headerField"}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/* ================== */
|
|
77
|
+
/* Lifecycle handling */
|
|
78
|
+
/* ================== */
|
|
79
|
+
|
|
80
|
+
UploadItem.prototype.init = function () {
|
|
81
|
+
this._oFileObject = null;
|
|
82
|
+
this._fFileSize = null;
|
|
83
|
+
// Restriction flags
|
|
84
|
+
this._bFileTypeRestricted = false;
|
|
85
|
+
this._bNameLengthRestricted = false;
|
|
86
|
+
this._bSizeRestricted = false;
|
|
87
|
+
this._bMediaTypeRestricted = false;
|
|
88
|
+
this._oRb = Library.getResourceBundleFor("sap.m");
|
|
89
|
+
this._oCloudFileInfo = null;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/* ===================== */
|
|
93
|
+
/* Overriden API methods */
|
|
94
|
+
/* ===================== */
|
|
95
|
+
|
|
96
|
+
UploadItem.prototype.setFileName = function (sFileName) {
|
|
97
|
+
if (this.getFileName() !== sFileName) {
|
|
98
|
+
this.setProperty("fileName", sFileName);
|
|
99
|
+
// File name related controls available no sooner than a parent is set
|
|
100
|
+
if (this.getParent() && this.getParent().getMaxFileNameLength && this.getParent().getFileTypes) {
|
|
101
|
+
this._checkNameLengthRestriction(this.getParent()?.getMaxFileNameLength());
|
|
102
|
+
this._checkTypeRestriction(this.getParent()?.getFileTypes());
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return this;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/* ============== */
|
|
110
|
+
/* Public methods */
|
|
111
|
+
/* ============== */
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Returns file object.
|
|
115
|
+
*
|
|
116
|
+
* @public
|
|
117
|
+
* @returns {File|Blob} File object.
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
UploadItem.prototype.getFileObject = function () {
|
|
121
|
+
return this._oFileObject;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Downloads the item. Only possible when the item has a valid URL specified in the <code>url</code> property.
|
|
126
|
+
* @param {boolean} bAskForLocation Whether to ask for a location where to download the file or not.
|
|
127
|
+
* @public
|
|
128
|
+
* @returns {boolean} <code>true</code> if download is possible, <code>false</code> otherwise.
|
|
129
|
+
*/
|
|
130
|
+
UploadItem.prototype.download = function (bAskForLocation) {
|
|
131
|
+
var oParent = this.getParent();
|
|
132
|
+
if (!oParent) {
|
|
133
|
+
Log.warning("Download cannot proceed without a parent association.");
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return oParent?._initiateFileDownload(this, bAskForLocation);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Validates if the item is restricted, to check if it is restricted for the file type, media type, maximum file name length and maximum file size limit.
|
|
142
|
+
*
|
|
143
|
+
* @public
|
|
144
|
+
* @returns {boolean} <code>true</code> if item is restricted, <code>false</code> otherwise.
|
|
145
|
+
*
|
|
146
|
+
*/
|
|
147
|
+
UploadItem.prototype.isRestricted = function () {
|
|
148
|
+
return this._isRestricted();
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Returns the details of the file selected from the CloudFilePicker control.
|
|
153
|
+
* @returns {sap.suite.ui.commons.CloudFileInfo} oCloudFileInfo Specifies the details of the file selected from the cloudFilePicker control.
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
UploadItem.prototype.getCloudFileInfo = function() {
|
|
157
|
+
return this._oCloudFileInfo;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/* =============== */
|
|
161
|
+
/* Private methods */
|
|
162
|
+
/* =============== */
|
|
163
|
+
|
|
164
|
+
UploadItem._getIconByMimeType = function(sMimeType, fileName) {
|
|
165
|
+
|
|
166
|
+
if (sMimeType) {
|
|
167
|
+
return IconPool.getIconForMimeType(sMimeType);
|
|
168
|
+
} else {
|
|
169
|
+
return UploadItem._getIconByFileType(fileName);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
UploadItem._getIconByFileType = function (fileName) {
|
|
174
|
+
var sFileExtension = UploadItem._splitFileName(fileName).extension;
|
|
175
|
+
if (!sFileExtension) {
|
|
176
|
+
return "sap-icon://document";
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
switch (sFileExtension.toLowerCase()) {
|
|
180
|
+
case "bmp" :
|
|
181
|
+
case "jpg" :
|
|
182
|
+
case "jpeg" :
|
|
183
|
+
case "png" :
|
|
184
|
+
return UploadItem.IMAGE_FILE_ICON;
|
|
185
|
+
case "csv" :
|
|
186
|
+
case "xls" :
|
|
187
|
+
case "xlsx" :
|
|
188
|
+
return "sap-icon://excel-attachment";
|
|
189
|
+
case "doc" :
|
|
190
|
+
case "docx" :
|
|
191
|
+
case "odt" :
|
|
192
|
+
return "sap-icon://doc-attachment";
|
|
193
|
+
case "pdf" :
|
|
194
|
+
return "sap-icon://pdf-attachment";
|
|
195
|
+
case "ppt" :
|
|
196
|
+
case "pptx" :
|
|
197
|
+
return "sap-icon://ppt-attachment";
|
|
198
|
+
case "txt" :
|
|
199
|
+
return "sap-icon://document-text";
|
|
200
|
+
default :
|
|
201
|
+
return "sap-icon://document";
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
UploadItem._splitFileName = function (sFileName, bWithDot) {
|
|
206
|
+
var oResult = {};
|
|
207
|
+
var oRegex = /(?:\.([^.]+))?$/;
|
|
208
|
+
var aFileExtension = oRegex.exec(sFileName);
|
|
209
|
+
if (!aFileExtension[0]) {
|
|
210
|
+
aFileExtension[0] = "";
|
|
211
|
+
oResult.name = sFileName;
|
|
212
|
+
} else {
|
|
213
|
+
oResult.name = sFileName ? sFileName.slice(0, sFileName.indexOf(aFileExtension[0])) : "";
|
|
214
|
+
}
|
|
215
|
+
if (bWithDot) {
|
|
216
|
+
oResult.extension = aFileExtension[0];
|
|
217
|
+
} else {
|
|
218
|
+
oResult.extension = aFileExtension[1];
|
|
219
|
+
}
|
|
220
|
+
return oResult;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
UploadItem.prototype._setFileObject = function (oFileObject) {
|
|
224
|
+
this._oFileObject = oFileObject;
|
|
225
|
+
if (oFileObject) {
|
|
226
|
+
this._fFileSize = oFileObject.size / UploadItem.MEGABYTE;
|
|
227
|
+
this.setFileSize(oFileObject.size);
|
|
228
|
+
this.setMediaType(oFileObject.type);
|
|
229
|
+
} else {
|
|
230
|
+
this._fFileSize = null;
|
|
231
|
+
this.setMediaType(null);
|
|
232
|
+
}
|
|
233
|
+
if (this.getParent()) {
|
|
234
|
+
this._checkSizeRestriction(this.getParent()?.getMaxFileSize());
|
|
235
|
+
this._checkMediaTypeRestriction(this.getParent()?.getMediaTypes());
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Checks if and how compliance with the file name length restriction changed for this item.
|
|
241
|
+
* @param {int} iMaxLength Maximum length of file name.
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
UploadItem.prototype._checkNameLengthRestriction = function (iMaxLength) {
|
|
245
|
+
var bRestricted = (iMaxLength && !!this.getFileName() && this.getFileName().length > iMaxLength);
|
|
246
|
+
if (bRestricted !== this._bNameLengthRestricted) {
|
|
247
|
+
this._bNameLengthRestricted = bRestricted;
|
|
248
|
+
this.invalidate();
|
|
249
|
+
if (bRestricted && this.getParent()) {
|
|
250
|
+
this.getParent()?.fireFileNameLengthExceeded({item: this});
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Checks if and how compliance with the file size restriction changed for this item.
|
|
257
|
+
* @param {float} fMaxSize Maximum file size allowed in megabytes.
|
|
258
|
+
* @private
|
|
259
|
+
*/
|
|
260
|
+
UploadItem.prototype._checkSizeRestriction = function (fMaxSize) {
|
|
261
|
+
var bRestricted = (fMaxSize && this._fFileSize > fMaxSize);
|
|
262
|
+
if (bRestricted !== this._bSizeRestricted) {
|
|
263
|
+
this._bSizeRestricted = bRestricted;
|
|
264
|
+
this.invalidate();
|
|
265
|
+
if (bRestricted && this.getParent()) {
|
|
266
|
+
this.getParent()?.fireFileSizeExceeded({item: this});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Checks if and how compliance with the mime type restriction changed for this item.
|
|
273
|
+
* @param {string[]} aTypes List of allowed mime types.
|
|
274
|
+
* @private
|
|
275
|
+
*/
|
|
276
|
+
UploadItem.prototype._checkMediaTypeRestriction = function (aTypes) {
|
|
277
|
+
var bRestricted = (!!aTypes && (aTypes.length > 0) && !!this.getMediaType() && aTypes.indexOf(this.getMediaType()) === -1);
|
|
278
|
+
if (bRestricted !== this._bMediaTypeRestricted) {
|
|
279
|
+
this._bMediaTypeRestricted = bRestricted;
|
|
280
|
+
this.invalidate();
|
|
281
|
+
if (bRestricted && this.getParent()) {
|
|
282
|
+
this.getParent()?.fireMediaTypeMismatch({item: this});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Checks if and how compliance with the file type restriction changed for this item.
|
|
289
|
+
* @param {string[]} aTypes List of allowed file types.
|
|
290
|
+
* @private
|
|
291
|
+
*/
|
|
292
|
+
UploadItem.prototype._checkTypeRestriction = function (aTypes) {
|
|
293
|
+
var oFile = UploadItem._splitFileName(this.getFileName()),
|
|
294
|
+
bRestricted =
|
|
295
|
+
(!!this.getFileName() && !!aTypes && (aTypes.length > 0)
|
|
296
|
+
&& oFile.extension && aTypes.indexOf(oFile.extension.toLowerCase()) === -1);
|
|
297
|
+
if (bRestricted !== this._bFileTypeRestricted) {
|
|
298
|
+
this._bFileTypeRestricted = bRestricted;
|
|
299
|
+
this.invalidate();
|
|
300
|
+
if (bRestricted && this.getParent()) {
|
|
301
|
+
this.getParent()?.fireFileTypeMismatch({item: this});
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
UploadItem.prototype._isRestricted = function () {
|
|
307
|
+
return this._bFileTypeRestricted || this._bNameLengthRestricted || this._bSizeRestricted || this._bMediaTypeRestricted;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @param {suite.ui.commons.CloudFileInfo} oCloudFileInfo info the file selected from the CloudFilePicker control.
|
|
312
|
+
* @private
|
|
313
|
+
*/
|
|
314
|
+
UploadItem.prototype._setCloudFileInfo = function(oCloudFileInfo) {
|
|
315
|
+
this._oCloudFileInfo = oCloudFileInfo;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
UploadItem.IMAGE_FILE_ICON = "sap-icon://card";
|
|
319
|
+
UploadItem.MEGABYTE = 1048576;
|
|
320
|
+
|
|
321
|
+
return UploadItem;
|
|
322
|
+
});
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides Element sap.m.upload.UploadItemConfiguration.
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/base/Log",
|
|
10
|
+
"sap/ui/core/Element"
|
|
11
|
+
], function (Log, Element) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Constructor for a new UploadItemConfiguration.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} [sId] Id for the new Element, it is generated automatically if no ID is provided.
|
|
18
|
+
* @param {object} [mSettings] Initial settings for the new Element.
|
|
19
|
+
* @class
|
|
20
|
+
* <code>sap.m.UploadItemConfiguration</code> represents the configuration for the items in the {@link sap.m.plugins.UploadSetwithTable UploadSetwithTable} plugin.
|
|
21
|
+
* <br>The configuration template represents the paths in the model to the file name, mediaType, url, uploadUrl, previewable, and file size properties in reference to the {@link sap.m.upload.UploadItem UploadItem}. This is essential for the plugin in understanding the structure of the model data bound to continue with operations.
|
|
22
|
+
* <br><b>Note:</b> Configuration is mandatory for the plugin to offer the features such as file preview, download, rename etc. The element must be used only within the {@link sap.m.plugins.UploadSetwithTable UploadSetwithTable} plugin.
|
|
23
|
+
*
|
|
24
|
+
* @extends sap.ui.core.Element
|
|
25
|
+
* @author SAP SE
|
|
26
|
+
* @constructor
|
|
27
|
+
* @experimental Since 1.124
|
|
28
|
+
* @public
|
|
29
|
+
* @since 1.124
|
|
30
|
+
* @version 1.124.0
|
|
31
|
+
* @alias sap.m.upload.UploadItemConfiguration
|
|
32
|
+
*/
|
|
33
|
+
const UploadItemConfiguration = Element.extend("sap.m.upload.UploadItemConfiguration", {
|
|
34
|
+
metadata: {
|
|
35
|
+
library: "sap.m",
|
|
36
|
+
properties: {
|
|
37
|
+
/**
|
|
38
|
+
* Specifies the path in the model to the file name
|
|
39
|
+
*/
|
|
40
|
+
fileNamePath: {type: "string", defaultValue: null},
|
|
41
|
+
/**
|
|
42
|
+
* Specifies the path in the model to the file mediaType.
|
|
43
|
+
*/
|
|
44
|
+
mediaTypePath: {type: "string", defaultValue: null},
|
|
45
|
+
/**
|
|
46
|
+
* Specifies the path in the model to the file URL. It is used to download/access the file.
|
|
47
|
+
*/
|
|
48
|
+
urlPath: {type: "string", defaultValue: null},
|
|
49
|
+
/**
|
|
50
|
+
* Specifies the path in the model for upload URL. Used to upload the file.
|
|
51
|
+
*/
|
|
52
|
+
uploadUrlPath: {type: "string", defaultValue: null},
|
|
53
|
+
/**
|
|
54
|
+
* Specifies the path in the model to determine if the file uploaded can be previewed.
|
|
55
|
+
*/
|
|
56
|
+
previewablePath: {type: "string", defaultValue: null},
|
|
57
|
+
/**
|
|
58
|
+
* Specifies path in the model to the file size.
|
|
59
|
+
*/
|
|
60
|
+
fileSizePath: {type: "string", defaultValue: null}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Validates the configuration of the file name path value.
|
|
67
|
+
* @param {sap.ui.model.Context} oBindingContext context of the item
|
|
68
|
+
* @returns {boolean} true if the file name is valid, false otherwise.
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
|
+
UploadItemConfiguration.prototype._fileNameValidator = function (oBindingContext) {
|
|
72
|
+
const sPath = this.getFileNamePath();
|
|
73
|
+
if (!sPath) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
const value = oBindingContext?.getProperty(sPath);
|
|
77
|
+
|
|
78
|
+
if (typeof value === "string") {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
Log.error(`Invalid file name value at ${oBindingContext.getPath()}. Expected string.`);
|
|
82
|
+
return false;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Validates the configuration of the media type path value.
|
|
87
|
+
* @param {sap.ui.model.Context} oBindingContext context of the item
|
|
88
|
+
* @returns {boolean} true if the media type is valid, false otherwise.
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
UploadItemConfiguration.prototype._mediaTypeValidator = function (oBindingContext) {
|
|
92
|
+
const sPath = this.getMediaTypePath();
|
|
93
|
+
if (!sPath) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
const value = oBindingContext?.getProperty(sPath);
|
|
97
|
+
if (typeof value === "string") {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
Log.error(`Invalid media type value at ${oBindingContext.getPath()}. Expected string.`);
|
|
101
|
+
return false;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Validates the configuration of the url path value.
|
|
106
|
+
* @param {sap.ui.model.Context} oBindingContext context of the item
|
|
107
|
+
* @returns {boolean} true if the url is valid, false otherwise.
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
UploadItemConfiguration.prototype._urlValidator = function (oBindingContext) {
|
|
111
|
+
const sPath = this.getUrlPath();
|
|
112
|
+
if (!sPath) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
const value = oBindingContext?.getProperty(sPath);
|
|
116
|
+
if (typeof value === "string") {
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
Log.error(`Invalid url value at ${oBindingContext.getPath()}. Expected string.`);
|
|
120
|
+
return false;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Validates the configuration of the upload url path value.
|
|
125
|
+
* @param {sap.ui.model.Context} oBindingContext context of the item
|
|
126
|
+
* @returns {boolean} true if the upload url is valid, false otherwise.
|
|
127
|
+
* @private
|
|
128
|
+
*/
|
|
129
|
+
UploadItemConfiguration.prototype._uploadUrlValidator = function (oBindingContext) {
|
|
130
|
+
const sPath = this.getUploadUrlPath();
|
|
131
|
+
if (!sPath) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
const value = oBindingContext?.getProperty(sPath);
|
|
135
|
+
if (typeof value === "string") {
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
Log.error(`Invalid upload URL value at ${oBindingContext.getPath()}. Expected string.`);
|
|
139
|
+
return false;
|
|
140
|
+
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Validates the configuration of the previewable path value.
|
|
145
|
+
* @param {sap.ui.model.Context} oBindingContext context of the item
|
|
146
|
+
* @returns {boolean} true if the previewable is valid, false otherwise.
|
|
147
|
+
* @private
|
|
148
|
+
*/
|
|
149
|
+
UploadItemConfiguration.prototype._previewableValidator = function (oBindingContext) {
|
|
150
|
+
const sPath = this.getPreviewablePath();
|
|
151
|
+
if (!sPath) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
const value = oBindingContext?.getProperty(sPath);
|
|
155
|
+
if (typeof value === "boolean") {
|
|
156
|
+
return true;
|
|
157
|
+
} else if (typeof value === "string") {
|
|
158
|
+
if (value.toLowerCase() === "true" || value.toLowerCase() === "false") {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
Log.error(`Invalid previewable value at ${oBindingContext.getPath()}. Expected string.`);
|
|
163
|
+
return false;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Validates the configuration of the file size path value.
|
|
168
|
+
* @param {sap.ui.model.Context} oBindingContext context of the item
|
|
169
|
+
* @returns {boolean} true if the file size is valid, false otherwise.
|
|
170
|
+
* @private
|
|
171
|
+
*/
|
|
172
|
+
UploadItemConfiguration.prototype._fileSizeValidator = function (oBindingContext) {
|
|
173
|
+
const sPath = this.getFileSizePath();
|
|
174
|
+
if (!sPath) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
const value = oBindingContext?.getProperty(sPath);
|
|
178
|
+
if (typeof value === "number") {
|
|
179
|
+
return true;
|
|
180
|
+
} else if (typeof value === "string") {
|
|
181
|
+
const sValue = parseFloat(value);
|
|
182
|
+
if (!isNaN(sValue)) {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
Log.error(`Invalid file Size value at ${oBindingContext.getPath()}. Expected number.`);
|
|
187
|
+
return false;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
return UploadItemConfiguration;
|
|
191
|
+
});
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
* and requests, unified behavior of instant and deferred uploads, as well as improved progress indication.
|
|
54
54
|
* @extends sap.ui.core.Control
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.124.0
|
|
57
57
|
* @constructor
|
|
58
58
|
* @public
|
|
59
59
|
* @since 1.63
|
|
@@ -21,11 +21,10 @@ sap.ui.define([
|
|
|
21
21
|
"sap/m/ProgressIndicator",
|
|
22
22
|
"sap/m/VBox",
|
|
23
23
|
"sap/m/HBox",
|
|
24
|
-
"sap/ui/core/Lib"
|
|
25
|
-
"sap/ui/core/Core"
|
|
24
|
+
"sap/ui/core/Lib"
|
|
26
25
|
], function (Log, CoreLibrary, Element, Icon, IconPool, HTML,
|
|
27
26
|
MobileLibrary, Button, CustomListItem, Image, Input,
|
|
28
|
-
Label, Link, ProgressIndicator, VBox, HBox, CoreLib
|
|
27
|
+
Label, Link, ProgressIndicator, VBox, HBox, CoreLib) {
|
|
29
28
|
"use strict";
|
|
30
29
|
|
|
31
30
|
var UploadType = MobileLibrary.UploadType;
|
|
@@ -38,7 +37,7 @@ sap.ui.define([
|
|
|
38
37
|
* @class Item that represents one file to be uploaded using the {@link sap.m.upload.UploadSet} control.
|
|
39
38
|
* @extends sap.ui.core.Element
|
|
40
39
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
40
|
+
* @version 1.124.0
|
|
42
41
|
* @constructor
|
|
43
42
|
* @public
|
|
44
43
|
* @since 1.63
|
|
@@ -186,7 +185,7 @@ sap.ui.define([
|
|
|
186
185
|
apiVersion: 2,
|
|
187
186
|
render: function (oRm, oControl) {
|
|
188
187
|
var sItemId = oControl.getAssociation("item");
|
|
189
|
-
var oItem =
|
|
188
|
+
var oItem = Element.getElementById(sItemId);
|
|
190
189
|
oRm.openStart("div");
|
|
191
190
|
oRm.class("sapMUCTextContainer");
|
|
192
191
|
if (this._bInEditMode) {
|
|
@@ -62,9 +62,8 @@ sap.ui.define([
|
|
|
62
62
|
* @author SAP SE
|
|
63
63
|
* @constructor
|
|
64
64
|
* @public
|
|
65
|
-
* @
|
|
66
|
-
* @
|
|
67
|
-
* @version 1.123.1
|
|
65
|
+
* @deprecated as of version 1.124, replaced by {@link sap.m.plugins.UploadSetwithTable}
|
|
66
|
+
* @version 1.124.0
|
|
68
67
|
* @alias sap.m.upload.UploadSetwithTable
|
|
69
68
|
*/
|
|
70
69
|
var UploadSetwithTable = Table.extend("sap.m.upload.UploadSetwithTable", {
|
|
@@ -126,6 +125,7 @@ sap.ui.define([
|
|
|
126
125
|
* @param {sap.m.upload.UploadSetwithTable.ItemInfo} oItemInfo The info of the item queued for upload.
|
|
127
126
|
* @returns {Promise<sap.m.upload.UploadSetwithTableItem>} oPromise, once resolved the UploadSetWithTable control initiates the upload.
|
|
128
127
|
* @public
|
|
128
|
+
* @deprecated as of version 1.124.
|
|
129
129
|
**/
|
|
130
130
|
|
|
131
131
|
/**
|
|
@@ -135,6 +135,7 @@ sap.ui.define([
|
|
|
135
135
|
* @property {number} iTotalItemsForUpload Total count of items queued for upload.
|
|
136
136
|
* @property {sap.m.upload.UploadSetwithTable} oSource Source on which the callback was invoked.
|
|
137
137
|
* @public
|
|
138
|
+
* @deprecated as of version 1.124.
|
|
138
139
|
**/
|
|
139
140
|
|
|
140
141
|
/**
|
|
@@ -27,9 +27,8 @@ sap.ui.define([
|
|
|
27
27
|
* @author SAP SE
|
|
28
28
|
* @constructor
|
|
29
29
|
* @public
|
|
30
|
-
* @
|
|
31
|
-
* @
|
|
32
|
-
* @version 1.123.1
|
|
30
|
+
* @deprecated as of version 1.124, replaced by {@link sap.m.upload.UploadItem}
|
|
31
|
+
* @version 1.124.0
|
|
33
32
|
* @alias sap.m.upload.UploadSetwithTableItem
|
|
34
33
|
*/
|
|
35
34
|
var UploadSetwithTableItem = ColumnListItem.extend("sap.m.upload.UploadSetwithTableItem", {
|
|
@@ -11,8 +11,9 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/core/util/File",
|
|
12
12
|
"sap/ui/Device",
|
|
13
13
|
"sap/m/upload/UploadSetwithTableItem",
|
|
14
|
-
"sap/m/upload/UploaderHttpRequestMethod"
|
|
15
|
-
|
|
14
|
+
"sap/m/upload/UploaderHttpRequestMethod",
|
|
15
|
+
"sap/m/upload/UploadItem"
|
|
16
|
+
], function (Log, MobileLibrary, Element, FileUtil, Device, UploadSetItem, UploaderHttpRequestMethod, UploadItem) {
|
|
16
17
|
"use strict";
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -27,7 +28,7 @@ sap.ui.define([
|
|
|
27
28
|
* @public
|
|
28
29
|
* @experimental since 1.120
|
|
29
30
|
* @since 1.120
|
|
30
|
-
* @version 1.
|
|
31
|
+
* @version 1.124.0
|
|
31
32
|
* @alias sap.m.upload.UploaderTableItem
|
|
32
33
|
*/
|
|
33
34
|
var Uploader = Element.extend("sap.m.upload.UploaderTableItem", {
|
|
@@ -62,9 +63,9 @@ sap.ui.define([
|
|
|
62
63
|
uploadStarted: {
|
|
63
64
|
parameters: {
|
|
64
65
|
/**
|
|
65
|
-
* The item that is going to be uploaded.
|
|
66
|
+
* The item {@link sap.m.upload.UploadSetwithTableItem UploadSetwithTableItem} or {@link sap.m.upload.UploadItem UploadItem} that is going to be uploaded.
|
|
66
67
|
*/
|
|
67
|
-
item: {type: "
|
|
68
|
+
item: {type: "any"}
|
|
68
69
|
}
|
|
69
70
|
},
|
|
70
71
|
/**
|
|
@@ -73,9 +74,9 @@ sap.ui.define([
|
|
|
73
74
|
uploadProgressed: {
|
|
74
75
|
parameters: {
|
|
75
76
|
/**
|
|
76
|
-
* The item that is being uploaded.
|
|
77
|
+
* The item {@link sap.m.upload.UploadSetwithTableItem UploadSetwithTableItem} or {@link sap.m.upload.UploadItem UploadItem} that is being uploaded.
|
|
77
78
|
*/
|
|
78
|
-
item: {type: "
|
|
79
|
+
item: {type: "any"},
|
|
79
80
|
/**
|
|
80
81
|
* The number of bytes transferred since the beginning of the operation.
|
|
81
82
|
* This doesn't include headers and other overhead, but only the content itself
|
|
@@ -94,9 +95,9 @@ sap.ui.define([
|
|
|
94
95
|
uploadCompleted: {
|
|
95
96
|
parameters: {
|
|
96
97
|
/**
|
|
97
|
-
* The item that was uploaded.
|
|
98
|
+
* The item {@link sap.m.upload.UploadSetwithTableItem UploadSetwithTableItem} or {@link sap.m.upload.UploadItem UploadItem} that was uploaded.
|
|
98
99
|
*/
|
|
99
|
-
item: {type: "
|
|
100
|
+
item: {type: "any"},
|
|
100
101
|
/**
|
|
101
102
|
* A JSON object containing the additional response parameters like response, responseXML, readyState, status and headers.
|
|
102
103
|
* <i>Sample response object:</i>
|
|
@@ -164,7 +165,7 @@ sap.ui.define([
|
|
|
164
165
|
/**
|
|
165
166
|
* Starts the process of uploading the specified file.
|
|
166
167
|
*
|
|
167
|
-
* @param {sap.m.upload.UploadSetwithTableItem} oItem Item representing the file to be uploaded.
|
|
168
|
+
* @param {sap.m.upload.UploadSetwithTableItem | sap.m.upload.UploadItem} oItem Item representing the file to be uploaded.
|
|
168
169
|
* @param {sap.ui.core.Item[]} [aHeaderFields] Collection of request header fields to be send along.
|
|
169
170
|
* @public
|
|
170
171
|
*/
|
|
@@ -232,7 +233,7 @@ sap.ui.define([
|
|
|
232
233
|
/**
|
|
233
234
|
* Starts the process of downloading a file.
|
|
234
235
|
*
|
|
235
|
-
* @param {sap.m.upload.UploadSetwithTableItem} oItem Item representing the file to be downloaded.
|
|
236
|
+
* @param {sap.m.upload.UploadSetwithTableItem | sap.m.upload.UploadItem} oItem Item representing the file to be downloaded.
|
|
236
237
|
* @param {sap.ui.core.Item[]} aHeaderFields List of header fields to be added to the GET request.
|
|
237
238
|
* @param {boolean} bAskForLocation If it is true, the location of where the file is to be downloaded is queried by a browser dialog.
|
|
238
239
|
* @return {boolean} It returns true if the download is processed successfully
|
|
@@ -260,8 +261,14 @@ sap.ui.define([
|
|
|
260
261
|
|
|
261
262
|
oXhr.responseType = "blob"; // force the HTTP response, response-type header to be blob
|
|
262
263
|
oXhr.onload = function () {
|
|
264
|
+
let targetItem = UploadItem;
|
|
265
|
+
if (oItem instanceof UploadItem) {
|
|
266
|
+
targetItem = UploadItem;
|
|
267
|
+
} else if (oItem instanceof UploadSetItem) {
|
|
268
|
+
targetItem = UploadSetItem;
|
|
269
|
+
}
|
|
263
270
|
var sFileName = oItem.getFileName(),
|
|
264
|
-
oSplit =
|
|
271
|
+
oSplit = targetItem._splitFileName(sFileName, false);
|
|
265
272
|
oBlob = oXhr.response;
|
|
266
273
|
FileUtil.save(oBlob, oSplit.name, oSplit.extension, oItem.getMediaType(), "utf-8");
|
|
267
274
|
};
|