@skyux/forms 11.0.0-alpha.7 → 11.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation.json +3695 -4176
- package/esm2022/index.mjs +14 -11
- package/esm2022/lib/modules/checkbox/checkbox.component.mjs +19 -25
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment-change.mjs +2 -0
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment-click.mjs +2 -0
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment-label.component.mjs +32 -0
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment.component.mjs +485 -0
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment.module.mjs +24 -0
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment.service.mjs +103 -0
- package/esm2022/lib/modules/file-attachment/file-attachments.module.mjs +10 -73
- package/esm2022/lib/modules/file-attachment/file-drop/file-drop-change.mjs +2 -0
- package/esm2022/lib/modules/file-attachment/file-drop/file-drop.component.mjs +336 -0
- package/esm2022/lib/modules/file-attachment/file-drop/file-drop.module.mjs +18 -0
- package/esm2022/lib/modules/file-attachment/file-drop/file-item.component.mjs +163 -0
- package/esm2022/lib/modules/file-attachment/file-drop/file-link.mjs +2 -0
- package/esm2022/lib/modules/file-attachment/shared/file-item-error-type.mjs +2 -0
- package/esm2022/lib/modules/file-attachment/shared/file-item.mjs +2 -0
- package/esm2022/lib/modules/file-attachment/shared/file-item.service.mjs +71 -0
- package/esm2022/lib/modules/file-attachment/shared/file-size.pipe.mjs +61 -0
- package/esm2022/lib/modules/file-attachment/shared/file-validate-function.mjs +2 -0
- package/esm2022/lib/modules/input-box/input-box.component.mjs +18 -23
- package/esm2022/lib/modules/radio/radio-group.component.mjs +25 -34
- package/esm2022/lib/modules/radio/radio.component.mjs +15 -22
- package/esm2022/lib/modules/shared/form-field-label-text-required.directive.mjs +37 -0
- package/esm2022/lib/modules/shared/form-field-label-text-required.service.mjs +6 -4
- package/esm2022/lib/modules/toggle-switch/toggle-switch.component.mjs +14 -21
- package/fesm2022/skyux-forms.mjs +279 -284
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/index.d.ts +21 -18
- package/lib/modules/checkbox/checkbox.component.d.ts +4 -5
- package/lib/modules/file-attachment/{types → file-attachment}/file-attachment-change.d.ts +1 -1
- package/lib/modules/file-attachment/{types → file-attachment}/file-attachment-click.d.ts +1 -1
- package/lib/modules/file-attachment/{file-attachment-label.component.d.ts → file-attachment/file-attachment-label.component.d.ts} +7 -5
- package/lib/modules/file-attachment/{file-attachment.component.d.ts → file-attachment/file-attachment.component.d.ts} +11 -9
- package/lib/modules/file-attachment/file-attachment/file-attachment.module.d.ts +9 -0
- package/lib/modules/file-attachment/{file-attachment.service.d.ts → file-attachment/file-attachment.service.d.ts} +2 -2
- package/lib/modules/file-attachment/file-attachments.module.d.ts +6 -15
- package/lib/modules/file-attachment/{types → file-drop}/file-drop-change.d.ts +1 -1
- package/lib/modules/file-attachment/{file-drop.component.d.ts → file-drop/file-drop.component.d.ts} +7 -8
- package/lib/modules/file-attachment/file-drop/file-drop.module.d.ts +9 -0
- package/lib/modules/file-attachment/{file-item.component.d.ts → file-drop/file-item.component.d.ts} +3 -3
- package/lib/modules/file-attachment/{file-size.pipe.d.ts → shared/file-size.pipe.d.ts} +2 -3
- package/lib/modules/input-box/input-box.component.d.ts +2 -3
- package/lib/modules/radio/radio-group.component.d.ts +7 -7
- package/lib/modules/radio/radio.component.d.ts +4 -5
- package/lib/modules/shared/form-field-label-text-required.directive.d.ts +14 -0
- package/lib/modules/shared/form-field-label-text-required.service.d.ts +2 -1
- package/lib/modules/toggle-switch/toggle-switch.component.d.ts +4 -5
- package/package.json +9 -9
- package/esm2022/lib/modules/file-attachment/file-attachment-label.component.mjs +0 -28
- package/esm2022/lib/modules/file-attachment/file-attachment.component.mjs +0 -471
- package/esm2022/lib/modules/file-attachment/file-attachment.service.mjs +0 -103
- package/esm2022/lib/modules/file-attachment/file-drop.component.mjs +0 -328
- package/esm2022/lib/modules/file-attachment/file-item-error-type.mjs +0 -2
- package/esm2022/lib/modules/file-attachment/file-item.component.mjs +0 -155
- package/esm2022/lib/modules/file-attachment/file-item.mjs +0 -2
- package/esm2022/lib/modules/file-attachment/file-item.service.mjs +0 -70
- package/esm2022/lib/modules/file-attachment/file-link.mjs +0 -2
- package/esm2022/lib/modules/file-attachment/file-size.pipe.mjs +0 -61
- package/esm2022/lib/modules/file-attachment/file-validate-function.mjs +0 -2
- package/esm2022/lib/modules/file-attachment/types/file-attachment-change.mjs +0 -2
- package/esm2022/lib/modules/file-attachment/types/file-attachment-click.mjs +0 -2
- package/esm2022/lib/modules/file-attachment/types/file-drop-change.mjs +0 -2
- /package/lib/modules/file-attachment/{file-link.d.ts → file-drop/file-link.d.ts} +0 -0
- /package/lib/modules/file-attachment/{file-item-error-type.d.ts → shared/file-item-error-type.d.ts} +0 -0
- /package/lib/modules/file-attachment/{file-item.d.ts → shared/file-item.d.ts} +0 -0
- /package/lib/modules/file-attachment/{file-item.service.d.ts → shared/file-item.service.d.ts} +0 -0
- /package/lib/modules/file-attachment/{file-validate-function.d.ts → shared/file-validate-function.d.ts} +0 -0
package/fesm2022/skyux-forms.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { CommonModule,
|
|
1
|
+
import * as i2 from '@angular/common';
|
|
2
|
+
import { CommonModule, formatNumber } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { NgModule, Pipe, Component, ChangeDetectionStrategy, Input, Directive, InjectionToken, inject, HostBinding, numberAttribute, booleanAttribute, Injectable,
|
|
5
|
-
import * as
|
|
4
|
+
import { NgModule, Pipe, Component, ChangeDetectionStrategy, Input, Directive, InjectionToken, inject, HostBinding, numberAttribute, booleanAttribute, Injectable, ChangeDetectorRef, EventEmitter, ElementRef, Output, ViewChild, Self, Optional, ContentChildren, RendererFactory2, Renderer2, input, ViewEncapsulation, ContentChild, forwardRef, HostListener } from '@angular/core';
|
|
5
|
+
import * as i3$1 from '@angular/forms';
|
|
6
6
|
import { NG_VALIDATORS, FormsModule, ReactiveFormsModule, Validators, NG_VALUE_ACCESSOR, FormControlDirective, FormControlName, NgModel, NgControl } from '@angular/forms';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i3 from '@skyux/i18n';
|
|
8
8
|
import { SkyLibResourcesService, getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
9
|
-
import * as i1$
|
|
10
|
-
import { SkyIdModule, SkyIdService, SkyLogService, SkyTrimModule, SkyLiveAnnouncerService,
|
|
11
|
-
import * as
|
|
9
|
+
import * as i1$1 from '@skyux/core';
|
|
10
|
+
import { SkyIdModule, SkyIdService, SkyLogService, SkyTrimModule, SkyLiveAnnouncerService, SkyContentInfoProvider, SkyMediaBreakpoints } from '@skyux/core';
|
|
11
|
+
import * as i5 from '@skyux/help-inline';
|
|
12
12
|
import { SkyHelpInlineModule } from '@skyux/help-inline';
|
|
13
|
-
import * as
|
|
13
|
+
import * as i6 from '@skyux/icon';
|
|
14
14
|
import { SkyIconModule } from '@skyux/icon';
|
|
15
|
-
import * as i1
|
|
15
|
+
import * as i1 from '@skyux/indicators';
|
|
16
16
|
import { SkyStatusIndicatorModule } from '@skyux/indicators';
|
|
17
17
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
18
|
-
import * as i4
|
|
18
|
+
import * as i4 from '@skyux/theme';
|
|
19
19
|
import { SkyThemeComponentClassDirective, SkyThemeModule } from '@skyux/theme';
|
|
20
20
|
import { BehaviorSubject, Subject, ReplaySubject } from 'rxjs';
|
|
21
21
|
import { takeUntil, take } from 'rxjs/operators';
|
|
@@ -248,7 +248,7 @@ class SkyCharacterCounterIndicatorComponent {
|
|
|
248
248
|
this.#changeDetector.markForCheck();
|
|
249
249
|
}
|
|
250
250
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
251
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", inputs: { characterCount: "characterCount", characterCountLimit: "characterCountLimit" }, 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 <ng-container\n *ngIf=\"characterCount > characterCountLimit; else screenReaderCountMessage\"\n >{{ 'skyux_character_count_over_limit' | skyLibResources }}</ng-container\n >\n <ng-template #screenReaderCountMessage>\n <ng-container\n *ngIf=\"\n characterCount\n | skyCharacterCounterScreenReader\n : characterCountLimit as screenReaderCount\n \"\n >{{\n 'skyux_character_count_message'\n | skyLibResources: screenReaderCount : characterCountLimit\n }}</ng-container\n >\n </ng-template>\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"], dependencies: [{ kind: "directive", type:
|
|
251
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", inputs: { characterCount: "characterCount", characterCountLimit: "characterCountLimit" }, 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 <ng-container\n *ngIf=\"characterCount > characterCountLimit; else screenReaderCountMessage\"\n >{{ 'skyux_character_count_over_limit' | skyLibResources }}</ng-container\n >\n <ng-template #screenReaderCountMessage>\n <ng-container\n *ngIf=\"\n characterCount\n | skyCharacterCounterScreenReader\n : characterCountLimit as screenReaderCount\n \"\n >{{\n 'skyux_character_count_message'\n | skyLibResources: screenReaderCount : characterCountLimit\n }}</ng-container\n >\n </ng-template>\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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SkyCharacterCounterScreenReaderPipe, name: "skyCharacterCounterScreenReader" }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
252
252
|
}
|
|
253
253
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCharacterCounterIndicatorComponent, decorators: [{
|
|
254
254
|
type: Component,
|
|
@@ -417,7 +417,7 @@ class SkyFormErrorComponent {
|
|
|
417
417
|
>
|
|
418
418
|
{{ errorText }}
|
|
419
419
|
</sky-status-indicator>
|
|
420
|
-
`, isInline: true, styles: [":host{display:block;margin-top:var(--sky-margin-stacked-xs)}\n"], dependencies: [{ kind: "ngmodule", type: SkyStatusIndicatorModule }, { kind: "component", type: i1
|
|
420
|
+
`, isInline: true, styles: [":host{display:block;margin-top:var(--sky-margin-stacked-xs)}\n"], dependencies: [{ kind: "ngmodule", type: SkyStatusIndicatorModule }, { kind: "component", type: i1.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
421
421
|
}
|
|
422
422
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFormErrorComponent, decorators: [{
|
|
423
423
|
type: Component,
|
|
@@ -467,7 +467,7 @@ class SkyFormErrorsComponent {
|
|
|
467
467
|
this.ariaRelevant = 'all';
|
|
468
468
|
}
|
|
469
469
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
470
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFormErrorsComponent, isStandalone: true, selector: "sky-form-errors", inputs: { errors: "errors", labelText: "labelText", showErrors: ["showErrors", "showErrors", coerceBooleanProperty] }, host: { properties: { "attr.aria-atomic": "this.ariaAtomic", "attr.aria-live": "this.ariaLive", "attr.aria-relevant": "this.ariaRelevant" } }, ngImport: i0, template: "<ng-container *ngIf=\"labelText && showErrors\">\n <ng-container *ngIf=\"errors\">\n <sky-form-error\n *ngIf=\"errors['required']\"\n errorName=\"required\"\n [errorText]=\"'skyux_form_error_required' | skyLibResources: labelText\"\n />\n\n <sky-form-error\n *ngIf=\"errors['maxlength'] as maxLengthError\"\n errorName=\"maxlength\"\n [errorText]=\"\n 'skyux_form_error_maxlength'\n | skyLibResources: labelText : maxLengthError.requiredLength\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['minlength'] as minLengthError\"\n errorName=\"minlength\"\n [errorText]=\"\n 'skyux_form_error_minlength'\n | skyLibResources: labelText : minLengthError.requiredLength\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyDate'] && errors['skyDate']['invalid']\"\n errorName=\"invalidDate\"\n [errorText]=\"'skyux_form_error_date' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyDate'] && errors['skyDate']['minDate']\"\n errorName=\"minDate\"\n [errorText]=\"'skyux_form_error_date_min' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyDate'] && errors['skyDate']['maxDate']\"\n errorName=\"maxDate\"\n [errorText]=\"'skyux_form_error_date_max' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['futureDisabled']\"\n errorName=\"fuzzyFutureDisabled\"\n [errorText]=\"\n 'skyux_form_error_fuzzy_date_future_disabled' | skyLibResources\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['invalid']\"\n errorName=\"fuzzyInvalidDate\"\n [errorText]=\"'skyux_form_error_fuzzy_date_invalid' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['maxDate']\"\n errorName=\"fuzzyMaxDate\"\n [errorText]=\"'skyux_form_error_fuzzy_date_max_date' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['minDate']\"\n errorName=\"fuzzyMinDate\"\n [errorText]=\"'skyux_form_error_fuzzy_date_min_date' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['yearRequired']\"\n errorName=\"fuzzyYearRequired\"\n [errorText]=\"\n 'skyux_form_error_fuzzy_date_year_required' | skyLibResources\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyEmail']\"\n errorName=\"email\"\n [errorText]=\"'skyux_form_error_email' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyPhoneField']\"\n errorName=\"phone\"\n [errorText]=\"'skyux_form_error_phone' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyTime']\"\n errorName=\"time\"\n [errorText]=\"'skyux_form_error_time' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyUrl']\"\n errorName=\"url\"\n [errorText]=\"'skyux_form_error_url' | skyLibResources\"\n />\n </ng-container>\n <ng-content />\n</ng-container>\n", styles: [":host,sky-status-indicator{display:block;line-height:normal}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
470
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFormErrorsComponent, isStandalone: true, selector: "sky-form-errors", inputs: { errors: "errors", labelText: "labelText", showErrors: ["showErrors", "showErrors", coerceBooleanProperty] }, host: { properties: { "attr.aria-atomic": "this.ariaAtomic", "attr.aria-live": "this.ariaLive", "attr.aria-relevant": "this.ariaRelevant" } }, ngImport: i0, template: "<ng-container *ngIf=\"labelText && showErrors\">\n <ng-container *ngIf=\"errors\">\n <sky-form-error\n *ngIf=\"errors['required']\"\n errorName=\"required\"\n [errorText]=\"'skyux_form_error_required' | skyLibResources: labelText\"\n />\n\n <sky-form-error\n *ngIf=\"errors['maxlength'] as maxLengthError\"\n errorName=\"maxlength\"\n [errorText]=\"\n 'skyux_form_error_maxlength'\n | skyLibResources: labelText : maxLengthError.requiredLength\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['minlength'] as minLengthError\"\n errorName=\"minlength\"\n [errorText]=\"\n 'skyux_form_error_minlength'\n | skyLibResources: labelText : minLengthError.requiredLength\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyDate'] && errors['skyDate']['invalid']\"\n errorName=\"invalidDate\"\n [errorText]=\"'skyux_form_error_date' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyDate'] && errors['skyDate']['minDate']\"\n errorName=\"minDate\"\n [errorText]=\"'skyux_form_error_date_min' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyDate'] && errors['skyDate']['maxDate']\"\n errorName=\"maxDate\"\n [errorText]=\"'skyux_form_error_date_max' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['futureDisabled']\"\n errorName=\"fuzzyFutureDisabled\"\n [errorText]=\"\n 'skyux_form_error_fuzzy_date_future_disabled' | skyLibResources\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['invalid']\"\n errorName=\"fuzzyInvalidDate\"\n [errorText]=\"'skyux_form_error_fuzzy_date_invalid' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['maxDate']\"\n errorName=\"fuzzyMaxDate\"\n [errorText]=\"'skyux_form_error_fuzzy_date_max_date' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['minDate']\"\n errorName=\"fuzzyMinDate\"\n [errorText]=\"'skyux_form_error_fuzzy_date_min_date' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyFuzzyDate'] && errors['skyFuzzyDate']['yearRequired']\"\n errorName=\"fuzzyYearRequired\"\n [errorText]=\"\n 'skyux_form_error_fuzzy_date_year_required' | skyLibResources\n \"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyEmail']\"\n errorName=\"email\"\n [errorText]=\"'skyux_form_error_email' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyPhoneField']\"\n errorName=\"phone\"\n [errorText]=\"'skyux_form_error_phone' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyTime']\"\n errorName=\"time\"\n [errorText]=\"'skyux_form_error_time' | skyLibResources\"\n />\n\n <sky-form-error\n *ngIf=\"errors['skyUrl']\"\n errorName=\"url\"\n [errorText]=\"'skyux_form_error_url' | skyLibResources\"\n />\n </ng-container>\n <ng-content />\n</ng-container>\n", styles: [":host,sky-status-indicator{display:block;line-height:normal}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "component", type: SkyFormErrorComponent, selector: "sky-form-error", inputs: ["errorName", "errorText"] }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
471
471
|
}
|
|
472
472
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFormErrorsComponent, decorators: [{
|
|
473
473
|
type: Component,
|
|
@@ -598,7 +598,7 @@ class SkyCheckboxGroupComponent {
|
|
|
598
598
|
multi: true,
|
|
599
599
|
},
|
|
600
600
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
601
|
-
], ngImport: i0, template: "<fieldset\n class=\"sky-checkbox-group\"\n [attr.aria-invalid]=\"!!formGroup?.errors\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-errormessage]=\"\n headingText && formGroup?.errors ? errorId : undefined\n \"\n>\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-xs': !!hintText,\n 'sky-margin-stacked-sm': !hintText\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >\n <span *ngIf=\"!headingLevel\" [class]=\"'sky-heading-text ' + headingClass\">\n {{ headingText }}\n </span>\n <h3 *ngIf=\"headingLevel === 3\" [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n <h4 *ngIf=\"headingLevel === 4\" [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n <h5 *ngIf=\"headingLevel === 5\" [class]=\"headingClass\">\n {{ headingText }}\n </h5> </span\n ><span class=\"sky-screen-reader-only\" *ngIf=\"required\">{{\n 'skyux_checkbox_group_required' | skyLibResources\n }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </legend>\n <div\n skyId\n [ngClass]=\"{\n 'sky-font-deemphasized sky-margin-stacked-lg sky-checkbox-group-hint-text':\n !!hintText\n }\"\n #hintTextEl=\"skyId\"\n >\n {{ hintText }}\n </div>\n <span class=\"sky-checkbox-group-inline sky-switch-icon-group\">\n <ng-content select=\"sky-checkbox[icon]\" />\n </span>\n <span class=\"sky-checkbox-group-stacked\">\n <ng-content select=\"sky-checkbox\" />\n </span>\n</fieldset>\n<sky-form-errors\n *ngIf=\"headingText && formGroup?.errors\"\n [id]=\"errorId\"\n [attr.data-sky-id]=\"formErrorsDataId\"\n [errors]=\"formGroup?.errors\"\n [labelText]=\"headingText\"\n [showErrors]=\"formGroup?.touched || formGroup?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host{display:block}h3,h4,h5{margin:0;display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
601
|
+
], ngImport: i0, template: "<fieldset\n class=\"sky-checkbox-group\"\n [attr.aria-invalid]=\"!!formGroup?.errors\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-errormessage]=\"\n headingText && formGroup?.errors ? errorId : undefined\n \"\n>\n <legend\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-xs': !!hintText,\n 'sky-margin-stacked-sm': !hintText\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >\n <span *ngIf=\"!headingLevel\" [class]=\"'sky-heading-text ' + headingClass\">\n {{ headingText }}\n </span>\n <h3 *ngIf=\"headingLevel === 3\" [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n <h4 *ngIf=\"headingLevel === 4\" [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n <h5 *ngIf=\"headingLevel === 5\" [class]=\"headingClass\">\n {{ headingText }}\n </h5> </span\n ><span class=\"sky-screen-reader-only\" *ngIf=\"required\">{{\n 'skyux_checkbox_group_required' | skyLibResources\n }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </legend>\n <div\n skyId\n [ngClass]=\"{\n 'sky-font-deemphasized sky-margin-stacked-lg sky-checkbox-group-hint-text':\n !!hintText\n }\"\n #hintTextEl=\"skyId\"\n >\n {{ hintText }}\n </div>\n <span class=\"sky-checkbox-group-inline sky-switch-icon-group\">\n <ng-content select=\"sky-checkbox[icon]\" />\n </span>\n <span class=\"sky-checkbox-group-stacked\">\n <ng-content select=\"sky-checkbox\" />\n </span>\n</fieldset>\n<sky-form-errors\n *ngIf=\"headingText && formGroup?.errors\"\n [id]=\"errorId\"\n [attr.data-sky-id]=\"formErrorsDataId\"\n [errors]=\"formGroup?.errors\"\n [labelText]=\"headingText\"\n [showErrors]=\"formGroup?.touched || formGroup?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host{display:block}h3,h4,h5{margin:0;display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: SkyFormErrorsModule }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }] }); }
|
|
602
602
|
}
|
|
603
603
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCheckboxGroupComponent, decorators: [{
|
|
604
604
|
type: Component,
|
|
@@ -666,7 +666,7 @@ class SkyCheckboxLabelTextLabelComponent {
|
|
|
666
666
|
}
|
|
667
667
|
#_labelText;
|
|
668
668
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCheckboxLabelTextLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
669
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyCheckboxLabelTextLabelComponent, selector: "sky-checkbox-label-text-label", inputs: { labelHidden: "labelHidden", labelText: "labelText" }, ngImport: i0, template: "<span *ngIf=\"!labelHidden\" class=\"sky-switch-label\">{{ labelText }}</span>\n", styles: [".sky-switch-label:not(.sky-theme-modern *){margin-right:0}\n", ":is(.sky-theme-modern .sky-switch-label){margin-right:0}\n"], dependencies: [{ kind: "directive", type:
|
|
669
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyCheckboxLabelTextLabelComponent, selector: "sky-checkbox-label-text-label", inputs: { labelHidden: "labelHidden", labelText: "labelText" }, ngImport: i0, template: "<span *ngIf=\"!labelHidden\" class=\"sky-switch-label\">{{ labelText }}</span>\n", styles: [".sky-switch-label:not(.sky-theme-modern *){margin-right:0}\n", ":is(.sky-theme-modern .sky-switch-label){margin-right:0}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
670
670
|
}
|
|
671
671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCheckboxLabelTextLabelComponent, decorators: [{
|
|
672
672
|
type: Component,
|
|
@@ -685,7 +685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
685
685
|
*/
|
|
686
686
|
class SkyCheckboxLabelComponent {
|
|
687
687
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCheckboxLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
688
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyCheckboxLabelComponent, selector: "sky-checkbox-label", ngImport: i0, template: "<span class=\"sky-switch-label\"\n ><span skyTrim><ng-content /></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\" /></span\n></span>\n", dependencies: [{ kind: "directive", type: i1$
|
|
688
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyCheckboxLabelComponent, selector: "sky-checkbox-label", ngImport: i0, template: "<span class=\"sky-switch-label\"\n ><span skyTrim><ng-content /></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\" /></span\n></span>\n", dependencies: [{ kind: "directive", type: i1$1.λ4, selector: "[skyTrim]" }] }); }
|
|
689
689
|
}
|
|
690
690
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCheckboxLabelComponent, decorators: [{
|
|
691
691
|
type: Component,
|
|
@@ -697,9 +697,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
697
697
|
* @internal
|
|
698
698
|
*/
|
|
699
699
|
class SkyFormFieldLabelTextRequiredService {
|
|
700
|
+
#loggerService = inject(SkyLogService);
|
|
700
701
|
validateLabelText(text) {
|
|
701
|
-
if (
|
|
702
|
-
|
|
702
|
+
if (typeof text === 'undefined') {
|
|
703
|
+
this.#loggerService.error('All form fields within <sky-field-group> must have `labelText` set on initialization.');
|
|
703
704
|
}
|
|
704
705
|
}
|
|
705
706
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFormFieldLabelTextRequiredService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -709,6 +710,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
709
710
|
type: Injectable
|
|
710
711
|
}] });
|
|
711
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Hide form field components of field groups that are missing label text.
|
|
715
|
+
* @internal
|
|
716
|
+
*/
|
|
717
|
+
class SkyFormFieldLabelTextRequiredDirective {
|
|
718
|
+
#changeDetector = inject(ChangeDetectorRef);
|
|
719
|
+
#labelTextRequiredSvc = inject(SkyFormFieldLabelTextRequiredService, {
|
|
720
|
+
optional: true,
|
|
721
|
+
});
|
|
722
|
+
ngOnInit() {
|
|
723
|
+
if (this.#labelTextRequiredSvc) {
|
|
724
|
+
if (this.labelText === undefined) {
|
|
725
|
+
this.display = 'none';
|
|
726
|
+
this.#changeDetector.markForCheck();
|
|
727
|
+
}
|
|
728
|
+
this.#labelTextRequiredSvc.validateLabelText(this.labelText);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFormFieldLabelTextRequiredDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
732
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.2", type: SkyFormFieldLabelTextRequiredDirective, isStandalone: true, selector: "[skyFormFieldLabelTextRequired]", inputs: { labelText: "labelText" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0 }); }
|
|
733
|
+
}
|
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFormFieldLabelTextRequiredDirective, decorators: [{
|
|
735
|
+
type: Directive,
|
|
736
|
+
args: [{
|
|
737
|
+
selector: '[skyFormFieldLabelTextRequired]',
|
|
738
|
+
standalone: true,
|
|
739
|
+
}]
|
|
740
|
+
}], propDecorators: { labelText: [{
|
|
741
|
+
type: Input
|
|
742
|
+
}], display: [{
|
|
743
|
+
type: HostBinding,
|
|
744
|
+
args: ['style.display']
|
|
745
|
+
}] } });
|
|
746
|
+
|
|
712
747
|
/**
|
|
713
748
|
* Replaces the HTML input element with `type="checkbox"`. When users select a checkbox, its value
|
|
714
749
|
* is driven through an `ngModel` attribute that you specify on the `sky-checkbox` element.
|
|
@@ -897,7 +932,6 @@ class SkyCheckboxComponent {
|
|
|
897
932
|
#idSvc;
|
|
898
933
|
#defaultId;
|
|
899
934
|
#logger;
|
|
900
|
-
#labelTextRequired;
|
|
901
935
|
constructor() {
|
|
902
936
|
/**
|
|
903
937
|
* The index for the checkbox. If not defined, the index is set to the position of the
|
|
@@ -936,9 +970,6 @@ class SkyCheckboxComponent {
|
|
|
936
970
|
this.#idSvc = inject(SkyIdService);
|
|
937
971
|
this.#defaultId = this.#idSvc.generateId();
|
|
938
972
|
this.#logger = inject(SkyLogService);
|
|
939
|
-
this.#labelTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
|
|
940
|
-
optional: true,
|
|
941
|
-
});
|
|
942
973
|
this.errorId = this.#idSvc.generateId();
|
|
943
974
|
/** Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor. */
|
|
944
975
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -955,12 +986,6 @@ class SkyCheckboxComponent {
|
|
|
955
986
|
this.id = this.#defaultId;
|
|
956
987
|
this.name = this.#defaultId;
|
|
957
988
|
}
|
|
958
|
-
ngOnInit() {
|
|
959
|
-
if (this.#labelTextRequired && !this.labelText) {
|
|
960
|
-
this.display = 'none';
|
|
961
|
-
}
|
|
962
|
-
this.#labelTextRequired?.validateLabelText(this.labelText);
|
|
963
|
-
}
|
|
964
989
|
validate(control) {
|
|
965
990
|
this.control ||= control;
|
|
966
991
|
// In template-driven forms, Angular's native 'required' attribute directive only works
|
|
@@ -1026,7 +1051,7 @@ class SkyCheckboxComponent {
|
|
|
1026
1051
|
this.checked = !this.checked;
|
|
1027
1052
|
}
|
|
1028
1053
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1029
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyCheckboxComponent, selector: "sky-checkbox", inputs: { label: "label", labelledBy: "labelledBy", id: "id", disabled: ["disabled", "disabled", booleanAttribute], tabindex: "tabindex", name: "name", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", icon: "icon", checkboxType: "checkboxType", checked: "checked", indeterminate: "indeterminate", required: ["required", "required", booleanAttribute], labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", stacked: ["stacked", "stacked", booleanAttribute], helpKey: "helpKey" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange", indeterminateChange: "indeterminateChange" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked"
|
|
1054
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyCheckboxComponent, selector: "sky-checkbox", inputs: { label: "label", labelledBy: "labelledBy", id: "id", disabled: ["disabled", "disabled", booleanAttribute], tabindex: "tabindex", name: "name", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", icon: "icon", checkboxType: "checkboxType", checked: "checked", indeterminate: "indeterminate", required: ["required", "required", booleanAttribute], labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", stacked: ["stacked", "stacked", booleanAttribute], helpKey: "helpKey" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange", indeterminateChange: "indeterminateChange" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked" } }, providers: [
|
|
1030
1055
|
{ provide: NG_VALIDATORS, useExisting: SkyCheckboxComponent, multi: true },
|
|
1031
1056
|
{
|
|
1032
1057
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1034,11 +1059,17 @@ class SkyCheckboxComponent {
|
|
|
1034
1059
|
multi: true,
|
|
1035
1060
|
},
|
|
1036
1061
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
1037
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, read: ElementRef }], hostDirectives: [{ directive: i4
|
|
1062
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, read: ElementRef }], hostDirectives: [{ directive: i4.SkyThemeComponentClassDirective }, { directive: SkyFormFieldLabelTextRequiredDirective, inputs: ["labelText", "labelText"] }], ngImport: i0, template: "<span class=\"sky-checkbox-outer-wrapper\">\n <label\n class=\"sky-checkbox-wrapper sky-switch\"\n [ngClass]=\"{\n 'sky-control-label-required': isCheckboxRequired,\n 'sky-switch-disabled': disabled,\n 'sky-margin-inline-xs': labelText && !icon\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]=\"isCheckboxRequired\"\n [tabIndex]=\"tabindex\"\n [attr.aria-label]=\"labelText || label\"\n [attr.aria-labelledby]=\"labelText ? undefined : labelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-required]=\"isCheckboxRequired ? true : null\"\n [attr.aria-invalid]=\"!!control?.errors\"\n [attr.aria-errormessage]=\"\n labelText && control?.errors ? errorId : undefined\n \"\n [ngClass]=\"{\n 'sky-switch-invalid':\n (control?.touched || control?.dirty) && control?.errors\n }\"\n (blur)=\"onInputBlur()\"\n (change)=\"onInteractionEvent($event)\"\n #inputEl\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; else checkedOrIndeterminateTemplate\"\n [fixedWidth]=\"true\"\n [icon]=\"icon\"\n />\n <ng-template #checkedOrIndeterminateTemplate>\n <sky-icon\n *ngIf=\"!indeterminate && checked\"\n class=\"sky-checkbox-icon-modern-checked\"\n [fixedWidth]=\"true\"\n icon=\"check\"\n />\n <sky-icon\n *ngIf=\"indeterminate\"\n class=\"sky-checkbox-icon-indeterminate sky-checkbox-icon-modern-indeterminate\"\n [fixedWidth]=\"true\"\n icon=\"square\"\n />\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"labelText; else labelElement\">\n <sky-checkbox-label-text-label\n [labelText]=\"labelText\"\n [labelHidden]=\"labelHidden\"\n />\n </ng-container>\n <ng-template #labelElement>\n <ng-content select=\"sky-checkbox-label\" />\n </ng-template>\n </label>\n <sky-help-inline\n *ngIf=\"(helpPopoverContent || helpKey) && labelText\"\n class=\"sky-checkbox-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n</span>\n<span skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-font-deemphasized sky-checkbox-hint-text sky-checkbox-form-margin\"\n >\n {{ hintText }}\n </div>\n</span>\n<sky-form-errors\n class=\"sky-checkbox-form-margin\"\n *ngIf=\"labelText && control?.errors\"\n [id]=\"errorId\"\n [errors]=\"control?.errors\"\n [labelText]=\"'skyux_checkbox_required_label_text' | skyLibResources\"\n [showErrors]=\"control?.touched || control?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [".sky-checkbox-outer-wrapper:not(.sky-theme-modern *){display:inline-flex}.sky-checkbox-outer-wrapper:not(.sky-theme-modern *) .sky-checkbox-help-inline{display:inline-flex}.sky-checkbox-outer-wrapper:not(.sky-theme-modern *) .sky-checkbox-icon-indeterminate{font-size:14px}.sky-checkbox-hint-text:not(.sky-theme-modern *){margin-top:var(--sky-margin-stacked-xs)}.sky-checkbox-form-margin:not(.sky-theme-modern *){margin-left:calc(var(--sky-switch-size) + var(--sky-switch-margin))}:host.sky-margin-stacked-lg.sky-cmp-theme-default{display:block}:host-context(sky-checkbox-group .sky-checkbox-group-stacked) :host.sky-cmp-theme-default{display:block}:host-context(sky-checkbox-group .sky-checkbox-group-stacked) :host.sky-cmp-theme-default:not(:last-child){margin-bottom:var(--sky-margin-stacked-sm)}\n", ":is(.sky-theme-modern .sky-checkbox-outer-wrapper){display:inline-flex}:is(.sky-theme-modern .sky-checkbox-outer-wrapper) .sky-checkbox-help-inline{display:inline-flex}:is(.sky-theme-modern .sky-checkbox-outer-wrapper) .sky-checkbox-icon-indeterminate{font-size:14px}:is(.sky-theme-modern .sky-checkbox-outer-wrapper) .sky-checkbox-icon-modern-checked,:is(.sky-theme-modern .sky-checkbox-outer-wrapper) .sky-checkbox-icon-modern-indeterminate{color:#1870b8}:is(.sky-theme-modern .sky-checkbox-outer-wrapper) .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-checked,:is(.sky-theme-modern .sky-checkbox-outer-wrapper) .sky-checkbox-input:disabled+.sky-switch-control .sky-checkbox-icon-modern-indeterminate{color:#212327}:is(.sky-theme-modern .sky-checkbox-outer-wrapper) .sky-switch-control{border-radius:6px}:is(.sky-theme-modern .sky-checkbox-hint-text){margin-top:var(--sky-margin-stacked-xs)}:is(.sky-theme-modern .sky-checkbox-form-margin){margin-left:calc(var(--sky-switch-size) + var(--sky-switch-margin))}:host-context(.sky-theme-modern) :host.sky-margin-stacked-lg.sky-cmp-theme-modern{display:block}:host-context(.sky-theme-modern) :host-context(sky-checkbox-group .sky-checkbox-group-stacked) :host.sky-cmp-theme-modern{display:block}:host-context(.sky-theme-modern) :host-context(sky-checkbox-group .sky-checkbox-group-stacked) :host.sky-cmp-theme-modern:not(:last-child){margin-bottom:var(--sky-margin-stacked-sm)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "component", type: i6.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "component", type: SkyCheckboxLabelTextLabelComponent, selector: "sky-checkbox-label-text-label", inputs: ["labelHidden", "labelText"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }] }); }
|
|
1038
1063
|
}
|
|
1039
1064
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyCheckboxComponent, decorators: [{
|
|
1040
1065
|
type: Component,
|
|
1041
|
-
args: [{ selector: 'sky-checkbox', hostDirectives: [
|
|
1066
|
+
args: [{ selector: 'sky-checkbox', hostDirectives: [
|
|
1067
|
+
SkyThemeComponentClassDirective,
|
|
1068
|
+
{
|
|
1069
|
+
directive: SkyFormFieldLabelTextRequiredDirective,
|
|
1070
|
+
inputs: ['labelText'],
|
|
1071
|
+
},
|
|
1072
|
+
], providers: [
|
|
1042
1073
|
{ provide: NG_VALIDATORS, useExisting: SkyCheckboxComponent, multi: true },
|
|
1043
1074
|
{
|
|
1044
1075
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1101,9 +1132,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
1101
1132
|
}], inputEl: [{
|
|
1102
1133
|
type: ViewChild,
|
|
1103
1134
|
args: ['inputEl', { read: ElementRef }]
|
|
1104
|
-
}], display: [{
|
|
1105
|
-
type: HostBinding,
|
|
1106
|
-
args: ['style.display']
|
|
1107
1135
|
}] } });
|
|
1108
1136
|
|
|
1109
1137
|
class SkyCheckboxModule {
|
|
@@ -1195,7 +1223,7 @@ class SkyFieldGroupComponent {
|
|
|
1195
1223
|
this.headingClass = `sky-font-heading-${value}`;
|
|
1196
1224
|
}
|
|
1197
1225
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFieldGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1198
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFieldGroupComponent, isStandalone: true, selector: "sky-field-group", inputs: { headingText: "headingText", hintText: "hintText", headingHidden: ["headingHidden", "headingHidden", booleanAttribute], stacked: ["stacked", "stacked", booleanAttribute], headingLevel: ["headingLevel", "headingLevel", numberAttribute3], headingStyle: ["headingStyle", "headingStyle", numberAttribute3], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey" }, host: { properties: { "class.sky-margin-stacked-xl": "this.stacked" } }, providers: [SkyFormFieldLabelTextRequiredService], ngImport: i0, template: "<fieldset\n class=\"sky-field-group\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n>\n <span class=\"sky-field-group-legend-wrapper\">\n <legend\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n <h3 *ngIf=\"headingLevel === 3\" [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n <h4 *ngIf=\"headingLevel === 4\" [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n </legend>\n <sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n class=\"sky-field-group-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </span>\n <div skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-field-group-hint-text sky-font-deemphasized\"\n >\n {{ hintText }}\n </div>\n </div>\n <div class=\"sky-field-group-content\">\n <ng-content />\n </div>\n</fieldset>\n", styles: [":host{display:block}.sky-field-group-hint-text{margin-top:var(--sky-margin-stacked-xs)}.sky-field-group-content{margin-top:var(--sky-margin-stacked-sm)}h3,h4{margin:0}.sky-field-group-legend-wrapper{display:inline-flex}sky-help-inline{display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
1226
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFieldGroupComponent, isStandalone: true, selector: "sky-field-group", inputs: { headingText: "headingText", hintText: "hintText", headingHidden: ["headingHidden", "headingHidden", booleanAttribute], stacked: ["stacked", "stacked", booleanAttribute], headingLevel: ["headingLevel", "headingLevel", numberAttribute3], headingStyle: ["headingStyle", "headingStyle", numberAttribute3], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey" }, host: { properties: { "class.sky-margin-stacked-xl": "this.stacked" } }, providers: [SkyFormFieldLabelTextRequiredService], ngImport: i0, template: "<fieldset\n class=\"sky-field-group\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n>\n <span class=\"sky-field-group-legend-wrapper\">\n <legend\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n <h3 *ngIf=\"headingLevel === 3\" [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n <h4 *ngIf=\"headingLevel === 4\" [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n </legend>\n <sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n class=\"sky-field-group-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </span>\n <div skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-field-group-hint-text sky-font-deemphasized\"\n >\n {{ hintText }}\n </div>\n </div>\n <div class=\"sky-field-group-content\">\n <ng-content />\n </div>\n</fieldset>\n", styles: [":host{display:block}.sky-field-group-hint-text{margin-top:var(--sky-margin-stacked-xs)}.sky-field-group-content{margin-top:var(--sky-margin-stacked-sm)}h3,h4{margin:0}.sky-field-group-legend-wrapper{display:inline-flex}sky-help-inline{display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }] }); }
|
|
1199
1227
|
}
|
|
1200
1228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFieldGroupComponent, decorators: [{
|
|
1201
1229
|
type: Component,
|
|
@@ -1242,29 +1270,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
1242
1270
|
}] });
|
|
1243
1271
|
|
|
1244
1272
|
/**
|
|
1245
|
-
* Displays a label above the file attachment element. To display a help button
|
|
1246
|
-
*
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1273
|
+
* Displays a label above the file attachment element. To display a help button
|
|
1274
|
+
* beside the label, include a help button element, such as `sky-help-inline`,
|
|
1275
|
+
* in the `sky-file-attachment-label` element and a `sky-control-help` CSS class
|
|
1276
|
+
* on that help button element.
|
|
1277
|
+
* @deprecated Use the `labelText` input on the single file attachment component
|
|
1278
|
+
* instead.
|
|
1249
1279
|
*/
|
|
1250
1280
|
class SkyFileAttachmentLabelComponent {
|
|
1251
1281
|
constructor() {
|
|
1252
1282
|
inject(SkyLogService).deprecated('SkyFileAttachmentLabelComponent', {
|
|
1253
1283
|
deprecationMajorVersion: 9,
|
|
1254
|
-
replacementRecommendation: 'To add a label to single file attachment, use the `labelText` input
|
|
1284
|
+
replacementRecommendation: 'To add a label to single file attachment, use the `labelText` input ' +
|
|
1285
|
+
'on the `sky-file-attachment` component instead.',
|
|
1255
1286
|
});
|
|
1256
1287
|
}
|
|
1257
1288
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1258
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyFileAttachmentLabelComponent, selector: "sky-file-attachment-label", viewQueries: [{ propertyName: "labelContentId", first: true, predicate: ["labelContentId"], descendants: true }], ngImport: i0, template: "<span class=\"sky-control-label\"\n ><span skyId skyTrim #labelContentId=\"skyId\"><ng-content /></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\" /></span\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"], dependencies: [{ kind: "directive", type: i1$
|
|
1289
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyFileAttachmentLabelComponent, isStandalone: true, selector: "sky-file-attachment-label", viewQueries: [{ propertyName: "labelContentId", first: true, predicate: ["labelContentId"], descendants: true }], ngImport: i0, template: "<span class=\"sky-control-label\"\n ><span skyId skyTrim #labelContentId=\"skyId\"><ng-content /></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\" /></span\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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "ngmodule", type: SkyTrimModule }, { kind: "directive", type: i1$1.λ4, selector: "[skyTrim]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1259
1290
|
}
|
|
1260
1291
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentLabelComponent, decorators: [{
|
|
1261
1292
|
type: Component,
|
|
1262
|
-
args: [{ selector: 'sky-file-attachment-label',
|
|
1293
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, SkyIdModule, SkyTrimModule], selector: 'sky-file-attachment-label', standalone: true, template: "<span class=\"sky-control-label\"\n ><span skyId skyTrim #labelContentId=\"skyId\"><ng-content /></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\" /></span\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"] }]
|
|
1263
1294
|
}], ctorParameters: () => [], propDecorators: { labelContentId: [{
|
|
1264
1295
|
type: ViewChild,
|
|
1265
1296
|
args: ['labelContentId']
|
|
1266
1297
|
}] } });
|
|
1267
1298
|
|
|
1299
|
+
/**
|
|
1300
|
+
* @internal
|
|
1301
|
+
*/
|
|
1302
|
+
class SkyFileSizePipe {
|
|
1303
|
+
#resourcesService;
|
|
1304
|
+
#defaultLocale = 'en-US';
|
|
1305
|
+
constructor(resourcesService) {
|
|
1306
|
+
this.#resourcesService = resourcesService;
|
|
1307
|
+
}
|
|
1308
|
+
transform(input) {
|
|
1309
|
+
let decimalPlaces = 0, dividend = 1, template;
|
|
1310
|
+
if (input === null || input === undefined) {
|
|
1311
|
+
return '';
|
|
1312
|
+
}
|
|
1313
|
+
if (typeof input === 'string') {
|
|
1314
|
+
input = Number.parseInt(input);
|
|
1315
|
+
}
|
|
1316
|
+
if (Math.abs(input) === 1) {
|
|
1317
|
+
template = 'skyux_file_attachment_file_size_b_singular';
|
|
1318
|
+
}
|
|
1319
|
+
else if (input < 1024) {
|
|
1320
|
+
template = 'skyux_file_attachment_file_size_b_plural';
|
|
1321
|
+
}
|
|
1322
|
+
else if (input < Math.pow(1024, 2)) {
|
|
1323
|
+
template = 'skyux_file_attachment_file_size_kb';
|
|
1324
|
+
dividend = 1024;
|
|
1325
|
+
}
|
|
1326
|
+
else if (input < Math.pow(1024, 3)) {
|
|
1327
|
+
template = 'skyux_file_attachment_file_size_mb';
|
|
1328
|
+
dividend = Math.pow(1024, 2);
|
|
1329
|
+
decimalPlaces = 1;
|
|
1330
|
+
}
|
|
1331
|
+
else {
|
|
1332
|
+
template = 'skyux_file_attachment_file_size_gb';
|
|
1333
|
+
dividend = Math.pow(1024, 3);
|
|
1334
|
+
decimalPlaces = 1;
|
|
1335
|
+
}
|
|
1336
|
+
const roundedSize = Math.floor(input / (dividend / Math.pow(10, decimalPlaces))) /
|
|
1337
|
+
Math.pow(10, decimalPlaces);
|
|
1338
|
+
const formattedSize = formatNumber(roundedSize, this.#defaultLocale, '.0-3');
|
|
1339
|
+
return this.#getString(template, formattedSize);
|
|
1340
|
+
}
|
|
1341
|
+
#getString(key, ...args) {
|
|
1342
|
+
// TODO: Need to implement the async `getString` method in a breaking change.
|
|
1343
|
+
return this.#resourcesService.getStringForLocale({ locale: this.#defaultLocale }, key, ...args);
|
|
1344
|
+
}
|
|
1345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileSizePipe, deps: [{ token: i3.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1346
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.2", ngImport: i0, type: SkyFileSizePipe, isStandalone: true, name: "skyFileSize" }); }
|
|
1347
|
+
}
|
|
1348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileSizePipe, decorators: [{
|
|
1349
|
+
type: Pipe,
|
|
1350
|
+
args: [{
|
|
1351
|
+
name: 'skyFileSize',
|
|
1352
|
+
standalone: true,
|
|
1353
|
+
}]
|
|
1354
|
+
}], ctorParameters: () => [{ type: i3.SkyLibResourcesService }] });
|
|
1355
|
+
|
|
1268
1356
|
/**
|
|
1269
1357
|
* @internal
|
|
1270
1358
|
*/
|
|
@@ -1428,69 +1516,13 @@ class SkyFileItemService {
|
|
|
1428
1516
|
return fileType.toUpperCase();
|
|
1429
1517
|
}
|
|
1430
1518
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileItemService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1431
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileItemService }); }
|
|
1519
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileItemService, providedIn: 'root' }); }
|
|
1432
1520
|
}
|
|
1433
1521
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileItemService, decorators: [{
|
|
1434
|
-
type: Injectable
|
|
1522
|
+
type: Injectable,
|
|
1523
|
+
args: [{ providedIn: 'root' }]
|
|
1435
1524
|
}] });
|
|
1436
1525
|
|
|
1437
|
-
/**
|
|
1438
|
-
* @internal
|
|
1439
|
-
*/
|
|
1440
|
-
class SkyFileSizePipe {
|
|
1441
|
-
#decimalPipe;
|
|
1442
|
-
#resourcesService;
|
|
1443
|
-
constructor(decimalPipe, resourcesService) {
|
|
1444
|
-
this.#decimalPipe = decimalPipe;
|
|
1445
|
-
this.#resourcesService = resourcesService;
|
|
1446
|
-
}
|
|
1447
|
-
transform(input) {
|
|
1448
|
-
let decimalPlaces = 0, dividend = 1, template;
|
|
1449
|
-
if (input === null || input === undefined) {
|
|
1450
|
-
return '';
|
|
1451
|
-
}
|
|
1452
|
-
if (typeof input === 'string') {
|
|
1453
|
-
input = Number.parseInt(input);
|
|
1454
|
-
}
|
|
1455
|
-
if (Math.abs(input) === 1) {
|
|
1456
|
-
template = 'skyux_file_attachment_file_size_b_singular';
|
|
1457
|
-
}
|
|
1458
|
-
else if (input < 1024) {
|
|
1459
|
-
template = 'skyux_file_attachment_file_size_b_plural';
|
|
1460
|
-
}
|
|
1461
|
-
else if (input < Math.pow(1024, 2)) {
|
|
1462
|
-
template = 'skyux_file_attachment_file_size_kb';
|
|
1463
|
-
dividend = 1024;
|
|
1464
|
-
}
|
|
1465
|
-
else if (input < Math.pow(1024, 3)) {
|
|
1466
|
-
template = 'skyux_file_attachment_file_size_mb';
|
|
1467
|
-
dividend = Math.pow(1024, 2);
|
|
1468
|
-
decimalPlaces = 1;
|
|
1469
|
-
}
|
|
1470
|
-
else {
|
|
1471
|
-
template = 'skyux_file_attachment_file_size_gb';
|
|
1472
|
-
dividend = Math.pow(1024, 3);
|
|
1473
|
-
decimalPlaces = 1;
|
|
1474
|
-
}
|
|
1475
|
-
const roundedSize = Math.floor(input / (dividend / Math.pow(10, decimalPlaces))) /
|
|
1476
|
-
Math.pow(10, decimalPlaces);
|
|
1477
|
-
const formattedSize = this.#decimalPipe.transform(roundedSize, '.0-3');
|
|
1478
|
-
return this.#getString(template, formattedSize);
|
|
1479
|
-
}
|
|
1480
|
-
#getString(key, ...args) {
|
|
1481
|
-
// TODO: Need to implement the async `getString` method in a breaking change.
|
|
1482
|
-
return this.#resourcesService.getStringForLocale({ locale: 'en-US' }, key, ...args);
|
|
1483
|
-
}
|
|
1484
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileSizePipe, deps: [{ token: i1.DecimalPipe }, { token: i2.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1485
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.2", ngImport: i0, type: SkyFileSizePipe, name: "skyFileSize" }); }
|
|
1486
|
-
}
|
|
1487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileSizePipe, decorators: [{
|
|
1488
|
-
type: Pipe,
|
|
1489
|
-
args: [{
|
|
1490
|
-
name: 'skyFileSize',
|
|
1491
|
-
}]
|
|
1492
|
-
}], ctorParameters: () => [{ type: i1.DecimalPipe }, { type: i2.SkyLibResourcesService }] });
|
|
1493
|
-
|
|
1494
1526
|
let uniqueId = 0;
|
|
1495
1527
|
const MAX_FILE_SIZE_DEFAULT$1 = 500000;
|
|
1496
1528
|
const MIN_FILE_SIZE_DEFAULT$1 = 0;
|
|
@@ -1539,6 +1571,10 @@ class SkyFileAttachmentComponent {
|
|
|
1539
1571
|
get value() {
|
|
1540
1572
|
return this.#_value;
|
|
1541
1573
|
}
|
|
1574
|
+
get isRequired() {
|
|
1575
|
+
return (this.required ||
|
|
1576
|
+
(this.ngControl?.control?.hasValidator(Validators.required) ?? false));
|
|
1577
|
+
}
|
|
1542
1578
|
#enterEventTarget;
|
|
1543
1579
|
#fileAttachmentId;
|
|
1544
1580
|
#ngUnsubscribe;
|
|
@@ -1552,7 +1588,6 @@ class SkyFileAttachmentComponent {
|
|
|
1552
1588
|
#idSvc;
|
|
1553
1589
|
#liveAnnouncerSvc;
|
|
1554
1590
|
#resourcesSvc;
|
|
1555
|
-
#labelTextRequired;
|
|
1556
1591
|
constructor(changeDetector, fileAttachmentService, fileItemService, ngControl, themeSvc) {
|
|
1557
1592
|
/**
|
|
1558
1593
|
* Whether to disable the input on template-driven forms. Don't use this input on reactive forms because they may overwrite the input or leave the control out of sync.
|
|
@@ -1599,9 +1634,6 @@ class SkyFileAttachmentComponent {
|
|
|
1599
1634
|
this.#idSvc = inject(SkyIdService);
|
|
1600
1635
|
this.#liveAnnouncerSvc = inject(SkyLiveAnnouncerService);
|
|
1601
1636
|
this.#resourcesSvc = inject(SkyLibResourcesService);
|
|
1602
|
-
this.#labelTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
|
|
1603
|
-
optional: true,
|
|
1604
|
-
});
|
|
1605
1637
|
this.errorId = this.#idSvc.generateId();
|
|
1606
1638
|
// istanbul ignore next
|
|
1607
1639
|
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
@@ -1633,10 +1665,6 @@ class SkyFileAttachmentComponent {
|
|
|
1633
1665
|
this.#updateFileAttachmentButton();
|
|
1634
1666
|
});
|
|
1635
1667
|
}
|
|
1636
|
-
if (this.#labelTextRequired && !this.labelText) {
|
|
1637
|
-
this.display = 'none';
|
|
1638
|
-
}
|
|
1639
|
-
this.#labelTextRequired?.validateLabelText(this.labelText);
|
|
1640
1668
|
}
|
|
1641
1669
|
ngAfterViewInit() {
|
|
1642
1670
|
// This is needed to address a bug in Angular 7.
|
|
@@ -1647,13 +1675,11 @@ class SkyFileAttachmentComponent {
|
|
|
1647
1675
|
/* istanbul ignore else */
|
|
1648
1676
|
if (this.ngControl) {
|
|
1649
1677
|
setTimeout(() => {
|
|
1650
|
-
this.ngControl
|
|
1678
|
+
this.ngControl?.control?.setValue(this.value, {
|
|
1651
1679
|
emitEvent: false,
|
|
1652
1680
|
});
|
|
1653
1681
|
this.#changeDetector.markForCheck();
|
|
1654
1682
|
});
|
|
1655
|
-
this.required =
|
|
1656
|
-
this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
|
|
1657
1683
|
}
|
|
1658
1684
|
}
|
|
1659
1685
|
ngAfterContentInit() {
|
|
@@ -1873,23 +1899,38 @@ class SkyFileAttachmentComponent {
|
|
|
1873
1899
|
// istanbul ignore next
|
|
1874
1900
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1875
1901
|
#onTouched;
|
|
1876
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyFileAttachmentService }, { token: SkyFileItemService }, { token:
|
|
1877
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFileAttachmentComponent, selector: "sky-file-attachment", inputs: { acceptedTypes: "acceptedTypes", acceptedTypesErrorMessage: "acceptedTypesErrorMessage", disabled: ["disabled", "disabled", booleanAttribute], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", maxFileSize: "maxFileSize", minFileSize: "minFileSize", stacked: ["stacked", "stacked", booleanAttribute], validateFn: "validateFn", required: "required" }, outputs: { fileChange: "fileChange", fileClick: "fileClick" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked"
|
|
1902
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyFileAttachmentService }, { token: SkyFileItemService }, { token: i3$1.NgControl, optional: true, self: true }, { token: i4.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1903
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFileAttachmentComponent, isStandalone: true, selector: "sky-file-attachment", inputs: { acceptedTypes: "acceptedTypes", acceptedTypesErrorMessage: "acceptedTypesErrorMessage", disabled: ["disabled", "disabled", booleanAttribute], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", maxFileSize: "maxFileSize", minFileSize: "minFileSize", stacked: ["stacked", "stacked", booleanAttribute], validateFn: "validateFn", required: ["required", "required", booleanAttribute] }, outputs: { fileChange: "fileChange", fileClick: "fileClick" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked" } }, providers: [
|
|
1878
1904
|
SkyFileAttachmentService,
|
|
1879
1905
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
1880
|
-
], 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.id]=\"labelElementId\"\n [ngClass]=\"{\n 'sky-control-label-required': !labelText && required && hasLabelComponent\n }\"\n >\n <ng-container *ngIf=\"labelText; else labelContent\">\n <span\n *ngIf=\"!labelHidden\"\n class=\"sky-control-label sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [labelText]=\"labelText\"\n [helpKey]=\"helpKey\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </ng-container>\n <span\n class=\"sky-screen-reader-only\"\n *ngIf=\"required && (hasLabelComponent || labelText)\"\n >{{ 'skyux_file_attachment_required' | skyLibResources }}</span\n >\n </div>\n <div\n class=\"sky-file-attachment-upload sky-file-attachment sky-file-attachment-target\"\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-screen-reader-only\"\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 <ng-container *ngIf=\"showFileAttachmentButton\">\n <button\n *ngIf=\"showFileAttachmentButton\"\n class=\"sky-file-attachment-btn sky-btn sky-btn-default\"\n type=\"button\"\n skyId\n [attr.aria-describedby]=\"\n (hintText ? hintTextEl.id + ' ' : '') + fileDropDescriptionElementId\n \"\n [attr.aria-label]=\"\n value\n ? ('skyux_file_attachment_button_label_replace_file_label'\n | skyLibResources: fileName)\n : ('skyux_file_attachment_button_label_choose_file_label'\n | skyLibResources)\n \"\n [attr.aria-labelledby]=\"\n attachButton.id +\n ' ' +\n (labelText\n ? labelElementId\n : hasLabelComponent\n ? labelComponents?.get(0)?.labelContentId?.id\n : undefined)\n \"\n [disabled]=\"disabled\"\n (click)=\"onDropClicked()\"\n #attachButton=\"skyId\"\n >\n <sky-icon icon=\"folder-open-o\" />\n {{\n value\n ? ('skyux_file_attachment_button_label_replace_file'\n | skyLibResources)\n : ('skyux_file_attachment_button_label_choose_file'\n | skyLibResources)\n }}\n </button>\n </ng-container>\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 <span\n *ngIf=\"value || currentThemeName === 'default'\"\n class=\"sky-file-attachment-name\"\n >\n <a\n *ngIf=\"value; else noFile\"\n [attr.title]=\"fileName\"\n (click)=\"emitClick()\"\n >\n {{ truncatedFileName }}\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 skyId\n type=\"button\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_remove' | skyLibResources: fileName\n \"\n [attr.aria-labelledby]=\"\n deleteButton.id +\n ' ' +\n (hasLabelComponent\n ? labelComponents?.get(0)?.labelContentId?.id\n : undefined)\n \"\n [disabled]=\"disabled\"\n [skyThemeClass]=\"{\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"deleteFileAttachment()\"\n #deleteButton=\"skyId\"\n >\n <sky-icon icon=\"trash-o\" size=\"md\" />\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<div skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-font-deemphasized sky-file-attachment-hint-text\"\n >\n {{ hintText }}\n </div>\n</div>\n\n<sky-form-errors\n *ngIf=\"labelText && (ngControl?.control?.errors || fileErrorValidation)\"\n [id]=\"errorId\"\n [errors]=\"\n ngControl?.errors !== null ? ngControl?.errors : fileErrorValidation\n \"\n [labelText]=\"labelText\"\n [showErrors]=\"ngControl?.touched || ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n <sky-form-error\n *ngIf=\"fileErrorName === 'fileType'\"\n [errorName]=\"'fileType'\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_file_type_error_label_text'\n | skyLibResources: fileErrorParam\n \"\n />\n <sky-form-error\n *ngIf=\"fileErrorName === 'maxFileSize'\"\n [errorName]=\"'maxFileSize'\"\n [errorText]=\"\n 'skyux_file_attachment_max_file_size_error_label_text'\n | skyLibResources: (fileErrorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"fileErrorName === 'minFileSize'\"\n [errorName]=\"'minFileSize'\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text'\n | skyLibResources: (fileErrorParam | skyFileSize)\n \"\n />\n</sky-form-errors>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-file-attachment-label\" />\n</ng-template>\n", styles: [":host.sky-margin-stacked-lg{display:block}.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-hint-text{margin-top:var(--sky-margin-stacked-xs)}:host-context(.sky-theme-modern) .sky-control-label{color:#686c73;font-size:13px}: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-control-label{color:#686c73;font-size:13px}.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"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyFormErrorComponent, selector: "sky-form-error", inputs: ["errorName", "errorText"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "component", type: i5.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i1$2.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "directive", type: i4$1.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "pipe", type: i2.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1906
|
+
], queries: [{ propertyName: "labelComponents", predicate: SkyFileAttachmentLabelComponent }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], hostDirectives: [{ directive: SkyFormFieldLabelTextRequiredDirective, inputs: ["labelText", "labelText"] }], ngImport: i0, template: "<div class=\"sky-file-attachment-wrapper\">\n <div\n class=\"sky-file-attachment-label-wrapper\"\n [attr.id]=\"labelElementId\"\n [ngClass]=\"{\n 'sky-control-label-required':\n !labelText && isRequired && hasLabelComponent\n }\"\n >\n <ng-container *ngIf=\"labelText; else labelContent\">\n <span\n *ngIf=\"!labelHidden\"\n class=\"sky-control-label sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': isRequired\n }\"\n >{{ labelText }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [labelText]=\"labelText\"\n [helpKey]=\"helpKey\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </ng-container>\n <span\n class=\"sky-screen-reader-only\"\n *ngIf=\"isRequired && (hasLabelComponent || labelText)\"\n >{{ 'skyux_file_attachment_required' | skyLibResources }}</span\n >\n </div>\n <div\n class=\"sky-file-attachment-upload sky-file-attachment sky-file-attachment-target\"\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-screen-reader-only\"\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]=\"isRequired\"\n (change)=\"fileChangeEvent($event)\"\n #fileInput\n />\n <ng-container *ngIf=\"showFileAttachmentButton\">\n <button\n *ngIf=\"showFileAttachmentButton\"\n class=\"sky-file-attachment-btn sky-btn sky-btn-default\"\n type=\"button\"\n skyId\n [attr.aria-describedby]=\"\n (hintText ? hintTextEl.id + ' ' : '') + fileDropDescriptionElementId\n \"\n [attr.aria-label]=\"\n value\n ? ('skyux_file_attachment_button_label_replace_file_label'\n | skyLibResources: fileName)\n : ('skyux_file_attachment_button_label_choose_file_label'\n | skyLibResources)\n \"\n [attr.aria-labelledby]=\"\n attachButton.id +\n ' ' +\n (labelText\n ? labelElementId\n : hasLabelComponent\n ? labelComponents?.get(0)?.labelContentId?.id\n : undefined)\n \"\n [disabled]=\"disabled\"\n (click)=\"onDropClicked()\"\n #attachButton=\"skyId\"\n >\n <sky-icon icon=\"folder-open-o\" />\n {{\n value\n ? ('skyux_file_attachment_button_label_replace_file'\n | skyLibResources)\n : ('skyux_file_attachment_button_label_choose_file'\n | skyLibResources)\n }}\n </button>\n </ng-container>\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 <span\n *ngIf=\"value || currentThemeName === 'default'\"\n class=\"sky-file-attachment-name\"\n >\n <a\n *ngIf=\"value; else noFile\"\n [attr.title]=\"fileName\"\n (click)=\"emitClick()\"\n >\n {{ truncatedFileName }}\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 skyId\n type=\"button\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_remove' | skyLibResources: fileName\n \"\n [attr.aria-labelledby]=\"\n deleteButton.id +\n ' ' +\n (hasLabelComponent\n ? labelComponents?.get(0)?.labelContentId?.id\n : undefined)\n \"\n [disabled]=\"disabled\"\n [skyThemeClass]=\"{\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"deleteFileAttachment()\"\n #deleteButton=\"skyId\"\n >\n <sky-icon icon=\"trash-o\" size=\"md\" />\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<div skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-font-deemphasized sky-file-attachment-hint-text\"\n >\n {{ hintText }}\n </div>\n</div>\n\n<sky-form-errors\n *ngIf=\"labelText && (ngControl?.control?.errors || fileErrorValidation)\"\n [id]=\"errorId\"\n [errors]=\"\n ngControl?.errors !== null ? ngControl?.errors : fileErrorValidation\n \"\n [labelText]=\"labelText\"\n [showErrors]=\"ngControl?.touched || ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n <sky-form-error\n *ngIf=\"fileErrorName === 'fileType'\"\n [errorName]=\"'fileType'\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_file_type_error_label_text'\n | skyLibResources: fileErrorParam\n \"\n />\n <sky-form-error\n *ngIf=\"fileErrorName === 'maxFileSize'\"\n [errorName]=\"'maxFileSize'\"\n [errorText]=\"\n 'skyux_file_attachment_max_file_size_error_label_text'\n | skyLibResources: (fileErrorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"fileErrorName === 'minFileSize'\"\n [errorName]=\"'minFileSize'\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text'\n | skyLibResources: (fileErrorParam | skyFileSize)\n \"\n />\n</sky-form-errors>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-file-attachment-label\" />\n</ng-template>\n", styles: [":host.sky-margin-stacked-lg{display:block}.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-hint-text{margin-top:var(--sky-margin-stacked-xs)}:host-context(.sky-theme-modern) .sky-control-label{color:#686c73;font-size:13px}: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-control-label{color:#686c73;font-size:13px}.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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }, { kind: "component", type: SkyFormErrorComponent, selector: "sky-form-error", inputs: ["errorName", "errorText"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i6.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "ngmodule", type: SkyThemeModule }, { kind: "directive", type: i4.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1881
1907
|
}
|
|
1882
1908
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentComponent, decorators: [{
|
|
1883
1909
|
type: Component,
|
|
1884
|
-
args: [{
|
|
1910
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
1911
|
+
{
|
|
1912
|
+
directive: SkyFormFieldLabelTextRequiredDirective,
|
|
1913
|
+
inputs: ['labelText'],
|
|
1914
|
+
},
|
|
1915
|
+
], imports: [
|
|
1916
|
+
CommonModule,
|
|
1917
|
+
SkyFileSizePipe,
|
|
1918
|
+
SkyFormErrorComponent,
|
|
1919
|
+
SkyFormErrorsComponent,
|
|
1920
|
+
SkyFormsResourcesModule,
|
|
1921
|
+
SkyHelpInlineModule,
|
|
1922
|
+
SkyIconModule,
|
|
1923
|
+
SkyIdModule,
|
|
1924
|
+
SkyThemeModule,
|
|
1925
|
+
], providers: [
|
|
1885
1926
|
SkyFileAttachmentService,
|
|
1886
1927
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
1887
|
-
],
|
|
1888
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyFileAttachmentService }, { type: SkyFileItemService }, { type:
|
|
1928
|
+
], selector: 'sky-file-attachment', standalone: true, template: "<div class=\"sky-file-attachment-wrapper\">\n <div\n class=\"sky-file-attachment-label-wrapper\"\n [attr.id]=\"labelElementId\"\n [ngClass]=\"{\n 'sky-control-label-required':\n !labelText && isRequired && hasLabelComponent\n }\"\n >\n <ng-container *ngIf=\"labelText; else labelContent\">\n <span\n *ngIf=\"!labelHidden\"\n class=\"sky-control-label sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': isRequired\n }\"\n >{{ labelText }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [labelText]=\"labelText\"\n [helpKey]=\"helpKey\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </ng-container>\n <span\n class=\"sky-screen-reader-only\"\n *ngIf=\"isRequired && (hasLabelComponent || labelText)\"\n >{{ 'skyux_file_attachment_required' | skyLibResources }}</span\n >\n </div>\n <div\n class=\"sky-file-attachment-upload sky-file-attachment sky-file-attachment-target\"\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-screen-reader-only\"\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]=\"isRequired\"\n (change)=\"fileChangeEvent($event)\"\n #fileInput\n />\n <ng-container *ngIf=\"showFileAttachmentButton\">\n <button\n *ngIf=\"showFileAttachmentButton\"\n class=\"sky-file-attachment-btn sky-btn sky-btn-default\"\n type=\"button\"\n skyId\n [attr.aria-describedby]=\"\n (hintText ? hintTextEl.id + ' ' : '') + fileDropDescriptionElementId\n \"\n [attr.aria-label]=\"\n value\n ? ('skyux_file_attachment_button_label_replace_file_label'\n | skyLibResources: fileName)\n : ('skyux_file_attachment_button_label_choose_file_label'\n | skyLibResources)\n \"\n [attr.aria-labelledby]=\"\n attachButton.id +\n ' ' +\n (labelText\n ? labelElementId\n : hasLabelComponent\n ? labelComponents?.get(0)?.labelContentId?.id\n : undefined)\n \"\n [disabled]=\"disabled\"\n (click)=\"onDropClicked()\"\n #attachButton=\"skyId\"\n >\n <sky-icon icon=\"folder-open-o\" />\n {{\n value\n ? ('skyux_file_attachment_button_label_replace_file'\n | skyLibResources)\n : ('skyux_file_attachment_button_label_choose_file'\n | skyLibResources)\n }}\n </button>\n </ng-container>\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 <span\n *ngIf=\"value || currentThemeName === 'default'\"\n class=\"sky-file-attachment-name\"\n >\n <a\n *ngIf=\"value; else noFile\"\n [attr.title]=\"fileName\"\n (click)=\"emitClick()\"\n >\n {{ truncatedFileName }}\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 skyId\n type=\"button\"\n [attr.aria-label]=\"\n 'skyux_file_attachment_file_item_remove' | skyLibResources: fileName\n \"\n [attr.aria-labelledby]=\"\n deleteButton.id +\n ' ' +\n (hasLabelComponent\n ? labelComponents?.get(0)?.labelContentId?.id\n : undefined)\n \"\n [disabled]=\"disabled\"\n [skyThemeClass]=\"{\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"deleteFileAttachment()\"\n #deleteButton=\"skyId\"\n >\n <sky-icon icon=\"trash-o\" size=\"md\" />\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<div skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-font-deemphasized sky-file-attachment-hint-text\"\n >\n {{ hintText }}\n </div>\n</div>\n\n<sky-form-errors\n *ngIf=\"labelText && (ngControl?.control?.errors || fileErrorValidation)\"\n [id]=\"errorId\"\n [errors]=\"\n ngControl?.errors !== null ? ngControl?.errors : fileErrorValidation\n \"\n [labelText]=\"labelText\"\n [showErrors]=\"ngControl?.touched || ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n <sky-form-error\n *ngIf=\"fileErrorName === 'fileType'\"\n [errorName]=\"'fileType'\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_file_type_error_label_text'\n | skyLibResources: fileErrorParam\n \"\n />\n <sky-form-error\n *ngIf=\"fileErrorName === 'maxFileSize'\"\n [errorName]=\"'maxFileSize'\"\n [errorText]=\"\n 'skyux_file_attachment_max_file_size_error_label_text'\n | skyLibResources: (fileErrorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"fileErrorName === 'minFileSize'\"\n [errorName]=\"'minFileSize'\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text'\n | skyLibResources: (fileErrorParam | skyFileSize)\n \"\n />\n</sky-form-errors>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-file-attachment-label\" />\n</ng-template>\n", styles: [":host.sky-margin-stacked-lg{display:block}.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-hint-text{margin-top:var(--sky-margin-stacked-xs)}:host-context(.sky-theme-modern) .sky-control-label{color:#686c73;font-size:13px}: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-control-label{color:#686c73;font-size:13px}.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"] }]
|
|
1929
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyFileAttachmentService }, { type: SkyFileItemService }, { type: i3$1.NgControl, decorators: [{
|
|
1889
1930
|
type: Self
|
|
1890
1931
|
}, {
|
|
1891
1932
|
type: Optional
|
|
1892
|
-
}] }, { type: i4
|
|
1933
|
+
}] }, { type: i4.SkyThemeService, decorators: [{
|
|
1893
1934
|
type: Optional
|
|
1894
1935
|
}] }], propDecorators: { acceptedTypes: [{
|
|
1895
1936
|
type: Input
|
|
@@ -1928,10 +1969,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
1928
1969
|
}], fileClick: [{
|
|
1929
1970
|
type: Output
|
|
1930
1971
|
}], required: [{
|
|
1931
|
-
type: Input
|
|
1932
|
-
|
|
1933
|
-
type: HostBinding,
|
|
1934
|
-
args: ['style.display']
|
|
1972
|
+
type: Input,
|
|
1973
|
+
args: [{ transform: booleanAttribute }]
|
|
1935
1974
|
}], inputEl: [{
|
|
1936
1975
|
type: ViewChild,
|
|
1937
1976
|
args: ['fileInput']
|
|
@@ -1940,6 +1979,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
1940
1979
|
args: [SkyFileAttachmentLabelComponent]
|
|
1941
1980
|
}] } });
|
|
1942
1981
|
|
|
1982
|
+
class SkyFileAttachmentModule {
|
|
1983
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1984
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentModule, imports: [SkyFileAttachmentComponent, SkyFileAttachmentLabelComponent], exports: [SkyFileAttachmentComponent,
|
|
1985
|
+
SkyFileAttachmentLabelComponent,
|
|
1986
|
+
SkyFormErrorModule] }); }
|
|
1987
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentModule, imports: [SkyFileAttachmentComponent, SkyFileAttachmentLabelComponent, SkyFormErrorModule] }); }
|
|
1988
|
+
}
|
|
1989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentModule, decorators: [{
|
|
1990
|
+
type: NgModule,
|
|
1991
|
+
args: [{
|
|
1992
|
+
exports: [
|
|
1993
|
+
SkyFileAttachmentComponent,
|
|
1994
|
+
SkyFileAttachmentLabelComponent,
|
|
1995
|
+
SkyFormErrorModule,
|
|
1996
|
+
],
|
|
1997
|
+
imports: [SkyFileAttachmentComponent, SkyFileAttachmentLabelComponent],
|
|
1998
|
+
}]
|
|
1999
|
+
}] });
|
|
2000
|
+
|
|
1943
2001
|
const MAX_FILE_SIZE_DEFAULT = 500000;
|
|
1944
2002
|
const MIN_FILE_SIZE_DEFAULT = 0;
|
|
1945
2003
|
/**
|
|
@@ -2003,9 +2061,6 @@ class SkyFileDropComponent {
|
|
|
2003
2061
|
this.#liveAnnouncerSvc = inject(SkyLiveAnnouncerService);
|
|
2004
2062
|
this.#resourcesSvc = inject(SkyLibResourcesService);
|
|
2005
2063
|
this.#idSvc = inject(SkyIdService);
|
|
2006
|
-
this.#labelTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
|
|
2007
|
-
optional: true,
|
|
2008
|
-
});
|
|
2009
2064
|
this.errorId = this.#idSvc.generateId();
|
|
2010
2065
|
this.rejectedFiles = [];
|
|
2011
2066
|
}
|
|
@@ -2036,13 +2091,6 @@ class SkyFileDropComponent {
|
|
|
2036
2091
|
#liveAnnouncerSvc;
|
|
2037
2092
|
#resourcesSvc;
|
|
2038
2093
|
#idSvc;
|
|
2039
|
-
#labelTextRequired;
|
|
2040
|
-
ngOnInit() {
|
|
2041
|
-
if (this.#labelTextRequired && !this.labelText) {
|
|
2042
|
-
this.display = 'none';
|
|
2043
|
-
}
|
|
2044
|
-
this.#labelTextRequired?.validateLabelText(this.labelText);
|
|
2045
|
-
}
|
|
2046
2094
|
ngOnDestroy() {
|
|
2047
2095
|
this.filesChanged.complete();
|
|
2048
2096
|
this.linkChanged.complete();
|
|
@@ -2183,17 +2231,32 @@ class SkyFileDropComponent {
|
|
|
2183
2231
|
}
|
|
2184
2232
|
}
|
|
2185
2233
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileDropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2186
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFileDropComponent, selector: "sky-file-drop", inputs: { fileUploadAriaLabel: "fileUploadAriaLabel", linkUploadAriaLabel: "linkUploadAriaLabel", minFileSize: "minFileSize", maxFileSize: "maxFileSize", multiple: "multiple", validateFn: "validateFn", acceptedTypes: "acceptedTypes", acceptedTypesErrorMessage: "acceptedTypesErrorMessage", noClick: "noClick", allowLinks: "allowLinks", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", required: ["required", "required", booleanAttribute], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", stacked: ["stacked", "stacked", booleanAttribute], helpKey: "helpKey" }, outputs: { filesChanged: "filesChanged", linkInputBlur: "linkInputBlur", linkChanged: "linkChanged" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked"
|
|
2234
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyFileDropComponent, isStandalone: true, selector: "sky-file-drop", inputs: { fileUploadAriaLabel: "fileUploadAriaLabel", linkUploadAriaLabel: "linkUploadAriaLabel", minFileSize: "minFileSize", maxFileSize: "maxFileSize", multiple: "multiple", validateFn: "validateFn", acceptedTypes: "acceptedTypes", acceptedTypesErrorMessage: "acceptedTypesErrorMessage", noClick: "noClick", allowLinks: "allowLinks", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", required: ["required", "required", booleanAttribute], helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", stacked: ["stacked", "stacked", booleanAttribute], helpKey: "helpKey" }, outputs: { filesChanged: "filesChanged", linkInputBlur: "linkInputBlur", linkChanged: "linkChanged" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stacked" } }, providers: [
|
|
2187
2235
|
SkyFileAttachmentService,
|
|
2188
2236
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
2189
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<fieldset>\n <legend\n *ngIf=\"labelText\"\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n ><span class=\"sky-screen-reader-only\" *ngIf=\"required\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </legend>\n <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 [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | 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\" />\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-font-display-3\">\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\" />\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file' | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n\n <div class=\"sky-file-drop-contents-custom\" #customEl>\n <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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label' | skyLibResources\n }}\n </div>\n </div>\n <div class=\"sky-margin-stacked-xs\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-describedby]=\"uploadHintText.id\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </div>\n <div\n skyId\n #uploadHintText=\"skyId\"\n class=\"sky-font-deemphasized sky-file-drop-hint-text sky-margin-stacked-sm\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_placeholder'\n | skyLibResources\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_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div skyId #hintTextEl=\"skyId\">\n <div *ngIf=\"hintText\" class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n </div>\n</fieldset>\n<sky-form-errors\n *ngIf=\"labelText && rejectedFiles.length\"\n class=\"sky-file-drop-errors\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [showErrors]=\"rejectedFiles.length\"\n>\n <div *ngFor=\"let rejectedFile of rejectedFiles\">\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'fileType'\"\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources: rejectedFile.file.name : rejectedFile.errorParam\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'maxFileSize'\"\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'minFileSize'\"\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'validate' && rejectedFile.errorParam\"\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n </div>\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{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-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type){margin-bottom:0}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}: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;inset: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-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.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}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SkyFormErrorComponent, selector: "sky-form-error", inputs: ["errorName", "errorText"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "component", type: i5.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i1$2.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "pipe", type: i2.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }] }); }
|
|
2237
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], hostDirectives: [{ directive: SkyFormFieldLabelTextRequiredDirective, inputs: ["labelText", "labelText"] }], ngImport: i0, template: "<fieldset>\n <legend\n *ngIf=\"labelText\"\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n ><span class=\"sky-screen-reader-only\" *ngIf=\"required\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </legend>\n <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 [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | 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\" />\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-font-display-3\">\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\" />\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file' | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n\n <div class=\"sky-file-drop-contents-custom\" #customEl>\n <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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label' | skyLibResources\n }}\n </div>\n </div>\n <div class=\"sky-margin-stacked-xs\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-describedby]=\"uploadHintText.id\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </div>\n <div\n skyId\n #uploadHintText=\"skyId\"\n class=\"sky-font-deemphasized sky-file-drop-hint-text sky-margin-stacked-sm\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_placeholder'\n | skyLibResources\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_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div skyId #hintTextEl=\"skyId\">\n <div *ngIf=\"hintText\" class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n </div>\n</fieldset>\n<sky-form-errors\n *ngIf=\"labelText && rejectedFiles.length\"\n class=\"sky-file-drop-errors\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [showErrors]=\"rejectedFiles.length\"\n>\n <div *ngFor=\"let rejectedFile of rejectedFiles\">\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'fileType'\"\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources: rejectedFile.file.name : rejectedFile.errorParam\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'maxFileSize'\"\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'minFileSize'\"\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'validate' && rejectedFile.errorParam\"\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n </div>\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{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-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type){margin-bottom:0}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}: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;inset: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-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.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}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }, { kind: "component", type: SkyFormErrorComponent, selector: "sky-form-error", inputs: ["errorName", "errorText"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyHelpInlineModule }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i6.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }] }); }
|
|
2190
2238
|
}
|
|
2191
2239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileDropComponent, decorators: [{
|
|
2192
2240
|
type: Component,
|
|
2193
|
-
args: [{
|
|
2241
|
+
args: [{ hostDirectives: [
|
|
2242
|
+
{
|
|
2243
|
+
directive: SkyFormFieldLabelTextRequiredDirective,
|
|
2244
|
+
inputs: ['labelText'],
|
|
2245
|
+
},
|
|
2246
|
+
], imports: [
|
|
2247
|
+
CommonModule,
|
|
2248
|
+
FormsModule,
|
|
2249
|
+
SkyFileSizePipe,
|
|
2250
|
+
SkyFormErrorComponent,
|
|
2251
|
+
SkyFormErrorsComponent,
|
|
2252
|
+
SkyFormsResourcesModule,
|
|
2253
|
+
SkyHelpInlineModule,
|
|
2254
|
+
SkyIconModule,
|
|
2255
|
+
SkyIdModule,
|
|
2256
|
+
], providers: [
|
|
2194
2257
|
SkyFileAttachmentService,
|
|
2195
2258
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
2196
|
-
], template: "<fieldset>\n <legend\n *ngIf=\"labelText\"\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n ><span class=\"sky-screen-reader-only\" *ngIf=\"required\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </legend>\n <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 [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | 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\" />\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-font-display-3\">\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\" />\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file' | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n\n <div class=\"sky-file-drop-contents-custom\" #customEl>\n <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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label' | skyLibResources\n }}\n </div>\n </div>\n <div class=\"sky-margin-stacked-xs\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-describedby]=\"uploadHintText.id\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </div>\n <div\n skyId\n #uploadHintText=\"skyId\"\n class=\"sky-font-deemphasized sky-file-drop-hint-text sky-margin-stacked-sm\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_placeholder'\n | skyLibResources\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_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div skyId #hintTextEl=\"skyId\">\n <div *ngIf=\"hintText\" class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n </div>\n</fieldset>\n<sky-form-errors\n *ngIf=\"labelText && rejectedFiles.length\"\n class=\"sky-file-drop-errors\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [showErrors]=\"rejectedFiles.length\"\n>\n <div *ngFor=\"let rejectedFile of rejectedFiles\">\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'fileType'\"\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources: rejectedFile.file.name : rejectedFile.errorParam\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'maxFileSize'\"\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'minFileSize'\"\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'validate' && rejectedFile.errorParam\"\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n </div>\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{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-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type){margin-bottom:0}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}: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;inset: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-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.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}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"] }]
|
|
2259
|
+
], selector: 'sky-file-drop', standalone: true, template: "<fieldset>\n <legend\n *ngIf=\"labelText\"\n class=\"sky-control-label sky-font-body-default sky-margin-stacked-xs\"\n [ngClass]=\"{\n 'sky-screen-reader-only': labelHidden\n }\"\n >\n <span\n class=\"sky-margin-inline-xs\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</span\n ><span class=\"sky-screen-reader-only\" *ngIf=\"required\">{{\n 'skyux_file_attachment_required' | skyLibResources\n }}</span\n ><sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </legend>\n <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 [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_drag_file_here'\n | 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\" />\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-font-display-3\">\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\" />\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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_invalid_file' | skyLibResources\n }}\n </div>\n <sky-icon icon=\"times-circle\" class=\"sky-file-upload-icon\" />\n </div>\n </div>\n\n <div class=\"sky-file-drop-contents-custom\" #customEl>\n <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-font-display-3\">\n {{\n 'skyux_file_attachment_file_upload_link_label' | skyLibResources\n }}\n </div>\n </div>\n <div class=\"sky-margin-stacked-xs\">\n <input\n type=\"text\"\n class=\"sky-form-control\"\n [attr.aria-label]=\"\n linkUploadAriaLabel ||\n ('skyux_file_attachment_file_upload_link_label'\n | skyLibResources)\n \"\n [attr.aria-describedby]=\"uploadHintText.id\"\n [attr.aria-invalid]=\"!!rejectedFiles.length\"\n [attr.aria-errormessage]=\"\n labelText && rejectedFiles.length ? errorId : undefined\n \"\n [(ngModel)]=\"linkUrl\"\n (blur)=\"onLinkBlur()\"\n (keyup)=\"addLinkEnter($event)\"\n />\n </div>\n <div\n skyId\n #uploadHintText=\"skyId\"\n class=\"sky-font-deemphasized sky-file-drop-hint-text sky-margin-stacked-sm\"\n >\n {{\n 'skyux_file_attachment_file_upload_link_placeholder'\n | skyLibResources\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_link_done' | skyLibResources\n }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div skyId #hintTextEl=\"skyId\">\n <div *ngIf=\"hintText\" class=\"sky-font-deemphasized sky-file-drop-hint-text\">\n {{ hintText }}\n </div>\n </div>\n</fieldset>\n<sky-form-errors\n *ngIf=\"labelText && rejectedFiles.length\"\n class=\"sky-file-drop-errors\"\n [id]=\"errorId\"\n [labelText]=\"labelText\"\n [showErrors]=\"rejectedFiles.length\"\n>\n <div *ngFor=\"let rejectedFile of rejectedFiles\">\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'fileType'\"\n errorName=\"fileType\"\n [errorText]=\"\n 'skyux_file_attachment_file_type_error_label_text_with_name'\n | skyLibResources: rejectedFile.file.name : rejectedFile.errorParam\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'maxFileSize'\"\n errorName=\"maxFileSize\"\n [errorText]=\"\n acceptedTypesErrorMessage ??\n 'skyux_file_attachment_max_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'minFileSize'\"\n errorName=\"minFileSize\"\n [errorText]=\"\n 'skyux_file_attachment_min_file_size_error_label_text_with_name'\n | skyLibResources\n : rejectedFile.file.name\n : (rejectedFile.errorParam | skyFileSize)\n \"\n />\n <sky-form-error\n *ngIf=\"rejectedFile.errorType === 'validate' && rejectedFile.errorParam\"\n errorName=\"validate\"\n [errorText]=\"rejectedFile.file.name + ': ' + rejectedFile.errorParam\"\n />\n </div>\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg{display:block}.sky-file-drop-col{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-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-sm) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:10px}: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-col:not(:last-of-type){margin-bottom:0}: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-col:not(:last-of-type),:host-context(.sky-responsive-container-md) .sky-file-drop-col:not(:last-of-type),:host-context(.sky-responsive-container-lg) .sky-file-drop-col:not(:last-of-type){margin-bottom:0}: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;inset: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-no-click .sky-file-drop-contents{cursor:default}.sky-file-drop-hint-text{text-align:left;margin-top:var(--sky-margin-stacked-xs)}.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}.sky-file-drop-errors{margin-bottom:10px}:host-context(.sky-theme-modern) .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}.sky-theme-modern .sky-control-label{color:var(--sky-text-color-deemphasized);font-size:13px}\n"] }]
|
|
2197
2260
|
}], propDecorators: { filesChanged: [{
|
|
2198
2261
|
type: Output
|
|
2199
2262
|
}], linkInputBlur: [{
|
|
@@ -2245,9 +2308,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
2245
2308
|
}], inputEl: [{
|
|
2246
2309
|
type: ViewChild,
|
|
2247
2310
|
args: ['fileInput']
|
|
2248
|
-
}], display: [{
|
|
2249
|
-
type: HostBinding,
|
|
2250
|
-
args: ['style.display']
|
|
2251
2311
|
}] } });
|
|
2252
2312
|
|
|
2253
2313
|
class SkyFileItemComponent {
|
|
@@ -2384,80 +2444,48 @@ class SkyFileItemComponent {
|
|
|
2384
2444
|
}
|
|
2385
2445
|
}
|
|
2386
2446
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileItemComponent, deps: [{ token: i0.KeyValueDiffers }, { token: SkyFileItemService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2387
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyFileItemComponent, selector: "sky-file-item", inputs: { fileItem: "fileItem" }, outputs: { deleteFile: "deleteFile" }, ngImport: i0, template: "<div class=\"sky-file-item sky-padding-even-default\" *ngIf=\"fileItem\">\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\" />\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\" />\n </div>\n </div>\n <div class=\"sky-file-item-content-custom\">\n <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;-o-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"], dependencies: [{ kind: "directive", type:
|
|
2447
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyFileItemComponent, isStandalone: true, selector: "sky-file-item", inputs: { fileItem: "fileItem" }, outputs: { deleteFile: "deleteFile" }, ngImport: i0, template: "<div class=\"sky-file-item sky-padding-even-default\" *ngIf=\"fileItem\">\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\" />\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\" />\n </div>\n </div>\n <div class=\"sky-file-item-content-custom\">\n <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;-o-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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SkyFileSizePipe, name: "skyFileSize" }, { kind: "ngmodule", type: SkyFormsResourcesModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "ngmodule", type: SkyIconModule }, { kind: "component", type: i6.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }] }); }
|
|
2388
2448
|
}
|
|
2389
2449
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileItemComponent, decorators: [{
|
|
2390
2450
|
type: Component,
|
|
2391
|
-
args: [{
|
|
2451
|
+
args: [{ imports: [
|
|
2452
|
+
CommonModule,
|
|
2453
|
+
SkyFileSizePipe,
|
|
2454
|
+
SkyFormsResourcesModule,
|
|
2455
|
+
SkyIconModule,
|
|
2456
|
+
], selector: 'sky-file-item', standalone: true, template: "<div class=\"sky-file-item sky-padding-even-default\" *ngIf=\"fileItem\">\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\" />\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\" />\n </div>\n </div>\n <div class=\"sky-file-item-content-custom\">\n <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;-o-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"] }]
|
|
2392
2457
|
}], ctorParameters: () => [{ type: i0.KeyValueDiffers }, { type: SkyFileItemService }], propDecorators: { fileItem: [{
|
|
2393
2458
|
type: Input
|
|
2394
2459
|
}], deleteFile: [{
|
|
2395
2460
|
type: Output
|
|
2396
2461
|
}] } });
|
|
2397
2462
|
|
|
2463
|
+
class SkyFileDropModule {
|
|
2464
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2465
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.2", ngImport: i0, type: SkyFileDropModule, imports: [SkyFileDropComponent, SkyFileItemComponent], exports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule] }); }
|
|
2466
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileDropModule, imports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule] }); }
|
|
2467
|
+
}
|
|
2468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileDropModule, decorators: [{
|
|
2469
|
+
type: NgModule,
|
|
2470
|
+
args: [{
|
|
2471
|
+
exports: [SkyFileDropComponent, SkyFileItemComponent, SkyFormErrorModule],
|
|
2472
|
+
imports: [SkyFileDropComponent, SkyFileItemComponent],
|
|
2473
|
+
}]
|
|
2474
|
+
}] });
|
|
2475
|
+
|
|
2476
|
+
/**
|
|
2477
|
+
* @deprecated Import either `SkyFileAttachmentModule` or `SkyFileDropModule`.
|
|
2478
|
+
*/
|
|
2398
2479
|
class SkyFileAttachmentsModule {
|
|
2399
2480
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2400
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentsModule,
|
|
2401
|
-
|
|
2402
|
-
SkyFileDropComponent,
|
|
2403
|
-
SkyFileItemComponent,
|
|
2404
|
-
SkyFileSizePipe], imports: [CommonModule,
|
|
2405
|
-
FormsModule,
|
|
2406
|
-
SkyFormsResourcesModule,
|
|
2407
|
-
SkyFormErrorModule,
|
|
2408
|
-
SkyFormErrorsModule,
|
|
2409
|
-
SkyIconModule,
|
|
2410
|
-
SkyIdModule,
|
|
2411
|
-
SkyThemeModule,
|
|
2412
|
-
SkyTrimModule,
|
|
2413
|
-
SkyHelpInlineModule], exports: [SkyFileAttachmentComponent,
|
|
2414
|
-
SkyFileAttachmentLabelComponent,
|
|
2415
|
-
SkyFileDropComponent,
|
|
2416
|
-
SkyFileItemComponent,
|
|
2417
|
-
SkyFileSizePipe,
|
|
2418
|
-
SkyFormErrorModule] }); }
|
|
2419
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentsModule, providers: [DecimalPipe, SkyFileItemService], imports: [CommonModule,
|
|
2420
|
-
FormsModule,
|
|
2421
|
-
SkyFormsResourcesModule,
|
|
2422
|
-
SkyFormErrorModule,
|
|
2423
|
-
SkyFormErrorsModule,
|
|
2424
|
-
SkyIconModule,
|
|
2425
|
-
SkyIdModule,
|
|
2426
|
-
SkyThemeModule,
|
|
2427
|
-
SkyTrimModule,
|
|
2428
|
-
SkyHelpInlineModule, SkyFormErrorModule] }); }
|
|
2481
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentsModule, imports: [SkyFileAttachmentModule, SkyFileDropModule], exports: [SkyFileAttachmentModule, SkyFileDropModule] }); }
|
|
2482
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentsModule, imports: [SkyFileAttachmentModule, SkyFileDropModule, SkyFileAttachmentModule, SkyFileDropModule] }); }
|
|
2429
2483
|
}
|
|
2430
2484
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyFileAttachmentsModule, decorators: [{
|
|
2431
2485
|
type: NgModule,
|
|
2432
2486
|
args: [{
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
SkyFileAttachmentLabelComponent,
|
|
2436
|
-
SkyFileDropComponent,
|
|
2437
|
-
SkyFileItemComponent,
|
|
2438
|
-
SkyFileSizePipe,
|
|
2439
|
-
],
|
|
2440
|
-
imports: [
|
|
2441
|
-
CommonModule,
|
|
2442
|
-
FormsModule,
|
|
2443
|
-
SkyFormsResourcesModule,
|
|
2444
|
-
SkyFormErrorModule,
|
|
2445
|
-
SkyFormErrorsModule,
|
|
2446
|
-
SkyIconModule,
|
|
2447
|
-
SkyIdModule,
|
|
2448
|
-
SkyThemeModule,
|
|
2449
|
-
SkyTrimModule,
|
|
2450
|
-
SkyHelpInlineModule,
|
|
2451
|
-
],
|
|
2452
|
-
exports: [
|
|
2453
|
-
SkyFileAttachmentComponent,
|
|
2454
|
-
SkyFileAttachmentLabelComponent,
|
|
2455
|
-
SkyFileDropComponent,
|
|
2456
|
-
SkyFileItemComponent,
|
|
2457
|
-
SkyFileSizePipe,
|
|
2458
|
-
SkyFormErrorModule,
|
|
2459
|
-
],
|
|
2460
|
-
providers: [DecimalPipe, SkyFileItemService],
|
|
2487
|
+
exports: [SkyFileAttachmentModule, SkyFileDropModule],
|
|
2488
|
+
imports: [SkyFileAttachmentModule, SkyFileDropModule],
|
|
2461
2489
|
}]
|
|
2462
2490
|
}] });
|
|
2463
2491
|
|
|
@@ -2637,9 +2665,6 @@ class SkyInputBoxComponent {
|
|
|
2637
2665
|
this.#idSvc = inject(SkyIdService);
|
|
2638
2666
|
this.#elementRef = inject(ElementRef);
|
|
2639
2667
|
this.#renderer = inject(Renderer2);
|
|
2640
|
-
this.#labelTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
|
|
2641
|
-
optional: true,
|
|
2642
|
-
});
|
|
2643
2668
|
/**
|
|
2644
2669
|
* @internal
|
|
2645
2670
|
*/
|
|
@@ -2664,7 +2689,6 @@ class SkyInputBoxComponent {
|
|
|
2664
2689
|
#idSvc;
|
|
2665
2690
|
#elementRef;
|
|
2666
2691
|
#renderer;
|
|
2667
|
-
#labelTextRequired;
|
|
2668
2692
|
/**
|
|
2669
2693
|
* The maximum number of characters allowed in the input. A [SKY UX character count](https://developer.blackbaud.com/skyux/components/character-count)
|
|
2670
2694
|
* will be placed on the input element with the appropriate validator.
|
|
@@ -2717,10 +2741,6 @@ class SkyInputBoxComponent {
|
|
|
2717
2741
|
#previousMaxLengthValidator;
|
|
2718
2742
|
ngOnInit() {
|
|
2719
2743
|
this.#inputBoxHostSvc.init(this);
|
|
2720
|
-
if (this.#labelTextRequired && !this.labelText) {
|
|
2721
|
-
this.display = 'none';
|
|
2722
|
-
}
|
|
2723
|
-
this.#labelTextRequired?.validateLabelText(this.labelText);
|
|
2724
2744
|
}
|
|
2725
2745
|
ngAfterContentChecked() {
|
|
2726
2746
|
this.controlDir =
|
|
@@ -2828,7 +2848,7 @@ class SkyInputBoxComponent {
|
|
|
2828
2848
|
}
|
|
2829
2849
|
}
|
|
2830
2850
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyInputBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2831
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.2", type: SkyInputBoxComponent, selector: "sky-input-box", inputs: { hasErrors: { classPropertyName: "hasErrors", publicName: "hasErrors", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, labelText: { classPropertyName: "labelText", publicName: "labelText", isSignal: false, isRequired: false, transformFunction: null }, characterLimit: { classPropertyName: "characterLimit", publicName: "characterLimit", isSignal: false, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: false, isRequired: false, transformFunction: null }, helpPopoverTitle: { classPropertyName: "helpPopoverTitle", publicName: "helpPopoverTitle", isSignal: false, isRequired: false, transformFunction: null }, helpPopoverContent: { classPropertyName: "helpPopoverContent", publicName: "helpPopoverContent", isSignal: false, isRequired: false, transformFunction: null }, helpKey: { classPropertyName: "helpKey", publicName: "helpKey", isSignal: false, isRequired: false, transformFunction: null }, hintText: { classPropertyName: "hintText", publicName: "hintText", isSignal: false, isRequired: false, transformFunction: null }, errorsScreenReaderOnly: { classPropertyName: "errorsScreenReaderOnly", publicName: "errorsScreenReaderOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.cssClass"
|
|
2851
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.2", type: SkyInputBoxComponent, selector: "sky-input-box", inputs: { hasErrors: { classPropertyName: "hasErrors", publicName: "hasErrors", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, labelText: { classPropertyName: "labelText", publicName: "labelText", isSignal: false, isRequired: false, transformFunction: null }, characterLimit: { classPropertyName: "characterLimit", publicName: "characterLimit", isSignal: false, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: false, isRequired: false, transformFunction: null }, helpPopoverTitle: { classPropertyName: "helpPopoverTitle", publicName: "helpPopoverTitle", isSignal: false, isRequired: false, transformFunction: null }, helpPopoverContent: { classPropertyName: "helpPopoverContent", publicName: "helpPopoverContent", isSignal: false, isRequired: false, transformFunction: null }, helpKey: { classPropertyName: "helpKey", publicName: "helpKey", isSignal: false, isRequired: false, transformFunction: null }, hintText: { classPropertyName: "hintText", publicName: "hintText", isSignal: false, isRequired: false, transformFunction: null }, errorsScreenReaderOnly: { classPropertyName: "errorsScreenReaderOnly", publicName: "errorsScreenReaderOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.cssClass" } }, providers: [
|
|
2832
2852
|
SkyContentInfoProvider,
|
|
2833
2853
|
SkyInputBoxAdapterService,
|
|
2834
2854
|
SkyInputBoxHostService,
|
|
@@ -2836,11 +2856,16 @@ class SkyInputBoxComponent {
|
|
|
2836
2856
|
provide: SKY_FORM_ERRORS_ENABLED,
|
|
2837
2857
|
useValue: true,
|
|
2838
2858
|
},
|
|
2839
|
-
], 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 }, { propertyName: "inputRef", first: true, predicate: SkyInputBoxControlDirective, descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-form-group\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\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\" />\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n </div>\n</div>\n\n<div\n *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-input-box-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\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\" />\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 *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n</div>\n\n<ng-template #labelTemplate>\n <ng-content select=\".sky-control-label\" />\n <label\n *ngIf=\"labelText\"\n class=\"sky-control-label\"\n [attr.aria-label]=\"\n characterLimit !== undefined\n ? labelText +\n ' ' +\n ('skyux_character_count_message'\n | skyLibResources: characterCountScreenReader : characterLimit)\n : null\n \"\n [for]=\"controlId\"\n [id]=\"labelId\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</label\n >\n</ng-template>\n\n<ng-template #inlineHelpTemplate>\n <sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n class=\"sky-control-help\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverContent]=\"helpPopoverContent\"\n [popoverTitle]=\"helpPopoverTitle\"\n />\n\n <ng-content select=\".sky-control-help\" />\n</ng-template>\n\n<ng-template #characterCountTemplate>\n <sky-character-counter-indicator\n *ngIf=\"characterLimit !== undefined\"\n [characterCount]=\"controlDir?.value?.length || 0\"\n [characterCountLimit]=\"characterLimit\"\n />\n <ng-content select=\"sky-character-counter-indicator\" />\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content\n select=\"input,select,.sky-form-control:not(textarea),sky-text-editor\"\n />\n <ng-container\n *ngIf=\"hostInputTemplate\"\n [ngTemplateOutlet]=\"hostInputTemplate\"\n />\n <ng-content select=\"textarea\" />\n</ng-template>\n\n<ng-template #buttonsLeftTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-left\" />\n <ng-container\n *ngIf=\"hostButtonsLeftTemplate\"\n [ngTemplateOutlet]=\"hostButtonsLeftTemplate\"\n />\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 />\n <ng-container\n *ngIf=\"hostButtonsTemplate\"\n [ngTemplateOutlet]=\"hostButtonsTemplate\"\n />\n</ng-template>\n\n<ng-template #buttonsInsetTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-inset\" />\n <ng-container\n *ngIf=\"hostButtonsInsetTemplate\"\n [ngTemplateOutlet]=\"hostButtonsInsetTemplate\"\n />\n</ng-template>\n\n<ng-template #iconsInsetTemplate>\n <div class=\"sky-input-box-icon-inset-wrapper\" (click)=\"onInsetIconClick()\">\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset\" />\n <ng-container\n *ngIf=\"hostIconsInsetTemplate\"\n [ngTemplateOutlet]=\"hostIconsInsetTemplate\"\n />\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 select=\".sky-input-group-icon.sky-input-box-icon-inset-left\" />\n <ng-container\n *ngIf=\"hostIconsInsetLeftTemplate\"\n [ngTemplateOutlet]=\"hostIconsInsetLeftTemplate\"\n />\n </div>\n</ng-template>\n\n<ng-template #errorLabelTemplate>\n <sky-form-errors\n [id]=\"errorId\"\n [errors]=\"controlDir?.errors\"\n [labelText]=\"labelText\"\n [ngClass]=\"{ 'sky-screen-reader-only': errorsScreenReaderOnly() }\"\n [showErrors]=\"controlDir?.touched || controlDir?.dirty\"\n >\n <ng-content select=\"sky-form-error\" />\n </sky-form-errors>\n <ng-content select=\".sky-error-label,.sky-error-indicator\" />\n</ng-template>\n\n<ng-template #hintTextTemplate>\n <div\n *ngIf=\"hintText || hostHintText\"\n class=\"sky-font-deemphasized sky-input-box-hint-text\"\n [ngClass]=\"{\n 'sky-input-box-hint-text-hidden': hintTextHidden,\n 'sky-screen-reader-only': hintTextScreenReaderOnly\n }\"\n [id]=\"hintTextId\"\n >\n {{ hintText | skyInputBoxHintText: hostHintText }}\n </div>\n</ng-template>\n", styles: [".sky-input-box{--sky-background-color-input-box-group: transparent;--sky-background-color-input-box-group-focused: transparent}.sky-theme-modern .sky-input-box{--sky-background-color-input-box-group: #ffffff;--sky-background-color-input-box-group-focused: #ffffff}.sky-theme-modern.sky-theme-mode-dark .sky-input-box{--sky-background-color-input-box-group: #000000;--sky-background-color-input-box-group-focused: #000000}sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-error-indicator{margin-top:5px}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap;background-color:var(--sky-background-color-input-box-group)}sky-input-box .sky-form-group:focus-within{background-color:var(--sky-background-color-input-box-group-focused)}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-input-box .sky-input-box-hint-text{flex-basis:100%;margin-top:var(--sky-margin-stacked-xs)}sky-input-box .sky-input-box-hint-text.sky-input-box-hint-text-hidden{visibility:hidden}.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 var(--sky-highlight-color-danger);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{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-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-help{z-index:4}.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:3px 0 -3px 5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:not(:last-child){margin-right:5px}.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{margin-top:-23px;padding-top:26px}.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:20px;padding-right:15px;padding-bottom:9px;padding-left:15px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill{box-shadow:none!important;clip-path:inset(2px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill:hover,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill:hover{clip-path:inset(1px round 6px)!important}.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-label-wrapper:hover+.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:-webkit-autofill{clip-path:inset(1px round 6px)!important}.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}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control:not(textarea),.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control:not(textarea){padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+textarea.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* textarea.sky-form-control{border-top:10px solid transparent}@-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{margin-top:-26px;padding-top:0;resize:vertical;border-top:29px solid transparent}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:-webkit-autofill{border-top:29px solid transparent!important}.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 var(--sky-highlight-color-danger);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 var(--sky-highlight-color-danger);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"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", inputs: ["characterCount", "characterCountLimit"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "component", type: i4.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i4$1.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "pipe", type: i2.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyInputBoxHintTextPipe, name: "skyInputBoxHintText" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2859
|
+
], 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 }, { propertyName: "inputRef", first: true, predicate: SkyInputBoxControlDirective, descendants: true, read: ElementRef }], hostDirectives: [{ directive: SkyFormFieldLabelTextRequiredDirective, inputs: ["labelText", "labelText"] }], ngImport: i0, template: "<div\n *skyThemeIf=\"'default'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-form-group\">\n <div class=\"sky-input-box-label-wrapper\">\n <ng-container *ngTemplateOutlet=\"labelTemplate\" /><ng-container\n *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <div class=\"sky-input-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\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\" />\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n </div>\n</div>\n\n<div\n *skyThemeIf=\"'modern'\"\n class=\"sky-input-box\"\n [ngClass]=\"{\n 'sky-input-box-disabled': isDisabled\n }\"\n>\n <div class=\"sky-input-box-group\">\n <ng-container *ngTemplateOutlet=\"buttonsLeftTemplate\" />\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\" />\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 *ngTemplateOutlet=\"inlineHelpTemplate\"\n />\n <ng-container *ngTemplateOutlet=\"characterCountTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"inputTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsInsetTemplate\" />\n <ng-container *ngTemplateOutlet=\"iconsInsetTemplate\" />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\" />\n </div>\n <ng-container *ngTemplateOutlet=\"hintTextTemplate\" />\n <ng-container *ngTemplateOutlet=\"errorLabelTemplate\" />\n</div>\n\n<ng-template #labelTemplate>\n <ng-content select=\".sky-control-label\" />\n <label\n *ngIf=\"labelText\"\n class=\"sky-control-label\"\n [attr.aria-label]=\"\n characterLimit !== undefined\n ? labelText +\n ' ' +\n ('skyux_character_count_message'\n | skyLibResources: characterCountScreenReader : characterLimit)\n : null\n \"\n [for]=\"controlId\"\n [id]=\"labelId\"\n [ngClass]=\"{\n 'sky-control-label-required': required\n }\"\n >{{ labelText }}</label\n >\n</ng-template>\n\n<ng-template #inlineHelpTemplate>\n <sky-help-inline\n *ngIf=\"helpPopoverContent || helpKey\"\n class=\"sky-control-help\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverContent]=\"helpPopoverContent\"\n [popoverTitle]=\"helpPopoverTitle\"\n />\n\n <ng-content select=\".sky-control-help\" />\n</ng-template>\n\n<ng-template #characterCountTemplate>\n <sky-character-counter-indicator\n *ngIf=\"characterLimit !== undefined\"\n [characterCount]=\"controlDir?.value?.length || 0\"\n [characterCountLimit]=\"characterLimit\"\n />\n <ng-content select=\"sky-character-counter-indicator\" />\n</ng-template>\n\n<ng-template #inputTemplate>\n <ng-content\n select=\"input,select,.sky-form-control:not(textarea),sky-text-editor\"\n />\n <ng-container\n *ngIf=\"hostInputTemplate\"\n [ngTemplateOutlet]=\"hostInputTemplate\"\n />\n <ng-content select=\"textarea\" />\n</ng-template>\n\n<ng-template #buttonsLeftTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-left\" />\n <ng-container\n *ngIf=\"hostButtonsLeftTemplate\"\n [ngTemplateOutlet]=\"hostButtonsLeftTemplate\"\n />\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 />\n <ng-container\n *ngIf=\"hostButtonsTemplate\"\n [ngTemplateOutlet]=\"hostButtonsTemplate\"\n />\n</ng-template>\n\n<ng-template #buttonsInsetTemplate>\n <ng-content select=\".sky-input-group-btn.sky-input-box-btn-inset\" />\n <ng-container\n *ngIf=\"hostButtonsInsetTemplate\"\n [ngTemplateOutlet]=\"hostButtonsInsetTemplate\"\n />\n</ng-template>\n\n<ng-template #iconsInsetTemplate>\n <div class=\"sky-input-box-icon-inset-wrapper\" (click)=\"onInsetIconClick()\">\n <ng-content select=\".sky-input-group-icon.sky-input-box-icon-inset\" />\n <ng-container\n *ngIf=\"hostIconsInsetTemplate\"\n [ngTemplateOutlet]=\"hostIconsInsetTemplate\"\n />\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 select=\".sky-input-group-icon.sky-input-box-icon-inset-left\" />\n <ng-container\n *ngIf=\"hostIconsInsetLeftTemplate\"\n [ngTemplateOutlet]=\"hostIconsInsetLeftTemplate\"\n />\n </div>\n</ng-template>\n\n<ng-template #errorLabelTemplate>\n <sky-form-errors\n [id]=\"errorId\"\n [errors]=\"controlDir?.errors\"\n [labelText]=\"labelText\"\n [ngClass]=\"{ 'sky-screen-reader-only': errorsScreenReaderOnly() }\"\n [showErrors]=\"controlDir?.touched || controlDir?.dirty\"\n >\n <ng-content select=\"sky-form-error\" />\n </sky-form-errors>\n <ng-content select=\".sky-error-label,.sky-error-indicator\" />\n</ng-template>\n\n<ng-template #hintTextTemplate>\n <div\n *ngIf=\"hintText || hostHintText\"\n class=\"sky-font-deemphasized sky-input-box-hint-text\"\n [ngClass]=\"{\n 'sky-input-box-hint-text-hidden': hintTextHidden,\n 'sky-screen-reader-only': hintTextScreenReaderOnly\n }\"\n [id]=\"hintTextId\"\n >\n {{ hintText | skyInputBoxHintText: hostHintText }}\n </div>\n</ng-template>\n", styles: [".sky-input-box{--sky-background-color-input-box-group: transparent;--sky-background-color-input-box-group-focused: transparent}.sky-theme-modern .sky-input-box{--sky-background-color-input-box-group: #ffffff;--sky-background-color-input-box-group-focused: #ffffff}.sky-theme-modern.sky-theme-mode-dark .sky-input-box{--sky-background-color-input-box-group: #000000;--sky-background-color-input-box-group-focused: #000000}sky-input-box{display:block}sky-input-box .sky-input-box-input-container{width:100%}sky-input-box .sky-error-indicator{margin-top:5px}sky-input-box .sky-form-group{display:flex;flex-wrap:wrap;background-color:var(--sky-background-color-input-box-group)}sky-input-box .sky-form-group:focus-within{background-color:var(--sky-background-color-input-box-group-focused)}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-input-box .sky-input-box-hint-text{flex-basis:100%;margin-top:var(--sky-margin-stacked-xs)}sky-input-box .sky-input-box-hint-text.sky-input-box-hint-text-hidden{visibility:hidden}.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 var(--sky-highlight-color-danger);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{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-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-help{z-index:4}.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:3px 0 -3px 5px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper .sky-control-help:not(:last-child){margin-right:5px}.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{margin-top:-23px;padding-top:26px}.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:20px;padding-right:15px;padding-bottom:9px;padding-left:15px;position:relative}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill{box-shadow:none!important;clip-path:inset(2px round 6px)!important}.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:autofill:hover,.sky-theme-modern .sky-input-box .sky-form-group .sky-form-control:-webkit-autofill:hover{clip-path:inset(1px round 6px)!important}.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-label-wrapper:hover+.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:hover+.sky-form-control:-webkit-autofill{clip-path:inset(1px round 6px)!important}.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}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+.sky-form-control:not(textarea),.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* .sky-form-control:not(textarea){padding-top:10px}.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+textarea.sky-form-control,.sky-theme-modern .sky-input-box .sky-form-group .sky-input-box-label-wrapper:empty+* textarea.sky-form-control{border-top:10px solid transparent}@-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{margin-top:-26px;padding-top:0;resize:vertical;border-top:29px solid transparent}.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:autofill,.sky-theme-modern .sky-input-box .sky-form-group textarea.sky-form-control:-webkit-autofill{border-top:29px solid transparent!important}.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 var(--sky-highlight-color-danger);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 var(--sky-highlight-color-danger);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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkyCharacterCounterIndicatorComponent, selector: "sky-character-counter-indicator", inputs: ["characterCount", "characterCountLimit"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i4.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyInputBoxHintTextPipe, name: "skyInputBoxHintText" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2840
2860
|
}
|
|
2841
2861
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyInputBoxComponent, decorators: [{
|
|
2842
2862
|
type: Component,
|
|
2843
|
-
args: [{ selector: 'sky-input-box',
|
|
2863
|
+
args: [{ selector: 'sky-input-box', hostDirectives: [
|
|
2864
|
+
{
|
|
2865
|
+
directive: SkyFormFieldLabelTextRequiredDirective,
|
|
2866
|
+
inputs: ['labelText'],
|
|
2867
|
+
},
|
|
2868
|
+
], providers: [
|
|
2844
2869
|
SkyContentInfoProvider,
|
|
2845
2870
|
SkyInputBoxAdapterService,
|
|
2846
2871
|
SkyInputBoxHostService,
|
|
@@ -2870,9 +2895,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
2870
2895
|
}], cssClass: [{
|
|
2871
2896
|
type: HostBinding,
|
|
2872
2897
|
args: ['class']
|
|
2873
|
-
}], display: [{
|
|
2874
|
-
type: HostBinding,
|
|
2875
|
-
args: ['style.display']
|
|
2876
2898
|
}], formControl: [{
|
|
2877
2899
|
type: ContentChild,
|
|
2878
2900
|
args: [FormControlDirective]
|
|
@@ -3187,7 +3209,6 @@ class SkyRadioComponent {
|
|
|
3187
3209
|
#defaultId;
|
|
3188
3210
|
#radioGroupIdSvc;
|
|
3189
3211
|
#logger;
|
|
3190
|
-
#labelTextRequired;
|
|
3191
3212
|
constructor() {
|
|
3192
3213
|
/**
|
|
3193
3214
|
* Fires when users focus off a radio button.
|
|
@@ -3219,9 +3240,6 @@ class SkyRadioComponent {
|
|
|
3219
3240
|
this.#defaultId = inject(SkyIdService).generateId();
|
|
3220
3241
|
this.#radioGroupIdSvc = inject(SkyRadioGroupIdService, { optional: true });
|
|
3221
3242
|
this.#logger = inject(SkyLogService);
|
|
3222
|
-
this.#labelTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
|
|
3223
|
-
optional: true,
|
|
3224
|
-
});
|
|
3225
3243
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3226
3244
|
this.#removeUniqueSelectionListener = () => { };
|
|
3227
3245
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -3230,12 +3248,6 @@ class SkyRadioComponent {
|
|
|
3230
3248
|
this.#onTouchedCallback = () => { };
|
|
3231
3249
|
this.id = this.#defaultId;
|
|
3232
3250
|
}
|
|
3233
|
-
ngOnInit() {
|
|
3234
|
-
if (this.#labelTextRequired && !this.labelText) {
|
|
3235
|
-
this.display = 'none';
|
|
3236
|
-
}
|
|
3237
|
-
this.#labelTextRequired?.validateLabelText(this.labelText);
|
|
3238
|
-
}
|
|
3239
3251
|
ngOnDestroy() {
|
|
3240
3252
|
this.#radioGroupIdSvc?.unregister(this.#defaultId);
|
|
3241
3253
|
this.#removeUniqueSelectionListener();
|
|
@@ -3290,11 +3302,16 @@ class SkyRadioComponent {
|
|
|
3290
3302
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3291
3303
|
#onTouchedCallback;
|
|
3292
3304
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3293
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyRadioComponent, selector: "sky-radio", inputs: { checked: "checked", disabled: ["disabled", "disabled", booleanAttribute], id: "id", label: "label", labelledBy: "labelledBy", name: "name", tabindex: "tabindex", value: "value", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", icon: "icon", radioType: "radioType", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", helpKey: "helpKey" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange" },
|
|
3305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyRadioComponent, selector: "sky-radio", inputs: { checked: "checked", disabled: ["disabled", "disabled", booleanAttribute], id: "id", label: "label", labelledBy: "labelledBy", name: "name", tabindex: "tabindex", value: "value", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", icon: "icon", radioType: "radioType", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], hintText: "hintText", helpKey: "helpKey" }, outputs: { change: "change", checkedChange: "checkedChange", disabledChange: "disabledChange" }, providers: [SKY_RADIO_CONTROL_VALUE_ACCESSOR], hostDirectives: [{ directive: SkyFormFieldLabelTextRequiredDirective, inputs: ["labelText", "labelText"] }], ngImport: i0, template: "<span class=\"sky-radio-outer-wrapper\">\n <label\n class=\"sky-radio-wrapper sky-switch\"\n [ngClass]=\"{ 'sky-switch-disabled': disabled || radioGroupDisabled }\"\n >\n <input\n class=\"sky-radio-input sky-switch-input\"\n type=\"radio\"\n [attr.aria-label]=\"labelText || label\"\n [attr.aria-labelledby]=\"labelText ? undefined : labelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [checked]=\"checked\"\n [disabled]=\"disabled || radioGroupDisabled\"\n [id]=\"inputId\"\n [name]=\"name\"\n [tabIndex]=\"tabindex\"\n [value]=\"value\"\n (blur)=\"onInputFocusChange()\"\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\" />\n </span>\n <ng-container *ngIf=\"labelText; else labelElement\">\n <span *ngIf=\"!labelHidden\" class=\"sky-switch-label\">{{ labelText }}</span>\n </ng-container>\n <ng-template #labelElement>\n <ng-content select=\"sky-radio-label\" />\n </ng-template>\n </label>\n <sky-help-inline\n *ngIf=\"(helpPopoverContent || helpKey) && labelText\"\n class=\"sky-radio-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n</span>\n<div skyId #hintTextEl=\"skyId\">\n <div *ngIf=\"hintText\" class=\"sky-font-deemphasized sky-radio-hint-text\">\n {{ hintText }}\n </div>\n</div>\n", styles: [":host{display:inline-block}.sky-radio-outer-wrapper,.sky-radio-help-inline{display:inline-flex}.sky-switch-label:not(.sky-theme-modern *){margin-right:var(--sky-margin-inline-xs)}:is(.sky-theme-modern .sky-switch-label){margin-right:var(--sky-margin-inline-xs)}.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:#000;border-radius:50%}.sky-radio-hint-text{margin:var(--sky-margin-stacked-xs) 0 0 calc(var(--sky-switch-size) + var(--sky-switch-margin))}: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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "component", type: i6.λ1, selector: "sky-icon", inputs: ["icon", "iconName", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3294
3306
|
}
|
|
3295
3307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyRadioComponent, decorators: [{
|
|
3296
3308
|
type: Component,
|
|
3297
|
-
args: [{ selector: 'sky-radio',
|
|
3309
|
+
args: [{ selector: 'sky-radio', hostDirectives: [
|
|
3310
|
+
{
|
|
3311
|
+
directive: SkyFormFieldLabelTextRequiredDirective,
|
|
3312
|
+
inputs: ['labelText'],
|
|
3313
|
+
},
|
|
3314
|
+
], providers: [SKY_RADIO_CONTROL_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"sky-radio-outer-wrapper\">\n <label\n class=\"sky-radio-wrapper sky-switch\"\n [ngClass]=\"{ 'sky-switch-disabled': disabled || radioGroupDisabled }\"\n >\n <input\n class=\"sky-radio-input sky-switch-input\"\n type=\"radio\"\n [attr.aria-label]=\"labelText || label\"\n [attr.aria-labelledby]=\"labelText ? undefined : labelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [checked]=\"checked\"\n [disabled]=\"disabled || radioGroupDisabled\"\n [id]=\"inputId\"\n [name]=\"name\"\n [tabIndex]=\"tabindex\"\n [value]=\"value\"\n (blur)=\"onInputFocusChange()\"\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\" />\n </span>\n <ng-container *ngIf=\"labelText; else labelElement\">\n <span *ngIf=\"!labelHidden\" class=\"sky-switch-label\">{{ labelText }}</span>\n </ng-container>\n <ng-template #labelElement>\n <ng-content select=\"sky-radio-label\" />\n </ng-template>\n </label>\n <sky-help-inline\n *ngIf=\"(helpPopoverContent || helpKey) && labelText\"\n class=\"sky-radio-help-inline\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n</span>\n<div skyId #hintTextEl=\"skyId\">\n <div *ngIf=\"hintText\" class=\"sky-font-deemphasized sky-radio-hint-text\">\n {{ hintText }}\n </div>\n</div>\n", styles: [":host{display:inline-block}.sky-radio-outer-wrapper,.sky-radio-help-inline{display:inline-flex}.sky-switch-label:not(.sky-theme-modern *){margin-right:var(--sky-margin-inline-xs)}:is(.sky-theme-modern .sky-switch-label){margin-right:var(--sky-margin-inline-xs)}.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:#000;border-radius:50%}.sky-radio-hint-text{margin:var(--sky-margin-stacked-xs) 0 0 calc(var(--sky-switch-size) + var(--sky-switch-margin))}: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"] }]
|
|
3298
3315
|
}], ctorParameters: () => [], propDecorators: { checked: [{
|
|
3299
3316
|
type: Input
|
|
3300
3317
|
}], disabled: [{
|
|
@@ -3335,9 +3352,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
3335
3352
|
type: Output
|
|
3336
3353
|
}], disabledChange: [{
|
|
3337
3354
|
type: Output
|
|
3338
|
-
}], display: [{
|
|
3339
|
-
type: HostBinding,
|
|
3340
|
-
args: ['style.display']
|
|
3341
3355
|
}] } });
|
|
3342
3356
|
|
|
3343
3357
|
let nextUniqueId = 0;
|
|
@@ -3480,6 +3494,10 @@ class SkyRadioGroupComponent {
|
|
|
3480
3494
|
get tabIndex() {
|
|
3481
3495
|
return this.#_tabIndex;
|
|
3482
3496
|
}
|
|
3497
|
+
get isRequired() {
|
|
3498
|
+
return (this.required ||
|
|
3499
|
+
(this.ngControl?.control?.hasValidator(Validators.required) ?? false));
|
|
3500
|
+
}
|
|
3483
3501
|
#controlValue;
|
|
3484
3502
|
#defaultName;
|
|
3485
3503
|
#ngUnsubscribe;
|
|
@@ -3494,7 +3512,6 @@ class SkyRadioGroupComponent {
|
|
|
3494
3512
|
#radioGroupIdSvc;
|
|
3495
3513
|
#logger;
|
|
3496
3514
|
#idService;
|
|
3497
|
-
#headingTextRequired;
|
|
3498
3515
|
constructor(changeDetector, radioGroupIdSvc, ngControl) {
|
|
3499
3516
|
/**
|
|
3500
3517
|
* Whether the input is required for form validation.
|
|
@@ -3519,9 +3536,6 @@ class SkyRadioGroupComponent {
|
|
|
3519
3536
|
this.#_stacked = false;
|
|
3520
3537
|
this.#logger = inject(SkyLogService);
|
|
3521
3538
|
this.#idService = inject(SkyIdService);
|
|
3522
|
-
this.#headingTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
|
|
3523
|
-
optional: true,
|
|
3524
|
-
});
|
|
3525
3539
|
this.errorId = this.#idService.generateId();
|
|
3526
3540
|
/* istanbul ignore next */
|
|
3527
3541
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -3562,14 +3576,6 @@ class SkyRadioGroupComponent {
|
|
|
3562
3576
|
});
|
|
3563
3577
|
}
|
|
3564
3578
|
}
|
|
3565
|
-
ngAfterViewInit() {
|
|
3566
|
-
if (this.ngControl) {
|
|
3567
|
-
this.required =
|
|
3568
|
-
this.required || SkyFormsUtility.hasRequiredValidation(this.ngControl);
|
|
3569
|
-
// Avoid an ExpressionChangedAfterItHasBeenCheckedError.
|
|
3570
|
-
this.#changeDetector.detectChanges();
|
|
3571
|
-
}
|
|
3572
|
-
}
|
|
3573
3579
|
watchForSelections() {
|
|
3574
3580
|
/* istanbul ignore else */
|
|
3575
3581
|
if (this.radios) {
|
|
@@ -3587,12 +3593,6 @@ class SkyRadioGroupComponent {
|
|
|
3587
3593
|
});
|
|
3588
3594
|
}
|
|
3589
3595
|
}
|
|
3590
|
-
ngOnInit() {
|
|
3591
|
-
if (this.#headingTextRequired && !this.headingText) {
|
|
3592
|
-
this.display = 'none';
|
|
3593
|
-
}
|
|
3594
|
-
this.#headingTextRequired?.validateLabelText(this.headingText);
|
|
3595
|
-
}
|
|
3596
3596
|
ngOnDestroy() {
|
|
3597
3597
|
this.#ngUnsubscribe.next();
|
|
3598
3598
|
this.#ngUnsubscribe.complete();
|
|
@@ -3661,19 +3661,24 @@ class SkyRadioGroupComponent {
|
|
|
3661
3661
|
this.stackedLg = !this.headingLevel && this.stacked;
|
|
3662
3662
|
this.stackedXL = !!this.headingLevel && this.stacked;
|
|
3663
3663
|
}
|
|
3664
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyRadioGroupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyRadioGroupIdService }, { token:
|
|
3665
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyRadioGroupComponent, selector: "sky-radio-group", inputs: { ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel", disabled: ["disabled", "disabled", booleanAttribute], headingLevel: ["headingLevel", "headingLevel", numberAttribute], headingStyle: ["headingStyle", "headingStyle", numberAttribute4], name: "name", required: "required", stacked: ["stacked", "stacked", booleanAttribute], value: "value", tabIndex: "tabIndex", headingText: "headingText", headingHidden: ["headingHidden", "headingHidden", booleanAttribute], hintText: "hintText", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey" }, host: { properties: { "
|
|
3664
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyRadioGroupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyRadioGroupIdService }, { token: i3$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3665
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyRadioGroupComponent, selector: "sky-radio-group", inputs: { ariaLabelledBy: "ariaLabelledBy", ariaLabel: "ariaLabel", disabled: ["disabled", "disabled", booleanAttribute], headingLevel: ["headingLevel", "headingLevel", numberAttribute], headingStyle: ["headingStyle", "headingStyle", numberAttribute4], name: "name", required: ["required", "required", booleanAttribute], stacked: ["stacked", "stacked", booleanAttribute], value: "value", tabIndex: "tabIndex", headingText: "headingText", headingHidden: ["headingHidden", "headingHidden", booleanAttribute], hintText: "hintText", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", helpKey: "helpKey" }, host: { properties: { "class.sky-margin-stacked-lg": "this.stackedLg", "class.sky-margin-stacked-xl": "this.stackedXL" } }, providers: [
|
|
3666
3666
|
SkyRadioGroupIdService,
|
|
3667
3667
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
3668
|
-
], queries: [{ propertyName: "radios", predicate: SkyRadioComponent, descendants: true }], ngImport: i0, template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"
|
|
3668
|
+
], queries: [{ propertyName: "radios", predicate: SkyRadioComponent, descendants: true }], hostDirectives: [{ directive: SkyFormFieldLabelTextRequiredDirective, inputs: ["labelText", "headingText"] }], ngImport: i0, template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"isRequired ? true : null\"\n [attr.required]=\"isRequired ? '' : null\"\n [attr.aria-invalid]=\"!!ngControl?.errors\"\n [attr.aria-errormessage]=\"\n headingText && ngControl?.errors ? errorId : undefined\n \"\n>\n <span class=\"sky-radio-group-label-wrapper\">\n <legend\n *ngIf=\"headingText\"\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-sm': !hintText,\n 'sky-control-label-required': isRequired,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n <span *ngIf=\"!headingLevel\" [class]=\"headingClass\">\n {{ headingText }}\n </span>\n <h3 *ngIf=\"headingLevel === 3\" [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n <h4 *ngIf=\"headingLevel === 4\" [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n <h5 *ngIf=\"headingLevel === 5\" [class]=\"headingClass\">\n {{ headingText }}\n </h5>\n </legend>\n <sky-help-inline\n *ngIf=\"(helpPopoverContent || helpKey) && headingText\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </span>\n\n <div skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-font-deemphasized sky-radio-group-hint-text\"\n >\n {{ hintText }}\n </div>\n </div>\n <ng-content />\n</fieldset>\n<sky-form-errors\n *ngIf=\"headingText && ngControl?.errors\"\n [id]=\"errorId\"\n [errors]=\"ngControl?.errors\"\n [labelText]=\"'skyux_radio_group_required_label_text' | skyLibResources\"\n [showErrors]=\"ngControl?.touched || ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg,:host.sky-margin-stacked-xl{display:block}.sky-radio-group-hint-text{margin-bottom:var(--sky-margin-stacked-lg)}.sky-radio-group-label-wrapper{display:flex}h3,h4,h5{margin:0;display:inline-block}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyFormErrorsComponent, selector: "sky-form-errors", inputs: ["errors", "labelText", "showErrors"] }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }] }); }
|
|
3669
3669
|
}
|
|
3670
3670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyRadioGroupComponent, decorators: [{
|
|
3671
3671
|
type: Component,
|
|
3672
|
-
args: [{ selector: 'sky-radio-group',
|
|
3672
|
+
args: [{ selector: 'sky-radio-group', hostDirectives: [
|
|
3673
|
+
{
|
|
3674
|
+
directive: SkyFormFieldLabelTextRequiredDirective,
|
|
3675
|
+
inputs: ['labelText: headingText'],
|
|
3676
|
+
},
|
|
3677
|
+
], providers: [
|
|
3673
3678
|
SkyRadioGroupIdService,
|
|
3674
3679
|
{ provide: SKY_FORM_ERRORS_ENABLED, useValue: true },
|
|
3675
|
-
], template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"
|
|
3676
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyRadioGroupIdService }, { type:
|
|
3680
|
+
], template: "<fieldset\n class=\"sky-radio-group\"\n role=\"radiogroup\"\n [attr.aria-label]=\"headingText ? undefined : ariaLabel\"\n [attr.aria-labelledby]=\"headingText ? undefined : ariaLabelledBy\"\n [attr.aria-describedby]=\"hintText ? hintTextEl.id : undefined\"\n [attr.aria-owns]=\"ariaOwns\"\n [attr.aria-required]=\"isRequired ? true : null\"\n [attr.required]=\"isRequired ? '' : null\"\n [attr.aria-invalid]=\"!!ngControl?.errors\"\n [attr.aria-errormessage]=\"\n headingText && ngControl?.errors ? errorId : undefined\n \"\n>\n <span class=\"sky-radio-group-label-wrapper\">\n <legend\n *ngIf=\"headingText\"\n class=\"sky-control-label\"\n [ngClass]=\"{\n 'sky-screen-reader-only': headingHidden,\n 'sky-margin-stacked-sm': !hintText,\n 'sky-control-label-required': isRequired,\n 'sky-margin-inline-xs': helpPopoverContent\n }\"\n >\n <span *ngIf=\"!headingLevel\" [class]=\"headingClass\">\n {{ headingText }}\n </span>\n <h3 *ngIf=\"headingLevel === 3\" [class]=\"headingClass\">\n {{ headingText }}\n </h3>\n <h4 *ngIf=\"headingLevel === 4\" [class]=\"headingClass\">\n {{ headingText }}\n </h4>\n <h5 *ngIf=\"headingLevel === 5\" [class]=\"headingClass\">\n {{ headingText }}\n </h5>\n </legend>\n <sky-help-inline\n *ngIf=\"(helpPopoverContent || helpKey) && headingText\"\n [helpKey]=\"helpKey\"\n [labelText]=\"headingText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n </span>\n\n <div skyId #hintTextEl=\"skyId\">\n <div\n *ngIf=\"hintText\"\n class=\"sky-font-deemphasized sky-radio-group-hint-text\"\n >\n {{ hintText }}\n </div>\n </div>\n <ng-content />\n</fieldset>\n<sky-form-errors\n *ngIf=\"headingText && ngControl?.errors\"\n [id]=\"errorId\"\n [errors]=\"ngControl?.errors\"\n [labelText]=\"'skyux_radio_group_required_label_text' | skyLibResources\"\n [showErrors]=\"ngControl?.touched || ngControl?.dirty\"\n>\n <ng-content select=\"sky-form-error\" />\n</sky-form-errors>\n", styles: [":host.sky-margin-stacked-lg,:host.sky-margin-stacked-xl{display:block}.sky-radio-group-hint-text{margin-bottom:var(--sky-margin-stacked-lg)}.sky-radio-group-label-wrapper{display:flex}h3,h4,h5{margin:0;display:inline-block}\n"] }]
|
|
3681
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: SkyRadioGroupIdService }, { type: i3$1.NgControl, decorators: [{
|
|
3677
3682
|
type: Self
|
|
3678
3683
|
}, {
|
|
3679
3684
|
type: Optional
|
|
@@ -3693,7 +3698,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
3693
3698
|
}], name: [{
|
|
3694
3699
|
type: Input
|
|
3695
3700
|
}], required: [{
|
|
3696
|
-
type: Input
|
|
3701
|
+
type: Input,
|
|
3702
|
+
args: [{ transform: booleanAttribute }]
|
|
3697
3703
|
}], stacked: [{
|
|
3698
3704
|
type: Input,
|
|
3699
3705
|
args: [{ transform: booleanAttribute }]
|
|
@@ -3717,9 +3723,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
3717
3723
|
}], radios: [{
|
|
3718
3724
|
type: ContentChildren,
|
|
3719
3725
|
args: [SkyRadioComponent, { descendants: true }]
|
|
3720
|
-
}], display: [{
|
|
3721
|
-
type: HostBinding,
|
|
3722
|
-
args: ['style.display']
|
|
3723
3726
|
}], stackedLg: [{
|
|
3724
3727
|
type: HostBinding,
|
|
3725
3728
|
args: ['class.sky-margin-stacked-lg']
|
|
@@ -3748,7 +3751,7 @@ class SkyRadioLabelComponent {
|
|
|
3748
3751
|
});
|
|
3749
3752
|
}
|
|
3750
3753
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyRadioLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3751
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyRadioLabelComponent, selector: "sky-radio-label", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<span class=\"sky-switch-label\"\n ><span skyTrim><ng-content /></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\" /></span\n></span>\n", dependencies: [{ kind: "directive", type: i1$
|
|
3754
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyRadioLabelComponent, selector: "sky-radio-label", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: "<span class=\"sky-switch-label\"\n ><span skyTrim><ng-content /></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\" /></span\n></span>\n", dependencies: [{ kind: "directive", type: i1$1.λ4, selector: "[skyTrim]" }] }); }
|
|
3752
3755
|
}
|
|
3753
3756
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyRadioLabelComponent, decorators: [{
|
|
3754
3757
|
type: Component,
|
|
@@ -3960,12 +3963,12 @@ class SkySelectionBoxAdapterService {
|
|
|
3960
3963
|
const el = element.nativeElement;
|
|
3961
3964
|
el.tabIndex = tabIndex;
|
|
3962
3965
|
}
|
|
3963
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxAdapterService, deps: [{ token: i1$
|
|
3966
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxAdapterService, deps: [{ token: i1$1.SkyCoreAdapterService }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3964
3967
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxAdapterService }); }
|
|
3965
3968
|
}
|
|
3966
3969
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxAdapterService, decorators: [{
|
|
3967
3970
|
type: Injectable
|
|
3968
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3971
|
+
}], ctorParameters: () => [{ type: i1$1.SkyCoreAdapterService }, { type: i0.RendererFactory2 }] });
|
|
3969
3972
|
|
|
3970
3973
|
/**
|
|
3971
3974
|
* Specifies the description to display in a selection box.
|
|
@@ -4083,7 +4086,7 @@ class SkySelectionBoxComponent {
|
|
|
4083
4086
|
}
|
|
4084
4087
|
}
|
|
4085
4088
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkySelectionBoxAdapterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4086
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", 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: "<label\n class=\"sky-selection-box sky-rounded-corners sky-btn sky-btn-default\"\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 (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\" />\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\" />\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\" />\n </div>\n </div>\n\n <div class=\"sky-selection-box-control\" #control>\n <ng-content select=\"sky-radio\" />\n <ng-content select=\"sky-checkbox\" />\n </div>\n</label>\n", styles: [".sky-selection-box{display:flex;flex-flow:row nowrap;padding:15px;text-align:left}.sky-selection-box:hover{background:#fff;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:var(--sky-background-color-item-selected);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:#ebfbff;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:var(--sky-background-color-item-selected);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:#ebfbff;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"], dependencies: [{ kind: "directive", type:
|
|
4089
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", 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: "<label\n class=\"sky-selection-box sky-rounded-corners sky-btn sky-btn-default\"\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 (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\" />\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\" />\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\" />\n </div>\n </div>\n\n <div class=\"sky-selection-box-control\" #control>\n <ng-content select=\"sky-radio\" />\n <ng-content select=\"sky-checkbox\" />\n </div>\n</label>\n", styles: [".sky-selection-box{display:flex;flex-flow:row nowrap;padding:15px;text-align:left}.sky-selection-box:hover{background:#fff;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:var(--sky-background-color-item-selected);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:#ebfbff;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:var(--sky-background-color-item-selected);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:#ebfbff;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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4087
4090
|
}
|
|
4088
4091
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxComponent, decorators: [{
|
|
4089
4092
|
type: Component,
|
|
@@ -4210,13 +4213,13 @@ class SkySelectionBoxGridComponent {
|
|
|
4210
4213
|
this.#coreAdapterService.syncMaxHeight(this.containerElementRef, SKY_SELECTION_BOX_CLASS_NAME);
|
|
4211
4214
|
}
|
|
4212
4215
|
}
|
|
4213
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxGridComponent, deps: [{ token: i1$
|
|
4214
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkySelectionBoxGridComponent, selector: "sky-selection-box-grid", inputs: { alignItems: "alignItems" }, host: { listeners: { "window:resize": "onWindowResize()" } }, queries: [{ propertyName: "selectionBoxes", predicate: SkySelectionBoxComponent, read: SkySelectionBoxComponent }], viewQueries: [{ propertyName: "containerElementRef", 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\" />\n</div>\n", styles: [":host{display:block}.sky-selection-box-grid{display:flex;flex-flow:row wrap;padding:0 7.5px;margin:0 auto var(--sky-compat-selection-box-grid-margin-bottom, -15px) 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"], dependencies: [{ kind: "directive", type:
|
|
4216
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxGridComponent, deps: [{ token: i1$1.SkyCoreAdapterService }, { token: SkySelectionBoxAdapterService }, { token: i0.ElementRef }, { token: i1$1.SkyMutationObserverService }, { token: i0.NgZone }, { token: i4.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4217
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkySelectionBoxGridComponent, selector: "sky-selection-box-grid", inputs: { alignItems: "alignItems" }, host: { listeners: { "window:resize": "onWindowResize()" } }, queries: [{ propertyName: "selectionBoxes", predicate: SkySelectionBoxComponent, read: SkySelectionBoxComponent }], viewQueries: [{ propertyName: "containerElementRef", 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\" />\n</div>\n", styles: [":host{display:block}.sky-selection-box-grid{display:flex;flex-flow:row wrap;padding:0 7.5px;margin:0 auto var(--sky-compat-selection-box-grid-margin-bottom, -15px) 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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4215
4218
|
}
|
|
4216
4219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkySelectionBoxGridComponent, decorators: [{
|
|
4217
4220
|
type: Component,
|
|
4218
4221
|
args: [{ selector: 'sky-selection-box-grid', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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\" />\n</div>\n", styles: [":host{display:block}.sky-selection-box-grid{display:flex;flex-flow:row wrap;padding:0 7.5px;margin:0 auto var(--sky-compat-selection-box-grid-margin-bottom, -15px) 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"] }]
|
|
4219
|
-
}], ctorParameters: () => [{ type: i1$
|
|
4222
|
+
}], ctorParameters: () => [{ type: i1$1.SkyCoreAdapterService }, { type: SkySelectionBoxAdapterService }, { type: i0.ElementRef }, { type: i1$1.SkyMutationObserverService }, { type: i0.NgZone }, { type: i4.SkyThemeService, decorators: [{
|
|
4220
4223
|
type: Optional
|
|
4221
4224
|
}] }], propDecorators: { alignItems: [{
|
|
4222
4225
|
type: Input
|
|
@@ -4293,7 +4296,7 @@ class SkyToggleSwitchLabelComponent {
|
|
|
4293
4296
|
});
|
|
4294
4297
|
}
|
|
4295
4298
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyToggleSwitchLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4296
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyToggleSwitchLabelComponent, selector: "sky-toggle-switch-label", ngImport: i0, template: "<span skyTrim><ng-content /></span>\n", dependencies: [{ kind: "directive", type: i1$
|
|
4299
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: SkyToggleSwitchLabelComponent, selector: "sky-toggle-switch-label", ngImport: i0, template: "<span skyTrim><ng-content /></span>\n", dependencies: [{ kind: "directive", type: i1$1.λ4, selector: "[skyTrim]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4297
4300
|
}
|
|
4298
4301
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyToggleSwitchLabelComponent, decorators: [{
|
|
4299
4302
|
type: Component,
|
|
@@ -4358,7 +4361,6 @@ class SkyToggleSwitchComponent {
|
|
|
4358
4361
|
#_ariaLabel;
|
|
4359
4362
|
#_checked;
|
|
4360
4363
|
#changeDetector;
|
|
4361
|
-
#labelTextRequired;
|
|
4362
4364
|
constructor(changeDetector, idService) {
|
|
4363
4365
|
/**
|
|
4364
4366
|
* Whether to disable the toggle switch on template-driven forms. Don't use this input on reactive forms because they may overwrite the input or leave the control out of sync.
|
|
@@ -4384,9 +4386,6 @@ class SkyToggleSwitchComponent {
|
|
|
4384
4386
|
this.#logSvc = inject(SkyLogService);
|
|
4385
4387
|
this.#ngUnsubscribe = new Subject();
|
|
4386
4388
|
this.#_checked = false;
|
|
4387
|
-
this.#labelTextRequired = inject(SkyFormFieldLabelTextRequiredService, {
|
|
4388
|
-
optional: true,
|
|
4389
|
-
});
|
|
4390
4389
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4391
4390
|
/* istanbul ignore next */
|
|
4392
4391
|
this.#onTouched = () => { };
|
|
@@ -4415,12 +4414,6 @@ class SkyToggleSwitchComponent {
|
|
|
4415
4414
|
this.enableIndicatorAnimation = true;
|
|
4416
4415
|
});
|
|
4417
4416
|
}
|
|
4418
|
-
ngOnInit() {
|
|
4419
|
-
if (this.#labelTextRequired && !this.labelText) {
|
|
4420
|
-
this.display = 'none';
|
|
4421
|
-
}
|
|
4422
|
-
this.#labelTextRequired?.validateLabelText(this.labelText);
|
|
4423
|
-
}
|
|
4424
4417
|
ngOnDestroy() {
|
|
4425
4418
|
this.#ngUnsubscribe.next();
|
|
4426
4419
|
this.#ngUnsubscribe.complete();
|
|
@@ -4468,19 +4461,24 @@ class SkyToggleSwitchComponent {
|
|
|
4468
4461
|
#toggleChecked() {
|
|
4469
4462
|
this.checked = !this.checked;
|
|
4470
4463
|
}
|
|
4471
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyToggleSwitchComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$
|
|
4472
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyToggleSwitchComponent, selector: "sky-toggle-switch", inputs: { ariaLabel: "ariaLabel", checked: "checked", disabled: "disabled", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", tabIndex: "tabIndex", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], helpKey: "helpKey" }, outputs: { toggleChange: "toggleChange" },
|
|
4464
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyToggleSwitchComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.SkyIdService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4465
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.1.2", type: SkyToggleSwitchComponent, selector: "sky-toggle-switch", inputs: { ariaLabel: "ariaLabel", checked: "checked", disabled: "disabled", helpPopoverContent: "helpPopoverContent", helpPopoverTitle: "helpPopoverTitle", tabIndex: "tabIndex", labelText: "labelText", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], helpKey: "helpKey" }, outputs: { toggleChange: "toggleChange" }, providers: [
|
|
4473
4466
|
SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,
|
|
4474
4467
|
SKY_TOGGLE_SWITCH_VALIDATOR,
|
|
4475
|
-
], queries: [{ propertyName: "labelComponents", predicate: SkyToggleSwitchLabelComponent }], ngImport: i0, template: "<span\n class=\"sky-toggle-switch\"\n [ngClass]=\"{\n 'sky-toggle-switch-with-label': hasLabelComponent || labelText\n }\"\n>\n <button\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n skyId\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"labelText || ariaLabel || null\"\n [attr.aria-labelledby]=\"\n !ariaLabel && (hasLabelComponent || labelText) ? labelId : null\n \"\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 #toggle=\"skyId\"\n >\n <div aria-hidden=\"true\" class=\"sky-toggle-switch-switch\">\n <i\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n > </i\n >\n </div>\n </button>\n <span>\n <label\n *ngIf=\"hasLabelComponent || labelText\"\n [for]=\"toggle.id\"\n [attr.id]=\"labelId\"\n class=\"sky-toggle-switch-label\"\n >\n <ng-container *ngIf=\"labelText; else labelContent\">\n <ng-container *ngIf=\"!labelHidden\">{{ labelText }}</ng-container>\n </ng-container>\n </label>\n <span class=\"sky-control-help-container\">\n <sky-help-inline\n *ngIf=\"labelText && (helpPopoverContent || helpKey)\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n <ng-content select=\".sky-control-help\" />\n </span>\n </span>\n</span>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-toggle-switch-label\" />\n</ng-template>\n", styles: [".sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch.sky-toggle-switch-with-label{gap:10px}.sky-toggle-switch-switch{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:none;line-height:1.428571429;width:46px;display:inline-block}.sky-toggle-switch-button{border:none;background:none;margin:0;padding:0;outline:none}.sky-toggle-switch-button:focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){cursor:pointer}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled):not(:focus-visible) .sky-toggle-switch-switch{border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:#c1e8fb;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked:not(:focus-visible,.sky-toggle-switch-disabled) .sky-toggle-switch-switch{border-color:#00b4f1}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{color:var(--sky-text-color-default)}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.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 .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,: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 .sky-toggle-switch-switch{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{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-visible .sky-toggle-switch-switch{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-visible) .sky-toggle-switch-switch{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 .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,.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 .sky-toggle-switch-switch{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{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"], dependencies: [{ kind: "directive", type:
|
|
4468
|
+
], queries: [{ propertyName: "labelComponents", predicate: SkyToggleSwitchLabelComponent }], hostDirectives: [{ directive: SkyFormFieldLabelTextRequiredDirective, inputs: ["labelText", "labelText"] }], ngImport: i0, template: "<span\n class=\"sky-toggle-switch\"\n [ngClass]=\"{\n 'sky-toggle-switch-with-label': hasLabelComponent || labelText\n }\"\n>\n <button\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n skyId\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"labelText || ariaLabel || null\"\n [attr.aria-labelledby]=\"\n !ariaLabel && (hasLabelComponent || labelText) ? labelId : null\n \"\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 #toggle=\"skyId\"\n >\n <div aria-hidden=\"true\" class=\"sky-toggle-switch-switch\">\n <i\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n > </i\n >\n </div>\n </button>\n <span>\n <label\n *ngIf=\"hasLabelComponent || labelText\"\n [for]=\"toggle.id\"\n [attr.id]=\"labelId\"\n class=\"sky-toggle-switch-label\"\n >\n <ng-container *ngIf=\"labelText; else labelContent\">\n <ng-container *ngIf=\"!labelHidden\">{{ labelText }}</ng-container>\n </ng-container>\n </label>\n <span class=\"sky-control-help-container\">\n <sky-help-inline\n *ngIf=\"labelText && (helpPopoverContent || helpKey)\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n <ng-content select=\".sky-control-help\" />\n </span>\n </span>\n</span>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-toggle-switch-label\" />\n</ng-template>\n", styles: [".sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch.sky-toggle-switch-with-label{gap:10px}.sky-toggle-switch-switch{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:none;line-height:1.428571429;width:46px;display:inline-block}.sky-toggle-switch-button{border:none;background:none;margin:0;padding:0;outline:none}.sky-toggle-switch-button:focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){cursor:pointer}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled):not(:focus-visible) .sky-toggle-switch-switch{border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:#c1e8fb;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked:not(:focus-visible,.sky-toggle-switch-disabled) .sky-toggle-switch-switch{border-color:#00b4f1}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{color:var(--sky-text-color-default)}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.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 .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,: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 .sky-toggle-switch-switch{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{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-visible .sky-toggle-switch-switch{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-visible) .sky-toggle-switch-switch{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 .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,.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 .sky-toggle-switch-switch{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.λ1, selector: "sky-help-inline", inputs: ["ariaControls", "ariaExpanded", "ariaLabel", "helpKey", "labelledBy", "labelText", "popoverContent", "popoverTitle"], outputs: ["actionClick"] }, { kind: "directive", type: i1$1.λ2, selector: "[skyId]", exportAs: ["skyId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4476
4469
|
}
|
|
4477
4470
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SkyToggleSwitchComponent, decorators: [{
|
|
4478
4471
|
type: Component,
|
|
4479
|
-
args: [{ selector: 'sky-toggle-switch',
|
|
4472
|
+
args: [{ selector: 'sky-toggle-switch', hostDirectives: [
|
|
4473
|
+
{
|
|
4474
|
+
directive: SkyFormFieldLabelTextRequiredDirective,
|
|
4475
|
+
inputs: ['labelText'],
|
|
4476
|
+
},
|
|
4477
|
+
], providers: [
|
|
4480
4478
|
SKY_TOGGLE_SWITCH_CONTROL_VALUE_ACCESSOR,
|
|
4481
4479
|
SKY_TOGGLE_SWITCH_VALIDATOR,
|
|
4482
4480
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"sky-toggle-switch\"\n [ngClass]=\"{\n 'sky-toggle-switch-with-label': hasLabelComponent || labelText\n }\"\n>\n <button\n class=\"sky-toggle-switch-button\"\n role=\"switch\"\n type=\"button\"\n skyId\n [attr.aria-checked]=\"checked\"\n [attr.aria-label]=\"labelText || ariaLabel || null\"\n [attr.aria-labelledby]=\"\n !ariaLabel && (hasLabelComponent || labelText) ? labelId : null\n \"\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 #toggle=\"skyId\"\n >\n <div aria-hidden=\"true\" class=\"sky-toggle-switch-switch\">\n <i\n class=\"sky-toggle-switch-indicator\"\n [ngClass]=\"{\n 'sky-toggle-switch-transition': enableIndicatorAnimation\n }\"\n > </i\n >\n </div>\n </button>\n <span>\n <label\n *ngIf=\"hasLabelComponent || labelText\"\n [for]=\"toggle.id\"\n [attr.id]=\"labelId\"\n class=\"sky-toggle-switch-label\"\n >\n <ng-container *ngIf=\"labelText; else labelContent\">\n <ng-container *ngIf=\"!labelHidden\">{{ labelText }}</ng-container>\n </ng-container>\n </label>\n <span class=\"sky-control-help-container\">\n <sky-help-inline\n *ngIf=\"labelText && (helpPopoverContent || helpKey)\"\n [helpKey]=\"helpKey\"\n [labelText]=\"labelText\"\n [popoverTitle]=\"helpPopoverTitle\"\n [popoverContent]=\"helpPopoverContent\"\n />\n <ng-content select=\".sky-control-help\" />\n </span>\n </span>\n</span>\n\n<ng-template #labelContent>\n <ng-content select=\"sky-toggle-switch-label\" />\n</ng-template>\n", styles: [".sky-toggle-switch{display:inline-flex;align-items:baseline}.sky-toggle-switch.sky-toggle-switch-with-label{gap:10px}.sky-toggle-switch-switch{border:1px solid #cdcfd2;background-color:#eeeeef;padding:1px;border-radius:24px;flex:none;line-height:1.428571429;width:46px;display:inline-block}.sky-toggle-switch-button{border:none;background:none;margin:0;padding:0;outline:none}.sky-toggle-switch-button:focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled){cursor:pointer}.sky-toggle-switch-button:hover:not(.sky-toggle-switch-disabled):not(:focus-visible) .sky-toggle-switch-switch{border-color:#00b4f1;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:#c1e8fb;border-width:2px;padding:0}.sky-toggle-switch-button.sky-toggle-switch-checked:not(:focus-visible,.sky-toggle-switch-disabled) .sky-toggle-switch-switch{border-color:#00b4f1}.sky-toggle-switch-button.sky-toggle-switch-checked .sky-toggle-switch-indicator{left:100%}.sky-toggle-switch-button.sky-toggle-switch-disabled{color:var(--sky-text-color-default)}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{background-color:#cdcfd2;border-color:transparent}.sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-indicator{background-color:#eeeeef}.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 .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}:host-context(.sky-theme-modern) .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,: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 .sky-toggle-switch-switch{padding:1px}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,:host-context(.sky-theme-modern) .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{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-visible .sky-toggle-switch-switch{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-visible) .sky-toggle-switch-switch{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 .sky-toggle-switch-switch{background-color:#fff;border:1px solid var(--sky-border-color-neutral-medium-dark);width:48px;transition:border-color .15s,box-shadow .15s}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch{cursor:not-allowed}.sky-theme-modern .sky-toggle-switch-button.sky-toggle-switch-disabled .sky-toggle-switch-switch,.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 .sky-toggle-switch-switch{padding:1px}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled).sky-toggle-switch-checked .sky-toggle-switch-switch{background-color:var(--sky-background-color-input-selected);border-color:#1870b8}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):active .sky-toggle-switch-switch,.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):focus-visible .sky-toggle-switch-switch{outline:none;border:solid 2px #1870B8;padding:0}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):focus-visible .sky-toggle-switch-switch{box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-toggle-switch-button:not(.sky-toggle-switch-disabled):not(:active):hover:not(:focus-visible) .sky-toggle-switch-switch{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"] }]
|
|
4483
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$
|
|
4481
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.SkyIdService }], propDecorators: { ariaLabel: [{
|
|
4484
4482
|
type: Input
|
|
4485
4483
|
}], checked: [{
|
|
4486
4484
|
type: Input
|
|
@@ -4504,9 +4502,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
4504
4502
|
}], labelComponents: [{
|
|
4505
4503
|
type: ContentChildren,
|
|
4506
4504
|
args: [SkyToggleSwitchLabelComponent]
|
|
4507
|
-
}], display: [{
|
|
4508
|
-
type: HostBinding,
|
|
4509
|
-
args: ['style.display']
|
|
4510
4505
|
}] } });
|
|
4511
4506
|
|
|
4512
4507
|
class SkyToggleSwitchModule {
|
|
@@ -4541,5 +4536,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
4541
4536
|
* Generated bundle index. Do not edit.
|
|
4542
4537
|
*/
|
|
4543
4538
|
|
|
4544
|
-
export { SKY_FORM_ERRORS_ENABLED, SkyCharacterCounterModule, SkyCheckboxModule, SkyFieldGroupModule, SkyFileAttachmentsModule, SkyFileSizePipe, SkyFormErrorModule, SkyFormErrorsModule, SkyFormFieldLabelTextRequiredService, SkyInputBoxHostService, SkyInputBoxModule, SkyRadioModule, SkyRequiredStateDirective, SkySelectionBoxModule, SkyToggleSwitchModule, SkyCharacterCounterIndicatorComponent as λ1, SkyInputBoxComponent as λ10, SkyRadioGroupComponent as λ11, SkyRadioLabelComponent as λ12, SkyRadioComponent as λ13, SkySelectionBoxDescriptionComponent as λ14, SkySelectionBoxGridComponent as λ15, SkySelectionBoxHeaderComponent as λ16, SkySelectionBoxComponent as λ17, SkyToggleSwitchLabelComponent as λ18, SkyToggleSwitchComponent as λ19, SkyCharacterCounterInputDirective as λ2, SkyInputBoxControlDirective as λ20, SkyFormErrorsComponent as λ21, SkyFormErrorComponent as λ22, SkyCharacterCounterScreenReaderPipe as λ23, SkyCheckboxGroupComponent as λ24, SkyFieldGroupComponent as λ25, SkyInputBoxHintTextPipe as λ26, SkyCheckboxComponent as λ3, SkyCheckboxLabelComponent as λ4, SkyFileAttachmentLabelComponent as λ6, SkyFileAttachmentComponent as λ7, SkyFileDropComponent as λ8, SkyFileItemComponent as λ9 };
|
|
4539
|
+
export { SKY_FORM_ERRORS_ENABLED, SkyCharacterCounterModule, SkyCheckboxModule, SkyFieldGroupModule, SkyFileAttachmentModule, SkyFileAttachmentsModule, SkyFileDropModule, SkyFileSizePipe, SkyFormErrorModule, SkyFormErrorsModule, SkyFormFieldLabelTextRequiredDirective, SkyFormFieldLabelTextRequiredService, SkyInputBoxHostService, SkyInputBoxModule, SkyRadioModule, SkyRequiredStateDirective, SkySelectionBoxModule, SkyToggleSwitchModule, SkyCharacterCounterIndicatorComponent as λ1, SkyInputBoxComponent as λ10, SkyRadioGroupComponent as λ11, SkyRadioLabelComponent as λ12, SkyRadioComponent as λ13, SkySelectionBoxDescriptionComponent as λ14, SkySelectionBoxGridComponent as λ15, SkySelectionBoxHeaderComponent as λ16, SkySelectionBoxComponent as λ17, SkyToggleSwitchLabelComponent as λ18, SkyToggleSwitchComponent as λ19, SkyCharacterCounterInputDirective as λ2, SkyInputBoxControlDirective as λ20, SkyFormErrorsComponent as λ21, SkyFormErrorComponent as λ22, SkyCharacterCounterScreenReaderPipe as λ23, SkyCheckboxGroupComponent as λ24, SkyFieldGroupComponent as λ25, SkyInputBoxHintTextPipe as λ26, SkyCheckboxComponent as λ3, SkyCheckboxLabelComponent as λ4, SkyFileAttachmentLabelComponent as λ6, SkyFileAttachmentComponent as λ7, SkyFileDropComponent as λ8, SkyFileItemComponent as λ9 };
|
|
4545
4540
|
//# sourceMappingURL=skyux-forms.mjs.map
|