@skyux/forms 11.27.0 → 11.28.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.
@@ -19,7 +19,6 @@ export declare class SkyFileAttachmentComponent implements AfterViewInit, AfterC
19
19
  /**
20
20
  * The comma-delimited string literal of MIME types that users can attach.
21
21
  * By default, all file types are allowed.
22
- * @required
23
22
  */
24
23
  acceptedTypes: string | undefined;
25
24
  /**
@@ -126,6 +125,7 @@ export declare class SkyFileAttachmentComponent implements AfterViewInit, AfterC
126
125
  ngOnInit(): void;
127
126
  ngAfterViewInit(): void;
128
127
  ngAfterContentInit(): void;
128
+ onButtonBlur(): void;
129
129
  onDropClicked(): void;
130
130
  fileChangeEvent(fileChangeEvent: Event): void;
131
131
  fileDragEnter(dragEnterEvent: DragEvent): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/forms",
3
- "version": "11.27.0",
3
+ "version": "11.28.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -41,14 +41,14 @@
41
41
  "@angular/core": "^18.2.13",
42
42
  "@angular/forms": "^18.2.13",
43
43
  "@angular/platform-browser": "^18.2.13",
44
- "@skyux-sdk/testing": "11.27.0",
45
- "@skyux/core": "11.27.0",
46
- "@skyux/help-inline": "11.27.0",
47
- "@skyux/i18n": "11.27.0",
48
- "@skyux/icon": "11.27.0",
49
- "@skyux/indicators": "11.27.0",
50
- "@skyux/popovers": "11.27.0",
51
- "@skyux/theme": "11.27.0"
44
+ "@skyux-sdk/testing": "11.28.0",
45
+ "@skyux/core": "11.28.0",
46
+ "@skyux/help-inline": "11.28.0",
47
+ "@skyux/i18n": "11.28.0",
48
+ "@skyux/icon": "11.28.0",
49
+ "@skyux/indicators": "11.28.0",
50
+ "@skyux/popovers": "11.28.0",
51
+ "@skyux/theme": "11.28.0"
52
52
  },
53
53
  "dependencies": {
54
54
  "tslib": "^2.6.3"
@@ -0,0 +1,7 @@
1
+ import { SkyHarnessFilters } from '@skyux/core/testing';
2
+ /**
3
+ * A set of criteria that can be used to filter a list of `SkyFileAttachmentHarness` instances.
4
+ * @internal
5
+ */
6
+ export interface SkyFileAttachmentHarnessFilters extends SkyHarnessFilters {
7
+ }
@@ -0,0 +1,101 @@
1
+ import { HarnessPredicate } from '@angular/cdk/testing';
2
+ import { SkyComponentHarness } from '@skyux/core/testing';
3
+ import { SkyFileAttachmentHarnessFilters } from './file-attachment-harness-filters';
4
+ /**
5
+ * Harness for interacting with a file attachment component in tests.
6
+ */
7
+ export declare class SkyFileAttachmentHarness extends SkyComponentHarness {
8
+ #private;
9
+ /**
10
+ * @internal
11
+ */
12
+ static hostSelector: string;
13
+ /**
14
+ * Gets a `HarnessPredicate` that can be used to search for a
15
+ * `SkyFileAttachmentHarness` that meets certain criteria.
16
+ */
17
+ static with(filters: SkyFileAttachmentHarnessFilters): HarnessPredicate<SkyFileAttachmentHarness>;
18
+ /**
19
+ * Clicks the attach file button if it is visible.
20
+ */
21
+ clickAttachFileButton(): Promise<void>;
22
+ /**
23
+ * Clicks the help inline button.
24
+ */
25
+ clickHelpInline(): Promise<void>;
26
+ /**
27
+ * Clicks the replace file button in default theme.
28
+ */
29
+ clickReplaceFileButton(): Promise<void>;
30
+ /**
31
+ * Clicks the attached file to download it.
32
+ */
33
+ clickAttachedFile(): Promise<void>;
34
+ /**
35
+ * Clicks the attached file's delete button.
36
+ */
37
+ clickAttachedFileDeleteButton(): Promise<void>;
38
+ /**
39
+ * Gets the accepted file types.
40
+ */
41
+ getAcceptedTypes(): Promise<string | null>;
42
+ /**
43
+ * Gets the help inline popover content.
44
+ */
45
+ getHelpPopoverContent(): Promise<string | undefined>;
46
+ /**
47
+ * Gets the help inline popover title.
48
+ */
49
+ getHelpPopoverTitle(): Promise<string | undefined>;
50
+ /**
51
+ * Gets the hint text.
52
+ */
53
+ getHintText(): Promise<string>;
54
+ /**
55
+ * Gets the file attachment label.
56
+ */
57
+ getLabelText(): Promise<string>;
58
+ /**
59
+ * Whether a custom error has fired.
60
+ */
61
+ hasCustomError(errorName: string): Promise<boolean>;
62
+ /**
63
+ * Whether the wrong file type error has fired.
64
+ */
65
+ hasFileTypeError(): Promise<boolean>;
66
+ /**
67
+ * Whether the max file size error has fired.
68
+ */
69
+ hasMaxFileSizeError(): Promise<boolean>;
70
+ /**
71
+ * Whether the min file size error has fired.
72
+ */
73
+ hasMinFileSizeError(): Promise<boolean>;
74
+ /**
75
+ * Whether the required error has fired.
76
+ */
77
+ hasRequiredError(): Promise<boolean>;
78
+ /**
79
+ * Whether file attachment is disabled.
80
+ */
81
+ isDisabled(): Promise<boolean>;
82
+ /**
83
+ * Whether file attachment is required.
84
+ */
85
+ isRequired(): Promise<boolean>;
86
+ /**
87
+ * Whether file attachment has stacked enabled.
88
+ */
89
+ isStacked(): Promise<boolean>;
90
+ /**
91
+ * Attaches a file.
92
+ * Be sure to include `provideSkyFileReaderTesting` as a provider when calling this function in tests.
93
+ * @example
94
+ * ```typescript
95
+ * TestBed.configureTestingModule({
96
+ * providers: [provideSkyFileReaderTesting()]
97
+ * });
98
+ * ```
99
+ */
100
+ attachFile(file: File): Promise<void>;
101
+ }
@@ -0,0 +1,11 @@
1
+ import { Provider } from '@angular/core';
2
+ /**
3
+ * Provides mocks for file attachment testing.
4
+ * @example
5
+ * ```typescript
6
+ * TestBed.configureTestingModule({
7
+ * providers: [provideSkyFileAttachmentTesting()]
8
+ * });
9
+ * ```
10
+ */
11
+ export declare function provideSkyFileAttachmentTesting(): Provider[];
@@ -8,8 +8,11 @@ export { SkyCheckboxGroupHarnessFilters } from './modules/checkbox/checkbox-grou
8
8
  export { SkyCheckboxHarness } from './modules/checkbox/checkbox-harness';
9
9
  export { SkyCheckboxHarnessFilters } from './modules/checkbox/checkbox-harness-filters';
10
10
  export { SkyCheckboxLabelHarness } from './modules/checkbox/checkbox-label-harness';
11
+ export { SkyFileAttachmentHarness } from './modules/file-attachment/file-attachment/file-attachment-harness';
12
+ export { SkyFileAttachmentHarnessFilters } from './modules/file-attachment/file-attachment/file-attachment-harness-filters';
11
13
  export { SkyFileDropHarness } from './modules/file-attachment/file-drop/file-drop-harness';
12
14
  export { SkyFileDropHarnessFilters } from './modules/file-attachment/file-drop/file-drop-harness-filters';
15
+ export { provideSkyFileAttachmentTesting } from './modules/file-attachment/shared/provide-file-attachment-testing';
13
16
  export { SkyFormErrorsHarness } from './modules/form-error/form-errors-harness';
14
17
  export { SkyFormErrorsHarnessFilters } from './modules/form-error/form-errors-harness.filters';
15
18
  export { SkyFormErrorHarness } from './modules/form-error/form-error-harness';