@openui5/sap.m 1.120.7 → 1.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +4 -4
- package/src/sap/m/.library +18 -2
- package/src/sap/m/AccButton.js +1 -1
- package/src/sap/m/ActionListItem.js +1 -1
- package/src/sap/m/ActionSelect.js +11 -11
- package/src/sap/m/ActionSheet.js +12 -8
- package/src/sap/m/ActionSheetRenderer.js +4 -4
- package/src/sap/m/ActionTile.js +7 -1
- package/src/sap/m/ActionTileContent.js +86 -7
- package/src/sap/m/ActionTileContentRenderer.js +4 -41
- package/src/sap/m/AdditionalTextButton.js +1 -1
- package/src/sap/m/App.js +1 -1
- package/src/sap/m/AssociativeOverflowToolbar.js +6 -6
- package/src/sap/m/Avatar.js +32 -14
- package/src/sap/m/Bar.js +5 -5
- package/src/sap/m/BarRenderer.js +3 -3
- package/src/sap/m/Breadcrumbs.js +12 -4
- package/src/sap/m/BreadcrumbsRenderer.js +1 -1
- package/src/sap/m/BusyDialog.js +19 -33
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +8 -8
- package/src/sap/m/ButtonRenderer.js +0 -4
- package/src/sap/m/Carousel.js +53 -25
- package/src/sap/m/CarouselLayout.js +14 -3
- package/src/sap/m/CarouselRenderer.js +4 -4
- package/src/sap/m/CheckBox.js +46 -5
- package/src/sap/m/CheckBoxRenderer.js +10 -3
- package/src/sap/m/ColorPalette.js +4 -2
- package/src/sap/m/ColorPalettePopover.js +5 -3
- package/src/sap/m/ColorPaletteRenderer.js +3 -3
- package/src/sap/m/Column.js +3 -4
- package/src/sap/m/ColumnHeaderPopover.js +1 -1
- package/src/sap/m/ColumnListItem.js +59 -20
- package/src/sap/m/ColumnListItemRenderer.js +8 -9
- package/src/sap/m/ColumnPopoverActionItem.js +1 -1
- package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
- package/src/sap/m/ColumnPopoverItem.js +1 -1
- package/src/sap/m/ColumnPopoverSelectListItem.js +1 -1
- package/src/sap/m/ColumnPopoverSortItem.js +6 -6
- package/src/sap/m/ComboBox.js +16 -9
- package/src/sap/m/ComboBoxBase.js +10 -9
- package/src/sap/m/ComboBoxTextField.js +6 -4
- package/src/sap/m/ContentConfig.js +142 -0
- package/src/sap/m/CustomListItem.js +1 -1
- package/src/sap/m/CustomTile.js +1 -1
- package/src/sap/m/CustomTreeItem.js +1 -1
- package/src/sap/m/DatePicker.js +19 -18
- package/src/sap/m/DatePickerRenderer.js +3 -3
- package/src/sap/m/DateRangeSelection.js +16 -13
- package/src/sap/m/DateRangeSelectionRenderer.js +3 -3
- package/src/sap/m/DateTimeField.js +17 -9
- package/src/sap/m/DateTimeInput.js +6 -4
- package/src/sap/m/DateTimePicker.js +39 -30
- package/src/sap/m/DateTimePickerRenderer.js +4 -2
- package/src/sap/m/Dialog.js +21 -9
- package/src/sap/m/DialogRenderer.js +10 -3
- package/src/sap/m/DisplayListItem.js +1 -1
- package/src/sap/m/DraftIndicator.js +5 -5
- package/src/sap/m/DynamicDate.js +5 -3
- package/src/sap/m/DynamicDateFormat.js +7 -6
- package/src/sap/m/DynamicDateOption.js +10 -5
- package/src/sap/m/DynamicDateRange.js +56 -43
- package/src/sap/m/DynamicDateUtil.js +3 -3
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
- package/src/sap/m/ExpandableText.js +5 -9
- package/src/sap/m/ExpandableTextRenderer.js +3 -3
- package/src/sap/m/FacetFilter.js +17 -8
- package/src/sap/m/FacetFilterItem.js +1 -1
- package/src/sap/m/FacetFilterList.js +7 -7
- package/src/sap/m/FacetFilterRenderer.js +4 -4
- package/src/sap/m/FeedContent.js +1 -1
- package/src/sap/m/FeedInput.js +1 -1
- package/src/sap/m/FeedListItem.js +4 -4
- package/src/sap/m/FeedListItemAction.js +1 -1
- package/src/sap/m/FeedListItemRenderer.js +3 -3
- package/src/sap/m/Fiori20Adapter.js +9 -9
- package/src/sap/m/FlexBox.js +2 -2
- package/src/sap/m/FlexItemData.js +17 -17
- package/src/sap/m/FormattedText.js +7 -6
- package/src/sap/m/GenericTag.js +1 -1
- package/src/sap/m/GenericTagRenderer.js +5 -5
- package/src/sap/m/GenericTile.js +102 -14
- package/src/sap/m/GenericTileLineModeRenderer.js +3 -3
- package/src/sap/m/GenericTileRenderer.js +3 -3
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GroupHeaderListItemRenderer.js +3 -3
- package/src/sap/m/GrowingEnablement.js +7 -6
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +5 -5
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +4 -4
- package/src/sap/m/IconTabBarDragAndDropUtil.js +5 -5
- package/src/sap/m/IconTabBarSelectList.js +2 -2
- package/src/sap/m/IconTabFilter.js +27 -15
- package/src/sap/m/IconTabFilterExpandButtonBadge.js +4 -4
- package/src/sap/m/IconTabHeader.js +61 -28
- package/src/sap/m/IconTabHeaderRenderer.js +5 -5
- package/src/sap/m/IconTabSeparator.js +7 -7
- package/src/sap/m/IllustratedMessage.js +8 -6
- package/src/sap/m/IllustratedMessageType.js +12 -0
- package/src/sap/m/Illustration.js +4 -4
- package/src/sap/m/IllustrationPool.js +3 -3
- package/src/sap/m/Image.js +6 -3
- package/src/sap/m/ImageContent.js +1 -1
- package/src/sap/m/Input.js +65 -36
- package/src/sap/m/InputBase.js +33 -8
- package/src/sap/m/InputBaseRenderer.js +3 -3
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/InputRenderer.js +5 -6
- package/src/sap/m/Label.js +6 -6
- package/src/sap/m/LightBox.js +4 -4
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +30 -6
- package/src/sap/m/LinkRenderer.js +4 -4
- package/src/sap/m/LinkTileContent.js +1 -1
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +43 -24
- package/src/sap/m/ListItemBase.js +7 -6
- package/src/sap/m/ListItemBaseRenderer.js +3 -0
- package/src/sap/m/MaskEnabler.js +8 -6
- package/src/sap/m/MaskInput.js +1 -1
- package/src/sap/m/MaskInputRenderer.js +2 -2
- package/src/sap/m/MaskInputRule.js +1 -1
- package/src/sap/m/Menu.js +19 -17
- package/src/sap/m/MenuButton.js +8 -6
- package/src/sap/m/MenuItem.js +9 -9
- package/src/sap/m/MenuListItem.js +5 -4
- package/src/sap/m/MessageBox.js +5 -3
- package/src/sap/m/MessageItem.js +1 -1
- package/src/sap/m/MessageListItem.js +4 -3
- package/src/sap/m/MessagePage.js +4 -2
- package/src/sap/m/MessagePopover.js +9 -6
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +9 -7
- package/src/sap/m/MessageStripRenderer.js +5 -2
- package/src/sap/m/MessageStripUtilities.js +6 -4
- package/src/sap/m/MessageToast.js +8 -7
- package/src/sap/m/MessageView.js +29 -6
- package/src/sap/m/MessageViewRenderer.js +2 -2
- package/src/sap/m/MultiComboBox.js +36 -17
- package/src/sap/m/MultiComboBoxRenderer.js +4 -4
- package/src/sap/m/MultiEditField.js +4 -4
- package/src/sap/m/MultiInput.js +66 -19
- package/src/sap/m/MultiInputRenderer.js +3 -3
- package/src/sap/m/NavContainer.js +14 -9
- package/src/sap/m/NewsContent.js +1 -1
- package/src/sap/m/NotificationList.js +1 -1
- package/src/sap/m/NotificationListBase.js +4 -4
- package/src/sap/m/NotificationListGroup.js +4 -4
- package/src/sap/m/NotificationListItem.js +4 -4
- package/src/sap/m/NumericContent.js +6 -6
- package/src/sap/m/NumericInput.js +1 -1
- package/src/sap/m/NumericInputRenderer.js +6 -6
- package/src/sap/m/ObjectAttribute.js +7 -6
- package/src/sap/m/ObjectAttributeRenderer.js +3 -3
- package/src/sap/m/ObjectHeader.js +15 -11
- package/src/sap/m/ObjectHeaderRenderer.js +4 -4
- package/src/sap/m/ObjectIdentifier.js +37 -8
- package/src/sap/m/ObjectIdentifierRenderer.js +3 -3
- package/src/sap/m/ObjectListItem.js +4 -4
- package/src/sap/m/ObjectMarker.js +6 -4
- package/src/sap/m/ObjectNumber.js +4 -3
- package/src/sap/m/ObjectNumberRenderer.js +6 -6
- package/src/sap/m/ObjectStatus.js +28 -22
- package/src/sap/m/ObjectStatusRenderer.js +26 -20
- package/src/sap/m/OverflowToolbar.js +2 -2
- package/src/sap/m/OverflowToolbarAssociativePopover.js +3 -3
- package/src/sap/m/OverflowToolbarButton.js +1 -1
- package/src/sap/m/OverflowToolbarLayoutData.js +2 -2
- package/src/sap/m/OverflowToolbarMenuButton.js +1 -1
- package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/P13nAnyFilterItem.js +1 -1
- package/src/sap/m/P13nColumnsItem.js +1 -1
- package/src/sap/m/P13nColumnsPanel.js +33 -11
- package/src/sap/m/P13nConditionPanel.js +6 -4
- package/src/sap/m/P13nDialog.js +27 -13
- package/src/sap/m/P13nDimMeasureItem.js +1 -1
- package/src/sap/m/P13nDimMeasurePanel.js +18 -12
- package/src/sap/m/P13nFilterItem.js +1 -1
- package/src/sap/m/P13nFilterPanel.js +71 -49
- package/src/sap/m/P13nGroupItem.js +1 -1
- package/src/sap/m/P13nGroupPanel.js +5 -4
- package/src/sap/m/P13nItem.js +1 -1
- package/src/sap/m/P13nPanel.js +1 -1
- package/src/sap/m/P13nSelectionItem.js +1 -1
- package/src/sap/m/P13nSelectionPanel.js +28 -7
- package/src/sap/m/P13nSortItem.js +1 -1
- package/src/sap/m/P13nSortPanel.js +6 -5
- package/src/sap/m/PDFViewer.js +13 -5
- package/src/sap/m/Page.js +4 -8
- package/src/sap/m/PageAccessibleLandmarkInfo.js +1 -1
- package/src/sap/m/PagingButton.js +5 -4
- package/src/sap/m/Panel.js +10 -5
- package/src/sap/m/PlanningCalendar.js +160 -109
- package/src/sap/m/PlanningCalendarHeader.js +9 -7
- package/src/sap/m/PlanningCalendarLegend.js +5 -5
- package/src/sap/m/PlanningCalendarRow.js +26 -15
- package/src/sap/m/PlanningCalendarView.js +1 -4
- package/src/sap/m/Popover.js +19 -21
- package/src/sap/m/PopoverRenderer.js +4 -4
- package/src/sap/m/ProgressIndicator.js +15 -13
- package/src/sap/m/ProgressIndicatorRenderer.js +3 -4
- package/src/sap/m/PullToRefresh.js +4 -3
- package/src/sap/m/QuickView.js +1 -1
- package/src/sap/m/QuickViewBase.js +1 -1
- package/src/sap/m/QuickViewCard.js +1 -1
- package/src/sap/m/QuickViewCardRenderer.js +3 -3
- package/src/sap/m/QuickViewGroup.js +1 -1
- package/src/sap/m/QuickViewGroupElement.js +1 -1
- package/src/sap/m/QuickViewPage.js +29 -17
- package/src/sap/m/RadioButton.js +4 -4
- package/src/sap/m/RadioButtonGroup.js +38 -5
- package/src/sap/m/RadioButtonGroupRenderer.js +4 -4
- package/src/sap/m/RadioButtonRenderer.js +3 -3
- package/src/sap/m/RangeSlider.js +9 -7
- package/src/sap/m/RangeSliderRenderer.js +2 -2
- package/src/sap/m/RatingIndicator.js +7 -6
- package/src/sap/m/RatingIndicatorRenderer.js +4 -4
- package/src/sap/m/ResponsivePopover.js +1 -3
- package/src/sap/m/ResponsiveScale.js +1 -1
- package/src/sap/m/ScrollBar.js +3 -3
- package/src/sap/m/ScrollContainer.js +6 -6
- package/src/sap/m/SearchField.js +1 -1
- package/src/sap/m/SegmentedButton.js +7 -5
- package/src/sap/m/SegmentedButtonItem.js +1 -1
- package/src/sap/m/Select.js +30 -16
- package/src/sap/m/SelectDialog.js +5 -3
- package/src/sap/m/SelectDialogBase.js +6 -6
- package/src/sap/m/SelectList.js +6 -6
- package/src/sap/m/SelectionDetails.js +7 -3
- package/src/sap/m/SelectionDetailsFacade.js +2 -2
- package/src/sap/m/SelectionDetailsItem.js +1 -1
- package/src/sap/m/SelectionDetailsItemLine.js +1 -1
- package/src/sap/m/Shell.js +4 -4
- package/src/sap/m/ShellRenderer.js +3 -2
- package/src/sap/m/SimpleFixFlex.js +1 -1
- package/src/sap/m/SinglePlanningCalendar.js +41 -9
- package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarGrid.js +122 -54
- package/src/sap/m/SinglePlanningCalendarGridRenderer.js +22 -20
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +315 -61
- package/src/sap/m/SinglePlanningCalendarMonthGridRenderer.js +88 -35
- package/src/sap/m/SinglePlanningCalendarMonthView.js +3 -4
- package/src/sap/m/SinglePlanningCalendarView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWeekView.js +5 -5
- package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +6 -5
- package/src/sap/m/SlideTile.js +6 -6
- package/src/sap/m/SlideTileRenderer.js +1 -3
- package/src/sap/m/Slider.js +38 -11
- package/src/sap/m/SliderRenderer.js +4 -4
- package/src/sap/m/SliderTooltip.js +4 -4
- package/src/sap/m/SliderTooltipBase.js +1 -1
- package/src/sap/m/SliderTooltipContainer.js +10 -8
- package/src/sap/m/SliderTooltipRenderer.js +3 -3
- package/src/sap/m/SplitApp.js +2 -1
- package/src/sap/m/SplitButton.js +5 -3
- package/src/sap/m/SplitContainer.js +20 -11
- package/src/sap/m/StandardDynamicDateOption.js +16 -12
- package/src/sap/m/StandardListItem.js +4 -3
- package/src/sap/m/StandardListItemRenderer.js +3 -3
- package/src/sap/m/StandardTile.js +1 -1
- package/src/sap/m/StandardTreeItem.js +1 -1
- package/src/sap/m/StepInput.js +6 -4
- package/src/sap/m/Suggest.js +5 -5
- package/src/sap/m/SuggestionItem.js +1 -1
- package/src/sap/m/SuggestionsList.js +9 -7
- package/src/sap/m/SuggestionsListRenderer.js +2 -2
- package/src/sap/m/SuggestionsPopover.js +1 -1
- package/src/sap/m/Switch.js +13 -11
- package/src/sap/m/SwitchRenderer.js +3 -3
- package/src/sap/m/TabContainer.js +9 -6
- package/src/sap/m/TabContainerItem.js +5 -8
- package/src/sap/m/TabStrip.js +23 -12
- package/src/sap/m/TabStripItem.js +7 -10
- package/src/sap/m/TabStripRenderer.js +2 -2
- package/src/sap/m/Table.js +4 -5
- package/src/sap/m/TablePersoController.js +10 -8
- package/src/sap/m/TablePersoDialog.js +19 -16
- package/src/sap/m/TablePersoProvider.js +1 -1
- package/src/sap/m/TableRenderer.js +4 -4
- package/src/sap/m/TableSelectDialog.js +5 -3
- package/src/sap/m/Text.js +36 -39
- package/src/sap/m/TextArea.js +5 -3
- package/src/sap/m/TextRenderer.js +2 -7
- package/src/sap/m/Tile.js +1 -1
- package/src/sap/m/TileAttribute.js +64 -0
- package/src/sap/m/TileAttributeRenderer.js +70 -0
- package/src/sap/m/TileContainer.js +10 -8
- package/src/sap/m/TileContent.js +8 -4
- package/src/sap/m/TileRenderer.js +3 -3
- package/src/sap/m/TimePicker.js +24 -19
- package/src/sap/m/TimePickerClock.js +4 -3
- package/src/sap/m/TimePickerClocks.js +1 -1
- package/src/sap/m/TimePickerInputs.js +1 -1
- package/src/sap/m/TimePickerInternals.js +12 -10
- package/src/sap/m/TimePickerSlider.js +9 -7
- package/src/sap/m/TimePickerSliders.js +17 -13
- package/src/sap/m/TimePickerSlidersRenderer.js +3 -3
- package/src/sap/m/Title.js +5 -4
- package/src/sap/m/TitlePropagationSupport.js +4 -4
- package/src/sap/m/ToggleButton.js +4 -3
- package/src/sap/m/Token.js +6 -6
- package/src/sap/m/Tokenizer.js +16 -10
- package/src/sap/m/Toolbar.js +4 -4
- package/src/sap/m/ToolbarLayoutData.js +1 -1
- package/src/sap/m/ToolbarSeparator.js +1 -1
- package/src/sap/m/ToolbarSpacer.js +1 -1
- package/src/sap/m/Tree.js +4 -2
- package/src/sap/m/TreeItemBase.js +4 -3
- package/src/sap/m/TreeItemBaseRenderer.js +3 -3
- package/src/sap/m/UploadCollection.js +28 -24
- package/src/sap/m/UploadCollectionItem.js +1 -1
- package/src/sap/m/UploadCollectionParameter.js +1 -1
- package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
- package/src/sap/m/VBox.js +1 -1
- package/src/sap/m/ValueStateHeader.js +5 -5
- package/src/sap/m/VariantItem.js +8 -3
- package/src/sap/m/VariantManagement.js +112 -33
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +34 -21
- package/src/sap/m/ViewSettingsFilterItem.js +1 -1
- package/src/sap/m/ViewSettingsItem.js +9 -2
- package/src/sap/m/VisibleItem.js +1 -1
- package/src/sap/m/WheelSlider.js +4 -3
- package/src/sap/m/WheelSliderContainer.js +1 -1
- package/src/sap/m/WheelSliderContainerRenderer.js +3 -3
- package/src/sap/m/Wizard.js +17 -15
- package/src/sap/m/WizardProgressNavigator.js +18 -2
- package/src/sap/m/WizardProgressNavigatorRenderer.js +9 -5
- package/src/sap/m/WizardRenderer.js +6 -4
- package/src/sap/m/WizardStep.js +9 -11
- package/src/sap/m/changeHandler/AddTableColumn.js +3 -7
- package/src/sap/m/changeHandler/ChangeLinkTarget.js +1 -1
- package/src/sap/m/changeHandler/CombineButtons.js +4 -4
- package/src/sap/m/changeHandler/MoveTableColumns.js +3 -2
- package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
- package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
- package/src/sap/m/delegate/ValueStateMessage.js +3 -3
- package/src/sap/m/designtime/IconTabBar.designtime.js +3 -2
- package/src/sap/m/designtime/Link.designtime.js +4 -4
- package/src/sap/m/designtime/MenuButton.designtime.js +3 -0
- package/src/sap/m/designtime/ObjectIdentifier.designtime.js +0 -4
- package/src/sap/m/designtime/messagebundle_en_US_saprigi.properties +91 -91
- package/src/sap/m/flexibility/EngineFlex.js +14 -8
- package/src/sap/m/flexibility/MenuButton.flexibility.js +1 -0
- package/src/sap/m/inputUtils/SuggestionsPopoverPopoverMixin.js +4 -4
- package/src/sap/m/library.js +181 -59
- package/src/sap/m/messagebundle.properties +113 -90
- package/src/sap/m/messagebundle_ar.properties +16 -10
- package/src/sap/m/messagebundle_bg.properties +19 -13
- package/src/sap/m/messagebundle_ca.properties +16 -10
- package/src/sap/m/messagebundle_cnr.properties +21 -15
- package/src/sap/m/messagebundle_cs.properties +16 -10
- package/src/sap/m/messagebundle_cy.properties +19 -13
- package/src/sap/m/messagebundle_da.properties +14 -8
- package/src/sap/m/messagebundle_de.properties +12 -6
- package/src/sap/m/messagebundle_el.properties +27 -21
- package/src/sap/m/messagebundle_en.properties +1164 -22
- package/src/sap/m/messagebundle_en_GB.properties +23 -17
- package/src/sap/m/messagebundle_en_US_saprigi.properties +34 -22
- package/src/sap/m/messagebundle_es.properties +19 -13
- package/src/sap/m/messagebundle_es_MX.properties +18 -12
- package/src/sap/m/messagebundle_et.properties +14 -8
- package/src/sap/m/messagebundle_fi.properties +21 -15
- package/src/sap/m/messagebundle_fr.properties +15 -9
- package/src/sap/m/messagebundle_fr_CA.properties +11 -5
- package/src/sap/m/messagebundle_hi.properties +24 -18
- package/src/sap/m/messagebundle_hr.properties +15 -9
- package/src/sap/m/messagebundle_hu.properties +20 -14
- package/src/sap/m/messagebundle_id.properties +15 -9
- package/src/sap/m/messagebundle_it.properties +17 -11
- package/src/sap/m/messagebundle_iw.properties +13 -7
- package/src/sap/m/messagebundle_ja.properties +23 -17
- package/src/sap/m/messagebundle_kk.properties +14 -8
- package/src/sap/m/messagebundle_ko.properties +18 -12
- package/src/sap/m/messagebundle_lt.properties +17 -11
- package/src/sap/m/messagebundle_lv.properties +26 -20
- package/src/sap/m/messagebundle_mk.properties +20 -14
- package/src/sap/m/messagebundle_ms.properties +13 -7
- package/src/sap/m/messagebundle_nl.properties +16 -10
- package/src/sap/m/messagebundle_no.properties +15 -9
- package/src/sap/m/messagebundle_pl.properties +16 -10
- package/src/sap/m/messagebundle_pt.properties +16 -10
- package/src/sap/m/messagebundle_pt_PT.properties +13 -7
- package/src/sap/m/messagebundle_ro.properties +13 -7
- package/src/sap/m/messagebundle_ru.properties +15 -9
- package/src/sap/m/messagebundle_sh.properties +21 -15
- package/src/sap/m/messagebundle_sk.properties +13 -7
- package/src/sap/m/messagebundle_sl.properties +14 -8
- package/src/sap/m/messagebundle_sr.properties +21 -15
- package/src/sap/m/messagebundle_sv.properties +15 -9
- package/src/sap/m/messagebundle_th.properties +12 -6
- package/src/sap/m/messagebundle_tr.properties +15 -9
- package/src/sap/m/messagebundle_uk.properties +15 -9
- package/src/sap/m/messagebundle_vi.properties +16 -10
- package/src/sap/m/messagebundle_zh_CN.properties +12 -6
- package/src/sap/m/messagebundle_zh_TW.properties +12 -6
- package/src/sap/m/p13n/.eslintrc.json +19 -0
- package/src/sap/m/p13n/AbstractContainer.js +43 -29
- package/src/sap/m/p13n/AbstractContainerItem.js +8 -8
- package/src/sap/m/p13n/BasePanel.js +123 -76
- package/src/sap/m/p13n/Container.js +80 -50
- package/src/sap/m/p13n/Engine.js +331 -294
- package/src/sap/m/p13n/FilterController.js +335 -0
- package/src/sap/m/p13n/FilterPanel.js +291 -0
- package/src/sap/m/p13n/FlexUtil.js +23 -21
- package/src/sap/m/p13n/GroupController.js +97 -85
- package/src/sap/m/p13n/GroupPanel.js +30 -25
- package/src/sap/m/p13n/MetadataHelper.js +65 -21
- package/src/sap/m/p13n/PersistenceProvider.js +11 -9
- package/src/sap/m/p13n/Popup.js +63 -45
- package/src/sap/m/p13n/QueryPanel.js +117 -93
- package/src/sap/m/p13n/SelectionController.js +302 -237
- package/src/sap/m/p13n/SelectionPanel.js +117 -83
- package/src/sap/m/p13n/SortController.js +100 -89
- package/src/sap/m/p13n/SortPanel.js +46 -31
- package/src/sap/m/p13n/enums/PersistenceMode.js +57 -0
- package/src/sap/m/p13n/{enum → enums}/ProcessingStrategy.js +10 -8
- package/src/sap/m/p13n/handler/xConfigHandler.js +175 -161
- package/src/sap/m/p13n/modification/FlexModificationHandler.js +151 -133
- package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +28 -28
- package/src/sap/m/p13n/modification/ModificationHandler.js +15 -15
- package/src/sap/m/p13n/modules/AdaptationProvider.js +7 -7
- package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +20 -18
- package/src/sap/m/p13n/modules/StateHandlerRegistry.js +7 -7
- package/src/sap/m/p13n/modules/UIManager.js +119 -117
- package/src/sap/m/p13n/modules/xConfigAPI.js +74 -68
- package/src/sap/m/plugins/CellSelector.js +142 -26
- package/src/sap/m/plugins/ColumnResizer.js +12 -17
- package/src/sap/m/plugins/ContextMenuSetting.js +155 -0
- package/src/sap/m/plugins/CopyProvider.js +165 -110
- package/src/sap/m/plugins/DataStateIndicator.js +9 -6
- package/src/sap/m/plugins/PasteProvider.js +18 -10
- package/src/sap/m/plugins/PluginBase.js +39 -15
- package/src/sap/m/semantic/AddAction.js +1 -1
- package/src/sap/m/semantic/CancelAction.js +1 -1
- package/src/sap/m/semantic/DeleteAction.js +1 -1
- package/src/sap/m/semantic/DetailPage.js +3 -3
- package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/m/semantic/EditAction.js +1 -1
- package/src/sap/m/semantic/FavoriteAction.js +1 -1
- package/src/sap/m/semantic/FilterAction.js +1 -1
- package/src/sap/m/semantic/FilterSelect.js +1 -1
- package/src/sap/m/semantic/FlagAction.js +1 -1
- package/src/sap/m/semantic/ForwardAction.js +1 -1
- package/src/sap/m/semantic/FullscreenPage.js +1 -1
- package/src/sap/m/semantic/GroupAction.js +1 -1
- package/src/sap/m/semantic/GroupSelect.js +1 -1
- package/src/sap/m/semantic/MainAction.js +1 -1
- package/src/sap/m/semantic/MasterPage.js +3 -3
- package/src/sap/m/semantic/MessagesIndicator.js +1 -1
- package/src/sap/m/semantic/MultiSelectAction.js +3 -3
- package/src/sap/m/semantic/NegativeAction.js +1 -1
- package/src/sap/m/semantic/OpenInAction.js +1 -1
- package/src/sap/m/semantic/PositiveAction.js +1 -1
- package/src/sap/m/semantic/PrintAction.js +1 -1
- package/src/sap/m/semantic/SaveAction.js +1 -1
- package/src/sap/m/semantic/Segment.js +1 -1
- package/src/sap/m/semantic/SegmentedContainer.js +1 -1
- package/src/sap/m/semantic/SemanticButton.js +1 -1
- package/src/sap/m/semantic/SemanticConfiguration.js +7 -5
- package/src/sap/m/semantic/SemanticControl.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/semantic/SemanticPage.js +4 -2
- package/src/sap/m/semantic/SemanticSelect.js +1 -1
- package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
- package/src/sap/m/semantic/SendEmailAction.js +1 -1
- package/src/sap/m/semantic/SendMessageAction.js +1 -1
- package/src/sap/m/semantic/ShareInJamAction.js +1 -1
- package/src/sap/m/semantic/ShareMenu.js +6 -12
- package/src/sap/m/semantic/ShareMenuPage.js +1 -1
- package/src/sap/m/semantic/SortAction.js +1 -1
- package/src/sap/m/semantic/SortSelect.js +1 -1
- package/src/sap/m/table/ColumnWidthController.js +2 -3
- package/src/sap/m/table/Util.js +67 -40
- package/src/sap/m/table/columnmenu/ActionItem.js +1 -1
- package/src/sap/m/table/columnmenu/Entry.js +1 -1
- package/src/sap/m/table/columnmenu/Item.js +5 -5
- package/src/sap/m/table/columnmenu/ItemBase.js +1 -1
- package/src/sap/m/table/columnmenu/Menu.js +13 -20
- package/src/sap/m/table/columnmenu/QuickAction.js +1 -1
- package/src/sap/m/table/columnmenu/QuickActionBase.js +1 -1
- package/src/sap/m/table/columnmenu/QuickActionItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickGroup.js +7 -5
- package/src/sap/m/table/columnmenu/QuickGroupItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickSort.js +6 -4
- package/src/sap/m/table/columnmenu/QuickSortItem.js +6 -4
- package/src/sap/m/table/columnmenu/QuickTotal.js +7 -5
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +1 -1
- package/src/sap/m/themes/base/ActionSheet.less +10 -3
- package/src/sap/m/themes/base/ActionTile.less +7 -4
- package/src/sap/m/themes/base/Carousel.less +1 -1
- package/src/sap/m/themes/base/ContextMenuSetting.less +3 -0
- package/src/sap/m/themes/base/IconTabBar.less +2 -2
- package/src/sap/m/themes/base/Label.less +2 -1
- package/src/sap/m/themes/base/Link.less +1 -1
- package/src/sap/m/themes/base/ListItemBase.less +1 -1
- package/src/sap/m/themes/base/MenuButton.less +2 -2
- package/src/sap/m/themes/base/MessageView.less +6 -0
- package/src/sap/m/themes/base/MultiComboBox.less +7 -4
- package/src/sap/m/themes/base/NumericContent.less +2 -2
- package/src/sap/m/themes/base/ObjectListItem.less +1 -1
- package/src/sap/m/themes/base/ObjectNumber.less +4 -4
- package/src/sap/m/themes/base/ObjectStatus.less +263 -160
- package/src/sap/m/themes/base/Panel.less +18 -4
- package/src/sap/m/themes/base/Popover.less +5 -0
- package/src/sap/m/themes/base/SinglePlanningCalendarMonthGrid.less +21 -0
- package/src/sap/m/themes/base/StandardListItem.less +1 -1
- package/src/sap/m/themes/base/SuggestionItem.less +6 -0
- package/src/sap/m/themes/base/Table.less +0 -5
- package/src/sap/m/themes/base/TablePersoDialog.less +4 -2
- package/src/sap/m/themes/base/Text.less +2 -1
- package/src/sap/m/themes/base/UploadCollection.less +2 -2
- package/src/sap/m/themes/base/UploadSet.less +55 -0
- package/src/sap/m/themes/base/VariantManagement.less +2 -1
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-NewMail.svg +27 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Dialog-SignOut.svg +24 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Dot-NewMail.svg +9 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Dot-SignOut.svg +12 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-NewMail.svg +59 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Scene-SignOut.svg +113 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-NewMail.svg +27 -0
- package/src/sap/m/themes/base/illustrations/sapIllus-Spot-SignOut.svg +23 -0
- package/src/sap/m/themes/base/library.source.less +2 -1
- package/src/sap/m/upload/ActionsPlaceholder.js +1 -1
- package/src/sap/m/upload/Column.js +1 -1
- package/src/sap/m/upload/FilePreviewDialog.js +5 -5
- package/src/sap/m/upload/FilterPanel.js +5 -3
- package/src/sap/m/upload/UploadSet.js +122 -61
- package/src/sap/m/upload/UploadSetItem.js +31 -7
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
- package/src/sap/m/upload/UploadSetwithTable.js +7 -6
- package/src/sap/m/upload/UploadSetwithTableItem.js +5 -5
- package/src/sap/m/upload/UploaderTableItem.js +1 -1
- package/src/sap/m/upload/p13n/PersManager.js +4 -2
- package/src/sap/m/upload/p13n/mediator/BaseMediator.js +1 -1
- package/src/sap/m/upload/p13n/mediator/ColumnsMediator.js +5 -4
- package/src/sap/m/upload/p13n/mediator/FilterMediator.js +5 -2
- package/src/sap/m/upload/p13n/mediator/GroupMediator.js +5 -4
- package/src/sap/m/upload/p13n/mediator/SortMediator.js +5 -4
- package/src/sap/m/upload/p13n/modules/PersPopupManager.js +3 -3
- package/LICENSES/BSD-2-Clause.txt +0 -22
- package/src/sap/m/CustomAttribute.js +0 -53
- package/src/sap/m/p13n/enum/PersistenceMode.js +0 -55
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
'./SelectionController',
|
|
9
|
+
'sap/m/p13n/modules/xConfigAPI',
|
|
10
|
+
'sap/base/Log',
|
|
11
|
+
'sap/base/util/merge',
|
|
12
|
+
'sap/base/util/deepEqual'
|
|
13
|
+
], (BaseController, xConfigAPI, Log, merge, deepEqual) => {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Personalization <code>FilterState</code> object type. This object describes the state processed by this controller when accessing it through the {@link sap.m.p13n.Engine Engine}.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
* @typedef {Object<string, sap.m.p13n.FilterStateItem[]>} sap.m.p13n.FilterState
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Personalization <code>FilterStateItem</code> object type. This object describes a single filter condition.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
* @typedef {object} sap.m.p13n.FilterStateItem
|
|
28
|
+
* @property {string} operator The operator of the condition
|
|
29
|
+
* @property {string[]} values The values of the condition
|
|
30
|
+
* @property {boolean} [filtered] Defines whether the item is filtered (if a filter state is provided, it's filtered automatically)
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Constructor for a new <code>FilterController</code>.
|
|
36
|
+
*
|
|
37
|
+
* @param {object} mSettings Initial settings for the new controller
|
|
38
|
+
* @param {sap.ui.core.Control} mSettings.control The control instance that is personalized by this controller
|
|
39
|
+
* @param {Function} [mSettings.itemFactory] A factory function that will be called whenever the user selects a new entry from the <code>ComboBox</code>.
|
|
40
|
+
* The factory must return a single control instance of an input based control to provide custom filter capabilities.
|
|
41
|
+
* This control is then going to be added in the layout provided by the <code>FilterPanel</code>.
|
|
42
|
+
* <b>Note:</b>: The Panel will not handle the lifecylce of the provided factory control instance, in case the row is going to be
|
|
43
|
+
* removed, the according consumer needs to decide about destroying or keeping the control instance. In addition, the <code>getIdForLabel</code>
|
|
44
|
+
* method can be used to return a focusable children control to provide the <code>labelFor</code> reference.
|
|
45
|
+
*
|
|
46
|
+
* @class
|
|
47
|
+
* The <code>FilterController</code> entity serves as a base class to create personalization implementations that are specific to filtering.
|
|
48
|
+
*
|
|
49
|
+
* @extends sap.m.p13n.SelectionController
|
|
50
|
+
*
|
|
51
|
+
* @author SAP SE
|
|
52
|
+
* @version 1.121.0
|
|
53
|
+
* @since 1.121
|
|
54
|
+
* @public
|
|
55
|
+
* @alias sap.m.p13n.FilterController
|
|
56
|
+
*/
|
|
57
|
+
const FilterController = BaseController.extend("sap.m.p13n.FilterController", {
|
|
58
|
+
constructor: function (mSettings) {
|
|
59
|
+
BaseController.apply(this, arguments);
|
|
60
|
+
this._itemFactory = mSettings?.itemFactory;
|
|
61
|
+
this._bResetEnabled = true;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
FilterController.prototype.getCurrentState = function () {
|
|
66
|
+
const oXConfig = xConfigAPI.readConfig(this.getAdaptationControl()) || {};
|
|
67
|
+
const aConditions = oXConfig.hasOwnProperty("properties") ? oXConfig.properties.filterConditions : [];
|
|
68
|
+
|
|
69
|
+
return aConditions?.reduce((mConditions, oState) => {
|
|
70
|
+
const sKey = oState.key;
|
|
71
|
+
mConditions[sKey] = mConditions[sKey] || [];
|
|
72
|
+
mConditions[sKey].push(oState.condition);
|
|
73
|
+
return mConditions;
|
|
74
|
+
}, {}) || {};
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
FilterController.prototype.getChangeOperations = () => {
|
|
78
|
+
return {
|
|
79
|
+
add: "addCondition",
|
|
80
|
+
remove: "removeCondition"
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
FilterController.prototype._getPresenceAttribute = (bexternalAppliance) => {
|
|
85
|
+
return "active";
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
FilterController.prototype.initAdaptationUI = function (oPropertyHelper, oWrapper) {
|
|
89
|
+
|
|
90
|
+
return new Promise((resolve, reject) => {
|
|
91
|
+
sap.ui.require(["sap/m/p13n/FilterPanel", "sap/m/Input"], (FilterPanel, Input) => {
|
|
92
|
+
|
|
93
|
+
const oAdaptationData = this.mixInfoAndState(oPropertyHelper);
|
|
94
|
+
|
|
95
|
+
const oFilterPanel = new FilterPanel({
|
|
96
|
+
enableReorder: false,
|
|
97
|
+
itemFactory: (oItem) => {
|
|
98
|
+
return this._itemFactory instanceof Function ? this._itemFactory(oItem, oFilterPanel) : new Input({
|
|
99
|
+
value: "{$p13n>conditions/0/values/0}"
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
oFilterPanel.setP13nData(oAdaptationData.items);
|
|
105
|
+
this._oPanel = oFilterPanel;
|
|
106
|
+
|
|
107
|
+
resolve(oFilterPanel);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const _hasProperty = (aPropertyInfo, sName) => {
|
|
114
|
+
return aPropertyInfo.some((oProperty) => {
|
|
115
|
+
//First check unique name
|
|
116
|
+
let bValid = oProperty.key === sName || oProperty.name === sName || sName == "$search";
|
|
117
|
+
|
|
118
|
+
//Use path as Fallback
|
|
119
|
+
bValid = bValid ? bValid : oProperty.path === sName;
|
|
120
|
+
|
|
121
|
+
return bValid;
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Searches for `oCondition` in `aConditions` and returns its index (or -1 if not found).
|
|
127
|
+
* @param {sap.m.p13n.FilterStateItem} oCondition
|
|
128
|
+
* @param {sap.m.p13n.FilterStateItem[]} aConditions
|
|
129
|
+
* @returns {int} Index of `oCondition` in `aConditions`
|
|
130
|
+
*/
|
|
131
|
+
FilterController.prototype._indexOfCondition = function(oCondition, aConditions) {
|
|
132
|
+
const oExistingCondition = aConditions.find((oExistingCondition) => oExistingCondition.operator == oCondition.operator && oExistingCondition.values[0] == oCondition.values[0]);
|
|
133
|
+
return aConditions.indexOf(oExistingCondition);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
FilterController.prototype._createConditionChange = function (sChangeType, oControl, sFieldPath, oCondition) {
|
|
137
|
+
delete oCondition.filtered; //Consider moving this to the delta calculation instead
|
|
138
|
+
|
|
139
|
+
const oConditionChange = {
|
|
140
|
+
selectorElement: oControl,
|
|
141
|
+
changeSpecificData: {
|
|
142
|
+
changeType: sChangeType,
|
|
143
|
+
content: this._createConditionChangeContent(sFieldPath, oCondition)
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
return oConditionChange;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
FilterController.prototype._createConditionChangeContent = (sFieldPath, oCondition) => {
|
|
151
|
+
return {
|
|
152
|
+
key: sFieldPath,
|
|
153
|
+
condition: oCondition
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Generates a set of changes based on the given conditions
|
|
159
|
+
*
|
|
160
|
+
* @param {string} sFieldPath The relevant fieldPath
|
|
161
|
+
* @param {sap.m.p13n.FilterStateItem[]} aConditions The conditions after they have been changed
|
|
162
|
+
* @param {sap.m.p13n.FilterStateItem[]} aOrigShadowConditions The conditions before they have been changed
|
|
163
|
+
* @param {sap.ui.core.Control} oControl Control instance which is being used to generate the changes
|
|
164
|
+
* @param {boolean} [bAbsoluteAppliance] Indicates whether the appliance should also implicitly remove entries in case they are not provided in the new state
|
|
165
|
+
*
|
|
166
|
+
* @returns {array} Array containing the delta based created changes
|
|
167
|
+
*/
|
|
168
|
+
FilterController.prototype._diffConditionPath = function(sFieldPath, aConditions, aOrigShadowConditions, oControl, bAbsoluteAppliance){
|
|
169
|
+
let oChange;
|
|
170
|
+
const aChanges = [];
|
|
171
|
+
const aOrigConditions = merge([], aConditions);
|
|
172
|
+
const aShadowConditions = aOrigShadowConditions ? merge([], aOrigShadowConditions) : [];
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
if (deepEqual(aConditions, aShadowConditions)) {
|
|
176
|
+
return aChanges;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const fnRemoveSameConditions = (aConditions, aShadowConditions) => {
|
|
180
|
+
let bRunAgain;
|
|
181
|
+
|
|
182
|
+
do {
|
|
183
|
+
bRunAgain = false;
|
|
184
|
+
|
|
185
|
+
for (let i = 0; i < aConditions.length; i++) {
|
|
186
|
+
|
|
187
|
+
const oNewCondition = aConditions[i];
|
|
188
|
+
const nConditionIdx = this._indexOfCondition(oNewCondition, aShadowConditions);
|
|
189
|
+
if (nConditionIdx > -1) {
|
|
190
|
+
|
|
191
|
+
aConditions.splice(i, 1);
|
|
192
|
+
|
|
193
|
+
if (bAbsoluteAppliance) {
|
|
194
|
+
aShadowConditions.splice(nConditionIdx, 1);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
bRunAgain = true;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
} while (bRunAgain);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
fnRemoveSameConditions(aConditions, aShadowConditions);
|
|
205
|
+
|
|
206
|
+
if ((aConditions.length > 0) || (aShadowConditions.length > 0)) {
|
|
207
|
+
|
|
208
|
+
aShadowConditions.forEach((oCondition) => {
|
|
209
|
+
//In case of absolute appliance always remove, in case of explicit appliance only remove if explicitly given in the new state via filtered=false
|
|
210
|
+
const iNewCondition = this._indexOfCondition(oCondition, aOrigConditions);
|
|
211
|
+
const bNewConditionExplicitlyRemoved = iNewCondition > -1 && aOrigConditions[iNewCondition].filtered === false;
|
|
212
|
+
if (bAbsoluteAppliance || bNewConditionExplicitlyRemoved) {
|
|
213
|
+
oChange = this._createConditionChange("removeCondition", oControl, sFieldPath, oCondition);
|
|
214
|
+
aChanges.push(oChange);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
aConditions.forEach((oCondition) => {
|
|
219
|
+
if (bAbsoluteAppliance || (!oCondition.hasOwnProperty("filtered") || oCondition.filtered !== false)) {
|
|
220
|
+
oChange = this._createConditionChange("addCondition", oControl, sFieldPath, oCondition);
|
|
221
|
+
aChanges.push(oChange);
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return aChanges;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Generates a set of changes based on the given arrays for a specified control
|
|
232
|
+
*
|
|
233
|
+
* @param {object} mDeltaInfo Map containing the necessary information to calculate the diff as change objects
|
|
234
|
+
* @param {sap.m.p13n.FilterState} mDeltaInfo.existingState An array describing the control state before a adaptation
|
|
235
|
+
* @param {sap.m.p13n.FilterState} mDeltaInfo.changedState An array describing the control state after a certain adaptation
|
|
236
|
+
* @param {sap.ui.core.Control} mDeltaInfo.control Control instance which is being used to generate the changes
|
|
237
|
+
* @param {boolean} [mDeltaInfo.applyAbsolute=true] Indicates whether the appliance should also implicitly remove entries in case they are not provided in the new state
|
|
238
|
+
* @param {object} mDeltaInfo.changeOperations Map containing the changeOperations for the given Control instance
|
|
239
|
+
* @param {string} mDeltaInfo.changeOperations.add Name of the control specific 'add' changehandler
|
|
240
|
+
* @param {string} mDeltaInfo.changeOperations.remove Name of the control specific 'remove' changehandler
|
|
241
|
+
* @param {string} [mDeltaInfo.changeOperations.move] Name of the control specific 'move' changehandler
|
|
242
|
+
* @param {string} [mDeltaInfo.generator] Name of the change generator (E.g. the namespace of the UI creating the change object)
|
|
243
|
+
*
|
|
244
|
+
* @returns {array} Array containing the delta based created changes
|
|
245
|
+
*/
|
|
246
|
+
FilterController.prototype.getConditionDeltaChanges = function(mDeltaInfo) {
|
|
247
|
+
let aConditionChanges = [];
|
|
248
|
+
|
|
249
|
+
const mNewConditionState = mDeltaInfo.changedState;
|
|
250
|
+
const mPreviousConditionState = mDeltaInfo.existingState;
|
|
251
|
+
const oAdaptationControl = mDeltaInfo.control;
|
|
252
|
+
const bAbsoluteAppliance = mDeltaInfo.hasOwnProperty("applyAbsolute") ? mDeltaInfo.applyAbsolute : true;
|
|
253
|
+
const aPropertyInfo = mDeltaInfo.propertyInfo;
|
|
254
|
+
|
|
255
|
+
for (const sFieldPath in mNewConditionState) {
|
|
256
|
+
const bValidProperty = _hasProperty(aPropertyInfo, sFieldPath);
|
|
257
|
+
if (!bValidProperty && oAdaptationControl.isA("sap.ui.mdc.Control") && oAdaptationControl.isPropertyHelperFinal()) {
|
|
258
|
+
Log.warning("property '" + sFieldPath + "' not supported");
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const aFilterConditionChanges = this._diffConditionPath(sFieldPath, mNewConditionState[sFieldPath], mPreviousConditionState[sFieldPath], oAdaptationControl, bAbsoluteAppliance);
|
|
263
|
+
aConditionChanges = aConditionChanges.concat(aFilterConditionChanges);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return aConditionChanges;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
FilterController.prototype.getDelta = function (mPropertyBag) {
|
|
270
|
+
const {existingState} = mPropertyBag;
|
|
271
|
+
let {changedState} = mPropertyBag;
|
|
272
|
+
|
|
273
|
+
if (deepEqual(existingState, changedState)) {
|
|
274
|
+
return [];
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (changedState instanceof Array) {
|
|
278
|
+
changedState = changedState.reduce((mConditions, oState) => {
|
|
279
|
+
const sKey = oState.key;
|
|
280
|
+
mConditions[sKey] = mConditions[sKey] || [];
|
|
281
|
+
oState.conditions.forEach((oConditionForKey) => {
|
|
282
|
+
if (oConditionForKey && oConditionForKey.values && oConditionForKey.values[0] !== undefined) {
|
|
283
|
+
mConditions[sKey].push(oConditionForKey);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
return mConditions;
|
|
287
|
+
}, {});
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return this.getConditionDeltaChanges({
|
|
291
|
+
...mPropertyBag,
|
|
292
|
+
changedState
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
FilterController.prototype._getChangeContent = (oProperty, aDeltaAttributes) => {
|
|
298
|
+
const oChangeContent = {};
|
|
299
|
+
|
|
300
|
+
aDeltaAttributes.forEach((sAttribute) => {
|
|
301
|
+
if (oProperty.hasOwnProperty(sAttribute)) {
|
|
302
|
+
oChangeContent[sAttribute] = oProperty[sAttribute];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
return oChangeContent;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
FilterController.prototype.mixInfoAndState = function (oPropertyHelper) {
|
|
310
|
+
|
|
311
|
+
const mExistingFilters = this.getCurrentState() || {};
|
|
312
|
+
|
|
313
|
+
const oP13nData = this.prepareAdaptationData(oPropertyHelper, (mItem, oProperty) => {
|
|
314
|
+
|
|
315
|
+
const aExistingFilters = mExistingFilters[mItem.name];
|
|
316
|
+
mItem.conditions = aExistingFilters || (this._itemFactory ? [] : [{
|
|
317
|
+
operator: "Contains",
|
|
318
|
+
values: []
|
|
319
|
+
}]);
|
|
320
|
+
mItem.active = aExistingFilters && aExistingFilters.length > 0;
|
|
321
|
+
|
|
322
|
+
return !(oProperty.filterable === false);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
this.sortP13nData({
|
|
326
|
+
visible: "active",
|
|
327
|
+
position: undefined
|
|
328
|
+
}, oP13nData.items);
|
|
329
|
+
|
|
330
|
+
return oP13nData;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
return FilterController;
|
|
334
|
+
|
|
335
|
+
});
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/m/p13n/QueryPanel",
|
|
8
|
+
"sap/m/VBox",
|
|
9
|
+
"sap/m/Text",
|
|
10
|
+
"sap/ui/layout/Grid",
|
|
11
|
+
"sap/ui/layout/GridData",
|
|
12
|
+
"sap/m/ComboBox",
|
|
13
|
+
"sap/ui/core/library",
|
|
14
|
+
"sap/m/library",
|
|
15
|
+
"sap/m/Label",
|
|
16
|
+
"sap/ui/core/Lib"
|
|
17
|
+
], (
|
|
18
|
+
QueryPanel,
|
|
19
|
+
VBox,
|
|
20
|
+
Text,
|
|
21
|
+
Grid,
|
|
22
|
+
GridData,
|
|
23
|
+
ComboBox,
|
|
24
|
+
coreLibrary,
|
|
25
|
+
mLibrary,
|
|
26
|
+
Label,
|
|
27
|
+
Library
|
|
28
|
+
) => {
|
|
29
|
+
"use strict";
|
|
30
|
+
|
|
31
|
+
//shortcut for sap.ui.core.ValueState
|
|
32
|
+
const ValueState = coreLibrary.ValueState;
|
|
33
|
+
|
|
34
|
+
// shortcut for sap.m.ListKeyboardMode
|
|
35
|
+
const ListKeyboardMode = mLibrary.ListKeyboardMode;
|
|
36
|
+
|
|
37
|
+
// shortcut for sap.m.FlexJustifyContent
|
|
38
|
+
const FlexJustifyContent = mLibrary.FlexJustifyContent;
|
|
39
|
+
|
|
40
|
+
// shortcut for sap.m.WrappingType
|
|
41
|
+
const WrappingType = mLibrary.WrappingType;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Constructor for a new <code>FilterPanel</code>.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
47
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
48
|
+
*
|
|
49
|
+
* @class
|
|
50
|
+
* This control can be used to customize personalization content for filtering
|
|
51
|
+
* for an associated control instance.
|
|
52
|
+
*
|
|
53
|
+
* @extends sap.m.p13n.QueryPanel
|
|
54
|
+
*
|
|
55
|
+
* @author SAP SE
|
|
56
|
+
* @version 1.121.0
|
|
57
|
+
*
|
|
58
|
+
* @private
|
|
59
|
+
* @since 1.121
|
|
60
|
+
* @alias sap.m.p13n.FilterPanel
|
|
61
|
+
*/
|
|
62
|
+
const FilterPanel = QueryPanel.extend("sap.m.p13n.FilterPanel", {
|
|
63
|
+
metadata: {
|
|
64
|
+
library: "sap.m",
|
|
65
|
+
properties: {
|
|
66
|
+
/**
|
|
67
|
+
* A factory function that is called whenever the user selects a new entry from the <code>ComboBox</code>.
|
|
68
|
+
* The factory must return a single control instance of an input-based control to provide custom filter capabilities.
|
|
69
|
+
* This control is then going to be added in the grid layout provided by the <code>QueryPanel</code>.
|
|
70
|
+
* Whenever the <code>FilterPanel#setP13nData</code> method is called, <code>active</code> can be used to update the
|
|
71
|
+
* current set of active factory controls.
|
|
72
|
+
*
|
|
73
|
+
* <b>Note:</b>: The panel does not handle the lifecylce of the provided factory control instance, if the row is removed. The consumer needs to decide about destroying or keeping the control instance.
|
|
74
|
+
* In addition, the <code>getIdForLabel</code> method can be used to return a focusable child control to provide the <code>labelFor</code> reference.
|
|
75
|
+
*/
|
|
76
|
+
itemFactory: {
|
|
77
|
+
type: "function"
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* A short text describing the panel.
|
|
81
|
+
* <b>Note:</b> This text will only be displayed if the panel is being used in a <code>sap.m.p13n.Popup</code>.
|
|
82
|
+
*/
|
|
83
|
+
title: {
|
|
84
|
+
type: "string",
|
|
85
|
+
defaultValue: Library.getResourceBundleFor("sap.m").getText("p13n.DEFAULT_TITLE_FILTER")
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
renderer: {
|
|
90
|
+
apiVersion: 2
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Personalization <code>FilterItem</code> object type.
|
|
96
|
+
*
|
|
97
|
+
* @static
|
|
98
|
+
* @constant
|
|
99
|
+
* @typedef {object} sap.m.p13n.FilterItem
|
|
100
|
+
* @property {string} name The unique key of the item
|
|
101
|
+
* @property {string} label The label describing the personalization item
|
|
102
|
+
* @property {boolean} active Defines whether there is a visible grid shown in the panel for this key, also triggers the call of the <code>#itemFactory</code> function
|
|
103
|
+
* @property {object[]} [conditions] The conditions that are optionally used for persisted when using the <code>FilterPanel</code> within a <code>FilterController</code>
|
|
104
|
+
*
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Sets the personalization state of the panel instance.
|
|
110
|
+
*
|
|
111
|
+
* @name sap.m.p13n.FilterPanel.prototype.setP13nData
|
|
112
|
+
* @function
|
|
113
|
+
* @param {sap.m.p13n.FilterItem[]} aP13nData An array containing the personalization state
|
|
114
|
+
* @returns {this} The FilterPanel instance
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
FilterPanel.prototype.PRESENCE_ATTRIBUTE = "active";
|
|
118
|
+
|
|
119
|
+
FilterPanel.prototype._createInnerListControl = function() {
|
|
120
|
+
const oList = QueryPanel.prototype._createInnerListControl.apply(this, arguments);
|
|
121
|
+
return oList;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
FilterPanel.prototype._createQueryRowGrid = function(oItem) {
|
|
125
|
+
|
|
126
|
+
const oRowContent = oItem.name ? this._createRowContainer(oItem.label, oItem.key) : this._createKeySelect(oItem.name);
|
|
127
|
+
|
|
128
|
+
const aContent = [oRowContent];
|
|
129
|
+
if (oItem.name) {
|
|
130
|
+
const oFilterItem = this._createFactoryControl(oItem);
|
|
131
|
+
aContent.push(oFilterItem);
|
|
132
|
+
this._setLabelForOnBox(oFilterItem, oRowContent);
|
|
133
|
+
}
|
|
134
|
+
return new Grid({
|
|
135
|
+
containerQuery: true,
|
|
136
|
+
defaultSpan: "XL4 L4 M4 S4",
|
|
137
|
+
content: aContent
|
|
138
|
+
}).addStyleClass("sapUiTinyMargin");
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
FilterPanel.prototype._getPlaceholderText = function() {
|
|
142
|
+
return this._getResourceText("p13n.FILTER_PLACEHOLDER");
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
FilterPanel.prototype._getRemoveButtonTooltipText = function() {
|
|
146
|
+
return this._getResourceText("p13n.FILTER_REMOVEICONTOOLTIP");
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
FilterPanel.prototype._getRemoveButtonAnnouncementText = function() {
|
|
150
|
+
return this._getResourceText("p13n.FILTER_REMOVEICONANNOUNCE");
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
FilterPanel.prototype._createKeySelect = function(sKey) {
|
|
154
|
+
|
|
155
|
+
const oComboBox = new ComboBox({
|
|
156
|
+
width: "100%",
|
|
157
|
+
items: this._getAvailableItems(),
|
|
158
|
+
placeholder: this._getPlaceholderText(),
|
|
159
|
+
selectionChange: (oEvt) => {
|
|
160
|
+
const oComboBox = oEvt.getSource();
|
|
161
|
+
this._selectKey(oComboBox);
|
|
162
|
+
},
|
|
163
|
+
change: (oEvt) => {
|
|
164
|
+
const oComboBox = oEvt.getSource();
|
|
165
|
+
const newValue = oEvt.getParameter("newValue");
|
|
166
|
+
oComboBox.setValueState(newValue && !oComboBox.getSelectedItem() ? ValueState.Error : ValueState.None);
|
|
167
|
+
this._selectKey();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
oComboBox.setLayoutData(new GridData({
|
|
172
|
+
span: "XL4 L4 M4 S11"
|
|
173
|
+
}));
|
|
174
|
+
|
|
175
|
+
return oComboBox;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
FilterPanel.prototype._createRemoveButton = function(bVisible) {
|
|
179
|
+
const oRemoveBtn = QueryPanel.prototype._createRemoveButton.apply(this, arguments);
|
|
180
|
+
oRemoveBtn.setJustifyContent(FlexJustifyContent.Start); //avoid remove button overlapping with input field
|
|
181
|
+
oRemoveBtn.setLayoutData(new GridData({
|
|
182
|
+
span: "XL1 L1 M1 S1"
|
|
183
|
+
}));
|
|
184
|
+
return oRemoveBtn;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
FilterPanel.prototype._createRowContainer = (sText, sKey) => {
|
|
188
|
+
// var sKey = oSelect._key;
|
|
189
|
+
const oLabel = new Label({
|
|
190
|
+
text: sText,
|
|
191
|
+
showColon: true,
|
|
192
|
+
wrapping: true,
|
|
193
|
+
wrappingType: WrappingType.Hyphenated
|
|
194
|
+
});
|
|
195
|
+
const oFieldBox = new VBox({
|
|
196
|
+
items: [oLabel.addStyleClass("sapUiTinyMarginBegin")]
|
|
197
|
+
});
|
|
198
|
+
oFieldBox._key = sKey;
|
|
199
|
+
return oFieldBox;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
FilterPanel.prototype._setLabelForOnBox = (oFilterItem, oFieldBox) => {
|
|
203
|
+
oFieldBox.getItems()[0].setLabelFor(oFilterItem);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
FilterPanel.prototype._selectKey = function(oComboBox) {
|
|
207
|
+
let oQueryRowGrid, sKey;
|
|
208
|
+
if (oComboBox) {
|
|
209
|
+
this._oComboBox = oComboBox;
|
|
210
|
+
oQueryRowGrid = oComboBox.getParent();
|
|
211
|
+
sKey = oComboBox.getSelectedKey();
|
|
212
|
+
} else if (this._oComboBox) {
|
|
213
|
+
oComboBox = this._oComboBox;
|
|
214
|
+
oQueryRowGrid = oComboBox.getParent();
|
|
215
|
+
sKey = oComboBox.getSelectedKey();
|
|
216
|
+
|
|
217
|
+
if (sKey) {
|
|
218
|
+
QueryPanel.prototype._selectKey.call(this, oComboBox);
|
|
219
|
+
|
|
220
|
+
const oSelect = oQueryRowGrid.getContent()[0];
|
|
221
|
+
oQueryRowGrid.removeContent(oSelect);
|
|
222
|
+
|
|
223
|
+
const sText = sKey ? oComboBox.getSelectedItem().getText() : "";
|
|
224
|
+
|
|
225
|
+
const oFieldBox = this._createRowContainer(sText, sKey); //Create a container with a VBox and a label with some padding inside and insert it in the grid
|
|
226
|
+
oQueryRowGrid.insertContent(oFieldBox, 0);
|
|
227
|
+
|
|
228
|
+
const oFilterItem = this._createFactoryControl({
|
|
229
|
+
name: sKey
|
|
230
|
+
}); //Create the actual filterable control and insert it in the grid
|
|
231
|
+
this._setLabelForOnBox(oFilterItem, oFieldBox);
|
|
232
|
+
|
|
233
|
+
oQueryRowGrid.insertContent(oFilterItem, 1);
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
//FIXME: Check why this workaround is necessary
|
|
238
|
+
setTimeout(() => {
|
|
239
|
+
if (this._oListControl && !this._oListControl.bIsDestroyed) {
|
|
240
|
+
this._oListControl.setKeyboardMode(ListKeyboardMode.Edit);
|
|
241
|
+
}
|
|
242
|
+
}, 20);
|
|
243
|
+
|
|
244
|
+
delete this._oComboBox;
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @private
|
|
250
|
+
* Retrieve the factory control for a current row
|
|
251
|
+
* @param {sap.m.CustomListItem} oRow The list item
|
|
252
|
+
* @returns {sap.ui.core.Control} The factory control of the provided row
|
|
253
|
+
*/
|
|
254
|
+
FilterPanel.prototype._getFactoryControlForRow = (oRow) => {
|
|
255
|
+
return oRow.getContent()[0].getContent()[1];
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
FilterPanel.prototype._createFactoryControl = function(oItem) {
|
|
259
|
+
const oField = this.getItemFactory().call(this, oItem);
|
|
260
|
+
oField.setLayoutData(new GridData({
|
|
261
|
+
span: "XL7 L7 M7 S7"
|
|
262
|
+
}));
|
|
263
|
+
|
|
264
|
+
let iModelIndex;
|
|
265
|
+
this._getP13nModel().getProperty("/items").forEach((oP13nItem, index) => {
|
|
266
|
+
if (oP13nItem.key == oItem.name) {
|
|
267
|
+
iModelIndex = index;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
const oBindingContext = this._getP13nModel().createBindingContext(`/items/${iModelIndex}/`);
|
|
271
|
+
oField.setBindingContext(oBindingContext, this.P13N_MODEL);
|
|
272
|
+
|
|
273
|
+
return oField;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
FilterPanel.prototype._updatePresence = function(sKey, bAdd, iNewIndex) {
|
|
277
|
+
QueryPanel.prototype._updatePresence.apply(this, arguments);
|
|
278
|
+
|
|
279
|
+
if (!bAdd) {
|
|
280
|
+
const oRelevant = this._getP13nModel().getProperty("/items").find((oItem) => {
|
|
281
|
+
return oItem.name === sKey;
|
|
282
|
+
});
|
|
283
|
+
oRelevant.conditions = [{
|
|
284
|
+
operator: "Contains",
|
|
285
|
+
conditions: []
|
|
286
|
+
}];
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
return FilterPanel;
|
|
291
|
+
});
|