@skyux/lookup 6.11.2 → 6.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 +793 -628
- package/esm2020/index.mjs +3 -1
- package/esm2020/lib/modules/autocomplete/autocomplete-default-search-function.mjs +5 -5
- package/esm2020/lib/modules/autocomplete/autocomplete-input.directive.mjs +9 -1
- package/esm2020/lib/modules/autocomplete/autocomplete.component.mjs +15 -6
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-args.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-context.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-function-filter.mjs +1 -1
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-function.mjs +1 -1
- package/esm2020/lib/modules/lookup/lookup-show-more-async-modal.component.mjs +21 -15
- package/esm2020/lib/modules/lookup/lookup-show-more-modal.component.mjs +2 -2
- package/esm2020/lib/modules/lookup/lookup.component.mjs +1 -1
- package/esm2020/testing/autocomplete/autocomplete-harness-filters.mjs +2 -0
- package/esm2020/testing/autocomplete/autocomplete-harness.mjs +157 -0
- package/esm2020/testing/autocomplete/autocomplete-input-harness.mjs +60 -0
- package/esm2020/testing/autocomplete/autocomplete-search-result-harness-filters.mjs +2 -0
- package/esm2020/testing/autocomplete/autocomplete-search-result-harness.mjs +40 -0
- package/esm2020/testing/public-api.mjs +5 -1
- package/fesm2015/skyux-lookup-testing.mjs +307 -2
- package/fesm2015/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2015/skyux-lookup.mjs +43 -21
- package/fesm2015/skyux-lookup.mjs.map +1 -1
- package/fesm2020/skyux-lookup-testing.mjs +255 -1
- package/fesm2020/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2020/skyux-lookup.mjs +42 -20
- package/fesm2020/skyux-lookup.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/modules/autocomplete/autocomplete-input.directive.d.ts +1 -0
- package/lib/modules/autocomplete/types/autocomplete-search-args.d.ts +4 -0
- package/lib/modules/autocomplete/types/autocomplete-search-context.d.ts +1 -0
- package/lib/modules/autocomplete/types/autocomplete-search-function-filter.d.ts +2 -1
- package/lib/modules/autocomplete/types/autocomplete-search-function.d.ts +2 -1
- package/lib/modules/lookup/lookup-show-more-async-modal.component.d.ts +2 -1
- package/lib/modules/lookup/lookup.component.d.ts +1 -0
- package/package.json +11 -10
- package/testing/autocomplete/autocomplete-harness-filters.d.ts +6 -0
- package/testing/autocomplete/autocomplete-harness.d.ts +79 -0
- package/testing/autocomplete/autocomplete-input-harness.d.ts +39 -0
- package/testing/autocomplete/autocomplete-search-result-harness-filters.d.ts +10 -0
- package/testing/autocomplete/autocomplete-search-result-harness.d.ts +30 -0
- package/testing/public-api.d.ts +4 -0
package/index.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export * from './lib/modules/lookup/types/lookup-show-more-config';
|
|
|
19
19
|
export * from './lib/modules/lookup/types/lookup-show-more-custom-picker';
|
|
20
20
|
export * from './lib/modules/lookup/types/lookup-show-more-custom-picker-context';
|
|
21
21
|
export * from './lib/modules/lookup/types/lookup-show-more-native-picker-config';
|
|
22
|
+
export * from './lib/modules/autocomplete/types/autocomplete-search-args';
|
|
23
|
+
export * from './lib/modules/autocomplete/types/autocomplete-search-context';
|
|
22
24
|
export * from './lib/modules/search/search.module';
|
|
23
25
|
export * from './lib/modules/search/search.component';
|
|
24
26
|
export { SkyAutocompleteInputDirective as λ1 } from './lib/modules/autocomplete/autocomplete-input.directive';
|
|
@@ -37,6 +37,7 @@ export declare class SkyAutocompleteInputDirective implements OnInit, OnDestroy,
|
|
|
37
37
|
setDisabledState(disabled: boolean): void;
|
|
38
38
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
39
39
|
setActiveDescendant(descendantId: string | null): void;
|
|
40
|
+
setAriaOwns(overlayId: string | null): void;
|
|
40
41
|
onChange(value: any): void;
|
|
41
42
|
onTouched(): void;
|
|
42
43
|
onValidatorChange: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type SkyAutocompleteSearchContext = 'popover' | 'modal';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { SkyAutocompleteSearchArgs } from './autocomplete-search-args';
|
|
2
|
+
export declare type SkyAutocompleteSearchFunctionFilter = (searchText: string, item: any, args?: SkyAutocompleteSearchArgs) => boolean;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { SkyAutocompleteSearchArgs } from './autocomplete-search-args';
|
|
1
2
|
import { SkyAutocompleteSearchFunctionResponse } from './autocomplete-search-function-response';
|
|
2
|
-
export declare type SkyAutocompleteSearchFunction = (searchText: string, data: any[]) => SkyAutocompleteSearchFunctionResponse;
|
|
3
|
+
export declare type SkyAutocompleteSearchFunction = (searchText: string, data: any[], args?: SkyAutocompleteSearchArgs) => SkyAutocompleteSearchFunctionResponse;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { SkyLogService } from '@skyux/core';
|
|
2
3
|
import { SkyModalInstance } from '@skyux/modals';
|
|
3
4
|
import { Subject } from 'rxjs';
|
|
4
5
|
import { SkyLookupShowMoreNativePickerAsyncContext } from './types/lookup-show-more-native-picker-async-context';
|
|
@@ -25,7 +26,7 @@ export declare class SkyLookupShowMoreAsyncModalComponent implements OnInit, OnD
|
|
|
25
26
|
repeaterItemTemplate: TemplateRef<unknown> | null;
|
|
26
27
|
searchText: string | undefined;
|
|
27
28
|
selectedIdMap: Map<unknown, unknown>;
|
|
28
|
-
constructor(modalInstance: SkyModalInstance, context: SkyLookupShowMoreNativePickerAsyncContext, changeDetector: ChangeDetectorRef);
|
|
29
|
+
constructor(modalInstance: SkyModalInstance, context: SkyLookupShowMoreNativePickerAsyncContext, changeDetector: ChangeDetectorRef, logSvc: SkyLogService);
|
|
29
30
|
ngOnInit(): void;
|
|
30
31
|
ngOnDestroy(): void;
|
|
31
32
|
addButtonClicked(): void;
|
|
@@ -62,6 +62,7 @@ export declare class SkyLookupComponent extends SkyLookupAutocompleteAdapter imp
|
|
|
62
62
|
/**
|
|
63
63
|
* Specifies an object property that represents the object's unique identifier.
|
|
64
64
|
* Specifying this property enables token animations and more efficient rendering.
|
|
65
|
+
* This property is required when using `enableShowMore` and `searchAsync` together.
|
|
65
66
|
*/
|
|
66
67
|
idProperty: string | undefined;
|
|
67
68
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/lookup",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.14.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -41,19 +41,20 @@
|
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@angular/animations": "^13.3.2",
|
|
44
|
+
"@angular/cdk": "^13.3.2",
|
|
44
45
|
"@angular/common": "^13.3.2",
|
|
45
46
|
"@angular/core": "^13.3.2",
|
|
46
47
|
"@angular/forms": "^13.3.2",
|
|
47
48
|
"@angular/platform-browser": "^13.3.2",
|
|
48
|
-
"@skyux-sdk/testing": "6.
|
|
49
|
-
"@skyux/core": "6.
|
|
50
|
-
"@skyux/forms": "6.
|
|
51
|
-
"@skyux/i18n": "6.
|
|
52
|
-
"@skyux/indicators": "6.
|
|
53
|
-
"@skyux/layout": "6.
|
|
54
|
-
"@skyux/lists": "6.
|
|
55
|
-
"@skyux/modals": "6.
|
|
56
|
-
"@skyux/theme": "6.
|
|
49
|
+
"@skyux-sdk/testing": "6.14.0",
|
|
50
|
+
"@skyux/core": "6.14.0",
|
|
51
|
+
"@skyux/forms": "6.14.0",
|
|
52
|
+
"@skyux/i18n": "6.14.0",
|
|
53
|
+
"@skyux/indicators": "6.14.0",
|
|
54
|
+
"@skyux/layout": "6.14.0",
|
|
55
|
+
"@skyux/lists": "6.14.0",
|
|
56
|
+
"@skyux/modals": "6.14.0",
|
|
57
|
+
"@skyux/theme": "6.14.0"
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
60
|
"intl-tel-input": "17.0.16",
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { SkyComponentHarness } from '@skyux/core/testing';
|
|
3
|
+
import { SkyAutocompleteHarnessFilters } from './autocomplete-harness-filters';
|
|
4
|
+
import { SkyAutocompleteSearchResultHarness } from './autocomplete-search-result-harness';
|
|
5
|
+
import { SkyAutocompleteSearchResultHarnessFilters } from './autocomplete-search-result-harness-filters';
|
|
6
|
+
/**
|
|
7
|
+
* Harness for interacting with an autocomplete component in tests.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SkyAutocompleteHarness extends SkyComponentHarness {
|
|
10
|
+
#private;
|
|
11
|
+
static hostSelector: string;
|
|
12
|
+
/**
|
|
13
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
14
|
+
* `SkyAutocompleteHarness` that meets certain criteria.
|
|
15
|
+
*/
|
|
16
|
+
static with(filters: SkyAutocompleteHarnessFilters): HarnessPredicate<SkyAutocompleteHarness>;
|
|
17
|
+
/**
|
|
18
|
+
* Blurs the autocomplete input.
|
|
19
|
+
*/
|
|
20
|
+
blur(): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Clears the input value.
|
|
23
|
+
*/
|
|
24
|
+
clear(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Enters text into the autocomplete input.
|
|
27
|
+
*/
|
|
28
|
+
enterText(value: string): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Focuses the autocomplete input.
|
|
31
|
+
*/
|
|
32
|
+
focus(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns search result harnesses.
|
|
35
|
+
*/
|
|
36
|
+
getSearchResults(filters?: SkyAutocompleteSearchResultHarnessFilters): Promise<SkyAutocompleteSearchResultHarness[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the text content for each search result.
|
|
39
|
+
*/
|
|
40
|
+
getSearchResultsText(filters?: SkyAutocompleteSearchResultHarnessFilters): Promise<string[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Gets the value of the autocomplete input.
|
|
43
|
+
*/
|
|
44
|
+
getValue(): Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the autocomplete input is disabled.
|
|
47
|
+
*/
|
|
48
|
+
isDisabled(): Promise<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the autocomplete input is focused.
|
|
51
|
+
*/
|
|
52
|
+
isFocused(): Promise<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the autocomplete is open.
|
|
55
|
+
*/
|
|
56
|
+
isOpen(): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Selects a search result.
|
|
59
|
+
*/
|
|
60
|
+
selectSearchResult(filters: SkyAutocompleteSearchResultHarnessFilters): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Clicks the "Add" button in the autocomplete search results panel.
|
|
63
|
+
* (The "Add" functionality is not included in the public API
|
|
64
|
+
* of a "vanilla" autocomplete component, so this method is protected
|
|
65
|
+
* to prevent consumers of the autocomplete harness from calling it.
|
|
66
|
+
* The lookup harness, which extends the autocomplete harness, may
|
|
67
|
+
* still access this feature, however.)
|
|
68
|
+
*/
|
|
69
|
+
protected clickAddButton(): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Clicks the "Show more" button.
|
|
72
|
+
* (The "Show more" functionality is not included in the public API
|
|
73
|
+
* of a "vanilla" autocomplete component, so this method is protected
|
|
74
|
+
* to prevent consumers of the autocomplete harness from calling it.
|
|
75
|
+
* The lookup harness, which extends the autocomplete harness, may
|
|
76
|
+
* still access this feature, however.)
|
|
77
|
+
*/
|
|
78
|
+
protected clickShowMoreButton(): Promise<void>;
|
|
79
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare class SkyAutocompleteInputHarness extends ComponentHarness {
|
|
6
|
+
static hostSelector: string;
|
|
7
|
+
/**
|
|
8
|
+
* Blurs the input.
|
|
9
|
+
*/
|
|
10
|
+
blur(): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Clears the input value.
|
|
13
|
+
*/
|
|
14
|
+
clear(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Enters text into the input.
|
|
17
|
+
*/
|
|
18
|
+
enterText(value: string): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Focuses the input.
|
|
21
|
+
*/
|
|
22
|
+
focus(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets the value of the input.
|
|
25
|
+
*/
|
|
26
|
+
getValue(): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the input is disabled.
|
|
29
|
+
*/
|
|
30
|
+
isDisabled(): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the input is focused.
|
|
33
|
+
*/
|
|
34
|
+
isFocused(): Promise<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the value of the input's `aria-owns` attribute.
|
|
37
|
+
*/
|
|
38
|
+
getAriaOwns(): Promise<string | null>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseHarnessFilters } from '@angular/cdk/testing';
|
|
2
|
+
/**
|
|
3
|
+
* A set of criteria that can be used to filter a list of SkyAutocompleteSearchResultHarness instances.
|
|
4
|
+
*/
|
|
5
|
+
export interface SkyAutocompleteSearchResultHarnessFilters extends Omit<BaseHarnessFilters, 'selector'> {
|
|
6
|
+
/**
|
|
7
|
+
* Only find instances whose content matches the given value.
|
|
8
|
+
*/
|
|
9
|
+
textContent?: string | RegExp;
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentHarness, HarnessPredicate, HarnessQuery } from '@angular/cdk/testing';
|
|
2
|
+
import { SkyAutocompleteSearchResultHarnessFilters } from './autocomplete-search-result-harness-filters';
|
|
3
|
+
/**
|
|
4
|
+
* Harness for interacting with an autocomplete search results in tests.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SkyAutocompleteSearchResultHarness extends ComponentHarness {
|
|
7
|
+
static hostSelector: string;
|
|
8
|
+
/**
|
|
9
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
10
|
+
* `SkyAutocompleteSearchResultHarness` that meets certain criteria.
|
|
11
|
+
*/
|
|
12
|
+
static with(filters: SkyAutocompleteSearchResultHarnessFilters): HarnessPredicate<SkyAutocompleteSearchResultHarness>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the value of the search result's descriptor property.
|
|
15
|
+
* This value is set by the autocomplete's `descriptorProperty` input.
|
|
16
|
+
*/
|
|
17
|
+
getDescriptorValue(): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Returns a child harness.
|
|
20
|
+
*/
|
|
21
|
+
queryHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Selects the search result.
|
|
24
|
+
*/
|
|
25
|
+
select(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the text content of the search result.
|
|
28
|
+
*/
|
|
29
|
+
textContent(): Promise<string>;
|
|
30
|
+
}
|
package/testing/public-api.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export * from './autocomplete/autocomplete-harness';
|
|
2
|
+
export * from './autocomplete/autocomplete-harness-filters';
|
|
3
|
+
export * from './autocomplete/autocomplete-search-result-harness';
|
|
4
|
+
export * from './autocomplete/autocomplete-search-result-harness-filters';
|
|
1
5
|
export * from './country-field/country-field-fixture';
|
|
2
6
|
export * from './country-field/country-field-testing.module';
|
|
3
7
|
export * from './search/search-fixture';
|