@ui5/webcomponents 1.11.0-rc.3 → 1.11.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 +36 -0
- package/dist/Avatar.d.ts +0 -5
- package/dist/Avatar.js +8 -15
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +2 -4
- package/dist/AvatarGroup.js +9 -15
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/Badge.d.ts +0 -3
- package/dist/Badge.js +7 -12
- package/dist/Badge.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +0 -10
- package/dist/Breadcrumbs.js +19 -30
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BusyIndicator.d.ts +0 -5
- package/dist/BusyIndicator.js +8 -15
- package/dist/BusyIndicator.js.map +1 -1
- package/dist/Button.d.ts +1 -6
- package/dist/Button.js +8 -15
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +0 -7
- package/dist/Calendar.js +13 -18
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarHeader.d.ts +0 -5
- package/dist/CalendarHeader.js +9 -16
- package/dist/CalendarHeader.js.map +1 -1
- package/dist/Card.d.ts +0 -5
- package/dist/Card.js +8 -15
- package/dist/Card.js.map +1 -1
- package/dist/CardHeader.d.ts +0 -3
- package/dist/CardHeader.js +7 -12
- package/dist/CardHeader.js.map +1 -1
- package/dist/Carousel.d.ts +0 -6
- package/dist/Carousel.js +12 -20
- package/dist/Carousel.js.map +1 -1
- package/dist/CheckBox.d.ts +0 -6
- package/dist/CheckBox.js +21 -20
- package/dist/CheckBox.js.map +1 -1
- package/dist/ColorPalette.d.ts +0 -6
- package/dist/ColorPalette.js +12 -23
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPaletteItem.d.ts +0 -3
- package/dist/ColorPaletteItem.js +6 -10
- package/dist/ColorPaletteItem.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +1 -7
- package/dist/ColorPalettePopover.js +12 -18
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPicker.d.ts +0 -7
- package/dist/ColorPicker.js +11 -17
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ComboBox.d.ts +1 -14
- package/dist/ComboBox.js +27 -33
- package/dist/ComboBox.js.map +1 -1
- package/dist/ComboBoxGroupItem.d.ts +1 -1
- package/dist/CustomListItem.d.ts +1 -3
- package/dist/CustomListItem.js +5 -7
- package/dist/CustomListItem.js.map +1 -1
- package/dist/DateComponentBase.d.ts +0 -1
- package/dist/DateComponentBase.js +5 -5
- package/dist/DateComponentBase.js.map +1 -1
- package/dist/DatePicker.d.ts +0 -7
- package/dist/DatePicker.js +19 -23
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateRangePicker.d.ts +0 -2
- package/dist/DateRangePicker.js +4 -4
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/DateTimePicker.d.ts +0 -6
- package/dist/DateTimePicker.js +20 -20
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/DayPicker.d.ts +0 -2
- package/dist/DayPicker.js +5 -7
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.d.ts +0 -4
- package/dist/Dialog.js +12 -12
- package/dist/Dialog.js.map +1 -1
- package/dist/FileUploader.d.ts +0 -7
- package/dist/FileUploader.js +14 -21
- package/dist/FileUploader.js.map +1 -1
- package/dist/GroupHeaderListItem.d.ts +0 -2
- package/dist/GroupHeaderListItem.js +6 -9
- package/dist/GroupHeaderListItem.js.map +1 -1
- package/dist/Icon.d.ts +0 -3
- package/dist/Icon.js +8 -14
- package/dist/Icon.js.map +1 -1
- package/dist/Input.d.ts +0 -6
- package/dist/Input.js +15 -24
- package/dist/Input.js.map +1 -1
- package/dist/Label.d.ts +0 -3
- package/dist/Label.js +6 -10
- package/dist/Label.js.map +1 -1
- package/dist/Link.d.ts +0 -3
- package/dist/Link.js +8 -13
- package/dist/Link.js.map +1 -1
- package/dist/List.d.ts +1 -6
- package/dist/List.js +8 -15
- package/dist/List.js.map +1 -1
- package/dist/ListItem.d.ts +1 -4
- package/dist/ListItem.js +12 -14
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.d.ts +1 -3
- package/dist/ListItemBase.js +5 -6
- package/dist/ListItemBase.js.map +1 -1
- package/dist/Menu.d.ts +0 -8
- package/dist/Menu.js +13 -19
- package/dist/Menu.js.map +1 -1
- package/dist/MessageStrip.d.ts +0 -5
- package/dist/MessageStrip.js +8 -15
- package/dist/MessageStrip.js.map +1 -1
- package/dist/MonthPicker.d.ts +0 -2
- package/dist/MonthPicker.js +6 -8
- package/dist/MonthPicker.js.map +1 -1
- package/dist/MultiComboBox.d.ts +426 -0
- package/dist/MultiComboBox.js +1110 -1565
- package/dist/MultiComboBox.js.map +1 -0
- package/dist/MultiComboBoxGroupItem.d.ts +36 -0
- package/dist/MultiComboBoxGroupItem.js +30 -50
- package/dist/MultiComboBoxGroupItem.js.map +1 -0
- package/dist/MultiComboBoxItem.d.ts +27 -0
- package/dist/MultiComboBoxItem.js +20 -28
- package/dist/MultiComboBoxItem.js.map +1 -0
- package/dist/MultiInput.d.ts +113 -0
- package/dist/MultiInput.js +258 -360
- package/dist/MultiInput.js.map +1 -0
- package/dist/Option.d.ts +5 -5
- package/dist/Panel.d.ts +0 -6
- package/dist/Panel.js +9 -17
- package/dist/Panel.js.map +1 -1
- package/dist/Popover.d.ts +1 -4
- package/dist/Popover.js +12 -10
- package/dist/Popover.js.map +1 -1
- package/dist/Popup.d.ts +1 -13
- package/dist/Popup.js +18 -24
- package/dist/Popup.js.map +1 -1
- package/dist/ProgressIndicator.d.ts +0 -5
- package/dist/ProgressIndicator.js +7 -13
- package/dist/ProgressIndicator.js.map +1 -1
- package/dist/RadioButton.d.ts +0 -5
- package/dist/RadioButton.js +8 -15
- package/dist/RadioButton.js.map +1 -1
- package/dist/RangeSlider.d.ts +1 -5
- package/dist/RangeSlider.js +10 -12
- package/dist/RangeSlider.js.map +1 -1
- package/dist/RatingIndicator.d.ts +133 -0
- package/dist/RatingIndicator.js +165 -274
- package/dist/RatingIndicator.js.map +1 -0
- package/dist/ResponsivePopover.d.ts +1 -7
- package/dist/ResponsivePopover.js +19 -23
- package/dist/ResponsivePopover.js.map +1 -1
- package/dist/SegmentedButton.d.ts +1 -5
- package/dist/SegmentedButton.js +9 -16
- package/dist/SegmentedButton.js.map +1 -1
- package/dist/SegmentedButtonItem.d.ts +0 -3
- package/dist/SegmentedButtonItem.js +5 -7
- package/dist/SegmentedButtonItem.js.map +1 -1
- package/dist/Select.d.ts +7 -17
- package/dist/Select.js +24 -30
- package/dist/Select.js.map +1 -1
- package/dist/Slider.d.ts +0 -3
- package/dist/Slider.js +6 -9
- package/dist/Slider.js.map +1 -1
- package/dist/SliderBase.d.ts +1 -9
- package/dist/SliderBase.js +13 -13
- package/dist/SliderBase.js.map +1 -1
- package/dist/SplitButton.d.ts +0 -4
- package/dist/SplitButton.js +7 -13
- package/dist/SplitButton.js.map +1 -1
- package/dist/StandardListItem.d.ts +0 -4
- package/dist/StandardListItem.js +9 -11
- package/dist/StandardListItem.js.map +1 -1
- package/dist/StepInput.d.ts +0 -5
- package/dist/StepInput.js +10 -16
- package/dist/StepInput.js.map +1 -1
- package/dist/SuggestionGroupItem.d.ts +0 -2
- package/dist/SuggestionGroupItem.js +4 -6
- package/dist/SuggestionGroupItem.js.map +1 -1
- package/dist/SuggestionItem.d.ts +0 -2
- package/dist/SuggestionItem.js +4 -6
- package/dist/SuggestionItem.js.map +1 -1
- package/dist/SuggestionListItem.d.ts +0 -1
- package/dist/SuggestionListItem.js +4 -4
- package/dist/SuggestionListItem.js.map +1 -1
- package/dist/Switch.d.ts +0 -5
- package/dist/Switch.js +8 -15
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.d.ts +3 -9
- package/dist/Tab.js +19 -25
- package/dist/Tab.js.map +1 -1
- package/dist/TabContainer.d.ts +1 -8
- package/dist/TabContainer.js +17 -28
- package/dist/TabContainer.js.map +1 -1
- package/dist/TabSeparator.d.ts +1 -1
- package/dist/TabSeparator.js +5 -4
- package/dist/TabSeparator.js.map +1 -1
- package/dist/Table.d.ts +0 -6
- package/dist/Table.js +9 -16
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.d.ts +0 -11
- package/dist/TableCell.js +7 -19
- package/dist/TableCell.js.map +1 -1
- package/dist/TableColumn.d.ts +0 -11
- package/dist/TableColumn.js +7 -19
- package/dist/TableColumn.js.map +1 -1
- package/dist/TableGroupRow.d.ts +0 -5
- package/dist/TableGroupRow.js +10 -26
- package/dist/TableGroupRow.js.map +1 -1
- package/dist/TableRow.d.ts +0 -5
- package/dist/TableRow.js +8 -14
- package/dist/TableRow.js.map +1 -1
- package/dist/TextArea.d.ts +2 -9
- package/dist/TextArea.js +10 -21
- package/dist/TextArea.js.map +1 -1
- package/dist/TimePickerBase.d.ts +0 -9
- package/dist/TimePickerBase.js +18 -28
- package/dist/TimePickerBase.js.map +1 -1
- package/dist/TimeSelection.d.ts +0 -4
- package/dist/TimeSelection.js +8 -15
- package/dist/TimeSelection.js.map +1 -1
- package/dist/Title.d.ts +0 -3
- package/dist/Title.js +7 -11
- package/dist/Title.js.map +1 -1
- package/dist/Toast.d.ts +0 -3
- package/dist/Toast.js +6 -10
- package/dist/Toast.js.map +1 -1
- package/dist/ToggleButton.d.ts +0 -3
- package/dist/ToggleButton.js +5 -7
- package/dist/ToggleButton.js.map +1 -1
- package/dist/Token.d.ts +0 -5
- package/dist/Token.js +9 -16
- package/dist/Token.js.map +1 -1
- package/dist/Tokenizer.d.ts +10 -11
- package/dist/Tokenizer.js +40 -38
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Tree.d.ts +1 -6
- package/dist/Tree.js +14 -17
- package/dist/Tree.js.map +1 -1
- package/dist/TreeItem.d.ts +0 -2
- package/dist/TreeItem.js +5 -7
- package/dist/TreeItem.js.map +1 -1
- package/dist/TreeItemBase.d.ts +3 -5
- package/dist/TreeItemBase.js +15 -14
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/TreeItemCustom.d.ts +0 -2
- package/dist/TreeItemCustom.js +5 -7
- package/dist/TreeItemCustom.js.map +1 -1
- package/dist/TreeList.js +1 -1
- package/dist/TreeList.js.map +1 -1
- package/dist/WheelSlider.d.ts +0 -5
- package/dist/WheelSlider.js +11 -14
- package/dist/WheelSlider.js.map +1 -1
- package/dist/YearPicker.d.ts +0 -2
- package/dist/YearPicker.js +6 -8
- package/dist/YearPicker.js.map +1 -1
- package/dist/api.json +1 -1
- package/dist/assets/SAP-icons-business-suite.5e4d496e.js +1 -0
- package/dist/assets/SAP-icons-business-suite.7313c1b1.js +1 -0
- package/dist/assets/messagebundle_ar.74efb031.js +1 -0
- package/dist/assets/messagebundle_bg.369c6fc8.js +1 -0
- package/dist/assets/messagebundle_ca.a3cd4b52.js +1 -0
- package/dist/assets/messagebundle_cs.289421ac.js +1 -0
- package/dist/assets/messagebundle_cy.b1830522.js +1 -0
- package/dist/assets/messagebundle_da.c05fe259.js +1 -0
- package/dist/assets/messagebundle_de.8a4032cc.js +1 -0
- package/dist/assets/messagebundle_el.7c63c645.js +1 -0
- package/dist/assets/{messagebundle_en.d20271ec.js → messagebundle_en.6e890ca9.js} +1 -1
- package/dist/assets/{messagebundle_en_GB.ec8334b8.js → messagebundle_en_GB.6a665cc2.js} +1 -1
- package/dist/assets/messagebundle_es.0f0c4cdc.js +1 -0
- package/dist/assets/messagebundle_es_MX.f88d6e93.js +1 -0
- package/dist/assets/messagebundle_et.6e83e7fa.js +1 -0
- package/dist/assets/messagebundle_fi.ebcedd15.js +1 -0
- package/dist/assets/messagebundle_fr.f0c09c02.js +1 -0
- package/dist/assets/messagebundle_fr_CA.241e035f.js +1 -0
- package/dist/assets/messagebundle_hi.ea9222e3.js +1 -0
- package/dist/assets/messagebundle_hr.29b90b8a.js +1 -0
- package/dist/assets/messagebundle_hu.28f6367c.js +1 -0
- package/dist/assets/messagebundle_it.ef9f06fc.js +1 -0
- package/dist/assets/messagebundle_iw.52eeba6c.js +1 -0
- package/dist/assets/messagebundle_ja.54f39fb4.js +1 -0
- package/dist/assets/messagebundle_kk.4795b8bf.js +1 -0
- package/dist/assets/messagebundle_ko.298dee97.js +1 -0
- package/dist/assets/messagebundle_lt.50d45929.js +1 -0
- package/dist/assets/messagebundle_lv.6deb88b8.js +1 -0
- package/dist/assets/messagebundle_ms.0eb3e9fb.js +1 -0
- package/dist/assets/messagebundle_nl.d86b913f.js +1 -0
- package/dist/assets/messagebundle_no.4b4b68f9.js +1 -0
- package/dist/assets/messagebundle_pl.90d2d216.js +1 -0
- package/dist/assets/messagebundle_pt.682bdce3.js +1 -0
- package/dist/assets/messagebundle_pt_PT.5931734e.js +1 -0
- package/dist/assets/messagebundle_ro.c8b49647.js +1 -0
- package/dist/assets/messagebundle_ru.03b05c74.js +1 -0
- package/dist/assets/messagebundle_sh.d85d5fca.js +1 -0
- package/dist/assets/messagebundle_sk.0c356651.js +1 -0
- package/dist/assets/messagebundle_sl.6fbd00d2.js +1 -0
- package/dist/assets/messagebundle_sv.fd3992b5.js +1 -0
- package/dist/assets/messagebundle_th.69c4b78b.js +1 -0
- package/dist/assets/messagebundle_tr.f5e05dea.js +1 -0
- package/dist/assets/messagebundle_uk.8fe7f052.js +1 -0
- package/dist/assets/messagebundle_vi.dfccc988.js +1 -0
- package/dist/assets/messagebundle_zh_CN.0bec6825.js +1 -0
- package/dist/assets/messagebundle_zh_TW.be5ac4ff.js +1 -0
- package/dist/assets/parameters-bundle.css.09a8d17f.js +1 -0
- package/dist/assets/parameters-bundle.css.22c70329.js +1 -0
- package/dist/assets/parameters-bundle.css.3e7ea7bd.js +1 -0
- package/dist/assets/parameters-bundle.css.568a0fcb.js +1 -0
- package/dist/assets/parameters-bundle.css.6baa4ec8.js +1 -0
- package/dist/assets/parameters-bundle.css.6e0935a3.js +1 -0
- package/dist/assets/parameters-bundle.css.832a51a3.js +1 -0
- package/dist/assets/parameters-bundle.css.8425804e.js +1 -0
- package/dist/assets/parameters-bundle.css.aa4080ac.js +1 -0
- package/dist/assets/parameters-bundle.css.b12ea801.js +1 -0
- package/dist/assets/parameters-bundle.css.b429cbbc.js +1 -0
- package/dist/assets/parameters-bundle.css.d211215e.js +1 -0
- package/dist/assets/test/pages/ComboBox.html.6ad00df2.js +1 -0
- package/dist/assets/test/pages/{Icon.html.0938cf9b.js → Icon.html.97607346.js} +1 -1
- package/dist/assets/test/pages/{Label.html.5556ce5f.js → Label.html.850402e1.js} +1 -1
- package/dist/assets/test/pages/{Popups.html.2f66d88c.js → Popups.html.de40ab2a.js} +1 -1
- package/dist/css/themes/Icon.css +1 -1
- package/dist/css/themes/MultiComboBox.css +1 -1
- package/dist/css/themes/MultiInput.css +1 -1
- package/dist/css/themes/ToggleButton.css +1 -1
- package/dist/css/themes/sap_belize/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_belize_hcw/parameters-bundle.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_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +1 -1
- 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.json +1 -1
- package/dist/features/InputSuggestions.d.ts +1 -1
- package/dist/features/InputSuggestions.js.map +1 -1
- 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_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_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_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_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_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_belize/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.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_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_exp/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/templates/ComboBoxTemplate.lit.js +1 -1
- package/dist/generated/templates/DatePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/MultiComboBoxPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/MultiComboBoxTemplate.lit.js +3 -3
- package/dist/generated/templates/MultiInputTemplate.lit.js +1 -1
- package/dist/generated/templates/RangeSliderTemplate.lit.js +1 -1
- package/dist/generated/templates/RatingIndicatorTemplate.lit.js +1 -1
- package/dist/generated/templates/SelectPopoverTemplate.lit.js +3 -3
- package/dist/generated/templates/StepInputTemplate.lit.js +2 -2
- package/dist/generated/templates/TimePickerTemplate.lit.js +1 -1
- package/dist/generated/templates/TreeItemBaseTemplate.lit.js +3 -3
- package/dist/generated/templates/TreeItemCustomTemplate.lit.js +3 -3
- package/dist/generated/templates/TreeItemTemplate.lit.js +3 -3
- package/dist/generated/templates/TreeTemplate.lit.js +2 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Icon.css.js.map +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js.map +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js.map +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js.map +1 -1
- package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js.map +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.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.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.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.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +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_exp/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +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.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/i18n/messagebundle_ar.properties +2 -2
- package/dist/i18n/messagebundle_bg.properties +2 -2
- package/dist/i18n/messagebundle_ca.properties +2 -2
- package/dist/i18n/messagebundle_cs.properties +2 -2
- package/dist/i18n/messagebundle_cy.properties +2 -2
- package/dist/i18n/messagebundle_da.properties +2 -2
- package/dist/i18n/messagebundle_de.properties +2 -2
- package/dist/i18n/messagebundle_el.properties +2 -2
- package/dist/i18n/messagebundle_en.properties +1 -1
- package/dist/i18n/messagebundle_en_GB.properties +1 -1
- package/dist/i18n/messagebundle_es.properties +2 -2
- package/dist/i18n/messagebundle_es_MX.properties +2 -2
- package/dist/i18n/messagebundle_et.properties +2 -2
- package/dist/i18n/messagebundle_fi.properties +2 -2
- package/dist/i18n/messagebundle_fr.properties +2 -2
- package/dist/i18n/messagebundle_fr_CA.properties +2 -2
- package/dist/i18n/messagebundle_hi.properties +2 -2
- package/dist/i18n/messagebundle_hr.properties +2 -2
- package/dist/i18n/messagebundle_hu.properties +2 -2
- package/dist/i18n/messagebundle_id.properties +2 -2
- package/dist/i18n/messagebundle_it.properties +2 -2
- package/dist/i18n/messagebundle_iw.properties +2 -2
- package/dist/i18n/messagebundle_ja.properties +2 -2
- package/dist/i18n/messagebundle_kk.properties +2 -2
- package/dist/i18n/messagebundle_ko.properties +2 -2
- package/dist/i18n/messagebundle_lt.properties +2 -2
- package/dist/i18n/messagebundle_lv.properties +2 -2
- package/dist/i18n/messagebundle_ms.properties +2 -2
- package/dist/i18n/messagebundle_nl.properties +2 -2
- package/dist/i18n/messagebundle_no.properties +2 -2
- package/dist/i18n/messagebundle_pl.properties +2 -2
- package/dist/i18n/messagebundle_pt.properties +2 -2
- package/dist/i18n/messagebundle_pt_PT.properties +2 -2
- package/dist/i18n/messagebundle_ro.properties +2 -2
- package/dist/i18n/messagebundle_ru.properties +2 -2
- package/dist/i18n/messagebundle_sh.properties +2 -2
- package/dist/i18n/messagebundle_sk.properties +2 -2
- package/dist/i18n/messagebundle_sl.properties +2 -2
- package/dist/i18n/messagebundle_sv.properties +2 -2
- package/dist/i18n/messagebundle_th.properties +2 -2
- package/dist/i18n/messagebundle_tr.properties +3 -3
- package/dist/i18n/messagebundle_uk.properties +2 -2
- package/dist/i18n/messagebundle_vi.properties +2 -2
- package/dist/i18n/messagebundle_zh_CN.properties +2 -2
- package/dist/i18n/messagebundle_zh_TW.properties +2 -2
- package/dist/test/pages/72override.html +1 -1
- package/dist/test/pages/AnimanitionOff.html +1 -1
- package/dist/test/pages/Avatar.html +1 -1
- package/dist/test/pages/AvatarGroup.html +1 -1
- package/dist/test/pages/Badge.html +1 -1
- package/dist/test/pages/Breadcrumbs.html +1 -1
- package/dist/test/pages/BusyIndicator.html +1 -1
- package/dist/test/pages/Button.html +1 -1
- package/dist/test/pages/Calendar.html +1 -1
- package/dist/test/pages/Card.html +1 -1
- package/dist/test/pages/Carousel.html +1 -1
- package/dist/test/pages/CheckBox.html +15 -1
- package/dist/test/pages/ColorPalette.html +1 -1
- package/dist/test/pages/ColorPalettePopover.html +1 -1
- package/dist/test/pages/ColorPicker.html +1 -1
- package/dist/test/pages/ComboBox.html +31 -18
- package/dist/test/pages/Components.html +1 -1
- package/dist/test/pages/CoreControls.html +1 -1
- package/dist/test/pages/CoreControls_exp.html +1 -1
- package/dist/test/pages/CustomCSS.html +1 -1
- package/dist/test/pages/DatePicker.html +1 -1
- package/dist/test/pages/DatePicker_test_page.html +1 -1
- package/dist/test/pages/DateRangePicker.html +1 -1
- package/dist/test/pages/DateTimePicker.html +1 -1
- package/dist/test/pages/DayPicker.html +1 -1
- package/dist/test/pages/Dialog.html +1 -1
- package/dist/test/pages/DialogLifecycle.html +1 -1
- package/dist/test/pages/DialogSemantic.html +1 -1
- package/dist/test/pages/DurationPicker.html +1 -1
- package/dist/test/pages/Eventing.html +1 -1
- package/dist/test/pages/F6Test1.html +1 -1
- package/dist/test/pages/F6Test2.html +1 -1
- package/dist/test/pages/F6Test3.html +1 -1
- package/dist/test/pages/F6Test4.html +1 -1
- package/dist/test/pages/F6Test5.html +1 -1
- package/dist/test/pages/F6Test6.html +1 -1
- package/dist/test/pages/F6Test7.html +1 -1
- package/dist/test/pages/FileUploader.html +1 -1
- package/dist/test/pages/FormSupport.html +1 -1
- package/dist/test/pages/HCB.html +1 -1
- package/dist/test/pages/Icon.html +3 -3
- package/dist/test/pages/Icon_and_theming.html +7 -7
- package/dist/test/pages/Icon_custom.html +1 -1
- package/dist/test/pages/Input.html +1 -1
- package/dist/test/pages/InputFieldLabels.html +1 -1
- package/dist/test/pages/InputFieldMinWidth.html +1 -1
- package/dist/test/pages/InputIcons.html +1 -1
- package/dist/test/pages/Input_quickview.html +1 -1
- package/dist/test/pages/InputsAlignment.html +1 -1
- package/dist/test/pages/InputsLazyLoading.html +1 -1
- package/dist/test/pages/ItemNavigation.html +1 -1
- package/dist/test/pages/Kitchen.html +1 -1
- package/dist/test/pages/Kitchen.openui5.html +1 -1
- package/dist/test/pages/Label.html +2 -2
- package/dist/test/pages/Link.html +1 -1
- package/dist/test/pages/List.html +1 -1
- package/dist/test/pages/ListGrowing_Button.html +1 -1
- package/dist/test/pages/ListGrowing_Scroll.html +1 -1
- package/dist/test/pages/List_keyboard_support.html +1 -1
- package/dist/test/pages/List_test_page.html +3 -1
- package/dist/test/pages/LitKeyFunction.html +1 -1
- package/dist/test/pages/MemoryLeak.html +1 -1
- package/dist/test/pages/Menu.html +1 -1
- package/dist/test/pages/MessagePage.html +1 -1
- package/dist/test/pages/MessageStrip.html +1 -1
- package/dist/test/pages/MultiComboBox.html +1 -1
- package/dist/test/pages/MultiInput.html +1 -1
- package/dist/test/pages/MultiInput_Suggestions.html +1 -1
- package/dist/test/pages/OpenUI5.html +1 -1
- package/dist/test/pages/Panel.html +1 -1
- package/dist/test/pages/Popover.html +1 -1
- package/dist/test/pages/PopoverArrowBounds.html +1 -1
- package/dist/test/pages/Popups.html +2 -2
- package/dist/test/pages/ProgressIndicator.html +1 -1
- package/dist/test/pages/RTL.html +1 -1
- package/dist/test/pages/RadioButton.html +1 -1
- package/dist/test/pages/RangeSlider.html +1 -1
- package/dist/test/pages/RatingIndicator.html +1 -1
- package/dist/test/pages/ResizeHandler.html +1 -1
- package/dist/test/pages/ResponsivePopover.html +1 -1
- package/dist/test/pages/SegmentedButton.html +1 -1
- package/dist/test/pages/Select.html +1 -1
- package/dist/test/pages/Simple.html +1 -1
- package/dist/test/pages/Slider.html +1 -1
- package/dist/test/pages/SplitButton.html +1 -1
- package/dist/test/pages/StepInput.html +1 -1
- package/dist/test/pages/Switch.html +1 -1
- package/dist/test/pages/TabContainer.html +1 -1
- package/dist/test/pages/Table-perf-pure.html +1 -1
- package/dist/test/pages/Table-perf.html +1 -1
- package/dist/test/pages/Table.html +1 -1
- package/dist/test/pages/Table2.html +1 -1
- package/dist/test/pages/TableAllPopin.html +1 -1
- package/dist/test/pages/TableCustomStyling.html +1 -1
- package/dist/test/pages/TableGrouping.html +1 -1
- package/dist/test/pages/TableGrowingWithButton.html +1 -1
- package/dist/test/pages/TableGrowingWithScroll.html +1 -1
- package/dist/test/pages/TableSelection.html +1 -1
- package/dist/test/pages/TextArea.html +1 -1
- package/dist/test/pages/TimePicker.html +1 -1
- package/dist/test/pages/TimeSelection.html +1 -1
- package/dist/test/pages/Title.html +1 -1
- package/dist/test/pages/Toast.html +1 -1
- package/dist/test/pages/ToggleButton.html +3 -1
- package/dist/test/pages/Tree.html +14 -1
- package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
- package/dist/test/pages/base/AriaLabelHelper.html +1 -1
- package/dist/test/pages/base/DOMObserver.html +1 -1
- package/dist/test/pages/base/InvisibleMessage.html +1 -1
- package/dist/test/pages/form.html +1 -1
- package/dist/test/pages/i18n-defaultLang.html +1 -1
- package/dist/test/pages/i18n-demo.html +1 -1
- package/package.json +7 -7
- package/src/Avatar.ts +8 -20
- package/src/AvatarGroup.ts +9 -20
- package/src/Badge.ts +7 -15
- package/src/Breadcrumbs.ts +20 -38
- package/src/BusyIndicator.ts +8 -19
- package/src/Button.ts +9 -20
- package/src/Calendar.ts +13 -21
- package/src/CalendarHeader.ts +9 -20
- package/src/Card.ts +8 -19
- package/src/CardHeader.ts +7 -15
- package/src/Carousel.ts +12 -25
- package/src/CheckBox.ts +22 -24
- package/src/ColorPalette.ts +13 -32
- package/src/ColorPaletteItem.ts +6 -13
- package/src/ColorPalettePopover.ts +13 -23
- package/src/ColorPicker.ts +11 -21
- package/src/ComboBox.hbs +10 -9
- package/src/ComboBox.ts +34 -48
- package/src/ComboBoxGroupItem.ts +1 -1
- package/src/CustomListItem.ts +6 -10
- package/src/DateComponentBase.ts +5 -6
- package/src/DatePicker.hbs +12 -12
- package/src/DatePicker.ts +20 -30
- package/src/DateRangePicker.ts +4 -6
- package/src/DateTimePicker.ts +20 -26
- package/src/DayPicker.ts +5 -9
- package/src/Dialog.ts +12 -15
- package/src/FileUploader.ts +14 -27
- package/src/GroupHeaderListItem.ts +6 -11
- package/src/Icon.ts +8 -17
- package/src/Input.ts +15 -32
- package/src/Label.ts +6 -13
- package/src/Link.ts +8 -16
- package/src/List.ts +10 -22
- package/src/ListItem.ts +13 -18
- package/src/ListItemBase.ts +6 -9
- package/src/Menu.ts +13 -23
- package/src/MessageStrip.ts +8 -20
- package/src/MonthPicker.ts +6 -10
- package/src/MultiComboBox.hbs +13 -12
- package/src/{MultiComboBox.js → MultiComboBox.ts} +591 -554
- package/src/{MultiComboBoxGroupItem.js → MultiComboBoxGroupItem.ts} +19 -34
- package/src/MultiComboBoxItem.ts +38 -0
- package/src/MultiComboBoxPopover.hbs +0 -2
- package/src/MultiInput.hbs +8 -7
- package/src/{MultiInput.js → MultiInput.ts} +133 -149
- package/src/Option.ts +5 -5
- package/src/Panel.ts +9 -21
- package/src/Popover.ts +13 -14
- package/src/Popup.ts +11 -24
- package/src/ProgressIndicator.ts +7 -17
- package/src/RadioButton.ts +8 -20
- package/src/RangeSlider.hbs +1 -0
- package/src/RangeSlider.ts +11 -16
- package/src/RatingIndicator.hbs +1 -1
- package/src/{RatingIndicator.js → RatingIndicator.ts} +134 -147
- package/src/ResponsivePopover.ts +22 -30
- package/src/SegmentedButton.ts +11 -23
- package/src/SegmentedButtonItem.ts +5 -9
- package/src/Select.ts +30 -42
- package/src/SelectPopover.hbs +3 -3
- package/src/Slider.ts +6 -11
- package/src/SliderBase.ts +7 -11
- package/src/SplitButton.ts +7 -17
- package/src/StandardListItem.ts +9 -13
- package/src/StepInput.hbs +2 -2
- package/src/StepInput.ts +10 -20
- package/src/SuggestionGroupItem.ts +4 -7
- package/src/SuggestionItem.ts +4 -7
- package/src/SuggestionListItem.ts +5 -6
- package/src/Switch.ts +8 -20
- package/src/Tab.ts +21 -31
- package/src/TabContainer.ts +17 -34
- package/src/TabSeparator.ts +5 -5
- package/src/Table.ts +9 -20
- package/src/TableCell.ts +7 -14
- package/src/TableColumn.ts +7 -14
- package/src/TableGroupRow.ts +10 -20
- package/src/TableRow.ts +8 -18
- package/src/TextArea.ts +13 -31
- package/src/TimePicker.hbs +10 -10
- package/src/TimePickerBase.ts +18 -35
- package/src/TimeSelection.ts +8 -19
- package/src/Title.ts +7 -14
- package/src/Toast.ts +6 -14
- package/src/ToggleButton.ts +5 -10
- package/src/Token.ts +9 -21
- package/src/Tokenizer.ts +43 -48
- package/src/Tree.hbs +3 -1
- package/src/Tree.ts +15 -22
- package/src/TreeItem.ts +5 -9
- package/src/TreeItemBase.hbs +3 -2
- package/src/TreeItemBase.ts +16 -19
- package/src/TreeItemCustom.ts +6 -10
- package/src/TreeList.ts +2 -2
- package/src/WheelSlider.ts +14 -22
- package/src/YearPicker.ts +6 -10
- package/src/features/InputSuggestions.ts +1 -1
- package/src/i18n/messagebundle_ar.properties +2 -2
- package/src/i18n/messagebundle_bg.properties +2 -2
- package/src/i18n/messagebundle_ca.properties +2 -2
- package/src/i18n/messagebundle_cs.properties +2 -2
- package/src/i18n/messagebundle_cy.properties +2 -2
- package/src/i18n/messagebundle_da.properties +2 -2
- package/src/i18n/messagebundle_de.properties +2 -2
- package/src/i18n/messagebundle_el.properties +2 -2
- package/src/i18n/messagebundle_en.properties +1 -1
- package/src/i18n/messagebundle_en_GB.properties +1 -1
- package/src/i18n/messagebundle_es.properties +2 -2
- package/src/i18n/messagebundle_es_MX.properties +2 -2
- package/src/i18n/messagebundle_et.properties +2 -2
- package/src/i18n/messagebundle_fi.properties +2 -2
- package/src/i18n/messagebundle_fr.properties +2 -2
- package/src/i18n/messagebundle_fr_CA.properties +2 -2
- package/src/i18n/messagebundle_hi.properties +2 -2
- package/src/i18n/messagebundle_hr.properties +2 -2
- package/src/i18n/messagebundle_hu.properties +2 -2
- package/src/i18n/messagebundle_id.properties +2 -2
- package/src/i18n/messagebundle_it.properties +2 -2
- package/src/i18n/messagebundle_iw.properties +2 -2
- package/src/i18n/messagebundle_ja.properties +2 -2
- package/src/i18n/messagebundle_kk.properties +2 -2
- package/src/i18n/messagebundle_ko.properties +2 -2
- package/src/i18n/messagebundle_lt.properties +2 -2
- package/src/i18n/messagebundle_lv.properties +2 -2
- package/src/i18n/messagebundle_ms.properties +2 -2
- package/src/i18n/messagebundle_nl.properties +2 -2
- package/src/i18n/messagebundle_no.properties +2 -2
- package/src/i18n/messagebundle_pl.properties +2 -2
- package/src/i18n/messagebundle_pt.properties +2 -2
- package/src/i18n/messagebundle_pt_PT.properties +2 -2
- package/src/i18n/messagebundle_ro.properties +2 -2
- package/src/i18n/messagebundle_ru.properties +2 -2
- package/src/i18n/messagebundle_sh.properties +2 -2
- package/src/i18n/messagebundle_sk.properties +2 -2
- package/src/i18n/messagebundle_sl.properties +2 -2
- package/src/i18n/messagebundle_sv.properties +2 -2
- package/src/i18n/messagebundle_th.properties +2 -2
- package/src/i18n/messagebundle_tr.properties +3 -3
- package/src/i18n/messagebundle_uk.properties +2 -2
- package/src/i18n/messagebundle_vi.properties +2 -2
- package/src/i18n/messagebundle_zh_CN.properties +2 -2
- package/src/i18n/messagebundle_zh_TW.properties +2 -2
- package/src/themes/Icon.css +4 -0
- package/src/themes/MultiComboBox.css +6 -1
- package/src/themes/MultiInput.css +3 -2
- package/src/themes/ToggleButton.css +5 -0
- package/src/themes/base/ToggleButton-parameters.css +1 -0
- package/src/themes/base/sizes-parameters.css +2 -0
- package/src/themes/sap_belize/ToggleButton-parameters.css +5 -0
- package/src/themes/sap_belize/parameters-bundle.css +1 -0
- package/dist/assets/SAP-icons-business-suite.2f68bcd1.js +0 -1
- package/dist/assets/SAP-icons-business-suite.4ab90b1f.js +0 -1
- package/dist/assets/messagebundle_ar.e3544a09.js +0 -1
- package/dist/assets/messagebundle_bg.ee6b6771.js +0 -1
- package/dist/assets/messagebundle_ca.99eca69b.js +0 -1
- package/dist/assets/messagebundle_cs.e670f1f8.js +0 -1
- package/dist/assets/messagebundle_cy.39115ed1.js +0 -1
- package/dist/assets/messagebundle_da.95305936.js +0 -1
- package/dist/assets/messagebundle_de.58869681.js +0 -1
- package/dist/assets/messagebundle_el.e471f4c3.js +0 -1
- package/dist/assets/messagebundle_es.259f7ab8.js +0 -1
- package/dist/assets/messagebundle_es_MX.7607283e.js +0 -1
- package/dist/assets/messagebundle_et.51409b09.js +0 -1
- package/dist/assets/messagebundle_fi.2c90e808.js +0 -1
- package/dist/assets/messagebundle_fr.cd7d6b7f.js +0 -1
- package/dist/assets/messagebundle_fr_CA.fdf43c6c.js +0 -1
- package/dist/assets/messagebundle_hi.ca658292.js +0 -1
- package/dist/assets/messagebundle_hr.5edbff43.js +0 -1
- package/dist/assets/messagebundle_hu.681d5c09.js +0 -1
- package/dist/assets/messagebundle_it.1f8ed3bf.js +0 -1
- package/dist/assets/messagebundle_iw.87620c3d.js +0 -1
- package/dist/assets/messagebundle_ja.2e52dfca.js +0 -1
- package/dist/assets/messagebundle_kk.8f48fb6c.js +0 -1
- package/dist/assets/messagebundle_ko.98c05546.js +0 -1
- package/dist/assets/messagebundle_lt.b08e4a4f.js +0 -1
- package/dist/assets/messagebundle_lv.37afce84.js +0 -1
- package/dist/assets/messagebundle_ms.ebc7401f.js +0 -1
- package/dist/assets/messagebundle_nl.9e163987.js +0 -1
- package/dist/assets/messagebundle_no.ddf35aef.js +0 -1
- package/dist/assets/messagebundle_pl.5fc87ae1.js +0 -1
- package/dist/assets/messagebundle_pt.30219ffe.js +0 -1
- package/dist/assets/messagebundle_pt_PT.4c1e9d80.js +0 -1
- package/dist/assets/messagebundle_ro.5148dac8.js +0 -1
- package/dist/assets/messagebundle_ru.d7074ec3.js +0 -1
- package/dist/assets/messagebundle_sh.db5a9ad4.js +0 -1
- package/dist/assets/messagebundle_sk.c3812e12.js +0 -1
- package/dist/assets/messagebundle_sl.26fceb50.js +0 -1
- package/dist/assets/messagebundle_sv.b755fe40.js +0 -1
- package/dist/assets/messagebundle_th.7babcfb2.js +0 -1
- package/dist/assets/messagebundle_tr.677aef37.js +0 -1
- package/dist/assets/messagebundle_uk.20fa19ec.js +0 -1
- package/dist/assets/messagebundle_vi.f964192e.js +0 -1
- package/dist/assets/messagebundle_zh_CN.9113f380.js +0 -1
- package/dist/assets/messagebundle_zh_TW.eb07bfcb.js +0 -1
- package/dist/assets/parameters-bundle.css.15d6a649.js +0 -1
- package/dist/assets/parameters-bundle.css.403dcfda.js +0 -1
- package/dist/assets/parameters-bundle.css.40f479ef.js +0 -1
- package/dist/assets/parameters-bundle.css.46691ebb.js +0 -1
- package/dist/assets/parameters-bundle.css.50b92a3f.js +0 -1
- package/dist/assets/parameters-bundle.css.6134bfac.js +0 -1
- package/dist/assets/parameters-bundle.css.64a71ab2.js +0 -1
- package/dist/assets/parameters-bundle.css.71af3bfd.js +0 -1
- package/dist/assets/parameters-bundle.css.78b9e86c.js +0 -1
- package/dist/assets/parameters-bundle.css.aed0c807.js +0 -1
- package/dist/assets/parameters-bundle.css.e2f45e50.js +0 -1
- package/dist/assets/parameters-bundle.css.fbc5cb77.js +0 -1
- package/dist/assets/test/pages/ComboBox.html.0e2117f1.js +0 -1
- package/src/MultiComboBoxItem.js +0 -44
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
3
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
4
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
5
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
6
|
+
import type { ClassMap, Timeout } from "@ui5/webcomponents-base/dist/types.js";
|
|
2
7
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
3
8
|
import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
|
9
|
+
import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
|
4
10
|
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
|
|
5
11
|
import {
|
|
6
12
|
isShow,
|
|
@@ -38,6 +44,7 @@ import {
|
|
|
38
44
|
isPhone,
|
|
39
45
|
isAndroid,
|
|
40
46
|
} from "@ui5/webcomponents-base/dist/Device.js";
|
|
47
|
+
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
41
48
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
42
49
|
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
43
50
|
import "@ui5/webcomponents-icons/dist/multiselect-all.js";
|
|
@@ -51,12 +58,14 @@ import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/Ari
|
|
|
51
58
|
import MultiComboBoxItem from "./MultiComboBoxItem.js";
|
|
52
59
|
import MultiComboBoxGroupItem from "./MultiComboBoxGroupItem.js";
|
|
53
60
|
import GroupHeaderListItem from "./GroupHeaderListItem.js";
|
|
54
|
-
import Tokenizer from "./Tokenizer.js";
|
|
61
|
+
import Tokenizer, { ClipboardDataOperation } from "./Tokenizer.js";
|
|
62
|
+
import type { TokenizerTokenDeleteEventDetail } from "./Tokenizer.js";
|
|
55
63
|
import Token from "./Token.js";
|
|
56
64
|
import Icon from "./Icon.js";
|
|
57
65
|
import Popover from "./Popover.js";
|
|
58
66
|
import ResponsivePopover from "./ResponsivePopover.js";
|
|
59
67
|
import List from "./List.js";
|
|
68
|
+
import type { SelectionChangeEventDetail } from "./List.js";
|
|
60
69
|
import StandardListItem from "./StandardListItem.js";
|
|
61
70
|
import ToggleButton from "./ToggleButton.js";
|
|
62
71
|
import * as Filters from "./Filters.js";
|
|
@@ -81,310 +90,32 @@ import MultiComboBoxTemplate from "./generated/templates/MultiComboBoxTemplate.l
|
|
|
81
90
|
import MultiComboBoxPopoverTemplate from "./generated/templates/MultiComboBoxPopoverTemplate.lit.js";
|
|
82
91
|
|
|
83
92
|
// Styles
|
|
84
|
-
import
|
|
93
|
+
import multiCbxStyles from "./generated/themes/MultiComboBox.css.js";
|
|
85
94
|
import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js";
|
|
86
95
|
import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js";
|
|
87
96
|
import SuggestionsCss from "./generated/themes/Suggestions.css.js";
|
|
88
97
|
import MultiComboBoxPopover from "./generated/themes/MultiComboBoxPopover.css.js";
|
|
98
|
+
import ComboBoxFilter from "./types/ComboBoxFilter.js";
|
|
99
|
+
import type FormSupportT from "./features/InputElementsFormSupport.js";
|
|
100
|
+
import type ListItemBase from "./ListItemBase.js";
|
|
101
|
+
|
|
102
|
+
interface IMultiComboBoxItem extends UI5Element {
|
|
103
|
+
text: string,
|
|
104
|
+
selected: boolean,
|
|
105
|
+
isGroupItem?: boolean,
|
|
106
|
+
stableDomRef: string,
|
|
107
|
+
}
|
|
89
108
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
*
|
|
101
|
-
* @type {sap.ui.webc.main.IMultiComboBoxItem[]}
|
|
102
|
-
* @slot items
|
|
103
|
-
* @public
|
|
104
|
-
*/
|
|
105
|
-
"default": {
|
|
106
|
-
propertyName: "items",
|
|
107
|
-
type: HTMLElement,
|
|
108
|
-
invalidateOnChildChange: true,
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Defines the icon to be displayed in the component.
|
|
113
|
-
*
|
|
114
|
-
* @type {sap.ui.webc.main.IIcon[]}
|
|
115
|
-
* @slot
|
|
116
|
-
* @public
|
|
117
|
-
* @since 1.0.0-rc.9
|
|
118
|
-
*/
|
|
119
|
-
icon: {
|
|
120
|
-
type: HTMLElement,
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Defines the value state message that will be displayed as pop up under the component.
|
|
125
|
-
* <br><br>
|
|
126
|
-
*
|
|
127
|
-
* <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.
|
|
128
|
-
* <br>
|
|
129
|
-
* <b>Note:</b> The <code>valueStateMessage</code> would be displayed,
|
|
130
|
-
* when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.
|
|
131
|
-
* @type {HTMLElement[]}
|
|
132
|
-
* @since 1.0.0-rc.9
|
|
133
|
-
* @slot
|
|
134
|
-
* @public
|
|
135
|
-
*/
|
|
136
|
-
valueStateMessage: {
|
|
137
|
-
type: HTMLElement,
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
properties: /** @lends sap.ui.webc.main.MultiComboBox.prototype */ {
|
|
141
|
-
/**
|
|
142
|
-
* Defines the value of the component.
|
|
143
|
-
* <br><br>
|
|
144
|
-
* <b>Note:</b> The property is updated upon typing.
|
|
145
|
-
*
|
|
146
|
-
* @type {string}
|
|
147
|
-
* @defaultvalue ""
|
|
148
|
-
* @formEvents change input
|
|
149
|
-
* @formProperty
|
|
150
|
-
* @public
|
|
151
|
-
*/
|
|
152
|
-
value: {
|
|
153
|
-
type: String,
|
|
154
|
-
defaultValue: "",
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Defines whether the value will be autcompleted to match an item
|
|
159
|
-
*
|
|
160
|
-
* @type {boolean}
|
|
161
|
-
* @defaultvalue false
|
|
162
|
-
* @public
|
|
163
|
-
* @since 1.4.0
|
|
164
|
-
*/
|
|
165
|
-
noTypeahead: {
|
|
166
|
-
type: Boolean,
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Defines a short hint intended to aid the user with data entry when the
|
|
171
|
-
* component has no value.
|
|
172
|
-
* @type {string}
|
|
173
|
-
* @defaultvalue ""
|
|
174
|
-
* @public
|
|
175
|
-
*/
|
|
176
|
-
placeholder: {
|
|
177
|
-
type: String,
|
|
178
|
-
defaultValue: "",
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Defines if the user input will be prevented, if no matching item has been found
|
|
183
|
-
*
|
|
184
|
-
* @type {boolean}
|
|
185
|
-
* @defaultvalue false
|
|
186
|
-
* @public
|
|
187
|
-
*/
|
|
188
|
-
allowCustomValues: {
|
|
189
|
-
type: Boolean,
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Defines whether the component is in disabled state.
|
|
194
|
-
* <br><br>
|
|
195
|
-
* <b>Note:</b> A disabled component is completely noninteractive.
|
|
196
|
-
*
|
|
197
|
-
* @type {boolean}
|
|
198
|
-
* @defaultvalue false
|
|
199
|
-
* @public
|
|
200
|
-
*/
|
|
201
|
-
disabled: {
|
|
202
|
-
type: Boolean,
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Defines the value state of the component.
|
|
207
|
-
* <br><br>
|
|
208
|
-
* Available options are:
|
|
209
|
-
* <ul>
|
|
210
|
-
* <li><code>None</code></li>
|
|
211
|
-
* <li><code>Error</code></li>
|
|
212
|
-
* <li><code>Warning</code></li>
|
|
213
|
-
* <li><code>Success</code></li>
|
|
214
|
-
* <li><code>Information</code></li>
|
|
215
|
-
* </ul>
|
|
216
|
-
*
|
|
217
|
-
* @type {sap.ui.webc.base.types.ValueState}
|
|
218
|
-
* @defaultvalue "None"
|
|
219
|
-
* @public
|
|
220
|
-
*/
|
|
221
|
-
valueState: {
|
|
222
|
-
type: ValueState,
|
|
223
|
-
defaultValue: ValueState.None,
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Defines whether the component is read-only.
|
|
228
|
-
* <br><br>
|
|
229
|
-
* <b>Note:</b> A read-only component is not editable,
|
|
230
|
-
* but still provides visual feedback upon user interaction.
|
|
231
|
-
*
|
|
232
|
-
* @type {boolean}
|
|
233
|
-
* @defaultvalue false
|
|
234
|
-
* @public
|
|
235
|
-
*/
|
|
236
|
-
readonly: {
|
|
237
|
-
type: Boolean,
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Defines whether the component is required.
|
|
242
|
-
*
|
|
243
|
-
* @type {boolean}
|
|
244
|
-
* @defaultvalue false
|
|
245
|
-
* @public
|
|
246
|
-
* @since 1.0.0-rc.5
|
|
247
|
-
*/
|
|
248
|
-
required: {
|
|
249
|
-
type: Boolean,
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Defines the filter type of the component.
|
|
254
|
-
* Available options are: <code>StartsWithPerTerm</code>, <code>StartsWith</code>, <code>Contains</code> and <code>None</code>.
|
|
255
|
-
*
|
|
256
|
-
* @type {string}
|
|
257
|
-
* @defaultvalue "StartsWithPerTerm"
|
|
258
|
-
* @public
|
|
259
|
-
*/
|
|
260
|
-
filter: {
|
|
261
|
-
type: String,
|
|
262
|
-
defaultValue: "StartsWithPerTerm",
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Indicates whether the dropdown is open. True if the dropdown is open, false otherwise.
|
|
267
|
-
*
|
|
268
|
-
* @type {boolean}
|
|
269
|
-
* @defaultvalue false
|
|
270
|
-
* @readonly
|
|
271
|
-
* @since 1.0.0-rc.5
|
|
272
|
-
* @public
|
|
273
|
-
*/
|
|
274
|
-
open: {
|
|
275
|
-
type: Boolean,
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Defines the accessible ARIA name of the component.
|
|
280
|
-
*
|
|
281
|
-
* @type {string}
|
|
282
|
-
* @defaultvalue: ""
|
|
283
|
-
* @public
|
|
284
|
-
* @since 1.4.0
|
|
285
|
-
*/
|
|
286
|
-
accessibleName: {
|
|
287
|
-
type: String,
|
|
288
|
-
defaultValue: undefined,
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Receives id(or many ids) of the elements that label the component.
|
|
293
|
-
*
|
|
294
|
-
* @type {string}
|
|
295
|
-
* @defaultvalue ""
|
|
296
|
-
* @public
|
|
297
|
-
* @since 1.4.0
|
|
298
|
-
*/
|
|
299
|
-
accessibleNameRef: {
|
|
300
|
-
type: String,
|
|
301
|
-
defaultValue: "",
|
|
302
|
-
},
|
|
303
|
-
|
|
304
|
-
_filteredItems: {
|
|
305
|
-
type: Object,
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
filterSelected: {
|
|
309
|
-
type: Boolean,
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
focused: {
|
|
313
|
-
type: Boolean,
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
_tokenizerFocused: {
|
|
317
|
-
type: Boolean,
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
_iconPressed: {
|
|
321
|
-
type: Boolean,
|
|
322
|
-
noAttribute: true,
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
_inputWidth: {
|
|
326
|
-
type: Integer,
|
|
327
|
-
noAttribute: true,
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
_listWidth: {
|
|
331
|
-
type: Integer,
|
|
332
|
-
defaultValue: 0,
|
|
333
|
-
noAttribute: true,
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
_performingSelectionTwice: {
|
|
337
|
-
type: Boolean,
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Indicates whether the tokenizer has tokens
|
|
342
|
-
* @private
|
|
343
|
-
*/
|
|
344
|
-
tokenizerAvailable: {
|
|
345
|
-
type: Boolean,
|
|
346
|
-
},
|
|
347
|
-
},
|
|
348
|
-
events: /** @lends sap.ui.webc.main.MultiComboBox.prototype */ {
|
|
349
|
-
/**
|
|
350
|
-
* Fired when the input operation has finished by pressing Enter or on focusout.
|
|
351
|
-
*
|
|
352
|
-
* @event
|
|
353
|
-
* @public
|
|
354
|
-
*/
|
|
355
|
-
change: {},
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Fired when the value of the component changes at each keystroke.
|
|
359
|
-
*
|
|
360
|
-
* @event
|
|
361
|
-
* @public
|
|
362
|
-
*/
|
|
363
|
-
input: {},
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Fired when the dropdown is opened or closed.
|
|
367
|
-
*
|
|
368
|
-
* @event sap.ui.webc.main.MultiComboBox#open-change
|
|
369
|
-
* @since 1.0.0-rc.5
|
|
370
|
-
* @public
|
|
371
|
-
*/
|
|
372
|
-
"open-change": {},
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Fired when selection is changed by user interaction
|
|
376
|
-
* in <code>SingleSelect</code> and <code>MultiSelect</code> modes.
|
|
377
|
-
*
|
|
378
|
-
* @event sap.ui.webc.main.MultiComboBox#selection-change
|
|
379
|
-
* @param {Array} items an array of the selected items.
|
|
380
|
-
* @public
|
|
381
|
-
*/
|
|
382
|
-
"selection-change": {
|
|
383
|
-
detail: {
|
|
384
|
-
items: { type: Array },
|
|
385
|
-
},
|
|
386
|
-
},
|
|
387
|
-
},
|
|
109
|
+
type ValueStateAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;
|
|
110
|
+
type ValueStateTypeAnnouncement = Record<Exclude<ValueState, ValueState.None>, string>;
|
|
111
|
+
|
|
112
|
+
type MultiComboBoxSelectionChangeEventDetail = {
|
|
113
|
+
items: Array<MultiComboBoxItem>,
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
type MultiComboboxItemWithSelection = {
|
|
117
|
+
ref: IMultiComboBoxItem,
|
|
118
|
+
selected: boolean,
|
|
388
119
|
};
|
|
389
120
|
|
|
390
121
|
/**
|
|
@@ -445,59 +176,333 @@ const metadata = {
|
|
|
445
176
|
* @appenddocs sap.ui.webc.main.MultiComboBoxItem sap.ui.webc.main.MultiComboBoxGroupItem
|
|
446
177
|
* @since 0.11.0
|
|
447
178
|
*/
|
|
179
|
+
@customElement({
|
|
180
|
+
tag: "ui5-multi-combobox",
|
|
181
|
+
languageAware: true,
|
|
182
|
+
renderer: litRender,
|
|
183
|
+
template: MultiComboBoxTemplate,
|
|
184
|
+
staticAreaTemplate: MultiComboBoxPopoverTemplate,
|
|
185
|
+
styles: multiCbxStyles,
|
|
186
|
+
staticAreaStyles: [ResponsivePopoverCommonCss, ValueStateMessageCss, SuggestionsCss, MultiComboBoxPopover],
|
|
187
|
+
dependencies: [
|
|
188
|
+
MultiComboBoxItem,
|
|
189
|
+
MultiComboBoxGroupItem,
|
|
190
|
+
Tokenizer,
|
|
191
|
+
Token,
|
|
192
|
+
Icon,
|
|
193
|
+
ResponsivePopover,
|
|
194
|
+
Popover,
|
|
195
|
+
List,
|
|
196
|
+
StandardListItem,
|
|
197
|
+
GroupHeaderListItem,
|
|
198
|
+
ToggleButton,
|
|
199
|
+
Button,
|
|
200
|
+
],
|
|
201
|
+
})
|
|
202
|
+
/**
|
|
203
|
+
* Fired when the input operation has finished by pressing Enter or on focusout.
|
|
204
|
+
*
|
|
205
|
+
* @event sap.ui.webc.main.MultiComboBox#change
|
|
206
|
+
* @public
|
|
207
|
+
*/
|
|
208
|
+
@event("change")
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Fired when the value of the component changes at each keystroke.
|
|
212
|
+
*
|
|
213
|
+
* @event sap.ui.webc.main.MultiComboBox#input
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
@event("input")
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Fired when the dropdown is opened or closed.
|
|
220
|
+
*
|
|
221
|
+
* @event sap.ui.webc.main.MultiComboBox#open-change
|
|
222
|
+
* @since 1.0.0-rc.5
|
|
223
|
+
* @public
|
|
224
|
+
*/
|
|
225
|
+
@event("open-change")
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Fired when selection is changed by user interaction
|
|
229
|
+
* in <code>SingleSelect</code> and <code>MultiSelect</code> modes.
|
|
230
|
+
*
|
|
231
|
+
* @event sap.ui.webc.main.MultiComboBox#selection-change
|
|
232
|
+
* @param {Array} items an array of the selected items.
|
|
233
|
+
* @public
|
|
234
|
+
*/
|
|
235
|
+
@event("selection-change", {
|
|
236
|
+
detail: {
|
|
237
|
+
items: { type: Array },
|
|
238
|
+
},
|
|
239
|
+
})
|
|
240
|
+
|
|
448
241
|
class MultiComboBox extends UI5Element {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
242
|
+
/**
|
|
243
|
+
* Defines the value of the component.
|
|
244
|
+
* <br><br>
|
|
245
|
+
* <b>Note:</b> The property is updated upon typing.
|
|
246
|
+
*
|
|
247
|
+
* @type {string}
|
|
248
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.value
|
|
249
|
+
* @defaultvalue ""
|
|
250
|
+
* @formEvents change input
|
|
251
|
+
* @formProperty
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
254
|
+
@property()
|
|
255
|
+
value!: string;
|
|
452
256
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
257
|
+
/**
|
|
258
|
+
* Defines whether the value will be autcompleted to match an item
|
|
259
|
+
*
|
|
260
|
+
* @type {boolean}
|
|
261
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.noTypeahead
|
|
262
|
+
* @defaultvalue false
|
|
263
|
+
* @public
|
|
264
|
+
* @since 1.4.0
|
|
265
|
+
*/
|
|
266
|
+
@property({ type: Boolean })
|
|
267
|
+
noTypeahead!: boolean;
|
|
456
268
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Defines a short hint intended to aid the user with data entry when the
|
|
271
|
+
* component has no value.
|
|
272
|
+
* @type {string}
|
|
273
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.placeholder
|
|
274
|
+
* @defaultvalue ""
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
@property()
|
|
278
|
+
placeholder!: string;
|
|
460
279
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
280
|
+
/**
|
|
281
|
+
* Defines if the user input will be prevented, if no matching item has been found
|
|
282
|
+
*
|
|
283
|
+
* @type {boolean}
|
|
284
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.allowCustomValues
|
|
285
|
+
* @defaultvalue false
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
@property({ type: Boolean })
|
|
289
|
+
allowCustomValues!: boolean;
|
|
464
290
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Defines whether the component is in disabled state.
|
|
293
|
+
* <br><br>
|
|
294
|
+
* <b>Note:</b> A disabled component is completely noninteractive.
|
|
295
|
+
*
|
|
296
|
+
* @type {boolean}
|
|
297
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.disabled
|
|
298
|
+
* @defaultvalue false
|
|
299
|
+
* @public
|
|
300
|
+
*/
|
|
301
|
+
@property({ type: Boolean })
|
|
302
|
+
disabled!: boolean;
|
|
468
303
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
304
|
+
/**
|
|
305
|
+
* Defines the value state of the component.
|
|
306
|
+
* <br><br>
|
|
307
|
+
* Available options are:
|
|
308
|
+
* <ul>
|
|
309
|
+
* <li><code>None</code></li>
|
|
310
|
+
* <li><code>Error</code></li>
|
|
311
|
+
* <li><code>Warning</code></li>
|
|
312
|
+
* <li><code>Success</code></li>
|
|
313
|
+
* <li><code>Information</code></li>
|
|
314
|
+
* </ul>
|
|
315
|
+
*
|
|
316
|
+
* @type {sap.ui.webc.base.types.ValueState}
|
|
317
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.valueState
|
|
318
|
+
* @defaultvalue "None"
|
|
319
|
+
* @public
|
|
320
|
+
*/
|
|
321
|
+
@property({ type: ValueState, defaultValue: ValueState.None })
|
|
322
|
+
valueState!: ValueState;
|
|
472
323
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Defines whether the component is read-only.
|
|
326
|
+
* <br><br>
|
|
327
|
+
* <b>Note:</b> A read-only component is not editable,
|
|
328
|
+
* but still provides visual feedback upon user interaction.
|
|
329
|
+
*
|
|
330
|
+
* @type {boolean}
|
|
331
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.readonly
|
|
332
|
+
* @defaultvalue false
|
|
333
|
+
* @public
|
|
334
|
+
*/
|
|
335
|
+
@property({ type: Boolean })
|
|
336
|
+
readonly!: boolean;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Defines whether the component is required.
|
|
340
|
+
*
|
|
341
|
+
* @type {boolean}
|
|
342
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.required
|
|
343
|
+
* @defaultvalue false
|
|
344
|
+
* @public
|
|
345
|
+
* @since 1.0.0-rc.5
|
|
346
|
+
*/
|
|
347
|
+
@property({ type: Boolean })
|
|
348
|
+
required!: boolean;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Defines the filter type of the component.
|
|
352
|
+
* Available options are: <code>StartsWithPerTerm</code>, <code>StartsWith</code>, <code>Contains</code> and <code>None</code>.
|
|
353
|
+
*
|
|
354
|
+
* @type {string}
|
|
355
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.filter
|
|
356
|
+
* @defaultvalue "StartsWithPerTerm"
|
|
357
|
+
* @public
|
|
358
|
+
*/
|
|
359
|
+
@property({ type: ComboBoxFilter, defaultValue: ComboBoxFilter.StartsWithPerTerm })
|
|
360
|
+
filter!: ComboBoxFilter;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Indicates whether the dropdown is open. True if the dropdown is open, false otherwise.
|
|
364
|
+
*
|
|
365
|
+
* @type {boolean}
|
|
366
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.open
|
|
367
|
+
* @defaultvalue false
|
|
368
|
+
* @readonly
|
|
369
|
+
* @since 1.0.0-rc.5
|
|
370
|
+
* @public
|
|
371
|
+
*/
|
|
372
|
+
@property({ type: Boolean })
|
|
373
|
+
open!: boolean;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Defines the accessible ARIA name of the component.
|
|
377
|
+
*
|
|
378
|
+
* @type {string}
|
|
379
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.accessibleName
|
|
380
|
+
* @defaultvalue: ""
|
|
381
|
+
* @public
|
|
382
|
+
* @since 1.4.0
|
|
383
|
+
*/
|
|
384
|
+
@property()
|
|
385
|
+
accessibleName!: string;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Receives id(or many ids) of the elements that label the component.
|
|
389
|
+
*
|
|
390
|
+
* @type {string}
|
|
391
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.accessibleNameRef
|
|
392
|
+
* @defaultvalue ""
|
|
393
|
+
* @public
|
|
394
|
+
* @since 1.4.0
|
|
395
|
+
*/
|
|
396
|
+
@property()
|
|
397
|
+
accessibleNameRef!: string;
|
|
398
|
+
|
|
399
|
+
@property({ type: Object, noAttribute: true, multiple: true })
|
|
400
|
+
_filteredItems!: Array<IMultiComboBoxItem>;
|
|
401
|
+
|
|
402
|
+
@property({ type: Boolean })
|
|
403
|
+
filterSelected!: boolean;
|
|
404
|
+
|
|
405
|
+
@property({ type: Boolean })
|
|
406
|
+
focused!: boolean;
|
|
407
|
+
|
|
408
|
+
@property({ type: Boolean, noAttribute: true })
|
|
409
|
+
_tokenizerFocused!: boolean;
|
|
410
|
+
|
|
411
|
+
@property({ type: Boolean, noAttribute: true })
|
|
412
|
+
_iconPressed!: boolean;
|
|
413
|
+
|
|
414
|
+
@property({ validator: Integer, noAttribute: true })
|
|
415
|
+
_inputWidth!: number;
|
|
416
|
+
|
|
417
|
+
@property({ validator: Integer, noAttribute: true, defaultValue: 0 })
|
|
418
|
+
_listWidth!: number;
|
|
419
|
+
|
|
420
|
+
@property({ type: Boolean, noAttribute: true })
|
|
421
|
+
_performingSelectionTwice!: boolean;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Indicates whether the tokenizer has tokens
|
|
425
|
+
* @private
|
|
426
|
+
*/
|
|
427
|
+
@property({ type: Boolean })
|
|
428
|
+
tokenizerAvailable!: boolean;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Defines the component items.
|
|
432
|
+
*
|
|
433
|
+
* @type {sap.ui.webc.main.IMultiComboBoxItem[]}
|
|
434
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.default
|
|
435
|
+
* @slot items
|
|
436
|
+
* @public
|
|
437
|
+
*/
|
|
438
|
+
@slot({ type: HTMLElement, "default": true, invalidateOnChildChange: true })
|
|
439
|
+
items!: Array<IMultiComboBoxItem>;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Defines the icon to be displayed in the component.
|
|
443
|
+
*
|
|
444
|
+
* @type {sap.ui.webc.main.IIcon[]}
|
|
445
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.icon
|
|
446
|
+
* @slot
|
|
447
|
+
* @public
|
|
448
|
+
* @since 1.0.0-rc.9
|
|
449
|
+
*/
|
|
450
|
+
@slot()
|
|
451
|
+
icon!: Array<Icon>;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Defines the value state message that will be displayed as pop up under the component.
|
|
455
|
+
* <br><br>
|
|
456
|
+
*
|
|
457
|
+
* <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.
|
|
458
|
+
* <br>
|
|
459
|
+
* <b>Note:</b> The <code>valueStateMessage</code> would be displayed,
|
|
460
|
+
* when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.
|
|
461
|
+
* @type {HTMLElement[]}
|
|
462
|
+
* @name sap.ui.webc.main.MultiComboBox.prototype.valueStateMessage
|
|
463
|
+
* @since 1.0.0-rc.9
|
|
464
|
+
* @slot
|
|
465
|
+
* @public
|
|
466
|
+
*/
|
|
467
|
+
@slot()
|
|
468
|
+
valueStateMessage!: Array<HTMLElement>;
|
|
469
|
+
|
|
470
|
+
selectedValues: Array<IMultiComboBoxItem>;
|
|
471
|
+
_inputLastValue: string;
|
|
472
|
+
_valueBeforeOpen: string
|
|
473
|
+
_deleting: boolean;
|
|
474
|
+
_validationTimeout: Timeout | null;
|
|
475
|
+
_handleResizeBound: ResizeObserverCallback;
|
|
476
|
+
valueBeforeAutoComplete: string;
|
|
477
|
+
currentItemIdx: number;
|
|
478
|
+
_lastValue: string;
|
|
479
|
+
_shouldFilterItems?: boolean;
|
|
480
|
+
_showMorePressed?: boolean;
|
|
481
|
+
allItemsPopover?: ResponsivePopover;
|
|
482
|
+
valueStateHeader?: HTMLElement;
|
|
483
|
+
list?: List;
|
|
484
|
+
_shouldAutocomplete?: boolean;
|
|
485
|
+
_preventTokenizerToggle?: boolean;
|
|
486
|
+
_isOpenedByKeyboard?: boolean;
|
|
487
|
+
_itemToFocus?: IMultiComboBoxItem;
|
|
488
|
+
_itemsBeforeOpen: Array<MultiComboboxItemWithSelection>;
|
|
489
|
+
selectedItems?: Array<IMultiComboBoxItem>;
|
|
490
|
+
FormSupport?: typeof FormSupportT;
|
|
491
|
+
static i18nBundle: I18nBundle;
|
|
489
492
|
|
|
490
493
|
constructor() {
|
|
491
494
|
super();
|
|
492
495
|
|
|
493
496
|
this._filteredItems = [];
|
|
494
497
|
this.selectedValues = [];
|
|
498
|
+
this._itemsBeforeOpen = [];
|
|
495
499
|
this._inputLastValue = "";
|
|
496
500
|
this._valueBeforeOpen = "";
|
|
497
501
|
this._deleting = false;
|
|
498
502
|
this._validationTimeout = null;
|
|
499
503
|
this._handleResizeBound = this._handleResize.bind(this);
|
|
500
504
|
this.valueBeforeAutoComplete = "";
|
|
505
|
+
this._lastValue = "";
|
|
501
506
|
this.currentItemIdx = -1;
|
|
502
507
|
this.FormSupport = undefined;
|
|
503
508
|
}
|
|
@@ -519,12 +524,12 @@ class MultiComboBox extends UI5Element {
|
|
|
519
524
|
}
|
|
520
525
|
|
|
521
526
|
togglePopover() {
|
|
522
|
-
this.allItemsPopover
|
|
527
|
+
this.allItemsPopover?.toggle(this);
|
|
523
528
|
}
|
|
524
529
|
|
|
525
530
|
togglePopoverByDropdownIcon() {
|
|
526
531
|
this._shouldFilterItems = false;
|
|
527
|
-
this.allItemsPopover
|
|
532
|
+
this.allItemsPopover?.toggle(this);
|
|
528
533
|
}
|
|
529
534
|
|
|
530
535
|
_showFilteredItems() {
|
|
@@ -534,25 +539,25 @@ class MultiComboBox extends UI5Element {
|
|
|
534
539
|
this.togglePopover();
|
|
535
540
|
}
|
|
536
541
|
|
|
537
|
-
filterSelectedItems(
|
|
538
|
-
this.filterSelected =
|
|
542
|
+
filterSelectedItems(e: MouseEvent) {
|
|
543
|
+
this.filterSelected = (e.target as ToggleButton).pressed;
|
|
539
544
|
const selectedItems = this._filteredItems.filter(item => item.selected);
|
|
540
545
|
this.selectedItems = this.items.filter((item, idx, allItems) => MultiComboBox._groupItemFilter(item, ++idx, allItems, selectedItems) || selectedItems.indexOf(item) !== -1);
|
|
541
546
|
}
|
|
542
547
|
|
|
543
|
-
get _showAllItemsButtonPressed() {
|
|
548
|
+
get _showAllItemsButtonPressed(): boolean {
|
|
544
549
|
return this.filterSelected;
|
|
545
550
|
}
|
|
546
551
|
|
|
547
|
-
get _inputDom() {
|
|
548
|
-
return this.shadowRoot
|
|
552
|
+
get _inputDom(): HTMLInputElement {
|
|
553
|
+
return this.shadowRoot!.querySelector("#ui5-multi-combobox-input")!;
|
|
549
554
|
}
|
|
550
555
|
|
|
551
|
-
_inputLiveChange(
|
|
552
|
-
const input =
|
|
553
|
-
const value = input.value;
|
|
554
|
-
const filteredItems = this._filterItems(value);
|
|
555
|
-
const oldValueState = this.valueState;
|
|
556
|
+
_inputLiveChange(e: InputEvent) {
|
|
557
|
+
const input = e.target as HTMLInputElement;
|
|
558
|
+
const value: string = input.value;
|
|
559
|
+
const filteredItems: Array<IMultiComboBoxItem> = this._filterItems(value);
|
|
560
|
+
const oldValueState: ValueState = this.valueState;
|
|
556
561
|
|
|
557
562
|
this._shouldFilterItems = true;
|
|
558
563
|
|
|
@@ -567,7 +572,7 @@ class MultiComboBox extends UI5Element {
|
|
|
567
572
|
|
|
568
573
|
if (!filteredItems.length && value && !this.allowCustomValues) {
|
|
569
574
|
input.value = this.valueBeforeAutoComplete || this._inputLastValue;
|
|
570
|
-
this.valueState =
|
|
575
|
+
this.valueState = ValueState.Error;
|
|
571
576
|
|
|
572
577
|
this._shouldAutocomplete = false;
|
|
573
578
|
this._resetValueState(oldValueState);
|
|
@@ -581,18 +586,18 @@ class MultiComboBox extends UI5Element {
|
|
|
581
586
|
|
|
582
587
|
if (!isPhone()) {
|
|
583
588
|
if (filteredItems.length === 0) {
|
|
584
|
-
this.allItemsPopover
|
|
589
|
+
this.allItemsPopover?.close();
|
|
585
590
|
} else {
|
|
586
|
-
this.allItemsPopover
|
|
591
|
+
this.allItemsPopover?.showAt(this);
|
|
587
592
|
}
|
|
588
593
|
}
|
|
589
594
|
|
|
590
595
|
this.fireEvent("input");
|
|
591
596
|
}
|
|
592
597
|
|
|
593
|
-
_tokenDelete(
|
|
594
|
-
const token =
|
|
595
|
-
const deletingItem = this.items.find(item => item._id === token.getAttribute("data-ui5-id"))
|
|
598
|
+
_tokenDelete(e: CustomEvent<TokenizerTokenDeleteEventDetail>) {
|
|
599
|
+
const token: Token = e.detail.ref;
|
|
600
|
+
const deletingItem = this.items.find(item => item._id === token.getAttribute("data-ui5-id"))!;
|
|
596
601
|
|
|
597
602
|
deletingItem.selected = false;
|
|
598
603
|
this._deleting = true;
|
|
@@ -600,7 +605,7 @@ class MultiComboBox extends UI5Element {
|
|
|
600
605
|
this.fireSelectionChange();
|
|
601
606
|
}
|
|
602
607
|
|
|
603
|
-
get _getPlaceholder() {
|
|
608
|
+
get _getPlaceholder(): string {
|
|
604
609
|
if (this._getSelectedItems().length) {
|
|
605
610
|
return "";
|
|
606
611
|
}
|
|
@@ -609,31 +614,36 @@ class MultiComboBox extends UI5Element {
|
|
|
609
614
|
}
|
|
610
615
|
|
|
611
616
|
_handleArrowLeft() {
|
|
612
|
-
const
|
|
613
|
-
const
|
|
617
|
+
const inputDomRef = this._inputDom;
|
|
618
|
+
const cursorPosition = inputDomRef.selectionStart || 0;
|
|
619
|
+
const isTextSelected = ((inputDomRef.selectionEnd || 0) - cursorPosition) > 0;
|
|
614
620
|
|
|
615
621
|
if (cursorPosition === 0 && !isTextSelected) {
|
|
616
622
|
this._tokenizer._focusLastToken();
|
|
617
623
|
}
|
|
618
624
|
}
|
|
619
625
|
|
|
620
|
-
_tokenizerFocusOut(
|
|
626
|
+
_tokenizerFocusOut(e: FocusEvent) {
|
|
621
627
|
this._tokenizerFocused = false;
|
|
622
628
|
|
|
623
629
|
const tokensCount = this._tokenizer.tokens.length;
|
|
624
630
|
const selectedTokens = this._selectedTokensCount;
|
|
625
631
|
const lastTokenBeingDeleted = tokensCount - 1 === 0 && this._deleting;
|
|
626
632
|
const allTokensAreBeingDeleted = selectedTokens === tokensCount && this._deleting;
|
|
633
|
+
const relatedTarget: HTMLElement | undefined = e.relatedTarget as HTMLElement;
|
|
634
|
+
|
|
635
|
+
if (!relatedTarget || !relatedTarget.hasAttribute("ui5-token")) {
|
|
636
|
+
this._tokenizer.tokens.forEach(token => {
|
|
637
|
+
token.selected = false;
|
|
638
|
+
});
|
|
627
639
|
|
|
628
|
-
if (!event.relatedTarget || !event.relatedTarget.hasAttribute("ui5-token")) {
|
|
629
|
-
this._tokenizer.tokens.forEach(token => { token.selected = false; });
|
|
630
640
|
this._tokenizer.expanded = this._preventTokenizerToggle ? this._tokenizer.expanded : false;
|
|
631
641
|
}
|
|
632
642
|
|
|
633
643
|
if (allTokensAreBeingDeleted || lastTokenBeingDeleted) {
|
|
634
644
|
setTimeout(() => {
|
|
635
645
|
if (!isPhone()) {
|
|
636
|
-
this.
|
|
646
|
+
this._inputDom.focus();
|
|
637
647
|
}
|
|
638
648
|
|
|
639
649
|
this._deleting = false;
|
|
@@ -646,49 +656,64 @@ class MultiComboBox extends UI5Element {
|
|
|
646
656
|
this.focused = false;
|
|
647
657
|
}
|
|
648
658
|
|
|
649
|
-
|
|
650
|
-
const isArrowDownCtrl = isDownCtrl(
|
|
659
|
+
_onkeydown(e: KeyboardEvent) {
|
|
660
|
+
const isArrowDownCtrl: boolean = isDownCtrl(e);
|
|
651
661
|
|
|
652
|
-
if (isShow(
|
|
653
|
-
this._handleShow(
|
|
662
|
+
if (isShow(e) && !this.disabled) {
|
|
663
|
+
this._handleShow(e);
|
|
654
664
|
return;
|
|
655
665
|
}
|
|
656
666
|
|
|
657
|
-
if (isDownShift(
|
|
658
|
-
|
|
667
|
+
if (isDownShift(e) || isUpShift(e)) {
|
|
668
|
+
e.preventDefault();
|
|
659
669
|
return;
|
|
660
670
|
}
|
|
661
671
|
|
|
662
|
-
if (isUp(
|
|
663
|
-
this._handleArrowNavigation(
|
|
672
|
+
if (isUp(e) || isDown(e) || isUpCtrl(e) || isArrowDownCtrl) {
|
|
673
|
+
this._handleArrowNavigation(e, isArrowDownCtrl);
|
|
664
674
|
return;
|
|
665
675
|
}
|
|
666
676
|
|
|
667
677
|
// CTRL + Arrow Down navigation is performed by the ItemNavigation module of the List,
|
|
668
678
|
// here we only implement the text selection of the selected item
|
|
669
|
-
if (isArrowDownCtrl && !this.allItemsPopover
|
|
679
|
+
if (isArrowDownCtrl && !this.allItemsPopover?.opened) {
|
|
670
680
|
setTimeout(() => this._inputDom.setSelectionRange(0, this._inputDom.value.length), 0);
|
|
671
681
|
}
|
|
672
682
|
|
|
673
|
-
if (isLeftCtrl(
|
|
674
|
-
this._handleArrowCtrl(
|
|
683
|
+
if (isLeftCtrl(e) || isRightCtrl(e)) {
|
|
684
|
+
this._handleArrowCtrl(e);
|
|
675
685
|
return;
|
|
676
686
|
}
|
|
677
687
|
|
|
678
|
-
if (isCtrlV(
|
|
679
|
-
this._handlePaste(
|
|
688
|
+
if (isCtrlV(e) || isInsertShift(e)) {
|
|
689
|
+
this._handlePaste();
|
|
680
690
|
return;
|
|
681
691
|
}
|
|
682
692
|
|
|
683
|
-
if (isSpaceShift(
|
|
684
|
-
|
|
693
|
+
if (isSpaceShift(e)) {
|
|
694
|
+
e.preventDefault();
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
if (
|
|
698
|
+
e.key === "ArrowLeft"
|
|
699
|
+
|| e.key === "Show"
|
|
700
|
+
|| e.key === "PageUp"
|
|
701
|
+
|| e.key === "PageDown"
|
|
702
|
+
|| e.key === "Backspace"
|
|
703
|
+
|| e.key === "Escape"
|
|
704
|
+
|| e.key === "Home"
|
|
705
|
+
|| e.key === "End"
|
|
706
|
+
|| e.key === "Tab"
|
|
707
|
+
|| e.key === "ArrowDown"
|
|
708
|
+
|| e.key === "Enter"
|
|
709
|
+
) {
|
|
710
|
+
this[`_handle${e.key}`](e);
|
|
685
711
|
}
|
|
686
712
|
|
|
687
|
-
this
|
|
688
|
-
this._shouldAutocomplete = !this.noTypeahead && !(isBackSpace(event) || isDelete(event) || isEscape(event) || isEnter(event));
|
|
713
|
+
this._shouldAutocomplete = !this.noTypeahead && !(isBackSpace(e) || isDelete(e) || isEscape(e) || isEnter(e));
|
|
689
714
|
}
|
|
690
715
|
|
|
691
|
-
async _handlePaste(
|
|
716
|
+
async _handlePaste() {
|
|
692
717
|
if (this.readonly) {
|
|
693
718
|
return;
|
|
694
719
|
}
|
|
@@ -714,14 +739,14 @@ class MultiComboBox extends UI5Element {
|
|
|
714
739
|
}
|
|
715
740
|
}
|
|
716
741
|
|
|
717
|
-
_handleShow(
|
|
742
|
+
_handleShow(e: KeyboardEvent) {
|
|
718
743
|
const items = this.items;
|
|
719
744
|
const selectedItem = this._getSelectedItems()[0];
|
|
720
745
|
const focusedToken = this._tokenizer.tokens.find(token => token.focused);
|
|
721
746
|
const value = this.value;
|
|
722
747
|
const matchingItem = this.items.find(item => item.text.localeCompare(value, undefined, { sensitivity: "base" }) === 0);
|
|
723
748
|
|
|
724
|
-
|
|
749
|
+
e.preventDefault();
|
|
725
750
|
|
|
726
751
|
if (this.readonly) {
|
|
727
752
|
return;
|
|
@@ -740,31 +765,31 @@ class MultiComboBox extends UI5Element {
|
|
|
740
765
|
|
|
741
766
|
if (selectedItem && !focusedToken) {
|
|
742
767
|
this._itemToFocus = selectedItem;
|
|
743
|
-
} else if (focusedToken &&
|
|
768
|
+
} else if (focusedToken && e.target === focusedToken) {
|
|
744
769
|
this._itemToFocus = items.find(item => item.text === focusedToken.text);
|
|
745
770
|
} else {
|
|
746
771
|
this._itemToFocus = items[0];
|
|
747
772
|
}
|
|
748
773
|
}
|
|
749
774
|
|
|
750
|
-
_handlePageUp(
|
|
751
|
-
|
|
775
|
+
_handlePageUp(e: KeyboardEvent) {
|
|
776
|
+
e.preventDefault();
|
|
752
777
|
}
|
|
753
778
|
|
|
754
|
-
_handlePageDown(
|
|
755
|
-
|
|
779
|
+
_handlePageDown(e: KeyboardEvent) {
|
|
780
|
+
e.preventDefault();
|
|
756
781
|
}
|
|
757
782
|
|
|
758
|
-
_handleBackspace(
|
|
759
|
-
if (
|
|
760
|
-
|
|
783
|
+
_handleBackspace(e: KeyboardEvent) {
|
|
784
|
+
if ((e.target as HTMLInputElement).value === "") {
|
|
785
|
+
e.preventDefault();
|
|
761
786
|
this._tokenizer._focusLastToken();
|
|
762
787
|
}
|
|
763
788
|
}
|
|
764
789
|
|
|
765
|
-
_handleEscape(
|
|
790
|
+
_handleEscape() {
|
|
766
791
|
const innerInput = this._innerInput;
|
|
767
|
-
const isAutoCompleted = innerInput.selectionEnd - innerInput.selectionStart > 0;
|
|
792
|
+
const isAutoCompleted = ((innerInput.selectionEnd || 0) - (innerInput.selectionStart || 0)) > 0;
|
|
768
793
|
|
|
769
794
|
if (isAutoCompleted) {
|
|
770
795
|
this.value = this.valueBeforeAutoComplete;
|
|
@@ -775,31 +800,31 @@ class MultiComboBox extends UI5Element {
|
|
|
775
800
|
}
|
|
776
801
|
}
|
|
777
802
|
|
|
778
|
-
_handleHome(
|
|
779
|
-
const shouldFocusToken = this._isFocusInside &&
|
|
803
|
+
_handleHome(e: KeyboardEvent) {
|
|
804
|
+
const shouldFocusToken = this._isFocusInside && (e.target as HTMLInputElement).selectionStart === 0 && this._tokenizer.tokens.length > 0;
|
|
780
805
|
|
|
781
806
|
if (shouldFocusToken) {
|
|
782
|
-
|
|
807
|
+
e.preventDefault();
|
|
783
808
|
this._tokenizer.tokens[0].focus();
|
|
784
809
|
}
|
|
785
810
|
}
|
|
786
811
|
|
|
787
|
-
_handleEnd(
|
|
812
|
+
_handleEnd(e: KeyboardEvent) {
|
|
788
813
|
const tokens = this._tokenizer.tokens;
|
|
789
814
|
const lastTokenIdx = tokens.length - 1;
|
|
790
|
-
const shouldFocusInput =
|
|
815
|
+
const shouldFocusInput = e.target === tokens[lastTokenIdx] && tokens[lastTokenIdx] === this.shadowRoot!.activeElement;
|
|
791
816
|
|
|
792
817
|
if (shouldFocusInput) {
|
|
793
|
-
|
|
818
|
+
e.preventDefault();
|
|
794
819
|
this._inputDom.focus();
|
|
795
820
|
}
|
|
796
821
|
}
|
|
797
822
|
|
|
798
|
-
_handleTab(
|
|
799
|
-
this.allItemsPopover
|
|
823
|
+
_handleTab() {
|
|
824
|
+
this.allItemsPopover?.close();
|
|
800
825
|
}
|
|
801
826
|
|
|
802
|
-
_handleSelectAll(
|
|
827
|
+
_handleSelectAll() {
|
|
803
828
|
const filteredItems = this._filteredItems;
|
|
804
829
|
const allItemsSelected = filteredItems.every(item => item.selected);
|
|
805
830
|
|
|
@@ -810,77 +835,77 @@ class MultiComboBox extends UI5Element {
|
|
|
810
835
|
this.fireSelectionChange();
|
|
811
836
|
}
|
|
812
837
|
|
|
813
|
-
_onValueStateKeydown(
|
|
814
|
-
const isArrowDown = isDown(
|
|
815
|
-
const isArrowUp = isUp(
|
|
838
|
+
_onValueStateKeydown(e: KeyboardEvent) {
|
|
839
|
+
const isArrowDown = isDown(e);
|
|
840
|
+
const isArrowUp = isUp(e);
|
|
816
841
|
|
|
817
|
-
if (isTabNext(
|
|
818
|
-
this._onItemTab(
|
|
842
|
+
if (isTabNext(e) || isTabPrevious(e)) {
|
|
843
|
+
this._onItemTab();
|
|
819
844
|
return;
|
|
820
845
|
}
|
|
821
846
|
|
|
822
|
-
|
|
847
|
+
e.preventDefault();
|
|
823
848
|
|
|
824
|
-
if (isArrowDown || isDownCtrl(
|
|
825
|
-
this._handleArrowDown(
|
|
849
|
+
if (isArrowDown || isDownCtrl(e)) {
|
|
850
|
+
this._handleArrowDown();
|
|
826
851
|
}
|
|
827
852
|
|
|
828
|
-
if (isArrowUp || isUpCtrl(
|
|
853
|
+
if (isArrowUp || isUpCtrl(e)) {
|
|
829
854
|
this._shouldAutocomplete = true;
|
|
830
855
|
this._inputDom.focus();
|
|
831
856
|
}
|
|
832
857
|
}
|
|
833
858
|
|
|
834
|
-
async _onItemKeydown(
|
|
835
|
-
const isFirstItem = this.list
|
|
836
|
-
const isArrowUp = isUp(
|
|
859
|
+
async _onItemKeydown(e: KeyboardEvent) {
|
|
860
|
+
const isFirstItem = this.list?.items[0] === e.target;
|
|
861
|
+
const isArrowUp = isUp(e) || isUpCtrl(e);
|
|
837
862
|
|
|
838
863
|
if (this.hasValueStateMessage && !this.valueStateHeader) {
|
|
839
864
|
await this._setValueStateHeader();
|
|
840
865
|
}
|
|
841
866
|
|
|
842
|
-
if (isTabNext(
|
|
843
|
-
this._onItemTab(
|
|
867
|
+
if (isTabNext(e) || isTabPrevious(e)) {
|
|
868
|
+
this._onItemTab();
|
|
844
869
|
return;
|
|
845
870
|
}
|
|
846
871
|
|
|
847
|
-
if (isHomeCtrl(
|
|
848
|
-
this.list
|
|
849
|
-
this.list
|
|
872
|
+
if (isHomeCtrl(e)) {
|
|
873
|
+
this.list?._itemNavigation._handleHome();
|
|
874
|
+
this.list?.items[this.list?._itemNavigation._currentIndex].focus();
|
|
850
875
|
}
|
|
851
876
|
|
|
852
|
-
if (isEndCtrl(
|
|
853
|
-
this.list
|
|
854
|
-
this.list
|
|
877
|
+
if (isEndCtrl(e)) {
|
|
878
|
+
this.list?._itemNavigation._handleEnd();
|
|
879
|
+
this.list?.items[this.list?._itemNavigation._currentIndex].focus();
|
|
855
880
|
}
|
|
856
881
|
|
|
857
|
-
|
|
882
|
+
e.preventDefault();
|
|
858
883
|
|
|
859
|
-
if (isDownShift(
|
|
860
|
-
this._handleItemRangeSelection(
|
|
884
|
+
if (isDownShift(e) || isUpShift(e)) {
|
|
885
|
+
this._handleItemRangeSelection(e);
|
|
861
886
|
return;
|
|
862
887
|
}
|
|
863
888
|
|
|
864
|
-
if ((isUpCtrl(
|
|
865
|
-
this.list
|
|
866
|
-
this.list
|
|
889
|
+
if ((isUpCtrl(e)) && !isFirstItem) {
|
|
890
|
+
this.list?._itemNavigation._handleUp();
|
|
891
|
+
this.list?.items[this.list?._itemNavigation._currentIndex].focus();
|
|
867
892
|
}
|
|
868
893
|
|
|
869
|
-
if (isDownCtrl(
|
|
870
|
-
this.list
|
|
871
|
-
this.list
|
|
894
|
+
if (isDownCtrl(e)) {
|
|
895
|
+
this.list?._itemNavigation._handleDown();
|
|
896
|
+
this.list?.items[this.list?._itemNavigation._currentIndex].focus();
|
|
872
897
|
}
|
|
873
898
|
|
|
874
|
-
if (isShow(
|
|
899
|
+
if (isShow(e)) {
|
|
875
900
|
this.togglePopover();
|
|
876
901
|
}
|
|
877
902
|
|
|
878
|
-
if (isCtrlA(
|
|
879
|
-
this._handleSelectAll(
|
|
903
|
+
if (isCtrlA(e)) {
|
|
904
|
+
this._handleSelectAll();
|
|
880
905
|
return;
|
|
881
906
|
}
|
|
882
907
|
|
|
883
|
-
if (((isArrowUp && isFirstItem) || isHome(
|
|
908
|
+
if (((isArrowUp && isFirstItem) || isHome(e)) && this.valueStateHeader) {
|
|
884
909
|
this.valueStateHeader.focus();
|
|
885
910
|
}
|
|
886
911
|
|
|
@@ -890,30 +915,30 @@ class MultiComboBox extends UI5Element {
|
|
|
890
915
|
}
|
|
891
916
|
}
|
|
892
917
|
|
|
893
|
-
_handleArrowCtrl(
|
|
918
|
+
_handleArrowCtrl(e: KeyboardEvent) {
|
|
894
919
|
const input = this._inputDom;
|
|
895
|
-
const isArrowLeft = isLeftCtrl(
|
|
920
|
+
const isArrowLeft = isLeftCtrl(e);
|
|
896
921
|
|
|
897
922
|
if (isArrowLeft && input.selectionStart === 0 && input.selectionEnd === 0) {
|
|
898
|
-
|
|
923
|
+
e.preventDefault();
|
|
899
924
|
}
|
|
900
925
|
|
|
901
|
-
if (isArrowLeft && ((input.selectionEnd - input.selectionStart) > 0)) {
|
|
926
|
+
if (isArrowLeft && ((input.selectionEnd || 0) - (input.selectionStart || 0) > 0)) {
|
|
902
927
|
input.setSelectionRange(0, 0);
|
|
903
928
|
}
|
|
904
929
|
}
|
|
905
930
|
|
|
906
|
-
_onItemTab(
|
|
931
|
+
_onItemTab() {
|
|
907
932
|
this._inputDom.focus();
|
|
908
|
-
this.allItemsPopover
|
|
933
|
+
this.allItemsPopover?.close();
|
|
909
934
|
}
|
|
910
935
|
|
|
911
|
-
async _handleArrowNavigation(
|
|
912
|
-
const isArrowDown = isDownControl || isDown(
|
|
936
|
+
async _handleArrowNavigation(e: KeyboardEvent, isDownControl: boolean) {
|
|
937
|
+
const isArrowDown = isDownControl || isDown(e);
|
|
913
938
|
const hasSuggestions = this.items.length;
|
|
914
|
-
const isOpen = this.allItemsPopover
|
|
939
|
+
const isOpen = this.allItemsPopover?.opened;
|
|
915
940
|
|
|
916
|
-
|
|
941
|
+
e.preventDefault();
|
|
917
942
|
|
|
918
943
|
if (this.hasValueStateMessage && !this.valueStateHeader) {
|
|
919
944
|
await this._setValueStateHeader();
|
|
@@ -926,7 +951,7 @@ class MultiComboBox extends UI5Element {
|
|
|
926
951
|
}
|
|
927
952
|
|
|
928
953
|
if (isArrowDown && hasSuggestions) {
|
|
929
|
-
this._handleArrowDown(
|
|
954
|
+
this._handleArrowDown();
|
|
930
955
|
}
|
|
931
956
|
|
|
932
957
|
if (!isArrowDown && !isOpen && !this.readonly) {
|
|
@@ -934,32 +959,32 @@ class MultiComboBox extends UI5Element {
|
|
|
934
959
|
}
|
|
935
960
|
}
|
|
936
961
|
|
|
937
|
-
_handleArrowDown(
|
|
938
|
-
const isOpen = this.allItemsPopover
|
|
939
|
-
const firstListItem = this.list
|
|
962
|
+
_handleArrowDown() {
|
|
963
|
+
const isOpen = this.allItemsPopover?.opened;
|
|
964
|
+
const firstListItem = this.list?.items[0];
|
|
940
965
|
|
|
941
966
|
if (isOpen) {
|
|
942
|
-
this.list
|
|
967
|
+
firstListItem && this.list?._itemNavigation.setCurrentItem(firstListItem);
|
|
943
968
|
this.value = this.valueBeforeAutoComplete || this.value;
|
|
944
|
-
firstListItem
|
|
969
|
+
firstListItem?.focus();
|
|
945
970
|
} else if (!this.readonly) {
|
|
946
971
|
this._navigateToNextItem();
|
|
947
972
|
}
|
|
948
973
|
}
|
|
949
974
|
|
|
950
|
-
_handleItemRangeSelection(
|
|
975
|
+
_handleItemRangeSelection(e: KeyboardEvent) {
|
|
951
976
|
const items = this.items;
|
|
952
|
-
const listItems = this.list
|
|
953
|
-
const currentItemIdx = listItems
|
|
977
|
+
const listItems = this.list?.items;
|
|
978
|
+
const currentItemIdx = listItems?.indexOf(e.target as ListItemBase) || -1;
|
|
954
979
|
const nextItemIdx = currentItemIdx + 1;
|
|
955
980
|
const prevItemIdx = currentItemIdx - 1;
|
|
956
981
|
|
|
957
|
-
if (isDownShift(
|
|
982
|
+
if (isDownShift(e) && items[nextItemIdx]) {
|
|
958
983
|
items[nextItemIdx].selected = items[currentItemIdx].selected;
|
|
959
984
|
items[nextItemIdx].focus();
|
|
960
985
|
}
|
|
961
986
|
|
|
962
|
-
if (isUpShift(
|
|
987
|
+
if (isUpShift(e) && items[prevItemIdx]) {
|
|
963
988
|
items[prevItemIdx].selected = items[currentItemIdx].selected;
|
|
964
989
|
items[prevItemIdx].focus();
|
|
965
990
|
}
|
|
@@ -1049,7 +1074,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1049
1074
|
return;
|
|
1050
1075
|
}
|
|
1051
1076
|
|
|
1052
|
-
this.valueState =
|
|
1077
|
+
this.valueState = ValueState.Error;
|
|
1053
1078
|
this._performingSelectionTwice = true;
|
|
1054
1079
|
this._resetValueState(oldValueState, () => {
|
|
1055
1080
|
this._performingSelectionTwice = false;
|
|
@@ -1061,11 +1086,11 @@ class MultiComboBox extends UI5Element {
|
|
|
1061
1086
|
}
|
|
1062
1087
|
|
|
1063
1088
|
innerInput.setSelectionRange(matchingItem.text.length, matchingItem.text.length);
|
|
1064
|
-
this.allItemsPopover
|
|
1089
|
+
this.allItemsPopover?.close();
|
|
1065
1090
|
}
|
|
1066
1091
|
}
|
|
1067
1092
|
|
|
1068
|
-
_resetValueState(valueState, callback) {
|
|
1093
|
+
_resetValueState(valueState: ValueState, callback?: () => void) {
|
|
1069
1094
|
this._validationTimeout = setTimeout(() => {
|
|
1070
1095
|
this.valueState = valueState;
|
|
1071
1096
|
this._validationTimeout = null;
|
|
@@ -1074,56 +1099,56 @@ class MultiComboBox extends UI5Element {
|
|
|
1074
1099
|
}, 2000);
|
|
1075
1100
|
}
|
|
1076
1101
|
|
|
1077
|
-
_onTokenizerKeydown(
|
|
1078
|
-
const isCtrl = !!(
|
|
1102
|
+
_onTokenizerKeydown(e: KeyboardEvent) {
|
|
1103
|
+
const isCtrl = !!(e.metaKey || e.ctrlKey);
|
|
1079
1104
|
|
|
1080
|
-
if (isRight(
|
|
1105
|
+
if (isRight(e)) {
|
|
1081
1106
|
const lastTokenIndex = this._tokenizer.tokens.length - this._tokenizer.overflownTokens.length - 1;
|
|
1082
1107
|
|
|
1083
|
-
if (
|
|
1108
|
+
if (e.target === this._tokenizer.tokens[lastTokenIndex]) {
|
|
1084
1109
|
setTimeout(() => {
|
|
1085
|
-
this.
|
|
1110
|
+
this._inputDom.focus();
|
|
1086
1111
|
}, 0);
|
|
1087
1112
|
}
|
|
1088
1113
|
}
|
|
1089
1114
|
|
|
1090
|
-
if ((isCtrl && ["c", "x"].includes(
|
|
1091
|
-
|
|
1115
|
+
if ((isCtrl && ["c", "x"].includes(e.key.toLowerCase())) || isDeleteShift(e) || isInsertCtrl(e)) {
|
|
1116
|
+
e.preventDefault();
|
|
1092
1117
|
|
|
1093
|
-
const isCut =
|
|
1118
|
+
const isCut = e.key.toLowerCase() === "x" || isDeleteShift(e);
|
|
1094
1119
|
const selectedTokens = this._tokenizer.tokens.filter(token => token.selected);
|
|
1095
1120
|
|
|
1096
1121
|
if (isCut) {
|
|
1097
|
-
const cutResult = this._tokenizer._fillClipboard(
|
|
1122
|
+
const cutResult = this._tokenizer._fillClipboard(ClipboardDataOperation.cut, selectedTokens);
|
|
1098
1123
|
selectedTokens.forEach(token => {
|
|
1099
|
-
this._tokenizer.
|
|
1124
|
+
this._tokenizer.deleteToken(token);
|
|
1100
1125
|
});
|
|
1101
1126
|
|
|
1102
1127
|
this.focus();
|
|
1103
1128
|
return cutResult;
|
|
1104
1129
|
}
|
|
1105
|
-
return this._tokenizer._fillClipboard(
|
|
1130
|
+
return this._tokenizer._fillClipboard(ClipboardDataOperation.copy, selectedTokens);
|
|
1106
1131
|
}
|
|
1107
1132
|
|
|
1108
|
-
if (isCtrlV(
|
|
1109
|
-
this._handlePaste(
|
|
1133
|
+
if (isCtrlV(e) || isInsertShift(e)) {
|
|
1134
|
+
this._handlePaste();
|
|
1110
1135
|
}
|
|
1111
1136
|
|
|
1112
|
-
if (isHome(
|
|
1113
|
-
this._handleHome(
|
|
1137
|
+
if (isHome(e)) {
|
|
1138
|
+
this._handleHome(e);
|
|
1114
1139
|
}
|
|
1115
1140
|
|
|
1116
|
-
if (isEnd(
|
|
1117
|
-
this._handleEnd(
|
|
1141
|
+
if (isEnd(e)) {
|
|
1142
|
+
this._handleEnd(e);
|
|
1118
1143
|
}
|
|
1119
1144
|
|
|
1120
|
-
if (isShow(
|
|
1145
|
+
if (isShow(e) && !this.readonly && !this.disabled) {
|
|
1121
1146
|
this._preventTokenizerToggle = true;
|
|
1122
|
-
this._handleShow(
|
|
1147
|
+
this._handleShow(e);
|
|
1123
1148
|
}
|
|
1124
1149
|
}
|
|
1125
1150
|
|
|
1126
|
-
_filterItems(str) {
|
|
1151
|
+
_filterItems(str: string) {
|
|
1127
1152
|
const itemsToFilter = this.items.filter(item => !item.isGroupItem);
|
|
1128
1153
|
const filteredItems = (Filters[this.filter] || Filters.StartsWithPerTerm)(str, itemsToFilter, "text");
|
|
1129
1154
|
|
|
@@ -1136,7 +1161,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1136
1161
|
*
|
|
1137
1162
|
* @private
|
|
1138
1163
|
*/
|
|
1139
|
-
static _groupItemFilter(item, idx, allItems
|
|
1164
|
+
static _groupItemFilter(item: IMultiComboBoxItem, idx: number, allItems: Array<IMultiComboBoxItem>, filteredItems: Array<IMultiComboBoxItem>) {
|
|
1140
1165
|
if (item.isGroupItem) {
|
|
1141
1166
|
let groupHasFilteredItems;
|
|
1142
1167
|
|
|
@@ -1155,9 +1180,9 @@ class MultiComboBox extends UI5Element {
|
|
|
1155
1180
|
if (!isPhone() && !this._isOpenedByKeyboard) {
|
|
1156
1181
|
this._innerInput.focus();
|
|
1157
1182
|
} else if (this._isOpenedByKeyboard) {
|
|
1158
|
-
this._itemToFocus
|
|
1183
|
+
this._itemToFocus?.focus();
|
|
1159
1184
|
} else {
|
|
1160
|
-
this.allItemsPopover
|
|
1185
|
+
this.allItemsPopover?.focus();
|
|
1161
1186
|
}
|
|
1162
1187
|
|
|
1163
1188
|
this._isOpenedByKeyboard = false;
|
|
@@ -1168,23 +1193,26 @@ class MultiComboBox extends UI5Element {
|
|
|
1168
1193
|
this.fireEvent("open-change");
|
|
1169
1194
|
}
|
|
1170
1195
|
|
|
1171
|
-
_getSelectedItems() {
|
|
1196
|
+
_getSelectedItems(): Array<MultiComboBoxItem> {
|
|
1172
1197
|
// Angular 2 way data binding
|
|
1173
1198
|
this.selectedValues = this.items.filter(item => item.selected);
|
|
1174
|
-
return this.selectedValues
|
|
1199
|
+
return this.selectedValues as Array<MultiComboBoxItem>;
|
|
1175
1200
|
}
|
|
1176
1201
|
|
|
1177
|
-
_listSelectionChange(
|
|
1202
|
+
_listSelectionChange(e: CustomEvent<SelectionChangeEventDetail>) {
|
|
1178
1203
|
// sync list items and cb items
|
|
1179
|
-
this.syncItems(
|
|
1204
|
+
this.syncItems((e.target as List).items);
|
|
1180
1205
|
|
|
1181
1206
|
// don't call selection change right after selection as user can cancel it on phone
|
|
1182
1207
|
if (!isPhone()) {
|
|
1183
1208
|
this.fireSelectionChange();
|
|
1184
1209
|
}
|
|
1185
1210
|
|
|
1186
|
-
|
|
1187
|
-
|
|
1211
|
+
// casted to KeyboardEvent since isSpace and isSpaceCtrl accepts KeyboardEvent only
|
|
1212
|
+
const castedEvent = { key: e.detail.key } as KeyboardEvent;
|
|
1213
|
+
|
|
1214
|
+
if (!e.detail.selectionComponentPressed && !isSpace(castedEvent) && !isSpaceCtrl(castedEvent)) {
|
|
1215
|
+
this.allItemsPopover?.close();
|
|
1188
1216
|
this.value = "";
|
|
1189
1217
|
|
|
1190
1218
|
// if the item (not checkbox) is clicked, call the selection change
|
|
@@ -1198,7 +1226,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1198
1226
|
this.value = this.valueBeforeAutoComplete || "";
|
|
1199
1227
|
}
|
|
1200
1228
|
|
|
1201
|
-
syncItems(listItems) {
|
|
1229
|
+
syncItems(listItems: Array<ListItemBase>) {
|
|
1202
1230
|
listItems.forEach(item => {
|
|
1203
1231
|
this.items.forEach(mcbItem => {
|
|
1204
1232
|
if (mcbItem._id === item.getAttribute("data-ui5-token-id")) {
|
|
@@ -1209,24 +1237,25 @@ class MultiComboBox extends UI5Element {
|
|
|
1209
1237
|
}
|
|
1210
1238
|
|
|
1211
1239
|
fireSelectionChange() {
|
|
1212
|
-
this.fireEvent("selection-change", { items: this._getSelectedItems() });
|
|
1240
|
+
this.fireEvent<MultiComboBoxSelectionChangeEventDetail>("selection-change", { items: this._getSelectedItems() });
|
|
1213
1241
|
// Angular 2 way data binding
|
|
1214
1242
|
this.fireEvent("value-changed");
|
|
1215
1243
|
}
|
|
1216
1244
|
|
|
1217
1245
|
async _getRespPopover() {
|
|
1218
1246
|
const staticAreaItem = await this.getStaticAreaItemDomRef();
|
|
1219
|
-
this.allItemsPopover = staticAreaItem
|
|
1247
|
+
this.allItemsPopover = staticAreaItem!.querySelector(`.ui5-multi-combobox-all-items-responsive-popover`)!;
|
|
1220
1248
|
}
|
|
1221
1249
|
|
|
1222
|
-
async _getList() {
|
|
1250
|
+
async _getList(): Promise<List> {
|
|
1223
1251
|
const staticAreaItem = await this.getStaticAreaItemDomRef();
|
|
1224
|
-
this.list = staticAreaItem
|
|
1252
|
+
this.list = staticAreaItem!.querySelector(".ui5-multi-combobox-all-items-list")!;
|
|
1253
|
+
return this.list;
|
|
1225
1254
|
}
|
|
1226
1255
|
|
|
1227
|
-
_click(
|
|
1256
|
+
_click() {
|
|
1228
1257
|
if (isPhone() && !this.readonly && !this._showMorePressed && !this._deleting) {
|
|
1229
|
-
this.allItemsPopover
|
|
1258
|
+
this.allItemsPopover?.showAt(this);
|
|
1230
1259
|
}
|
|
1231
1260
|
|
|
1232
1261
|
this._showMorePressed = false;
|
|
@@ -1261,7 +1290,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1261
1290
|
}
|
|
1262
1291
|
}
|
|
1263
1292
|
|
|
1264
|
-
_handleTypeAhead(item, filterValue) {
|
|
1293
|
+
_handleTypeAhead(item: IMultiComboBoxItem, filterValue: string) {
|
|
1265
1294
|
if (!item) {
|
|
1266
1295
|
return;
|
|
1267
1296
|
}
|
|
@@ -1278,7 +1307,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1278
1307
|
this._shouldAutocomplete = false;
|
|
1279
1308
|
}
|
|
1280
1309
|
|
|
1281
|
-
_getFirstMatchingItem(current) {
|
|
1310
|
+
_getFirstMatchingItem(current: string) {
|
|
1282
1311
|
if (!this.items.length) {
|
|
1283
1312
|
return;
|
|
1284
1313
|
}
|
|
@@ -1290,13 +1319,13 @@ class MultiComboBox extends UI5Element {
|
|
|
1290
1319
|
}
|
|
1291
1320
|
}
|
|
1292
1321
|
|
|
1293
|
-
_startsWithMatchingItems(str) {
|
|
1322
|
+
_startsWithMatchingItems(str: string) {
|
|
1294
1323
|
return Filters.StartsWith(str, this.items, "text");
|
|
1295
1324
|
}
|
|
1296
1325
|
|
|
1297
1326
|
onBeforeRendering() {
|
|
1298
1327
|
const input = this._innerInput;
|
|
1299
|
-
const autoCompletedChars = input && input.selectionEnd - input.selectionStart;
|
|
1328
|
+
const autoCompletedChars = input && (input.selectionEnd || 0) - (input.selectionStart || 0);
|
|
1300
1329
|
const value = input && input.value;
|
|
1301
1330
|
|
|
1302
1331
|
this.FormSupport = getFeature("FormSupport");
|
|
@@ -1308,11 +1337,11 @@ class MultiComboBox extends UI5Element {
|
|
|
1308
1337
|
}
|
|
1309
1338
|
|
|
1310
1339
|
this.items.forEach(item => {
|
|
1311
|
-
item._getRealDomRef = () => this.allItemsPopover
|
|
1340
|
+
item._getRealDomRef = () => this.allItemsPopover!.querySelector(`*[data-ui5-stable=${item.stableDomRef}]`)!;
|
|
1312
1341
|
});
|
|
1313
1342
|
|
|
1314
|
-
this.tokenizerAvailable = this.
|
|
1315
|
-
this.style.setProperty("--_ui5-input-icons-count", this.iconsCount);
|
|
1343
|
+
this.tokenizerAvailable = this._getSelectedItems().length > 0;
|
|
1344
|
+
this.style.setProperty("--_ui5-input-icons-count", `${this.iconsCount}`);
|
|
1316
1345
|
|
|
1317
1346
|
if (!input || !value) {
|
|
1318
1347
|
return;
|
|
@@ -1325,7 +1354,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1325
1354
|
|
|
1326
1355
|
// Keep the original typed in text intact
|
|
1327
1356
|
this.valueBeforeAutoComplete = value;
|
|
1328
|
-
this._handleTypeAhead(item, value);
|
|
1357
|
+
item && this._handleTypeAhead(item, value);
|
|
1329
1358
|
}
|
|
1330
1359
|
|
|
1331
1360
|
if (this._shouldFilterItems) {
|
|
@@ -1357,11 +1386,11 @@ class MultiComboBox extends UI5Element {
|
|
|
1357
1386
|
|
|
1358
1387
|
storeResponsivePopoverWidth() {
|
|
1359
1388
|
if (this.open && !this._listWidth) {
|
|
1360
|
-
this._listWidth = this.list
|
|
1389
|
+
this._listWidth = this.list!.offsetWidth;
|
|
1361
1390
|
}
|
|
1362
1391
|
}
|
|
1363
1392
|
|
|
1364
|
-
toggle(isToggled) {
|
|
1393
|
+
toggle(isToggled: boolean) {
|
|
1365
1394
|
if (isToggled && !this.open) {
|
|
1366
1395
|
this.openPopover();
|
|
1367
1396
|
} else {
|
|
@@ -1388,11 +1417,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1388
1417
|
}
|
|
1389
1418
|
|
|
1390
1419
|
async openPopover() {
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
if (popover) {
|
|
1394
|
-
popover.showAt(this);
|
|
1395
|
-
}
|
|
1420
|
+
(await this._getPopover())?.showAt(this);
|
|
1396
1421
|
}
|
|
1397
1422
|
|
|
1398
1423
|
_forwardFocusToInner() {
|
|
@@ -1400,31 +1425,29 @@ class MultiComboBox extends UI5Element {
|
|
|
1400
1425
|
}
|
|
1401
1426
|
|
|
1402
1427
|
async closePopover() {
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
popover && popover.close();
|
|
1428
|
+
(await this._getPopover())?.close();
|
|
1406
1429
|
}
|
|
1407
1430
|
|
|
1408
1431
|
async _getPopover() {
|
|
1409
1432
|
const staticAreaItem = await this.getStaticAreaItemDomRef();
|
|
1410
|
-
return staticAreaItem
|
|
1433
|
+
return (staticAreaItem!.querySelector<Popover>("[ui5-popover]"))!;
|
|
1411
1434
|
}
|
|
1412
1435
|
|
|
1413
1436
|
async _getResponsivePopover() {
|
|
1414
1437
|
const staticAreaItem = await this.getStaticAreaItemDomRef();
|
|
1415
|
-
return staticAreaItem
|
|
1438
|
+
return staticAreaItem!.querySelector<ResponsivePopover>("[ui5-responsive-popover]")!;
|
|
1416
1439
|
}
|
|
1417
1440
|
|
|
1418
1441
|
async _setValueStateHeader() {
|
|
1419
1442
|
const responsivePopover = await this._getResponsivePopover();
|
|
1420
|
-
this.valueStateHeader = responsivePopover.querySelector("div.ui5-responsive-popover-header.ui5-valuestatemessage-root")
|
|
1443
|
+
this.valueStateHeader = responsivePopover.querySelector("div.ui5-responsive-popover-header.ui5-valuestatemessage-root")!;
|
|
1421
1444
|
}
|
|
1422
1445
|
|
|
1423
1446
|
get _tokenizer() {
|
|
1424
|
-
return this.shadowRoot
|
|
1447
|
+
return this.shadowRoot!.querySelector<Tokenizer>("[ui5-tokenizer]")!;
|
|
1425
1448
|
}
|
|
1426
1449
|
|
|
1427
|
-
inputFocusIn(
|
|
1450
|
+
inputFocusIn(e: FocusEvent) {
|
|
1428
1451
|
if (!isPhone() || this.readonly) {
|
|
1429
1452
|
this.focused = true;
|
|
1430
1453
|
this._tokenizer.expanded = true;
|
|
@@ -1432,7 +1455,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1432
1455
|
this._innerInput.blur();
|
|
1433
1456
|
}
|
|
1434
1457
|
|
|
1435
|
-
if (!isPhone() && ((
|
|
1458
|
+
if (!isPhone() && (((e.relatedTarget as HTMLElement)?.tagName !== "UI5-STATIC-AREA-ITEM") || !e.relatedTarget)) {
|
|
1436
1459
|
this._innerInput.setSelectionRange(0, this.value.length);
|
|
1437
1460
|
}
|
|
1438
1461
|
|
|
@@ -1440,12 +1463,12 @@ class MultiComboBox extends UI5Element {
|
|
|
1440
1463
|
this.valueBeforeAutoComplete = "";
|
|
1441
1464
|
}
|
|
1442
1465
|
|
|
1443
|
-
inputFocusOut(
|
|
1444
|
-
if (!this.shadowRoot
|
|
1466
|
+
inputFocusOut(e: FocusEvent) {
|
|
1467
|
+
if (!this.shadowRoot!.contains(e.relatedTarget as Node) && !this._deleting) {
|
|
1445
1468
|
this.focused = false;
|
|
1446
1469
|
this._tokenizer.expanded = this.open;
|
|
1447
1470
|
// remove the value if user focus out the input and focus is not going in the popover
|
|
1448
|
-
if (!isPhone() && !this.allowCustomValues && (this.staticAreaItem !==
|
|
1471
|
+
if (!isPhone() && !this.allowCustomValues && (this.staticAreaItem !== e.relatedTarget)) {
|
|
1449
1472
|
this.value = "";
|
|
1450
1473
|
}
|
|
1451
1474
|
}
|
|
@@ -1480,25 +1503,33 @@ class MultiComboBox extends UI5Element {
|
|
|
1480
1503
|
return;
|
|
1481
1504
|
}
|
|
1482
1505
|
|
|
1506
|
+
let text = "";
|
|
1507
|
+
|
|
1508
|
+
if (this.valueState !== ValueState.None) {
|
|
1509
|
+
text = this.valueStateTypeMappings[this.valueState];
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1483
1512
|
if (this.shouldDisplayDefaultValueStateMessage) {
|
|
1484
|
-
return `${
|
|
1513
|
+
return `${text} ${this.valueStateDefaultText || ""}`;
|
|
1485
1514
|
}
|
|
1486
1515
|
|
|
1487
|
-
return `${
|
|
1516
|
+
return `${text}`.concat(" ", this.valueStateMessageText.map(el => el.textContent).join(" "));
|
|
1488
1517
|
}
|
|
1489
1518
|
|
|
1490
|
-
get valueStateDefaultText() {
|
|
1491
|
-
|
|
1519
|
+
get valueStateDefaultText(): string {
|
|
1520
|
+
if (this.valueState === ValueState.None) {
|
|
1521
|
+
return "";
|
|
1522
|
+
}
|
|
1492
1523
|
|
|
1493
1524
|
if (this._performingSelectionTwice) {
|
|
1494
|
-
|
|
1525
|
+
return MultiComboBox.i18nBundle.getText(VALUE_STATE_ERROR_ALREADY_SELECTED);
|
|
1495
1526
|
}
|
|
1496
1527
|
|
|
1497
|
-
return this.valueStateTextMappings[
|
|
1528
|
+
return this.valueStateTextMappings[this.valueState];
|
|
1498
1529
|
}
|
|
1499
1530
|
|
|
1500
1531
|
get valueStateTextId() {
|
|
1501
|
-
return this.hasValueState ?
|
|
1532
|
+
return this.hasValueState ? `ui5-multi-combobox-valueStateDesc` : undefined;
|
|
1502
1533
|
}
|
|
1503
1534
|
|
|
1504
1535
|
get valueStateMessageText() {
|
|
@@ -1513,14 +1544,16 @@ class MultiComboBox extends UI5Element {
|
|
|
1513
1544
|
* This method is relevant for sap_horizon theme only
|
|
1514
1545
|
*/
|
|
1515
1546
|
get _valueStateMessageIcon() {
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
Success: "sys-enter-2",
|
|
1520
|
-
Information: "information",
|
|
1521
|
-
};
|
|
1547
|
+
if (this.valueState === ValueState.None) {
|
|
1548
|
+
return "";
|
|
1549
|
+
}
|
|
1522
1550
|
|
|
1523
|
-
return
|
|
1551
|
+
return {
|
|
1552
|
+
[ValueState.Error]: "error",
|
|
1553
|
+
[ValueState.Warning]: "alert",
|
|
1554
|
+
[ValueState.Success]: "sys-enter-2",
|
|
1555
|
+
[ValueState.Information]: "information",
|
|
1556
|
+
}[this.valueState];
|
|
1524
1557
|
}
|
|
1525
1558
|
|
|
1526
1559
|
get _tokensCountText() {
|
|
@@ -1531,7 +1564,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1531
1564
|
}
|
|
1532
1565
|
|
|
1533
1566
|
get _tokensCountTextId() {
|
|
1534
|
-
return
|
|
1567
|
+
return "ui5-multi-combobox-hiddenText-nMore";
|
|
1535
1568
|
}
|
|
1536
1569
|
|
|
1537
1570
|
get _selectedTokensCount() {
|
|
@@ -1550,33 +1583,32 @@ class MultiComboBox extends UI5Element {
|
|
|
1550
1583
|
return this.focused && !this.readonly && this.hasValueStateMessage && !this._iconPressed;
|
|
1551
1584
|
}
|
|
1552
1585
|
|
|
1553
|
-
get
|
|
1586
|
+
get valueStateTypeMappings(): ValueStateTypeAnnouncement {
|
|
1554
1587
|
return {
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
"Information": MultiComboBox.i18nBundle.getText(VALUE_STATE_INFORMATION),
|
|
1588
|
+
[ValueState.Success]: MultiComboBox.i18nBundle.getText(VALUE_STATE_TYPE_SUCCESS),
|
|
1589
|
+
[ValueState.Information]: MultiComboBox.i18nBundle.getText(VALUE_STATE_TYPE_INFORMATION),
|
|
1590
|
+
[ValueState.Error]: MultiComboBox.i18nBundle.getText(VALUE_STATE_TYPE_ERROR),
|
|
1591
|
+
[ValueState.Warning]: MultiComboBox.i18nBundle.getText(VALUE_STATE_TYPE_WARNING),
|
|
1560
1592
|
};
|
|
1561
1593
|
}
|
|
1562
1594
|
|
|
1563
|
-
get
|
|
1595
|
+
get valueStateTextMappings(): ValueStateAnnouncement {
|
|
1564
1596
|
return {
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1597
|
+
[ValueState.Success]: MultiComboBox.i18nBundle.getText(VALUE_STATE_SUCCESS),
|
|
1598
|
+
[ValueState.Error]: MultiComboBox.i18nBundle.getText(VALUE_STATE_ERROR),
|
|
1599
|
+
[ValueState.Warning]: MultiComboBox.i18nBundle.getText(VALUE_STATE_WARNING),
|
|
1600
|
+
[ValueState.Information]: MultiComboBox.i18nBundle.getText(VALUE_STATE_INFORMATION),
|
|
1569
1601
|
};
|
|
1570
1602
|
}
|
|
1571
1603
|
|
|
1572
|
-
get _innerInput() {
|
|
1604
|
+
get _innerInput(): HTMLInputElement {
|
|
1573
1605
|
if (isPhone()) {
|
|
1574
|
-
if (this.allItemsPopover
|
|
1575
|
-
return this.allItemsPopover.querySelector("input")
|
|
1606
|
+
if (this.allItemsPopover?.opened) {
|
|
1607
|
+
return this.allItemsPopover.querySelector("input")!;
|
|
1576
1608
|
}
|
|
1577
1609
|
}
|
|
1578
1610
|
|
|
1579
|
-
return this.
|
|
1611
|
+
return this._inputDom;
|
|
1580
1612
|
}
|
|
1581
1613
|
|
|
1582
1614
|
get _headerTitleText() {
|
|
@@ -1600,7 +1632,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1600
1632
|
return this._tokenizer.expanded;
|
|
1601
1633
|
}
|
|
1602
1634
|
|
|
1603
|
-
const isCurrentlyExpanded =
|
|
1635
|
+
const isCurrentlyExpanded = this._tokenizer?.expanded;
|
|
1604
1636
|
const shouldBeExpanded = this.focused || this.open || isCurrentlyExpanded;
|
|
1605
1637
|
|
|
1606
1638
|
return shouldBeExpanded;
|
|
@@ -1611,17 +1643,17 @@ class MultiComboBox extends UI5Element {
|
|
|
1611
1643
|
}
|
|
1612
1644
|
|
|
1613
1645
|
get iconsCount() {
|
|
1614
|
-
const slottedIconsCount = this.icon
|
|
1646
|
+
const slottedIconsCount = this.icon?.length || 0;
|
|
1615
1647
|
const arrowDownIconsCount = this.readonly ? 0 : 1;
|
|
1616
1648
|
return slottedIconsCount + arrowDownIconsCount;
|
|
1617
1649
|
}
|
|
1618
1650
|
|
|
1619
|
-
get classes() {
|
|
1651
|
+
get classes(): ClassMap {
|
|
1620
1652
|
return {
|
|
1621
1653
|
popover: {
|
|
1622
1654
|
"ui5-multi-combobox-all-items-responsive-popover": true,
|
|
1623
|
-
"ui5-suggestions-popover":
|
|
1624
|
-
"ui5-suggestions-popover-with-value-state-header":
|
|
1655
|
+
"ui5-suggestions-popover": true,
|
|
1656
|
+
"ui5-suggestions-popover-with-value-state-header": this.hasValueStateMessage,
|
|
1625
1657
|
},
|
|
1626
1658
|
popoverValueState: {
|
|
1627
1659
|
"ui5-valuestatemessage-root": true,
|
|
@@ -1638,7 +1670,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1638
1670
|
const remSizeIxPx = parseInt(getComputedStyle(document.documentElement).fontSize);
|
|
1639
1671
|
return {
|
|
1640
1672
|
popoverValueStateMessage: {
|
|
1641
|
-
"width": `${this._listWidth}px`,
|
|
1673
|
+
"width": `${this._listWidth || 0}px`,
|
|
1642
1674
|
"display": this._listWidth === 0 ? "none" : "inline-block",
|
|
1643
1675
|
},
|
|
1644
1676
|
popoverHeader: {
|
|
@@ -1659,3 +1691,8 @@ class MultiComboBox extends UI5Element {
|
|
|
1659
1691
|
MultiComboBox.define();
|
|
1660
1692
|
|
|
1661
1693
|
export default MultiComboBox;
|
|
1694
|
+
|
|
1695
|
+
export type {
|
|
1696
|
+
IMultiComboBoxItem,
|
|
1697
|
+
MultiComboBoxSelectionChangeEventDetail,
|
|
1698
|
+
};
|