@openui5/sap.m 1.119.1 → 1.120.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/THIRDPARTY.txt +6 -6
- package/package.json +4 -4
- package/src/sap/m/.library +8 -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 +10 -6
- package/src/sap/m/AvatarRenderer.js +10 -3
- 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 +7 -8
- 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 +20 -3
- 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 +22 -12
- package/src/sap/m/DateTimeField.js +1 -1
- package/src/sap/m/DateTimeInput.js +1 -1
- package/src/sap/m/DateTimePicker.js +1 -1
- 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 +10 -2
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
- package/src/sap/m/ExpandableText.js +1 -1
- package/src/sap/m/FacetFilter.js +2 -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 +5 -4
- package/src/sap/m/FeedInputRenderer.js +3 -3
- package/src/sap/m/FeedListItem.js +6 -4
- 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 +58 -23
- package/src/sap/m/GenericTileRenderer.js +11 -0
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GrowingEnablement.js +2 -3
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +6 -4
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +1 -1
- package/src/sap/m/IconTabBarSelectList.js +1 -1
- package/src/sap/m/IconTabFilter.js +1 -1
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +1 -1
- package/src/sap/m/IconTabHeader.js +1 -1
- package/src/sap/m/IconTabSeparator.js +1 -1
- package/src/sap/m/IllustratedMessage.js +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 +79 -14
- package/src/sap/m/InputBase.js +3 -1
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/InputRenderer.js +7 -3
- 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 +143 -0
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +32 -14
- package/src/sap/m/ListItemBase.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 +1 -1
- package/src/sap/m/MenuButton.js +3 -3
- package/src/sap/m/MenuItem.js +1 -1
- 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 +2 -3
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +1 -1
- package/src/sap/m/MessageToast.js +5 -19
- package/src/sap/m/MessageView.js +1 -1
- package/src/sap/m/MessageViewRenderer.js +2 -3
- package/src/sap/m/MultiComboBox.js +1 -1
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +4 -2
- package/src/sap/m/NavContainer.js +4 -3
- 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 +9 -10
- package/src/sap/m/NumericContentRenderer.js +5 -4
- 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 +4 -6
- package/src/sap/m/ObjectStatusRenderer.js +3 -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/OverflowToolbarRenderer.js +8 -1
- package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/P13nAnyFilterItem.js +1 -1
- package/src/sap/m/P13nColumnsItem.js +2 -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 +2 -1
- package/src/sap/m/P13nDimMeasurePanel.js +2 -1
- package/src/sap/m/P13nFilterItem.js +1 -1
- package/src/sap/m/P13nFilterPanel.js +1 -1
- package/src/sap/m/P13nGroupItem.js +2 -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 +2 -1
- package/src/sap/m/P13nSortPanel.js +1 -1
- package/src/sap/m/PDFViewer.js +20 -8
- package/src/sap/m/PDFViewerRenderManager.js +18 -18
- package/src/sap/m/PDFViewerRenderer.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 +37 -12
- 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 +5 -4
- 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 +3 -3
- package/src/sap/m/RadioButtonGroup.js +1 -1
- package/src/sap/m/RangeSlider.js +1 -1
- package/src/sap/m/RangeSliderRenderer.js +15 -8
- package/src/sap/m/RatingIndicator.js +4 -3
- package/src/sap/m/ResponsivePopover.js +13 -7
- 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 +5 -7
- 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 +2 -2
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +3 -2
- 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 +7 -9
- 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 +4 -2
- 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 +5 -5
- package/src/sap/m/Switch.js +1 -1
- package/src/sap/m/TabContainer.js +10 -4
- package/src/sap/m/TabContainerItem.js +1 -1
- package/src/sap/m/TabStrip.js +2 -2
- package/src/sap/m/TabStripItem.js +1 -1
- package/src/sap/m/Table.js +35 -4
- 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 +5 -7
- 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 +4 -4
- 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 +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 -1
- package/src/sap/m/Toolbar.js +1 -1
- package/src/sap/m/ToolbarLayoutData.js +1 -1
- package/src/sap/m/ToolbarRenderer.js +8 -0
- package/src/sap/m/ToolbarSeparator.js +1 -1
- package/src/sap/m/ToolbarSpacer.js +1 -1
- package/src/sap/m/Tree.js +17 -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 +9 -4
- package/src/sap/m/VariantItem.js +99 -27
- package/src/sap/m/VariantManagement.js +196 -90
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +44 -44
- 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 +6 -6
- 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 +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/IconTabFilter.designtime.js +1 -1
- package/src/sap/m/designtime/VariantManagement.designtime.js +0 -6
- package/src/sap/m/designtime/messagebundle_mk.properties +182 -0
- package/src/sap/m/designtime/messagebundle_sh.properties +3 -3
- package/src/sap/m/flexibility/EngineFlex.js +5 -0
- package/src/sap/m/inputUtils/highlightItemsWithContains.js +82 -0
- package/src/sap/m/library.js +76 -136
- package/src/sap/m/messagebundle.properties +37 -6
- package/src/sap/m/messagebundle_ar.properties +46 -2
- package/src/sap/m/messagebundle_bg.properties +49 -5
- package/src/sap/m/messagebundle_ca.properties +47 -3
- package/src/sap/m/messagebundle_cs.properties +46 -2
- package/src/sap/m/messagebundle_cy.properties +46 -2
- package/src/sap/m/messagebundle_da.properties +46 -2
- package/src/sap/m/messagebundle_de.properties +46 -2
- package/src/sap/m/messagebundle_el.properties +48 -4
- package/src/sap/m/messagebundle_en.properties +23 -6
- package/src/sap/m/messagebundle_en_GB.properties +46 -2
- package/src/sap/m/messagebundle_es.properties +46 -2
- package/src/sap/m/messagebundle_es_MX.properties +46 -2
- package/src/sap/m/messagebundle_et.properties +44 -0
- package/src/sap/m/messagebundle_fi.properties +46 -2
- package/src/sap/m/messagebundle_fr.properties +46 -2
- package/src/sap/m/messagebundle_fr_CA.properties +46 -2
- package/src/sap/m/messagebundle_hi.properties +48 -4
- package/src/sap/m/messagebundle_hr.properties +46 -2
- package/src/sap/m/messagebundle_hu.properties +51 -7
- package/src/sap/m/messagebundle_id.properties +48 -4
- package/src/sap/m/messagebundle_it.properties +44 -0
- package/src/sap/m/messagebundle_iw.properties +46 -2
- package/src/sap/m/messagebundle_ja.properties +44 -0
- package/src/sap/m/messagebundle_kk.properties +60 -16
- package/src/sap/m/messagebundle_ko.properties +44 -0
- package/src/sap/m/messagebundle_lt.properties +46 -2
- package/src/sap/m/messagebundle_lv.properties +57 -13
- package/src/sap/m/messagebundle_mk.properties +1869 -0
- package/src/sap/m/messagebundle_ms.properties +46 -2
- package/src/sap/m/messagebundle_nl.properties +44 -0
- package/src/sap/m/messagebundle_no.properties +47 -3
- package/src/sap/m/messagebundle_pl.properties +46 -2
- package/src/sap/m/messagebundle_pt.properties +44 -0
- package/src/sap/m/messagebundle_pt_PT.properties +44 -0
- package/src/sap/m/messagebundle_ro.properties +46 -2
- package/src/sap/m/messagebundle_ru.properties +48 -4
- package/src/sap/m/messagebundle_sh.properties +149 -105
- package/src/sap/m/messagebundle_sk.properties +46 -2
- package/src/sap/m/messagebundle_sl.properties +62 -18
- package/src/sap/m/messagebundle_sv.properties +50 -6
- package/src/sap/m/messagebundle_th.properties +44 -0
- package/src/sap/m/messagebundle_tr.properties +49 -5
- package/src/sap/m/messagebundle_uk.properties +59 -15
- package/src/sap/m/messagebundle_vi.properties +46 -2
- package/src/sap/m/messagebundle_zh_CN.properties +44 -0
- package/src/sap/m/messagebundle_zh_TW.properties +46 -2
- 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 +13 -3
- package/src/sap/m/p13n/Container.js +1 -1
- package/src/sap/m/p13n/Engine.js +1 -1
- package/src/sap/m/p13n/FlexUtil.js +0 -41
- 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 +16 -1
- package/src/sap/m/p13n/QueryPanel.js +1 -1
- package/src/sap/m/p13n/SelectionController.js +457 -423
- 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 +4 -3
- package/src/sap/m/p13n/handler/xConfigHandler.js +18 -5
- 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/p13n/modules/xConfigAPI.js +1 -1
- package/src/sap/m/plugins/CellSelector.js +172 -153
- package/src/sap/m/plugins/ColumnResizer.js +9 -2
- package/src/sap/m/plugins/CopyProvider.js +21 -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/routing/Target.js +3 -3
- package/src/sap/m/routing/Targets.js +3 -3
- package/src/sap/m/semantic/AddAction.js +1 -1
- package/src/sap/m/semantic/CancelAction.js +1 -1
- package/src/sap/m/semantic/DeleteAction.js +1 -1
- package/src/sap/m/semantic/DetailPage.js +1 -1
- package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/m/semantic/EditAction.js +1 -1
- package/src/sap/m/semantic/FavoriteAction.js +1 -1
- package/src/sap/m/semantic/FilterAction.js +1 -1
- package/src/sap/m/semantic/FilterSelect.js +1 -1
- package/src/sap/m/semantic/FlagAction.js +1 -1
- package/src/sap/m/semantic/ForwardAction.js +1 -1
- package/src/sap/m/semantic/FullscreenPage.js +1 -1
- package/src/sap/m/semantic/GroupAction.js +1 -1
- package/src/sap/m/semantic/GroupSelect.js +1 -1
- package/src/sap/m/semantic/MainAction.js +1 -1
- package/src/sap/m/semantic/MasterPage.js +1 -1
- package/src/sap/m/semantic/MessagesIndicator.js +1 -1
- package/src/sap/m/semantic/MultiSelectAction.js +1 -1
- package/src/sap/m/semantic/NegativeAction.js +1 -1
- package/src/sap/m/semantic/OpenInAction.js +1 -1
- package/src/sap/m/semantic/PositiveAction.js +1 -1
- package/src/sap/m/semantic/PrintAction.js +1 -1
- package/src/sap/m/semantic/SaveAction.js +1 -1
- package/src/sap/m/semantic/Segment.js +1 -1
- package/src/sap/m/semantic/SegmentedContainer.js +1 -1
- package/src/sap/m/semantic/SemanticButton.js +1 -1
- package/src/sap/m/semantic/SemanticConfiguration.js +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 +177 -0
- 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 +17 -13
- 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 +5 -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 +2 -2
- package/src/sap/m/table/columnmenu/QuickTotal.js +5 -1
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
- package/src/sap/m/themes/base/Avatar.less +0 -1
- package/src/sap/m/themes/base/BarBase.less +1 -1
- package/src/sap/m/themes/base/BusyIndicator.less +0 -10
- package/src/sap/m/themes/base/ExpandableText.less +6 -0
- package/src/sap/m/themes/base/GenericTile.less +36 -0
- package/src/sap/m/themes/base/LinkTileContent.less +17 -0
- package/src/sap/m/themes/base/MenuButton.less +1 -1
- package/src/sap/m/themes/base/NotificationListBase.less +3 -3
- package/src/sap/m/themes/base/ObjectStatus.less +241 -1
- package/src/sap/m/themes/base/RadioButton.less +1 -1
- package/src/sap/m/themes/base/SearchField.less +2 -1
- package/src/sap/m/themes/base/SplitButton.less +0 -1
- package/src/sap/m/themes/base/Text.less +4 -1
- package/src/sap/m/themes/base/Toolbar.less +7 -14
- package/src/sap/m/themes/base/ValueStateHeader.less +4 -0
- package/src/sap/m/themes/base/library.source.less +1 -0
- package/src/sap/m/upload/ActionsPlaceholder.js +49 -0
- package/src/sap/m/upload/Column.js +58 -0
- package/src/sap/m/upload/FilePreviewDialog.js +22 -3
- package/src/sap/m/upload/FilterPanel.js +280 -0
- package/src/sap/m/upload/UploadSet.js +11 -6
- package/src/sap/m/upload/UploadSetItem.js +6 -5
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
- package/src/sap/m/upload/UploadSetwithTable.js +487 -93
- package/src/sap/m/upload/UploadSetwithTableItem.js +26 -11
- package/src/sap/m/upload/Uploader.js +3 -0
- package/src/sap/m/upload/UploaderTableItem.js +4 -1
- package/src/sap/m/upload/p13n/PersManager.js +251 -0
- package/src/sap/m/upload/p13n/flexibility/UploadSetwithTable.flexibility.js +32 -0
- package/src/sap/m/upload/p13n/handlers/BaseConfigHandler.js +44 -0
- package/src/sap/m/upload/p13n/handlers/ChangeHandler.js +98 -0
- package/src/sap/m/upload/p13n/handlers/ColumnConfigHandler.js +57 -0
- package/src/sap/m/upload/p13n/handlers/ColumnsStateChangeHandler.js +43 -0
- package/src/sap/m/upload/p13n/handlers/FilterConfigHandler.js +71 -0
- package/src/sap/m/upload/p13n/handlers/FilterStateChangeHandler.js +65 -0
- package/src/sap/m/upload/p13n/handlers/GroupConfigHandler.js +57 -0
- package/src/sap/m/upload/p13n/handlers/GroupStateChangeHandler.js +46 -0
- package/src/sap/m/upload/p13n/handlers/SortConfigHandler.js +57 -0
- package/src/sap/m/upload/p13n/handlers/SortStateChangeHandler.js +48 -0
- package/src/sap/m/upload/p13n/mediator/BaseMediator.js +183 -0
- package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +210 -0
- package/src/sap/m/upload/p13n/mediator/FilterMediator.js +196 -0
- package/src/sap/m/upload/p13n/mediator/GroupMediator.js +192 -0
- package/src/sap/m/upload/p13n/mediator/SortMediator.js +200 -0
- package/src/sap/m/upload/p13n/modules/CustomDataConfig.js +100 -0
- package/src/sap/m/upload/p13n/modules/PersPopupManager.js +76 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define(
|
|
8
|
+
[
|
|
9
|
+
"sap/m/upload/p13n/mediator/BaseMediator",
|
|
10
|
+
"sap/m/upload/FilterPanel",
|
|
11
|
+
"sap/m/upload/p13n/modules/CustomDataConfig",
|
|
12
|
+
"sap/base/util/deepEqual",
|
|
13
|
+
"sap/ui/model/Filter",
|
|
14
|
+
"sap/ui/model/FilterType"
|
|
15
|
+
],
|
|
16
|
+
function (BaseMediator, FilterPanel, CustomDataConfig, deepEqual, Filter, FilterType) {
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for a new <code>FilterMediator</code>.
|
|
21
|
+
*
|
|
22
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
23
|
+
* @param {sap.ui.core.Control} mSettings.control The control instance that is personalized by this mediator
|
|
24
|
+
* @param {string} mSettings.targetAggregation The name of the aggregation that is now managed by this mediator
|
|
25
|
+
* @param {string} mSettings.p13nMetadataTarget The name of the personalization metadata target that is now managed by this mediator
|
|
26
|
+
*
|
|
27
|
+
* @class
|
|
28
|
+
* The <code>FilterMediator</code> entity serves as a class which handles filter panel related logic.
|
|
29
|
+
*
|
|
30
|
+
* @extends sap.m.upload.p13n.mediator.BaseMediator
|
|
31
|
+
*
|
|
32
|
+
* @author SAP SE
|
|
33
|
+
* @version 1.120.0
|
|
34
|
+
* @private
|
|
35
|
+
* @experimental
|
|
36
|
+
* @internal
|
|
37
|
+
* @alias sap.m.upload.p13n.mediator.FilterMediator
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
const FilterMediator = BaseMediator.extend("sap.m.upload.p13n.mediator.FilterMediator", {
|
|
41
|
+
constructor: function (mSettings) {
|
|
42
|
+
BaseMediator.call(this, mSettings);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
FilterMediator.prototype.createPanel = function () {
|
|
47
|
+
return Promise.resolve(this.createUi(this.getPanelData()));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
FilterMediator.prototype.createUi = function (aPanelData) {
|
|
51
|
+
const oMetadata = this.getControl()._getP13nMetadata();
|
|
52
|
+
this._oPanel = new FilterPanel({ fields: oMetadata[this.getP13nMetadataTarget()] });
|
|
53
|
+
this._oPanel.setP13nData(aPanelData);
|
|
54
|
+
return this._oPanel;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
FilterMediator.prototype.getPanelData = function () {
|
|
58
|
+
const aCurrentState = this.getCurrentState(),
|
|
59
|
+
aPanelState = [],
|
|
60
|
+
mMetadata = this.getControl()
|
|
61
|
+
._getP13nMetadata()
|
|
62
|
+
[this.getP13nMetadataTarget()].reduce((mMap, oProp) => {
|
|
63
|
+
mMap[oProp.path] = oProp;
|
|
64
|
+
return mMap;
|
|
65
|
+
}, {});
|
|
66
|
+
|
|
67
|
+
aCurrentState.forEach((oEntry) => {
|
|
68
|
+
if (!mMetadata[oEntry.path]) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
aPanelState.push({
|
|
72
|
+
name: oEntry.key,
|
|
73
|
+
path: oEntry.path,
|
|
74
|
+
operator: oEntry.operator,
|
|
75
|
+
value: oEntry.value
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
return aPanelState;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
FilterMediator.prototype.getCurrentState = function () {
|
|
83
|
+
const oCustomConfig = CustomDataConfig.read(this.getControl()) || {};
|
|
84
|
+
const oFilterConditions =
|
|
85
|
+
oCustomConfig.hasOwnProperty("properties") && oCustomConfig.properties[this.getTargetAggregation()]
|
|
86
|
+
? oCustomConfig.properties[this.getTargetAggregation()]
|
|
87
|
+
: {};
|
|
88
|
+
|
|
89
|
+
const aState = Object.values(oFilterConditions)
|
|
90
|
+
// .filter((oItem) => oItem.sorted)
|
|
91
|
+
.sort((oItem1, oItem2) => {
|
|
92
|
+
return oItem1.index - oItem2.index;
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return aState.map((oItem) => ({ key: oItem.key, path: oItem.path, operator: oItem.operator, value: oItem.value }));
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
FilterMediator.prototype.getChanges = function () {
|
|
99
|
+
const aChanges = [],
|
|
100
|
+
aCurrentState = this.getCurrentState(),
|
|
101
|
+
aP13nData = this._getP13nData(),
|
|
102
|
+
aNextState = aP13nData
|
|
103
|
+
// .filter((oEntry) => !!oEntry.sorted)
|
|
104
|
+
.map((oEntry) => ({ key: oEntry.name, path: oEntry.path, operator: oEntry.operator, value: oEntry.value }));
|
|
105
|
+
|
|
106
|
+
if (deepEqual(aCurrentState, aNextState)) {
|
|
107
|
+
return aChanges;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const aDeleted = this._getDeletes(aCurrentState, aNextState),
|
|
111
|
+
aInserted = this._getInserts(aCurrentState, aNextState),
|
|
112
|
+
aMoved = this._getMove(aCurrentState, aNextState, aDeleted, aInserted);
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
aChanges.push(
|
|
116
|
+
this.createChange("uploadSetTableFilterStateChange", { deleted: aDeleted, moved: aMoved, inserted: aInserted })
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
return aChanges;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
FilterMediator.prototype._getP13nData = function () {
|
|
123
|
+
return this._oPanel ? this._oPanel.getP13nData() : {};
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
FilterMediator.prototype._getDeletes = function (aCurrentState, aNextState) {
|
|
127
|
+
const aResult = [],
|
|
128
|
+
mNextState = this.arrayToMap(aNextState);
|
|
129
|
+
|
|
130
|
+
aCurrentState.forEach((oState, iIndex) => {
|
|
131
|
+
if (!mNextState[oState.key]) {
|
|
132
|
+
aResult.push({
|
|
133
|
+
key: oState.key,
|
|
134
|
+
prevIndex: iIndex,
|
|
135
|
+
prevPath: oState.path,
|
|
136
|
+
prevOperator: oState.operator,
|
|
137
|
+
prevValue: oState.value
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
return aResult;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
FilterMediator.prototype._getInserts = function (aCurrentState, aNextState) {
|
|
145
|
+
const aResult = [],
|
|
146
|
+
mCurrentState = this.arrayToMap(aCurrentState);
|
|
147
|
+
|
|
148
|
+
aNextState.forEach((oState, iIndex) => {
|
|
149
|
+
if (!mCurrentState[oState.key]) {
|
|
150
|
+
aResult.push({
|
|
151
|
+
key: oState.key,
|
|
152
|
+
index: iIndex,
|
|
153
|
+
path: oState.path,
|
|
154
|
+
operator: oState.operator,
|
|
155
|
+
value: oState.value
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
return aResult;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
FilterMediator.prototype._getMove = function (aCurrentState, aNextState) {
|
|
163
|
+
const aResult = [],
|
|
164
|
+
mNextState = this.arrayToMap(aNextState, true),
|
|
165
|
+
aProperties = ["path", "operator", "value"];
|
|
166
|
+
|
|
167
|
+
aCurrentState.forEach((oState, iIndex) => {
|
|
168
|
+
if (
|
|
169
|
+
mNextState[oState.key] &&
|
|
170
|
+
(mNextState[oState.key].index !== iIndex || !aProperties.every((sEntry) => mNextState[oState.key][sEntry] === oState[sEntry]))
|
|
171
|
+
) {
|
|
172
|
+
aResult.push({
|
|
173
|
+
key: oState.key,
|
|
174
|
+
index: mNextState[oState.key].index,
|
|
175
|
+
prevIndex: iIndex,
|
|
176
|
+
path: mNextState[oState.key].path,
|
|
177
|
+
prevPath: oState.path,
|
|
178
|
+
operator: mNextState[oState.key].operator,
|
|
179
|
+
prevOperator: oState.operator,
|
|
180
|
+
value: mNextState[oState.key].value,
|
|
181
|
+
prevValue: oState.value
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
return aResult;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
FilterMediator.prototype.applyStateToTable = function (oSorters = {}) {
|
|
189
|
+
const aState = this.getCurrentState(),
|
|
190
|
+
aFilters = aState.map((oEntry) => new Filter(oEntry.path, oEntry.operator, oEntry.value));
|
|
191
|
+
this.getControl().getBinding("items").filter(aFilters.length ? new Filter(aFilters, true) : null, FilterType.Control);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
return FilterMediator;
|
|
195
|
+
}
|
|
196
|
+
);
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define(
|
|
8
|
+
[
|
|
9
|
+
"sap/m/upload/p13n/mediator/BaseMediator",
|
|
10
|
+
"sap/m/p13n/GroupPanel",
|
|
11
|
+
"sap/m/upload/p13n/modules/CustomDataConfig",
|
|
12
|
+
"sap/ui/core/Configuration",
|
|
13
|
+
"sap/base/util/deepEqual",
|
|
14
|
+
"sap/ui/model/Sorter"
|
|
15
|
+
],
|
|
16
|
+
function (BaseMediator, GroupPanel, CustomDataConfig, Configuration, deepEqual, Sorter) {
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for a new <code>GroupMediator</code>.
|
|
21
|
+
*
|
|
22
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
23
|
+
* @param {sap.ui.core.Control} mSettings.control The control instance that is personalized by this mediator
|
|
24
|
+
* @param {string} mSettings.targetAggregation The name of the aggregation that is now managed by this mediator
|
|
25
|
+
* @param {string} mSettings.p13nMetadataTarget The name of the personalization metadata target that is now managed by this mediator
|
|
26
|
+
*
|
|
27
|
+
* @class
|
|
28
|
+
* The <code>GroupMediator</code> entity serves as a class which handles grouping panel related logic.
|
|
29
|
+
*
|
|
30
|
+
* @extends sap.m.upload.p13n.mediator.BaseMediator
|
|
31
|
+
*
|
|
32
|
+
* @author SAP SE
|
|
33
|
+
* @version 1.120.0
|
|
34
|
+
* @private
|
|
35
|
+
* @experimental
|
|
36
|
+
* @internal
|
|
37
|
+
* @alias sap.m.upload.p13n.mediator.GroupMediator
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
const GroupMediator = BaseMediator.extend("sap.m.upload.p13n.mediator.GroupMediator", {
|
|
41
|
+
constructor: function (mSettings) {
|
|
42
|
+
BaseMediator.call(this, mSettings);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
GroupMediator.prototype.createPanel = function () {
|
|
47
|
+
return Promise.resolve(this.createUi(this.getPanelData()));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
GroupMediator.prototype.createUi = function (aPanelData) {
|
|
51
|
+
this._oPanel = new GroupPanel();
|
|
52
|
+
this._oPanel.setP13nData(aPanelData);
|
|
53
|
+
return this._oPanel;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
GroupMediator.prototype.getPanelData = function () {
|
|
57
|
+
const mCurrentState = this.arrayToMap(this.getCurrentState(), true);
|
|
58
|
+
const aPanelState = [],
|
|
59
|
+
oMetadata = this.getControl()._getP13nMetadata();
|
|
60
|
+
oMetadata[this.getP13nMetadataTarget()].forEach((oMetadataItem) => {
|
|
61
|
+
aPanelState.push({
|
|
62
|
+
name: oMetadataItem.key,
|
|
63
|
+
label: oMetadataItem.label || oMetadataItem.key,
|
|
64
|
+
tooltip: oMetadataItem.tooltip,
|
|
65
|
+
index: mCurrentState[oMetadataItem.key] ? mCurrentState[oMetadataItem.key].index : undefined,
|
|
66
|
+
grouped: !!mCurrentState[oMetadataItem.key]
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Sort panel config
|
|
71
|
+
const sLocale = Configuration.getLocale().toString(),
|
|
72
|
+
oCollator = window.Intl.Collator(sLocale, {});
|
|
73
|
+
aPanelState.sort((mItem1, mItem2) => {
|
|
74
|
+
if (mItem1.grouped && mItem2.sorted) {
|
|
75
|
+
return (mItem1.index || 0) - (mItem2.index || 0);
|
|
76
|
+
}
|
|
77
|
+
if (mItem1.grouped) {
|
|
78
|
+
return -1;
|
|
79
|
+
}
|
|
80
|
+
if (mItem2.grouped) {
|
|
81
|
+
return 1;
|
|
82
|
+
}
|
|
83
|
+
return oCollator.compare(mItem1.label, mItem2.label);
|
|
84
|
+
});
|
|
85
|
+
aPanelState.forEach((oItem) => delete oItem.index);
|
|
86
|
+
return aPanelState;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
GroupMediator.prototype.getCurrentState = function () {
|
|
90
|
+
const oCustomConfig = CustomDataConfig.read(this.getControl()) || {};
|
|
91
|
+
const oSortConditions =
|
|
92
|
+
oCustomConfig.hasOwnProperty("properties") && oCustomConfig.properties[this.getTargetAggregation()]
|
|
93
|
+
? oCustomConfig.properties[this.getTargetAggregation()]
|
|
94
|
+
: {};
|
|
95
|
+
|
|
96
|
+
const aState = Object.values(oSortConditions)
|
|
97
|
+
.filter((oItem) => oItem.grouped)
|
|
98
|
+
.sort((oItem1, oItem2) => {
|
|
99
|
+
return oItem1.index - oItem2.index;
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
return aState.map((oItem) => ({ key: oItem.key }));
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
GroupMediator.prototype.getChanges = function () {
|
|
106
|
+
const aChanges = [],
|
|
107
|
+
aCurrentState = this.getCurrentState(),
|
|
108
|
+
aP13nData = this._getP13nData(),
|
|
109
|
+
aNextState = aP13nData.filter((oEntry) => !!oEntry.grouped).map((oEntry) => ({ key: oEntry.name }));
|
|
110
|
+
|
|
111
|
+
if (deepEqual(aCurrentState, aNextState)) {
|
|
112
|
+
return aChanges;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const aDeleted = this._getDeletes(aCurrentState, aNextState),
|
|
116
|
+
aInserted = this._getInserts(aCurrentState, aNextState),
|
|
117
|
+
aMoved = this._getMove(aCurrentState, aNextState, aDeleted, aInserted);
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
aChanges.push(
|
|
121
|
+
this.createChange("uploadSetTableGroupStateChange", { deleted: aDeleted, moved: aMoved, inserted: aInserted })
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
return aChanges;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
GroupMediator.prototype._getP13nData = function () {
|
|
128
|
+
return this._oPanel ? this._oPanel.getP13nData() : {};
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
GroupMediator.prototype._getDeletes = function (aCurrentState, aNextState) {
|
|
132
|
+
const aResult = [],
|
|
133
|
+
mNextState = this.arrayToMap(aNextState);
|
|
134
|
+
|
|
135
|
+
aCurrentState.forEach((oState, iIndex) => {
|
|
136
|
+
if (!mNextState[oState.key]) {
|
|
137
|
+
aResult.push({ key: oState.key, prevIndex: iIndex });
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
return aResult;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
GroupMediator.prototype._getInserts = function (aCurrentState, aNextState) {
|
|
144
|
+
const aResult = [],
|
|
145
|
+
mCurrentState = this.arrayToMap(aCurrentState);
|
|
146
|
+
|
|
147
|
+
aNextState.forEach((oState, iIndex) => {
|
|
148
|
+
if (!mCurrentState[oState.key]) {
|
|
149
|
+
aResult.push({ key: oState.key, index: iIndex });
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
return aResult;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
GroupMediator.prototype._getMove = function (aCurrentState, aNextState) {
|
|
156
|
+
const aResult = [],
|
|
157
|
+
mNextState = this.arrayToMap(aNextState, true);
|
|
158
|
+
|
|
159
|
+
aCurrentState.forEach((oState, iIndex) => {
|
|
160
|
+
if (mNextState[oState.key] && mNextState[oState.key].index !== iIndex) {
|
|
161
|
+
aResult.push({
|
|
162
|
+
key: oState.key,
|
|
163
|
+
index: mNextState[oState.key].index,
|
|
164
|
+
prevIndex: iIndex
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
return aResult;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
GroupMediator.prototype.applyStateToTable = function (oSorters = {}) {
|
|
172
|
+
const aState = this.getCurrentState();
|
|
173
|
+
if (aState.length) {
|
|
174
|
+
const aSortMetadata = this.getControl()._getP13nMetadata()[this.getP13nMetadataTarget()] ?? [],
|
|
175
|
+
mSortMetadata = this.arrayToMap(aSortMetadata);
|
|
176
|
+
|
|
177
|
+
aState.forEach((oEntry) => {
|
|
178
|
+
if (!mSortMetadata[oEntry.key]) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (oSorters[oEntry.key]) {
|
|
182
|
+
oSorters[oEntry.key].vGroup = true;
|
|
183
|
+
} else {
|
|
184
|
+
oSorters[oEntry.key] = new Sorter(mSortMetadata[oEntry.key].path, false, true);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
return GroupMediator;
|
|
191
|
+
}
|
|
192
|
+
);
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define(
|
|
8
|
+
[
|
|
9
|
+
"sap/m/upload/p13n/mediator/BaseMediator",
|
|
10
|
+
"sap/m/p13n/SortPanel",
|
|
11
|
+
"sap/m/upload/p13n/modules/CustomDataConfig",
|
|
12
|
+
"sap/ui/core/Configuration",
|
|
13
|
+
"sap/base/util/deepEqual",
|
|
14
|
+
"sap/ui/model/Sorter"
|
|
15
|
+
],
|
|
16
|
+
function (BaseMediator, SortPanel, CustomDataConfig, Configuration, deepEqual, Sorter) {
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for a new <code>SortMediator</code>.
|
|
21
|
+
*
|
|
22
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
23
|
+
* @param {sap.ui.core.Control} mSettings.control The control instance that is personalized by this mediator
|
|
24
|
+
* @param {string} mSettings.targetAggregation The name of the aggregation that is now managed by this mediator
|
|
25
|
+
* @param {string} mSettings.p13nMetadataTarget The name of the personalization metadata target that is now managed by this mediator
|
|
26
|
+
*
|
|
27
|
+
* @class
|
|
28
|
+
* The <code>SortMediator</code> entity serves as a class which handles sort panel related logic.
|
|
29
|
+
*
|
|
30
|
+
* @extends sap.m.upload.p13n.mediator.BaseMediator
|
|
31
|
+
*
|
|
32
|
+
* @author SAP SE
|
|
33
|
+
* @version 1.120.0
|
|
34
|
+
* @private
|
|
35
|
+
* @experimental
|
|
36
|
+
* @internal
|
|
37
|
+
* @alias sap.m.upload.p13n.mediator.SortMediator
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
const SortMediator = BaseMediator.extend("sap.m.upload.p13n.mediator.SortMediator", {
|
|
41
|
+
constructor: function (mSettings) {
|
|
42
|
+
BaseMediator.call(this, mSettings);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
SortMediator.prototype.createPanel = function () {
|
|
47
|
+
return Promise.resolve(this.createUi(this.getPanelData()));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
SortMediator.prototype.createUi = function (aPanelData) {
|
|
51
|
+
this._oPanel = new SortPanel();
|
|
52
|
+
this._oPanel.setP13nData(aPanelData);
|
|
53
|
+
return this._oPanel;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
SortMediator.prototype.getPanelData = function () {
|
|
57
|
+
const mCurrentState = this.arrayToMap(this.getCurrentState(), true);
|
|
58
|
+
const aPanelState = [],
|
|
59
|
+
oMetadata = this.getControl()._getP13nMetadata();
|
|
60
|
+
oMetadata[this.getP13nMetadataTarget()].forEach((oMetadataItem) => {
|
|
61
|
+
aPanelState.push({
|
|
62
|
+
name: oMetadataItem.key,
|
|
63
|
+
label: oMetadataItem.label || oMetadataItem.key,
|
|
64
|
+
tooltip: oMetadataItem.tooltip,
|
|
65
|
+
index: mCurrentState[oMetadataItem.key] ? mCurrentState[oMetadataItem.key].index : undefined,
|
|
66
|
+
sorted: !!mCurrentState[oMetadataItem.key],
|
|
67
|
+
descending: mCurrentState[oMetadataItem.key] ? mCurrentState[oMetadataItem.key].descending : undefined
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// Sort panel config
|
|
72
|
+
const sLocale = Configuration.getLocale().toString(),
|
|
73
|
+
oCollator = window.Intl.Collator(sLocale, {});
|
|
74
|
+
aPanelState.sort((mItem1, mItem2) => {
|
|
75
|
+
if (mItem1.sorted && mItem2.sorted) {
|
|
76
|
+
return (mItem1.index || 0) - (mItem2.index || 0);
|
|
77
|
+
}
|
|
78
|
+
if (mItem1.sorted) {
|
|
79
|
+
return -1;
|
|
80
|
+
}
|
|
81
|
+
if (mItem2.sorted) {
|
|
82
|
+
return 1;
|
|
83
|
+
}
|
|
84
|
+
return oCollator.compare(mItem1.label, mItem2.label);
|
|
85
|
+
});
|
|
86
|
+
aPanelState.forEach((oItem) => delete oItem.index);
|
|
87
|
+
return aPanelState;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
SortMediator.prototype.getCurrentState = function () {
|
|
91
|
+
const oCustomConfig = CustomDataConfig.read(this.getControl()) || {};
|
|
92
|
+
const oSortConditions =
|
|
93
|
+
oCustomConfig.hasOwnProperty("properties") && oCustomConfig.properties[this.getTargetAggregation()]
|
|
94
|
+
? oCustomConfig.properties[this.getTargetAggregation()]
|
|
95
|
+
: {};
|
|
96
|
+
|
|
97
|
+
const aState = Object.values(oSortConditions)
|
|
98
|
+
.filter((oItem) => oItem.sorted)
|
|
99
|
+
.sort((oItem1, oItem2) => {
|
|
100
|
+
return oItem1.index - oItem2.index;
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
return aState.map((oItem) => ({ key: oItem.key, descending: oItem.descending }));
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
SortMediator.prototype.getChanges = function () {
|
|
107
|
+
const aChanges = [],
|
|
108
|
+
aCurrentState = this.getCurrentState(),
|
|
109
|
+
aP13nData = this._getP13nData(),
|
|
110
|
+
aNextState = aP13nData
|
|
111
|
+
.filter((oEntry) => !!oEntry.sorted)
|
|
112
|
+
.map((oEntry) => ({ key: oEntry.name, descending: oEntry.descending }));
|
|
113
|
+
|
|
114
|
+
if (deepEqual(aCurrentState, aNextState)) {
|
|
115
|
+
return aChanges;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const aDeleted = this._getDeletes(aCurrentState, aNextState),
|
|
119
|
+
aInserted = this._getInserts(aCurrentState, aNextState),
|
|
120
|
+
aMoved = this._getMove(aCurrentState, aNextState, aDeleted, aInserted);
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
aChanges.push(
|
|
124
|
+
this.createChange("uploadSetTableSortStateChange", { deleted: aDeleted, moved: aMoved, inserted: aInserted })
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
return aChanges;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
SortMediator.prototype._getP13nData = function () {
|
|
131
|
+
return this._oPanel ? this._oPanel.getP13nData() : {};
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
SortMediator.prototype._getDeletes = function (aCurrentState, aNextState) {
|
|
135
|
+
const aResult = [],
|
|
136
|
+
mNextState = this.arrayToMap(aNextState);
|
|
137
|
+
|
|
138
|
+
aCurrentState.forEach((oState, iIndex) => {
|
|
139
|
+
if (!mNextState[oState.key]) {
|
|
140
|
+
aResult.push({ key: oState.key, prevIndex: iIndex, prevDescending: oState.descending });
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
return aResult;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
SortMediator.prototype._getInserts = function (aCurrentState, aNextState) {
|
|
147
|
+
const aResult = [],
|
|
148
|
+
mCurrentState = this.arrayToMap(aCurrentState);
|
|
149
|
+
|
|
150
|
+
aNextState.forEach((oState, iIndex) => {
|
|
151
|
+
if (!mCurrentState[oState.key]) {
|
|
152
|
+
aResult.push({ key: oState.key, index: iIndex, descending: oState.descending });
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
return aResult;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
SortMediator.prototype._getMove = function (aCurrentState, aNextState) {
|
|
159
|
+
const aResult = [],
|
|
160
|
+
mNextState = this.arrayToMap(aNextState, true);
|
|
161
|
+
|
|
162
|
+
aCurrentState.forEach((oState, iIndex) => {
|
|
163
|
+
if (
|
|
164
|
+
mNextState[oState.key] &&
|
|
165
|
+
(mNextState[oState.key].index !== iIndex || mNextState[oState.key].descending !== oState.descending)
|
|
166
|
+
) {
|
|
167
|
+
aResult.push({
|
|
168
|
+
key: oState.key,
|
|
169
|
+
index: mNextState[oState.key].index,
|
|
170
|
+
prevIndex: iIndex,
|
|
171
|
+
descending: mNextState[oState.key].descending,
|
|
172
|
+
prevDescending: oState.descending
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
return aResult;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
SortMediator.prototype.applyStateToTable = function (oSorters = {}) {
|
|
180
|
+
const aState = this.getCurrentState();
|
|
181
|
+
if (aState.length) {
|
|
182
|
+
const aSortMetadata = this.getControl()._getP13nMetadata()[this.getP13nMetadataTarget()] ?? [],
|
|
183
|
+
mSortMetadata = this.arrayToMap(aSortMetadata);
|
|
184
|
+
|
|
185
|
+
aState.forEach((oEntry) => {
|
|
186
|
+
if (!mSortMetadata[oEntry.key]) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
if (oSorters[oEntry.key]) {
|
|
190
|
+
oSorters[oEntry.key].bDescending = oEntry.descending;
|
|
191
|
+
} else {
|
|
192
|
+
oSorters[oEntry.key] = new Sorter(mSortMetadata[oEntry.key].path, oEntry.descending);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
return SortMediator;
|
|
199
|
+
}
|
|
200
|
+
);
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Handles custom data for UploadSetWithTable control based on the flexibility provided data
|
|
10
|
+
*
|
|
11
|
+
* @private
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
sap.ui.define(
|
|
17
|
+
[
|
|
18
|
+
"sap/base/util/merge",
|
|
19
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
20
|
+
"sap/m/upload/p13n/handlers/ColumnConfigHandler",
|
|
21
|
+
"sap/m/upload/p13n/handlers/SortConfigHandler",
|
|
22
|
+
"sap/m/upload/p13n/handlers/GroupConfigHandler",
|
|
23
|
+
"sap/m/upload/p13n/handlers/FilterConfigHandler"
|
|
24
|
+
],
|
|
25
|
+
function (merge, JsControlTreeModifier, ColumnConfigHandler, SortConfigHandler, GroupConfigHandler, FilterConfigHandler) {
|
|
26
|
+
"use strict";
|
|
27
|
+
|
|
28
|
+
const CUSTOM_DATA_P13N_KEY = "p13nManagerData";
|
|
29
|
+
|
|
30
|
+
const EVENT_HANDLERS = {
|
|
31
|
+
[ColumnConfigHandler.getEventName()]: new ColumnConfigHandler(),
|
|
32
|
+
[SortConfigHandler.getEventName()]: new SortConfigHandler(),
|
|
33
|
+
[GroupConfigHandler.getEventName()]: new GroupConfigHandler(),
|
|
34
|
+
[FilterConfigHandler.getEventName()]: new FilterConfigHandler()
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const CustomDataConfig = {};
|
|
38
|
+
|
|
39
|
+
CustomDataConfig.read = function (oControl) {
|
|
40
|
+
if (!oControl || typeof oControl.getCustomData !== "function") {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const aCustomData = oControl.getCustomData().filter((oEntry) => oEntry.getKey() === CUSTOM_DATA_P13N_KEY);
|
|
44
|
+
return aCustomData.length ? merge({}, JSON.parse(aCustomData[0].getValue().replaceAll(/\\/g, ""))) : undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
CustomDataConfig.update = async function (oControl, oPayload) {
|
|
48
|
+
const mPropertyBag = oPayload.propertyBag,
|
|
49
|
+
oModifier = mPropertyBag.modifier ? mPropertyBag.modifier : JsControlTreeModifier;
|
|
50
|
+
|
|
51
|
+
const oRawConfig = await CustomDataConfig.getRawConfig(oControl, oModifier, oPayload);
|
|
52
|
+
let oExistingConfig = {};
|
|
53
|
+
let oConfig = {};
|
|
54
|
+
if (oRawConfig) {
|
|
55
|
+
oExistingConfig = await oModifier
|
|
56
|
+
.getProperty(oRawConfig, "value")
|
|
57
|
+
.then((sConfig) => merge({}, JSON.parse(sConfig.replace(/\\/g, ""))));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (EVENT_HANDLERS[oPayload.changeType]) {
|
|
61
|
+
oConfig = EVENT_HANDLERS[oPayload.changeType].modifyState(oPayload, oExistingConfig);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let pDelete = Promise.resolve();
|
|
65
|
+
if (oRawConfig && oControl.isA) {
|
|
66
|
+
pDelete = oModifier.removeAggregation(oControl, "customData", oRawConfig).then(function () {
|
|
67
|
+
return oModifier.destroy(oRawConfig);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const oAppComponent = mPropertyBag ? mPropertyBag.appComponent : undefined;
|
|
71
|
+
return pDelete.then(() => {
|
|
72
|
+
return oModifier
|
|
73
|
+
.createAndAddCustomData(oControl, CUSTOM_DATA_P13N_KEY, JSON.stringify(oConfig), oAppComponent)
|
|
74
|
+
.then(function () {
|
|
75
|
+
return merge({}, oConfig);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
CustomDataConfig.getRawConfig = function (oControl, oModifier, oPayload) {
|
|
81
|
+
return oModifier
|
|
82
|
+
.getControlMetadata(oControl)
|
|
83
|
+
.then((oControlMetadata) => {
|
|
84
|
+
oPayload.controlMetadata = oControlMetadata;
|
|
85
|
+
return oModifier.getAggregation(oControl, "customData");
|
|
86
|
+
})
|
|
87
|
+
.then((aCustomData) => {
|
|
88
|
+
return Promise.all(
|
|
89
|
+
aCustomData.map((oCustomDataEntry) => oModifier.getProperty(oCustomDataEntry, "key"))
|
|
90
|
+
).then((aCustomDataKeys) =>
|
|
91
|
+
aCustomData.reduce((oResult, mCustomData, iIndex) => {
|
|
92
|
+
return aCustomDataKeys[iIndex] === CUSTOM_DATA_P13N_KEY ? mCustomData : oResult;
|
|
93
|
+
}, undefined)
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return CustomDataConfig;
|
|
99
|
+
}
|
|
100
|
+
);
|