@skyux/core 6.0.0-beta.2 → 6.0.0-beta.3

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/index.d.ts CHANGED
@@ -43,6 +43,8 @@ export * from './lib/modules/overlay/overlay.module';
43
43
  export * from './lib/modules/overlay/overlay.service';
44
44
  export * from './lib/modules/percent-pipe/percent-pipe.module';
45
45
  export * from './lib/modules/percent-pipe/percent.pipe';
46
+ export * from './lib/modules/resize-observer/resize-observer.service';
47
+ export * from './lib/modules/resize-observer/resize-observer-media-query.service';
46
48
  export * from './lib/modules/scrollable-host/scrollable-host.service';
47
49
  export * from './lib/modules/title/set-title-args';
48
50
  export * from './lib/modules/title/title.service';
@@ -1,6 +1,6 @@
1
1
  import { SkyMediaBreakpoints } from './media-breakpoints';
2
2
  /**
3
- * Specifies a funciton that is called when the breakpoints change. It is called
3
+ * Specifies a function that is called when the breakpoints change. It is called
4
4
  * with a `SkyMediaBreakpoints` argument, which is an enum that represents the new breakpoint.
5
5
  */
6
6
  export declare type SkyMediaQueryListener = (args: SkyMediaBreakpoints) => void;
@@ -36,7 +36,7 @@ export declare class SkyMediaQueryService implements OnDestroy {
36
36
  constructor(zone: NgZone);
37
37
  ngOnDestroy(): void;
38
38
  /**
39
- * Suscribes to screen size changes.
39
+ * Subscribes to screen size changes.
40
40
  * @param listener Specifies a function that is called when breakpoints change.
41
41
  */
42
42
  subscribe(listener: SkyMediaQueryListener): Subscription;
@@ -0,0 +1,45 @@
1
+ import { ElementRef, OnDestroy } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { SkyMediaBreakpoints } from '../media-query/media-breakpoints';
4
+ import { SkyMediaQueryListener } from '../media-query/media-query-listener';
5
+ import { SkyResizeObserverService } from './resize-observer.service';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Acts like `SkyMediaQueryService` for a container element, emitting the same responsive breakpoints.
9
+ */
10
+ export declare class SkyResizeObserverMediaQueryService implements OnDestroy {
11
+ private resizeObserverService;
12
+ /**
13
+ * Returns the current breakpoint.
14
+ */
15
+ get current(): SkyMediaBreakpoints | undefined;
16
+ private _breakpoints;
17
+ private _currentBreakpointObservable;
18
+ private _currentBreakpoint;
19
+ private _resizeSubscription;
20
+ private _stopListening;
21
+ private _target?;
22
+ constructor(resizeObserverService: SkyResizeObserverService);
23
+ ngOnDestroy(): void;
24
+ /**
25
+ * @internal
26
+ */
27
+ destroy(): void;
28
+ /**
29
+ * Sets the container element to watch. The `SkyResizeObserverMediaQueryService` will only observe one element at a
30
+ * time. Any previous subscriptions will be unsubscribed when a new element is observed.
31
+ */
32
+ observe(element: ElementRef): SkyResizeObserverMediaQueryService;
33
+ /**
34
+ * Stop watching the container element.
35
+ */
36
+ unobserve(): void;
37
+ /**
38
+ * Subscribes to element size changes that cross breakpoints.
39
+ */
40
+ subscribe(listener: SkyMediaQueryListener): Subscription;
41
+ private updateBreakpoint;
42
+ private checkBreakpoint;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyResizeObserverMediaQueryService, never>;
44
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyResizeObserverMediaQueryService>;
45
+ }
@@ -0,0 +1,21 @@
1
+ import { ElementRef, NgZone, OnDestroy } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Service to create rxjs observables for changes to the content box dimensions of elements.
6
+ */
7
+ export declare class SkyResizeObserverService implements OnDestroy {
8
+ private zone;
9
+ private _resizeObserver;
10
+ private _tracking;
11
+ constructor(zone: NgZone);
12
+ ngOnDestroy(): void;
13
+ /**
14
+ * Create rxjs observable to get size changes for an element ref.
15
+ */
16
+ observe(element: ElementRef): Observable<ResizeObserverEntry>;
17
+ private observeAndTrack;
18
+ private callback;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyResizeObserverService, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyResizeObserverService>;
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/core",
3
- "version": "6.0.0-beta.2",
3
+ "version": "6.0.0-beta.3",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -44,7 +44,7 @@
44
44
  "@angular/core": "^13.2.7",
45
45
  "@angular/platform-browser": "^13.2.7",
46
46
  "@angular/router": "^13.2.7",
47
- "@skyux/i18n": "6.0.0-beta.2"
47
+ "@skyux/i18n": "6.0.0-beta.3"
48
48
  },
49
49
  "dependencies": {
50
50
  "tslib": "^2.3.1"