@ui5/webcomponents 1.10.1 → 1.10.2
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/.dev-server-port +1 -0
- package/package.json +8 -9
- package/LICENSE.txt +0 -201
- package/dist/assets/test/pages/72override.html.dda35518.css +0 -1
- package/dist/assets/test/pages/AnimanitionOff.html.b7566ecc.css +0 -1
- package/dist/assets/test/pages/Avatar.html.62cc0573.css +0 -1
- package/dist/assets/test/pages/AvatarGroup.html.20647fe1.css +0 -1
- package/dist/assets/test/pages/Badge.html.bcc1c9a3.css +0 -1
- package/dist/assets/test/pages/Breadcrumbs.html.5753069f.css +0 -1
- package/dist/assets/test/pages/BusyIndicator.html.ce95c23c.css +0 -1
- package/dist/assets/test/pages/Button.html.957848f0.css +0 -1
- package/dist/assets/test/pages/Calendar.html.9ff42e30.css +0 -1
- package/dist/assets/test/pages/Card.html.8c5e4756.css +0 -1
- package/dist/assets/test/pages/Carousel.html.fcdd32a7.css +0 -1
- package/dist/assets/test/pages/CheckBox.html.08ae630d.css +0 -1
- package/dist/assets/test/pages/ColorPalette.html.8c4c4ca3.css +0 -1
- package/dist/assets/test/pages/ColorPalettePopover.html.727f90e2.css +0 -1
- package/dist/assets/test/pages/ColorPicker.html.cc0c0d29.css +0 -1
- package/dist/assets/test/pages/ComboBox.html.14fbc3aa.css +0 -1
- package/dist/assets/test/pages/ComboBox.html.c091a8e7.js +0 -1
- package/dist/assets/test/pages/Components.html.b41617c5.css +0 -1
- package/dist/assets/test/pages/CoreControls.html.dabd050c.css +0 -1
- package/dist/assets/test/pages/CoreControls_exp.html.46ab2dc9.css +0 -1
- package/dist/assets/test/pages/CustomCSS.html.4d6e9b1f.css +0 -1
- package/dist/assets/test/pages/DatePicker.html.e667d0b8.css +0 -1
- package/dist/assets/test/pages/DatePicker_test_page.html.882ab55e.css +0 -1
- package/dist/assets/test/pages/DateRangePicker.html.1b5072fd.css +0 -1
- package/dist/assets/test/pages/DateTimePicker.html.eff0e2e0.css +0 -1
- package/dist/assets/test/pages/DayPicker.html.5700622a.css +0 -1
- package/dist/assets/test/pages/Dialog.html.329cb1dc.css +0 -1
- package/dist/assets/test/pages/DialogLifecycle.html.e4ac6ba2.css +0 -1
- package/dist/assets/test/pages/DialogSemantic.html.f61ec13d.css +0 -1
- package/dist/assets/test/pages/DurationPicker.html.92ecf486.css +0 -1
- package/dist/assets/test/pages/Eventing.html.cd934528.css +0 -1
- package/dist/assets/test/pages/FileUploader.html.30b8cbbd.css +0 -1
- package/dist/assets/test/pages/FormSupport.html.4e02207b.css +0 -1
- package/dist/assets/test/pages/HCB.html.d458990b.css +0 -1
- package/dist/assets/test/pages/Icon.html.5f0fd46d.js +0 -1
- package/dist/assets/test/pages/Icon.html.be3b1acc.css +0 -1
- package/dist/assets/test/pages/Input.html.85ce57b4.css +0 -1
- package/dist/assets/test/pages/Input_quickview.html.86df3de3.css +0 -1
- package/dist/assets/test/pages/InputsAlignment.html.5c5593c2.css +0 -1
- package/dist/assets/test/pages/ItemNavigation.html.f5758aae.css +0 -1
- package/dist/assets/test/pages/Kitchen.html.d0d90fc6.css +0 -1
- package/dist/assets/test/pages/Kitchen.openui5.html.910e3d52.css +0 -1
- package/dist/assets/test/pages/Label.html.26cf5a3e.js +0 -4
- package/dist/assets/test/pages/Label.html.e994dc8e.css +0 -1
- package/dist/assets/test/pages/Link.html.d4c480d9.css +0 -1
- package/dist/assets/test/pages/List.html.65a3c4b3.css +0 -1
- package/dist/assets/test/pages/ListGrowing_Button.html.49bbaf80.css +0 -1
- package/dist/assets/test/pages/ListGrowing_Scroll.html.841dd1ed.css +0 -1
- package/dist/assets/test/pages/List_keyboard_support.html.a7297baf.css +0 -1
- package/dist/assets/test/pages/List_test_page.html.356d4e16.css +0 -1
- package/dist/assets/test/pages/LitKeyFunction.html.f3f9d649.css +0 -1
- package/dist/assets/test/pages/MemoryLeak.html.35d77e5e.css +0 -1
- package/dist/assets/test/pages/Menu.html.a758a26d.css +0 -1
- package/dist/assets/test/pages/MessagePage.html.30ffc162.css +0 -1
- package/dist/assets/test/pages/MessageStrip.html.8c2c85d5.css +0 -1
- package/dist/assets/test/pages/MultiComboBox.html.9ede2c74.css +0 -1
- package/dist/assets/test/pages/MultiInput.html.1c75cdc2.css +0 -1
- package/dist/assets/test/pages/MultiInput_Suggestions.html.79cd0348.css +0 -1
- package/dist/assets/test/pages/OpenUI5.html.cf1daa05.css +0 -1
- package/dist/assets/test/pages/Panel.html.399730d1.css +0 -1
- package/dist/assets/test/pages/Popover.html.6d4f19ad.css +0 -1
- package/dist/assets/test/pages/PopoverArrowBounds.html.c1e5feb1.css +0 -1
- package/dist/assets/test/pages/Popups.html.0d7c434f.js +0 -1
- package/dist/assets/test/pages/Popups.html.bb021765.css +0 -1
- package/dist/assets/test/pages/ProgressIndicator.html.d61b0c53.css +0 -1
- package/dist/assets/test/pages/RTL.html.dbeca857.css +0 -1
- package/dist/assets/test/pages/RadioButton.html.ccfd1850.css +0 -1
- package/dist/assets/test/pages/RangeSlider.html.437a9174.css +0 -1
- package/dist/assets/test/pages/RatingIndicator.html.737cd73b.css +0 -1
- package/dist/assets/test/pages/ResizeHandler.html.ed7c5d20.css +0 -1
- package/dist/assets/test/pages/ResponsivePopover.html.6f67ae07.css +0 -1
- package/dist/assets/test/pages/SegmentedButton.html.8678479b.css +0 -1
- package/dist/assets/test/pages/Select.html.9c98a470.css +0 -1
- package/dist/assets/test/pages/Simple.html.8f2ddb30.css +0 -1
- package/dist/assets/test/pages/Slider.html.8ea10965.css +0 -1
- package/dist/assets/test/pages/SplitButton.html.5c992973.css +0 -1
- package/dist/assets/test/pages/StepInput.html.f22c112d.css +0 -1
- package/dist/assets/test/pages/Switch.html.a4f3262f.css +0 -1
- package/dist/assets/test/pages/TabContainer.html.7f2ade15.css +0 -1
- package/dist/assets/test/pages/Table-perf-pure.html.fce52e4b.css +0 -1
- package/dist/assets/test/pages/Table-perf.html.88634378.css +0 -1
- package/dist/assets/test/pages/Table.html.c43386f4.css +0 -1
- package/dist/assets/test/pages/Table2.html.aca0c111.css +0 -1
- package/dist/assets/test/pages/TableAllPopin.html.ad586de4.css +0 -1
- package/dist/assets/test/pages/TableCustomStyling.html.a85167d6.css +0 -1
- package/dist/assets/test/pages/TableGrouping.html.602ae2ad.css +0 -1
- package/dist/assets/test/pages/TableGrowingWithButton.html.5a39b2bf.css +0 -1
- package/dist/assets/test/pages/TableGrowingWithScroll.html.8ef93d31.css +0 -1
- package/dist/assets/test/pages/TableSelection.html.dba2d678.css +0 -1
- package/dist/assets/test/pages/TextArea.html.f8e10fd6.css +0 -1
- package/dist/assets/test/pages/TimePicker.html.9a4bb300.css +0 -1
- package/dist/assets/test/pages/TimeSelection.html.8ad57759.css +0 -1
- package/dist/assets/test/pages/Title.html.7bb51811.css +0 -1
- package/dist/assets/test/pages/Toast.html.47a93be2.css +0 -1
- package/dist/assets/test/pages/ToggleButton.html.3b7dbb8c.css +0 -1
- package/dist/assets/test/pages/Tree.html.74fe2a1d.css +0 -1
- package/dist/assets/test/pages/WheelSlider_Test_Page.html.8a9a5e49.css +0 -1
- package/dist/assets/test/pages/form.html.f0f82118.css +0 -1
- package/dist/assets/test/pages/i18n-defaultLang.html.b9d79c6b.css +0 -1
- package/dist/assets/test/pages/i18n-demo.html.c6751b5c.css +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 -265
- 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 -255
- package/dist/test/pages/Button.html +0 -267
- package/dist/test/pages/Calendar.html +0 -96
- package/dist/test/pages/Card.html +0 -347
- package/dist/test/pages/Carousel.html +0 -584
- package/dist/test/pages/CheckBox.html +0 -76
- 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 -279
- 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 -193
- package/dist/test/pages/DatePicker_test_page.html +0 -97
- package/dist/test/pages/DateRangePicker.html +0 -64
- package/dist/test/pages/DateTimePicker.html +0 -190
- package/dist/test/pages/DayPicker.html +0 -37
- package/dist/test/pages/Dialog.html +0 -706
- package/dist/test/pages/DialogLifecycle.html +0 -62
- package/dist/test/pages/DialogSemantic.html +0 -58
- package/dist/test/pages/DurationPicker.html +0 -76
- package/dist/test/pages/Eventing.html +0 -33
- package/dist/test/pages/FileUploader.html +0 -138
- package/dist/test/pages/FormSupport.html +0 -59
- package/dist/test/pages/HCB.html +0 -45
- package/dist/test/pages/Icon.html +0 -269
- package/dist/test/pages/Icon_custom.html +0 -26
- package/dist/test/pages/Input.html +0 -722
- package/dist/test/pages/InputFieldMinWidth.html +0 -158
- 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 -638
- package/dist/test/pages/Kitchen.openui5.html +0 -570
- package/dist/test/pages/Label.html +0 -161
- 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 -356
- package/dist/test/pages/LitKeyFunction.html +0 -40
- package/dist/test/pages/MemoryLeak.html +0 -78
- package/dist/test/pages/Menu.html +0 -145
- package/dist/test/pages/MessagePage.html +0 -39
- package/dist/test/pages/MessageStrip.html +0 -55
- package/dist/test/pages/MultiComboBox.html +0 -477
- package/dist/test/pages/MultiInput.html +0 -409
- package/dist/test/pages/MultiInput_Suggestions.html +0 -161
- package/dist/test/pages/OpenUI5.html +0 -83
- package/dist/test/pages/Panel.html +0 -226
- package/dist/test/pages/Popover.html +0 -586
- 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 -85
- package/dist/test/pages/RatingIndicator.html +0 -97
- package/dist/test/pages/ResizeHandler.html +0 -74
- package/dist/test/pages/ResponsivePopover.html +0 -244
- package/dist/test/pages/SegmentedButton.html +0 -116
- package/dist/test/pages/Select.html +0 -240
- package/dist/test/pages/Simple.html +0 -25
- package/dist/test/pages/Slider.html +0 -79
- package/dist/test/pages/SplitButton.html +0 -100
- package/dist/test/pages/StepInput.html +0 -164
- package/dist/test/pages/Switch.html +0 -88
- 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/TextArea.html +0 -222
- package/dist/test/pages/TimePicker.html +0 -81
- package/dist/test/pages/TimeSelection.html +0 -31
- package/dist/test/pages/Title.html +0 -37
- package/dist/test/pages/Toast.html +0 -111
- package/dist/test/pages/ToggleButton.html +0 -69
- package/dist/test/pages/Tree.html +0 -294
- package/dist/test/pages/WheelSlider_Test_Page.html +0 -26
- package/dist/test/pages/base/DOMObserver.html +0 -20
- 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,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.33be618c.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.33be618c.js"></script>
|
|
11
|
-
<link rel="stylesheet" href="/assets/test/pages/ItemNavigation.html.f5758aae.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>
|