@skyux/forms 5.5.0 → 5.6.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 (60) hide show
  1. package/bundles/skyux-forms.umd.js +388 -388
  2. package/documentation.json +231 -233
  3. package/esm2015/lib/modules/character-counter/character-counter-indicator.component.js.map +1 -1
  4. package/esm2015/lib/modules/character-counter/character-counter.directive.js.map +1 -1
  5. package/esm2015/lib/modules/character-counter/character-counter.module.js +2 -2
  6. package/esm2015/lib/modules/character-counter/character-counter.module.js.map +1 -1
  7. package/esm2015/lib/modules/checkbox/checkbox-required-validator.directive.js.map +1 -1
  8. package/esm2015/lib/modules/checkbox/checkbox.component.js +1 -1
  9. package/esm2015/lib/modules/checkbox/checkbox.component.js.map +1 -1
  10. package/esm2015/lib/modules/checkbox/checkbox.module.js +1 -1
  11. package/esm2015/lib/modules/checkbox/checkbox.module.js.map +1 -1
  12. package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js +1 -1
  13. package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js.map +1 -1
  14. package/esm2015/lib/modules/file-attachment/file-attachment.component.js +3 -3
  15. package/esm2015/lib/modules/file-attachment/file-attachment.component.js.map +1 -1
  16. package/esm2015/lib/modules/file-attachment/file-attachment.service.js +6 -6
  17. package/esm2015/lib/modules/file-attachment/file-attachment.service.js.map +1 -1
  18. package/esm2015/lib/modules/file-attachment/file-attachments.module.js +3 -3
  19. package/esm2015/lib/modules/file-attachment/file-attachments.module.js.map +1 -1
  20. package/esm2015/lib/modules/file-attachment/file-drop.component.js +7 -7
  21. package/esm2015/lib/modules/file-attachment/file-drop.component.js.map +1 -1
  22. package/esm2015/lib/modules/file-attachment/file-item.component.js +2 -2
  23. package/esm2015/lib/modules/file-attachment/file-item.component.js.map +1 -1
  24. package/esm2015/lib/modules/file-attachment/file-item.service.js +3 -3
  25. package/esm2015/lib/modules/file-attachment/file-item.service.js.map +1 -1
  26. package/esm2015/lib/modules/file-attachment/file-size.pipe.js +1 -1
  27. package/esm2015/lib/modules/file-attachment/file-size.pipe.js.map +1 -1
  28. package/esm2015/lib/modules/input-box/input-box-host.service.js.map +1 -1
  29. package/esm2015/lib/modules/input-box/input-box.component.js.map +1 -1
  30. package/esm2015/lib/modules/input-box/input-box.module.js +1 -1
  31. package/esm2015/lib/modules/input-box/input-box.module.js.map +1 -1
  32. package/esm2015/lib/modules/radio/radio-group.component.js.map +1 -1
  33. package/esm2015/lib/modules/radio/radio.component.js +1 -1
  34. package/esm2015/lib/modules/radio/radio.component.js.map +1 -1
  35. package/esm2015/lib/modules/radio/radio.module.js +2 -2
  36. package/esm2015/lib/modules/radio/radio.module.js.map +1 -1
  37. package/esm2015/lib/modules/selection-box/selection-box-adapter.service.js.map +1 -1
  38. package/esm2015/lib/modules/selection-box/selection-box-grid.component.js +2 -2
  39. package/esm2015/lib/modules/selection-box/selection-box-grid.component.js.map +1 -1
  40. package/esm2015/lib/modules/selection-box/selection-box.component.js.map +1 -1
  41. package/esm2015/lib/modules/selection-box/selection-box.module.js +1 -1
  42. package/esm2015/lib/modules/selection-box/selection-box.module.js.map +1 -1
  43. package/esm2015/lib/modules/shared/sky-forms-resources.module.js +1 -1
  44. package/esm2015/lib/modules/shared/sky-forms-resources.module.js.map +1 -1
  45. package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js +1 -1
  46. package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js.map +1 -1
  47. package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js +2 -2
  48. package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js.map +1 -1
  49. package/esm2015/testing/checkbox-fixture.js.map +1 -1
  50. package/fesm2015/skyux-forms-testing.js.map +1 -1
  51. package/fesm2015/skyux-forms.js +105 -105
  52. package/fesm2015/skyux-forms.js.map +1 -1
  53. package/lib/modules/checkbox/checkbox.component.d.ts +1 -1
  54. package/lib/modules/file-attachment/file-attachment.component.d.ts +2 -2
  55. package/lib/modules/file-attachment/file-drop.component.d.ts +2 -2
  56. package/lib/modules/file-attachment/file-item.component.d.ts +2 -2
  57. package/lib/modules/file-attachment/file-size.pipe.d.ts +1 -1
  58. package/lib/modules/input-box/input-box-host.service.d.ts +1 -1
  59. package/lib/modules/selection-box/selection-box-grid.component.d.ts +1 -1
  60. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"selection-box.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAE5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;;AAkBrE,MAAM,OAAO,qBAAqB;;mHAArB,qBAAqB;oHAArB,qBAAqB,iBAd9B,4BAA4B;QAC5B,wBAAwB;QACxB,mCAAmC;QACnC,8BAA8B,aAEtB,YAAY,EAAE,cAAc,aAEpC,4BAA4B;QAC5B,wBAAwB;QACxB,mCAAmC;QACnC,8BAA8B;oHAIrB,qBAAqB,aAFrB,CAAC,6BAA6B,CAAC,YAPjC,CAAC,YAAY,EAAE,cAAc,CAAC;4FAS5B,qBAAqB;kBAhBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,4BAA4B;wBAC5B,wBAAwB;wBACxB,mCAAmC;wBACnC,8BAA8B;qBAC/B;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACvC,OAAO,EAAE;wBACP,4BAA4B;wBAC5B,wBAAwB;wBACxB,mCAAmC;wBACnC,8BAA8B;qBAC/B;oBACD,SAAS,EAAE,CAAC,6BAA6B,CAAC;iBAC3C","sourcesContent":["import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkySelectionBoxAdapterService } from './selection-box-adapter.service';\n\nimport { SkySelectionBoxDescriptionComponent } from './selection-box-description.component';\n\nimport { SkySelectionBoxHeaderComponent } from './selection-box-header.component';\n\nimport { SkySelectionBoxGridComponent } from './selection-box-grid.component';\n\nimport { SkySelectionBoxComponent } from './selection-box.component';\n\n@NgModule({\n declarations: [\n SkySelectionBoxGridComponent,\n SkySelectionBoxComponent,\n SkySelectionBoxDescriptionComponent,\n SkySelectionBoxHeaderComponent,\n ],\n imports: [CommonModule, SkyThemeModule],\n exports: [\n SkySelectionBoxGridComponent,\n SkySelectionBoxComponent,\n SkySelectionBoxDescriptionComponent,\n SkySelectionBoxHeaderComponent,\n ],\n providers: [SkySelectionBoxAdapterService],\n})\nexport class SkySelectionBoxModule {}\n"]}
1
+ {"version":3,"file":"selection-box.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;;AAkBrE,MAAM,OAAO,qBAAqB;;mHAArB,qBAAqB;oHAArB,qBAAqB,iBAd9B,4BAA4B;QAC5B,wBAAwB;QACxB,mCAAmC;QACnC,8BAA8B,aAEtB,YAAY,EAAE,cAAc,aAEpC,4BAA4B;QAC5B,wBAAwB;QACxB,mCAAmC;QACnC,8BAA8B;oHAIrB,qBAAqB,aAFrB,CAAC,6BAA6B,CAAC,YAPjC,CAAC,YAAY,EAAE,cAAc,CAAC;4FAS5B,qBAAqB;kBAhBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,4BAA4B;wBAC5B,wBAAwB;wBACxB,mCAAmC;wBACnC,8BAA8B;qBAC/B;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACvC,OAAO,EAAE;wBACP,4BAA4B;wBAC5B,wBAAwB;wBACxB,mCAAmC;wBACnC,8BAA8B;qBAC/B;oBACD,SAAS,EAAE,CAAC,6BAA6B,CAAC;iBAC3C","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkySelectionBoxAdapterService } from './selection-box-adapter.service';\nimport { SkySelectionBoxDescriptionComponent } from './selection-box-description.component';\nimport { SkySelectionBoxGridComponent } from './selection-box-grid.component';\nimport { SkySelectionBoxHeaderComponent } from './selection-box-header.component';\nimport { SkySelectionBoxComponent } from './selection-box.component';\n\n@NgModule({\n declarations: [\n SkySelectionBoxGridComponent,\n SkySelectionBoxComponent,\n SkySelectionBoxDescriptionComponent,\n SkySelectionBoxHeaderComponent,\n ],\n imports: [CommonModule, SkyThemeModule],\n exports: [\n SkySelectionBoxGridComponent,\n SkySelectionBoxComponent,\n SkySelectionBoxDescriptionComponent,\n SkySelectionBoxHeaderComponent,\n ],\n providers: [SkySelectionBoxAdapterService],\n})\nexport class SkySelectionBoxModule {}\n"]}
@@ -5,7 +5,7 @@
5
5
  * To update this file, simply rerun the command.
6
6
  */
7
7
  import { NgModule } from '@angular/core';
8
- import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS, } from '@skyux/i18n';
8
+ import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
9
9
  import * as i0 from "@angular/core";
10
10
  const RESOURCES = {
11
11
  'EN-US': {
@@ -1 +1 @@
1
- {"version":3,"file":"sky-forms-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/shared/sky-forms-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;QACP,6BAA6B,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;QAC/D,gCAAgC,EAAE;YAChC,OAAO,EAAE,mCAAmC;SAC7C;QACD,8CAA8C,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC1E,+CAA+C,EAAE;YAC/C,OAAO,EAAE,cAAc;SACxB;QACD,sCAAsC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAClE,wCAAwC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;QAClE,0CAA0C,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QACnE,kCAAkC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACzD,kCAAkC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACzD,kCAAkC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACzD,gDAAgD,EAAE;YAChD,OAAO,EAAE,kBAAkB;SAC5B;QACD,+CAA+C,EAAE;YAC/C,OAAO,EAAE,qCAAqC;SAC/C;QACD,iDAAiD,EAAE;YACjD,OAAO,EAAE,iBAAiB;SAC3B;QACD,wDAAwD,EAAE;YACxD,OAAO,EAAE,eAAe;SACzB;QACD,8CAA8C,EAAE;YAC9C,OAAO,EAAE,2BAA2B;SACrC;QACD,4CAA4C,EAAE;YAC5C,OAAO,EAAE,sBAAsB;SAChC;QACD,kDAAkD,EAAE;YAClD,OAAO,EAAE,+BAA+B;SACzC;QACD,oDAAoD,EAAE;YACpD,OAAO,EAAE,oBAAoB;SAC9B;QACD,4CAA4C,EAAE;YAC5C,OAAO,EAAE,wBAAwB;SAClC;QACD,iDAAiD,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACtE,0CAA0C,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;KAC1E;CACF,CAAC;AAEF,MAAM,OAAO,yBAAyB;IAC7B,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,uBAAuB;;qHAAvB,uBAAuB;sHAAvB,uBAAuB,YATxB,aAAa;sHASZ,uBAAuB,aARvB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,yBAAyB;YACnC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,uBAAuB;kBAVnC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,yBAAyB;4BACnC,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-forms' 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': {\n skyux_character_count_message: { message: 'characters out of' },\n skyux_character_count_over_limit: {\n message: 'You are over the character limit.',\n },\n skyux_file_attachment_button_label_choose_file: { message: 'Choose file' },\n skyux_file_attachment_button_label_replace_file: {\n message: 'Replace file',\n },\n skyux_file_attachment_file_item_delete: { message: 'Delete file' },\n skyux_file_attachment_file_size_b_plural: { message: '{0} bytes' },\n skyux_file_attachment_file_size_b_singular: { message: '{0} byte' },\n skyux_file_attachment_file_size_gb: { message: '{0} GB' },\n skyux_file_attachment_file_size_kb: { message: '{0} KB' },\n skyux_file_attachment_file_size_mb: { message: '{0} MB' },\n skyux_file_attachment_file_upload_drag_file_here: {\n message: 'Drag a file here',\n },\n skyux_file_attachment_file_upload_drag_or_click: {\n message: 'Drag a file here or click to browse',\n },\n skyux_file_attachment_file_upload_drop_files_here: {\n message: 'Drop files here',\n },\n skyux_file_attachment_file_upload_image_preview_alt_text: {\n message: 'Image preview',\n },\n skyux_file_attachment_file_upload_invalid_file: {\n message: 'This file type is invalid',\n },\n skyux_file_attachment_file_upload_link_input: {\n message: 'Add a link to a file',\n },\n skyux_file_attachment_file_upload_link_placeholder: {\n message: 'http://www.something.com/file',\n },\n skyux_file_attachment_file_upload_or_click_to_browse: {\n message: 'or click to browse',\n },\n skyux_file_attachment_file_upload_paste_link: {\n message: 'Paste a link to a file',\n },\n skyux_file_attachment_file_upload_paste_link_done: { message: 'Done' },\n skyux_file_attachment_label_no_file_chosen: { message: 'No file chosen' },\n },\n};\n\nexport class SkyFormsResourcesProvider 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: SkyFormsResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyFormsResourcesModule {}\n"]}
1
+ {"version":3,"file":"sky-forms-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/shared/sky-forms-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;QACP,6BAA6B,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;QAC/D,gCAAgC,EAAE;YAChC,OAAO,EAAE,mCAAmC;SAC7C;QACD,8CAA8C,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC1E,+CAA+C,EAAE;YAC/C,OAAO,EAAE,cAAc;SACxB;QACD,sCAAsC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAClE,wCAAwC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;QAClE,0CAA0C,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QACnE,kCAAkC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACzD,kCAAkC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACzD,kCAAkC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACzD,gDAAgD,EAAE;YAChD,OAAO,EAAE,kBAAkB;SAC5B;QACD,+CAA+C,EAAE;YAC/C,OAAO,EAAE,qCAAqC;SAC/C;QACD,iDAAiD,EAAE;YACjD,OAAO,EAAE,iBAAiB;SAC3B;QACD,wDAAwD,EAAE;YACxD,OAAO,EAAE,eAAe;SACzB;QACD,8CAA8C,EAAE;YAC9C,OAAO,EAAE,2BAA2B;SACrC;QACD,4CAA4C,EAAE;YAC5C,OAAO,EAAE,sBAAsB;SAChC;QACD,kDAAkD,EAAE;YAClD,OAAO,EAAE,+BAA+B;SACzC;QACD,oDAAoD,EAAE;YACpD,OAAO,EAAE,oBAAoB;SAC9B;QACD,4CAA4C,EAAE;YAC5C,OAAO,EAAE,wBAAwB;SAClC;QACD,iDAAiD,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QACtE,0CAA0C,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;KAC1E;CACF,CAAC;AAEF,MAAM,OAAO,yBAAyB;IAC7B,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,uBAAuB;;qHAAvB,uBAAuB;sHAAvB,uBAAuB,YATxB,aAAa;sHASZ,uBAAuB,aARvB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,yBAAyB;YACnC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,uBAAuB;kBAVnC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,yBAAyB;4BACnC,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-forms' 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': {\n skyux_character_count_message: { message: 'characters out of' },\n skyux_character_count_over_limit: {\n message: 'You are over the character limit.',\n },\n skyux_file_attachment_button_label_choose_file: { message: 'Choose file' },\n skyux_file_attachment_button_label_replace_file: {\n message: 'Replace file',\n },\n skyux_file_attachment_file_item_delete: { message: 'Delete file' },\n skyux_file_attachment_file_size_b_plural: { message: '{0} bytes' },\n skyux_file_attachment_file_size_b_singular: { message: '{0} byte' },\n skyux_file_attachment_file_size_gb: { message: '{0} GB' },\n skyux_file_attachment_file_size_kb: { message: '{0} KB' },\n skyux_file_attachment_file_size_mb: { message: '{0} MB' },\n skyux_file_attachment_file_upload_drag_file_here: {\n message: 'Drag a file here',\n },\n skyux_file_attachment_file_upload_drag_or_click: {\n message: 'Drag a file here or click to browse',\n },\n skyux_file_attachment_file_upload_drop_files_here: {\n message: 'Drop files here',\n },\n skyux_file_attachment_file_upload_image_preview_alt_text: {\n message: 'Image preview',\n },\n skyux_file_attachment_file_upload_invalid_file: {\n message: 'This file type is invalid',\n },\n skyux_file_attachment_file_upload_link_input: {\n message: 'Add a link to a file',\n },\n skyux_file_attachment_file_upload_link_placeholder: {\n message: 'http://www.something.com/file',\n },\n skyux_file_attachment_file_upload_or_click_to_browse: {\n message: 'or click to browse',\n },\n skyux_file_attachment_file_upload_paste_link: {\n message: 'Paste a link to a file',\n },\n skyux_file_attachment_file_upload_paste_link_done: { message: 'Done' },\n skyux_file_attachment_label_no_file_chosen: { message: 'No file chosen' },\n },\n};\n\nexport class SkyFormsResourcesProvider 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: SkyFormsResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyFormsResourcesModule {}\n"]}
@@ -1,4 +1,4 @@
1
- import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, forwardRef, Input, Output, QueryList, } from '@angular/core';
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, Output, QueryList, forwardRef, } from '@angular/core';
2
2
  import { NG_VALIDATORS, NG_VALUE_ACCESSOR, } from '@angular/forms';
3
3
  import { Subject } from 'rxjs';
4
4
  import { takeUntil } from 'rxjs/operators';
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-switch.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch.component.html"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,YAAY,EACZ,UAAU,EACV,KAAK,EACL,MAAM,EACN,SAAS,GAEV,MAAM,eAAe,CAAC;AAEvB,OAAO,EAGL,aAAa,EACb,iBAAiB,GAGlB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;;;AAEhF,sDAAsD;AACtD,MAAM,wCAAwC,GAAQ;IACpD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;IACvD,KAAK,EAAE,IAAI;CACZ,CAAC;AACF,MAAM,2BAA2B,GAAG;IAClC,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;IACvD,KAAK,EAAE,IAAI;CACZ,CAAC;AACF,gBAAgB;AAEhB,IAAI,QAAQ,GAAG,CAAC,CAAC;AAYjB,MAAM,OAAO,wBAAwB;IAyEnC,YAAoB,cAAiC;QAAjC,mBAAc,GAAd,cAAc,CAAmB;QAvCrD;;WAEG;QAEI,aAAQ,G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,CAAC,IAAI,CAAC;YACrB,OAAO,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAC,CAAC;IACL,CAAC;IAEO,aAAa;QACnB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;IAC/B,CAAC;;sHAjJU,wBAAwB;0GAAxB,wBAAwB,2LANxB;QACT,wCAAwC;QACxC,2BAA2B;KAC5B,0DAkEgB,6BAA6B,6BCvHhD,opCAyCA;4FDea,wBAAwB;kBAVpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,WAAW,EAAE,gCAAgC;oBAC7C,SAAS,EAAE,CAAC,gCAAgC,CAAC;oBAC7C,SAAS,EAAE;wBACT,wCAAwC;wBACxC,2BAA2B;qBAC5B;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;wGAUQ,SAAS;sBADf,KAAK;gBAQK,OAAO;sBADjB,KAAK;gBAuBC,QAAQ;sBADd,KAAK;gBAQC,QAAQ;sBADd,KAAK;gBAOC,YAAY;sBADlB,MAAM;gBAcC,eAAe;sBADtB,eAAe;uBAAC,6BAA6B","sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n QueryList,\n OnDestroy,\n} from '@angular/core';\n\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\n\nimport { Subject } from 'rxjs';\n\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkyToggleSwitchChange } from './types/toggle-switch-change';\n\nimport { SkyToggleSwitchLabelComponent } from './toggle-switch-label.component';\n\n// tslint:disable:no-forward-ref no-use-before-declare\nconst SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SkyToggleSwitchComponent),\n multi: true,\n};\nconst SKY_TOGGLE_SWITCH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SkyToggleSwitchComponent),\n multi: true,\n};\n// tslint:enable\n\nlet uniqueId = 0;\n\n@Component({\n selector: 'sky-toggle-switch',\n templateUrl: './toggle-switch.component.html',\n styleUrls: ['./toggle-switch.component.scss'],\n providers: [\n SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,\n SKY_TOGGLE_SWITCH_VALIDATOR,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyToggleSwitchComponent\n implements AfterContentInit, OnDestroy, ControlValueAccessor, Validator\n{\n /**\n * Specifies an ARIA label for the toggle switch. This sets the toggle switch's `aria-label`\n * attribute [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).\n * If the `sky-toggle-switch-label` component displays a visible label, do not use this property.\n */\n @Input()\n public ariaLabel: string;\n\n /**\n * Indicates whether the toggle switch is selected.\n * @default false\n */\n @Input()\n public set checked(checked: boolean) {\n if (checked !== this.checked) {\n this._checked = checked;\n this.onChange(checked);\n\n // Do not mark the field as \"dirty\"\n // if the field has been initialized with a value.\n if (this.isFirstChange && this.control) {\n this.control.markAsPristine();\n this.isFirstChange = false;\n }\n }\n }\n\n public get checked(): boolean {\n return this._checked || false;\n }\n\n /**\n * Indicates whether to disable the toggle switch.\n */\n @Input()\n public disabled = false;\n\n /**\n * Specifies a tab index for the toggle switch. If not defined, the index is set to the position\n * of the toggle switch on load.\n */\n @Input()\n public tabIndex = 0;\n\n /**\n * Fires when the checked state of a toggle switch changes.\n */\n @Output()\n public toggleChange = new EventEmitter<SkyToggleSwitchChange>();\n\n public get hasLabelComponent(): boolean {\n return this.labelComponents.length > 0;\n }\n\n public enableIndicatorAnimation = false;\n\n public get labelElementId(): string {\n return `sky-toggle-switch-label-${this.toggleSwitchId}`;\n }\n\n @ContentChildren(SkyToggleSwitchLabelComponent)\n private labelComponents: QueryList<SkyToggleSwitchLabelComponent>;\n\n private control: AbstractControl;\n private isFirstChange: boolean = true;\n private ngUnsubscribe = new Subject<void>();\n private toggleSwitchId = uniqueId++;\n\n private _checked: boolean = false;\n\n constructor(private changeDetector: ChangeDetectorRef) {}\n\n public ngAfterContentInit(): void {\n this.labelComponents.changes\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(() => {\n // Allow the template to reload any ARIA attributes that are relying on the\n // label component existing in the DOM.\n this.changeDetector.markForCheck();\n });\n\n // Wait for the view to render before applying animation effects.\n // (Some browsers, such as Firefox, apply the animation too early.)\n setTimeout(() => {\n this.enableIndicatorAnimation = true;\n });\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n public writeValue(value: boolean): void {\n this.checked = !!value;\n this.changeDetector.markForCheck();\n }\n\n public validate(control: AbstractControl): ValidationErrors {\n if (!this.control) {\n this.control = control;\n }\n\n return;\n }\n\n public registerOnChange(fn: (value: any) => void) {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n this.changeDetector.markForCheck();\n }\n\n public onButtonClick(event: any): void {\n event.stopPropagation();\n this.toggleChecked();\n this.emitChangeEvent();\n }\n\n public onButtonBlur(): void {\n this.onTouched();\n }\n\n /* istanbul ignore next */\n private onTouched: () => any = () => {};\n private onChange: (value: any) => void = () => {};\n\n private emitChangeEvent(): void {\n this.onChange(this._checked);\n this.toggleChange.emit({\n checked: this._checked,\n });\n }\n\n private toggleChecked(): void {\n this.checked = !this.checked;\n }\n}\n","<span class=\"sky-toggle-switch\">\n <button\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"hasLabelComponent ? labelElementId : null\"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-toggle-switch-checked': checked,\n 'sky-toggle-switch-disabled': disabled\n }\"\n [tabIndex]=\"tabIndex\"\n (blur)=\"onButtonBlur()\"\n (click)=\"onButtonClick($event)\"\n >\n <i\n aria-hidden=\"true\"\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n role=\"presentation\"\n >&nbsp;</i\n >\n <!-- Non-breaking space needed to align switch to baseline! -->\n </button>\n\n <label\n *ngIf=\"hasLabelComponent\"\n class=\"sky-toggle-switch-label\"\n [attr.id]=\"labelElementId\"\n >\n <ng-container *ngTemplateOutlet=\"labelContent\"> </ng-container>\n </label>\n</span>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-toggle-switch-label\"></ng-content>\n</ng-template>\n"]}
1
+ {"version":3,"file":"toggle-switch.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch.component.html"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,aAAa,EACb,iBAAiB,GAGlB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;;;AAGhF,sDAAsD;AACtD,MAAM,wCAAwC,GAAQ;IACpD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;IACvD,KAAK,EAAE,IAAI;CACZ,CAAC;AACF,MAAM,2BAA2B,GAAG;IAClC,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,C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,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAEM,YAAY;QACjB,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAMO,eAAe;QACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;YACrB,OAAO,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAC,CAAC;IACL,CAAC;IAEO,aAAa;QACnB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;IAC/B,CAAC;;sHAjJU,wBAAwB;0GAAxB,wBAAwB,2LANxB;QACT,wCAAwC;QACxC,2BAA2B;KAC5B,0DAkEgB,6BAA6B,6BCpHhD,opCAyCA;4FDYa,wBAAwB;kBAVpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,WAAW,EAAE,gCAAgC;oBAC7C,SAAS,EAAE,CAAC,gCAAgC,CAAC;oBAC7C,SAAS,EAAE;wBACT,wCAAwC;wBACxC,2BAA2B;qBAC5B;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;wGAUQ,SAAS;sBADf,KAAK;gBAQK,OAAO;sBADjB,KAAK;gBAuBC,QAAQ;sBADd,KAAK;gBAQC,QAAQ;sBADd,KAAK;gBAOC,YAAY;sBADlB,MAAM;gBAcC,eAAe;sBADtB,eAAe;uBAAC,6BAA6B","sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n QueryList,\n forwardRef,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkyToggleSwitchLabelComponent } from './toggle-switch-label.component';\nimport { SkyToggleSwitchChange } from './types/toggle-switch-change';\n\n// tslint:disable:no-forward-ref no-use-before-declare\nconst SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SkyToggleSwitchComponent),\n multi: true,\n};\nconst SKY_TOGGLE_SWITCH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SkyToggleSwitchComponent),\n multi: true,\n};\n// tslint:enable\n\nlet uniqueId = 0;\n\n@Component({\n selector: 'sky-toggle-switch',\n templateUrl: './toggle-switch.component.html',\n styleUrls: ['./toggle-switch.component.scss'],\n providers: [\n SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,\n SKY_TOGGLE_SWITCH_VALIDATOR,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyToggleSwitchComponent\n implements AfterContentInit, OnDestroy, ControlValueAccessor, Validator\n{\n /**\n * Specifies an ARIA label for the toggle switch. This sets the toggle switch's `aria-label`\n * attribute [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).\n * If the `sky-toggle-switch-label` component displays a visible label, do not use this property.\n */\n @Input()\n public ariaLabel: string;\n\n /**\n * Indicates whether the toggle switch is selected.\n * @default false\n */\n @Input()\n public set checked(checked: boolean) {\n if (checked !== this.checked) {\n this._checked = checked;\n this.onChange(checked);\n\n // Do not mark the field as \"dirty\"\n // if the field has been initialized with a value.\n if (this.isFirstChange && this.control) {\n this.control.markAsPristine();\n this.isFirstChange = false;\n }\n }\n }\n\n public get checked(): boolean {\n return this._checked || false;\n }\n\n /**\n * Indicates whether to disable the toggle switch.\n */\n @Input()\n public disabled = false;\n\n /**\n * Specifies a tab index for the toggle switch. If not defined, the index is set to the position\n * of the toggle switch on load.\n */\n @Input()\n public tabIndex = 0;\n\n /**\n * Fires when the checked state of a toggle switch changes.\n */\n @Output()\n public toggleChange = new EventEmitter<SkyToggleSwitchChange>();\n\n public get hasLabelComponent(): boolean {\n return this.labelComponents.length > 0;\n }\n\n public enableIndicatorAnimation = false;\n\n public get labelElementId(): string {\n return `sky-toggle-switch-label-${this.toggleSwitchId}`;\n }\n\n @ContentChildren(SkyToggleSwitchLabelComponent)\n private labelComponents: QueryList<SkyToggleSwitchLabelComponent>;\n\n private control: AbstractControl;\n private isFirstChange = true;\n private ngUnsubscribe = new Subject<void>();\n private toggleSwitchId = uniqueId++;\n\n private _checked = false;\n\n constructor(private changeDetector: ChangeDetectorRef) {}\n\n public ngAfterContentInit(): void {\n this.labelComponents.changes\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(() => {\n // Allow the template to reload any ARIA attributes that are relying on the\n // label component existing in the DOM.\n this.changeDetector.markForCheck();\n });\n\n // Wait for the view to render before applying animation effects.\n // (Some browsers, such as Firefox, apply the animation too early.)\n setTimeout(() => {\n this.enableIndicatorAnimation = true;\n });\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n public writeValue(value: boolean): void {\n this.checked = !!value;\n this.changeDetector.markForCheck();\n }\n\n public validate(control: AbstractControl): ValidationErrors {\n if (!this.control) {\n this.control = control;\n }\n\n return;\n }\n\n public registerOnChange(fn: (value: any) => void) {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n this.changeDetector.markForCheck();\n }\n\n public onButtonClick(event: any): void {\n event.stopPropagation();\n this.toggleChecked();\n this.emitChangeEvent();\n }\n\n public onButtonBlur(): void {\n this.onTouched();\n }\n\n /* istanbul ignore next */\n private onTouched: () => any = () => {};\n private onChange: (value: any) => void = () => {};\n\n private emitChangeEvent(): void {\n this.onChange(this._checked);\n this.toggleChange.emit({\n checked: this._checked,\n });\n }\n\n private toggleChecked(): void {\n this.checked = !this.checked;\n }\n}\n","<span class=\"sky-toggle-switch\">\n <button\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"hasLabelComponent ? labelElementId : null\"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-toggle-switch-checked': checked,\n 'sky-toggle-switch-disabled': disabled\n }\"\n [tabIndex]=\"tabIndex\"\n (blur)=\"onButtonBlur()\"\n (click)=\"onButtonClick($event)\"\n >\n <i\n aria-hidden=\"true\"\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n role=\"presentation\"\n >&nbsp;</i\n >\n <!-- Non-breaking space needed to align switch to baseline! -->\n </button>\n\n <label\n *ngIf=\"hasLabelComponent\"\n class=\"sky-toggle-switch-label\"\n [attr.id]=\"labelElementId\"\n >\n <ng-container *ngTemplateOutlet=\"labelContent\"> </ng-container>\n </label>\n</span>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-toggle-switch-label\"></ng-content>\n</ng-template>\n"]}
@@ -1,8 +1,8 @@
1
- import { NgModule } from '@angular/core';
2
1
  import { CommonModule } from '@angular/common';
2
+ import { NgModule } from '@angular/core';
3
3
  import { FormsModule } from '@angular/forms';
4
- import { SkyToggleSwitchComponent } from './toggle-switch.component';
5
4
  import { SkyToggleSwitchLabelComponent } from './toggle-switch-label.component';
5
+ import { SkyToggleSwitchComponent } from './toggle-switch.component';
6
6
  import * as i0 from "@angular/core";
7
7
  export class SkyToggleSwitchModule {
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-switch.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;;AAOhF,MAAM,OAAO,qBAAqB;;mHAArB,qBAAqB;oHAArB,qBAAqB,iBAJjB,6BAA6B,EAAE,wBAAwB,aAC5D,YAAY,EAAE,WAAW,aACzB,6BAA6B,EAAE,wBAAwB;oHAEtD,qBAAqB,YAHvB,CAAC,YAAY,EAAE,WAAW,CAAC;4FAGzB,qBAAqB;kBALjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;oBACvE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;iBACnE","sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { FormsModule } from '@angular/forms';\n\nimport { SkyToggleSwitchComponent } from './toggle-switch.component';\n\nimport { SkyToggleSwitchLabelComponent } from './toggle-switch-label.component';\n\n@NgModule({\n declarations: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent],\n imports: [CommonModule, FormsModule],\n exports: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent],\n})\nexport class SkyToggleSwitchModule {}\n"]}
1
+ {"version":3,"file":"toggle-switch.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;;AAOrE,MAAM,OAAO,qBAAqB;;mHAArB,qBAAqB;oHAArB,qBAAqB,iBAJjB,6BAA6B,EAAE,wBAAwB,aAC5D,YAAY,EAAE,WAAW,aACzB,6BAA6B,EAAE,wBAAwB;oHAEtD,qBAAqB,YAHvB,CAAC,YAAY,EAAE,WAAW,CAAC;4FAGzB,qBAAqB;kBALjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;oBACvE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;iBACnE","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { SkyToggleSwitchLabelComponent } from './toggle-switch-label.component';\nimport { SkyToggleSwitchComponent } from './toggle-switch.component';\n\n@NgModule({\n declarations: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent],\n imports: [CommonModule, FormsModule],\n exports: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent],\n})\nexport class SkyToggleSwitchModule {}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-fixture.js","sourceRoot":"","sources":["../../../../../../libs/components/forms/testing/src/checkbox-fixture.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAG7B,YAAY,OAA8B,EAAE,SAAiB;QAC3D,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,cAAc,CACf,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;IACzD,CAAC;IAED;;OA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CAAC,QAAQ,CAAC;IAC1D,CAAC;IAED;;OAEG;IACI,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;IACH,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;IACH,CAAC;IAEO,oBAAoB;QAC1B,IAAI,CAAC,OAAO;aACT,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;aAC3C,aAAa,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAEO,kBAAkB;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC;IACnE,CAAC;IAEO,gBAAgB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACvE,CAAC;CACF","sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\nimport { DebugElement } from '@angular/core';\n\nimport { By } from '@angular/platform-browser';\n\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX checkbox component.\n */\nexport class SkyCheckboxFixture {\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-checkbox'\n );\n }\n\n /**\n * A flag indicating whether the checkbox is currently selected.\n */\n public get selected(): boolean {\n return this.getCheckboxInputEl().nativeElement.checked;\n }\n\n /**\n * The checkbox's label\n */\n public get labelText(): string {\n return SkyAppTestUtility.getText(\n this.debugEl.query(By.css('label.sky-checkbox-wrapper'))\n );\n }\n\n /**\n * The checkbox's icon type\n */\n public get iconType(): string {\n const classList = this.debugEl.query(By.css('.fa.sky-icon')).nativeElement\n .classList;\n\n for (let i = 0, n = classList.length; i < n; i++) {\n const cls = classList.item(i);\n\n if (cls.indexOf('fa-') === 0) {\n return cls.substr(3);\n }\n }\n }\n\n /**\n * The checkbox's type.\n */\n public get checkboxType(): string {\n const classList = this.getCheckboxBoxEl().nativeElement.classList;\n\n if (classList.contains('sky-switch-control-danger')) {\n return 'danger';\n }\n\n if (classList.contains('sky-switch-control-info')) {\n return 'info';\n }\n\n if (classList.contains('sky-switch-control-success')) {\n return 'success';\n }\n\n if (classList.contains('sky-switch-control-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n /**\n * A flag indicating whether the checkbox is currently disabled.\n */\n public get disabled(): boolean {\n return this.getCheckboxInputEl().nativeElement.disabled;\n }\n\n /**\n * Selects the checkbox.\n */\n public select(): void {\n if (!this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n /**\n * Deselects the checkbox.\n */\n public deselect(): void {\n if (this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n private clickCheckboxLabelEl(): void {\n this.debugEl\n .query(By.css('label.sky-checkbox-wrapper'))\n .nativeElement.click();\n }\n\n private getCheckboxInputEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-checkbox-wrapper input'));\n }\n\n private getCheckboxBoxEl(): DebugElement {\n return this.debugEl.query(By.css('label.sky-checkbox-wrapper span'));\n }\n}\n"]}
1
+ {"version":3,"file":"checkbox-fixture.js","sourceRoot":"","sources":["../../../../../../libs/components/forms/testing/src/checkbox-fixture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAG7B,YAAY,OAA8B,EAAE,SAAiB;QAC3D,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,cAAc,C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,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC;IAC1D,CAAC;IAED;;OAEG;IACI,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;IACH,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;IACH,CAAC;IAEO,oBAAoB;QAC1B,IAAI,CAAC,OAAO;aACT,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;aAC3C,aAAa,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAEO,kBAAkB;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC;IACnE,CAAC;IAEO,gBAAgB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACvE,CAAC;CACF","sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX checkbox component.\n */\nexport class SkyCheckboxFixture {\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-checkbox'\n );\n }\n\n /**\n * A flag indicating whether the checkbox is currently selected.\n */\n public get selected(): boolean {\n return this.getCheckboxInputEl().nativeElement.checked;\n }\n\n /**\n * The checkbox's label\n */\n public get labelText(): string {\n return SkyAppTestUtility.getText(\n this.debugEl.query(By.css('label.sky-checkbox-wrapper'))\n );\n }\n\n /**\n * The checkbox's icon type\n */\n public get iconType(): string {\n const classList = this.debugEl.query(By.css('.fa.sky-icon')).nativeElement\n .classList;\n\n for (let i = 0, n = classList.length; i < n; i++) {\n const cls = classList.item(i);\n\n if (cls.indexOf('fa-') === 0) {\n return cls.substr(3);\n }\n }\n }\n\n /**\n * The checkbox's type.\n */\n public get checkboxType(): string {\n const classList = this.getCheckboxBoxEl().nativeElement.classList;\n\n if (classList.contains('sky-switch-control-danger')) {\n return 'danger';\n }\n\n if (classList.contains('sky-switch-control-info')) {\n return 'info';\n }\n\n if (classList.contains('sky-switch-control-success')) {\n return 'success';\n }\n\n if (classList.contains('sky-switch-control-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n /**\n * A flag indicating whether the checkbox is currently disabled.\n */\n public get disabled(): boolean {\n return this.getCheckboxInputEl().nativeElement.disabled;\n }\n\n /**\n * Selects the checkbox.\n */\n public select(): void {\n if (!this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n /**\n * Deselects the checkbox.\n */\n public deselect(): void {\n if (this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n private clickCheckboxLabelEl(): void {\n this.debugEl\n .query(By.css('label.sky-checkbox-wrapper'))\n .nativeElement.click();\n }\n\n private getCheckboxInputEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-checkbox-wrapper input'));\n }\n\n private getCheckboxBoxEl(): DebugElement {\n return this.debugEl.query(By.css('label.sky-checkbox-wrapper span'));\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-forms-testing.js","sources":["../../../../../libs/components/forms/testing/src/checkbox-fixture.ts","../../../../../libs/components/forms/testing/src/skyux-forms-testing.ts"],"sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\nimport { DebugElement } from '@angular/core';\n\nimport { By } from '@angular/platform-browser';\n\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX checkbox component.\n */\nexport class SkyCheckboxFixture {\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-checkbox'\n );\n }\n\n /**\n * A flag indicating whether the checkbox is currently selected.\n */\n public get selected(): boolean {\n return this.getCheckboxInputEl().nativeElement.checked;\n }\n\n /**\n * The checkbox's label\n */\n public get labelText(): string {\n return SkyAppTestUtility.getText(\n this.debugEl.query(By.css('label.sky-checkbox-wrapper'))\n );\n }\n\n /**\n * The checkbox's icon type\n */\n public get iconType(): string {\n const classList = this.debugEl.query(By.css('.fa.sky-icon')).nativeElement\n .classList;\n\n for (let i = 0, n = classList.length; i < n; i++) {\n const cls = classList.item(i);\n\n if (cls.indexOf('fa-') === 0) {\n return cls.substr(3);\n }\n }\n }\n\n /**\n * The checkbox's type.\n */\n public get checkboxType(): string {\n const classList = this.getCheckboxBoxEl().nativeElement.classList;\n\n if (classList.contains('sky-switch-control-danger')) {\n return 'danger';\n }\n\n if (classList.contains('sky-switch-control-info')) {\n return 'info';\n }\n\n if (classList.contains('sky-switch-control-success')) {\n return 'success';\n }\n\n if (classList.contains('sky-switch-control-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n /**\n * A flag indicating whether the checkbox is currently disabled.\n */\n public get disabled(): boolean {\n return this.getCheckboxInputEl().nativeElement.disabled;\n }\n\n /**\n * Selects the checkbox.\n */\n public select(): void {\n if (!this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n /**\n * Deselects the checkbox.\n */\n public deselect(): void {\n if (this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n private clickCheckboxLabelEl(): void {\n this.debugEl\n .query(By.css('label.sky-checkbox-wrapper'))\n .nativeElement.click();\n }\n\n private getCheckboxInputEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-checkbox-wrapper input'));\n }\n\n private getCheckboxBoxEl(): DebugElement {\n return this.debugEl.query(By.css('label.sky-checkbox-wrapper span'));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAQA;;;MAGa,kBAAkB;IAG7B,YAAY,OAA8B,EAAE,SAAiB;QAC3D,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,cAAc,CACf,CAAC;KACH;;;;IAKD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;KACxD;;;;IAKD,IAAW,SAAS;QAClB,OAAO,iBAAiB,CAAC,OAAO,CAC9B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,CACzD,CAAC;KACH;;;;IAKD,IAAW,QAAQ;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa;aACvE,SAAS,CAAC;QAEb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAChD,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAE9B,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACtB;SACF;KACF;;;;IAKD,IAAW,YAAY;QACrB,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC;QAElE,IAAI,SAAS,CAAC,QAAQ,CAAC,2BAA2B,CAAC,EAAE;YACnD,OAAO,QAAQ,CAAC;SACjB;QAED,IAAI,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE;YACjD,OAAO,MAAM,CAAC;SACf;QAED,IAAI,SAAS,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE;YACpD,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,SAAS,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE;YACpD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,SAAS,CAAC;KAClB;;;;IAKD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC;KACzD;;;;IAKM,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;KACF;;;;IAKM,QAAQ;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;KACF;IAEO,oBAAoB;QAC1B,IAAI,CAAC,OAAO;aACT,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;aAC3C,aAAa,CAAC,KAAK,EAAE,CAAC;KAC1B;IAEO,kBAAkB;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC;KAClE;IAEO,gBAAgB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;KACtE;;;ACpHH;;;;;;"}
1
+ {"version":3,"file":"skyux-forms-testing.js","sources":["../../../../../libs/components/forms/testing/src/checkbox-fixture.ts","../../../../../libs/components/forms/testing/src/skyux-forms-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX checkbox component.\n */\nexport class SkyCheckboxFixture {\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-checkbox'\n );\n }\n\n /**\n * A flag indicating whether the checkbox is currently selected.\n */\n public get selected(): boolean {\n return this.getCheckboxInputEl().nativeElement.checked;\n }\n\n /**\n * The checkbox's label\n */\n public get labelText(): string {\n return SkyAppTestUtility.getText(\n this.debugEl.query(By.css('label.sky-checkbox-wrapper'))\n );\n }\n\n /**\n * The checkbox's icon type\n */\n public get iconType(): string {\n const classList = this.debugEl.query(By.css('.fa.sky-icon')).nativeElement\n .classList;\n\n for (let i = 0, n = classList.length; i < n; i++) {\n const cls = classList.item(i);\n\n if (cls.indexOf('fa-') === 0) {\n return cls.substr(3);\n }\n }\n }\n\n /**\n * The checkbox's type.\n */\n public get checkboxType(): string {\n const classList = this.getCheckboxBoxEl().nativeElement.classList;\n\n if (classList.contains('sky-switch-control-danger')) {\n return 'danger';\n }\n\n if (classList.contains('sky-switch-control-info')) {\n return 'info';\n }\n\n if (classList.contains('sky-switch-control-success')) {\n return 'success';\n }\n\n if (classList.contains('sky-switch-control-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n /**\n * A flag indicating whether the checkbox is currently disabled.\n */\n public get disabled(): boolean {\n return this.getCheckboxInputEl().nativeElement.disabled;\n }\n\n /**\n * Selects the checkbox.\n */\n public select(): void {\n if (!this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n /**\n * Deselects the checkbox.\n */\n public deselect(): void {\n if (this.selected) {\n this.clickCheckboxLabelEl();\n }\n }\n\n private clickCheckboxLabelEl(): void {\n this.debugEl\n .query(By.css('label.sky-checkbox-wrapper'))\n .nativeElement.click();\n }\n\n private getCheckboxInputEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-checkbox-wrapper input'));\n }\n\n private getCheckboxBoxEl(): DebugElement {\n return this.debugEl.query(By.css('label.sky-checkbox-wrapper span'));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAKA;;;MAGa,kBAAkB;IAG7B,YAAY,OAA8B,EAAE,SAAiB;QAC3D,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,cAAc,CACf,CAAC;KACH;;;;IAKD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;KACxD;;;;IAKD,IAAW,SAAS;QAClB,OAAO,iBAAiB,CAAC,OAAO,CAC9B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,CACzD,CAAC;KACH;;;;IAKD,IAAW,QAAQ;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa;aACvE,SAAS,CAAC;QAEb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAChD,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAE9B,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACtB;SACF;KACF;;;;IAKD,IAAW,YAAY;QACrB,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC;QAElE,IAAI,SAAS,CAAC,QAAQ,CAAC,2BAA2B,CAAC,EAAE;YACnD,OAAO,QAAQ,CAAC;SACjB;QAED,IAAI,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE;YACjD,OAAO,MAAM,CAAC;SACf;QAED,IAAI,SAAS,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE;YACpD,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,SAAS,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE;YACpD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,SAAS,CAAC;KAClB;;;;IAKD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC;KACzD;;;;IAKM,MAAM;QACX,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;KACF;;;;IAKM,QAAQ;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;KACF;IAEO,oBAAoB;QAC1B,IAAI,CAAC,OAAO;aACT,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;aAC3C,aAAa,CAAC,KAAK,EAAE,CAAC;KAC1B;IAEO,kBAAkB;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC;KAClE;IAEO,gBAAgB;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;KACtE;;;ACjHH;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import * as i1 from '@angular/common';
2
2
  import { CommonModule, DecimalPipe } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { NgModule, Component, ChangeDetectionStrategy, Directive, Input, forwardRef, EventEmitter, Self, Optional, Output, Injectable, ViewChild, ContentChildren, Pipe, ViewEncapsulation, ContentChild, HostListener, ElementRef } from '@angular/core';
3
5
  import * as i4 from '@angular/forms';
4
6
  import { NG_VALIDATORS, FormsModule, ReactiveFormsModule, CheckboxRequiredValidator, FormControlDirective, FormControlName, NgModel, NG_VALUE_ACCESSOR } from '@angular/forms';
5
- import * as i0 from '@angular/core';
6
- import { NgModule, Component, ChangeDetectionStrategy, Directive, Input, EventEmitter, Self, Optional, Output, forwardRef, Injectable, ViewChild, ContentChildren, Pipe, ViewEncapsulation, ContentChild, HostListener, ElementRef } from '@angular/core';
7
7
  import * as i2 from '@skyux/i18n';
8
8
  import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
9
9
  import * as i2$1 from '@skyux/indicators';
@@ -257,6 +257,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
257
257
  class SkyCheckboxChange {
258
258
  }
259
259
 
260
+ /**
261
+ * Specifies a label for the checkbox.
262
+ */
263
+ class SkyCheckboxLabelComponent {
264
+ }
265
+ SkyCheckboxLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
266
+ SkyCheckboxLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxLabelComponent, selector: "sky-checkbox-label", ngImport: i0, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, decorators: [{
268
+ type: Component,
269
+ args: [{
270
+ selector: 'sky-checkbox-label',
271
+ templateUrl: './checkbox-label.component.html',
272
+ }]
273
+ }] });
274
+
275
+ // tslint:disable:no-forward-ref
276
+ const SKY_CHECKBOX_REQUIRED_VALIDATOR = {
277
+ provide: NG_VALIDATORS,
278
+ useExisting: forwardRef(() => SkyCheckboxRequiredValidatorDirective),
279
+ multi: true,
280
+ };
281
+ // tslint:enable
282
+ /**
283
+ * Validator support for the `required` input on `sky-checkbox`.
284
+ * Angular's `CheckboxRequiredValidator` only works with `input type=checkbox`. This directive
285
+ * extends the angular validator to work with `sky-checkbox` tags.
286
+ * This is based on Angular Material's similar implementation:
287
+ * https://github.com/angular/components/blob/a415b52ead2ec202ba37edb7d7866b29dd790394/src/material/checkbox/checkbox-required-validator.ts
288
+ * @internal
289
+ */
290
+ class SkyCheckboxRequiredValidatorDirective extends CheckboxRequiredValidator {
291
+ }
292
+ SkyCheckboxRequiredValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
293
+ SkyCheckboxRequiredValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxRequiredValidatorDirective, selector: "sky-checkbox[required][formControlName],\n sky-checkbox[required][formControl], sky-checkbox[required][ngModel]", providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, decorators: [{
295
+ type: Directive,
296
+ args: [{
297
+ // eslint-disable-next-line @angular-eslint/directive-selector
298
+ selector: `sky-checkbox[required][formControlName],
299
+ sky-checkbox[required][formControl], sky-checkbox[required][ngModel]`,
300
+ providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR],
301
+ }]
302
+ }] });
303
+
260
304
  // Need to add the following to classes which contain static methods.
261
305
  // See: https://github.com/ng-packagr/ng-packagr/issues/641
262
306
  // @dynamic
@@ -460,7 +504,7 @@ class SkyCheckboxComponent {
460
504
  this.onTouched();
461
505
  }
462
506
  _emitChangeEvent() {
463
- let event = new SkyCheckboxChange();
507
+ const event = new SkyCheckboxChange();
464
508
  event.source = this;
465
509
  event.checked = this._checked;
466
510
  this._controlValueAccessorChangeFn(this._checked);
@@ -514,50 +558,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
514
558
  type: Output
515
559
  }] } });
516
560
 
517
- /**
518
- * Specifies a label for the checkbox.
519
- */
520
- class SkyCheckboxLabelComponent {
521
- }
522
- SkyCheckboxLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
523
- SkyCheckboxLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxLabelComponent, selector: "sky-checkbox-label", ngImport: i0, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, decorators: [{
525
- type: Component,
526
- args: [{
527
- selector: 'sky-checkbox-label',
528
- templateUrl: './checkbox-label.component.html',
529
- }]
530
- }] });
531
-
532
- // tslint:disable:no-forward-ref
533
- const SKY_CHECKBOX_REQUIRED_VALIDATOR = {
534
- provide: NG_VALIDATORS,
535
- useExisting: forwardRef(() => SkyCheckboxRequiredValidatorDirective),
536
- multi: true,
537
- };
538
- // tslint:enable
539
- /**
540
- * Validator support for the `required` input on `sky-checkbox`.
541
- * Angular's `CheckboxRequiredValidator` only works with `input type=checkbox`. This directive
542
- * extends the angular validator to work with `sky-checkbox` tags.
543
- * This is based on Angular Material's similar implementation:
544
- * https://github.com/angular/components/blob/a415b52ead2ec202ba37edb7d7866b29dd790394/src/material/checkbox/checkbox-required-validator.ts
545
- * @internal
546
- */
547
- class SkyCheckboxRequiredValidatorDirective extends CheckboxRequiredValidator {
548
- }
549
- SkyCheckboxRequiredValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
550
- SkyCheckboxRequiredValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxRequiredValidatorDirective, selector: "sky-checkbox[required][formControlName],\n sky-checkbox[required][formControl], sky-checkbox[required][ngModel]", providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, decorators: [{
552
- type: Directive,
553
- args: [{
554
- // eslint-disable-next-line @angular-eslint/directive-selector
555
- selector: `sky-checkbox[required][formControlName],
556
- sky-checkbox[required][formControl], sky-checkbox[required][ngModel]`,
557
- providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR],
558
- }]
559
- }] });
560
-
561
561
  class SkyCheckboxModule {
562
562
  }
563
563
  SkyCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -606,9 +606,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
606
606
  */
607
607
  class SkyFileAttachmentService {
608
608
  checkFiles(files, minFileSize, maxFileSize, acceptedTypes, validateFn) {
609
- let fileResults = [];
609
+ const fileResults = [];
610
610
  for (let index = 0; index < files.length; index++) {
611
- let fileItem = {
611
+ const fileItem = {
612
612
  file: files.item(index),
613
613
  };
614
614
  if (fileItem.file.size < minFileSize) {
@@ -627,8 +627,8 @@ class SkyFileAttachmentService {
627
627
  fileResults.push(fileItem);
628
628
  }
629
629
  else if (validateFn) {
630
- let errorParam = validateFn(fileItem);
631
- if (!!errorParam) {
630
+ const errorParam = validateFn(fileItem);
631
+ if (errorParam) {
632
632
  fileItem.errorType = 'validate';
633
633
  fileItem.errorParam = errorParam;
634
634
  }
@@ -661,8 +661,8 @@ class SkyFileAttachmentService {
661
661
  if (!fileType) {
662
662
  return true;
663
663
  }
664
- let acceptedTypesUpper = acceptedTypes.toUpperCase();
665
- let typeArray = acceptedTypesUpper.split(',');
664
+ const acceptedTypesUpper = acceptedTypes.toUpperCase();
665
+ const typeArray = acceptedTypesUpper.split(',');
666
666
  return !this.fileTypeInArray(typeArray, fileType.toUpperCase());
667
667
  }
668
668
  fileTypeInArray(typeArray, fileType) {
@@ -698,7 +698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
698
698
  */
699
699
  class SkyFileItemService {
700
700
  isFile(fileItem) {
701
- let file = fileItem.file;
701
+ const file = fileItem.file;
702
702
  /* tslint:disable */
703
703
  return (file &&
704
704
  file !== undefined &&
@@ -728,7 +728,7 @@ class SkyFileItemService {
728
728
  /* istanbul ignore else */
729
729
  /* sanity check */
730
730
  if (fileItem) {
731
- let file = fileItem.file;
731
+ const file = fileItem.file;
732
732
  if (file) {
733
733
  /* istanbul ignore next */
734
734
  name = file.name || '';
@@ -746,7 +746,7 @@ class SkyFileItemService {
746
746
  /* istanbul ignore else */
747
747
  /* sanity check */
748
748
  if (fileItem) {
749
- let file = fileItem.file;
749
+ const file = fileItem.file;
750
750
  if (file) {
751
751
  fileType = file.type || '';
752
752
  }
@@ -955,7 +955,7 @@ class SkyFileAttachmentComponent {
955
955
  getFileName(truncate = true) {
956
956
  if (this.value) {
957
957
  // tslint:disable-next-line: max-line-length
958
- let dropName = this.fileItemService.isFile(this.value) && this.value.file.name
958
+ const dropName = this.fileItemService.isFile(this.value) && this.value.file.name
959
959
  ? this.value.file.name
960
960
  : this.value.url;
961
961
  if (truncate && dropName.length > 26) {
@@ -1023,8 +1023,8 @@ class SkyFileAttachmentComponent {
1023
1023
  }
1024
1024
  handleFiles(files) {
1025
1025
  // tslint:disable-next-line: max-line-length
1026
- let processedFiles = this.fileAttachmentService.checkFiles(files, this.minFileSize, this.maxFileSize, this.acceptedTypes, this.validateFn);
1027
- for (let file of processedFiles) {
1026
+ const processedFiles = this.fileAttachmentService.checkFiles(files, this.minFileSize, this.maxFileSize, this.acceptedTypes, this.validateFn);
1027
+ for (const file of processedFiles) {
1028
1028
  if (file.errorType) {
1029
1029
  this.emitFileChangeEvent(file);
1030
1030
  }
@@ -1237,13 +1237,13 @@ class SkyFileDropComponent {
1237
1237
  reader.readAsDataURL(file.file);
1238
1238
  }
1239
1239
  handleFiles(files) {
1240
- let validFileArray = [];
1241
- let rejectedFileArray = [];
1242
- let totalFiles = files.length;
1243
- let fileDrop = this;
1240
+ const validFileArray = [];
1241
+ const rejectedFileArray = [];
1242
+ const totalFiles = files.length;
1243
+ const fileDrop = this;
1244
1244
  // tslint:disable-next-line: max-line-length
1245
- let processedFiles = this.fileAttachmentService.checkFiles(files, this.minFileSize, this.maxFileSize, this.acceptedTypes, this.validateFn);
1246
- for (let file of processedFiles) {
1245
+ const processedFiles = this.fileAttachmentService.checkFiles(files, this.minFileSize, this.maxFileSize, this.acceptedTypes, this.validateFn);
1246
+ for (const file of processedFiles) {
1247
1247
  if (file.errorType) {
1248
1248
  this.filesRejected(file, validFileArray, rejectedFileArray, totalFiles);
1249
1249
  }
@@ -1368,7 +1368,7 @@ class SkyFileItemComponent {
1368
1368
  return this.fileItem.url;
1369
1369
  }
1370
1370
  ngDoCheck() {
1371
- let changes = this.differ.diff(this.fileItem);
1371
+ const changes = this.differ.diff(this.fileItem);
1372
1372
  if (changes) {
1373
1373
  let cls, extensionUpper = this.fileItemService.getFileExtensionUpper(this.fileItem), fileTypeUpper;
1374
1374
  switch (extensionUpper) {
@@ -1914,30 +1914,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1914
1914
  type: Output
1915
1915
  }] } });
1916
1916
 
1917
- /**
1918
- * Specifies a label for the radio button.
1919
- */
1920
- class SkyRadioLabelComponent {
1921
- // When clicking on a checkbox label, Angular registers two click events.
1922
- // This handler ignores all events except for those that deal
1923
- // with the checkbox input explicitly.
1924
- onClick(event) {
1925
- event.stopPropagation();
1926
- }
1927
- }
1928
- SkyRadioLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1929
- SkyRadioLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyRadioLabelComponent, selector: "sky-radio-label", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
1930
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioLabelComponent, decorators: [{
1931
- type: Component,
1932
- args: [{
1933
- selector: 'sky-radio-label',
1934
- templateUrl: './radio-label.component.html',
1935
- }]
1936
- }], propDecorators: { onClick: [{
1937
- type: HostListener,
1938
- args: ['click', ['$event']]
1939
- }] } });
1940
-
1941
1917
  let nextUniqueId = 0;
1942
1918
  /**
1943
1919
  * Organizes radio buttons into a group. It is required for radio
@@ -2153,6 +2129,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
2153
2129
  args: [SkyRadioComponent, { descendants: true }]
2154
2130
  }] } });
2155
2131
 
2132
+ /**
2133
+ * Specifies a label for the radio button.
2134
+ */
2135
+ class SkyRadioLabelComponent {
2136
+ // When clicking on a checkbox label, Angular registers two click events.
2137
+ // This handler ignores all events except for those that deal
2138
+ // with the checkbox input explicitly.
2139
+ onClick(event) {
2140
+ event.stopPropagation();
2141
+ }
2142
+ }
2143
+ SkyRadioLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2144
+ SkyRadioLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyRadioLabelComponent, selector: "sky-radio-label", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
2145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioLabelComponent, decorators: [{
2146
+ type: Component,
2147
+ args: [{
2148
+ selector: 'sky-radio-label',
2149
+ templateUrl: './radio-label.component.html',
2150
+ }]
2151
+ }], propDecorators: { onClick: [{
2152
+ type: HostListener,
2153
+ args: ['click', ['$event']]
2154
+ }] } });
2155
+
2156
2156
  class SkyRadioModule {
2157
2157
  }
2158
2158
  SkyRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -2308,21 +2308,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
2308
2308
  }]
2309
2309
  }] });
2310
2310
 
2311
- /**
2312
- * Specifies the header to display in a selection box.
2313
- */
2314
- class SkySelectionBoxHeaderComponent {
2315
- }
2316
- SkySelectionBoxHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2317
- SkySelectionBoxHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxHeaderComponent, selector: "sky-selection-box-header", ngImport: i0, template: "<ng-content></ng-content>\n" });
2318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, decorators: [{
2319
- type: Component,
2320
- args: [{
2321
- selector: 'sky-selection-box-header',
2322
- templateUrl: './selection-box-header.component.html',
2323
- }]
2324
- }] });
2325
-
2326
2311
  /**
2327
2312
  * Creates a button to present users with a choice or question before proceeding with a one-time process.
2328
2313
  */
@@ -2542,6 +2527,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
2542
2527
  args: ['window:resize']
2543
2528
  }] } });
2544
2529
 
2530
+ /**
2531
+ * Specifies the header to display in a selection box.
2532
+ */
2533
+ class SkySelectionBoxHeaderComponent {
2534
+ }
2535
+ SkySelectionBoxHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2536
+ SkySelectionBoxHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxHeaderComponent, selector: "sky-selection-box-header", ngImport: i0, template: "<ng-content></ng-content>\n" });
2537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, decorators: [{
2538
+ type: Component,
2539
+ args: [{
2540
+ selector: 'sky-selection-box-header',
2541
+ templateUrl: './selection-box-header.component.html',
2542
+ }]
2543
+ }] });
2544
+
2545
2545
  class SkySelectionBoxModule {
2546
2546
  }
2547
2547
  SkySelectionBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });