@skyux/forms 5.7.2 → 6.0.0-beta.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.
- package/documentation.json +630 -630
- package/esm2020/index.mjs +43 -0
- package/esm2020/lib/modules/character-counter/character-counter-indicator.component.mjs +32 -0
- package/esm2020/lib/modules/character-counter/character-counter.directive.mjs +84 -0
- package/esm2020/lib/modules/character-counter/character-counter.module.mjs +46 -0
- package/esm2020/lib/modules/checkbox/checkbox-change.mjs +6 -0
- package/esm2020/lib/modules/checkbox/checkbox-label.component.mjs +14 -0
- package/esm2020/lib/modules/checkbox/checkbox-required-validator.directive.mjs +32 -0
- package/esm2020/lib/modules/checkbox/checkbox.component.mjs +237 -0
- package/esm2020/lib/modules/checkbox/checkbox.module.mjs +34 -0
- package/esm2020/lib/modules/file-attachment/file-attachment-label.component.mjs +14 -0
- package/esm2020/lib/modules/file-attachment/file-attachment.component.mjs +325 -0
- package/esm2020/lib/modules/file-attachment/file-attachment.service.mjs +94 -0
- package/esm2020/lib/modules/file-attachment/file-attachments.module.mjs +68 -0
- package/esm2020/lib/modules/file-attachment/file-drop.component.mjs +217 -0
- package/esm2020/lib/modules/file-attachment/file-item-error-type.mjs +2 -0
- package/esm2020/lib/modules/file-attachment/file-item.component.mjs +112 -0
- package/esm2020/lib/modules/file-attachment/file-item.mjs +2 -0
- package/esm2020/lib/modules/file-attachment/file-item.service.mjs +72 -0
- package/esm2020/lib/modules/file-attachment/file-link.mjs +2 -0
- package/esm2020/lib/modules/file-attachment/file-size.pipe.mjs +60 -0
- package/esm2020/lib/modules/file-attachment/types/file-attachment-change.mjs +2 -0
- package/esm2020/lib/modules/file-attachment/types/file-attachment-click.mjs +2 -0
- package/esm2020/lib/modules/file-attachment/types/file-drop-change.mjs +2 -0
- package/esm2020/lib/modules/input-box/input-box-adapter.service.mjs +35 -0
- package/esm2020/lib/modules/input-box/input-box-host.service.mjs +19 -0
- package/esm2020/lib/modules/input-box/input-box-populate-args.mjs +2 -0
- package/esm2020/lib/modules/input-box/input-box.component.mjs +89 -0
- package/esm2020/lib/modules/input-box/input-box.module.mjs +19 -0
- package/esm2020/lib/modules/radio/radio-group.component.mjs +220 -0
- package/esm2020/lib/modules/radio/radio-label.component.mjs +23 -0
- package/esm2020/lib/modules/radio/radio.component.mjs +256 -0
- package/esm2020/lib/modules/radio/radio.module.mjs +28 -0
- package/esm2020/lib/modules/radio/types/radio-change.mjs +2 -0
- package/esm2020/lib/modules/selection-box/selection-box-adapter.service.mjs +124 -0
- package/esm2020/lib/modules/selection-box/selection-box-description.component.mjs +14 -0
- package/esm2020/lib/modules/selection-box/selection-box-grid.component.mjs +126 -0
- package/esm2020/lib/modules/selection-box/selection-box-header.component.mjs +14 -0
- package/esm2020/lib/modules/selection-box/selection-box.component.mjs +101 -0
- package/esm2020/lib/modules/selection-box/selection-box.module.mjs +40 -0
- package/esm2020/lib/modules/selection-box/types/selection-box-grid-align-items-type.mjs +2 -0
- package/esm2020/lib/modules/selection-box/types/selection-box-grid-align-items.mjs +2 -0
- package/esm2020/lib/modules/shared/forms-utility.mjs +26 -0
- package/esm2020/lib/modules/shared/sky-forms-resources.module.mjs +89 -0
- package/esm2020/lib/modules/toggle-switch/toggle-switch-label.component.mjs +14 -0
- package/esm2020/lib/modules/toggle-switch/toggle-switch.component.mjs +153 -0
- package/esm2020/lib/modules/toggle-switch/toggle-switch.module.mjs +20 -0
- package/esm2020/lib/modules/toggle-switch/types/toggle-switch-change.mjs +2 -0
- package/esm2020/skyux-forms.mjs +5 -0
- package/esm2020/testing/checkbox-fixture.mjs +88 -0
- package/esm2020/testing/public-api.mjs +2 -0
- package/esm2020/testing/skyux-forms-testing.mjs +5 -0
- package/fesm2015/{skyux-forms-testing.js → skyux-forms-testing.mjs} +1 -1
- package/fesm2015/skyux-forms-testing.mjs.map +1 -0
- package/fesm2015/skyux-forms.mjs +2691 -0
- package/fesm2015/skyux-forms.mjs.map +1 -0
- package/{esm2015/testing/checkbox-fixture.js → fesm2020/skyux-forms-testing.mjs} +9 -2
- package/fesm2020/skyux-forms-testing.mjs.map +1 -0
- package/fesm2020/skyux-forms.mjs +2685 -0
- package/fesm2020/skyux-forms.mjs.map +1 -0
- package/package.json +40 -16
- package/testing/package.json +5 -5
- package/bundles/skyux-forms-testing.umd.js +0 -123
- package/bundles/skyux-forms.umd.js +0 -3422
- package/esm2015/index.js +0 -43
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/modules/character-counter/character-counter-indicator.component.js +0 -37
- package/esm2015/lib/modules/character-counter/character-counter-indicator.component.js.map +0 -1
- package/esm2015/lib/modules/character-counter/character-counter.directive.js +0 -84
- package/esm2015/lib/modules/character-counter/character-counter.directive.js.map +0 -1
- package/esm2015/lib/modules/character-counter/character-counter.module.js +0 -46
- package/esm2015/lib/modules/character-counter/character-counter.module.js.map +0 -1
- package/esm2015/lib/modules/checkbox/checkbox-change.js +0 -6
- package/esm2015/lib/modules/checkbox/checkbox-change.js.map +0 -1
- package/esm2015/lib/modules/checkbox/checkbox-label.component.js +0 -17
- package/esm2015/lib/modules/checkbox/checkbox-label.component.js.map +0 -1
- package/esm2015/lib/modules/checkbox/checkbox-required-validator.directive.js +0 -32
- package/esm2015/lib/modules/checkbox/checkbox-required-validator.directive.js.map +0 -1
- package/esm2015/lib/modules/checkbox/checkbox.component.js +0 -241
- package/esm2015/lib/modules/checkbox/checkbox.component.js.map +0 -1
- package/esm2015/lib/modules/checkbox/checkbox.module.js +0 -34
- package/esm2015/lib/modules/checkbox/checkbox.module.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js +0 -19
- package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-attachment.component.js +0 -331
- package/esm2015/lib/modules/file-attachment/file-attachment.component.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-attachment.service.js +0 -94
- package/esm2015/lib/modules/file-attachment/file-attachment.service.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-attachments.module.js +0 -68
- package/esm2015/lib/modules/file-attachment/file-attachments.module.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-drop.component.js +0 -222
- package/esm2015/lib/modules/file-attachment/file-drop.component.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-item-error-type.js +0 -2
- package/esm2015/lib/modules/file-attachment/file-item-error-type.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-item.component.js +0 -116
- package/esm2015/lib/modules/file-attachment/file-item.component.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-item.js +0 -2
- package/esm2015/lib/modules/file-attachment/file-item.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-item.service.js +0 -72
- package/esm2015/lib/modules/file-attachment/file-item.service.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-link.js +0 -2
- package/esm2015/lib/modules/file-attachment/file-link.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/file-size.pipe.js +0 -60
- package/esm2015/lib/modules/file-attachment/file-size.pipe.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/types/file-attachment-change.js +0 -2
- package/esm2015/lib/modules/file-attachment/types/file-attachment-change.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/types/file-attachment-click.js +0 -2
- package/esm2015/lib/modules/file-attachment/types/file-attachment-click.js.map +0 -1
- package/esm2015/lib/modules/file-attachment/types/file-drop-change.js +0 -2
- package/esm2015/lib/modules/file-attachment/types/file-drop-change.js.map +0 -1
- package/esm2015/lib/modules/input-box/input-box-adapter.service.js +0 -35
- package/esm2015/lib/modules/input-box/input-box-adapter.service.js.map +0 -1
- package/esm2015/lib/modules/input-box/input-box-host.service.js +0 -19
- package/esm2015/lib/modules/input-box/input-box-host.service.js.map +0 -1
- package/esm2015/lib/modules/input-box/input-box-populate-args.js +0 -2
- package/esm2015/lib/modules/input-box/input-box-populate-args.js.map +0 -1
- package/esm2015/lib/modules/input-box/input-box.component.js +0 -97
- package/esm2015/lib/modules/input-box/input-box.component.js.map +0 -1
- package/esm2015/lib/modules/input-box/input-box.module.js +0 -19
- package/esm2015/lib/modules/input-box/input-box.module.js.map +0 -1
- package/esm2015/lib/modules/radio/radio-group.component.js +0 -223
- package/esm2015/lib/modules/radio/radio-group.component.js.map +0 -1
- package/esm2015/lib/modules/radio/radio-label.component.js +0 -26
- package/esm2015/lib/modules/radio/radio-label.component.js.map +0 -1
- package/esm2015/lib/modules/radio/radio.component.js +0 -262
- package/esm2015/lib/modules/radio/radio.component.js.map +0 -1
- package/esm2015/lib/modules/radio/radio.module.js +0 -28
- package/esm2015/lib/modules/radio/radio.module.js.map +0 -1
- package/esm2015/lib/modules/radio/types/radio-change.js +0 -2
- package/esm2015/lib/modules/radio/types/radio-change.js.map +0 -1
- package/esm2015/lib/modules/selection-box/selection-box-adapter.service.js +0 -124
- package/esm2015/lib/modules/selection-box/selection-box-adapter.service.js.map +0 -1
- package/esm2015/lib/modules/selection-box/selection-box-description.component.js +0 -17
- package/esm2015/lib/modules/selection-box/selection-box-description.component.js.map +0 -1
- package/esm2015/lib/modules/selection-box/selection-box-grid.component.js +0 -132
- package/esm2015/lib/modules/selection-box/selection-box-grid.component.js.map +0 -1
- package/esm2015/lib/modules/selection-box/selection-box-header.component.js +0 -17
- package/esm2015/lib/modules/selection-box/selection-box-header.component.js.map +0 -1
- package/esm2015/lib/modules/selection-box/selection-box.component.js +0 -107
- package/esm2015/lib/modules/selection-box/selection-box.component.js.map +0 -1
- package/esm2015/lib/modules/selection-box/selection-box.module.js +0 -40
- package/esm2015/lib/modules/selection-box/selection-box.module.js.map +0 -1
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items-type.js +0 -2
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items-type.js.map +0 -1
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items.js +0 -2
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items.js.map +0 -1
- package/esm2015/lib/modules/shared/forms-utility.js +0 -26
- package/esm2015/lib/modules/shared/forms-utility.js.map +0 -1
- package/esm2015/lib/modules/shared/sky-forms-resources.module.js +0 -89
- package/esm2015/lib/modules/shared/sky-forms-resources.module.js.map +0 -1
- package/esm2015/lib/modules/toggle-switch/toggle-switch-label.component.js +0 -18
- package/esm2015/lib/modules/toggle-switch/toggle-switch-label.component.js.map +0 -1
- package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js +0 -159
- package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js.map +0 -1
- package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js +0 -20
- package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js.map +0 -1
- package/esm2015/lib/modules/toggle-switch/types/toggle-switch-change.js +0 -2
- package/esm2015/lib/modules/toggle-switch/types/toggle-switch-change.js.map +0 -1
- package/esm2015/skyux-forms.js +0 -5
- package/esm2015/skyux-forms.js.map +0 -1
- package/esm2015/testing/checkbox-fixture.js.map +0 -1
- package/esm2015/testing/public-api.js +0 -2
- package/esm2015/testing/public-api.js.map +0 -1
- package/esm2015/testing/skyux-forms-testing.js +0 -5
- package/esm2015/testing/skyux-forms-testing.js.map +0 -1
- package/fesm2015/skyux-forms-testing.js.map +0 -1
- package/fesm2015/skyux-forms.js +0 -2765
- package/fesm2015/skyux-forms.js.map +0 -1
package/esm2015/index.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export * from './lib/modules/character-counter/character-counter.module';
|
|
2
|
-
export * from './lib/modules/checkbox/checkbox-change';
|
|
3
|
-
export * from './lib/modules/checkbox/checkbox.module';
|
|
4
|
-
export * from './lib/modules/file-attachment/types/file-attachment-change';
|
|
5
|
-
export * from './lib/modules/file-attachment/types/file-attachment-click';
|
|
6
|
-
export * from './lib/modules/file-attachment/types/file-drop-change';
|
|
7
|
-
export * from './lib/modules/file-attachment/file-attachments.module';
|
|
8
|
-
export * from './lib/modules/file-attachment/file-item';
|
|
9
|
-
export * from './lib/modules/file-attachment/file-item-error-type';
|
|
10
|
-
export * from './lib/modules/file-attachment/file-link';
|
|
11
|
-
export * from './lib/modules/file-attachment/file-size.pipe';
|
|
12
|
-
export * from './lib/modules/input-box/input-box.module';
|
|
13
|
-
export * from './lib/modules/input-box/input-box-host.service';
|
|
14
|
-
export * from './lib/modules/input-box/input-box-populate-args';
|
|
15
|
-
export * from './lib/modules/radio/types/radio-change';
|
|
16
|
-
export * from './lib/modules/radio/radio.module';
|
|
17
|
-
export * from './lib/modules/selection-box/types/selection-box-grid-align-items';
|
|
18
|
-
export * from './lib/modules/selection-box/types/selection-box-grid-align-items-type';
|
|
19
|
-
export * from './lib/modules/selection-box/selection-box.module';
|
|
20
|
-
export * from './lib/modules/toggle-switch/types/toggle-switch-change';
|
|
21
|
-
export * from './lib/modules/toggle-switch/toggle-switch.module';
|
|
22
|
-
// Components and directives must be exported to support Angular's "partial" Ivy compiler.
|
|
23
|
-
// Obscure names are used to indicate types are not part of the public API.
|
|
24
|
-
export { SkyCharacterCounterIndicatorComponent as λ1 } from './lib/modules/character-counter/character-counter-indicator.component';
|
|
25
|
-
export { SkyCharacterCounterInputDirective as λ2 } from './lib/modules/character-counter/character-counter.directive';
|
|
26
|
-
export { SkyCheckboxComponent as λ3 } from './lib/modules/checkbox/checkbox.component';
|
|
27
|
-
export { SkyCheckboxLabelComponent as λ4 } from './lib/modules/checkbox/checkbox-label.component';
|
|
28
|
-
export { SkyCheckboxRequiredValidatorDirective as λ5 } from './lib/modules/checkbox/checkbox-required-validator.directive';
|
|
29
|
-
export { SkyFileAttachmentLabelComponent as λ6 } from './lib/modules/file-attachment/file-attachment-label.component';
|
|
30
|
-
export { SkyFileAttachmentComponent as λ7 } from './lib/modules/file-attachment/file-attachment.component';
|
|
31
|
-
export { SkyFileDropComponent as λ8 } from './lib/modules/file-attachment/file-drop.component';
|
|
32
|
-
export { SkyFileItemComponent as λ9 } from './lib/modules/file-attachment/file-item.component';
|
|
33
|
-
export { SkyInputBoxComponent as λ10 } from './lib/modules/input-box/input-box.component';
|
|
34
|
-
export { SkyRadioGroupComponent as λ11 } from './lib/modules/radio/radio-group.component';
|
|
35
|
-
export { SkyRadioLabelComponent as λ12 } from './lib/modules/radio/radio-label.component';
|
|
36
|
-
export { SkyRadioComponent as λ13 } from './lib/modules/radio/radio.component';
|
|
37
|
-
export { SkySelectionBoxDescriptionComponent as λ14 } from './lib/modules/selection-box/selection-box-description.component';
|
|
38
|
-
export { SkySelectionBoxGridComponent as λ15 } from './lib/modules/selection-box/selection-box-grid.component';
|
|
39
|
-
export { SkySelectionBoxHeaderComponent as λ16 } from './lib/modules/selection-box/selection-box-header.component';
|
|
40
|
-
export { SkySelectionBoxComponent as λ17 } from './lib/modules/selection-box/selection-box.component';
|
|
41
|
-
export { SkyToggleSwitchLabelComponent as λ18 } from './lib/modules/toggle-switch/toggle-switch-label.component';
|
|
42
|
-
export { SkyToggleSwitchComponent as λ19 } from './lib/modules/toggle-switch/toggle-switch.component';
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
package/esm2015/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/forms/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0DAA0D,CAAC;AAEzE,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AAEvD,cAAc,4DAA4D,CAAC;AAC3E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,yCAAyC,CAAC;AACxD,cAAc,oDAAoD,CAAC;AACnE,cAAc,yCAAyC,CAAC;AACxD,cAAc,8CAA8C,CAAC;AAE7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAEhE,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,kEAAkE,CAAC;AACjF,cAAc,uEAAuE,C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C;AACtG,OAAO,EAAE,6BAA6B,IAAI,GAAG,EAAE,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAE,wBAAwB,IAAI,GAAG,EAAE,MAAM,qDAAqD,CAAC","sourcesContent":["export * from './lib/modules/character-counter/character-counter.module';\n\nexport * from './lib/modules/checkbox/checkbox-change';\nexport * from './lib/modules/checkbox/checkbox.module';\n\nexport * from './lib/modules/file-attachment/types/file-attachment-change';\nexport * from './lib/modules/file-attachment/types/file-attachment-click';\nexport * from './lib/modules/file-attachment/types/file-drop-change';\nexport * from './lib/modules/file-attachment/file-attachments.module';\nexport * from './lib/modules/file-attachment/file-item';\nexport * from './lib/modules/file-attachment/file-item-error-type';\nexport * from './lib/modules/file-attachment/file-link';\nexport * from './lib/modules/file-attachment/file-size.pipe';\n\nexport * from './lib/modules/input-box/input-box.module';\nexport * from './lib/modules/input-box/input-box-host.service';\nexport * from './lib/modules/input-box/input-box-populate-args';\n\nexport * from './lib/modules/radio/types/radio-change';\nexport * from './lib/modules/radio/radio.module';\n\nexport * from './lib/modules/selection-box/types/selection-box-grid-align-items';\nexport * from './lib/modules/selection-box/types/selection-box-grid-align-items-type';\nexport * from './lib/modules/selection-box/selection-box.module';\n\nexport * from './lib/modules/toggle-switch/types/toggle-switch-change';\nexport * from './lib/modules/toggle-switch/toggle-switch.module';\n\n// Components and directives must be exported to support Angular's \"partial\" Ivy compiler.\n// Obscure names are used to indicate types are not part of the public API.\n\nexport { SkyCharacterCounterIndicatorComponent as λ1 } from './lib/modules/character-counter/character-counter-indicator.component';\nexport { SkyCharacterCounterInputDirective as λ2 } from './lib/modules/character-counter/character-counter.directive';\nexport { SkyCheckboxComponent as λ3 } from './lib/modules/checkbox/checkbox.component';\nexport { SkyCheckboxLabelComponent as λ4 } from './lib/modules/checkbox/checkbox-label.component';\nexport { SkyCheckboxRequiredValidatorDirective as λ5 } from './lib/modules/checkbox/checkbox-required-validator.directive';\nexport { SkyFileAttachmentLabelComponent as λ6 } from './lib/modules/file-attachment/file-attachment-label.component';\nexport { SkyFileAttachmentComponent as λ7 } from './lib/modules/file-attachment/file-attachment.component';\nexport { SkyFileDropComponent as λ8 } from './lib/modules/file-attachment/file-drop.component';\nexport { SkyFileItemComponent as λ9 } from './lib/modules/file-attachment/file-item.component';\nexport { SkyInputBoxComponent as λ10 } from './lib/modules/input-box/input-box.component';\nexport { SkyRadioGroupComponent as λ11 } from './lib/modules/radio/radio-group.component';\nexport { SkyRadioLabelComponent as λ12 } from './lib/modules/radio/radio-label.component';\nexport { SkyRadioComponent as λ13 } from './lib/modules/radio/radio.component';\nexport { SkySelectionBoxDescriptionComponent as λ14 } from './lib/modules/selection-box/selection-box-description.component';\nexport { SkySelectionBoxGridComponent as λ15 } from './lib/modules/selection-box/selection-box-grid.component';\nexport { SkySelectionBoxHeaderComponent as λ16 } from './lib/modules/selection-box/selection-box-header.component';\nexport { SkySelectionBoxComponent as λ17 } from './lib/modules/selection-box/selection-box.component';\nexport { SkyToggleSwitchLabelComponent as λ18 } from './lib/modules/toggle-switch/toggle-switch-label.component';\nexport { SkyToggleSwitchComponent as λ19 } from './lib/modules/toggle-switch/toggle-switch.component';\n"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
import * as i2 from "@skyux/i18n";
|
|
5
|
-
export class SkyCharacterCounterIndicatorComponent {
|
|
6
|
-
constructor(changeDetector) {
|
|
7
|
-
this.changeDetector = changeDetector;
|
|
8
|
-
this.currentCharacterCountLimit = 0;
|
|
9
|
-
this.currentCharacterCount = 0;
|
|
10
|
-
}
|
|
11
|
-
get characterCount() {
|
|
12
|
-
return this.currentCharacterCount;
|
|
13
|
-
}
|
|
14
|
-
set characterCount(count) {
|
|
15
|
-
this.currentCharacterCount = count;
|
|
16
|
-
this.changeDetector.markForCheck();
|
|
17
|
-
}
|
|
18
|
-
get characterCountLimit() {
|
|
19
|
-
return this.currentCharacterCountLimit;
|
|
20
|
-
}
|
|
21
|
-
set characterCountLimit(limit) {
|
|
22
|
-
this.currentCharacterCountLimit = limit;
|
|
23
|
-
this.changeDetector.markForCheck();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
SkyCharacterCounterIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
-
SkyCharacterCounterIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", ngImport: i0, template: "<span\n class=\"sky-character-count-label sky-deemphasized\"\n [ngClass]=\"{ 'sky-error-label': characterCount > characterCountLimit }\"\n>\n {{ characterCount + '/' + characterCountLimit }}\n</span>\n<span aria-live=\"polite\" class=\"sky-screen-reader-only\">\n {{ characterCount }} {{ 'skyux_character_count_message' | skyLibResources }}\n {{ characterCountLimit }}.\n {{\n characterCount > characterCountLimit\n ? ('skyux_character_count_over_limit' | skyLibResources)\n : ''\n }}\n</span>\n", styles: [":host{flex-shrink:.0001}.sky-character-count-label.sky-error-label{margin:0}.sky-character-count-label.sky-error-label:before{font-style:normal}.sky-screen-reader-only{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyLibResources": i2.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, decorators: [{
|
|
29
|
-
type: Component,
|
|
30
|
-
args: [{
|
|
31
|
-
selector: 'sky-character-counter-indicator',
|
|
32
|
-
templateUrl: './character-counter-indicator.component.html',
|
|
33
|
-
styleUrls: ['./character-counter-indicator.component.scss'],
|
|
34
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
|
-
}]
|
|
36
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
37
|
-
//# sourceMappingURL=character-counter-indicator.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"character-counter-indicator.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/character-counter/character-counter-indicator.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/character-counter/character-counter-indicator.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GACV,MAAM,eAAe,CAAC;;;;AAQvB,MAAM,OAAO,qCAAqC;IAOhD,YAAoB,cAAiC;QAAjC,mBAAc,GAAd,cAAc,CAAmB;QAH7C,+BAA0B,GAAG,CAAC,CAAC;QAC/B,0BAAqB,GAAG,CAAC,CAAC;IAEsB,CAAC;IAEzD,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;IAED,IAAW,cAAc,CAAC,KAAa;QACrC,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAED,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,0BAA0B,CAAC;IACzC,CAAC;IAED,IAAW,mBAAmB,CAAC,KAAa;QAC1C,IAAI,CAAC,0BAA0B,GAAG,KAAK,CAAC;QACxC,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;;mIAzBU,qCAAqC;uHAArC,qCAAqC,uECZlD,qgBAeA;4FDHa,qCAAqC;kBANjD,SAAS;mBAAC;oBACT,QAAQ,EAAE,iCAAiC;oBAC3C,WAAW,EAAE,8CAA8C;oBAC3D,SAAS,EAAE,CAAC,8CAA8C,CAAC;oBAC3D,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n} from '@angular/core';\n\n@Component({\n selector: 'sky-character-counter-indicator',\n templateUrl: './character-counter-indicator.component.html',\n styleUrls: ['./character-counter-indicator.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyCharacterCounterIndicatorComponent {\n public characterCountMessage: string;\n public overLimitMessage: string;\n\n private currentCharacterCountLimit = 0;\n private currentCharacterCount = 0;\n\n constructor(private changeDetector: ChangeDetectorRef) {}\n\n public get characterCount(): number {\n return this.currentCharacterCount;\n }\n\n public set characterCount(count: number) {\n this.currentCharacterCount = count;\n this.changeDetector.markForCheck();\n }\n\n public get characterCountLimit(): number {\n return this.currentCharacterCountLimit;\n }\n\n public set characterCountLimit(limit: number) {\n this.currentCharacterCountLimit = limit;\n this.changeDetector.markForCheck();\n }\n}\n","<span\n class=\"sky-character-count-label sky-deemphasized\"\n [ngClass]=\"{ 'sky-error-label': characterCount > characterCountLimit }\"\n>\n {{ characterCount + '/' + characterCountLimit }}\n</span>\n<span aria-live=\"polite\" class=\"sky-screen-reader-only\">\n {{ characterCount }} {{ 'skyux_character_count_message' | skyLibResources }}\n {{ characterCountLimit }}.\n {{\n characterCount > characterCountLimit\n ? ('skyux_character_count_over_limit' | skyLibResources)\n : ''\n }}\n</span>\n"]}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Directive, Input } from '@angular/core';
|
|
2
|
-
import { NG_VALIDATORS, } from '@angular/forms';
|
|
3
|
-
import { SkyCharacterCounterIndicatorComponent } from './character-counter-indicator.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Creates an input field that validates the number of characters. Place this directive on
|
|
7
|
-
* an `input` or `textarea` element. If users enter more characters than allowed, then the
|
|
8
|
-
* input field is invalid and the component displays an error indicator.
|
|
9
|
-
* @required
|
|
10
|
-
*/
|
|
11
|
-
export class SkyCharacterCounterInputDirective {
|
|
12
|
-
constructor() {
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
14
|
-
this._validatorChange = () => { };
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Specifies the maximum number of characters allowed in the input field. Place this directive
|
|
18
|
-
* on an `input` or `textarea` element. This property accepts `number` values.
|
|
19
|
-
* @required
|
|
20
|
-
*/
|
|
21
|
-
set skyCharacterCounterLimit(value) {
|
|
22
|
-
this._skyCharacterCounterLimit = value;
|
|
23
|
-
this.updateIndicatorLimit(this.skyCharacterCounterLimit);
|
|
24
|
-
this._validatorChange();
|
|
25
|
-
}
|
|
26
|
-
get skyCharacterCounterLimit() {
|
|
27
|
-
return this._skyCharacterCounterLimit || 0;
|
|
28
|
-
}
|
|
29
|
-
validate(control) {
|
|
30
|
-
const value = control.value;
|
|
31
|
-
this.updateIndicatorCount((value && value.length) || 0);
|
|
32
|
-
if (!value) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (value.length > this.skyCharacterCounterLimit) {
|
|
36
|
-
// This is needed to apply the appropriate error styles to the input.
|
|
37
|
-
control.markAsTouched();
|
|
38
|
-
return {
|
|
39
|
-
skyCharacterCounter: {
|
|
40
|
-
invalid: value,
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
registerOnValidatorChange(fn) {
|
|
46
|
-
this._validatorChange = fn;
|
|
47
|
-
}
|
|
48
|
-
updateIndicatorCount(count) {
|
|
49
|
-
if (this.skyCharacterCounterIndicator) {
|
|
50
|
-
this.skyCharacterCounterIndicator.characterCount = count;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
updateIndicatorLimit(limit) {
|
|
54
|
-
if (this.skyCharacterCounterIndicator) {
|
|
55
|
-
this.skyCharacterCounterIndicator.characterCountLimit = limit;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
SkyCharacterCounterInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
60
|
-
SkyCharacterCounterInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyCharacterCounterInputDirective, selector: "[skyCharacterCounter]", inputs: { skyCharacterCounterIndicator: "skyCharacterCounterIndicator", skyCharacterCounterLimit: "skyCharacterCounterLimit" }, providers: [
|
|
61
|
-
{
|
|
62
|
-
provide: NG_VALIDATORS,
|
|
63
|
-
useExisting: SkyCharacterCounterInputDirective,
|
|
64
|
-
multi: true,
|
|
65
|
-
},
|
|
66
|
-
], ngImport: i0 });
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterInputDirective, decorators: [{
|
|
68
|
-
type: Directive,
|
|
69
|
-
args: [{
|
|
70
|
-
selector: '[skyCharacterCounter]',
|
|
71
|
-
providers: [
|
|
72
|
-
{
|
|
73
|
-
provide: NG_VALIDATORS,
|
|
74
|
-
useExisting: SkyCharacterCounterInputDirective,
|
|
75
|
-
multi: true,
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
}]
|
|
79
|
-
}], propDecorators: { skyCharacterCounterIndicator: [{
|
|
80
|
-
type: Input
|
|
81
|
-
}], skyCharacterCounterLimit: [{
|
|
82
|
-
type: Input
|
|
83
|
-
}] } });
|
|
84
|
-
//# sourceMappingURL=character-counter.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"character-counter.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/character-counter/character-counter.directive.ts"],"names":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CAAC;IAEO,oBAAoB,CAAC,KAAa;QACxC,IAAI,IAAI,CAAC,4BAA4B,EAAE;YACrC,IAAI,CAAC,4BAA4B,CAAC,mBAAmB,GAAG,KAAK,CAAC;SAC/D;IACH,CAAC;;+HA9DU,iCAAiC;mHAAjC,iCAAiC,gLARjC;QACT;YACE,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,IAAI;SACZ;KACF;4FAEU,iCAAiC;kBAV7C,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;oBACjC,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,aAAa;4BACtB,WAAW,mCAAmC;4BAC9C,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF;8BAQQ,4BAA4B;sBADlC,KAAK;gBASK,wBAAwB;sBADlC,KAAK","sourcesContent":["import { Directive, Input } from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\n\nimport { SkyCharacterCounterIndicatorComponent } from './character-counter-indicator.component';\n\n/**\n * Creates an input field that validates the number of characters. Place this directive on\n * an `input` or `textarea` element. If users enter more characters than allowed, then the\n * input field is invalid and the component displays an error indicator.\n * @required\n */\n@Directive({\n selector: '[skyCharacterCounter]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: SkyCharacterCounterInputDirective,\n multi: true,\n },\n ],\n})\nexport class SkyCharacterCounterInputDirective implements Validator {\n /**\n * Specifies the character count indicator component that displays the character count,\n * character limit, and over-the-limit indicator. Place this directive on an `input` or\n * `textarea` element.\n */\n @Input()\n public skyCharacterCounterIndicator: SkyCharacterCounterIndicatorComponent;\n\n /**\n * Specifies the maximum number of characters allowed in the input field. Place this directive\n * on an `input` or `textarea` element. This property accepts `number` values.\n * @required\n */\n @Input()\n public set skyCharacterCounterLimit(value: number) {\n this._skyCharacterCounterLimit = value;\n this.updateIndicatorLimit(this.skyCharacterCounterLimit);\n this._validatorChange();\n }\n\n public get skyCharacterCounterLimit(): number {\n return this._skyCharacterCounterLimit || 0;\n }\n\n private _skyCharacterCounterLimit: number;\n\n public validate(control: AbstractControl): ValidationErrors {\n const value = control.value;\n\n this.updateIndicatorCount((value && value.length) || 0);\n\n if (!value) {\n return;\n }\n\n if (value.length > this.skyCharacterCounterLimit) {\n // This is needed to apply the appropriate error styles to the input.\n control.markAsTouched();\n\n return {\n skyCharacterCounter: {\n invalid: value,\n },\n };\n }\n }\n\n public registerOnValidatorChange(fn: () => void): void {\n this._validatorChange = fn;\n }\n\n private updateIndicatorCount(count: number): void {\n if (this.skyCharacterCounterIndicator) {\n this.skyCharacterCounterIndicator.characterCount = count;\n }\n }\n\n private updateIndicatorLimit(limit: number): void {\n if (this.skyCharacterCounterIndicator) {\n this.skyCharacterCounterIndicator.characterCountLimit = limit;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _validatorChange = () => {};\n}\n"]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
-
import { SkyI18nModule } from '@skyux/i18n';
|
|
5
|
-
import { SkyFormsResourcesModule } from '../shared/sky-forms-resources.module';
|
|
6
|
-
import { SkyCharacterCounterIndicatorComponent } from './character-counter-indicator.component';
|
|
7
|
-
import { SkyCharacterCounterInputDirective } from './character-counter.directive';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export class SkyCharacterCounterModule {
|
|
10
|
-
}
|
|
11
|
-
SkyCharacterCounterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12
|
-
SkyCharacterCounterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, declarations: [SkyCharacterCounterInputDirective,
|
|
13
|
-
SkyCharacterCounterIndicatorComponent], imports: [CommonModule,
|
|
14
|
-
FormsModule,
|
|
15
|
-
ReactiveFormsModule,
|
|
16
|
-
SkyFormsResourcesModule,
|
|
17
|
-
SkyI18nModule], exports: [SkyCharacterCounterInputDirective,
|
|
18
|
-
SkyCharacterCounterIndicatorComponent] });
|
|
19
|
-
SkyCharacterCounterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, imports: [[
|
|
20
|
-
CommonModule,
|
|
21
|
-
FormsModule,
|
|
22
|
-
ReactiveFormsModule,
|
|
23
|
-
SkyFormsResourcesModule,
|
|
24
|
-
SkyI18nModule,
|
|
25
|
-
]] });
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, decorators: [{
|
|
27
|
-
type: NgModule,
|
|
28
|
-
args: [{
|
|
29
|
-
declarations: [
|
|
30
|
-
SkyCharacterCounterInputDirective,
|
|
31
|
-
SkyCharacterCounterIndicatorComponent,
|
|
32
|
-
],
|
|
33
|
-
imports: [
|
|
34
|
-
CommonModule,
|
|
35
|
-
FormsModule,
|
|
36
|
-
ReactiveFormsModule,
|
|
37
|
-
SkyFormsResourcesModule,
|
|
38
|
-
SkyI18nModule,
|
|
39
|
-
],
|
|
40
|
-
exports: [
|
|
41
|
-
SkyCharacterCounterInputDirective,
|
|
42
|
-
SkyCharacterCounterIndicatorComponent,
|
|
43
|
-
],
|
|
44
|
-
}]
|
|
45
|
-
}] });
|
|
46
|
-
//# sourceMappingURL=character-counter.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"character-counter.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/character-counter/character-counter.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,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;;AAmBlF,MAAM,OAAO,yBAAyB;;uHAAzB,yBAAyB;wHAAzB,yBAAyB,iBAflC,iCAAiC;QACjC,qCAAqC,aAGrC,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,uBAAuB;QACvB,aAAa,aAGb,iCAAiC;QACjC,qCAAqC;wHAG5B,yBAAyB,YAZ3B;YACP,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,uBAAuB;YACvB,aAAa;SACd;4FAMU,yBAAyB;kBAjBrC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,iCAAiC;wBACjC,qCAAqC;qBACtC;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,uBAAuB;wBACvB,aAAa;qBACd;oBACD,OAAO,EAAE;wBACP,iCAAiC;wBACjC,qCAAqC;qBACtC;iBACF","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyFormsResourcesModule } from '../shared/sky-forms-resources.module';\n\nimport { SkyCharacterCounterIndicatorComponent } from './character-counter-indicator.component';\nimport { SkyCharacterCounterInputDirective } from './character-counter.directive';\n\n@NgModule({\n declarations: [\n SkyCharacterCounterInputDirective,\n SkyCharacterCounterIndicatorComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyFormsResourcesModule,\n SkyI18nModule,\n ],\n exports: [\n SkyCharacterCounterInputDirective,\n SkyCharacterCounterIndicatorComponent,\n ],\n})\nexport class SkyCharacterCounterModule {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-change.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/checkbox/checkbox-change.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,iBAAiB;CAG7B","sourcesContent":["import { SkyCheckboxComponent } from './checkbox.component';\n\n/**\n * Fires when users select or deselect the checkbox.\n */\nexport class SkyCheckboxChange {\n public source: SkyCheckboxComponent;\n public checked: boolean;\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Specifies a label for the checkbox.
|
|
5
|
-
*/
|
|
6
|
-
export class SkyCheckboxLabelComponent {
|
|
7
|
-
}
|
|
8
|
-
SkyCheckboxLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
-
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" });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, decorators: [{
|
|
11
|
-
type: Component,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: 'sky-checkbox-label',
|
|
14
|
-
templateUrl: './checkbox-label.component.html',
|
|
15
|
-
}]
|
|
16
|
-
}] });
|
|
17
|
-
//# sourceMappingURL=checkbox-label.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-label.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/checkbox/checkbox-label.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/checkbox/checkbox-label.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAE1C;;GAEG;AAKH,MAAM,OAAO,yBAAyB;;uHAAzB,yBAAyB;2GAAzB,yBAAyB,0DCTtC,2EAGA;4FDMa,yBAAyB;kBAJrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,WAAW,EAAE,iCAAiC;iBAC/C","sourcesContent":["import { Component } from '@angular/core';\n\n/**\n * Specifies a label for the checkbox.\n */\n@Component({\n selector: 'sky-checkbox-label',\n templateUrl: './checkbox-label.component.html',\n})\nexport class SkyCheckboxLabelComponent {}\n","<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Directive, forwardRef } from '@angular/core';
|
|
2
|
-
import { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
// tslint:disable:no-forward-ref
|
|
5
|
-
export const SKY_CHECKBOX_REQUIRED_VALIDATOR = {
|
|
6
|
-
provide: NG_VALIDATORS,
|
|
7
|
-
useExisting: forwardRef(() => SkyCheckboxRequiredValidatorDirective),
|
|
8
|
-
multi: true,
|
|
9
|
-
};
|
|
10
|
-
// tslint:enable
|
|
11
|
-
/**
|
|
12
|
-
* Validator support for the `required` input on `sky-checkbox`.
|
|
13
|
-
* Angular's `CheckboxRequiredValidator` only works with `input type=checkbox`. This directive
|
|
14
|
-
* extends the angular validator to work with `sky-checkbox` tags.
|
|
15
|
-
* This is based on Angular Material's similar implementation:
|
|
16
|
-
* https://github.com/angular/components/blob/a415b52ead2ec202ba37edb7d7866b29dd790394/src/material/checkbox/checkbox-required-validator.ts
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export class SkyCheckboxRequiredValidatorDirective extends CheckboxRequiredValidator {
|
|
20
|
-
}
|
|
21
|
-
SkyCheckboxRequiredValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
22
|
-
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 });
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, decorators: [{
|
|
24
|
-
type: Directive,
|
|
25
|
-
args: [{
|
|
26
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
27
|
-
selector: `sky-checkbox[required][formControlName],
|
|
28
|
-
sky-checkbox[required][formControl], sky-checkbox[required][ngModel]`,
|
|
29
|
-
providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR],
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
//# sourceMappingURL=checkbox-required-validator.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-required-validator.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/checkbox/checkbox-required-validator.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,UAAU,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;;AAE1E,gCAAgC;AAChC,MAAM,CAAC,MAAM,+BAA+B,GAAa;IACvD,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,qCAAqC,CAAC;IACpE,KAAK,EAAE,IAAI;CACZ,CAAC;AACF,gBAAgB;AAEhB;;;;;;;GAOG;AAOH,MAAM,OAAO,qCAAsC,SAAQ,yBAAyB;;mIAAvE,qCAAqC;uHAArC,qCAAqC,sJAFrC,CAAC,+BAA+B,CAAC;4FAEjC,qCAAqC;kBANjD,SAAS;mBAAC;oBACT,8DAA8D;oBAC9D,QAAQ,EAAE;kFACsE;oBAChF,SAAS,EAAE,CAAC,+BAA+B,CAAC;iBAC7C","sourcesContent":["import { Directive, Provider, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n// tslint:disable:no-forward-ref\nexport const SKY_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SkyCheckboxRequiredValidatorDirective),\n multi: true,\n};\n// tslint:enable\n\n/**\n * Validator support for the `required` input on `sky-checkbox`.\n * Angular's `CheckboxRequiredValidator` only works with `input type=checkbox`. This directive\n * extends the angular validator to work with `sky-checkbox` tags.\n * This is based on Angular Material's similar implementation:\n * https://github.com/angular/components/blob/a415b52ead2ec202ba37edb7d7866b29dd790394/src/material/checkbox/checkbox-required-validator.ts\n * @internal\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `sky-checkbox[required][formControlName],\n sky-checkbox[required][formControl], sky-checkbox[required][ngModel]`,\n providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR],\n})\nexport class SkyCheckboxRequiredValidatorDirective extends CheckboxRequiredValidator {}\n"]}
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Optional, Output, Self, } from '@angular/core';
|
|
2
|
-
import { NgControl } from '@angular/forms';
|
|
3
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
|
-
import { SkyFormsUtility } from '../shared/forms-utility';
|
|
5
|
-
import { SkyCheckboxChange } from './checkbox-change';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@angular/forms";
|
|
8
|
-
import * as i2 from "@skyux/indicators";
|
|
9
|
-
import * as i3 from "@angular/common";
|
|
10
|
-
/**
|
|
11
|
-
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
|
|
12
|
-
*/
|
|
13
|
-
let nextId = 0;
|
|
14
|
-
/**
|
|
15
|
-
* Replaces the HTML input element with `type="checkbox"`. When users select a checkbox, its value
|
|
16
|
-
* is driven through an `ngModel` attribute that you specify on the `sky-checkbox` element.
|
|
17
|
-
*/
|
|
18
|
-
export class SkyCheckboxComponent {
|
|
19
|
-
constructor(ngControl) {
|
|
20
|
-
this.ngControl = ngControl;
|
|
21
|
-
/**
|
|
22
|
-
* Specifies an ID for the checkbox.
|
|
23
|
-
* @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`
|
|
24
|
-
*/
|
|
25
|
-
this.id = `sky-checkbox-${++nextId}`;
|
|
26
|
-
/**
|
|
27
|
-
* Specifies an index for the checkbox. If not defined, the index is set to the position of the
|
|
28
|
-
* checkbox on load.
|
|
29
|
-
*/
|
|
30
|
-
this.tabindex = 0;
|
|
31
|
-
/**
|
|
32
|
-
* Specifies a name for a group of checkboxes.
|
|
33
|
-
* @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`
|
|
34
|
-
*/
|
|
35
|
-
this.name = `sky-checkbox-${++nextId}`;
|
|
36
|
-
/**
|
|
37
|
-
* Fires when the selected value changes.
|
|
38
|
-
*/
|
|
39
|
-
this.change = new EventEmitter();
|
|
40
|
-
this.isFirstChange = true;
|
|
41
|
-
this._checked = false;
|
|
42
|
-
this._checkedChange = new BehaviorSubject(this._checked);
|
|
43
|
-
this._disabled = false;
|
|
44
|
-
this._disabledChange = new BehaviorSubject(this._disabled);
|
|
45
|
-
this._required = false;
|
|
46
|
-
/** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
48
|
-
this.onTouched = () => { };
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
50
|
-
this._controlValueAccessorChangeFn = (value) => { };
|
|
51
|
-
if (this.ngControl) {
|
|
52
|
-
this.ngControl.valueAccessor = this;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Indicates whether to disable the checkbox.
|
|
57
|
-
* @default false
|
|
58
|
-
*/
|
|
59
|
-
set disabled(value) {
|
|
60
|
-
const coercedValue = SkyFormsUtility.coerceBooleanProperty(value);
|
|
61
|
-
if (coercedValue !== this.disabled) {
|
|
62
|
-
this._disabled = coercedValue;
|
|
63
|
-
this._disabledChange.next(this._disabled);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Indicates whether the checkbox is disabled.
|
|
68
|
-
*/
|
|
69
|
-
get disabled() {
|
|
70
|
-
return this._disabled;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Specifies a type to set the background color after users select a checkbox where the
|
|
74
|
-
* `icon` property displays an icon in place of the checkbox. The valid options correspond to
|
|
75
|
-
* [the label component's](https://developer.blackbaud.com/skyux/components/label)
|
|
76
|
-
* label types. `"info"` creates a blue background, `"success"` creates a green
|
|
77
|
-
* background, `"warning"` creates an orange background, and `"danger"` creates a red background.
|
|
78
|
-
* @default "info"
|
|
79
|
-
*/
|
|
80
|
-
set checkboxType(value) {
|
|
81
|
-
if (value) {
|
|
82
|
-
this._checkboxType = value.toLowerCase();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
get checkboxType() {
|
|
86
|
-
return this._checkboxType || 'info';
|
|
87
|
-
}
|
|
88
|
-
get inputId() {
|
|
89
|
-
return `input-${this.id}`;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Indicates whether the checkbox is selected.
|
|
93
|
-
* @default false
|
|
94
|
-
*/
|
|
95
|
-
set checked(checked) {
|
|
96
|
-
if (checked !== this.checked) {
|
|
97
|
-
this._checked = checked;
|
|
98
|
-
this._controlValueAccessorChangeFn(checked);
|
|
99
|
-
this._checkedChange.next(this._checked);
|
|
100
|
-
// Do not mark the field as "dirty"
|
|
101
|
-
// if the field has been initialized with a value.
|
|
102
|
-
if (this.isFirstChange && this.ngControl && this.ngControl.control) {
|
|
103
|
-
this.ngControl.control.markAsPristine();
|
|
104
|
-
this.isFirstChange = false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Indicates whether the checkbox is selected.
|
|
110
|
-
*/
|
|
111
|
-
get checked() {
|
|
112
|
-
return this._checked;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Indicates whether the input is required for form validation.
|
|
116
|
-
* When you set this property to `true`, the component adds `aria-required` and `required`
|
|
117
|
-
* attributes to the input element so that forms display an invalid state until the input element
|
|
118
|
-
* is complete.
|
|
119
|
-
* @default false
|
|
120
|
-
*/
|
|
121
|
-
set required(value) {
|
|
122
|
-
this._required = SkyFormsUtility.coerceBooleanProperty(value);
|
|
123
|
-
}
|
|
124
|
-
get required() {
|
|
125
|
-
return this._required;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Fires when users select or deselect the checkbox.
|
|
129
|
-
*/
|
|
130
|
-
get checkedChange() {
|
|
131
|
-
return this._checkedChange;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Fires when the selected value changes.
|
|
135
|
-
*/
|
|
136
|
-
get disabledChange() {
|
|
137
|
-
return this._disabledChange;
|
|
138
|
-
}
|
|
139
|
-
ngOnInit() {
|
|
140
|
-
if (this.ngControl) {
|
|
141
|
-
// Backwards compatibility support for anyone still using Validators.Required.
|
|
142
|
-
this.required =
|
|
143
|
-
this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Implemented as part of ControlValueAccessor.
|
|
148
|
-
*/
|
|
149
|
-
writeValue(value) {
|
|
150
|
-
this.checked = !!value;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Implemented as part of ControlValueAccessor.
|
|
154
|
-
*/
|
|
155
|
-
registerOnChange(fn) {
|
|
156
|
-
this._controlValueAccessorChangeFn = fn;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Implemented as part of ControlValueAccessor.
|
|
160
|
-
*/
|
|
161
|
-
registerOnTouched(fn) {
|
|
162
|
-
this.onTouched = fn;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Implemented as part of ControlValueAccessor.
|
|
166
|
-
*/
|
|
167
|
-
setDisabledState(isDisabled) {
|
|
168
|
-
this.disabled = isDisabled;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Event handler for checkbox input element.
|
|
172
|
-
* Toggles checked state if element is not disabled.
|
|
173
|
-
*/
|
|
174
|
-
onInteractionEvent(event) {
|
|
175
|
-
// We always have to stop propagation on the change event.
|
|
176
|
-
// Otherwise the change event, from the input element, will bubble up and
|
|
177
|
-
// emit its event object to the `change` output.
|
|
178
|
-
event.stopPropagation();
|
|
179
|
-
if (!this.disabled) {
|
|
180
|
-
this._toggle();
|
|
181
|
-
this._emitChangeEvent();
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
onInputBlur() {
|
|
185
|
-
this.onTouched();
|
|
186
|
-
}
|
|
187
|
-
_emitChangeEvent() {
|
|
188
|
-
const event = new SkyCheckboxChange();
|
|
189
|
-
event.source = this;
|
|
190
|
-
event.checked = this._checked;
|
|
191
|
-
this._controlValueAccessorChangeFn(this._checked);
|
|
192
|
-
this.change.emit(event);
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Toggles the `checked` value between true and false
|
|
196
|
-
*/
|
|
197
|
-
_toggle() {
|
|
198
|
-
this.checked = !this.checked;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
SkyCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
202
|
-
SkyCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxComponent, selector: "sky-checkbox", inputs: { label: "label", labelledBy: "labelledBy", id: "id", disabled: "disabled", tabindex: "tabindex", name: "name", icon: "icon", checkboxType: "checkboxType", checked: "checked", required: "required" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange" }, ngImport: i0, template: "<label\n class=\"sky-checkbox-wrapper sky-switch\"\n [ngClass]=\"{\n 'sky-control-label-required': required,\n 'sky-switch-disabled': disabled\n }\"\n>\n <input\n class=\"sky-checkbox-input sky-switch-input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-required]=\"required ? true : null\"\n (blur)=\"onInputBlur()\"\n (change)=\"onInteractionEvent($event)\"\n />\n <span\n class=\"sky-switch-control sky-rounded-corners\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-switch-control-info': checkboxType === 'info',\n 'sky-switch-control-success': checkboxType === 'success',\n 'sky-switch-control-warning': checkboxType === 'warning',\n 'sky-switch-control-danger': checkboxType === 'danger'\n }\"\n >\n <sky-icon\n *ngIf=\"icon || checked\"\n class=\"sky-checkbox-icon-default\"\n fixedWidth=\"true\"\n [icon]=\"icon || 'check'\"\n >\n </sky-icon>\n <div class=\"sky-checkbox-icon-modern\">\n <sky-icon\n *ngIf=\"icon; else checkedTemplate\"\n fixedWidth=\"true\"\n [icon]=\"icon\"\n >\n </sky-icon>\n <ng-template #checkedTemplate>\n <sky-icon\n *ngIf=\"checked\"\n class=\"sky-checkbox-icon-modern-checked\"\n fixedWidth=\"true\"\n icon=\"check\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </ng-template>\n </div>\n </span>\n <ng-content select=\"sky-checkbox-label\"> </ng-content>\n</label>\n", styles: [".sky-checkbox-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-default{display:none}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern{display:inline}:host-context(.sky-theme-modern) .sky-checkbox-icon-modern-checked{color:#1870b8}:host-context(.sky-theme-modern) .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}:host-context(.sky-theme-modern) .sky-switch-control{border-radius:6px}.sky-theme-modern .sky-checkbox-icon-default{display:none}.sky-theme-modern .sky-checkbox-icon-modern{display:inline}.sky-theme-modern .sky-checkbox-icon-modern-checked{color:#1870b8}.sky-theme-modern .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked{color:#212327}.sky-theme-modern .sky-switch-control{border-radius:6px}\n"], components: [{ type: i2.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxComponent, decorators: [{
|
|
204
|
-
type: Component,
|
|
205
|
-
args: [{
|
|
206
|
-
selector: 'sky-checkbox',
|
|
207
|
-
templateUrl: './checkbox.component.html',
|
|
208
|
-
styleUrls: ['./checkbox.component.scss'],
|
|
209
|
-
}]
|
|
210
|
-
}], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
|
|
211
|
-
type: Self
|
|
212
|
-
}, {
|
|
213
|
-
type: Optional
|
|
214
|
-
}] }]; }, propDecorators: { label: [{
|
|
215
|
-
type: Input
|
|
216
|
-
}], labelledBy: [{
|
|
217
|
-
type: Input
|
|
218
|
-
}], id: [{
|
|
219
|
-
type: Input
|
|
220
|
-
}], disabled: [{
|
|
221
|
-
type: Input
|
|
222
|
-
}], tabindex: [{
|
|
223
|
-
type: Input
|
|
224
|
-
}], name: [{
|
|
225
|
-
type: Input
|
|
226
|
-
}], change: [{
|
|
227
|
-
type: Output
|
|
228
|
-
}], icon: [{
|
|
229
|
-
type: Input
|
|
230
|
-
}], checkboxType: [{
|
|
231
|
-
type: Input
|
|
232
|
-
}], checked: [{
|
|
233
|
-
type: Input
|
|
234
|
-
}], required: [{
|
|
235
|
-
type: Input
|
|
236
|
-
}], checkedChange: [{
|
|
237
|
-
type: Output
|
|
238
|
-
}], disabledChange: [{
|
|
239
|
-
type: Output
|
|
240
|
-
}] } });
|
|
241
|
-
//# sourceMappingURL=checkbox.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/checkbox/checkbox.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/checkbox/checkbox.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,EAEL,QAAQ,EACR,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAwB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;;;;;AAEtD;;GAEG;AACH,IAAI,MAAM,GAAG,CAAC,CAAC;A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IACK,OAAO;QACb,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;IAC/B,CAAC;;kHA9PU,oBAAoB;sGAApB,oBAAoB,qWC/BjC,+sDA4DA;4FD7Ba,oBAAoB;kBALhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,cAAc;oBACxB,WAAW,EAAE,2BAA2B;oBACxC,SAAS,EAAE,CAAC,2BAA2B,CAAC;iBACzC;;0BA4Kc,IAAI;;0BAAI,QAAQ;4CAnKtB,KAAK;sBADX,KAAK;gBAUC,UAAU;sBADhB,KAAK;gBAQC,EAAE;sBADR,KAAK;gBAQK,QAAQ;sBADlB,KAAK;gBAqBC,QAAQ;sBADd,KAAK;gBAQC,IAAI;sBADV,KAAK;gBAQC,MAAM;sBAFZ,MAAM;gBAUA,IAAI;sBADV,KAAK;gBAYK,YAAY;sBADtB,KAAK;gBAoBK,OAAO;sBADjB,KAAK;gBA+BF,QAAQ;sBADX,KAAK;gBAaK,aAAa;sBADvB,MAAM;gBASI,cAAc;sBADxB,MAAM","sourcesContent":["import {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\n\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nimport { SkyFormsUtility } from '../shared/forms-utility';\n\nimport { SkyCheckboxChange } from './checkbox-change';\n\n/**\n * Monotonically increasing integer used to auto-generate unique ids for checkbox components.\n */\nlet nextId = 0;\n\n/**\n * Replaces the HTML input element with `type=\"checkbox\"`. When users select a checkbox, its value\n * is driven through an `ngModel` attribute that you specify on the `sky-checkbox` element.\n */\n@Component({\n selector: 'sky-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n})\nexport class SkyCheckboxComponent implements ControlValueAccessor, OnInit {\n /**\n * Specifies an ARIA label for the checkbox. This sets the checkbox's `aria-label` attribute\n * [to support accessibility](https://developer.blackbaud.com/skyux/components/checkbox#accessibility)\n * when the checkbox does not include a visible label. You must set this property for icon\n * checkboxes. If the checkbox includes a visible label, use `labelledBy` instead.\n */\n @Input()\n public label: string;\n\n /**\n * Specifies the HTML element ID (without the leading `#`) of the element that labels the\n * checkbox. This sets the checkbox's `aria-labelledby` attribute\n * [to support accessibility](https://developer.blackbaud.com/skyux/components/checkbox#accessibility).\n * If the checkbox does not include a visible label, use `label` instead.\n */\n @Input()\n public labelledBy: string;\n\n /**\n * Specifies an ID for the checkbox.\n * @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`\n */\n @Input()\n public id = `sky-checkbox-${++nextId}`;\n\n /**\n * Indicates whether to disable the checkbox.\n * @default false\n */\n @Input()\n public set disabled(value: boolean) {\n const coercedValue = SkyFormsUtility.coerceBooleanProperty(value);\n if (coercedValue !== this.disabled) {\n this._disabled = coercedValue;\n this._disabledChange.next(this._disabled);\n }\n }\n\n /**\n * Indicates whether the checkbox is disabled.\n */\n public get disabled() {\n return this._disabled;\n }\n\n /**\n * Specifies an index for the checkbox. If not defined, the index is set to the position of the\n * checkbox on load.\n */\n @Input()\n public tabindex = 0;\n\n /**\n * Specifies a name for a group of checkboxes.\n * @default a unique, auto-incrementing integer. For example: `sky-checkbox-1`\n */\n @Input()\n public name = `sky-checkbox-${++nextId}`;\n\n /**\n * Fires when the selected value changes.\n */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-native\n public change = new EventEmitter<SkyCheckboxChange>();\n\n /**\n * Specifies an icon to display in place of the checkbox. To group icon checkboxes\n * like in the demo, place the `sky-switch-icon-group` class on the direct parent\n * element of the checkboxes.\n */\n @Input()\n public icon: string;\n\n /**\n * Specifies a type to set the background color after users select a checkbox where the\n * `icon` property displays an icon in place of the checkbox. The valid options correspond to\n * [the label component's](https://developer.blackbaud.com/skyux/components/label)\n * label types. `\"info\"` creates a blue background, `\"success\"` creates a green\n * background, `\"warning\"` creates an orange background, and `\"danger\"` creates a red background.\n * @default \"info\"\n */\n @Input()\n public set checkboxType(value: string) {\n if (value) {\n this._checkboxType = value.toLowerCase();\n }\n }\n\n public get checkboxType(): string {\n return this._checkboxType || 'info';\n }\n\n public get inputId(): string {\n return `input-${this.id}`;\n }\n\n /**\n * Indicates whether the checkbox 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._controlValueAccessorChangeFn(checked);\n this._checkedChange.next(this._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.ngControl && this.ngControl.control) {\n this.ngControl.control.markAsPristine();\n this.isFirstChange = false;\n }\n }\n }\n\n /**\n * Indicates whether the checkbox is selected.\n */\n public get checked() {\n return this._checked;\n }\n\n /**\n * Indicates whether the input is required for form validation.\n * When you set this property to `true`, the component adds `aria-required` and `required`\n * attributes to the input element so that forms display an invalid state until the input element\n * is complete.\n * @default false\n */\n @Input()\n set required(value: boolean) {\n this._required = SkyFormsUtility.coerceBooleanProperty(value);\n }\n\n get required(): boolean {\n return this._required;\n }\n\n /**\n * Fires when users select or deselect the checkbox.\n */\n @Output()\n public get checkedChange(): Observable<boolean> {\n return this._checkedChange;\n }\n\n /**\n * Fires when the selected value changes.\n */\n @Output()\n public get disabledChange(): Observable<boolean> {\n return this._disabledChange;\n }\n\n private isFirstChange = true;\n\n private _checkboxType: string;\n\n private _checked = false;\n\n private _checkedChange = new BehaviorSubject<boolean>(this._checked);\n\n private _disabled = false;\n\n private _disabledChange = new BehaviorSubject<boolean>(this._disabled);\n\n private _required = false;\n\n constructor(@Self() @Optional() private ngControl: NgControl) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n public ngOnInit(): void {\n if (this.ngControl) {\n // Backwards compatibility support for anyone still using Validators.Required.\n this.required =\n this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);\n }\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n */\n public writeValue(value: any) {\n this.checked = !!value;\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n */\n public registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n */\n public registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n */\n public setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n */\n public onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n if (!this.disabled) {\n this._toggle();\n this._emitChangeEvent();\n }\n }\n\n public onInputBlur() {\n this.onTouched();\n }\n\n /** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onTouched: () => any = () => {};\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _controlValueAccessorChangeFn: (value: any) => void = (value) => {};\n\n private _emitChangeEvent() {\n const event = new SkyCheckboxChange();\n event.source = this;\n event.checked = this._checked;\n\n this._controlValueAccessorChangeFn(this._checked);\n this.change.emit(event);\n }\n\n /**\n * Toggles the `checked` value between true and false\n */\n private _toggle() {\n this.checked = !this.checked;\n }\n}\n","<label\n class=\"sky-checkbox-wrapper sky-switch\"\n [ngClass]=\"{\n 'sky-control-label-required': required,\n 'sky-switch-disabled': disabled\n }\"\n>\n <input\n class=\"sky-checkbox-input sky-switch-input\"\n type=\"checkbox\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [attr.aria-required]=\"required ? true : null\"\n (blur)=\"onInputBlur()\"\n (change)=\"onInteractionEvent($event)\"\n />\n <span\n class=\"sky-switch-control sky-rounded-corners\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-switch-control-info': checkboxType === 'info',\n 'sky-switch-control-success': checkboxType === 'success',\n 'sky-switch-control-warning': checkboxType === 'warning',\n 'sky-switch-control-danger': checkboxType === 'danger'\n }\"\n >\n <sky-icon\n *ngIf=\"icon || checked\"\n class=\"sky-checkbox-icon-default\"\n fixedWidth=\"true\"\n [icon]=\"icon || 'check'\"\n >\n </sky-icon>\n <div class=\"sky-checkbox-icon-modern\">\n <sky-icon\n *ngIf=\"icon; else checkedTemplate\"\n fixedWidth=\"true\"\n [icon]=\"icon\"\n >\n </sky-icon>\n <ng-template #checkedTemplate>\n <sky-icon\n *ngIf=\"checked\"\n class=\"sky-checkbox-icon-modern-checked\"\n fixedWidth=\"true\"\n icon=\"check\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </ng-template>\n </div>\n </span>\n <ng-content select=\"sky-checkbox-label\"> </ng-content>\n</label>\n"]}
|