@skyux/core 6.12.0 → 6.15.0

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
@@ -25,6 +25,7 @@ export * from './lib/modules/dynamic-component/dynamic-component.module';
25
25
  export * from './lib/modules/dynamic-component/dynamic-component.service';
26
26
  export * from './lib/modules/format/app-format';
27
27
  export * from './lib/modules/id/id.module';
28
+ export * from './lib/modules/id/id.service';
28
29
  export * from './lib/modules/log/log.module';
29
30
  export * from './lib/modules/log/log.service';
30
31
  export * from './lib/modules/log/types/log-level';
@@ -1,4 +1,5 @@
1
1
  import { ElementRef, Renderer2 } from '@angular/core';
2
+ import { SkyIdService } from './id.service';
2
3
  import * as i0 from "@angular/core";
3
4
  /**
4
5
  * Sets the element's `id` attribute to a unique ID. To reference this unique ID on other elements,
@@ -8,7 +9,7 @@ import * as i0 from "@angular/core";
8
9
  export declare class SkyIdDirective {
9
10
  #private;
10
11
  get id(): string;
11
- constructor(elRef: ElementRef, renderer: Renderer2);
12
+ constructor(elRef: ElementRef, renderer: Renderer2, idSvc: SkyIdService);
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyIdDirective, never>;
13
14
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyIdDirective, "[skyId]", ["skyId"], {}, {}, never>;
14
15
  }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Generates unique IDs to be used with HTML elements.
4
+ */
5
+ export declare class SkyIdService {
6
+ generateId(): string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyIdService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyIdService>;
9
+ }
@@ -20,6 +20,7 @@ export declare class SkyOverlayInstance {
20
20
  * Emits after the overlay is closed.
21
21
  */
22
22
  get closed(): Observable<void>;
23
+ id: string;
23
24
  private _backdropClick;
24
25
  private _closed;
25
26
  constructor(
@@ -2,6 +2,7 @@ import { ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, EmbeddedView
2
2
  import { Router } from '@angular/router';
3
3
  import { Observable } from 'rxjs';
4
4
  import { SkyCoreAdapterService } from '../adapter-service/adapter.service';
5
+ import { SkyIdService } from '../id/id.service';
5
6
  import { SkyOverlayContext } from './overlay-context';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
@@ -18,6 +19,7 @@ export declare class SkyOverlayComponent implements OnInit, OnDestroy {
18
19
  get backdropClick(): Observable<void>;
19
20
  get closed(): Observable<void>;
20
21
  enablePointerEvents: boolean;
22
+ id: string;
21
23
  showBackdrop: boolean;
22
24
  zIndex: string;
23
25
  private overlayContentRef;
@@ -27,7 +29,7 @@ export declare class SkyOverlayComponent implements OnInit, OnDestroy {
27
29
  private routerSubscription;
28
30
  private _backdropClick;
29
31
  private _closed;
30
- constructor(changeDetector: ChangeDetectorRef, resolver: ComponentFactoryResolver, injector: Injector, coreAdapter: SkyCoreAdapterService, context: SkyOverlayContext, router?: Router);
32
+ constructor(changeDetector: ChangeDetectorRef, resolver: ComponentFactoryResolver, injector: Injector, coreAdapter: SkyCoreAdapterService, context: SkyOverlayContext, idSvc: SkyIdService, router?: Router);
31
33
  ngOnInit(): void;
32
34
  ngOnDestroy(): void;
33
35
  attachComponent<C>(component: Type<C>, providers?: StaticProvider[]): ComponentRef<C>;
@@ -36,6 +38,6 @@ export declare class SkyOverlayComponent implements OnInit, OnDestroy {
36
38
  private addBackdropClickListener;
37
39
  private addRouteListener;
38
40
  private removeRouteListener;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyOverlayComponent, [null, null, null, null, null, { optional: true; }]>;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyOverlayComponent, [null, null, null, null, null, null, { optional: true; }]>;
40
42
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyOverlayComponent, "sky-overlay", never, {}, {}, never, never>;
41
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/core",
3
- "version": "6.12.0",
3
+ "version": "6.15.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -45,7 +45,7 @@
45
45
  "@angular/core": "^13.3.2",
46
46
  "@angular/platform-browser": "^13.3.2",
47
47
  "@angular/router": "^13.3.2",
48
- "@skyux/i18n": "6.12.0"
48
+ "@skyux/i18n": "6.15.0"
49
49
  },
50
50
  "dependencies": {
51
51
  "tslib": "^2.3.1"
@@ -0,0 +1,6 @@
1
+ import { BaseHarnessFilters } from '@angular/cdk/testing';
2
+ /**
3
+ * A set of criteria that can be used to filter a list of SkyOverlayHarness instances.
4
+ */
5
+ export interface SkyOverlayHarnessFilters extends BaseHarnessFilters {
6
+ }
@@ -0,0 +1,29 @@
1
+ import { ComponentHarness, HarnessPredicate, HarnessQuery, TestElement } from '@angular/cdk/testing';
2
+ import { SkyOverlayHarnessFilters } from './overlay-harness-filters';
3
+ /**
4
+ * Harness for interacting with an overlay component in tests.
5
+ */
6
+ export declare class SkyOverlayHarness extends ComponentHarness {
7
+ static hostSelector: string;
8
+ /**
9
+ * Gets a `HarnessPredicate` that can be used to search for a
10
+ * `SkyOverlayHarness` that meets certain criteria.
11
+ */
12
+ static with(filters: SkyOverlayHarnessFilters): HarnessPredicate<SkyOverlayHarness>;
13
+ /**
14
+ * Returns a child harness.
15
+ */
16
+ queryHarness<T extends ComponentHarness>(harness: HarnessQuery<T>): Promise<T | null>;
17
+ /**
18
+ * Returns child harnesses.
19
+ */
20
+ queryHarnesses<T extends ComponentHarness>(harness: HarnessQuery<T>): Promise<T[]>;
21
+ /**
22
+ * Returns a child test element.
23
+ */
24
+ querySelector(selector: string): Promise<TestElement | null>;
25
+ /**
26
+ * Returns child test elements.
27
+ */
28
+ querySelectorAll(selector: string): Promise<TestElement[]>;
29
+ }
@@ -1,3 +1,5 @@
1
+ export * from './overlay/overlay-harness-filters';
2
+ export * from './overlay/overlay-harness';
1
3
  export * from './shared/component-harness';
2
4
  export * from './shared/harness-filters';
3
5
  export * from './core-testing.module';
@@ -1,7 +1,6 @@
1
- import { ComponentHarness } from '@angular/cdk/testing';
2
- /**
3
- * @experimental
4
- */
1
+ import { ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
2
+ import { SkyHarnessFilters } from './harness-filters';
5
3
  export declare abstract class SkyComponentHarness extends ComponentHarness {
6
- protected getSkyId(): Promise<string | null>;
4
+ #private;
5
+ protected static getDataSkyIdPredicate<T extends SkyComponentHarness>(this: ComponentHarnessConstructor<T>, filters: SkyHarnessFilters): HarnessPredicate<T>;
7
6
  }
@@ -1,7 +1,10 @@
1
1
  import { BaseHarnessFilters } from '@angular/cdk/testing';
2
2
  /**
3
- * @experimental
3
+ * A set of criteria that can be used to filter a list of `SkyComponentHarness` instances.
4
4
  */
5
5
  export interface SkyHarnessFilters extends BaseHarnessFilters {
6
+ /**
7
+ * Only find instances whose `data-sky-id` attribute matches the given value.
8
+ */
6
9
  dataSkyId?: string | RegExp;
7
10
  }