@skyux/forms 10.2.0 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation.json +3535 -3008
- package/esm2022/index.mjs +5 -3
- package/esm2022/lib/modules/checkbox/checkbox.component.mjs +2 -3
- package/esm2022/lib/modules/field-group/field-group-heading-level.mjs +2 -0
- package/esm2022/lib/modules/field-group/field-group-heading-style.mjs +2 -0
- package/esm2022/lib/modules/field-group/field-group.component.mjs +60 -0
- package/esm2022/lib/modules/field-group/field-group.module.mjs +16 -0
- package/esm2022/lib/modules/file-attachment/file-attachment.component.mjs +2 -3
- package/esm2022/lib/modules/file-attachment/file-drop.component.mjs +6 -4
- package/esm2022/lib/modules/input-box/input-box.component.mjs +42 -33
- package/esm2022/lib/modules/radio/radio-group.component.mjs +2 -3
- package/esm2022/lib/modules/radio/radio.component.mjs +2 -3
- package/fesm2022/skyux-forms.mjs +118 -64
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/index.d.ts +6 -2
- package/lib/modules/field-group/field-group-heading-level.d.ts +1 -0
- package/lib/modules/field-group/field-group-heading-style.d.ts +1 -0
- package/lib/modules/field-group/field-group.component.d.ts +41 -0
- package/lib/modules/field-group/field-group.module.d.ts +7 -0
- package/lib/modules/file-attachment/file-drop.component.d.ts +7 -1
- package/lib/modules/input-box/input-box.component.d.ts +5 -1
- package/package.json +7 -7
- package/esm2022/lib/modules/shared/forms-utility.mjs +0 -26
- package/lib/modules/shared/forms-utility.d.ts +0 -12
package/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { SkyCharacterCounterModule } from './lib/modules/character-counter/character-counter.module';
|
|
2
2
|
export { SkyCheckboxChange } from './lib/modules/checkbox/checkbox-change';
|
|
3
3
|
export { SkyCheckboxModule } from './lib/modules/checkbox/checkbox.module';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { SkyFieldGroupModule } from './lib/modules/field-group/field-group.module';
|
|
5
|
+
export { SkyFieldGroupHeadingLevel } from './lib/modules/field-group/field-group-heading-level';
|
|
6
|
+
export { SkyFieldGroupHeadingStyle } from './lib/modules/field-group/field-group-heading-style';
|
|
6
7
|
export { SkyFileAttachmentsModule } from './lib/modules/file-attachment/file-attachments.module';
|
|
7
8
|
export { SkyFileItem } from './lib/modules/file-attachment/file-item';
|
|
8
9
|
export { SkyFileItemErrorType } from './lib/modules/file-attachment/file-item-error-type';
|
|
@@ -11,6 +12,8 @@ export { SkyFileSizePipe } from './lib/modules/file-attachment/file-size.pipe';
|
|
|
11
12
|
export { SkyFileAttachmentChange } from './lib/modules/file-attachment/types/file-attachment-change';
|
|
12
13
|
export { SkyFileAttachmentClick } from './lib/modules/file-attachment/types/file-attachment-click';
|
|
13
14
|
export { SkyFileDropChange } from './lib/modules/file-attachment/types/file-drop-change';
|
|
15
|
+
export { SkyFormErrorsModule } from './lib/modules/form-error/form-errors.module';
|
|
16
|
+
export { SkyFormErrorModule } from './lib/modules/form-error/form-error.module';
|
|
14
17
|
export { SkyInputBoxHostService } from './lib/modules/input-box/input-box-host.service';
|
|
15
18
|
export { SkyInputBoxPopulateArgs } from './lib/modules/input-box/input-box-populate-args';
|
|
16
19
|
export { SkyInputBoxModule } from './lib/modules/input-box/input-box.module';
|
|
@@ -29,6 +32,7 @@ export { SkyCharacterCounterScreenReaderPipe as λ23 } from './lib/modules/chara
|
|
|
29
32
|
export { SkyCheckboxLabelComponent as λ4 } from './lib/modules/checkbox/checkbox-label.component';
|
|
30
33
|
export { SkyCheckboxComponent as λ3 } from './lib/modules/checkbox/checkbox.component';
|
|
31
34
|
export { SkyCheckboxGroupComponent as λ24 } from './lib/modules/checkbox/checkbox-group.component';
|
|
35
|
+
export { SkyFieldGroupComponent as λ25 } from './lib/modules/field-group/field-group.component';
|
|
32
36
|
export { SkyFileAttachmentLabelComponent as λ6 } from './lib/modules/file-attachment/file-attachment-label.component';
|
|
33
37
|
export { SkyFileAttachmentComponent as λ7 } from './lib/modules/file-attachment/file-attachment.component';
|
|
34
38
|
export { SkyFileDropComponent as λ8 } from './lib/modules/file-attachment/file-drop.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SkyFieldGroupHeadingLevel = 3 | 4;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SkyFieldGroupHeadingStyle = 3 | 4;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SkyFieldGroupHeadingLevel } from './field-group-heading-level';
|
|
2
|
+
import { SkyFieldGroupHeadingStyle } from './field-group-heading-style';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Organizes form fields into a group.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SkyFieldGroupComponent {
|
|
8
|
+
/**
|
|
9
|
+
* The text to display as the field group's label.
|
|
10
|
+
* @preview
|
|
11
|
+
*/
|
|
12
|
+
labelText: string;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether to hide the `labelText`.
|
|
15
|
+
* @preview
|
|
16
|
+
*/
|
|
17
|
+
labelHidden: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the field group is stacked on another field group. When specified, the appropriate
|
|
20
|
+
* vertical spacing is automatically added to the field group.
|
|
21
|
+
* @preview
|
|
22
|
+
*/
|
|
23
|
+
stacked: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The heading level in the document structure.
|
|
26
|
+
* @preview
|
|
27
|
+
*/
|
|
28
|
+
headingLevel: SkyFieldGroupHeadingLevel;
|
|
29
|
+
/**
|
|
30
|
+
* The heading font style.
|
|
31
|
+
* @preview
|
|
32
|
+
*/
|
|
33
|
+
set headingStyle(value: SkyFieldGroupHeadingStyle);
|
|
34
|
+
protected headingClass: string;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyFieldGroupComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyFieldGroupComponent, "sky-field-group", never, { "labelText": { "alias": "labelText"; "required": true; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "headingLevel": { "alias": "headingLevel"; "required": false; }; "headingStyle": { "alias": "headingStyle"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
37
|
+
static ngAcceptInputType_labelHidden: unknown;
|
|
38
|
+
static ngAcceptInputType_stacked: unknown;
|
|
39
|
+
static ngAcceptInputType_headingLevel: unknown;
|
|
40
|
+
static ngAcceptInputType_headingStyle: unknown;
|
|
41
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./field-group.component";
|
|
3
|
+
export declare class SkyFieldGroupModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyFieldGroupModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyFieldGroupModule, never, [typeof i1.SkyFieldGroupComponent], [typeof i1.SkyFieldGroupComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyFieldGroupModule>;
|
|
7
|
+
}
|
|
@@ -88,6 +88,12 @@ export declare class SkyFileDropComponent implements OnDestroy {
|
|
|
88
88
|
* @preview
|
|
89
89
|
*/
|
|
90
90
|
labelHidden: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* [Persistent inline help text](https://developer.blackbaud.com/skyux/design/guidelines/user-assistance#inline-help) that provides
|
|
93
|
+
* additional context to the user.
|
|
94
|
+
* @preview
|
|
95
|
+
*/
|
|
96
|
+
hintText: string | undefined;
|
|
91
97
|
inputEl: ElementRef | undefined;
|
|
92
98
|
rejectedOver: boolean;
|
|
93
99
|
acceptedOver: boolean;
|
|
@@ -105,6 +111,6 @@ export declare class SkyFileDropComponent implements OnDestroy {
|
|
|
105
111
|
addLink(event: Event): void;
|
|
106
112
|
onLinkBlur(): void;
|
|
107
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyFileDropComponent, never>;
|
|
108
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyFileDropComponent, "sky-file-drop", never, { "fileUploadAriaLabel": { "alias": "fileUploadAriaLabel"; "required": false; }; "linkUploadAriaLabel": { "alias": "linkUploadAriaLabel"; "required": false; }; "minFileSize": { "alias": "minFileSize"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "validateFn": { "alias": "validateFn"; "required": false; }; "acceptedTypes": { "alias": "acceptedTypes"; "required": false; }; "noClick": { "alias": "noClick"; "required": false; }; "allowLinks": { "alias": "allowLinks"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; }, { "filesChanged": "filesChanged"; "linkInputBlur": "linkInputBlur"; "linkChanged": "linkChanged"; }, never, ["*"], false, never>;
|
|
114
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyFileDropComponent, "sky-file-drop", never, { "fileUploadAriaLabel": { "alias": "fileUploadAriaLabel"; "required": false; }; "linkUploadAriaLabel": { "alias": "linkUploadAriaLabel"; "required": false; }; "minFileSize": { "alias": "minFileSize"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "validateFn": { "alias": "validateFn"; "required": false; }; "acceptedTypes": { "alias": "acceptedTypes"; "required": false; }; "noClick": { "alias": "noClick"; "required": false; }; "allowLinks": { "alias": "allowLinks"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; }, { "filesChanged": "filesChanged"; "linkInputBlur": "linkInputBlur"; "linkChanged": "linkChanged"; }, never, ["*"], false, never>;
|
|
109
115
|
static ngAcceptInputType_labelHidden: unknown;
|
|
110
116
|
}
|
|
@@ -18,7 +18,10 @@ export declare class SkyInputBoxComponent implements OnInit, AfterContentChecked
|
|
|
18
18
|
/**
|
|
19
19
|
* Whether to visually highlight the input box as disabled. To disable the input box's
|
|
20
20
|
* input element, use the HTML `disabled` attribute or the Angular `FormControl.disabled`
|
|
21
|
-
* property.
|
|
21
|
+
* property. If the input element is mapped to an Angular form control
|
|
22
|
+
* (e.g. `formControlName`, `ngModel`, etc.), "disabled" styles are applied automatically;
|
|
23
|
+
* if the input element is not associated with an Angular form control, the `disabled`
|
|
24
|
+
* property on the input box must be set to `true` to visually indicate
|
|
22
25
|
* the disabled state on the input box.
|
|
23
26
|
* @default false
|
|
24
27
|
*/
|
|
@@ -77,6 +80,7 @@ export declare class SkyInputBoxComponent implements OnInit, AfterContentChecked
|
|
|
77
80
|
inputRef: ElementRef | undefined;
|
|
78
81
|
protected controlDir: AbstractControlDirective | undefined;
|
|
79
82
|
protected helpPopoverOpen: boolean | undefined;
|
|
83
|
+
protected get isDisabled(): boolean;
|
|
80
84
|
protected get hasErrorsComputed(): boolean;
|
|
81
85
|
protected get required(): boolean;
|
|
82
86
|
protected characterCountScreenReader: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/forms",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@angular/core": "^17.3.1",
|
|
42
42
|
"@angular/forms": "^17.3.1",
|
|
43
43
|
"@angular/platform-browser": "^17.3.1",
|
|
44
|
-
"@skyux-sdk/testing": "10.
|
|
45
|
-
"@skyux/core": "10.
|
|
46
|
-
"@skyux/i18n": "10.
|
|
47
|
-
"@skyux/indicators": "10.
|
|
48
|
-
"@skyux/popovers": "10.
|
|
49
|
-
"@skyux/theme": "10.
|
|
44
|
+
"@skyux-sdk/testing": "10.4.0",
|
|
45
|
+
"@skyux/core": "10.4.0",
|
|
46
|
+
"@skyux/i18n": "10.4.0",
|
|
47
|
+
"@skyux/indicators": "10.4.0",
|
|
48
|
+
"@skyux/popovers": "10.4.0",
|
|
49
|
+
"@skyux/theme": "10.4.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"tslib": "^2.6.2"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Need to add the following to classes which contain static methods.
|
|
2
|
-
// See: https://github.com/ng-packagr/ng-packagr/issues/641
|
|
3
|
-
// @dynamic
|
|
4
|
-
export class SkyFormsUtility {
|
|
5
|
-
/** Coerces a data-bound value (typically a string) to a boolean. */
|
|
6
|
-
static coerceBooleanProperty(value) {
|
|
7
|
-
return value !== undefined && `${value}` !== 'false';
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Gets the required state of the checkbox.
|
|
11
|
-
* Currently, Angular doesn't offer a way to get this easily, so we have to create an empty
|
|
12
|
-
* control using the current validator to see if it throws a `required` validation error.
|
|
13
|
-
* https://github.com/angular/angular/issues/13461#issuecomment-340368046
|
|
14
|
-
*/
|
|
15
|
-
static hasRequiredValidation(ngControl) {
|
|
16
|
-
const abstractControl = ngControl.control;
|
|
17
|
-
if (abstractControl && abstractControl.validator) {
|
|
18
|
-
const validator = abstractControl.validator({});
|
|
19
|
-
if (validator && validator['required']) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybXMtdXRpbGl0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9mb3Jtcy9zcmMvbGliL21vZHVsZXMvc2hhcmVkL2Zvcm1zLXV0aWxpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEscUVBQXFFO0FBQ3JFLDJEQUEy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AgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG59XG4iXX0=
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NgControl } from '@angular/forms';
|
|
2
|
-
export declare class SkyFormsUtility {
|
|
3
|
-
/** Coerces a data-bound value (typically a string) to a boolean. */
|
|
4
|
-
static coerceBooleanProperty(value: any): boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Gets the required state of the checkbox.
|
|
7
|
-
* Currently, Angular doesn't offer a way to get this easily, so we have to create an empty
|
|
8
|
-
* control using the current validator to see if it throws a `required` validation error.
|
|
9
|
-
* https://github.com/angular/angular/issues/13461#issuecomment-340368046
|
|
10
|
-
*/
|
|
11
|
-
static hasRequiredValidation(ngControl: NgControl): boolean;
|
|
12
|
-
}
|