@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
package/dist/Carousel.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var Carousel_1;
|
|
1
8
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
9
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
10
|
+
import languageAware from "@ui5/webcomponents-base/dist/decorators/languageAware.js";
|
|
11
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
12
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event.js";
|
|
13
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
14
|
+
import fastNavigation from "@ui5/webcomponents-base/dist/decorators/fastNavigation.js";
|
|
2
15
|
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
3
16
|
import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
|
|
4
|
-
import {
|
|
5
|
-
isLeft,
|
|
6
|
-
isRight,
|
|
7
|
-
isDown,
|
|
8
|
-
isUp,
|
|
9
|
-
isF7,
|
|
10
|
-
} from "@ui5/webcomponents-base/dist/Keys.js";
|
|
17
|
+
import { isLeft, isRight, isDown, isUp, isF7, } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
11
18
|
import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
12
19
|
import ScrollEnablement from "@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js";
|
|
13
20
|
import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
|
|
@@ -15,211 +22,18 @@ import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
|
15
22
|
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
16
23
|
import AnimationMode from "@ui5/webcomponents-base/dist/types/AnimationMode.js";
|
|
17
24
|
import { getAnimationMode } from "@ui5/webcomponents-base/dist/config/AnimationMode.js";
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
CAROUSEL_PREVIOUS_ARROW_TEXT,
|
|
22
|
-
CAROUSEL_NEXT_ARROW_TEXT,
|
|
23
|
-
} from "./generated/i18n/i18n-defaults.js";
|
|
25
|
+
import { CAROUSEL_OF_TEXT, CAROUSEL_DOT_TEXT, CAROUSEL_PREVIOUS_ARROW_TEXT, CAROUSEL_NEXT_ARROW_TEXT,
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
} from "./generated/i18n/i18n-defaults.js";
|
|
24
28
|
import CarouselArrowsPlacement from "./types/CarouselArrowsPlacement.js";
|
|
25
29
|
import CarouselPageIndicatorStyle from "./types/CarouselPageIndicatorStyle.js";
|
|
26
30
|
import CarouselTemplate from "./generated/templates/CarouselTemplate.lit.js";
|
|
27
31
|
import "@ui5/webcomponents-icons/dist/slim-arrow-left.js";
|
|
28
32
|
import "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
29
|
-
|
|
30
33
|
import Button from "./Button.js";
|
|
31
34
|
import Label from "./Label.js";
|
|
32
|
-
|
|
33
35
|
// Styles
|
|
34
36
|
import CarouselCss from "./generated/themes/Carousel.css.js";
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
const metadata = {
|
|
40
|
-
tag: "ui5-carousel",
|
|
41
|
-
languageAware: true,
|
|
42
|
-
fastNavigation: true,
|
|
43
|
-
properties: /** @lends sap.ui.webc.main.Carousel.prototype */ {
|
|
44
|
-
/**
|
|
45
|
-
* Defines whether the carousel should loop, i.e show the first page after the last page is reached and vice versa.
|
|
46
|
-
* @type {boolean}
|
|
47
|
-
* @defaultvalue false
|
|
48
|
-
* @public
|
|
49
|
-
*/
|
|
50
|
-
cyclic: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Defines the number of items per page on small size (up to 640px). One item per page shown by default.
|
|
56
|
-
* @type {sap.ui.webc.base.types.Integer}
|
|
57
|
-
* @defaultvalue 1
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
itemsPerPageS: {
|
|
61
|
-
type: Integer,
|
|
62
|
-
defaultValue: 1,
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Defines the number of items per page on medium size (from 640px to 1024px). One item per page shown by default.
|
|
67
|
-
* @type {sap.ui.webc.base.types.Integer}
|
|
68
|
-
* @defaultvalue 1
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
itemsPerPageM: {
|
|
72
|
-
type: Integer,
|
|
73
|
-
defaultValue: 1,
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Defines the number of items per page on large size (more than 1024px). One item per page shown by default.
|
|
78
|
-
* @type {sap.ui.webc.base.types.Integer}
|
|
79
|
-
* @defaultvalue 1
|
|
80
|
-
* @public
|
|
81
|
-
*/
|
|
82
|
-
itemsPerPageL: {
|
|
83
|
-
type: Integer,
|
|
84
|
-
defaultValue: 1,
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Defines the visibility of the navigation arrows.
|
|
89
|
-
* If set to true the navigation arrows will be hidden.
|
|
90
|
-
* <br><br>
|
|
91
|
-
* <b>Note:</b> The navigation arrows are never displayed on touch devices.
|
|
92
|
-
* In this case, the user can swipe to navigate through the items.
|
|
93
|
-
* @type {boolean}
|
|
94
|
-
* @since 1.0.0-rc.15
|
|
95
|
-
* @defaultvalue false
|
|
96
|
-
* @public
|
|
97
|
-
*/
|
|
98
|
-
hideNavigationArrows: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Defines the visibility of the page indicator.
|
|
104
|
-
* If set to true the page indicator will be hidden.
|
|
105
|
-
* @type {boolean}
|
|
106
|
-
* @since 1.0.0-rc.15
|
|
107
|
-
* @defaultvalue false
|
|
108
|
-
* @public
|
|
109
|
-
*/
|
|
110
|
-
hidePageIndicator: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Defines the style of the page indicator.
|
|
116
|
-
* Available options are:
|
|
117
|
-
* <ul>
|
|
118
|
-
* <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>
|
|
119
|
-
* <li><code>Numeric</code> - The page indicator will display the current page and the total number of pages. (e.g. X of Y)</li>
|
|
120
|
-
* </ul>
|
|
121
|
-
* @type {sap.ui.webc.main.types.CarouselPageIndicatorStyle}
|
|
122
|
-
* @since 1.10
|
|
123
|
-
* @defaultvalue "Default"
|
|
124
|
-
* @public
|
|
125
|
-
*/
|
|
126
|
-
pageIndicatorStyle: {
|
|
127
|
-
type: CarouselPageIndicatorStyle,
|
|
128
|
-
defaultValue: CarouselPageIndicatorStyle.Default,
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Defines the index of the initially selected item.
|
|
133
|
-
* @type {sap.ui.webc.base.types.Integer}
|
|
134
|
-
* @defaultvalue 0
|
|
135
|
-
* @private
|
|
136
|
-
*/
|
|
137
|
-
_selectedIndex: {
|
|
138
|
-
type: Integer,
|
|
139
|
-
defaultValue: 0,
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Defines the position of arrows.
|
|
144
|
-
* <br><br>
|
|
145
|
-
* Available options are:
|
|
146
|
-
* <ul>
|
|
147
|
-
* <li><code>Content</code></li>
|
|
148
|
-
* <li><code>Navigation</code></li>
|
|
149
|
-
* </ul>
|
|
150
|
-
* <br>
|
|
151
|
-
* When set to "Content", the arrows are placed on the sides of the current page.
|
|
152
|
-
* <br>
|
|
153
|
-
* When set to "Navigation", the arrows are placed on the sides of the page indicator.
|
|
154
|
-
* @type {sap.ui.webc.main.types.CarouselArrowsPlacement}
|
|
155
|
-
* @defaultvalue "Content"
|
|
156
|
-
* @public
|
|
157
|
-
*/
|
|
158
|
-
arrowsPlacement: {
|
|
159
|
-
type: CarouselArrowsPlacement,
|
|
160
|
-
defaultValue: CarouselArrowsPlacement.Content,
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Defines the carousel width in pixels.
|
|
165
|
-
* @private
|
|
166
|
-
*/
|
|
167
|
-
_width: {
|
|
168
|
-
type: Integer,
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Defines the carousel item width in pixels.
|
|
173
|
-
* @private
|
|
174
|
-
*/
|
|
175
|
-
_itemWidth: {
|
|
176
|
-
type: Integer,
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* If set to true navigation arrows are shown.
|
|
181
|
-
* @private
|
|
182
|
-
* @since 1.0.0-rc.15
|
|
183
|
-
*/
|
|
184
|
-
_visibleNavigationArrows: {
|
|
185
|
-
type: Boolean,
|
|
186
|
-
noAttribute: true,
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
managedSlots: true,
|
|
190
|
-
slots: /** @lends sap.ui.webc.main.Carousel.prototype */ {
|
|
191
|
-
/**
|
|
192
|
-
* Defines the content of the component.
|
|
193
|
-
* @type {HTMLElement[]}
|
|
194
|
-
* @slot content
|
|
195
|
-
* @public
|
|
196
|
-
*/
|
|
197
|
-
"default": {
|
|
198
|
-
propertyName: "content",
|
|
199
|
-
type: HTMLElement,
|
|
200
|
-
individualSlots: true,
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
events: /** @lends sap.ui.webc.main.Carousel.prototype */ {
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Fired whenever the page changes due to user interaction,
|
|
207
|
-
* when the user clicks on the navigation arrows or while resizing,
|
|
208
|
-
* based on the <code>items-per-page-l</code>, <code>items-per-page-m</code> and <code>items-per-page-s</code> properties.
|
|
209
|
-
*
|
|
210
|
-
* @event
|
|
211
|
-
* @param {Integer} selectedIndex the current selected index
|
|
212
|
-
* @public
|
|
213
|
-
* @since 1.0.0-rc.7
|
|
214
|
-
*/
|
|
215
|
-
navigate: {
|
|
216
|
-
detail: {
|
|
217
|
-
selectedIndex: { type: Integer },
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
};
|
|
222
|
-
|
|
223
37
|
/**
|
|
224
38
|
* @class
|
|
225
39
|
*
|
|
@@ -288,444 +102,434 @@ const metadata = {
|
|
|
288
102
|
* @since 1.0.0-rc.6
|
|
289
103
|
* @public
|
|
290
104
|
*/
|
|
291
|
-
class Carousel extends UI5Element {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
Button,
|
|
720
|
-
Label,
|
|
721
|
-
];
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
static async onDefine() {
|
|
725
|
-
Carousel.i18nBundle = await getI18nBundle("@ui5/webcomponents");
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
|
|
105
|
+
let Carousel = Carousel_1 = class Carousel extends UI5Element {
|
|
106
|
+
static get render() {
|
|
107
|
+
return litRender;
|
|
108
|
+
}
|
|
109
|
+
static get styles() {
|
|
110
|
+
return CarouselCss;
|
|
111
|
+
}
|
|
112
|
+
static get template() {
|
|
113
|
+
return CarouselTemplate;
|
|
114
|
+
}
|
|
115
|
+
static get pageTypeLimit() {
|
|
116
|
+
return 9;
|
|
117
|
+
}
|
|
118
|
+
constructor() {
|
|
119
|
+
super();
|
|
120
|
+
this._scrollEnablement = new ScrollEnablement(this);
|
|
121
|
+
this._scrollEnablement.attachEvent("touchend", e => {
|
|
122
|
+
this._updateScrolling(e);
|
|
123
|
+
});
|
|
124
|
+
this._onResizeBound = this._onResize.bind(this);
|
|
125
|
+
this._resizing = false; // indicates if the carousel is in process of resizing
|
|
126
|
+
this._lastFocusedElements = [];
|
|
127
|
+
this._orderOfLastFocusedPages = [];
|
|
128
|
+
}
|
|
129
|
+
onBeforeRendering() {
|
|
130
|
+
if (this.arrowsPlacement === CarouselArrowsPlacement.Navigation) {
|
|
131
|
+
this._visibleNavigationArrows = true;
|
|
132
|
+
}
|
|
133
|
+
this.validateSelectedIndex();
|
|
134
|
+
}
|
|
135
|
+
onAfterRendering() {
|
|
136
|
+
this._scrollEnablement.scrollContainer = this.getDomRef();
|
|
137
|
+
this._resizing = false; // not invalidating
|
|
138
|
+
}
|
|
139
|
+
onEnterDOM() {
|
|
140
|
+
ResizeHandler.register(this, this._onResizeBound);
|
|
141
|
+
}
|
|
142
|
+
onExitDOM() {
|
|
143
|
+
ResizeHandler.deregister(this, this._onResizeBound);
|
|
144
|
+
}
|
|
145
|
+
validateSelectedIndex() {
|
|
146
|
+
if (!this.isIndexInRange(this._selectedIndex)) {
|
|
147
|
+
this._selectedIndex = 0;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
_onResize() {
|
|
151
|
+
const previousItemsPerPage = this.effectiveItemsPerPage;
|
|
152
|
+
// Set the resizing flag to suppress animation while resizing
|
|
153
|
+
this._resizing = true;
|
|
154
|
+
// Change transitively effectiveItemsPerPage by modifying _width
|
|
155
|
+
this._width = this.offsetWidth;
|
|
156
|
+
this._itemWidth = Math.floor(this._width / this.effectiveItemsPerPage);
|
|
157
|
+
// Items per page did not change or the current,
|
|
158
|
+
// therefore page index does not need to be re-adjusted
|
|
159
|
+
if (this.effectiveItemsPerPage === previousItemsPerPage) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (this._selectedIndex > this.pagesCount - 1) {
|
|
163
|
+
this._selectedIndex = this.pagesCount - 1;
|
|
164
|
+
this.fireEvent("navigate", { selectedIndex: this._selectedIndex });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
_updateScrolling(e) {
|
|
168
|
+
if (!e) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (e.isLeft) {
|
|
172
|
+
this.navigateLeft();
|
|
173
|
+
}
|
|
174
|
+
else if (e.isRight) {
|
|
175
|
+
this.navigateRight();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
async _onkeydown(e) {
|
|
179
|
+
if (isF7(e)) {
|
|
180
|
+
this._handleF7Key(e);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (e.target !== this.getDomRef()) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (isLeft(e) || isDown(e)) {
|
|
187
|
+
this.navigateLeft();
|
|
188
|
+
await renderFinished();
|
|
189
|
+
this.getDomRef().focus();
|
|
190
|
+
}
|
|
191
|
+
else if (isRight(e) || isUp(e)) {
|
|
192
|
+
this.navigateRight();
|
|
193
|
+
await renderFinished();
|
|
194
|
+
this.getDomRef().focus();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
_onfocusin(e) {
|
|
198
|
+
const target = e.target;
|
|
199
|
+
if (target === this.getDomRef()) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
let pageIndex = -1;
|
|
203
|
+
for (let i = 0; i < this.content.length; i++) {
|
|
204
|
+
if (this.content[i].contains(target)) {
|
|
205
|
+
pageIndex = i;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (pageIndex === -1) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
// Save reference of the last focused element for each page
|
|
213
|
+
this._lastFocusedElements[pageIndex] = target;
|
|
214
|
+
const sortedPageIndex = this._orderOfLastFocusedPages.indexOf(pageIndex);
|
|
215
|
+
if (sortedPageIndex === -1) {
|
|
216
|
+
this._orderOfLastFocusedPages.unshift(pageIndex);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
this._orderOfLastFocusedPages.splice(0, 0, this._orderOfLastFocusedPages.splice(sortedPageIndex, 1)[0]);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
_onmouseout() {
|
|
223
|
+
if (this.arrowsPlacement === CarouselArrowsPlacement.Content) {
|
|
224
|
+
this._visibleNavigationArrows = false;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
_onmouseover() {
|
|
228
|
+
if (this.arrowsPlacement === CarouselArrowsPlacement.Content) {
|
|
229
|
+
this._visibleNavigationArrows = true;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
_handleF7Key(e) {
|
|
233
|
+
const lastFocusedElement = this._lastFocusedElements[this._getLastFocusedActivePageIndex];
|
|
234
|
+
if (e.target === this.getDomRef() && lastFocusedElement) {
|
|
235
|
+
lastFocusedElement.focus();
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
this.getDomRef().focus();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
get _getLastFocusedActivePageIndex() {
|
|
242
|
+
for (let i = 0; i < this._orderOfLastFocusedPages.length; i++) {
|
|
243
|
+
const pageIndex = this._orderOfLastFocusedPages[i];
|
|
244
|
+
if (this.isItemInViewport(pageIndex)) {
|
|
245
|
+
return pageIndex;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return this._selectedIndex;
|
|
249
|
+
}
|
|
250
|
+
navigateLeft() {
|
|
251
|
+
this._resizing = false;
|
|
252
|
+
const previousSelectedIndex = this._selectedIndex;
|
|
253
|
+
if (this._selectedIndex - 1 < 0) {
|
|
254
|
+
if (this.cyclic) {
|
|
255
|
+
this._selectedIndex = this.pagesCount - 1;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
--this._selectedIndex;
|
|
260
|
+
}
|
|
261
|
+
if (previousSelectedIndex !== this._selectedIndex) {
|
|
262
|
+
this.fireEvent("navigate", { selectedIndex: this._selectedIndex });
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
navigateRight() {
|
|
266
|
+
this._resizing = false;
|
|
267
|
+
const previousSelectedIndex = this._selectedIndex;
|
|
268
|
+
if (this._selectedIndex + 1 > this.pagesCount - 1) {
|
|
269
|
+
if (this.cyclic) {
|
|
270
|
+
this._selectedIndex = 0;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
++this._selectedIndex;
|
|
278
|
+
}
|
|
279
|
+
if (previousSelectedIndex !== this._selectedIndex) {
|
|
280
|
+
this.fireEvent("navigate", { selectedIndex: this._selectedIndex });
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
_navButtonClick(e) {
|
|
284
|
+
const button = e.target;
|
|
285
|
+
if (button.hasAttribute("arrow-forward")) {
|
|
286
|
+
this.navigateRight();
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
this.navigateLeft();
|
|
290
|
+
}
|
|
291
|
+
this.focus();
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Changes the currently displayed page.
|
|
295
|
+
* @param {Integer} itemIndex The index of the target page
|
|
296
|
+
* @since 1.0.0-rc.15
|
|
297
|
+
* @method
|
|
298
|
+
* @name sap.ui.webc.main.Carousel#navigateTo
|
|
299
|
+
* @public
|
|
300
|
+
*/
|
|
301
|
+
navigateTo(itemIndex) {
|
|
302
|
+
this._resizing = false;
|
|
303
|
+
this._selectedIndex = itemIndex;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Assuming that all items have the same width
|
|
307
|
+
* @private
|
|
308
|
+
*/
|
|
309
|
+
get items() {
|
|
310
|
+
return this.content.map((item, idx) => {
|
|
311
|
+
const visible = this.isItemInViewport(idx);
|
|
312
|
+
return {
|
|
313
|
+
id: `${this._id}-carousel-item-${idx + 1}`,
|
|
314
|
+
item,
|
|
315
|
+
tabIndex: visible ? "0" : "-1",
|
|
316
|
+
posinset: `${idx + 1}`,
|
|
317
|
+
setsize: `${this.content.length}`,
|
|
318
|
+
styles: {
|
|
319
|
+
width: `${this._itemWidth || 0}px`,
|
|
320
|
+
},
|
|
321
|
+
classes: visible ? "" : "ui5-carousel-item--hidden",
|
|
322
|
+
};
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
get effectiveItemsPerPage() {
|
|
326
|
+
if (!this._width) {
|
|
327
|
+
return this.itemsPerPageL;
|
|
328
|
+
}
|
|
329
|
+
if (this._width <= 640) {
|
|
330
|
+
return this.itemsPerPageS;
|
|
331
|
+
}
|
|
332
|
+
if (this._width <= 1024) {
|
|
333
|
+
return this.itemsPerPageM;
|
|
334
|
+
}
|
|
335
|
+
return this.itemsPerPageL;
|
|
336
|
+
}
|
|
337
|
+
isItemInViewport(index) {
|
|
338
|
+
return index >= this._selectedIndex && index <= this._selectedIndex + this.effectiveItemsPerPage - 1;
|
|
339
|
+
}
|
|
340
|
+
isIndexInRange(index) {
|
|
341
|
+
return index >= 0 && index <= this.pagesCount - 1;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* @private
|
|
345
|
+
*/
|
|
346
|
+
get renderNavigation() {
|
|
347
|
+
if (!this.hasManyPages) {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
if (this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows) {
|
|
351
|
+
return true;
|
|
352
|
+
}
|
|
353
|
+
if (this.hidePageIndicator) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
get hasManyPages() {
|
|
359
|
+
return this.pagesCount > 1;
|
|
360
|
+
}
|
|
361
|
+
get styles() {
|
|
362
|
+
const items = this._itemWidth || 0;
|
|
363
|
+
return {
|
|
364
|
+
content: {
|
|
365
|
+
transform: `translateX(${this._isRTL ? "" : "-"}${this._selectedIndex * items}px`,
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
get classes() {
|
|
370
|
+
return {
|
|
371
|
+
viewport: {
|
|
372
|
+
"ui5-carousel-viewport": true,
|
|
373
|
+
"ui5-carousel-viewport--single": this.pagesCount === 1,
|
|
374
|
+
},
|
|
375
|
+
content: {
|
|
376
|
+
"ui5-carousel-content": true,
|
|
377
|
+
"ui5-carousel-content-no-animation": this.suppressAnimation,
|
|
378
|
+
"ui5-carousel-content-has-navigation": this.renderNavigation,
|
|
379
|
+
"ui5-carousel-content-has-navigation-and-buttons": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,
|
|
380
|
+
},
|
|
381
|
+
navigation: {
|
|
382
|
+
"ui5-carousel-navigation-wrapper": true,
|
|
383
|
+
"ui5-carousel-navigation-with-buttons": this.renderNavigation && this.arrowsPlacement === CarouselArrowsPlacement.Navigation && !this.hideNavigationArrows,
|
|
384
|
+
},
|
|
385
|
+
navPrevButton: {
|
|
386
|
+
"ui5-carousel-navigation-button--hidden": !this.hasPrev,
|
|
387
|
+
},
|
|
388
|
+
navNextButton: {
|
|
389
|
+
"ui5-carousel-navigation-button--hidden": !this.hasNext,
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
get pagesCount() {
|
|
394
|
+
const items = this.content.length;
|
|
395
|
+
return items > this.effectiveItemsPerPage ? items - this.effectiveItemsPerPage + 1 : 1;
|
|
396
|
+
}
|
|
397
|
+
get isPageTypeDots() {
|
|
398
|
+
if (this.pageIndicatorStyle === CarouselPageIndicatorStyle.Numeric) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
return this.pagesCount < Carousel_1.pageTypeLimit;
|
|
402
|
+
}
|
|
403
|
+
get dots() {
|
|
404
|
+
const dots = [];
|
|
405
|
+
const pages = this.pagesCount;
|
|
406
|
+
for (let index = 0; index < pages; index++) {
|
|
407
|
+
dots.push({
|
|
408
|
+
active: index === this._selectedIndex,
|
|
409
|
+
ariaLabel: Carousel_1.i18nBundle.getText(CAROUSEL_DOT_TEXT, index + 1, pages),
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
return dots;
|
|
413
|
+
}
|
|
414
|
+
get showArrows() {
|
|
415
|
+
const displayArrows = this._visibleNavigationArrows && this.hasManyPages && isDesktop();
|
|
416
|
+
return {
|
|
417
|
+
content: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Content,
|
|
418
|
+
navigation: !this.hideNavigationArrows && displayArrows && this.arrowsPlacement === CarouselArrowsPlacement.Navigation,
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
get hasPrev() {
|
|
422
|
+
return this.cyclic || this._selectedIndex - 1 >= 0;
|
|
423
|
+
}
|
|
424
|
+
get hasNext() {
|
|
425
|
+
return this.cyclic || this._selectedIndex + 1 <= this.pagesCount - 1;
|
|
426
|
+
}
|
|
427
|
+
get suppressAnimation() {
|
|
428
|
+
return this._resizing || getAnimationMode() === AnimationMode.None;
|
|
429
|
+
}
|
|
430
|
+
get _isRTL() {
|
|
431
|
+
return this.effectiveDir === "rtl";
|
|
432
|
+
}
|
|
433
|
+
get selectedIndexToShow() {
|
|
434
|
+
return this._isRTL ? this.pagesCount - (this.pagesCount - this._selectedIndex) + 1 : this._selectedIndex + 1;
|
|
435
|
+
}
|
|
436
|
+
get ofText() {
|
|
437
|
+
return Carousel_1.i18nBundle.getText(CAROUSEL_OF_TEXT);
|
|
438
|
+
}
|
|
439
|
+
get ariaActiveDescendant() {
|
|
440
|
+
return this.content.length ? `${this._id}-carousel-item-${this._selectedIndex + 1}` : undefined;
|
|
441
|
+
}
|
|
442
|
+
get nextPageText() {
|
|
443
|
+
return Carousel_1.i18nBundle.getText(CAROUSEL_NEXT_ARROW_TEXT);
|
|
444
|
+
}
|
|
445
|
+
get previousPageText() {
|
|
446
|
+
return Carousel_1.i18nBundle.getText(CAROUSEL_PREVIOUS_ARROW_TEXT);
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* The indices of the currently visible items of the component.
|
|
450
|
+
* @readonly
|
|
451
|
+
* @since 1.0.0-rc.15
|
|
452
|
+
* @returns {Integer[]} the indices of the visible items
|
|
453
|
+
*/
|
|
454
|
+
get visibleItemsIndices() {
|
|
455
|
+
const visibleItemsIndices = [];
|
|
456
|
+
this.items.forEach((item, index) => {
|
|
457
|
+
if (this.isItemInViewport(index)) {
|
|
458
|
+
visibleItemsIndices.push(index);
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
return visibleItemsIndices;
|
|
462
|
+
}
|
|
463
|
+
static get dependencies() {
|
|
464
|
+
return [
|
|
465
|
+
Button,
|
|
466
|
+
Label,
|
|
467
|
+
];
|
|
468
|
+
}
|
|
469
|
+
static async onDefine() {
|
|
470
|
+
Carousel_1.i18nBundle = await getI18nBundle("@ui5/webcomponents");
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
__decorate([
|
|
474
|
+
property({ type: Boolean })
|
|
475
|
+
], Carousel.prototype, "cyclic", void 0);
|
|
476
|
+
__decorate([
|
|
477
|
+
property({ validator: Integer, defaultValue: 1 })
|
|
478
|
+
], Carousel.prototype, "itemsPerPageS", void 0);
|
|
479
|
+
__decorate([
|
|
480
|
+
property({ validator: Integer, defaultValue: 1 })
|
|
481
|
+
], Carousel.prototype, "itemsPerPageM", void 0);
|
|
482
|
+
__decorate([
|
|
483
|
+
property({ validator: Integer, defaultValue: 1 })
|
|
484
|
+
], Carousel.prototype, "itemsPerPageL", void 0);
|
|
485
|
+
__decorate([
|
|
486
|
+
property({ type: Boolean })
|
|
487
|
+
], Carousel.prototype, "hideNavigationArrows", void 0);
|
|
488
|
+
__decorate([
|
|
489
|
+
property({ type: Boolean })
|
|
490
|
+
], Carousel.prototype, "hidePageIndicator", void 0);
|
|
491
|
+
__decorate([
|
|
492
|
+
property({ type: CarouselPageIndicatorStyle, defaultValue: CarouselPageIndicatorStyle.Default })
|
|
493
|
+
], Carousel.prototype, "pageIndicatorStyle", void 0);
|
|
494
|
+
__decorate([
|
|
495
|
+
property({ validator: Integer, defaultValue: 0 })
|
|
496
|
+
], Carousel.prototype, "_selectedIndex", void 0);
|
|
497
|
+
__decorate([
|
|
498
|
+
property({ type: CarouselArrowsPlacement, defaultValue: CarouselArrowsPlacement.Content })
|
|
499
|
+
], Carousel.prototype, "arrowsPlacement", void 0);
|
|
500
|
+
__decorate([
|
|
501
|
+
property({ validator: Integer })
|
|
502
|
+
], Carousel.prototype, "_width", void 0);
|
|
503
|
+
__decorate([
|
|
504
|
+
property({ validator: Integer })
|
|
505
|
+
], Carousel.prototype, "_itemWidth", void 0);
|
|
506
|
+
__decorate([
|
|
507
|
+
property({ type: Boolean, noAttribute: true })
|
|
508
|
+
], Carousel.prototype, "_visibleNavigationArrows", void 0);
|
|
509
|
+
__decorate([
|
|
510
|
+
slot({ "default": true, type: HTMLElement, individualSlots: true })
|
|
511
|
+
], Carousel.prototype, "content", void 0);
|
|
512
|
+
Carousel = Carousel_1 = __decorate([
|
|
513
|
+
customElement("ui5-carousel"),
|
|
514
|
+
languageAware,
|
|
515
|
+
fastNavigation
|
|
516
|
+
/**
|
|
517
|
+
* Fired whenever the page changes due to user interaction,
|
|
518
|
+
* when the user clicks on the navigation arrows or while resizing,
|
|
519
|
+
* based on the <code>items-per-page-l</code>, <code>items-per-page-m</code> and <code>items-per-page-s</code> properties.
|
|
520
|
+
*
|
|
521
|
+
* @event sap.ui.webc.main.Carousel#navigate
|
|
522
|
+
* @param {Integer} selectedIndex the current selected index
|
|
523
|
+
* @public
|
|
524
|
+
* @since 1.0.0-rc.7
|
|
525
|
+
*/
|
|
526
|
+
,
|
|
527
|
+
event("navigate", {
|
|
528
|
+
detail: {
|
|
529
|
+
selectedIndex: { type: Integer },
|
|
530
|
+
},
|
|
531
|
+
})
|
|
532
|
+
], Carousel);
|
|
729
533
|
Carousel.define();
|
|
730
|
-
|
|
731
534
|
export default Carousel;
|
|
535
|
+
//# sourceMappingURL=Carousel.js.map
|