@datarailsshared/datarailsshared 1.6.73 → 1.6.77

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.
@@ -1,31 +1,48 @@
1
- import { ChangeDetectorRef, OnChanges, TemplateRef } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, QueryList, TemplateRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class DrGalleryComponent<T = any> implements OnChanges {
3
+ export declare class DrGalleryComponent<T = any> implements AfterViewInit, OnDestroy {
4
4
  private cdr;
5
5
  template: TemplateRef<{
6
6
  $implicit: T;
7
7
  }>;
8
8
  private _items;
9
9
  private _itemsCount;
10
+ private autoplayTimer;
10
11
  readonly defaultTransition = "250ms ease-in-out";
11
12
  readonly noTransition = "0ms";
12
- set items(value: any[]);
13
+ modeType: 'loop' | 'dynamic';
14
+ isOutsideBtns: boolean;
15
+ fadeIn: boolean;
16
+ autoPlay: boolean;
17
+ autoplayInterval: number;
18
+ set items(value: T[]);
13
19
  set itemsCount(value: number);
14
- get items(): any[];
20
+ get items(): T[];
15
21
  get itemsCount(): number;
16
22
  get centerIndex(): number | null;
17
23
  activeIndex: number;
18
- carouselItems: any[];
24
+ carouselItems: T[];
19
25
  transform: string;
20
26
  transition: string;
21
- ngOnChanges(): void;
27
+ containerRef: ElementRef<HTMLElement>;
28
+ itemElements: QueryList<ElementRef<HTMLElement>>;
29
+ private itemOffsets;
30
+ private itemWidths;
22
31
  constructor(cdr: ChangeDetectorRef);
32
+ ngAfterViewInit(): void;
33
+ ngOnDestroy(): void;
23
34
  private initializeCarousel;
35
+ private calculateItemOffsets;
24
36
  getStyle(): Partial<CSSStyleDeclaration>;
25
37
  prev(): void;
26
38
  next(): void;
39
+ navigate(index: number): void;
40
+ get canGoPrev(): boolean;
41
+ get canGoNext(): boolean;
27
42
  private resetIndexAfterDelay;
28
43
  private updateTransform;
44
+ private startAutoplay;
45
+ private clearAutoplay;
29
46
  static ɵfac: i0.ɵɵFactoryDeclaration<DrGalleryComponent<any>, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<DrGalleryComponent<any>, "dr-gallery", never, { "items": { "alias": "items"; "required": false; }; "itemsCount": { "alias": "itemsCount"; "required": false; }; }, {}, ["template"], never, true, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<DrGalleryComponent<any>, "dr-gallery", never, { "modeType": { "alias": "modeType"; "required": false; }; "isOutsideBtns": { "alias": "isOutsideBtns"; "required": false; }; "fadeIn": { "alias": "fadeIn"; "required": false; }; "autoPlay": { "alias": "autoPlay"; "required": false; }; "autoplayInterval": { "alias": "autoplayInterval"; "required": false; }; "items": { "alias": "items"; "required": false; }; "itemsCount": { "alias": "itemsCount"; "required": false; }; }, {}, ["template"], never, true, never>;
31
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/datarailsshared",
3
- "version": "1.6.73",
3
+ "version": "1.6.77",
4
4
  "description": "DataRails shared components",
5
5
  "keywords": [
6
6
  "angular",