@openui5/sap.m 1.103.1 → 1.104.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/.eslintrc.json +2 -3
- package/.reuse/dep5 +17 -0
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +35 -2
- package/package.json +4 -4
- package/src/sap/m/.library +1 -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/App.js +1 -1
- package/src/sap/m/AssociativeOverflowToolbar.js +1 -1
- package/src/sap/m/Avatar.js +1 -1
- package/src/sap/m/Bar.js +11 -10
- package/src/sap/m/Breadcrumbs.js +2 -2
- package/src/sap/m/BusyDialog.js +1 -1
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +3 -2
- package/src/sap/m/Carousel.js +1 -1
- package/src/sap/m/CarouselLayout.js +1 -1
- package/src/sap/m/CheckBox.js +1 -1
- package/src/sap/m/ColorPalette.js +1 -1
- package/src/sap/m/ColorPalettePopover.js +1 -1
- package/src/sap/m/Column.js +1 -1
- package/src/sap/m/ColumnHeaderPopover.js +1 -1
- package/src/sap/m/ColumnListItem.js +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 +1 -1
- package/src/sap/m/ComboBoxTextField.js +1 -1
- package/src/sap/m/CustomDynamicDateOption.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 +14 -22
- package/src/sap/m/DateRangeSelection.js +45 -38
- package/src/sap/m/DateTimeField.js +87 -20
- package/src/sap/m/DateTimeInput.js +1 -1
- package/src/sap/m/DateTimePicker.js +40 -21
- 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 +6 -4
- package/src/sap/m/DynamicDateRange.js +3 -2
- package/src/sap/m/DynamicDateValueHelpUIType.js +1 -1
- package/src/sap/m/ExpandableText.js +1 -1
- package/src/sap/m/FacetFilter.js +1 -1
- package/src/sap/m/FacetFilterItem.js +1 -1
- package/src/sap/m/FacetFilterList.js +1 -1
- package/src/sap/m/FeedContent.js +1 -1
- package/src/sap/m/FeedInput.js +1 -1
- package/src/sap/m/FeedListItem.js +1 -1
- package/src/sap/m/FeedListItemAction.js +1 -1
- package/src/sap/m/Fiori20Adapter.js +2 -2
- package/src/sap/m/FlexBox.js +1 -1
- package/src/sap/m/FlexItemData.js +1 -1
- package/src/sap/m/FormattedText.js +1 -1
- package/src/sap/m/GenericTag.js +1 -1
- package/src/sap/m/GenericTile.js +12 -9
- package/src/sap/m/GenericTileLineModeRenderer.js +4 -4
- package/src/sap/m/GenericTileRenderer.js +16 -4
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GrowingEnablement.js +11 -4
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +3 -3
- 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 +7 -2
- package/src/sap/m/IconTabSeparator.js +1 -1
- package/src/sap/m/IllustratedMessage.js +63 -24
- package/src/sap/m/IllustratedMessageRenderer.js +10 -6
- package/src/sap/m/Illustration.js +1 -1
- package/src/sap/m/IllustrationPool.js +1 -0
- package/src/sap/m/Image.js +1 -1
- package/src/sap/m/ImageContent.js +1 -1
- package/src/sap/m/Input.js +1 -4
- package/src/sap/m/InputBase.js +1 -1
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/Label.js +1 -1
- package/src/sap/m/LightBox.js +1 -1
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +41 -5
- package/src/sap/m/LinkRenderer.js +18 -10
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +4 -1
- package/src/sap/m/ListItemBase.js +10 -2
- package/src/sap/m/MaskEnabler.js +52 -2
- package/src/sap/m/MaskInput.js +23 -1
- package/src/sap/m/MaskInputRule.js +1 -1
- package/src/sap/m/Menu.js +1 -1
- package/src/sap/m/MenuButton.js +1 -1
- package/src/sap/m/MenuItem.js +1 -1
- package/src/sap/m/MenuListItem.js +1 -1
- package/src/sap/m/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 +4 -1
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +1 -1
- package/src/sap/m/MessageToast.js +1 -1
- package/src/sap/m/MessageView.js +1 -1
- package/src/sap/m/MultiComboBox.js +1 -1
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +1 -1
- package/src/sap/m/NavContainer.js +20 -16
- package/src/sap/m/NewsContent.js +1 -1
- package/src/sap/m/NotificationList.js +1 -1
- package/src/sap/m/NotificationListBase.js +1 -1
- package/src/sap/m/NotificationListGroup.js +1 -1
- package/src/sap/m/NotificationListItem.js +1 -1
- package/src/sap/m/NumericContent.js +1 -1
- package/src/sap/m/NumericInput.js +1 -1
- package/src/sap/m/ObjectAttribute.js +1 -1
- package/src/sap/m/ObjectHeader.js +1 -1
- package/src/sap/m/ObjectIdentifier.js +1 -1
- package/src/sap/m/ObjectListItem.js +1 -1
- package/src/sap/m/ObjectMarker.js +1 -1
- package/src/sap/m/ObjectNumber.js +1 -1
- package/src/sap/m/ObjectNumberRenderer.js +10 -3
- package/src/sap/m/ObjectStatus.js +1 -1
- package/src/sap/m/OverflowToolbar.js +1 -1
- package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
- package/src/sap/m/OverflowToolbarButton.js +1 -1
- package/src/sap/m/OverflowToolbarLayoutData.js +1 -1
- package/src/sap/m/OverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/P13nAnyFilterItem.js +1 -1
- package/src/sap/m/P13nColumnsItem.js +1 -1
- package/src/sap/m/P13nColumnsPanel.js +1 -1
- package/src/sap/m/P13nConditionPanel.js +1 -1
- package/src/sap/m/P13nDialog.js +1 -1
- package/src/sap/m/P13nDimMeasureItem.js +1 -1
- package/src/sap/m/P13nDimMeasurePanel.js +1 -1
- package/src/sap/m/P13nFilterItem.js +1 -1
- package/src/sap/m/P13nFilterPanel.js +1 -1
- package/src/sap/m/P13nGroupItem.js +1 -1
- package/src/sap/m/P13nGroupPanel.js +1 -1
- package/src/sap/m/P13nItem.js +1 -1
- package/src/sap/m/P13nPanel.js +1 -1
- package/src/sap/m/P13nSelectionItem.js +1 -1
- package/src/sap/m/P13nSelectionPanel.js +1 -1
- package/src/sap/m/P13nSortItem.js +1 -1
- package/src/sap/m/P13nSortPanel.js +1 -1
- package/src/sap/m/PDFViewer.js +2 -2
- package/src/sap/m/PDFViewerRenderer.js +1 -0
- 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 +1 -1
- package/src/sap/m/PlanningCalendarHeader.js +1 -1
- package/src/sap/m/PlanningCalendarLegend.js +1 -1
- package/src/sap/m/PlanningCalendarRow.js +1 -1
- package/src/sap/m/PlanningCalendarView.js +1 -1
- package/src/sap/m/Popover.js +4 -4
- package/src/sap/m/ProgressIndicator.js +1 -1
- package/src/sap/m/ProgressIndicatorRenderer.js +6 -3
- package/src/sap/m/PullToRefresh.js +1 -1
- package/src/sap/m/QuickView.js +1 -1
- package/src/sap/m/QuickViewBase.js +1 -1
- package/src/sap/m/QuickViewCard.js +1 -1
- package/src/sap/m/QuickViewGroup.js +1 -1
- package/src/sap/m/QuickViewGroupElement.js +1 -1
- package/src/sap/m/QuickViewPage.js +1 -1
- package/src/sap/m/RadioButton.js +1 -1
- package/src/sap/m/RadioButtonGroup.js +1 -1
- package/src/sap/m/RangeSlider.js +1 -1
- package/src/sap/m/RatingIndicator.js +8 -1
- package/src/sap/m/RatingIndicatorRenderer.js +13 -4
- package/src/sap/m/ResponsivePopover.js +1 -1
- package/src/sap/m/ResponsiveScale.js +1 -1
- package/src/sap/m/ScrollBar.js +1 -1
- package/src/sap/m/ScrollContainer.js +1 -1
- package/src/sap/m/SearchField.js +1 -1
- package/src/sap/m/SegmentedButton.js +1 -1
- package/src/sap/m/SegmentedButtonItem.js +1 -1
- package/src/sap/m/Select.js +5 -12
- package/src/sap/m/SelectDialog.js +1 -1
- package/src/sap/m/SelectDialogBase.js +1 -1
- package/src/sap/m/SelectList.js +1 -1
- package/src/sap/m/SelectionDetails.js +1 -1
- package/src/sap/m/SelectionDetailsFacade.js +2 -2
- package/src/sap/m/SelectionDetailsItem.js +1 -1
- package/src/sap/m/SelectionDetailsItemLine.js +1 -1
- package/src/sap/m/Shell.js +1 -1
- package/src/sap/m/SimpleFixFlex.js +1 -1
- package/src/sap/m/SinglePlanningCalendar.js +1 -1
- package/src/sap/m/SinglePlanningCalendarDayView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarGrid.js +1 -1
- package/src/sap/m/SinglePlanningCalendarMonthGrid.js +1 -1
- package/src/sap/m/SinglePlanningCalendarMonthView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWeekView.js +1 -1
- package/src/sap/m/SinglePlanningCalendarWorkWeekView.js +1 -1
- package/src/sap/m/SlideTile.js +1 -1
- package/src/sap/m/Slider.js +1 -1
- package/src/sap/m/SliderTooltip.js +1 -1
- package/src/sap/m/SliderTooltipBase.js +1 -1
- package/src/sap/m/SliderTooltipContainer.js +1 -1
- package/src/sap/m/SplitApp.js +1 -1
- package/src/sap/m/SplitButton.js +1 -1
- package/src/sap/m/SplitContainer.js +1 -1
- package/src/sap/m/StandardDynamicDateOption.js +1 -1
- package/src/sap/m/StandardListItem.js +1 -1
- package/src/sap/m/StandardTile.js +1 -1
- package/src/sap/m/StandardTreeItem.js +1 -1
- package/src/sap/m/StepInput.js +1 -1
- package/src/sap/m/SuggestionItem.js +1 -1
- package/src/sap/m/SuggestionsPopover.js +1 -1
- package/src/sap/m/Switch.js +1 -1
- package/src/sap/m/TabContainer.js +1 -1
- package/src/sap/m/TabContainerItem.js +1 -1
- package/src/sap/m/TabStrip.js +1 -1
- package/src/sap/m/TabStripItem.js +1 -1
- package/src/sap/m/Table.js +1 -1
- package/src/sap/m/TablePersoController.js +1 -1
- package/src/sap/m/TablePersoDialog.js +1 -1
- package/src/sap/m/TablePersoProvider.js +1 -1
- package/src/sap/m/TableSelectDialog.js +1 -1
- package/src/sap/m/Text.js +1 -1
- package/src/sap/m/TextArea.js +1 -1
- package/src/sap/m/Tile.js +1 -1
- package/src/sap/m/TileContainer.js +1 -1
- package/src/sap/m/TileContent.js +8 -9
- package/src/sap/m/TileContentRenderer.js +1 -1
- package/src/sap/m/TimePicker.js +43 -6
- package/src/sap/m/TimePickerClock.js +1 -1
- package/src/sap/m/TimePickerClocks.js +5 -3
- 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 +2 -2
- package/src/sap/m/Token.js +1 -1
- package/src/sap/m/Tokenizer.js +1 -1
- package/src/sap/m/Toolbar.js +1 -1
- package/src/sap/m/ToolbarLayoutData.js +1 -1
- package/src/sap/m/ToolbarSeparator.js +1 -1
- package/src/sap/m/ToolbarSpacer.js +1 -1
- package/src/sap/m/Tree.js +1 -1
- package/src/sap/m/TreeItemBase.js +1 -1
- package/src/sap/m/UploadCollection.js +2 -2
- package/src/sap/m/UploadCollectionItem.js +1 -1
- package/src/sap/m/UploadCollectionParameter.js +1 -1
- package/src/sap/m/UploadCollectionToolbarPlaceholder.js +1 -1
- package/src/sap/m/VBox.js +1 -1
- package/src/sap/m/ValueStateHeader.js +1 -1
- package/src/sap/m/VariantItem.js +160 -0
- package/src/sap/m/VariantManagement.js +610 -547
- package/src/sap/m/ViewSettingsCustomItem.js +1 -1
- package/src/sap/m/ViewSettingsCustomTab.js +1 -1
- package/src/sap/m/ViewSettingsDialog.js +1 -1
- package/src/sap/m/ViewSettingsFilterItem.js +1 -1
- package/src/sap/m/ViewSettingsItem.js +1 -1
- package/src/sap/m/VisibleItem.js +1 -1
- package/src/sap/m/WheelSlider.js +1 -1
- package/src/sap/m/WheelSliderContainer.js +1 -1
- package/src/sap/m/Wizard.js +1 -1
- package/src/sap/m/WizardProgressNavigator.js +1 -1
- package/src/sap/m/WizardStep.js +1 -1
- package/src/sap/m/changeHandler/AddTableColumn.js +1 -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 +2 -2
- package/src/sap/m/changeHandler/SelectIconTabBarFilter.js +1 -1
- package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
- package/src/sap/m/designtime/VariantManagement.designtime.js +34 -24
- package/src/sap/m/flexibility/EngineFlex.js +48 -0
- package/src/sap/m/library.js +29 -6
- package/src/sap/m/messagebundle.properties +23 -1
- package/src/sap/m/messagebundle_ar.properties +16 -5
- package/src/sap/m/messagebundle_bg.properties +11 -0
- package/src/sap/m/messagebundle_ca.properties +11 -0
- package/src/sap/m/messagebundle_cs.properties +11 -0
- package/src/sap/m/messagebundle_cy.properties +11 -0
- package/src/sap/m/messagebundle_da.properties +11 -0
- package/src/sap/m/messagebundle_de.properties +11 -0
- package/src/sap/m/messagebundle_el.properties +12 -1
- package/src/sap/m/messagebundle_en.properties +11 -0
- package/src/sap/m/messagebundle_en_GB.properties +11 -0
- package/src/sap/m/messagebundle_en_US_sappsd.properties +11 -0
- package/src/sap/m/messagebundle_en_US_saprigi.properties +9 -0
- package/src/sap/m/messagebundle_en_US_saptrc.properties +11 -0
- package/src/sap/m/messagebundle_es.properties +11 -0
- package/src/sap/m/messagebundle_es_MX.properties +11 -0
- package/src/sap/m/messagebundle_et.properties +11 -0
- package/src/sap/m/messagebundle_fi.properties +14 -3
- package/src/sap/m/messagebundle_fr.properties +11 -0
- package/src/sap/m/messagebundle_fr_CA.properties +11 -0
- package/src/sap/m/messagebundle_hi.properties +11 -0
- package/src/sap/m/messagebundle_hr.properties +15 -4
- package/src/sap/m/messagebundle_hu.properties +13 -2
- package/src/sap/m/messagebundle_id.properties +11 -0
- package/src/sap/m/messagebundle_it.properties +12 -1
- package/src/sap/m/messagebundle_iw.properties +12 -1
- package/src/sap/m/messagebundle_ja.properties +11 -0
- package/src/sap/m/messagebundle_kk.properties +11 -0
- package/src/sap/m/messagebundle_ko.properties +17 -6
- package/src/sap/m/messagebundle_lt.properties +11 -0
- package/src/sap/m/messagebundle_lv.properties +11 -0
- package/src/sap/m/messagebundle_ms.properties +11 -0
- package/src/sap/m/messagebundle_nl.properties +25 -14
- package/src/sap/m/messagebundle_no.properties +12 -1
- package/src/sap/m/messagebundle_pl.properties +12 -1
- package/src/sap/m/messagebundle_pt.properties +15 -4
- package/src/sap/m/messagebundle_pt_PT.properties +11 -0
- package/src/sap/m/messagebundle_ro.properties +11 -0
- package/src/sap/m/messagebundle_ru.properties +11 -0
- package/src/sap/m/messagebundle_sh.properties +11 -0
- package/src/sap/m/messagebundle_sk.properties +11 -0
- package/src/sap/m/messagebundle_sl.properties +11 -0
- package/src/sap/m/messagebundle_sv.properties +11 -0
- package/src/sap/m/messagebundle_th.properties +34 -23
- package/src/sap/m/messagebundle_tr.properties +11 -0
- package/src/sap/m/messagebundle_uk.properties +11 -0
- package/src/sap/m/messagebundle_vi.properties +11 -0
- package/src/sap/m/messagebundle_zh_CN.properties +11 -0
- package/src/sap/m/messagebundle_zh_TW.properties +11 -0
- package/src/sap/m/p13n/AbstractContainer.js +5 -5
- package/src/sap/m/p13n/AbstractContainerItem.js +2 -2
- package/src/sap/m/p13n/BasePanel.js +4 -3
- package/src/sap/m/p13n/Container.js +1 -1
- package/src/sap/m/p13n/Engine.js +1253 -0
- package/src/sap/m/p13n/FlexUtil.js +162 -0
- package/src/sap/m/p13n/GroupController.js +145 -0
- package/src/sap/m/p13n/GroupPanel.js +10 -3
- package/src/sap/m/p13n/MetadataHelper.js +35 -0
- package/src/sap/m/p13n/PersistenceProvider.js +135 -0
- package/src/sap/m/p13n/Popup.js +46 -9
- package/src/sap/m/p13n/QueryPanel.js +1 -1
- package/src/sap/m/p13n/SelectionController.js +563 -0
- package/src/sap/m/p13n/SelectionPanel.js +13 -1
- package/src/sap/m/p13n/SortController.js +153 -0
- package/src/sap/m/p13n/SortPanel.js +11 -1
- package/src/sap/m/p13n/enum/PersistenceMode.js +43 -0
- package/src/sap/m/p13n/handler/xConfigHandler.js +166 -0
- package/src/sap/m/p13n/modification/FlexModificationHandler.js +90 -0
- package/src/sap/m/p13n/modification/LocalStorageModificationHandler.js +75 -0
- package/src/sap/m/p13n/modification/ModificationHandler.js +133 -0
- package/src/sap/m/p13n/modules/AdaptationProvider.js +67 -0
- package/src/sap/m/p13n/modules/DefaultProviderRegistry.js +124 -0
- package/src/sap/m/p13n/modules/StateHandlerRegistry.js +101 -0
- package/src/sap/m/p13n/modules/UIManager.js +230 -0
- package/src/sap/m/p13n/modules/xConfigAPI.js +286 -0
- package/src/sap/m/plugins/ColumnResizer.js +15 -1
- package/src/sap/m/plugins/DataStateIndicator.js +2 -2
- package/src/sap/m/plugins/PasteProvider.js +1 -1
- package/src/sap/m/plugins/PluginBase.js +1 -1
- package/src/sap/m/semantic/AddAction.js +1 -1
- package/src/sap/m/semantic/CancelAction.js +1 -1
- package/src/sap/m/semantic/DeleteAction.js +1 -1
- package/src/sap/m/semantic/DetailPage.js +1 -1
- package/src/sap/m/semantic/DiscussInJamAction.js +1 -1
- package/src/sap/m/semantic/EditAction.js +1 -1
- package/src/sap/m/semantic/FavoriteAction.js +1 -1
- package/src/sap/m/semantic/FilterAction.js +1 -1
- package/src/sap/m/semantic/FilterSelect.js +1 -1
- package/src/sap/m/semantic/FlagAction.js +1 -1
- package/src/sap/m/semantic/ForwardAction.js +1 -1
- package/src/sap/m/semantic/FullscreenPage.js +1 -1
- package/src/sap/m/semantic/GroupAction.js +1 -1
- package/src/sap/m/semantic/GroupSelect.js +1 -1
- package/src/sap/m/semantic/MainAction.js +1 -1
- package/src/sap/m/semantic/MasterPage.js +1 -1
- package/src/sap/m/semantic/MessagesIndicator.js +1 -1
- package/src/sap/m/semantic/MultiSelectAction.js +1 -1
- package/src/sap/m/semantic/NegativeAction.js +1 -1
- package/src/sap/m/semantic/OpenInAction.js +1 -1
- package/src/sap/m/semantic/PositiveAction.js +1 -1
- package/src/sap/m/semantic/PrintAction.js +1 -1
- package/src/sap/m/semantic/SaveAction.js +1 -1
- package/src/sap/m/semantic/Segment.js +1 -1
- package/src/sap/m/semantic/SegmentedContainer.js +1 -1
- package/src/sap/m/semantic/SemanticButton.js +1 -1
- package/src/sap/m/semantic/SemanticConfiguration.js +1 -1
- package/src/sap/m/semantic/SemanticControl.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarButton.js +1 -1
- package/src/sap/m/semantic/SemanticOverflowToolbarToggleButton.js +1 -1
- package/src/sap/m/semantic/SemanticPage.js +1 -1
- package/src/sap/m/semantic/SemanticSelect.js +1 -1
- package/src/sap/m/semantic/SemanticToggleButton.js +1 -1
- package/src/sap/m/semantic/SendEmailAction.js +1 -1
- package/src/sap/m/semantic/SendMessageAction.js +1 -1
- package/src/sap/m/semantic/ShareInJamAction.js +1 -1
- package/src/sap/m/semantic/ShareMenu.js +1 -1
- package/src/sap/m/semantic/ShareMenuPage.js +1 -1
- package/src/sap/m/semantic/SortAction.js +1 -1
- package/src/sap/m/semantic/SortSelect.js +1 -1
- package/src/sap/m/table/Util.js +8 -3
- 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 +8 -2
- 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 +21 -1
- package/src/sap/m/table/columnmenu/QuickGroupItem.js +13 -1
- package/src/sap/m/table/columnmenu/QuickSort.js +1 -1
- package/src/sap/m/table/columnmenu/QuickSortItem.js +1 -1
- package/src/sap/m/table/columnmenu/QuickTotal.js +21 -1
- package/src/sap/m/table/columnmenu/QuickTotalItem.js +13 -1
- package/src/sap/m/themes/base/Breadcrumbs.less +6 -0
- package/src/sap/m/themes/base/CheckBox.less +1 -0
- package/src/sap/m/themes/base/Dialog.less +1 -0
- package/src/sap/m/themes/base/FeedContent.less +13 -5
- package/src/sap/m/themes/base/GenericTile.less +39 -9
- package/src/sap/m/themes/base/IllustratedMessage.less +7 -0
- package/src/sap/m/themes/base/NumericContent.less +1 -1
- package/src/sap/m/themes/base/ObjectStatus.less +2 -1
- package/src/sap/m/themes/base/OverflowToolbarAssociativePopover.less +5 -1
- package/src/sap/m/themes/base/SelectList.less +0 -5
- package/src/sap/m/themes/base/SinglePlanningCalendarGrid.less +7 -0
- package/src/sap/m/themes/base/SlideTile.less +20 -4
- package/src/sap/m/themes/base/Table.less +11 -1
- package/src/sap/m/themes/base/TileContent.less +17 -0
- package/src/sap/m/upload/UploadSet.js +98 -15
- package/src/sap/m/upload/UploadSetItem.js +13 -1
- package/src/sap/m/upload/UploadSetRenderer.js +8 -16
- package/src/sap/m/upload/UploadSetToolbarPlaceholder.js +1 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 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
|
+
'sap/m/p13n/SelectionController', 'sap/m/p13n/SortPanel', 'sap/m/p13n/modules/xConfigAPI'
|
|
9
|
+
], function (BaseController, SortPanel, xConfigAPI) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Constructor for a new <code>SortController</code>.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
16
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
17
|
+
* @param {sap.ui.core.Control} mSettings.control The control instance to be personalized by this controller
|
|
18
|
+
*
|
|
19
|
+
* @class
|
|
20
|
+
* The <code>SortController</code> serves as base class to create sort specific personalization implementations.
|
|
21
|
+
*
|
|
22
|
+
* @extends sap.ui.base.Object
|
|
23
|
+
*
|
|
24
|
+
* @author SAP SE
|
|
25
|
+
* @version 1.104.0
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
* @experimental Since 1.104. Please note that the API of this control is not yet finalized!
|
|
29
|
+
* @alias sap.m.p13n.SortController
|
|
30
|
+
*/
|
|
31
|
+
var SortController = BaseController.extend("sap.m.p13n.SortController", {
|
|
32
|
+
constructor: function() {
|
|
33
|
+
BaseController.apply(this, arguments);
|
|
34
|
+
this._bResetEnabled = true;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
SortController.prototype.getStateKey = function() {
|
|
39
|
+
return "sorters";
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
SortController.prototype.getDelta = function(mPropertyBag) {
|
|
43
|
+
mPropertyBag.deltaAttributes.push("descending");
|
|
44
|
+
return BaseController.prototype.getDelta.apply(this, arguments);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
SortController.prototype.initAdaptationUI = function(oPropertyHelper){
|
|
48
|
+
|
|
49
|
+
var oSortPanel;
|
|
50
|
+
|
|
51
|
+
oSortPanel = new SortPanel();
|
|
52
|
+
|
|
53
|
+
var oAdaptationData = this.mixInfoAndState(oPropertyHelper);
|
|
54
|
+
oSortPanel.setP13nData(oAdaptationData.items);
|
|
55
|
+
this._oPanel = oSortPanel;
|
|
56
|
+
|
|
57
|
+
return Promise.resolve(oSortPanel);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
SortController.prototype.model2State = function() {
|
|
61
|
+
var aItems = [];
|
|
62
|
+
if (this._oPanel) {
|
|
63
|
+
this._oPanel.getP13nData(true).forEach(function(oItem){
|
|
64
|
+
if (oItem.sorted){
|
|
65
|
+
aItems.push({
|
|
66
|
+
key: oItem.key
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
return aItems;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
SortController.prototype.getChangeOperations = function() {
|
|
75
|
+
return {
|
|
76
|
+
add: "addSort",
|
|
77
|
+
remove: "removeSort"
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
SortController.prototype.getCurrentState = function(bExternalize) {
|
|
82
|
+
var oXConfig = xConfigAPI.readConfig(this.getAdaptationControl()) || {};
|
|
83
|
+
var aSortConditions = oXConfig.hasOwnProperty("properties") ? oXConfig.properties.sortConditions : [];
|
|
84
|
+
|
|
85
|
+
return aSortConditions || [];
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
SortController.prototype._createAddRemoveChange = function(oControl, sOperation, oContent){
|
|
89
|
+
var oAddRemoveChange = {
|
|
90
|
+
selectorElement: oControl,
|
|
91
|
+
changeSpecificData: {
|
|
92
|
+
changeType: sOperation,
|
|
93
|
+
content: oContent
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
return oAddRemoveChange;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
SortController.prototype._createMoveChange = function(sId, sPropertykey, iNewIndex, sMoveOperation, oControl, bPersistId){
|
|
100
|
+
var oMoveChange = {
|
|
101
|
+
selectorElement: oControl,
|
|
102
|
+
changeSpecificData: {
|
|
103
|
+
changeType: sMoveOperation,
|
|
104
|
+
content: {
|
|
105
|
+
id: sId,
|
|
106
|
+
key: sPropertykey,
|
|
107
|
+
index: iNewIndex
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
if (!bPersistId) {
|
|
113
|
+
delete oMoveChange.changeSpecificData.content.id;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return oMoveChange;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
SortController.prototype._getPresenceAttribute = function(bexternalAppliance){
|
|
120
|
+
return "sorted";
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
SortController.prototype.mixInfoAndState = function(oPropertyHelper) {
|
|
124
|
+
|
|
125
|
+
var aItemState = this.getCurrentState();
|
|
126
|
+
var mExistingSorters = this.arrayToMap(aItemState);
|
|
127
|
+
|
|
128
|
+
var oP13nData = this.prepareAdaptationData(oPropertyHelper, function(mItem, oProperty){
|
|
129
|
+
|
|
130
|
+
var oExistingSorter = mExistingSorters[oProperty.key];
|
|
131
|
+
|
|
132
|
+
mItem.sorted = oExistingSorter ? true : false;
|
|
133
|
+
mItem.sortPosition = oExistingSorter ? oExistingSorter.position : -1;
|
|
134
|
+
mItem.descending = oExistingSorter ? !!oExistingSorter.descending : false;
|
|
135
|
+
|
|
136
|
+
return !(oProperty.sortable === false);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
this.sortP13nData({
|
|
140
|
+
visible: "sorted",
|
|
141
|
+
position: "sortPosition"
|
|
142
|
+
}, oP13nData.items);
|
|
143
|
+
|
|
144
|
+
oP13nData.presenceAttribute = this._getPresenceAttribute();
|
|
145
|
+
|
|
146
|
+
oP13nData.items.forEach(function(oItem){delete oItem.sortPosition;});
|
|
147
|
+
|
|
148
|
+
return oP13nData;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return SortController;
|
|
152
|
+
|
|
153
|
+
});
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @extends sap.m.p13n.QueryPanel
|
|
22
22
|
*
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.104.0
|
|
25
25
|
*
|
|
26
26
|
* @public
|
|
27
27
|
* @experimental Since 1.96.
|
|
@@ -31,6 +31,16 @@ sap.ui.define([
|
|
|
31
31
|
|
|
32
32
|
var SortPanel = QueryPanel.extend("sap.m.p13n.SortPanel", {
|
|
33
33
|
metadata: {
|
|
34
|
+
properties: {
|
|
35
|
+
/**
|
|
36
|
+
* A short text describing the panel.
|
|
37
|
+
* <b>Note:</b> This text will only be displayed if the panel is being used in a <code>sap.m.p13n.Popup</code>.
|
|
38
|
+
*/
|
|
39
|
+
title: {
|
|
40
|
+
type: "string",
|
|
41
|
+
defaultValue: sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("p13n.DEFAULT_TITLE_SORT")
|
|
42
|
+
}
|
|
43
|
+
},
|
|
34
44
|
library: "sap.m"
|
|
35
45
|
},
|
|
36
46
|
renderer: {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define(function () {
|
|
7
|
+
"use strict";
|
|
8
|
+
/**
|
|
9
|
+
* Enumeration of the preferred persistence mode for personalization changes.
|
|
10
|
+
*
|
|
11
|
+
* @enum {string}
|
|
12
|
+
* @since 1.104
|
|
13
|
+
* @alias sap.m.p13n.enum.PersistenceMode
|
|
14
|
+
*/
|
|
15
|
+
var PersistenceMode = {
|
|
16
|
+
/**
|
|
17
|
+
* Personalization changes are created in the flexibility layer using <code>ignoreVariantManagement: true</code>
|
|
18
|
+
*
|
|
19
|
+
* @private
|
|
20
|
+
* @ui5-restricted sap.ui.mdc
|
|
21
|
+
*/
|
|
22
|
+
Global: "Global",
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Personalization changes are created and implicitly persisted only in case no additional <code>VariantManagement</code>
|
|
26
|
+
* control reference could be found. If a <code>sap.ui.fl.variants.VariantManagement</code> has been found,
|
|
27
|
+
* it will be used instead.
|
|
28
|
+
*
|
|
29
|
+
* @ui5-restricted sap.fe
|
|
30
|
+
*/
|
|
31
|
+
Auto: "Auto",
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Personalization changes are not persisted
|
|
35
|
+
*
|
|
36
|
+
* @private
|
|
37
|
+
* @ui5-restricted sap.ui.mdc
|
|
38
|
+
*/
|
|
39
|
+
Transient: "Transient"
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return PersistenceMode;
|
|
43
|
+
}, /* bExport= */ true);
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 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
|
+
'sap/m/p13n/Engine'
|
|
9
|
+
], function(Engine) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @class Utility class for generic mdc xConfig handling by utilizing the
|
|
14
|
+
* <code>sap.m.p13n.Engine</code> and its <code>Modificationhandler</code>.
|
|
15
|
+
* This class should be used to handle property changes that should be persisted
|
|
16
|
+
* as flex changes for MDC control while enabling preprocessing via customdata.
|
|
17
|
+
*
|
|
18
|
+
* @author SAP SE
|
|
19
|
+
* @private
|
|
20
|
+
* @alias sap.m.flexibility.xConfigHandler
|
|
21
|
+
*/
|
|
22
|
+
var xConfigHandler = {};
|
|
23
|
+
|
|
24
|
+
var fConfigModified = function(oControl) {
|
|
25
|
+
if (!oControl._bWaitForModificationChanges && oControl.isA) {
|
|
26
|
+
oControl._bWaitForModificationChanges = true;
|
|
27
|
+
sap.m.p13n.Engine.getInstance().waitForChanges(oControl).then(function() {
|
|
28
|
+
delete oControl._bWaitForModificationChanges;
|
|
29
|
+
sap.m.p13n.Engine.getInstance().fireStateChange(oControl);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var fnQueueChange = function(oControl, fTask) {
|
|
35
|
+
var fCleanupPromiseQueue = function(pOriginalPromise) {
|
|
36
|
+
if (oControl._pQueue === pOriginalPromise){
|
|
37
|
+
delete oControl._pQueue;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
oControl._pQueue = oControl._pQueue instanceof Promise ? oControl._pQueue.then(fTask) : fTask();
|
|
42
|
+
oControl._pQueue.then(fCleanupPromiseQueue.bind(null, oControl._pQueue));
|
|
43
|
+
|
|
44
|
+
return oControl._pQueue;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Creates a changehandler specific to the provided aggregation and property name,
|
|
49
|
+
* to enhance the xConfig object for a given mdc control instance.
|
|
50
|
+
*
|
|
51
|
+
* The enhanced object can be accesed using <code>Engine#readAggregationConfig</code>.
|
|
52
|
+
*
|
|
53
|
+
* @param {object} mMetaConfig A map describing the metadata structure that is affected by this changehandler
|
|
54
|
+
* @param {boolean} mMetaConfig.aggregationBased Defines whether the aggregation space or the property space should be used in the xConfig object
|
|
55
|
+
* @param {string} mMetaConfig.property The property name (such as <code>width</code> or <code>label</code>)
|
|
56
|
+
* @param {string} mMetaConfig.operation The operation to be executed by the handler (add, remove, move, set)
|
|
57
|
+
*
|
|
58
|
+
* @returns {object} The created changehandler object
|
|
59
|
+
*/
|
|
60
|
+
xConfigHandler.createHandler = function(mMetaConfig) {
|
|
61
|
+
|
|
62
|
+
if (!mMetaConfig || !mMetaConfig.hasOwnProperty("property")) {
|
|
63
|
+
throw new Error("Please provide a map containing the affected aggregation and property name!");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var sAffectedProperty = mMetaConfig.property;
|
|
67
|
+
var sAffectedAggregation;
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
"changeHandler": {
|
|
71
|
+
applyChange: function (oChange, oControl, mPropertyBag) {
|
|
72
|
+
|
|
73
|
+
return fnQueueChange(oControl, function(){
|
|
74
|
+
return sap.m.p13n.Engine.getInstance().readXConfig(oControl, {
|
|
75
|
+
propertyBag: mPropertyBag
|
|
76
|
+
})
|
|
77
|
+
.then(function(oPriorAggregationConfig) {
|
|
78
|
+
|
|
79
|
+
var sOperation = oChange.getChangeType().indexOf("add") > -1 ? "add" : "remove";
|
|
80
|
+
sOperation = oChange.getChangeType().indexOf("move") === 0 ? "move" : sOperation;
|
|
81
|
+
|
|
82
|
+
sAffectedAggregation = oChange.getContent().targetAggregation;
|
|
83
|
+
|
|
84
|
+
var sOldValue = sOperation !== "add";
|
|
85
|
+
|
|
86
|
+
if (oPriorAggregationConfig
|
|
87
|
+
&& oPriorAggregationConfig.aggregations
|
|
88
|
+
&& oPriorAggregationConfig.aggregations[sAffectedAggregation]
|
|
89
|
+
&& oPriorAggregationConfig.aggregations[sAffectedAggregation][oChange.getContent().key]
|
|
90
|
+
&& oPriorAggregationConfig.aggregations[sAffectedAggregation][oChange.getContent().key][sAffectedProperty]
|
|
91
|
+
){
|
|
92
|
+
sOldValue = oPriorAggregationConfig.aggregations[sAffectedAggregation][oChange.getContent().key][sAffectedProperty];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
oChange.setRevertData({
|
|
96
|
+
key: oChange.getContent().key,
|
|
97
|
+
value: sOldValue
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
var oConfig = {
|
|
101
|
+
property: sAffectedProperty,
|
|
102
|
+
key: oChange.getContent().key,
|
|
103
|
+
value: oChange.getContent(),
|
|
104
|
+
operation: sOperation,
|
|
105
|
+
propertyBag: mPropertyBag
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
if (mMetaConfig.aggregationBased) {
|
|
109
|
+
oConfig.controlMeta = {
|
|
110
|
+
aggregation: sAffectedAggregation
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return sap.m.p13n.Engine.getInstance().enhanceXConfig(oControl, oConfig);
|
|
115
|
+
})
|
|
116
|
+
.then(function() {
|
|
117
|
+
fConfigModified(oControl);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
},
|
|
123
|
+
completeChangeContent: function (oChange, mChangeSpecificInfo, mPropertyBag) {
|
|
124
|
+
// Not used, but needs to be there
|
|
125
|
+
},
|
|
126
|
+
revertChange: function (oChange, oControl, mPropertyBag) {
|
|
127
|
+
|
|
128
|
+
var sOperation = oChange.getChangeType().indexOf("add") > -1 ? "remove" : "add";
|
|
129
|
+
sOperation = oChange.getChangeType().indexOf("move") === 0 ? "move" : sOperation;
|
|
130
|
+
|
|
131
|
+
sAffectedAggregation = oChange.getContent().targetAggregation;
|
|
132
|
+
|
|
133
|
+
var oConfig = {
|
|
134
|
+
controlMeta: {
|
|
135
|
+
aggregation: sAffectedAggregation,
|
|
136
|
+
property: sAffectedProperty
|
|
137
|
+
},
|
|
138
|
+
property: sAffectedProperty,
|
|
139
|
+
operation: sOperation,
|
|
140
|
+
key: oChange.getRevertData().key,
|
|
141
|
+
value: oChange.getRevertData(),
|
|
142
|
+
propertyBag: mPropertyBag
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
if (mMetaConfig.aggregationBased) {
|
|
146
|
+
oConfig.controlMeta = {
|
|
147
|
+
aggregation: sAffectedAggregation
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return sap.m.p13n.Engine.getInstance().enhanceXConfig(oControl, oConfig)
|
|
152
|
+
.then(function() {
|
|
153
|
+
oChange.resetRevertData();
|
|
154
|
+
fConfigModified(oControl);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"layers": {
|
|
159
|
+
"USER": true
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
return xConfigHandler;
|
|
165
|
+
|
|
166
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 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
|
+
"./ModificationHandler",
|
|
8
|
+
"sap/m/p13n/FlexUtil",
|
|
9
|
+
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
10
|
+
"sap/m/p13n/enum/PersistenceMode"
|
|
11
|
+
], function(ModificationHandler, FlexUtil, FlexRuntimeInfoAPI, mode) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
var oFlexModificationHandler;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @class This class offers <code>sap.ui.fl</code> capabilities.
|
|
19
|
+
* It should be used as the persistence layer in the {@link sap.m.p13n.Engine#register Engine#register}process.
|
|
20
|
+
*
|
|
21
|
+
* @author SAP SE
|
|
22
|
+
* @public
|
|
23
|
+
* @experimental Since 1.104.
|
|
24
|
+
* @alias sap.m.p13n.modification.FlexModificationHandler
|
|
25
|
+
*/
|
|
26
|
+
var FlexModificationHandler = ModificationHandler.extend("sap.m.p13n.modification.FlexModificationHandler");
|
|
27
|
+
|
|
28
|
+
FlexModificationHandler.prototype.processChanges = function(aChanges, oModificationPayload){
|
|
29
|
+
var oControl = aChanges && aChanges[0] ? aChanges[0].selectorElement : undefined;
|
|
30
|
+
|
|
31
|
+
var sInternalPersistenceMode = oModificationPayload.mode;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* In case of 'Auto' we internally overwrite the persistence mode to use the VM
|
|
35
|
+
* in case it has been provided instead of the PP
|
|
36
|
+
*/
|
|
37
|
+
var bIsAutoGlobal = sInternalPersistenceMode === mode.Auto;
|
|
38
|
+
if (bIsAutoGlobal) {
|
|
39
|
+
sInternalPersistenceMode = oModificationPayload.hasVM ? "Standard" : mode.Global;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var bIsGlobal = sInternalPersistenceMode === mode.Global;
|
|
43
|
+
|
|
44
|
+
var bIsTransient = sInternalPersistenceMode === mode.Transient;
|
|
45
|
+
var oHandleChangesPromise = FlexUtil.handleChanges.call(this, aChanges, bIsGlobal, bIsTransient);
|
|
46
|
+
return bIsGlobal ? oHandleChangesPromise.then(function(aDirtyChanges){
|
|
47
|
+
return FlexUtil.saveChanges.call(this, oControl, aDirtyChanges);
|
|
48
|
+
}) : oHandleChangesPromise;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
FlexModificationHandler.prototype.waitForChanges = function(mPropertyBag, oModificationPayload){
|
|
52
|
+
return FlexRuntimeInfoAPI.waitForChanges.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
FlexModificationHandler.prototype.reset = function(mPropertyBag, oModificationPayload){
|
|
56
|
+
var sPersistenceMode = oModificationPayload.mode;
|
|
57
|
+
|
|
58
|
+
var bIsGlobal = sPersistenceMode === mode.Global;
|
|
59
|
+
var bIsAutoGlobal = !oModificationPayload.hasVM && oModificationPayload.hasPP && sPersistenceMode === mode.Auto;
|
|
60
|
+
|
|
61
|
+
return (bIsGlobal || bIsAutoGlobal) ? FlexUtil.reset.call(this, mPropertyBag) : FlexUtil.restore.call(this, mPropertyBag);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
FlexModificationHandler.prototype.isModificationSupported = function(mPropertyBag, oModificationPayload){
|
|
65
|
+
return FlexRuntimeInfoAPI.isFlexSupported.apply(this, arguments);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
FlexModificationHandler.prototype.initialize = function(oControl) {
|
|
69
|
+
return sap.ui.getCore().loadLibrary('sap.ui.fl', {
|
|
70
|
+
async: true
|
|
71
|
+
})
|
|
72
|
+
.then(function() {
|
|
73
|
+
return this.waitForChanges({
|
|
74
|
+
element: oControl
|
|
75
|
+
});
|
|
76
|
+
}.bind(this))
|
|
77
|
+
.then(function(){
|
|
78
|
+
sap.m.p13n.Engine.getInstance().fireStateChange(oControl);
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
FlexModificationHandler.getInstance = function() {
|
|
83
|
+
if (!oFlexModificationHandler){
|
|
84
|
+
oFlexModificationHandler = new FlexModificationHandler();
|
|
85
|
+
}
|
|
86
|
+
return oFlexModificationHandler;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return FlexModificationHandler;
|
|
90
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 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/modification/ModificationHandler"
|
|
8
|
+
], function(Modificationhandler) {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
var oLocalStorageModificationHandler;
|
|
12
|
+
var mInitialState = new WeakMap();
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @class This class offers <code>localStorage</code> capabilities.
|
|
16
|
+
* It should be used as the persistence layer in the {@link sap.m.p13n.Engine#register Engine#register} process.
|
|
17
|
+
*
|
|
18
|
+
* @author SAP SE
|
|
19
|
+
* @public
|
|
20
|
+
* @experimental Since 1.104.
|
|
21
|
+
* @alias sap.m.p13n.modification.LocalStorageModificationHandler
|
|
22
|
+
*/
|
|
23
|
+
var LocalStorageModificationHandler = Modificationhandler.extend("sap.m.p13n.modification.LocalStorageModificationHandler");
|
|
24
|
+
|
|
25
|
+
LocalStorageModificationHandler.prototype.processChanges = function(aChanges, oModificationPayload){
|
|
26
|
+
var pAppliance = Modificationhandler.prototype.processChanges.apply(this, arguments);
|
|
27
|
+
var oControl = aChanges && aChanges[0] ? aChanges[0].selectorElement : undefined;
|
|
28
|
+
|
|
29
|
+
return pAppliance.then(function(){
|
|
30
|
+
return sap.m.p13n.Engine.getInstance().retrieveState(oControl)
|
|
31
|
+
.then(function(oState){
|
|
32
|
+
localStorage.setItem("$p13n.Engine.data--" + oControl.getId(), JSON.stringify(oState));
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
LocalStorageModificationHandler.prototype.initialize = function(oControl) {
|
|
38
|
+
var oInitialState = JSON.parse(localStorage.getItem("$p13n.Engine.data--" + oControl.getId()));
|
|
39
|
+
var pInitial;
|
|
40
|
+
if (!oInitialState) {
|
|
41
|
+
pInitial = sap.m.p13n.Engine.getInstance().retrieveState(oControl)
|
|
42
|
+
.then(function(oRetrievedState){
|
|
43
|
+
oInitialState = oRetrievedState;
|
|
44
|
+
});
|
|
45
|
+
} else {
|
|
46
|
+
pInitial = sap.m.p13n.Engine.getInstance().applyState(oControl, oInitialState, true);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
mInitialState.set(oControl, oInitialState);
|
|
50
|
+
return pInitial;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
LocalStorageModificationHandler.prototype.waitForChanges = function(mPropertyBag, oModificationPayload) {
|
|
54
|
+
return Promise.resolve();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
LocalStorageModificationHandler.prototype.reset = function(mPropertyBag, oModificationPayload) {
|
|
58
|
+
var oControl = mPropertyBag.selector;
|
|
59
|
+
localStorage.removeItem("$p13n.Engine.data--" + oControl.getId());
|
|
60
|
+
return sap.m.p13n.Engine.getInstance().applyState(oControl, mInitialState.get(oControl), true);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
LocalStorageModificationHandler.prototype.isModificationSupported = function(mPropertyBag, oModificationPayload){
|
|
64
|
+
return false;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
LocalStorageModificationHandler.getInstance = function() {
|
|
68
|
+
if (!oLocalStorageModificationHandler){
|
|
69
|
+
oLocalStorageModificationHandler = new LocalStorageModificationHandler();
|
|
70
|
+
}
|
|
71
|
+
return oLocalStorageModificationHandler;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
return LocalStorageModificationHandler;
|
|
75
|
+
});
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 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/ui/base/Object",
|
|
8
|
+
"sap/base/util/merge",
|
|
9
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier"
|
|
10
|
+
], function(BaseObject, merge, JsControlTreeModifier) {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
var oModificationHandler;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @class This class offers modification capabilities without persistence.
|
|
17
|
+
* It should be used as the persistence layer in the {@link sap.m.p13n.Engine#register Engine#register} process.
|
|
18
|
+
*
|
|
19
|
+
* @author SAP SE
|
|
20
|
+
* @public
|
|
21
|
+
* @experimental Since 1.104.
|
|
22
|
+
* @alias sap.m.p13n.modification.ModificationHandler
|
|
23
|
+
*/
|
|
24
|
+
var ModificationHandler = BaseObject.extend("sap.m.p13n.modification.ModificationHandler");
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Should implement the appliance of changes
|
|
28
|
+
*
|
|
29
|
+
* @param {array} aChanges An array of changes
|
|
30
|
+
* @param {object} oModificationPayload An object providing a modification handler specific payload
|
|
31
|
+
* @returns {Promise} Returns a <code>Promise</code> reflecting change processing
|
|
32
|
+
*/
|
|
33
|
+
ModificationHandler.prototype.processChanges = function(aChanges, oModificationPayload){
|
|
34
|
+
|
|
35
|
+
var aChangeAppliance = [];
|
|
36
|
+
|
|
37
|
+
aChanges.forEach(function(oChange){
|
|
38
|
+
var oChangeContent = oChange.changeSpecificData.content;
|
|
39
|
+
var oControl = oChange.selectorElement;
|
|
40
|
+
var sChangeType = oChange.changeSpecificData.changeType;
|
|
41
|
+
// var oItem = sap.ui.getCore().byId(oChangeContent.name);
|
|
42
|
+
// var sTargetAggregation = oChangeContent.targetAggregation;
|
|
43
|
+
// var oSelector = oChange.selectorElement;
|
|
44
|
+
// var oContent = oChange.changeSpecificData.content;
|
|
45
|
+
|
|
46
|
+
var oTransientChange = {
|
|
47
|
+
getContent: function() {
|
|
48
|
+
return oChangeContent;
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
getChangeType: function() {
|
|
52
|
+
return sChangeType;
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
getControl: function() {
|
|
56
|
+
return oControl;
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
setRevertData: function() {
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var oPromise = new Promise(function(resolve){
|
|
64
|
+
sap.ui.require(["sap/m/flexibility/EngineFlex"], function(EngineFlex){
|
|
65
|
+
var pAppliance = EngineFlex[sChangeType].changeHandler.applyChange(oTransientChange, oControl, {
|
|
66
|
+
modifier: JsControlTreeModifier
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
resolve(pAppliance);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
aChangeAppliance.push(oPromise);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return Promise.all(aChangeAppliance);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Should implement a function that returns a promise resolving
|
|
81
|
+
* after the current pending changes have been applied.
|
|
82
|
+
*
|
|
83
|
+
* @private
|
|
84
|
+
* @param {object} mPropertyBag A propertybag containing modification specific configuration
|
|
85
|
+
* @param {sap.ui.core.Element} mPropertyBag.element The according element which should be checked
|
|
86
|
+
* @param {object} oModificationPayload An object providing a modification handler specific payload
|
|
87
|
+
* @returns {Promise} Returns a <code>Promise</code> reflecting change appliance
|
|
88
|
+
|
|
89
|
+
*/
|
|
90
|
+
ModificationHandler.prototype.waitForChanges = function(mPropertyBag, oModificationPayload) {
|
|
91
|
+
return Promise.resolve();
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Should implement a function that returns a promise resolving
|
|
96
|
+
* after the current pending changes have been reset.
|
|
97
|
+
*
|
|
98
|
+
* @private
|
|
99
|
+
* @param {object} mPropertyBag A propertybag containing modification specific configuration
|
|
100
|
+
* @param {sap.ui.core.Element} mPropertyBag.selector The according element which should be checked
|
|
101
|
+
* @param {object} oModificationPayload An object providing a modification handler specific payload
|
|
102
|
+
* @returns {Promise} Returns a <code>Promise</code> reflecting the reset execution
|
|
103
|
+
*/
|
|
104
|
+
ModificationHandler.prototype.reset = function(mPropertyBag, oModificationPayload) {
|
|
105
|
+
return Promise.resolve();
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Should implement a function that returns information ont modification support
|
|
110
|
+
*
|
|
111
|
+
* @private
|
|
112
|
+
* @param {object} mPropertyBag A propertybag containing modification specific configuration
|
|
113
|
+
* @param {sap.ui.core.Element} mPropertyBag.selector The according element which should be checked
|
|
114
|
+
* @param {object} oModificationPayload An object providing a modification handler specific payload
|
|
115
|
+
* @returns {boolean} reflects the modification support state
|
|
116
|
+
*/
|
|
117
|
+
ModificationHandler.prototype.isModificationSupported = function(mPropertyBag, oModificationPayload){
|
|
118
|
+
return false;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
ModificationHandler.prototype.initialize = function(oControl) {
|
|
122
|
+
return Promise.resolve();
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
ModificationHandler.getInstance = function() {
|
|
126
|
+
if (!oModificationHandler){
|
|
127
|
+
oModificationHandler = new ModificationHandler();
|
|
128
|
+
}
|
|
129
|
+
return oModificationHandler;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
return ModificationHandler;
|
|
133
|
+
});
|