@skyux/forms 10.13.0 → 10.14.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 +1739 -1517
- package/esm2022/lib/modules/checkbox/checkbox.component.mjs +45 -44
- package/esm2022/lib/modules/file-attachment/file-attachment.component.mjs +6 -4
- package/esm2022/lib/modules/form-error/form-errors.component.mjs +3 -3
- package/esm2022/lib/modules/shared/sky-forms-resources.module.mjs +7 -1
- package/esm2022/testing/input-box/input-box-harness.mjs +15 -3
- package/fesm2022/skyux-forms-testing.mjs +14 -2
- package/fesm2022/skyux-forms-testing.mjs.map +1 -1
- package/fesm2022/skyux-forms.mjs +57 -48
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/lib/modules/checkbox/checkbox.component.d.ts +7 -5
- package/lib/modules/file-attachment/file-attachment.component.d.ts +7 -1
- package/package.json +8 -8
- package/testing/input-box/input-box-harness.d.ts +9 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor,
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { SkyCheckboxChange } from './checkbox-change';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Replaces the HTML input element with `type="checkbox"`. When users select a checkbox, its value
|
|
8
8
|
* is driven through an `ngModel` attribute that you specify on the `sky-checkbox` element.
|
|
9
9
|
*/
|
|
10
|
-
export declare class SkyCheckboxComponent implements ControlValueAccessor, OnInit {
|
|
10
|
+
export declare class SkyCheckboxComponent implements ControlValueAccessor, OnInit, Validator {
|
|
11
11
|
#private;
|
|
12
12
|
/**
|
|
13
13
|
* The ARIA label for the checkbox. This sets the checkbox's `aria-label` attribute
|
|
@@ -108,8 +108,7 @@ export declare class SkyCheckboxComponent implements ControlValueAccessor, OnIni
|
|
|
108
108
|
* is complete.
|
|
109
109
|
* @default false
|
|
110
110
|
*/
|
|
111
|
-
|
|
112
|
-
get required(): boolean;
|
|
111
|
+
required: boolean;
|
|
113
112
|
/**
|
|
114
113
|
* The text to display as the checkbox's label. Use this instead of the `sky-checkbox-label` when the label is text-only.
|
|
115
114
|
* Specifying `labelText` also enables automatic error message handling for checkbox.
|
|
@@ -150,11 +149,13 @@ export declare class SkyCheckboxComponent implements ControlValueAccessor, OnIni
|
|
|
150
149
|
set inputEl(el: ElementRef | undefined);
|
|
151
150
|
get inputEl(): ElementRef | undefined;
|
|
152
151
|
display: string | undefined;
|
|
152
|
+
protected get isCheckboxRequired(): boolean;
|
|
153
|
+
protected control: AbstractControl | undefined;
|
|
153
154
|
protected inputId: string;
|
|
154
|
-
protected readonly ngControl: NgControl | null;
|
|
155
155
|
protected readonly errorId: string;
|
|
156
156
|
constructor();
|
|
157
157
|
ngOnInit(): void;
|
|
158
|
+
validate(control: AbstractControl<boolean>): ValidationErrors | null;
|
|
158
159
|
/**
|
|
159
160
|
* Implemented as part of ControlValueAccessor.
|
|
160
161
|
*/
|
|
@@ -181,6 +182,7 @@ export declare class SkyCheckboxComponent implements ControlValueAccessor, OnIni
|
|
|
181
182
|
onTouched: () => any;
|
|
182
183
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyCheckboxComponent, never>;
|
|
183
184
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkyCheckboxComponent, "sky-checkbox", never, { "label": { "alias": "label"; "required": false; }; "labelledBy": { "alias": "labelledBy"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "name": { "alias": "name"; "required": false; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "checkboxType": { "alias": "checkboxType"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "required": { "alias": "required"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; }, { "change": "change"; "checkedChange": "checkedChange"; "disabledChange": "disabledChange"; "indeterminateChange": "indeterminateChange"; }, never, ["sky-checkbox-label", "sky-form-error"], false, never>;
|
|
185
|
+
static ngAcceptInputType_required: unknown;
|
|
184
186
|
static ngAcceptInputType_labelHidden: unknown;
|
|
185
187
|
static ngAcceptInputType_stacked: unknown;
|
|
186
188
|
}
|
|
@@ -41,6 +41,12 @@ export declare class SkyFileAttachmentComponent implements AfterViewInit, AfterC
|
|
|
41
41
|
* @preview
|
|
42
42
|
*/
|
|
43
43
|
helpPopoverTitle: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* A help key that identifies the global help content to display. When specified, a [help inline](https://developer.blackbaud.com/skyux/components/help-inline) button is
|
|
46
|
+
* placed beside the single file attachment label. Clicking the button invokes global help as configured by the application.
|
|
47
|
+
* @preview
|
|
48
|
+
*/
|
|
49
|
+
helpKey: string | undefined;
|
|
44
50
|
/**
|
|
45
51
|
* The text to display as the file attachment's label.
|
|
46
52
|
* @preview
|
|
@@ -140,7 +146,7 @@ export declare class SkyFileAttachmentComponent implements AfterViewInit, AfterC
|
|
|
140
146
|
setDisabledState(isDisabled: boolean): void;
|
|
141
147
|
emitClick(): void;
|
|
142
148
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyFileAttachmentComponent, [null, null, null, { optional: true; self: true; }, { optional: true; }]>;
|
|
143
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyFileAttachmentComponent, "sky-file-attachment", never, { "acceptedTypes": { "alias": "acceptedTypes"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "minFileSize": { "alias": "minFileSize"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "validateFn": { "alias": "validateFn"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "fileChange": "fileChange"; "fileClick": "fileClick"; }, ["labelComponents"], ["sky-form-error", "sky-file-attachment-label"], false, never>;
|
|
149
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyFileAttachmentComponent, "sky-file-attachment", never, { "acceptedTypes": { "alias": "acceptedTypes"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; }; "helpKey": { "alias": "helpKey"; "required": false; }; "labelText": { "alias": "labelText"; "required": false; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "minFileSize": { "alias": "minFileSize"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "validateFn": { "alias": "validateFn"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "fileChange": "fileChange"; "fileClick": "fileClick"; }, ["labelComponents"], ["sky-form-error", "sky-file-attachment-label"], false, never>;
|
|
144
150
|
static ngAcceptInputType_labelHidden: unknown;
|
|
145
151
|
static ngAcceptInputType_stacked: unknown;
|
|
146
152
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/forms",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.14.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@angular/core": "^17.3.4",
|
|
42
42
|
"@angular/forms": "^17.3.4",
|
|
43
43
|
"@angular/platform-browser": "^17.3.4",
|
|
44
|
-
"@skyux-sdk/testing": "10.
|
|
45
|
-
"@skyux/core": "10.
|
|
46
|
-
"@skyux/help-inline": "10.
|
|
47
|
-
"@skyux/i18n": "10.
|
|
48
|
-
"@skyux/indicators": "10.
|
|
49
|
-
"@skyux/popovers": "10.
|
|
50
|
-
"@skyux/theme": "10.
|
|
44
|
+
"@skyux-sdk/testing": "10.14.0",
|
|
45
|
+
"@skyux/core": "10.14.0",
|
|
46
|
+
"@skyux/help-inline": "10.14.0",
|
|
47
|
+
"@skyux/i18n": "10.14.0",
|
|
48
|
+
"@skyux/indicators": "10.14.0",
|
|
49
|
+
"@skyux/popovers": "10.14.0",
|
|
50
|
+
"@skyux/theme": "10.14.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"tslib": "^2.6.2"
|
|
@@ -55,7 +55,15 @@ export declare class SkyInputBoxHarness extends SkyQueryableComponentHarness {
|
|
|
55
55
|
/**
|
|
56
56
|
* Whether the field is set to an invalid date.
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
hasInvalidDateError(): Promise<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the field is set to an invalid minimum date.
|
|
61
|
+
*/
|
|
62
|
+
hasMinDateError(): Promise<boolean>;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the field is set to an invalid maximum date.
|
|
65
|
+
*/
|
|
66
|
+
hasMaxDateError(): Promise<boolean>;
|
|
59
67
|
/**
|
|
60
68
|
* Whether the field is set to an invalid phone number.
|
|
61
69
|
*/
|