Skip to content

Commit 983c73c

Browse files
chore: remove changes already covered by PR #13315 (ListItemBase semantic click)
1 parent 4d43265 commit 983c73c

8 files changed

Lines changed: 3 additions & 32 deletions

File tree

packages/fiori/src/Search.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ interface ISearchSuggestionItem extends UI5Element {
4444
selected: boolean;
4545
text: string;
4646
items?: ISearchSuggestionItem[];
47-
eventDetails: { click?: object };
4847
}
4948

5049
type SearchEventDetails = {

packages/fiori/src/SearchItemShowMore.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement
22
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
33
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
44
import ListItemBase from "@ui5/webcomponents/dist/ListItemBase.js";
5-
import type { ListItemBaseClickEventDetail } from "@ui5/webcomponents/dist/ListItemBase.js";
65
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
76
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
87
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
@@ -12,7 +11,7 @@ import SearchItemShowMoreCss from "./generated/themes/SearchItemShowMore.css.js"
1211
import { SEARCH_ITEM_SHOW_MORE_COUNT, SEARCH_ITEM_SHOW_MORE_NO_COUNT } from "./generated/i18n/i18n-defaults.js";
1312
import { isEnter, isSpace } from "@ui5/webcomponents-base/dist/Keys.js";
1413

15-
type ShowMoreItemClickEventDetail = ListItemBaseClickEventDetail & {
14+
type ShowMoreItemClickEventDetail = {
1615
fromKeyboard: boolean;
1716
}
1817

@@ -101,7 +100,7 @@ If a number is provided, it displays "Show more (N)", where N is that number.
101100

102101
_onclick(e: MouseEvent | KeyboardEvent, fromKeyboard = false) {
103102
e.stopImmediatePropagation();
104-
this.fireDecoratorEvent("click", { item: this, originalEvent: e, fromKeyboard });
103+
this.fireDecoratorEvent("click", { fromKeyboard });
105104
}
106105

107106
_onkeydown(e: KeyboardEvent) {

packages/main/src/ComboBox.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ interface IComboBoxItem extends UI5Element {
107107
selected?: boolean,
108108
additionalText?: string,
109109
_isVisible?: boolean,
110-
items?: Array<IComboBoxItem>,
111-
eventDetails: { click?: object },
110+
items?: Array<IComboBoxItem>
112111
}
113112

114113
type ValueStateAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;

packages/main/src/Input.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ interface IInputSuggestionItem extends UI5Element {
110110
focused: boolean;
111111
additionalText?: string;
112112
items?: IInputSuggestionItem[];
113-
eventDetails: { click?: object };
114113
}
115114

116115
interface IInputSuggestionItemSelectable extends IInputSuggestionItem {

packages/main/src/ListItemBase.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ type ListItemBasePressEventDetail = {
2525
key?: string,
2626
}
2727

28-
type ListItemBaseClickEventDetail = {
29-
item: ListItemBase,
30-
originalEvent: Event,
31-
}
32-
3328
/**
3429
* @class
3530
* A class to serve as a foundation
@@ -43,19 +38,6 @@ type ListItemBaseClickEventDetail = {
4338
renderer: jsxRenderer,
4439
styles: [styles, draggableElementStyles],
4540
})
46-
/**
47-
* Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.
48-
*
49-
* **Note:** The event will not be fired if the `disabled` property is set to `true`.
50-
*
51-
* @since 2.22.0
52-
* @public
53-
* @param {ListItemBase} item The activated item.
54-
* @param {Event} originalEvent The original event from the user interaction.
55-
*/
56-
@event("click", {
57-
bubbles: true,
58-
})
5941
@event("request-tabindex-change", {
6042
bubbles: true,
6143
})
@@ -74,7 +56,6 @@ type ListItemBaseClickEventDetail = {
7456
})
7557
class ListItemBase extends UI5Element implements ITabbable {
7658
eventDetails!: {
77-
"click": ListItemBaseClickEventDetail,
7859
"request-tabindex-change": FocusEvent,
7960
"_press": ListItemBasePressEventDetail,
8061
"_focused": FocusEvent,
@@ -187,7 +168,6 @@ class ListItemBase extends UI5Element implements ITabbable {
187168
if (this.getFocusDomRef()!.matches(":has(:focus-within)") || this._isDisabledInteractiveContentClicked(e)) {
188169
return;
189170
}
190-
e.stopPropagation();
191171
this.fireItemPress(e);
192172
}
193173

@@ -253,7 +233,6 @@ class ListItemBase extends UI5Element implements ITabbable {
253233
if (isEnter(e as KeyboardEvent)) {
254234
e.preventDefault();
255235
}
256-
this.fireDecoratorEvent("click", { item: this, originalEvent: e });
257236
this.fireDecoratorEvent("_press", { item: this, selected: this.selected, key: (e as KeyboardEvent).key });
258237
}
259238

@@ -334,5 +313,4 @@ export default ListItemBase;
334313

335314
export type {
336315
ListItemBasePressEventDetail,
337-
ListItemBaseClickEventDetail,
338316
};

packages/main/src/ListItemGroup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ type ListItemGroupMoveEventDetail = {
8383

8484
class ListItemGroup extends UI5Element {
8585
eventDetails!: {
86-
"click"?: object,
8786
"move-over": ListItemGroupMoveEventDetail,
8887
"move": ListItemGroupMoveEventDetail,
8988
}

packages/main/src/Menu.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ interface IMenuItem extends UI5Element {
6060
isMenuItem?: boolean;
6161
isSeparator?: boolean;
6262
isGroup?: boolean;
63-
eventDetails: { click?: object };
6463
}
6564

6665
type MenuItemClickEventDetail = {

packages/main/src/MultiComboBox.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ interface IMultiComboBoxItem extends UI5Element {
128128
isGroupItem?: boolean,
129129
_isVisible?: boolean,
130130
items?: Array<IMultiComboBoxItem>,
131-
eventDetails: { click?: object },
132131
}
133132

134133
type ValueStateAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;

0 commit comments

Comments
 (0)