@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { IntersectionService } from '
|
|
2
|
+
import { IntersectionService } from '../../services/intersection.service';
|
|
3
3
|
import { ListenersService } from '../../services/listeners.service';
|
|
4
4
|
import { CarouselState } from '../carousel-state';
|
|
5
5
|
import { CarouselService } from '../carousel.service';
|
|
@@ -50,6 +50,12 @@ export declare class CarouselComponent implements OnInit, OnDestroy, AfterConten
|
|
|
50
50
|
* @default 'slide'
|
|
51
51
|
*/
|
|
52
52
|
transition: 'slide' | 'crossfade';
|
|
53
|
+
/**
|
|
54
|
+
* Set whether the carousel should cycle continuously or have hard stops.
|
|
55
|
+
* @type boolean
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
wrap: boolean;
|
|
53
59
|
/**
|
|
54
60
|
* Event emitted on carousel item change. [docs]
|
|
55
61
|
* @type number
|
|
@@ -74,5 +80,5 @@ export declare class CarouselComponent implements OnInit, OnDestroy, AfterConten
|
|
|
74
80
|
private carouselStateSubscribe;
|
|
75
81
|
private intersectionServiceSubscribe;
|
|
76
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<CarouselComponent, never>;
|
|
77
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "c-carousel", never, { "activeIndex": "activeIndex"; "animate": "animate"; "dark": "dark"; "direction": "direction"; "interval": "interval"; "pause": "pause"; "transition": "transition"; }, { "itemChange": "itemChange"; }, never, ["*"]>;
|
|
83
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "c-carousel", never, { "activeIndex": "activeIndex"; "animate": "animate"; "dark": "dark"; "direction": "direction"; "interval": "interval"; "pause": "pause"; "transition": "transition"; "wrap": "wrap"; }, { "itemChange": "itemChange"; }, never, ["*"]>;
|
|
78
84
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const expandAnimation: import("@angular/animations").AnimationReferenceMetadata;
|
|
2
2
|
export declare const collapseAnimation: import("@angular/animations").AnimationReferenceMetadata;
|
|
3
|
+
export declare const expandHorizontalAnimation: import("@angular/animations").AnimationReferenceMetadata;
|
|
4
|
+
export declare const collapseHorizontalAnimation: import("@angular/animations").AnimationReferenceMetadata;
|
|
@@ -6,6 +6,7 @@ export declare class CollapseDirective implements OnChanges, OnDestroy, DoCheck,
|
|
|
6
6
|
private hostElement;
|
|
7
7
|
private renderer;
|
|
8
8
|
private animationBuilder;
|
|
9
|
+
static ngAcceptInputType_horizontal: BooleanInput;
|
|
9
10
|
static ngAcceptInputType_navbar: BooleanInput;
|
|
10
11
|
private _animate;
|
|
11
12
|
/**
|
|
@@ -13,6 +14,12 @@ export declare class CollapseDirective implements OnChanges, OnDestroy, DoCheck,
|
|
|
13
14
|
*/
|
|
14
15
|
set animate(value: boolean);
|
|
15
16
|
get animate(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Set horizontal collapsing to transition the width instead of height.
|
|
19
|
+
*/
|
|
20
|
+
set horizontal(value: boolean);
|
|
21
|
+
get horizontal(): boolean;
|
|
22
|
+
private _horizontal;
|
|
16
23
|
private _visible;
|
|
17
24
|
/**
|
|
18
25
|
* Toggle the visibility of collapsible element.
|
|
@@ -40,15 +47,20 @@ export declare class CollapseDirective implements OnChanges, OnDestroy, DoCheck,
|
|
|
40
47
|
collapseChange: EventEmitter<string>;
|
|
41
48
|
private player;
|
|
42
49
|
private readonly host;
|
|
50
|
+
private scrollHeight;
|
|
51
|
+
private scrollWidth;
|
|
52
|
+
private collapsing;
|
|
43
53
|
constructor(hostElement: ElementRef, renderer: Renderer2, animationBuilder: AnimationBuilder);
|
|
44
54
|
get hostClasses(): any;
|
|
55
|
+
ngAfterViewInit(): void;
|
|
45
56
|
ngOnDestroy(): void;
|
|
46
57
|
ngOnChanges(changes: SimpleChanges): void;
|
|
47
58
|
ngDoCheck(): void;
|
|
48
59
|
toggle(visible?: boolean): void;
|
|
49
60
|
destroyPlayer(): void;
|
|
50
61
|
createPlayer(visible?: boolean): void;
|
|
51
|
-
|
|
62
|
+
setMaxSize(): void;
|
|
63
|
+
setDisplay(display: boolean): void;
|
|
52
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<CollapseDirective, never>;
|
|
53
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseDirective, "[cCollapse]", ["cCollapse"], { "animate": "animate"; "visible": "visible"; "navbar": "navbar"; "duration": "duration"; "transition": "transition"; }, { "collapseChange": "collapseChange"; }, never>;
|
|
65
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseDirective, "[cCollapse]", ["cCollapse"], { "animate": "animate"; "horizontal": "horizontal"; "visible": "visible"; "navbar": "navbar"; "duration": "duration"; "transition": "transition"; }, { "collapseChange": "collapseChange"; }, never>;
|
|
54
66
|
}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
interface IIntersectionObserverInit {
|
|
4
|
+
root?: Element | null;
|
|
5
|
+
rootMargin?: string;
|
|
6
|
+
threshold?: number | number[];
|
|
7
|
+
}
|
|
3
8
|
export declare class IntersectionService implements OnDestroy {
|
|
4
9
|
constructor();
|
|
5
10
|
private intersecting;
|
|
6
11
|
intersecting$: import("rxjs").Observable<boolean>;
|
|
7
12
|
private intersectionObserver;
|
|
8
13
|
private hostElement;
|
|
14
|
+
private defaultObserverOptions;
|
|
9
15
|
createIntersectionObserver(hostElement: {
|
|
10
16
|
nativeElement: Element;
|
|
11
|
-
}): void;
|
|
17
|
+
}, observerOptions?: IIntersectionObserverInit): void;
|
|
12
18
|
ngOnDestroy(): void;
|
|
13
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<IntersectionService, never>;
|
|
14
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<IntersectionService>;
|
|
15
21
|
}
|
|
22
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class IntersectionService {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.intersecting = new BehaviorSubject(false);
|
|
7
|
-
this.intersecting$ = this.intersecting.asObservable();
|
|
8
|
-
}
|
|
9
|
-
createIntersectionObserver(hostElement) {
|
|
10
|
-
this.hostElement = hostElement;
|
|
11
|
-
const options = {
|
|
12
|
-
root: null,
|
|
13
|
-
rootMargin: '0px',
|
|
14
|
-
threshold: 0.2
|
|
15
|
-
};
|
|
16
|
-
const handleIntersect = (entries, observer) => {
|
|
17
|
-
entries.forEach((entry) => {
|
|
18
|
-
this.intersecting.next(entry.isIntersecting);
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
this.intersectionObserver = new IntersectionObserver(handleIntersect, options);
|
|
22
|
-
this.intersectionObserver.observe(hostElement.nativeElement);
|
|
23
|
-
}
|
|
24
|
-
ngOnDestroy() {
|
|
25
|
-
this.intersectionObserver?.unobserve(this.hostElement?.nativeElement);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
IntersectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: IntersectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
-
IntersectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: IntersectionService });
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: IntersectionService, decorators: [{
|
|
31
|
-
type: Injectable
|
|
32
|
-
}], ctorParameters: function () { return []; } });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJzZWN0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JldWktYW5ndWxhci9zcmMvbGliL2Nhcm91c2VsL2ludGVyc2VjdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQWEsTUFBTSxlQUFlLENBQUM7QUFDdEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFHdkMsTUFBTSxPQUFPLG1CQUFtQjtJQUU5QjtRQUVRLGlCQUFZLEdBQUcsSUFBSSxlQUFlLENBQVUsS0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