@skyux/errors 5.0.0-beta.1 → 5.0.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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/bundles/skyux-errors-testing.umd.js +8 -4
  3. package/bundles/skyux-errors-testing.umd.js.map +1 -1
  4. package/bundles/skyux-errors.umd.js +191 -346
  5. package/bundles/skyux-errors.umd.js.map +1 -1
  6. package/documentation.json +1187 -0
  7. package/esm2015/modules/error/error-action.component.js +13 -11
  8. package/esm2015/modules/error/error-description.component.js +15 -14
  9. package/esm2015/modules/error/error-image.component.js +13 -11
  10. package/esm2015/modules/error/error-modal-config.js +1 -1
  11. package/esm2015/modules/error/error-modal-form.component.js +16 -18
  12. package/esm2015/modules/error/error-modal.service.js +11 -15
  13. package/esm2015/modules/error/error-title.component.js +15 -14
  14. package/esm2015/modules/error/error-type.js +2 -1
  15. package/esm2015/modules/error/error.component.js +26 -28
  16. package/esm2015/modules/error/error.module.js +48 -31
  17. package/esm2015/modules/shared/sky-errors-resources.module.js +41 -0
  18. package/esm2015/public-api.js +12 -0
  19. package/esm2015/skyux-errors.js +2 -10
  20. package/esm2015/testing/error-fixture.js +1 -1
  21. package/esm2015/testing/public-api.js +2 -0
  22. package/esm2015/testing/skyux-errors-testing.js +2 -2
  23. package/fesm2015/skyux-errors-testing.js.map +1 -1
  24. package/fesm2015/skyux-errors.js +180 -139
  25. package/fesm2015/skyux-errors.js.map +1 -1
  26. package/modules/error/error-action.component.d.ts +3 -0
  27. package/modules/error/error-description.component.d.ts +3 -0
  28. package/modules/error/error-image.component.d.ts +3 -0
  29. package/modules/error/error-modal-form.component.d.ts +3 -0
  30. package/modules/error/error-modal.service.d.ts +3 -0
  31. package/modules/error/error-title.component.d.ts +3 -0
  32. package/modules/error/error.component.d.ts +3 -0
  33. package/modules/error/error.module.d.ts +13 -0
  34. package/modules/shared/sky-errors-resources.module.d.ts +14 -0
  35. package/package.json +8 -23
  36. package/public-api.d.ts +9 -0
  37. package/skyux-errors.d.ts +2 -9
  38. package/testing/package.json +2 -5
  39. package/testing/{public_api.d.ts → public-api.d.ts} +0 -0
  40. package/testing/skyux-errors-testing.d.ts +2 -1
  41. package/CHANGELOG.md +0 -69
  42. package/bundles/skyux-errors-testing.umd.min.js +0 -2
  43. package/bundles/skyux-errors-testing.umd.min.js.map +0 -1
  44. package/bundles/skyux-errors.umd.min.js +0 -16
  45. package/bundles/skyux-errors.umd.min.js.map +0 -1
  46. package/esm2015/modules/shared/errors-resources.module.js +0 -17
  47. package/esm2015/plugin-resources/errors-resources-provider.js +0 -16
  48. package/esm2015/public_api.js +0 -4
  49. package/esm2015/testing/public_api.js +0 -2
  50. package/esm5/modules/error/error-action.component.js +0 -19
  51. package/esm5/modules/error/error-description.component.js +0 -27
  52. package/esm5/modules/error/error-image.component.js +0 -18
  53. package/esm5/modules/error/error-modal-config.js +0 -8
  54. package/esm5/modules/error/error-modal-form.component.js +0 -27
  55. package/esm5/modules/error/error-modal.service.js +0 -37
  56. package/esm5/modules/error/error-title.component.js +0 -27
  57. package/esm5/modules/error/error-type.js +0 -1
  58. package/esm5/modules/error/error.component.js +0 -102
  59. package/esm5/modules/error/error.module.js +0 -46
  60. package/esm5/modules/shared/errors-resources.module.js +0 -20
  61. package/esm5/plugin-resources/errors-resources-provider.js +0 -17
  62. package/esm5/public_api.js +0 -4
  63. package/esm5/skyux-errors.js +0 -13
  64. package/esm5/testing/error-fixture.js +0 -36
  65. package/esm5/testing/public_api.js +0 -2
  66. package/esm5/testing/skyux-errors-testing.js +0 -5
  67. package/fesm5/skyux-errors-testing.js +0 -42
  68. package/fesm5/skyux-errors-testing.js.map +0 -1
  69. package/fesm5/skyux-errors.js +0 -307
  70. package/fesm5/skyux-errors.js.map +0 -1
  71. package/modules/shared/errors-resources.module.d.ts +0 -2
  72. package/plugin-resources/errors-resources-provider.d.ts +0 -5
  73. package/public_api.d.ts +0 -4
  74. package/skyux-errors.metadata.json +0 -1
  75. package/src/assets/img/guidelines/error/error-anatomy.png +0 -0
  76. package/src/assets/img/guidelines/error/error-option-broken.png +0 -0
  77. package/src/assets/img/guidelines/error/error-option-construction.png +0 -0
  78. package/src/assets/img/guidelines/error/error-option-notfound.png +0 -0
  79. package/src/assets/img/guidelines/error/error-option-security.png +0 -0
  80. package/src/assets/img/guidelines/error/error-usage-1.png +0 -0
  81. package/src/assets/img/guidelines/error/error-usage-2.png +0 -0
  82. package/src/assets/img/guidelines/error/error-usage-3.png +0 -0
  83. package/src/assets/img/guidelines/error/error-usage-4.png +0 -0
  84. package/src/assets/img/guidelines/error/error-usage-5.png +0 -0
  85. package/src/assets/img/guidelines/error/error-usage-6.png +0 -0
  86. package/src/assets/img/guidelines/error/error-usage-7.png +0 -0
  87. package/src/assets/img/guidelines/error/error-usage-8.png +0 -0
  88. package/src/assets/locales/resources_en_US.json +0 -34
  89. package/testing/skyux-errors-testing.metadata.json +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-errors.js","sources":["ng://@skyux/errors/modules/error/error-modal-config.ts","ng://@skyux/errors/modules/error/error-modal-form.component.ts","ng://@skyux/errors/modules/error/error-modal.service.ts","ng://@skyux/errors/plugin-resources/errors-resources-provider.ts","ng://@skyux/errors/modules/shared/errors-resources.module.ts","ng://@skyux/errors/modules/error/error-title.component.ts","ng://@skyux/errors/modules/error/error-description.component.ts","ng://@skyux/errors/modules/error/error.component.ts","ng://@skyux/errors/modules/error/error-image.component.ts","ng://@skyux/errors/modules/error/error-action.component.ts","ng://@skyux/errors/modules/error/error.module.ts","ng://@skyux/errors/skyux-errors.ts"],"sourcesContent":["/* istanbul ignore next */\nexport class ErrorModalConfig {\n /**\n * Specifies a title to display in the modal error message.\n * @required\n */\n public errorTitle: string;\n /**\n * Specifies a description to provide additional details in the modal error message.\n * @required\n */\n public errorDescription: string;\n /**\n * Specifies a label for the action button that closes the modal error message.\n * @required\n */\n public errorCloseText: string;\n}\n","import {\n Component\n} from '@angular/core';\n\nimport {\n SkyModalInstance\n} from '@skyux/modals';\n\nimport {\n ErrorModalConfig\n} from './error-modal-config';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-error-modal-form',\n templateUrl: './error-modal-form.component.html',\n styleUrls: ['./error-modal-form.component.scss']\n})\nexport class SkyErrorModalFormComponent {\n constructor(\n public context: ErrorModalConfig,\n public instance: SkyModalInstance) {}\n}\n","import {\n Injectable\n} from '@angular/core';\n\nimport {\n SkyModalService\n} from '@skyux/modals';\n\nimport {\n ErrorModalConfig\n} from './error-modal-config';\n\nimport {\n SkyErrorModalFormComponent\n} from './error-modal-form.component';\n\n/**\n * Opens a modal to display a SKY UX-themed error message.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class SkyErrorModalService {\n constructor(\n private modal: SkyModalService\n ) { }\n/**\n * Specifies text for the the error message, including title, description, and action label.\n */\n public open(config: ErrorModalConfig) {\n const providers = [{ provide: ErrorModalConfig, useValue: config }];\n\n this.modal.open(SkyErrorModalFormComponent, {\n ariaRole: 'alertdialog',\n providers: providers\n });\n }\n}\n","\nimport {\n Injectable\n} from '@angular/core';\n\nimport {\n getStringForLocale,\n SkyAppLocaleInfo,\n SkyLibResourcesProvider\n} from '@skyux/i18n';\n\n@Injectable()\nexport class SkyErrorsResourcesProvider implements SkyLibResourcesProvider {\n private resources: any = {\"EN-US\":{\"skyux_errors_broken_description\":\"Something went wrong.\\nTry again or come back later.\",\"skyux_errors_broken_title\":\"That's odd...\",\"skyux_errors_construction_description\":\"We appreciate your patience while we\\nmake improvements.\",\"skyux_errors_construction_title\":\"Work in progress.\",\"skyux_errors_not_found_description\":\"Pardon us, but this page\\nis missing or has moved.\",\"skyux_errors_not_found_title\":\"Nothing to see here.\",\"skyux_errors_security_description\":\"Ask your administrator for access.\",\"skyux_errors_security_title\":\"Heads up!\\nYou're in a restricted area.\"}};\n\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getStringForLocale(this.resources, localeInfo.locale, name);\n }\n}\n","import {\n NgModule\n} from '@angular/core';\n\nimport {\n SKY_LIB_RESOURCES_PROVIDERS\n} from '@skyux/i18n';\n\nimport {\n SkyErrorsResourcesProvider\n} from '../../plugin-resources/errors-resources-provider';\n\n@NgModule({\n providers: [{\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyErrorsResourcesProvider,\n multi: true\n }]\n})\nexport class SkyErrorsResourcesModule { }\n","import {\n Component,\n Input\n} from '@angular/core';\n\n/**\n * Specifies a title to display in the error message.\n */\n@Component({\n selector: 'sky-error-title',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorTitleComponent {\n/**\n * Indicates whether to replace the default title. If `false`, the title\n * from this component is added after the default title.\n * @default false\n */\n @Input()\n public replaceDefaultTitle: boolean = false;\n}\n","import {\n Component,\n Input\n} from '@angular/core';\n\n/**\n * Specifies a description to provide additional details in the error message.\n */\n@Component({\n selector: 'sky-error-description',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorDescriptionComponent {\n/**\n * Indicates whether to replace the default description. If `false`, the description\n * from this component is added after the default description.\n * @default false\n */\n @Input()\n public replaceDefaultDescription: boolean = false;\n}\n","import {\n Component,\n Input,\n OnInit,\n ContentChild\n} from '@angular/core';\n\nimport {\n SkyLibResourcesService\n} from '@skyux/i18n';\n\nimport {\n SkyErrorTitleComponent\n} from './error-title.component';\n\nimport {\n SkyErrorDescriptionComponent\n} from './error-description.component';\n\nimport {\n SkyErrorType\n} from './error-type';\n\n/**\n * Displays a SKY UX-themed error message.\n */\n@Component({\n selector: 'sky-error',\n styleUrls: ['./error.component.scss'],\n templateUrl: './error.component.html'\n})\nexport class SkyErrorComponent implements OnInit {\n/**\n * Specifies an error type to use a set of pre-defined values for the image,\n * title, and description. The valid options are `'broken'`, `'construction'`,\n * `'notfound'`, and `'security'`.\n */\n @Input()\n public set errorType(value: SkyErrorType) {\n this._errorType = value;\n this.setErrorTypeFields();\n }\n\n public get errorType() {\n return this._errorType;\n }\n\n/**\n * Indicates whether to display the error image.\n * @default true\n */\n @Input()\n public showImage: boolean = true;\n\n public title: string = undefined;\n public description: string = undefined;\n\n public get showTitle(): boolean {\n return this.title && !(this.titleCmp && this.titleCmp.replaceDefaultTitle);\n }\n\n public get showDescription(): boolean {\n return this.description && !(this.descriptionCmp && this.descriptionCmp.replaceDefaultDescription);\n }\n\n @ContentChild(SkyErrorTitleComponent)\n private titleCmp: SkyErrorTitleComponent;\n\n @ContentChild(SkyErrorDescriptionComponent)\n private descriptionCmp: SkyErrorDescriptionComponent;\n\n private _errorType: SkyErrorType;\n\n constructor(\n private resourcesService: SkyLibResourcesService\n ) { }\n\n public ngOnInit() {\n if (this.errorType) {\n this.setErrorTypeFields();\n }\n }\n\n public setErrorTypeFields() {\n if (this.errorType.toLowerCase() === 'broken') {\n this.title = this.getString('skyux_errors_broken_title');\n this.description = this.getString('skyux_errors_broken_description');\n\n } else if (this.errorType.toLowerCase() === 'notfound') {\n this.title = this.getString('skyux_errors_not_found_title');\n this.description = this.getString('skyux_errors_not_found_description');\n\n } else if (this.errorType.toLowerCase() === 'construction') {\n this.title = this.getString('skyux_errors_construction_title');\n this.description = this.getString('skyux_errors_construction_description');\n\n } else if (this.errorType.toLowerCase() === 'security') {\n this.title = this.getString('skyux_errors_security_title');\n this.description = this.getString('skyux_errors_security_description');\n }\n }\n\n private getString(key: string): string {\n // TODO: Need to implement the async `getString` method in a breaking change.\n return this.resourcesService.getStringForLocale(\n { locale: 'en-US' },\n key\n );\n }\n}\n","import {\n Component\n} from '@angular/core';\n\n/**\n * Specifies an image to display in the error message.\n */\n@Component({\n selector: 'sky-error-image',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorImageComponent {\n}\n","import {\n Component\n} from '@angular/core';\n\n/**\n * Specifies an action to include in the error message.\n * For example, you can include a button to reload the page or to refresh data.\n */\n@Component({\n selector: 'sky-error-action',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorActionComponent {\n}\n","import {\n NgModule\n} from '@angular/core';\n\nimport {\n CommonModule\n} from '@angular/common';\n\nimport {\n SkyModalModule\n} from '@skyux/modals';\n\nimport {\n SkyErrorsResourcesModule\n} from '../shared/errors-resources.module';\n\nimport {\n SkyErrorComponent\n} from './error.component';\n\nimport {\n SkyErrorImageComponent\n} from './error-image.component';\n\nimport {\n SkyErrorTitleComponent\n} from './error-title.component';\n\nimport {\n SkyErrorDescriptionComponent\n} from './error-description.component';\n\nimport {\n SkyErrorActionComponent\n} from './error-action.component';\n\nimport {\n SkyErrorModalFormComponent\n} from './error-modal-form.component';\n\n@NgModule({\n declarations: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n SkyErrorModalFormComponent\n ],\n imports: [\n CommonModule,\n SkyErrorsResourcesModule,\n SkyModalModule\n ],\n exports: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n SkyErrorModalFormComponent\n ],\n entryComponents: [\n SkyErrorModalFormComponent\n ]\n})\nexport class SkyErrorModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {SkyErrorActionComponent as ɵe} from './modules/error/error-action.component';\nexport {SkyErrorDescriptionComponent as ɵc} from './modules/error/error-description.component';\nexport {SkyErrorImageComponent as ɵd} from './modules/error/error-image.component';\nexport {SkyErrorModalFormComponent as ɵf} from './modules/error/error-modal-form.component';\nexport {SkyErrorTitleComponent as ɵb} from './modules/error/error-title.component';\nexport {SkyErrorComponent as ɵa} from './modules/error/error.component';\nexport {SkyErrorsResourcesModule as ɵg} from './modules/shared/errors-resources.module';\nexport {SkyErrorsResourcesProvider as ɵh} from './plugin-resources/errors-resources-provider';"],"names":[],"mappings":";;;;;;AAAA;MACa,gBAAgB;;;ACW7B;;;IAQa,0BAA0B,GAAvC,MAAa,0BAA0B;IACrC,YACS,OAAyB,EACzB,QAA0B;QAD1B,YAAO,GAAP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BAAkB,CAC7C,EAAE,MAAM,EAAE,OAAO,EAAE,EACnB,GAAG,CACJ,CAAC;KACH;EACF;;YAnC6B,sBAAsB;;AApClD;IADC,KAAK,EAAE;kDAIP;AAWD;IADC,KAAK,EAAE;oDACyB;AAcjC;IADC,YAAY,CAAC,sBAAsB,CAAC;mDACI;AAGzC;IADC,YAAY,CAAC,4BAA4B,CAAC;yDACU;AAtC1C,iBAAiB;IAL7B,SAAS,CAAC;QACT,QAAQ,EAAE,WAAW;QAErB,s/BAAqC;;KACtC,CAAC;GACW,iBAAiB,CA8E7B;;ACzGD;;;IAOa,sBAAsB,GAAnC,MAAa,sBAAsB;EAClC;AADY,sBAAsB;IAJlC,SAAS,CAAC;QACT,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,2BAA2B;KACtC,CAAC;GACW,sBAAsB,CAClC;;ACRD;;;;IAQa,uBAAuB,GAApC,MAAa,uBAAuB;EACnC;AADY,uBAAuB;IAJnC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,2BAA2B;KACtC,CAAC;GACW,uBAAuB,CACnC;;ICqDY,cAAc,GAA3B,MAAa,cAAc;EAAI;AAAlB,cAAc;IA1B1B,QAAQ,CAAC;QACR,YAAY,EAAE;YACZ,iBAAiB;YACjB,sBAAsB;YACtB,sBAAsB;YACtB,4BAA4B;YAC5B,uBAAuB;YACvB,0BAA0B;SAC3B;QACD,OAAO,EAAE;YACP,YAAY;YACZ,wBAAwB;YACxB,cAAc;SACf;QACD,OAAO,EAAE;YACP,iBAAiB;YACjB,sBAAsB;YACtB,sBAAsB;YACtB,4BAA4B;YAC5B,uBAAuB;YACvB,0BAA0B;SAC3B;QACD,eAAe,EAAE;YACf,0BAA0B;SAC3B;KACF,CAAC;GACW,cAAc,CAAI;;AClE/B;;;;;;"}
1
+ {"version":3,"file":"skyux-errors.js","sources":["../../../projects/errors/src/modules/error/error-modal-config.ts","../../../projects/errors/src/modules/error/error-modal-form.component.ts","../../../projects/errors/src/modules/error/error-modal-form.component.html","../../../projects/errors/src/modules/error/error-modal.service.ts","../../../projects/errors/src/modules/shared/sky-errors-resources.module.ts","../../../projects/errors/src/modules/error/error-title.component.ts","../../../projects/errors/src/modules/error/error-description.component.ts","../../../projects/errors/src/modules/error/error.component.ts","../../../projects/errors/src/modules/error/error.component.html","../../../projects/errors/src/modules/error/error-image.component.ts","../../../projects/errors/src/modules/error/error-action.component.ts","../../../projects/errors/src/modules/error/error.module.ts","../../../projects/errors/src/skyux-errors.ts"],"sourcesContent":["/* istanbul ignore next */\nexport class ErrorModalConfig {\n /**\n * Specifies a title to display in the modal error message.\n * @required\n */\n public errorTitle: string;\n /**\n * Specifies a description to provide additional details in the modal error message.\n * @required\n */\n public errorDescription: string;\n /**\n * Specifies a label for the action button that closes the modal error message.\n * @required\n */\n public errorCloseText: string;\n}\n","import {\n Component\n} from '@angular/core';\n\nimport {\n SkyModalInstance\n} from '@skyux/modals';\n\nimport {\n ErrorModalConfig\n} from './error-modal-config';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-error-modal-form',\n templateUrl: './error-modal-form.component.html',\n styleUrls: ['./error-modal-form.component.scss']\n})\nexport class SkyErrorModalFormComponent {\n constructor(\n public context: ErrorModalConfig,\n public instance: SkyModalInstance) {}\n}\n","<sky-modal>\n <sky-modal-content>\n <div class=\"sky-error-modal-container\">\n <span class=\"sky-error-modal-title\">{{ context.errorTitle }}</span>\n <span class=\"sky-error-modal-description\">{{ context.errorDescription }}</span>\n <div class=\"sky-error-modal-close\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n (click)=\"instance.close()\"\n >\n {{ context.errorCloseText }}\n </button>\n </div>\n </div>\n </sky-modal-content>\n</sky-modal>\n","import {\n Injectable\n} from '@angular/core';\n\nimport {\n SkyModalService\n} from '@skyux/modals';\n\nimport {\n ErrorModalConfig\n} from './error-modal-config';\n\nimport {\n SkyErrorModalFormComponent\n} from './error-modal-form.component';\n\n/**\n * Opens a modal to display a SKY UX-themed error message.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class SkyErrorModalService {\n constructor(\n private modal: SkyModalService\n ) { }\n/**\n * Specifies text for the the error message, including title, description, and action label.\n */\n public open(config: ErrorModalConfig) {\n const providers = [{ provide: ErrorModalConfig, useValue: config }];\n\n this.modal.open(SkyErrorModalFormComponent, {\n ariaRole: 'alertdialog',\n providers: providers\n });\n }\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-errors' 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_errors_broken_description\":{\"message\":\"Something went wrong.\\nTry again or come back later.\"},\"skyux_errors_broken_title\":{\"message\":\"That's odd...\"},\"skyux_errors_construction_description\":{\"message\":\"We appreciate your patience while we\\nmake improvements.\"},\"skyux_errors_construction_title\":{\"message\":\"Work in progress.\"},\"skyux_errors_not_found_description\":{\"message\":\"Pardon us, but this page\\nis missing or has moved.\"},\"skyux_errors_not_found_title\":{\"message\":\"Nothing to see here.\"},\"skyux_errors_security_description\":{\"message\":\"Ask your administrator for access.\"},\"skyux_errors_security_title\":{\"message\":\"Heads up!\\nYou're in a restricted area.\"}},\n};\n\nexport class SkyErrorsResourcesProvider 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 provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyErrorsResourcesProvider,\n multi: true\n }]\n})\nexport class SkyErrorsResourcesModule { }\n","import {\n Component,\n Input\n} from '@angular/core';\n\n/**\n * Specifies a title to display in the error message.\n */\n@Component({\n selector: 'sky-error-title',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorTitleComponent {\n/**\n * Indicates whether to replace the default title. If `false`, the title\n * from this component is added after the default title.\n * @default false\n */\n @Input()\n public replaceDefaultTitle: boolean = false;\n}\n","import {\n Component,\n Input\n} from '@angular/core';\n\n/**\n * Specifies a description to provide additional details in the error message.\n */\n@Component({\n selector: 'sky-error-description',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorDescriptionComponent {\n/**\n * Indicates whether to replace the default description. If `false`, the description\n * from this component is added after the default description.\n * @default false\n */\n @Input()\n public replaceDefaultDescription: boolean = false;\n}\n","import {\n Component,\n Input,\n OnInit,\n ContentChild\n} from '@angular/core';\n\nimport {\n SkyLibResourcesService\n} from '@skyux/i18n';\n\nimport {\n SkyErrorTitleComponent\n} from './error-title.component';\n\nimport {\n SkyErrorDescriptionComponent\n} from './error-description.component';\n\nimport {\n SkyErrorType\n} from './error-type';\n\n/**\n * Displays a SKY UX-themed error message.\n */\n@Component({\n selector: 'sky-error',\n styleUrls: ['./error.component.scss'],\n templateUrl: './error.component.html'\n})\nexport class SkyErrorComponent implements OnInit {\n/**\n * Specifies an error type to use a set of pre-defined values for the image,\n * title, and description. The valid options are `'broken'`, `'construction'`,\n * `'notfound'`, and `'security'`.\n */\n @Input()\n public set errorType(value: SkyErrorType) {\n this._errorType = value;\n this.setErrorTypeFields();\n }\n\n public get errorType() {\n return this._errorType;\n }\n\n/**\n * Indicates whether to display the error image.\n * @default true\n */\n @Input()\n public showImage: boolean = true;\n\n public title: string = undefined;\n public description: string = undefined;\n\n public get showTitle(): boolean {\n return this.title && !(this.titleCmp && this.titleCmp.replaceDefaultTitle);\n }\n\n public get showDescription(): boolean {\n return this.description && !(this.descriptionCmp && this.descriptionCmp.replaceDefaultDescription);\n }\n\n @ContentChild(SkyErrorTitleComponent)\n private titleCmp: SkyErrorTitleComponent;\n\n @ContentChild(SkyErrorDescriptionComponent)\n private descriptionCmp: SkyErrorDescriptionComponent;\n\n private _errorType: SkyErrorType;\n\n constructor(\n private resourcesService: SkyLibResourcesService\n ) { }\n\n public ngOnInit() {\n if (this.errorType) {\n this.setErrorTypeFields();\n }\n }\n\n public setErrorTypeFields() {\n if (this.errorType.toLowerCase() === 'broken') {\n this.title = this.getString('skyux_errors_broken_title');\n this.description = this.getString('skyux_errors_broken_description');\n\n } else if (this.errorType.toLowerCase() === 'notfound') {\n this.title = this.getString('skyux_errors_not_found_title');\n this.description = this.getString('skyux_errors_not_found_description');\n\n } else if (this.errorType.toLowerCase() === 'construction') {\n this.title = this.getString('skyux_errors_construction_title');\n this.description = this.getString('skyux_errors_construction_description');\n\n } else if (this.errorType.toLowerCase() === 'security') {\n this.title = this.getString('skyux_errors_security_title');\n this.description = this.getString('skyux_errors_security_description');\n }\n }\n\n private getString(key: string): string {\n // TODO: Need to implement the async `getString` method in a breaking change.\n return this.resourcesService.getStringForLocale(\n { locale: 'en-US' },\n key\n );\n }\n}\n","<div\n class=\"sky-error\"\n>\n\n <div *ngIf=\"showImage\"\n class=\"sky-error-image-container sky-margin-stacked-lg\"\n >\n <div *ngIf=\"errorType\"\n class=\"sky-error-image-svg\"\n [ngClass]=\"['sky-error-' + errorType + '-image']\"\n >\n </div>\n <ng-content\n select=\"sky-error-image\"\n ></ng-content>\n </div>\n\n <div\n class=\"sky-error-title sky-font-heading-1 sky-margin-stacked-lg\"\n >\n <ng-container *ngIf=\"showTitle\">\n {{ title }}\n </ng-container>\n <ng-content\n select=\"sky-error-title\"\n ></ng-content>\n </div>\n\n <div\n class=\"sky-error-description sky-font-body-default sky-margin-stacked-xl\"\n >\n <span *ngIf=\"showDescription\">\n {{ description }}\n </span>\n <ng-content\n select=\"sky-error-description\"\n ></ng-content>\n </div>\n\n <div\n class=\"sky-error-action\"\n >\n <ng-content\n select=\"sky-error-action\"\n ></ng-content>\n </div>\n\n</div>\n","import {\n Component\n} from '@angular/core';\n\n/**\n * Specifies an image to display in the error message.\n */\n@Component({\n selector: 'sky-error-image',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorImageComponent {\n}\n","import {\n Component\n} from '@angular/core';\n\n/**\n * Specifies an action to include in the error message.\n * For example, you can include a button to reload the page or to refresh data.\n */\n@Component({\n selector: 'sky-error-action',\n template: '<ng-content></ng-content>'\n})\nexport class SkyErrorActionComponent {\n}\n","import {\n NgModule\n} from '@angular/core';\n\nimport {\n CommonModule\n} from '@angular/common';\n\nimport {\n SkyModalModule\n} from '@skyux/modals';\n\nimport {\n SkyErrorsResourcesModule\n} from '../shared/sky-errors-resources.module';\n\nimport {\n SkyErrorComponent\n} from './error.component';\n\nimport {\n SkyErrorImageComponent\n} from './error-image.component';\n\nimport {\n SkyErrorTitleComponent\n} from './error-title.component';\n\nimport {\n SkyErrorDescriptionComponent\n} from './error-description.component';\n\nimport {\n SkyErrorActionComponent\n} from './error-action.component';\n\nimport {\n SkyErrorModalFormComponent\n} from './error-modal-form.component';\n\n@NgModule({\n declarations: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent,\n SkyErrorModalFormComponent\n ],\n imports: [\n CommonModule,\n SkyErrorsResourcesModule,\n SkyModalModule\n ],\n exports: [\n SkyErrorComponent,\n SkyErrorImageComponent,\n SkyErrorTitleComponent,\n SkyErrorDescriptionComponent,\n SkyErrorActionComponent\n ],\n entryComponents: [\n SkyErrorModalFormComponent\n ]\n})\nexport class SkyErrorModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;MACa,gBAAgB;;;ACW7B;;;MAQa,0BAA0B;IACrC,YACS,OAAyB,EACzB,QAA0B;QAD1B,YAAO,GAAP,OAAO,CAAkB;QACzB,aAAQ,GAAR,QAAQ,CAA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cAAc,aAGd,iBAAiB;QACjB,sBAAsB;QACtB,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;4GAMd,cAAc,YAhBhB;YACP,YAAY;YACZ,wBAAwB;YACxB,cAAc;SACf;2FAYU,cAAc;kBAzB1B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,uBAAuB;wBACvB,0BAA0B;qBAC3B;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,cAAc;qBACf;oBACD,OAAO,EAAE;wBACP,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,uBAAuB;qBACxB;oBACD,eAAe,EAAE;wBACf,0BAA0B;qBAC3B;iBACF;;;AChED;;;;;;"}
@@ -1,6 +1,9 @@
1
+ import * as i0 from "@angular/core";
1
2
  /**
2
3
  * Specifies an action to include in the error message.
3
4
  * For example, you can include a button to reload the page or to refresh data.
4
5
  */
5
6
  export declare class SkyErrorActionComponent {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorActionComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyErrorActionComponent, "sky-error-action", never, {}, {}, never, ["*"]>;
6
9
  }
@@ -1,3 +1,4 @@
1
+ import * as i0 from "@angular/core";
1
2
  /**
2
3
  * Specifies a description to provide additional details in the error message.
3
4
  */
@@ -8,4 +9,6 @@ export declare class SkyErrorDescriptionComponent {
8
9
  * @default false
9
10
  */
10
11
  replaceDefaultDescription: boolean;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorDescriptionComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyErrorDescriptionComponent, "sky-error-description", never, { "replaceDefaultDescription": "replaceDefaultDescription"; }, {}, never, ["*"]>;
11
14
  }
@@ -1,5 +1,8 @@
1
+ import * as i0 from "@angular/core";
1
2
  /**
2
3
  * Specifies an image to display in the error message.
3
4
  */
4
5
  export declare class SkyErrorImageComponent {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorImageComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyErrorImageComponent, "sky-error-image", never, {}, {}, never, ["*"]>;
5
8
  }
@@ -1,5 +1,6 @@
1
1
  import { SkyModalInstance } from '@skyux/modals';
2
2
  import { ErrorModalConfig } from './error-modal-config';
3
+ import * as i0 from "@angular/core";
3
4
  /**
4
5
  * @internal
5
6
  */
@@ -7,4 +8,6 @@ export declare class SkyErrorModalFormComponent {
7
8
  context: ErrorModalConfig;
8
9
  instance: SkyModalInstance;
9
10
  constructor(context: ErrorModalConfig, instance: SkyModalInstance);
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorModalFormComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyErrorModalFormComponent, "sky-error-modal-form", never, {}, {}, never, never>;
10
13
  }
@@ -1,5 +1,6 @@
1
1
  import { SkyModalService } from '@skyux/modals';
2
2
  import { ErrorModalConfig } from './error-modal-config';
3
+ import * as i0 from "@angular/core";
3
4
  /**
4
5
  * Opens a modal to display a SKY UX-themed error message.
5
6
  */
@@ -10,4 +11,6 @@ export declare class SkyErrorModalService {
10
11
  * Specifies text for the the error message, including title, description, and action label.
11
12
  */
12
13
  open(config: ErrorModalConfig): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorModalService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<SkyErrorModalService>;
13
16
  }
@@ -1,3 +1,4 @@
1
+ import * as i0 from "@angular/core";
1
2
  /**
2
3
  * Specifies a title to display in the error message.
3
4
  */
@@ -8,4 +9,6 @@ export declare class SkyErrorTitleComponent {
8
9
  * @default false
9
10
  */
10
11
  replaceDefaultTitle: boolean;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorTitleComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyErrorTitleComponent, "sky-error-title", never, { "replaceDefaultTitle": "replaceDefaultTitle"; }, {}, never, ["*"]>;
11
14
  }
@@ -1,6 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { SkyLibResourcesService } from '@skyux/i18n';
3
3
  import { SkyErrorType } from './error-type';
4
+ import * as i0 from "@angular/core";
4
5
  /**
5
6
  * Displays a SKY UX-themed error message.
6
7
  */
@@ -29,4 +30,6 @@ export declare class SkyErrorComponent implements OnInit {
29
30
  ngOnInit(): void;
30
31
  setErrorTypeFields(): void;
31
32
  private getString;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyErrorComponent, "sky-error", never, { "errorType": "errorType"; "showImage": "showImage"; }, {}, ["titleCmp", "descriptionCmp"], ["sky-error-image", "sky-error-title", "sky-error-description", "sky-error-action"]>;
32
35
  }
@@ -1,2 +1,15 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./error.component";
3
+ import * as i2 from "./error-image.component";
4
+ import * as i3 from "./error-title.component";
5
+ import * as i4 from "./error-description.component";
6
+ import * as i5 from "./error-action.component";
7
+ import * as i6 from "./error-modal-form.component";
8
+ import * as i7 from "@angular/common";
9
+ import * as i8 from "../shared/sky-errors-resources.module";
10
+ import * as i9 from "@skyux/modals";
1
11
  export declare class SkyErrorModule {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorModule, never>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyErrorModule, [typeof i1.SkyErrorComponent, typeof i2.SkyErrorImageComponent, typeof i3.SkyErrorTitleComponent, typeof i4.SkyErrorDescriptionComponent, typeof i5.SkyErrorActionComponent, typeof i6.SkyErrorModalFormComponent], [typeof i7.CommonModule, typeof i8.SkyErrorsResourcesModule, typeof i9.SkyModalModule], [typeof i1.SkyErrorComponent, typeof i2.SkyErrorImageComponent, typeof i3.SkyErrorTitleComponent, typeof i4.SkyErrorDescriptionComponent, typeof i5.SkyErrorActionComponent]>;
14
+ static ɵinj: i0.ɵɵInjectorDeclaration<SkyErrorModule>;
2
15
  }
@@ -0,0 +1,14 @@
1
+ import { SkyAppLocaleInfo, SkyLibResourcesProvider } from '@skyux/i18n';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "@skyux/i18n";
4
+ export declare class SkyErrorsResourcesProvider implements SkyLibResourcesProvider {
5
+ getString(localeInfo: SkyAppLocaleInfo, name: string): string;
6
+ }
7
+ /**
8
+ * Import into any component library module that needs to use resource strings.
9
+ */
10
+ export declare class SkyErrorsResourcesModule {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyErrorsResourcesModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyErrorsResourcesModule, never, never, [typeof i1.SkyI18nModule]>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<SkyErrorsResourcesModule>;
14
+ }
package/package.json CHANGED
@@ -1,35 +1,20 @@
1
1
  {
2
2
  "name": "@skyux/errors",
3
- "version": "5.0.0-beta.1",
4
- "description": "SKY UX Errors",
5
- "keywords": [],
6
- "author": "Blackbaud",
7
- "license": "ISC",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/blackbaud/skyux-errors.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/blackbaud/skyux-errors/issues"
14
- },
15
- "homepage": "https://github.com/blackbaud/skyux-errors#readme",
3
+ "version": "5.0.0",
16
4
  "peerDependencies": {
17
- "@angular/common": "^9.1.6 || ^12",
18
- "@angular/core": "^9.1.6 || ^12",
19
- "@skyux/indicators": "^5.0.0-beta.0",
20
- "@skyux/modals": "^5.0.0-beta.0"
5
+ "@angular/common": "^12.2.7",
6
+ "@angular/core": "^12.2.7",
7
+ "@skyux/modals": "^5.0.0-beta.6",
8
+ "@skyux/i18n": "^5.0.0"
21
9
  },
22
10
  "dependencies": {
23
- "tslib": "^1.10.0"
11
+ "tslib": "^2.3.0"
24
12
  },
25
13
  "main": "bundles/skyux-errors.umd.js",
26
- "module": "fesm5/skyux-errors.js",
14
+ "module": "fesm2015/skyux-errors.js",
27
15
  "es2015": "fesm2015/skyux-errors.js",
28
- "esm5": "esm5/skyux-errors.js",
29
16
  "esm2015": "esm2015/skyux-errors.js",
30
- "fesm5": "fesm5/skyux-errors.js",
31
17
  "fesm2015": "fesm2015/skyux-errors.js",
32
18
  "typings": "skyux-errors.d.ts",
33
- "metadata": "skyux-errors.metadata.json",
34
19
  "sideEffects": false
35
- }
20
+ }
@@ -0,0 +1,9 @@
1
+ export * from './modules/error/error-modal-config';
2
+ export * from './modules/error/error-modal.service';
3
+ export * from './modules/error/error.module';
4
+ export * from './modules/error/error-type';
5
+ export { SkyErrorActionComponent as λ1 } from './modules/error/error-action.component';
6
+ export { SkyErrorDescriptionComponent as λ2 } from './modules/error/error-description.component';
7
+ export { SkyErrorImageComponent as λ3 } from './modules/error/error-image.component';
8
+ export { SkyErrorTitleComponent as λ4 } from './modules/error/error-title.component';
9
+ export { SkyErrorComponent as λ5 } from './modules/error/error.component';
package/skyux-errors.d.ts CHANGED
@@ -1,12 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
- export * from './public_api';
5
- export { SkyErrorActionComponent as ɵe } from './modules/error/error-action.component';
6
- export { SkyErrorDescriptionComponent as ɵc } from './modules/error/error-description.component';
7
- export { SkyErrorImageComponent as ɵd } from './modules/error/error-image.component';
8
- export { SkyErrorModalFormComponent as ɵf } from './modules/error/error-modal-form.component';
9
- export { SkyErrorTitleComponent as ɵb } from './modules/error/error-title.component';
10
- export { SkyErrorComponent as ɵa } from './modules/error/error.component';
11
- export { SkyErrorsResourcesModule as ɵg } from './modules/shared/errors-resources.module';
12
- export { SkyErrorsResourcesProvider as ɵh } from './plugin-resources/errors-resources-provider';
4
+ /// <amd-module name="@skyux/errors" />
5
+ export * from './public-api';
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "main": "../bundles/skyux-errors-testing.umd.js",
3
- "module": "../fesm5/skyux-errors-testing.js",
3
+ "module": "../fesm2015/skyux-errors-testing.js",
4
4
  "es2015": "../fesm2015/skyux-errors-testing.js",
5
- "esm5": "../esm5/testing/skyux-errors-testing.js",
6
5
  "esm2015": "../esm2015/testing/skyux-errors-testing.js",
7
- "fesm5": "../fesm5/skyux-errors-testing.js",
8
6
  "fesm2015": "../fesm2015/skyux-errors-testing.js",
9
7
  "typings": "skyux-errors-testing.d.ts",
10
- "metadata": "skyux-errors-testing.metadata.json",
11
8
  "sideEffects": false,
12
9
  "name": "@skyux/errors/testing"
13
- }
10
+ }
File without changes
@@ -1,4 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
- export * from './public_api';
4
+ /// <amd-module name="@skyux/errors/testing" />
5
+ export * from './public-api';
package/CHANGELOG.md DELETED
@@ -1,69 +0,0 @@
1
- # 5.0.0-beta.1 (2021-08-30)
2
-
3
- - Added default descriptions for the `notfound` and `security` error types. [#49](https://github.com/blackbaud/skyux-autonumeric/pull/49)
4
- - Updated the images for all the error types. [#49](https://github.com/blackbaud/skyux-autonumeric/pull/49)
5
-
6
- # 5.0.0-beta.0 (2021-07-08)
7
-
8
- - Initial beta release.
9
- - Added support for `@angular/core@^12`. [#48](https://github.com/blackbaud/skyux-autonumeric/pull/48)
10
- - Added support for `5.0.0-beta.*` versions of SKY UX component libraries. [#48](https://github.com/blackbaud/skyux-autonumeric/pull/48)
11
- - Fixed `SkyErrorModalService` to work within lazy-loaded feature modules. [#46](https://github.com/blackbaud/skyux-autonumeric/pull/46)
12
-
13
- # 4.0.1 (2020-08-06)
14
-
15
- - Added support for `@skyux/theme@4.8.0` and `@skyux-sdk/builder@4.3.0`. [#31](https://github.com/blackbaud/skyux-errors/pull/31)
16
-
17
- # 4.0.0 (2020-05-13)
18
-
19
- ### New features
20
-
21
- - Added a test fixture for the error component to use in consumer unit tests. [#22](https://github.com/blackbaud/skyux-errors/pull/22)
22
- - Added support for `@angular/core@^9`. [#16](https://github.com/blackbaud/skyux-errors/pull/16)
23
- - Updated the pipeline to transpile to the [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview). [#16](https://github.com/blackbaud/skyux-errors/pull/16)
24
-
25
- # 4.0.0-rc.1 (2020-04-30)
26
-
27
- ### New features
28
-
29
- - Added bug fixes and features from the `master` branch. [#22](https://github.com/blackbaud/skyux-errors/pull/22)
30
- - Added a test fixture for the error component to be used in consumer unit tests. [#22](https://github.com/blackbaud/skyux-errors/pull/22)
31
-
32
- # 3.2.0 (2020-03-03)
33
-
34
- - Added an option to the error component to hide the default image but display the default error message. [#18](https://github.com/blackbaud/skyux-errors/pull/18)
35
-
36
- # 4.0.0-rc.0 (2020-02-19)
37
-
38
- ### New features
39
-
40
- - Added support for `@angular/core@^9`. [#16](https://github.com/blackbaud/skyux-errors/pull/16)
41
- - Updated the pipeline to transpile to the [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview). [#16](https://github.com/blackbaud/skyux-errors/pull/16)
42
-
43
- # 3.1.0 (2020-02-07)
44
-
45
- - Updated the error message text. [#12](https://github.com/blackbaud/skyux-errors/pull/12)
46
- - Added support for `@skyux-sdk/builder@3.13.0`. [#14](https://github.com/blackbaud/skyux-errors/pull/14)
47
-
48
- # 3.0.0 (2019-01-11)
49
-
50
- - Major version release.
51
-
52
- # 3.0.0-rc.3 (2018-12-3)
53
-
54
- - Added options to overwrite the default title and default description on error components to enable error messages to display standard images with custom text. [#7](https://github.com/blackbaud/skyux-errors/pull/7)
55
-
56
- # 3.0.0-rc.2 (2018-11-15)
57
-
58
- - Updated peer dependencies to support Angular versions greater than `4.3.6`. [#5](https://github.com/blackbaud/skyux-errors/pull/5)
59
-
60
- # 3.0.0-rc.1 (2018-10-18)
61
-
62
- - Added support for `@skyux/i18n@3.2.0`.
63
-
64
- # 3.0.0-rc.0 (2018-10-05)
65
- - Initial release candidate.
66
-
67
- # 3.0.0-alpha.0 (2018-10-04)
68
-
69
- - Initial alpha release.
@@ -1,2 +0,0 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/platform-browser"),require("@skyux-sdk/testing")):"function"==typeof define&&define.amd?define("@skyux/errors/testing",["exports","@angular/platform-browser","@skyux-sdk/testing"],r):r(((e=e||self).skyux=e.skyux||{},e.skyux.errors=e.skyux.errors||{},e.skyux.errors.testing={}),e.ng.platformBrowser,e.testing)}(this,(function(e,r,t){"use strict";var s=/^sky-error-(\w*)-image$/,n=function(){function e(e,r){this.debugEl=t.SkyAppTestUtility.getDebugElementByTestId(e,r,"sky-error")}return Object.defineProperty(e.prototype,"errorType",{get:function(){var e=this.debugEl.query(r.By.css(".sky-error-image-container > div"));if(e)for(var t=e.nativeElement.classList,n=0,o=t.length;n<o;n++){var i=t.item(n),u=s.exec(i);if(u)return u[1]}},enumerable:!0,configurable:!0}),e}();e.SkyErrorFixture=n,Object.defineProperty(e,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=skyux-errors-testing.umd.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["ng://@skyux/errors/testing/error-fixture.ts"],"names":["SKY_ERROR_IMAGE_CLS_REGEX","SkyErrorFixture","fixture","skyTestId","this","debugEl","SkyAppTestUtility","getDebugElementByTestId","Object","defineProperty","prototype","imageEl","query","By","css","classList","nativeElement","i","n","length","cls","item","matches","exec"],"mappings":"ybAgBA,IAAMA,EAA4B,uCAgChC,SAAAC,EACEC,EACAC,GAEAC,KAAKC,QAAUC,EAAAA,kBAAkBC,wBAAwBL,EAASC,EAAW,aAGjF,OA7BEK,OAAAC,eAAWR,EAAAS,UAAA,YAAS,KAApB,WACE,IAAMC,EAAUP,KAAKC,QAAQO,MAAMC,EAAAA,GAAGC,IAAI,qCAE1C,GAAIH,EAGF,IAFA,IAAMI,EAAYJ,EAAQK,cAAcD,UAE/BE,EAAI,EAAGC,EAAIH,EAAUI,OAAQF,EAAIC,EAAGD,IAAK,CAChD,IAAMG,EAAML,EAAUM,KAAKJ,GACrBK,EAAUtB,EAA0BuB,KAAKH,GAG/C,GAAIE,EACF,OAAOA,EAAQ,qCAiBzBrB","sourcesContent":["import {\n ComponentFixture\n} from '@angular/core/testing';\n\nimport {\n DebugElement\n} from '@angular/core';\n\nimport {\n By\n} from '@angular/platform-browser';\n\nimport {\n SkyAppTestUtility\n} from '@skyux-sdk/testing';\n\nconst SKY_ERROR_IMAGE_CLS_REGEX = /^sky-error-(\\w*)-image$/;\n\n/**\n * Allows interaction with a SKY UX error component.\n */\nexport class SkyErrorFixture {\n\n /**\n * The error's current type.\n */\n public get errorType(): string {\n const imageEl = this.debugEl.query(By.css('.sky-error-image-container > div'));\n\n if (imageEl) {\n const classList = imageEl.nativeElement.classList;\n\n for (let i = 0, n = classList.length; i < n; i++) {\n const cls = classList.item(i);\n const matches = SKY_ERROR_IMAGE_CLS_REGEX.exec(cls);\n\n /* istanbul ignore else */\n if (matches) {\n return matches[1];\n }\n }\n }\n\n return undefined;\n }\n\n private debugEl: DebugElement;\n\n constructor(\n fixture: ComponentFixture<any>,\n skyTestId: string\n ) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(fixture, skyTestId, 'sky-error');\n }\n\n}\n"]}