@skyux/a11y 5.0.1 → 5.5.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/README.md +6 -4
- package/bundles/skyux-a11y.umd.js +17 -17
- package/documentation.json +8 -2
- package/esm2015/index.js +5 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/shared/a11y-resources.module.js +45 -0
- package/esm2015/lib/modules/shared/a11y-resources.module.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js +25 -0
- package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link-args.js +3 -0
- package/esm2015/lib/modules/skip-link/skip-link-args.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link-host.component.js +35 -0
- package/esm2015/lib/modules/skip-link/skip-link-host.component.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link.js +2 -0
- package/esm2015/lib/modules/skip-link/skip-link.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link.module.js +23 -0
- package/esm2015/lib/modules/skip-link/skip-link.module.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link.service.js +51 -0
- package/esm2015/lib/modules/skip-link/skip-link.service.js.map +1 -0
- package/esm2015/skyux-a11y.js +2 -2
- package/esm2015/skyux-a11y.js.map +1 -0
- package/fesm2015/skyux-a11y.js +17 -17
- package/fesm2015/skyux-a11y.js.map +1 -1
- package/index.d.ts +4 -0
- package/{modules → lib/modules}/shared/a11y-resources.module.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link-args.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link-host.component.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link.module.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link.service.d.ts +0 -0
- package/package.json +19 -5
- package/skyux-a11y.d.ts +1 -1
- package/LICENSE +0 -21
- package/bundles/skyux-a11y.umd.js.map +0 -1
- package/esm2015/modules/shared/a11y-resources.module.js +0 -45
- package/esm2015/modules/skip-link/skip-link-adapter.service.js +0 -24
- package/esm2015/modules/skip-link/skip-link-args.js +0 -3
- package/esm2015/modules/skip-link/skip-link-host.component.js +0 -35
- package/esm2015/modules/skip-link/skip-link.js +0 -2
- package/esm2015/modules/skip-link/skip-link.module.js +0 -23
- package/esm2015/modules/skip-link/skip-link.service.js +0 -51
- package/esm2015/public-api.js +0 -5
- package/public-api.d.ts +0 -4
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# a11y
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test a11y` to execute the unit tests.
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
}
|
|
53
53
|
return SkyA11yResourcesModule;
|
|
54
54
|
}());
|
|
55
|
-
SkyA11yResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
56
|
-
SkyA11yResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
57
|
-
SkyA11yResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
55
|
+
SkyA11yResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
56
|
+
SkyA11yResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, exports: [i3.SkyI18nModule] });
|
|
57
|
+
SkyA11yResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, providers: [
|
|
58
58
|
{
|
|
59
59
|
provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
|
|
60
60
|
useClass: SkyA11yResourcesProvider,
|
|
61
61
|
multi: true,
|
|
62
62
|
},
|
|
63
63
|
], imports: [i3.SkyI18nModule] });
|
|
64
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
64
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, decorators: [{
|
|
65
65
|
type: i0.NgModule,
|
|
66
66
|
args: [{
|
|
67
67
|
exports: [i3.SkyI18nModule],
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
};
|
|
92
92
|
return SkySkipLinkAdapterService;
|
|
93
93
|
}());
|
|
94
|
-
SkySkipLinkAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
95
|
-
SkySkipLinkAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
96
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
94
|
+
SkySkipLinkAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService, deps: [{ token: i1__namespace.SkyAppWindowRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
95
|
+
SkySkipLinkAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService });
|
|
96
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService, decorators: [{
|
|
97
97
|
type: i0.Injectable
|
|
98
98
|
}], ctorParameters: function () { return [{ type: i1__namespace.SkyAppWindowRef }]; } });
|
|
99
99
|
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
};
|
|
119
119
|
return SkySkipLinkHostComponent;
|
|
120
120
|
}());
|
|
121
|
-
SkySkipLinkHostComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
122
|
-
SkySkipLinkHostComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
123
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
121
|
+
SkySkipLinkHostComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkHostComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
122
|
+
SkySkipLinkHostComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0__namespace, 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"], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
123
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkHostComponent, decorators: [{
|
|
124
124
|
type: i0.Component,
|
|
125
125
|
args: [{
|
|
126
126
|
selector: 'sky-skip-link-host',
|
|
@@ -139,10 +139,10 @@
|
|
|
139
139
|
}
|
|
140
140
|
return SkySkipLinkModule;
|
|
141
141
|
}());
|
|
142
|
-
SkySkipLinkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
143
|
-
SkySkipLinkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
144
|
-
SkySkipLinkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
145
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
142
|
+
SkySkipLinkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
143
|
+
SkySkipLinkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule] });
|
|
144
|
+
SkySkipLinkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, imports: [[i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule]] });
|
|
145
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, decorators: [{
|
|
146
146
|
type: i0.NgModule,
|
|
147
147
|
args: [{
|
|
148
148
|
entryComponents: [SkySkipLinkHostComponent],
|
|
@@ -190,9 +190,9 @@
|
|
|
190
190
|
};
|
|
191
191
|
return SkySkipLinkService;
|
|
192
192
|
}());
|
|
193
|
-
SkySkipLinkService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
194
|
-
SkySkipLinkService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
195
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
193
|
+
SkySkipLinkService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, deps: [{ token: i1__namespace.SkyDynamicComponentService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
194
|
+
SkySkipLinkService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, providedIn: 'root' });
|
|
195
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, decorators: [{
|
|
196
196
|
type: i0.Injectable,
|
|
197
197
|
args: [{
|
|
198
198
|
providedIn: 'root',
|
package/documentation.json
CHANGED
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"name": "NgModule",
|
|
28
28
|
"type": {
|
|
29
29
|
"type": "reference",
|
|
30
|
+
"qualifiedName": "NgModuleDecorator",
|
|
31
|
+
"package": "@angular/core",
|
|
30
32
|
"name": "NgModule"
|
|
31
33
|
},
|
|
32
34
|
"arguments": {
|
|
@@ -94,6 +96,8 @@
|
|
|
94
96
|
"name": "Injectable",
|
|
95
97
|
"type": {
|
|
96
98
|
"type": "reference",
|
|
99
|
+
"qualifiedName": "InjectableDecorator",
|
|
100
|
+
"package": "@angular/core",
|
|
97
101
|
"name": "Injectable"
|
|
98
102
|
},
|
|
99
103
|
"arguments": {
|
|
@@ -275,6 +279,8 @@
|
|
|
275
279
|
"name": "any"
|
|
276
280
|
}
|
|
277
281
|
],
|
|
282
|
+
"qualifiedName": "ElementRef",
|
|
283
|
+
"package": "@angular/core",
|
|
278
284
|
"name": "ElementRef"
|
|
279
285
|
}
|
|
280
286
|
},
|
|
@@ -392,11 +398,11 @@
|
|
|
392
398
|
],
|
|
393
399
|
"sources": [
|
|
394
400
|
{
|
|
395
|
-
"fileName": "
|
|
401
|
+
"fileName": "index.ts",
|
|
396
402
|
"line": 1,
|
|
397
403
|
"character": 0
|
|
398
404
|
}
|
|
399
405
|
]
|
|
400
406
|
},
|
|
401
407
|
"codeExamples": []
|
|
402
|
-
}
|
|
408
|
+
}
|
package/esm2015/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/a11y/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './lib/modules/skip-link/skip-link-args';\nexport * from './lib/modules/skip-link/skip-link.module';\nexport * from './lib/modules/skip-link/skip-link.service';\nexport * from './lib/modules/skip-link/skip-link';\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 modules/shared/sky-a11y' schematic.
|
|
5
|
+
* To update this file, simply rerun the command.
|
|
6
|
+
*/
|
|
7
|
+
import { NgModule } from '@angular/core';
|
|
8
|
+
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS, } 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: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
24
|
+
SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
|
|
25
|
+
SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", 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: "12.2.16", 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=a11y-resources.module.js.map
|
|
@@ -0,0 +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;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,qBAAqB,EAErB,aAAa,EAGb,2BAA2B,GAC5B,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 */\n\nimport { NgModule } from '@angular/core';\nimport {\n getLibStringForLocale,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n SKY_LIB_RESOURCES_PROVIDERS,\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"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { SkyAppWindowRef } from '@skyux/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@skyux/core";
|
|
5
|
+
export class SkySkipLinkAdapterService {
|
|
6
|
+
constructor(windowRef) {
|
|
7
|
+
this.windowRef = windowRef;
|
|
8
|
+
}
|
|
9
|
+
skipTo(link) {
|
|
10
|
+
const targetElement = link.elementRef.nativeElement;
|
|
11
|
+
const win = this.windowRef.nativeWindow;
|
|
12
|
+
const bodyElement = win.document.body;
|
|
13
|
+
const bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
|
|
14
|
+
const bodyDefaultPadding = 10;
|
|
15
|
+
const scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
|
|
16
|
+
win.scroll(0, scrollTop);
|
|
17
|
+
targetElement.focus();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
|
|
23
|
+
type: Injectable
|
|
24
|
+
}], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
|
|
25
|
+
//# sourceMappingURL=skip-link-adapter.service.js.map
|
|
@@ -0,0 +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;AAE3C,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';\n\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"]}
|
|
@@ -0,0 +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":"AAAA,iBAAiB","sourcesContent":["//#region imports\n\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"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ChangeDetectionStrategy, Component, } from '@angular/core';
|
|
2
|
+
import { SkySkipLinkAdapterService } from './skip-link-adapter.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./skip-link-adapter.service";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "@skyux/i18n";
|
|
7
|
+
export class SkySkipLinkHostComponent {
|
|
8
|
+
constructor(changeDetector, adapter) {
|
|
9
|
+
this.changeDetector = changeDetector;
|
|
10
|
+
this.adapter = adapter;
|
|
11
|
+
}
|
|
12
|
+
get links() {
|
|
13
|
+
return this._links;
|
|
14
|
+
}
|
|
15
|
+
set links(value) {
|
|
16
|
+
this._links = value;
|
|
17
|
+
this.changeDetector.markForCheck();
|
|
18
|
+
}
|
|
19
|
+
skipTo(link) {
|
|
20
|
+
this.adapter.skipTo(link);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
|
|
26
|
+
type: Component,
|
|
27
|
+
args: [{
|
|
28
|
+
selector: 'sky-skip-link-host',
|
|
29
|
+
templateUrl: './skip-link-host.component.html',
|
|
30
|
+
styleUrls: ['./skip-link-host.component.scss'],
|
|
31
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
32
|
+
providers: [SkySkipLinkAdapterService],
|
|
33
|
+
}]
|
|
34
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.SkySkipLinkAdapterService }]; } });
|
|
35
|
+
//# sourceMappingURL=skip-link-host.component.js.map
|
|
@@ -0,0 +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,uBAAuB,EACvB,SAAS,GACV,MAAM,eAAe,CAAC;AAIvB,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,0BCfxC,4NAQA;4FDSa,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 ChangeDetectorRef,\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\n\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skip-link.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link.ts"],"names":[],"mappings":"","sourcesContent":["import { ElementRef } from '@angular/core';\n\n/**\n * A \"skip link\" that allows a user to skip parts of the page and go directly to the main content.\n */\nexport interface SkySkipLink {\n /**\n * The title of the skip link.\n */\n title: string;\n\n /**\n * The element to scroll to and focus when the skip link is clicked. This element must\n * allow focus, either by spcecifying an HTML element that allows focus by default (such\n * as a `button` or `a` element) or by setting `tabindex=\"-1\" on the specified element.\n */\n elementRef: ElementRef;\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { SkyI18nModule } from '@skyux/i18n';
|
|
4
|
+
import { SkyA11yResourcesModule } from '../shared/a11y-resources.module';
|
|
5
|
+
import { SkySkipLinkHostComponent } from './skip-link-host.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* The Angular module that enables "skip links" to be added to the page.
|
|
9
|
+
*/
|
|
10
|
+
export class SkySkipLinkModule {
|
|
11
|
+
}
|
|
12
|
+
SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
+
SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
|
|
14
|
+
SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, decorators: [{
|
|
16
|
+
type: NgModule,
|
|
17
|
+
args: [{
|
|
18
|
+
entryComponents: [SkySkipLinkHostComponent],
|
|
19
|
+
declarations: [SkySkipLinkHostComponent],
|
|
20
|
+
imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
|
|
21
|
+
}]
|
|
22
|
+
}] });
|
|
23
|
+
//# sourceMappingURL=skip-link.module.js.map
|
|
@@ -0,0 +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,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,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 { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\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"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { SkyDynamicComponentLocation, SkyDynamicComponentService, } from '@skyux/core';
|
|
3
|
+
import { SkySkipLinkHostComponent } from './skip-link-host.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@skyux/core";
|
|
6
|
+
/**
|
|
7
|
+
* An Angular service that adds "skip links" to the page. Skip links will only be displayed
|
|
8
|
+
* when the page initially loads and the user presses the Tab key, in which case the first link will
|
|
9
|
+
* be displayed and focused. Clicking the button will skip to the specified element. Pressing
|
|
10
|
+
* the Tab key again will move to the next skip link if more than one skip link is specified;
|
|
11
|
+
* otherwise, focus will move to the first focusable element on the page.
|
|
12
|
+
* @dynamic
|
|
13
|
+
*/
|
|
14
|
+
export class SkySkipLinkService {
|
|
15
|
+
constructor(dynamicComponentService) {
|
|
16
|
+
this.dynamicComponentService = dynamicComponentService;
|
|
17
|
+
}
|
|
18
|
+
setSkipLinks(args) {
|
|
19
|
+
args.links = args.links.filter((link) => {
|
|
20
|
+
const elementRefExists = link.elementRef;
|
|
21
|
+
return elementRefExists;
|
|
22
|
+
});
|
|
23
|
+
// Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
const host = this.createHostComponent();
|
|
26
|
+
host.instance.links = args.links;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
removeHostComponent() {
|
|
30
|
+
this.dynamicComponentService.removeComponent(SkySkipLinkService.host);
|
|
31
|
+
SkySkipLinkService.host = undefined;
|
|
32
|
+
}
|
|
33
|
+
createHostComponent() {
|
|
34
|
+
if (!SkySkipLinkService.host) {
|
|
35
|
+
const componentRef = this.dynamicComponentService.createComponent(SkySkipLinkHostComponent, {
|
|
36
|
+
location: SkyDynamicComponentLocation.BodyTop,
|
|
37
|
+
});
|
|
38
|
+
SkySkipLinkService.host = componentRef;
|
|
39
|
+
}
|
|
40
|
+
return SkySkipLinkService.host;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
44
|
+
SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, decorators: [{
|
|
46
|
+
type: Injectable,
|
|
47
|
+
args: [{
|
|
48
|
+
providedIn: 'root',
|
|
49
|
+
}]
|
|
50
|
+
}], ctorParameters: function () { return [{ type: i1.SkyDynamicComponentService }]; } });
|
|
51
|
+
//# sourceMappingURL=skip-link.service.js.map
|
|
@@ -0,0 +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;AAEzD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;;;AAEtE;;;;;;;GAOG;AAIH,MAAM,OAAO,kBAAkB;IAG7B,YAAoB,uBAAmD;QAAnD,4BAAuB,GAAvB,uBAAuB,CAA4B;IAAG,CAAC;IAEpE,YAAY,CAAC,IAAqB;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAiB,EAAE,EAAE;YACnD,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC;YACzC,OAAO,gBAAgB,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,4FAA4F;QAC5F,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,mBAAmB;QACxB,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACtE,kBAAkB,CAAC,IAAI,GAAG,SAAS,CAAC;IACtC,CAAC;IAEO,mBAAmB;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE;YAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAC/D,wBAAwB,EACxB;gBACE,QAAQ,EAAE,2BAA2B,CAAC,OAAO;aAC9C,CACF,CAAC;YAEF,kBAAkB,CAAC,IAAI,GAAG,YAAY,CAAC;SACxC;QAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;IACjC,CAAC;;gHApCU,kBAAkB;oHAAlB,kBAAkB,cAFjB,MAAM;4FAEP,kBAAkB;kBAH9B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { ComponentRef, Injectable } from '@angular/core';\n\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\n\nimport { SkySkipLinkArgs } from './skip-link-args';\n\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/esm2015/skyux-a11y.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
|
-
export * from './
|
|
5
|
-
//# sourceMappingURL=
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=skyux-a11y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skyux-a11y.js","sourceRoot":"","sources":["../../../../../libs/components/a11y/src/skyux-a11y.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
|
package/fesm2015/skyux-a11y.js
CHANGED
|
@@ -28,16 +28,16 @@ class SkyA11yResourcesProvider {
|
|
|
28
28
|
*/
|
|
29
29
|
class SkyA11yResourcesModule {
|
|
30
30
|
}
|
|
31
|
-
SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
32
|
-
SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
33
|
-
SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
31
|
+
SkyA11yResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32
|
+
SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
|
|
33
|
+
SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, providers: [
|
|
34
34
|
{
|
|
35
35
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
36
36
|
useClass: SkyA11yResourcesProvider,
|
|
37
37
|
multi: true,
|
|
38
38
|
},
|
|
39
39
|
], imports: [SkyI18nModule] });
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyA11yResourcesModule, decorators: [{
|
|
41
41
|
type: NgModule,
|
|
42
42
|
args: [{
|
|
43
43
|
exports: [SkyI18nModule],
|
|
@@ -66,9 +66,9 @@ class SkySkipLinkAdapterService {
|
|
|
66
66
|
targetElement.focus();
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
70
|
-
SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
69
|
+
SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
70
|
+
SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
|
|
72
72
|
type: Injectable
|
|
73
73
|
}], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
|
|
74
74
|
|
|
@@ -88,9 +88,9 @@ class SkySkipLinkHostComponent {
|
|
|
88
88
|
this.adapter.skipTo(link);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
92
|
-
SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
91
|
+
SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
92
|
+
SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
|
|
94
94
|
type: Component,
|
|
95
95
|
args: [{
|
|
96
96
|
selector: 'sky-skip-link-host',
|
|
@@ -106,10 +106,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
|
|
|
106
106
|
*/
|
|
107
107
|
class SkySkipLinkModule {
|
|
108
108
|
}
|
|
109
|
-
SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
110
|
-
SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
111
|
-
SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
109
|
+
SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
110
|
+
SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
|
|
111
|
+
SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkModule, decorators: [{
|
|
113
113
|
type: NgModule,
|
|
114
114
|
args: [{
|
|
115
115
|
entryComponents: [SkySkipLinkHostComponent],
|
|
@@ -155,9 +155,9 @@ class SkySkipLinkService {
|
|
|
155
155
|
return SkySkipLinkService.host;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
159
|
-
SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
158
|
+
SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
159
|
+
SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySkipLinkService, decorators: [{
|
|
161
161
|
type: Injectable,
|
|
162
162
|
args: [{
|
|
163
163
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-a11y.js","sources":["
|
|
1
|
+
{"version":3,"file":"skyux-a11y.js","sources":["../../../../../libs/components/a11y/src/lib/modules/skip-link/skip-link-args.ts","../../../../../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":["//#region imports\n\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","/**\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 */\n\nimport { NgModule } from '@angular/core';\nimport {\n getLibStringForLocale,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n SKY_LIB_RESOURCES_PROVIDERS,\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';\n\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 ChangeDetectorRef,\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\n\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 { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\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';\n\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\n\nimport { SkySkipLinkArgs } from './skip-link-args';\n\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;;ACAA;;;;;;AAiBA,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,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,EAAE,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAClC,CAAC,CAAC;KACJ;IAEM,mBAAmB;QACxB,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACtE,kBAAkB,CAAC,IAAI,GAAG,SAAS,CAAC;KACrC;IAEO,mBAAmB;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE;YAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAC/D,wBAAwB,EACxB;gBACE,QAAQ,EAAE,2BAA2B,CAAC,OAAO;aAC9C,CACF,CAAC;YAEF,kBAAkB,CAAC,IAAI,GAAG,YAAY,CAAC;SACxC;QAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;KAChC;;gHApCU,kBAAkB;oHAAlB,kBAAkB,cAFjB,MAAM;4FAEP,kBAAkB;kBAH9B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;ACvBD;;;;;;"}
|
package/index.d.ts
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/a11y",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^12.2.
|
|
6
|
-
"@angular/core": "^12.2.
|
|
7
|
-
"@skyux/core": "
|
|
8
|
-
"@skyux/i18n": "
|
|
5
|
+
"@angular/common": "^12.2.16",
|
|
6
|
+
"@angular/core": "^12.2.16",
|
|
7
|
+
"@skyux/core": "5.5.0",
|
|
8
|
+
"@skyux/i18n": "5.5.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"tslib": "^2.3.1"
|
|
12
12
|
},
|
|
13
|
+
"author": "Blackbaud, Inc.",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"blackbaud",
|
|
16
|
+
"skyux"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/blackbaud/skyux.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/blackbaud/skyux/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/blackbaud/skyux#readme",
|
|
13
27
|
"main": "bundles/skyux-a11y.umd.js",
|
|
14
28
|
"module": "fesm2015/skyux-a11y.js",
|
|
15
29
|
"es2015": "fesm2015/skyux-a11y.js",
|
package/skyux-a11y.d.ts
CHANGED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Blackbaud
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-a11y.umd.js","sources":["../../../projects/a11y/src/modules/shared/a11y-resources.module.ts","../../../projects/a11y/src/modules/skip-link/skip-link-adapter.service.ts","../../../projects/a11y/src/modules/skip-link/skip-link-host.component.ts","../../../projects/a11y/src/modules/skip-link/skip-link-host.component.html","../../../projects/a11y/src/modules/skip-link/skip-link.module.ts","../../../projects/a11y/src/modules/skip-link/skip-link.service.ts","../../../projects/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 */\n\nimport { NgModule } from '@angular/core';\nimport {\n getLibStringForLocale,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n SKY_LIB_RESOURCES_PROVIDERS,\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';\n\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 ChangeDetectorRef,\n ChangeDetectionStrategy,\n Component,\n} from '@angular/core';\n\nimport { SkySkipLink } from './skip-link';\n\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 { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\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';\n\nimport {\n SkyDynamicComponentLocation,\n SkyDynamicComponentService,\n} from '@skyux/core';\n\nimport { SkySkipLink } from './skip-link';\n\nimport { SkySkipLinkArgs } from './skip-link-args';\n\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 './public-api';\n"],"names":["getLibStringForLocale","SkyI18nModule","SKY_LIB_RESOURCES_PROVIDERS","NgModule","Injectable","Component","ChangeDetectionStrategy","CommonModule","SkyDynamicComponent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
* The contents of this file were automatically generated by
|
|
4
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.
|
|
5
|
-
* To update this file, simply rerun the command.
|
|
6
|
-
*/
|
|
7
|
-
import { NgModule } from '@angular/core';
|
|
8
|
-
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS, } 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: "12.2.13", ngImport: i0, type: SkyA11yResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
24
|
-
SkyA11yResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyA11yResourcesModule, exports: [SkyI18nModule] });
|
|
25
|
-
SkyA11yResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", 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: "12.2.13", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYTExeS1yZXNvdXJjZXMubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYTExeS9zcmMvbW9kdWxlcy9zaGFyZWQvYTExeS1yZXNvdXJjZXMubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7OztHQUtHO0FBRUgsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQ0wscUJBQXFCLEVBRXJCLGFBQWEsRUFHYiwyQkFBMkIsR0FDNUIsTUFBTSxhQUFhLENBQUM7O0FBRXJCLE1BQU0sU0FBUyxHQUEwQztJQUN2RCxPQUFPLEVBQUUsRUFBRSx1QkFBdUIsRUFBRSxFQUFFLE9BQU8sRUFBRSxhQUFhLEVBQUUsRUFBRTtDQUNqRSxDQUFDO0FBRUYsTUFBTSxPQUFPLHdCQUF3QjtJQUM1QixTQUFTLENBQUMsVUFBNEIsRUFBRSxJQUFZO1FBQ3pELE9BQU8scUJBQXFCLENBQUMsU0FBUyxFQUFFLFVBQVUsQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDbkUsQ0FBQztDQUNGO0FBRUQ7O0dBRUc7QUFXSCxNQUFNLE9BQU8sc0JBQXNCOztvSEFBdEIsc0JBQXNCO3FI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uXG5jb25zdCBSRVNPVVJDRVM6IHsgW2xvY2FsZTogc3RyaW5nXTogU2t5TGliUmVzb3VyY2VzIH0gPSB7XG4gICdFTi1VUyc6IHsgc2t5dXhfbGlzdF9za2lwX3RvX2xpbms6IHsgbWVzc2FnZTogJ1NraXAgdG8gezB9JyB9IH0sXG59O1xuXG5leHBvcnQgY2xhc3MgU2t5QTExeVJlc291cmNlc1Byb3ZpZGVyIGltcGxlbWVudHMgU2t5TGliUmVzb3VyY2VzUHJvdmlkZXIge1xuICBwdWJsaWMgZ2V0U3RyaW5nKGxvY2FsZUluZm86IFNreUFwcExvY2FsZUluZm8sIG5hbWU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgcmV0dXJuIGdldExpYlN0cmluZ0ZvckxvY2FsZShSRVNPVVJDRVMsIGxvY2FsZUluZm8ubG9jYWxlLCBuYW1lKTtcbiAgfVxufVxuXG4vKipcbiAqIEltcG9ydCBpbnRvIGFueSBjb21wb25lbnQgbGlicmFyeSBtb2R1bGUgdGhhdCBuZWVkcyB0byB1c2UgcmVzb3VyY2Ugc3RyaW5ncy5cbiAqL1xuQE5nTW9kdWxlKHtcbiAgZXhwb3J0czogW1NreUkxOG5Nb2R1bGVdLFxuICBwcm92aWRlcnM6IFtcbiAgICB7XG4gICAgICBwcm92aWRlOiBTS1lfTElCX1JFU09VUkNFU19QUk9WSURFUlMsXG4gICAgICB1c2VDbGFzczogU2t5QTExeVJlc291cmNlc1Byb3ZpZGVyLFxuICAgICAgbXVsdGk6IHRydWUsXG4gICAgfSxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgU2t5QTExeVJlc291cmNlc01vZHVsZSB7fVxuIl19
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@skyux/core";
|
|
4
|
-
export class SkySkipLinkAdapterService {
|
|
5
|
-
constructor(windowRef) {
|
|
6
|
-
this.windowRef = windowRef;
|
|
7
|
-
}
|
|
8
|
-
skipTo(link) {
|
|
9
|
-
const targetElement = link.elementRef.nativeElement;
|
|
10
|
-
const win = this.windowRef.nativeWindow;
|
|
11
|
-
const bodyElement = win.document.body;
|
|
12
|
-
const bodyMarginTop = parseInt(win.getComputedStyle(bodyElement).marginTop, 10);
|
|
13
|
-
const bodyDefaultPadding = 10;
|
|
14
|
-
const scrollTop = targetElement.offsetTop - bodyMarginTop - bodyDefaultPadding;
|
|
15
|
-
win.scroll(0, scrollTop);
|
|
16
|
-
targetElement.focus();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
SkySkipLinkAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
20
|
-
SkySkipLinkAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkAdapterService });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkAdapterService, decorators: [{
|
|
22
|
-
type: Injectable
|
|
23
|
-
}], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWFkYXB0ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2ExMXkvc3JjL21vZHVsZXMvc2tpcC1saW5rL3NraXAtbGluay1hZGFwdGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7O0FBTzNDL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2tpcExpbmtBZGFwdGVyU2VydmljZSB7XG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgd2luZG93UmVmOiBTa3lBcHBXaW5kb3dSZWYpIHt9XG5cbiAgcHVibGljIHNraXBUbyhsaW5rOiBTa3lTa2lwTGluayk6IHZvaWQge1xuICAgIGNvbnN0IHRhcmdldEVsZW1lbnQgPSBsaW5rLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudDtcbiAgICBjb25zdCB3aW4gPSB0aGlzLndpbmRvd1JlZi5uYXRpdmVXaW5kb3c7XG4gICAgY29uc3QgYm9keUVsZW1lbnQgPSB3aW4uZG9jdW1lbnQuYm9keTtcblxuICAgIGNvbnN0IGJvZHlNYXJnaW5Ub3AgPSBwYXJzZUludChcbiAgICAgIHdpbi5nZXRDb21wdXRlZFN0eWxlKGJvZHlFbGVtZW50KS5tYXJnaW5Ub3AsXG4gICAgICAxMFxuICAgICk7XG4gICAgY29uc3QgYm9keURlZmF1bHRQYWRkaW5nID0gMTA7XG4gICAgY29uc3Qgc2Nyb2xsVG9wID1cbiAgICAgIHRhcmdldEVsZW1lbnQub2Zmc2V0VG9wIC0gYm9keU1hcmdpblRvcCAtIGJvZHlEZWZhdWx0UGFkZGluZztcblxuICAgIHdpbi5zY3JvbGwoMCwgc2Nyb2xsVG9wKTtcblxuICAgIHRhcmdldEVsZW1lbnQuZm9jdXMoKTtcbiAgfVxufVxuIl19
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
export {};
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWFyZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hMTF5L3NyYy9tb2R1bGVzL3NraXAtbGluay9za2lwLWxpbmstYXJncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxpQkFBaUIiLCJzb3VyY2VzQ29udGVudCI6WyIvLyNyZWdpb24gaW1wb3J0c1xuXG5pbXBvcnQgeyBTa3lTa2lwTGluayB9IGZyb20gJy4vc2tpcC1saW5rJztcblxuLy8jZW5kcmVnaW9uXG5cbi8qKlxuICogT3B0aW9ucyBzcGVjaWZpZWQgd2hlbiBzZXR0aW5nIHRoZSBwYWdlJ3Mgc2tpcCBsaW5rcy5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTa3lTa2lwTGlua0FyZ3Mge1xuICAvKipcbiAgICogVGhlIHNraXAgbGlua3MgdG8gY3JlYXRlLlxuICAgKi9cbiAgbGlua3M6IFNreVNraXBMaW5rW107XG59XG4iXX0=
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, } from '@angular/core';
|
|
2
|
-
import { SkySkipLinkAdapterService } from './skip-link-adapter.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./skip-link-adapter.service";
|
|
5
|
-
import * as i2 from "@angular/common";
|
|
6
|
-
import * as i3 from "@skyux/i18n";
|
|
7
|
-
export class SkySkipLinkHostComponent {
|
|
8
|
-
constructor(changeDetector, adapter) {
|
|
9
|
-
this.changeDetector = changeDetector;
|
|
10
|
-
this.adapter = adapter;
|
|
11
|
-
}
|
|
12
|
-
get links() {
|
|
13
|
-
return this._links;
|
|
14
|
-
}
|
|
15
|
-
set links(value) {
|
|
16
|
-
this._links = value;
|
|
17
|
-
this.changeDetector.markForCheck();
|
|
18
|
-
}
|
|
19
|
-
skipTo(link) {
|
|
20
|
-
this.adapter.skipTo(link);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
SkySkipLinkHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SkySkipLinkAdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
-
SkySkipLinkHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", 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"], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkHostComponent, decorators: [{
|
|
26
|
-
type: Component,
|
|
27
|
-
args: [{
|
|
28
|
-
selector: 'sky-skip-link-host',
|
|
29
|
-
templateUrl: './skip-link-host.component.html',
|
|
30
|
-
styleUrls: ['./skip-link-host.component.scss'],
|
|
31
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
32
|
-
providers: [SkySkipLinkAdapterService],
|
|
33
|
-
}]
|
|
34
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.SkySkipLinkAdapterService }]; } });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLWhvc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYTExeS9zcmMvbW9kdWxlcy9za2lwLWxpbmsvc2t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Bjb250ZW50LlxuICovXG5leHBvcnQgaW50ZXJmYWNlIFNreVNraXBMaW5rIHtcbiAgLyoqXG4gICAqIFRoZSB0aXRsZSBvZiB0aGUgc2tpcCBsaW5rLlxuICAgKi9cbiAgdGl0bGU6IHN0cmluZztcblxuICAvKipcbiAgICogVGhlIGVsZW1lbnQgdG8gc2Nyb2xsIHRvIGFuZCBmb2N1cyB3aGVuIHRoZSBza2lwIGxpbmsgaXMgY2xpY2tlZC4gIFRoaXMgZWxlbWVudCBtdXN0XG4gICAqIGFsbG93IGZvY3VzLCBlaXRoZXIgYnkgc3BjZWNpZnlpbmcgYW4gSFRNTCBlbGVtZW50IHRoYXQgYWxsb3dzIGZvY3VzIGJ5IGRlZmF1bHQgKHN1Y2hcbiAgICogYXMgYSBgYnV0dG9uYCBvciBgYWAgZWxlbWVudCkgb3IgYnkgc2V0dGluZyBgdGFiaW5kZXg9XCItMVwiIG9uIHRoZSBzcGVjaWZpZWQgZWxlbWVudC5cbiAgICovXG4gIGVsZW1lbnRSZWY6IEVsZW1lbnRSZWY7XG59XG4iXX0=
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { SkyI18nModule } from '@skyux/i18n';
|
|
4
|
-
import { SkyA11yResourcesModule } from '../shared/a11y-resources.module';
|
|
5
|
-
import { SkySkipLinkHostComponent } from './skip-link-host.component';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* The Angular module that enables "skip links" to be added to the page.
|
|
9
|
-
*/
|
|
10
|
-
export class SkySkipLinkModule {
|
|
11
|
-
}
|
|
12
|
-
SkySkipLinkModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
-
SkySkipLinkModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule] });
|
|
14
|
-
SkySkipLinkModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkModule, imports: [[CommonModule, SkyI18nModule, SkyA11yResourcesModule]] });
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkModule, decorators: [{
|
|
16
|
-
type: NgModule,
|
|
17
|
-
args: [{
|
|
18
|
-
entryComponents: [SkySkipLinkHostComponent],
|
|
19
|
-
declarations: [SkySkipLinkHostComponent],
|
|
20
|
-
imports: [CommonModule, SkyI18nModule, SkyA11yResourcesModule],
|
|
21
|
-
}]
|
|
22
|
-
}] });
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2ExMXkvc3JjL21vZHVsZXMvc2tpcC1saW5rL3NraXAtbGluay5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFL0MsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUU1QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUV6RSxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQzs7QUFFdEU7O0dBRUc7QUFNSCxNQUFNLE9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bmVudF0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsIFNreUkxOG5Nb2R1bGUsIFNreUExMXlSZXNvdXJjZXNNb2R1bGVdLFxufSlcbmV4cG9ydCBjbGFzcyBTa3lTa2lwTGlua01vZHVsZSB7fVxuIl19
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { SkyDynamicComponentLocation, } from '@skyux/core';
|
|
3
|
-
import { SkySkipLinkHostComponent } from './skip-link-host.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@skyux/core";
|
|
6
|
-
/**
|
|
7
|
-
* An Angular service that adds "skip links" to the page. Skip links will only be displayed
|
|
8
|
-
* when the page initially loads and the user presses the Tab key, in which case the first link will
|
|
9
|
-
* be displayed and focused. Clicking the button will skip to the specified element. Pressing
|
|
10
|
-
* the Tab key again will move to the next skip link if more than one skip link is specified;
|
|
11
|
-
* otherwise, focus will move to the first focusable element on the page.
|
|
12
|
-
* @dynamic
|
|
13
|
-
*/
|
|
14
|
-
export class SkySkipLinkService {
|
|
15
|
-
constructor(dynamicComponentService) {
|
|
16
|
-
this.dynamicComponentService = dynamicComponentService;
|
|
17
|
-
}
|
|
18
|
-
setSkipLinks(args) {
|
|
19
|
-
args.links = args.links.filter((link) => {
|
|
20
|
-
const elementRefExists = link.elementRef;
|
|
21
|
-
return elementRefExists;
|
|
22
|
-
});
|
|
23
|
-
// Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
const host = this.createHostComponent();
|
|
26
|
-
host.instance.links = args.links;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
removeHostComponent() {
|
|
30
|
-
this.dynamicComponentService.removeComponent(SkySkipLinkService.host);
|
|
31
|
-
SkySkipLinkService.host = undefined;
|
|
32
|
-
}
|
|
33
|
-
createHostComponent() {
|
|
34
|
-
if (!SkySkipLinkService.host) {
|
|
35
|
-
const componentRef = this.dynamicComponentService.createComponent(SkySkipLinkHostComponent, {
|
|
36
|
-
location: SkyDynamicComponentLocation.BodyTop,
|
|
37
|
-
});
|
|
38
|
-
SkySkipLinkService.host = componentRef;
|
|
39
|
-
}
|
|
40
|
-
return SkySkipLinkService.host;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
SkySkipLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkService, deps: [{ token: i1.SkyDynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
44
|
-
SkySkipLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkService, providedIn: 'root' });
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkySkipLinkService, decorators: [{
|
|
46
|
-
type: Injectable,
|
|
47
|
-
args: [{
|
|
48
|
-
providedIn: 'root',
|
|
49
|
-
}]
|
|
50
|
-
}], ctorParameters: function () { return [{ type: i1.SkyDynamicComponentService }]; } });
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hMTF5L3NyYy9tb2R1bGVzL3NraXAtbGluay9za2lwLWxpbmsuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQWdCLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6RCxPQUFPLEVBQ0wsMkJBQTJCLEdBRTVCLE1BQU0sYUFBYSxDQUFDO0FBTXJCLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDOzs7QUFFdEU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gICB9KTtcbiAgfVxuXG4gIHB1YmxpYyByZW1vdmVIb3N0Q29tcG9uZW50KCk6IHZvaWQge1xuICAgIHRoaXMuZHluYW1pY0NvbXBvbmVudFNlcnZpY2UucmVtb3ZlQ29tcG9uZW50KFNreVNraXBMaW5rU2VydmljZS5ob3N0KTtcbiAgICBTa3lTa2lwTGlua1NlcnZpY2UuaG9zdCA9IHVuZGVmaW5lZDtcbiAgfVxuXG4gIHByaXZhdGUgY3JlYXRlSG9zdENvbXBvbmVudCgpOiBDb21wb25lbnRSZWY8U2t5U2tpcExpbmtIb3N0Q29tcG9uZW50PiB7XG4gICAgaWYgKCFTa3lTa2lwTGlua1NlcnZpY2UuaG9zdCkge1xuICAgICAgY29uc3QgY29tcG9uZW50UmVmID0gdGhpcy5keW5hbWljQ29tcG9uZW50U2VydmljZS5jcmVhdGVDb21wb25lbnQoXG4gICAgICAgIFNreVNraXBMaW5rSG9zdENvbXBvbmVudCxcbiAgICAgICAge1xuICAgICAgICAgIGxvY2F0aW9uOiBTa3lEeW5hbWljQ29tcG9uZW50TG9jYXRpb24uQm9keVRvcCxcbiAgICAgICAgfVxuICAgICAgKTtcblxuICAgICAgU2t5U2tpcExpbmtTZXJ2aWNlLmhvc3QgPSBjb21wb25lbnRSZWY7XG4gICAgfVxuXG4gICAgcmV0dXJuIFNreVNraXBMaW5rU2VydmljZS5ob3N0O1xuICB9XG59XG4iXX0=
|
package/esm2015/public-api.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from './modules/skip-link/skip-link-args';
|
|
2
|
-
export * from './modules/skip-link/skip-link.module';
|
|
3
|
-
export * from './modules/skip-link/skip-link.service';
|
|
4
|
-
export * from './modules/skip-link/skip-link';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2ExMXkvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxvQ0FBb0MsQ0FBQztBQUNuRCxjQUFjLHNDQUFzQyxDQUFDO0FBQ3JELGNBQWMsdUNBQXVDLENBQUM7QUFDdEQsY0FBYywrQkFBK0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbW9kdWxlcy9za2lwLWxpbmsvc2tpcC1saW5rLWFyZ3MnO1xuZXhwb3J0ICogZnJvbSAnLi9tb2R1bGVzL3NraXAtbGluay9za2lwLWxpbmsubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbW9kdWxlcy9za2lwLWxpbmsvc2tpcC1saW5rLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9tb2R1bGVzL3NraXAtbGluay9za2lwLWxpbmsnO1xuIl19
|
package/public-api.d.ts
DELETED