@ui5/webcomponents 1.14.2 → 1.14.4
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/.vscode/diff/vulsCount.txt +1 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +11 -0
- package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js +1 -1
- package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js.map +1 -1
- package/package.json +7 -8
- package/src/ComboBoxPopover.hbs +16 -12
- package/LICENSE.txt +0 -201
- package/dist/assets/test/pages/ComboBox.html.e6b2c662.js +0 -1
- package/dist/assets/test/pages/Icon.html.4f593716.js +0 -1
- package/dist/assets/test/pages/Label.html.36a2faae.js +0 -4
- package/dist/assets/test/pages/Popups.html.c29d144e.js +0 -1
- package/dist/test/pages/72override.html +0 -33
- package/dist/test/pages/AnimanitionOff.html +0 -52
- package/dist/test/pages/Avatar.html +0 -264
- package/dist/test/pages/AvatarGroup.html +0 -376
- package/dist/test/pages/Badge.html +0 -75
- package/dist/test/pages/Breadcrumbs.html +0 -239
- package/dist/test/pages/BusyIndicator.html +0 -278
- package/dist/test/pages/Button.html +0 -273
- package/dist/test/pages/Calendar.html +0 -103
- package/dist/test/pages/Card.html +0 -347
- package/dist/test/pages/Carousel.html +0 -613
- package/dist/test/pages/CheckBox.html +0 -90
- package/dist/test/pages/ColorPalette.html +0 -126
- package/dist/test/pages/ColorPalettePopover.html +0 -141
- package/dist/test/pages/ColorPicker.html +0 -66
- package/dist/test/pages/ComboBox.html +0 -292
- package/dist/test/pages/Components.html +0 -106
- package/dist/test/pages/CoreControls.html +0 -203
- package/dist/test/pages/CoreControls_exp.html +0 -203
- package/dist/test/pages/CustomCSS.html +0 -55
- package/dist/test/pages/DatePicker.html +0 -211
- package/dist/test/pages/DatePicker_test_page.html +0 -109
- package/dist/test/pages/DateRangePicker.html +0 -67
- package/dist/test/pages/DateTimePicker.html +0 -199
- package/dist/test/pages/DateTimePicker_Timezone.html +0 -72
- package/dist/test/pages/DayPicker.html +0 -37
- package/dist/test/pages/Dialog.html +0 -813
- package/dist/test/pages/DialogLifecycle.html +0 -62
- package/dist/test/pages/DialogSemantic.html +0 -58
- package/dist/test/pages/Eventing.html +0 -33
- package/dist/test/pages/F6Test1.html +0 -42
- package/dist/test/pages/F6Test2.html +0 -42
- package/dist/test/pages/F6Test3.html +0 -39
- package/dist/test/pages/F6Test4.html +0 -46
- package/dist/test/pages/F6Test5.html +0 -42
- package/dist/test/pages/F6Test6.html +0 -39
- package/dist/test/pages/F6Test7.html +0 -36
- package/dist/test/pages/FileUploader.html +0 -138
- package/dist/test/pages/FormComponents.html +0 -76
- package/dist/test/pages/FormSupport.html +0 -59
- package/dist/test/pages/HCB.html +0 -45
- package/dist/test/pages/Icon.html +0 -278
- package/dist/test/pages/Icon_and_theming.html +0 -67
- package/dist/test/pages/Icon_custom.html +0 -26
- package/dist/test/pages/Input.html +0 -731
- package/dist/test/pages/InputFieldLabels.html +0 -355
- package/dist/test/pages/InputFieldMinWidth.html +0 -230
- package/dist/test/pages/InputIcons.html +0 -80
- package/dist/test/pages/Input_quickview.html +0 -204
- package/dist/test/pages/InputsAlignment.html +0 -131
- package/dist/test/pages/InputsLazyLoading.html +0 -244
- package/dist/test/pages/ItemNavigation.html +0 -94
- package/dist/test/pages/Kitchen.html +0 -637
- package/dist/test/pages/Kitchen.openui5.html +0 -570
- package/dist/test/pages/Label.html +0 -192
- package/dist/test/pages/Link.html +0 -201
- package/dist/test/pages/List.html +0 -465
- package/dist/test/pages/ListGrowing_Button.html +0 -64
- package/dist/test/pages/ListGrowing_Scroll.html +0 -93
- package/dist/test/pages/List_keyboard_support.html +0 -130
- package/dist/test/pages/List_test_page.html +0 -395
- package/dist/test/pages/LitKeyFunction.html +0 -40
- package/dist/test/pages/MemoryLeak.html +0 -78
- package/dist/test/pages/Menu.html +0 -161
- package/dist/test/pages/MessagePage.html +0 -39
- package/dist/test/pages/MessageStrip.html +0 -55
- package/dist/test/pages/MultiComboBox.html +0 -489
- package/dist/test/pages/MultiInput.html +0 -451
- package/dist/test/pages/MultiInput_Suggestions.html +0 -161
- package/dist/test/pages/OpenUI5-second.html +0 -60
- package/dist/test/pages/OpenUI5.html +0 -83
- package/dist/test/pages/Panel.html +0 -226
- package/dist/test/pages/Popover.html +0 -658
- package/dist/test/pages/PopoverArrowBounds.html +0 -52
- package/dist/test/pages/Popups.html +0 -131
- package/dist/test/pages/ProgressIndicator.html +0 -151
- package/dist/test/pages/RTL.html +0 -118
- package/dist/test/pages/RadioButton.html +0 -201
- package/dist/test/pages/RangeSlider.html +0 -96
- package/dist/test/pages/RatingIndicator.html +0 -97
- package/dist/test/pages/ResizeHandler.html +0 -74
- package/dist/test/pages/ResponsivePopover.html +0 -267
- package/dist/test/pages/SegmentedButton.html +0 -151
- package/dist/test/pages/Select.html +0 -272
- package/dist/test/pages/Simple.html +0 -25
- package/dist/test/pages/Slider.html +0 -79
- package/dist/test/pages/SplitButton.html +0 -101
- package/dist/test/pages/StepInput.html +0 -189
- package/dist/test/pages/Switch.html +0 -97
- package/dist/test/pages/TabContainer.html +0 -904
- package/dist/test/pages/Table-perf-pure.html +0 -73
- package/dist/test/pages/Table-perf.html +0 -76
- package/dist/test/pages/Table.html +0 -2808
- package/dist/test/pages/Table2.html +0 -53
- package/dist/test/pages/TableAllPopin.html +0 -228
- package/dist/test/pages/TableCustomStyling.html +0 -89
- package/dist/test/pages/TableGrouping.html +0 -109
- package/dist/test/pages/TableGrowingWithButton.html +0 -805
- package/dist/test/pages/TableGrowingWithScroll.html +0 -801
- package/dist/test/pages/TableSelection.html +0 -445
- package/dist/test/pages/Test.html +0 -15
- package/dist/test/pages/TextArea.html +0 -222
- package/dist/test/pages/TimePicker.html +0 -89
- package/dist/test/pages/TimeSelection.html +0 -31
- package/dist/test/pages/Title.html +0 -60
- package/dist/test/pages/Toast.html +0 -111
- package/dist/test/pages/ToggleButton.html +0 -71
- package/dist/test/pages/Tokenizer.html +0 -91
- package/dist/test/pages/Tree.html +0 -307
- package/dist/test/pages/TreeDynamic.html +0 -56
- package/dist/test/pages/WheelSlider_Test_Page.html +0 -26
- package/dist/test/pages/base/AriaLabelHelper.html +0 -334
- package/dist/test/pages/base/DOMObserver.html +0 -20
- package/dist/test/pages/base/IconCollection.html +0 -23
- package/dist/test/pages/base/IconCollectionInCustomTheme.html +0 -25
- package/dist/test/pages/base/IgnoreCustomElements.html +0 -26
- package/dist/test/pages/base/InvisibleMessage.html +0 -44
- package/dist/test/pages/form.html +0 -123
- package/dist/test/pages/i18n-defaultLang.html +0 -31
- package/dist/test/pages/i18n-demo.html +0 -79
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
6
|
-
<title>Input Quick View</title>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<script>// delete Document.prototype.adoptedStyleSheets;</script>
|
|
11
|
-
|
|
12
|
-
<script type="module" crossorigin src="/assets/bundle.common.fa62259e.js"></script>
|
|
13
|
-
<link rel="stylesheet" href="/assets/Input_quickview.fa68e418.css">
|
|
14
|
-
</head>
|
|
15
|
-
|
|
16
|
-
<body class="input_quickview1auto">
|
|
17
|
-
<h1> Quick View sample</h1>
|
|
18
|
-
<ul>
|
|
19
|
-
<li>hover on item to see quick view</li>
|
|
20
|
-
<li>navigate via the arrows to see quick view</li>
|
|
21
|
-
<li>press [ctrl + shift + 1] to enter the quick view</li>
|
|
22
|
-
</ul>
|
|
23
|
-
|
|
24
|
-
<div class="input_quickview2auto">
|
|
25
|
-
<ui5-label>focusable element: </ui5-label><ui5-button>before</ui5-button>
|
|
26
|
-
</div>
|
|
27
|
-
<br>
|
|
28
|
-
<br>
|
|
29
|
-
|
|
30
|
-
<ui5-input id="inputPreview" show-suggestions class="input_quickview3auto">
|
|
31
|
-
<ui5-suggestion-item class="suggestionItem" text="Laptop Lenovo"></ui5-suggestion-item>
|
|
32
|
-
<ui5-suggestion-item class="suggestionItem" text="HP Monitor 24"></ui5-suggestion-item>
|
|
33
|
-
<ui5-suggestion-item class="suggestionItem" text="IPhone 6s"></ui5-suggestion-item>
|
|
34
|
-
<ui5-suggestion-item class="suggestionItem" text="Dell"></ui5-suggestion-item>
|
|
35
|
-
<ui5-suggestion-item class="suggestionItem" text="IPad Air"></ui5-suggestion-item>
|
|
36
|
-
</ui5-input>
|
|
37
|
-
|
|
38
|
-
<ui5-popover id="quickViewCard" hide-arrow placement-type="Right" height="500px" prevent-focus-restore>
|
|
39
|
-
<button>hello</button>
|
|
40
|
-
<ui5-input id="searchInput" class="input_quickview4auto">
|
|
41
|
-
<ui5-icon id="searchIcon" slot="icon" name="search"></ui5-icon>
|
|
42
|
-
</ui5-input>
|
|
43
|
-
<ui5-list class="input_quickview5auto">
|
|
44
|
-
<ui5-li-groupheader>Actions</ui5-li-groupheader>
|
|
45
|
-
<ui5-li>Delete Product</ui5-li>
|
|
46
|
-
<ui5-li>Audit Log Settings</ui5-li>
|
|
47
|
-
<ui5-li>OData API Audit</ui5-li>
|
|
48
|
-
<ui5-li-groupheader>Products</ui5-li-groupheader>
|
|
49
|
-
<ui5-li image="./img/HT-1010.jpg" icon="navigation-right-arrow" additional-text="Re-stock" description="#12331232131" additional-text-state="Error">Laptop Lenovo</ui5-li>
|
|
50
|
-
<ui5-li image="./img/HT-1022.jpg" icon="navigation-right-arrow" additional-text="Re-stock" description="#12331232131" additional-text-state="Error">IPhone 3</ui5-li>
|
|
51
|
-
<ui5-li image="./img/HT-1030.jpg" icon-end icon="navigation-right-arrow" description="#12331232131" additional-text="Reuqired" additional-text-state="Error">HP Monitor 24</ui5-li>
|
|
52
|
-
</ui5-list>
|
|
53
|
-
</ui5-popover>
|
|
54
|
-
|
|
55
|
-
<br>
|
|
56
|
-
<br>
|
|
57
|
-
<div class="input_quickview2auto">
|
|
58
|
-
<ui5-label>focusable element: </ui5-label><ui5-button>after</ui5-button>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<h1> Test Quick View sample</h1>
|
|
62
|
-
|
|
63
|
-
<ui5-input id="inputPreview2" show-suggestions class="input_quickview6auto">
|
|
64
|
-
<ui5-suggestion-item class="suggestionItem" text="Laptop Lenovo"></ui5-suggestion-item>
|
|
65
|
-
<ui5-suggestion-item class="suggestionItem" text="HP Monitor 24"></ui5-suggestion-item>
|
|
66
|
-
<ui5-suggestion-item class="suggestionItem" text="IPhone 6s"></ui5-suggestion-item>
|
|
67
|
-
<ui5-suggestion-item class="suggestionItem" text="Dell"></ui5-suggestion-item>
|
|
68
|
-
<ui5-suggestion-item class="suggestionItem" text="IPad Air"></ui5-suggestion-item>
|
|
69
|
-
</ui5-input>
|
|
70
|
-
<br><br>
|
|
71
|
-
|
|
72
|
-
<div class="input_quickview6auto">Test keyup</div>
|
|
73
|
-
<ui5-input id="keyupResult" class="input_quickview7auto"></ui5-input>
|
|
74
|
-
<br><br>
|
|
75
|
-
|
|
76
|
-
<div class="input_quickview6auto">Test suggestion-item-preview</div>
|
|
77
|
-
<ui5-input id="suggestionItemPreviewRes" class="input_quickview8auto"></ui5-input>
|
|
78
|
-
<br><br>
|
|
79
|
-
|
|
80
|
-
<div class="input_quickview6auto">Test mouseover on item</div>
|
|
81
|
-
<ui5-input id="mouseoverResult" class="input_quickview7auto"></ui5-input>
|
|
82
|
-
|
|
83
|
-
<ui5-popover id="quickViewCard2" hide-arrow placement-type="Right" height="500px">
|
|
84
|
-
<ui5-input id="searchInput2" class="input_quickview4auto">
|
|
85
|
-
<ui5-icon id="searchIcon" slot="icon" name="search"></ui5-icon>
|
|
86
|
-
</ui5-input>
|
|
87
|
-
<ui5-list class="input_quickview5auto">
|
|
88
|
-
<ui5-li-groupheader>Actions</ui5-li-groupheader>
|
|
89
|
-
<ui5-li>Delete Product</ui5-li>
|
|
90
|
-
<ui5-li>Audit Log Settings</ui5-li>
|
|
91
|
-
<ui5-li>OData API Audit</ui5-li>
|
|
92
|
-
<ui5-li-groupheader>Products</ui5-li-groupheader>
|
|
93
|
-
<ui5-li image="./img/HT-1010.jpg" icon="navigation-right-arrow" additional-text="Re-stock" description="#12331232131" additional-text-state="Error">Laptop Lenovo</ui5-li>
|
|
94
|
-
<ui5-li image="./img/HT-1022.jpg" icon="navigation-right-arrow" additional-text="Re-stock" description="#12331232131" additional-text-state="Error">IPhone 3</ui5-li>
|
|
95
|
-
<ui5-li image="./img/HT-1030.jpg" icon-end icon="navigation-right-arrow" description="#12331232131" additional-text="Reuqired" additional-text-state="Error">HP Monitor 24</ui5-li>
|
|
96
|
-
</ui5-list>
|
|
97
|
-
</ui5-popover>
|
|
98
|
-
|
|
99
|
-
<script>
|
|
100
|
-
/*
|
|
101
|
-
* QuickviewCard Sample #1
|
|
102
|
-
*/
|
|
103
|
-
var focusQuickView = false;
|
|
104
|
-
|
|
105
|
-
/*
|
|
106
|
-
* Open quickviewCard on suggestion-item-preview
|
|
107
|
-
*/
|
|
108
|
-
inputPreview.addEventListener("ui5-suggestion-item-preview", function (event) {
|
|
109
|
-
const targetRef = event.detail.targetRef;
|
|
110
|
-
|
|
111
|
-
quickViewCard.close();
|
|
112
|
-
quickViewCard.showAt(targetRef, true /* preventInitialFocus */);
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
/*
|
|
116
|
-
* Toggle quickviewCard on mouseover/mouseout
|
|
117
|
-
*/
|
|
118
|
-
[].slice.call(document.querySelectorAll("#inputPreview .suggestionItem")).forEach(function(el) {
|
|
119
|
-
el.addEventListener("ui5-mouseover", function (event) {
|
|
120
|
-
const targetRef = event.detail.targetRef;
|
|
121
|
-
|
|
122
|
-
quickViewCard.close();
|
|
123
|
-
quickViewCard.showAt(targetRef, true /* preventInitialFocus */);
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
el.addEventListener("ui5-mouseout", function (event) {
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
/*
|
|
131
|
-
* Focus quickviewCard on [ctrl + shift + 1]
|
|
132
|
-
*/
|
|
133
|
-
inputPreview.addEventListener("keyup", async event => {
|
|
134
|
-
const combination = event.key === "1" && event.ctrlKey && event.shiftKey;
|
|
135
|
-
|
|
136
|
-
if (combination) {
|
|
137
|
-
focusQuickView = true;
|
|
138
|
-
await window["sap-ui-webcomponents-bundle"].renderFinished();
|
|
139
|
-
quickViewCard.applyFocus();
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
/*
|
|
144
|
-
* Restore the focus to the input on ESC
|
|
145
|
-
*/
|
|
146
|
-
quickViewCard.addEventListener("ui5-before-close", async event => {
|
|
147
|
-
const esc = event.detail.escPressed;
|
|
148
|
-
|
|
149
|
-
if (esc) {
|
|
150
|
-
await window["sap-ui-webcomponents-bundle"].renderFinished();
|
|
151
|
-
inputPreview.focus();
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
/*
|
|
156
|
-
* QuickviewCard Test markup
|
|
157
|
-
*/
|
|
158
|
-
var focusQuickView2 = false;
|
|
159
|
-
|
|
160
|
-
inputPreview2.addEventListener("ui5-suggestion-item-preview", function (event) {
|
|
161
|
-
var item = event.detail.targetRef;
|
|
162
|
-
quickViewCard2.close();
|
|
163
|
-
quickViewCard2.showAt(item, true /* preventInitialFocus */);
|
|
164
|
-
|
|
165
|
-
// log info
|
|
166
|
-
suggestionItemPreviewRes.value = item.textContent;
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
inputPreview2.addEventListener("keyup", async function (event) {
|
|
170
|
-
const item = event.target.previewItem;
|
|
171
|
-
const combination = event.key === "1";
|
|
172
|
-
|
|
173
|
-
if (combination) {
|
|
174
|
-
focusQuickView2 = true;
|
|
175
|
-
await window["sap-ui-webcomponents-bundle"].renderFinished();
|
|
176
|
-
quickViewCard2.applyFocus();
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// log info
|
|
180
|
-
keyupResult.value = event.key + " on item: " + (item && item.text);
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
[].slice.call(document.querySelectorAll("#inputPreview2 .suggestionItem")).forEach(function(el) {
|
|
184
|
-
el.addEventListener("mouseover", function (event) {
|
|
185
|
-
const targetRef = event.detail.targetRef;
|
|
186
|
-
quickViewCard2.close();
|
|
187
|
-
quickViewCard2.showAt(targetRef, true /* preventInitialFocus */);
|
|
188
|
-
|
|
189
|
-
// log info
|
|
190
|
-
mouseoverResult.value = targetRef.textContent;
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
quickViewCard2.addEventListener("ui5-before-close", async event => {
|
|
195
|
-
const esc = event.detail.escPressed;
|
|
196
|
-
|
|
197
|
-
if (esc) {
|
|
198
|
-
await window["sap-ui-webcomponents-bundle"].renderFinished();
|
|
199
|
-
inputPreview2.focus();
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
</script>
|
|
203
|
-
</body>
|
|
204
|
-
</html>
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
6
|
-
<title>Inputs Alignment</title>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<script>// delete Document.prototype.adoptedStyleSheets;</script>
|
|
12
|
-
|
|
13
|
-
<script type="module" crossorigin src="/assets/bundle.common.fa62259e.js"></script>
|
|
14
|
-
<link rel="stylesheet" href="/assets/InputsAlignment.a6c38318.css">
|
|
15
|
-
</head>
|
|
16
|
-
|
|
17
|
-
<body class="inputsalignment1auto">
|
|
18
|
-
<h2>The way the components will be rendered out of the box</h2>
|
|
19
|
-
<ui5-input placeholder="I am ui5-input" value-state="Error"></ui5-input>
|
|
20
|
-
|
|
21
|
-
<ui5-input placeholder="I am ui5-input" show-suggestions>
|
|
22
|
-
<ui5-icon slot="icon" name="message-error"></ui5-icon>
|
|
23
|
-
<ui5-li>Cozy</ui5-li>
|
|
24
|
-
<ui5-li>Compact</ui5-li>
|
|
25
|
-
<ui5-li>Condensed</ui5-li>
|
|
26
|
-
</ui5-input>
|
|
27
|
-
|
|
28
|
-
<ui5-date-picker></ui5-date-picker>
|
|
29
|
-
|
|
30
|
-
<ui5-select >
|
|
31
|
-
<ui5-option>short option</ui5-option>
|
|
32
|
-
<ui5-option selected>ui5-select: average long option</ui5-option>
|
|
33
|
-
<ui5-option>very very very very very long option</ui5-option>
|
|
34
|
-
</ui5-select>
|
|
35
|
-
|
|
36
|
-
<ui5-multi-combobox placeholder="I am multi cbx">
|
|
37
|
-
<ui5-mcb-item text="Compact"></ui5-mcb-item>
|
|
38
|
-
</ui5-multi-combobox>
|
|
39
|
-
|
|
40
|
-
<ui5-multi-combobox placeholder="I am muli cbx">
|
|
41
|
-
<ui5-mcb-item text="Compact"></ui5-mcb-item>
|
|
42
|
-
</ui5-multi-combobox>
|
|
43
|
-
|
|
44
|
-
<ui5-combobox placeholder="I am combobox">
|
|
45
|
-
<ui5-cb-item text="Active"></ui5-cb-item>
|
|
46
|
-
<ui5-cb-item text="Active"></ui5-cb-item>
|
|
47
|
-
<ui5-cb-item text="Active"></ui5-cb-item>
|
|
48
|
-
<ui5-cb-item text="Long sentence Long sentence Long sentence"></ui5-cb-item>
|
|
49
|
-
<ui5-cb-item text="Some word"></ui5-cb-item>
|
|
50
|
-
</ui5-combobox>
|
|
51
|
-
<hr>
|
|
52
|
-
<h2>Explicitly width:auto set</h2>
|
|
53
|
-
<section>
|
|
54
|
-
<ui5-input class="inputsalignment2auto" placeholder="I am ui5-input" value-state="Error"></ui5-input>
|
|
55
|
-
|
|
56
|
-
<ui5-input class="inputsalignment2auto" placeholder="I am ui5-input">
|
|
57
|
-
<ui5-icon slot="icon" name="message-error"></ui5-icon>
|
|
58
|
-
</ui5-input>
|
|
59
|
-
|
|
60
|
-
<ui5-date-picker class="inputsalignment2auto"></ui5-date-picker>
|
|
61
|
-
|
|
62
|
-
<ui5-select class="inputsalignment2auto">
|
|
63
|
-
<ui5-option>short option</ui5-option>
|
|
64
|
-
<ui5-option selected>average long option</ui5-option>
|
|
65
|
-
<ui5-option>very very very very very long option</ui5-option>
|
|
66
|
-
</ui5-select>
|
|
67
|
-
|
|
68
|
-
<ui5-multi-combobox class="inputsalignment2auto" value="com">
|
|
69
|
-
<ui5-mcb-item text="Compact"></ui5-mcb-item>
|
|
70
|
-
</ui5-multi-combobox>
|
|
71
|
-
|
|
72
|
-
<ui5-multi-combobox class="inputsalignment2auto" value="com">
|
|
73
|
-
<ui5-mcb-item text="Compact"></ui5-mcb-item>
|
|
74
|
-
</ui5-multi-combobox>
|
|
75
|
-
</section>
|
|
76
|
-
|
|
77
|
-
<hr>
|
|
78
|
-
<h2>Explicitly width:100% set</h2>
|
|
79
|
-
<section>
|
|
80
|
-
<ui5-input class="inputsalignment3auto" placeholder="I am ui5-input">
|
|
81
|
-
<ui5-icon slot="icon" name="message-error"></ui5-icon>
|
|
82
|
-
</ui5-input>
|
|
83
|
-
|
|
84
|
-
<ui5-date-picker class="inputsalignment3auto"></ui5-date-picker>
|
|
85
|
-
|
|
86
|
-
<ui5-select class="inputsalignment3auto">
|
|
87
|
-
<ui5-option>short option</ui5-option>
|
|
88
|
-
<ui5-option selected>average long option</ui5-option>
|
|
89
|
-
<ui5-option>very very very very very long option</ui5-option>
|
|
90
|
-
</ui5-select>
|
|
91
|
-
|
|
92
|
-
<ui5-multi-combobox class="inputsalignment3auto">
|
|
93
|
-
<ui5-mcb-item text="Compact"></ui5-mcb-item>
|
|
94
|
-
</ui5-multi-combobox>
|
|
95
|
-
|
|
96
|
-
<ui5-multi-combobox class="inputsalignment3auto">
|
|
97
|
-
<ui5-mcb-item text="Compact"></ui5-mcb-item>
|
|
98
|
-
</ui5-multi-combobox>
|
|
99
|
-
</section>
|
|
100
|
-
|
|
101
|
-
<hr>
|
|
102
|
-
<div id="content"></div>
|
|
103
|
-
|
|
104
|
-
<script>
|
|
105
|
-
var reducer = function(accumulator, tag) {
|
|
106
|
-
return accumulator + "<br><" + tag + " style='width: 320px'></" + tag + ">" + "<br>";
|
|
107
|
-
}
|
|
108
|
-
var markup = ["", "ui5-input", "ui5-select", "ui5-multi-combobox", "ui5-date-picker", "ui5-textarea"].reduce(reducer);
|
|
109
|
-
|
|
110
|
-
content.innerHTML = markup
|
|
111
|
-
+ "<br>"
|
|
112
|
-
+ "<hr>"
|
|
113
|
-
+ "<br>"
|
|
114
|
-
+ "<ui5-select>"
|
|
115
|
-
+ "<ui5-option>Hello</ui5-option>"
|
|
116
|
-
+ "<ui5-option>World</ui5-option>"
|
|
117
|
-
+ "<ui5-option>UI5</ui5-option>"
|
|
118
|
-
+ "<ui5-option>Components</ui5-option>"
|
|
119
|
-
+ "</ui5-select>"
|
|
120
|
-
|
|
121
|
-
+ "<br>"
|
|
122
|
-
+ "<br>"
|
|
123
|
-
|
|
124
|
-
+ "<ui5-multi-combobox>"
|
|
125
|
-
+ "<ui5-mcb-item text=\"Compact\"></ui5-mcb-item>"
|
|
126
|
-
+ "</ui5-multi-combobox>";
|
|
127
|
-
</script>
|
|
128
|
-
</body>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</html>
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>Input Lazy Loading</title>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<style>
|
|
12
|
-
.demo-container {
|
|
13
|
-
margin-top: 1rem;
|
|
14
|
-
border: 1px dashed red;
|
|
15
|
-
padding: 2rem;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
text-align: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.demo-container:first-child {
|
|
21
|
-
margin-top: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.demo-container h1 {
|
|
25
|
-
font-size: 1.5rem;
|
|
26
|
-
font-weight: normal;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.devider {
|
|
30
|
-
border: 1px solid black;
|
|
31
|
-
margin: 1rem;
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
34
|
-
<script type="module" crossorigin src="/assets/bundle.common.fa62259e.js"></script>
|
|
35
|
-
</head>
|
|
36
|
-
|
|
37
|
-
<body>
|
|
38
|
-
|
|
39
|
-
<div class="demo-container">
|
|
40
|
-
<h1>Lazy loading items oninput</h1>
|
|
41
|
-
|
|
42
|
-
<ui5-input id="field" show-suggestions></ui5-input>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<div class="demo-container">
|
|
46
|
-
<h1>Lazy load items on first type in</h1>
|
|
47
|
-
|
|
48
|
-
<ui5-input id="first-type" show-suggestions></ui5-input>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
<div class="demo-container">
|
|
52
|
-
<h1>Preload items</h1>
|
|
53
|
-
|
|
54
|
-
<ui5-input id="preload" show-suggestions></ui5-input>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div class="demo-container">
|
|
58
|
-
<h1>Hardcoded items</h1>
|
|
59
|
-
|
|
60
|
-
<ui5-input show-suggestions>
|
|
61
|
-
<ui5-suggestion-item>Dryanovo</ui5-suggestion-item>
|
|
62
|
-
<ui5-suggestion-item>Gabrovo</ui5-suggestion-item>
|
|
63
|
-
<ui5-suggestion-item>Sofia</ui5-suggestion-item>
|
|
64
|
-
<ui5-suggestion-item>Yablanitsa</ui5-suggestion-item>
|
|
65
|
-
<ui5-suggestion-item>New York</ui5-suggestion-item>
|
|
66
|
-
</ui5-input>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div class="demo-container">
|
|
70
|
-
<h1>Always show suggestions</h1>
|
|
71
|
-
|
|
72
|
-
<ui5-input id="field1" show-suggestions></ui5-input>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<div class="devider"></div>
|
|
76
|
-
|
|
77
|
-
<div class="demo-container">
|
|
78
|
-
<h1>Lazy loading items oninput</h1>
|
|
79
|
-
|
|
80
|
-
<ui5-combobox id="combo-field" show-suggestions></ui5-combobox>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<div class="demo-container">
|
|
84
|
-
<h1>Lazy load items on first type in</h1>
|
|
85
|
-
|
|
86
|
-
<ui5-combobox id="combo-first-type" show-suggestions></ui5-combobox>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div class="demo-container">
|
|
90
|
-
<h1>Preload items</h1>
|
|
91
|
-
|
|
92
|
-
<ui5-combobox id="combo-preload" show-suggestions></ui5-combobox>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<div class="demo-container">
|
|
96
|
-
<h1>Hardcoded items</h1>
|
|
97
|
-
|
|
98
|
-
<ui5-combobox show-suggestions>
|
|
99
|
-
<ui5-cb-item text="Dryanovo"></ui5-cb-item>
|
|
100
|
-
<ui5-cb-item text="Gabrovo"></ui5-cb-item>
|
|
101
|
-
<ui5-cb-item text="Sofia"></ui5-cb-item>
|
|
102
|
-
<ui5-cb-item text="Yablanitsa"></ui5-cb-item>
|
|
103
|
-
<ui5-cb-item text="New York"></ui5-cb-item>
|
|
104
|
-
</ui5-combobox>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<script>
|
|
109
|
-
const entries = [{ key: "A", text: "A" }, { key: "Afg", text: "Afghanistan" }, { key: "Arg", text: "Argentina" }, { key: "Alb", text: "Albania" }, { key: "Arm", text: "Armenia" }, { key: "Alg", text: "Algeria" }, { key: "And", text: "Andorra" }, { key: "Ang", text: "Angola" }, { key: "Ast", text: "Austria" }, { key: "Aus", text: "Australia" }, { key: "Aze", text: "Azerbaijan" }, { key: "Aruba", text: "Aruba" }, { key: "Antigua", text: "Antigua and Barbuda" }, { key: "B", text: "B" }, { key: "Bel", text: "Belarus" }, { key: "Bel", text: "Belgium" }, { key: "Bg", text: "Bulgaria" }, { key: "Bra", text: "Brazil" }, { key: "C", text: "C" }, { key: "Ch", text: "China" }, { key: "Cub", text: "Cuba" }, { key: "Chil", text: "Chili" }, { key: "L", text: "L" }, { key: "Lat", text: "Latvia" }, { key: "Lit", text: "Litva" }, { key: "P", text: "P" }, { key: "Prt", text: "Portugal" }, { key: "S", text: "S" }, { key: "Sen", text: "Senegal" }, { key: "Ser", text: "Serbia" }, { key: "Sey", text: "Seychelles" }, { key: "Sierra", text: "Sierra Leone" }, { key: "Sgp", text: "Singapore" }, { key: "Sint", text: "Sint Maarten" }, { key: "Slv", text: "Slovakia" }, { key: "Slo", text: "Slovenia" }];
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const fetchData = async () => {
|
|
113
|
-
// load data real API
|
|
114
|
-
// return (await (await fetch("https://restcountries.com/v3.1/all")).json());
|
|
115
|
-
|
|
116
|
-
// load data fake request
|
|
117
|
-
await new Promise(e => setTimeout(e, 1000));
|
|
118
|
-
|
|
119
|
-
return entries;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const clearChildren = element => {
|
|
123
|
-
while (element.firstChild) {
|
|
124
|
-
element.removeChild(element.firstChild);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
const fillItems = (itemsData, inputElement, tagName) => {
|
|
129
|
-
itemsData.forEach(data => {
|
|
130
|
-
const element = document.createElement(tagName);
|
|
131
|
-
element.setAttribute("text", data.text);
|
|
132
|
-
|
|
133
|
-
inputElement.appendChild(element);
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
const filterData = (data, value) => {
|
|
138
|
-
return data.filter(entry => {
|
|
139
|
-
return entry.text.toLowerCase().startsWith(value.toLowerCase())
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
const enableLazyLoadingOnInput = () => {
|
|
144
|
-
document.getElementById("field").addEventListener("ui5-input", async event => {
|
|
145
|
-
if (event.target.value === "") {
|
|
146
|
-
return clearChildren(event.target);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// load data
|
|
150
|
-
const data = await fetchData();
|
|
151
|
-
|
|
152
|
-
// filter data
|
|
153
|
-
const filteredData = filterData(data, event.target.value);
|
|
154
|
-
|
|
155
|
-
// cleanup old items
|
|
156
|
-
clearChildren(event.target);
|
|
157
|
-
|
|
158
|
-
// fill new items (posibly redux / react state)
|
|
159
|
-
fillItems(filteredData, event.target, "ui5-suggestion-item");
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const enableFirsTypein = () => {
|
|
164
|
-
const field = document.getElementById("first-type");
|
|
165
|
-
|
|
166
|
-
field.addEventListener("ui5-input", async event => {
|
|
167
|
-
const { value, suggestionItems } = event.target;
|
|
168
|
-
|
|
169
|
-
if (value.length === 1 && !suggestionItems.length) {
|
|
170
|
-
const data = await fetchData();
|
|
171
|
-
|
|
172
|
-
// fill new items (posibly redux / react state)
|
|
173
|
-
fillItems(data, event.target, "ui5-suggestion-item");
|
|
174
|
-
|
|
175
|
-
} else if (!value.length && suggestionItems.length) {
|
|
176
|
-
clearChildren(event.target);
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
const enablePreload = async () => {
|
|
182
|
-
const data = await fetchData();
|
|
183
|
-
|
|
184
|
-
fillItems(data, document.getElementById("preload"), "ui5-suggestion-item");
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const field = document.getElementById("field1");
|
|
188
|
-
const fetchSuggestions = (el) => {
|
|
189
|
-
let timeout;
|
|
190
|
-
return new Promise((resolve) => {
|
|
191
|
-
if (!timeout) {
|
|
192
|
-
timeout = setTimeout(() => {
|
|
193
|
-
Array.from(field.children).forEach((c) => {
|
|
194
|
-
field.removeChild(c);
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
setTimeout(() => {
|
|
198
|
-
resolve(Array(el.value.length).fill("Suggestion Item"));
|
|
199
|
-
timeout = undefined;
|
|
200
|
-
}, 0);
|
|
201
|
-
}, 0);
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
const addSuggestions = (arr) => {
|
|
207
|
-
arr.forEach((item, i) => {
|
|
208
|
-
const el = document.createElement("ui5-input-suggestion");
|
|
209
|
-
el.innerText = `${item} ${i}`;
|
|
210
|
-
field.appendChild(el);
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
field.addEventListener("ui5-input", (event) => {
|
|
215
|
-
fetchSuggestions(event.target).then((value) => {
|
|
216
|
-
addSuggestions(value);
|
|
217
|
-
});
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
enableLazyLoadingOnInput();
|
|
221
|
-
enableFirsTypein();
|
|
222
|
-
enablePreload();
|
|
223
|
-
|
|
224
|
-
const enableCbLazyOnInput = () => {
|
|
225
|
-
const cb = document.getElementById("combo-field");
|
|
226
|
-
|
|
227
|
-
cb.addEventListener("ui5-input", async event => {
|
|
228
|
-
const { value } = event.target;
|
|
229
|
-
|
|
230
|
-
const data = await fetchData();
|
|
231
|
-
|
|
232
|
-
// cleanup old items
|
|
233
|
-
clearChildren(event.target);
|
|
234
|
-
|
|
235
|
-
// fill new items (posibly redux / react state)
|
|
236
|
-
fillItems(data, event.target, "ui5-cb-item");
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
enableCbLazyOnInput();
|
|
241
|
-
</script>
|
|
242
|
-
</body>
|
|
243
|
-
|
|
244
|
-
</html>
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<title>Item Navigation</title>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<script type="module" crossorigin src="/assets/bundle.common.fa62259e.js"></script>
|
|
11
|
-
<link rel="stylesheet" href="/assets/ItemNavigation.a9d526f6.css">
|
|
12
|
-
</head>
|
|
13
|
-
|
|
14
|
-
<body class="itemnavigation1auto">
|
|
15
|
-
<div>
|
|
16
|
-
<ui5-label show-colon>Manually switch RTL</ui5-label>
|
|
17
|
-
<ui5-switch id="sw"></ui5-switch>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<h2>Focus does not cycle</h2>
|
|
21
|
-
<ui5-list>
|
|
22
|
-
<ui5-li id="item1">Option 1</ui5-li>
|
|
23
|
-
<ui5-li id="item2">Option 2</ui5-li>
|
|
24
|
-
</ui5-list>
|
|
25
|
-
|
|
26
|
-
<h2>Vertical navigation only</h2>
|
|
27
|
-
<ui5-list>
|
|
28
|
-
<ui5-li id="item3">Option 2.1</ui5-li>
|
|
29
|
-
<ui5-li id="item4">Option 2.2</ui5-li>
|
|
30
|
-
<ui5-li id="item5">Option 2.3</ui5-li>
|
|
31
|
-
</ui5-list>
|
|
32
|
-
|
|
33
|
-
<h2>Horizontal navigation only</h2>
|
|
34
|
-
<ui5-avatar-group type="Individual" id="horizontalNavigation">
|
|
35
|
-
<ui5-avatar size="S" initials="A"></ui5-avatar>
|
|
36
|
-
<ui5-avatar size="S" initials="B"></ui5-avatar>
|
|
37
|
-
<ui5-avatar size="S" initials="C"></ui5-avatar>
|
|
38
|
-
</ui5-avatar-group>
|
|
39
|
-
|
|
40
|
-
<h1>Test PAGE UP/DOWN</h1>
|
|
41
|
-
<br><br>
|
|
42
|
-
<ui5-list>
|
|
43
|
-
<ui5-li id="pageUpDownList_item1">0</ui5-li>
|
|
44
|
-
<ui5-li>1</ui5-li>
|
|
45
|
-
<ui5-li>2</ui5-li>
|
|
46
|
-
<ui5-li id="pageUpDownList_item4">3</ui5-li>
|
|
47
|
-
<ui5-li>4</ui5-li>
|
|
48
|
-
<ui5-li id="pageUpDownList_item6">5</ui5-li>
|
|
49
|
-
<ui5-li>6</ui5-li>
|
|
50
|
-
<ui5-li>7</ui5-li>
|
|
51
|
-
<ui5-li>8</ui5-li>
|
|
52
|
-
<ui5-li>9</ui5-li>
|
|
53
|
-
<ui5-li id="pageUpDownList_item11">10</ui5-li>
|
|
54
|
-
|
|
55
|
-
<ui5-li>11</ui5-li>
|
|
56
|
-
<ui5-li>12</ui5-li>
|
|
57
|
-
<ui5-li>13</ui5-li>
|
|
58
|
-
<ui5-li>14</ui5-li>
|
|
59
|
-
<ui5-li id="pageUpDownList_item16">15</ui5-li>
|
|
60
|
-
<ui5-li>16</ui5-li>
|
|
61
|
-
<ui5-li>17</ui5-li>
|
|
62
|
-
<ui5-li>18</ui5-li>
|
|
63
|
-
<ui5-li>19</ui5-li>
|
|
64
|
-
<ui5-li>20</ui5-li>
|
|
65
|
-
|
|
66
|
-
<ui5-li>21</ui5-li>
|
|
67
|
-
<ui5-li>22</ui5-li>
|
|
68
|
-
<ui5-li>23</ui5-li>
|
|
69
|
-
<ui5-li>24</ui5-li>
|
|
70
|
-
<ui5-li id="pageUpDownList_item26">25</ui5-li>
|
|
71
|
-
<ui5-li>26</ui5-li>
|
|
72
|
-
<ui5-li>27</ui5-li>
|
|
73
|
-
<ui5-li>28</ui5-li>
|
|
74
|
-
<ui5-li>29</ui5-li>
|
|
75
|
-
<ui5-li>30</ui5-li>
|
|
76
|
-
</ui5-list>
|
|
77
|
-
|
|
78
|
-
<script>
|
|
79
|
-
// Utility function to change RTL and apply the changes
|
|
80
|
-
function setDir(dir) {
|
|
81
|
-
document.body.dir = dir;
|
|
82
|
-
window['sap-ui-webcomponents-bundle'].applyDirection();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
document.getElementById("sw").addEventListener("ui5-change", (e) => {
|
|
86
|
-
if (e.target.checked) {
|
|
87
|
-
setDir("rtl");
|
|
88
|
-
} else {
|
|
89
|
-
setDir("ltr");
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
</script>
|
|
93
|
-
</body>
|
|
94
|
-
</html>
|