@openui5/sap.m 1.71.35 → 1.71.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/sap/m/.library +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/Bar.js +1 -1
- package/src/sap/m/Breadcrumbs.js +1 -1
- package/src/sap/m/BusyDialog.js +1 -1
- package/src/sap/m/BusyIndicator.js +1 -1
- package/src/sap/m/Button.js +16 -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 +2 -21
- package/src/sap/m/ColumnListItem.js +1 -1
- package/src/sap/m/ColumnListItemRenderer.js +1 -1
- package/src/sap/m/ColumnPopoverActionItem.js +23 -2
- package/src/sap/m/ColumnPopoverCustomItem.js +1 -1
- package/src/sap/m/ColumnPopoverItem.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/CustomListItem.js +1 -1
- package/src/sap/m/CustomTile.js +1 -1
- package/src/sap/m/CustomTreeItem.js +1 -1
- package/src/sap/m/DatePicker.js +1 -1
- package/src/sap/m/DateRangeSelection.js +2 -2
- package/src/sap/m/DateTimeField.js +1 -1
- package/src/sap/m/DateTimeInput.js +1 -1
- package/src/sap/m/DateTimePicker.js +1 -1
- package/src/sap/m/Dialog.js +1 -1
- package/src/sap/m/DisplayListItem.js +1 -1
- package/src/sap/m/DraftIndicator.js +1 -1
- package/src/sap/m/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 +1 -1
- package/src/sap/m/GroupHeaderListItem.js +1 -1
- package/src/sap/m/GrowingEnablement.js +4 -3
- package/src/sap/m/GrowingList.js +1 -1
- package/src/sap/m/HBox.js +1 -1
- package/src/sap/m/HeaderContainer.js +1 -1
- package/src/sap/m/HeaderContainerItemNavigator.js +1 -1
- package/src/sap/m/IconTabBar.js +1 -1
- package/src/sap/m/IconTabBarSelectList.js +1 -1
- package/src/sap/m/IconTabFilter.js +1 -1
- package/src/sap/m/IconTabHeader.js +1 -1
- package/src/sap/m/IconTabSeparator.js +1 -1
- package/src/sap/m/Image.js +1 -1
- package/src/sap/m/ImageContent.js +1 -1
- package/src/sap/m/Input.js +9 -1
- package/src/sap/m/InputBase.js +2 -2
- package/src/sap/m/InputListItem.js +1 -1
- package/src/sap/m/Label.js +1 -1
- package/src/sap/m/LightBox.js +1 -1
- package/src/sap/m/LightBoxItem.js +1 -1
- package/src/sap/m/Link.js +1 -1
- package/src/sap/m/LinkRenderer.js +2 -1
- package/src/sap/m/List.js +1 -1
- package/src/sap/m/ListBase.js +10 -2
- package/src/sap/m/ListBaseRenderer.js +4 -1
- package/src/sap/m/ListItemBase.js +1 -1
- package/src/sap/m/MaskEnabler.js +1 -1
- package/src/sap/m/MaskInput.js +1 -1
- package/src/sap/m/MaskInputRule.js +1 -1
- package/src/sap/m/Menu.js +1 -1
- package/src/sap/m/MenuButton.js +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 +1 -1
- package/src/sap/m/MessagePopoverItem.js +1 -1
- package/src/sap/m/MessageStrip.js +1 -1
- package/src/sap/m/MessageToast.js +1 -1
- package/src/sap/m/MessageView.js +1 -1
- package/src/sap/m/MultiComboBox.js +147 -172
- package/src/sap/m/MultiEditField.js +1 -1
- package/src/sap/m/MultiInput.js +1 -1
- package/src/sap/m/NavContainer.js +1 -1
- package/src/sap/m/NewsContent.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/ObjectAttribute.js +1 -1
- package/src/sap/m/ObjectHeader.js +1 -1
- package/src/sap/m/ObjectIdentifier.js +1 -1
- package/src/sap/m/ObjectListItem.js +1 -1
- package/src/sap/m/ObjectMarker.js +1 -1
- package/src/sap/m/ObjectNumber.js +1 -1
- package/src/sap/m/ObjectStatus.js +1 -1
- package/src/sap/m/OverflowToolbar.js +1 -1
- package/src/sap/m/OverflowToolbarAssociativePopover.js +1 -1
- package/src/sap/m/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 +14 -5
- package/src/sap/m/PDFViewerRenderer.js +15 -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 +13 -2
- package/src/sap/m/PlanningCalendarHeader.js +4 -4
- package/src/sap/m/PlanningCalendarLegend.js +1 -1
- package/src/sap/m/PlanningCalendarRow.js +1 -1
- package/src/sap/m/PlanningCalendarView.js +1 -1
- package/src/sap/m/Popover.js +1 -1
- package/src/sap/m/ProgressIndicator.js +1 -1
- package/src/sap/m/PullToRefresh.js +1 -1
- package/src/sap/m/QuickView.js +1 -1
- package/src/sap/m/QuickViewBase.js +1 -1
- package/src/sap/m/QuickViewCard.js +1 -1
- package/src/sap/m/QuickViewGroup.js +1 -1
- package/src/sap/m/QuickViewGroupElement.js +1 -1
- package/src/sap/m/QuickViewPage.js +1 -1
- package/src/sap/m/RadioButton.js +1 -1
- package/src/sap/m/RadioButtonGroup.js +1 -1
- package/src/sap/m/RangeSlider.js +1 -1
- package/src/sap/m/RatingIndicator.js +1 -1
- package/src/sap/m/ResponsivePopover.js +1 -1
- package/src/sap/m/ResponsiveScale.js +1 -1
- package/src/sap/m/ScrollBar.js +1 -1
- package/src/sap/m/ScrollContainer.js +1 -1
- package/src/sap/m/SearchField.js +1 -1
- package/src/sap/m/SearchFieldRenderer.js +2 -0
- package/src/sap/m/SegmentedButton.js +1 -1
- package/src/sap/m/SegmentedButtonItem.js +1 -1
- package/src/sap/m/Select.js +2 -3
- package/src/sap/m/SelectDialog.js +1 -1
- package/src/sap/m/SelectList.js +1 -1
- package/src/sap/m/SelectRenderer.js +2 -3
- 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/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 -3
- 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/TableRenderer.js +1 -0
- package/src/sap/m/TableSelectDialog.js +1 -1
- package/src/sap/m/Text.js +1 -1
- package/src/sap/m/TextArea.js +1 -1
- package/src/sap/m/Tile.js +1 -1
- package/src/sap/m/TileContainer.js +1 -1
- package/src/sap/m/TileContent.js +1 -1
- package/src/sap/m/TimePicker.js +21 -6
- package/src/sap/m/TimePickerSlider.js +1 -1
- package/src/sap/m/TimePickerSliders.js +10 -1
- package/src/sap/m/Title.js +1 -1
- package/src/sap/m/TitlePropagationSupport.js +1 -1
- package/src/sap/m/ToggleButton.js +1 -1
- package/src/sap/m/Token.js +1 -1
- package/src/sap/m/Tokenizer.js +1 -1
- package/src/sap/m/TokenizerRenderer.js +1 -0
- 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/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/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 +1 -1
- package/src/sap/m/changeHandler/SplitMenuButton.js +1 -1
- package/src/sap/m/library.js +2 -2
- package/src/sap/m/messagebundle.properties +3 -0
- package/src/sap/m/messagebundle_cs.properties +10 -10
- package/src/sap/m/messagebundle_de.properties +1 -1
- package/src/sap/m/messagebundle_el.properties +1 -1
- package/src/sap/m/messagebundle_fr.properties +11 -11
- package/src/sap/m/messagebundle_it.properties +2 -2
- package/src/sap/m/messagebundle_ko.properties +1 -1
- package/src/sap/m/messagebundle_ms.properties +1 -1
- package/src/sap/m/messagebundle_no.properties +10 -10
- package/src/sap/m/messagebundle_pl.properties +4 -4
- package/src/sap/m/messagebundle_pt.properties +3 -3
- package/src/sap/m/messagebundle_ro.properties +2 -2
- package/src/sap/m/messagebundle_ru.properties +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/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/upload/UploadSet.js +2 -1
- package/src/sap/m/upload/UploadSetItem.js +1 -1
|
@@ -133,7 +133,7 @@ function(
|
|
|
133
133
|
* </ul>
|
|
134
134
|
*
|
|
135
135
|
* @author SAP SE
|
|
136
|
-
* @version 1.71.
|
|
136
|
+
* @version 1.71.39
|
|
137
137
|
*
|
|
138
138
|
* @constructor
|
|
139
139
|
* @extends sap.m.ComboBoxBase
|
|
@@ -649,10 +649,24 @@ function(
|
|
|
649
649
|
* @private
|
|
650
650
|
*/
|
|
651
651
|
MultiComboBox.prototype._handleSelectionLiveChange = function(oEvent) {
|
|
652
|
+
if (oEvent.getParameter("selectAll")) {
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
|
|
652
656
|
var oListItem = oEvent.getParameter("listItem");
|
|
657
|
+
var aListItems = oEvent.getParameter("listItems");
|
|
658
|
+
var oListItemToFocus = aListItems && aListItems[aListItems.length - 1] || oListItem;
|
|
659
|
+
var oInputControl = this.isPickerDialog() ? this.getPickerTextField() : this;
|
|
660
|
+
var bShouldFocusItem = this._getIsClick() && !!oListItemToFocus;
|
|
653
661
|
var bIsSelected = oEvent.getParameter("selected");
|
|
654
662
|
var oNewSelectedItem = this._getItemByListItem(oListItem);
|
|
655
|
-
var
|
|
663
|
+
var aNewSelectedItems;
|
|
664
|
+
|
|
665
|
+
if (aListItems && aListItems.length) {
|
|
666
|
+
aNewSelectedItems = aListItems.map(function(oNewItem) {
|
|
667
|
+
return this._getItemByListItem(oNewItem);
|
|
668
|
+
}, this);
|
|
669
|
+
}
|
|
656
670
|
|
|
657
671
|
if (oListItem.getType() === "Inactive") {
|
|
658
672
|
// workaround: this is needed because the List fires the "selectionChange" event on inactive items
|
|
@@ -668,8 +682,10 @@ function(
|
|
|
668
682
|
|
|
669
683
|
var oParam = {
|
|
670
684
|
item: oNewSelectedItem,
|
|
685
|
+
items: aNewSelectedItems,
|
|
671
686
|
id: oNewSelectedItem.getId(),
|
|
672
687
|
key: oNewSelectedItem.getKey(),
|
|
688
|
+
selectAll: false,
|
|
673
689
|
fireChangeEvent: true,
|
|
674
690
|
suppressInvalidate: true,
|
|
675
691
|
listItemUpdated: true
|
|
@@ -687,14 +703,11 @@ function(
|
|
|
687
703
|
if (this._bCheckBoxClicked) {
|
|
688
704
|
oInputControl.setValue(this._sOldInput);
|
|
689
705
|
|
|
690
|
-
if (this.isOpen() && this.getPicker().oPopup.getOpenState() !== OpenState.CLOSING) {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
// oListItem.
|
|
694
|
-
|
|
695
|
-
// Scrolls an item into the visual viewport
|
|
696
|
-
oListItem.focus();
|
|
706
|
+
if (bShouldFocusItem && this.isOpen() && this.getPicker().oPopup.getOpenState() !== OpenState.CLOSING) {
|
|
707
|
+
oListItemToFocus.focus();
|
|
708
|
+
this._setIsClick(false);
|
|
697
709
|
}
|
|
710
|
+
|
|
698
711
|
} else {
|
|
699
712
|
this._bCheckBoxClicked = true;
|
|
700
713
|
this.setValue("");
|
|
@@ -1144,9 +1157,9 @@ function(
|
|
|
1144
1157
|
var fnPickerTypeBeforeOpen = this["_onBeforeOpen" + this.getPickerType()];
|
|
1145
1158
|
|
|
1146
1159
|
// add the active state to the MultiComboBox's field
|
|
1147
|
-
this.addStyleClass(InputBase.ICON_PRESSED_CSS_CLASS);
|
|
1148
|
-
this._resetCurrentItem();
|
|
1149
1160
|
this.addContent();
|
|
1161
|
+
this.addStyleClass(InputBase.ICON_PRESSED_CSS_CLASS);
|
|
1162
|
+
|
|
1150
1163
|
this._aInitiallySelectedItems = this.getSelectedItems();
|
|
1151
1164
|
|
|
1152
1165
|
this._synchronizeSelectedItemAndKey();
|
|
@@ -1320,9 +1333,10 @@ function(
|
|
|
1320
1333
|
* Update and synchronize "selectedItems" association and the "selectedItems" in the List.
|
|
1321
1334
|
*
|
|
1322
1335
|
* @param {object} mOptions Options object
|
|
1323
|
-
* @param {sap.ui.core.Item
|
|
1336
|
+
* @param {array} mOptions.items Array of sap.ui.core.Item
|
|
1324
1337
|
* @param {string} mOptions.id The item ID
|
|
1325
1338
|
* @param {string} mOptions.key The item key
|
|
1339
|
+
* @param {boolean} mOptions.selectAll Wheather 'select all' keyboard combination is used for the selection
|
|
1326
1340
|
* @param {boolean} [mOptions.suppressInvalidate] Whether invalidation should be suppressed
|
|
1327
1341
|
* @param {boolean} [mOptions.listItemUpdated] Whether the item list is updated
|
|
1328
1342
|
* @param {boolean} [mOptions.fireChangeEvent] Whether the change event is fired
|
|
@@ -1330,50 +1344,52 @@ function(
|
|
|
1330
1344
|
*/
|
|
1331
1345
|
MultiComboBox.prototype.setSelection = function(mOptions) {
|
|
1332
1346
|
var oList = this._getList();
|
|
1347
|
+
var oFirstItem = mOptions.item;
|
|
1348
|
+
var aItems = mOptions.selectAll || (!mOptions.items || !mOptions.items.length) ? [oFirstItem] : mOptions.items;
|
|
1333
1349
|
|
|
1334
|
-
if (
|
|
1350
|
+
if (oFirstItem && this.isItemSelected(oFirstItem)) {
|
|
1335
1351
|
return;
|
|
1336
1352
|
}
|
|
1337
1353
|
|
|
1338
|
-
if (!
|
|
1354
|
+
if (!oFirstItem) {
|
|
1339
1355
|
return;
|
|
1340
1356
|
}
|
|
1341
1357
|
|
|
1358
|
+
aItems.forEach(function(oNewItem) {
|
|
1359
|
+
if (!mOptions.listItemUpdated && this.getListItem(oNewItem) && oList) {
|
|
1360
|
+
oList.setSelectedItem(this.getListItem(oNewItem), true);
|
|
1361
|
+
}
|
|
1342
1362
|
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1363
|
+
// Fill Tokenizer
|
|
1364
|
+
var oToken = new Token({
|
|
1365
|
+
key: oNewItem.getKey()
|
|
1366
|
+
});
|
|
1347
1367
|
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
key: mOptions.key
|
|
1351
|
-
});
|
|
1352
|
-
oToken.setText(mOptions.item.getText());
|
|
1368
|
+
oToken.setText(oNewItem.getText());
|
|
1369
|
+
oNewItem.data(this.getRenderer().CSS_CLASS_COMBOBOXBASE + "Token", oToken);
|
|
1353
1370
|
|
|
1354
|
-
|
|
1371
|
+
this._oTokenizer.addToken(oToken);
|
|
1372
|
+
this.addAssociation("selectedItems", oNewItem, mOptions.suppressInvalidate);
|
|
1355
1373
|
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
this.setValue('');
|
|
1374
|
+
var aSelectedKeys = this.getSelectedKeys();
|
|
1375
|
+
var sKey = this.getKeys([oNewItem])[0];
|
|
1359
1376
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
aSelectedKeys.push(sKey);
|
|
1367
|
-
this.setProperty("selectedKeys", aSelectedKeys, mOptions.suppressInvalidate);
|
|
1368
|
-
}
|
|
1377
|
+
// Rather strange, but we need to keep it for backwards compatibility- when there are selectedItems with
|
|
1378
|
+
// empty keys, we need to append empty string, but if there's a key, it should be unique
|
|
1379
|
+
if (sKey === "" || aSelectedKeys.indexOf(sKey) === -1) {
|
|
1380
|
+
aSelectedKeys.push(sKey);
|
|
1381
|
+
this.setProperty("selectedKeys", aSelectedKeys, mOptions.suppressInvalidate);
|
|
1382
|
+
}
|
|
1369
1383
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1384
|
+
if (mOptions.fireChangeEvent) {
|
|
1385
|
+
this.fireSelectionChange({
|
|
1386
|
+
changedItem: oNewItem,
|
|
1387
|
+
selected: true
|
|
1388
|
+
});
|
|
1375
1389
|
}
|
|
1390
|
+
}, this);
|
|
1376
1391
|
|
|
1392
|
+
this.setValue('');
|
|
1377
1393
|
|
|
1378
1394
|
if (mOptions.fireFinishEvent) {
|
|
1379
1395
|
|
|
@@ -1390,54 +1406,61 @@ function(
|
|
|
1390
1406
|
* Remove an item from "selectedItems" association and the "selectedItems" in the List.
|
|
1391
1407
|
*
|
|
1392
1408
|
* @param {object} mOptions Options object
|
|
1393
|
-
* @param {sap.ui.core.Item
|
|
1409
|
+
* @param {array} mOptions.items Array of sap.ui.core.Item
|
|
1394
1410
|
* @param {string} mOptions.id The item ID
|
|
1395
1411
|
* @param {string} mOptions.key The item key
|
|
1412
|
+
* @param {boolean} mOptions.selectAll Wheather 'select all' keyboard combination is used for the selection
|
|
1396
1413
|
* @param {boolean} [mOptions.suppressInvalidate] Whether invalidation should be suppressed
|
|
1397
1414
|
* @param {boolean} [mOptions.listItemUpdated] Whether the item list is updated
|
|
1398
1415
|
* @param {boolean} [mOptions.fireChangeEvent] Whether the change event is fired
|
|
1399
1416
|
* @private
|
|
1400
1417
|
*/
|
|
1401
1418
|
MultiComboBox.prototype.removeSelection = function(mOptions) {
|
|
1419
|
+
var aSelectedKeys, iItemSelectIndex;
|
|
1420
|
+
var oFirstItem = mOptions.item;
|
|
1421
|
+
var aDeselectedItems = mOptions.selectAll || (!mOptions.items || !mOptions.items.length) ? [oFirstItem] : mOptions.items;
|
|
1402
1422
|
|
|
1403
|
-
if (
|
|
1423
|
+
if (oFirstItem && !this.isItemSelected(oFirstItem)) {
|
|
1404
1424
|
return;
|
|
1405
1425
|
}
|
|
1406
1426
|
|
|
1407
|
-
if (!
|
|
1427
|
+
if (!oFirstItem) {
|
|
1408
1428
|
return;
|
|
1409
1429
|
}
|
|
1410
1430
|
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
var iItemSelectIndex = aSelectedKeys.indexOf(mOptions.item.getKey());
|
|
1414
|
-
aSelectedKeys.splice(iItemSelectIndex, 1);
|
|
1415
|
-
this.setProperty("selectedKeys", aSelectedKeys, mOptions.suppressInvalidate);
|
|
1431
|
+
aDeselectedItems.forEach(function(oNewItem) {
|
|
1432
|
+
this.removeAssociation("selectedItems", oNewItem, mOptions.suppressInvalidate);
|
|
1416
1433
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
}
|
|
1434
|
+
if (!mOptions.listItemUpdated && this.getListItem(oNewItem)) {
|
|
1435
|
+
var oListItem = this.getListItem(oNewItem);
|
|
1436
|
+
this._getList().setSelectedItem(oListItem, false);
|
|
1437
|
+
}
|
|
1422
1438
|
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
mOptions.item.data(this.getRenderer().CSS_CLASS_COMBOBOXBASE + "Token", null);
|
|
1427
|
-
this._oTokenizer.removeToken(oToken);
|
|
1428
|
-
}
|
|
1439
|
+
// Synch the Tokenizer
|
|
1440
|
+
if (!mOptions.tokenUpdated) {
|
|
1441
|
+
var oToken = this._getTokenByItem(oNewItem);
|
|
1429
1442
|
|
|
1430
|
-
|
|
1443
|
+
oNewItem.data(this.getRenderer().CSS_CLASS_COMBOBOXBASE + "Token", null);
|
|
1444
|
+
this._oTokenizer.removeToken(oToken);
|
|
1445
|
+
}
|
|
1431
1446
|
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
changedItem: mOptions.item,
|
|
1435
|
-
selected: false
|
|
1436
|
-
});
|
|
1437
|
-
}
|
|
1447
|
+
aSelectedKeys = this.getSelectedKeys();
|
|
1448
|
+
iItemSelectIndex = aSelectedKeys.indexOf(oNewItem.getKey());
|
|
1438
1449
|
|
|
1439
|
-
|
|
1450
|
+
aSelectedKeys.splice(iItemSelectIndex, 1);
|
|
1451
|
+
this.setProperty("selectedKeys", aSelectedKeys, mOptions.suppressInvalidate);
|
|
1452
|
+
|
|
1453
|
+
if (mOptions.fireChangeEvent) {
|
|
1454
|
+
this.fireSelectionChange({
|
|
1455
|
+
changedItem: oNewItem,
|
|
1456
|
+
selected: false
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
}, this);
|
|
1440
1460
|
|
|
1461
|
+
this.$().toggleClass("sapMMultiComboBoxHasToken", this._hasTokens());
|
|
1462
|
+
|
|
1463
|
+
if (mOptions.fireFinishEvent) {
|
|
1441
1464
|
// Fire selectionFinish also if tokens are deleted directly in input field
|
|
1442
1465
|
if (!this.isOpen()) {
|
|
1443
1466
|
this.fireSelectionFinish({
|
|
@@ -1652,37 +1675,6 @@ function(
|
|
|
1652
1675
|
return this._oTokenizer.getTokens().length > 0;
|
|
1653
1676
|
};
|
|
1654
1677
|
|
|
1655
|
-
/**
|
|
1656
|
-
* Gets the current item
|
|
1657
|
-
* @returns {sap.ui.core.Item} The current item
|
|
1658
|
-
* @private
|
|
1659
|
-
*/
|
|
1660
|
-
MultiComboBox.prototype._getCurrentItem = function() {
|
|
1661
|
-
|
|
1662
|
-
if (!this._oCurrentItem) {
|
|
1663
|
-
return this._getFocusedItem();
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
return this._oCurrentItem;
|
|
1667
|
-
};
|
|
1668
|
-
|
|
1669
|
-
/**
|
|
1670
|
-
* Sets the current item
|
|
1671
|
-
* @param {sap.ui.core.Item} oItem The item to be set
|
|
1672
|
-
* @private
|
|
1673
|
-
*/
|
|
1674
|
-
MultiComboBox.prototype._setCurrentItem = function(oItem) {
|
|
1675
|
-
this._oCurrentItem = oItem;
|
|
1676
|
-
};
|
|
1677
|
-
|
|
1678
|
-
/**
|
|
1679
|
-
* Resets the current item
|
|
1680
|
-
* @private
|
|
1681
|
-
*/
|
|
1682
|
-
MultiComboBox.prototype._resetCurrentItem = function() {
|
|
1683
|
-
this._oCurrentItem = null;
|
|
1684
|
-
};
|
|
1685
|
-
|
|
1686
1678
|
/**
|
|
1687
1679
|
* Decorate a ListItem instance by adding some delegate methods.
|
|
1688
1680
|
*
|
|
@@ -1691,80 +1683,14 @@ function(
|
|
|
1691
1683
|
*/
|
|
1692
1684
|
MultiComboBox.prototype._decorateListItem = function(oListItem) {
|
|
1693
1685
|
oListItem.addDelegate({
|
|
1694
|
-
onkeyup: function(oEvent) {
|
|
1695
|
-
var oItem = null;
|
|
1696
|
-
|
|
1697
|
-
// If an item is selected with SPACE inside of
|
|
1698
|
-
// suggest list the list
|
|
1699
|
-
// with all entries should be opened
|
|
1700
|
-
if (oEvent.which == KeyCodes.SPACE && this.isOpen() && this._isListInSuggestMode()) {
|
|
1701
|
-
this.open();
|
|
1702
|
-
oItem = this._getLastSelectedItem();
|
|
1703
|
-
|
|
1704
|
-
// Scrolls an item into the visual viewport
|
|
1705
|
-
if (oItem) {
|
|
1706
|
-
this.getListItem(oItem).focus();
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
return;
|
|
1710
|
-
}
|
|
1711
|
-
},
|
|
1712
|
-
|
|
1713
1686
|
onkeydown: function(oEvent) {
|
|
1714
|
-
var oItem = null, oItemCurrent = null;
|
|
1715
|
-
|
|
1716
|
-
if (oEvent.shiftKey && oEvent.which == KeyCodes.ARROW_DOWN) {
|
|
1717
|
-
oItemCurrent = this._getCurrentItem();
|
|
1718
|
-
oItem = this._getNextVisibleItemOf(oItemCurrent);
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
if (oEvent.shiftKey && oEvent.which == KeyCodes.ARROW_UP) {
|
|
1722
|
-
oItemCurrent = this._getCurrentItem();
|
|
1723
|
-
oItem = this._getPreviousVisibleItemOf(oItemCurrent);
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
if (oEvent.shiftKey && oEvent.which === KeyCodes.SPACE) {
|
|
1727
|
-
oItemCurrent = this._getCurrentItem();
|
|
1728
|
-
this._selectPreviousItemsOf(oItemCurrent);
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
if (oItem && oItem !== oItemCurrent) {
|
|
1732
|
-
|
|
1733
|
-
if (this.getListItem(oItemCurrent).isSelected()) {
|
|
1734
|
-
this.setSelection({
|
|
1735
|
-
item: oItem,
|
|
1736
|
-
id: oItem.getId(),
|
|
1737
|
-
key: oItem.getKey(),
|
|
1738
|
-
fireChangeEvent: true,
|
|
1739
|
-
suppressInvalidate: true
|
|
1740
|
-
});
|
|
1741
|
-
this._setCurrentItem(oItem);
|
|
1742
|
-
} else {
|
|
1743
|
-
|
|
1744
|
-
this.removeSelection({
|
|
1745
|
-
item: oItem,
|
|
1746
|
-
id: oItem.getId(),
|
|
1747
|
-
key: oItem.getKey(),
|
|
1748
|
-
fireChangeEvent: true,
|
|
1749
|
-
suppressInvalidate: true
|
|
1750
|
-
});
|
|
1751
|
-
this._setCurrentItem(oItem);
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
return;
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
this._resetCurrentItem();
|
|
1758
|
-
|
|
1759
|
-
// Handle when CTRL + A is pressed to select all
|
|
1760
|
-
// Note: at first this function should be called and
|
|
1761
|
-
// not the
|
|
1762
|
-
// ListItemBase
|
|
1763
1687
|
if ((oEvent.ctrlKey || oEvent.metaKey) && oEvent.which == KeyCodes.A) {
|
|
1764
1688
|
oEvent.setMarked();
|
|
1765
1689
|
oEvent.preventDefault();
|
|
1766
1690
|
|
|
1767
|
-
var aVisibleItems = this.getSelectableItems()
|
|
1691
|
+
var aVisibleItems = this.getSelectableItems().filter(function(oItem) {
|
|
1692
|
+
return !oItem.isA("sap.ui.core.SeparatorItem") && !oItem.isA("sap.m.GroupHeaderListItem");
|
|
1693
|
+
});
|
|
1768
1694
|
var aSelectedItems = this._getSelectedItemsOf(aVisibleItems);
|
|
1769
1695
|
|
|
1770
1696
|
if (aSelectedItems.length !== aVisibleItems.length) {
|
|
@@ -1773,6 +1699,7 @@ function(
|
|
|
1773
1699
|
item: oItem,
|
|
1774
1700
|
id: oItem.getId(),
|
|
1775
1701
|
key: oItem.getKey(),
|
|
1702
|
+
selectAll: true,
|
|
1776
1703
|
fireChangeEvent: true,
|
|
1777
1704
|
suppressInvalidate: true,
|
|
1778
1705
|
listItemUpdated: false
|
|
@@ -1786,6 +1713,7 @@ function(
|
|
|
1786
1713
|
item: oItem,
|
|
1787
1714
|
id: oItem.getId(),
|
|
1788
1715
|
key: oItem.getKey(),
|
|
1716
|
+
selectAll: true,
|
|
1789
1717
|
fireChangeEvent: true,
|
|
1790
1718
|
suppressInvalidate: true,
|
|
1791
1719
|
listItemUpdated: false
|
|
@@ -1793,6 +1721,29 @@ function(
|
|
|
1793
1721
|
}, this);
|
|
1794
1722
|
}
|
|
1795
1723
|
}
|
|
1724
|
+
},
|
|
1725
|
+
|
|
1726
|
+
onmousedown: function(oEvent) {
|
|
1727
|
+
this._setIsClick(true);
|
|
1728
|
+
},
|
|
1729
|
+
|
|
1730
|
+
onkeyup: function(oEvent) {
|
|
1731
|
+
var oItem = null;
|
|
1732
|
+
|
|
1733
|
+
// If an item is selected with SPACE inside of
|
|
1734
|
+
// suggest list the list
|
|
1735
|
+
// with all entries should be opened
|
|
1736
|
+
if (oEvent.which == KeyCodes.SPACE && this.isOpen() && this._isListInSuggestMode()) {
|
|
1737
|
+
this.open();
|
|
1738
|
+
oItem = this._getLastSelectedItem();
|
|
1739
|
+
|
|
1740
|
+
// Scrolls an item into the visual viewport
|
|
1741
|
+
if (oItem) {
|
|
1742
|
+
this.getListItem(oItem).focus();
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
return;
|
|
1746
|
+
}
|
|
1796
1747
|
}
|
|
1797
1748
|
}, true, this);
|
|
1798
1749
|
|
|
@@ -1938,8 +1889,14 @@ function(
|
|
|
1938
1889
|
oPropertyInfo = oControlEvent.getParameters(),
|
|
1939
1890
|
oToken = this._getTokenByItem(oItem);
|
|
1940
1891
|
|
|
1941
|
-
if (
|
|
1892
|
+
if (!oToken) {
|
|
1893
|
+
return;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
if (oPropertyInfo.name === "enabled") {
|
|
1942
1897
|
oToken.setVisible(oPropertyInfo.newValue);
|
|
1898
|
+
} else if (oToken.getMetadata().hasProperty(oPropertyInfo.name)) {
|
|
1899
|
+
oToken.setProperty(oPropertyInfo.name, oPropertyInfo.newValue, false);
|
|
1943
1900
|
}
|
|
1944
1901
|
};
|
|
1945
1902
|
|
|
@@ -2977,9 +2934,6 @@ function(
|
|
|
2977
2934
|
// to the corresponding mapped item
|
|
2978
2935
|
oListItem = this._mapItemToListItem(aItems[i]);
|
|
2979
2936
|
|
|
2980
|
-
// remove the previous event delegate
|
|
2981
|
-
oListItem.removeEventDelegate(this._oListItemEnterEventDelegate);
|
|
2982
|
-
|
|
2983
2937
|
// add the sap enter event delegate
|
|
2984
2938
|
oListItem.addDelegate(this._oListItemEnterEventDelegate, true, this, true);
|
|
2985
2939
|
|
|
@@ -3326,6 +3280,27 @@ function(
|
|
|
3326
3280
|
return oInfo;
|
|
3327
3281
|
};
|
|
3328
3282
|
|
|
3283
|
+
/**
|
|
3284
|
+
* Indicates if selection is triggered by a click
|
|
3285
|
+
*
|
|
3286
|
+
* @param {boolean} bIsClick Click indicator
|
|
3287
|
+
*
|
|
3288
|
+
* @private
|
|
3289
|
+
*/
|
|
3290
|
+
MultiComboBox.prototype._setIsClick = function (bIsClick) {
|
|
3291
|
+
this._bIsClick = bIsClick;
|
|
3292
|
+
};
|
|
3293
|
+
|
|
3294
|
+
/**
|
|
3295
|
+
* Gets flag for a mouse press
|
|
3296
|
+
*
|
|
3297
|
+
* @returns {boolean} if selection is triggered by a click
|
|
3298
|
+
* @private
|
|
3299
|
+
*/
|
|
3300
|
+
MultiComboBox.prototype._getIsClick = function () {
|
|
3301
|
+
return this._bIsClick;
|
|
3302
|
+
};
|
|
3303
|
+
|
|
3329
3304
|
/**
|
|
3330
3305
|
* Function calculates the available space for the tokenizer
|
|
3331
3306
|
*
|
|
@@ -17,7 +17,7 @@ sap.ui.define(["sap/ui/core/XMLComposite", "./library", "sap/ui/core/Item"], fun
|
|
|
17
17
|
* @implements sap.ui.core.IFormContent
|
|
18
18
|
*
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.71.
|
|
20
|
+
* @version 1.71.39
|
|
21
21
|
* @experimental since 1.52
|
|
22
22
|
* @since 1.52.0
|
|
23
23
|
* @alias sap.m.MultiEditField
|
package/src/sap/m/MultiInput.js
CHANGED
package/src/sap/m/NewsContent.js
CHANGED
|
@@ -36,7 +36,7 @@ function(library, Control, coreLibrary, Text, KeyCodes, ObjectAttributeRenderer,
|
|
|
36
36
|
* <code>text</code> property is styled and acts as a link. In this case the <code>text</code>
|
|
37
37
|
* property must also be set, as otherwise there will be no link displayed for the user.
|
|
38
38
|
* @extends sap.ui.core.Control
|
|
39
|
-
* @version 1.71.
|
|
39
|
+
* @version 1.71.39
|
|
40
40
|
*
|
|
41
41
|
* @constructor
|
|
42
42
|
* @public
|
|
@@ -71,7 +71,7 @@ sap.ui.define([
|
|
|
71
71
|
* a specific object. The object header title is the key identifier of the object and
|
|
72
72
|
* additional text and icons can be used to further distinguish it from other objects.
|
|
73
73
|
* @extends sap.ui.core.Control
|
|
74
|
-
* @version 1.71.
|
|
74
|
+
* @version 1.71.39
|
|
75
75
|
*
|
|
76
76
|
* @constructor
|
|
77
77
|
* @public
|
|
@@ -22,7 +22,7 @@ sap.ui.define(['sap/m/ToolbarLayoutData', 'sap/m/library', "sap/base/Log"],
|
|
|
22
22
|
* Holds layout data for the {@link sap.m.OverflowToolbar} items.
|
|
23
23
|
* @extends sap.m.ToolbarLayoutData
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.71.
|
|
25
|
+
* @version 1.71.39
|
|
26
26
|
*
|
|
27
27
|
* @constructor
|
|
28
28
|
* @public
|