@ui5/webcomponents 1.10.0 → 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/CHANGELOG.md +101 -0
- package/dist/Avatar.d.ts +2 -2
- package/dist/Badge.d.ts +3 -3
- package/dist/Breadcrumbs.d.ts +5 -5
- package/dist/Breadcrumbs.js +1 -1
- package/dist/BusyIndicator.d.ts +136 -0
- package/dist/BusyIndicator.js +126 -208
- package/dist/BusyIndicator.js.map +1 -0
- package/dist/Button.d.ts +3 -3
- package/dist/Calendar.d.ts +3 -3
- package/dist/Calendar.js +1 -1
- package/dist/CalendarHeader.d.ts +2 -2
- package/dist/Card.d.ts +3 -3
- package/dist/Card.js +1 -1
- package/dist/CardHeader.d.ts +2 -2
- package/dist/Carousel.d.ts +318 -0
- package/dist/Carousel.js +446 -642
- package/dist/Carousel.js.map +1 -0
- package/dist/CheckBox.d.ts +3 -3
- package/dist/ColorPalette.d.ts +5 -5
- package/dist/ColorPalette.js +1 -1
- package/dist/ColorPaletteItem.d.ts +2 -2
- package/dist/ColorPalettePopover.d.ts +2 -2
- package/dist/ColorPicker.d.ts +2 -2
- package/dist/ComboBox.js +2 -2
- package/dist/CustomListItem.d.ts +1 -1
- package/dist/DatePicker.d.ts +2 -2
- package/dist/DateTimePicker.d.ts +1 -1
- package/dist/DayPicker.d.ts +2 -2
- package/dist/Dialog.d.ts +4 -5
- package/dist/FileUploader.d.ts +4 -4
- package/dist/GroupHeaderListItem.d.ts +1 -1
- package/dist/Icon.d.ts +2 -2
- package/dist/Input.d.ts +5 -5
- package/dist/Input.js +1 -1
- package/dist/Label.d.ts +2 -2
- package/dist/Link.d.ts +2 -2
- package/dist/List.d.ts +4 -3
- package/dist/List.js +1 -1
- package/dist/ListItem.d.ts +1 -1
- package/dist/Menu.d.ts +3 -3
- package/dist/Menu.js +1 -1
- package/dist/MessageStrip.d.ts +2 -2
- package/dist/MonthPicker.d.ts +2 -2
- package/dist/MultiComboBox.js +6 -2
- package/dist/MultiInput.js +1 -1
- package/dist/Panel.d.ts +2 -2
- package/dist/Popover.d.ts +1 -1
- package/dist/Popup.d.ts +3 -3
- package/dist/ProgressIndicator.d.ts +2 -2
- package/dist/RangeSlider.d.ts +1 -1
- package/dist/ResponsivePopover.d.ts +1 -1
- package/dist/SegmentedButton.js +1 -1
- package/dist/Select.js +1 -1
- package/dist/Slider.d.ts +1 -1
- package/dist/SplitButton.d.ts +2 -2
- package/dist/StandardListItem.d.ts +2 -2
- package/dist/StepInput.d.ts +2 -2
- package/dist/SuggestionListItem.d.ts +1 -1
- package/dist/Switch.d.ts +2 -2
- package/dist/TabContainer.js +1 -2
- package/dist/Table.d.ts +6 -4
- package/dist/Table.js +1 -1
- package/dist/TableCell.d.ts +2 -2
- package/dist/TableColumn.d.ts +2 -2
- package/dist/TableGroupRow.d.ts +2 -2
- package/dist/TableRow.d.ts +2 -2
- package/dist/TimePickerBase.d.ts +4 -4
- package/dist/TimeSelection.d.ts +2 -2
- package/dist/Title.d.ts +2 -2
- package/dist/Tree.js +1 -1
- package/dist/WheelSlider.d.ts +2 -2
- package/dist/YearPicker.d.ts +2 -2
- package/dist/api.json +1 -1
- package/dist/generated/templates/CarouselTemplate.lit.js +2 -2
- package/global.d.ts +2 -2
- package/package.json +7 -7
- package/src/Badge.ts +1 -1
- package/src/Breadcrumbs.ts +1 -1
- package/src/{BusyIndicator.js → BusyIndicator.ts} +95 -100
- package/src/Calendar.ts +1 -1
- package/src/Card.ts +1 -1
- package/src/Carousel.hbs +3 -3
- package/src/{Carousel.js → Carousel.ts} +242 -234
- package/src/CheckBox.ts +1 -1
- package/src/ColorPalette.ts +1 -1
- package/src/ComboBox.js +2 -2
- package/src/Dialog.ts +2 -2
- package/src/Input.ts +1 -1
- package/src/List.ts +1 -1
- package/src/ListItem.ts +1 -1
- package/src/Menu.ts +1 -1
- package/src/MultiComboBox.js +6 -2
- package/src/MultiInput.js +1 -1
- package/src/SegmentedButton.js +1 -1
- package/src/Select.js +1 -1
- package/src/TabContainer.js +1 -2
- package/src/Table.ts +1 -1
- package/src/Tree.hbs +1 -1
- package/src/Tree.js +1 -1
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
|
+
import ScrollEnablement from "@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js";
|
|
4
|
+
import type { ScrollEnablementEventListenerParam } from "@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js";
|
|
5
|
+
import CarouselArrowsPlacement from "./types/CarouselArrowsPlacement.js";
|
|
6
|
+
import CarouselPageIndicatorStyle from "./types/CarouselPageIndicatorStyle.js";
|
|
7
|
+
import "@ui5/webcomponents-icons/dist/slim-arrow-left.js";
|
|
8
|
+
import "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
9
|
+
import Button from "./Button.js";
|
|
10
|
+
import Label from "./Label.js";
|
|
11
|
+
type CarouselNavigateEventDetail = {
|
|
12
|
+
selectedIndex: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @class
|
|
16
|
+
*
|
|
17
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
18
|
+
* The Carousel allows the user to browse through a set of items.
|
|
19
|
+
* The component is mostly used for showing a gallery of images, but can hold any other HTML element.
|
|
20
|
+
* <br>
|
|
21
|
+
* There are several ways to perform navigation:
|
|
22
|
+
* <ul>
|
|
23
|
+
* <li>on desktop - the user can navigate using the navigation arrows or with keyboard shorcuts.</li>
|
|
24
|
+
* <li>on mobile - the user can use swipe gestures.</li>
|
|
25
|
+
* </ul>
|
|
26
|
+
*
|
|
27
|
+
* <h3>Usage</h3>
|
|
28
|
+
*
|
|
29
|
+
* <h4>When to use:</h4>
|
|
30
|
+
*
|
|
31
|
+
* <ul>
|
|
32
|
+
* <li>The items you want to display are very different from each other.</li>
|
|
33
|
+
* <li>You want to display the items one after the other.</li>
|
|
34
|
+
* </ul>
|
|
35
|
+
*
|
|
36
|
+
* <h4>When not to use:</h4>
|
|
37
|
+
*
|
|
38
|
+
* <ul>
|
|
39
|
+
* <li>The items you want to display need to be visible at the same time.</li>
|
|
40
|
+
* <li>The items you want to display are uniform and very similar.</li>
|
|
41
|
+
* </ul>
|
|
42
|
+
*
|
|
43
|
+
* <h3>Keyboard Handling</h3>
|
|
44
|
+
*
|
|
45
|
+
* <h4>Basic Navigation</h4>
|
|
46
|
+
* When the <code>ui5-carousel</code> is focused the user can navigate between the items
|
|
47
|
+
* with the following keyboard shortcuts:
|
|
48
|
+
* <br>
|
|
49
|
+
*
|
|
50
|
+
* <h3>CSS Shadow Parts</h3>
|
|
51
|
+
*
|
|
52
|
+
* <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.
|
|
53
|
+
* <br>
|
|
54
|
+
* The <code>ui5-carousel</code> exposes the following CSS Shadow Parts:
|
|
55
|
+
* <ul>
|
|
56
|
+
* <li>content - Used to style the content of the component</li>
|
|
57
|
+
* </ul>
|
|
58
|
+
*
|
|
59
|
+
* * <h4>Fast Navigation</h4>
|
|
60
|
+
* This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.
|
|
61
|
+
* In order to use this functionality, you need to import the following module:
|
|
62
|
+
* <code>import "@ui5/webcomponents-base/dist/features/F6Navigation.js"</code>
|
|
63
|
+
* <br><br>
|
|
64
|
+
*
|
|
65
|
+
* <ul>
|
|
66
|
+
* <li>[UP/DOWN] - Navigates to previous and next item</li>
|
|
67
|
+
* <li>[LEFT/RIGHT] - Navigates to previous and next item</li>
|
|
68
|
+
* </ul>
|
|
69
|
+
*
|
|
70
|
+
* <h3>ES6 Module Import</h3>
|
|
71
|
+
*
|
|
72
|
+
* <code>import "@ui5/webcomponents/dist/Carousel.js";</code>
|
|
73
|
+
*
|
|
74
|
+
* @constructor
|
|
75
|
+
* @author SAP SE
|
|
76
|
+
* @alias sap.ui.webc.main.Carousel
|
|
77
|
+
* @extends sap.ui.webc.base.UI5Element
|
|
78
|
+
* @tagname ui5-carousel
|
|
79
|
+
* @since 1.0.0-rc.6
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
declare class Carousel extends UI5Element {
|
|
83
|
+
/**
|
|
84
|
+
* Defines whether the carousel should loop, i.e show the first page after the last page is reached and vice versa.
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
* @name sap.ui.webc.main.Carousel.prototype.cyclic
|
|
87
|
+
* @defaultvalue false
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
cyclic: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Defines the number of items per page on small size (up to 640px). One item per page shown by default.
|
|
93
|
+
* @type {sap.ui.webc.base.types.Integer}
|
|
94
|
+
* @name sap.ui.webc.main.Carousel.prototype.itemsPerPageS
|
|
95
|
+
* @defaultvalue 1
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
itemsPerPageS: number;
|
|
99
|
+
/**
|
|
100
|
+
* Defines the number of items per page on medium size (from 640px to 1024px). One item per page shown by default.
|
|
101
|
+
* @type {sap.ui.webc.base.types.Integer}
|
|
102
|
+
* @name sap.ui.webc.main.Carousel.prototype.itemsPerPageM
|
|
103
|
+
* @defaultvalue 1
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
itemsPerPageM: number;
|
|
107
|
+
/**
|
|
108
|
+
* Defines the number of items per page on large size (more than 1024px). One item per page shown by default.
|
|
109
|
+
* @type {sap.ui.webc.base.types.Integer}
|
|
110
|
+
* @name sap.ui.webc.main.Carousel.prototype.itemsPerPageL
|
|
111
|
+
* @defaultvalue 1
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
itemsPerPageL: number;
|
|
115
|
+
/**
|
|
116
|
+
* Defines the visibility of the navigation arrows.
|
|
117
|
+
* If set to true the navigation arrows will be hidden.
|
|
118
|
+
* <br><br>
|
|
119
|
+
* <b>Note:</b> The navigation arrows are never displayed on touch devices.
|
|
120
|
+
* In this case, the user can swipe to navigate through the items.
|
|
121
|
+
* @type {boolean}
|
|
122
|
+
* @name sap.ui.webc.main.Carousel.prototype.hideNavigationArrows
|
|
123
|
+
* @since 1.0.0-rc.15
|
|
124
|
+
* @defaultvalue false
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
hideNavigationArrows: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Defines the visibility of the page indicator.
|
|
130
|
+
* If set to true the page indicator will be hidden.
|
|
131
|
+
* @type {boolean}
|
|
132
|
+
* @name sap.ui.webc.main.Carousel.prototype.hidePageIndicator
|
|
133
|
+
* @since 1.0.0-rc.15
|
|
134
|
+
* @defaultvalue false
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
137
|
+
hidePageIndicator: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Defines the style of the page indicator.
|
|
140
|
+
* Available options are:
|
|
141
|
+
* <ul>
|
|
142
|
+
* <li><code>Default</code> - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)</li>
|
|
143
|
+
* <li><code>Numeric</code> - The page indicator will display the current page and the total number of pages. (e.g. X of Y)</li>
|
|
144
|
+
* </ul>
|
|
145
|
+
* @type {sap.ui.webc.main.types.CarouselPageIndicatorStyle}
|
|
146
|
+
* @name sap.ui.webc.main.Carousel.prototype.pageIndicatorStyle
|
|
147
|
+
* @since 1.10
|
|
148
|
+
* @defaultvalue "Default"
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
pageIndicatorStyle: CarouselPageIndicatorStyle;
|
|
152
|
+
/**
|
|
153
|
+
* Defines the index of the initially selected item.
|
|
154
|
+
* @type {sap.ui.webc.base.types.Integer}
|
|
155
|
+
* @name sap.ui.webc.main.Carousel.prototype._selectedIndex
|
|
156
|
+
* @defaultvalue 0
|
|
157
|
+
* @private
|
|
158
|
+
*/
|
|
159
|
+
_selectedIndex: number;
|
|
160
|
+
/**
|
|
161
|
+
* Defines the position of arrows.
|
|
162
|
+
* <br><br>
|
|
163
|
+
* Available options are:
|
|
164
|
+
* <ul>
|
|
165
|
+
* <li><code>Content</code></li>
|
|
166
|
+
* <li><code>Navigation</code></li>
|
|
167
|
+
* </ul>
|
|
168
|
+
* <br>
|
|
169
|
+
* When set to "Content", the arrows are placed on the sides of the current page.
|
|
170
|
+
* <br>
|
|
171
|
+
* When set to "Navigation", the arrows are placed on the sides of the page indicator.
|
|
172
|
+
* @type {sap.ui.webc.main.types.CarouselArrowsPlacement}
|
|
173
|
+
* @name sap.ui.webc.main.Carousel.prototype.arrowsPlacement
|
|
174
|
+
* @defaultvalue "Content"
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
arrowsPlacement: CarouselArrowsPlacement;
|
|
178
|
+
/**
|
|
179
|
+
* Defines the carousel width in pixels.
|
|
180
|
+
* @private
|
|
181
|
+
*/
|
|
182
|
+
_width?: number;
|
|
183
|
+
/**
|
|
184
|
+
* Defines the carousel item width in pixels.
|
|
185
|
+
* @private
|
|
186
|
+
*/
|
|
187
|
+
_itemWidth?: number;
|
|
188
|
+
/**
|
|
189
|
+
* If set to true navigation arrows are shown.
|
|
190
|
+
* @private
|
|
191
|
+
* @since 1.0.0-rc.15
|
|
192
|
+
*/
|
|
193
|
+
_visibleNavigationArrows: boolean;
|
|
194
|
+
_scrollEnablement: ScrollEnablement;
|
|
195
|
+
_onResizeBound: () => void;
|
|
196
|
+
_resizing: boolean;
|
|
197
|
+
_lastFocusedElements: Array<HTMLElement>;
|
|
198
|
+
_orderOfLastFocusedPages: Array<number>;
|
|
199
|
+
/**
|
|
200
|
+
* Defines the content of the component.
|
|
201
|
+
* @type {HTMLElement[]}
|
|
202
|
+
* @slot
|
|
203
|
+
* @name sap.ui.webc.main.Carousel.prototype.default
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
content: Array<HTMLElement>;
|
|
207
|
+
static i18nBundle: I18nBundle;
|
|
208
|
+
static get render(): (templateResult: object, container: HTMLElement | DocumentFragment, styleStrOrHrefsArr: string | string[] | undefined, forStaticArea: boolean, options: import("lit-html").RenderOptions) => void;
|
|
209
|
+
static get styles(): import("@ui5/webcomponents-base/dist/types.js").StyleData;
|
|
210
|
+
static get template(): import("@ui5/webcomponents-base/dist/renderer/executeTemplate.js").TemplateFunction;
|
|
211
|
+
static get pageTypeLimit(): number;
|
|
212
|
+
constructor();
|
|
213
|
+
onBeforeRendering(): void;
|
|
214
|
+
onAfterRendering(): void;
|
|
215
|
+
onEnterDOM(): void;
|
|
216
|
+
onExitDOM(): void;
|
|
217
|
+
validateSelectedIndex(): void;
|
|
218
|
+
_onResize(): void;
|
|
219
|
+
_updateScrolling(e: ScrollEnablementEventListenerParam): void;
|
|
220
|
+
_onkeydown(e: KeyboardEvent): Promise<void>;
|
|
221
|
+
_onfocusin(e: FocusEvent): void;
|
|
222
|
+
_onmouseout(): void;
|
|
223
|
+
_onmouseover(): void;
|
|
224
|
+
_handleF7Key(e: KeyboardEvent): void;
|
|
225
|
+
get _getLastFocusedActivePageIndex(): number;
|
|
226
|
+
navigateLeft(): void;
|
|
227
|
+
navigateRight(): void;
|
|
228
|
+
_navButtonClick(e: MouseEvent): void;
|
|
229
|
+
/**
|
|
230
|
+
* Changes the currently displayed page.
|
|
231
|
+
* @param {Integer} itemIndex The index of the target page
|
|
232
|
+
* @since 1.0.0-rc.15
|
|
233
|
+
* @method
|
|
234
|
+
* @name sap.ui.webc.main.Carousel#navigateTo
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
237
|
+
navigateTo(itemIndex: number): void;
|
|
238
|
+
/**
|
|
239
|
+
* Assuming that all items have the same width
|
|
240
|
+
* @private
|
|
241
|
+
*/
|
|
242
|
+
get items(): {
|
|
243
|
+
id: string;
|
|
244
|
+
item: HTMLElement;
|
|
245
|
+
tabIndex: string;
|
|
246
|
+
posinset: string;
|
|
247
|
+
setsize: string;
|
|
248
|
+
styles: {
|
|
249
|
+
width: string;
|
|
250
|
+
};
|
|
251
|
+
classes: string;
|
|
252
|
+
}[];
|
|
253
|
+
get effectiveItemsPerPage(): number;
|
|
254
|
+
isItemInViewport(index: number): boolean;
|
|
255
|
+
isIndexInRange(index: number): boolean;
|
|
256
|
+
/**
|
|
257
|
+
* @private
|
|
258
|
+
*/
|
|
259
|
+
get renderNavigation(): boolean;
|
|
260
|
+
get hasManyPages(): boolean;
|
|
261
|
+
get styles(): {
|
|
262
|
+
content: {
|
|
263
|
+
transform: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
get classes(): {
|
|
267
|
+
viewport: {
|
|
268
|
+
"ui5-carousel-viewport": boolean;
|
|
269
|
+
"ui5-carousel-viewport--single": boolean;
|
|
270
|
+
};
|
|
271
|
+
content: {
|
|
272
|
+
"ui5-carousel-content": boolean;
|
|
273
|
+
"ui5-carousel-content-no-animation": boolean;
|
|
274
|
+
"ui5-carousel-content-has-navigation": boolean;
|
|
275
|
+
"ui5-carousel-content-has-navigation-and-buttons": boolean;
|
|
276
|
+
};
|
|
277
|
+
navigation: {
|
|
278
|
+
"ui5-carousel-navigation-wrapper": boolean;
|
|
279
|
+
"ui5-carousel-navigation-with-buttons": boolean;
|
|
280
|
+
};
|
|
281
|
+
navPrevButton: {
|
|
282
|
+
"ui5-carousel-navigation-button--hidden": boolean;
|
|
283
|
+
};
|
|
284
|
+
navNextButton: {
|
|
285
|
+
"ui5-carousel-navigation-button--hidden": boolean;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
get pagesCount(): number;
|
|
289
|
+
get isPageTypeDots(): boolean;
|
|
290
|
+
get dots(): {
|
|
291
|
+
active: boolean;
|
|
292
|
+
ariaLabel: string;
|
|
293
|
+
}[];
|
|
294
|
+
get showArrows(): {
|
|
295
|
+
content: boolean;
|
|
296
|
+
navigation: boolean;
|
|
297
|
+
};
|
|
298
|
+
get hasPrev(): boolean;
|
|
299
|
+
get hasNext(): boolean;
|
|
300
|
+
get suppressAnimation(): boolean;
|
|
301
|
+
get _isRTL(): boolean;
|
|
302
|
+
get selectedIndexToShow(): number;
|
|
303
|
+
get ofText(): string;
|
|
304
|
+
get ariaActiveDescendant(): string | undefined;
|
|
305
|
+
get nextPageText(): string;
|
|
306
|
+
get previousPageText(): string;
|
|
307
|
+
/**
|
|
308
|
+
* The indices of the currently visible items of the component.
|
|
309
|
+
* @readonly
|
|
310
|
+
* @since 1.0.0-rc.15
|
|
311
|
+
* @returns {Integer[]} the indices of the visible items
|
|
312
|
+
*/
|
|
313
|
+
get visibleItemsIndices(): number[];
|
|
314
|
+
static get dependencies(): (typeof Label | typeof Button)[];
|
|
315
|
+
static onDefine(): Promise<void>;
|
|
316
|
+
}
|
|
317
|
+
export default Carousel;
|
|
318
|
+
export type { CarouselNavigateEventDetail, };
|