@skyux/a11y 5.6.2 → 5.7.2

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.
@@ -30,7 +30,7 @@
30
30
  /**
31
31
  * NOTICE: DO NOT MODIFY THIS FILE!
32
32
  * The contents of this file were automatically generated by
33
- * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.
33
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
34
34
  * To update this file, simply rerun the command.
35
35
  */
36
36
  var RESOURCES = {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * NOTICE: DO NOT MODIFY THIS FILE!
3
3
  * The contents of this file were automatically generated by
4
- * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.
4
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
5
5
  * To update this file, simply rerun the command.
6
6
  */
7
7
  import { NgModule } from '@angular/core';
@@ -42,4 +42,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
42
42
  ],
43
43
  }]
44
44
  }] });
45
- //# sourceMappingURL=a11y-resources.module.js.map
45
+ //# sourceMappingURL=sky-a11y-resources.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sky-a11y-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/a11y/src/lib/modules/shared/sky-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,CACd,UAA4B,EAC5B,IAAY;QAEZ,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 lib/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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\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,7 +1,7 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import { NgModule } from '@angular/core';
3
3
  import { SkyI18nModule } from '@skyux/i18n';
4
- import { SkyA11yResourcesModule } from '../shared/a11y-resources.module';
4
+ import { SkyA11yResourcesModule } from '../shared/sky-a11y-resources.module';
5
5
  import { SkySkipLinkHostComponent } from './skip-link-host.component';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
@@ -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,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
+ {"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,qCAAqC,CAAC;AAE7E,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/sky-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"]}
@@ -10,7 +10,7 @@ import { SkyDynamicComponentLocation } from '@skyux/core';
10
10
  /**
11
11
  * NOTICE: DO NOT MODIFY THIS FILE!
12
12
  * The contents of this file were automatically generated by
13
- * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-a11y' schematic.
13
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-a11y' schematic.
14
14
  * To update this file, simply rerun the command.
15
15
  */
16
16
  const RESOURCES = {
@@ -1 +1 @@
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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D;;;ACLD;;;;;;;;MAWa,kBAAkB;IAG7B,YAAoB,uBAAmD;QAAnD,4BAAuB,GAAvB,uBAAuB,CAA4B;KAAI;IAEpE,YAAY,CAAC,IAAqB;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAiB;YAC/C,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC;YACzC,OAAO,gBAAgB,CAAC;SACzB,CAAC,CAAC;;QAGH,UAAU,CAAC;YACT,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,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;;;ACpBD;;;;;;"}
1
+ {"version":3,"file":"skyux-a11y.js","sources":["../../../../../libs/components/a11y/src/lib/modules/shared/sky-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 lib/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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\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/sky-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,CACd,UAA4B,EAC5B,IAAY;QAEZ,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;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;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;;;ACpBD;;;;;;"}
@@ -2,7 +2,7 @@ import { SkyAppLocaleInfo, SkyLibResourcesProvider } from '@skyux/i18n';
2
2
  import * as i0 from "@angular/core";
3
3
  import * as i1 from "@skyux/i18n";
4
4
  export declare class SkyA11yResourcesProvider implements SkyLibResourcesProvider {
5
- getString(localeInfo: SkyAppLocaleInfo, name: string): string;
5
+ getString(localeInfo: SkyAppLocaleInfo, name: string): string | undefined;
6
6
  }
7
7
  /**
8
8
  * Import into any component library module that needs to use resource strings.
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./skip-link-host.component";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "@skyux/i18n";
5
- import * as i4 from "../shared/a11y-resources.module";
5
+ import * as i4 from "../shared/sky-a11y-resources.module";
6
6
  /**
7
7
  * The Angular module that enables "skip links" to be added to the page.
8
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/a11y",
3
- "version": "5.6.2",
3
+ "version": "5.7.2",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -18,8 +18,8 @@
18
18
  "peerDependencies": {
19
19
  "@angular/common": "^12.2.16",
20
20
  "@angular/core": "^12.2.16",
21
- "@skyux/core": "5.6.2",
22
- "@skyux/i18n": "5.6.2"
21
+ "@skyux/core": "5.7.2",
22
+ "@skyux/i18n": "5.7.2"
23
23
  },
24
24
  "dependencies": {
25
25
  "tslib": "^2.3.1"
@@ -1 +0,0 @@
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"]}