@ui5/webcomponents 2.24.0-rc.1 → 2.24.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/CHANGELOG.md +45 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Bar.d.ts +4 -2
- package/dist/Bar.js +4 -2
- package/dist/Bar.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +7 -0
- package/dist/Breadcrumbs.js +4 -1
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Calendar.d.ts +0 -1
- package/dist/Calendar.js +0 -4
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarHeaderTemplate.js +1 -2
- package/dist/CalendarHeaderTemplate.js.map +1 -1
- package/dist/CalendarTemplate.js +2 -2
- package/dist/CalendarTemplate.js.map +1 -1
- package/dist/ComboBox.d.ts +10 -1
- package/dist/ComboBox.js +25 -6
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxItemCustom.d.ts +63 -0
- package/dist/ComboBoxItemCustom.js +85 -0
- package/dist/ComboBoxItemCustom.js.map +1 -0
- package/dist/ComboBoxItemCustomTemplate.d.ts +2 -0
- package/dist/ComboBoxItemCustomTemplate.js +9 -0
- package/dist/ComboBoxItemCustomTemplate.js.map +1 -0
- package/dist/ComboBoxPopoverTemplate.js +2 -2
- package/dist/ComboBoxPopoverTemplate.js.map +1 -1
- package/dist/Dialog.d.ts +19 -7
- package/dist/Dialog.js +88 -15
- package/dist/Dialog.js.map +1 -1
- package/dist/DialogTemplate.js +6 -10
- package/dist/DialogTemplate.js.map +1 -1
- package/dist/ListItem.js +1 -0
- package/dist/ListItem.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -0
- package/dist/MenuItem.js +7 -0
- package/dist/MenuItem.js.map +1 -1
- package/dist/MultiComboBox.d.ts +2 -0
- package/dist/MultiComboBox.js +17 -7
- package/dist/MultiComboBox.js.map +1 -1
- package/dist/MultiComboBoxItemCustom.d.ts +79 -0
- package/dist/MultiComboBoxItemCustom.js +121 -0
- package/dist/MultiComboBoxItemCustom.js.map +1 -0
- package/dist/MultiComboBoxItemCustomTemplate.d.ts +2 -0
- package/dist/MultiComboBoxItemCustomTemplate.js +10 -0
- package/dist/MultiComboBoxItemCustomTemplate.js.map +1 -0
- package/dist/Popup.js +2 -4
- package/dist/Popup.js.map +1 -1
- package/dist/RadioButton.d.ts +2 -1
- package/dist/RadioButton.js +7 -1
- package/dist/RadioButton.js.map +1 -1
- package/dist/RadioButtonTemplate.js +1 -1
- package/dist/RadioButtonTemplate.js.map +1 -1
- package/dist/bundle.esm.js +2 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/ComboBoxItemCustom.css +1 -0
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/Form.css +1 -1
- package/dist/css/themes/FormItemSpan.css +1 -1
- package/dist/css/themes/FormLayout.css +1 -1
- package/dist/css/themes/MultiComboBoxItemCustom.css +1 -0
- package/dist/css/themes/SelectPopover.css +1 -1
- package/dist/css/themes/TextArea.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +5 -8
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +5 -8
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +335 -12
- package/dist/custom-elements.json +267 -12
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +12 -5
- package/dist/generated/i18n/i18n-defaults.js +12 -5
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Calendar.css.d.ts +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/ComboBoxItemCustom.css.d.ts +2 -0
- package/dist/generated/themes/ComboBoxItemCustom.css.js +8 -0
- package/dist/generated/themes/ComboBoxItemCustom.css.js.map +1 -0
- package/dist/generated/themes/Dialog.css.d.ts +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/Form.css.d.ts +1 -1
- package/dist/generated/themes/Form.css.js +1 -1
- package/dist/generated/themes/Form.css.js.map +1 -1
- package/dist/generated/themes/FormItemSpan.css.d.ts +1 -1
- package/dist/generated/themes/FormItemSpan.css.js +1 -1
- package/dist/generated/themes/FormItemSpan.css.js.map +1 -1
- package/dist/generated/themes/FormLayout.css.d.ts +1 -1
- package/dist/generated/themes/FormLayout.css.js +1 -1
- package/dist/generated/themes/FormLayout.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBoxItemCustom.css.d.ts +2 -0
- package/dist/generated/themes/MultiComboBoxItemCustom.css.js +8 -0
- package/dist/generated/themes/MultiComboBoxItemCustom.css.js.map +1 -0
- package/dist/generated/themes/SelectPopover.css.d.ts +1 -1
- package/dist/generated/themes/SelectPopover.css.js +1 -1
- package/dist/generated/themes/SelectPopover.css.js.map +1 -1
- package/dist/generated/themes/TextArea.css.d.ts +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +5 -8
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +5 -8
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +41 -2
- package/dist/web-types.json +112 -4
- package/package.json +9 -9
- package/src/CalendarHeaderTemplate.tsx +1 -2
- package/src/CalendarTemplate.tsx +2 -2
- package/src/ComboBoxItemCustomTemplate.tsx +10 -0
- package/src/ComboBoxPopoverTemplate.tsx +2 -2
- package/src/DialogTemplate.tsx +21 -14
- package/src/MultiComboBoxItemCustomTemplate.tsx +22 -0
- package/src/RadioButtonTemplate.tsx +1 -0
- package/src/i18n/messagebundle.properties +29 -8
- package/src/i18n/messagebundle_ar.properties +18 -4
- package/src/i18n/messagebundle_bg.properties +18 -4
- package/src/i18n/messagebundle_ca.properties +18 -4
- package/src/i18n/messagebundle_cnr.properties +18 -4
- package/src/i18n/messagebundle_cs.properties +18 -4
- package/src/i18n/messagebundle_cy.properties +18 -4
- package/src/i18n/messagebundle_da.properties +18 -4
- package/src/i18n/messagebundle_de.properties +18 -4
- package/src/i18n/messagebundle_el.properties +18 -4
- package/src/i18n/messagebundle_en.properties +18 -4
- package/src/i18n/messagebundle_en_GB.properties +18 -4
- package/src/i18n/messagebundle_en_US_sappsd.properties +18 -4
- package/src/i18n/messagebundle_en_US_saprigi.properties +18 -4
- package/src/i18n/messagebundle_en_US_saptrc.properties +18 -4
- package/src/i18n/messagebundle_es.properties +18 -4
- package/src/i18n/messagebundle_es_MX.properties +18 -4
- package/src/i18n/messagebundle_et.properties +18 -4
- package/src/i18n/messagebundle_fi.properties +18 -4
- package/src/i18n/messagebundle_fr.properties +18 -4
- package/src/i18n/messagebundle_fr_CA.properties +18 -4
- package/src/i18n/messagebundle_hi.properties +18 -4
- package/src/i18n/messagebundle_hr.properties +19 -5
- package/src/i18n/messagebundle_hu.properties +18 -4
- package/src/i18n/messagebundle_id.properties +18 -4
- package/src/i18n/messagebundle_it.properties +18 -4
- package/src/i18n/messagebundle_iw.properties +18 -4
- package/src/i18n/messagebundle_ja.properties +18 -4
- package/src/i18n/messagebundle_kk.properties +18 -4
- package/src/i18n/messagebundle_ko.properties +18 -4
- package/src/i18n/messagebundle_lt.properties +18 -4
- package/src/i18n/messagebundle_lv.properties +18 -4
- package/src/i18n/messagebundle_mk.properties +18 -4
- package/src/i18n/messagebundle_ms.properties +18 -4
- package/src/i18n/messagebundle_nl.properties +18 -4
- package/src/i18n/messagebundle_no.properties +18 -4
- package/src/i18n/messagebundle_pl.properties +18 -4
- package/src/i18n/messagebundle_pt.properties +18 -4
- package/src/i18n/messagebundle_pt_PT.properties +18 -4
- package/src/i18n/messagebundle_ro.properties +18 -4
- package/src/i18n/messagebundle_ru.properties +18 -4
- package/src/i18n/messagebundle_sh.properties +18 -4
- package/src/i18n/messagebundle_sk.properties +18 -4
- package/src/i18n/messagebundle_sl.properties +18 -4
- package/src/i18n/messagebundle_sr.properties +18 -4
- package/src/i18n/messagebundle_sv.properties +18 -4
- package/src/i18n/messagebundle_th.properties +18 -4
- package/src/i18n/messagebundle_tr.properties +18 -4
- package/src/i18n/messagebundle_uk.properties +18 -4
- package/src/i18n/messagebundle_vi.properties +18 -4
- package/src/i18n/messagebundle_zh_CN.properties +18 -4
- package/src/i18n/messagebundle_zh_TW.properties +18 -4
- package/src/themes/Calendar.css +6 -0
- package/src/themes/ComboBoxItemCustom.css +14 -0
- package/src/themes/Dialog.css +12 -7
- package/src/themes/FormItemSpan.css +4 -4
- package/src/themes/FormLayout.css +4 -4
- package/src/themes/MultiComboBoxItemCustom.css +19 -0
- package/src/themes/SelectPopover.css +13 -2
- package/src/themes/TextArea.css +1 -1
- package/src/themes/base/Dialog-parameters.css +2 -5
- package/src/themes/base/sizes-parameters.css +2 -3
- package/src/themes/sap_horizon/Dialog-parameters.css +0 -8
- package/src/themes/sap_horizon_dark/Dialog-parameters.css +0 -8
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { IComboBoxItem } from "./ComboBox.js";
|
|
2
|
+
import ListItemBase from "./ListItemBase.js";
|
|
3
|
+
import type { ListItemBasePressEventDetail } from "./ListItemBase.js";
|
|
4
|
+
import type { DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
5
|
+
type ComboBoxItemCustomClickEventDetail = {
|
|
6
|
+
item?: ComboBoxItemCustom;
|
|
7
|
+
originalEvent: Event;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @class
|
|
11
|
+
* The `ui5-cb-item-custom` is a combobox item component
|
|
12
|
+
* that allows placing custom content inside a combobox item.
|
|
13
|
+
* The `text` property is used for filtering and auto-complete.
|
|
14
|
+
* For highlighting functionality, see `@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js`.
|
|
15
|
+
*
|
|
16
|
+
* @constructor
|
|
17
|
+
* @extends ListItemBase
|
|
18
|
+
* @implements {IComboBoxItem}
|
|
19
|
+
* @public
|
|
20
|
+
* @since 2.24.0
|
|
21
|
+
*/
|
|
22
|
+
declare class ComboBoxItemCustom extends ListItemBase implements IComboBoxItem {
|
|
23
|
+
eventDetails: {
|
|
24
|
+
"click": ComboBoxItemCustomClickEventDetail;
|
|
25
|
+
"request-tabindex-change": FocusEvent;
|
|
26
|
+
"_press": ListItemBasePressEventDetail;
|
|
27
|
+
"_focused": FocusEvent;
|
|
28
|
+
"forward-after": void;
|
|
29
|
+
"forward-before": void;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Defines the text of the component.
|
|
33
|
+
* Used for filtering, autocomplete, and mobile rendering.
|
|
34
|
+
* @default undefined
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
text?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Defines the value of the component.
|
|
40
|
+
* Used for programmatic selection via the `selectedValue` property.
|
|
41
|
+
* @default undefined
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
value?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Indicates whether the item is filtered.
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
_isVisible: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Indicates whether the item is focused.
|
|
52
|
+
* @protected
|
|
53
|
+
*/
|
|
54
|
+
focused: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Defines the content of the component.
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
content: DefaultSlot<Node>;
|
|
60
|
+
get _effectiveTabIndex(): number;
|
|
61
|
+
}
|
|
62
|
+
export default ComboBoxItemCustom;
|
|
63
|
+
export type { ComboBoxItemCustomClickEventDetail };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
10
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
11
|
+
import ListItemBase from "./ListItemBase.js";
|
|
12
|
+
import ComboBoxItemCustomTemplate from "./ComboBoxItemCustomTemplate.js";
|
|
13
|
+
import styles from "./generated/themes/ComboBoxItemCustom.css.js";
|
|
14
|
+
/**
|
|
15
|
+
* @class
|
|
16
|
+
* The `ui5-cb-item-custom` is a combobox item component
|
|
17
|
+
* that allows placing custom content inside a combobox item.
|
|
18
|
+
* The `text` property is used for filtering and auto-complete.
|
|
19
|
+
* For highlighting functionality, see `@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js`.
|
|
20
|
+
*
|
|
21
|
+
* @constructor
|
|
22
|
+
* @extends ListItemBase
|
|
23
|
+
* @implements {IComboBoxItem}
|
|
24
|
+
* @public
|
|
25
|
+
* @since 2.24.0
|
|
26
|
+
*/
|
|
27
|
+
let ComboBoxItemCustom = class ComboBoxItemCustom extends ListItemBase {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
/**
|
|
31
|
+
* Indicates whether the item is filtered.
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
this._isVisible = false;
|
|
35
|
+
/**
|
|
36
|
+
* Indicates whether the item is focused.
|
|
37
|
+
* @protected
|
|
38
|
+
*/
|
|
39
|
+
this.focused = false;
|
|
40
|
+
}
|
|
41
|
+
get _effectiveTabIndex() {
|
|
42
|
+
return -1;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
__decorate([
|
|
46
|
+
property()
|
|
47
|
+
], ComboBoxItemCustom.prototype, "text", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
property()
|
|
50
|
+
], ComboBoxItemCustom.prototype, "value", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
property({ type: Boolean, noAttribute: true })
|
|
53
|
+
], ComboBoxItemCustom.prototype, "_isVisible", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ type: Boolean })
|
|
56
|
+
], ComboBoxItemCustom.prototype, "focused", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
slot({ type: Node, "default": true, invalidateOnChildChange: true })
|
|
59
|
+
], ComboBoxItemCustom.prototype, "content", void 0);
|
|
60
|
+
ComboBoxItemCustom = __decorate([
|
|
61
|
+
customElement({
|
|
62
|
+
tag: "ui5-cb-item-custom",
|
|
63
|
+
template: ComboBoxItemCustomTemplate,
|
|
64
|
+
styles: [
|
|
65
|
+
ListItemBase.styles,
|
|
66
|
+
styles,
|
|
67
|
+
],
|
|
68
|
+
})
|
|
69
|
+
/**
|
|
70
|
+
* Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.
|
|
71
|
+
*
|
|
72
|
+
* **Note:** The event will not be fired if the `disabled` property is set to `true`.
|
|
73
|
+
*
|
|
74
|
+
* @since 2.24.0
|
|
75
|
+
* @public
|
|
76
|
+
* @param {Event} originalEvent The original event from the user interaction.
|
|
77
|
+
*/
|
|
78
|
+
,
|
|
79
|
+
event("click", {
|
|
80
|
+
bubbles: true,
|
|
81
|
+
})
|
|
82
|
+
], ComboBoxItemCustom);
|
|
83
|
+
ComboBoxItemCustom.define();
|
|
84
|
+
export default ComboBoxItemCustom;
|
|
85
|
+
//# sourceMappingURL=ComboBoxItemCustom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBoxItemCustom.js","sourceRoot":"","sources":["../src/ComboBoxItemCustom.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAE1E,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,OAAO,0BAA0B,MAAM,iCAAiC,CAAC;AACzE,OAAO,MAAM,MAAM,8CAA8C,CAAC;AAQlE;;;;;;;;;;;;GAYG;AAqBH,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,YAAY;IAA7C;;QA4BC;;;WAGG;QAEH,eAAU,GAAG,KAAK,CAAC;QAEnB;;;WAGG;QAEH,YAAO,GAAG,KAAK,CAAC;IAYjB,CAAC;IAHA,IAAI,kBAAkB;QACrB,OAAO,CAAC,CAAC,CAAC;IACX,CAAC;CACD,CAAA;AAnCA;IADC,QAAQ,EAAE;gDACG;AASd;IADC,QAAQ,EAAE;iDACI;AAOf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;sDAC5B;AAOnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDACZ;AAOhB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC;mDACzC;AA/CvB,kBAAkB;IApBvB,aAAa,CAAC;QACd,GAAG,EAAE,oBAAoB;QACzB,QAAQ,EAAE,0BAA0B;QACpC,MAAM,EAAE;YACP,YAAY,CAAC,MAAM;YACnB,MAAM;SACN;KACD,CAAC;IACF;;;;;;;;OAQG;;IACF,KAAK,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,IAAI;KACb,CAAC;GACI,kBAAkB,CAoDvB;AAED,kBAAkB,CAAC,MAAM,EAAE,CAAC;AAE5B,eAAe,kBAAkB,CAAC","sourcesContent":["import property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport type { IComboBoxItem } from \"./ComboBox.js\";\nimport ListItemBase from \"./ListItemBase.js\";\nimport type { ListItemBasePressEventDetail } from \"./ListItemBase.js\";\nimport ComboBoxItemCustomTemplate from \"./ComboBoxItemCustomTemplate.js\";\nimport styles from \"./generated/themes/ComboBoxItemCustom.css.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n\ntype ComboBoxItemCustomClickEventDetail = {\n\titem?: ComboBoxItemCustom,\n\toriginalEvent: Event,\n}\n\n/**\n * @class\n * The `ui5-cb-item-custom` is a combobox item component\n * that allows placing custom content inside a combobox item.\n * The `text` property is used for filtering and auto-complete.\n * For highlighting functionality, see `@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js`.\n *\n * @constructor\n * @extends ListItemBase\n * @implements {IComboBoxItem}\n * @public\n * @since 2.24.0\n */\n@customElement({\n\ttag: \"ui5-cb-item-custom\",\n\ttemplate: ComboBoxItemCustomTemplate,\n\tstyles: [\n\t\tListItemBase.styles,\n\t\tstyles,\n\t],\n})\n/**\n * Fired when the component is activated either with a mouse/tap or by using the Enter or Space key.\n *\n * **Note:** The event will not be fired if the `disabled` property is set to `true`.\n *\n * @since 2.24.0\n * @public\n * @param {Event} originalEvent The original event from the user interaction.\n */\n@event(\"click\", {\n\tbubbles: true,\n})\nclass ComboBoxItemCustom extends ListItemBase implements IComboBoxItem {\n\teventDetails!: {\n\t\t\"click\": ComboBoxItemCustomClickEventDetail,\n\t\t\"request-tabindex-change\": FocusEvent,\n\t\t\"_press\": ListItemBasePressEventDetail,\n\t\t\"_focused\": FocusEvent,\n\t\t\"forward-after\": void,\n\t\t\"forward-before\": void,\n\t};\n\n\t/**\n\t * Defines the text of the component.\n\t * Used for filtering, autocomplete, and mobile rendering.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\ttext?: string;\n\n\t/**\n\t * Defines the value of the component.\n\t * Used for programmatic selection via the `selectedValue` property.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tvalue?: string;\n\n\t/**\n\t * Indicates whether the item is filtered.\n\t * @private\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_isVisible = false;\n\n\t/**\n\t * Indicates whether the item is focused.\n\t * @protected\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t * Defines the content of the component.\n\t * @public\n\t */\n\t@slot({ type: Node, \"default\": true, invalidateOnChildChange: true })\n\tcontent!: DefaultSlot<Node>;\n\n\tget _effectiveTabIndex() {\n\t\treturn -1;\n\t}\n}\n\nComboBoxItemCustom.define();\n\nexport default ComboBoxItemCustom;\nexport type { ComboBoxItemCustomClickEventDetail };\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
|
+
import ListItemBaseTemplate from "./ListItemBaseTemplate.js";
|
|
3
|
+
export default function ComboBoxItemCustomTemplate() {
|
|
4
|
+
return ListItemBaseTemplate.call(this, { listItemContent }, { role: "option" });
|
|
5
|
+
}
|
|
6
|
+
function listItemContent() {
|
|
7
|
+
return _jsx("slot", {});
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ComboBoxItemCustomTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboBoxItemCustomTemplate.js","sourceRoot":"","sources":["../src/ComboBoxItemCustomTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAG7D,MAAM,CAAC,OAAO,UAAU,0BAA0B;IACjD,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACjF,CAAC;AAED,SAAS,eAAe;IACvB,OAAO,gBAAa,CAAC;AACtB,CAAC","sourcesContent":["import ListItemBaseTemplate from \"./ListItemBaseTemplate.js\";\nimport type ComboBoxItemCustom from \"./ComboBoxItemCustom.js\";\n\nexport default function ComboBoxItemCustomTemplate(this: ComboBoxItemCustom) {\n\treturn ListItemBaseTemplate.call(this, { listItemContent }, { role: \"option\" });\n}\n\nfunction listItemContent(this: ComboBoxItemCustom) {\n\treturn <slot></slot>;\n}\n"]}
|
|
@@ -18,10 +18,10 @@ export default function ComboBoxPopoverTemplate() {
|
|
|
18
18
|
// For group items, return all nested items
|
|
19
19
|
return item.items
|
|
20
20
|
.filter(nestedItem => !!nestedItem)
|
|
21
|
-
.map(nestedItem => _jsx(SuggestionItem, { text: nestedItem.text,
|
|
21
|
+
.map(nestedItem => _jsx(SuggestionItem, { text: nestedItem.text, additionalText: nestedItem.additionalText, markupText: generateHighlightedMarkupFirstMatch(nestedItem.text || "", this.filterValue) }));
|
|
22
22
|
}
|
|
23
23
|
// For regular items
|
|
24
|
-
return _jsx(SuggestionItem, { text: item.text,
|
|
24
|
+
return _jsx(SuggestionItem, { text: item.text, additionalText: item.additionalText, markupText: generateHighlightedMarkupFirstMatch(item.text || "", this.filterValue) });
|
|
25
25
|
}) }) })] }), this.hasValueStateText &&
|
|
26
26
|
_jsxs("div", { class: this.classes.popoverValueState, style: this.styles.popoverValueStateMessage, children: [_jsx(Icon, { class: "ui5-input-value-state-message-icon", name: this._valueStateMessageIcon }), this.open && valueStateMessage.call(this)] })] }), !this._isPhone && this.hasValueStateText &&
|
|
27
27
|
_jsxs("div", { slot: "header", class: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBoxPopoverTemplate.js","sourceRoot":"","sources":["../src/ComboBoxPopoverTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,mCAAmC,MAAM,0EAA0E,CAAC;AAG3H,MAAM,CAAC,OAAO,UAAU,uBAAuB;IAC9C,OAAO,CACN,8BACC,MAAC,iBAAiB,IACjB,EAAE,EAAE,IAAI,CAAC,mBAAmB,EAC5B,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAC3B,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB,EACrC,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAE,IA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AAC,gCAAgC,YAEjD,eAAK,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,iBAAiB,aACvD,KAAC,IAAI,IAAC,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAE,IAAI,CAAC,sBAAsB,GAAG,EACnF,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,IACzB,GACG,IAEP,CACH,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB;IACzB,OAAO,CACN,4BACG,IAAI,CAAC,qCAAqC,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,mBAAmB,GAAQ,GAChH,CACH,CAAC;AACH,CAAC","sourcesContent":["import Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport List from \"./List.js\";\nimport Input from \"./Input.js\";\nimport Title from \"./Title.js\";\nimport PopoverHorizontalAlign from \"./types/PopoverHorizontalAlign.js\";\nimport Popover from \"./Popover.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport SuggestionItem from \"./SuggestionItem.js\";\nimport generateHighlightedMarkupFirstMatch from \"@ui5/webcomponents-base/dist/util/generateHighlightedMarkupFirstMatch.js\";\nimport type ComboBox from \"./ComboBox.js\";\n\nexport default function ComboBoxPopoverTemplate(this: ComboBox) {\n\treturn (\n\t\t<>\n\t\t\t<ResponsivePopover\n\t\t\t\tid={this.responsivePopoverId}\n\t\t\t\tclass={this.classes.popover}\n\t\t\t\tstyle={this.styles.suggestionsPopover}\n\t\t\t\ttabindex={-1}\n\t\t\t\topen={this.open}\n\t\t\t\topener={this}\n\t\t\t\thideArrow={true}\n\t\t\t\tpreventFocusRestore={true}\n\t\t\t\tpreventInitialFocus={true}\n\t\t\t\tplacement=\"Bottom\"\n\t\t\t\thorizontalAlign=\"Start\"\n\t\t\t\taccessibleName={this._popupLabel}\n\t\t\t\tonBeforeOpen={this._beforeOpenPopover}\n\t\t\t\tonOpen={this._afterOpenPopover}\n\t\t\t\tonClose={this._afterClosePopover}\n\t\t\t\tonKeyDown={this._handlePopoverKeydown}\n\t\t\t\tonFocusOut={this._handlePopoverFocusout}\n\t\t\t>\n\t\t\t\t{this.loading &&\n\t\t\t\t\t<BusyIndicator active={true} class=\"ui5-combobox-busy\"/>\n\t\t\t\t}\n\n\t\t\t\t{!this.loading && this._isPhone &&\n\t\t\t\t<>\n\t\t\t\t\t<div slot=\"header\" class=\"ui5-responsive-popover-header\">\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<Title\n\t\t\t\t\t\t\t\tlevel=\"H1\"\n\t\t\t\t\t\t\t\twrappingType=\"None\"\n\t\t\t\t\t\t\t\tclass=\"ui5-responsive-popover-header-text\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._headerTitleText}\n\t\t\t\t\t\t\t</Title>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\topen={this.openOnMobile}\n\t\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\t\tvalueState={this.valueState}\n\t\t\t\t\t\t\t\tshowClearIcon={this.showClearIcon}\n\t\t\t\t\t\t\t\tnoTypeahead={this.noTypeahead}\n\t\t\t\t\t\t\t\tonKeyDown={this._handleMobileKeydown}\n\t\t\t\t\t\t\t\tonInput={this._handleMobileInput}\n\t\t\t\t\t\t\t\tonChange={this._inputChange}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ this._filteredItems.flatMap(item => {\n\t\t\t\t\t\t\t\t\tif (item.isGroupItem && item.items) {\n\t\t\t\t\t\t\t\t\t\t// For group items, return all nested items\n\t\t\t\t\t\t\t\t\t\treturn item.items\n\t\t\t\t\t\t\t\t\t\t\t.filter(nestedItem => !!nestedItem)\n\t\t\t\t\t\t\t\t\t\t\t.map(nestedItem =>\n\t\t\t\t\t\t\t\t\t\t\t\t<SuggestionItem text={nestedItem.text} additional-text={nestedItem.additionalText} markupText={generateHighlightedMarkupFirstMatch(nestedItem.text || \"\", this.filterValue)}/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// For regular items\n\t\t\t\t\t\t\t\t\treturn <SuggestionItem text={item.text} additional-text={item.additionalText} markupText={generateHighlightedMarkupFirstMatch(item.text || \"\", this.filterValue)}/>;\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</Input>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.hasValueStateText &&\n\t\t\t\t\t<div class={this.classes.popoverValueState} style={this.styles.popoverValueStateMessage}>\n\t\t\t\t\t\t<Icon class=\"ui5-input-value-state-message-icon\" name={this._valueStateMessageIcon}/>\n\t\t\t\t\t\t{ this.open && valueStateMessage.call(this) }\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</>\n\t\t\t\t}\n\n\t\t\t\t{!this._isPhone && this.hasValueStateText &&\n\t\t\t\t<div\n\t\t\t\t\tslot=\"header\"\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t\"ui5-responsive-popover-header\": true,\n\t\t\t\t\t\t...this.classes.popoverValueState,\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={this.styles.suggestionPopoverHeader}\n\t\t\t\t>\n\t\t\t\t\t<Icon class=\"ui5-input-value-state-message-icon\" name={this._valueStateMessageIcon}/>\n\t\t\t\t\t{ this.open && valueStateMessage.call(this) }\n\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\t{!this.loading && !!this._filteredItems.length &&\n\t\t\t\t<List\n\t\t\t\t\tclass=\"ui5-combobox-items-list\"\n\t\t\t\t\tseparators=\"None\"\n\t\t\t\t\taccessibleRole=\"ListBox\"\n\t\t\t\t\tselectionMode=\"Single\"\n\t\t\t\t\tonItemClick={this._selectItem}\n\t\t\t\t\tonItemFocused={this._onItemFocus}\n\t\t\t\t\tonMouseDown={this._itemMousedown}\n\t\t\t\t>\n\t\t\t\t\t{ this._filteredItems.map(item => <slot name={item._individualSlot}></slot>)}\n\t\t\t\t</List>\n\t\t\t\t}\n\n\t\t\t\t{this._isPhone &&\n\t\t\t<div slot=\"footer\" class=\"ui5-responsive-popover-footer\">\n\t\t\t\t<Button\n\t\t\t\t\tdesign=\"Emphasized\"\n\t\t\t\t\tonClick={this._closeRespPopover}\n\t\t\t\t>{this._dialogOkButtonText}</Button>\n\t\t\t\t<Button\n\t\t\t\t\tclass=\"ui5-responsive-popover-close-btn\"\n\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\tonClick={this._closeRespPopover}\n\t\t\t\t>\n\t\t\t\t\t{this._dialogCancelButtonText}\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t\t}\n\t\t\t</ResponsivePopover>\n\n\t\t\t{this.shouldOpenValueStateMessagePopover &&\n\t\t<Popover\n\t\t\tpreventFocusRestore={true}\n\t\t\tpreventInitialFocus={true}\n\t\t\thideArrow={true}\n\t\t\ttabindex={-1}\n\t\t\tclass=\"ui5-valuestatemessage-popover\"\n\t\t\thorizontalAlign={PopoverHorizontalAlign.Start}\n\t\t\tplacement=\"Bottom\"\n\t\t\topener={this}\n\t\t\topen={this.valueStateOpen}\n\t\t\tonClose={this._handleValueStatePopoverAfterClose}\n\t\t\tonFocusOut={this._handleValueStatePopoverFocusout}\n\t\t>\n\t\t\t<div slot=\"header\" class={this.classes.popoverValueState}>\n\t\t\t\t<Icon class=\"ui5-input-value-state-message-icon\" name={this._valueStateMessageIcon}/>\n\t\t\t\t{ valueStateMessage.call(this) }\n\t\t\t</div>\n\t\t</Popover>\n\t\t\t}\n\t\t</>\n\t);\n}\n\nfunction valueStateMessage(this: ComboBox) {\n\treturn (\n\t\t<>\n\t\t\t{ this.shouldDisplayDefaultValueStateMessage ? this.valueStateDefaultText : <slot name=\"valueStateMessage\"></slot> }\n\t\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EAAC,mBAAmB,GAAQ,GAChH,CACH,CAAC;AACH,CAAC","sourcesContent":["import Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport List from \"./List.js\";\nimport Input from \"./Input.js\";\nimport Title from \"./Title.js\";\nimport PopoverHorizontalAlign from \"./types/PopoverHorizontalAlign.js\";\nimport Popover from \"./Popover.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport SuggestionItem from \"./SuggestionItem.js\";\nimport generateHighlightedMarkupFirstMatch from \"@ui5/webcomponents-base/dist/util/generateHighlightedMarkupFirstMatch.js\";\nimport type ComboBox from \"./ComboBox.js\";\n\nexport default function ComboBoxPopoverTemplate(this: ComboBox) {\n\treturn (\n\t\t<>\n\t\t\t<ResponsivePopover\n\t\t\t\tid={this.responsivePopoverId}\n\t\t\t\tclass={this.classes.popover}\n\t\t\t\tstyle={this.styles.suggestionsPopover}\n\t\t\t\ttabindex={-1}\n\t\t\t\topen={this.open}\n\t\t\t\topener={this}\n\t\t\t\thideArrow={true}\n\t\t\t\tpreventFocusRestore={true}\n\t\t\t\tpreventInitialFocus={true}\n\t\t\t\tplacement=\"Bottom\"\n\t\t\t\thorizontalAlign=\"Start\"\n\t\t\t\taccessibleName={this._popupLabel}\n\t\t\t\tonBeforeOpen={this._beforeOpenPopover}\n\t\t\t\tonOpen={this._afterOpenPopover}\n\t\t\t\tonClose={this._afterClosePopover}\n\t\t\t\tonKeyDown={this._handlePopoverKeydown}\n\t\t\t\tonFocusOut={this._handlePopoverFocusout}\n\t\t\t>\n\t\t\t\t{this.loading &&\n\t\t\t\t\t<BusyIndicator active={true} class=\"ui5-combobox-busy\"/>\n\t\t\t\t}\n\n\t\t\t\t{!this.loading && this._isPhone &&\n\t\t\t\t<>\n\t\t\t\t\t<div slot=\"header\" class=\"ui5-responsive-popover-header\">\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<Title\n\t\t\t\t\t\t\t\tlevel=\"H1\"\n\t\t\t\t\t\t\t\twrappingType=\"None\"\n\t\t\t\t\t\t\t\tclass=\"ui5-responsive-popover-header-text\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._headerTitleText}\n\t\t\t\t\t\t\t</Title>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\topen={this.openOnMobile}\n\t\t\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\t\t\tvalueState={this.valueState}\n\t\t\t\t\t\t\t\tshowClearIcon={this.showClearIcon}\n\t\t\t\t\t\t\t\tnoTypeahead={this.noTypeahead}\n\t\t\t\t\t\t\t\tonKeyDown={this._handleMobileKeydown}\n\t\t\t\t\t\t\t\tonInput={this._handleMobileInput}\n\t\t\t\t\t\t\t\tonChange={this._inputChange}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ this._filteredItems.flatMap(item => {\n\t\t\t\t\t\t\t\t\tif (item.isGroupItem && item.items) {\n\t\t\t\t\t\t\t\t\t\t// For group items, return all nested items\n\t\t\t\t\t\t\t\t\t\treturn item.items\n\t\t\t\t\t\t\t\t\t\t\t.filter(nestedItem => !!nestedItem)\n\t\t\t\t\t\t\t\t\t\t\t.map(nestedItem =>\n\t\t\t\t\t\t\t\t\t\t\t\t<SuggestionItem text={nestedItem.text} additionalText={nestedItem.additionalText} markupText={generateHighlightedMarkupFirstMatch(nestedItem.text || \"\", this.filterValue)}/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// For regular items\n\t\t\t\t\t\t\t\t\treturn <SuggestionItem text={item.text} additionalText={item.additionalText} markupText={generateHighlightedMarkupFirstMatch(item.text || \"\", this.filterValue)}/>;\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</Input>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{this.hasValueStateText &&\n\t\t\t\t\t<div class={this.classes.popoverValueState} style={this.styles.popoverValueStateMessage}>\n\t\t\t\t\t\t<Icon class=\"ui5-input-value-state-message-icon\" name={this._valueStateMessageIcon}/>\n\t\t\t\t\t\t{ this.open && valueStateMessage.call(this) }\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</>\n\t\t\t\t}\n\n\t\t\t\t{!this._isPhone && this.hasValueStateText &&\n\t\t\t\t<div\n\t\t\t\t\tslot=\"header\"\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t\"ui5-responsive-popover-header\": true,\n\t\t\t\t\t\t...this.classes.popoverValueState,\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={this.styles.suggestionPopoverHeader}\n\t\t\t\t>\n\t\t\t\t\t<Icon class=\"ui5-input-value-state-message-icon\" name={this._valueStateMessageIcon}/>\n\t\t\t\t\t{ this.open && valueStateMessage.call(this) }\n\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\t{!this.loading && !!this._filteredItems.length &&\n\t\t\t\t<List\n\t\t\t\t\tclass=\"ui5-combobox-items-list\"\n\t\t\t\t\tseparators=\"None\"\n\t\t\t\t\taccessibleRole=\"ListBox\"\n\t\t\t\t\tselectionMode=\"Single\"\n\t\t\t\t\tonItemClick={this._selectItem}\n\t\t\t\t\tonItemFocused={this._onItemFocus}\n\t\t\t\t\tonMouseDown={this._itemMousedown}\n\t\t\t\t>\n\t\t\t\t\t{ this._filteredItems.map(item => <slot name={item._individualSlot}></slot>)}\n\t\t\t\t</List>\n\t\t\t\t}\n\n\t\t\t\t{this._isPhone &&\n\t\t\t<div slot=\"footer\" class=\"ui5-responsive-popover-footer\">\n\t\t\t\t<Button\n\t\t\t\t\tdesign=\"Emphasized\"\n\t\t\t\t\tonClick={this._closeRespPopover}\n\t\t\t\t>{this._dialogOkButtonText}</Button>\n\t\t\t\t<Button\n\t\t\t\t\tclass=\"ui5-responsive-popover-close-btn\"\n\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\tonClick={this._closeRespPopover}\n\t\t\t\t>\n\t\t\t\t\t{this._dialogCancelButtonText}\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t\t}\n\t\t\t</ResponsivePopover>\n\n\t\t\t{this.shouldOpenValueStateMessagePopover &&\n\t\t<Popover\n\t\t\tpreventFocusRestore={true}\n\t\t\tpreventInitialFocus={true}\n\t\t\thideArrow={true}\n\t\t\ttabindex={-1}\n\t\t\tclass=\"ui5-valuestatemessage-popover\"\n\t\t\thorizontalAlign={PopoverHorizontalAlign.Start}\n\t\t\tplacement=\"Bottom\"\n\t\t\topener={this}\n\t\t\topen={this.valueStateOpen}\n\t\t\tonClose={this._handleValueStatePopoverAfterClose}\n\t\t\tonFocusOut={this._handleValueStatePopoverFocusout}\n\t\t>\n\t\t\t<div slot=\"header\" class={this.classes.popoverValueState}>\n\t\t\t\t<Icon class=\"ui5-input-value-state-message-icon\" name={this._valueStateMessageIcon}/>\n\t\t\t\t{ valueStateMessage.call(this) }\n\t\t\t</div>\n\t\t</Popover>\n\t\t\t}\n\t\t</>\n\t);\n}\n\nfunction valueStateMessage(this: ComboBox) {\n\treturn (\n\t\t<>\n\t\t\t{ this.shouldDisplayDefaultValueStateMessage ? this.valueStateDefaultText : <slot name=\"valueStateMessage\"></slot> }\n\t\t</>\n\t);\n}\n"]}
|
package/dist/Dialog.d.ts
CHANGED
|
@@ -37,14 +37,14 @@ import "@ui5/webcomponents-icons/dist/information.js";
|
|
|
37
37
|
* ### Keyboard Handling
|
|
38
38
|
*
|
|
39
39
|
* #### Basic Navigation
|
|
40
|
-
* When the `ui5-dialog` has the `draggable` property set to `true
|
|
40
|
+
* When the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog
|
|
41
41
|
* with the following keyboard shortcuts:
|
|
42
42
|
*
|
|
43
43
|
* - [Up] or [Down] arrow keys - Move the dialog up/down.
|
|
44
44
|
* - [Left] or [Right] arrow keys - Move the dialog left/right.
|
|
45
45
|
*
|
|
46
46
|
* #### Resizing
|
|
47
|
-
* When the `ui5-dialog` has the `resizable` property set to `true
|
|
47
|
+
* When the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog
|
|
48
48
|
* with the following keyboard shortcuts:
|
|
49
49
|
*
|
|
50
50
|
* - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.
|
|
@@ -156,18 +156,24 @@ declare class Dialog extends Popup {
|
|
|
156
156
|
static _isHeader(element: HTMLElement): boolean;
|
|
157
157
|
get isModal(): boolean;
|
|
158
158
|
get _ariaLabelledBy(): string | undefined;
|
|
159
|
-
get ariaRoleDescriptionHeaderText(): string | undefined;
|
|
160
159
|
get effectiveAriaDescribedBy(): string | undefined;
|
|
161
|
-
get
|
|
162
|
-
get
|
|
163
|
-
get
|
|
160
|
+
get ariaDescribedByIds(): string;
|
|
161
|
+
get dialogAriaDescribedByText(): string;
|
|
162
|
+
get ariaDescribedByTextResizable(): string;
|
|
163
|
+
get ariaDescribedByTextDraggable(): string;
|
|
164
|
+
get ariaDescribedByTextDraggableAndResizable(): string;
|
|
165
|
+
get ariaDescribedByHandlerText(): string;
|
|
164
166
|
/**
|
|
165
167
|
* Determines if the header should be shown.
|
|
166
168
|
*/
|
|
167
169
|
get _displayHeader(): string | number | boolean;
|
|
168
170
|
get _movable(): boolean;
|
|
169
|
-
get
|
|
171
|
+
get _dragResizeHandleTabIndex(): 0 | undefined;
|
|
172
|
+
get _dragResizeHandleAriaLabel(): string;
|
|
173
|
+
get _dragResizeHandleAriaRoleDescription(): string | undefined;
|
|
174
|
+
get _dragResizeHandleAriaDescribedBy(): string | undefined;
|
|
170
175
|
get _showResizeHandle(): boolean;
|
|
176
|
+
get _resizeHandleTooltip(): string | undefined;
|
|
171
177
|
get _minHeight(): number;
|
|
172
178
|
get hasValueState(): boolean;
|
|
173
179
|
get _dialogStateIcon(): string;
|
|
@@ -208,5 +214,11 @@ declare class Dialog extends Popup {
|
|
|
208
214
|
_handleDragStart(e: DragEvent): void;
|
|
209
215
|
_attachMouseResizeHandlers(): void;
|
|
210
216
|
_detachMouseResizeHandlers(): void;
|
|
217
|
+
/**
|
|
218
|
+
* Overrides Popup's forwardToLast to prioritize the drag/resize handler
|
|
219
|
+
* when Shift+Tab is pressed from the first focusable element.
|
|
220
|
+
* @private
|
|
221
|
+
*/
|
|
222
|
+
forwardToLast(): Promise<void>;
|
|
211
223
|
}
|
|
212
224
|
export default Dialog;
|
package/dist/Dialog.js
CHANGED
|
@@ -18,7 +18,7 @@ import "@ui5/webcomponents-icons/dist/error.js";
|
|
|
18
18
|
import "@ui5/webcomponents-icons/dist/alert.js";
|
|
19
19
|
import "@ui5/webcomponents-icons/dist/sys-enter-2.js";
|
|
20
20
|
import "@ui5/webcomponents-icons/dist/information.js";
|
|
21
|
-
import {
|
|
21
|
+
import { DIALOG_ARIA_DESCRIBEDBY_RESIZABLE, DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE, DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE, DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE_RESIZABLE, DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE, DIALOG_ARIA_DESCRIBEDBY_REACH_RESIZABLE, DIALOG_RESIZE_HANDLE_TOOLTIP, DIALOG_DRAG_AND_RESIZE_HANDLE_ARIA_LABEL, DIALOG_DRAG_HANDLE_ARIA_LABEL, DIALOG_RESIZE_HANDLE_ARIA_LABEL, DIALOG_HANDLE_ARIA_ROLEDESCRIPTION, DIALOG_HEADER_ARIA_LABEL, DIALOG_CONTENT_ARIA_LABEL, DIALOG_FOOTER_ARIA_LABEL, } from "./generated/i18n/i18n-defaults.js";
|
|
22
22
|
// Template
|
|
23
23
|
import DialogTemplate from "./DialogTemplate.js";
|
|
24
24
|
// Styles
|
|
@@ -69,14 +69,14 @@ const ICON_PER_STATE = {
|
|
|
69
69
|
* ### Keyboard Handling
|
|
70
70
|
*
|
|
71
71
|
* #### Basic Navigation
|
|
72
|
-
* When the `ui5-dialog` has the `draggable` property set to `true
|
|
72
|
+
* When the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog
|
|
73
73
|
* with the following keyboard shortcuts:
|
|
74
74
|
*
|
|
75
75
|
* - [Up] or [Down] arrow keys - Move the dialog up/down.
|
|
76
76
|
* - [Left] or [Right] arrow keys - Move the dialog left/right.
|
|
77
77
|
*
|
|
78
78
|
* #### Resizing
|
|
79
|
-
* When the `ui5-dialog` has the `resizable` property set to `true
|
|
79
|
+
* When the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog
|
|
80
80
|
* with the following keyboard shortcuts:
|
|
81
81
|
*
|
|
82
82
|
* - [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.
|
|
@@ -172,20 +172,50 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
172
172
|
}
|
|
173
173
|
return ariaLabelledById;
|
|
174
174
|
}
|
|
175
|
-
get ariaRoleDescriptionHeaderText() {
|
|
176
|
-
return (this.resizable || this.draggable) ? Dialog_1.i18nBundle.getText(DIALOG_HEADER_ARIA_ROLE_DESCRIPTION) : undefined;
|
|
177
|
-
}
|
|
178
175
|
get effectiveAriaDescribedBy() {
|
|
179
|
-
return
|
|
176
|
+
return this._movable ? `${this._id}-dialog-descr` : undefined;
|
|
177
|
+
}
|
|
178
|
+
get ariaDescribedByIds() {
|
|
179
|
+
return [
|
|
180
|
+
this.ariaDescriptionTextId,
|
|
181
|
+
this.effectiveAriaDescribedBy,
|
|
182
|
+
].filter(Boolean).join(" ");
|
|
183
|
+
}
|
|
184
|
+
get dialogAriaDescribedByText() {
|
|
185
|
+
if (!this._movable) {
|
|
186
|
+
return "";
|
|
187
|
+
}
|
|
188
|
+
if (this.resizable && this.draggable) {
|
|
189
|
+
return Dialog_1.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE_RESIZABLE);
|
|
190
|
+
}
|
|
191
|
+
if (this.draggable) {
|
|
192
|
+
return Dialog_1.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_DRAGGABLE);
|
|
193
|
+
}
|
|
194
|
+
if (this.resizable) {
|
|
195
|
+
return Dialog_1.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_REACH_RESIZABLE);
|
|
196
|
+
}
|
|
197
|
+
return "";
|
|
180
198
|
}
|
|
181
|
-
get
|
|
182
|
-
return Dialog_1.i18nBundle.getText(
|
|
199
|
+
get ariaDescribedByTextResizable() {
|
|
200
|
+
return Dialog_1.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_RESIZABLE);
|
|
183
201
|
}
|
|
184
|
-
get
|
|
185
|
-
return Dialog_1.i18nBundle.getText(
|
|
202
|
+
get ariaDescribedByTextDraggable() {
|
|
203
|
+
return Dialog_1.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE);
|
|
186
204
|
}
|
|
187
|
-
get
|
|
188
|
-
return Dialog_1.i18nBundle.getText(
|
|
205
|
+
get ariaDescribedByTextDraggableAndResizable() {
|
|
206
|
+
return Dialog_1.i18nBundle.getText(DIALOG_ARIA_DESCRIBEDBY_DRAGGABLE_RESIZABLE);
|
|
207
|
+
}
|
|
208
|
+
get ariaDescribedByHandlerText() {
|
|
209
|
+
if (this.resizable && this.draggable) {
|
|
210
|
+
return this.ariaDescribedByTextDraggableAndResizable;
|
|
211
|
+
}
|
|
212
|
+
if (this.resizable) {
|
|
213
|
+
return this.ariaDescribedByTextResizable;
|
|
214
|
+
}
|
|
215
|
+
if (this.draggable) {
|
|
216
|
+
return this.ariaDescribedByTextDraggable;
|
|
217
|
+
}
|
|
218
|
+
return "";
|
|
189
219
|
}
|
|
190
220
|
/**
|
|
191
221
|
* Determines if the header should be shown.
|
|
@@ -196,12 +226,36 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
196
226
|
get _movable() {
|
|
197
227
|
return !this.stretch && this.onDesktop && (this.draggable || this.resizable);
|
|
198
228
|
}
|
|
199
|
-
get
|
|
229
|
+
get _dragResizeHandleTabIndex() {
|
|
200
230
|
return this._movable ? 0 : undefined;
|
|
201
231
|
}
|
|
232
|
+
get _dragResizeHandleAriaLabel() {
|
|
233
|
+
if (!this._movable) {
|
|
234
|
+
return "";
|
|
235
|
+
}
|
|
236
|
+
if (this.resizable && this.draggable) {
|
|
237
|
+
return Dialog_1.i18nBundle.getText(DIALOG_DRAG_AND_RESIZE_HANDLE_ARIA_LABEL);
|
|
238
|
+
}
|
|
239
|
+
if (this.draggable) {
|
|
240
|
+
return Dialog_1.i18nBundle.getText(DIALOG_DRAG_HANDLE_ARIA_LABEL);
|
|
241
|
+
}
|
|
242
|
+
if (this.resizable) {
|
|
243
|
+
return Dialog_1.i18nBundle.getText(DIALOG_RESIZE_HANDLE_ARIA_LABEL);
|
|
244
|
+
}
|
|
245
|
+
return "";
|
|
246
|
+
}
|
|
247
|
+
get _dragResizeHandleAriaRoleDescription() {
|
|
248
|
+
return this._movable ? Dialog_1.i18nBundle.getText(DIALOG_HANDLE_ARIA_ROLEDESCRIPTION) : undefined;
|
|
249
|
+
}
|
|
250
|
+
get _dragResizeHandleAriaDescribedBy() {
|
|
251
|
+
return this._movable ? `${this._id}-descr` : undefined;
|
|
252
|
+
}
|
|
202
253
|
get _showResizeHandle() {
|
|
203
254
|
return this.resizable && this.onDesktop;
|
|
204
255
|
}
|
|
256
|
+
get _resizeHandleTooltip() {
|
|
257
|
+
return this._showResizeHandle ? Dialog_1.i18nBundle.getText(DIALOG_RESIZE_HANDLE_TOOLTIP) : undefined;
|
|
258
|
+
}
|
|
205
259
|
get _minHeight() {
|
|
206
260
|
let minHeight = Number.parseInt(window.getComputedStyle(this.contentDOM).minHeight);
|
|
207
261
|
const header = this._root.querySelector(".ui5-popup-header-root");
|
|
@@ -340,7 +394,11 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
340
394
|
this._detachMouseDragHandlers();
|
|
341
395
|
}
|
|
342
396
|
_onDragOrResizeKeyDown(e) {
|
|
343
|
-
if (!this._movable
|
|
397
|
+
if (!this._movable) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
const target = e.target;
|
|
401
|
+
if (!target || target.id !== `${this._id}-dragResizeHandler`) {
|
|
344
402
|
return;
|
|
345
403
|
}
|
|
346
404
|
if (this.draggable && [isUp, isDown, isLeft, isRight].some(key => key(e))) {
|
|
@@ -482,6 +540,21 @@ let Dialog = Dialog_1 = class Dialog extends Popup {
|
|
|
482
540
|
window.removeEventListener("mousemove", this._resizeMouseMoveHandler);
|
|
483
541
|
window.removeEventListener("mouseup", this._resizeMouseUpHandler);
|
|
484
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* Overrides Popup's forwardToLast to prioritize the drag/resize handler
|
|
545
|
+
* when Shift+Tab is pressed from the first focusable element.
|
|
546
|
+
* @private
|
|
547
|
+
*/
|
|
548
|
+
async forwardToLast() {
|
|
549
|
+
if (this._movable) {
|
|
550
|
+
const dragResizeHandler = this.shadowRoot.querySelector(`#${this._id}-dragResizeHandler`);
|
|
551
|
+
if (dragResizeHandler) {
|
|
552
|
+
dragResizeHandler.focus();
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
await super.forwardToLast();
|
|
557
|
+
}
|
|
485
558
|
};
|
|
486
559
|
__decorate([
|
|
487
560
|
property()
|