@skyux/forms 10.1.0 → 10.3.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 +3263 -2989
- package/esm2022/index.mjs +5 -3
- package/esm2022/lib/modules/checkbox/checkbox.component.mjs +2 -3
- package/esm2022/lib/modules/field-group/field-group.component.mjs +41 -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-attachments.module.mjs +5 -3
- package/esm2022/lib/modules/file-attachment/file-drop.component.mjs +21 -6
- package/esm2022/lib/modules/file-attachment/file-validate-function.mjs +1 -1
- package/esm2022/lib/modules/form-error/form-errors.component.mjs +3 -3
- 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/esm2022/lib/modules/shared/sky-forms-resources.module.mjs +10 -1
- package/fesm2022/skyux-forms.mjs +121 -66
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/index.d.ts +4 -2
- package/lib/modules/field-group/field-group.component.d.ts +26 -0
- package/lib/modules/field-group/field-group.module.d.ts +7 -0
- package/lib/modules/file-attachment/file-attachments.module.d.ts +1 -1
- package/lib/modules/file-attachment/file-drop.component.d.ts +4 -0
- package/lib/modules/file-attachment/file-validate-function.d.ts +3 -0
- 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,7 @@
|
|
|
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 { SkyFormErrorModule } from './lib/modules/form-error/form-error.module';
|
|
4
|
+
export { SkyFieldGroupModule } from './lib/modules/field-group/field-group.module';
|
|
6
5
|
export { SkyFileAttachmentsModule } from './lib/modules/file-attachment/file-attachments.module';
|
|
7
6
|
export { SkyFileItem } from './lib/modules/file-attachment/file-item';
|
|
8
7
|
export { SkyFileItemErrorType } from './lib/modules/file-attachment/file-item-error-type';
|
|
@@ -11,6 +10,8 @@ export { SkyFileSizePipe } from './lib/modules/file-attachment/file-size.pipe';
|
|
|
11
10
|
export { SkyFileAttachmentChange } from './lib/modules/file-attachment/types/file-attachment-change';
|
|
12
11
|
export { SkyFileAttachmentClick } from './lib/modules/file-attachment/types/file-attachment-click';
|
|
13
12
|
export { SkyFileDropChange } from './lib/modules/file-attachment/types/file-drop-change';
|
|
13
|
+
export { SkyFormErrorsModule } from './lib/modules/form-error/form-errors.module';
|
|
14
|
+
export { SkyFormErrorModule } from './lib/modules/form-error/form-error.module';
|
|
14
15
|
export { SkyInputBoxHostService } from './lib/modules/input-box/input-box-host.service';
|
|
15
16
|
export { SkyInputBoxPopulateArgs } from './lib/modules/input-box/input-box-populate-args';
|
|
16
17
|
export { SkyInputBoxModule } from './lib/modules/input-box/input-box.module';
|
|
@@ -29,6 +30,7 @@ export { SkyCharacterCounterScreenReaderPipe as λ23 } from './lib/modules/chara
|
|
|
29
30
|
export { SkyCheckboxLabelComponent as λ4 } from './lib/modules/checkbox/checkbox-label.component';
|
|
30
31
|
export { SkyCheckboxComponent as λ3 } from './lib/modules/checkbox/checkbox.component';
|
|
31
32
|
export { SkyCheckboxGroupComponent as λ24 } from './lib/modules/checkbox/checkbox-group.component';
|
|
33
|
+
export { SkyFieldGroupComponent as λ25 } from './lib/modules/field-group/field-group.component';
|
|
32
34
|
export { SkyFileAttachmentLabelComponent as λ6 } from './lib/modules/file-attachment/file-attachment-label.component';
|
|
33
35
|
export { SkyFileAttachmentComponent as λ7 } from './lib/modules/file-attachment/file-attachment.component';
|
|
34
36
|
export { SkyFileDropComponent as λ8 } from './lib/modules/file-attachment/file-drop.component';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Organizes form fields into a group.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SkyFieldGroupComponent {
|
|
6
|
+
/**
|
|
7
|
+
* The text to display as the field group's label.
|
|
8
|
+
* @preview
|
|
9
|
+
*/
|
|
10
|
+
labelText: string;
|
|
11
|
+
/**
|
|
12
|
+
* Indicates whether to hide the `labelText`.
|
|
13
|
+
* @preview
|
|
14
|
+
*/
|
|
15
|
+
labelHidden: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the field group is stacked on another field group. When specified, the appropriate
|
|
18
|
+
* vertical spacing is automatically added to the field group.
|
|
19
|
+
* @preview
|
|
20
|
+
*/
|
|
21
|
+
stacked: boolean;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyFieldGroupComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyFieldGroupComponent, "sky-field-group", never, { "labelText": { "alias": "labelText"; "required": true; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
24
|
+
static ngAcceptInputType_labelHidden: unknown;
|
|
25
|
+
static ngAcceptInputType_stacked: unknown;
|
|
26
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -14,6 +14,6 @@ import * as i12 from "@skyux/core";
|
|
|
14
14
|
import * as i13 from "@skyux/theme";
|
|
15
15
|
export declare class SkyFileAttachmentsModule {
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyFileAttachmentsModule, never>;
|
|
17
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyFileAttachmentsModule, [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.SkyFormsResourcesModule, typeof i9.SkyFormErrorModule, typeof i10.SkyFormErrorsModule, typeof i11.SkyIconModule, typeof i12.SkyIdModule, typeof i13.SkyThemeModule, typeof i12.SkyTrimModule], [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe]>;
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyFileAttachmentsModule, [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.SkyFormsResourcesModule, typeof i9.SkyFormErrorModule, typeof i10.SkyFormErrorsModule, typeof i11.SkyIconModule, typeof i12.SkyIdModule, typeof i13.SkyThemeModule, typeof i12.SkyTrimModule], [typeof i1.SkyFileAttachmentComponent, typeof i2.SkyFileAttachmentLabelComponent, typeof i3.SkyFileDropComponent, typeof i4.SkyFileItemComponent, typeof i5.SkyFileSizePipe, typeof i9.SkyFormErrorModule]>;
|
|
18
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<SkyFileAttachmentsModule>;
|
|
19
19
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { SkyFileItem } from './file-item';
|
|
2
3
|
import { SkyFileLink } from './file-link';
|
|
3
4
|
import { SkyFileValidateFn } from './file-validate-function';
|
|
4
5
|
import { SkyFileDropChange } from './types/file-drop-change';
|
|
@@ -60,6 +61,7 @@ export declare class SkyFileDropComponent implements OnDestroy {
|
|
|
60
61
|
/**
|
|
61
62
|
* The custom validation function. This validation runs alongside the internal
|
|
62
63
|
* file validation. This function takes a `SkyFileItem` object as a parameter.
|
|
64
|
+
* The string returned is used as the error message in multi-file attachment.
|
|
63
65
|
*/
|
|
64
66
|
validateFn: SkyFileValidateFn | undefined;
|
|
65
67
|
/**
|
|
@@ -90,6 +92,8 @@ export declare class SkyFileDropComponent implements OnDestroy {
|
|
|
90
92
|
rejectedOver: boolean;
|
|
91
93
|
acceptedOver: boolean;
|
|
92
94
|
linkUrl: string | undefined;
|
|
95
|
+
protected errorId: string;
|
|
96
|
+
protected rejectedFiles: SkyFileItem[];
|
|
93
97
|
ngOnDestroy(): void;
|
|
94
98
|
dropClicked(): void;
|
|
95
99
|
fileChangeEvent(fileChangeEvent: Event): void;
|
|
@@ -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.3.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.3.0",
|
|
45
|
+
"@skyux/core": "10.3.0",
|
|
46
|
+
"@skyux/i18n": "10.3.0",
|
|
47
|
+
"@skyux/indicators": "10.3.0",
|
|
48
|
+
"@skyux/popovers": "10.3.0",
|
|
49
|
+
"@skyux/theme": "10.3.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybXMtdXRpbGl0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9mb3Jtcy9zcmMvbGliL21vZHVsZXMvc2hhcmVkL2Zvcm1zLXV0aWxpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEscUVBQXFFO0FBQ3JFLDJEQUEyRDtBQUMzRCxXQUFXO0FBQ1gsTUFBTSxPQUFPLGVBQWU7SUFDMUIsb0VBQW9FO0lBQzdELE1BQU0sQ0FBQyxxQkFBcUIsQ0FBQyxLQUFVO1FBQzVDLE9BQU8sS0FBSyxLQUFLLFNBQVMsSUFBSSxHQUFHLEtBQUssRUFBRSxLQUFLLE9BQU8sQ0FBQztJQUN2RCxDQUFDO0lBRUQ7Ozs7O09BS0c7SUFDSSxNQUFNLENBQUMscUJBQXFCLENBQUMsU0FBb0I7UUFDdEQsTUFBTSxlQUFlLEdBQUcsU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zbid0IG9mZmVyIGEgd2F5IHRvIGdldCB0aGlzIGVhc2lseSwgc28gd2UgaGF2ZSB0byBjcmVhdGUgYW4gZW1wdHlcbiAgICogY29udHJvbCB1c2luZyB0aGUgY3VycmVudCB2YWxpZGF0b3IgdG8gc2VlIGlmIGl0IHRocm93cyBhIGByZXF1aXJlZGAgdmFsaWRhdGlvbiBlcnJvci5cbiAgICogaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvYW5ndWxhci9pc3N1ZXMvMTM0NjEjaXNzdWVjb21tZW50LTM0MDM2ODA0NlxuICAgKi9cbiAgcHVibGljIHN0YXRpYyBoYXNSZXF1aXJlZFZhbGlkYXRpb24obmdDb250cm9sOiBOZ0NvbnRyb2wpOiBib29sZWFuIHtcbiAgICBjb25zdCBhYnN0cmFjdENvbnRyb2wgPSBuZ0NvbnRyb2wuY29udHJvbCBhcyBBYnN0cmFjdENvbnRyb2w7XG4gICAgaWYgKGFic3RyYWN0Q29udHJvbCAmJiBhYnN0cmFjdENvbnRyb2wudmFsaWRhdG9yKSB7XG4gICAgICBjb25zdCB2YWxpZGF0b3IgPSBhYnN0cmFjdENvbnRyb2wudmFsaWRhdG9yKHt9IGFzIEFic3RyYWN0Q29udHJvbCk7XG4gICAgICBpZiAodmFsaWRhdG9yICYmIHZhbGlkYXRvclsncmVxdWlyZWQnXSkge1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG59XG4iXX0=
|
|
@@ -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
|
-
}
|