@fundamental-ngx/core 0.37.0-rc.12 → 0.37.0-rc.13
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/carousel/carousel-item/carousel-item.component.d.ts +2 -3
- package/carousel/carousel.component.d.ts +4 -3
- package/esm2020/carousel/carousel-item/carousel-item.component.mjs +5 -7
- package/esm2020/carousel/carousel.component.mjs +29 -25
- package/fesm2015/fundamental-ngx-core-carousel.mjs +30 -28
- package/fesm2015/fundamental-ngx-core-carousel.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-carousel.mjs +30 -28
- package/fesm2020/fundamental-ngx-core-carousel.mjs.map +1 -1
- package/fundamental-ngx-core-v0.37.0-rc.13.tgz +0 -0
- package/package.json +2 -2
- package/fundamental-ngx-core-v0.37.0-rc.12.tgz +0 -0
|
@@ -3,7 +3,7 @@ import { Directive, Input, HostBinding, EventEmitter, Injectable, Inject, Output
|
|
|
3
3
|
import * as i3 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import { Subject, merge, fromEvent } from 'rxjs';
|
|
6
|
-
import { takeUntil, debounceTime } from 'rxjs/operators';
|
|
6
|
+
import { takeUntil, take, debounceTime } from 'rxjs/operators';
|
|
7
7
|
import * as i2 from '@fundamental-ngx/core/utils';
|
|
8
8
|
import { resizeObservable } from '@fundamental-ngx/core/utils';
|
|
9
9
|
import * as i1 from '@fundamental-ngx/core/busy-indicator';
|
|
@@ -449,8 +449,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
449
449
|
let carouselItemCounter = 0;
|
|
450
450
|
class CarouselItemComponent {
|
|
451
451
|
/** @hidden */
|
|
452
|
-
constructor(
|
|
453
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
452
|
+
constructor(_elementRef) {
|
|
454
453
|
this._elementRef = _elementRef;
|
|
455
454
|
/** Id of the Carousel items. */
|
|
456
455
|
this.id = `fd-carousel-item-${carouselItemCounter++}`;
|
|
@@ -470,7 +469,6 @@ class CarouselItemComponent {
|
|
|
470
469
|
/** @hidden */
|
|
471
470
|
set visibility(visibility) {
|
|
472
471
|
this._visibility = visibility;
|
|
473
|
-
this._changeDetectorRef.detectChanges();
|
|
474
472
|
}
|
|
475
473
|
get visibility() {
|
|
476
474
|
return this._visibility;
|
|
@@ -488,12 +486,12 @@ class CarouselItemComponent {
|
|
|
488
486
|
return this.element.getBoundingClientRect().height || this.initialHeight;
|
|
489
487
|
}
|
|
490
488
|
}
|
|
491
|
-
CarouselItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CarouselItemComponent, deps: [{ token: i0.
|
|
489
|
+
CarouselItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CarouselItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
492
490
|
CarouselItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: CarouselItemComponent, selector: "fd-carousel-item", inputs: { id: "id", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaDescribedBy: "ariaDescribedBy", loading: "loading", title: "title", initialHeight: "initialHeight", initialWidth: "initialWidth", value: "value" }, host: { properties: { "attr.id": "this.id", "attr.aria-label": "this.ariaLabel", "attr.aria-labelledby": "this.ariaLabelledBy", "attr.aria-describedby": "this.ariaDescribedBy", "attr.title": "this.title", "class.fd-carousel__item": "this.carouselItem", "class.fd-carousel__item--active": "this.carouselItemActive", "style.visibility": "this._visibility" } }, ngImport: i0, template: "<fd-busy-indicator [loading]=\"loading\">\n <ng-content></ng-content>\n</fd-busy-indicator>\n", dependencies: [{ kind: "component", type: i1.BusyIndicatorComponent, selector: "fd-busy-indicator", inputs: ["loading", "size", "block", "ariaLabel", "title", "label", "ariaLive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
493
491
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CarouselItemComponent, decorators: [{
|
|
494
492
|
type: Component,
|
|
495
493
|
args: [{ selector: 'fd-carousel-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<fd-busy-indicator [loading]=\"loading\">\n <ng-content></ng-content>\n</fd-busy-indicator>\n" }]
|
|
496
|
-
}], ctorParameters: function () { return [{ type: i0.
|
|
494
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { id: [{
|
|
497
495
|
type: Input
|
|
498
496
|
}, {
|
|
499
497
|
type: HostBinding,
|
|
@@ -559,11 +557,12 @@ class CarouselActiveSlides {
|
|
|
559
557
|
}
|
|
560
558
|
class CarouselComponent {
|
|
561
559
|
/** @hidden */
|
|
562
|
-
constructor(_elementRef, _renderer, _changeDetectorRef, _carouselService, _rtlService) {
|
|
560
|
+
constructor(_elementRef, _renderer, _changeDetectorRef, _carouselService, _zone, _rtlService) {
|
|
563
561
|
this._elementRef = _elementRef;
|
|
564
562
|
this._renderer = _renderer;
|
|
565
563
|
this._changeDetectorRef = _changeDetectorRef;
|
|
566
564
|
this._carouselService = _carouselService;
|
|
565
|
+
this._zone = _zone;
|
|
567
566
|
this._rtlService = _rtlService;
|
|
568
567
|
/** ID for the Carousel. */
|
|
569
568
|
this.id = `fd-carousel-${carouselCounter++}`;
|
|
@@ -845,28 +844,31 @@ class CarouselComponent {
|
|
|
845
844
|
}
|
|
846
845
|
/** @hidden Initialize carousel with visible items */
|
|
847
846
|
_initializeCarousel() {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
else {
|
|
857
|
-
arrayLength = this.slides.length - this._visibleSlidesNumericCount + 1;
|
|
858
|
-
}
|
|
859
|
-
const pageIndicatorsIfZeroCount = this.slides.length === 0 ? 0 : 1;
|
|
860
|
-
this.pageIndicatorsCountArray = new Array(arrayLength > 0 ? arrayLength : pageIndicatorsIfZeroCount);
|
|
861
|
-
this._goToFirstItem();
|
|
862
|
-
this.slides.forEach((_slide, index) => {
|
|
863
|
-
if (index >= this.currentActiveSlidesStartIndex &&
|
|
864
|
-
index < this.currentActiveSlidesStartIndex + this._visibleSlidesNumericCount) {
|
|
865
|
-
_slide.visibility = 'visible';
|
|
847
|
+
this._zone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {
|
|
848
|
+
// Handles navigator button enabled/disabled state
|
|
849
|
+
this._buttonVisibility();
|
|
850
|
+
let arrayLength;
|
|
851
|
+
// set page indicator count with fake array, to use in template
|
|
852
|
+
if (this.loop && this._visibleSlidesNumericCount > 1) {
|
|
853
|
+
// If loop with multi item visible.
|
|
854
|
+
arrayLength = this.slides.length;
|
|
866
855
|
}
|
|
867
856
|
else {
|
|
868
|
-
|
|
857
|
+
arrayLength = this.slides.length - this._visibleSlidesNumericCount + 1;
|
|
869
858
|
}
|
|
859
|
+
const pageIndicatorsIfZeroCount = this.slides.length === 0 ? 0 : 1;
|
|
860
|
+
this.pageIndicatorsCountArray = new Array(arrayLength > 0 ? arrayLength : pageIndicatorsIfZeroCount);
|
|
861
|
+
this._goToFirstItem();
|
|
862
|
+
this.slides.forEach((_slide, index) => {
|
|
863
|
+
if (index >= this.currentActiveSlidesStartIndex &&
|
|
864
|
+
index < this.currentActiveSlidesStartIndex + this._visibleSlidesNumericCount) {
|
|
865
|
+
_slide.visibility = 'visible';
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
_slide.visibility = 'hidden';
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
this._changeDetectorRef.detectChanges();
|
|
870
872
|
});
|
|
871
873
|
}
|
|
872
874
|
/** @hidden */
|
|
@@ -1102,7 +1104,7 @@ class CarouselComponent {
|
|
|
1102
1104
|
return slides;
|
|
1103
1105
|
}
|
|
1104
1106
|
}
|
|
1105
|
-
CarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CarouselComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: CarouselService }, { token: i2.RtlService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1107
|
+
CarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CarouselComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: CarouselService }, { token: i0.NgZone }, { token: i2.RtlService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1106
1108
|
CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: CarouselComponent, selector: "fd-carousel", inputs: { id: "id", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaDescribedBy: "ariaDescribedBy", pageIndicatorsOrientation: "pageIndicatorsOrientation", height: "height", width: "width", loop: "loop", leftNavigationBtnLabel: "leftNavigationBtnLabel", rightNavigationBtnLabel: "rightNavigationBtnLabel", navigation: "navigation", navigatorInPageIndicator: "navigatorInPageIndicator", numericIndicator: "numericIndicator", pageIndicatorContainer: "pageIndicatorContainer", pageIndicator: "pageIndicator", resourceStrings: "resourceStrings", slideTransitionDuration: "slideTransitionDuration", swipeEnabled: "swipeEnabled", vertical: "vertical", visibleSlidesCount: "visibleSlidesCount" }, outputs: { slideChange: "slideChange" }, host: { listeners: { "keydown.arrowright": "onKeydownArrowRight($event)", "keydown.arrowleft": "onKeydownArrowLeft($event)" }, properties: { "style.width": "width", "attr.id": "this.id" } }, providers: [CarouselService], queries: [{ propertyName: "slides", predicate: CarouselItemComponent, descendants: true }], viewQueries: [{ propertyName: "slideContainer", first: true, predicate: ["slideContainer"], descendants: true }, { propertyName: "carouselContainer", first: true, predicate: ["carouselContainer"], descendants: true }], ngImport: i0, template: "<div\n class=\"fd-carousel\"\n [class.fd-carousel--no-navigation]=\"!navigation\"\n data-ride=\"carousel\"\n tabindex=\"0\"\n [style.height]=\"height\"\n [style.width]=\"width\"\n [attr.dir]=\"dir\"\n role=\"region\"\n #carouselContainer\n (click)=\"_focus()\"\n>\n <ng-container *ngIf=\"_showPageIndicatorContainer && pageIndicatorsOrientation === 'top'\">\n <ng-container *ngTemplateOutlet=\"pageIndicatorContainer\"></ng-container>\n </ng-container>\n\n <div\n class=\"fd-carousel__content\"\n [class.fd-carousel__content--horizontal]=\"!vertical\"\n [style.width]=\"_contentSizePx\"\n >\n <ng-container *ngIf=\"_showNavigationButtonInContent\">\n <ng-container *ngTemplateOutlet=\"buttonLeft\"></ng-container>\n </ng-container>\n\n <div #slideContainer class=\"fd-carousel__slides\">\n <ng-content></ng-content>\n </div>\n\n <ng-container *ngIf=\"_showNavigationButtonInContent\">\n <ng-container *ngTemplateOutlet=\"buttonRight\"></ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"_showPageIndicatorContainer && pageIndicatorsOrientation === 'bottom'\">\n <ng-container *ngTemplateOutlet=\"pageIndicatorContainer\"></ng-container>\n </ng-container>\n\n <div style=\"display: none\" role=\"region\" [attr.id]=\"id + '-accessibility'\" aria-live=\"polite\" dir=\"ltr\">\n {{ screenReaderLabel }}\n </div>\n</div>\n\n<ng-template #pageIndicatorContainer>\n <div class=\"fd-carousel__page-indicator-container\">\n <ng-container *ngIf=\"_showNavigationButtonInPageIndicatorContainer\">\n <ng-container *ngTemplateOutlet=\"buttonLeft\"></ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"pageIndicators\"> </ng-container>\n\n <ng-container *ngIf=\"_showNavigationButtonInPageIndicatorContainer\">\n <ng-container *ngTemplateOutlet=\"buttonRight\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageIndicators>\n <ng-container *ngIf=\"numericIndicator\">\n <div class=\"fd-carousel__page-indicators\">\n <ng-container *ngIf=\"pageIndicator\">\n <div class=\"fd-carousel__text\" dir=\"ltr\">\n {{ getPageIndicatorLabel }}\n </div>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!numericIndicator && _showNavigationButtonInPageIndicatorContainer\">\n <ol class=\"fd-carousel__page-indicators\" [attr.dir]=\"dir\">\n <ng-container *ngIf=\"pageIndicator\">\n <ng-container *ngFor=\"let item of pageIndicatorsCountArray; let i = index\">\n <li\n [attr.data-slide-to]=\"i + 1\"\n class=\"fd-carousel__page-indicator\"\n [class.fd-carousel__page-indicator--active]=\"i === currentActiveSlidesStartIndex\"\n ></li>\n </ng-container>\n </ng-container>\n </ol>\n </ng-container>\n</ng-template>\n\n<ng-template #buttonLeft>\n <button\n fd-button\n class=\"fd-carousel__button fd-carousel__button--left\"\n [style.z-index]=\"1\"\n data-slide=\"previous\"\n [attr.aria-label]=\"leftNavigationBtnLabel || ('coreCarousel.leftNavigationBtnLabel' | fdTranslate)\"\n (click)=\"previous(); $event.stopPropagation()\"\n [disabled]=\"leftButtonDisabled\"\n [attr.title]=\"leftNavigationBtnLabel || ('coreCarousel.leftNavigationBtnLabel' | fdTranslate)\"\n glyph=\"slim-arrow-left\"\n ></button>\n</ng-template>\n\n<ng-template #buttonRight>\n <button\n fd-button\n class=\"fd-carousel__button fd-carousel__button--right\"\n [style.z-index]=\"1\"\n data-slide=\"next\"\n [attr.aria-label]=\"rightNavigationBtnLabel || ('coreCarousel.rightNavigationBtnLabel' | fdTranslate)\"\n (click)=\"next(); $event.stopPropagation()\"\n [disabled]=\"rightButtonDisabled\"\n [attr.title]=\"rightNavigationBtnLabel || ('coreCarousel.rightNavigationBtnLabel' | fdTranslate)\"\n glyph=\"slim-arrow-right\"\n ></button>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.26.0-rc.12\n * Copyright (c) 2022 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-carousel{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:column;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:100%;line-height:var(--sapContent_LineHeight);margin:0;max-width:100%;min-width:15.5rem;padding:0;width:100%}.fd-carousel:after,.fd-carousel:before{box-sizing:inherit;font-size:inherit}.fd-carousel.is-focus,.fd-carousel:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-carousel.is-hover .fd-carousel__content .fd-carousel__button,.fd-carousel:hover .fd-carousel__content .fd-carousel__button{display:block}.fd-carousel .fd-carousel__content{-webkit-box-sizing:border-box;-ms-flex-preferred-size:100%;background:var(--fdCarousel_Content_Background);border:0;box-sizing:border-box;color:var(--sapTextColor);flex-basis:100%;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;line-height:var(--sapContent_LineHeight);margin:0;overflow:hidden;padding:0;position:relative}.fd-carousel .fd-carousel__content:after,.fd-carousel .fd-carousel__content:before{box-sizing:inherit;font-size:inherit}.fd-carousel .fd-carousel__content .fd-carousel__button{-webkit-box-shadow:var(--sapContent_Shadow1);-webkit-transform:translateY(-50%);box-shadow:var(--sapContent_Shadow1);display:none;margin:0;position:absolute;top:50%;transform:translateY(-50%)}.fd-carousel .fd-carousel__content .fd-carousel__button--left{left:.5rem}.fd-carousel .fd-carousel__content .fd-carousel__button--left[dir=rtl],[dir=rtl] .fd-carousel .fd-carousel__content .fd-carousel__button--left{left:auto;right:.5rem}.fd-carousel .fd-carousel__content .fd-carousel__button--right{right:.5rem}.fd-carousel .fd-carousel__content .fd-carousel__button--right[dir=rtl],[dir=rtl] .fd-carousel .fd-carousel__content .fd-carousel__button--right{left:.5rem;right:auto}.fd-carousel .fd-carousel__content .fd-carousel__item img{height:auto;min-width:100%}.fd-carousel .fd-carousel__content--horizontal .fd-carousel__slides{-ms-touch-action:pan-y;display:flex;flex-direction:row;min-width:-moz-fit-content;min-width:fit-content;touch-action:pan-y;width:100%}.fd-carousel .fd-carousel__content--horizontal .fd-carousel__item img{min-height:100%;min-width:auto;width:auto}.fd-carousel__slides{-webkit-box-sizing:border-box;-ms-touch-action:pan-x;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-drag:none;-webkit-tap-highlight-color:rgba(0,0,0,0);border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:100%;line-height:var(--sapContent_LineHeight);margin:0;min-height:-moz-fit-content;min-height:fit-content;padding:0;touch-action:pan-x;user-select:none}.fd-carousel__slides:after,.fd-carousel__slides:before{box-sizing:inherit;font-size:inherit}.fd-carousel__item{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;display:none;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:100%;justify-content:center;line-height:var(--sapContent_LineHeight);line-height:0;margin:0;padding:0;width:100%}.fd-carousel__item:after,.fd-carousel__item:before{box-sizing:inherit;font-size:inherit}.fd-carousel__item--active{display:block}.fd-carousel__item img{pointer-events:none}.fd-carousel__page-indicator-container{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:var(--sapPageFooter_Background);border:0;border-top:var(--fdCarousel_Pagination_Border);box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;max-height:3.5rem;min-height:2.75rem;padding:.375rem .5rem}.fd-carousel__page-indicator-container:after,.fd-carousel__page-indicator-container:before{box-sizing:inherit;font-size:inherit}.fd-carousel__page-indicator-container:first-child{border-bottom:var(--fdCarousel_Pagination_Border);border-top:none}.fd-carousel__page-indicators{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-ms-flex-wrap:wrap;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-wrap:wrap;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:9rem;padding:.5rem}.fd-carousel__page-indicators:after,.fd-carousel__page-indicators:before{box-sizing:inherit;font-size:inherit}.fd-carousel__page-indicator{-webkit-box-sizing:border-box;background-color:var(--fdCarousel_Dot_Background);border:0;border:var(--fdCarousel_Dot_Border);border-radius:50%;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:var(--fdCarousel_Dot_Size);line-height:var(--sapContent_LineHeight);list-style-type:none;margin:0;margin:var(--fdCarousel_Dot_Margin);padding:0;width:var(--fdCarousel_Dot_Size)}.fd-carousel__page-indicator:after,.fd-carousel__page-indicator:before{box-sizing:inherit;font-size:inherit}.fd-carousel__page-indicator--active{background-color:var(--fdCarousel_Dot_Selected_Background);border:var(--fdCarousel_Dot_Selected_Border);height:.5rem;margin:0 .25rem;width:.5rem}.fd-carousel__text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapPageFooter_TextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;line-height:var(--sapContent_LineHeight);margin:0;overflow:hidden;padding:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.fd-carousel__text:after,.fd-carousel__text:before{box-sizing:inherit;font-size:inherit}.fd-carousel .fd-carousel__button{-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;display:flex;height:2.125rem;justify-content:center;margin:.25rem;max-height:2.125rem;max-width:2.125rem;min-height:2.125rem;min-width:2.125rem;padding:0;width:2.125rem}.fd-carousel .fd-carousel__button:before{inset:-.25rem;width:auto}.fd-carousel .fd-carousel__button[dir=rtl]>[class*=sap-icon],[dir=rtl] .fd-carousel .fd-carousel__button>[class*=sap-icon]{transform:rotate(180deg)}.fd-carousel .fd-carousel__button.is-hover,.fd-carousel .fd-carousel__button:hover{box-shadow:var(--sapContent_Shadow1)}.fd-carousel--no-navigation .fd-carousel__button,.fd-carousel--no-navigation.is-hover .fd-carousel__content .fd-carousel__button,.fd-carousel--no-navigation:hover .fd-carousel__content .fd-carousel__button{display:none}.fd-carousel__item fd-busy-indicator{display:block;height:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "pipe", type: i5.FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1107
1109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
1108
1110
|
type: Component,
|
|
@@ -1110,7 +1112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
1110
1112
|
'[style.width]': 'width'
|
|
1111
1113
|
}, template: "<div\n class=\"fd-carousel\"\n [class.fd-carousel--no-navigation]=\"!navigation\"\n data-ride=\"carousel\"\n tabindex=\"0\"\n [style.height]=\"height\"\n [style.width]=\"width\"\n [attr.dir]=\"dir\"\n role=\"region\"\n #carouselContainer\n (click)=\"_focus()\"\n>\n <ng-container *ngIf=\"_showPageIndicatorContainer && pageIndicatorsOrientation === 'top'\">\n <ng-container *ngTemplateOutlet=\"pageIndicatorContainer\"></ng-container>\n </ng-container>\n\n <div\n class=\"fd-carousel__content\"\n [class.fd-carousel__content--horizontal]=\"!vertical\"\n [style.width]=\"_contentSizePx\"\n >\n <ng-container *ngIf=\"_showNavigationButtonInContent\">\n <ng-container *ngTemplateOutlet=\"buttonLeft\"></ng-container>\n </ng-container>\n\n <div #slideContainer class=\"fd-carousel__slides\">\n <ng-content></ng-content>\n </div>\n\n <ng-container *ngIf=\"_showNavigationButtonInContent\">\n <ng-container *ngTemplateOutlet=\"buttonRight\"></ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"_showPageIndicatorContainer && pageIndicatorsOrientation === 'bottom'\">\n <ng-container *ngTemplateOutlet=\"pageIndicatorContainer\"></ng-container>\n </ng-container>\n\n <div style=\"display: none\" role=\"region\" [attr.id]=\"id + '-accessibility'\" aria-live=\"polite\" dir=\"ltr\">\n {{ screenReaderLabel }}\n </div>\n</div>\n\n<ng-template #pageIndicatorContainer>\n <div class=\"fd-carousel__page-indicator-container\">\n <ng-container *ngIf=\"_showNavigationButtonInPageIndicatorContainer\">\n <ng-container *ngTemplateOutlet=\"buttonLeft\"></ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"pageIndicators\"> </ng-container>\n\n <ng-container *ngIf=\"_showNavigationButtonInPageIndicatorContainer\">\n <ng-container *ngTemplateOutlet=\"buttonRight\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageIndicators>\n <ng-container *ngIf=\"numericIndicator\">\n <div class=\"fd-carousel__page-indicators\">\n <ng-container *ngIf=\"pageIndicator\">\n <div class=\"fd-carousel__text\" dir=\"ltr\">\n {{ getPageIndicatorLabel }}\n </div>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!numericIndicator && _showNavigationButtonInPageIndicatorContainer\">\n <ol class=\"fd-carousel__page-indicators\" [attr.dir]=\"dir\">\n <ng-container *ngIf=\"pageIndicator\">\n <ng-container *ngFor=\"let item of pageIndicatorsCountArray; let i = index\">\n <li\n [attr.data-slide-to]=\"i + 1\"\n class=\"fd-carousel__page-indicator\"\n [class.fd-carousel__page-indicator--active]=\"i === currentActiveSlidesStartIndex\"\n ></li>\n </ng-container>\n </ng-container>\n </ol>\n </ng-container>\n</ng-template>\n\n<ng-template #buttonLeft>\n <button\n fd-button\n class=\"fd-carousel__button fd-carousel__button--left\"\n [style.z-index]=\"1\"\n data-slide=\"previous\"\n [attr.aria-label]=\"leftNavigationBtnLabel || ('coreCarousel.leftNavigationBtnLabel' | fdTranslate)\"\n (click)=\"previous(); $event.stopPropagation()\"\n [disabled]=\"leftButtonDisabled\"\n [attr.title]=\"leftNavigationBtnLabel || ('coreCarousel.leftNavigationBtnLabel' | fdTranslate)\"\n glyph=\"slim-arrow-left\"\n ></button>\n</ng-template>\n\n<ng-template #buttonRight>\n <button\n fd-button\n class=\"fd-carousel__button fd-carousel__button--right\"\n [style.z-index]=\"1\"\n data-slide=\"next\"\n [attr.aria-label]=\"rightNavigationBtnLabel || ('coreCarousel.rightNavigationBtnLabel' | fdTranslate)\"\n (click)=\"next(); $event.stopPropagation()\"\n [disabled]=\"rightButtonDisabled\"\n [attr.title]=\"rightNavigationBtnLabel || ('coreCarousel.rightNavigationBtnLabel' | fdTranslate)\"\n glyph=\"slim-arrow-right\"\n ></button>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.26.0-rc.12\n * Copyright (c) 2022 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-carousel{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:column;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:100%;line-height:var(--sapContent_LineHeight);margin:0;max-width:100%;min-width:15.5rem;padding:0;width:100%}.fd-carousel:after,.fd-carousel:before{box-sizing:inherit;font-size:inherit}.fd-carousel.is-focus,.fd-carousel:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-carousel.is-hover .fd-carousel__content .fd-carousel__button,.fd-carousel:hover .fd-carousel__content .fd-carousel__button{display:block}.fd-carousel .fd-carousel__content{-webkit-box-sizing:border-box;-ms-flex-preferred-size:100%;background:var(--fdCarousel_Content_Background);border:0;box-sizing:border-box;color:var(--sapTextColor);flex-basis:100%;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;line-height:var(--sapContent_LineHeight);margin:0;overflow:hidden;padding:0;position:relative}.fd-carousel .fd-carousel__content:after,.fd-carousel .fd-carousel__content:before{box-sizing:inherit;font-size:inherit}.fd-carousel .fd-carousel__content .fd-carousel__button{-webkit-box-shadow:var(--sapContent_Shadow1);-webkit-transform:translateY(-50%);box-shadow:var(--sapContent_Shadow1);display:none;margin:0;position:absolute;top:50%;transform:translateY(-50%)}.fd-carousel .fd-carousel__content .fd-carousel__button--left{left:.5rem}.fd-carousel .fd-carousel__content .fd-carousel__button--left[dir=rtl],[dir=rtl] .fd-carousel .fd-carousel__content .fd-carousel__button--left{left:auto;right:.5rem}.fd-carousel .fd-carousel__content .fd-carousel__button--right{right:.5rem}.fd-carousel .fd-carousel__content .fd-carousel__button--right[dir=rtl],[dir=rtl] .fd-carousel .fd-carousel__content .fd-carousel__button--right{left:.5rem;right:auto}.fd-carousel .fd-carousel__content .fd-carousel__item img{height:auto;min-width:100%}.fd-carousel .fd-carousel__content--horizontal .fd-carousel__slides{-ms-touch-action:pan-y;display:flex;flex-direction:row;min-width:-moz-fit-content;min-width:fit-content;touch-action:pan-y;width:100%}.fd-carousel .fd-carousel__content--horizontal .fd-carousel__item img{min-height:100%;min-width:auto;width:auto}.fd-carousel__slides{-webkit-box-sizing:border-box;-ms-touch-action:pan-x;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-drag:none;-webkit-tap-highlight-color:rgba(0,0,0,0);border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:100%;line-height:var(--sapContent_LineHeight);margin:0;min-height:-moz-fit-content;min-height:fit-content;padding:0;touch-action:pan-x;user-select:none}.fd-carousel__slides:after,.fd-carousel__slides:before{box-sizing:inherit;font-size:inherit}.fd-carousel__item{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;display:none;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:100%;justify-content:center;line-height:var(--sapContent_LineHeight);line-height:0;margin:0;padding:0;width:100%}.fd-carousel__item:after,.fd-carousel__item:before{box-sizing:inherit;font-size:inherit}.fd-carousel__item--active{display:block}.fd-carousel__item img{pointer-events:none}.fd-carousel__page-indicator-container{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:var(--sapPageFooter_Background);border:0;border-top:var(--fdCarousel_Pagination_Border);box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;max-height:3.5rem;min-height:2.75rem;padding:.375rem .5rem}.fd-carousel__page-indicator-container:after,.fd-carousel__page-indicator-container:before{box-sizing:inherit;font-size:inherit}.fd-carousel__page-indicator-container:first-child{border-bottom:var(--fdCarousel_Pagination_Border);border-top:none}.fd-carousel__page-indicators{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-ms-flex-wrap:wrap;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-wrap:wrap;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:9rem;padding:.5rem}.fd-carousel__page-indicators:after,.fd-carousel__page-indicators:before{box-sizing:inherit;font-size:inherit}.fd-carousel__page-indicator{-webkit-box-sizing:border-box;background-color:var(--fdCarousel_Dot_Background);border:0;border:var(--fdCarousel_Dot_Border);border-radius:50%;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;height:var(--fdCarousel_Dot_Size);line-height:var(--sapContent_LineHeight);list-style-type:none;margin:0;margin:var(--fdCarousel_Dot_Margin);padding:0;width:var(--fdCarousel_Dot_Size)}.fd-carousel__page-indicator:after,.fd-carousel__page-indicator:before{box-sizing:inherit;font-size:inherit}.fd-carousel__page-indicator--active{background-color:var(--fdCarousel_Dot_Selected_Background);border:var(--fdCarousel_Dot_Selected_Border);height:.5rem;margin:0 .25rem;width:.5rem}.fd-carousel__text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapPageFooter_TextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;line-height:var(--sapContent_LineHeight);margin:0;overflow:hidden;padding:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.fd-carousel__text:after,.fd-carousel__text:before{box-sizing:inherit;font-size:inherit}.fd-carousel .fd-carousel__button{-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;display:flex;height:2.125rem;justify-content:center;margin:.25rem;max-height:2.125rem;max-width:2.125rem;min-height:2.125rem;min-width:2.125rem;padding:0;width:2.125rem}.fd-carousel .fd-carousel__button:before{inset:-.25rem;width:auto}.fd-carousel .fd-carousel__button[dir=rtl]>[class*=sap-icon],[dir=rtl] .fd-carousel .fd-carousel__button>[class*=sap-icon]{transform:rotate(180deg)}.fd-carousel .fd-carousel__button.is-hover,.fd-carousel .fd-carousel__button:hover{box-shadow:var(--sapContent_Shadow1)}.fd-carousel--no-navigation .fd-carousel__button,.fd-carousel--no-navigation.is-hover .fd-carousel__content .fd-carousel__button,.fd-carousel--no-navigation:hover .fd-carousel__content .fd-carousel__button{display:none}.fd-carousel__item fd-busy-indicator{display:block;height:100%}\n"] }]
|
|
1112
1114
|
}], ctorParameters: function () {
|
|
1113
|
-
return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: CarouselService }, { type: i2.RtlService, decorators: [{
|
|
1115
|
+
return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: CarouselService }, { type: i0.NgZone }, { type: i2.RtlService, decorators: [{
|
|
1114
1116
|
type: Optional
|
|
1115
1117
|
}] }];
|
|
1116
1118
|
}, propDecorators: { id: [{
|