@skyux/forms 5.0.0-beta.4 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +0 -1
  2. package/bundles/skyux-forms-testing.umd.js +7 -4
  3. package/bundles/skyux-forms-testing.umd.js.map +1 -1
  4. package/bundles/skyux-forms.umd.js +341 -363
  5. package/bundles/skyux-forms.umd.js.map +1 -1
  6. package/documentation.json +301 -332
  7. package/esm2015/modules/character-counter/character-counter-indicator.component.js +6 -6
  8. package/esm2015/modules/character-counter/character-counter.directive.js +17 -15
  9. package/esm2015/modules/character-counter/character-counter.module.js +10 -10
  10. package/esm2015/modules/checkbox/checkbox-change.js +1 -1
  11. package/esm2015/modules/checkbox/checkbox-label.component.js +5 -5
  12. package/esm2015/modules/checkbox/checkbox-required-validator.directive.js +7 -6
  13. package/esm2015/modules/checkbox/checkbox.component.js +8 -7
  14. package/esm2015/modules/checkbox/checkbox.module.js +10 -20
  15. package/esm2015/modules/file-attachment/file-attachment-label.component.js +6 -8
  16. package/esm2015/modules/file-attachment/file-attachment.component.js +23 -19
  17. package/esm2015/modules/file-attachment/file-attachment.service.js +8 -6
  18. package/esm2015/modules/file-attachment/file-attachments.module.js +10 -16
  19. package/esm2015/modules/file-attachment/file-drop.component.js +10 -13
  20. package/esm2015/modules/file-attachment/file-item-error-type.js +1 -1
  21. package/esm2015/modules/file-attachment/file-item.component.js +6 -6
  22. package/esm2015/modules/file-attachment/file-item.js +1 -1
  23. package/esm2015/modules/file-attachment/file-item.service.js +9 -6
  24. package/esm2015/modules/file-attachment/file-size.pipe.js +7 -6
  25. package/esm2015/modules/file-attachment/types/file-attachment-change.js +1 -1
  26. package/esm2015/modules/file-attachment/types/file-attachment-click.js +1 -1
  27. package/esm2015/modules/file-attachment/types/file-drop-change.js +1 -1
  28. package/esm2015/modules/input-box/input-box-adapter.service.js +5 -5
  29. package/esm2015/modules/input-box/input-box-host.service.js +4 -4
  30. package/esm2015/modules/input-box/input-box-populate-args.js +1 -1
  31. package/esm2015/modules/input-box/input-box.component.js +15 -19
  32. package/esm2015/modules/input-box/input-box.module.js +8 -19
  33. package/esm2015/modules/radio/radio-group.component.js +14 -17
  34. package/esm2015/modules/radio/radio-label.component.js +5 -5
  35. package/esm2015/modules/radio/radio.component.js +9 -13
  36. package/esm2015/modules/radio/radio.module.js +9 -25
  37. package/esm2015/modules/radio/types/radio-change.js +1 -1
  38. package/esm2015/modules/selection-box/selection-box-adapter.service.js +10 -8
  39. package/esm2015/modules/selection-box/selection-box-description.component.js +5 -5
  40. package/esm2015/modules/selection-box/selection-box-grid.component.js +12 -13
  41. package/esm2015/modules/selection-box/selection-box-header.component.js +5 -5
  42. package/esm2015/modules/selection-box/selection-box.component.js +12 -10
  43. package/esm2015/modules/selection-box/selection-box.module.js +10 -21
  44. package/esm2015/modules/selection-box/types/selection-box-grid-align-items.js +1 -1
  45. package/esm2015/modules/shared/forms-utility.js +1 -1
  46. package/esm2015/modules/shared/sky-forms-resources.module.js +60 -12
  47. package/esm2015/modules/toggle-switch/toggle-switch-label.component.js +5 -5
  48. package/esm2015/modules/toggle-switch/toggle-switch.component.js +13 -13
  49. package/esm2015/modules/toggle-switch/toggle-switch.module.js +8 -23
  50. package/esm2015/testing/checkbox-fixture.js +6 -3
  51. package/fesm2015/skyux-forms-testing.js +5 -2
  52. package/fesm2015/skyux-forms-testing.js.map +1 -1
  53. package/fesm2015/skyux-forms.js +302 -322
  54. package/fesm2015/skyux-forms.js.map +1 -1
  55. package/modules/input-box/input-box.component.d.ts +5 -3
  56. package/package.json +8 -8
package/README.md CHANGED
@@ -3,4 +3,3 @@
3
3
  [![npm](https://img.shields.io/npm/v/@skyux/forms.svg)](https://www.npmjs.com/package/@skyux/forms)
4
4
  ![SKY UX CI](https://github.com/blackbaud/skyux-forms/workflows/SKY%20UX%20CI/badge.svg)
5
5
  [![coverage](https://codecov.io/gh/blackbaud/skyux-forms/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/gh/blackbaud/skyux-forms/branch/master)
6
-
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/platform-browser'), require('@skyux-sdk/testing')) :
3
3
  typeof define === 'function' && define.amd ? define('@skyux/forms/testing', ['exports', '@angular/platform-browser', '@skyux-sdk/testing'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.forms = global.skyux.forms || {}, global.skyux.forms.testing = {}), global.ng.platformBrowser, global.testing));
5
- }(this, (function (exports, platformBrowser, testing) { 'use strict';
5
+ })(this, (function (exports, platformBrowser, testing) { 'use strict';
6
6
 
7
7
  /**
8
8
  * Allows interaction with a SKY UX checkbox component.
@@ -36,7 +36,8 @@
36
36
  * The checkbox's icon type
37
37
  */
38
38
  get: function () {
39
- var classList = this.debugEl.query(platformBrowser.By.css('.fa.sky-icon')).nativeElement.classList;
39
+ var classList = this.debugEl.query(platformBrowser.By.css('.fa.sky-icon')).nativeElement
40
+ .classList;
40
41
  for (var i = 0, n = classList.length; i < n; i++) {
41
42
  var cls = classList.item(i);
42
43
  if (cls.indexOf('fa-') === 0) {
@@ -97,7 +98,9 @@
97
98
  }
98
99
  };
99
100
  SkyCheckboxFixture.prototype.clickCheckboxLabelEl = function () {
100
- this.debugEl.query(platformBrowser.By.css('label.sky-checkbox-wrapper')).nativeElement.click();
101
+ this.debugEl
102
+ .query(platformBrowser.By.css('label.sky-checkbox-wrapper'))
103
+ .nativeElement.click();
101
104
  };
102
105
  SkyCheckboxFixture.prototype.getCheckboxInputEl = function () {
103
106
  return this.debugEl.query(platformBrowser.By.css('.sky-checkbox-wrapper input'));
@@ -116,5 +119,5 @@
116
119
 
117
120
  Object.defineProperty(exports, '__esModule', { value: true });
118
121
 
119
- })));
122
+ }));
120
123
  //# sourceMappingURL=skyux-forms-testing.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-forms-testing.umd.js","sources":["../../../projects/forms/testing/src/checkbox-fixture.ts","../../../projects/forms/testing/src/skyux-forms-testing.ts"],"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\n/**\n * Allows interaction with a SKY UX checkbox component.\n */\nexport class SkyCheckboxFixture {\n\n private debugEl: DebugElement;\n\n constructor(\n fixture: ComponentFixture<any>,\n skyTestId: string\n ) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(fixture, skyTestId, 'sky-checkbox');\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(\n By.css('.fa.sky-icon')\n ).nativeElement.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.query(\n By.css('label.sky-checkbox-wrapper')\n ).nativeElement.click();\n }\n\n private getCheckboxInputEl(): DebugElement {\n return this.debugEl.query(\n By.css('.sky-checkbox-wrapper input')\n );\n }\n\n private getCheckboxBoxEl(): DebugElement {\n return this.debugEl.query(\n By.css('label.sky-checkbox-wrapper span')\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["SkyAppTestUtility","By"],"mappings":";;;;;;IAgBA;;;;QAOE,4BACE,OAA8B,EAC9B,SAAiB;YAEjB,IAAI,CAAC,OAAO,GAAGA,yBAAiB,CAAC,uBAAuB,CAAC,OAAO,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;SAC9F;QAKD,sBAAW,wCAAQ;;;;iBAAnB;gBACI,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;aAC1D;;;WAAA;QAKD,sBAAW,yCAAS;;;;iBAApB;gBACE,OAAOA,yBAAiB,CAAC,OAAO,CAC9B,IAAI,CAAC,OAAO,CAAC,KAAK,CAACC,kBAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,CACzD,CAAC;aACH;;;WAAA;QAKD,sBAAW,wCAAQ;;;;iBAAnB;gBACE,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAClCA,kBAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CACvB,CAAC,aAAa,CAAC,SAAS,CAAC;gBAE1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;oBAChD,IAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBAE9B,IAAI,GAAG,CAAC,OAAO,CAAC,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,CACtC,CAAC;SACH;QAEO,6CAAgB,GAAhB;YACN,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CACvBA,kBAAE,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAC1C,CAAC;SACH;iCACF;KAAA;;IClID;;;;;;;;;;;;"}
1
+ {"version":3,"file":"skyux-forms-testing.umd.js","sources":["../../../projects/forms/testing/src/checkbox-fixture.ts","../../../projects/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":["SkyAppTestUtility","By"],"mappings":";;;;;;IAQA;;;;QAME,4BAAY,OAA8B,EAAE,SAAiB;YAC3D,IAAI,CAAC,OAAO,GAAGA,yBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,cAAc,CACf,CAAC;SACH;QAKD,sBAAW,wCAAQ;;;;iBAAnB;gBACE,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;aACxD;;;WAAA;QAKD,sBAAW,yCAAS;;;;iBAApB;gBACE,OAAOA,yBAAiB,CAAC,OAAO,CAC9B,IAAI,CAAC,OAAO,CAAC,KAAK,CAACC,kBAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,CACzD,CAAC;aACH;;;WAAA;QAKD,sBAAW,wCAAQ;;;;iBAAnB;gBACE,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAACA,kBAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa;qBACvE,SAAS,CAAC;gBAEb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC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