@skyux/a11y 5.5.0-beta.0 → 5.6.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.
- package/bundles/skyux-a11y.umd.js +5 -5
- package/documentation.json +7 -7
- package/esm2015/lib/modules/shared/a11y-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/a11y-resources.module.js.map +1 -1
- package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js.map +1 -1
- package/esm2015/lib/modules/skip-link/skip-link-args.js +0 -1
- package/esm2015/lib/modules/skip-link/skip-link-args.js.map +1 -1
- package/esm2015/lib/modules/skip-link/skip-link-host.component.js +1 -1
- package/esm2015/lib/modules/skip-link/skip-link-host.component.js.map +1 -1
- package/esm2015/lib/modules/skip-link/skip-link.module.js +1 -1
- package/esm2015/lib/modules/skip-link/skip-link.module.js.map +1 -1
- package/esm2015/lib/modules/skip-link/skip-link.service.js.map +1 -1
- package/fesm2015/skyux-a11y.js +2 -4
- package/fesm2015/skyux-a11y.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/a11y', ['exports', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.a11y = {}), global.ng.
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/i18n'), require('@skyux/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@skyux/a11y', ['exports', '@angular/common', '@angular/core', '@skyux/i18n', '@skyux/core'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.a11y = {}), global.ng.common, global.ng.core, global.i3, global.i1));
|
|
5
|
+
})(this, (function (exports, i2, i0, i3, i1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
25
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
26
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
27
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
28
28
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
29
|
|
package/documentation.json
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"sources": [
|
|
72
72
|
{
|
|
73
73
|
"fileName": "projects/a11y/src/modules/skip-link/skip-link.module.ts",
|
|
74
|
-
"line":
|
|
74
|
+
"line": 17,
|
|
75
75
|
"character": 13
|
|
76
76
|
}
|
|
77
77
|
]
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"sources": [
|
|
116
116
|
{
|
|
117
117
|
"fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
|
|
118
|
-
"line":
|
|
118
|
+
"line": 25,
|
|
119
119
|
"character": 2
|
|
120
120
|
}
|
|
121
121
|
],
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"sources": [
|
|
159
159
|
{
|
|
160
160
|
"fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
|
|
161
|
-
"line":
|
|
161
|
+
"line": 40,
|
|
162
162
|
"character": 9
|
|
163
163
|
}
|
|
164
164
|
],
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"sources": [
|
|
188
188
|
{
|
|
189
189
|
"fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
|
|
190
|
-
"line":
|
|
190
|
+
"line": 27,
|
|
191
191
|
"character": 9
|
|
192
192
|
}
|
|
193
193
|
],
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
"sources": [
|
|
241
241
|
{
|
|
242
242
|
"fileName": "projects/a11y/src/modules/skip-link/skip-link.service.ts",
|
|
243
|
-
"line":
|
|
243
|
+
"line": 22,
|
|
244
244
|
"character": 13
|
|
245
245
|
}
|
|
246
246
|
]
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
"sources": [
|
|
347
347
|
{
|
|
348
348
|
"fileName": "projects/a11y/src/modules/skip-link/skip-link-args.ts",
|
|
349
|
-
"line":
|
|
349
|
+
"line": 13,
|
|
350
350
|
"character": 2
|
|
351
351
|
}
|
|
352
352
|
],
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
"sources": [
|
|
373
373
|
{
|
|
374
374
|
"fileName": "projects/a11y/src/modules/skip-link/skip-link-args.ts",
|
|
375
|
-
"line":
|
|
375
|
+
"line": 9,
|
|
376
376
|
"character": 17
|
|
377
377
|
}
|
|
378
378
|
]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* To update this file, simply rerun the command.
|
|
6
6
|
*/
|
|
7
7
|
import { NgModule } from '@angular/core';
|
|
8
|
-
import {
|
|
8
|
+
import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
const RESOURCES = {
|
|
11
11
|
'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/shared/a11y-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"a11y-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/shared/a11y-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;CACjE,CAAC;AAEF,MAAM,OAAO,wBAAwB;IAC5B,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,sBAAsB;;oHAAtB,sBAAsB;qHAAtB,sBAAsB,YATvB,aAAa;qHASZ,sBAAsB,aARtB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,wBAAwB;YAClC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,sBAAsB;kBAVlC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,wBAAwB;4BAClC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF","sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },\n};\n\nexport class SkyA11yResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyA11yResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyA11yResourcesModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"skip-link-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;;;AAK9C,MAAM,OAAO,yBAAyB;IACpC,YAAoB,SAA0B;QAA1B,cAAS,GAAT,SAAS,CAAiB;IAAG,CAAC;IAE3C,MAAM,CAAC,IAAiB;QAC7B,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QACpD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACxC,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEtC,MAAM,aAAa,GAAG,QAAQ,CAC5B,GAAG,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,SAAS,EAC3C,EAAE,CACH,CAAC;QACF,MAAM,kBAAkB,GAAG,EAAE,CAAC;QAC9B,MAAM,SAAS,GACb,aAAa,CAAC,SAAS,GAAG,aAAa,GAAG,kBAAkB,CAAC;QAE/D,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QAEzB,aAAa,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;;uHAnBU,yBAAyB;2HAAzB,yBAAyB;4FAAzB,yBAAyB;kBADrC,UAAU","sourcesContent":["import { Injectable } from '@angular/core';\nimport { SkyAppWindowRef } from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\n\n@Injectable()\nexport class SkySkipLinkAdapterService {\n constructor(private windowRef: SkyAppWindowRef) {}\n\n public skipTo(link: SkySkipLink): void {\n const targetElement = link.elementRef.nativeElement;\n const win = this.windowRef.nativeWindow;\n const bodyElement = win.document.body;\n\n const bodyMarginTop = parseInt(\n win.getComputedStyle(bodyElement).marginTop,\n 10\n );\n const bodyDefaultPadding = 10;\n const scrollTop =\n targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;\n\n win.scroll(0, scrollTop);\n\n targetElement.focus();\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link-args.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-args.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skip-link-args.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-args.ts"],"names":[],"mappings":"","sourcesContent":["//#region imports\nimport { SkySkipLink } from './skip-link';\n\n//#endregion\n\n/**\n * Options specified when setting the page's skip links.\n */\nexport interface SkySkipLinkArgs {\n /**\n * The skip links to create.\n */\n links: SkySkipLink[];\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, } from '@angular/core';
|
|
2
2
|
import { SkySkipLinkAdapterService } from './skip-link-adapter.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "./skip-link-adapter.service";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link-host.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.ts","../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"skip-link-host.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.ts","../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;;;;;AASxE,MAAM,OAAO,wBAAwB;IAYnC,YACU,cAAiC,EACjC,OAAkC;QADlC,mBAAc,GAAd,cAAc,CAAmB;QACjC,YAAO,GAAP,OAAO,CAA2B;IACzC,CAAC;IAdJ,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,KAAK,CAAC,KAAoB;QACnC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IASM,MAAM,CAAC,IAAiB;QAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;;sHAnBU,wBAAwB;0GAAxB,wBAAwB,6CAFxB,CAAC,yBAAyB,CAAC,0BCdxC,4NAQA;4FDQa,wBAAwB;kBAPpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,WAAW,EAAE,iCAAiC;oBAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;oBAC9C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAE,CAAC,yBAAyB,CAAC;iBACvC","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkAdapterService } from './skip-link-adapter.service';\n\n@Component({\n selector: 'sky-skip-link-host',\n templateUrl: './skip-link-host.component.html',\n styleUrls: ['./skip-link-host.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [SkySkipLinkAdapterService],\n})\nexport class SkySkipLinkHostComponent {\n public get links(): SkySkipLink[] {\n return this._links;\n }\n\n public set links(value: SkySkipLink[]) {\n this._links = value;\n this.changeDetector.markForCheck();\n }\n\n private _links: SkySkipLink[];\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private adapter: SkySkipLinkAdapterService\n ) {}\n\n public skipTo(link: SkySkipLink): void {\n this.adapter.skipTo(link);\n }\n}\n","<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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyI18nModule } from '@skyux/i18n';
|
|
4
4
|
import { SkyA11yResourcesModule } from '../shared/a11y-resources.module';
|
|
5
5
|
import { SkySkipLinkHostComponent } from './skip-link-host.component';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"skip-link.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;;AAEtE;;GAEG;AAMH,MAAM,OAAO,iBAAiB;;+GAAjB,iBAAiB;gHAAjB,iBAAiB,iBAHb,wBAAwB,aAC7B,YAAY,EAAE,aAAa,EAAE,sBAAsB;gHAElD,iBAAiB,YAFnB,CAAC,YAAY,EAAE,aAAa,EAAE,sBAAsB,CAAC;4FAEnD,iBAAiB;kBAL7B,QAAQ;mBAAC;oBACR,eAAe,EAAE,CAAC,wBAAwB,CAAC;oBAC3C,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,sBAAsB,CAAC;iBAC/D","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyA11yResourcesModule } from '../shared/a11y-resources.module';\n\nimport { SkySkipLinkHostComponent } from './skip-link-host.component';\n\n/**\n * The Angular module that enables \"skip links\" to be added to the page.\n */\n@NgModule({\n entryComponents: [SkySkipLinkHostComponent],\n declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n})\nexport class SkySkipLinkModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"skip-link.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.service.ts"],"names":[],"mappings":"A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AU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { ComponentRef, Injectable } from '@angular/core';\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkArgs } from './skip-link-args';\nimport { SkySkipLinkHostComponent } from './skip-link-host.component';\n\n/**\n * An Angular service that adds \"skip links\" to the page. Skip links will only be displayed\n * when the page initially loads and the user presses the Tab key, in which case the first link will\n * be displayed and focused. Clicking the button will skip to the specified element. Pressing\n * the Tab key again will move to the next skip link if more than one skip link is specified;\n * otherwise, focus will move to the first focusable element on the page.\n * @dynamic\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkySkipLinkService {\n private static host: ComponentRef<SkySkipLinkHostComponent>;\n\n constructor(private dynamicComponentService: SkyDynamicComponentService) {}\n\n public setSkipLinks(args: SkySkipLinkArgs) {\n args.links = args.links.filter((link: SkySkipLink) => {\n const elementRefExists = link.elementRef;\n return elementRefExists;\n });\n\n // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.\n setTimeout(() => {\n const host = this.createHostComponent();\n host.instance.links = args.links;\n });\n }\n\n public removeHostComponent(): void {\n this.dynamicComponentService.removeComponent(SkySkipLinkService.host);\n SkySkipLinkService.host = undefined;\n }\n\n private createHostComponent(): ComponentRef<SkySkipLinkHostComponent> {\n if (!SkySkipLinkService.host) {\n const componentRef = this.dynamicComponentService.createComponent(\n SkySkipLinkHostComponent,\n {\n location: SkyDynamicComponentLocation.BodyTop,\n }\n );\n\n SkySkipLinkService.host = componentRef;\n }\n\n return SkySkipLinkService.host;\n }\n}\n"]}
|
package/fesm2015/skyux-a11y.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { NgModule, Injectable, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
1
|
import * as i2 from '@angular/common';
|
|
4
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { NgModule, Injectable, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
5
5
|
import * as i3 from '@skyux/i18n';
|
|
6
6
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
7
7
|
import * as i1 from '@skyux/core';
|
|
8
8
|
import { SkyDynamicComponentLocation } from '@skyux/core';
|
|
9
9
|
|
|
10
|
-
//#region imports
|
|
11
|
-
|
|
12
10
|
/**
|
|
13
11
|
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
14
12
|
* The contents of this file were automatically generated by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-a11y.js","sources":["../../../../../libs/components/a11y/src/lib/modules/
|
|
1
|
+
{"version":3,"file":"skyux-a11y.js","sources":["../../../../../libs/components/a11y/src/lib/modules/shared/a11y-resources.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-adapter.service.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-host.component.html","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.module.ts","../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.service.ts","../../../../../libs/components/a11y/src/skyux-a11y.ts"],"sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },\n};\n\nexport class SkyA11yResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyA11yResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyA11yResourcesModule {}\n","import { Injectable } from '@angular/core';\nimport { SkyAppWindowRef } from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\n\n@Injectable()\nexport class SkySkipLinkAdapterService {\n constructor(private windowRef: SkyAppWindowRef) {}\n\n public skipTo(link: SkySkipLink): void {\n const targetElement = link.elementRef.nativeElement;\n const win = this.windowRef.nativeWindow;\n const bodyElement = win.document.body;\n\n const bodyMarginTop = parseInt(\n win.getComputedStyle(bodyElement).marginTop,\n 10\n );\n const bodyDefaultPadding = 10;\n const scrollTop =\n targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;\n\n win.scroll(0, scrollTop);\n\n targetElement.focus();\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkAdapterService } from './skip-link-adapter.service';\n\n@Component({\n selector: 'sky-skip-link-host',\n templateUrl: './skip-link-host.component.html',\n styleUrls: ['./skip-link-host.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [SkySkipLinkAdapterService],\n})\nexport class SkySkipLinkHostComponent {\n public get links(): SkySkipLink[] {\n return this._links;\n }\n\n public set links(value: SkySkipLink[]) {\n this._links = value;\n this.changeDetector.markForCheck();\n }\n\n private _links: SkySkipLink[];\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private adapter: SkySkipLinkAdapterService\n ) {}\n\n public skipTo(link: SkySkipLink): void {\n this.adapter.skipTo(link);\n }\n}\n","<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","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyA11yResourcesModule } from '../shared/a11y-resources.module';\n\nimport { SkySkipLinkHostComponent } from './skip-link-host.component';\n\n/**\n * The Angular module that enables \"skip links\" to be added to the page.\n */\n@NgModule({\n entryComponents: [SkySkipLinkHostComponent],\n declarations: [SkySkipLinkHostComponent],\n imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],\n})\nexport class SkySkipLinkModule {}\n","import { ComponentRef, Injectable } from '@angular/core';\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\nimport { SkySkipLinkArgs } from './skip-link-args';\nimport { SkySkipLinkHostComponent } from './skip-link-host.component';\n\n/**\n * An Angular service that adds \"skip links\" to the page. Skip links will only be displayed\n * when the page initially loads and the user presses the Tab key, in which case the first link will\n * be displayed and focused. Clicking the button will skip to the specified element. Pressing\n * the Tab key again will move to the next skip link if more than one skip link is specified;\n * otherwise, focus will move to the first focusable element on the page.\n * @dynamic\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkySkipLinkService {\n private static host: ComponentRef<SkySkipLinkHostComponent>;\n\n constructor(private dynamicComponentService: SkyDynamicComponentService) {}\n\n public setSkipLinks(args: SkySkipLinkArgs) {\n args.links = args.links.filter((link: SkySkipLink) => {\n const elementRefExists = link.elementRef;\n return elementRefExists;\n });\n\n // Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.\n setTimeout(() => {\n const host = this.createHostComponent();\n host.instance.links = args.links;\n });\n }\n\n public removeHostComponent(): void {\n this.dynamicComponentService.removeComponent(SkySkipLinkService.host);\n SkySkipLinkService.host = undefined;\n }\n\n private createHostComponent(): ComponentRef<SkySkipLinkHostComponent> {\n if (!SkySkipLinkService.host) {\n const componentRef = this.dynamicComponentService.createComponent(\n SkySkipLinkHostComponent,\n {\n location: SkyDynamicComponentLocation.BodyTop,\n }\n );\n\n SkySkipLinkService.host = componentRef;\n }\n\n return SkySkipLinkService.host;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;AAgBA,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE;CACjE,CAAC;MAEW,wBAAwB;IAC5B,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAClE;CACF;AAED;;;MAaa,sBAAsB;;oHAAtB,sBAAsB;qHAAtB,sBAAsB,YATvB,aAAa;qHASZ,sBAAsB,aARtB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,wBAAwB;YAClC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,sBAAsB;kBAVlC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,wBAAwB;4BAClC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF;;;MChCY,yBAAyB;IACpC,YAAoB,SAA0B;QAA1B,cAAS,GAAT,SAAS,CAAiB;KAAI;IAE3C,MAAM,CAAC,IAAiB;QAC7B,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QACpD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACxC,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEtC,MAAM,aAAa,GAAG,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ACpBD;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/a11y",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^12.2.16",
|
|
6
|
-
"@angular/core": "^12.2.16",
|
|
7
|
-
"@skyux/core": "5.5.0-beta.0",
|
|
8
|
-
"@skyux/i18n": "5.5.0-beta.0"
|
|
9
|
-
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"tslib": "^2.3.1"
|
|
12
|
-
},
|
|
3
|
+
"version": "5.6.1",
|
|
13
4
|
"author": "Blackbaud, Inc.",
|
|
14
5
|
"keywords": [
|
|
15
6
|
"blackbaud",
|
|
@@ -24,6 +15,15 @@
|
|
|
24
15
|
"url": "https://github.com/blackbaud/skyux/issues"
|
|
25
16
|
},
|
|
26
17
|
"homepage": "https://github.com/blackbaud/skyux#readme",
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@angular/common": "^12.2.16",
|
|
20
|
+
"@angular/core": "^12.2.16",
|
|
21
|
+
"@skyux/core": "5.6.1",
|
|
22
|
+
"@skyux/i18n": "5.6.1"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"tslib": "^2.3.1"
|
|
26
|
+
},
|
|
27
27
|
"main": "bundles/skyux-a11y.umd.js",
|
|
28
28
|
"module": "fesm2015/skyux-a11y.js",
|
|
29
29
|
"es2015": "fesm2015/skyux-a11y.js",
|