@skyux/forms 5.9.4 → 6.0.0-beta.10
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 +693 -693
- 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 +30 -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 +326 -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 +216 -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 +70 -0
- package/esm2020/lib/modules/file-attachment/file-link.mjs +2 -0
- package/esm2020/lib/modules/file-attachment/file-size.pipe.mjs +58 -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 +254 -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 +123 -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 +128 -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 +151 -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 +2684 -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 +2676 -0
- package/fesm2020/skyux-forms.mjs.map +1 -0
- package/package.json +39 -15
- package/testing/package.json +5 -5
- package/bundles/skyux-forms-testing.umd.js +0 -123
- package/bundles/skyux-forms.umd.js +0 -3430
- 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 -335
- 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 -134
- 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 -2771
- package/fesm2015/skyux-forms.js.map +0 -1
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ContentChildren, ElementRef, HostListener, Input, NgZone, Optional, QueryList, ViewChild, ViewEncapsulation, } from '@angular/core';
|
|
2
|
-
import { MutationObserverService, SkyCoreAdapterService, } from '@skyux/core';
|
|
3
|
-
import { SkyThemeService } from '@skyux/theme';
|
|
4
|
-
import { Subject } from 'rxjs';
|
|
5
|
-
import { takeUntil } from 'rxjs/operators';
|
|
6
|
-
import { SkySelectionBoxAdapterService } from './selection-box-adapter.service';
|
|
7
|
-
import { SkySelectionBoxComponent } from './selection-box.component';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@skyux/core";
|
|
10
|
-
import * as i2 from "./selection-box-adapter.service";
|
|
11
|
-
import * as i3 from "@skyux/theme";
|
|
12
|
-
import * as i4 from "@angular/common";
|
|
13
|
-
const SKY_SELECTION_BOX_CLASS_NAME = '.sky-selection-box';
|
|
14
|
-
/**
|
|
15
|
-
* Creates a grid layout for an array of selection boxes.
|
|
16
|
-
*/
|
|
17
|
-
export class SkySelectionBoxGridComponent {
|
|
18
|
-
constructor(coreAdapterService, selectionBoxAdapter, hostElRef, mutationObserverSvc, ngZone, themeSvc) {
|
|
19
|
-
this.coreAdapterService = coreAdapterService;
|
|
20
|
-
this.selectionBoxAdapter = selectionBoxAdapter;
|
|
21
|
-
this.hostElRef = hostElRef;
|
|
22
|
-
this.mutationObserverSvc = mutationObserverSvc;
|
|
23
|
-
this.ngZone = ngZone;
|
|
24
|
-
this.themeSvc = themeSvc;
|
|
25
|
-
this.ngUnsubscribe = new Subject();
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
* Specifies how to display the selection boxes in the grid.
|
|
30
|
-
* @default 'center'
|
|
31
|
-
*/
|
|
32
|
-
set alignItems(value) {
|
|
33
|
-
this._alignItems = value;
|
|
34
|
-
}
|
|
35
|
-
get alignItems() {
|
|
36
|
-
return this._alignItems || 'center';
|
|
37
|
-
}
|
|
38
|
-
set currentBreakpoint(value) {
|
|
39
|
-
if (value !== this._currentBreakpoint) {
|
|
40
|
-
this._currentBreakpoint = value;
|
|
41
|
-
this.selectionBoxAdapter.setResponsiveClass(this.elementRef, value);
|
|
42
|
-
this.updateChildrenHeights();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
ngOnInit() {
|
|
46
|
-
/* istanbul ignore else */
|
|
47
|
-
if (this.themeSvc) {
|
|
48
|
-
this.themeSvc.settingsChange
|
|
49
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
50
|
-
.subscribe(() => {
|
|
51
|
-
this.updateBreakpointClass();
|
|
52
|
-
this.updateChildrenHeights();
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
ngAfterViewInit() {
|
|
57
|
-
this.updateBreakpointClass();
|
|
58
|
-
this.updateChildrenHeights();
|
|
59
|
-
this.initMutationObserver();
|
|
60
|
-
}
|
|
61
|
-
ngOnDestroy() {
|
|
62
|
-
this.ngUnsubscribe.next();
|
|
63
|
-
this.ngUnsubscribe.complete();
|
|
64
|
-
this.destroyMutationObserver();
|
|
65
|
-
}
|
|
66
|
-
onWindowResize() {
|
|
67
|
-
this.updateBreakpointClass();
|
|
68
|
-
}
|
|
69
|
-
initMutationObserver() {
|
|
70
|
-
/* istanbul ignore else */
|
|
71
|
-
if (!this.mutationObserver) {
|
|
72
|
-
const el = this.elementRef.nativeElement;
|
|
73
|
-
// MutationObserver is patched by Zone.js and therefore becomes part of the
|
|
74
|
-
// Angular change detection cycle, but this can lead to infinite loops in some
|
|
75
|
-
// scenarios. This will keep MutationObserver from triggering change detection.
|
|
76
|
-
this.ngZone.runOutsideAngular(() => {
|
|
77
|
-
this.mutationObserver = this.mutationObserverSvc.create(() => {
|
|
78
|
-
this.updateChildrenHeights();
|
|
79
|
-
});
|
|
80
|
-
this.mutationObserver.observe(el, {
|
|
81
|
-
characterData: true,
|
|
82
|
-
subtree: true,
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
destroyMutationObserver() {
|
|
88
|
-
/* istanbul ignore else */
|
|
89
|
-
if (this.mutationObserver) {
|
|
90
|
-
this.mutationObserver.disconnect();
|
|
91
|
-
this.mutationObserver = undefined;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
updateBreakpointClass() {
|
|
95
|
-
const parentWidth = this.selectionBoxAdapter.getParentWidth(this.hostElRef);
|
|
96
|
-
this.currentBreakpoint =
|
|
97
|
-
this.selectionBoxAdapter.getBreakpointForWidth(parentWidth);
|
|
98
|
-
}
|
|
99
|
-
updateChildrenHeights() {
|
|
100
|
-
this.coreAdapterService.resetHeight(this.elementRef, SKY_SELECTION_BOX_CLASS_NAME);
|
|
101
|
-
this.coreAdapterService.syncMaxHeight(this.elementRef, SKY_SELECTION_BOX_CLASS_NAME);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
SkySelectionBoxGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxGridComponent, deps: [{ token: i1.SkyCoreAdapterService }, { token: i2.SkySelectionBoxAdapterService }, { token: i0.ElementRef }, { token: i1.MutationObserverService }, { token: i0.NgZone }, { token: i3.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
-
SkySelectionBoxGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxGridComponent, selector: "sky-selection-box-grid", inputs: { alignItems: "alignItems" }, host: { listeners: { "window:resize": "onWindowResize()" } }, queries: [{ propertyName: "selectionBoxes", predicate: SkySelectionBoxComponent, read: SkySelectionBoxComponent }], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["container"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div\n class=\"sky-selection-box-grid\"\n [ngClass]=\"'sky-selection-box-grid-align-' + alignItems\"\n #container\n>\n <ng-content select=\"sky-selection-box\"></ng-content>\n</div>\n", styles: [":host{display:block}.sky-selection-box-grid{display:flex;flex-flow:row wrap;padding:0 7.5px;margin:0 auto}.sky-selection-box-grid.sky-selection-box-grid-align-center{justify-content:center}.sky-selection-box-grid.sky-selection-box-grid-align-left{justify-content:flex-start}.sky-selection-box-grid>sky-selection-box{margin:0 7.5px 15px;height:100%}.sky-selection-box-grid.sky-selection-box-container-xs{max-width:374px}.sky-selection-box-grid.sky-selection-box-container-xs>sky-selection-box{flex:0 1 344px}.sky-selection-box-grid.sky-selection-box-container-xs .sky-selection-box{padding:15px}.sky-selection-box-grid.sky-selection-box-container-xs .sky-selection-box .sky-selection-box-icon{display:none}.sky-selection-box-grid.sky-selection-box-container-xs .sky-selection-box .sky-selection-box-header{font-size:20px;font-weight:400}.sky-selection-box-grid.sky-selection-box-container-sm{max-width:733px}.sky-selection-box-grid.sky-selection-box-container-sm>sky-selection-box{flex:0 1 344px}.sky-selection-box-grid.sky-selection-box-container-sm .sky-selection-box{padding:15px}.sky-selection-box-grid.sky-selection-box-container-sm .sky-selection-box .sky-selection-box-icon{display:none}.sky-selection-box-grid.sky-selection-box-container-sm .sky-selection-box .sky-selection-box-header{font-size:20px;font-weight:400}.sky-selection-box-grid.sky-selection-box-container-md{max-width:937px}.sky-selection-box-grid.sky-selection-box-container-md>sky-selection-box{flex:0 1 446px}.sky-selection-box-grid.sky-selection-box-container-lg{max-width:1398px}.sky-selection-box-grid.sky-selection-box-container-lg>sky-selection-box{flex:0 1 446px}\n"], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxGridComponent, decorators: [{
|
|
107
|
-
type: Component,
|
|
108
|
-
args: [{
|
|
109
|
-
selector: 'sky-selection-box-grid',
|
|
110
|
-
templateUrl: './selection-box-grid.component.html',
|
|
111
|
-
styleUrls: ['./selection-box-grid.component.scss'],
|
|
112
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
113
|
-
encapsulation: ViewEncapsulation.None,
|
|
114
|
-
}]
|
|
115
|
-
}], ctorParameters: function () { return [{ type: i1.SkyCoreAdapterService }, { type: i2.SkySelectionBoxAdapterService }, { type: i0.ElementRef }, { type: i1.MutationObserverService }, { type: i0.NgZone }, { type: i3.SkyThemeService, decorators: [{
|
|
116
|
-
type: Optional
|
|
117
|
-
}] }]; }, propDecorators: { alignItems: [{
|
|
118
|
-
type: Input
|
|
119
|
-
}], selectionBoxes: [{
|
|
120
|
-
type: ContentChildren,
|
|
121
|
-
args: [SkySelectionBoxComponent, {
|
|
122
|
-
read: SkySelectionBoxComponent,
|
|
123
|
-
}]
|
|
124
|
-
}], elementRef: [{
|
|
125
|
-
type: ViewChild,
|
|
126
|
-
args: ['container', {
|
|
127
|
-
read: ElementRef,
|
|
128
|
-
static: true,
|
|
129
|
-
}]
|
|
130
|
-
}], onWindowResize: [{
|
|
131
|
-
type: HostListener,
|
|
132
|
-
args: ['window:resize']
|
|
133
|
-
}] } });
|
|
134
|
-
//# sourceMappingURL=selection-box-grid.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection-box-grid.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box-grid.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box-grid.component.html"],"names":[],"mappings":"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","sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n HostListener,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Optional,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n MutationObserverService,\n SkyCoreAdapterService,\n SkyMediaBreakpoints,\n} from '@skyux/core';\nimport { SkyThemeService } from '@skyux/theme';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkySelectionBoxAdapterService } from './selection-box-adapter.service';\nimport { SkySelectionBoxComponent } from './selection-box.component';\nimport { SkySelectionBoxGridAlignItemsType } from './types/selection-box-grid-align-items-type';\n\nconst SKY_SELECTION_BOX_CLASS_NAME = '.sky-selection-box';\n\n/**\n * Creates a grid layout for an array of selection boxes.\n */\n@Component({\n selector: 'sky-selection-box-grid',\n templateUrl: './selection-box-grid.component.html',\n styleUrls: ['./selection-box-grid.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class SkySelectionBoxGridComponent\n implements AfterViewInit, OnDestroy, OnInit\n{\n /**\n * @internal\n * Specifies how to display the selection boxes in the grid.\n * @default 'center'\n */\n @Input()\n public set alignItems(value: SkySelectionBoxGridAlignItemsType) {\n this._alignItems = value;\n }\n\n public get alignItems(): SkySelectionBoxGridAlignItemsType {\n return this._alignItems || 'center';\n }\n\n @ContentChildren(SkySelectionBoxComponent, {\n read: SkySelectionBoxComponent,\n })\n public selectionBoxes: QueryList<SkySelectionBoxComponent>;\n\n private set currentBreakpoint(value: SkyMediaBreakpoints) {\n if (value !== this._currentBreakpoint) {\n this._currentBreakpoint = value;\n this.selectionBoxAdapter.setResponsiveClass(this.elementRef, value);\n this.updateChildrenHeights();\n }\n }\n\n @ViewChild('container', {\n read: ElementRef,\n static: true,\n })\n private elementRef: ElementRef<any>;\n\n private mutationObserver: MutationObserver;\n\n private ngUnsubscribe = new Subject();\n\n private _alignItems: SkySelectionBoxGridAlignItemsType;\n\n private _currentBreakpoint: SkyMediaBreakpoints;\n\n constructor(\n private coreAdapterService: SkyCoreAdapterService,\n private selectionBoxAdapter: SkySelectionBoxAdapterService,\n private hostElRef: ElementRef,\n private mutationObserverSvc: MutationObserverService,\n private ngZone: NgZone,\n @Optional() private themeSvc?: SkyThemeService\n ) {}\n\n public ngOnInit(): void {\n /* istanbul ignore else */\n if (this.themeSvc) {\n this.themeSvc.settingsChange\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(() => {\n this.updateBreakpointClass();\n this.updateChildrenHeights();\n });\n }\n }\n\n public ngAfterViewInit(): void {\n this.updateBreakpointClass();\n this.updateChildrenHeights();\n this.initMutationObserver();\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n\n this.destroyMutationObserver();\n }\n\n @HostListener('window:resize')\n public onWindowResize(): void {\n this.updateBreakpointClass();\n }\n\n private initMutationObserver(): void {\n /* istanbul ignore else */\n if (!this.mutationObserver) {\n const el = this.elementRef.nativeElement;\n\n // MutationObserver is patched by Zone.js and therefore becomes part of the\n // Angular change detection cycle, but this can lead to infinite loops in some\n // scenarios. This will keep MutationObserver from triggering change detection.\n this.ngZone.runOutsideAngular(() => {\n this.mutationObserver = this.mutationObserverSvc.create(() => {\n this.updateChildrenHeights();\n });\n\n this.mutationObserver.observe(el, {\n characterData: true,\n subtree: true,\n });\n });\n }\n }\n\n private destroyMutationObserver(): void {\n /* istanbul ignore else */\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = undefined;\n }\n }\n\n private updateBreakpointClass(): void {\n const parentWidth = this.selectionBoxAdapter.getParentWidth(this.hostElRef);\n this.currentBreakpoint =\n this.selectionBoxAdapter.getBreakpointForWidth(parentWidth);\n }\n\n private updateChildrenHeights(): void {\n this.coreAdapterService.resetHeight(\n this.elementRef,\n SKY_SELECTION_BOX_CLASS_NAME\n );\n this.coreAdapterService.syncMaxHeight(\n this.elementRef,\n SKY_SELECTION_BOX_CLASS_NAME\n );\n }\n}\n","<div\n class=\"sky-selection-box-grid\"\n [ngClass]=\"'sky-selection-box-grid-align-' + alignItems\"\n #container\n>\n <ng-content select=\"sky-selection-box\"></ng-content>\n</div>\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Specifies the header to display in a selection box.
|
|
5
|
-
*/
|
|
6
|
-
export class SkySelectionBoxHeaderComponent {
|
|
7
|
-
}
|
|
8
|
-
SkySelectionBoxHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
-
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" });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, decorators: [{
|
|
11
|
-
type: Component,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: 'sky-selection-box-header',
|
|
14
|
-
templateUrl: './selection-box-header.component.html',
|
|
15
|
-
}]
|
|
16
|
-
}] });
|
|
17
|
-
//# sourceMappingURL=selection-box-header.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection-box-header.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box-header.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box-header.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAE1C;;GAEG;AAKH,MAAM,OAAO,8BAA8B;;4HAA9B,8BAA8B;gHAA9B,8BAA8B,gECT3C,6BACA;4FDQa,8BAA8B;kBAJ1C,SAAS;mBAAC;oBACT,QAAQ,EAAE,0BAA0B;oBACpC,WAAW,EAAE,uCAAuC;iBACrD","sourcesContent":["import { Component } from '@angular/core';\n\n/**\n * Specifies the header to display in a selection box.\n */\n@Component({\n selector: 'sky-selection-box-header',\n templateUrl: './selection-box-header.component.html',\n})\nexport class SkySelectionBoxHeaderComponent {}\n","<ng-content></ng-content>\n"]}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, ViewChild, ViewEncapsulation, } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import { takeUntil } from 'rxjs/operators';
|
|
4
|
-
import { SkySelectionBoxAdapterService } from './selection-box-adapter.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "./selection-box-adapter.service";
|
|
7
|
-
import * as i2 from "@angular/common";
|
|
8
|
-
import * as i3 from "@skyux/theme";
|
|
9
|
-
/**
|
|
10
|
-
* Creates a button to present users with a choice or question before proceeding with a one-time process.
|
|
11
|
-
*/
|
|
12
|
-
export class SkySelectionBoxComponent {
|
|
13
|
-
constructor(changeDetector, selectionBoxAdapterService) {
|
|
14
|
-
this.changeDetector = changeDetector;
|
|
15
|
-
this.selectionBoxAdapterService = selectionBoxAdapterService;
|
|
16
|
-
this.ngUnsubscribe = new Subject();
|
|
17
|
-
}
|
|
18
|
-
set checked(value) {
|
|
19
|
-
this._checked = value;
|
|
20
|
-
this.changeDetector.markForCheck();
|
|
21
|
-
}
|
|
22
|
-
get checked() {
|
|
23
|
-
return this._checked;
|
|
24
|
-
}
|
|
25
|
-
set disabled(value) {
|
|
26
|
-
this.selectionBoxAdapterService.setTabIndex(this.selectionBoxEl, value ? -1 : 0);
|
|
27
|
-
this._disabled = value;
|
|
28
|
-
this.changeDetector.markForCheck();
|
|
29
|
-
}
|
|
30
|
-
get disabled() {
|
|
31
|
-
return this._disabled || false;
|
|
32
|
-
}
|
|
33
|
-
ngAfterViewInit() {
|
|
34
|
-
// Wait for consumer form controls to initialize before setting selected/disabled states.
|
|
35
|
-
setTimeout(() => {
|
|
36
|
-
this.selectionBoxAdapterService.setChildrenTabIndex(this.selectionBoxEl, -1);
|
|
37
|
-
this.updateCheckedOnControlChange();
|
|
38
|
-
this.updateDisabledState();
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
ngOnDestroy() {
|
|
42
|
-
this.ngUnsubscribe.next();
|
|
43
|
-
this.ngUnsubscribe.complete();
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Since we are programatically firing a click on the control,
|
|
47
|
-
* make sure user is not clicking on the control before firing click logic.
|
|
48
|
-
*/
|
|
49
|
-
onClick(event) {
|
|
50
|
-
const isControlClick = this.selectionBoxAdapterService.isDescendant(this.controlEl, event.target);
|
|
51
|
-
if (!isControlClick) {
|
|
52
|
-
this.selectControl();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
onKeydown(event) {
|
|
56
|
-
/* istanbul ignore else */
|
|
57
|
-
if (event.key === ' ') {
|
|
58
|
-
this.selectControl();
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
selectControl() {
|
|
63
|
-
this.selectionBoxAdapterService.getControl(this.controlEl).click();
|
|
64
|
-
this.selectionBoxAdapterService.focus(this.selectionBoxEl);
|
|
65
|
-
}
|
|
66
|
-
updateCheckedOnControlChange() {
|
|
67
|
-
this.control.checkedChange
|
|
68
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
69
|
-
.subscribe((value) => {
|
|
70
|
-
this.checked = value;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
updateDisabledState() {
|
|
74
|
-
this.control.disabledChange
|
|
75
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
76
|
-
.subscribe((value) => {
|
|
77
|
-
this.disabled = value;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
SkySelectionBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SkySelectionBoxAdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
-
SkySelectionBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxComponent, selector: "sky-selection-box", inputs: { control: "control" }, viewQueries: [{ propertyName: "controlEl", first: true, predicate: ["control"], descendants: true, read: ElementRef }, { propertyName: "selectionBoxEl", first: true, predicate: ["selectionBox"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"sky-selection-box sky-rounded-corners sky-btn sky-btn-default\"\n role=\"button\"\n tabindex=\"0\"\n [attr.disabled]=\"disabled ? true : null\"\n [ngClass]=\"{\n 'sky-selection-box-selected': checked,\n 'sky-selection-box-disabled': disabled\n }\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n #selectionBox\n>\n <div\n class=\"sky-selection-box-icon\"\n [ngStyle]=\"{\n display: !icon.innerHTML.trim() ? 'none' : ''\n }\"\n #icon\n >\n <ng-content select=\"sky-icon\"> </ng-content>\n </div>\n\n <div class=\"sky-selection-box-content\">\n <div\n class=\"sky-selection-box-header\"\n [ngClass]=\"{\n 'sky-font-heading-2': icon.innerHTML.trim(),\n 'sky-font-heading-3': !icon.innerHTML.trim()\n }\"\n >\n <ng-content select=\"sky-selection-box-header\"></ng-content>\n </div>\n <div\n class=\"sky-selection-box-description\"\n [skyThemeClass]=\"{\n 'sky-font-deemphasized': 'modern',\n 'sky-deemphasized': 'default'\n }\"\n >\n <ng-content select=\"sky-selection-box-description\"> </ng-content>\n </div>\n </div>\n\n <div class=\"sky-selection-box-control\" #control>\n <ng-content select=\"sky-radio\"> </ng-content>\n <ng-content select=\"sky-checkbox\"> </ng-content>\n </div>\n</div>\n", styles: [".sky-selection-box{display:flex;flex-flow:row nowrap;padding:15px;text-align:left}.sky-selection-box:hover{background:#ffffff;box-shadow:0 0 5px #0000004d,inset 0 0 0 1px #00b4f1}.sky-selection-box:hover .sky-switch-control{border:solid 1px #00b4f1}.sky-selection-box:focus .sky-switch-control{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px}.sky-selection-box.sky-selection-box-selected{background:#f1eef6}.sky-selection-box.sky-selection-box-disabled{background:#eeeeef}.sky-selection-box.sky-selection-box-disabled .sky-selection-box-icon{color:#686c73}.sky-selection-box .sky-selection-box-icon{color:#0974a1;margin:0 10px 0 0;width:42px;height:42px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.sky-selection-box .sky-selection-box-icon .sky-icon{font-size:24px!important}.sky-selection-box .sky-selection-box-content{flex:1 1 auto;margin:0 10px 0 0;white-space:initial}.sky-selection-box .sky-selection-box-header{padding-top:3px}.sky-selection-box .sky-selection-box-control{flex:0 0 auto;padding-top:5px}:host-context(.sky-theme-modern) .sky-selection-box{padding:30px}:host-context(.sky-theme-modern) .sky-selection-box:hover{box-shadow:0 1px 3px #0000004d,inset 0 0 0 1px #1870b8}:host-context(.sky-theme-modern) .sky-selection-box:hover .sky-switch-control{border:solid 1px #1870B8}:host-context(.sky-theme-modern) .sky-selection-box:focus .sky-switch-input:not(:disabled):checked+.sky-switch-control{border:none}:host-context(.sky-theme-modern) .sky-selection-box:focus .sky-switch-control{outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8}:host-context(.sky-theme-modern) .sky-selection-box.sky-selection-box-selected,:host-context(.sky-theme-modern) .sky-selection-box:focus.sky-selection-box-selected{background:#e8f8ff;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d,inset 6px 0 #0974a1}:host-context(.sky-theme-modern) .sky-selection-box.sky-selection-box-disabled .sky-selection-box-icon{background:#d2d2d2;color:#686c73}:host-context(.sky-theme-modern) .sky-selection-box .sky-selection-box-icon{color:#0974a1;background:#e8f8ff;margin:0 15px 0 0;border-radius:50%;width:42px;height:42px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}:host-context(.sky-theme-modern) .sky-selection-box .sky-selection-box-content{margin:0 30px 0 0}:host-context(.sky-theme-modern) .sky-selection-box .sky-selection-box-description{margin:3px 0 0}.sky-theme-modern .sky-selection-box{padding:30px}.sky-theme-modern .sky-selection-box:hover{box-shadow:0 1px 3px #0000004d,inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-selection-box:hover .sky-switch-control{border:solid 1px #1870B8}.sky-theme-modern .sky-selection-box:focus .sky-switch-input:not(:disabled):checked+.sky-switch-control{border:none}.sky-theme-modern .sky-selection-box:focus .sky-switch-control{outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-selection-box.sky-selection-box-selected,.sky-theme-modern .sky-selection-box:focus.sky-selection-box-selected{background:#e8f8ff;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d,inset 6px 0 #0974a1}.sky-theme-modern .sky-selection-box.sky-selection-box-disabled .sky-selection-box-icon{background:#d2d2d2;color:#686c73}.sky-theme-modern .sky-selection-box .sky-selection-box-icon{color:#0974a1;background:#e8f8ff;margin:0 15px 0 0;border-radius:50%;width:42px;height:42px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.sky-theme-modern .sky-selection-box .sky-selection-box-content{margin:0 30px 0 0}.sky-theme-modern .sky-selection-box .sky-selection-box-description{margin:3px 0 0}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxComponent, decorators: [{
|
|
84
|
-
type: Component,
|
|
85
|
-
args: [{
|
|
86
|
-
selector: 'sky-selection-box',
|
|
87
|
-
styleUrls: ['./selection-box.component.scss'],
|
|
88
|
-
templateUrl: './selection-box.component.html',
|
|
89
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
90
|
-
encapsulation: ViewEncapsulation.None,
|
|
91
|
-
}]
|
|
92
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.SkySelectionBoxAdapterService }]; }, propDecorators: { control: [{
|
|
93
|
-
type: Input
|
|
94
|
-
}], controlEl: [{
|
|
95
|
-
type: ViewChild,
|
|
96
|
-
args: ['control', {
|
|
97
|
-
read: ElementRef,
|
|
98
|
-
static: false,
|
|
99
|
-
}]
|
|
100
|
-
}], selectionBoxEl: [{
|
|
101
|
-
type: ViewChild,
|
|
102
|
-
args: ['selectionBox', {
|
|
103
|
-
read: ElementRef,
|
|
104
|
-
static: false,
|
|
105
|
-
}]
|
|
106
|
-
}] } });
|
|
107
|
-
//# sourceMappingURL=selection-box.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection-box.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/selection-box/selection-box.component.html"],"names":[],"mappings":"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","sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkyCheckboxComponent } from '../checkbox/checkbox.component';\nimport { SkyRadioComponent } from '../radio/radio.component';\n\nimport { SkySelectionBoxAdapterService } from './selection-box-adapter.service';\n\n/**\n * Creates a button to present users with a choice or question before proceeding with a one-time process.\n */\n@Component({\n selector: 'sky-selection-box',\n styleUrls: ['./selection-box.component.scss'],\n templateUrl: './selection-box.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class SkySelectionBoxComponent implements AfterViewInit, OnDestroy {\n /**\n * Specifies the radio button or checkbox to display in the selection box.\n * @required\n */\n @Input()\n public control: SkyCheckboxComponent | SkyRadioComponent;\n\n public set checked(value: boolean) {\n this._checked = value;\n this.changeDetector.markForCheck();\n }\n\n public get checked(): boolean {\n return this._checked;\n }\n\n public set disabled(value: boolean) {\n this.selectionBoxAdapterService.setTabIndex(\n this.selectionBoxEl,\n value ? -1 : 0\n );\n this._disabled = value;\n this.changeDetector.markForCheck();\n }\n\n public get disabled(): boolean {\n return this._disabled || false;\n }\n\n @ViewChild('control', {\n read: ElementRef,\n static: false,\n })\n private controlEl: ElementRef;\n\n @ViewChild('selectionBox', {\n read: ElementRef,\n static: false,\n })\n private selectionBoxEl: ElementRef;\n\n private ngUnsubscribe = new Subject<void>();\n\n private _checked: boolean;\n\n private _disabled: boolean;\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private selectionBoxAdapterService: SkySelectionBoxAdapterService\n ) {}\n\n public ngAfterViewInit(): void {\n // Wait for consumer form controls to initialize before setting selected/disabled states.\n setTimeout(() => {\n this.selectionBoxAdapterService.setChildrenTabIndex(\n this.selectionBoxEl,\n -1\n );\n this.updateCheckedOnControlChange();\n this.updateDisabledState();\n });\n }\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n /**\n * Since we are programatically firing a click on the control,\n * make sure user is not clicking on the control before firing click logic.\n */\n public onClick(event: any): void {\n const isControlClick = this.selectionBoxAdapterService.isDescendant(\n this.controlEl,\n event.target\n );\n if (!isControlClick) {\n this.selectControl();\n }\n }\n\n public onKeydown(event: KeyboardEvent): void {\n /* istanbul ignore else */\n if (event.key === ' ') {\n this.selectControl();\n event.preventDefault();\n }\n }\n\n private selectControl(): void {\n this.selectionBoxAdapterService.getControl(this.controlEl).click();\n this.selectionBoxAdapterService.focus(this.selectionBoxEl);\n }\n\n private updateCheckedOnControlChange(): void {\n this.control.checkedChange\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value) => {\n this.checked = value;\n });\n }\n\n private updateDisabledState(): void {\n this.control.disabledChange\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value) => {\n this.disabled = value;\n });\n }\n}\n","<div\n class=\"sky-selection-box sky-rounded-corners sky-btn sky-btn-default\"\n role=\"button\"\n tabindex=\"0\"\n [attr.disabled]=\"disabled ? true : null\"\n [ngClass]=\"{\n 'sky-selection-box-selected': checked,\n 'sky-selection-box-disabled': disabled\n }\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeydown($event)\"\n #selectionBox\n>\n <div\n class=\"sky-selection-box-icon\"\n [ngStyle]=\"{\n display: !icon.innerHTML.trim() ? 'none' : ''\n }\"\n #icon\n >\n <ng-content select=\"sky-icon\"> </ng-content>\n </div>\n\n <div class=\"sky-selection-box-content\">\n <div\n class=\"sky-selection-box-header\"\n [ngClass]=\"{\n 'sky-font-heading-2': icon.innerHTML.trim(),\n 'sky-font-heading-3': !icon.innerHTML.trim()\n }\"\n >\n <ng-content select=\"sky-selection-box-header\"></ng-content>\n </div>\n <div\n class=\"sky-selection-box-description\"\n [skyThemeClass]=\"{\n 'sky-font-deemphasized': 'modern',\n 'sky-deemphasized': 'default'\n }\"\n >\n <ng-content select=\"sky-selection-box-description\"> </ng-content>\n </div>\n </div>\n\n <div class=\"sky-selection-box-control\" #control>\n <ng-content select=\"sky-radio\"> </ng-content>\n <ng-content select=\"sky-checkbox\"> </ng-content>\n </div>\n</div>\n"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { SkyThemeModule } from '@skyux/theme';
|
|
4
|
-
import { SkySelectionBoxAdapterService } from './selection-box-adapter.service';
|
|
5
|
-
import { SkySelectionBoxDescriptionComponent } from './selection-box-description.component';
|
|
6
|
-
import { SkySelectionBoxGridComponent } from './selection-box-grid.component';
|
|
7
|
-
import { SkySelectionBoxHeaderComponent } from './selection-box-header.component';
|
|
8
|
-
import { SkySelectionBoxComponent } from './selection-box.component';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
export class SkySelectionBoxModule {
|
|
11
|
-
}
|
|
12
|
-
SkySelectionBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
-
SkySelectionBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, declarations: [SkySelectionBoxGridComponent,
|
|
14
|
-
SkySelectionBoxComponent,
|
|
15
|
-
SkySelectionBoxDescriptionComponent,
|
|
16
|
-
SkySelectionBoxHeaderComponent], imports: [CommonModule, SkyThemeModule], exports: [SkySelectionBoxGridComponent,
|
|
17
|
-
SkySelectionBoxComponent,
|
|
18
|
-
SkySelectionBoxDescriptionComponent,
|
|
19
|
-
SkySelectionBoxHeaderComponent] });
|
|
20
|
-
SkySelectionBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, providers: [SkySelectionBoxAdapterService], imports: [[CommonModule, SkyThemeModule]] });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, decorators: [{
|
|
22
|
-
type: NgModule,
|
|
23
|
-
args: [{
|
|
24
|
-
declarations: [
|
|
25
|
-
SkySelectionBoxGridComponent,
|
|
26
|
-
SkySelectionBoxComponent,
|
|
27
|
-
SkySelectionBoxDescriptionComponent,
|
|
28
|
-
SkySelectionBoxHeaderComponent,
|
|
29
|
-
],
|
|
30
|
-
imports: [CommonModule, SkyThemeModule],
|
|
31
|
-
exports: [
|
|
32
|
-
SkySelectionBoxGridComponent,
|
|
33
|
-
SkySelectionBoxComponent,
|
|
34
|
-
SkySelectionBoxDescriptionComponent,
|
|
35
|
-
SkySelectionBoxHeaderComponent,
|
|
36
|
-
],
|
|
37
|
-
providers: [SkySelectionBoxAdapterService],
|
|
38
|
-
}]
|
|
39
|
-
}] });
|
|
40
|
-
//# sourceMappingURL=selection-box.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection-box-grid-align-items-type.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/forms/src/lib/modules/selection-box/types/selection-box-grid-align-items-type.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @internal\n */\nexport type SkySelectionBoxGridAlignItemsType = 'center' | 'left';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection-box-grid-align-items.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/forms/src/lib/modules/selection-box/types/selection-box-grid-align-items.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @internal\n * @deprecated Use `SkySelectionBoxGridAlignItemsType` instead.\n */\nexport const enum SkySelectionBoxGridAlignItems {\n /**\n * Center-aligns the selection boxes.\n */\n Center = 'center',\n\n /**\n * Left-aligns the selection boxes.\n */\n Left = 'left',\n}\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Need to add the following to classes which contain static methods.
|
|
2
|
-
// See: https://github.com/ng-packagr/ng-packagr/issues/641
|
|
3
|
-
// @dynamic
|
|
4
|
-
export class SkyFormsUtility {
|
|
5
|
-
/** Coerces a data-bound value (typically a string) to a boolean. */
|
|
6
|
-
static coerceBooleanProperty(value) {
|
|
7
|
-
return value !== undefined && `${value}` !== 'false';
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Gets the required state of the checkbox.
|
|
11
|
-
* Currently, Angular doesn't offer a way to get this easily, so we have to create an empty
|
|
12
|
-
* control using the current validator to see if it throws a `required` validation error.
|
|
13
|
-
* https://github.com/angular/angular/issues/13461#issuecomment-340368046
|
|
14
|
-
*/
|
|
15
|
-
static hasRequiredValidation(ngControl) {
|
|
16
|
-
const abstractControl = ngControl.control;
|
|
17
|
-
if (abstractControl && abstractControl.validator) {
|
|
18
|
-
const validator = abstractControl.validator({});
|
|
19
|
-
if (validator && validator.required) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=forms-utility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forms-utility.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/shared/forms-utility.ts"],"names":[],"mappings":"AAEA,qEAAqE;AACrE,2DAA2D;AAC3D,WAAW;AACX,MAAM,OAAO,eAAe;IAC1B,oEAAoE;IAC7D,MAAM,CAAC,qBAAqB,CAAC,KAAU;QAC5C,OAAO,KAAK,KAAK,SAAS,IAAI,GAAG,KAAK,EAAE,KAAK,OAAO,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,qBAAqB,CAAC,SAAoB;QACtD,MAAM,eAAe,GAAG,SAAS,CAAC,OAA0B,CAAC;QAC7D,IAAI,eAAe,IAAI,eAAe,CAAC,SAAS,EAAE;YAChD,MAAM,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC,EAAqB,CAAC,CAAC;YACnE,IAAI,SAAS,IAAI,SAAS,CAAC,QAAQ,EAAE;gBACnC,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["import { AbstractControl, NgControl } from '@angular/forms';\n\n// Need to add the following to classes which contain static methods.\n// See: https://github.com/ng-packagr/ng-packagr/issues/641\n// @dynamic\nexport class SkyFormsUtility {\n /** Coerces a data-bound value (typically a string) to a boolean. */\n public static coerceBooleanProperty(value: any): boolean {\n return value !== undefined && `${value}` !== 'false';\n }\n\n /**\n * Gets the required state of the checkbox.\n * Currently, Angular doesn't offer a way to get this easily, so we have to create an empty\n * control using the current validator to see if it throws a `required` validation error.\n * https://github.com/angular/angular/issues/13461#issuecomment-340368046\n */\n public static hasRequiredValidation(ngControl: NgControl): boolean {\n const abstractControl = ngControl.control as AbstractControl;\n if (abstractControl && abstractControl.validator) {\n const validator = abstractControl.validator({} as AbstractControl);\n if (validator && validator.required) {\n return true;\n }\n }\n return false;\n }\n}\n"]}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
3
|
-
* The contents of this file were automatically generated by
|
|
4
|
-
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-forms' schematic.
|
|
5
|
-
* To update this file, simply rerun the command.
|
|
6
|
-
*/
|
|
7
|
-
import { NgModule } from '@angular/core';
|
|
8
|
-
import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
const RESOURCES = {
|
|
11
|
-
'EN-US': {
|
|
12
|
-
skyux_character_count_message: { message: 'characters out of' },
|
|
13
|
-
skyux_character_count_over_limit: {
|
|
14
|
-
message: 'You are over the character limit.',
|
|
15
|
-
},
|
|
16
|
-
skyux_file_attachment_button_label_choose_file: { message: 'Choose file' },
|
|
17
|
-
skyux_file_attachment_button_label_replace_file: {
|
|
18
|
-
message: 'Replace file',
|
|
19
|
-
},
|
|
20
|
-
skyux_file_attachment_file_item_delete: { message: 'Delete file' },
|
|
21
|
-
skyux_file_attachment_file_size_b_plural: { message: '{0} bytes' },
|
|
22
|
-
skyux_file_attachment_file_size_b_singular: { message: '{0} byte' },
|
|
23
|
-
skyux_file_attachment_file_size_gb: { message: '{0} GB' },
|
|
24
|
-
skyux_file_attachment_file_size_kb: { message: '{0} KB' },
|
|
25
|
-
skyux_file_attachment_file_size_mb: { message: '{0} MB' },
|
|
26
|
-
skyux_file_attachment_file_upload_drag_file_here: {
|
|
27
|
-
message: 'Drag a file here',
|
|
28
|
-
},
|
|
29
|
-
skyux_file_attachment_file_upload_drag_or_click: {
|
|
30
|
-
message: 'Drag a file here or click to browse',
|
|
31
|
-
},
|
|
32
|
-
skyux_file_attachment_file_upload_drop_files_here: {
|
|
33
|
-
message: 'Drop files here',
|
|
34
|
-
},
|
|
35
|
-
skyux_file_attachment_file_upload_image_preview_alt_text: {
|
|
36
|
-
message: 'Image preview',
|
|
37
|
-
},
|
|
38
|
-
skyux_file_attachment_file_upload_invalid_file: {
|
|
39
|
-
message: 'This file type is invalid',
|
|
40
|
-
},
|
|
41
|
-
skyux_file_attachment_file_upload_link_input: {
|
|
42
|
-
message: 'Add a link to a file',
|
|
43
|
-
},
|
|
44
|
-
skyux_file_attachment_file_upload_link_placeholder: {
|
|
45
|
-
message: 'http://www.something.com/file',
|
|
46
|
-
},
|
|
47
|
-
skyux_file_attachment_file_upload_or_click_to_browse: {
|
|
48
|
-
message: 'or click to browse',
|
|
49
|
-
},
|
|
50
|
-
skyux_file_attachment_file_upload_paste_link: {
|
|
51
|
-
message: 'Paste a link to a file',
|
|
52
|
-
},
|
|
53
|
-
skyux_file_attachment_file_upload_paste_link_done: { message: 'Done' },
|
|
54
|
-
skyux_file_attachment_label_no_file_chosen: { message: 'No file chosen' },
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
export class SkyFormsResourcesProvider {
|
|
58
|
-
getString(localeInfo, name) {
|
|
59
|
-
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Import into any component library module that needs to use resource strings.
|
|
64
|
-
*/
|
|
65
|
-
export class SkyFormsResourcesModule {
|
|
66
|
-
}
|
|
67
|
-
SkyFormsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
68
|
-
SkyFormsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, exports: [SkyI18nModule] });
|
|
69
|
-
SkyFormsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, providers: [
|
|
70
|
-
{
|
|
71
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
72
|
-
useClass: SkyFormsResourcesProvider,
|
|
73
|
-
multi: true,
|
|
74
|
-
},
|
|
75
|
-
], imports: [SkyI18nModule] });
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, decorators: [{
|
|
77
|
-
type: NgModule,
|
|
78
|
-
args: [{
|
|
79
|
-
exports: [SkyI18nModule],
|
|
80
|
-
providers: [
|
|
81
|
-
{
|
|
82
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
83
|
-
useClass: SkyFormsResourcesProvider,
|
|
84
|
-
multi: true,
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
}]
|
|
88
|
-
}] });
|
|
89
|
-
//# sourceMappingURL=sky-forms-resources.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CACd,UAA4B,EAC5B,IAAY;QAEZ,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,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 lib/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(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyFormsResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyFormsResourcesModule {}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Specifies the label to display beside the toggle switch.
|
|
5
|
-
*/
|
|
6
|
-
export class SkyToggleSwitchLabelComponent {
|
|
7
|
-
}
|
|
8
|
-
SkyToggleSwitchLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
-
SkyToggleSwitchLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyToggleSwitchLabelComponent, selector: "sky-toggle-switch-label", ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchLabelComponent, decorators: [{
|
|
11
|
-
type: Component,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: 'sky-toggle-switch-label',
|
|
14
|
-
templateUrl: './toggle-switch-label.component.html',
|
|
15
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
-
}]
|
|
17
|
-
}] });
|
|
18
|
-
//# sourceMappingURL=toggle-switch-label.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-switch-label.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch-label.component.ts","../../../../../../../../libs/components/forms/src/lib/modules/toggle-switch/toggle-switch-label.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAEnE;;GAEG;AAMH,MAAM,OAAO,6BAA6B;;2HAA7B,6BAA6B;+GAA7B,6BAA6B,+DCV1C,6BACA;4FDSa,6BAA6B;kBALzC,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,WAAW,EAAE,sCAAsC;oBACnD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n/**\n * Specifies the label to display beside the toggle switch.\n */\n@Component({\n selector: 'sky-toggle-switch-label',\n templateUrl: './toggle-switch-label.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyToggleSwitchLabelComponent {}\n","<ng-content></ng-content>\n"]}
|