@coreui/angular 4.0.0-alpha.12 → 4.0.0-alpha.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/esm2020/lib/accordion/accordion-item/accordion-item.component.mjs +3 -3
- package/esm2020/lib/accordion/accordion.service.mjs +1 -1
- package/esm2020/lib/carousel/carousel/carousel.component.mjs +18 -9
- package/esm2020/lib/carousel/carousel-state.mjs +6 -2
- package/esm2020/lib/carousel/carousel.service.mjs +1 -1
- package/esm2020/lib/collapse/collapse.animations.mjs +10 -1
- package/esm2020/lib/collapse/collapse.directive.mjs +61 -23
- package/esm2020/lib/services/intersection.service.mjs +34 -0
- package/esm2020/lib/services/public_api.mjs +2 -1
- package/fesm2015/coreui-angular.mjs +100 -36
- package/fesm2015/coreui-angular.mjs.map +1 -1
- package/fesm2020/coreui-angular.mjs +96 -35
- package/fesm2020/coreui-angular.mjs.map +1 -1
- package/lib/carousel/carousel/carousel.component.d.ts +8 -2
- package/lib/carousel/carousel.service.d.ts +1 -0
- package/lib/collapse/collapse.animations.d.ts +2 -0
- package/lib/collapse/collapse.directive.d.ts +14 -2
- package/lib/{carousel → services}/intersection.service.d.ts +8 -1
- package/lib/services/public_api.d.ts +1 -0
- package/package.json +1 -1
- package/esm2020/lib/carousel/intersection.service.mjs +0 -33
|
@@ -252,6 +252,15 @@ const expandAnimation = animation([
|
|
|
252
252
|
const collapseAnimation = animation([
|
|
253
253
|
style({ height: '*', visibility: 'visible', overflow: 'hidden', paddingTop: '*', paddingBottom: '*', minHeight: '*' }),
|
|
254
254
|
animate('{{ time }} {{ easing }}', style({ height: 0, visibility: 'hidden', opacity: 0, overflow: 'hidden', paddingTop: 0, paddingBottom: 0, minHeight: 0 }))
|
|
255
|
+
]);
|
|
256
|
+
const expandHorizontalAnimation = animation([
|
|
257
|
+
style({ width: 0, visibility: 'hidden', paddingLeft: 0, paddingRight: 0 }),
|
|
258
|
+
animate('{{ time }} {{ easing }}', style({ width: '*', visibility: 'visible', paddingLeft: '*', paddingRight: '*', minWidth: '*' })),
|
|
259
|
+
animate('{{ time }}', style({ opacity: '*' })),
|
|
260
|
+
]);
|
|
261
|
+
const collapseHorizontalAnimation = animation([
|
|
262
|
+
style({ width: '*', visibility: 'visible', paddingLeft: '*', paddingRight: '*', minWidth: '*' }),
|
|
263
|
+
animate('{{ time }} {{ easing }}', style({ width: 0, visibility: 'hidden', opacity: 0, paddingLeft: 0, paddingRight: 0, minWidth: 0 }))
|
|
255
264
|
]);
|
|
256
265
|
|
|
257
266
|
// todo
|
|
@@ -262,23 +271,25 @@ class CollapseDirective {
|
|
|
262
271
|
this.renderer = renderer;
|
|
263
272
|
this.animationBuilder = animationBuilder;
|
|
264
273
|
this._animate = true;
|
|
274
|
+
this._horizontal = false;
|
|
265
275
|
this._visible = false;
|
|
266
276
|
this._navbar = false;
|
|
267
277
|
/**
|
|
268
278
|
* @ignore
|
|
269
279
|
*/
|
|
270
|
-
this.duration = '
|
|
280
|
+
this.duration = '350ms';
|
|
271
281
|
/**
|
|
272
282
|
* @ignore
|
|
273
283
|
*/
|
|
274
|
-
this.transition = 'ease
|
|
284
|
+
this.transition = 'ease';
|
|
275
285
|
/**
|
|
276
286
|
* Event emitted on visibility change. [docs]
|
|
277
287
|
* @type string
|
|
278
288
|
*/
|
|
279
289
|
this.collapseChange = new EventEmitter();
|
|
290
|
+
this.collapsing = false;
|
|
280
291
|
this.host = this.hostElement.nativeElement;
|
|
281
|
-
this.
|
|
292
|
+
this.setDisplay(false);
|
|
282
293
|
}
|
|
283
294
|
/**
|
|
284
295
|
* @ignore
|
|
@@ -289,6 +300,15 @@ class CollapseDirective {
|
|
|
289
300
|
get animate() {
|
|
290
301
|
return this._animate;
|
|
291
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Set horizontal collapsing to transition the width instead of height.
|
|
305
|
+
*/
|
|
306
|
+
set horizontal(value) {
|
|
307
|
+
this._horizontal = coerceBooleanProperty(value);
|
|
308
|
+
}
|
|
309
|
+
get horizontal() {
|
|
310
|
+
return this._horizontal;
|
|
311
|
+
}
|
|
292
312
|
/**
|
|
293
313
|
* Toggle the visibility of collapsible element.
|
|
294
314
|
*/
|
|
@@ -311,16 +331,25 @@ class CollapseDirective {
|
|
|
311
331
|
get hostClasses() {
|
|
312
332
|
return {
|
|
313
333
|
'navbar-collapse': this.navbar,
|
|
314
|
-
show: this.visible
|
|
334
|
+
show: this.visible,
|
|
335
|
+
'collapse-horizontal': this.horizontal,
|
|
336
|
+
collapsing: this.collapsing
|
|
337
|
+
// collapse: !this.collapsing
|
|
315
338
|
};
|
|
316
339
|
}
|
|
340
|
+
ngAfterViewInit() {
|
|
341
|
+
if (this.visible) {
|
|
342
|
+
this.toggle();
|
|
343
|
+
}
|
|
344
|
+
}
|
|
317
345
|
ngOnDestroy() {
|
|
318
346
|
this.destroyPlayer();
|
|
319
347
|
}
|
|
320
348
|
ngOnChanges(changes) {
|
|
321
349
|
if (changes['visible']) {
|
|
322
|
-
|
|
323
|
-
|
|
350
|
+
if (!changes['visible'].firstChange || !changes['visible'].currentValue) {
|
|
351
|
+
this.toggle(changes['visible'].currentValue);
|
|
352
|
+
}
|
|
324
353
|
}
|
|
325
354
|
}
|
|
326
355
|
ngDoCheck() {
|
|
@@ -329,35 +358,51 @@ class CollapseDirective {
|
|
|
329
358
|
}
|
|
330
359
|
}
|
|
331
360
|
toggle(visible = this.visible) {
|
|
332
|
-
|
|
333
|
-
this.renderer.removeStyle(this.host, 'display');
|
|
334
|
-
}
|
|
335
|
-
this.visible = visible;
|
|
361
|
+
this.setDisplay(true);
|
|
336
362
|
this.createPlayer(visible);
|
|
337
|
-
this.
|
|
363
|
+
this.visible = visible;
|
|
364
|
+
this.player?.play();
|
|
338
365
|
}
|
|
339
366
|
destroyPlayer() {
|
|
340
|
-
|
|
341
|
-
this.player.destroy();
|
|
342
|
-
}
|
|
367
|
+
this.player?.destroy();
|
|
343
368
|
}
|
|
344
369
|
createPlayer(visible = this.visible) {
|
|
345
|
-
if (this.player) {
|
|
370
|
+
if (this.player?.hasStarted()) {
|
|
346
371
|
this.destroyPlayer();
|
|
347
372
|
}
|
|
348
373
|
let animationFactory;
|
|
349
374
|
const duration = this.animate ? this.duration : '0ms';
|
|
350
|
-
|
|
375
|
+
const expand = this.horizontal ? expandHorizontalAnimation : expandAnimation;
|
|
376
|
+
const collapse = this.horizontal ? collapseHorizontalAnimation : collapseAnimation;
|
|
377
|
+
animationFactory = this.animationBuilder.build(useAnimation(visible ? expand : collapse, { params: { time: duration, easing: this.transition } }));
|
|
351
378
|
this.player = animationFactory.create(this.host);
|
|
352
|
-
this.player.onStart(() => {
|
|
353
|
-
|
|
379
|
+
this.player.onStart(() => {
|
|
380
|
+
this.setMaxSize();
|
|
381
|
+
this.collapsing = true;
|
|
382
|
+
this.collapseChange.emit(visible ? 'opening' : 'collapsing');
|
|
383
|
+
});
|
|
384
|
+
this.player.onDone(() => {
|
|
385
|
+
this.collapsing = false;
|
|
386
|
+
this.collapseChange.emit(visible ? 'open' : 'collapsed');
|
|
387
|
+
});
|
|
354
388
|
}
|
|
355
|
-
|
|
356
|
-
|
|
389
|
+
setMaxSize() {
|
|
390
|
+
setTimeout(() => {
|
|
391
|
+
if (this.horizontal) {
|
|
392
|
+
this.scrollWidth = this.host.scrollWidth;
|
|
393
|
+
this.scrollWidth > 0 && this.renderer.setStyle(this.host, 'maxWidth', `${this.scrollWidth}px`);
|
|
394
|
+
// } else {
|
|
395
|
+
// this.scrollHeight = this.host.scrollHeight;
|
|
396
|
+
// this.scrollHeight > 0 && this.renderer.setStyle(this.host, 'maxHeight', `${this.scrollHeight}px`);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
setDisplay(display) {
|
|
401
|
+
display ? this.renderer.removeStyle(this.host, 'display') : this.renderer.setStyle(this.host, 'display', 'none');
|
|
357
402
|
}
|
|
358
403
|
}
|
|
359
404
|
CollapseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CollapseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Directive });
|
|
360
|
-
CollapseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: CollapseDirective, selector: "[cCollapse]", inputs: { animate: "animate", visible: "visible", navbar: "navbar", duration: "duration", transition: "transition" }, outputs: { collapseChange: "collapseChange" }, host: { properties: { "class": "this.hostClasses" } }, exportAs: ["cCollapse"], usesOnChanges: true, ngImport: i0 });
|
|
405
|
+
CollapseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: CollapseDirective, selector: "[cCollapse]", inputs: { animate: "animate", horizontal: "horizontal", visible: "visible", navbar: "navbar", duration: "duration", transition: "transition" }, outputs: { collapseChange: "collapseChange" }, host: { properties: { "class": "this.hostClasses" } }, exportAs: ["cCollapse"], usesOnChanges: true, ngImport: i0 });
|
|
361
406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CollapseDirective, decorators: [{
|
|
362
407
|
type: Directive,
|
|
363
408
|
args: [{
|
|
@@ -366,6 +411,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
366
411
|
}]
|
|
367
412
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.AnimationBuilder }]; }, propDecorators: { animate: [{
|
|
368
413
|
type: Input
|
|
414
|
+
}], horizontal: [{
|
|
415
|
+
type: Input
|
|
369
416
|
}], visible: [{
|
|
370
417
|
type: Input
|
|
371
418
|
}], navbar: [{
|
|
@@ -429,10 +476,10 @@ class AccordionItemComponent {
|
|
|
429
476
|
}
|
|
430
477
|
}
|
|
431
478
|
AccordionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AccordionItemComponent, deps: [{ token: AccordionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
432
|
-
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AccordionItemComponent, selector: "c-accordion-item", inputs: { visible: "visible", open: "open" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], exportAs: ["cAccordionItem"], ngImport: i0, template: "<ng-container>\n <div class=\"accordion-header\">\n <ng-container *ngTemplateOutlet=\"templates['accordionHeaderTemplate'] || defaultAccordionHeaderTemplate; context: itemContext\"></ng-container>\n </div>\n <div class=\"accordion-collapse\" cCollapse [visible]=\"visible\" [attr.aria-expanded]=\"visible\" [id]=\"contentId\">\n <ng-container *ngTemplateOutlet=\"templates['accordionBodyTemplate'] || defaultAccordionBodyTemplate; context: itemContext\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #defaultAccordionHeaderTemplate>\n <button cAccordionButton [collapsed]=\"!visible\" [attr.aria-controls]=\"contentId\" (click)=\"toggleItem()\">\n <ng-container\n *ngTemplateOutlet=\"templates['accordionHeader'] || defaultAccordionHeaderContentTemplate; context: itemContext\">\n </ng-container>\n </button>\n</ng-template>\n\n<ng-template #defaultAccordionHeaderContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-template #defaultAccordionBodyTemplate>\n <div class=\"accordion-body\">\n <ng-container\n *ngTemplateOutlet=\"templates['accordionBody'] || defaultAccordionBodyContentTemplate; context: itemContext\">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #defaultAccordionBodyContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block;overflow:hidden}\n"], directives: [{ type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: CollapseDirective, selector: "[cCollapse]", inputs: ["animate", "visible", "navbar", "duration", "transition"], outputs: ["collapseChange"], exportAs: ["cCollapse"] }, { type: AccordionButtonDirective, selector: "[cAccordionButton]", inputs: ["collapsed", "type"] }] });
|
|
479
|
+
AccordionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AccordionItemComponent, selector: "c-accordion-item", inputs: { visible: "visible", open: "open" }, host: { properties: { "class": "this.hostClasses" } }, queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], exportAs: ["cAccordionItem"], ngImport: i0, template: "<ng-container>\r\n <div class=\"accordion-header\">\r\n <ng-container *ngTemplateOutlet=\"templates['accordionHeaderTemplate'] || defaultAccordionHeaderTemplate; context: itemContext\"></ng-container>\r\n </div>\r\n <div class=\"accordion-collapse\" cCollapse [visible]=\"visible\" [attr.aria-expanded]=\"visible\" [id]=\"contentId\">\r\n <ng-container *ngTemplateOutlet=\"templates['accordionBodyTemplate'] || defaultAccordionBodyTemplate; context: itemContext\"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #defaultAccordionHeaderTemplate>\r\n <button cAccordionButton [collapsed]=\"!visible\" [attr.aria-controls]=\"contentId\" (click)=\"toggleItem()\">\r\n <ng-container\r\n *ngTemplateOutlet=\"templates['accordionHeader'] || defaultAccordionHeaderContentTemplate; context: itemContext\">\r\n </ng-container>\r\n </button>\r\n</ng-template>\r\n\r\n<ng-template #defaultAccordionHeaderContentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n<ng-template #defaultAccordionBodyTemplate>\r\n <div class=\"accordion-body\">\r\n <ng-container\r\n *ngTemplateOutlet=\"templates['accordionBody'] || defaultAccordionBodyContentTemplate; context: itemContext\">\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultAccordionBodyContentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n", styles: [":host{display:block;overflow:hidden}\n"], directives: [{ type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: CollapseDirective, selector: "[cCollapse]", inputs: ["animate", "horizontal", "visible", "navbar", "duration", "transition"], outputs: ["collapseChange"], exportAs: ["cCollapse"] }, { type: AccordionButtonDirective, selector: "[cAccordionButton]", inputs: ["collapsed", "type"] }] });
|
|
433
480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
434
481
|
type: Component,
|
|
435
|
-
args: [{ selector: 'c-accordion-item', exportAs: 'cAccordionItem', template: "<ng-container>\n <div class=\"accordion-header\">\n <ng-container *ngTemplateOutlet=\"templates['accordionHeaderTemplate'] || defaultAccordionHeaderTemplate; context: itemContext\"></ng-container>\n </div>\n <div class=\"accordion-collapse\" cCollapse [visible]=\"visible\" [attr.aria-expanded]=\"visible\" [id]=\"contentId\">\n <ng-container *ngTemplateOutlet=\"templates['accordionBodyTemplate'] || defaultAccordionBodyTemplate; context: itemContext\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #defaultAccordionHeaderTemplate>\n <button cAccordionButton [collapsed]=\"!visible\" [attr.aria-controls]=\"contentId\" (click)=\"toggleItem()\">\n <ng-container\n *ngTemplateOutlet=\"templates['accordionHeader'] || defaultAccordionHeaderContentTemplate; context: itemContext\">\n </ng-container>\n </button>\n</ng-template>\n\n<ng-template #defaultAccordionHeaderContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-template #defaultAccordionBodyTemplate>\n <div class=\"accordion-body\">\n <ng-container\n *ngTemplateOutlet=\"templates['accordionBody'] || defaultAccordionBodyContentTemplate; context: itemContext\">\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #defaultAccordionBodyContentTemplate>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block;overflow:hidden}\n"] }]
|
|
482
|
+
args: [{ selector: 'c-accordion-item', exportAs: 'cAccordionItem', template: "<ng-container>\r\n <div class=\"accordion-header\">\r\n <ng-container *ngTemplateOutlet=\"templates['accordionHeaderTemplate'] || defaultAccordionHeaderTemplate; context: itemContext\"></ng-container>\r\n </div>\r\n <div class=\"accordion-collapse\" cCollapse [visible]=\"visible\" [attr.aria-expanded]=\"visible\" [id]=\"contentId\">\r\n <ng-container *ngTemplateOutlet=\"templates['accordionBodyTemplate'] || defaultAccordionBodyTemplate; context: itemContext\"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #defaultAccordionHeaderTemplate>\r\n <button cAccordionButton [collapsed]=\"!visible\" [attr.aria-controls]=\"contentId\" (click)=\"toggleItem()\">\r\n <ng-container\r\n *ngTemplateOutlet=\"templates['accordionHeader'] || defaultAccordionHeaderContentTemplate; context: itemContext\">\r\n </ng-container>\r\n </button>\r\n</ng-template>\r\n\r\n<ng-template #defaultAccordionHeaderContentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n<ng-template #defaultAccordionBodyTemplate>\r\n <div class=\"accordion-body\">\r\n <ng-container\r\n *ngTemplateOutlet=\"templates['accordionBody'] || defaultAccordionBodyContentTemplate; context: itemContext\">\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultAccordionBodyContentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n", styles: [":host{display:block;overflow:hidden}\n"] }]
|
|
436
483
|
}], ctorParameters: function () { return [{ type: AccordionService }]; }, propDecorators: { visible: [{
|
|
437
484
|
type: Input
|
|
438
485
|
}], open: [{
|
|
@@ -1687,14 +1734,15 @@ class IntersectionService {
|
|
|
1687
1734
|
constructor() {
|
|
1688
1735
|
this.intersecting = new BehaviorSubject(false);
|
|
1689
1736
|
this.intersecting$ = this.intersecting.asObservable();
|
|
1690
|
-
|
|
1691
|
-
createIntersectionObserver(hostElement) {
|
|
1692
|
-
this.hostElement = hostElement;
|
|
1693
|
-
const options = {
|
|
1737
|
+
this.defaultObserverOptions = {
|
|
1694
1738
|
root: null,
|
|
1695
1739
|
rootMargin: '0px',
|
|
1696
1740
|
threshold: 0.2
|
|
1697
1741
|
};
|
|
1742
|
+
}
|
|
1743
|
+
createIntersectionObserver(hostElement, observerOptions = this.defaultObserverOptions) {
|
|
1744
|
+
const options = { ...this.defaultObserverOptions, ...observerOptions };
|
|
1745
|
+
this.hostElement = hostElement;
|
|
1698
1746
|
const handleIntersect = (entries, observer) => {
|
|
1699
1747
|
entries.forEach((entry) => {
|
|
1700
1748
|
this.intersecting.next(entry.isIntersecting);
|
|
@@ -1790,7 +1838,11 @@ class CarouselState {
|
|
|
1790
1838
|
if (prevState.activeItemIndex !== nextState.activeItemIndex) {
|
|
1791
1839
|
const activeItemIndex = this.state.activeItemIndex || 0;
|
|
1792
1840
|
const itemInterval = this.state.items && this.state.items[activeItemIndex]?.interval || -1;
|
|
1793
|
-
this.carouselService.setIndex({
|
|
1841
|
+
this.carouselService.setIndex({
|
|
1842
|
+
active: nextState.activeItemIndex,
|
|
1843
|
+
interval: itemInterval,
|
|
1844
|
+
lastItemIndex: (nextState.items?.length ?? 0) - 1
|
|
1845
|
+
});
|
|
1794
1846
|
}
|
|
1795
1847
|
}
|
|
1796
1848
|
setItems(newItems) {
|
|
@@ -1899,6 +1951,12 @@ class CarouselComponent {
|
|
|
1899
1951
|
* @default 'slide'
|
|
1900
1952
|
*/
|
|
1901
1953
|
this.transition = 'slide';
|
|
1954
|
+
/**
|
|
1955
|
+
* Set whether the carousel should cycle continuously or have hard stops.
|
|
1956
|
+
* @type boolean
|
|
1957
|
+
* @default true
|
|
1958
|
+
*/
|
|
1959
|
+
this.wrap = true;
|
|
1902
1960
|
/**
|
|
1903
1961
|
* Event emitted on carousel item change. [docs]
|
|
1904
1962
|
* @type number
|
|
@@ -1967,12 +2025,13 @@ class CarouselComponent {
|
|
|
1967
2025
|
}
|
|
1968
2026
|
carouselStateSubscribe(subscribe = true) {
|
|
1969
2027
|
if (subscribe) {
|
|
1970
|
-
this.carouselIndexSubscription = this.carouselService.carouselIndex$.subscribe((
|
|
1971
|
-
if ('active' in
|
|
1972
|
-
this.itemChange.emit(
|
|
2028
|
+
this.carouselIndexSubscription = this.carouselService.carouselIndex$.subscribe((nextItem) => {
|
|
2029
|
+
if ('active' in nextItem) {
|
|
2030
|
+
this.itemChange.emit(nextItem.active);
|
|
1973
2031
|
}
|
|
1974
|
-
this.activeItemInterval = typeof
|
|
1975
|
-
this.
|
|
2032
|
+
this.activeItemInterval = typeof nextItem.interval === 'number' && nextItem.interval > -1 ? nextItem.interval : this.interval;
|
|
2033
|
+
const isLastItem = ((nextItem.active === nextItem.lastItemIndex) && this.direction === 'next') || ((nextItem.active === 0) && this.direction === 'prev');
|
|
2034
|
+
!this.wrap && isLastItem ? this.resetTimer() : this.setTimer();
|
|
1976
2035
|
});
|
|
1977
2036
|
}
|
|
1978
2037
|
else {
|
|
@@ -1992,7 +2051,7 @@ class CarouselComponent {
|
|
|
1992
2051
|
}
|
|
1993
2052
|
}
|
|
1994
2053
|
CarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CarouselComponent, deps: [{ token: CarouselConfig }, { token: i0.ElementRef }, { token: CarouselService }, { token: CarouselState }, { token: IntersectionService }, { token: ListenersService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1995
|
-
CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: CarouselComponent, selector: "c-carousel", inputs: { activeIndex: "activeIndex", animate: "animate", dark: "dark", direction: "direction", interval: "interval", pause: "pause", transition: "transition" }, outputs: { itemChange: "itemChange" }, host: { properties: { "class": "this.hostClasses" } }, providers: [CarouselService, CarouselState, CarouselConfig, IntersectionService, ListenersService], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block}\n"] });
|
|
2054
|
+
CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: CarouselComponent, selector: "c-carousel", inputs: { activeIndex: "activeIndex", animate: "animate", dark: "dark", direction: "direction", interval: "interval", pause: "pause", transition: "transition", wrap: "wrap" }, outputs: { itemChange: "itemChange" }, host: { properties: { "class": "this.hostClasses" } }, providers: [CarouselService, CarouselState, CarouselConfig, IntersectionService, ListenersService], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block}\n"] });
|
|
1996
2055
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
1997
2056
|
type: Component,
|
|
1998
2057
|
args: [{ selector: 'c-carousel', template: '<ng-content></ng-content>', providers: [CarouselService, CarouselState, CarouselConfig, IntersectionService, ListenersService], styles: [":host{display:block}\n"] }]
|
|
@@ -2013,6 +2072,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
2013
2072
|
type: Input
|
|
2014
2073
|
}], transition: [{
|
|
2015
2074
|
type: Input
|
|
2075
|
+
}], wrap: [{
|
|
2076
|
+
type: Input
|
|
2016
2077
|
}], itemChange: [{
|
|
2017
2078
|
type: Output
|
|
2018
2079
|
}], hostClasses: [{
|
|
@@ -9345,5 +9406,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
|
|
|
9345
9406
|
* Generated bundle index. Do not edit.
|
|
9346
9407
|
*/
|
|
9347
9408
|
|
|
9348
|
-
export { AccordionButtonDirective, AccordionComponent, AccordionItemComponent, AccordionModule, AlertComponent, AlertHeadingDirective, AlertLinkDirective, AlertModule, AlignDirective, AvatarComponent, AvatarModule, BadgeComponent, BadgeModule, BgColorDirective, BorderDirective, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbModule, BreadcrumbRouterComponent, BreakpointInfix, ButtonCloseDirective, ButtonDirective, ButtonGroupComponent, ButtonGroupModule, ButtonModule, ButtonToolbarComponent, CalloutComponent, CalloutModule, CardBodyComponent, CardComponent, CardFooterComponent, CardGroupComponent, CardHeaderActionsComponent, CardHeaderComponent, CardImgDirective, CardImgOverlayComponent, CardLinkDirective, CardModule, CardSubtitleDirective, CardTextDirective, CardTitleDirective, CarouselCaptionComponent, CarouselComponent, CarouselConfig, CarouselControlComponent, CarouselIndicatorsComponent, CarouselInnerComponent, CarouselItemComponent, CarouselModule, ClassToggleService, ColComponent, ColDirective, CollapseDirective, CollapseModule, ContainerComponent, DropdownComponent, DropdownDividerDirective, DropdownHeaderDirective, DropdownItemDirective, DropdownItemPlainDirective, DropdownMenuDirective, DropdownModule, DropdownService, DropdownToggleDirective, FooterComponent, FooterModule, FormCheckComponent, FormCheckInputDirective, FormCheckLabelDirective, FormControlDirective, FormDirective, FormFeedbackComponent, FormFloatingDirective, FormLabelDirective, FormModule, FormSelectDirective, FormTextDirective, GridModule, GutterDirective, HeaderBrandComponent, HeaderComponent, HeaderDividerComponent, HeaderModule, HeaderNavComponent, HeaderTextComponent, HeaderTogglerDirective, HtmlAttributesDirective, ImgDirective, ImgModule, InputGroupComponent, InputGroupTextDirective, ListGroupDirective, ListGroupItemDirective, ListGroupModule, ModalBodyComponent, ModalComponent, ModalContentComponent, ModalDialogComponent, ModalFooterComponent, ModalHeaderComponent, ModalModule, ModalService, ModalTitleDirective, ModalToggleDirective, NavComponent, NavItemComponent, NavLinkDirective, NavModule, NavbarBrandDirective, NavbarComponent, NavbarModule, NavbarNavComponent, NavbarTextComponent, NavbarTogglerDirective, OffcanvasBodyComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasModule, OffcanvasService, OffcanvasTitleDirective, OffcanvasToggleDirective, PageItemComponent, PageItemDirective, PageLinkDirective, PaginationComponent, PaginationModule, PopoverComponent, PopoverDirective, PopoverModule, ProgressBarComponent, ProgressComponent, ProgressModule, RoundedDirective, RowComponent, RowDirective, SharedModule, SidebarBrandComponent, SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent, SidebarModule, SidebarNavComponent, SidebarService, SidebarToggleDirective, SidebarTogglerComponent, SpinnerComponent, SpinnerModule, TabContentComponent, TabContentRefDirective, TabPaneComponent, TabService, TableActiveDirective, TableColorDirective, TableDirective, TableModule, TabsModule, TemplateIdDirective, TextColorDirective, ToastBodyComponent, ToastCloseDirective, ToastComponent, ToastHeaderComponent, ToastModule, ToasterComponent, ToasterHostDirective, ToasterPlacement, ToasterService, TooltipComponent, TooltipDirective, TooltipModule, UtilitiesModule, WidgetModule, WidgetStatAComponent, WidgetStatBComponent, WidgetStatCComponent, WidgetStatDComponent, WidgetStatEComponent, WidgetStatFComponent };
|
|
9409
|
+
export { AccordionButtonDirective, AccordionComponent, AccordionItemComponent, AccordionModule, AlertComponent, AlertHeadingDirective, AlertLinkDirective, AlertModule, AlignDirective, AvatarComponent, AvatarModule, BadgeComponent, BadgeModule, BgColorDirective, BorderDirective, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbModule, BreadcrumbRouterComponent, BreakpointInfix, ButtonCloseDirective, ButtonDirective, ButtonGroupComponent, ButtonGroupModule, ButtonModule, ButtonToolbarComponent, CalloutComponent, CalloutModule, CardBodyComponent, CardComponent, CardFooterComponent, CardGroupComponent, CardHeaderActionsComponent, CardHeaderComponent, CardImgDirective, CardImgOverlayComponent, CardLinkDirective, CardModule, CardSubtitleDirective, CardTextDirective, CardTitleDirective, CarouselCaptionComponent, CarouselComponent, CarouselConfig, CarouselControlComponent, CarouselIndicatorsComponent, CarouselInnerComponent, CarouselItemComponent, CarouselModule, ClassToggleService, ColComponent, ColDirective, CollapseDirective, CollapseModule, ContainerComponent, DropdownComponent, DropdownDividerDirective, DropdownHeaderDirective, DropdownItemDirective, DropdownItemPlainDirective, DropdownMenuDirective, DropdownModule, DropdownService, DropdownToggleDirective, FooterComponent, FooterModule, FormCheckComponent, FormCheckInputDirective, FormCheckLabelDirective, FormControlDirective, FormDirective, FormFeedbackComponent, FormFloatingDirective, FormLabelDirective, FormModule, FormSelectDirective, FormTextDirective, GridModule, GutterDirective, HeaderBrandComponent, HeaderComponent, HeaderDividerComponent, HeaderModule, HeaderNavComponent, HeaderTextComponent, HeaderTogglerDirective, HtmlAttributesDirective, ImgDirective, ImgModule, InputGroupComponent, InputGroupTextDirective, IntersectionService, ListGroupDirective, ListGroupItemDirective, ListGroupModule, ModalBodyComponent, ModalComponent, ModalContentComponent, ModalDialogComponent, ModalFooterComponent, ModalHeaderComponent, ModalModule, ModalService, ModalTitleDirective, ModalToggleDirective, NavComponent, NavItemComponent, NavLinkDirective, NavModule, NavbarBrandDirective, NavbarComponent, NavbarModule, NavbarNavComponent, NavbarTextComponent, NavbarTogglerDirective, OffcanvasBodyComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasModule, OffcanvasService, OffcanvasTitleDirective, OffcanvasToggleDirective, PageItemComponent, PageItemDirective, PageLinkDirective, PaginationComponent, PaginationModule, PopoverComponent, PopoverDirective, PopoverModule, ProgressBarComponent, ProgressComponent, ProgressModule, RoundedDirective, RowComponent, RowDirective, SharedModule, SidebarBrandComponent, SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent, SidebarModule, SidebarNavComponent, SidebarService, SidebarToggleDirective, SidebarTogglerComponent, SpinnerComponent, SpinnerModule, TabContentComponent, TabContentRefDirective, TabPaneComponent, TabService, TableActiveDirective, TableColorDirective, TableDirective, TableModule, TabsModule, TemplateIdDirective, TextColorDirective, ToastBodyComponent, ToastCloseDirective, ToastComponent, ToastHeaderComponent, ToastModule, ToasterComponent, ToasterHostDirective, ToasterPlacement, ToasterService, TooltipComponent, TooltipDirective, TooltipModule, UtilitiesModule, WidgetModule, WidgetStatAComponent, WidgetStatBComponent, WidgetStatCComponent, WidgetStatDComponent, WidgetStatEComponent, WidgetStatFComponent };
|
|
9349
9410
|
//# sourceMappingURL=coreui-angular.mjs.map
|