@skyux/a11y 8.7.2 → 9.0.0-alpha.1

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.
Files changed (26) hide show
  1. package/esm2022/lib/modules/shared/sky-a11y-resources.module.mjs +45 -0
  2. package/esm2022/lib/modules/skip-link/skip-link-adapter.service.mjs +25 -0
  3. package/esm2022/lib/modules/skip-link/skip-link-host.component.mjs +32 -0
  4. package/{esm2020 → esm2022}/lib/modules/skip-link/skip-link.module.mjs +5 -5
  5. package/{esm2020 → esm2022}/lib/modules/skip-link/skip-link.service.mjs +17 -20
  6. package/esm2022/testing/skip-link/skip-links-harness.mjs +26 -0
  7. package/{fesm2020 → fesm2022}/skyux-a11y-testing.mjs +7 -13
  8. package/{fesm2020 → fesm2022}/skyux-a11y-testing.mjs.map +1 -1
  9. package/fesm2022/skyux-a11y.mjs +173 -0
  10. package/{fesm2015 → fesm2022}/skyux-a11y.mjs.map +1 -1
  11. package/package.json +12 -20
  12. package/esm2020/lib/modules/shared/sky-a11y-resources.module.mjs +0 -45
  13. package/esm2020/lib/modules/skip-link/skip-link-adapter.service.mjs +0 -28
  14. package/esm2020/lib/modules/skip-link/skip-link-host.component.mjs +0 -35
  15. package/esm2020/testing/skip-link/skip-links-harness.mjs +0 -32
  16. package/fesm2015/skyux-a11y-testing.mjs +0 -43
  17. package/fesm2015/skyux-a11y-testing.mjs.map +0 -1
  18. package/fesm2015/skyux-a11y.mjs +0 -180
  19. package/fesm2020/skyux-a11y.mjs +0 -180
  20. package/fesm2020/skyux-a11y.mjs.map +0 -1
  21. /package/{esm2020 → esm2022}/index.mjs +0 -0
  22. /package/{esm2020 → esm2022}/lib/modules/skip-link/skip-link-args.mjs +0 -0
  23. /package/{esm2020 → esm2022}/lib/modules/skip-link/skip-link.mjs +0 -0
  24. /package/{esm2020 → esm2022}/skyux-a11y.mjs +0 -0
  25. /package/{esm2020 → esm2022}/testing/public-api.mjs +0 -0
  26. /package/{esm2020 → esm2022}/testing/skyux-a11y-testing.mjs +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/a11y",
3
- "version": "8.7.2",
3
+ "version": "9.0.0-alpha.1",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -21,38 +21,30 @@
21
21
  },
22
22
  ".": {
23
23
  "types": "./index.d.ts",
24
- "esm2020": "./esm2020/skyux-a11y.mjs",
25
- "es2020": "./fesm2020/skyux-a11y.mjs",
26
- "es2015": "./fesm2015/skyux-a11y.mjs",
27
- "node": "./fesm2015/skyux-a11y.mjs",
28
- "default": "./fesm2020/skyux-a11y.mjs"
24
+ "esm2022": "./esm2022/skyux-a11y.mjs",
25
+ "esm": "./esm2022/skyux-a11y.mjs",
26
+ "default": "./fesm2022/skyux-a11y.mjs"
29
27
  },
30
28
  "./testing": {
31
29
  "types": "./testing/index.d.ts",
32
- "esm2020": "./esm2020/testing/skyux-a11y-testing.mjs",
33
- "es2020": "./fesm2020/skyux-a11y-testing.mjs",
34
- "es2015": "./fesm2015/skyux-a11y-testing.mjs",
35
- "node": "./fesm2015/skyux-a11y-testing.mjs",
36
- "default": "./fesm2020/skyux-a11y-testing.mjs"
30
+ "esm2022": "./esm2022/testing/skyux-a11y-testing.mjs",
31
+ "esm": "./esm2022/testing/skyux-a11y-testing.mjs",
32
+ "default": "./fesm2022/skyux-a11y-testing.mjs"
37
33
  },
38
34
  "./documentation.json": {
39
35
  "default": "./documentation.json"
40
36
  }
41
37
  },
42
38
  "peerDependencies": {
43
- "@angular/common": "^15.2.9",
44
- "@angular/core": "^15.2.9",
45
- "@skyux/core": "8.7.2",
46
- "@skyux/i18n": "8.7.2"
39
+ "@angular/common": "^16.1.7",
40
+ "@angular/core": "^16.1.7",
41
+ "@skyux/core": "9.0.0-alpha.1",
42
+ "@skyux/i18n": "9.0.0-alpha.1"
47
43
  },
48
44
  "dependencies": {
49
45
  "tslib": "^2.5.0"
50
46
  },
51
- "module": "fesm2015/skyux-a11y.mjs",
52
- "es2020": "fesm2020/skyux-a11y.mjs",
53
- "esm2020": "esm2020/skyux-a11y.mjs",
54
- "fesm2020": "fesm2020/skyux-a11y.mjs",
55
- "fesm2015": "fesm2015/skyux-a11y.mjs",
47
+ "module": "fesm2022/skyux-a11y.mjs",
56
48
  "typings": "index.d.ts",
57
49
  "sideEffects": false
58
50
  }
@@ -1,45 +0,0 @@
1
- /**
2
- * NOTICE: DO NOT MODIFY THIS FILE!
3
- * The contents of this file were automatically generated by
4
- * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
5
- * To update this file, simply rerun the command.
6
- */
7
- import { NgModule } from '@angular/core';
8
- import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
9
- import * as i0 from "@angular/core";
10
- const RESOURCES = {
11
- 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
12
- };
13
- export class SkyA11yResourcesProvider {
14
- getString(localeInfo, name) {
15
- return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
16
- }
17
- }
18
- /**
19
- * Import into any component library module that needs to use resource strings.
20
- */
21
- export class SkyA11yResourcesModule {
22
- }
23
- SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
24
- SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
25
- SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, providers: [
26
- {
27
- provide: SKY_LIB_RESOURCES_PROVIDERS,
28
- useClass: SkyA11yResourcesProvider,
29
- multi: true,
30
- },
31
- ], imports: [SkyI18nModule] });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
33
- type: NgModule,
34
- args: [{
35
- exports: [SkyI18nModule],
36
- providers: [
37
- {
38
- provide: SKY_LIB_RESOURCES_PROVIDERS,
39
- useClass: SkyA11yResourcesProvider,
40
- multi: true,
41
- },
42
- ],
43
- }]
44
- }] });
45
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2t5LWExMXktcmVzb3VyY2VzLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hMTF5L3NyYy9saWIvbW9kdWxlcy9zaGFyZWQvc2t5LWExMXktcmVzb3VyY2VzLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRztBQUNILE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUNMLDJCQUEyQixFQUUzQixhQUFhLEVBR2IscUJBQXFCLEdBQ3RCLE1BQU0sYUFBYSxDQUFDOztBQUVyQixNQUFNLFNBQVMsR0FBMEM7SUFDdkQsT0FBTyxFQUFFLEVBQUUsdUJBQXVCLEVBQUUsRUFBRSxPQUFPLEVBQUUsYUFBYSxFQUFFLEVBQUU7Q0FDakUsQ0FBQztBQUVGLE1BQU0sT0FBTyx3QkFBd0I7SUFDNUIsU0FBUyxDQUNkLFVBQTRCLEVBQzVCLElBQVk7UUFFWixPQUFPLHFCQUFxQixDQUFDLFNBQVMsRUFBRSxVQUFVLENBQUMsTUFBTSxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQ25FLENBQUM7Q0FDRjtBQUVEOztHQUVHO0FBV0gsTUFBTSxPQUFPLHNCQUFzQjs7bUhBQXRCLHNCQU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HNreXV4L2kxOG4nO1xuXG5jb25zdCBSRVNPVVJDRVM6IHsgW2xvY2FsZTogc3RyaW5nXTogU2t5TGliUmVzb3VyY2VzIH0gPSB7XG4gICdFTi1VUyc6IHsgc2t5dXhfbGlzdF9za2lwX3RvX2xpbms6IHsgbWVzc2FnZTogJ1NraXAgdG8gezB9JyB9IH0sXG59O1xuXG5leHBvcnQgY2xhc3MgU2t5QTExeVJlc291cmNlc1Byb3ZpZGVyIGltcGxlbWVudHMgU2t5TGliUmVzb3VyY2VzUHJvdmlkZXIge1xuICBwdWJsaWMgZ2V0U3RyaW5nKFxuICAgIGxvY2FsZUluZm86IFNreUFwcExvY2FsZUluZm8sXG4gICAgbmFtZTogc3RyaW5nXG4gICk6IHN0cmluZyB8IHVuZGVmaW5lZCB7XG4gICAgcmV0dXJuIGdldExpYlN0cmluZ0ZvckxvY2FsZShSRVNPVVJDRVMsIGxvY2FsZUluZm8ubG9jYWxlLCBuYW1lKTtcbiAgfVxufVxuXG4vKipcbiAqIEltcG9ydCBpbnRvIGFueSBjb21wb25lbnQgbGlicmFyeSBtb2R1bGUgdGhhdCBuZWVkcyB0byB1c2UgcmVzb3VyY2Ugc3RyaW5ncy5cbiAqL1xuQE5nTW9kdWxlKHtcbiAgZXhwb3J0czogW1NreUkxOG5Nb2R1bGVdLFxuICBwcm92aWRlcnM6IFtcbiAgICB7XG4gICAgICBwcm92aWRlOiBTS1lfTElCX1JFU09VUkNFU19QUk9WSURFUlMsXG4gICAgICB1c2VDbGFzczogU2t5QTExeVJlc291cmNlc1Byb3ZpZGVyLFxuICAgICAgbXVsdGk6IHRydWUsXG4gICAgfSxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgU2t5QTExeVJlc291cmNlc01vZHVsZSB7fVxuIl19
@@ -1,28 +0,0 @@
1
- var _SkySkipLinkAdapterService_windowRef;
2
- import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
3
- import { Injectable } from '@angular/core';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@skyux/core";
6
- export class SkySkipLinkAdapterService {
7
- constructor(windowRef) {
8
- _SkySkipLinkAdapterService_windowRef.set(this, void 0);
9
- __classPrivateFieldSet(this, _SkySkipLinkAdapterService_windowRef, windowRef, "f");
10
- }
11
- skipTo(link) {
12
- const targetElement = link.elementRef.nativeElement;
13
- const win = __classPrivateFieldGet(this, _SkySkipLinkAdapterService_windowRef, "f").nativeWindow;
14
- const bodyElement = win.document.body;
15
- const bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
16
- const bodyDefaultPadding = 10;
17
- const scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
18
- win.scroll(0, scrollTop);
19
- targetElement.focus();
20
- }
21
- }
22
- _SkySkipLinkAdapterService_windowRef = new WeakMap();
23
- SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
24
- SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
26
- type: Injectable
27
- }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWFkYXB0ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hMTF5L3NyYy9saWIvbW9kdWxlcy9za2lwLWxpbmsvc2tpcC1saW5rLWFkYXB0ZXIuc2VydmljZS50cyJdLCJuYW1l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xuXG5pbXBvcnQgeyBTa3lTa2lwTGluayB9IGZyb20gJy4vc2tpcC1saW5rJztcblxuQEluamVjdGFibGUoKVxuZXhwb3J0IGNsYXNzIFNreVNraXBMaW5rQWRhcHRlclNlcnZpY2Uge1xuICAjd2luZG93UmVmOiBTa3lBcHBXaW5kb3dSZWY7XG5cbiAgY29uc3RydWN0b3Iod2luZG93UmVmOiBTa3lBcHBXaW5kb3dSZWYpIHtcbiAgICB0aGlzLiN3aW5kb3dSZWYgPSB3aW5kb3dSZWY7XG4gIH1cblxuICBwdWJsaWMgc2tpcFRvKGxpbms6IFNreVNraXBMaW5rKTogdm9pZCB7XG4gICAgY29uc3QgdGFyZ2V0RWxlbWVudCA9IGxpbmsuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50O1xuICAgIGNvbnN0IHdpbiA9IHRoaXMuI3dpbmRvd1JlZi5uYXRpdmVXaW5kb3c7XG4gICAgY29uc3QgYm9keUVsZW1lbnQgPSB3aW4uZG9jdW1lbnQuYm9keTtcblxuICAgIGNvbnN0IGJvZHlNYXJnaW5Ub3AgPSBwYXJzZUludChcbiAgICAgIHdpbi5nZXRDb21wdXRlZFN0eWxlKGJvZHlFbGVtZW50KS5tYXJnaW5Ub3AsXG4gICAgICAxMFxuICAgICk7XG4gICAgY29uc3QgYm9keURlZmF1bHRQYWRkaW5nID0gMTA7XG4gICAgY29uc3Qgc2Nyb2xsVG9wID1cbiAgICAgIHRhcmdldEVsZW1lbnQub2Zmc2V0VG9wIC0gYm9keU1hcmdpblRvcCAtIGJvZHlEZWZhdWx0UGFkZGluZztcblxuICAgIHdpbi5zY3JvbGwoMCwgc2Nyb2xsVG9wKTtcblxuICAgIHRhcmdldEVsZW1lbnQuZm9jdXMoKTtcbiAgfVxufVxuIl19
@@ -1,35 +0,0 @@
1
- var _SkySkipLinkHostComponent__links, _SkySkipLinkHostComponent_changeDetector, _SkySkipLinkHostComponent_adapter;
2
- import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
3
- import { ChangeDetectionStrategy, Component, } from '@angular/core';
4
- import { SkySkipLinkAdapterService } from './skip-link-adapter.service';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "./skip-link-adapter.service";
7
- import * as i2 from "@angular/common";
8
- import * as i3 from "@skyux/i18n";
9
- export class SkySkipLinkHostComponent {
10
- get links() {
11
- return __classPrivateFieldGet(this, _SkySkipLinkHostComponent__links, "f");
12
- }
13
- set links(value) {
14
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent__links, value, "f");
15
- __classPrivateFieldGet(this, _SkySkipLinkHostComponent_changeDetector, "f").markForCheck();
16
- }
17
- constructor(changeDetector, adapter) {
18
- _SkySkipLinkHostComponent__links.set(this, []);
19
- _SkySkipLinkHostComponent_changeDetector.set(this, void 0);
20
- _SkySkipLinkHostComponent_adapter.set(this, void 0);
21
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent_changeDetector, changeDetector, "f");
22
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent_adapter, adapter, "f");
23
- }
24
- skipTo(link) {
25
- __classPrivateFieldGet(this, _SkySkipLinkHostComponent_adapter, "f").skipTo(link);
26
- }
27
- }
28
- _SkySkipLinkHostComponent__links = new WeakMap(), _SkySkipLinkHostComponent_changeDetector = new WeakMap(), _SkySkipLinkHostComponent_adapter = new WeakMap();
29
- SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
30
- SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0, template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources : link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
32
- type: Component,
33
- args: [{ selector: 'sky-skip-link-host', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkySkipLinkAdapterService], template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources : link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"] }]
34
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.SkySkipLinkAdapterService }]; } });
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWhvc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2ExMXkvc3JjL2xpYi9tb2R1bGVzL3NraXAtbGluay9za2lwLWxpbmstaG9zdC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8u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ZWY7XG4gICNhZGFwdGVyOiBTa3lTa2lwTGlua0FkYXB0ZXJTZXJ2aWNlO1xuXG4gIGNvbnN0cnVjdG9yKFxuICAgIGNoYW5nZURldGVjdG9yOiBDaGFuZ2VEZXRlY3RvclJlZixcbiAgICBhZGFwdGVyOiBTa3lTa2lwTGlua0FkYXB0ZXJTZXJ2aWNlXG4gICkge1xuICAgIHRoaXMuI2NoYW5nZURldGVjdG9yID0gY2hhbmdlRGV0ZWN0b3I7XG4gICAgdGhpcy4jYWRhcHRlciA9IGFkYXB0ZXI7XG4gIH1cblxuICBwdWJsaWMgc2tpcFRvKGxpbms6IFNreVNraXBMaW5rKTogdm9pZCB7XG4gICAgdGhpcy4jYWRhcHRlci5za2lwVG8obGluayk7XG4gIH1cbn1cbiIsIjxidXR0b25cbiAgKm5nRm9yPVwibGV0IGxpbmsgb2YgbGlua3NcIlxuICBjbGFzcz1cInNreS1idG4gc2t5LWJ0bi1wcmltYXJ5IHNreS1za2lwLWxpbmtcIlxuICB0eXBlPVwiYnV0dG9uXCJcbiAgKGNsaWNrKT1cInNraXBUbyhsaW5rKVwiXG4+XG4gIHt7ICdza3l1eF9saXN0X3NraXBfdG9fbGluaycgfCBza3lMaWJSZXNvdXJjZXMgOiBsaW5rLnRpdGxlIH19XG48L2J1dHRvbj5cbiJdfQ==
@@ -1,32 +0,0 @@
1
- var _SkySkipLinksHarness_getSkipLinks;
2
- import { __classPrivateFieldGet } from "tslib";
3
- import { SkyComponentHarness } from '@skyux/core/testing';
4
- /**
5
- * Harness for interacting with a skip link component in tests.
6
- */
7
- export class SkySkipLinksHarness extends SkyComponentHarness {
8
- constructor() {
9
- super(...arguments);
10
- _SkySkipLinksHarness_getSkipLinks.set(this, this.locatorForAll('.sky-skip-link'));
11
- }
12
- /**
13
- * Gets the text of the skip link at the given index.
14
- */
15
- async getSkipLinkText(index) {
16
- const skipLinks = await __classPrivateFieldGet(this, _SkySkipLinksHarness_getSkipLinks, "f").call(this);
17
- return skipLinks[index].text();
18
- }
19
- /**
20
- * Clicks the skip link at the given index.
21
- */
22
- async clickSkipLink(index) {
23
- const skipLinks = await __classPrivateFieldGet(this, _SkySkipLinksHarness_getSkipLinks, "f").call(this);
24
- return skipLinks[index].click();
25
- }
26
- }
27
- _SkySkipLinksHarness_getSkipLinks = new WeakMap();
28
- /**
29
- * @internal
30
- */
31
- SkySkipLinksHarness.hostSelector = 'sky-skip-link-host';
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rcy1oYXJuZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2ExMXkvdGVzdGluZy9zcmMvc2tpcC1saW5rL3NraXAtbGlua3MtaGFybmVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRTFEOztHQUVHO0FBQ0gsTUFBTSxPQUFPLG1CQUFvQixTQUFRLG1CQUFtQjtJQUE1RDs7UUFNRSw0Q0FBZ0IsSUFBSSxDQUFDLGFBQWEsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFDO0lBbUJ2RCxDQUFDO0lBakJDOztPQUVHO0lBQ0ksS0FBSyxDQUFDLGVBQWUsQ0FBQyxLQUFhO1FBQ3hDLE1BQU0sU0FBUyxHQUFHLE1BQU0sdUJBQUEsSUFBSSx5Q0FBYyxNQUFsQixJQUFJLENBQWdCLENBQUM7UUFFN0MsT0FBTyxTQUFTLENBQUMsS0FBSyxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDakMsQ0FBQztJQUVEOztPQUVHO0lBQ0ksS0FBSyxDQUFDLGFBQWEsQ0FBQyxLQUFhO1FBQ3RDLE1BQU0sU0FBUyxHQUFHLE1BQU0sdUJBQUEsSUFBSSx5Q0FBYyxN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leDogbnVtYmVyKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgY29uc3Qgc2tpcExpbmtzID0gYXdhaXQgdGhpcy4jZ2V0U2tpcExpbmtzKCk7XG5cbiAgICByZXR1cm4gc2tpcExpbmtzW2luZGV4XS5jbGljaygpO1xuICB9XG59XG4iXX0=
@@ -1,43 +0,0 @@
1
- import { __awaiter, __classPrivateFieldGet } from 'tslib';
2
- import { SkyComponentHarness } from '@skyux/core/testing';
3
-
4
- var _SkySkipLinksHarness_getSkipLinks;
5
- /**
6
- * Harness for interacting with a skip link component in tests.
7
- */
8
- class SkySkipLinksHarness extends SkyComponentHarness {
9
- constructor() {
10
- super(...arguments);
11
- _SkySkipLinksHarness_getSkipLinks.set(this, this.locatorForAll('.sky-skip-link'));
12
- }
13
- /**
14
- * Gets the text of the skip link at the given index.
15
- */
16
- getSkipLinkText(index) {
17
- return __awaiter(this, void 0, void 0, function* () {
18
- const skipLinks = yield __classPrivateFieldGet(this, _SkySkipLinksHarness_getSkipLinks, "f").call(this);
19
- return skipLinks[index].text();
20
- });
21
- }
22
- /**
23
- * Clicks the skip link at the given index.
24
- */
25
- clickSkipLink(index) {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- const skipLinks = yield __classPrivateFieldGet(this, _SkySkipLinksHarness_getSkipLinks, "f").call(this);
28
- return skipLinks[index].click();
29
- });
30
- }
31
- }
32
- _SkySkipLinksHarness_getSkipLinks = new WeakMap();
33
- /**
34
- * @internal
35
- */
36
- SkySkipLinksHarness.hostSelector = 'sky-skip-link-host';
37
-
38
- /**
39
- * Generated bundle index. Do not edit.
40
- */
41
-
42
- export { SkySkipLinksHarness };
43
- //# sourceMappingURL=skyux-a11y-testing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skyux-a11y-testing.mjs","sources":["../../../../../libs/components/a11y/testing/src/skip-link/skip-links-harness.ts","../../../../../libs/components/a11y/testing/src/skyux-a11y-testing.ts"],"sourcesContent":["import { SkyComponentHarness } from '@skyux/core/testing';\n\n/**\n * Harness for interacting with a skip link component in tests.\n */\nexport class SkySkipLinksHarness extends SkyComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = 'sky-skip-link-host';\n\n #getSkipLinks = this.locatorForAll('.sky-skip-link');\n\n /**\n * Gets the text of the skip link at the given index.\n */\n public async getSkipLinkText(index: number): Promise<string> {\n const skipLinks = await this.#getSkipLinks();\n\n return skipLinks[index].text();\n }\n\n /**\n * Clicks the skip link at the given index.\n */\n public async clickSkipLink(index: number): Promise<void> {\n const skipLinks = await this.#getSkipLinks();\n\n return skipLinks[index].click();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAEA;;AAEG;AACG,MAAO,mBAAoB,SAAQ,mBAAmB,CAAA;AAA5D,IAAA,WAAA,GAAA;;AAME,QAAA,iCAAA,CAAA,GAAA,CAAA,IAAA,EAAgB,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAA;KAmBtD;AAjBC;;AAEG;AACU,IAAA,eAAe,CAAC,KAAa,EAAA;;AACxC,YAAA,MAAM,SAAS,GAAG,MAAM,sBAAA,CAAA,IAAI,EAAc,iCAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAAlB,IAAI,CAAgB,CAAC;AAE7C,YAAA,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;SAChC,CAAA,CAAA;AAAA,KAAA;AAED;;AAEG;AACU,IAAA,aAAa,CAAC,KAAa,EAAA;;AACtC,YAAA,MAAM,SAAS,GAAG,MAAM,sBAAA,CAAA,IAAI,EAAc,iCAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAAlB,IAAI,CAAgB,CAAC;AAE7C,YAAA,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;SACjC,CAAA,CAAA;AAAA,KAAA;;;AAvBD;;AAEG;AACW,mBAAY,CAAA,YAAA,GAAG,oBAAoB;;ACTnD;;AAEG;;;;"}
@@ -1,180 +0,0 @@
1
- import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { NgModule, Injectable, Component, ChangeDetectionStrategy } from '@angular/core';
5
- import * as i3 from '@skyux/i18n';
6
- import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
7
- import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
8
- import * as i1 from '@skyux/core';
9
- import { SkyDynamicComponentLocation } from '@skyux/core';
10
-
11
- /**
12
- * NOTICE: DO NOT MODIFY THIS FILE!
13
- * The contents of this file were automatically generated by
14
- * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
15
- * To update this file, simply rerun the command.
16
- */
17
- const RESOURCES = {
18
- 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
19
- };
20
- class SkyA11yResourcesProvider {
21
- getString(localeInfo, name) {
22
- return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
23
- }
24
- }
25
- /**
26
- * Import into any component library module that needs to use resource strings.
27
- */
28
- class SkyA11yResourcesModule {
29
- }
30
- SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
31
- SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
32
- SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, providers: [
33
- {
34
- provide: SKY_LIB_RESOURCES_PROVIDERS,
35
- useClass: SkyA11yResourcesProvider,
36
- multi: true,
37
- },
38
- ], imports: [SkyI18nModule] });
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
40
- type: NgModule,
41
- args: [{
42
- exports: [SkyI18nModule],
43
- providers: [
44
- {
45
- provide: SKY_LIB_RESOURCES_PROVIDERS,
46
- useClass: SkyA11yResourcesProvider,
47
- multi: true,
48
- },
49
- ],
50
- }]
51
- }] });
52
-
53
- var _SkySkipLinkAdapterService_windowRef;
54
- class SkySkipLinkAdapterService {
55
- constructor(windowRef) {
56
- _SkySkipLinkAdapterService_windowRef.set(this, void 0);
57
- __classPrivateFieldSet(this, _SkySkipLinkAdapterService_windowRef, windowRef, "f");
58
- }
59
- skipTo(link) {
60
- const targetElement = link.elementRef.nativeElement;
61
- const win = __classPrivateFieldGet(this, _SkySkipLinkAdapterService_windowRef, "f").nativeWindow;
62
- const bodyElement = win.document.body;
63
- const bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
64
- const bodyDefaultPadding = 10;
65
- const scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
66
- win.scroll(0, scrollTop);
67
- targetElement.focus();
68
- }
69
- }
70
- _SkySkipLinkAdapterService_windowRef = new WeakMap();
71
- SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
72
- SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService });
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
74
- type: Injectable
75
- }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
76
-
77
- var _SkySkipLinkHostComponent__links, _SkySkipLinkHostComponent_changeDetector, _SkySkipLinkHostComponent_adapter;
78
- class SkySkipLinkHostComponent {
79
- get links() {
80
- return __classPrivateFieldGet(this, _SkySkipLinkHostComponent__links, "f");
81
- }
82
- set links(value) {
83
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent__links, value, "f");
84
- __classPrivateFieldGet(this, _SkySkipLinkHostComponent_changeDetector, "f").markForCheck();
85
- }
86
- constructor(changeDetector, adapter) {
87
- _SkySkipLinkHostComponent__links.set(this, []);
88
- _SkySkipLinkHostComponent_changeDetector.set(this, void 0);
89
- _SkySkipLinkHostComponent_adapter.set(this, void 0);
90
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent_changeDetector, changeDetector, "f");
91
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent_adapter, adapter, "f");
92
- }
93
- skipTo(link) {
94
- __classPrivateFieldGet(this, _SkySkipLinkHostComponent_adapter, "f").skipTo(link);
95
- }
96
- }
97
- _SkySkipLinkHostComponent__links = new WeakMap(), _SkySkipLinkHostComponent_changeDetector = new WeakMap(), _SkySkipLinkHostComponent_adapter = new WeakMap();
98
- SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
99
- SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0, template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources : link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
101
- type: Component,
102
- args: [{ selector: 'sky-skip-link-host', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkySkipLinkAdapterService], template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources : link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"] }]
103
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkySkipLinkAdapterService }]; } });
104
-
105
- /**
106
- * The Angular module that enables "skip links" to be added to the page.
107
- */
108
- class SkySkipLinkModule {
109
- }
110
- SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
111
- SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
112
- SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, decorators: [{
114
- type: NgModule,
115
- args: [{
116
- declarations: [SkySkipLinkHostComponent],
117
- imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
118
- }]
119
- }] });
120
-
121
- var _SkySkipLinkService_instances, _SkySkipLinkService_dynamicComponentService, _SkySkipLinkService_createHostComponent;
122
- /**
123
- * An Angular service that adds "skip links" to the page. Skip links will only be displayed
124
- * when the page initially loads and the user presses the Tab key, in which case the first link will
125
- * be displayed and focused. Clicking the button will skip to the specified element. Pressing
126
- * the Tab key again will move to the next skip link if more than one skip link is specified;
127
- * otherwise, focus will move to the first focusable element on the page.
128
- * @dynamic
129
- */
130
- class SkySkipLinkService {
131
- constructor(dynamicComponentService) {
132
- _SkySkipLinkService_instances.add(this);
133
- _SkySkipLinkService_dynamicComponentService.set(this, void 0);
134
- __classPrivateFieldSet(this, _SkySkipLinkService_dynamicComponentService, dynamicComponentService, "f");
135
- }
136
- setSkipLinks(args) {
137
- args.links = args.links.filter((link) => {
138
- const elementRefExists = link.elementRef;
139
- return elementRefExists;
140
- });
141
- // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
142
- setTimeout(() => {
143
- const host = __classPrivateFieldGet(this, _SkySkipLinkService_instances, "m", _SkySkipLinkService_createHostComponent).call(this);
144
- host.instance.links = args.links;
145
- });
146
- }
147
- removeHostComponent() {
148
- if (SkySkipLinkService.host) {
149
- __classPrivateFieldGet(this, _SkySkipLinkService_dynamicComponentService, "f").removeComponent(SkySkipLinkService.host);
150
- SkySkipLinkService.host = undefined;
151
- }
152
- }
153
- }
154
- _SkySkipLinkService_dynamicComponentService = new WeakMap(), _SkySkipLinkService_instances = new WeakSet(), _SkySkipLinkService_createHostComponent = function _SkySkipLinkService_createHostComponent() {
155
- if (!SkySkipLinkService.host) {
156
- const componentRef = __classPrivateFieldGet(this, _SkySkipLinkService_dynamicComponentService, "f").createComponent(SkySkipLinkHostComponent, {
157
- location: SkyDynamicComponentLocation.BodyTop,
158
- });
159
- SkySkipLinkService.host = componentRef;
160
- }
161
- return SkySkipLinkService.host;
162
- };
163
- SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
164
- SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkService, providedIn: 'any' });
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkService, decorators: [{
166
- type: Injectable,
167
- args: [{
168
- // Must be 'any' so that the skip link component is created in the context of its module's injector.
169
- // If set to 'root', the component's dependency injections would only be derived from the root
170
- // injector and may loose context if the skip link was created from within a lazy-loaded module.
171
- providedIn: 'any',
172
- }]
173
- }], ctorParameters: function () { return [{ type: i1.SkyDynamicComponentService }]; } });
174
-
175
- /**
176
- * Generated bundle index. Do not edit.
177
- */
178
-
179
- export { SkySkipLinkModule, SkySkipLinkService };
180
- //# sourceMappingURL=skyux-a11y.mjs.map
@@ -1,180 +0,0 @@
1
- import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { NgModule, Injectable, Component, ChangeDetectionStrategy } from '@angular/core';
5
- import * as i3 from '@skyux/i18n';
6
- import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
7
- import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
8
- import * as i1 from '@skyux/core';
9
- import { SkyDynamicComponentLocation } from '@skyux/core';
10
-
11
- /**
12
- * NOTICE: DO NOT MODIFY THIS FILE!
13
- * The contents of this file were automatically generated by
14
- * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
15
- * To update this file, simply rerun the command.
16
- */
17
- const RESOURCES = {
18
- 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
19
- };
20
- class SkyA11yResourcesProvider {
21
- getString(localeInfo, name) {
22
- return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
23
- }
24
- }
25
- /**
26
- * Import into any component library module that needs to use resource strings.
27
- */
28
- class SkyA11yResourcesModule {
29
- }
30
- SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
31
- SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
32
- SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, providers: [
33
- {
34
- provide: SKY_LIB_RESOURCES_PROVIDERS,
35
- useClass: SkyA11yResourcesProvider,
36
- multi: true,
37
- },
38
- ], imports: [SkyI18nModule] });
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
40
- type: NgModule,
41
- args: [{
42
- exports: [SkyI18nModule],
43
- providers: [
44
- {
45
- provide: SKY_LIB_RESOURCES_PROVIDERS,
46
- useClass: SkyA11yResourcesProvider,
47
- multi: true,
48
- },
49
- ],
50
- }]
51
- }] });
52
-
53
- var _SkySkipLinkAdapterService_windowRef;
54
- class SkySkipLinkAdapterService {
55
- constructor(windowRef) {
56
- _SkySkipLinkAdapterService_windowRef.set(this, void 0);
57
- __classPrivateFieldSet(this, _SkySkipLinkAdapterService_windowRef, windowRef, "f");
58
- }
59
- skipTo(link) {
60
- const targetElement = link.elementRef.nativeElement;
61
- const win = __classPrivateFieldGet(this, _SkySkipLinkAdapterService_windowRef, "f").nativeWindow;
62
- const bodyElement = win.document.body;
63
- const bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
64
- const bodyDefaultPadding = 10;
65
- const scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
66
- win.scroll(0, scrollTop);
67
- targetElement.focus();
68
- }
69
- }
70
- _SkySkipLinkAdapterService_windowRef = new WeakMap();
71
- SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
72
- SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService });
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
74
- type: Injectable
75
- }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
76
-
77
- var _SkySkipLinkHostComponent__links, _SkySkipLinkHostComponent_changeDetector, _SkySkipLinkHostComponent_adapter;
78
- class SkySkipLinkHostComponent {
79
- get links() {
80
- return __classPrivateFieldGet(this, _SkySkipLinkHostComponent__links, "f");
81
- }
82
- set links(value) {
83
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent__links, value, "f");
84
- __classPrivateFieldGet(this, _SkySkipLinkHostComponent_changeDetector, "f").markForCheck();
85
- }
86
- constructor(changeDetector, adapter) {
87
- _SkySkipLinkHostComponent__links.set(this, []);
88
- _SkySkipLinkHostComponent_changeDetector.set(this, void 0);
89
- _SkySkipLinkHostComponent_adapter.set(this, void 0);
90
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent_changeDetector, changeDetector, "f");
91
- __classPrivateFieldSet(this, _SkySkipLinkHostComponent_adapter, adapter, "f");
92
- }
93
- skipTo(link) {
94
- __classPrivateFieldGet(this, _SkySkipLinkHostComponent_adapter, "f").skipTo(link);
95
- }
96
- }
97
- _SkySkipLinkHostComponent__links = new WeakMap(), _SkySkipLinkHostComponent_changeDetector = new WeakMap(), _SkySkipLinkHostComponent_adapter = new WeakMap();
98
- SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
99
- SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0, template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources : link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
101
- type: Component,
102
- args: [{ selector: 'sky-skip-link-host', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkySkipLinkAdapterService], template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources : link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"] }]
103
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkySkipLinkAdapterService }]; } });
104
-
105
- /**
106
- * The Angular module that enables "skip links" to be added to the page.
107
- */
108
- class SkySkipLinkModule {
109
- }
110
- SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
111
- SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
112
- SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkModule, decorators: [{
114
- type: NgModule,
115
- args: [{
116
- declarations: [SkySkipLinkHostComponent],
117
- imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
118
- }]
119
- }] });
120
-
121
- var _SkySkipLinkService_instances, _SkySkipLinkService_dynamicComponentService, _SkySkipLinkService_createHostComponent;
122
- /**
123
- * An Angular service that adds "skip links" to the page. Skip links will only be displayed
124
- * when the page initially loads and the user presses the Tab key, in which case the first link will
125
- * be displayed and focused. Clicking the button will skip to the specified element. Pressing
126
- * the Tab key again will move to the next skip link if more than one skip link is specified;
127
- * otherwise, focus will move to the first focusable element on the page.
128
- * @dynamic
129
- */
130
- class SkySkipLinkService {
131
- constructor(dynamicComponentService) {
132
- _SkySkipLinkService_instances.add(this);
133
- _SkySkipLinkService_dynamicComponentService.set(this, void 0);
134
- __classPrivateFieldSet(this, _SkySkipLinkService_dynamicComponentService, dynamicComponentService, "f");
135
- }
136
- setSkipLinks(args) {
137
- args.links = args.links.filter((link) => {
138
- const elementRefExists = link.elementRef;
139
- return elementRefExists;
140
- });
141
- // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
142
- setTimeout(() => {
143
- const host = __classPrivateFieldGet(this, _SkySkipLinkService_instances, "m", _SkySkipLinkService_createHostComponent).call(this);
144
- host.instance.links = args.links;
145
- });
146
- }
147
- removeHostComponent() {
148
- if (SkySkipLinkService.host) {
149
- __classPrivateFieldGet(this, _SkySkipLinkService_dynamicComponentService, "f").removeComponent(SkySkipLinkService.host);
150
- SkySkipLinkService.host = undefined;
151
- }
152
- }
153
- }
154
- _SkySkipLinkService_dynamicComponentService = new WeakMap(), _SkySkipLinkService_instances = new WeakSet(), _SkySkipLinkService_createHostComponent = function _SkySkipLinkService_createHostComponent() {
155
- if (!SkySkipLinkService.host) {
156
- const componentRef = __classPrivateFieldGet(this, _SkySkipLinkService_dynamicComponentService, "f").createComponent(SkySkipLinkHostComponent, {
157
- location: SkyDynamicComponentLocation.BodyTop,
158
- });
159
- SkySkipLinkService.host = componentRef;
160
- }
161
- return SkySkipLinkService.host;
162
- };
163
- SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
164
- SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkService, providedIn: 'any' });
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkySkipLinkService, decorators: [{
166
- type: Injectable,
167
- args: [{
168
- // Must be 'any' so that the skip link component is created in the context of its module's injector.
169
- // If set to 'root', the component's dependency injections would only be derived from the root
170
- // injector and may loose context if the skip link was created from within a lazy-loaded module.
171
- providedIn: 'any',
172
- }]
173
- }], ctorParameters: function () { return [{ type: i1.SkyDynamicComponentService }]; } });
174
-
175
- /**
176
- * Generated bundle index. Do not edit.
177
- */
178
-
179
- export { SkySkipLinkModule, SkySkipLinkService };
180
- //# sourceMappingURL=skyux-a11y.mjs.map