@ui5/webcomponents 1.2.2 → 1.2.5
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/CHANGELOG.md +37 -0
- package/dist/Breadcrumbs.js +3 -3
- package/dist/CardHeader.js +5 -4
- package/dist/DatePicker.js +1 -2
- package/dist/MonthPicker.js +1 -1
- package/dist/Popover.js +29 -72
- package/dist/TimePicker.js +0 -2
- package/dist/TimeSelection.js +7 -0
- package/dist/css/themes/CalendarHeader.css +1 -1
- package/dist/generated/templates/DateTimePickerPopoverTemplate.lit.js +1 -1
- package/dist/generated/themes/CalendarHeader.css.js +1 -1
- package/package.json +7 -7
- package/src/Breadcrumbs.js +3 -3
- package/src/CardHeader.hbs +1 -1
- package/src/CardHeader.js +5 -4
- package/src/DatePicker.js +1 -2
- package/src/DateTimePickerPopover.hbs +2 -0
- package/src/MonthPicker.js +1 -1
- package/src/Popover.js +29 -72
- package/src/TimePicker.js +0 -2
- package/src/TimeSelection.js +7 -0
- package/src/themes/CalendarHeader.css +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.5](https://github.com/SAP/ui5-webcomponents/compare/v1.2.4...v1.2.5) (2022-05-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui5-calendar:** adjust previous and next button styles ([#5226](https://github.com/SAP/ui5-webcomponents/issues/5226)) ([9bcfb21](https://github.com/SAP/ui5-webcomponents/commit/9bcfb21)), closes [#5117](https://github.com/SAP/ui5-webcomponents/issues/5117)
|
|
12
|
+
* **ui5-calendar:** fix displayed month name ([#5212](https://github.com/SAP/ui5-webcomponents/issues/5212)) ([06c7515](https://github.com/SAP/ui5-webcomponents/commit/06c7515))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [1.2.4](https://github.com/SAP/ui5-webcomponents/compare/v1.2.3...v1.2.4) (2022-03-30)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **ui5-card-header:** prevent events from action slot to trigger header's click event ([#4965](https://github.com/SAP/ui5-webcomponents/issues/4965)) ([f87d898](https://github.com/SAP/ui5-webcomponents/commit/f87d898)), closes [#4891](https://github.com/SAP/ui5-webcomponents/issues/4891)
|
|
24
|
+
* **ui5-date-picker:** adjust initial value formatting ([#4967](https://github.com/SAP/ui5-webcomponents/issues/4967)) ([3648b01](https://github.com/SAP/ui5-webcomponents/commit/3648b01)), closes [#4958](https://github.com/SAP/ui5-webcomponents/issues/4958) [#4958](https://github.com/SAP/ui5-webcomponents/issues/4958)
|
|
25
|
+
* **ui5-datetime-picker:** enable secondary calendar type ([#4970](https://github.com/SAP/ui5-webcomponents/issues/4970)) ([6bc84f7](https://github.com/SAP/ui5-webcomponents/commit/6bc84f7)), closes [#4959](https://github.com/SAP/ui5-webcomponents/issues/4959)
|
|
26
|
+
* **ui5-popover:** prevent arrow placement over popover's rounded corners ([#4960](https://github.com/SAP/ui5-webcomponents/issues/4960)) ([66604c3](https://github.com/SAP/ui5-webcomponents/commit/66604c3)), closes [#4599](https://github.com/SAP/ui5-webcomponents/issues/4599) [#4797](https://github.com/SAP/ui5-webcomponents/issues/4797)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [1.2.3](https://github.com/SAP/ui5-webcomponents/compare/v1.2.2...v1.2.3) (2022-03-23)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **ui5-date-picker:** remove aria-expanded attribute ([#4866](https://github.com/SAP/ui5-webcomponents/issues/4866)) ([b62a0e9](https://github.com/SAP/ui5-webcomponents/commit/b62a0e9)), closes [#4865](https://github.com/SAP/ui5-webcomponents/issues/4865)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
6
43
|
## [1.2.2](https://github.com/SAP/ui5-webcomponents/compare/v1.2.1...v1.2.2) (2022-03-22)
|
|
7
44
|
|
|
8
45
|
|
package/dist/Breadcrumbs.js
CHANGED
|
@@ -472,7 +472,7 @@ class Breadcrumbs extends UI5Element {
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
get _currentLocationLabel() {
|
|
475
|
-
return this.shadowRoot.querySelector(".ui5-breadcrumbs-current-location ui5-label");
|
|
475
|
+
return this.shadowRoot.querySelector(".ui5-breadcrumbs-current-location [ui5-label]");
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
get _isDropdownArrowFocused() {
|
|
@@ -499,7 +499,7 @@ class Breadcrumbs extends UI5Element {
|
|
|
499
499
|
* @private
|
|
500
500
|
*/
|
|
501
501
|
get _dropdownArrowLink() {
|
|
502
|
-
return this.shadowRoot.querySelector(".ui5-breadcrumbs-dropdown-arrow-link-wrapper ui5-link");
|
|
502
|
+
return this.shadowRoot.querySelector(".ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-link]");
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
/**
|
|
@@ -529,7 +529,7 @@ class Breadcrumbs extends UI5Element {
|
|
|
529
529
|
* Getter for the list of links corresponding to the abstract breadcrumb items
|
|
530
530
|
*/
|
|
531
531
|
get _links() {
|
|
532
|
-
return Array.from(this.shadowRoot.querySelectorAll(".ui5-breadcrumbs-link-wrapper ui5-link"));
|
|
532
|
+
return Array.from(this.shadowRoot.querySelectorAll(".ui5-breadcrumbs-link-wrapper [ui5-link]"));
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
get _isOverflowEmpty() {
|
package/dist/CardHeader.js
CHANGED
|
@@ -241,15 +241,16 @@ class CardHeader extends UI5Element {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
_headerClick(event) {
|
|
244
|
-
|
|
244
|
+
// prevents the native browser "click" event from firing
|
|
245
|
+
event.stopImmediatePropagation();
|
|
245
246
|
|
|
246
|
-
if (this.interactive) {
|
|
247
|
+
if (this.interactive && event.target === event.currentTarget) {
|
|
247
248
|
this.fireEvent("click");
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
_headerKeydown(event) {
|
|
252
|
-
if (!this.interactive) {
|
|
253
|
+
if (!this.interactive || event.target !== event.currentTarget) {
|
|
253
254
|
return;
|
|
254
255
|
}
|
|
255
256
|
|
|
@@ -269,7 +270,7 @@ class CardHeader extends UI5Element {
|
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
_headerKeyup(event) {
|
|
272
|
-
if (!this.interactive) {
|
|
273
|
+
if (!this.interactive || event.target !== event.currentTarget) {
|
|
273
274
|
return;
|
|
274
275
|
}
|
|
275
276
|
|
package/dist/DatePicker.js
CHANGED
|
@@ -415,7 +415,7 @@ class DatePicker extends DateComponentBase {
|
|
|
415
415
|
console.warn(`In order for the "name" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
this.value = this.normalizeValue(this.value);
|
|
418
|
+
this.value = this.normalizeValue(this.value) || this.value;
|
|
419
419
|
this.liveValue = this.value;
|
|
420
420
|
}
|
|
421
421
|
|
|
@@ -677,7 +677,6 @@ class DatePicker extends DateComponentBase {
|
|
|
677
677
|
"ariaHasPopup": HasPopup.Grid,
|
|
678
678
|
"ariaAutoComplete": "none",
|
|
679
679
|
"ariaControls": `${this._id}-responsive-popover`,
|
|
680
|
-
"ariaExpanded": this.isOpen(),
|
|
681
680
|
"ariaRequired": this.required,
|
|
682
681
|
"ariaLabel": getEffectiveAriaLabelText(this),
|
|
683
682
|
};
|
package/dist/MonthPicker.js
CHANGED
|
@@ -103,7 +103,7 @@ class MonthPicker extends CalendarPart {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
const localeData = getCachedLocaleDataInstance(getLocale());
|
|
106
|
-
const monthsNames = localeData.
|
|
106
|
+
const monthsNames = localeData.getMonthsStandAlone("wide", this._primaryCalendarType);
|
|
107
107
|
|
|
108
108
|
const months = [];
|
|
109
109
|
const calendarDate = this._calendarDate; // store the value of the expensive getter
|
package/dist/Popover.js
CHANGED
|
@@ -15,7 +15,7 @@ import browserScrollbarCSS from "./generated/themes/BrowserScrollbar.css.js";
|
|
|
15
15
|
import PopupsCommonCss from "./generated/themes/PopupsCommon.css.js";
|
|
16
16
|
import PopoverCss from "./generated/themes/Popover.css.js";
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const ARROW_SIZE = 8;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @public
|
|
@@ -303,10 +303,6 @@ class Popover extends Popup {
|
|
|
303
303
|
return 10; // px
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
static get ARROW_MARGIN() {
|
|
307
|
-
return 6; // px
|
|
308
|
-
}
|
|
309
|
-
|
|
310
306
|
onAfterRendering() {
|
|
311
307
|
if (!this.isOpen() && this.open) {
|
|
312
308
|
const opener = document.getElementById(this.opener);
|
|
@@ -456,12 +452,8 @@ class Popover extends Popup {
|
|
|
456
452
|
top = Math.max(top, this._top);
|
|
457
453
|
}
|
|
458
454
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const arrow = this._clampArrowPlacement(placement.arrow, isVertical, this._top, this._left, popoverSize, borderRadius);
|
|
462
|
-
|
|
463
|
-
this.arrowTranslateX = arrow.x;
|
|
464
|
-
this.arrowTranslateY = arrow.y;
|
|
455
|
+
this.arrowTranslateX = placement.arrow.x;
|
|
456
|
+
this.arrowTranslateY = placement.arrow.y;
|
|
465
457
|
|
|
466
458
|
top = this._adjustForIOSKeyboard(top);
|
|
467
459
|
|
|
@@ -476,59 +468,6 @@ class Popover extends Popup {
|
|
|
476
468
|
}
|
|
477
469
|
}
|
|
478
470
|
|
|
479
|
-
/**
|
|
480
|
-
* Restricts the arrow's coordinates within the bounds of the popover.
|
|
481
|
-
* @private
|
|
482
|
-
* @param {{x: number, y: number}} arrow arrow's coordinates
|
|
483
|
-
* @param {boolean} isVertical if the popover is placed vertically relative to the opener
|
|
484
|
-
* @param {number} top popover's top
|
|
485
|
-
* @param {number} left popover's left
|
|
486
|
-
* @param {{width: number, height: number}} popoverSize popover's width and height
|
|
487
|
-
* @param {number} borderRadius value of the border-radius property
|
|
488
|
-
* @returns {{x: number, y: number}} Arrow's coordinates
|
|
489
|
-
*/
|
|
490
|
-
_clampArrowPlacement({ x, y }, isVertical, top, left, { width, height }, borderRadius) {
|
|
491
|
-
const maxY = this._getArrowRange(height, borderRadius);
|
|
492
|
-
const maxX = this._getArrowRange(width, borderRadius);
|
|
493
|
-
|
|
494
|
-
if (isVertical) {
|
|
495
|
-
const popoverOnLeftBorderOffset = Popover.VIEWPORT_MARGIN - left;
|
|
496
|
-
const popoverOnRightBorderOffset = left + width + Popover.VIEWPORT_MARGIN - document.documentElement.clientWidth;
|
|
497
|
-
|
|
498
|
-
if (popoverOnLeftBorderOffset > 0) {
|
|
499
|
-
x = Math.max(x - popoverOnLeftBorderOffset, -maxX);
|
|
500
|
-
} else if (popoverOnRightBorderOffset > 0) {
|
|
501
|
-
x = Math.min(x + popoverOnRightBorderOffset, maxX);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
if (!isVertical) {
|
|
506
|
-
const popoverOnTopBorderOffset = Popover.VIEWPORT_MARGIN - top;
|
|
507
|
-
const popoverOnBottomBorderOffset = top + height + Popover.VIEWPORT_MARGIN - document.documentElement.clientHeight;
|
|
508
|
-
if (popoverOnTopBorderOffset > 0) {
|
|
509
|
-
y = Math.max(y - popoverOnTopBorderOffset, -maxY);
|
|
510
|
-
} else if (popoverOnBottomBorderOffset > 0) {
|
|
511
|
-
y = Math.min(y + popoverOnBottomBorderOffset, maxY);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
return {
|
|
516
|
-
x: Math.round(x),
|
|
517
|
-
y: Math.round(y),
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* Returns the allowed range for the popover arrow based on its dimension.
|
|
523
|
-
* @private
|
|
524
|
-
* @param {number} dimension the height or width of the popover
|
|
525
|
-
* @param {number} borderRadius border radius of the popover
|
|
526
|
-
* @returns {number}
|
|
527
|
-
*/
|
|
528
|
-
_getArrowRange(dimension, borderRadius) {
|
|
529
|
-
return Math.floor((dimension / 2) - (borderRadius + Popover.ARROW_MARGIN));
|
|
530
|
-
}
|
|
531
|
-
|
|
532
471
|
/**
|
|
533
472
|
* Adjust the desired top position to compensate for shift of the screen
|
|
534
473
|
* caused by opened keyboard on iOS which affects all elements with position:fixed.
|
|
@@ -598,7 +537,7 @@ class Popover extends Popup {
|
|
|
598
537
|
popoverSize.height = targetRect.height;
|
|
599
538
|
}
|
|
600
539
|
|
|
601
|
-
const arrowOffset = this.hideArrow ? 0 :
|
|
540
|
+
const arrowOffset = this.hideArrow ? 0 : ARROW_SIZE;
|
|
602
541
|
|
|
603
542
|
// calc popover positions
|
|
604
543
|
switch (placementType) {
|
|
@@ -666,7 +605,8 @@ class Popover extends Popup {
|
|
|
666
605
|
this._top = Math.round(top);
|
|
667
606
|
}
|
|
668
607
|
|
|
669
|
-
const
|
|
608
|
+
const borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue("border-radius"));
|
|
609
|
+
const arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);
|
|
670
610
|
|
|
671
611
|
return {
|
|
672
612
|
arrow: arrowPos,
|
|
@@ -680,33 +620,50 @@ class Popover extends Popup {
|
|
|
680
620
|
* Calculates the position for the arrow.
|
|
681
621
|
* @private
|
|
682
622
|
* @param targetRect BoundingClientRect of the target element
|
|
683
|
-
* @param popoverSize Width and height of the popover
|
|
623
|
+
* @param {{width: number, height: number}} popoverSize Width and height of the popover
|
|
684
624
|
* @param left Left offset of the popover
|
|
685
625
|
* @param top Top offset of the popover
|
|
686
|
-
* @param isVertical
|
|
626
|
+
* @param isVertical If the popover is positioned vertically to the target element
|
|
627
|
+
* @param {number} borderRadius Value of the border-radius property
|
|
687
628
|
* @returns {{x: number, y: number}} Arrow's coordinates
|
|
688
629
|
*/
|
|
689
|
-
getArrowPosition(targetRect,
|
|
630
|
+
getArrowPosition(targetRect, { width, height }, left, top, isVertical, borderRadius) {
|
|
690
631
|
let arrowXCentered = this.horizontalAlign === PopoverHorizontalAlign.Center || this.horizontalAlign === PopoverHorizontalAlign.Stretch;
|
|
691
632
|
|
|
692
633
|
if (this.horizontalAlign === PopoverHorizontalAlign.Right && left <= targetRect.left) {
|
|
693
634
|
arrowXCentered = true;
|
|
694
635
|
}
|
|
695
636
|
|
|
696
|
-
if (this.horizontalAlign === PopoverHorizontalAlign.Left && left +
|
|
637
|
+
if (this.horizontalAlign === PopoverHorizontalAlign.Left && left + width >= targetRect.left + targetRect.width) {
|
|
697
638
|
arrowXCentered = true;
|
|
698
639
|
}
|
|
699
640
|
|
|
700
641
|
let arrowTranslateX = 0;
|
|
701
642
|
if (isVertical && arrowXCentered) {
|
|
702
|
-
arrowTranslateX = targetRect.left + targetRect.width / 2 - left -
|
|
643
|
+
arrowTranslateX = targetRect.left + targetRect.width / 2 - left - width / 2;
|
|
703
644
|
}
|
|
704
645
|
|
|
705
646
|
let arrowTranslateY = 0;
|
|
706
647
|
if (!isVertical) {
|
|
707
|
-
arrowTranslateY = targetRect.top + targetRect.height / 2 - top -
|
|
648
|
+
arrowTranslateY = targetRect.top + targetRect.height / 2 - top - height / 2;
|
|
708
649
|
}
|
|
709
650
|
|
|
651
|
+
// Restricts the arrow's translate value along each dimension,
|
|
652
|
+
// so that the arrow does not clip over the popover's rounded borders.
|
|
653
|
+
const safeRangeForArrowY = height / 2 - borderRadius - ARROW_SIZE / 2;
|
|
654
|
+
arrowTranslateY = clamp(
|
|
655
|
+
arrowTranslateY,
|
|
656
|
+
-safeRangeForArrowY,
|
|
657
|
+
safeRangeForArrowY,
|
|
658
|
+
);
|
|
659
|
+
|
|
660
|
+
const safeRangeForArrowX = width / 2 - borderRadius - ARROW_SIZE / 2;
|
|
661
|
+
arrowTranslateX = clamp(
|
|
662
|
+
arrowTranslateX,
|
|
663
|
+
-safeRangeForArrowX,
|
|
664
|
+
safeRangeForArrowX,
|
|
665
|
+
);
|
|
666
|
+
|
|
710
667
|
return {
|
|
711
668
|
x: Math.round(arrowTranslateX),
|
|
712
669
|
y: Math.round(arrowTranslateY),
|
package/dist/TimePicker.js
CHANGED
|
@@ -150,9 +150,7 @@ class TimePicker extends TimePickerBase {
|
|
|
150
150
|
"ariaRoledescription": this.dateAriaDescription,
|
|
151
151
|
"ariaHasPopup": "dialog",
|
|
152
152
|
"ariaAutoComplete": "none",
|
|
153
|
-
"role": "combobox",
|
|
154
153
|
"ariaControls": `${this._id}-responsive-popover`,
|
|
155
|
-
"ariaExpanded": this.isOpen(),
|
|
156
154
|
};
|
|
157
155
|
}
|
|
158
156
|
|
package/dist/TimeSelection.js
CHANGED
|
@@ -7,6 +7,7 @@ import getLocale from "@ui5/webcomponents-base/dist/locale/getLocale.js";
|
|
|
7
7
|
import DateFormat from "@ui5/webcomponents-localization/dist/DateFormat.js";
|
|
8
8
|
import getCachedLocaleDataInstance from "@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js";
|
|
9
9
|
import "@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js"; // default calendar for bundling
|
|
10
|
+
import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
|
|
10
11
|
import { fetchCldr } from "@ui5/webcomponents-base/dist/asset-registries/LocaleData.js";
|
|
11
12
|
import {
|
|
12
13
|
isLeft,
|
|
@@ -136,6 +137,10 @@ const metadata = {
|
|
|
136
137
|
type: String,
|
|
137
138
|
defaultValue: "hours",
|
|
138
139
|
},
|
|
140
|
+
|
|
141
|
+
_calendarType: {
|
|
142
|
+
type: CalendarType,
|
|
143
|
+
},
|
|
139
144
|
},
|
|
140
145
|
events: /** @lends sap.ui.webcomponents.main.TimeSelection.prototype */ {
|
|
141
146
|
/**
|
|
@@ -435,10 +440,12 @@ class TimeSelection extends UI5Element {
|
|
|
435
440
|
let dateFormat;
|
|
436
441
|
if (this._isPattern) {
|
|
437
442
|
dateFormat = DateFormat.getInstance({
|
|
443
|
+
calendarType: this._calendarType,
|
|
438
444
|
pattern: this._formatPattern,
|
|
439
445
|
});
|
|
440
446
|
} else {
|
|
441
447
|
dateFormat = DateFormat.getInstance({
|
|
448
|
+
calendarType: this._calendarType,
|
|
442
449
|
style: this._formatPattern,
|
|
443
450
|
});
|
|
444
451
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:block;width:100%;height:100%}.ui5-calheader-root{display:flex;height:100%;padding:var(--_ui5_calendar_header_padding);box-sizing:border-box}.ui5-calheader-arrowbtn{display:flex;justify-content:center;align-items:center;width:var(--_ui5_calendar_header_arrow_button_width);background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor);cursor:pointer;overflow:hidden;white-space:nowrap;padding:0;font-size:var(--sapFontSize)}.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:active,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:focus,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:hover{pointer-events:none;opacity:.4;outline:none;background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor)}[hidden].ui5-calheader-arrowbtn.ui5-calheader-middlebtn{display:none}.ui5-calheader-arrowbtn:focus{outline:none}.ui5-calheader-arrowbtn:hover{background-color:var(--sapButton_Hover_Background);color:var(--sapButton_Hover_TextColor);box-shadow:var(--_ui5_calendar_header_arrow_button_box_shadow)}.ui5-calheader-arrowbtn:active{background-color:var(--sapButton_Active_Background);color:var(--sapButton_Active_TextColor)}.ui5-calheader-arrowbtn,.ui5-calheader-middlebtn{border:var(--_ui5_calendar_header_arrow_button_border);border-radius:var(--_ui5_calendar_header_arrow_button_border_radius);display:flex;background-color:var(--_ui5_calendar_header_button_background_color)}.ui5-calheader-middlebtn{flex-direction:column;align-items:center;justify-content:center}.ui5-calheader-btn-sectext{color:var(--sapNeutralElementColor);font-size:.625rem}.ui5-calheader-arrowicon{color:currentColor;pointer-events:none}.ui5-calheader-midcontainer{display:flex;justify-content:space-around;flex:1 1 auto;padding:0 .5rem}.ui5-calheader-midcontainer .ui5-calheader-middlebtn:first-child{margin-right:.5rem}.ui5-calheader-middlebtn{font-family:"72override",var(--sapFontFamily);width:var(--_ui5_calendar_header_middle_button_width);flex:var(--_ui5_calendar_header_middle_button_flex);position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ui5-calheader-middlebtn:focus{border:var(--_ui5_calendar_header_middle_button_focus_border);border-radius:var(--_ui5_calendar_header_middle_button_focus_border_radius);outline:var(--_ui5_calendar_header_middle_button_focus_outline);outline-offset:-.125rem;background:var(--_ui5_calendar_header_middle_button_focus_background)}.ui5-calheader-middlebtn:focus:active{outline:var(--_ui5_calendar_header_middle_button_focus_active_outline);outline-offset:-.0625rem;background:var(--_ui5_calendar_header_middle_button_focus_active_background)}.ui5-calheader-middlebtn:focus:after{content:"";display:var(--_ui5_calendar_header_middle_button_focus_after_display);width:var(--_ui5_calendar_header_middle_button_focus_after_width);height:var(--_ui5_calendar_header_middle_button_focus_after_height);border:var(--_ui5_calendar_header_middle_button_focus_after_border);position:absolute;top:var(--_ui5_calendar_header_middle_button_focus_after_top_offset);left:var(--_ui5_calendar_header_middle_button_focus_after_left_offset)}.ui5-calheader-middlebtn:focus:active:after{border-color:var(--sapContent_ContrastFocusColor)}[dir=rtl] .ui5-calheader-root-midcontainer .ui5-calheader-middlebtn:first-child{margin-left:.5rem;margin-right:0}
|
|
1
|
+
:host{display:block;width:100%;height:100%}.ui5-calheader-root{display:flex;height:100%;padding:var(--_ui5_calendar_header_padding);box-sizing:border-box}.ui5-calheader-arrowbtn{display:flex;justify-content:center;align-items:center;width:var(--_ui5_calendar_header_arrow_button_width);background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor);cursor:pointer;overflow:hidden;white-space:nowrap;padding:0;font-size:var(--sapFontSize);user-select:none}.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:active,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:focus,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:hover{pointer-events:none;opacity:.4;outline:none;background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor)}[hidden].ui5-calheader-arrowbtn.ui5-calheader-middlebtn{display:none}.ui5-calheader-arrowbtn:focus{outline:none}.ui5-calheader-arrowbtn:hover{background-color:var(--sapButton_Hover_Background);color:var(--sapButton_Hover_TextColor);box-shadow:var(--_ui5_calendar_header_arrow_button_box_shadow)}.ui5-calheader-arrowbtn:active{background-color:var(--sapButton_Active_Background);color:var(--sapButton_Active_TextColor)}.ui5-calheader-arrowbtn,.ui5-calheader-middlebtn{border:var(--_ui5_calendar_header_arrow_button_border);border-radius:var(--_ui5_calendar_header_arrow_button_border_radius);display:flex;background-color:var(--_ui5_calendar_header_button_background_color)}.ui5-calheader-middlebtn{flex-direction:column;align-items:center;justify-content:center}.ui5-calheader-btn-sectext{color:var(--sapNeutralElementColor);font-size:.625rem}.ui5-calheader-arrowicon{color:currentColor;pointer-events:none}.ui5-calheader-midcontainer{display:flex;justify-content:space-around;flex:1 1 auto;padding:0 .5rem}.ui5-calheader-midcontainer .ui5-calheader-middlebtn:first-child{margin-right:.5rem}.ui5-calheader-middlebtn{font-family:"72override",var(--sapFontFamily);width:var(--_ui5_calendar_header_middle_button_width);flex:var(--_ui5_calendar_header_middle_button_flex);position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ui5-calheader-middlebtn:focus{border:var(--_ui5_calendar_header_middle_button_focus_border);border-radius:var(--_ui5_calendar_header_middle_button_focus_border_radius);outline:var(--_ui5_calendar_header_middle_button_focus_outline);outline-offset:-.125rem;background:var(--_ui5_calendar_header_middle_button_focus_background)}.ui5-calheader-middlebtn:focus:active{outline:var(--_ui5_calendar_header_middle_button_focus_active_outline);outline-offset:-.0625rem;background:var(--_ui5_calendar_header_middle_button_focus_active_background)}.ui5-calheader-middlebtn:focus:after{content:"";display:var(--_ui5_calendar_header_middle_button_focus_after_display);width:var(--_ui5_calendar_header_middle_button_focus_after_width);height:var(--_ui5_calendar_header_middle_button_focus_after_height);border:var(--_ui5_calendar_header_middle_button_focus_after_border);position:absolute;top:var(--_ui5_calendar_header_middle_button_focus_after_top_offset);left:var(--_ui5_calendar_header_middle_button_focus_after_left_offset)}.ui5-calheader-middlebtn:focus:active:after{border-color:var(--sapContent_ContrastFocusColor)}[dir=rtl] .ui5-calheader-root-midcontainer .ui5-calheader-middlebtn:first-child{margin-left:.5rem;margin-right:0}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint no-unused-vars: 0 */
|
|
2
2
|
import { html, svg, repeat, classMap, styleMap, ifDefined, unsafeHTML, scopeTag } from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
|
|
3
3
|
|
|
4
|
-
const block0 = (context, tags, suffix) => html`<${scopeTag("ui5-responsive-popover", tags, suffix)} id="${ifDefined(context._id)}-responsive-popover" allow-target-overlap placement-type="Bottom" horizontal-align="Left" ?disable-scrolling="${context._isIE}" hide-arrow ?_hide-header=${ifDefined(context._shouldHideHeader)} @keydown="${context._onkeydown}" @ui5-after-close="${ifDefined(context.onResponsivePopoverAfterClose)}">${ context.showHeader ? block1(context, tags, suffix) : undefined }<div class="ui5-dt-picker-content ${classMap(context.classes.picker)}"><${scopeTag("ui5-calendar", tags, suffix)} class="ui5-dt-cal ${classMap(context.classes.dateTimeView)}" id="${ifDefined(context._id)}-calendar" primary-calendar-type="${ifDefined(context._primaryCalendarType)}" format-pattern="${ifDefined(context._formatPattern)}" timestamp="${ifDefined(context._calendarTimestamp)}" .selectionMode="${ifDefined(context._calendarSelectionMode)}" .minDate="${ifDefined(context.minDate)}" .maxDate="${ifDefined(context.maxDate)}" @ui5-selected-dates-change="${ifDefined(context.onSelectedDatesChange)}" @ui5-show-month-press="${ifDefined(context.onHeaderShowMonthPress)}" @ui5-show-year-press="${ifDefined(context.onHeaderShowYearPress)}" ?hide-week-numbers="${context.hideWeekNumbers}" ._currentPicker="${ifDefined(context._calendarCurrentPicker)}">${ repeat(context._calendarSelectedDates, (item, index) => item._id || index, (item, index) => block3(item, index, context, tags, suffix)) }</${scopeTag("ui5-calendar", tags, suffix)}>${ !context.phone ? block4(context, tags, suffix) : undefined }<${scopeTag("ui5-time-selection", tags, suffix)} id="${ifDefined(context._id)}-time-sel" class="ui5-dt-time ${classMap(context.classes.dateTimeView)}" value="${ifDefined(context._timeSelectionValue)}" format-pattern="${ifDefined(context._formatPattern)}" ._currentSlider="${ifDefined(context._currentTimeSlider)}" @ui5-change="${ifDefined(context.onTimeSelectionChange)}" @ui5-slider-change="${ifDefined(context.onTimeSliderChange)}"></${scopeTag("ui5-time-selection", tags, suffix)}></div>${ context.showFooter ? block5(context, tags, suffix) : undefined }</${scopeTag("ui5-responsive-popover", tags, suffix)}> `;
|
|
4
|
+
const block0 = (context, tags, suffix) => html`<${scopeTag("ui5-responsive-popover", tags, suffix)} id="${ifDefined(context._id)}-responsive-popover" allow-target-overlap placement-type="Bottom" horizontal-align="Left" ?disable-scrolling="${context._isIE}" hide-arrow ?_hide-header=${ifDefined(context._shouldHideHeader)} @keydown="${context._onkeydown}" @ui5-after-close="${ifDefined(context.onResponsivePopoverAfterClose)}">${ context.showHeader ? block1(context, tags, suffix) : undefined }<div class="ui5-dt-picker-content ${classMap(context.classes.picker)}"><${scopeTag("ui5-calendar", tags, suffix)} class="ui5-dt-cal ${classMap(context.classes.dateTimeView)}" id="${ifDefined(context._id)}-calendar" primary-calendar-type="${ifDefined(context._primaryCalendarType)}" secondary-calendar-type="${ifDefined(context.secondaryCalendarType)}" format-pattern="${ifDefined(context._formatPattern)}" timestamp="${ifDefined(context._calendarTimestamp)}" .selectionMode="${ifDefined(context._calendarSelectionMode)}" .minDate="${ifDefined(context.minDate)}" .maxDate="${ifDefined(context.maxDate)}" @ui5-selected-dates-change="${ifDefined(context.onSelectedDatesChange)}" @ui5-show-month-press="${ifDefined(context.onHeaderShowMonthPress)}" @ui5-show-year-press="${ifDefined(context.onHeaderShowYearPress)}" ?hide-week-numbers="${context.hideWeekNumbers}" ._currentPicker="${ifDefined(context._calendarCurrentPicker)}">${ repeat(context._calendarSelectedDates, (item, index) => item._id || index, (item, index) => block3(item, index, context, tags, suffix)) }</${scopeTag("ui5-calendar", tags, suffix)}>${ !context.phone ? block4(context, tags, suffix) : undefined }<${scopeTag("ui5-time-selection", tags, suffix)} id="${ifDefined(context._id)}-time-sel" class="ui5-dt-time ${classMap(context.classes.dateTimeView)}" value="${ifDefined(context._timeSelectionValue)}" format-pattern="${ifDefined(context._formatPattern)}" ._currentSlider="${ifDefined(context._currentTimeSlider)}" ._calendarType="${ifDefined(context._primaryCalendarType)}" @ui5-change="${ifDefined(context.onTimeSelectionChange)}" @ui5-slider-change="${ifDefined(context.onTimeSliderChange)}"></${scopeTag("ui5-time-selection", tags, suffix)}></div>${ context.showFooter ? block5(context, tags, suffix) : undefined }</${scopeTag("ui5-responsive-popover", tags, suffix)}> `;
|
|
5
5
|
const block1 = (context, tags, suffix) => html`${ context.phone ? block2(context, tags, suffix) : undefined }`;
|
|
6
6
|
const block2 = (context, tags, suffix) => html`<div class="ui5-dt-picker-header"><${scopeTag("ui5-segmented-button", tags, suffix)} class="ui5-dt-picker-toggle-button"><${scopeTag("ui5-toggle-button", tags, suffix)} key="Date" ?pressed="${context.showDateView}" @click="${context._dateTimeSwitchChange}">${ifDefined(context.btnDateLabel)}</${scopeTag("ui5-toggle-button", tags, suffix)}><${scopeTag("ui5-toggle-button", tags, suffix)} key="Time" ?pressed="${context.showTimeView}" @click="${context._dateTimeSwitchChange}">${ifDefined(context.btnTimeLabel)}</${scopeTag("ui5-toggle-button", tags, suffix)}></${scopeTag("ui5-segmented-button", tags, suffix)}></div>`;
|
|
7
7
|
const block3 = (item, index, context, tags, suffix) => html`<${scopeTag("ui5-date", tags, suffix)} value="${ifDefined(item)}"></${scopeTag("ui5-date", tags, suffix)}>`;
|
|
@@ -5,4 +5,4 @@ import defaultTheme from "./sap_fiori_3/parameters-bundle.css.js";
|
|
|
5
5
|
|
|
6
6
|
registerThemePropertiesLoader("@ui5/webcomponents-theming", "sap_fiori_3", () => defaultThemeBase);
|
|
7
7
|
registerThemePropertiesLoader("@ui5/webcomponents", "sap_fiori_3", () => defaultTheme);
|
|
8
|
-
export default {packageName:"@ui5/webcomponents",fileName:"themes/CalendarHeader.css",content:":host{display:block;width:100%;height:100%}.ui5-calheader-root{display:flex;height:100%;padding:var(--_ui5_calendar_header_padding);box-sizing:border-box}.ui5-calheader-arrowbtn{display:flex;justify-content:center;align-items:center;width:var(--_ui5_calendar_header_arrow_button_width);background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor);cursor:pointer;overflow:hidden;white-space:nowrap;padding:0;font-size:var(--sapFontSize)}.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:active,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:focus,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:hover{pointer-events:none;opacity:.4;outline:none;background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor)}[hidden].ui5-calheader-arrowbtn.ui5-calheader-middlebtn{display:none}.ui5-calheader-arrowbtn:focus{outline:none}.ui5-calheader-arrowbtn:hover{background-color:var(--sapButton_Hover_Background);color:var(--sapButton_Hover_TextColor);box-shadow:var(--_ui5_calendar_header_arrow_button_box_shadow)}.ui5-calheader-arrowbtn:active{background-color:var(--sapButton_Active_Background);color:var(--sapButton_Active_TextColor)}.ui5-calheader-arrowbtn,.ui5-calheader-middlebtn{border:var(--_ui5_calendar_header_arrow_button_border);border-radius:var(--_ui5_calendar_header_arrow_button_border_radius);display:flex;background-color:var(--_ui5_calendar_header_button_background_color)}.ui5-calheader-middlebtn{flex-direction:column;align-items:center;justify-content:center}.ui5-calheader-btn-sectext{color:var(--sapNeutralElementColor);font-size:.625rem}.ui5-calheader-arrowicon{color:currentColor;pointer-events:none}.ui5-calheader-midcontainer{display:flex;justify-content:space-around;flex:1 1 auto;padding:0 .5rem}.ui5-calheader-midcontainer .ui5-calheader-middlebtn:first-child{margin-right:.5rem}.ui5-calheader-middlebtn{font-family:\"72override\",var(--sapFontFamily);width:var(--_ui5_calendar_header_middle_button_width);flex:var(--_ui5_calendar_header_middle_button_flex);position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ui5-calheader-middlebtn:focus{border:var(--_ui5_calendar_header_middle_button_focus_border);border-radius:var(--_ui5_calendar_header_middle_button_focus_border_radius);outline:var(--_ui5_calendar_header_middle_button_focus_outline);outline-offset:-.125rem;background:var(--_ui5_calendar_header_middle_button_focus_background)}.ui5-calheader-middlebtn:focus:active{outline:var(--_ui5_calendar_header_middle_button_focus_active_outline);outline-offset:-.0625rem;background:var(--_ui5_calendar_header_middle_button_focus_active_background)}.ui5-calheader-middlebtn:focus:after{content:\"\";display:var(--_ui5_calendar_header_middle_button_focus_after_display);width:var(--_ui5_calendar_header_middle_button_focus_after_width);height:var(--_ui5_calendar_header_middle_button_focus_after_height);border:var(--_ui5_calendar_header_middle_button_focus_after_border);position:absolute;top:var(--_ui5_calendar_header_middle_button_focus_after_top_offset);left:var(--_ui5_calendar_header_middle_button_focus_after_left_offset)}.ui5-calheader-middlebtn:focus:active:after{border-color:var(--sapContent_ContrastFocusColor)}[dir=rtl] .ui5-calheader-root-midcontainer .ui5-calheader-middlebtn:first-child{margin-left:.5rem;margin-right:0}"}
|
|
8
|
+
export default {packageName:"@ui5/webcomponents",fileName:"themes/CalendarHeader.css",content:":host{display:block;width:100%;height:100%}.ui5-calheader-root{display:flex;height:100%;padding:var(--_ui5_calendar_header_padding);box-sizing:border-box}.ui5-calheader-arrowbtn{display:flex;justify-content:center;align-items:center;width:var(--_ui5_calendar_header_arrow_button_width);background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor);cursor:pointer;overflow:hidden;white-space:nowrap;padding:0;font-size:var(--sapFontSize);user-select:none}.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:active,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:focus,.ui5-calheader-arrowbtn.ui5-calheader-arrowbtn-disabled:hover{pointer-events:none;opacity:.4;outline:none;background-color:var(--sapButton_Lite_Background);color:var(--sapButton_TextColor)}[hidden].ui5-calheader-arrowbtn.ui5-calheader-middlebtn{display:none}.ui5-calheader-arrowbtn:focus{outline:none}.ui5-calheader-arrowbtn:hover{background-color:var(--sapButton_Hover_Background);color:var(--sapButton_Hover_TextColor);box-shadow:var(--_ui5_calendar_header_arrow_button_box_shadow)}.ui5-calheader-arrowbtn:active{background-color:var(--sapButton_Active_Background);color:var(--sapButton_Active_TextColor)}.ui5-calheader-arrowbtn,.ui5-calheader-middlebtn{border:var(--_ui5_calendar_header_arrow_button_border);border-radius:var(--_ui5_calendar_header_arrow_button_border_radius);display:flex;background-color:var(--_ui5_calendar_header_button_background_color)}.ui5-calheader-middlebtn{flex-direction:column;align-items:center;justify-content:center}.ui5-calheader-btn-sectext{color:var(--sapNeutralElementColor);font-size:.625rem}.ui5-calheader-arrowicon{color:currentColor;pointer-events:none}.ui5-calheader-midcontainer{display:flex;justify-content:space-around;flex:1 1 auto;padding:0 .5rem}.ui5-calheader-midcontainer .ui5-calheader-middlebtn:first-child{margin-right:.5rem}.ui5-calheader-middlebtn{font-family:\"72override\",var(--sapFontFamily);width:var(--_ui5_calendar_header_middle_button_width);flex:var(--_ui5_calendar_header_middle_button_flex);position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ui5-calheader-middlebtn:focus{border:var(--_ui5_calendar_header_middle_button_focus_border);border-radius:var(--_ui5_calendar_header_middle_button_focus_border_radius);outline:var(--_ui5_calendar_header_middle_button_focus_outline);outline-offset:-.125rem;background:var(--_ui5_calendar_header_middle_button_focus_background)}.ui5-calheader-middlebtn:focus:active{outline:var(--_ui5_calendar_header_middle_button_focus_active_outline);outline-offset:-.0625rem;background:var(--_ui5_calendar_header_middle_button_focus_active_background)}.ui5-calheader-middlebtn:focus:after{content:\"\";display:var(--_ui5_calendar_header_middle_button_focus_after_display);width:var(--_ui5_calendar_header_middle_button_focus_after_width);height:var(--_ui5_calendar_header_middle_button_focus_after_height);border:var(--_ui5_calendar_header_middle_button_focus_after_border);position:absolute;top:var(--_ui5_calendar_header_middle_button_focus_after_top_offset);left:var(--_ui5_calendar_header_middle_button_focus_after_left_offset)}.ui5-calheader-middlebtn:focus:active:after{border-color:var(--sapContent_ContrastFocusColor)}[dir=rtl] .ui5-calheader-root-midcontainer .ui5-calheader-middlebtn:first-child{margin-left:.5rem;margin-right:0}"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.main",
|
|
5
5
|
"ui5": {
|
|
6
6
|
"webComponentsPackage": true
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"directory": "packages/main"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@ui5/webcomponents-base": "1.2.
|
|
46
|
-
"@ui5/webcomponents-icons": "1.2.
|
|
47
|
-
"@ui5/webcomponents-ie11": "1.2.
|
|
48
|
-
"@ui5/webcomponents-localization": "1.2.
|
|
49
|
-
"@ui5/webcomponents-theming": "1.2.
|
|
45
|
+
"@ui5/webcomponents-base": "1.2.5",
|
|
46
|
+
"@ui5/webcomponents-icons": "1.2.5",
|
|
47
|
+
"@ui5/webcomponents-ie11": "1.2.5",
|
|
48
|
+
"@ui5/webcomponents-localization": "1.2.5",
|
|
49
|
+
"@ui5/webcomponents-theming": "1.2.5"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@ui5/webcomponents-tools": "1.2.
|
|
52
|
+
"@ui5/webcomponents-tools": "1.2.5",
|
|
53
53
|
"chromedriver": "99.0.0"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/Breadcrumbs.js
CHANGED
|
@@ -472,7 +472,7 @@ class Breadcrumbs extends UI5Element {
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
get _currentLocationLabel() {
|
|
475
|
-
return this.shadowRoot.querySelector(".ui5-breadcrumbs-current-location ui5-label");
|
|
475
|
+
return this.shadowRoot.querySelector(".ui5-breadcrumbs-current-location [ui5-label]");
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
get _isDropdownArrowFocused() {
|
|
@@ -499,7 +499,7 @@ class Breadcrumbs extends UI5Element {
|
|
|
499
499
|
* @private
|
|
500
500
|
*/
|
|
501
501
|
get _dropdownArrowLink() {
|
|
502
|
-
return this.shadowRoot.querySelector(".ui5-breadcrumbs-dropdown-arrow-link-wrapper ui5-link");
|
|
502
|
+
return this.shadowRoot.querySelector(".ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-link]");
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
/**
|
|
@@ -529,7 +529,7 @@ class Breadcrumbs extends UI5Element {
|
|
|
529
529
|
* Getter for the list of links corresponding to the abstract breadcrumb items
|
|
530
530
|
*/
|
|
531
531
|
get _links() {
|
|
532
|
-
return Array.from(this.shadowRoot.querySelectorAll(".ui5-breadcrumbs-link-wrapper ui5-link"));
|
|
532
|
+
return Array.from(this.shadowRoot.querySelectorAll(".ui5-breadcrumbs-link-wrapper [ui5-link]"));
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
get _isOverflowEmpty() {
|
package/src/CardHeader.hbs
CHANGED
package/src/CardHeader.js
CHANGED
|
@@ -241,15 +241,16 @@ class CardHeader extends UI5Element {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
_headerClick(event) {
|
|
244
|
-
|
|
244
|
+
// prevents the native browser "click" event from firing
|
|
245
|
+
event.stopImmediatePropagation();
|
|
245
246
|
|
|
246
|
-
if (this.interactive) {
|
|
247
|
+
if (this.interactive && event.target === event.currentTarget) {
|
|
247
248
|
this.fireEvent("click");
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
|
|
251
252
|
_headerKeydown(event) {
|
|
252
|
-
if (!this.interactive) {
|
|
253
|
+
if (!this.interactive || event.target !== event.currentTarget) {
|
|
253
254
|
return;
|
|
254
255
|
}
|
|
255
256
|
|
|
@@ -269,7 +270,7 @@ class CardHeader extends UI5Element {
|
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
_headerKeyup(event) {
|
|
272
|
-
if (!this.interactive) {
|
|
273
|
+
if (!this.interactive || event.target !== event.currentTarget) {
|
|
273
274
|
return;
|
|
274
275
|
}
|
|
275
276
|
|
package/src/DatePicker.js
CHANGED
|
@@ -415,7 +415,7 @@ class DatePicker extends DateComponentBase {
|
|
|
415
415
|
console.warn(`In order for the "name" property to have effect, you should also: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js";`); // eslint-disable-line
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
this.value = this.normalizeValue(this.value);
|
|
418
|
+
this.value = this.normalizeValue(this.value) || this.value;
|
|
419
419
|
this.liveValue = this.value;
|
|
420
420
|
}
|
|
421
421
|
|
|
@@ -677,7 +677,6 @@ class DatePicker extends DateComponentBase {
|
|
|
677
677
|
"ariaHasPopup": HasPopup.Grid,
|
|
678
678
|
"ariaAutoComplete": "none",
|
|
679
679
|
"ariaControls": `${this._id}-responsive-popover`,
|
|
680
|
-
"ariaExpanded": this.isOpen(),
|
|
681
680
|
"ariaRequired": this.required,
|
|
682
681
|
"ariaLabel": getEffectiveAriaLabelText(this),
|
|
683
682
|
};
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
class="ui5-dt-cal {{classes.dateTimeView}}"
|
|
19
19
|
id="{{_id}}-calendar"
|
|
20
20
|
primary-calendar-type="{{_primaryCalendarType}}"
|
|
21
|
+
secondary-calendar-type="{{secondaryCalendarType}}"
|
|
21
22
|
format-pattern="{{_formatPattern}}"
|
|
22
23
|
timestamp="{{_calendarTimestamp}}"
|
|
23
24
|
.selectionMode="{{_calendarSelectionMode}}"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
value="{{_timeSelectionValue}}"
|
|
45
46
|
format-pattern="{{_formatPattern}}"
|
|
46
47
|
._currentSlider="{{_currentTimeSlider}}"
|
|
48
|
+
._calendarType="{{_primaryCalendarType}}"
|
|
47
49
|
@ui5-change="{{onTimeSelectionChange}}"
|
|
48
50
|
@ui5-slider-change="{{onTimeSliderChange}}"
|
|
49
51
|
></ui5-time-selection>
|
package/src/MonthPicker.js
CHANGED
|
@@ -103,7 +103,7 @@ class MonthPicker extends CalendarPart {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
const localeData = getCachedLocaleDataInstance(getLocale());
|
|
106
|
-
const monthsNames = localeData.
|
|
106
|
+
const monthsNames = localeData.getMonthsStandAlone("wide", this._primaryCalendarType);
|
|
107
107
|
|
|
108
108
|
const months = [];
|
|
109
109
|
const calendarDate = this._calendarDate; // store the value of the expensive getter
|
package/src/Popover.js
CHANGED
|
@@ -15,7 +15,7 @@ import browserScrollbarCSS from "./generated/themes/BrowserScrollbar.css.js";
|
|
|
15
15
|
import PopupsCommonCss from "./generated/themes/PopupsCommon.css.js";
|
|
16
16
|
import PopoverCss from "./generated/themes/Popover.css.js";
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const ARROW_SIZE = 8;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @public
|
|
@@ -303,10 +303,6 @@ class Popover extends Popup {
|
|
|
303
303
|
return 10; // px
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
static get ARROW_MARGIN() {
|
|
307
|
-
return 6; // px
|
|
308
|
-
}
|
|
309
|
-
|
|
310
306
|
onAfterRendering() {
|
|
311
307
|
if (!this.isOpen() && this.open) {
|
|
312
308
|
const opener = document.getElementById(this.opener);
|
|
@@ -456,12 +452,8 @@ class Popover extends Popup {
|
|
|
456
452
|
top = Math.max(top, this._top);
|
|
457
453
|
}
|
|
458
454
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const arrow = this._clampArrowPlacement(placement.arrow, isVertical, this._top, this._left, popoverSize, borderRadius);
|
|
462
|
-
|
|
463
|
-
this.arrowTranslateX = arrow.x;
|
|
464
|
-
this.arrowTranslateY = arrow.y;
|
|
455
|
+
this.arrowTranslateX = placement.arrow.x;
|
|
456
|
+
this.arrowTranslateY = placement.arrow.y;
|
|
465
457
|
|
|
466
458
|
top = this._adjustForIOSKeyboard(top);
|
|
467
459
|
|
|
@@ -476,59 +468,6 @@ class Popover extends Popup {
|
|
|
476
468
|
}
|
|
477
469
|
}
|
|
478
470
|
|
|
479
|
-
/**
|
|
480
|
-
* Restricts the arrow's coordinates within the bounds of the popover.
|
|
481
|
-
* @private
|
|
482
|
-
* @param {{x: number, y: number}} arrow arrow's coordinates
|
|
483
|
-
* @param {boolean} isVertical if the popover is placed vertically relative to the opener
|
|
484
|
-
* @param {number} top popover's top
|
|
485
|
-
* @param {number} left popover's left
|
|
486
|
-
* @param {{width: number, height: number}} popoverSize popover's width and height
|
|
487
|
-
* @param {number} borderRadius value of the border-radius property
|
|
488
|
-
* @returns {{x: number, y: number}} Arrow's coordinates
|
|
489
|
-
*/
|
|
490
|
-
_clampArrowPlacement({ x, y }, isVertical, top, left, { width, height }, borderRadius) {
|
|
491
|
-
const maxY = this._getArrowRange(height, borderRadius);
|
|
492
|
-
const maxX = this._getArrowRange(width, borderRadius);
|
|
493
|
-
|
|
494
|
-
if (isVertical) {
|
|
495
|
-
const popoverOnLeftBorderOffset = Popover.VIEWPORT_MARGIN - left;
|
|
496
|
-
const popoverOnRightBorderOffset = left + width + Popover.VIEWPORT_MARGIN - document.documentElement.clientWidth;
|
|
497
|
-
|
|
498
|
-
if (popoverOnLeftBorderOffset > 0) {
|
|
499
|
-
x = Math.max(x - popoverOnLeftBorderOffset, -maxX);
|
|
500
|
-
} else if (popoverOnRightBorderOffset > 0) {
|
|
501
|
-
x = Math.min(x + popoverOnRightBorderOffset, maxX);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
if (!isVertical) {
|
|
506
|
-
const popoverOnTopBorderOffset = Popover.VIEWPORT_MARGIN - top;
|
|
507
|
-
const popoverOnBottomBorderOffset = top + height + Popover.VIEWPORT_MARGIN - document.documentElement.clientHeight;
|
|
508
|
-
if (popoverOnTopBorderOffset > 0) {
|
|
509
|
-
y = Math.max(y - popoverOnTopBorderOffset, -maxY);
|
|
510
|
-
} else if (popoverOnBottomBorderOffset > 0) {
|
|
511
|
-
y = Math.min(y + popoverOnBottomBorderOffset, maxY);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
return {
|
|
516
|
-
x: Math.round(x),
|
|
517
|
-
y: Math.round(y),
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* Returns the allowed range for the popover arrow based on its dimension.
|
|
523
|
-
* @private
|
|
524
|
-
* @param {number} dimension the height or width of the popover
|
|
525
|
-
* @param {number} borderRadius border radius of the popover
|
|
526
|
-
* @returns {number}
|
|
527
|
-
*/
|
|
528
|
-
_getArrowRange(dimension, borderRadius) {
|
|
529
|
-
return Math.floor((dimension / 2) - (borderRadius + Popover.ARROW_MARGIN));
|
|
530
|
-
}
|
|
531
|
-
|
|
532
471
|
/**
|
|
533
472
|
* Adjust the desired top position to compensate for shift of the screen
|
|
534
473
|
* caused by opened keyboard on iOS which affects all elements with position:fixed.
|
|
@@ -598,7 +537,7 @@ class Popover extends Popup {
|
|
|
598
537
|
popoverSize.height = targetRect.height;
|
|
599
538
|
}
|
|
600
539
|
|
|
601
|
-
const arrowOffset = this.hideArrow ? 0 :
|
|
540
|
+
const arrowOffset = this.hideArrow ? 0 : ARROW_SIZE;
|
|
602
541
|
|
|
603
542
|
// calc popover positions
|
|
604
543
|
switch (placementType) {
|
|
@@ -666,7 +605,8 @@ class Popover extends Popup {
|
|
|
666
605
|
this._top = Math.round(top);
|
|
667
606
|
}
|
|
668
607
|
|
|
669
|
-
const
|
|
608
|
+
const borderRadius = Number.parseInt(window.getComputedStyle(this).getPropertyValue("border-radius"));
|
|
609
|
+
const arrowPos = this.getArrowPosition(targetRect, popoverSize, left, top, isVertical, borderRadius);
|
|
670
610
|
|
|
671
611
|
return {
|
|
672
612
|
arrow: arrowPos,
|
|
@@ -680,33 +620,50 @@ class Popover extends Popup {
|
|
|
680
620
|
* Calculates the position for the arrow.
|
|
681
621
|
* @private
|
|
682
622
|
* @param targetRect BoundingClientRect of the target element
|
|
683
|
-
* @param popoverSize Width and height of the popover
|
|
623
|
+
* @param {{width: number, height: number}} popoverSize Width and height of the popover
|
|
684
624
|
* @param left Left offset of the popover
|
|
685
625
|
* @param top Top offset of the popover
|
|
686
|
-
* @param isVertical
|
|
626
|
+
* @param isVertical If the popover is positioned vertically to the target element
|
|
627
|
+
* @param {number} borderRadius Value of the border-radius property
|
|
687
628
|
* @returns {{x: number, y: number}} Arrow's coordinates
|
|
688
629
|
*/
|
|
689
|
-
getArrowPosition(targetRect,
|
|
630
|
+
getArrowPosition(targetRect, { width, height }, left, top, isVertical, borderRadius) {
|
|
690
631
|
let arrowXCentered = this.horizontalAlign === PopoverHorizontalAlign.Center || this.horizontalAlign === PopoverHorizontalAlign.Stretch;
|
|
691
632
|
|
|
692
633
|
if (this.horizontalAlign === PopoverHorizontalAlign.Right && left <= targetRect.left) {
|
|
693
634
|
arrowXCentered = true;
|
|
694
635
|
}
|
|
695
636
|
|
|
696
|
-
if (this.horizontalAlign === PopoverHorizontalAlign.Left && left +
|
|
637
|
+
if (this.horizontalAlign === PopoverHorizontalAlign.Left && left + width >= targetRect.left + targetRect.width) {
|
|
697
638
|
arrowXCentered = true;
|
|
698
639
|
}
|
|
699
640
|
|
|
700
641
|
let arrowTranslateX = 0;
|
|
701
642
|
if (isVertical && arrowXCentered) {
|
|
702
|
-
arrowTranslateX = targetRect.left + targetRect.width / 2 - left -
|
|
643
|
+
arrowTranslateX = targetRect.left + targetRect.width / 2 - left - width / 2;
|
|
703
644
|
}
|
|
704
645
|
|
|
705
646
|
let arrowTranslateY = 0;
|
|
706
647
|
if (!isVertical) {
|
|
707
|
-
arrowTranslateY = targetRect.top + targetRect.height / 2 - top -
|
|
648
|
+
arrowTranslateY = targetRect.top + targetRect.height / 2 - top - height / 2;
|
|
708
649
|
}
|
|
709
650
|
|
|
651
|
+
// Restricts the arrow's translate value along each dimension,
|
|
652
|
+
// so that the arrow does not clip over the popover's rounded borders.
|
|
653
|
+
const safeRangeForArrowY = height / 2 - borderRadius - ARROW_SIZE / 2;
|
|
654
|
+
arrowTranslateY = clamp(
|
|
655
|
+
arrowTranslateY,
|
|
656
|
+
-safeRangeForArrowY,
|
|
657
|
+
safeRangeForArrowY,
|
|
658
|
+
);
|
|
659
|
+
|
|
660
|
+
const safeRangeForArrowX = width / 2 - borderRadius - ARROW_SIZE / 2;
|
|
661
|
+
arrowTranslateX = clamp(
|
|
662
|
+
arrowTranslateX,
|
|
663
|
+
-safeRangeForArrowX,
|
|
664
|
+
safeRangeForArrowX,
|
|
665
|
+
);
|
|
666
|
+
|
|
710
667
|
return {
|
|
711
668
|
x: Math.round(arrowTranslateX),
|
|
712
669
|
y: Math.round(arrowTranslateY),
|
package/src/TimePicker.js
CHANGED
|
@@ -150,9 +150,7 @@ class TimePicker extends TimePickerBase {
|
|
|
150
150
|
"ariaRoledescription": this.dateAriaDescription,
|
|
151
151
|
"ariaHasPopup": "dialog",
|
|
152
152
|
"ariaAutoComplete": "none",
|
|
153
|
-
"role": "combobox",
|
|
154
153
|
"ariaControls": `${this._id}-responsive-popover`,
|
|
155
|
-
"ariaExpanded": this.isOpen(),
|
|
156
154
|
};
|
|
157
155
|
}
|
|
158
156
|
|
package/src/TimeSelection.js
CHANGED
|
@@ -7,6 +7,7 @@ import getLocale from "@ui5/webcomponents-base/dist/locale/getLocale.js";
|
|
|
7
7
|
import DateFormat from "@ui5/webcomponents-localization/dist/DateFormat.js";
|
|
8
8
|
import getCachedLocaleDataInstance from "@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js";
|
|
9
9
|
import "@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js"; // default calendar for bundling
|
|
10
|
+
import CalendarType from "@ui5/webcomponents-base/dist/types/CalendarType.js";
|
|
10
11
|
import { fetchCldr } from "@ui5/webcomponents-base/dist/asset-registries/LocaleData.js";
|
|
11
12
|
import {
|
|
12
13
|
isLeft,
|
|
@@ -136,6 +137,10 @@ const metadata = {
|
|
|
136
137
|
type: String,
|
|
137
138
|
defaultValue: "hours",
|
|
138
139
|
},
|
|
140
|
+
|
|
141
|
+
_calendarType: {
|
|
142
|
+
type: CalendarType,
|
|
143
|
+
},
|
|
139
144
|
},
|
|
140
145
|
events: /** @lends sap.ui.webcomponents.main.TimeSelection.prototype */ {
|
|
141
146
|
/**
|
|
@@ -435,10 +440,12 @@ class TimeSelection extends UI5Element {
|
|
|
435
440
|
let dateFormat;
|
|
436
441
|
if (this._isPattern) {
|
|
437
442
|
dateFormat = DateFormat.getInstance({
|
|
443
|
+
calendarType: this._calendarType,
|
|
438
444
|
pattern: this._formatPattern,
|
|
439
445
|
});
|
|
440
446
|
} else {
|
|
441
447
|
dateFormat = DateFormat.getInstance({
|
|
448
|
+
calendarType: this._calendarType,
|
|
442
449
|
style: this._formatPattern,
|
|
443
450
|
});
|
|
444
451
|
}
|