@openui5/sap.m 1.118.0 → 1.119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +2 -2
- package/package.json +4 -4
- package/src/sap/m/.library +16 -1
- package/src/sap/m/AccButton.js +1 -1
- package/src/sap/m/ActionListItem.js +1 -1
- package/src/sap/m/ActionSelect.js +1 -1
- package/src/sap/m/ActionSheet.js +1 -1
- package/src/sap/m/ActionTile.js +1 -1
- package/src/sap/m/ActionTileContent.js +1 -1
- 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 +5 -5
- package/src/sap/m/Bar.js +38 -19
- package/src/sap/m/BarRenderer.js +12 -1
- package/src/sap/m/Breadcrumbs.js +44 -6
- package/src/sap/m/BreadcrumbsRenderer.js +4 -0
- package/src/sap/m/BusyDialog.js +1 -1
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +5 -2
- 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 +5 -2
- 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 +3 -2
- package/src/sap/m/ComboBoxBase.js +1 -1
- package/src/sap/m/ComboBoxTextField.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 +23 -20
- 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 +1 -1
- 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 +3 -3
- package/src/sap/m/FeedListItem.js +6 -5
- 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 +1 -1
- package/src/sap/m/GroupHeaderListItem.js +6 -2
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +1 -1
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +1 -1
- package/src/sap/m/IconTabBarSelectList.js +35 -10
- package/src/sap/m/IconTabFilter.js +1 -1
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
- package/src/sap/m/IconTabHeader.js +1 -1
- package/src/sap/m/IconTabSeparator.js +1 -1
- package/src/sap/m/IllustratedMessage.js +1 -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 +33 -22
- package/src/sap/m/InputBase.js +1 -1
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/Label.js +1 -1
- package/src/sap/m/LightBox.js +1 -1
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +1 -1
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +1 -1
- package/src/sap/m/ListItemBase.js +2 -2
- package/src/sap/m/ListItemBaseRenderer.js +1 -1
- 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 +3 -3
- package/src/sap/m/MenuButton.js +2 -2
- package/src/sap/m/MenuItem.js +3 -3
- package/src/sap/m/MenuListItem.js +1 -1
- package/src/sap/m/MessageItem.js +1 -1
- package/src/sap/m/MessageListItem.js +1 -1
- package/src/sap/m/MessagePage.js +1 -1
- package/src/sap/m/MessagePopover.js +1 -1
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +1 -1
- package/src/sap/m/MessageToast.js +1 -1
- package/src/sap/m/MessageView.js +1 -1
- package/src/sap/m/MultiComboBox.js +3 -2
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +4 -6
- 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 +16 -14
- package/src/sap/m/NumericInput.js +1 -1
- package/src/sap/m/ObjectAttribute.js +1 -1
- package/src/sap/m/ObjectHeader.js +15 -3
- package/src/sap/m/ObjectHeaderRenderer.js +24 -9
- package/src/sap/m/ObjectIdentifier.js +1 -1
- package/src/sap/m/ObjectListItem.js +10 -3
- package/src/sap/m/ObjectMarker.js +1 -1
- package/src/sap/m/ObjectNumber.js +1 -1
- package/src/sap/m/ObjectNumberRenderer.js +17 -2
- 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/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 +1 -1
- package/src/sap/m/P13nColumnsItem.js +1 -1
- package/src/sap/m/P13nColumnsPanel.js +1 -1
- package/src/sap/m/P13nConditionPanel.js +1 -1
- package/src/sap/m/P13nDialog.js +1 -1
- package/src/sap/m/P13nDimMeasureItem.js +1 -1
- package/src/sap/m/P13nDimMeasurePanel.js +1 -1
- package/src/sap/m/P13nFilterItem.js +1 -1
- package/src/sap/m/P13nFilterPanel.js +2 -9
- package/src/sap/m/P13nGroupItem.js +1 -1
- package/src/sap/m/P13nGroupPanel.js +1 -1
- package/src/sap/m/P13nItem.js +1 -1
- package/src/sap/m/P13nPanel.js +1 -1
- package/src/sap/m/P13nSelectionItem.js +1 -1
- package/src/sap/m/P13nSelectionPanel.js +1 -1
- package/src/sap/m/P13nSortItem.js +1 -1
- package/src/sap/m/P13nSortPanel.js +1 -1
- package/src/sap/m/PDFViewer.js +1 -1
- package/src/sap/m/Page.js +1 -1
- 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 +56 -9
- 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 +8 -2
- 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 +6 -4
- 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 +6 -4
- 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 -1
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +23 -16
- 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 +14 -14
- 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 +4 -1
- 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/TimePicker.js +1 -1
- package/src/sap/m/TimePickerClock.js +1 -1
- package/src/sap/m/TimePickerClocks.js +1 -1
- package/src/sap/m/TimePickerInputs.js +1 -1
- package/src/sap/m/TimePickerInternals.js +1 -1
- package/src/sap/m/TimePickerSlider.js +2 -2
- 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 -1
- 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 +21 -3
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +13 -7
- 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 +12 -2
- package/src/sap/m/WizardProgressNavigator.js +1 -1
- package/src/sap/m/WizardStep.js +1 -1
- 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 -2
- 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 +3 -2
- package/src/sap/m/designtime/messagebundle_hu.properties +1 -1
- package/src/sap/m/inputUtils/SuggestionsPopoverPopoverMixin.js +13 -4
- package/src/sap/m/library.js +42 -5
- package/src/sap/m/messagebundle.properties +36 -4
- package/src/sap/m/messagebundle_ar.properties +36 -36
- package/src/sap/m/messagebundle_bg.properties +101 -101
- package/src/sap/m/messagebundle_ca.properties +4 -4
- package/src/sap/m/messagebundle_cs.properties +27 -27
- package/src/sap/m/messagebundle_cy.properties +6 -6
- package/src/sap/m/messagebundle_da.properties +5 -5
- package/src/sap/m/messagebundle_de.properties +7 -7
- package/src/sap/m/messagebundle_el.properties +8 -8
- package/src/sap/m/messagebundle_en.properties +35 -8
- package/src/sap/m/messagebundle_en_GB.properties +4 -4
- package/src/sap/m/messagebundle_es.properties +17 -17
- package/src/sap/m/messagebundle_es_MX.properties +4 -4
- package/src/sap/m/messagebundle_et.properties +5 -5
- package/src/sap/m/messagebundle_fi.properties +10 -10
- package/src/sap/m/messagebundle_fr.properties +50 -50
- package/src/sap/m/messagebundle_fr_CA.properties +4 -4
- package/src/sap/m/messagebundle_hi.properties +11 -11
- package/src/sap/m/messagebundle_hr.properties +36 -36
- package/src/sap/m/messagebundle_hu.properties +6 -6
- package/src/sap/m/messagebundle_id.properties +13 -13
- package/src/sap/m/messagebundle_it.properties +34 -34
- package/src/sap/m/messagebundle_iw.properties +10 -10
- package/src/sap/m/messagebundle_ja.properties +45 -45
- package/src/sap/m/messagebundle_kk.properties +46 -46
- package/src/sap/m/messagebundle_ko.properties +14 -14
- package/src/sap/m/messagebundle_lt.properties +4 -4
- package/src/sap/m/messagebundle_lv.properties +4 -4
- package/src/sap/m/messagebundle_ms.properties +4 -4
- package/src/sap/m/messagebundle_nl.properties +58 -58
- package/src/sap/m/messagebundle_no.properties +5 -5
- package/src/sap/m/messagebundle_pl.properties +10 -10
- package/src/sap/m/messagebundle_pt.properties +6 -6
- package/src/sap/m/messagebundle_pt_PT.properties +4 -4
- package/src/sap/m/messagebundle_ro.properties +5 -5
- package/src/sap/m/messagebundle_ru.properties +5 -5
- package/src/sap/m/messagebundle_sh.properties +15 -15
- package/src/sap/m/messagebundle_sk.properties +11 -11
- package/src/sap/m/messagebundle_sl.properties +85 -85
- package/src/sap/m/messagebundle_sv.properties +16 -16
- package/src/sap/m/messagebundle_th.properties +23 -23
- package/src/sap/m/messagebundle_tr.properties +7 -7
- package/src/sap/m/messagebundle_uk.properties +42 -42
- package/src/sap/m/messagebundle_vi.properties +4 -4
- package/src/sap/m/messagebundle_zh_CN.properties +19 -19
- package/src/sap/m/messagebundle_zh_TW.properties +8 -8
- 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 +2 -8
- package/src/sap/m/p13n/Container.js +1 -1
- package/src/sap/m/p13n/Engine.js +1 -1
- package/src/sap/m/p13n/GroupController.js +1 -1
- package/src/sap/m/p13n/GroupPanel.js +1 -1
- 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 +1 -1
- package/src/sap/m/p13n/SelectionPanel.js +18 -1
- package/src/sap/m/p13n/SortController.js +1 -1
- package/src/sap/m/p13n/SortPanel.js +1 -1
- 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 +24 -23
- package/src/sap/m/plugins/ColumnResizer.js +1 -1
- package/src/sap/m/plugins/CopyProvider.js +27 -10
- 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/rules/IconTabBar.support.js +1 -1
- 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/Util.js +7 -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 +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/Breadcrumbs.less +2 -1
- package/src/sap/m/themes/base/Button.less +2 -172
- package/src/sap/m/themes/base/Dialog.less +1 -1
- package/src/sap/m/themes/base/FeedListItem.less +2 -3
- package/src/sap/m/themes/base/InputBase.less +2 -2
- package/src/sap/m/themes/base/ObjectStatus.less +1 -1
- package/src/sap/m/themes/base/QuickView.less +1 -1
- package/src/sap/m/themes/base/SearchField.less +2 -2
- package/src/sap/m/themes/base/StepInput.less +4 -0
- package/src/sap/m/themes/base/SuggestionsPopover.less +10 -4
- package/src/sap/m/themes/base/TextArea.less +13 -29
- package/src/sap/m/themes/base/{UploadSetTable.less → UploadSetwithTable.less} +0 -5
- package/src/sap/m/themes/base/library.source.less +1 -1
- package/src/sap/m/themes/sap_hcb/InputBase.less +1 -2
- package/src/sap/m/upload/FilePreviewDialog.js +106 -58
- package/src/sap/m/upload/UploadSet.js +1 -1
- package/src/sap/m/upload/UploadSetItem.js +1 -1
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
- package/src/sap/m/upload/{UploadSetTable.js → UploadSetwithTable.js} +460 -192
- package/src/sap/m/upload/{UploadSetTableItem.js → UploadSetwithTableItem.js} +49 -41
- package/src/sap/m/upload/{UploadSetTableItemRenderer.js → UploadSetwithTableItemRenderer.js} +6 -5
- package/src/sap/m/upload/{UploadSetTableRenderer.js → UploadSetwithTableRenderer.js} +7 -10
- package/src/sap/m/upload/UploaderTableItem.js +16 -18
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// Provides control sap.m.upload.
|
|
7
|
+
// Provides control sap.m.upload.UploadSetwithTable.
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/m/Table",
|
|
10
10
|
"sap/m/ToolbarSpacer",
|
|
11
|
-
"sap/m/upload/
|
|
11
|
+
"sap/m/upload/UploadSetwithTableRenderer",
|
|
12
12
|
"sap/ui/unified/FileUploader",
|
|
13
13
|
"sap/m/upload/UploadSetToolbarPlaceholder",
|
|
14
14
|
"sap/m/upload/UploaderHttpRequestMethod",
|
|
15
15
|
"sap/m/OverflowToolbar",
|
|
16
|
-
"sap/m/upload/
|
|
16
|
+
"sap/m/upload/UploadSetwithTableItem",
|
|
17
17
|
"sap/base/util/deepEqual",
|
|
18
18
|
"sap/base/Log",
|
|
19
19
|
"sap/m/library",
|
|
@@ -25,70 +25,67 @@ sap.ui.define([
|
|
|
25
25
|
"sap/ui/core/dnd/DropInfo",
|
|
26
26
|
"sap/ui/core/dnd/DragInfo",
|
|
27
27
|
"sap/m/upload/FilePreviewDialog",
|
|
28
|
-
"sap/ui/base/Event"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
"sap/ui/base/Event",
|
|
29
|
+
"sap/m/Dialog",
|
|
30
|
+
"sap/m/Label",
|
|
31
|
+
"sap/m/Input",
|
|
32
|
+
"sap/m/MessageBox",
|
|
33
|
+
"sap/m/Button",
|
|
34
|
+
"sap/ui/base/Event",
|
|
35
|
+
"sap/ui/core/Core"
|
|
36
|
+
], function (Table, ToolbarSpacer, UploadSetwithTableRenderer, FileUploader,
|
|
37
|
+
UploadSetToolbarPlaceholder, UploaderHttpRequestMethod, OverFlowToolbar, UploadSetwithTableItem, deepEqual, Log, Library, IllustratedMessageType,
|
|
38
|
+
IllustratedMessage, IllustratedMessageSize, Uploader, DragDropInfo, DropInfo, DragInfo, FilePreviewDialog, Event, Dialog, Label, Input, MessageBox, Button, EventBase, Core) {
|
|
32
39
|
"use strict";
|
|
33
40
|
|
|
34
41
|
/**
|
|
35
|
-
* Constructor for a new
|
|
42
|
+
* Constructor for a new UploadSetwithTable.
|
|
36
43
|
*
|
|
37
44
|
* @param {string} [sId] id for the new control, generated automatically if no id is given.
|
|
38
45
|
* @param {object} [mSettings] Initial settings for the new control.
|
|
39
|
-
* @class This control allows you to upload one or more files from your
|
|
40
|
-
* and attach them to your application.<br>
|
|
46
|
+
* @class This control allows you to upload one or more files from your device, such as desktop, tablet or phone, and attach them to your application in a tabular manner.
|
|
41
47
|
* @extends sap.m.Table
|
|
42
48
|
* @author SAP SE
|
|
43
49
|
* @constructor
|
|
44
50
|
* @private
|
|
45
51
|
* @experimental
|
|
46
52
|
* @internal
|
|
47
|
-
* @alias sap.m.upload.
|
|
53
|
+
* @alias sap.m.upload.UploadSetwithTable
|
|
48
54
|
*/
|
|
49
|
-
var
|
|
50
|
-
library: "sap.m",
|
|
55
|
+
var UploadSetwithTable = Table.extend("sap.m.upload.UploadSetwithTable", {
|
|
51
56
|
metadata: {
|
|
57
|
+
library: "sap.m",
|
|
52
58
|
properties: {
|
|
53
59
|
/**
|
|
54
|
-
*
|
|
60
|
+
* File types that are allowed to be uploaded.
|
|
55
61
|
* <br>If this property is not set, any file can be uploaded.
|
|
56
62
|
*/
|
|
57
63
|
fileTypes: {type: "string[]", defaultValue: null},
|
|
58
64
|
/**
|
|
59
|
-
*
|
|
60
|
-
* <br>If set to <code>null</code> or <code>0</code>, any
|
|
61
|
-
* regardless of their names length.
|
|
65
|
+
* Defined maximum length for a name of files that are to be uploaded.
|
|
66
|
+
* <br>If set to <code>null</code> or <code>0</code>, any file can be uploaded regardless length of its name.
|
|
62
67
|
*/
|
|
63
68
|
maxFileNameLength: {type: "int", defaultValue: null},
|
|
64
69
|
/**
|
|
65
|
-
*
|
|
70
|
+
* Defined size limit in megabytes for files that are to be uploaded.
|
|
66
71
|
* <br>If set to <code>null</code> or <code>0</code>, files of any size can be uploaded.
|
|
67
72
|
*/
|
|
68
73
|
maxFileSize: {type: "float", defaultValue: null},
|
|
69
74
|
/**
|
|
70
|
-
*
|
|
75
|
+
* Media types of files that are allowed to be uploaded.
|
|
71
76
|
* <br>If this property is not set, any file can be uploaded.
|
|
72
77
|
*/
|
|
73
78
|
mediaTypes: {type: "string[]", defaultValue: null},
|
|
74
79
|
/**
|
|
75
|
-
*
|
|
80
|
+
* Custom text can be defined for the 'No data' text label. Customisation of text can be done for the empty state of the control.
|
|
76
81
|
*/
|
|
77
|
-
noDataText: {type: "string", defaultValue:
|
|
82
|
+
noDataText: {type: "string", defaultValue: "No documents available" },
|
|
78
83
|
/**
|
|
79
|
-
*
|
|
84
|
+
* Custom text can be defined for the 'No data' text description. Customisation of text can be done for the empty state of the control.
|
|
80
85
|
*/
|
|
81
|
-
noDataDescription: {type: "string", defaultValue:
|
|
86
|
+
noDataDescription: {type: "string", defaultValue: "Drag and drop files here to upload" },
|
|
82
87
|
/**
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
85
|
-
dragDropText: {type: "string", defaultValue: null},
|
|
86
|
-
/**
|
|
87
|
-
* Defines custom text for the drag and drop description label.
|
|
88
|
-
*/
|
|
89
|
-
dragDropDescription: {type: "string", defaultValue: null},
|
|
90
|
-
/**
|
|
91
|
-
* URL where the uploaded files will be stored.
|
|
88
|
+
* Url where the uploaded files are stored.
|
|
92
89
|
*/
|
|
93
90
|
uploadUrl: {type: "string", defaultValue: null},
|
|
94
91
|
/**
|
|
@@ -102,21 +99,48 @@ sap.ui.define([
|
|
|
102
99
|
*/
|
|
103
100
|
multiple: {type: "boolean", group: "Behavior", defaultValue: false},
|
|
104
101
|
/**
|
|
105
|
-
* If set to true, the button used for uploading files
|
|
102
|
+
* If set to true, the button used for uploading files becomes invisible.
|
|
106
103
|
*/
|
|
107
104
|
uploadButtonInvisible: {type: "boolean", group: "Appearance", defaultValue: false},
|
|
108
105
|
/**
|
|
109
106
|
* Defines whether the upload action is allowed.
|
|
110
107
|
*/
|
|
111
108
|
uploadEnabled: {type: "boolean", defaultValue: true},
|
|
109
|
+
/** Callback function to perform additional validations or configurations for the item queued up for upload and to finally trigger the upload.
|
|
110
|
+
* @callback sap.m.upload.UploadSetwithTable.itemValidationHandler
|
|
111
|
+
* @param {sap.m.upload.UploadSetwithTable.ItemInfo} oItemInfo The info of the item queued for upload.
|
|
112
|
+
* @returns {Promise<sap.m.upload.UploadSetwithTableItem>} oPromise, once resolved the UploadSetWithTable control initiates the upload.
|
|
113
|
+
* @public
|
|
114
|
+
**/
|
|
115
|
+
|
|
112
116
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
117
|
+
* @typedef {object} sap.m.upload.UploadSetwithTable.ItemInfo
|
|
118
|
+
* @description Item info object sent as paramter to {@link sap.m.upload.UploadSetwithTable.itemValidationHandler itemValidationHandler callback}
|
|
119
|
+
* @property {sap.m.upload.UploadSetwithTableItem} oItem Current item queued for upload.
|
|
120
|
+
* @property {number} iTotalItemsForUpload Total count of items queued for upload.
|
|
121
|
+
* @public
|
|
122
|
+
**/
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Defines a {@link sap.m.upload.UploadSetwithTable.itemValidationHandler callback function} that is invoked when each UploadSetwithTableItem is queued up for upload.
|
|
126
|
+
* This callback is invoked with {@link sap.m.upload.UploadSetwithTable.ItemInfo parameters} and the callback is expected to return a promise to the control. Once the promise is resolved, the control initiates the upload process.
|
|
127
|
+
* Configure this property only when any additional configuration or validations are to be performed before the upload of each item.
|
|
128
|
+
* The upload process is triggered manually by resolving the promise returned to the control.
|
|
129
|
+
**/
|
|
130
|
+
itemValidationHandler: {type: "function", defaultValue: null},
|
|
131
|
+
/**
|
|
132
|
+
* Lets the user upload entire files from directories and sub directories.
|
|
133
|
+
*/
|
|
134
|
+
directory: {type: "boolean", group: "Behavior", defaultValue: false},
|
|
135
|
+
/**
|
|
136
|
+
* Determines which illustration type is displayed when the control holds no data.
|
|
116
137
|
*/
|
|
117
|
-
|
|
138
|
+
noDataIllustrationType: {type: "sap.m.IllustratedMessageType", group: "Appearance", defaultValue: IllustratedMessageType.UploadCollection}
|
|
118
139
|
},
|
|
119
140
|
aggregations: {
|
|
141
|
+
/**
|
|
142
|
+
* The header area can be used as a toolbar to add extra controls for user interactions. Note: When set, this overwrites the headerText property.
|
|
143
|
+
*/
|
|
120
144
|
headerToolbar : {
|
|
121
145
|
type: "sap.m.OverflowToolbar",
|
|
122
146
|
multiple: false
|
|
@@ -130,32 +154,28 @@ sap.ui.define([
|
|
|
130
154
|
*/
|
|
131
155
|
headerFields: {type: "sap.ui.core.Item", multiple: true, singularName: "headerField"},
|
|
132
156
|
/**
|
|
133
|
-
* Additional buttons
|
|
157
|
+
* Additional buttons can be added to the footer of file preview dialog
|
|
134
158
|
*/
|
|
135
|
-
|
|
159
|
+
additionalFooterButtons: {type: "sap.m.Button", multiple: true}
|
|
160
|
+
},
|
|
161
|
+
associations: {
|
|
162
|
+
/**
|
|
163
|
+
* Dialog with a carousel to preview files uploaded.
|
|
164
|
+
* <br>If it is not defined, the control creates and uses the instance of {@link sap.m.upload.FilePreviewDialog FilePreviewDialog}.
|
|
165
|
+
*/
|
|
166
|
+
previewDialog: {type: "sap.m.upload.FilePreviewDialog", multiple: false}
|
|
136
167
|
},
|
|
137
168
|
defaultAggregation : "items",
|
|
138
169
|
events: {
|
|
139
170
|
/**
|
|
140
171
|
* The event is triggered when the file name is changed.
|
|
141
172
|
*/
|
|
142
|
-
|
|
143
|
-
parameters: {
|
|
144
|
-
/**
|
|
145
|
-
* The renamed UI element as an UploadSetTableItem.
|
|
146
|
-
*/
|
|
147
|
-
item: {type: "sap.m.upload.UploadSetTableItem"}
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
/**
|
|
151
|
-
* This event is fired after the item is removed on click of ok button in confirmation dialog.
|
|
152
|
-
*/
|
|
153
|
-
afterItemRemoved: {
|
|
173
|
+
itemRenamed: {
|
|
154
174
|
parameters: {
|
|
155
175
|
/**
|
|
156
|
-
* The
|
|
176
|
+
* The renamed UI element is of UploadSetwithTableItem type.
|
|
157
177
|
*/
|
|
158
|
-
item: {type: "sap.m.upload.
|
|
178
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"}
|
|
159
179
|
}
|
|
160
180
|
},
|
|
161
181
|
/**
|
|
@@ -166,21 +186,22 @@ sap.ui.define([
|
|
|
166
186
|
/**
|
|
167
187
|
* The file whose upload is just about to start.
|
|
168
188
|
*/
|
|
169
|
-
item: {type: "sap.m.upload.
|
|
189
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"}
|
|
170
190
|
},
|
|
171
191
|
allowPreventDefault: true
|
|
172
192
|
},
|
|
173
193
|
/**
|
|
174
194
|
* This event is fired right after the upload process is finished.
|
|
195
|
+
* <br>Based on the backend response of the application, listeners can use the parameters to determine if the upload was successful or if it failed.
|
|
175
196
|
*/
|
|
176
197
|
uploadCompleted: {
|
|
177
198
|
parameters: {
|
|
178
199
|
/**
|
|
179
200
|
* The file whose upload has just been completed.
|
|
180
201
|
*/
|
|
181
|
-
item: {type: "sap.m.upload.
|
|
202
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"},
|
|
182
203
|
/**
|
|
183
|
-
* Response message
|
|
204
|
+
* Response message that comes from the server.
|
|
184
205
|
*
|
|
185
206
|
* On the server side this response has to be put within the "body" tags of the response
|
|
186
207
|
* document of the iFrame. It can consist of a return code and an optional message. This does not
|
|
@@ -244,7 +265,7 @@ sap.ui.define([
|
|
|
244
265
|
* The file that fails to meet the file type restriction specified in the
|
|
245
266
|
* <code>fileType</code> property.
|
|
246
267
|
*/
|
|
247
|
-
item: {type: "
|
|
268
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"}
|
|
248
269
|
}
|
|
249
270
|
},
|
|
250
271
|
/**
|
|
@@ -254,7 +275,6 @@ sap.ui.define([
|
|
|
254
275
|
* <code>maxFileNameLength</code> property.</li>
|
|
255
276
|
* <li>When the file name length restriction changes, and the file to be uploaded fails to meet the new
|
|
256
277
|
* restriction.</li>
|
|
257
|
-
* <li>Listeners can use the item parameter to remove the incomplete item that failed to meet the restriction</li>
|
|
258
278
|
* </ul>
|
|
259
279
|
*/
|
|
260
280
|
fileNameLengthExceeded: {
|
|
@@ -263,7 +283,7 @@ sap.ui.define([
|
|
|
263
283
|
* The file that fails to meet the file name length restriction specified in the
|
|
264
284
|
* <code>maxFileNameLength</code> property.
|
|
265
285
|
*/
|
|
266
|
-
item: {type: "
|
|
286
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"}
|
|
267
287
|
}
|
|
268
288
|
},
|
|
269
289
|
/**
|
|
@@ -273,7 +293,6 @@ sap.ui.define([
|
|
|
273
293
|
* <code>maxFileSize</code> property.</li>
|
|
274
294
|
* <li>When the file size restriction changes, and the file to be uploaded fails to meet the new
|
|
275
295
|
* restriction.</li>
|
|
276
|
-
* <li>Listeners can use the item parameter to remove the incomplete item that failed to meet the restriction</li>
|
|
277
296
|
* </ul>
|
|
278
297
|
*/
|
|
279
298
|
fileSizeExceeded: {
|
|
@@ -282,7 +301,7 @@ sap.ui.define([
|
|
|
282
301
|
* The file that fails to meet the file size restriction specified in the
|
|
283
302
|
* <code>maxFileSize</code> property.
|
|
284
303
|
*/
|
|
285
|
-
item: {type: "
|
|
304
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"}
|
|
286
305
|
}
|
|
287
306
|
},
|
|
288
307
|
/**
|
|
@@ -300,19 +319,19 @@ sap.ui.define([
|
|
|
300
319
|
* The file that fails to meet the media type restriction specified in the
|
|
301
320
|
* <code>mediaTypes</code> property.
|
|
302
321
|
*/
|
|
303
|
-
item: {type: "
|
|
322
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"}
|
|
304
323
|
}
|
|
305
324
|
},
|
|
306
325
|
/**
|
|
307
|
-
* This event is fired when a file
|
|
308
|
-
* Use this event to set additional info dynamically specific for each item before upload process is initiated
|
|
326
|
+
* This event is fired just before initiating the file upload process when a file is selected to be uploaded.
|
|
327
|
+
* Use this event to set additional info dynamically, specific for each item before upload process is initiated.
|
|
309
328
|
*/
|
|
310
329
|
beforeInitiatingItemUpload: {
|
|
311
330
|
parameters: {
|
|
312
331
|
/**
|
|
313
332
|
* Items in ready state for upload process
|
|
314
333
|
*/
|
|
315
|
-
item: {type: "sap.m.upload.
|
|
334
|
+
item: {type: "sap.m.upload.UploadSetwithTableItem"}
|
|
316
335
|
}
|
|
317
336
|
},
|
|
318
337
|
/**
|
|
@@ -321,16 +340,15 @@ sap.ui.define([
|
|
|
321
340
|
* @param {sap.ui.base.Event} oControlEvent
|
|
322
341
|
* @param {sap.ui.base.EventProvider} oControlEvent.getSource
|
|
323
342
|
* @param {object} oControlEvent.getParameters
|
|
324
|
-
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element that
|
|
343
|
+
* @param {sap.ui.core.Element} oControlEvent.getParameters.target The target element that is dragged
|
|
325
344
|
* @param {sap.ui.core.dnd.DragSession} oControlEvent.getParameters.dragSession The UI5 <code>dragSession</code> object that exists only during drag and drop
|
|
326
345
|
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
|
|
327
346
|
* @public
|
|
328
|
-
* @since 1.99
|
|
329
347
|
*/
|
|
330
348
|
itemDragStart: {
|
|
331
349
|
},
|
|
332
350
|
/**
|
|
333
|
-
* This event is fired when an uploaded item is dropped on the new
|
|
351
|
+
* This event is fired when an uploaded item is dropped on the new table row position.
|
|
334
352
|
* @event
|
|
335
353
|
* @param {sap.ui.base.Event} oControlEvent
|
|
336
354
|
* @param {sap.ui.base.EventProvider} oControlEvent.getSource
|
|
@@ -341,13 +359,12 @@ sap.ui.define([
|
|
|
341
359
|
* @param {sap.ui.core.dnd.RelativeDropPosition} oControlEvent.getParameters.dropPosition The calculated position of the drop action relative to the <code>droppedControl</code>.
|
|
342
360
|
* @param {Event} oControlEvent.getParameters.browserEvent The underlying browser event
|
|
343
361
|
* @public
|
|
344
|
-
* @since 1.99
|
|
345
362
|
*/
|
|
346
363
|
itemDrop: {
|
|
347
364
|
}
|
|
348
365
|
}
|
|
349
366
|
},
|
|
350
|
-
renderer:
|
|
367
|
+
renderer: UploadSetwithTableRenderer
|
|
351
368
|
});
|
|
352
369
|
|
|
353
370
|
var UploadState = Library.UploadState;
|
|
@@ -356,24 +373,24 @@ sap.ui.define([
|
|
|
356
373
|
/* Lifecycle handling */
|
|
357
374
|
/* ================== */
|
|
358
375
|
|
|
359
|
-
|
|
376
|
+
UploadSetwithTable.prototype.init = function () {
|
|
360
377
|
Table.prototype.init.call(this);
|
|
361
378
|
this._setDragDropConfig();
|
|
362
379
|
this._filesTobeUploaded = [];
|
|
363
380
|
this._filePreviewDialogControl = null;
|
|
364
|
-
this._oRb =
|
|
381
|
+
this._oRb = Core.getLibraryResourceBundle("sap.m");
|
|
365
382
|
};
|
|
366
383
|
|
|
367
|
-
|
|
384
|
+
UploadSetwithTable.prototype.onBeforeRendering = function() {
|
|
368
385
|
Table.prototype.onBeforeRendering.call(this);
|
|
369
386
|
this._setIllustratedMessage();
|
|
370
387
|
};
|
|
371
388
|
|
|
372
|
-
|
|
389
|
+
UploadSetwithTable.prototype.onAfterRendering = function() {
|
|
373
390
|
Table.prototype.onAfterRendering.call(this);
|
|
374
391
|
};
|
|
375
392
|
|
|
376
|
-
|
|
393
|
+
UploadSetwithTable.prototype.exit = function () {
|
|
377
394
|
Table.prototype.exit.call(this);
|
|
378
395
|
if (this._oToolbar) {
|
|
379
396
|
this._oToolbar.destroy();
|
|
@@ -393,7 +410,7 @@ sap.ui.define([
|
|
|
393
410
|
/* Overriden API methods */
|
|
394
411
|
/* ===================== */
|
|
395
412
|
|
|
396
|
-
|
|
413
|
+
UploadSetwithTable.prototype.getHeaderToolbar = function () {
|
|
397
414
|
if (!this._oToolbar) {
|
|
398
415
|
this._oToolbar = this.getAggregation("headerToolbar");
|
|
399
416
|
if (!this._oToolbar) {
|
|
@@ -416,7 +433,7 @@ sap.ui.define([
|
|
|
416
433
|
return this._oToolbar;
|
|
417
434
|
};
|
|
418
435
|
|
|
419
|
-
|
|
436
|
+
UploadSetwithTable.prototype.setFileTypes = function (aNewTypes) {
|
|
420
437
|
var aTypes = aNewTypes || null;
|
|
421
438
|
if (typeof aTypes === "string") {
|
|
422
439
|
aTypes = aTypes.split(",");
|
|
@@ -431,7 +448,7 @@ sap.ui.define([
|
|
|
431
448
|
return this;
|
|
432
449
|
};
|
|
433
450
|
|
|
434
|
-
|
|
451
|
+
UploadSetwithTable.prototype.setMaxFileNameLength = function (iNewMax) {
|
|
435
452
|
if (this.getMaxFileNameLength() !== iNewMax) {
|
|
436
453
|
this.setProperty("maxFileNameLength", iNewMax, true);
|
|
437
454
|
this.getDefaultFileUploader().setMaximumFilenameLength(iNewMax);
|
|
@@ -439,7 +456,7 @@ sap.ui.define([
|
|
|
439
456
|
return this;
|
|
440
457
|
};
|
|
441
458
|
|
|
442
|
-
|
|
459
|
+
UploadSetwithTable.prototype.setMaxFileSize = function (iNewMax) {
|
|
443
460
|
if (this.getMaxFileSize() !== iNewMax) {
|
|
444
461
|
this.setProperty("maxFileSize", iNewMax, true);
|
|
445
462
|
this.getDefaultFileUploader().setMaximumFileSize(iNewMax);
|
|
@@ -447,7 +464,7 @@ sap.ui.define([
|
|
|
447
464
|
return this;
|
|
448
465
|
};
|
|
449
466
|
|
|
450
|
-
|
|
467
|
+
UploadSetwithTable.prototype.setMediaTypes = function (aNewTypes) {
|
|
451
468
|
var aTypes = aNewTypes || null;
|
|
452
469
|
if (typeof aTypes === "string") {
|
|
453
470
|
aTypes = aTypes.split(",");
|
|
@@ -462,15 +479,14 @@ sap.ui.define([
|
|
|
462
479
|
return this;
|
|
463
480
|
};
|
|
464
481
|
|
|
465
|
-
|
|
482
|
+
UploadSetwithTable.prototype.setUploadButtonInvisible = function (bUploadButtonInvisible) {
|
|
466
483
|
if (bUploadButtonInvisible !== this.getUploadButtonInvisible()) {
|
|
467
|
-
this._setFileUploaderVisibility(bUploadButtonInvisible);
|
|
468
484
|
this.setProperty("uploadButtonInvisible", bUploadButtonInvisible, true);
|
|
469
485
|
}
|
|
470
486
|
return this;
|
|
471
487
|
};
|
|
472
488
|
|
|
473
|
-
|
|
489
|
+
UploadSetwithTable.prototype.setMultiple = function (bMultiple) {
|
|
474
490
|
if (this.getMultiple() !== bMultiple) {
|
|
475
491
|
this.setProperty("multiple", bMultiple);
|
|
476
492
|
this.getDefaultFileUploader().setMultiple(bMultiple);
|
|
@@ -478,7 +494,7 @@ sap.ui.define([
|
|
|
478
494
|
return this;
|
|
479
495
|
};
|
|
480
496
|
|
|
481
|
-
|
|
497
|
+
UploadSetwithTable.prototype.setUploadEnabled = function (bEnable) {
|
|
482
498
|
if (bEnable !== this.getUploadEnabled()) {
|
|
483
499
|
this.getDefaultFileUploader().setEnabled(bEnable);
|
|
484
500
|
this.setProperty("uploadEnabled", bEnable, false);
|
|
@@ -486,17 +502,36 @@ sap.ui.define([
|
|
|
486
502
|
return this;
|
|
487
503
|
};
|
|
488
504
|
|
|
505
|
+
UploadSetwithTable.prototype.setMultiple = function (bMultiple) {
|
|
506
|
+
if (this.getMultiple() !== bMultiple) {
|
|
507
|
+
this.setProperty("multiple", bMultiple);
|
|
508
|
+
this.getDefaultFileUploader().setMultiple(bMultiple);
|
|
509
|
+
}
|
|
510
|
+
return this;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
UploadSetwithTable.prototype.setDirectory = function (bDirectory) {
|
|
514
|
+
if (this.getDirectory() !== bDirectory) {
|
|
515
|
+
this.setProperty("directory", bDirectory);
|
|
516
|
+
this.getDefaultFileUploader().setDirectory(bDirectory);
|
|
517
|
+
if (bDirectory) {
|
|
518
|
+
this.setProperty("multiple", false); // disable multiple files selection when directory selection is enabled.
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
return this;
|
|
522
|
+
};
|
|
523
|
+
|
|
489
524
|
/* ============== */
|
|
490
525
|
/* Public methods */
|
|
491
526
|
/* ============== */
|
|
492
527
|
|
|
493
528
|
/**
|
|
494
|
-
* Returns an instance of the default <code>sap.ui.unified.FileUploader</code> used for adding files
|
|
495
|
-
* the
|
|
529
|
+
* Returns an instance of the default <code>sap.ui.unified.FileUploader</code> icon/button, used for adding files
|
|
530
|
+
* from the open file dialog of the operating system. It can be customized, for example made invisible or assigned a different icon.
|
|
496
531
|
* @return {sap.ui.unified.FileUploader} Instance of the default <code>sap.ui.unified.FileUploader</code>.
|
|
497
532
|
* @public
|
|
498
533
|
*/
|
|
499
|
-
|
|
534
|
+
UploadSetwithTable.prototype.getDefaultFileUploader = function () {
|
|
500
535
|
var sTooltip = "Upload";
|
|
501
536
|
if (!this._oFileUploader) {
|
|
502
537
|
this._oFileUploader = new FileUploader(this.getId() + "-uploader", {
|
|
@@ -508,20 +543,21 @@ sap.ui.define([
|
|
|
508
543
|
icon: "",
|
|
509
544
|
iconFirst: false,
|
|
510
545
|
style: "Transparent",
|
|
511
|
-
name: "
|
|
546
|
+
name: "UploadSetwithTableFileUploader",
|
|
512
547
|
sameFilenameAllowed: true,
|
|
513
548
|
fileType: this.getFileTypes(),
|
|
514
549
|
mimeType: this.getMediaTypes(),
|
|
515
550
|
maximumFilenameLength: this.getMaxFileNameLength(),
|
|
516
551
|
maximumFileSize: this.getMaxFileSize(),
|
|
517
|
-
multiple: this.getMultiple(),
|
|
552
|
+
multiple: this.getDirectory() ? false : this.getMultiple(),
|
|
518
553
|
useMultipart: false,
|
|
519
554
|
sendXHR: true,
|
|
520
555
|
change: [this._onFileUploaderChange, this],
|
|
521
556
|
typeMissmatch: [this._fireFileTypeMismatch, this],
|
|
522
557
|
fileSizeExceed: [this._fireFileSizeExceed, this],
|
|
523
558
|
filenameLengthExceed: [this._fireFilenameLengthExceed, this],
|
|
524
|
-
visible: true
|
|
559
|
+
visible: true,
|
|
560
|
+
directory: this.getDirectory()
|
|
525
561
|
});
|
|
526
562
|
}
|
|
527
563
|
|
|
@@ -529,31 +565,31 @@ sap.ui.define([
|
|
|
529
565
|
};
|
|
530
566
|
|
|
531
567
|
/**
|
|
532
|
-
* Returns sap icon based on mediaType and
|
|
533
|
-
* @param {string} mediaType The
|
|
534
|
-
* @param {string} fileName The
|
|
568
|
+
* Returns sap icon based on the passed mediaType and filename
|
|
569
|
+
* @param {string} mediaType The media type of the selected file
|
|
570
|
+
* @param {string} fileName The name of the selected file
|
|
535
571
|
* @public
|
|
536
572
|
* @returns {string} sap icon.
|
|
537
573
|
*/
|
|
538
|
-
|
|
539
|
-
return
|
|
574
|
+
UploadSetwithTable.getIconForFileType = function (mediaType, fileName) {
|
|
575
|
+
return UploadSetwithTableItem._getIconByMimeType(mediaType, fileName);
|
|
540
576
|
};
|
|
541
577
|
|
|
542
578
|
/**
|
|
543
|
-
*
|
|
544
|
-
* @param {
|
|
545
|
-
* @param {boolean} bAskForLocation
|
|
579
|
+
* Downloads the item. Only possible when the item has a valid URL specified in the <code>url</code> property of the item.
|
|
580
|
+
* @param {UploadSetwithTableItem[]} aItemsToDownload The list items the selection state is to be set for
|
|
581
|
+
* @param {boolean} bAskForLocation If the location is to be determined as to where the file is to be downloaded.
|
|
546
582
|
* @public
|
|
547
583
|
*/
|
|
548
|
-
|
|
584
|
+
UploadSetwithTable.prototype.downloadItems = function (aItemsToDownload, bAskForLocation) {
|
|
549
585
|
if (aItemsToDownload && aItemsToDownload.length) {
|
|
550
586
|
aItemsToDownload.forEach(function(oItem){
|
|
551
|
-
// Check if items are instances of "sap.m.
|
|
552
|
-
var
|
|
587
|
+
// Check if items are instances of "sap.m.UploadSetwithTableItem"
|
|
588
|
+
var isUploadSetwithTableItemInstance = oItem && oItem instanceof UploadSetwithTableItem ? true : false;
|
|
553
589
|
var oParent = oItem && oItem.getParent ? oItem.getParent() : null;
|
|
554
590
|
// Download files individually
|
|
555
|
-
if (
|
|
556
|
-
this._getActiveUploader().download(oItem, [],
|
|
591
|
+
if (isUploadSetwithTableItemInstance && oParent === this) {
|
|
592
|
+
this._getActiveUploader().download(oItem, [], bAskForLocation);
|
|
557
593
|
} else {
|
|
558
594
|
Log.warning("Download cannot proceed without a parent association.");
|
|
559
595
|
}
|
|
@@ -568,7 +604,7 @@ sap.ui.define([
|
|
|
568
604
|
* @param {sap.m.upload.UploaderTableItem} oUploader Instance of <code>sap.m.upload.UploaderTableItem</code> to which the default request handlers are attached.
|
|
569
605
|
* @public
|
|
570
606
|
*/
|
|
571
|
-
|
|
607
|
+
UploadSetwithTable.prototype.registerUploaderEvents = function (oUploader) {
|
|
572
608
|
oUploader.attachUploadStarted(this._onUploadStarted.bind(this));
|
|
573
609
|
oUploader.attachUploadCompleted(this._onUploadCompleted.bind(this));
|
|
574
610
|
};
|
|
@@ -577,7 +613,7 @@ sap.ui.define([
|
|
|
577
613
|
* Invokes native files selection handler.
|
|
578
614
|
* @public
|
|
579
615
|
*/
|
|
580
|
-
|
|
616
|
+
UploadSetwithTable.prototype.fileSelectionHandler = function() {
|
|
581
617
|
var oUploaderInstance = this.getDefaultFileUploader();
|
|
582
618
|
if (oUploaderInstance && oUploaderInstance.oFileUpload && oUploaderInstance.oFileUpload.click) {
|
|
583
619
|
oUploaderInstance.oFileUpload.click();
|
|
@@ -585,12 +621,13 @@ sap.ui.define([
|
|
|
585
621
|
};
|
|
586
622
|
|
|
587
623
|
/**
|
|
588
|
-
* API to determine the
|
|
624
|
+
* API to determine the unit for file size in KB/MB/GB.
|
|
625
|
+
* API recommended for file size formatting purpose.
|
|
589
626
|
* @param {int} iFileSize fileSize to determine units
|
|
590
627
|
* @public
|
|
591
628
|
* @returns {sFileSizeWithUnit} file size in KB/MB/GB default unit is KB
|
|
592
629
|
*/
|
|
593
|
-
|
|
630
|
+
UploadSetwithTable.getFileSizeWithUnits = function(iFileSize) {
|
|
594
631
|
var iKilobyte = 1024;
|
|
595
632
|
var iMegabyte = iKilobyte * 1024;
|
|
596
633
|
var iGigabyte = iMegabyte * 1024;
|
|
@@ -607,17 +644,17 @@ sap.ui.define([
|
|
|
607
644
|
};
|
|
608
645
|
|
|
609
646
|
/**
|
|
610
|
-
* API to upload
|
|
611
|
-
* @param {string} sName file name to be set for the file to be uploaded.
|
|
647
|
+
* API to upload file using URL
|
|
648
|
+
* @param {string} sName file name to be set for the file that is to be uploaded.
|
|
612
649
|
* @param {string} sUrl Url for the file.
|
|
613
|
-
* @param {Promise} oPromise Promise when resolved, control
|
|
614
|
-
* @returns {
|
|
650
|
+
* @param {Promise} oPromise Promise when resolved, the control initiates the upload process.
|
|
651
|
+
* @returns {UploadSetwithTableItem} oItem, UploadSetwithTableItem instance created with the file object.
|
|
615
652
|
* @public
|
|
616
653
|
*/
|
|
617
|
-
|
|
654
|
+
UploadSetwithTable.prototype.uploadItemViaUrl = function (sName, sUrl, oPromise) {
|
|
618
655
|
var oFileObject = new File([new Blob([])], sName);
|
|
619
656
|
|
|
620
|
-
var oItem = new
|
|
657
|
+
var oItem = new UploadSetwithTableItem({
|
|
621
658
|
uploadState: UploadState.Ready
|
|
622
659
|
});
|
|
623
660
|
oItem._setFileObject(oFileObject);
|
|
@@ -633,13 +670,13 @@ sap.ui.define([
|
|
|
633
670
|
|
|
634
671
|
/**
|
|
635
672
|
* API to upload Item without file
|
|
636
|
-
* @param {Promise} oPromise
|
|
637
|
-
* @return {
|
|
673
|
+
* @param {Promise} oPromise Promise when resolved, control initiates the upload process.
|
|
674
|
+
* @return {UploadSetwithTableItem} oItem, UploadSetwithTableItem instance created with the file object.
|
|
638
675
|
* @public
|
|
639
676
|
*/
|
|
640
|
-
|
|
677
|
+
UploadSetwithTable.prototype.uploadItemWithoutFile = function (oPromise) {
|
|
641
678
|
var oFileObject = new File([new Blob([])], '-');
|
|
642
|
-
var oItem = new
|
|
679
|
+
var oItem = new UploadSetwithTableItem({
|
|
643
680
|
uploadState: UploadState.Ready
|
|
644
681
|
});
|
|
645
682
|
oItem._setFileObject(oFileObject);
|
|
@@ -652,16 +689,28 @@ sap.ui.define([
|
|
|
652
689
|
return oItem;
|
|
653
690
|
};
|
|
654
691
|
|
|
692
|
+
/**
|
|
693
|
+
* API to rename the document of an item.
|
|
694
|
+
* @param {sap.m.upload.UploadSetwithTableItem} oItem, target item.
|
|
695
|
+
* @public
|
|
696
|
+
*/
|
|
697
|
+
UploadSetwithTable.prototype.renameItem = function (oItem) {
|
|
698
|
+
if (oItem && oItem instanceof UploadSetwithTableItem) {
|
|
699
|
+
const oDialog = this._getFileRenameDialog(oItem);
|
|
700
|
+
oDialog.open();
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
|
|
655
704
|
/* ============== */
|
|
656
705
|
/* Private methods */
|
|
657
706
|
/* ============== */
|
|
658
707
|
|
|
659
|
-
|
|
708
|
+
UploadSetwithTable.prototype._setFileUploaderInToolbar = function(fileUploader) {
|
|
660
709
|
this._oToolbar.getContent()[this._iFileUploaderPH].setVisible(false);
|
|
661
710
|
this._oToolbar.insertContent(fileUploader, this._iFileUploaderPH);
|
|
662
711
|
};
|
|
663
712
|
|
|
664
|
-
|
|
713
|
+
UploadSetwithTable.prototype._getFileUploaderPlaceHolderPosition = function(toolbar) {
|
|
665
714
|
for (var i = 0; i < toolbar.getContent().length; i++) {
|
|
666
715
|
if (toolbar.getContent()[i] instanceof UploadSetToolbarPlaceholder) {
|
|
667
716
|
return i;
|
|
@@ -670,7 +719,7 @@ sap.ui.define([
|
|
|
670
719
|
return -1;
|
|
671
720
|
};
|
|
672
721
|
|
|
673
|
-
|
|
722
|
+
UploadSetwithTable.prototype._onFileUploaderChange = function (oEvent) {
|
|
674
723
|
var oFiles = oEvent.getParameter("files");
|
|
675
724
|
|
|
676
725
|
if (oFiles && oFiles.length) {
|
|
@@ -686,7 +735,7 @@ sap.ui.define([
|
|
|
686
735
|
}
|
|
687
736
|
};
|
|
688
737
|
|
|
689
|
-
|
|
738
|
+
UploadSetwithTable.prototype._processSelectedFileObjects = function (oFiles) {
|
|
690
739
|
var aFiles = [];
|
|
691
740
|
|
|
692
741
|
// Need to explicitly copy the file list, FileUploader deliberately resets its form completely
|
|
@@ -696,38 +745,38 @@ sap.ui.define([
|
|
|
696
745
|
}
|
|
697
746
|
|
|
698
747
|
aFiles.forEach((oFile) => {
|
|
699
|
-
var oItem = new
|
|
748
|
+
var oItem = new UploadSetwithTableItem({
|
|
700
749
|
uploadState: UploadState.Ready
|
|
701
750
|
});
|
|
702
751
|
oItem._setFileObject(oFile);
|
|
703
752
|
oItem.setFileName(oFile.name);
|
|
704
753
|
|
|
705
754
|
|
|
706
|
-
if (this.
|
|
755
|
+
if (this.getItemValidationHandler() && typeof this.getItemValidationHandler() === "function" ) {
|
|
707
756
|
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}
|
|
757
|
+
const oItemInfo = {
|
|
758
|
+
oItem: oItem,
|
|
759
|
+
iTotalItemsForUpload: aFiles.length
|
|
760
|
+
};
|
|
712
761
|
|
|
713
|
-
var oPromise = this.
|
|
762
|
+
var oPromise = this.getItemValidationHandler()(oItemInfo);
|
|
714
763
|
if (oPromise && oPromise instanceof Promise) {
|
|
715
764
|
oPromise
|
|
716
765
|
.then((item) => {
|
|
717
|
-
if (item instanceof
|
|
766
|
+
if (item instanceof UploadSetwithTableItem) {
|
|
718
767
|
this._initateItemUpload(item);
|
|
719
768
|
}
|
|
720
769
|
})
|
|
721
770
|
.catch((item) => {
|
|
722
771
|
// Reset variable to avoid update if upload rejected.
|
|
723
|
-
if (item && this._oItemToUpdate && item instanceof
|
|
772
|
+
if (item && this._oItemToUpdate && item instanceof UploadSetwithTableItem && item.getId() === this._oItemToUpdate.getId()) {
|
|
724
773
|
this._oItemToUpdate = null;
|
|
725
774
|
}
|
|
726
775
|
});
|
|
727
776
|
} else {
|
|
728
777
|
oItem.destroy();
|
|
729
|
-
// if promise is not returned to the
|
|
730
|
-
Log.error("Invalid usage, missing Promise:
|
|
778
|
+
// if promise is not returned to the ItemValidation hook log error and destroy the item
|
|
779
|
+
Log.error("Invalid usage, missing Promise: ItemValidationHandler callback expects Promise to be returned.");
|
|
731
780
|
}
|
|
732
781
|
} else {
|
|
733
782
|
/* if no validation handler is provided control continues with normal upload else waits for the application to manually
|
|
@@ -737,7 +786,7 @@ sap.ui.define([
|
|
|
737
786
|
});
|
|
738
787
|
};
|
|
739
788
|
|
|
740
|
-
|
|
789
|
+
UploadSetwithTable.prototype._initateItemUpload = function(oItem) {
|
|
741
790
|
this.fireBeforeInitiatingItemUpload({item: oItem});
|
|
742
791
|
if (this._oItemToUpdate) {
|
|
743
792
|
// Registering item to be update with selected file contents post successful upload.
|
|
@@ -746,7 +795,7 @@ sap.ui.define([
|
|
|
746
795
|
this._uploadItemIfGoodToGo(oItem);
|
|
747
796
|
};
|
|
748
797
|
|
|
749
|
-
|
|
798
|
+
UploadSetwithTable.prototype._fireFileTypeMismatch = function (oItem) {
|
|
750
799
|
var aMediaTypes = this.getMediaTypes();
|
|
751
800
|
var aFileTypes = this.getFileTypes();
|
|
752
801
|
|
|
@@ -768,20 +817,20 @@ sap.ui.define([
|
|
|
768
817
|
}
|
|
769
818
|
};
|
|
770
819
|
|
|
771
|
-
|
|
820
|
+
UploadSetwithTable.prototype._fireFilenameLengthExceed = function (oItem) {
|
|
772
821
|
this.fireFileNameLengthExceeded({item: oItem});
|
|
773
822
|
};
|
|
774
823
|
|
|
775
|
-
|
|
824
|
+
UploadSetwithTable.prototype._fireFileSizeExceed = function (oItem) {
|
|
776
825
|
this.fireFileSizeExceeded({item: oItem});
|
|
777
826
|
};
|
|
778
827
|
|
|
779
|
-
|
|
828
|
+
UploadSetwithTable.prototype._onUploadStarted = function (oEvent) {
|
|
780
829
|
var oItem = oEvent.getParameter("item");
|
|
781
830
|
oItem.setUploadState(UploadState.Uploading);
|
|
782
831
|
};
|
|
783
832
|
|
|
784
|
-
|
|
833
|
+
UploadSetwithTable.prototype._onUploadCompleted = function (oEvent) {
|
|
785
834
|
var oItem = oEvent.getParameter("item"),
|
|
786
835
|
oResponseXHRParams = oEvent.getParameter("responseXHR"),
|
|
787
836
|
sResponse = null;
|
|
@@ -807,20 +856,22 @@ sap.ui.define([
|
|
|
807
856
|
this.fireUploadCompleted(oXhrParams);
|
|
808
857
|
};
|
|
809
858
|
|
|
810
|
-
|
|
859
|
+
UploadSetwithTable.prototype._uploadItemIfGoodToGo = function (oItem) {
|
|
811
860
|
if (oItem.getUploadState() === UploadState.Ready && !oItem._isRestricted()) {
|
|
812
861
|
if (this.fireBeforeUploadStarts({item: oItem})) {
|
|
813
|
-
|
|
862
|
+
const aHeaderFields = this.getHeaderFields()?.length ? this.getHeaderFields() : [];
|
|
863
|
+
const aItemHeaderFields = oItem.getHeaderFields()?.length ? oItem.getHeaderFields() : [];
|
|
864
|
+
const oHeaderFields = [...aHeaderFields, ...aItemHeaderFields]; //Merging headers for request.
|
|
814
865
|
this._getActiveUploader().uploadItem(oItem, oHeaderFields);
|
|
815
866
|
}
|
|
816
867
|
}
|
|
817
868
|
};
|
|
818
869
|
|
|
819
|
-
|
|
870
|
+
UploadSetwithTable.prototype._getActiveUploader = function () {
|
|
820
871
|
return this.getUploader() || this._getImplicitUploader();
|
|
821
872
|
};
|
|
822
873
|
|
|
823
|
-
|
|
874
|
+
UploadSetwithTable.prototype._getImplicitUploader = function () {
|
|
824
875
|
if (!this._oUploader) {
|
|
825
876
|
this._oUploader = new Uploader({
|
|
826
877
|
httpRequestMethod : this.getHttpRequestMethod()
|
|
@@ -833,10 +884,10 @@ sap.ui.define([
|
|
|
833
884
|
return this._oUploader;
|
|
834
885
|
};
|
|
835
886
|
|
|
836
|
-
|
|
887
|
+
UploadSetwithTable.prototype._setIllustratedMessage = function () {
|
|
837
888
|
if (!this._illustratedMessage) {
|
|
838
889
|
this._illustratedMessage = new IllustratedMessage({
|
|
839
|
-
illustrationType:
|
|
890
|
+
illustrationType: this.getNoDataIllustrationType(),
|
|
840
891
|
illustrationSize: IllustratedMessageSize.Spot,
|
|
841
892
|
title: this.getNoDataText() ? this.getNoDataText() : this._oRb.getText("UPLOADSET_WITH_TABLE_NO_DATA_TEXT"),
|
|
842
893
|
description: this.getNoDataDescription() ? this.getNoDataDescription() : this._oRb.getText("UPLOADSET_WITH_TABLE_NO_DATA_DESCRIPTION")
|
|
@@ -847,20 +898,7 @@ sap.ui.define([
|
|
|
847
898
|
this.setAggregation("noData", this._illustratedMessage);
|
|
848
899
|
};
|
|
849
900
|
|
|
850
|
-
|
|
851
|
-
if (this._oFileUploader) {
|
|
852
|
-
var buttonRef = this._oFileUploader.oBrowse && this._oFileUploader.oBrowse ? this._oFileUploader : null;
|
|
853
|
-
if (buttonRef) {
|
|
854
|
-
if (bInvisible) {
|
|
855
|
-
buttonRef.addStyleClass("sapMUSTFileUploaderVisibility");
|
|
856
|
-
} else {
|
|
857
|
-
buttonRef.removeStyleClass("sapMUSTFileUploaderVisibility");
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
};
|
|
862
|
-
|
|
863
|
-
UploadSetTable.prototype._setDragDropConfig = function () {
|
|
901
|
+
UploadSetwithTable.prototype._setDragDropConfig = function () {
|
|
864
902
|
var oDragDropConfig = new DragDropInfo({
|
|
865
903
|
sourceAggregation: "items",
|
|
866
904
|
targetAggregation: "items",
|
|
@@ -868,7 +906,6 @@ sap.ui.define([
|
|
|
868
906
|
drop: [this._onDropItem, this]
|
|
869
907
|
});
|
|
870
908
|
var oDropConfig = new DropInfo({
|
|
871
|
-
targetAggregation: "",
|
|
872
909
|
dropEffect:"Move",
|
|
873
910
|
dropPosition:"OnOrBetween",
|
|
874
911
|
dragEnter: [this._onDragEnterFile, this],
|
|
@@ -878,66 +915,297 @@ sap.ui.define([
|
|
|
878
915
|
this.addDragDropConfig(oDropConfig);
|
|
879
916
|
};
|
|
880
917
|
|
|
881
|
-
|
|
918
|
+
UploadSetwithTable.prototype._onDragStartItem = function (oEvent) {
|
|
882
919
|
this.fireItemDragStart(oEvent);
|
|
883
920
|
};
|
|
884
921
|
|
|
885
|
-
|
|
922
|
+
UploadSetwithTable.prototype._onDropItem = function (oEvent) {
|
|
886
923
|
this.fireItemDrop(oEvent);
|
|
887
924
|
};
|
|
888
925
|
|
|
889
|
-
|
|
926
|
+
UploadSetwithTable.prototype._onDragEnterFile = function (oEvent) {
|
|
890
927
|
var oDragSession = oEvent.getParameter("dragSession");
|
|
891
928
|
var oDraggedControl = oDragSession.getDragControl();
|
|
892
|
-
this._oDragIndicator = true;
|
|
893
929
|
if (oDraggedControl) {
|
|
894
930
|
oEvent.preventDefault();
|
|
895
931
|
}
|
|
896
932
|
};
|
|
897
933
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
934
|
+
/**
|
|
935
|
+
* Drag and drop of files implmentation subject to change depending on the thr UX feedback for folder upload scenarios and warning message display scenarios
|
|
936
|
+
* @param {sap.ui.base.Event} oEvent Drop Event when file is dropped on the Table.
|
|
937
|
+
* @private
|
|
938
|
+
*/
|
|
939
|
+
UploadSetwithTable.prototype._onDropFile = function (oEvent) {
|
|
901
940
|
oEvent.preventDefault();
|
|
902
|
-
if (this.getUploadEnabled()) {
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
Log.warning("Multiple files upload is retsricted for this multiple property set");
|
|
909
|
-
return;
|
|
910
|
-
}
|
|
941
|
+
if (!this.getUploadEnabled()) {
|
|
942
|
+
Log.error("Upload is not enabled, to continue uploading with drag and drop of files enable property 'UploadEnabled' ");
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
let oItems = oEvent.getParameter("browserEvent").dataTransfer.items;
|
|
946
|
+
oItems = Array.from(oItems);
|
|
911
947
|
|
|
948
|
+
// Filtering out only webkitentries (files/folders system entries) by excluding non file / directory types.
|
|
949
|
+
oItems = oItems.filter(function(item){
|
|
950
|
+
return item.webkitGetAsEntry() ? true : false;
|
|
951
|
+
});
|
|
952
|
+
const aEntryTypes = oItems.map(function (oEntry) {
|
|
953
|
+
const oWebKitEntry = oEntry.webkitGetAsEntry();
|
|
954
|
+
return {
|
|
955
|
+
entryType: oWebKitEntry && oWebKitEntry.isFile ? 'File' : 'Directory'
|
|
956
|
+
};
|
|
957
|
+
});
|
|
958
|
+
// handlding multiple property drag & drop scenarios
|
|
959
|
+
if (oItems && oItems.length > 1 && !this.getMultiple() && !this.getDirectory()) {
|
|
960
|
+
// Handling drag and drop of multiple files to upload with multiple property set
|
|
961
|
+
const sMessage = this._oRb.getText("UPLOADSET_WITH_TABLE_MULTIPLE_RESTRICTED");
|
|
962
|
+
Log.warning("Multiple files upload is retsricted for this multiple property set");
|
|
963
|
+
MessageBox.error(sMessage);
|
|
964
|
+
return;
|
|
965
|
+
} else if (oItems && oItems.length > 1 && this.getMultiple() && !isFileOrFolderEntry('File', aEntryTypes)) {
|
|
966
|
+
const sMessageDropFilesOnly = this._oRb.getText("UPLOADSET_WITH_TABLE_DIRECTORY_RESTRICTED");
|
|
967
|
+
Log.warning("Multiple files upload is retsricted, drag & drop only files");
|
|
968
|
+
MessageBox.error(sMessageDropFilesOnly);
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
912
971
|
|
|
913
|
-
|
|
914
|
-
|
|
972
|
+
// handling directory property drag & drop scenarios
|
|
973
|
+
if (oItems && oItems.length && !this.getDirectory() && isFileOrFolderEntry('Directory', aEntryTypes)) {
|
|
974
|
+
const sMessageDirectory = this._oRb.getText("UPLOADSET_WITH_TABLE_DIRECTORY_RESTRICTED");
|
|
975
|
+
Log.warning("Directory of files upload is retsricted for this directory property set");
|
|
976
|
+
MessageBox.error(sMessageDirectory);
|
|
977
|
+
return;
|
|
978
|
+
} else if (oItems && oItems.length && this.getDirectory() && !isFileOrFolderEntry('Directory', aEntryTypes)) {
|
|
979
|
+
const sMessageDragDropDirectory = this._oRb.getText("UPLOADSET_WITH_TABLE_DROP_DIRECTORY_ALLOWED");
|
|
980
|
+
Log.warning("Directory of files upload is retsricted, drag & drop only directories here.");
|
|
981
|
+
MessageBox.error(sMessageDragDropDirectory);
|
|
982
|
+
return;
|
|
983
|
+
}
|
|
984
|
+
if (oItems && oItems.length) {
|
|
985
|
+
this._getFilesFromDataTransferItems(oItems).then( (oFiles) => {
|
|
986
|
+
if (oFiles && oFiles.length) {
|
|
987
|
+
this._processSelectedFileObjects(oFiles);
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
function isFileOrFolderEntry(sType, aEntries) {
|
|
993
|
+
return aEntries.every(function (oEntry) {
|
|
994
|
+
return oEntry.entryType === sType;
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
/**
|
|
999
|
+
* Method to extract files from dataTransfer items contianing files / directory of files.
|
|
1000
|
+
* @param {Object} dataTransferItems, DataTransfer items extracted from browserEvent for drop.
|
|
1001
|
+
* @returns {Promise} oPromise, Promise on resolved returns list of files dropped for upload.
|
|
1002
|
+
* @private
|
|
1003
|
+
*/
|
|
1004
|
+
UploadSetwithTable.prototype._getFilesFromDataTransferItems = function (dataTransferItems) {
|
|
1005
|
+
const aFiles = [];
|
|
1006
|
+
return new Promise((resolve, reject) => {
|
|
1007
|
+
const aEntriesPromises = [];
|
|
1008
|
+
for (let i = 0; i < dataTransferItems.length; i++) {
|
|
1009
|
+
aEntriesPromises.push(traverseFileTreePromise(dataTransferItems[i]?.webkitGetAsEntry()));
|
|
915
1010
|
}
|
|
1011
|
+
Promise.all(aEntriesPromises)
|
|
1012
|
+
.then( (entries) => {
|
|
1013
|
+
resolve(aFiles);
|
|
1014
|
+
}, (err) => {
|
|
1015
|
+
reject(err);
|
|
1016
|
+
});
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
function traverseFileTreePromise(item) {
|
|
1020
|
+
return new Promise((resolve, reject) => {
|
|
1021
|
+
if (item.isFile) {
|
|
1022
|
+
item.file((oFile) => {
|
|
1023
|
+
aFiles.push(oFile);
|
|
1024
|
+
resolve(oFile);
|
|
1025
|
+
}, (err) => {
|
|
1026
|
+
reject(err);
|
|
1027
|
+
});
|
|
1028
|
+
} else if (item.isDirectory) {
|
|
1029
|
+
const dirReader = item.createReader();
|
|
1030
|
+
dirReader.readEntries(function (entries) {
|
|
1031
|
+
const aEntriesPromises = [];
|
|
1032
|
+
for (let i = 0; i < entries.length; i++) {
|
|
1033
|
+
aEntriesPromises.push(traverseFileTreePromise(entries[i]));
|
|
1034
|
+
}
|
|
1035
|
+
resolve(Promise.all(aEntriesPromises));
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
916
1039
|
}
|
|
917
1040
|
};
|
|
918
1041
|
|
|
919
1042
|
/**
|
|
920
1043
|
* Opens preview of the item pressed.
|
|
921
|
-
* @param {sap.m.upload.
|
|
1044
|
+
* @param {sap.m.upload.UploadSetwithTableItem} oItem item to be previewed.
|
|
1045
|
+
* @private
|
|
1046
|
+
*/
|
|
1047
|
+
UploadSetwithTable.prototype._openFilePreview = function (oItem) {
|
|
1048
|
+
if (!this.getPreviewDialog()) {
|
|
1049
|
+
const oAssociatedPreviewDialog = new FilePreviewDialog();
|
|
1050
|
+
this.setPreviewDialog(oAssociatedPreviewDialog);
|
|
1051
|
+
}
|
|
1052
|
+
this._filePreviewDialogControl = Core.byId(this.getPreviewDialog());
|
|
1053
|
+
// var aitems = this.getAdditionalFooterButtons();
|
|
1054
|
+
if (this._filePreviewDialogControl) {
|
|
1055
|
+
this._filePreviewDialogControl._previewItem = oItem;
|
|
1056
|
+
this._filePreviewDialogControl._items = this.getItems();
|
|
1057
|
+
this._filePreviewDialogControl._open();
|
|
1058
|
+
}
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Internal API return the dialog for document rename.
|
|
1063
|
+
* @param {sap.m.upload.UploadSetwithTableItem} oItem item to be renamed.
|
|
922
1064
|
* @private
|
|
1065
|
+
* @returns {sap.m.Dialog} oDialog, created dialog instance
|
|
923
1066
|
*/
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1067
|
+
UploadSetwithTable.prototype._getFileRenameDialog = function(oItem) {
|
|
1068
|
+
const oSplit = UploadSetwithTableItem._splitFileName(oItem.getFileName());
|
|
1069
|
+
let iMaxLength = this.getMaxFileNameLength();
|
|
1070
|
+
const iFileExtensionLength = oSplit.extension ? oSplit.extension.length + 1 : 0;
|
|
1071
|
+
iMaxLength = iMaxLength ? iMaxLength : 0;
|
|
1072
|
+
let iNameMaxLength = iMaxLength - iFileExtensionLength;
|
|
1073
|
+
iNameMaxLength = iNameMaxLength < 0 ? 0 : iNameMaxLength;
|
|
1074
|
+
|
|
1075
|
+
// Input field
|
|
1076
|
+
const oInput = new Input({
|
|
1077
|
+
type: Library.InputType.Text,
|
|
1078
|
+
value: oSplit.name,
|
|
1079
|
+
width: "90%",
|
|
1080
|
+
maxLength: iNameMaxLength,
|
|
1081
|
+
liveChange: [this._handleItemNameValidation, this]
|
|
1082
|
+
});
|
|
1083
|
+
oInput.addStyleClass("sapUiTinyMarginTop");
|
|
1084
|
+
oInput.addStyleClass("sapUiSmallMarginBegin");
|
|
1085
|
+
// Label for Input
|
|
1086
|
+
const oLabel = new Label({
|
|
1087
|
+
text: this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_INPUT_LABEL"),
|
|
1088
|
+
labelFor: oInput.getId()
|
|
1089
|
+
});
|
|
1090
|
+
oLabel.addStyleClass("sapUiSmallMarginTop");
|
|
1091
|
+
oLabel.addStyleClass("sapUiSmallMarginBegin");
|
|
1092
|
+
oLabel.addStyleClass("sapUiSmallMarginEnd");
|
|
1093
|
+
// Dialog creation
|
|
1094
|
+
var oDialog = new Dialog({
|
|
1095
|
+
title: this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_DIALOG_TEXT"),
|
|
1096
|
+
contentWidth: "22.5rem",
|
|
1097
|
+
contentHeight: "12rem",
|
|
1098
|
+
content: [oLabel,oInput],
|
|
1099
|
+
beginButton: new Button({
|
|
1100
|
+
type: Library.ButtonType.Emphasized,
|
|
1101
|
+
text: this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_APPLY_BUTTON_TEXT"),
|
|
1102
|
+
press: this._handleItemRenameConfirmation.bind(this),
|
|
1103
|
+
enabled: oInput.getValueState() !== "Error"
|
|
1104
|
+
}),
|
|
1105
|
+
endButton: new Button({
|
|
1106
|
+
text: this._oRb.getText("UPLOADSET_WITH_TABLE_CANCELBUTTON_TEXT"),
|
|
1107
|
+
press: this._handleItemRenameCancel.bind(this)
|
|
1108
|
+
}),
|
|
1109
|
+
customData: {
|
|
1110
|
+
key: "item",
|
|
1111
|
+
value: oItem
|
|
1112
|
+
},
|
|
1113
|
+
afterClose: function () {
|
|
1114
|
+
oDialog.destroy();
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
|
|
1118
|
+
return oDialog;
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Handler for item rename cancel operation.
|
|
1123
|
+
* @param {object} oEvent cancel button click event.
|
|
1124
|
+
* @private
|
|
1125
|
+
*/
|
|
1126
|
+
UploadSetwithTable.prototype._handleItemRenameCancel = function(oEvent) {
|
|
1127
|
+
const oDialog = oEvent.getSource().getParent();
|
|
1128
|
+
const oInput = oDialog.getContent()[1];
|
|
1129
|
+
const oItem = oDialog && oDialog.data ? oDialog.data().item : null;
|
|
1130
|
+
const oSplit = UploadSetwithTableItem._splitFileName(oItem.getFileName());
|
|
1131
|
+
// Check if there are changes made to the existing file name.
|
|
1132
|
+
if (oItem && oInput && oSplit.name !== oInput.getValue()) {
|
|
1133
|
+
MessageBox.warning(this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_DISCARD_POPUP_CHANGES_TEXT"), {
|
|
1134
|
+
actions: [this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_SAVE_BUTTON_TEXT"), this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_DISCARD_CHANGES_BUTTON_TEXT")],
|
|
1135
|
+
emphasizedAction: this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_SAVE_BUTTON_TEXT"),
|
|
1136
|
+
onClose: (sAction) => {
|
|
1137
|
+
if (sAction !== this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_SAVE_BUTTON_TEXT")) {
|
|
1138
|
+
oDialog.close();
|
|
1139
|
+
} else {
|
|
1140
|
+
// fire beginbutton event to save the filename
|
|
1141
|
+
var oBeginButton = oDialog.getBeginButton();
|
|
1142
|
+
var oEvent = new EventBase("click", oBeginButton);
|
|
1143
|
+
oBeginButton.firePress(oEvent);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
931
1146
|
});
|
|
932
|
-
this.addDependent(this._filePreviewDialogControl);
|
|
933
|
-
this._filePreviewDialogControl.open();
|
|
934
1147
|
} else {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1148
|
+
oDialog.close();
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Handler for item rename confirm operation.
|
|
1154
|
+
* @param {object} oEvent confirm button click event.
|
|
1155
|
+
* @private
|
|
1156
|
+
*/
|
|
1157
|
+
UploadSetwithTable.prototype._handleItemRenameConfirmation = function(oEvent) {
|
|
1158
|
+
const oDialog = oEvent.getSource().getParent();
|
|
1159
|
+
const oInput = oDialog.getContent()[1];
|
|
1160
|
+
if (oInput && oInput.getValueState() === "Error") {
|
|
1161
|
+
oInput.focus(oInput);
|
|
1162
|
+
oInput.setShowValueStateMessage(true);
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1165
|
+
const oItem = oDialog && oDialog.data ? oDialog.data().item : null;
|
|
1166
|
+
const oSplit = UploadSetwithTableItem._splitFileName(oItem.getFileName());
|
|
1167
|
+
// update only if there is change
|
|
1168
|
+
if (oItem && oSplit.name !== oInput.getValue()) {
|
|
1169
|
+
if (oSplit && oSplit.extension) {
|
|
1170
|
+
oItem.setFileName(oInput.getValue() + "." + oSplit.extension);
|
|
1171
|
+
} else {
|
|
1172
|
+
oItem.setFileName(oInput.getValue());
|
|
1173
|
+
}
|
|
1174
|
+
oDialog.close();
|
|
1175
|
+
this.fireItemRenamed({item: oItem});
|
|
1176
|
+
} else {
|
|
1177
|
+
oDialog.close();
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* Handler for file name validation.
|
|
1183
|
+
* @param {object} oEvent Input keyevent.
|
|
1184
|
+
* @private
|
|
1185
|
+
*/
|
|
1186
|
+
UploadSetwithTable.prototype._handleItemNameValidation = function(oEvent) {
|
|
1187
|
+
const oInput = oEvent.getSource();
|
|
1188
|
+
let sValue = oInput.getValue();
|
|
1189
|
+
sValue = sValue.trim();
|
|
1190
|
+
|
|
1191
|
+
// empty file validation
|
|
1192
|
+
if (sValue === "") {
|
|
1193
|
+
oInput.setProperty("valueState", "Error", true);
|
|
1194
|
+
oInput.setValueStateText(this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_EMPTY_NAME_VALIDATION_ERROR_MESSAGE"));
|
|
1195
|
+
oInput.setShowValueStateMessage(true);
|
|
1196
|
+
return;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
const oCharacterRegex = new RegExp(/[@#$]/);
|
|
1200
|
+
if (oCharacterRegex.test(sValue)) {
|
|
1201
|
+
oInput.setShowValueStateMessage(true);
|
|
1202
|
+
oInput.setProperty("valueState", "Error", true);
|
|
1203
|
+
oInput.setValueStateText(this._oRb.getText("UPLOADSET_WITH_TABLE_DOCUMENT_RENAME_SPLC_VALIDATION_ERROR_MESSAGE", '@#$'));
|
|
1204
|
+
} else {
|
|
1205
|
+
oInput.setShowValueStateMessage(false);
|
|
1206
|
+
oInput.setProperty("valueState", "None", true);
|
|
939
1207
|
}
|
|
940
1208
|
};
|
|
941
1209
|
|
|
942
|
-
return
|
|
1210
|
+
return UploadSetwithTable;
|
|
943
1211
|
});
|