@skyux/forms 5.0.0 → 5.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/bundles/skyux-forms-testing.umd.js +7 -4
- package/bundles/skyux-forms.umd.js +343 -367
- package/documentation.json +1700 -1244
- package/esm2015/index.js +43 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/character-counter/character-counter-indicator.component.js +37 -0
- package/esm2015/lib/modules/character-counter/character-counter-indicator.component.js.map +1 -0
- package/esm2015/lib/modules/character-counter/character-counter.directive.js +83 -0
- package/esm2015/lib/modules/character-counter/character-counter.directive.js.map +1 -0
- package/esm2015/lib/modules/character-counter/character-counter.module.js +46 -0
- package/esm2015/lib/modules/character-counter/character-counter.module.js.map +1 -0
- package/esm2015/lib/modules/checkbox/checkbox-change.js +6 -0
- package/esm2015/lib/modules/checkbox/checkbox-change.js.map +1 -0
- package/esm2015/lib/modules/checkbox/checkbox-label.component.js +17 -0
- package/esm2015/lib/modules/checkbox/checkbox-label.component.js.map +1 -0
- package/esm2015/lib/modules/checkbox/checkbox-required-validator.directive.js +32 -0
- package/esm2015/lib/modules/checkbox/checkbox-required-validator.directive.js.map +1 -0
- package/esm2015/lib/modules/checkbox/checkbox.component.js +240 -0
- package/esm2015/lib/modules/checkbox/checkbox.component.js.map +1 -0
- package/esm2015/lib/modules/checkbox/checkbox.module.js +34 -0
- package/esm2015/lib/modules/checkbox/checkbox.module.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js +19 -0
- package/esm2015/lib/modules/file-attachment/file-attachment-label.component.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-attachment.component.js +331 -0
- package/esm2015/lib/modules/file-attachment/file-attachment.component.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-attachment.service.js +94 -0
- package/esm2015/lib/modules/file-attachment/file-attachment.service.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-attachments.module.js +68 -0
- package/esm2015/lib/modules/file-attachment/file-attachments.module.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-drop.component.js +223 -0
- package/esm2015/lib/modules/file-attachment/file-drop.component.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-item-error-type.js +2 -0
- package/esm2015/lib/modules/file-attachment/file-item-error-type.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-item.component.js +114 -0
- package/esm2015/lib/modules/file-attachment/file-item.component.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-item.js +2 -0
- package/esm2015/lib/modules/file-attachment/file-item.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-item.service.js +72 -0
- package/esm2015/lib/modules/file-attachment/file-item.service.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-link.js +2 -0
- package/esm2015/lib/modules/file-attachment/file-link.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/file-size.pipe.js +61 -0
- package/esm2015/lib/modules/file-attachment/file-size.pipe.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/types/file-attachment-change.js +2 -0
- package/esm2015/lib/modules/file-attachment/types/file-attachment-change.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/types/file-attachment-click.js +2 -0
- package/esm2015/lib/modules/file-attachment/types/file-attachment-click.js.map +1 -0
- package/esm2015/lib/modules/file-attachment/types/file-drop-change.js +2 -0
- package/esm2015/lib/modules/file-attachment/types/file-drop-change.js.map +1 -0
- package/esm2015/lib/modules/input-box/input-box-adapter.service.js +35 -0
- package/esm2015/lib/modules/input-box/input-box-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/input-box/input-box-host.service.js +19 -0
- package/esm2015/lib/modules/input-box/input-box-host.service.js.map +1 -0
- package/esm2015/lib/modules/input-box/input-box-populate-args.js +2 -0
- package/esm2015/lib/modules/input-box/input-box-populate-args.js.map +1 -0
- package/esm2015/lib/modules/input-box/input-box.component.js +97 -0
- package/esm2015/lib/modules/input-box/input-box.component.js.map +1 -0
- package/esm2015/lib/modules/input-box/input-box.module.js +19 -0
- package/esm2015/lib/modules/input-box/input-box.module.js.map +1 -0
- package/esm2015/lib/modules/radio/radio-group.component.js +223 -0
- package/esm2015/lib/modules/radio/radio-group.component.js.map +1 -0
- package/esm2015/lib/modules/radio/radio-label.component.js +26 -0
- package/esm2015/lib/modules/radio/radio-label.component.js.map +1 -0
- package/esm2015/lib/modules/radio/radio.component.js +262 -0
- package/esm2015/lib/modules/radio/radio.component.js.map +1 -0
- package/esm2015/lib/modules/radio/radio.module.js +28 -0
- package/esm2015/lib/modules/radio/radio.module.js.map +1 -0
- package/esm2015/lib/modules/radio/types/radio-change.js +2 -0
- package/esm2015/lib/modules/radio/types/radio-change.js.map +1 -0
- package/esm2015/lib/modules/selection-box/selection-box-adapter.service.js +124 -0
- package/esm2015/lib/modules/selection-box/selection-box-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/selection-box/selection-box-description.component.js +17 -0
- package/esm2015/lib/modules/selection-box/selection-box-description.component.js.map +1 -0
- package/esm2015/lib/modules/selection-box/selection-box-grid.component.js +132 -0
- package/esm2015/lib/modules/selection-box/selection-box-grid.component.js.map +1 -0
- package/esm2015/lib/modules/selection-box/selection-box-header.component.js +17 -0
- package/esm2015/lib/modules/selection-box/selection-box-header.component.js.map +1 -0
- package/esm2015/lib/modules/selection-box/selection-box.component.js +107 -0
- package/esm2015/lib/modules/selection-box/selection-box.component.js.map +1 -0
- package/esm2015/lib/modules/selection-box/selection-box.module.js +40 -0
- package/esm2015/lib/modules/selection-box/selection-box.module.js.map +1 -0
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items-type.js +2 -0
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items-type.js.map +1 -0
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items.js +2 -0
- package/esm2015/lib/modules/selection-box/types/selection-box-grid-align-items.js.map +1 -0
- package/esm2015/lib/modules/shared/forms-utility.js +26 -0
- package/esm2015/lib/modules/shared/forms-utility.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-forms-resources.module.js +89 -0
- package/esm2015/lib/modules/shared/sky-forms-resources.module.js.map +1 -0
- package/esm2015/lib/modules/toggle-switch/toggle-switch-label.component.js +18 -0
- package/esm2015/lib/modules/toggle-switch/toggle-switch-label.component.js.map +1 -0
- package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js +158 -0
- package/esm2015/lib/modules/toggle-switch/toggle-switch.component.js.map +1 -0
- package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js +20 -0
- package/esm2015/lib/modules/toggle-switch/toggle-switch.module.js.map +1 -0
- package/esm2015/lib/modules/toggle-switch/types/toggle-switch-change.js +2 -0
- package/esm2015/lib/modules/toggle-switch/types/toggle-switch-change.js.map +1 -0
- package/esm2015/skyux-forms.js +2 -2
- package/esm2015/skyux-forms.js.map +1 -0
- package/esm2015/testing/checkbox-fixture.js +6 -3
- package/esm2015/testing/checkbox-fixture.js.map +1 -0
- package/esm2015/testing/public-api.js +1 -1
- package/esm2015/testing/public-api.js.map +1 -0
- package/esm2015/testing/skyux-forms-testing.js +1 -1
- package/esm2015/testing/skyux-forms-testing.js.map +1 -0
- package/fesm2015/skyux-forms-testing.js +5 -2
- package/fesm2015/skyux-forms-testing.js.map +1 -1
- package/fesm2015/skyux-forms.js +333 -355
- package/fesm2015/skyux-forms.js.map +1 -1
- package/index.d.ts +40 -0
- package/{modules → lib/modules}/character-counter/character-counter-indicator.component.d.ts +0 -0
- package/{modules → lib/modules}/character-counter/character-counter.directive.d.ts +0 -0
- package/{modules → lib/modules}/character-counter/character-counter.module.d.ts +0 -0
- package/{modules → lib/modules}/checkbox/checkbox-change.d.ts +0 -0
- package/{modules → lib/modules}/checkbox/checkbox-label.component.d.ts +0 -0
- package/{modules → lib/modules}/checkbox/checkbox-required-validator.directive.d.ts +0 -0
- package/{modules → lib/modules}/checkbox/checkbox.component.d.ts +3 -3
- package/{modules → lib/modules}/checkbox/checkbox.module.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-attachment-label.component.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-attachment.component.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-attachment.service.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-attachments.module.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-drop.component.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-item-error-type.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-item.component.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-item.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-item.service.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-link.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/file-size.pipe.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/types/file-attachment-change.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/types/file-attachment-click.d.ts +0 -0
- package/{modules → lib/modules}/file-attachment/types/file-drop-change.d.ts +0 -0
- package/{modules → lib/modules}/input-box/input-box-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/input-box/input-box-host.service.d.ts +0 -0
- package/{modules → lib/modules}/input-box/input-box-populate-args.d.ts +0 -0
- package/{modules → lib/modules}/input-box/input-box.component.d.ts +0 -0
- package/{modules → lib/modules}/input-box/input-box.module.d.ts +0 -0
- package/{modules → lib/modules}/radio/radio-group.component.d.ts +2 -2
- package/{modules → lib/modules}/radio/radio-label.component.d.ts +0 -0
- package/{modules → lib/modules}/radio/radio.component.d.ts +0 -0
- package/{modules → lib/modules}/radio/radio.module.d.ts +0 -0
- package/{modules → lib/modules}/radio/types/radio-change.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/selection-box-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/selection-box-description.component.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/selection-box-grid.component.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/selection-box-header.component.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/selection-box.component.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/selection-box.module.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/types/selection-box-grid-align-items-type.d.ts +0 -0
- package/{modules → lib/modules}/selection-box/types/selection-box-grid-align-items.d.ts +0 -0
- package/{modules → lib/modules}/shared/forms-utility.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-forms-resources.module.d.ts +0 -0
- package/{modules → lib/modules}/toggle-switch/toggle-switch-label.component.d.ts +0 -0
- package/{modules → lib/modules}/toggle-switch/toggle-switch.component.d.ts +0 -0
- package/{modules → lib/modules}/toggle-switch/toggle-switch.module.d.ts +0 -0
- package/{modules → lib/modules}/toggle-switch/types/toggle-switch-change.d.ts +0 -0
- package/package.json +8 -8
- package/skyux-forms.d.ts +1 -1
- package/LICENSE +0 -21
- package/bundles/skyux-forms-testing.umd.js.map +0 -1
- package/bundles/skyux-forms.umd.js.map +0 -1
- package/esm2015/modules/character-counter/character-counter-indicator.component.js +0 -37
- package/esm2015/modules/character-counter/character-counter.directive.js +0 -80
- package/esm2015/modules/character-counter/character-counter.module.js +0 -46
- package/esm2015/modules/checkbox/checkbox-change.js +0 -6
- package/esm2015/modules/checkbox/checkbox-label.component.js +0 -17
- package/esm2015/modules/checkbox/checkbox-required-validator.directive.js +0 -31
- package/esm2015/modules/checkbox/checkbox.component.js +0 -238
- package/esm2015/modules/checkbox/checkbox.module.js +0 -44
- package/esm2015/modules/file-attachment/file-attachment-label.component.js +0 -21
- package/esm2015/modules/file-attachment/file-attachment.component.js +0 -324
- package/esm2015/modules/file-attachment/file-attachment.service.js +0 -92
- package/esm2015/modules/file-attachment/file-attachments.module.js +0 -74
- package/esm2015/modules/file-attachment/file-drop.component.js +0 -226
- package/esm2015/modules/file-attachment/file-item-error-type.js +0 -2
- package/esm2015/modules/file-attachment/file-item.component.js +0 -113
- package/esm2015/modules/file-attachment/file-item.js +0 -2
- package/esm2015/modules/file-attachment/file-item.service.js +0 -69
- package/esm2015/modules/file-attachment/file-link.js +0 -2
- package/esm2015/modules/file-attachment/file-size.pipe.js +0 -58
- package/esm2015/modules/file-attachment/types/file-attachment-change.js +0 -2
- package/esm2015/modules/file-attachment/types/file-attachment-click.js +0 -2
- package/esm2015/modules/file-attachment/types/file-drop-change.js +0 -2
- package/esm2015/modules/input-box/input-box-adapter.service.js +0 -35
- package/esm2015/modules/input-box/input-box-host.service.js +0 -19
- package/esm2015/modules/input-box/input-box-populate-args.js +0 -2
- package/esm2015/modules/input-box/input-box.component.js +0 -103
- package/esm2015/modules/input-box/input-box.module.js +0 -30
- package/esm2015/modules/radio/radio-group.component.js +0 -225
- package/esm2015/modules/radio/radio-label.component.js +0 -26
- package/esm2015/modules/radio/radio.component.js +0 -266
- package/esm2015/modules/radio/radio.module.js +0 -44
- package/esm2015/modules/radio/types/radio-change.js +0 -2
- package/esm2015/modules/selection-box/selection-box-adapter.service.js +0 -122
- package/esm2015/modules/selection-box/selection-box-description.component.js +0 -17
- package/esm2015/modules/selection-box/selection-box-grid.component.js +0 -130
- package/esm2015/modules/selection-box/selection-box-header.component.js +0 -17
- package/esm2015/modules/selection-box/selection-box.component.js +0 -104
- package/esm2015/modules/selection-box/selection-box.module.js +0 -51
- package/esm2015/modules/selection-box/types/selection-box-grid-align-items-type.js +0 -2
- package/esm2015/modules/selection-box/types/selection-box-grid-align-items.js +0 -2
- package/esm2015/modules/shared/forms-utility.js +0 -26
- package/esm2015/modules/shared/sky-forms-resources.module.js +0 -41
- package/esm2015/modules/toggle-switch/toggle-switch-label.component.js +0 -18
- package/esm2015/modules/toggle-switch/toggle-switch.component.js +0 -158
- package/esm2015/modules/toggle-switch/toggle-switch.module.js +0 -35
- package/esm2015/modules/toggle-switch/types/toggle-switch-change.js +0 -2
- package/esm2015/public-api.js +0 -43
- package/public-api.d.ts +0 -40
package/fesm2015/skyux-forms.js
CHANGED
|
@@ -3,7 +3,7 @@ import { CommonModule, DecimalPipe } from '@angular/common';
|
|
|
3
3
|
import * as i4 from '@angular/forms';
|
|
4
4
|
import { NG_VALIDATORS, FormsModule, ReactiveFormsModule, CheckboxRequiredValidator, FormControlDirective, FormControlName, NgModel, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { NgModule,
|
|
6
|
+
import { NgModule, Component, ChangeDetectionStrategy, Directive, Input, EventEmitter, Self, Optional, Output, forwardRef, Injectable, ViewChild, ContentChildren, Pipe, ViewEncapsulation, ContentChild, HostListener, ElementRef } from '@angular/core';
|
|
7
7
|
import * as i2 from '@skyux/i18n';
|
|
8
8
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
9
9
|
import * as i2$1 from '@skyux/indicators';
|
|
@@ -22,7 +22,51 @@ import { SkyMediaBreakpoints } from '@skyux/core';
|
|
|
22
22
|
* To update this file, simply rerun the command.
|
|
23
23
|
*/
|
|
24
24
|
const RESOURCES = {
|
|
25
|
-
'EN-US': {
|
|
25
|
+
'EN-US': {
|
|
26
|
+
skyux_character_count_message: { message: 'characters out of' },
|
|
27
|
+
skyux_character_count_over_limit: {
|
|
28
|
+
message: 'You are over the character limit.',
|
|
29
|
+
},
|
|
30
|
+
skyux_file_attachment_button_label_choose_file: { message: 'Choose file' },
|
|
31
|
+
skyux_file_attachment_button_label_replace_file: {
|
|
32
|
+
message: 'Replace file',
|
|
33
|
+
},
|
|
34
|
+
skyux_file_attachment_file_item_delete: { message: 'Delete file' },
|
|
35
|
+
skyux_file_attachment_file_size_b_plural: { message: '{0} bytes' },
|
|
36
|
+
skyux_file_attachment_file_size_b_singular: { message: '{0} byte' },
|
|
37
|
+
skyux_file_attachment_file_size_gb: { message: '{0} GB' },
|
|
38
|
+
skyux_file_attachment_file_size_kb: { message: '{0} KB' },
|
|
39
|
+
skyux_file_attachment_file_size_mb: { message: '{0} MB' },
|
|
40
|
+
skyux_file_attachment_file_upload_drag_file_here: {
|
|
41
|
+
message: 'Drag a file here',
|
|
42
|
+
},
|
|
43
|
+
skyux_file_attachment_file_upload_drag_or_click: {
|
|
44
|
+
message: 'Drag a file here or click to browse',
|
|
45
|
+
},
|
|
46
|
+
skyux_file_attachment_file_upload_drop_files_here: {
|
|
47
|
+
message: 'Drop files here',
|
|
48
|
+
},
|
|
49
|
+
skyux_file_attachment_file_upload_image_preview_alt_text: {
|
|
50
|
+
message: 'Image preview',
|
|
51
|
+
},
|
|
52
|
+
skyux_file_attachment_file_upload_invalid_file: {
|
|
53
|
+
message: 'This file type is invalid',
|
|
54
|
+
},
|
|
55
|
+
skyux_file_attachment_file_upload_link_input: {
|
|
56
|
+
message: 'Add a link to a file',
|
|
57
|
+
},
|
|
58
|
+
skyux_file_attachment_file_upload_link_placeholder: {
|
|
59
|
+
message: 'http://www.something.com/file',
|
|
60
|
+
},
|
|
61
|
+
skyux_file_attachment_file_upload_or_click_to_browse: {
|
|
62
|
+
message: 'or click to browse',
|
|
63
|
+
},
|
|
64
|
+
skyux_file_attachment_file_upload_paste_link: {
|
|
65
|
+
message: 'Paste a link to a file',
|
|
66
|
+
},
|
|
67
|
+
skyux_file_attachment_file_upload_paste_link_done: { message: 'Done' },
|
|
68
|
+
skyux_file_attachment_label_no_file_chosen: { message: 'No file chosen' },
|
|
69
|
+
},
|
|
26
70
|
};
|
|
27
71
|
class SkyFormsResourcesProvider {
|
|
28
72
|
getString(localeInfo, name) {
|
|
@@ -34,25 +78,62 @@ class SkyFormsResourcesProvider {
|
|
|
34
78
|
*/
|
|
35
79
|
class SkyFormsResourcesModule {
|
|
36
80
|
}
|
|
37
|
-
SkyFormsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
38
|
-
SkyFormsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
39
|
-
SkyFormsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
81
|
+
SkyFormsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
82
|
+
SkyFormsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, exports: [SkyI18nModule] });
|
|
83
|
+
SkyFormsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, providers: [
|
|
84
|
+
{
|
|
40
85
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
41
86
|
useClass: SkyFormsResourcesProvider,
|
|
42
|
-
multi: true
|
|
43
|
-
}
|
|
44
|
-
|
|
87
|
+
multi: true,
|
|
88
|
+
},
|
|
89
|
+
], imports: [SkyI18nModule] });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFormsResourcesModule, decorators: [{
|
|
45
91
|
type: NgModule,
|
|
46
92
|
args: [{
|
|
47
93
|
exports: [SkyI18nModule],
|
|
48
|
-
providers: [
|
|
94
|
+
providers: [
|
|
95
|
+
{
|
|
49
96
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
50
97
|
useClass: SkyFormsResourcesProvider,
|
|
51
|
-
multi: true
|
|
52
|
-
}
|
|
98
|
+
multi: true,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
53
101
|
}]
|
|
54
102
|
}] });
|
|
55
103
|
|
|
104
|
+
class SkyCharacterCounterIndicatorComponent {
|
|
105
|
+
constructor(changeDetector) {
|
|
106
|
+
this.changeDetector = changeDetector;
|
|
107
|
+
this.currentCharacterCountLimit = 0;
|
|
108
|
+
this.currentCharacterCount = 0;
|
|
109
|
+
}
|
|
110
|
+
get characterCount() {
|
|
111
|
+
return this.currentCharacterCount;
|
|
112
|
+
}
|
|
113
|
+
set characterCount(count) {
|
|
114
|
+
this.currentCharacterCount = count;
|
|
115
|
+
this.changeDetector.markForCheck();
|
|
116
|
+
}
|
|
117
|
+
get characterCountLimit() {
|
|
118
|
+
return this.currentCharacterCountLimit;
|
|
119
|
+
}
|
|
120
|
+
set characterCountLimit(limit) {
|
|
121
|
+
this.currentCharacterCountLimit = limit;
|
|
122
|
+
this.changeDetector.markForCheck();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
SkyCharacterCounterIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
+
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 });
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, decorators: [{
|
|
128
|
+
type: Component,
|
|
129
|
+
args: [{
|
|
130
|
+
selector: 'sky-character-counter-indicator',
|
|
131
|
+
templateUrl: './character-counter-indicator.component.html',
|
|
132
|
+
styleUrls: ['./character-counter-indicator.component.scss'],
|
|
133
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
134
|
+
}]
|
|
135
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
136
|
+
|
|
56
137
|
/**
|
|
57
138
|
* Creates an input field that validates the number of characters. Place this directive on
|
|
58
139
|
* an `input` or `textarea` element. If users enter more characters than allowed, then the
|
|
@@ -78,7 +159,7 @@ class SkyCharacterCounterInputDirective {
|
|
|
78
159
|
}
|
|
79
160
|
validate(control) {
|
|
80
161
|
const value = control.value;
|
|
81
|
-
this.updateIndicatorCount(value && value.length || 0);
|
|
162
|
+
this.updateIndicatorCount((value && value.length) || 0);
|
|
82
163
|
if (!value) {
|
|
83
164
|
return;
|
|
84
165
|
}
|
|
@@ -86,13 +167,15 @@ class SkyCharacterCounterInputDirective {
|
|
|
86
167
|
// This is needed to apply the appropriate error styles to the input.
|
|
87
168
|
control.markAsTouched();
|
|
88
169
|
return {
|
|
89
|
-
|
|
90
|
-
invalid: value
|
|
91
|
-
}
|
|
170
|
+
skyCharacterCounter: {
|
|
171
|
+
invalid: value,
|
|
172
|
+
},
|
|
92
173
|
};
|
|
93
174
|
}
|
|
94
175
|
}
|
|
95
|
-
registerOnValidatorChange(fn) {
|
|
176
|
+
registerOnValidatorChange(fn) {
|
|
177
|
+
this._validatorChange = fn;
|
|
178
|
+
}
|
|
96
179
|
updateIndicatorCount(count) {
|
|
97
180
|
if (this.skyCharacterCounterIndicator) {
|
|
98
181
|
this.skyCharacterCounterIndicator.characterCount = count;
|
|
@@ -104,15 +187,15 @@ class SkyCharacterCounterInputDirective {
|
|
|
104
187
|
}
|
|
105
188
|
}
|
|
106
189
|
}
|
|
107
|
-
SkyCharacterCounterInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
108
|
-
SkyCharacterCounterInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
190
|
+
SkyCharacterCounterInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
191
|
+
SkyCharacterCounterInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyCharacterCounterInputDirective, selector: "[skyCharacterCounter]", inputs: { skyCharacterCounterIndicator: "skyCharacterCounterIndicator", skyCharacterCounterLimit: "skyCharacterCounterLimit" }, providers: [
|
|
109
192
|
{
|
|
110
193
|
provide: NG_VALIDATORS,
|
|
111
194
|
useExisting: SkyCharacterCounterInputDirective,
|
|
112
|
-
multi: true
|
|
113
|
-
}
|
|
195
|
+
multi: true,
|
|
196
|
+
},
|
|
114
197
|
], ngImport: i0 });
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterInputDirective, decorators: [{
|
|
116
199
|
type: Directive,
|
|
117
200
|
args: [{
|
|
118
201
|
selector: '[skyCharacterCounter]',
|
|
@@ -120,9 +203,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
120
203
|
{
|
|
121
204
|
provide: NG_VALIDATORS,
|
|
122
205
|
useExisting: SkyCharacterCounterInputDirective,
|
|
123
|
-
multi: true
|
|
124
|
-
}
|
|
125
|
-
]
|
|
206
|
+
multi: true,
|
|
207
|
+
},
|
|
208
|
+
],
|
|
126
209
|
}]
|
|
127
210
|
}], propDecorators: { skyCharacterCounterIndicator: [{
|
|
128
211
|
type: Input
|
|
@@ -130,74 +213,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
130
213
|
type: Input
|
|
131
214
|
}] } });
|
|
132
215
|
|
|
133
|
-
class SkyCharacterCounterIndicatorComponent {
|
|
134
|
-
constructor(changeDetector) {
|
|
135
|
-
this.changeDetector = changeDetector;
|
|
136
|
-
this.currentCharacterCountLimit = 0;
|
|
137
|
-
this.currentCharacterCount = 0;
|
|
138
|
-
}
|
|
139
|
-
get characterCount() {
|
|
140
|
-
return this.currentCharacterCount;
|
|
141
|
-
}
|
|
142
|
-
set characterCount(count) {
|
|
143
|
-
this.currentCharacterCount = count;
|
|
144
|
-
this.changeDetector.markForCheck();
|
|
145
|
-
}
|
|
146
|
-
get characterCountLimit() {
|
|
147
|
-
return this.currentCharacterCountLimit;
|
|
148
|
-
}
|
|
149
|
-
set characterCountLimit(limit) {
|
|
150
|
-
this.currentCharacterCountLimit = limit;
|
|
151
|
-
this.changeDetector.markForCheck();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
SkyCharacterCounterIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
155
|
-
SkyCharacterCounterIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", 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\n aria-live=\"polite\"\n class=\"sky-screen-reader-only\"\n>\n {{ characterCount }} {{ 'skyux_character_count_message' | skyLibResources }} {{ characterCountLimit }}.\n {{ characterCount > characterCountLimit ? ('skyux_character_count_over_limit' | skyLibResources ) : '' }}\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 });
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, decorators: [{
|
|
157
|
-
type: Component,
|
|
158
|
-
args: [{
|
|
159
|
-
selector: 'sky-character-counter-indicator',
|
|
160
|
-
templateUrl: './character-counter-indicator.component.html',
|
|
161
|
-
styleUrls: ['./character-counter-indicator.component.scss'],
|
|
162
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
163
|
-
}]
|
|
164
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
165
|
-
|
|
166
216
|
class SkyCharacterCounterModule {
|
|
167
217
|
}
|
|
168
|
-
SkyCharacterCounterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
169
|
-
SkyCharacterCounterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
218
|
+
SkyCharacterCounterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
219
|
+
SkyCharacterCounterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, declarations: [SkyCharacterCounterInputDirective,
|
|
170
220
|
SkyCharacterCounterIndicatorComponent], imports: [CommonModule,
|
|
171
221
|
FormsModule,
|
|
172
222
|
ReactiveFormsModule,
|
|
173
223
|
SkyFormsResourcesModule,
|
|
174
224
|
SkyI18nModule], exports: [SkyCharacterCounterInputDirective,
|
|
175
225
|
SkyCharacterCounterIndicatorComponent] });
|
|
176
|
-
SkyCharacterCounterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
226
|
+
SkyCharacterCounterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, imports: [[
|
|
177
227
|
CommonModule,
|
|
178
228
|
FormsModule,
|
|
179
229
|
ReactiveFormsModule,
|
|
180
230
|
SkyFormsResourcesModule,
|
|
181
|
-
SkyI18nModule
|
|
231
|
+
SkyI18nModule,
|
|
182
232
|
]] });
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCharacterCounterModule, decorators: [{
|
|
184
234
|
type: NgModule,
|
|
185
235
|
args: [{
|
|
186
236
|
declarations: [
|
|
187
237
|
SkyCharacterCounterInputDirective,
|
|
188
|
-
SkyCharacterCounterIndicatorComponent
|
|
238
|
+
SkyCharacterCounterIndicatorComponent,
|
|
189
239
|
],
|
|
190
240
|
imports: [
|
|
191
241
|
CommonModule,
|
|
192
242
|
FormsModule,
|
|
193
243
|
ReactiveFormsModule,
|
|
194
244
|
SkyFormsResourcesModule,
|
|
195
|
-
SkyI18nModule
|
|
245
|
+
SkyI18nModule,
|
|
196
246
|
],
|
|
197
247
|
exports: [
|
|
198
248
|
SkyCharacterCounterInputDirective,
|
|
199
|
-
SkyCharacterCounterIndicatorComponent
|
|
200
|
-
]
|
|
249
|
+
SkyCharacterCounterIndicatorComponent,
|
|
250
|
+
],
|
|
201
251
|
}]
|
|
202
252
|
}] });
|
|
203
253
|
|
|
@@ -298,9 +348,9 @@ class SkyCheckboxComponent {
|
|
|
298
348
|
* Specifies a type to set the background color after users select a checkbox where the
|
|
299
349
|
* `icon` property displays an icon in place of the checkbox. The valid options correspond to
|
|
300
350
|
* [the label component's](https://developer.blackbaud.com/skyux/components/label)
|
|
301
|
-
* label types. `
|
|
302
|
-
* background, `
|
|
303
|
-
* @default
|
|
351
|
+
* label types. `"info"` creates a blue background, `"success"` creates a green
|
|
352
|
+
* background, `"warning"` creates an orange background, and `"danger"` creates a red background.
|
|
353
|
+
* @default "info"
|
|
304
354
|
*/
|
|
305
355
|
set checkboxType(value) {
|
|
306
356
|
if (value) {
|
|
@@ -364,7 +414,8 @@ class SkyCheckboxComponent {
|
|
|
364
414
|
ngOnInit() {
|
|
365
415
|
if (this.ngControl) {
|
|
366
416
|
// Backwards compatibility support for anyone still using Validators.Required.
|
|
367
|
-
this.required =
|
|
417
|
+
this.required =
|
|
418
|
+
this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
|
|
368
419
|
}
|
|
369
420
|
}
|
|
370
421
|
/**
|
|
@@ -422,14 +473,14 @@ class SkyCheckboxComponent {
|
|
|
422
473
|
this.checked = !this.checked;
|
|
423
474
|
}
|
|
424
475
|
}
|
|
425
|
-
SkyCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
426
|
-
SkyCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
476
|
+
SkyCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxComponent, deps: [{ token: i4.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
477
|
+
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$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxComponent, decorators: [{
|
|
428
479
|
type: Component,
|
|
429
480
|
args: [{
|
|
430
481
|
selector: 'sky-checkbox',
|
|
431
482
|
templateUrl: './checkbox.component.html',
|
|
432
|
-
styleUrls: ['./checkbox.component.scss']
|
|
483
|
+
styleUrls: ['./checkbox.component.scss'],
|
|
433
484
|
}]
|
|
434
485
|
}], ctorParameters: function () { return [{ type: i4.NgControl, decorators: [{
|
|
435
486
|
type: Self
|
|
@@ -468,13 +519,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
468
519
|
*/
|
|
469
520
|
class SkyCheckboxLabelComponent {
|
|
470
521
|
}
|
|
471
|
-
SkyCheckboxLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
472
|
-
SkyCheckboxLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
522
|
+
SkyCheckboxLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
523
|
+
SkyCheckboxLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxLabelComponent, selector: "sky-checkbox-label", ngImport: i0, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxLabelComponent, decorators: [{
|
|
474
525
|
type: Component,
|
|
475
526
|
args: [{
|
|
476
527
|
selector: 'sky-checkbox-label',
|
|
477
|
-
templateUrl: './checkbox-label.component.html'
|
|
528
|
+
templateUrl: './checkbox-label.component.html',
|
|
478
529
|
}]
|
|
479
530
|
}] });
|
|
480
531
|
|
|
@@ -482,7 +533,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
482
533
|
const SKY_CHECKBOX_REQUIRED_VALIDATOR = {
|
|
483
534
|
provide: NG_VALIDATORS,
|
|
484
535
|
useExisting: forwardRef(() => SkyCheckboxRequiredValidatorDirective),
|
|
485
|
-
multi: true
|
|
536
|
+
multi: true,
|
|
486
537
|
};
|
|
487
538
|
// tslint:enable
|
|
488
539
|
/**
|
|
@@ -495,50 +546,41 @@ const SKY_CHECKBOX_REQUIRED_VALIDATOR = {
|
|
|
495
546
|
*/
|
|
496
547
|
class SkyCheckboxRequiredValidatorDirective extends CheckboxRequiredValidator {
|
|
497
548
|
}
|
|
498
|
-
SkyCheckboxRequiredValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
499
|
-
SkyCheckboxRequiredValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
549
|
+
SkyCheckboxRequiredValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
550
|
+
SkyCheckboxRequiredValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyCheckboxRequiredValidatorDirective, selector: "sky-checkbox[required][formControlName],\n sky-checkbox[required][formControl], sky-checkbox[required][ngModel]", providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
|
|
551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxRequiredValidatorDirective, decorators: [{
|
|
501
552
|
type: Directive,
|
|
502
553
|
args: [{
|
|
554
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
503
555
|
selector: `sky-checkbox[required][formControlName],
|
|
504
556
|
sky-checkbox[required][formControl], sky-checkbox[required][ngModel]`,
|
|
505
|
-
providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR]
|
|
557
|
+
providers: [SKY_CHECKBOX_REQUIRED_VALIDATOR],
|
|
506
558
|
}]
|
|
507
559
|
}] });
|
|
508
560
|
|
|
509
561
|
class SkyCheckboxModule {
|
|
510
562
|
}
|
|
511
|
-
SkyCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
512
|
-
SkyCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
563
|
+
SkyCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
564
|
+
SkyCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxModule, declarations: [SkyCheckboxComponent,
|
|
513
565
|
SkyCheckboxLabelComponent,
|
|
514
|
-
SkyCheckboxRequiredValidatorDirective], imports: [CommonModule,
|
|
515
|
-
FormsModule,
|
|
516
|
-
SkyIconModule], exports: [SkyCheckboxComponent,
|
|
566
|
+
SkyCheckboxRequiredValidatorDirective], imports: [CommonModule, FormsModule, SkyIconModule], exports: [SkyCheckboxComponent,
|
|
517
567
|
SkyCheckboxLabelComponent,
|
|
518
568
|
SkyCheckboxRequiredValidatorDirective] });
|
|
519
|
-
SkyCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
520
|
-
|
|
521
|
-
FormsModule,
|
|
522
|
-
SkyIconModule
|
|
523
|
-
]] });
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyCheckboxModule, decorators: [{
|
|
569
|
+
SkyCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxModule, imports: [[CommonModule, FormsModule, SkyIconModule]] });
|
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCheckboxModule, decorators: [{
|
|
525
571
|
type: NgModule,
|
|
526
572
|
args: [{
|
|
527
573
|
declarations: [
|
|
528
574
|
SkyCheckboxComponent,
|
|
529
575
|
SkyCheckboxLabelComponent,
|
|
530
|
-
SkyCheckboxRequiredValidatorDirective
|
|
531
|
-
],
|
|
532
|
-
imports: [
|
|
533
|
-
CommonModule,
|
|
534
|
-
FormsModule,
|
|
535
|
-
SkyIconModule
|
|
576
|
+
SkyCheckboxRequiredValidatorDirective,
|
|
536
577
|
],
|
|
578
|
+
imports: [CommonModule, FormsModule, SkyIconModule],
|
|
537
579
|
exports: [
|
|
538
580
|
SkyCheckboxComponent,
|
|
539
581
|
SkyCheckboxLabelComponent,
|
|
540
|
-
SkyCheckboxRequiredValidatorDirective
|
|
541
|
-
]
|
|
582
|
+
SkyCheckboxRequiredValidatorDirective,
|
|
583
|
+
],
|
|
542
584
|
}]
|
|
543
585
|
}] });
|
|
544
586
|
|
|
@@ -547,17 +589,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
547
589
|
*/
|
|
548
590
|
class SkyFileAttachmentLabelComponent {
|
|
549
591
|
}
|
|
550
|
-
SkyFileAttachmentLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
551
|
-
SkyFileAttachmentLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
592
|
+
SkyFileAttachmentLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
593
|
+
SkyFileAttachmentLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyFileAttachmentLabelComponent, selector: "sky-file-attachment-label", ngImport: i0, template: "<span class=\"sky-control-label\">\n <ng-content></ng-content>\n</span>\n", styles: [":host-context(.sky-theme-modern) .sky-control-label{color:#686c73;font-size:13px}.sky-theme-modern .sky-control-label{color:#686c73;font-size:13px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentLabelComponent, decorators: [{
|
|
553
595
|
type: Component,
|
|
554
596
|
args: [{
|
|
555
597
|
selector: 'sky-file-attachment-label',
|
|
556
598
|
templateUrl: './file-attachment-label.component.html',
|
|
557
|
-
styleUrls: [
|
|
558
|
-
|
|
559
|
-
],
|
|
560
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
599
|
+
styleUrls: ['file-attachment-label.component.scss'],
|
|
600
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
561
601
|
}]
|
|
562
602
|
}] });
|
|
563
603
|
|
|
@@ -569,7 +609,7 @@ class SkyFileAttachmentService {
|
|
|
569
609
|
let fileResults = [];
|
|
570
610
|
for (let index = 0; index < files.length; index++) {
|
|
571
611
|
let fileItem = {
|
|
572
|
-
file: files.item(index)
|
|
612
|
+
file: files.item(index),
|
|
573
613
|
};
|
|
574
614
|
if (fileItem.file.size < minFileSize) {
|
|
575
615
|
fileItem.errorType = 'minFileSize';
|
|
@@ -606,7 +646,9 @@ class SkyFileAttachmentService {
|
|
|
606
646
|
hasDirectory(files) {
|
|
607
647
|
for (let index = 0; index < files.length; index++) {
|
|
608
648
|
const file = files.item(index);
|
|
609
|
-
if (file.webkitGetAsEntry &&
|
|
649
|
+
if (file.webkitGetAsEntry &&
|
|
650
|
+
file.webkitGetAsEntry() &&
|
|
651
|
+
file.webkitGetAsEntry().isDirectory) {
|
|
610
652
|
return true;
|
|
611
653
|
}
|
|
612
654
|
}
|
|
@@ -645,9 +687,9 @@ class SkyFileAttachmentService {
|
|
|
645
687
|
return type.substr(0, type.indexOf('/'));
|
|
646
688
|
}
|
|
647
689
|
}
|
|
648
|
-
SkyFileAttachmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
649
|
-
SkyFileAttachmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
690
|
+
SkyFileAttachmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
691
|
+
SkyFileAttachmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentService });
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentService, decorators: [{
|
|
651
693
|
type: Injectable
|
|
652
694
|
}] });
|
|
653
695
|
|
|
@@ -658,8 +700,11 @@ class SkyFileItemService {
|
|
|
658
700
|
isFile(fileItem) {
|
|
659
701
|
let file = fileItem.file;
|
|
660
702
|
/* tslint:disable */
|
|
661
|
-
return file &&
|
|
662
|
-
|
|
703
|
+
return (file &&
|
|
704
|
+
file !== undefined &&
|
|
705
|
+
file !== null &&
|
|
706
|
+
file.size !== undefined &&
|
|
707
|
+
file.size !== null);
|
|
663
708
|
/* tslint:enable */
|
|
664
709
|
}
|
|
665
710
|
isImage(fileItem) {
|
|
@@ -712,9 +757,9 @@ class SkyFileItemService {
|
|
|
712
757
|
return fileType.toUpperCase();
|
|
713
758
|
}
|
|
714
759
|
}
|
|
715
|
-
SkyFileItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
716
|
-
SkyFileItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
760
|
+
SkyFileItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileItemService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
761
|
+
SkyFileItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileItemService });
|
|
762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileItemService, decorators: [{
|
|
718
763
|
type: Injectable
|
|
719
764
|
}] });
|
|
720
765
|
|
|
@@ -817,12 +862,13 @@ class SkyFileAttachmentComponent {
|
|
|
817
862
|
if (this.ngControl) {
|
|
818
863
|
setTimeout(() => {
|
|
819
864
|
this.ngControl.control.setValue(this.value, {
|
|
820
|
-
emitEvent: false
|
|
865
|
+
emitEvent: false,
|
|
821
866
|
});
|
|
822
867
|
this.changeDetector.markForCheck();
|
|
823
868
|
});
|
|
824
869
|
// Backwards compatibility support for anyone still using Validators.Required.
|
|
825
|
-
this.required =
|
|
870
|
+
this.required =
|
|
871
|
+
this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
|
|
826
872
|
}
|
|
827
873
|
}
|
|
828
874
|
ngAfterContentInit() {
|
|
@@ -858,7 +904,8 @@ class SkyFileAttachmentComponent {
|
|
|
858
904
|
const files = transfer.items;
|
|
859
905
|
for (let index = 0; index < files.length; index++) {
|
|
860
906
|
const file = files[index];
|
|
861
|
-
if (file.type &&
|
|
907
|
+
if (file.type &&
|
|
908
|
+
this.fileAttachmentService.fileTypeRejected(file.type, this.acceptedTypes)) {
|
|
862
909
|
this.rejectedOver = true;
|
|
863
910
|
this.acceptedOver = false;
|
|
864
911
|
return;
|
|
@@ -908,7 +955,9 @@ class SkyFileAttachmentComponent {
|
|
|
908
955
|
getFileName(truncate = true) {
|
|
909
956
|
if (this.value) {
|
|
910
957
|
// tslint:disable-next-line: max-line-length
|
|
911
|
-
let dropName = this.fileItemService.isFile(this.value) && this.value.file.name
|
|
958
|
+
let dropName = this.fileItemService.isFile(this.value) && this.value.file.name
|
|
959
|
+
? this.value.file.name
|
|
960
|
+
: this.value.url;
|
|
912
961
|
if (truncate && dropName.length > 26) {
|
|
913
962
|
return dropName.slice(0, 26) + '...';
|
|
914
963
|
}
|
|
@@ -925,8 +974,12 @@ class SkyFileAttachmentComponent {
|
|
|
925
974
|
this.ngUnsubscribe.next();
|
|
926
975
|
this.ngUnsubscribe.complete();
|
|
927
976
|
}
|
|
928
|
-
registerOnChange(fn) {
|
|
929
|
-
|
|
977
|
+
registerOnChange(fn) {
|
|
978
|
+
this._onChange = fn;
|
|
979
|
+
}
|
|
980
|
+
registerOnTouched(fn) {
|
|
981
|
+
this._onTouched = fn;
|
|
982
|
+
}
|
|
930
983
|
writeValue(value) {
|
|
931
984
|
this.value = value;
|
|
932
985
|
this.changeDetector.markForCheck();
|
|
@@ -942,7 +995,7 @@ class SkyFileAttachmentComponent {
|
|
|
942
995
|
}
|
|
943
996
|
emitClick() {
|
|
944
997
|
this.fileClick.emit({
|
|
945
|
-
file: this.value
|
|
998
|
+
file: this.value,
|
|
946
999
|
});
|
|
947
1000
|
}
|
|
948
1001
|
emitFileChangeEvent(currentFile) {
|
|
@@ -950,7 +1003,7 @@ class SkyFileAttachmentComponent {
|
|
|
950
1003
|
this.writeValue(currentFile);
|
|
951
1004
|
}
|
|
952
1005
|
this.fileChange.emit({
|
|
953
|
-
file: currentFile
|
|
1006
|
+
file: currentFile,
|
|
954
1007
|
});
|
|
955
1008
|
this.inputEl.nativeElement.value = '';
|
|
956
1009
|
}
|
|
@@ -985,20 +1038,16 @@ class SkyFileAttachmentComponent {
|
|
|
985
1038
|
this.changeDetector.markForCheck();
|
|
986
1039
|
}
|
|
987
1040
|
}
|
|
988
|
-
SkyFileAttachmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
989
|
-
SkyFileAttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
990
|
-
|
|
991
|
-
], queries: [{ propertyName: "labelComponents", predicate: SkyFileAttachmentLabelComponent }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"sky-file-attachment-wrapper\"\n>\n <div\n class=\"sky-file-attachment-label-wrapper\"\n [attr.aria-required]=\"(required) ? true : null\"\n [attr.id]=\"labelElementId\"\n [ngClass]=\"{ 'sky-control-label-required': required && hasLabelComponent }\"\n >\n <ng-container *ngTemplateOutlet=\"labelContent\"\n ></ng-container>\n </div>\n <div\n class=\"sky-file-attachment-upload sky-file-attachment sky-file-attachment-target\"\n [ngClass]=\"{ 'sky-file-attachment-accept': acceptedOver, 'sky-file-attachment-reject': rejectedOver }\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragover)=\"fileDragOver($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n >\n <div\n aria-hidden=\"true\"\n class=\"sky-file-attachment-drop-description\"\n role=\"tooltip\"\n [attr.id]=\"fileDropDescriptionElementId\"\n >\n {{ 'skyux_file_attachment_file_upload_drag_or_click' | skyLibResources }}\n </div>\n <input\n hidden\n tabindex=\"-1\"\n type=\"file\"\n [attr.accept]=\"acceptedTypes || null\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n (change)=\"fileChangeEvent($event)\"\n #fileInput\n >\n <button *ngIf=\"showFileAttachmentButton\"\n class=\"sky-file-attachment-btn sky-btn sky-btn-default\"\n type=\"button\"\n [attr.aria-describedby]=\"fileDropDescriptionElementId\"\n [disabled]=\"disabled\"\n (click)=\"onDropClicked()\"\n >\n <sky-icon\n icon=\"folder-open-o\"\n ></sky-icon>\n {{ value ?\n ('skyux_file_attachment_button_label_replace_file' | skyLibResources) :\n ('skyux_file_attachment_button_label_choose_file' | skyLibResources)\n }}\n </button>\n <sky-icon *ngIf=\"value && !isImage() && currentThemeName === 'modern'\"\n class=\"sky-file-attachment-icon sky-deemphasized\"\n icon=\"file-o\"\n size=\"2x\"\n >\n </sky-icon>\n <span *ngIf=\"value || currentThemeName === 'default'\"\n class=\"sky-file-attachment-name\"\n >\n <a *ngIf=\"value; else noFile\"\n [attr.title]=\"getFileName(false)\"\n (click)=\"emitClick()\"\n >\n {{ getFileName() }}\n </a>\n </span>\n <ng-template #noFile>\n <span\n class=\"sky-file-attachment-none sky-deemphasized\"\n >\n {{ 'skyux_file_attachment_label_no_file_chosen' | skyLibResources }}\n </span>\n </ng-template>\n <button *ngIf=\"value\"\n class=\"sky-btn sky-btn-borderless sky-file-attachment-delete\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_file_attachment_file_item_delete' | skyLibResources\"\n [disabled]=\"disabled\"\n [skyThemeClass]=\"{\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"deleteFileAttachment()\"\n >\n <sky-icon\n icon=\"trash-o\"\n size=\"md\"\n >\n </sky-icon>\n </button>\n </div>\n\n <img *ngIf=\"value && isImage()\"\n class=\"sky-file-attachment-preview-img\"\n [alt]=\"'skyux_file_attachment_file_upload_image_preview_alt_text' | skyLibResources\"\n [src]=\"value.url\"\n />\n</div>\n\n<ng-template\n #labelContent\n>\n <ng-content\n select=\"sky-file-attachment-label\"\n ></ng-content>\n</ng-template>\n", styles: [".sky-file-attachment-wrapper{display:inline-block}.sky-file-attachment-upload{padding-right:8px;display:block;border:1px solid transparent}.sky-file-attachment-accept{border-color:#72bf44;border-style:dashed;border-width:1px;border-radius:5px;color:#212327}.sky-file-attachment-reject{border-color:#ef4044;border-style:dashed;border-width:1px;border-radius:5px;color:#212327}:host(.ng-invalid.ng-dirty) .sky-file-attachment-btn{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044}.sky-file-attachment-name{padding:0 5px}.sky-file-attachment-name a{cursor:pointer}.sky-file-attachment-delete{border:none;color:#cdcfd2;cursor:pointer;padding:0}.sky-file-attachment-delete:hover{color:#979ba2;transition:color .15s}.sky-file-attachment-preview-img{max-width:25%;height:auto;box-shadow:0 0 5px #666;margin:10px}.sky-file-attachment-drop-description{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}:host-context(.sky-theme-modern) .sky-file-attachment-none{font-size:13px}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper{display:flex;flex-wrap:wrap}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-label-wrapper{width:100%}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-preview-img{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;box-shadow:none;margin:0 10px 0 0;width:100px;flex:0;order:1}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-btn{margin:0 10px 0 0}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-icon{margin:5px 10px 5px 5px}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-upload{flex:1;order:2;display:flex;align-items:flex-start}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-upload .sky-file-attachment-name{margin:10px 10px 0 0;padding:0}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-delete{width:40px;height:40px;color:#686c73!important}.sky-theme-modern .sky-file-attachment-none{font-size:13px}.sky-theme-modern .sky-file-attachment-wrapper{display:flex;flex-wrap:wrap}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-label-wrapper{width:100%}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-preview-img{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;box-shadow:none;margin:0 10px 0 0;width:100px;flex:0;order:1}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-btn{margin:0 10px 0 0}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-icon{margin:5px 10px 5px 5px}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-upload{flex:1;order:2;display:flex;align-items:flex-start}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-upload .sky-file-attachment-name{margin:10px 10px 0 0;padding:0}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-delete{width:40px;height:40px;color:#686c73!important}\n"], components: [{ type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], pipes: { "skyLibResources": i2.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
992
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyFileAttachmentComponent, decorators: [{
|
|
1041
|
+
SkyFileAttachmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentComponent, deps: [{ token: i1$1.SkyThemeService }, { token: i0.ChangeDetectorRef }, { token: SkyFileAttachmentService }, { token: SkyFileItemService }, { token: i4.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1042
|
+
SkyFileAttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyFileAttachmentComponent, selector: "sky-file-attachment", inputs: { acceptedTypes: "acceptedTypes", disabled: "disabled", maxFileSize: "maxFileSize", minFileSize: "minFileSize", validateFn: "validateFn", required: "required" }, outputs: { fileChange: "fileChange", fileClick: "fileClick" }, providers: [SkyFileAttachmentService], queries: [{ propertyName: "labelComponents", predicate: SkyFileAttachmentLabelComponent }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"sky-file-attachment-wrapper\">\n <div\n class=\"sky-file-attachment-label-wrapper\"\n [attr.aria-required]=\"required ? true : null\"\n [attr.id]=\"labelElementId\"\n [ngClass]=\"{ 'sky-control-label-required': required && hasLabelComponent }\"\n >\n <ng-container *ngTemplateOutlet=\"labelContent\"></ng-container>\n </div>\n <div\n class=\"\n sky-file-attachment-upload sky-file-attachment sky-file-attachment-target\n \"\n [ngClass]=\"{\n 'sky-file-attachment-accept': acceptedOver,\n 'sky-file-attachment-reject': rejectedOver\n }\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragover)=\"fileDragOver($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n >\n <div\n aria-hidden=\"true\"\n class=\"sky-file-attachment-drop-description\"\n role=\"tooltip\"\n [attr.id]=\"fileDropDescriptionElementId\"\n >\n {{ 'skyux_file_attachment_file_upload_drag_or_click' | skyLibResources }}\n </div>\n <input\n hidden\n tabindex=\"-1\"\n type=\"file\"\n [attr.accept]=\"acceptedTypes || null\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n (change)=\"fileChangeEvent($event)\"\n #fileInput\n />\n <button\n *ngIf=\"showFileAttachmentButton\"\n class=\"sky-file-attachment-btn sky-btn sky-btn-default\"\n type=\"button\"\n [attr.aria-describedby]=\"fileDropDescriptionElementId\"\n [disabled]=\"disabled\"\n (click)=\"onDropClicked()\"\n >\n <sky-icon icon=\"folder-open-o\"></sky-icon>\n {{\n value\n ? ('skyux_file_attachment_button_label_replace_file'\n | skyLibResources)\n : ('skyux_file_attachment_button_label_choose_file' | skyLibResources)\n }}\n </button>\n <sky-icon\n *ngIf=\"value && !isImage() && currentThemeName === 'modern'\"\n class=\"sky-file-attachment-icon sky-deemphasized\"\n icon=\"file-o\"\n size=\"2x\"\n >\n </sky-icon>\n <span\n *ngIf=\"value || currentThemeName === 'default'\"\n class=\"sky-file-attachment-name\"\n >\n <a\n *ngIf=\"value; else noFile\"\n [attr.title]=\"getFileName(false)\"\n (click)=\"emitClick()\"\n >\n {{ getFileName() }}\n </a>\n </span>\n <ng-template #noFile>\n <span class=\"sky-file-attachment-none sky-deemphasized\">\n {{ 'skyux_file_attachment_label_no_file_chosen' | skyLibResources }}\n </span>\n </ng-template>\n <button\n *ngIf=\"value\"\n class=\"sky-btn sky-btn-borderless sky-file-attachment-delete\"\n type=\"button\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_delete' | skyLibResources\n \"\n [disabled]=\"disabled\"\n [skyThemeClass]=\"{\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"deleteFileAttachment()\"\n >\n <sky-icon icon=\"trash-o\" size=\"md\"> </sky-icon>\n </button>\n </div>\n\n <img\n *ngIf=\"value && isImage()\"\n class=\"sky-file-attachment-preview-img\"\n [alt]=\"\n 'skyux_file_attachment_file_upload_image_preview_alt_text'\n | skyLibResources\n \"\n [src]=\"value.url\"\n />\n</div>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-file-attachment-label\"></ng-content>\n</ng-template>\n", styles: [".sky-file-attachment-wrapper{display:inline-block}.sky-file-attachment-upload{padding-right:8px;display:block;border:1px solid transparent}.sky-file-attachment-accept{border-color:#72bf44;border-style:dashed;border-width:1px;border-radius:5px;color:#212327}.sky-file-attachment-reject{border-color:#ef4044;border-style:dashed;border-width:1px;border-radius:5px;color:#212327}:host(.ng-invalid.ng-dirty) .sky-file-attachment-btn{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044}.sky-file-attachment-name{padding:0 5px}.sky-file-attachment-name a{cursor:pointer}.sky-file-attachment-delete{border:none;color:#cdcfd2;cursor:pointer;padding:0}.sky-file-attachment-delete:hover{color:#979ba2;transition:color .15s}.sky-file-attachment-preview-img{max-width:25%;height:auto;box-shadow:0 0 5px #666;margin:10px}.sky-file-attachment-drop-description{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}:host-context(.sky-theme-modern) .sky-file-attachment-none{font-size:13px}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper{display:flex;flex-wrap:wrap}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-label-wrapper{width:100%}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-preview-img{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;box-shadow:none;margin:0 10px 0 0;width:100px;flex:0;order:1}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-btn{margin:0 10px 0 0}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-icon{margin:5px 10px 5px 5px}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-upload{flex:1;order:2;display:flex;align-items:flex-start}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-upload .sky-file-attachment-name{margin:10px 10px 0 0;padding:0}:host-context(.sky-theme-modern) .sky-file-attachment-wrapper .sky-file-attachment-delete{width:40px;height:40px;color:#686c73!important}.sky-theme-modern .sky-file-attachment-none{font-size:13px}.sky-theme-modern .sky-file-attachment-wrapper{display:flex;flex-wrap:wrap}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-label-wrapper{width:100%}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-preview-img{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;box-shadow:none;margin:0 10px 0 0;width:100px;flex:0;order:1}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-btn{margin:0 10px 0 0}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-icon{margin:5px 10px 5px 5px}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-upload{flex:1;order:2;display:flex;align-items:flex-start}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-upload .sky-file-attachment-name{margin:10px 10px 0 0;padding:0}.sky-theme-modern .sky-file-attachment-wrapper .sky-file-attachment-delete{width:40px;height:40px;color:#686c73!important}\n"], components: [{ type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], pipes: { "skyLibResources": i2.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentComponent, decorators: [{
|
|
993
1044
|
type: Component,
|
|
994
1045
|
args: [{
|
|
995
1046
|
selector: 'sky-file-attachment',
|
|
996
1047
|
templateUrl: './file-attachment.component.html',
|
|
997
1048
|
styleUrls: ['./file-attachment.component.scss'],
|
|
998
|
-
providers: [
|
|
999
|
-
|
|
1000
|
-
],
|
|
1001
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1049
|
+
providers: [SkyFileAttachmentService],
|
|
1050
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1002
1051
|
}]
|
|
1003
1052
|
}], ctorParameters: function () { return [{ type: i1$1.SkyThemeService }, { type: i0.ChangeDetectorRef }, { type: SkyFileAttachmentService }, { type: SkyFileItemService }, { type: i4.NgControl, decorators: [{
|
|
1004
1053
|
type: Self
|
|
@@ -1104,7 +1153,8 @@ class SkyFileDropComponent {
|
|
|
1104
1153
|
const files = transfer.items;
|
|
1105
1154
|
for (let index = 0; index < files.length; index++) {
|
|
1106
1155
|
const file = files[index];
|
|
1107
|
-
if (file.type &&
|
|
1156
|
+
if (file.type &&
|
|
1157
|
+
this.fileAttachmentService.fileTypeRejected(file.type, this.acceptedTypes)) {
|
|
1108
1158
|
this.rejectedOver = true;
|
|
1109
1159
|
this.acceptedOver = false;
|
|
1110
1160
|
return;
|
|
@@ -1114,8 +1164,8 @@ class SkyFileDropComponent {
|
|
|
1114
1164
|
this.rejectedOver = false;
|
|
1115
1165
|
this.acceptedOver = true;
|
|
1116
1166
|
}
|
|
1117
|
-
}
|
|
1118
|
-
else
|
|
1167
|
+
} /* istanbul ignore next: untestable */
|
|
1168
|
+
else if (transfer.files) {
|
|
1119
1169
|
// If the browser does not support DataTransfer.items,
|
|
1120
1170
|
// defer file-type checking to drop handler.
|
|
1121
1171
|
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items#Browser_compatibility
|
|
@@ -1162,7 +1212,7 @@ class SkyFileDropComponent {
|
|
|
1162
1212
|
if (totalFiles === rejectedFileArray.length + validFileArray.length) {
|
|
1163
1213
|
this.filesChanged.emit({
|
|
1164
1214
|
files: validFileArray,
|
|
1165
|
-
rejectedFiles: rejectedFileArray
|
|
1215
|
+
rejectedFiles: rejectedFileArray,
|
|
1166
1216
|
});
|
|
1167
1217
|
this.inputEl.nativeElement.value = '';
|
|
1168
1218
|
}
|
|
@@ -1203,19 +1253,15 @@ class SkyFileDropComponent {
|
|
|
1203
1253
|
}
|
|
1204
1254
|
}
|
|
1205
1255
|
}
|
|
1206
|
-
SkyFileDropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1207
|
-
SkyFileDropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1208
|
-
|
|
1209
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"sky-file-drop-row\" [ngClass]=\"{ 'sky-file-drop-allow-links': allowLinks }\">\n <div\n class=\"sky-file-drop-col\"\n [ngClass]=\"{ 'sky-file-drop-accept': acceptedOver, 'sky-file-drop-reject': rejectedOver }\">\n\n <button\n class=\"sky-file-drop sky-file-drop-target\"\n type=\"button\"\n (click)=\"dropClicked()\"\n (dragover)=\"fileDragOver($event)\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n [attr.aria-label]=\"fileUploadAriaLabel || ('skyux_file_attachment_file_upload_drag_or_click' | skyLibResources)\">\n </button>\n\n <input\n tabindex=\"-1\"\n aria-hidden=\"true\"\n type=\"file\"\n class=\"sky-file-input-hidden\"\n [attr.multiple]=\"multiple ? multiple: null\"\n [attr.accept]=\"acceptedTypes ? acceptedTypes: null\"\n (change)=\"fileChangeEvent($event)\"\n #fileInput>\n\n <div class=\"sky-file-drop-contents sky-padding-even-default\" *ngIf=\"customEl.children.length === 0\">\n <div class=\"sky-file-drop-contents-not-over\">\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{ 'skyux_file_attachment_file_upload_drag_file_here' | skyLibResources }}\n </div>\n <div class=\"sky-file-drop-text\">\n {{ 'skyux_file_attachment_file_upload_or_click_to_browse' | skyLibResources }}\n </div>\n <sky-icon icon=\"cloud-upload\" class=\"sky-file-upload-icon\"></sky-icon>\n </div>\n\n <!-- This will appear when file is dragged over and is valid -->\n <div class=\"sky-file-drop-contents-accept\" >\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{ 'skyux_file_attachment_file_upload_drop_files_here' | skyLibResources }}\n </div>\n <sky-icon icon=\"bullseye\" class=\"sky-file-upload-icon\"></sky-icon>\n </div>\n\n <!-- This will appear when file is dragged over and is invalid -->\n <div class=\"sky-file-drop-contents-reject\" >\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{ 'skyux_file_attachment_file_upload_invalid_file' | skyLibResources }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\"></sky-icon>\n </div>\n </div>\n\n <div class=\"sky-file-drop-contents-custom\" #customEl>\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"sky-file-drop-col\" *ngIf=\"allowLinks\">\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-link\">\n <div class=\"sky-file-drop-link-header\">\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{ 'skyux_file_attachment_file_upload_paste_link' | skyLibResources }}\n </div>\n </div>\n <div class=\"sky-form-group\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"linkUploadAriaLabel || ('skyux_file_attachment_file_upload_link_input' | skyLibResources)\"\n [attr.placeholder]=\"'skyux_file_attachment_file_upload_link_placeholder' | skyLibResources\"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n >\n </div>\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"!linkUrl\"\n (click)=\"addLink($event)\">\n {{ 'skyux_file_attachment_file_upload_paste_link_done' | skyLibResources }}\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-file-drop-col{margin-bottom:10px;padding-left:5px;padding-right:5px;position:relative}:host .sky-file-drop-row{display:block}:host .sky-file-drop-col{flex-basis:auto}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-row,:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:block}:host-context(.sky-responsive-container-xs) .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}@media (min-width: 768px){:host .sky-file-drop-row{display:flex}:host .sky-file-drop-col{flex-basis:100%}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}}:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:flex}:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:100%}:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}button.sky-file-drop{height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}button.sky-file-drop:hover{cursor:pointer}.sky-file-drop-contents{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;background-color:#eeeeef;color:#212327;cursor:pointer;width:100%;text-align:center;height:100%}.sky-file-drop-contents .sky-file-drop-link-header{margin-bottom:5px}.sky-file-drop-noclick .sky-file-drop-contents{cursor:default}.sky-file-drop-accept .sky-file-drop-contents,.sky-file-drop-reject .sky-file-drop-contents{border-style:dashed;border-width:1px}.sky-file-drop-accept .sky-file-drop-contents-not-over,.sky-file-drop-reject .sky-file-drop-contents-not-over{display:none}.sky-file-drop-accept .sky-file-drop-contents{border-color:#72bf44;color:#212327}.sky-file-drop-accept .sky-file-drop-contents-accept{display:block}.sky-file-drop-reject .sky-file-drop-contents{border-color:#ef4044;color:#212327}.sky-file-drop-reject .sky-file-drop-contents-reject{display:block}.sky-file-drop-contents-accept,.sky-file-drop-contents-reject{display:none}.sky-file-upload-icon{display:block;font-size:40px;max-height:40px;margin-top:10px}.sky-file-drop-link{cursor:default}.sky-file-drop-text-header{margin:0}.sky-file-drop-text{font-size:15px;margin-top:5px;margin-bottom:20px}.sky-file-drop-text,.sky-file-drop-text-header{line-height:1.1;display:block}.sky-file-upload-icon{color:#686c73}.sky-file-drop{background-color:transparent;border:none;display:block;-webkit-appearance:none;width:100%;padding:0}.sky-file-input-hidden{display:none}\n"], components: [{ type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i2.SkyLibResourcesPipe } });
|
|
1210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyFileDropComponent, decorators: [{
|
|
1256
|
+
SkyFileDropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileDropComponent, deps: [{ token: SkyFileAttachmentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1257
|
+
SkyFileDropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyFileDropComponent, selector: "sky-file-drop", inputs: { fileUploadAriaLabel: "fileUploadAriaLabel", linkUploadAriaLabel: "linkUploadAriaLabel", minFileSize: "minFileSize", maxFileSize: "maxFileSize", multiple: "multiple", validateFn: "validateFn", acceptedTypes: "acceptedTypes", noClick: "noClick", allowLinks: "allowLinks" }, outputs: { filesChanged: "filesChanged", linkInputBlur: "linkInputBlur", linkChanged: "linkChanged" }, providers: [SkyFileAttachmentService], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"sky-file-drop-row\"\n [ngClass]=\"{ 'sky-file-drop-allow-links': allowLinks }\"\n>\n <div\n class=\"sky-file-drop-col\"\n [ngClass]=\"{\n 'sky-file-drop-accept': acceptedOver,\n 'sky-file-drop-reject': rejectedOver\n }\"\n >\n <button\n class=\"sky-file-drop sky-file-drop-target\"\n type=\"button\"\n (click)=\"dropClicked()\"\n (dragover)=\"fileDragOver($event)\"\n (dragenter)=\"fileDragEnter($event)\"\n (dragleave)=\"fileDragLeave($event)\"\n (drop)=\"fileDrop($event)\"\n [attr.aria-label]=\"\n fileUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_drag_or_click' | skyLibResources)\n \"\n ></button>\n\n <input\n tabindex=\"-1\"\n aria-hidden=\"true\"\n type=\"file\"\n class=\"sky-file-input-hidden\"\n [attr.multiple]=\"multiple ? multiple : null\"\n [attr.accept]=\"acceptedTypes ? acceptedTypes : null\"\n (change)=\"fileChangeEvent($event)\"\n #fileInput\n />\n\n <div\n class=\"sky-file-drop-contents sky-padding-even-default\"\n *ngIf=\"customEl.children.length === 0\"\n >\n <div class=\"sky-file-drop-contents-not-over\">\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here' | skyLibResources\n }}\n </div>\n <div class=\"sky-file-drop-text\">\n {{\n 'skyux_file_attachment_file_upload_or_click_to_browse'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"cloud-upload\" class=\"sky-file-upload-icon\"></sky-icon>\n </div>\n\n <!-- This will appear when file is dragged over and is valid -->\n <div class=\"sky-file-drop-contents-accept\">\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{\n 'skyux_file_attachment_file_upload_drop_files_here'\n | skyLibResources\n }}\n </div>\n <sky-icon icon=\"bullseye\" class=\"sky-file-upload-icon\"></sky-icon>\n </div>\n\n <!-- This will appear when file is dragged over and is invalid -->\n <div class=\"sky-file-drop-contents-reject\">\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file' | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\"></sky-icon>\n </div>\n </div>\n\n <div class=\"sky-file-drop-contents-custom\" #customEl>\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"sky-file-drop-col\" *ngIf=\"allowLinks\">\n <div class=\"sky-file-drop-contents sky-padding-even-default\">\n <div class=\"sky-file-drop-link\">\n <div class=\"sky-file-drop-link-header\">\n <div class=\"sky-file-drop-text-header sky-headline\">\n {{\n 'skyux_file_attachment_file_upload_paste_link' | skyLibResources\n }}\n </div>\n </div>\n <div class=\"sky-form-group\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_input' | skyLibResources)\n \"\n [attr.placeholder]=\"\n 'skyux_file_attachment_file_upload_link_placeholder'\n | skyLibResources\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </div>\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"!linkUrl\"\n (click)=\"addLink($event)\"\n >\n {{\n 'skyux_file_attachment_file_upload_paste_link_done'\n | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sky-file-drop-col{margin-bottom:10px;padding-left:5px;padding-right:5px;position:relative}:host .sky-file-drop-row{display:block}:host .sky-file-drop-col{flex-basis:auto}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-row,:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:block}:host-context(.sky-responsive-container-xs) .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:auto}:host-context(.sky-responsive-container-xs) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:auto}@media (min-width: 768px){:host .sky-file-drop-row{display:flex}:host .sky-file-drop-col{flex-basis:100%}:host .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}}:host-context(.sky-responsive-container-sm) .sky-file-drop-row,:host-context(.sky-responsive-container-md) .sky-file-drop-row,:host-context(.sky-responsive-container-lg) .sky-file-drop-row{display:flex}:host-context(.sky-responsive-container-sm) .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-col{flex-basis:100%}:host-context(.sky-responsive-container-sm) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-md) .sky-file-drop-allow-links .sky-file-drop-col,:host-context(.sky-responsive-container-lg) .sky-file-drop-allow-links .sky-file-drop-col{flex-basis:50%}button.sky-file-drop{height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}button.sky-file-drop:hover{cursor:pointer}.sky-file-drop-contents{border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2;background-color:#eeeeef;color:#212327;cursor:pointer;width:100%;text-align:center;height:100%}.sky-file-drop-contents .sky-file-drop-link-header{margin-bottom:5px}.sky-file-drop-noclick .sky-file-drop-contents{cursor:default}.sky-file-drop-accept .sky-file-drop-contents,.sky-file-drop-reject .sky-file-drop-contents{border-style:dashed;border-width:1px}.sky-file-drop-accept .sky-file-drop-contents-not-over,.sky-file-drop-reject .sky-file-drop-contents-not-over{display:none}.sky-file-drop-accept .sky-file-drop-contents{border-color:#72bf44;color:#212327}.sky-file-drop-accept .sky-file-drop-contents-accept{display:block}.sky-file-drop-reject .sky-file-drop-contents{border-color:#ef4044;color:#212327}.sky-file-drop-reject .sky-file-drop-contents-reject{display:block}.sky-file-drop-contents-accept,.sky-file-drop-contents-reject{display:none}.sky-file-upload-icon{display:block;font-size:40px;max-height:40px;margin-top:10px}.sky-file-drop-link{cursor:default}.sky-file-drop-text-header{margin:0}.sky-file-drop-text{font-size:15px;margin-top:5px;margin-bottom:20px}.sky-file-drop-text,.sky-file-drop-text-header{line-height:1.1;display:block}.sky-file-upload-icon{color:#686c73}.sky-file-drop{background-color:transparent;border:none;display:block;-webkit-appearance:none;width:100%;padding:0}.sky-file-input-hidden{display:none}\n"], components: [{ type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i2.SkyLibResourcesPipe } });
|
|
1258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileDropComponent, decorators: [{
|
|
1211
1259
|
type: Component,
|
|
1212
1260
|
args: [{
|
|
1213
1261
|
selector: 'sky-file-drop',
|
|
1214
1262
|
templateUrl: './file-drop.component.html',
|
|
1215
1263
|
styleUrls: ['./file-drop.component.scss'],
|
|
1216
|
-
providers: [
|
|
1217
|
-
SkyFileAttachmentService
|
|
1218
|
-
]
|
|
1264
|
+
providers: [SkyFileAttachmentService],
|
|
1219
1265
|
}]
|
|
1220
1266
|
}], ctorParameters: function () { return [{ type: SkyFileAttachmentService }]; }, propDecorators: { filesChanged: [{
|
|
1221
1267
|
type: Output
|
|
@@ -1282,7 +1328,8 @@ class SkyFileSizePipe {
|
|
|
1282
1328
|
decimalPlaces = 1;
|
|
1283
1329
|
}
|
|
1284
1330
|
roundedSize =
|
|
1285
|
-
Math.floor(input / (dividend / Math.pow(10, decimalPlaces))) /
|
|
1331
|
+
Math.floor(input / (dividend / Math.pow(10, decimalPlaces))) /
|
|
1332
|
+
Math.pow(10, decimalPlaces);
|
|
1286
1333
|
formattedSize = this.decimalPipe.transform(roundedSize, '.0-3');
|
|
1287
1334
|
return this.getString(template, formattedSize);
|
|
1288
1335
|
}
|
|
@@ -1291,12 +1338,12 @@ class SkyFileSizePipe {
|
|
|
1291
1338
|
return this.resourcesService.getStringForLocale({ locale: 'en-US' }, key, ...args);
|
|
1292
1339
|
}
|
|
1293
1340
|
}
|
|
1294
|
-
SkyFileSizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1295
|
-
SkyFileSizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.
|
|
1296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1341
|
+
SkyFileSizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileSizePipe, deps: [{ token: i1.DecimalPipe }, { token: i2.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1342
|
+
SkyFileSizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileSizePipe, name: "skyFileSize" });
|
|
1343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileSizePipe, decorators: [{
|
|
1297
1344
|
type: Pipe,
|
|
1298
1345
|
args: [{
|
|
1299
|
-
name: 'skyFileSize'
|
|
1346
|
+
name: 'skyFileSize',
|
|
1300
1347
|
}]
|
|
1301
1348
|
}], ctorParameters: function () { return [{ type: i1.DecimalPipe }, { type: i2.SkyLibResourcesService }]; } });
|
|
1302
1349
|
|
|
@@ -1391,14 +1438,14 @@ class SkyFileItemComponent {
|
|
|
1391
1438
|
return this.fileItemService.isImage(this.fileItem);
|
|
1392
1439
|
}
|
|
1393
1440
|
}
|
|
1394
|
-
SkyFileItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1395
|
-
SkyFileItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1441
|
+
SkyFileItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileItemComponent, deps: [{ token: i0.KeyValueDiffers }, { token: SkyFileItemService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1442
|
+
SkyFileItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyFileItemComponent, selector: "sky-file-item", inputs: { fileItem: "fileItem" }, outputs: { deleteFile: "deleteFile" }, ngImport: i0, template: "<div class=\"sky-file-item sky-padding-even-default\">\n <div class=\"sky-file-item-title\">\n <div class=\"sky-file-item-name-container\">\n <div class=\"sky-file-item-name\">\n <strong *ngIf=\"isFile()\">{{ fileName }}</strong>\n <strong *ngIf=\"!isFile()\">{{ url }}</strong>\n </div>\n <div class=\"sky-file-item-size\" *ngIf=\"isFile()\">\n ({{ fileSize | skyFileSize }})\n </div>\n </div>\n <div class=\"sky-file-item-controls\">\n <button\n type=\"button\"\n class=\"sky-btn sky-btn-default sky-file-item-btn-delete\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_delete' | skyLibResources\n \"\n (click)=\"itemDelete()\"\n >\n <sky-icon icon=\"trash-o\" size=\"lg\"></sky-icon>\n </button>\n </div>\n </div>\n <div class=\"sky-file-item-content\">\n <div class=\"sky-file-item-preview\">\n <div *ngIf=\"isImage()\" class=\"sky-file-item-preview-img-container\">\n <img\n class=\"sky-file-item-preview-img\"\n [src]=\"url\"\n [alt]=\"\n 'skyux_file_attachment_file_upload_image_preview_alt_text'\n | skyLibResources\n \"\n />\n </div>\n <div *ngIf=\"!isImage()\" class=\"sky-file-item-preview-other\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </div>\n </div>\n <div class=\"sky-file-item-content-custom\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [".sky-file-item{border-top:1px solid #e2e3e4;border-bottom:1px solid #e2e3e4;border-left:1px solid #e2e3e4;border-right:1px solid #e2e3e4;background-color:#eeeeef;margin-bottom:10px}.sky-file-item-name-container{flex:1 1 auto;overflow:hidden}.sky-file-item-controls{flex:0 1 auto;padding-left:15px}.sky-file-item-name{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.sky-file-item-title{margin-bottom:10px;display:flex}.sky-file-item-content{display:flex}.sky-file-item-preview{flex-basis:25%}.sky-file-item-content-custom{flex-basis:75%}.sky-file-item-preview-img-container{text-align:center}.sky-file-item-preview-img{max-width:100%;height:auto;box-shadow:0 0 5px #666}.sky-file-item-preview-other{color:#686c73;font-size:100px;line-height:1;text-align:center;width:100%}\n"], components: [{ type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyFileSize": SkyFileSizePipe, "skyLibResources": i2.SkyLibResourcesPipe } });
|
|
1443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileItemComponent, decorators: [{
|
|
1397
1444
|
type: Component,
|
|
1398
1445
|
args: [{
|
|
1399
1446
|
selector: 'sky-file-item',
|
|
1400
1447
|
templateUrl: './file-item.component.html',
|
|
1401
|
-
styleUrls: ['./file-item.component.scss']
|
|
1448
|
+
styleUrls: ['./file-item.component.scss'],
|
|
1402
1449
|
}]
|
|
1403
1450
|
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: SkyFileItemService }]; }, propDecorators: { fileItem: [{
|
|
1404
1451
|
type: Input
|
|
@@ -1408,8 +1455,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
1408
1455
|
|
|
1409
1456
|
class SkyFileAttachmentsModule {
|
|
1410
1457
|
}
|
|
1411
|
-
SkyFileAttachmentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1412
|
-
SkyFileAttachmentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1458
|
+
SkyFileAttachmentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1459
|
+
SkyFileAttachmentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentsModule, declarations: [SkyFileAttachmentComponent,
|
|
1413
1460
|
SkyFileAttachmentLabelComponent,
|
|
1414
1461
|
SkyFileDropComponent,
|
|
1415
1462
|
SkyFileItemComponent,
|
|
@@ -1423,18 +1470,15 @@ SkyFileAttachmentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0"
|
|
|
1423
1470
|
SkyFileDropComponent,
|
|
1424
1471
|
SkyFileItemComponent,
|
|
1425
1472
|
SkyFileSizePipe] });
|
|
1426
|
-
SkyFileAttachmentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1427
|
-
DecimalPipe,
|
|
1428
|
-
SkyFileItemService
|
|
1429
|
-
], imports: [[
|
|
1473
|
+
SkyFileAttachmentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentsModule, providers: [DecimalPipe, SkyFileItemService], imports: [[
|
|
1430
1474
|
CommonModule,
|
|
1431
1475
|
FormsModule,
|
|
1432
1476
|
SkyFormsResourcesModule,
|
|
1433
1477
|
SkyI18nModule,
|
|
1434
1478
|
SkyIconModule,
|
|
1435
|
-
SkyThemeModule
|
|
1479
|
+
SkyThemeModule,
|
|
1436
1480
|
]] });
|
|
1437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFileAttachmentsModule, decorators: [{
|
|
1438
1482
|
type: NgModule,
|
|
1439
1483
|
args: [{
|
|
1440
1484
|
declarations: [
|
|
@@ -1442,7 +1486,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
1442
1486
|
SkyFileAttachmentLabelComponent,
|
|
1443
1487
|
SkyFileDropComponent,
|
|
1444
1488
|
SkyFileItemComponent,
|
|
1445
|
-
SkyFileSizePipe
|
|
1489
|
+
SkyFileSizePipe,
|
|
1446
1490
|
],
|
|
1447
1491
|
imports: [
|
|
1448
1492
|
CommonModule,
|
|
@@ -1450,19 +1494,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
1450
1494
|
SkyFormsResourcesModule,
|
|
1451
1495
|
SkyI18nModule,
|
|
1452
1496
|
SkyIconModule,
|
|
1453
|
-
SkyThemeModule
|
|
1497
|
+
SkyThemeModule,
|
|
1454
1498
|
],
|
|
1455
1499
|
exports: [
|
|
1456
1500
|
SkyFileAttachmentComponent,
|
|
1457
1501
|
SkyFileAttachmentLabelComponent,
|
|
1458
1502
|
SkyFileDropComponent,
|
|
1459
1503
|
SkyFileItemComponent,
|
|
1460
|
-
SkyFileSizePipe
|
|
1504
|
+
SkyFileSizePipe,
|
|
1461
1505
|
],
|
|
1462
|
-
providers: [
|
|
1463
|
-
DecimalPipe,
|
|
1464
|
-
SkyFileItemService
|
|
1465
|
-
]
|
|
1506
|
+
providers: [DecimalPipe, SkyFileItemService],
|
|
1466
1507
|
}]
|
|
1467
1508
|
}] });
|
|
1468
1509
|
|
|
@@ -1488,14 +1529,14 @@ class SkyInputBoxAdapterService {
|
|
|
1488
1529
|
*/
|
|
1489
1530
|
isFocusInElement(el) {
|
|
1490
1531
|
if (el) {
|
|
1491
|
-
return el === document.activeElement || el.contains(document.activeElement);
|
|
1532
|
+
return (el === document.activeElement || el.contains(document.activeElement));
|
|
1492
1533
|
}
|
|
1493
1534
|
return false;
|
|
1494
1535
|
}
|
|
1495
1536
|
}
|
|
1496
|
-
SkyInputBoxAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1497
|
-
SkyInputBoxAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1537
|
+
SkyInputBoxAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1538
|
+
SkyInputBoxAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxAdapterService });
|
|
1539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxAdapterService, decorators: [{
|
|
1499
1540
|
type: Injectable
|
|
1500
1541
|
}] });
|
|
1501
1542
|
|
|
@@ -1510,9 +1551,9 @@ class SkyInputBoxHostService {
|
|
|
1510
1551
|
this.host.populate(args);
|
|
1511
1552
|
}
|
|
1512
1553
|
}
|
|
1513
|
-
SkyInputBoxHostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1514
|
-
SkyInputBoxHostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1554
|
+
SkyInputBoxHostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxHostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1555
|
+
SkyInputBoxHostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxHostService });
|
|
1556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxHostService, decorators: [{
|
|
1516
1557
|
type: Injectable
|
|
1517
1558
|
}] });
|
|
1518
1559
|
|
|
@@ -1532,9 +1573,9 @@ class SkyInputBoxComponent {
|
|
|
1532
1573
|
}
|
|
1533
1574
|
get hasErrorsComputed() {
|
|
1534
1575
|
if (this.hasErrors === undefined) {
|
|
1535
|
-
return this.controlHasErrors(this.formControl) ||
|
|
1576
|
+
return (this.controlHasErrors(this.formControl) ||
|
|
1536
1577
|
this.controlHasErrors(this.formControlByName) ||
|
|
1537
|
-
this.controlHasErrors(this.ngModel);
|
|
1578
|
+
this.controlHasErrors(this.ngModel));
|
|
1538
1579
|
}
|
|
1539
1580
|
return this.hasErrors;
|
|
1540
1581
|
}
|
|
@@ -1576,24 +1617,18 @@ class SkyInputBoxComponent {
|
|
|
1576
1617
|
return control && control.invalid && (control.dirty || control.touched);
|
|
1577
1618
|
}
|
|
1578
1619
|
}
|
|
1579
|
-
SkyInputBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1580
|
-
SkyInputBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: SkyInputBoxComponent, selector: "sky-input-box", inputs: { hasErrors: "hasErrors", disabled: "disabled" }, providers: [
|
|
1581
|
-
|
|
1582
|
-
SkyInputBoxHostService
|
|
1583
|
-
], queries: [{ propertyName: "formControl", first: true, predicate: FormControlDirective, descendants: true }, { propertyName: "formControlByName", first: true, predicate: FormControlName, descendants: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], ngImport: i0, template: " <div *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': disabled\n }\"\n >\n <div\n class=\"sky-form-group\"\n >\n <div\n class=\"sky-input-box-label-wrapper\"\n >\n <ng-container\n *ngTemplateOutlet=\"labelTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"characterCountTemplate\"\n ></ng-container>\n </div>\n <div\n class=\"sky-input-group\"\n >\n <ng-container\n *ngTemplateOutlet=\"buttonsLeftTemplate\"\n ></ng-container>\n <div\n class=\"sky-input-box-input-group-inner\"\n [ngClass]=\"{\n 'sky-field-status-active': formControlHasFocus,\n 'sky-field-status-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <ng-container\n *ngTemplateOutlet=\"iconsInsetLeftTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"inputTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"buttonsInsetTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"iconsInsetTemplate\"\n ></ng-container>\n </div>\n <ng-container\n *ngTemplateOutlet=\"buttonsTemplate\"\n ></ng-container>\n </div>\n <ng-container\n *ngTemplateOutlet=\"errorLabelTemplate\"\n ></ng-container>\n </div>\n </div>\n\n <div *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': disabled\n }\"\n >\n <div\n class=\"sky-input-box-group\"\n >\n <ng-container\n *ngTemplateOutlet=\"buttonsLeftTemplate\"\n ></ng-container>\n <div\n class=\"sky-input-box-group-form-control\"\n [ngClass]=\"{\n 'sky-input-box-group-form-control-focus': formControlHasFocus,\n 'sky-input-box-group-form-control-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <div\n class=\"sky-form-group\"\n >\n <ng-container\n *ngTemplateOutlet=\"iconsInsetLeftTemplate\"\n ></ng-container>\n <div\n class=\"sky-input-box-form-group-inner\"\n >\n <div\n class=\"sky-input-box-label-wrapper\"\n >\n <ng-container\n *ngTemplateOutlet=\"labelTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"characterCountTemplate\"\n ></ng-container>\n </div>\n <ng-container\n *ngTemplateOutlet=\"inputTemplate\"\n ></ng-container>\n </div>\n <ng-container\n *ngTemplateOutlet=\"buttonsInsetTemplate\"\n ></ng-container>\n <ng-container\n *ngTemplateOutlet=\"iconsInsetTemplate\"\n ></ng-container>\n </div>\n </div>\n <ng-container\n *ngTemplateOutlet=\"buttonsTemplate\"\n ></ng-container>\n </div>\n <ng-container\n *ngTemplateOutlet=\"errorLabelTemplate\"\n ></ng-container>\n </div>\n\n<ng-template\n #labelTemplate\n>\n <ng-content\n select=\".sky-control-label\"\n ></ng-content>\n</ng-template>\n\n<ng-template\n #inlineHelpTemplate\n>\n <ng-content\n select=\".sky-control-help\"\n ></ng-content>\n</ng-template>\n\n<ng-template\n #characterCountTemplate\n>\n <ng-content\n select=\"sky-character-counter-indicator\"\n ></ng-content>\n</ng-template>\n\n<ng-template\n #inputTemplate\n>\n <ng-content\n select=\".sky-form-control\"\n ></ng-content>\n <ng-container\n *ngTemplateOutlet=\"hostInputTemplate\"\n ></ng-container>\n</ng-template>\n\n<ng-template\n #buttonsLeftTemplate\n>\n <ng-content\n select=\".sky-input-group-btn.sky-input-box-btn-left\"\n ></ng-content>\n <ng-container\n *ngTemplateOutlet=\"hostButtonsLeftTemplate\"\n ></ng-container>\n</ng-template>\n\n<ng-template\n #buttonsTemplate\n>\n <ng-content\n select=\".sky-input-group-btn:not(.sky-input-box-btn-left):not(.sky-input-box-btn-inset)\"\n ></ng-content>\n <ng-container\n *ngTemplateOutlet=\"hostButtonsTemplate\"\n ></ng-container>\n</ng-template>\n\n<ng-template\n #buttonsInsetTemplate\n>\n <ng-content\n select=\".sky-input-group-btn.sky-input-box-btn-inset\"\n ></ng-content>\n <ng-container\n *ngTemplateOutlet=\"hostButtonsInsetTemplate\"\n ></ng-container>\n</ng-template>\n\n<ng-template\n #iconsInsetTemplate\n>\n <div\n class=\"sky-input-box-icon-inset-wrapper\"\n (click)=\"onInsetIconClick()\"\n >\n <ng-content\n select=\".sky-input-group-icon.sky-input-box-icon-inset\"\n ></ng-content>\n <ng-container\n *ngTemplateOutlet=\"hostIconsInsetTemplate\"\n ></ng-container>\n </div>\n</ng-template>\n\n<ng-template\n #iconsInsetLeftTemplate\n>\n <div\n class=\"sky-input-box-icon-inset-left-wrapper\"\n (click)=\"onInsetIconClick()\"\n >\n <ng-content\n select=\".sky-input-group-icon.sky-input-box-icon-inset-left\"\n ></ng-content>\n <ng-container\n *ngTemplateOutlet=\"hostIconsInsetLeftTemplate\"\n ></ng-container>\n </div>\n</ng-template>\n\n<ng-template\n #errorLabelTemplate\n>\n <ng-content\n select=\".sky-error-label\"\n ></ng-content>\n</ng-template>\n", styles: ["sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap}sky-input-box .sky-form-group .sky-control-help{margin:0 0 0 4px}sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;width:100%}sky-input-box .sky-input-box-input-group-inner{display:flex;background-color:#fff;width:100%;z-index:1}sky-input-box .sky-input-box-input-group-inner:not(.sky-field-status-active):not(.sky-field-status-invalid){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-input-box .sky-input-box-btn-inset .sky-btn{background-color:transparent;border:none}sky-input-box .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-icon-inset-left-wrapper{display:flex}sky-input-box .sky-input-box-icon-inset-wrapper .sky-input-group-icon,sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-group-icon{width:33px;display:flex;align-items:center;justify-content:center}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:#cdcfd2}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper .sky-icon,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper .sky-icon{color:#686c73}sky-input-box sky-character-counter-indicator{flex-grow:1;text-align:right;margin-bottom:5px;margin-left:auto}sky-input-box .sky-control-label+sky-character-counter-indicator{flex-grow:0;flex-shrink:.001}sky-input-box .sky-form-control,sky-input-box .sky-form-control:focus{border:none;flex-basis:100%}sky-input-box .sky-form-control:focus,sky-input-box .sky-form-control.ng-invalid.ng-touched,sky-input-box .sky-form-control:focus:focus,sky-input-box .sky-form-control:focus.ng-invalid.ng-touched{border:none;box-shadow:none}sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 10px;width:auto;width:initial}.sky-theme-modern .sky-input-box .sky-input-box-group{display:flex}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control{flex-grow:1;position:relative}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:first-child .sky-form-group{border-top-left-radius:6px;border-bottom-left-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:last-child .sky-form-group{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-form-group-inner{display:flex;flex-grow:1;flex-wrap:wrap}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn{border-radius:0;color:#686c73;margin:0;padding:0;position:relative;transition:border-color .15s,box-shadow .15s,color .15s;width:55px}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn .sky-icon{font-size:24px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn{border-top-left-radius:6px;border-bottom-left-radius:6px;margin-right:-1px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn:focus{z-index:1}.sky-theme-modern .sky-input-box .sky-input-group-btn:last-child .sky-btn{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-group-icon{width:55px}.sky-theme-modern .sky-input-box .sky-input-group-icon .sky-icon{color:#686c73;font-size:24px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-group-btn:focus-within:not(:last-child){z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control+.sky-input-group-btn .sky-btn{margin-left:-2px}.sky-theme-modern .sky-input-box .sky-input-group-btn+.sky-input-group-btn .sky-btn{margin-left:-1px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #ef4044;color:#d93a3d}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box .sky-form-group{background-color:#fff;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;color:#686c73;flex-wrap:nowrap;margin-bottom:0;padding:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;padding:0 15px;width:100%}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-bottom:0;position:relative;z-index:2}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label{padding:6px 0 1px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-character-count-label{font-size:13px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{margin:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help .sky-help-inline{font-size:16px;padding:3px 10px 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:last-child .sky-help-inline{padding:3px 0 0 10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-left:auto;padding:3px 0 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{background-color:transparent;border:none;border-radius:6px;font-size:16px;height:auto;line-height:18px;margin-top:-23px;padding:26px 15px 10px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:first-line{line-height:19px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:focus,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control.ng-invalid{box-shadow:none;outline:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-webkit-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-controlinput:-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-ms-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn{background-color:transparent;border-radius:6px;transition-property:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn:not(:active):not(:focus):not(:hover){box-shadow:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control{margin-top:0;padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{margin-top:0;padding-top:5px}@-moz-document url-prefix(){.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{padding-left:10px}}.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{background-position-x:calc(100% - 10px);z-index:3}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{resize:vertical}.sky-theme-modern .sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 15px;width:auto;width:initial}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #d2d2d2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8;z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:active,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus{border:none;box-shadow:inset 0 0 0 2px #1870b8;color:#212327;z-index:2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus:not(:active){outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:active .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #ef4044;color:#d93a3d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid:active .sky-form-group{color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group .sky-control-label{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-control,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-control-label,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn{cursor:not-allowed}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-wrapper,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:transparent}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-group{background-color:#ededee}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn .sky-btn{background-color:#ededee;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;opacity:1}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group{background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-form-control,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-input-group-btn .sky-btn{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus .sky-form-group,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus.sky-input-box-group-form-control-invalid .sky-form-group{color:#1870b8}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #ef4044;color:#d93a3d}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn.sky-btn-default{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn:focus{border-color:#1870b8;color:#fbfcfe}\n"], directives: [{ type: i1$1.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInputBoxComponent, decorators: [{
|
|
1620
|
+
SkyInputBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyInputBoxHostService }, { token: SkyInputBoxAdapterService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1621
|
+
SkyInputBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyInputBoxComponent, selector: "sky-input-box", inputs: { hasErrors: "hasErrors", disabled: "disabled" }, providers: [SkyInputBoxAdapterService, SkyInputBoxHostService], queries: [{ propertyName: "formControl", first: true, predicate: FormControlDirective, descendants: true }, { propertyName: "formControlByName", first: true, predicate: FormControlName, descendants: true }, { propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], ngImport: i0, template: "<div\n *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': disabled\n }\"\n>\n <div class=\"sky-form-group\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"inlineHelpTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\"></ng-container>\n </div>\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\"></ng-container>\n <div\n class=\"sky-input-box-input-group-inner\"\n [ngClass]=\"{\n 'sky-field-status-active': formControlHasFocus,\n 'sky-field-status-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\"></ng-container>\n </div>\n</div>\n\n<div\n *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': disabled\n }\"\n>\n <div class=\"sky-input-box-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\"></ng-container>\n <div\n class=\"sky-input-box-group-form-control\"\n [ngClass]=\"{\n 'sky-input-box-group-form-control-focus': formControlHasFocus,\n 'sky-input-box-group-form-control-invalid': hasErrorsComputed\n }\"\n (focusin)=\"formControlFocusIn()\"\n (focusout)=\"formControlFocusOut()\"\n >\n <div class=\"sky-form-group\">\n <ng-container *ngTemplateOutlet=\"iconsInsetLeftTemplate\"></ng-container>\n <div class=\"sky-input-box-form-group-inner\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"inlineHelpTemplate\"></ng-container>\n <ng-container\n *ngTemplateOutlet=\"characterCountTemplate\"\n ></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\"></ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\"></ng-container>\n</div>\n\n<ng-template #labelTemplate>\n <ng-content select=\".sky-control-label\"></ng-content>\n</ng-template>\n\n<ng-template #inlineHelpTemplate>\n <ng-content select=\".sky-control-help\"></ng-content>\n</ng-template>\n\n<ng-template #characterCountTemplate>\n <ng-content select=\"sky-character-counter-indicator\"></ng-content>\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content select=\".sky-form-control\"></ng-content>\n <ng-container *ngTemplateOutlet=\"hostInputTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #buttonsLeftTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-left\"></ng-content>\n <ng-container *ngTemplateOutlet=\"hostButtonsLeftTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #buttonsTemplate>\n <ng-content\n select=\".sky-input-group-btn:not(.sky-input-box-btn-left):not(.sky-input-box-btn-inset)\"\n ></ng-content>\n <ng-container *ngTemplateOutlet=\"hostButtonsTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #buttonsInsetTemplate>\n <ng-content\n select=\".sky-input-group-btn.sky-input-box-btn-inset\"\n ></ng-content>\n <ng-container *ngTemplateOutlet=\"hostButtonsInsetTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #iconsInsetTemplate>\n <div class=\"sky-input-box-icon-inset-wrapper\" (click)=\"onInsetIconClick()\">\n <ng-content\n select=\".sky-input-group-icon.sky-input-box-icon-inset\"\n ></ng-content>\n <ng-container *ngTemplateOutlet=\"hostIconsInsetTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #iconsInsetLeftTemplate>\n <div\n class=\"sky-input-box-icon-inset-left-wrapper\"\n (click)=\"onInsetIconClick()\"\n >\n <ng-content\n select=\".sky-input-group-icon.sky-input-box-icon-inset-left\"\n ></ng-content>\n <ng-container *ngTemplateOutlet=\"hostIconsInsetLeftTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #errorLabelTemplate>\n <ng-content select=\".sky-error-label\"></ng-content>\n</ng-template>\n", styles: ["sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap}sky-input-box .sky-form-group .sky-control-help{margin:0 0 0 4px}sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;width:100%}sky-input-box .sky-input-box-input-group-inner{display:flex;background-color:#fff;width:100%;z-index:1}sky-input-box .sky-input-box-input-group-inner:not(.sky-field-status-active):not(.sky-field-status-invalid){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-input-box .sky-input-box-btn-inset .sky-btn{background-color:transparent;border:none}sky-input-box .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-icon-inset-left-wrapper{display:flex}sky-input-box .sky-input-box-icon-inset-wrapper .sky-input-group-icon,sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-group-icon{width:33px;display:flex;align-items:center;justify-content:center}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:#cdcfd2}sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-wrapper .sky-icon,sky-input-box .sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper .sky-icon{color:#686c73}sky-input-box sky-character-counter-indicator{flex-grow:1;text-align:right;margin-bottom:5px;margin-left:auto}sky-input-box .sky-control-label+sky-character-counter-indicator{flex-grow:0;flex-shrink:.001}sky-input-box .sky-form-control,sky-input-box .sky-form-control:focus{border:none;flex-basis:100%}sky-input-box .sky-form-control:focus,sky-input-box .sky-form-control.ng-invalid.ng-touched,sky-input-box .sky-form-control:focus:focus,sky-input-box .sky-form-control:focus.ng-invalid.ng-touched{border:none;box-shadow:none}sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 10px;width:initial}.sky-theme-modern .sky-input-box .sky-input-box-group{display:flex}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control{flex-grow:1;position:relative}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:first-child .sky-form-group{border-top-left-radius:6px;border-bottom-left-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control:last-child .sky-form-group{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-box-form-group-inner{display:flex;flex-grow:1;flex-wrap:wrap}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn{border-radius:0;color:#686c73;margin:0;padding:0;position:relative;transition:border-color .15s,box-shadow .15s,color .15s;width:55px}.sky-theme-modern .sky-input-box .sky-input-group-btn .sky-btn .sky-icon{font-size:24px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn{border-top-left-radius:6px;border-bottom-left-radius:6px;margin-right:-1px}.sky-theme-modern .sky-input-box .sky-input-group-btn:first-child .sky-btn:focus{z-index:1}.sky-theme-modern .sky-input-box .sky-input-group-btn:last-child .sky-btn{border-top-right-radius:6px;border-bottom-right-radius:6px}.sky-theme-modern .sky-input-box .sky-input-group-icon{width:55px}.sky-theme-modern .sky-input-box .sky-input-group-icon .sky-icon{color:#686c73;font-size:24px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid:not(:last-child),.sky-theme-modern .sky-input-box .sky-input-group-btn:focus-within:not(:last-child){z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control+.sky-input-group-btn .sky-btn{margin-left:-2px}.sky-theme-modern .sky-input-box .sky-input-group-btn+.sky-input-group-btn .sky-btn{margin-left:-1px}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #ef4044;color:#d93a3d}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box .sky-form-group{background-color:#fff;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;color:#686c73;flex-wrap:nowrap;margin-bottom:0;padding:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper{display:flex;padding:0 15px;width:100%}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-bottom:0;position:relative;z-index:2}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label{padding:6px 0 1px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-label,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-character-count-label{font-size:13px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help{margin:0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help .sky-help-inline{font-size:16px;padding:3px 10px 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:last-child .sky-help-inline{padding:3px 0 0 10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper sky-character-counter-indicator{margin-left:auto;padding:3px 0 0}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control{background-color:transparent;border:none;border-radius:6px;font-size:16px;height:auto;line-height:18px;margin-top:-23px;padding:26px 15px 10px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:first-line{line-height:19px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:focus,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control.ng-invalid{box-shadow:none;outline:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-webkit-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control::-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-controlinput:-moz-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-ms-input-placeholder{font-size:16px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn{background-color:transparent;border-radius:6px;transition-property:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-btn-inset .sky-btn:not(:active):not(:focus):not(:hover){box-shadow:none}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control{margin-top:0;padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{margin-top:0;padding-top:5px}@-moz-document url-prefix(){.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{padding-left:10px}}.sky-theme-modern .sky-input-box .sky-form-group select.sky-form-control{background-position-x:calc(100% - 10px);z-index:3}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control{resize:vertical}.sky-theme-modern .sky-input-box .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 0 0 15px;width:initial}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:hover .sky-form-group{border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #d2d2d2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:hover{border:none;box-shadow:inset 0 0 0 1px #1870b8;z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:active,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus{border:none;box-shadow:inset 0 0 0 2px #1870b8;color:#212327;z-index:2}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-group-btn .sky-btn:focus:not(:active){outline:none;border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control:active .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #ef4044;color:#d93a3d}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-invalid:active .sky-form-group{color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active),.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid{z-index:1}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active) .sky-form-group,.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-input-box-group-form-control-focus:not(:active).sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d;color:#1870b8}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box:not(.sky-input-box-disabled) .sky-form-group .sky-control-label{transition:border-color .15s,box-shadow .15s,color .15s}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-control,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-control-label,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn{cursor:not-allowed}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-wrapper,.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-box-icon-inset-left-wrapper{background-color:transparent}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-form-group{background-color:#ededee}.sky-theme-modern .sky-input-box.sky-input-box-disabled .sky-input-group-btn .sky-btn{background-color:#ededee;border:none;box-shadow:inset 0 0 0 1px #d2d2d2;opacity:1}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group{background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-form-control,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-form-group .sky-input-group-btn .sky-btn{background-color:transparent;color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus .sky-form-group,.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-focus.sky-input-box-group-form-control-invalid .sky-form-group{color:#1870b8}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-box-group-form-control-invalid .sky-form-group{border:none;box-shadow:inset 0 0 0 2px #ef4044;color:#d93a3d}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn{border:none;box-shadow:inset 0 0 0 1px #686c73;color:#c0c2c5}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn.sky-btn-default{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-input-box .sky-input-group-btn .sky-btn:focus{border-color:#1870b8;color:#fbfcfe}\n"], directives: [{ type: i1$1.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxComponent, decorators: [{
|
|
1585
1623
|
type: Component,
|
|
1586
1624
|
args: [{
|
|
1587
1625
|
selector: 'sky-input-box',
|
|
1588
1626
|
templateUrl: './input-box.component.html',
|
|
1589
1627
|
styleUrls: ['./input-box.component.scss'],
|
|
1590
|
-
providers: [
|
|
1591
|
-
SkyInputBoxAdapterService,
|
|
1592
|
-
SkyInputBoxHostService
|
|
1593
|
-
],
|
|
1628
|
+
providers: [SkyInputBoxAdapterService, SkyInputBoxHostService],
|
|
1594
1629
|
// Note that change detection is not set to OnPush; default change detection allows the
|
|
1595
1630
|
// invalid CSS class to be added when the content control's invalid/dirty state changes.
|
|
1596
|
-
encapsulation: ViewEncapsulation.None
|
|
1631
|
+
encapsulation: ViewEncapsulation.None,
|
|
1597
1632
|
}]
|
|
1598
1633
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkyInputBoxHostService }, { type: SkyInputBoxAdapterService }, { type: i0.ElementRef }]; }, propDecorators: { hasErrors: [{
|
|
1599
1634
|
type: Input
|
|
@@ -1612,26 +1647,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
1612
1647
|
|
|
1613
1648
|
class SkyInputBoxModule {
|
|
1614
1649
|
}
|
|
1615
|
-
SkyInputBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1616
|
-
SkyInputBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
CommonModule,
|
|
1620
|
-
SkyThemeModule
|
|
1621
|
-
]] });
|
|
1622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInputBoxModule, decorators: [{
|
|
1650
|
+
SkyInputBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1651
|
+
SkyInputBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxModule, declarations: [SkyInputBoxComponent], imports: [CommonModule, SkyThemeModule], exports: [SkyInputBoxComponent] });
|
|
1652
|
+
SkyInputBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxModule, imports: [[CommonModule, SkyThemeModule]] });
|
|
1653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInputBoxModule, decorators: [{
|
|
1623
1654
|
type: NgModule,
|
|
1624
1655
|
args: [{
|
|
1625
|
-
declarations: [
|
|
1626
|
-
|
|
1627
|
-
],
|
|
1628
|
-
imports: [
|
|
1629
|
-
CommonModule,
|
|
1630
|
-
SkyThemeModule
|
|
1631
|
-
],
|
|
1632
|
-
exports: [
|
|
1633
|
-
SkyInputBoxComponent
|
|
1634
|
-
]
|
|
1656
|
+
declarations: [SkyInputBoxComponent],
|
|
1657
|
+
imports: [CommonModule, SkyThemeModule],
|
|
1658
|
+
exports: [SkyInputBoxComponent],
|
|
1635
1659
|
}]
|
|
1636
1660
|
}] });
|
|
1637
1661
|
|
|
@@ -1647,7 +1671,7 @@ let nextUniqueId$1 = 0;
|
|
|
1647
1671
|
const SKY_RADIO_CONTROL_VALUE_ACCESSOR = {
|
|
1648
1672
|
provide: NG_VALUE_ACCESSOR,
|
|
1649
1673
|
useExisting: forwardRef(() => SkyRadioComponent),
|
|
1650
|
-
multi: true
|
|
1674
|
+
multi: true,
|
|
1651
1675
|
};
|
|
1652
1676
|
// tslint:enable
|
|
1653
1677
|
/**
|
|
@@ -1840,7 +1864,7 @@ class SkyRadioComponent {
|
|
|
1840
1864
|
this.checked = true;
|
|
1841
1865
|
this._change.emit({
|
|
1842
1866
|
source: this,
|
|
1843
|
-
value: this._value
|
|
1867
|
+
value: this._value,
|
|
1844
1868
|
});
|
|
1845
1869
|
this.onInputFocusChange(undefined);
|
|
1846
1870
|
this.onChangeCallback(this.value);
|
|
@@ -1851,20 +1875,16 @@ class SkyRadioComponent {
|
|
|
1851
1875
|
this.blur.next();
|
|
1852
1876
|
}
|
|
1853
1877
|
}
|
|
1854
|
-
SkyRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1855
|
-
SkyRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1856
|
-
|
|
1857
|
-
], ngImport: i0, template: "<label\n class=\"sky-radio-wrapper sky-switch\"\n [ngClass]=\"{ 'sky-switch-disabled': disabled }\"\n>\n <input\n class=\"sky-radio-input sky-switch-input\"\n type=\"radio\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [name]=\"name\"\n [tabIndex]=\"tabindex\"\n [value]=\"value\"\n (blur)=\"onInputFocusChange($event)\"\n (change)=\"onInputChange($event)\"\n />\n <span\n class=\"sky-switch-control\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-rounded-corners': icon,\n 'sky-rounded-circle': !icon,\n 'sky-switch-control-info': icon && radioType === 'info',\n 'sky-switch-control-success': icon && radioType === 'success',\n 'sky-switch-control-warning': icon && radioType === 'warning',\n 'sky-switch-control-danger': icon && radioType === 'danger'\n }\"\n >\n <sky-icon *ngIf=\"icon || checked\"\n class=\"sky-radio-icon-default\"\n fixedWidth=\"true\"\n [icon]=\"icon || 'circle'\"\n >\n </sky-icon>\n <div\n class=\"sky-radio-icon-modern\"\n >\n <sky-icon *ngIf=\"icon; else checkedTemplate\"\n fixedWidth=\"true\"\n [icon]=\"icon\"\n >\n </sky-icon>\n <ng-template #checkedTemplate>\n <div *ngIf=\"checked\"\n class=\"sky-radio-icon-modern-checked sky-rounded-circle\"\n >\n </div>\n </ng-template>\n </div>\n </span>\n <ng-content select=\"sky-radio-label\"></ng-content>\n</label>\n", styles: [".sky-switch-control:not(.sky-switch-control-icon) sky-icon{font-size:70%}.sky-radio-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-radio-icon-default{display:none}:host-context(.sky-theme-modern) .sky-radio-icon-modern{display:block}:host-context(.sky-theme-modern) .sky-radio-icon-modern-checked{background-color:#1870b8;height:10px;width:10px}:host-context(.sky-theme-modern) .sky-radio-input:disabled+.sky-switch-control .sky-radio-icon-modern-checked{background-color:#212327}.sky-theme-modern .sky-radio-icon-default{display:none}.sky-theme-modern .sky-radio-icon-modern{display:block}.sky-theme-modern .sky-radio-icon-modern-checked{background-color:#1870b8;height:10px;width:10px}.sky-theme-modern .sky-radio-input:disabled+.sky-switch-control .sky-radio-icon-modern-checked{background-color:#212327}\n"], components: [{ type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyRadioComponent, decorators: [{
|
|
1878
|
+
SkyRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1879
|
+
SkyRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyRadioComponent, selector: "sky-radio", inputs: { checked: "checked", disabled: "disabled", id: "id", label: "label", labelledBy: "labelledBy", name: "name", tabindex: "tabindex", value: "value", icon: "icon", radioType: "radioType" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange" }, providers: [SKY_RADIO_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<label\n class=\"sky-radio-wrapper sky-switch\"\n [ngClass]=\"{ 'sky-switch-disabled': disabled }\"\n>\n <input\n class=\"sky-radio-input sky-switch-input\"\n type=\"radio\"\n [attr.aria-label]=\"label\"\n [attr.aria-labelledby]=\"labelledBy\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [name]=\"name\"\n [tabIndex]=\"tabindex\"\n [value]=\"value\"\n (blur)=\"onInputFocusChange($event)\"\n (change)=\"onInputChange($event)\"\n />\n <span\n class=\"sky-switch-control\"\n [ngClass]=\"{\n 'sky-switch-control-icon': icon,\n 'sky-rounded-corners': icon,\n 'sky-rounded-circle': !icon,\n 'sky-switch-control-info': icon && radioType === 'info',\n 'sky-switch-control-success': icon && radioType === 'success',\n 'sky-switch-control-warning': icon && radioType === 'warning',\n 'sky-switch-control-danger': icon && radioType === 'danger'\n }\"\n >\n <sky-icon *ngIf=\"icon\" fixedWidth=\"true\" [icon]=\"icon\"> </sky-icon>\n </span>\n <ng-content select=\"sky-radio-label\"></ng-content>\n</label>\n", styles: [".sky-switch-control:not(.sky-switch-control-icon) sky-icon{font-size:70%}.sky-switch-input:checked+.sky-switch-control:not(.sky-switch-control-icon):after{content:\"\";display:inline-block;width:10px;height:10px;background:#000000;border-radius:50%}:host-context(.sky-theme-modern) .sky-switch-input:checked+.sky-switch-control:not(.sky-switch-control-icon):after{background:#1870B8}:host-context(.sky-theme-modern) .sky-radio-input:disabled+.sky-switch-control .sky-radio-icon-modern-checked{background-color:#212327}.sky-theme-modern .sky-switch-input:checked+.sky-switch-control:not(.sky-switch-control-icon):after{background:#1870B8}.sky-theme-modern .sky-radio-input:disabled+.sky-switch-control .sky-radio-icon-modern-checked{background-color:#212327}\n"], components: [{ type: i2$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioComponent, decorators: [{
|
|
1859
1881
|
type: Component,
|
|
1860
1882
|
args: [{
|
|
1861
1883
|
selector: 'sky-radio',
|
|
1862
1884
|
templateUrl: './radio.component.html',
|
|
1863
1885
|
styleUrls: ['./radio.component.scss'],
|
|
1864
|
-
providers: [
|
|
1865
|
-
|
|
1866
|
-
],
|
|
1867
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1886
|
+
providers: [SKY_RADIO_CONTROL_VALUE_ACCESSOR],
|
|
1887
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1868
1888
|
}]
|
|
1869
1889
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { checked: [{
|
|
1870
1890
|
type: Input
|
|
@@ -1905,13 +1925,13 @@ class SkyRadioLabelComponent {
|
|
|
1905
1925
|
event.stopPropagation();
|
|
1906
1926
|
}
|
|
1907
1927
|
}
|
|
1908
|
-
SkyRadioLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1909
|
-
SkyRadioLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1910
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1928
|
+
SkyRadioLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1929
|
+
SkyRadioLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyRadioLabelComponent, selector: "sky-radio-label", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<span class=\"sky-switch-label\">\n <ng-content></ng-content>\n</span>\n" });
|
|
1930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioLabelComponent, decorators: [{
|
|
1911
1931
|
type: Component,
|
|
1912
1932
|
args: [{
|
|
1913
1933
|
selector: 'sky-radio-label',
|
|
1914
|
-
templateUrl: './radio-label.component.html'
|
|
1934
|
+
templateUrl: './radio-label.component.html',
|
|
1915
1935
|
}]
|
|
1916
1936
|
}], propDecorators: { onClick: [{
|
|
1917
1937
|
type: HostListener,
|
|
@@ -1934,7 +1954,7 @@ class SkyRadioGroupComponent {
|
|
|
1934
1954
|
* When you set this property to `true`, the component adds `aria-required` and `required`
|
|
1935
1955
|
* attributes to the input element so that forms display an invalid state until the input element
|
|
1936
1956
|
* is complete.
|
|
1937
|
-
* @default
|
|
1957
|
+
* @default false
|
|
1938
1958
|
*/
|
|
1939
1959
|
this.required = false;
|
|
1940
1960
|
this.ngUnsubscribe = new Subject();
|
|
@@ -1950,7 +1970,7 @@ class SkyRadioGroupComponent {
|
|
|
1950
1970
|
}
|
|
1951
1971
|
/**
|
|
1952
1972
|
* Indicates whether to disable the input.
|
|
1953
|
-
* @default
|
|
1973
|
+
* @default false
|
|
1954
1974
|
*/
|
|
1955
1975
|
set disabled(value) {
|
|
1956
1976
|
const newDisabledState = SkyFormsUtility.coerceBooleanProperty(value);
|
|
@@ -2015,9 +2035,7 @@ class SkyRadioGroupComponent {
|
|
|
2015
2035
|
});
|
|
2016
2036
|
// Watch for radio selections.
|
|
2017
2037
|
this.watchForSelections();
|
|
2018
|
-
this.radios.changes
|
|
2019
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2020
|
-
.subscribe(() => {
|
|
2038
|
+
this.radios.changes.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
2021
2039
|
// Wait for child radio components to finish any rendering updates.
|
|
2022
2040
|
setTimeout(() => {
|
|
2023
2041
|
this.resetRadioButtons();
|
|
@@ -2029,7 +2047,8 @@ class SkyRadioGroupComponent {
|
|
|
2029
2047
|
ngAfterViewInit() {
|
|
2030
2048
|
if (this.ngControl) {
|
|
2031
2049
|
// Backwards compatibility support for anyone still using Validators.Required.
|
|
2032
|
-
this.required =
|
|
2050
|
+
this.required =
|
|
2051
|
+
this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
|
|
2033
2052
|
// Avoid an ExpressionChangedAfterItHasBeenCheckedError.
|
|
2034
2053
|
this.changeDetector.detectChanges();
|
|
2035
2054
|
}
|
|
@@ -2042,9 +2061,7 @@ class SkyRadioGroupComponent {
|
|
|
2042
2061
|
this.onTouched();
|
|
2043
2062
|
this.writeValue(change.value);
|
|
2044
2063
|
});
|
|
2045
|
-
radio.blur
|
|
2046
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2047
|
-
.subscribe(() => {
|
|
2064
|
+
radio.blur.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
2048
2065
|
this.onTouched();
|
|
2049
2066
|
this.changeDetector.markForCheck();
|
|
2050
2067
|
});
|
|
@@ -2072,21 +2089,21 @@ class SkyRadioGroupComponent {
|
|
|
2072
2089
|
}
|
|
2073
2090
|
updateRadioButtonDisabled() {
|
|
2074
2091
|
if (this.radios) {
|
|
2075
|
-
this.radios.forEach(radio => {
|
|
2092
|
+
this.radios.forEach((radio) => {
|
|
2076
2093
|
radio.disabled = this.disabled;
|
|
2077
2094
|
});
|
|
2078
2095
|
}
|
|
2079
2096
|
}
|
|
2080
2097
|
updateRadioButtonNames() {
|
|
2081
2098
|
if (this.radios) {
|
|
2082
|
-
this.radios.forEach(radio => {
|
|
2099
|
+
this.radios.forEach((radio) => {
|
|
2083
2100
|
radio.name = this.name;
|
|
2084
2101
|
});
|
|
2085
2102
|
}
|
|
2086
2103
|
}
|
|
2087
2104
|
updateRadioButtonTabIndexes() {
|
|
2088
2105
|
if (this.radios) {
|
|
2089
|
-
this.radios.forEach(radio => {
|
|
2106
|
+
this.radios.forEach((radio) => {
|
|
2090
2107
|
radio.groupTabIndex = this.tabIndex;
|
|
2091
2108
|
});
|
|
2092
2109
|
}
|
|
@@ -2096,7 +2113,7 @@ class SkyRadioGroupComponent {
|
|
|
2096
2113
|
return;
|
|
2097
2114
|
}
|
|
2098
2115
|
this.radios.forEach((radio) => {
|
|
2099
|
-
radio.checked =
|
|
2116
|
+
radio.checked = this._value === radio.value;
|
|
2100
2117
|
});
|
|
2101
2118
|
}
|
|
2102
2119
|
resetRadioButtons() {
|
|
@@ -2105,13 +2122,13 @@ class SkyRadioGroupComponent {
|
|
|
2105
2122
|
this.updateRadioButtonTabIndexes();
|
|
2106
2123
|
}
|
|
2107
2124
|
}
|
|
2108
|
-
SkyRadioGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2109
|
-
SkyRadioGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2125
|
+
SkyRadioGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioGroupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i4.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2126
|
+
SkyRadioGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyRadioGroupComponent, selector: "sky-radio-group", inputs: { ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel", disabled: "disabled", name: "name", required: "required", value: "value", tabIndex: "tabIndex" }, queries: [{ propertyName: "radios", predicate: SkyRadioComponent, descendants: true }], ngImport: i0, template: "<div\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-required]=\"required ? true : null\"\n [attr.required]=\"required ? '' : null\"\n>\n <ng-content></ng-content>\n</div>\n" });
|
|
2127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioGroupComponent, decorators: [{
|
|
2111
2128
|
type: Component,
|
|
2112
2129
|
args: [{
|
|
2113
2130
|
selector: 'sky-radio-group',
|
|
2114
|
-
templateUrl: './radio-group.component.html'
|
|
2131
|
+
templateUrl: './radio-group.component.html',
|
|
2115
2132
|
}]
|
|
2116
2133
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i4.NgControl, decorators: [{
|
|
2117
2134
|
type: Self
|
|
@@ -2138,37 +2155,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2138
2155
|
|
|
2139
2156
|
class SkyRadioModule {
|
|
2140
2157
|
}
|
|
2141
|
-
SkyRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2142
|
-
SkyRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2158
|
+
SkyRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2159
|
+
SkyRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioModule, declarations: [SkyRadioComponent,
|
|
2143
2160
|
SkyRadioGroupComponent,
|
|
2144
|
-
SkyRadioLabelComponent], imports: [CommonModule,
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
SkyRadioGroupComponent,
|
|
2148
|
-
SkyRadioLabelComponent] });
|
|
2149
|
-
SkyRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyRadioModule, imports: [[
|
|
2150
|
-
CommonModule,
|
|
2151
|
-
FormsModule,
|
|
2152
|
-
SkyIconModule
|
|
2153
|
-
]] });
|
|
2154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyRadioModule, decorators: [{
|
|
2161
|
+
SkyRadioLabelComponent], imports: [CommonModule, FormsModule, SkyIconModule], exports: [SkyRadioComponent, SkyRadioGroupComponent, SkyRadioLabelComponent] });
|
|
2162
|
+
SkyRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioModule, imports: [[CommonModule, FormsModule, SkyIconModule]] });
|
|
2163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyRadioModule, decorators: [{
|
|
2155
2164
|
type: NgModule,
|
|
2156
2165
|
args: [{
|
|
2157
2166
|
declarations: [
|
|
2158
2167
|
SkyRadioComponent,
|
|
2159
2168
|
SkyRadioGroupComponent,
|
|
2160
|
-
SkyRadioLabelComponent
|
|
2169
|
+
SkyRadioLabelComponent,
|
|
2161
2170
|
],
|
|
2162
|
-
imports: [
|
|
2163
|
-
|
|
2164
|
-
FormsModule,
|
|
2165
|
-
SkyIconModule
|
|
2166
|
-
],
|
|
2167
|
-
exports: [
|
|
2168
|
-
SkyRadioComponent,
|
|
2169
|
-
SkyRadioGroupComponent,
|
|
2170
|
-
SkyRadioLabelComponent
|
|
2171
|
-
]
|
|
2171
|
+
imports: [CommonModule, FormsModule, SkyIconModule],
|
|
2172
|
+
exports: [SkyRadioComponent, SkyRadioGroupComponent, SkyRadioLabelComponent],
|
|
2172
2173
|
}]
|
|
2173
2174
|
}] });
|
|
2174
2175
|
|
|
@@ -2210,10 +2211,12 @@ class SkySelectionBoxAdapterService {
|
|
|
2210
2211
|
if (width <= BREAKPOINT_XS_MAX_PIXELS) {
|
|
2211
2212
|
return SkyMediaBreakpoints.xs;
|
|
2212
2213
|
}
|
|
2213
|
-
else if (width >= BREAKPOINT_SM_MIN_PIXELS &&
|
|
2214
|
+
else if (width >= BREAKPOINT_SM_MIN_PIXELS &&
|
|
2215
|
+
width <= BREAKPOINT_SM_MAX_PIXELS) {
|
|
2214
2216
|
return SkyMediaBreakpoints.sm;
|
|
2215
2217
|
}
|
|
2216
|
-
else if (width >= BREAKPOINT_MD_MIN_PIXELS &&
|
|
2218
|
+
else if (width >= BREAKPOINT_MD_MIN_PIXELS &&
|
|
2219
|
+
width <= BREAKPOINT_MD_MAX_PIXELS) {
|
|
2217
2220
|
return SkyMediaBreakpoints.md;
|
|
2218
2221
|
}
|
|
2219
2222
|
else {
|
|
@@ -2238,7 +2241,7 @@ class SkySelectionBoxAdapterService {
|
|
|
2238
2241
|
setChildrenTabIndex(element, tabIndex) {
|
|
2239
2242
|
const el = element.nativeElement;
|
|
2240
2243
|
const focusableElems = this.coreAdapterService.getFocusableChildren(el, {
|
|
2241
|
-
ignoreVisibility: true
|
|
2244
|
+
ignoreVisibility: true,
|
|
2242
2245
|
});
|
|
2243
2246
|
let index = focusableElems.length;
|
|
2244
2247
|
while (index--) {
|
|
@@ -2284,9 +2287,9 @@ class SkySelectionBoxAdapterService {
|
|
|
2284
2287
|
el.tabIndex = tabIndex;
|
|
2285
2288
|
}
|
|
2286
2289
|
}
|
|
2287
|
-
SkySelectionBoxAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2288
|
-
SkySelectionBoxAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
2289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2290
|
+
SkySelectionBoxAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxAdapterService, deps: [{ token: i2$2.SkyCoreAdapterService }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2291
|
+
SkySelectionBoxAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxAdapterService });
|
|
2292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxAdapterService, decorators: [{
|
|
2290
2293
|
type: Injectable
|
|
2291
2294
|
}], ctorParameters: function () { return [{ type: i2$2.SkyCoreAdapterService }, { type: i0.RendererFactory2 }]; } });
|
|
2292
2295
|
|
|
@@ -2295,13 +2298,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2295
2298
|
*/
|
|
2296
2299
|
class SkySelectionBoxDescriptionComponent {
|
|
2297
2300
|
}
|
|
2298
|
-
SkySelectionBoxDescriptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2299
|
-
SkySelectionBoxDescriptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2301
|
+
SkySelectionBoxDescriptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2302
|
+
SkySelectionBoxDescriptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxDescriptionComponent, selector: "sky-selection-box-description", ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
2303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxDescriptionComponent, decorators: [{
|
|
2301
2304
|
type: Component,
|
|
2302
2305
|
args: [{
|
|
2303
2306
|
selector: 'sky-selection-box-description',
|
|
2304
|
-
templateUrl: './selection-box-description.component.html'
|
|
2307
|
+
templateUrl: './selection-box-description.component.html',
|
|
2305
2308
|
}]
|
|
2306
2309
|
}] });
|
|
2307
2310
|
|
|
@@ -2310,13 +2313,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2310
2313
|
*/
|
|
2311
2314
|
class SkySelectionBoxHeaderComponent {
|
|
2312
2315
|
}
|
|
2313
|
-
SkySelectionBoxHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2314
|
-
SkySelectionBoxHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2316
|
+
SkySelectionBoxHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2317
|
+
SkySelectionBoxHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySelectionBoxHeaderComponent, selector: "sky-selection-box-header", ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
2318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxHeaderComponent, decorators: [{
|
|
2316
2319
|
type: Component,
|
|
2317
2320
|
args: [{
|
|
2318
2321
|
selector: 'sky-selection-box-header',
|
|
2319
|
-
templateUrl: './selection-box-header.component.html'
|
|
2322
|
+
templateUrl: './selection-box-header.component.html',
|
|
2320
2323
|
}]
|
|
2321
2324
|
}] });
|
|
2322
2325
|
|
|
@@ -2379,27 +2382,29 @@ class SkySelectionBoxComponent {
|
|
|
2379
2382
|
}
|
|
2380
2383
|
updateCheckedOnControlChange() {
|
|
2381
2384
|
this.control.checkedChange
|
|
2382
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2385
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2386
|
+
.subscribe((value) => {
|
|
2383
2387
|
this.checked = value;
|
|
2384
2388
|
});
|
|
2385
2389
|
}
|
|
2386
2390
|
updateDisabledState() {
|
|
2387
2391
|
this.control.disabledChange
|
|
2388
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2392
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2393
|
+
.subscribe((value) => {
|
|
2389
2394
|
this.disabled = value;
|
|
2390
2395
|
});
|
|
2391
2396
|
}
|
|
2392
2397
|
}
|
|
2393
|
-
SkySelectionBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2394
|
-
SkySelectionBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2398
|
+
SkySelectionBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySelectionBoxAdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2399
|
+
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: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxComponent, decorators: [{
|
|
2396
2401
|
type: Component,
|
|
2397
2402
|
args: [{
|
|
2398
2403
|
selector: 'sky-selection-box',
|
|
2399
2404
|
styleUrls: ['./selection-box.component.scss'],
|
|
2400
2405
|
templateUrl: './selection-box.component.html',
|
|
2401
2406
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2402
|
-
encapsulation: ViewEncapsulation.None
|
|
2407
|
+
encapsulation: ViewEncapsulation.None,
|
|
2403
2408
|
}]
|
|
2404
2409
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkySelectionBoxAdapterService }]; }, propDecorators: { control: [{
|
|
2405
2410
|
type: Input
|
|
@@ -2407,13 +2412,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2407
2412
|
type: ViewChild,
|
|
2408
2413
|
args: ['control', {
|
|
2409
2414
|
read: ElementRef,
|
|
2410
|
-
static: false
|
|
2415
|
+
static: false,
|
|
2411
2416
|
}]
|
|
2412
2417
|
}], selectionBoxEl: [{
|
|
2413
2418
|
type: ViewChild,
|
|
2414
2419
|
args: ['selectionBox', {
|
|
2415
2420
|
read: ElementRef,
|
|
2416
|
-
static: false
|
|
2421
|
+
static: false,
|
|
2417
2422
|
}]
|
|
2418
2423
|
}] } });
|
|
2419
2424
|
|
|
@@ -2486,7 +2491,7 @@ class SkySelectionBoxGridComponent {
|
|
|
2486
2491
|
});
|
|
2487
2492
|
this.mutationObserver.observe(el, {
|
|
2488
2493
|
characterData: true,
|
|
2489
|
-
subtree: true
|
|
2494
|
+
subtree: true,
|
|
2490
2495
|
});
|
|
2491
2496
|
});
|
|
2492
2497
|
}
|
|
@@ -2500,38 +2505,37 @@ class SkySelectionBoxGridComponent {
|
|
|
2500
2505
|
}
|
|
2501
2506
|
updateBreakpointClass() {
|
|
2502
2507
|
const parentWidth = this.selectionBoxAdapter.getParentWidth(this.hostElRef);
|
|
2503
|
-
this.currentBreakpoint =
|
|
2508
|
+
this.currentBreakpoint =
|
|
2509
|
+
this.selectionBoxAdapter.getBreakpointForWidth(parentWidth);
|
|
2504
2510
|
}
|
|
2505
2511
|
updateChildrenHeights() {
|
|
2506
2512
|
this.coreAdapterService.resetHeight(this.elementRef, SKY_SELECTION_BOX_CLASS_NAME);
|
|
2507
2513
|
this.coreAdapterService.syncMaxHeight(this.elementRef, SKY_SELECTION_BOX_CLASS_NAME);
|
|
2508
2514
|
}
|
|
2509
2515
|
}
|
|
2510
|
-
SkySelectionBoxGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2511
|
-
SkySelectionBoxGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2516
|
+
SkySelectionBoxGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxGridComponent, deps: [{ token: i1$1.SkyThemeService }, { token: i2$2.SkyCoreAdapterService }, { token: SkySelectionBoxAdapterService }, { token: i0.ElementRef }, { token: i2$2.MutationObserverService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2517
|
+
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: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxGridComponent, decorators: [{
|
|
2513
2519
|
type: Component,
|
|
2514
2520
|
args: [{
|
|
2515
2521
|
selector: 'sky-selection-box-grid',
|
|
2516
2522
|
templateUrl: './selection-box-grid.component.html',
|
|
2517
|
-
styleUrls: [
|
|
2518
|
-
'./selection-box-grid.component.scss'
|
|
2519
|
-
],
|
|
2523
|
+
styleUrls: ['./selection-box-grid.component.scss'],
|
|
2520
2524
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2521
|
-
encapsulation: ViewEncapsulation.None
|
|
2525
|
+
encapsulation: ViewEncapsulation.None,
|
|
2522
2526
|
}]
|
|
2523
2527
|
}], ctorParameters: function () { return [{ type: i1$1.SkyThemeService }, { type: i2$2.SkyCoreAdapterService }, { type: SkySelectionBoxAdapterService }, { type: i0.ElementRef }, { type: i2$2.MutationObserverService }, { type: i0.NgZone }]; }, propDecorators: { alignItems: [{
|
|
2524
2528
|
type: Input
|
|
2525
2529
|
}], selectionBoxes: [{
|
|
2526
2530
|
type: ContentChildren,
|
|
2527
2531
|
args: [SkySelectionBoxComponent, {
|
|
2528
|
-
read: SkySelectionBoxComponent
|
|
2532
|
+
read: SkySelectionBoxComponent,
|
|
2529
2533
|
}]
|
|
2530
2534
|
}], elementRef: [{
|
|
2531
2535
|
type: ViewChild,
|
|
2532
2536
|
args: ['container', {
|
|
2533
2537
|
read: ElementRef,
|
|
2534
|
-
static: true
|
|
2538
|
+
static: true,
|
|
2535
2539
|
}]
|
|
2536
2540
|
}], onWindowResize: [{
|
|
2537
2541
|
type: HostListener,
|
|
@@ -2540,43 +2544,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2540
2544
|
|
|
2541
2545
|
class SkySelectionBoxModule {
|
|
2542
2546
|
}
|
|
2543
|
-
SkySelectionBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2544
|
-
SkySelectionBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2547
|
+
SkySelectionBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2548
|
+
SkySelectionBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, declarations: [SkySelectionBoxGridComponent,
|
|
2545
2549
|
SkySelectionBoxComponent,
|
|
2546
2550
|
SkySelectionBoxDescriptionComponent,
|
|
2547
|
-
SkySelectionBoxHeaderComponent], imports: [CommonModule,
|
|
2548
|
-
SkyThemeModule], exports: [SkySelectionBoxGridComponent,
|
|
2551
|
+
SkySelectionBoxHeaderComponent], imports: [CommonModule, SkyThemeModule], exports: [SkySelectionBoxGridComponent,
|
|
2549
2552
|
SkySelectionBoxComponent,
|
|
2550
2553
|
SkySelectionBoxDescriptionComponent,
|
|
2551
2554
|
SkySelectionBoxHeaderComponent] });
|
|
2552
|
-
SkySelectionBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
2553
|
-
|
|
2554
|
-
], imports: [[
|
|
2555
|
-
CommonModule,
|
|
2556
|
-
SkyThemeModule
|
|
2557
|
-
]] });
|
|
2558
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkySelectionBoxModule, decorators: [{
|
|
2555
|
+
SkySelectionBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, providers: [SkySelectionBoxAdapterService], imports: [[CommonModule, SkyThemeModule]] });
|
|
2556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkySelectionBoxModule, decorators: [{
|
|
2559
2557
|
type: NgModule,
|
|
2560
2558
|
args: [{
|
|
2561
2559
|
declarations: [
|
|
2562
2560
|
SkySelectionBoxGridComponent,
|
|
2563
2561
|
SkySelectionBoxComponent,
|
|
2564
2562
|
SkySelectionBoxDescriptionComponent,
|
|
2565
|
-
SkySelectionBoxHeaderComponent
|
|
2566
|
-
],
|
|
2567
|
-
imports: [
|
|
2568
|
-
CommonModule,
|
|
2569
|
-
SkyThemeModule
|
|
2563
|
+
SkySelectionBoxHeaderComponent,
|
|
2570
2564
|
],
|
|
2565
|
+
imports: [CommonModule, SkyThemeModule],
|
|
2571
2566
|
exports: [
|
|
2572
2567
|
SkySelectionBoxGridComponent,
|
|
2573
2568
|
SkySelectionBoxComponent,
|
|
2574
2569
|
SkySelectionBoxDescriptionComponent,
|
|
2575
|
-
SkySelectionBoxHeaderComponent
|
|
2570
|
+
SkySelectionBoxHeaderComponent,
|
|
2576
2571
|
],
|
|
2577
|
-
providers: [
|
|
2578
|
-
SkySelectionBoxAdapterService
|
|
2579
|
-
]
|
|
2572
|
+
providers: [SkySelectionBoxAdapterService],
|
|
2580
2573
|
}]
|
|
2581
2574
|
}] });
|
|
2582
2575
|
|
|
@@ -2585,14 +2578,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2585
2578
|
*/
|
|
2586
2579
|
class SkyToggleSwitchLabelComponent {
|
|
2587
2580
|
}
|
|
2588
|
-
SkyToggleSwitchLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2589
|
-
SkyToggleSwitchLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2581
|
+
SkyToggleSwitchLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2582
|
+
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 });
|
|
2583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchLabelComponent, decorators: [{
|
|
2591
2584
|
type: Component,
|
|
2592
2585
|
args: [{
|
|
2593
2586
|
selector: 'sky-toggle-switch-label',
|
|
2594
2587
|
templateUrl: './toggle-switch-label.component.html',
|
|
2595
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2588
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2596
2589
|
}]
|
|
2597
2590
|
}] });
|
|
2598
2591
|
|
|
@@ -2600,12 +2593,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2600
2593
|
const SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR = {
|
|
2601
2594
|
provide: NG_VALUE_ACCESSOR,
|
|
2602
2595
|
useExisting: forwardRef(() => SkyToggleSwitchComponent),
|
|
2603
|
-
multi: true
|
|
2596
|
+
multi: true,
|
|
2604
2597
|
};
|
|
2605
2598
|
const SKY_TOGGLE_SWITCH_VALIDATOR = {
|
|
2606
2599
|
provide: NG_VALIDATORS,
|
|
2607
2600
|
useExisting: forwardRef(() => SkyToggleSwitchComponent),
|
|
2608
|
-
multi: true
|
|
2601
|
+
multi: true,
|
|
2609
2602
|
};
|
|
2610
2603
|
// tslint:enable
|
|
2611
2604
|
let uniqueId = 0;
|
|
@@ -2708,19 +2701,19 @@ class SkyToggleSwitchComponent {
|
|
|
2708
2701
|
emitChangeEvent() {
|
|
2709
2702
|
this.onChange(this._checked);
|
|
2710
2703
|
this.toggleChange.emit({
|
|
2711
|
-
checked: this._checked
|
|
2704
|
+
checked: this._checked,
|
|
2712
2705
|
});
|
|
2713
2706
|
}
|
|
2714
2707
|
toggleChecked() {
|
|
2715
2708
|
this.checked = !this.checked;
|
|
2716
2709
|
}
|
|
2717
2710
|
}
|
|
2718
|
-
SkyToggleSwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2719
|
-
SkyToggleSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2711
|
+
SkyToggleSwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2712
|
+
SkyToggleSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyToggleSwitchComponent, selector: "sky-toggle-switch", inputs: { ariaLabel: "ariaLabel", checked: "checked", disabled: "disabled", tabIndex: "tabIndex" }, outputs: { toggleChange: "toggleChange" }, providers: [
|
|
2720
2713
|
SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,
|
|
2721
|
-
SKY_TOGGLE_SWITCH_VALIDATOR
|
|
2722
|
-
], queries: [{ propertyName: "labelComponents", predicate: SkyToggleSwitchLabelComponent }], ngImport: i0, template: "<span
|
|
2723
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2714
|
+
SKY_TOGGLE_SWITCH_VALIDATOR,
|
|
2715
|
+
], queries: [{ propertyName: "labelComponents", predicate: SkyToggleSwitchLabelComponent }], ngImport: i0, template: "<span class=\"sky-toggle-switch\">\n <button\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"hasLabelComponent ? labelElementId : null\"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-toggle-switch-checked': checked,\n 'sky-toggle-switch-disabled': disabled\n }\"\n [tabIndex]=\"tabIndex\"\n (blur)=\"onButtonBlur()\"\n (click)=\"onButtonClick($event)\"\n >\n <i\n aria-hidden=\"true\"\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n role=\"presentation\"\n > </i\n >\n <!-- Non-breaking space needed to align switch to baseline! -->\n </button>\n\n <label\n *ngIf=\"hasLabelComponent\"\n class=\"sky-toggle-switch-label\"\n [attr.id]=\"labelElementId\"\n >\n <ng-container *ngTemplateOutlet=\"labelContent\"> </ng-container>\n </label>\n</span>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-toggle-switch-label\"></ng-content>\n</ng-template>\n", styles: [".sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch-button{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:1 0 46px;line-height:1.428571429}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){border-color:#00b4f1;border-width:2px;padding:0;cursor:pointer}.sky-toggle-switch-button.sky-toggle-switch-checked{background-color:#c1e8fb;border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.sky-toggle-switch-button+.sky-toggle-switch-label{margin-left:10px;flex:1 0 auto}.sky-toggle-switch-indicator{height:22px;width:22px;display:block;position:relative;top:0;left:22px;margin-left:-22px;border-radius:100%;box-shadow:0 1px 2px #000000bf;background-color:#fff}.sky-toggle-switch-indicator.sky-toggle-switch-transition{transition:left .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button{background-color:#fff;border-width:1px;flex-basis:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled{border-color:#d2d2d2;cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled,:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-checked{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked{background-color:#c1e8fb;border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus{outline:none;border:solid 2px #1870B8;padding:0}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus{box-shadow:0 1px 8px #0000004d}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus){padding:1px;border:solid 1px #1870B8}:host-context(.sky-theme-modern) .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}.sky-theme-modern .sky-toggle-switch-button{background-color:#fff;border-width:1px;flex-basis:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled{border-color:#d2d2d2;cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled,.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#ededee}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-checked{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked{background-color:#c1e8fb;border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus){padding:1px;border:solid 1px #1870B8}.sky-theme-modern .sky-toggle-switch-indicator{box-shadow:0 1px 2px #00000080}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-toggle-switch-button{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-toggle-switch-button{background-color:#121212}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2716
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchComponent, decorators: [{
|
|
2724
2717
|
type: Component,
|
|
2725
2718
|
args: [{
|
|
2726
2719
|
selector: 'sky-toggle-switch',
|
|
@@ -2728,9 +2721,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2728
2721
|
styleUrls: ['./toggle-switch.component.scss'],
|
|
2729
2722
|
providers: [
|
|
2730
2723
|
SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,
|
|
2731
|
-
SKY_TOGGLE_SWITCH_VALIDATOR
|
|
2724
|
+
SKY_TOGGLE_SWITCH_VALIDATOR,
|
|
2732
2725
|
],
|
|
2733
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2726
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2734
2727
|
}]
|
|
2735
2728
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { ariaLabel: [{
|
|
2736
2729
|
type: Input
|
|
@@ -2749,30 +2742,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
2749
2742
|
|
|
2750
2743
|
class SkyToggleSwitchModule {
|
|
2751
2744
|
}
|
|
2752
|
-
SkyToggleSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2753
|
-
SkyToggleSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
SkyToggleSwitchComponent] });
|
|
2757
|
-
SkyToggleSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyToggleSwitchModule, imports: [[
|
|
2758
|
-
CommonModule,
|
|
2759
|
-
FormsModule
|
|
2760
|
-
]] });
|
|
2761
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyToggleSwitchModule, decorators: [{
|
|
2745
|
+
SkyToggleSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2746
|
+
SkyToggleSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchModule, declarations: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent], imports: [CommonModule, FormsModule], exports: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent] });
|
|
2747
|
+
SkyToggleSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchModule, imports: [[CommonModule, FormsModule]] });
|
|
2748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyToggleSwitchModule, decorators: [{
|
|
2762
2749
|
type: NgModule,
|
|
2763
2750
|
args: [{
|
|
2764
|
-
declarations: [
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
],
|
|
2768
|
-
imports: [
|
|
2769
|
-
CommonModule,
|
|
2770
|
-
FormsModule
|
|
2771
|
-
],
|
|
2772
|
-
exports: [
|
|
2773
|
-
SkyToggleSwitchLabelComponent,
|
|
2774
|
-
SkyToggleSwitchComponent
|
|
2775
|
-
]
|
|
2751
|
+
declarations: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent],
|
|
2752
|
+
imports: [CommonModule, FormsModule],
|
|
2753
|
+
exports: [SkyToggleSwitchLabelComponent, SkyToggleSwitchComponent],
|
|
2776
2754
|
}]
|
|
2777
2755
|
}] });
|
|
2778
2756
|
|