@ui5/webcomponents 0.0.0-db2be6526 → 0.0.0-dc3ccac50
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/csp.js +7 -0
- package/dist/CheckBox.js +4 -0
- package/dist/ColorPalettePopover.js +0 -1
- package/dist/ColorPicker.js +1 -1
- package/dist/ComboBox.js +31 -1
- package/dist/DateTimePicker.js +2 -1
- package/dist/DayPicker.js +5 -0
- package/dist/FileUploader.js +14 -0
- package/dist/Icon.js +1 -0
- package/dist/Input.js +68 -18
- package/dist/List.js +2 -2
- package/dist/MultiComboBox.js +32 -7
- package/dist/MultiComboBoxItem.js +4 -10
- package/dist/Option.js +4 -10
- package/dist/Popup.js +2 -7
- package/dist/RangeSlider.js +1 -1
- package/dist/Select.js +27 -8
- package/dist/SliderBase.js +2 -1
- package/dist/Switch.js +4 -0
- package/dist/Tab.js +26 -12
- package/dist/TabContainer.js +5 -8
- package/dist/Table.js +2 -1
- package/dist/TableRow.js +1 -1
- package/dist/TextArea.js +14 -0
- package/dist/Token.js +21 -1
- package/dist/Tokenizer.js +4 -1
- package/dist/WheelSlider.js +9 -9
- package/dist/api.json +14 -28
- package/dist/features/InputSuggestions.js +100 -15
- 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_exp/parameters-bundle.css.json +1 -1
- package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js +3 -3
- package/dist/generated/templates/ComboBoxTemplate.lit.js +4 -3
- package/dist/generated/templates/CustomListItemTemplate.lit.js +1 -1
- package/dist/generated/templates/FileUploaderPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/GroupHeaderListItemTemplate.lit.js +1 -1
- package/dist/generated/templates/InputPopoverTemplate.lit.js +3 -3
- package/dist/generated/templates/InputTemplate.lit.js +6 -5
- package/dist/generated/templates/ListItemTemplate.lit.js +1 -1
- package/dist/generated/templates/ListTemplate.lit.js +1 -1
- package/dist/generated/templates/MultiComboBoxPopoverTemplate.lit.js +4 -4
- package/dist/generated/templates/MultiComboBoxTemplate.lit.js +4 -3
- package/dist/generated/templates/MultiInputTemplate.lit.js +7 -6
- package/dist/generated/templates/SelectPopoverTemplate.lit.js +3 -3
- package/dist/generated/templates/SliderTemplate.lit.js +1 -1
- package/dist/generated/templates/StandardListItemTemplate.lit.js +1 -1
- package/dist/generated/templates/SuggestionListItemTemplate.lit.js +1 -1
- package/dist/generated/templates/SwitchTemplate.lit.js +3 -1
- package/dist/generated/templates/TabContainerPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/TabContainerTemplate.lit.js +1 -1
- package/dist/generated/templates/TabInStripTemplate.lit.js +2 -4
- package/dist/generated/templates/TextAreaPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/TokenTemplate.lit.js +1 -1
- package/dist/generated/templates/TreeListItemTemplate.lit.js +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/AvatarGroup.css.js +1 -1
- package/dist/generated/themes/Badge.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/BreadcrumbsPopover.css.js +1 -1
- package/dist/generated/themes/BrowserScrollbar.css.js +1 -1
- package/dist/generated/themes/BusyIndicator.css.js +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.ie11.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/dist/generated/themes/Card.css.js +1 -1
- package/dist/generated/themes/CardHeader.css.js +1 -1
- package/dist/generated/themes/Carousel.css.js +1 -1
- package/dist/generated/themes/CheckBox.css.js +1 -1
- package/dist/generated/themes/ColorPalette.css.js +1 -1
- package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
- package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
- package/dist/generated/themes/ColorPaletteStaticArea.css.js +1 -1
- package/dist/generated/themes/ColorPicker.css.js +1 -1
- package/dist/generated/themes/ComboBox.css.js +1 -1
- package/dist/generated/themes/ComboBoxPopover.css.js +1 -1
- package/dist/generated/themes/CustomListItem.css.js +1 -1
- package/dist/generated/themes/DatePicker.css.js +1 -1
- package/dist/generated/themes/DatePickerPopover.css.js +1 -1
- package/dist/generated/themes/DateRangePicker.css.js +1 -1
- package/dist/generated/themes/DateTimePicker.css.js +1 -1
- package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
- package/dist/generated/themes/DayPicker.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/FileUploader.css.js +1 -1
- package/dist/generated/themes/GroupHeaderListItem.css.js +1 -1
- package/dist/generated/themes/GrowingButton.css.js +1 -1
- package/dist/generated/themes/Icon.css.js +1 -1
- package/dist/generated/themes/Input.css.js +1 -1
- package/dist/generated/themes/InputIcon.css.js +1 -1
- package/dist/generated/themes/InvisibleTextStyles.css.js +1 -1
- package/dist/generated/themes/Label.css.js +1 -1
- package/dist/generated/themes/Link.css.js +1 -1
- package/dist/generated/themes/List.css.js +1 -1
- package/dist/generated/themes/ListItem.css.js +1 -1
- package/dist/generated/themes/ListItemBase.css.js +1 -1
- package/dist/generated/themes/MessageStrip.css.js +1 -1
- package/dist/generated/themes/MonthPicker.css.js +1 -1
- package/dist/generated/themes/MultiComboBox.css.js +1 -1
- package/dist/generated/themes/MultiInput.css.js +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Popover.css.js +1 -1
- package/dist/generated/themes/Popup.css.js +1 -1
- package/dist/generated/themes/PopupGlobal.css.js +8 -0
- package/dist/generated/themes/PopupStaticAreaStyles.css.js +1 -1
- package/dist/generated/themes/PopupsCommon.css.js +1 -1
- package/dist/generated/themes/ProgressIndicator.css.js +1 -1
- package/dist/generated/themes/RadioButton.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/ResponsivePopover.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/SegmentedButton.css.js +1 -1
- package/dist/generated/themes/Select.css.js +1 -1
- package/dist/generated/themes/SelectPopover.css.js +1 -1
- package/dist/generated/themes/SliderBase.css.js +1 -1
- package/dist/generated/themes/StepInput.css.js +1 -1
- package/dist/generated/themes/Suggestions.css.js +8 -0
- package/dist/generated/themes/Switch.css.js +1 -1
- package/dist/generated/themes/Tab.css.js +1 -1
- package/dist/generated/themes/TabContainer.css.js +1 -1
- package/dist/generated/themes/TabInOverflow.css.js +1 -1
- package/dist/generated/themes/TabInStrip.css.js +1 -1
- package/dist/generated/themes/Table.css.js +1 -1
- package/dist/generated/themes/TableCell.css.js +1 -1
- package/dist/generated/themes/TableColumn.css.js +1 -1
- package/dist/generated/themes/TableGroupRow.css.js +1 -1
- package/dist/generated/themes/TableRow.css.js +1 -1
- package/dist/generated/themes/TapHighlightColor.css.js +1 -1
- package/dist/generated/themes/TextArea.css.js +1 -1
- package/dist/generated/themes/TimePicker.css.js +1 -1
- package/dist/generated/themes/TimePickerPopover.css.js +1 -1
- package/dist/generated/themes/TimeSelection.css.js +1 -1
- package/dist/generated/themes/Title.css.js +1 -1
- package/dist/generated/themes/Toast.css.js +1 -1
- package/dist/generated/themes/ToggleButton.css.js +1 -1
- package/dist/generated/themes/ToggleButton.ie11.css.js +1 -1
- package/dist/generated/themes/Token.css.js +1 -1
- package/dist/generated/themes/Tokenizer.css.js +1 -1
- package/dist/generated/themes/Tree.css.js +1 -1
- package/dist/generated/themes/TreeListItem.css.js +1 -1
- package/dist/generated/themes/ValueStateMessage.css.js +1 -1
- package/dist/generated/themes/WheelSlider.css.js +1 -1
- package/dist/generated/themes/YearPicker.css.js +1 -1
- package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
- package/package.json +8 -8
- package/src/CheckBox.js +4 -0
- package/src/ColorPalettePopover.js +0 -1
- package/src/ColorPicker.js +1 -1
- package/src/ComboBox.hbs +4 -0
- package/src/ComboBox.js +31 -1
- package/src/ComboBoxPopover.hbs +3 -0
- package/src/DateTimePicker.js +2 -1
- package/src/DayPicker.js +5 -0
- package/src/FileUploader.js +14 -0
- package/src/FileUploaderPopover.hbs +1 -0
- package/src/GroupHeaderListItem.hbs +1 -0
- package/src/Icon.js +1 -0
- package/src/Input.hbs +4 -0
- package/src/Input.js +68 -18
- package/src/InputPopover.hbs +4 -1
- package/src/List.hbs +1 -1
- package/src/List.js +2 -2
- package/src/ListItem.hbs +1 -0
- package/src/MultiComboBox.hbs +4 -0
- package/src/MultiComboBox.js +32 -7
- package/src/MultiComboBoxItem.js +4 -10
- package/src/MultiComboBoxPopover.hbs +4 -1
- package/src/Option.js +4 -10
- package/src/Popup.js +2 -7
- package/src/RangeSlider.js +1 -1
- package/src/Select.js +27 -8
- package/src/SelectPopover.hbs +4 -1
- package/src/Slider.hbs +1 -1
- package/src/SliderBase.js +2 -1
- package/src/Switch.hbs +12 -2
- package/src/Switch.js +4 -0
- package/src/Tab.js +26 -12
- package/src/TabContainer.hbs +6 -1
- package/src/TabContainer.js +5 -8
- package/src/TabContainerPopover.hbs +1 -0
- package/src/TabInStrip.hbs +1 -5
- package/src/Table.js +2 -1
- package/src/TableRow.js +1 -1
- package/src/TextArea.js +14 -0
- package/src/TextAreaPopover.hbs +1 -0
- package/src/Token.hbs +2 -0
- package/src/Token.js +21 -1
- package/src/Tokenizer.js +4 -1
- package/src/WheelSlider.js +9 -9
- package/src/features/InputSuggestions.js +100 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-dc3ccac50",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.main",
|
|
5
5
|
"ui5": {
|
|
6
6
|
"webComponentsPackage": true
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"directory": "packages/main"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@ui5/webcomponents-base": "0.0.0-
|
|
44
|
-
"@ui5/webcomponents-icons": "0.0.0-
|
|
45
|
-
"@ui5/webcomponents-ie11": "0.0.0-
|
|
46
|
-
"@ui5/webcomponents-localization": "0.0.0-
|
|
47
|
-
"@ui5/webcomponents-theming": "0.0.0-
|
|
43
|
+
"@ui5/webcomponents-base": "0.0.0-dc3ccac50",
|
|
44
|
+
"@ui5/webcomponents-icons": "0.0.0-dc3ccac50",
|
|
45
|
+
"@ui5/webcomponents-ie11": "0.0.0-dc3ccac50",
|
|
46
|
+
"@ui5/webcomponents-localization": "0.0.0-dc3ccac50",
|
|
47
|
+
"@ui5/webcomponents-theming": "0.0.0-dc3ccac50"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@ui5/webcomponents-tools": "0.0.0-
|
|
51
|
-
"chromedriver": "
|
|
50
|
+
"@ui5/webcomponents-tools": "0.0.0-dc3ccac50",
|
|
51
|
+
"chromedriver": "95.0.0"
|
|
52
52
|
}
|
|
53
53
|
}
|
package/src/CheckBox.js
CHANGED
package/src/ColorPicker.js
CHANGED
|
@@ -30,7 +30,7 @@ const metadata = {
|
|
|
30
30
|
* Defines the currently selected color of the component.
|
|
31
31
|
* <br><br>
|
|
32
32
|
* <b>Note</b>: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.
|
|
33
|
-
* @type {
|
|
33
|
+
* @type {CSSColor}
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
36
|
color: {
|
package/src/ComboBox.hbs
CHANGED
package/src/ComboBox.js
CHANGED
|
@@ -7,6 +7,7 @@ import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/Ari
|
|
|
7
7
|
import announce from "@ui5/webcomponents-base/dist/util/InvisibleMessage.js";
|
|
8
8
|
import "@ui5/webcomponents-icons/dist/slim-arrow-down.js";
|
|
9
9
|
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
10
|
+
import "@ui5/webcomponents-icons/dist/not-editable.js";
|
|
10
11
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
11
12
|
import {
|
|
12
13
|
isBackSpace,
|
|
@@ -16,6 +17,8 @@ import {
|
|
|
16
17
|
isDown,
|
|
17
18
|
isEnter,
|
|
18
19
|
isEscape,
|
|
20
|
+
isTabNext,
|
|
21
|
+
isTabPrevious,
|
|
19
22
|
} from "@ui5/webcomponents-base/dist/Keys.js";
|
|
20
23
|
import * as Filters from "./ComboBoxFilters.js";
|
|
21
24
|
|
|
@@ -39,6 +42,7 @@ import ComboBoxCss from "./generated/themes/ComboBox.css.js";
|
|
|
39
42
|
import ComboBoxPopoverCss from "./generated/themes/ComboBoxPopover.css.js";
|
|
40
43
|
import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js";
|
|
41
44
|
import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js";
|
|
45
|
+
import SuggestionsCss from "./generated/themes/Suggestions.css.js";
|
|
42
46
|
|
|
43
47
|
import ComboBoxItem from "./ComboBoxItem.js";
|
|
44
48
|
import Icon from "./Icon.js";
|
|
@@ -367,7 +371,7 @@ class ComboBox extends UI5Element {
|
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
static get staticAreaStyles() {
|
|
370
|
-
return [ResponsivePopoverCommonCss, ValueStateMessageCss, ComboBoxPopoverCss];
|
|
374
|
+
return [ResponsivePopoverCommonCss, ValueStateMessageCss, ComboBoxPopoverCss, SuggestionsCss];
|
|
371
375
|
}
|
|
372
376
|
|
|
373
377
|
static get template() {
|
|
@@ -524,6 +528,10 @@ class ComboBox extends UI5Element {
|
|
|
524
528
|
this._toggleRespPopover();
|
|
525
529
|
}
|
|
526
530
|
|
|
531
|
+
_readonlyIconClick() {
|
|
532
|
+
this.inner.focus();
|
|
533
|
+
}
|
|
534
|
+
|
|
527
535
|
_input(event) {
|
|
528
536
|
const { value } = event.target;
|
|
529
537
|
|
|
@@ -719,6 +727,10 @@ class ComboBox extends UI5Element {
|
|
|
719
727
|
this._isValueStateFocused = false;
|
|
720
728
|
}
|
|
721
729
|
|
|
730
|
+
if ((isTabNext(event) || isTabPrevious(event)) && this.open) {
|
|
731
|
+
this._closeRespPopover();
|
|
732
|
+
}
|
|
733
|
+
|
|
722
734
|
if (isShow(event) && !this.readonly && !this.disabled) {
|
|
723
735
|
event.preventDefault();
|
|
724
736
|
|
|
@@ -946,6 +958,20 @@ class ComboBox extends UI5Element {
|
|
|
946
958
|
return !this.valueStateMessage.length && this.hasValueStateText;
|
|
947
959
|
}
|
|
948
960
|
|
|
961
|
+
/**
|
|
962
|
+
* This method is relevant for sap_horizon theme only
|
|
963
|
+
*/
|
|
964
|
+
get _valueStateMessageIcon() {
|
|
965
|
+
const iconPerValueState = {
|
|
966
|
+
Error: "error",
|
|
967
|
+
Warning: "alert",
|
|
968
|
+
Success: "sys-enter-2",
|
|
969
|
+
Information: "information",
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : "";
|
|
973
|
+
}
|
|
974
|
+
|
|
949
975
|
get open() {
|
|
950
976
|
return this.responsivePopover ? this.responsivePopover.opened : false;
|
|
951
977
|
}
|
|
@@ -994,6 +1020,10 @@ class ComboBox extends UI5Element {
|
|
|
994
1020
|
|
|
995
1021
|
get classes() {
|
|
996
1022
|
return {
|
|
1023
|
+
popover: {
|
|
1024
|
+
"ui5-suggestions-popover": !this.isPhone,
|
|
1025
|
+
"ui5-suggestions-popover-with-value-state-header": !this.isPhone && this.hasValueStateText,
|
|
1026
|
+
},
|
|
997
1027
|
popoverValueState: {
|
|
998
1028
|
"ui5-valuestatemessage-header": true,
|
|
999
1029
|
"ui5-valuestatemessage-root": true,
|
package/src/ComboBoxPopover.hbs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<ui5-responsive-popover
|
|
2
|
+
class="{{classes.popover}}"
|
|
2
3
|
hide-arrow
|
|
3
4
|
content-only-on-desktop
|
|
4
5
|
_disable-initial-focus
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
{{#unless _isPhone}}
|
|
56
57
|
{{#if hasValueStateText}}
|
|
57
58
|
<div class="ui5-responsive-popover-header {{classes.popoverValueState}}" ?focused={{_isValueStateFocused}} tabindex="0" style="{{styles.suggestionPopoverHeader}}">
|
|
59
|
+
<ui5-icon class="ui5-input-value-state-message-icon" name="{{_valueStateMessageIcon}}"></ui5-icon>
|
|
58
60
|
{{> valueStateMessage}}
|
|
59
61
|
</div>
|
|
60
62
|
{{/if}}
|
|
@@ -106,6 +108,7 @@
|
|
|
106
108
|
placement-type="Bottom"
|
|
107
109
|
>
|
|
108
110
|
<div slot="header" class="{{classes.popoverValueState}}" style="{{styles.popoverHeader}}">
|
|
111
|
+
<ui5-icon class="ui5-input-value-state-message-icon" name="{{_valueStateMessageIcon}}"></ui5-icon>
|
|
109
112
|
{{> valueStateMessage}}
|
|
110
113
|
</div>
|
|
111
114
|
</ui5-popover>
|
package/src/DateTimePicker.js
CHANGED
|
@@ -314,12 +314,13 @@ class DateTimePicker extends DatePicker {
|
|
|
314
314
|
*/
|
|
315
315
|
onSelectedDatesChange(event) {
|
|
316
316
|
event.preventDefault();
|
|
317
|
+
const dateTimePickerContent = event.path ? event.path[1] : event.composedPath()[1];
|
|
317
318
|
|
|
318
319
|
this._previewValues = {
|
|
319
320
|
...this._previewValues,
|
|
320
321
|
calendarTimestamp: event.detail.timestamp,
|
|
321
322
|
calendarValue: event.detail.values[0],
|
|
322
|
-
timeSelectionValue:
|
|
323
|
+
timeSelectionValue: dateTimePickerContent.lastChild.value,
|
|
323
324
|
};
|
|
324
325
|
}
|
|
325
326
|
|
package/src/DayPicker.js
CHANGED
|
@@ -259,10 +259,15 @@ class DayPicker extends CalendarPart {
|
|
|
259
259
|
if (isWeekend) {
|
|
260
260
|
day.classes += " ui5-dp-item--weeekend";
|
|
261
261
|
}
|
|
262
|
+
|
|
262
263
|
if (isDisabled) {
|
|
263
264
|
day.classes += " ui5-dp-item--disabled";
|
|
264
265
|
}
|
|
265
266
|
|
|
267
|
+
if (this.hasSecondaryCalendarType) {
|
|
268
|
+
day.classes += " ui5-dp-item--withsecondtype";
|
|
269
|
+
}
|
|
270
|
+
|
|
266
271
|
week.push(day);
|
|
267
272
|
|
|
268
273
|
if (dayOfTheWeek === DAYS_IN_WEEK - 1) { // 0-indexed so 6 is the last day of the week
|
package/src/FileUploader.js
CHANGED
|
@@ -480,6 +480,20 @@ class FileUploader extends UI5Element {
|
|
|
480
480
|
return this.focused && this.hasValueStateText && !this.hideInput;
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
+
/**
|
|
484
|
+
* This method is relevant for sap_horizon theme only
|
|
485
|
+
*/
|
|
486
|
+
get _valueStateMessageInputIcon() {
|
|
487
|
+
const iconPerValueState = {
|
|
488
|
+
Error: "error",
|
|
489
|
+
Warning: "alert",
|
|
490
|
+
Success: "sys-enter-2",
|
|
491
|
+
Information: "information",
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : "";
|
|
495
|
+
}
|
|
496
|
+
|
|
483
497
|
get classes() {
|
|
484
498
|
return {
|
|
485
499
|
popoverValueState: {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
horizontal-align="Left"
|
|
10
10
|
>
|
|
11
11
|
<div slot="header" class="{{classes.popoverValueState}}" style="{{styles.popoverHeader}}">
|
|
12
|
+
<ui5-icon class="ui5-input-value-state-message-icon" name="{{_valueStateMessageInputIcon}}"></ui5-icon>
|
|
12
13
|
{{> valueStateMessage}}
|
|
13
14
|
</div>
|
|
14
15
|
</ui5-popover>
|
package/src/Icon.js
CHANGED
|
@@ -19,6 +19,7 @@ const PRESENTATION_ROLE = "presentation";
|
|
|
19
19
|
const metadata = {
|
|
20
20
|
tag: "ui5-icon",
|
|
21
21
|
languageAware: true,
|
|
22
|
+
themeAware: true,
|
|
22
23
|
properties: /** @lends sap.ui.webcomponents.main.Icon.prototype */ {
|
|
23
24
|
/**
|
|
24
25
|
* Defines if the icon is interactive (focusable and pressable)
|
package/src/Input.hbs
CHANGED
package/src/Input.js
CHANGED
|
@@ -18,6 +18,7 @@ import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
|
18
18
|
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js";
|
|
19
19
|
import { getCaretPosition, setCaretPosition } from "@ui5/webcomponents-base/dist/util/Caret.js";
|
|
20
20
|
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
21
|
+
import "@ui5/webcomponents-icons/dist/not-editable.js";
|
|
21
22
|
import InputType from "./types/InputType.js";
|
|
22
23
|
import Popover from "./Popover.js";
|
|
23
24
|
// Templates
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
import styles from "./generated/themes/Input.css.js";
|
|
41
42
|
import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js";
|
|
42
43
|
import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js";
|
|
44
|
+
import SuggestionsCss from "./generated/themes/Suggestions.css.js";
|
|
43
45
|
|
|
44
46
|
const rgxFloat = new RegExp(/(\+|-)?\d+(\.|,)\d+/);
|
|
45
47
|
|
|
@@ -330,6 +332,14 @@ const metadata = {
|
|
|
330
332
|
type: Boolean,
|
|
331
333
|
},
|
|
332
334
|
|
|
335
|
+
/**
|
|
336
|
+
* Indicates whether the visual focus is on the value state header
|
|
337
|
+
* @private
|
|
338
|
+
*/
|
|
339
|
+
_isValueStateFocused: {
|
|
340
|
+
type: Boolean,
|
|
341
|
+
},
|
|
342
|
+
|
|
333
343
|
open: {
|
|
334
344
|
type: Boolean,
|
|
335
345
|
},
|
|
@@ -487,7 +497,7 @@ class Input extends UI5Element {
|
|
|
487
497
|
}
|
|
488
498
|
|
|
489
499
|
static get staticAreaStyles() {
|
|
490
|
-
return [ResponsivePopoverCommonCss, ValueStateMessageCss];
|
|
500
|
+
return [ResponsivePopoverCommonCss, ValueStateMessageCss, SuggestionsCss];
|
|
491
501
|
}
|
|
492
502
|
|
|
493
503
|
constructor() {
|
|
@@ -614,7 +624,7 @@ class Input extends UI5Element {
|
|
|
614
624
|
}
|
|
615
625
|
|
|
616
626
|
if (this.showSuggestions) {
|
|
617
|
-
this.
|
|
627
|
+
this._clearPopoverFocusAndSelection();
|
|
618
628
|
}
|
|
619
629
|
|
|
620
630
|
this._keyDown = true;
|
|
@@ -652,26 +662,41 @@ class Input extends UI5Element {
|
|
|
652
662
|
|
|
653
663
|
_handleEnter(event) {
|
|
654
664
|
const itemPressed = !!(this.Suggestions && this.Suggestions.onEnter(event));
|
|
665
|
+
|
|
655
666
|
if (!itemPressed) {
|
|
656
667
|
this.fireEventByAction(this.ACTION_ENTER);
|
|
657
668
|
this.lastConfirmedValue = this.value;
|
|
669
|
+
return;
|
|
658
670
|
}
|
|
671
|
+
|
|
672
|
+
this.focused = true;
|
|
659
673
|
}
|
|
660
674
|
|
|
661
675
|
_handleEscape() {
|
|
662
|
-
|
|
676
|
+
const hasSuggestions = this.showSuggestions && !!this.Suggestions;
|
|
677
|
+
const isOpen = hasSuggestions && this.open;
|
|
678
|
+
|
|
679
|
+
if (!isOpen) {
|
|
680
|
+
this.value = this.lastConfirmedValue ? this.lastConfirmedValue : this.previousValue;
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
if (hasSuggestions && isOpen && this.Suggestions._isItemOnTarget()) {
|
|
663
685
|
// Restore the value.
|
|
664
686
|
this.value = this.valueBeforeItemPreview;
|
|
665
687
|
|
|
666
688
|
// Mark that the selection has been canceled, so the popover can close
|
|
667
689
|
// and not reopen, due to receiving focus.
|
|
668
690
|
this.suggestionSelectionCanceled = true;
|
|
669
|
-
this.
|
|
670
|
-
} else if (this.Suggestions && this.Suggestions.isOpened()) {
|
|
671
|
-
this.closePopover();
|
|
672
|
-
} else {
|
|
673
|
-
this.value = this.lastConfirmedValue ? this.lastConfirmedValue : this.previousValue;
|
|
691
|
+
this.focused = true;
|
|
674
692
|
}
|
|
693
|
+
|
|
694
|
+
if (this._isValueStateFocused) {
|
|
695
|
+
this._isValueStateFocused = false;
|
|
696
|
+
this.focused = true;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
this.open = false;
|
|
675
700
|
}
|
|
676
701
|
|
|
677
702
|
async _onfocusin(event) {
|
|
@@ -702,6 +727,7 @@ class Input extends UI5Element {
|
|
|
702
727
|
}
|
|
703
728
|
|
|
704
729
|
this.closePopover();
|
|
730
|
+
this._clearPopoverFocusAndSelection();
|
|
705
731
|
|
|
706
732
|
this.previousValue = "";
|
|
707
733
|
this.lastConfirmedValue = "";
|
|
@@ -709,6 +735,18 @@ class Input extends UI5Element {
|
|
|
709
735
|
this.open = false;
|
|
710
736
|
}
|
|
711
737
|
|
|
738
|
+
_clearPopoverFocusAndSelection() {
|
|
739
|
+
if (!this.showSuggestions || !this.Suggestions) {
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
this._isValueStateFocused = false;
|
|
744
|
+
this.hasSuggestionItemSelected = false;
|
|
745
|
+
|
|
746
|
+
this.Suggestions._deselectItems();
|
|
747
|
+
this.Suggestions._clearItemFocus();
|
|
748
|
+
}
|
|
749
|
+
|
|
712
750
|
_click(event) {
|
|
713
751
|
if (isPhone() && !this.readonly && this.Suggestions) {
|
|
714
752
|
this.blur();
|
|
@@ -774,6 +812,8 @@ class Input extends UI5Element {
|
|
|
774
812
|
}
|
|
775
813
|
|
|
776
814
|
if (event.target === inputDomRef) {
|
|
815
|
+
this.focused = true;
|
|
816
|
+
|
|
777
817
|
// stop the native event, as the semantic "input" would be fired.
|
|
778
818
|
event.stopImmediatePropagation();
|
|
779
819
|
}
|
|
@@ -787,6 +827,7 @@ class Input extends UI5Element {
|
|
|
787
827
|
!skipFiring && this.fireEventByAction(this.ACTION_USER_INPUT);
|
|
788
828
|
|
|
789
829
|
this.hasSuggestionItemSelected = false;
|
|
830
|
+
this._isValueStateFocused = false;
|
|
790
831
|
|
|
791
832
|
if (this.Suggestions) {
|
|
792
833
|
this.Suggestions.updateSelectedItemPosition(null);
|
|
@@ -864,14 +905,6 @@ class Input extends UI5Element {
|
|
|
864
905
|
}
|
|
865
906
|
}
|
|
866
907
|
|
|
867
|
-
shouldOpenSuggestions() {
|
|
868
|
-
return !!(this.suggestionItems.length
|
|
869
|
-
&& this.focused
|
|
870
|
-
&& this.showSuggestions
|
|
871
|
-
&& !this.hasSuggestionItemSelected
|
|
872
|
-
&& !this.suggestionSelectionCanceled);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
908
|
selectSuggestion(item, keyboardUsed) {
|
|
876
909
|
if (item.group) {
|
|
877
910
|
return;
|
|
@@ -913,7 +946,7 @@ class Input extends UI5Element {
|
|
|
913
946
|
*/
|
|
914
947
|
updateValueOnPreview(item) {
|
|
915
948
|
const noPreview = item.type === "Inactive" || item.group;
|
|
916
|
-
const itemValue = noPreview ?
|
|
949
|
+
const itemValue = noPreview ? this.valueBeforeItemPreview : (item.effectiveTitle || item.textContent);
|
|
917
950
|
this.value = itemValue;
|
|
918
951
|
}
|
|
919
952
|
|
|
@@ -1154,10 +1187,13 @@ class Input extends UI5Element {
|
|
|
1154
1187
|
|
|
1155
1188
|
get classes() {
|
|
1156
1189
|
return {
|
|
1190
|
+
popover: {
|
|
1191
|
+
"ui5-suggestions-popover": !this.isPhone && this.showSuggestions,
|
|
1192
|
+
"ui5-suggestions-popover-with-value-state-header": !this.isPhone && this.showSuggestions && this.hasValueStateMessage,
|
|
1193
|
+
},
|
|
1157
1194
|
popoverValueState: {
|
|
1158
1195
|
"ui5-valuestatemessage-root": true,
|
|
1159
1196
|
"ui5-valuestatemessage-header": true,
|
|
1160
|
-
"ui5-responsive-popover-header": !this.isValueStateOpened(),
|
|
1161
1197
|
"ui5-valuestatemessage--success": this.valueState === ValueState.Success,
|
|
1162
1198
|
"ui5-valuestatemessage--error": this.valueState === ValueState.Error,
|
|
1163
1199
|
"ui5-valuestatemessage--warning": this.valueState === ValueState.Warning,
|
|
@@ -1278,6 +1314,20 @@ class Input extends UI5Element {
|
|
|
1278
1314
|
return this.valueState !== ValueState.None ? result : "";
|
|
1279
1315
|
}
|
|
1280
1316
|
|
|
1317
|
+
/**
|
|
1318
|
+
* This method is relevant for sap_horizon theme only
|
|
1319
|
+
*/
|
|
1320
|
+
get _valueStateMessageInputIcon() {
|
|
1321
|
+
const iconPerValueState = {
|
|
1322
|
+
Error: "error",
|
|
1323
|
+
Warning: "alert",
|
|
1324
|
+
Success: "sys-enter-2",
|
|
1325
|
+
Information: "information",
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : "";
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1281
1331
|
/**
|
|
1282
1332
|
* Returns the caret position inside the native input
|
|
1283
1333
|
* @protected
|
package/src/InputPopover.hbs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{{#if showSuggestions}}
|
|
2
2
|
<ui5-responsive-popover
|
|
3
|
+
class="{{classes.popover}}"
|
|
3
4
|
hide-arrow
|
|
4
5
|
_disable-initial-focus
|
|
5
6
|
placement-type="Bottom"
|
|
@@ -44,7 +45,8 @@
|
|
|
44
45
|
|
|
45
46
|
{{#unless _isPhone}}
|
|
46
47
|
{{#if hasValueStateMessage}}
|
|
47
|
-
<div slot="header" class="ui5-responsive-popover-header {{classes.popoverValueState}}" style={{styles.suggestionPopoverHeader}}>
|
|
48
|
+
<div slot="header" ?focused={{_isValueStateFocused}} class="ui5-responsive-popover-header {{classes.popoverValueState}}" style={{styles.suggestionPopoverHeader}}>
|
|
49
|
+
<ui5-icon class="ui5-input-value-state-message-icon" name="{{_valueStateMessageInputIcon}}"></ui5-icon>
|
|
48
50
|
{{> valueStateMessage}}
|
|
49
51
|
</div>
|
|
50
52
|
{{/if}}
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
horizontal-align="Left"
|
|
75
77
|
>
|
|
76
78
|
<div slot="header" class="{{classes.popoverValueState}}" style="{{styles.popoverHeader}}">
|
|
79
|
+
<ui5-icon class="ui5-input-value-state-message-icon" name="{{_valueStateMessageInputIcon}}"></ui5-icon>
|
|
77
80
|
{{> valueStateMessage}}
|
|
78
81
|
</div>
|
|
79
82
|
</ui5-popover>
|
package/src/List.hbs
CHANGED
package/src/List.js
CHANGED
|
@@ -361,7 +361,7 @@ const metadata = {
|
|
|
361
361
|
* The <code>ui5-list</code> component allows displaying a list of items, advanced keyboard
|
|
362
362
|
* handling support for navigating between items, and predefined modes to improve the development efficiency.
|
|
363
363
|
* <br><br>
|
|
364
|
-
* The <code>ui5-list</code> is
|
|
364
|
+
* The <code>ui5-list</code> is a container for the available list items:
|
|
365
365
|
* <ul>
|
|
366
366
|
* <li><code>ui5-li</code></li>
|
|
367
367
|
* <li><code>ui5-li-custom</code></li>
|
|
@@ -560,7 +560,7 @@ class List extends UI5Element {
|
|
|
560
560
|
return ids.length ? ids.join(" ") : undefined;
|
|
561
561
|
}
|
|
562
562
|
|
|
563
|
-
get
|
|
563
|
+
get ariaLabelTxt() {
|
|
564
564
|
return getEffectiveAriaLabelText(this);
|
|
565
565
|
}
|
|
566
566
|
|
package/src/ListItem.hbs
CHANGED
package/src/MultiComboBox.hbs
CHANGED
package/src/MultiComboBox.js
CHANGED
|
@@ -19,6 +19,7 @@ import { isIE, isPhone } from "@ui5/webcomponents-base/dist/Device.js";
|
|
|
19
19
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
20
20
|
import "@ui5/webcomponents-icons/dist/decline.js";
|
|
21
21
|
import "@ui5/webcomponents-icons/dist/multiselect-all.js";
|
|
22
|
+
import "@ui5/webcomponents-icons/dist/not-editable.js";
|
|
22
23
|
import MultiComboBoxItem from "./MultiComboBoxItem.js";
|
|
23
24
|
import Tokenizer from "./Tokenizer.js";
|
|
24
25
|
import Token from "./Token.js";
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
35
36
|
VALUE_STATE_SUCCESS,
|
|
36
37
|
VALUE_STATE_ERROR,
|
|
37
38
|
VALUE_STATE_WARNING,
|
|
39
|
+
VALUE_STATE_INFORMATION,
|
|
38
40
|
INPUT_SUGGESTIONS_TITLE,
|
|
39
41
|
SELECT_OPTIONS,
|
|
40
42
|
MULTICOMBOBOX_DIALOG_OK_BUTTON,
|
|
@@ -49,6 +51,7 @@ import MultiComboBoxPopoverTemplate from "./generated/templates/MultiComboBoxPop
|
|
|
49
51
|
import styles from "./generated/themes/MultiComboBox.css.js";
|
|
50
52
|
import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js";
|
|
51
53
|
import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js";
|
|
54
|
+
import SuggestionsCss from "./generated/themes/Suggestions.css.js";
|
|
52
55
|
|
|
53
56
|
/**
|
|
54
57
|
* @public
|
|
@@ -337,12 +340,6 @@ const metadata = {
|
|
|
337
340
|
* <li> Backspace - deletes the token and focus the next token. </li>
|
|
338
341
|
* </ul>
|
|
339
342
|
*
|
|
340
|
-
* In the context of <code>ui5-multi-combobox</code>, you can provide a custom stable DOM ref for:
|
|
341
|
-
* <ul>
|
|
342
|
-
* <li>Every <code>ui5-mcb-item</code> that you provide.
|
|
343
|
-
* Example: <code><ui5-mcb-item stable-dom-ref="item1"></ui5-mcb-item></code></li>
|
|
344
|
-
* </ul>
|
|
345
|
-
*
|
|
346
343
|
* <h3>CSS Shadow Parts</h3>
|
|
347
344
|
*
|
|
348
345
|
* <ui5-link target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/::part">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.
|
|
@@ -388,7 +385,7 @@ class MultiComboBox extends UI5Element {
|
|
|
388
385
|
}
|
|
389
386
|
|
|
390
387
|
static get staticAreaStyles() {
|
|
391
|
-
return [ResponsivePopoverCommonCss, ValueStateMessageCss];
|
|
388
|
+
return [ResponsivePopoverCommonCss, ValueStateMessageCss, SuggestionsCss];
|
|
392
389
|
}
|
|
393
390
|
|
|
394
391
|
static get dependencies() {
|
|
@@ -819,6 +816,10 @@ class MultiComboBox extends UI5Element {
|
|
|
819
816
|
this._filteredItems = this.items;
|
|
820
817
|
}
|
|
821
818
|
|
|
819
|
+
this.items.forEach(item => {
|
|
820
|
+
item._getRealDomRef = () => this.allItemsPopover.querySelector(`*[data-ui5-stable=${item.stableDomRef}]`);
|
|
821
|
+
});
|
|
822
|
+
|
|
822
823
|
const filteredItems = this._filterItems(this.value);
|
|
823
824
|
this._filteredItems = filteredItems;
|
|
824
825
|
}
|
|
@@ -931,6 +932,10 @@ class MultiComboBox extends UI5Element {
|
|
|
931
932
|
}
|
|
932
933
|
}
|
|
933
934
|
|
|
935
|
+
_readonlyIconClick() {
|
|
936
|
+
this._inputDom.focus();
|
|
937
|
+
}
|
|
938
|
+
|
|
934
939
|
get editable() {
|
|
935
940
|
return !this.readonly;
|
|
936
941
|
}
|
|
@@ -973,6 +978,20 @@ class MultiComboBox extends UI5Element {
|
|
|
973
978
|
return this.getSlottedNodes("valueStateMessage").map(el => el.cloneNode(true));
|
|
974
979
|
}
|
|
975
980
|
|
|
981
|
+
/**
|
|
982
|
+
* This method is relevant for sap_horizon theme only
|
|
983
|
+
*/
|
|
984
|
+
get _valueStateMessageIcon() {
|
|
985
|
+
const iconPerValueState = {
|
|
986
|
+
Error: "error",
|
|
987
|
+
Warning: "alert",
|
|
988
|
+
Success: "sys-enter-2",
|
|
989
|
+
Information: "information",
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : "";
|
|
993
|
+
}
|
|
994
|
+
|
|
976
995
|
get _tokensCountText() {
|
|
977
996
|
if (!this._tokenizer) {
|
|
978
997
|
return;
|
|
@@ -1002,6 +1021,7 @@ class MultiComboBox extends UI5Element {
|
|
|
1002
1021
|
"Error": MultiComboBox.i18nBundle.getText(VALUE_STATE_ERROR),
|
|
1003
1022
|
"Error_Selection": MultiComboBox.i18nBundle.getText(VALUE_STATE_ERROR_ALREADY_SELECTED),
|
|
1004
1023
|
"Warning": MultiComboBox.i18nBundle.getText(VALUE_STATE_WARNING),
|
|
1024
|
+
"Information": MultiComboBox.i18nBundle.getText(VALUE_STATE_INFORMATION),
|
|
1005
1025
|
};
|
|
1006
1026
|
}
|
|
1007
1027
|
|
|
@@ -1033,6 +1053,11 @@ class MultiComboBox extends UI5Element {
|
|
|
1033
1053
|
|
|
1034
1054
|
get classes() {
|
|
1035
1055
|
return {
|
|
1056
|
+
popover: {
|
|
1057
|
+
"ui5-multi-combobox-all-items-responsive-popover": true,
|
|
1058
|
+
"ui5-suggestions-popover": !this.isPhone,
|
|
1059
|
+
"ui5-suggestions-popover-with-value-state-header": !this.isPhone && this.hasValueStateMessage,
|
|
1060
|
+
},
|
|
1036
1061
|
popoverValueState: {
|
|
1037
1062
|
"ui5-valuestatemessage-root": true,
|
|
1038
1063
|
"ui5-valuestatemessage-header": true,
|
package/src/MultiComboBoxItem.js
CHANGED
|
@@ -13,16 +13,6 @@ const metadata = {
|
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
15
|
selected: { type: Boolean },
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Defines the stable selector that you can use via getStableDomRef method.
|
|
19
|
-
* @public
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @since 1.0.0-rc.11
|
|
22
|
-
*/
|
|
23
|
-
stableDomRef: {
|
|
24
|
-
type: String,
|
|
25
|
-
},
|
|
26
16
|
},
|
|
27
17
|
};
|
|
28
18
|
|
|
@@ -42,6 +32,10 @@ class MultiComboBoxItem extends ComboBoxItem {
|
|
|
42
32
|
static get metadata() {
|
|
43
33
|
return metadata;
|
|
44
34
|
}
|
|
35
|
+
|
|
36
|
+
get stableDomRef() {
|
|
37
|
+
return `${this._id}-stable-dom-ref`;
|
|
38
|
+
}
|
|
45
39
|
}
|
|
46
40
|
|
|
47
41
|
MultiComboBoxItem.define();
|