@skyux/lookup 5.1.1 → 5.2.2
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/bundles/skyux-lookup-testing.umd.js +8 -8
- package/bundles/skyux-lookup.umd.js +480 -123
- package/documentation.json +1102 -632
- package/esm2015/modules/autocomplete/autocomplete-adapter.service.js +3 -3
- package/esm2015/modules/autocomplete/autocomplete-input.directive.js +3 -3
- package/esm2015/modules/autocomplete/autocomplete-search-async-disabled.pipe.js +19 -0
- package/esm2015/modules/autocomplete/autocomplete.component.js +77 -30
- package/esm2015/modules/autocomplete/autocomplete.module.js +22 -9
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-args.js +2 -0
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-function.js +2 -0
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-result-display-type.js +2 -0
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-result.js +2 -0
- package/esm2015/modules/country-field/country-field.component.js +6 -5
- package/esm2015/modules/country-field/country-field.module.js +4 -4
- package/esm2015/modules/lookup/lookup-adapter.service.js +3 -3
- package/esm2015/modules/lookup/lookup-autocomplete-adapter.js +12 -7
- package/esm2015/modules/lookup/lookup-item-selected.pipe.js +16 -0
- package/esm2015/modules/lookup/lookup-show-more-async-modal.component.js +184 -0
- package/esm2015/modules/lookup/lookup-show-more-modal.component.js +8 -4
- package/esm2015/modules/lookup/lookup.component.js +67 -36
- package/esm2015/modules/lookup/lookup.module.js +25 -9
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-async-context.js +7 -0
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-config.js +1 -1
- package/esm2015/modules/search/search-adapter.service.js +3 -3
- package/esm2015/modules/search/search.component.js +8 -8
- package/esm2015/modules/search/search.module.js +4 -4
- package/esm2015/modules/shared/sky-lookup-resources.module.js +8 -5
- package/esm2015/public-api.js +4 -1
- package/esm2015/testing/country-field/country-field-testing.module.js +4 -4
- package/esm2015/testing/search/search-testing.module.js +4 -4
- package/fesm2015/skyux-lookup-testing.js +8 -8
- package/fesm2015/skyux-lookup.js +443 -123
- package/fesm2015/skyux-lookup.js.map +1 -1
- package/modules/autocomplete/autocomplete-search-async-disabled.pipe.d.ts +11 -0
- package/modules/autocomplete/autocomplete.component.d.ts +17 -6
- package/modules/autocomplete/autocomplete.module.d.ts +8 -7
- package/modules/autocomplete/types/autocomplete-search-async-args.d.ts +35 -0
- package/modules/autocomplete/types/autocomplete-search-async-function.d.ts +4 -0
- package/modules/autocomplete/types/autocomplete-search-async-result-display-type.d.ts +1 -0
- package/modules/autocomplete/types/autocomplete-search-async-result.d.ts +25 -0
- package/modules/country-field/country-field.component.d.ts +3 -2
- package/modules/lookup/lookup-autocomplete-adapter.d.ts +6 -4
- package/modules/lookup/lookup-item-selected.pipe.d.ts +7 -0
- package/modules/lookup/lookup-show-more-async-modal.component.d.ts +49 -0
- package/modules/lookup/lookup.component.d.ts +3 -0
- package/modules/lookup/lookup.module.d.ts +17 -15
- package/modules/lookup/types/lookup-show-more-native-picker-async-context.d.ts +17 -0
- package/modules/lookup/types/lookup-show-more-native-picker-config.d.ts +1 -1
- package/modules/search/search.component.d.ts +5 -5
- package/package.json +11 -11
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventEmitter, PipeTransform } from '@angular/core';
|
|
2
|
+
import { SkyAutocompleteSearchAsyncArgs } from './types/autocomplete-search-async-args';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class SkyAutcompleteSearchAsyncDisabledPipe implements PipeTransform {
|
|
8
|
+
transform(searchAsync: EventEmitter<SkyAutocompleteSearchAsyncArgs>, searchAsyncDisabled: boolean): boolean;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyAutcompleteSearchAsyncDisabledPipe, never>;
|
|
10
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SkyAutcompleteSearchAsyncDisabledPipe, "skyAutocompleteSearchAsyncDisabled">;
|
|
11
|
+
}
|
|
@@ -8,6 +8,7 @@ import { SkyAutocompleteSearchFunctionFilter } from './types/autocomplete-search
|
|
|
8
8
|
import { SkyAutocompleteSelectionChange } from './types/autocomplete-selection-change';
|
|
9
9
|
import { SkyAutocompleteShowMoreArgs } from './types/autocomplete-show-more-args';
|
|
10
10
|
import { SkyAutocompleteAdapterService } from './autocomplete-adapter.service';
|
|
11
|
+
import { SkyAutocompleteSearchAsyncArgs } from './types/autocomplete-search-async-args';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/**
|
|
13
14
|
* @internal
|
|
@@ -46,7 +47,7 @@ export declare class SkyAutocompleteComponent implements OnDestroy, AfterContent
|
|
|
46
47
|
/**
|
|
47
48
|
* Specifies an object property to display in the text input after users
|
|
48
49
|
* select an item in the dropdown list.
|
|
49
|
-
* @default name
|
|
50
|
+
* @default "name"
|
|
50
51
|
*/
|
|
51
52
|
set descriptorProperty(value: string);
|
|
52
53
|
get descriptorProperty(): string;
|
|
@@ -67,7 +68,7 @@ export declare class SkyAutocompleteComponent implements OnDestroy, AfterContent
|
|
|
67
68
|
wrapperClass?: string;
|
|
68
69
|
/**
|
|
69
70
|
* Specifies the object properties to search.
|
|
70
|
-
* @default [
|
|
71
|
+
* @default ["name"]
|
|
71
72
|
*/
|
|
72
73
|
set propertiesToSearch(value: string[]);
|
|
73
74
|
get propertiesToSearch(): string[];
|
|
@@ -115,9 +116,15 @@ export declare class SkyAutocompleteComponent implements OnDestroy, AfterContent
|
|
|
115
116
|
showAddButton: boolean;
|
|
116
117
|
/**
|
|
117
118
|
* Specifies the text to display when no search results are found.
|
|
118
|
-
* @default No matches found
|
|
119
|
+
* @default "No matches found"
|
|
119
120
|
*/
|
|
120
121
|
noResultsFoundText: string;
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* Allows async search to be disabled even when a listener is specified for
|
|
125
|
+
* the `searchAsync` output.
|
|
126
|
+
*/
|
|
127
|
+
searchAsyncDisabled: boolean;
|
|
121
128
|
/**
|
|
122
129
|
* @internal
|
|
123
130
|
* Fires when users select the button to add options to the data source.
|
|
@@ -132,14 +139,16 @@ export declare class SkyAutocompleteComponent implements OnDestroy, AfterContent
|
|
|
132
139
|
* Fires when users select items in the dropdown list.
|
|
133
140
|
*/
|
|
134
141
|
get selectionChange(): EventEmitter<SkyAutocompleteSelectionChange>;
|
|
142
|
+
searchAsync: EventEmitter<SkyAutocompleteSearchAsyncArgs>;
|
|
135
143
|
get searchResults(): SkyAutocompleteSearchResult[];
|
|
136
|
-
set highlightText(value: string[]);
|
|
137
144
|
get highlightText(): string[];
|
|
138
145
|
isOpen: boolean;
|
|
139
146
|
resultsListId: string;
|
|
140
147
|
resultsWrapperId: string;
|
|
141
148
|
searchText: string;
|
|
142
149
|
get showActionsArea(): boolean;
|
|
150
|
+
isSearchingAsync: boolean;
|
|
151
|
+
searchResultsCount: number | undefined;
|
|
143
152
|
private defaultSearchResultTemplate;
|
|
144
153
|
private set inputDirective(value);
|
|
145
154
|
private get inputDirective();
|
|
@@ -161,6 +170,7 @@ export declare class SkyAutocompleteComponent implements OnDestroy, AfterContent
|
|
|
161
170
|
* elements provided in the consumer's own template.
|
|
162
171
|
*/
|
|
163
172
|
private overlayFocusableElements;
|
|
173
|
+
private currentSearchSub;
|
|
164
174
|
private _data;
|
|
165
175
|
private _debounceTime;
|
|
166
176
|
private _descriptorProperty;
|
|
@@ -186,11 +196,12 @@ export declare class SkyAutocompleteComponent implements OnDestroy, AfterContent
|
|
|
186
196
|
onResultMouseMove(id: number): void;
|
|
187
197
|
isElementFocused(ref: HTMLElement): boolean;
|
|
188
198
|
private searchTextChanged;
|
|
199
|
+
private performSearch;
|
|
200
|
+
private cancelCurrentSearch;
|
|
189
201
|
/**
|
|
190
202
|
* Returns the text to highlight based on exact matches, case-insensitive matches, and matches for corresponding diacritical characters (a will match à).
|
|
191
203
|
*/
|
|
192
204
|
private getHighlightText;
|
|
193
|
-
private performSearch;
|
|
194
205
|
private selectSearchResultById;
|
|
195
206
|
private openDropdown;
|
|
196
207
|
private closeDropdown;
|
|
@@ -207,6 +218,6 @@ export declare class SkyAutocompleteComponent implements OnDestroy, AfterContent
|
|
|
207
218
|
private removeFocusedClass;
|
|
208
219
|
private addFocusedClass;
|
|
209
220
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyAutocompleteComponent, [null, null, null, null, null, { optional: true; }]>;
|
|
210
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SkyAutocompleteComponent, "sky-autocomplete", never, { "ariaLabelledBy": "ariaLabelledBy"; "data": "data"; "debounceTime": "debounceTime"; "descriptorProperty": "descriptorProperty"; "enableShowMore": "enableShowMore"; "messageStream": "messageStream"; "wrapperClass": "wrapperClass"; "propertiesToSearch": "propertiesToSearch"; "search": "search"; "searchResultTemplate": "searchResultTemplate"; "searchTextMinimumCharacters": "searchTextMinimumCharacters"; "searchFilters": "searchFilters"; "searchResultsLimit": "searchResultsLimit"; "showAddButton": "showAddButton"; "noResultsFoundText": "noResultsFoundText"; }, { "addClick": "addClick"; "showMoreClick": "showMoreClick"; "selectionChange": "selectionChange"; }, ["inputDirective"], ["*"]>;
|
|
221
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyAutocompleteComponent, "sky-autocomplete", never, { "ariaLabelledBy": "ariaLabelledBy"; "data": "data"; "debounceTime": "debounceTime"; "descriptorProperty": "descriptorProperty"; "enableShowMore": "enableShowMore"; "messageStream": "messageStream"; "wrapperClass": "wrapperClass"; "propertiesToSearch": "propertiesToSearch"; "search": "search"; "searchResultTemplate": "searchResultTemplate"; "searchTextMinimumCharacters": "searchTextMinimumCharacters"; "searchFilters": "searchFilters"; "searchResultsLimit": "searchResultsLimit"; "showAddButton": "showAddButton"; "noResultsFoundText": "noResultsFoundText"; "searchAsyncDisabled": "searchAsyncDisabled"; }, { "addClick": "addClick"; "showMoreClick": "showMoreClick"; "selectionChange": "selectionChange"; "searchAsync": "searchAsync"; }, ["inputDirective"], ["*"]>;
|
|
211
222
|
}
|
|
212
223
|
export {};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./autocomplete.component";
|
|
3
3
|
import * as i2 from "./autocomplete-input.directive";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@angular/
|
|
6
|
-
import * as i5 from "@
|
|
7
|
-
import * as i6 from "@skyux/
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "
|
|
4
|
+
import * as i3 from "./autocomplete-search-async-disabled.pipe";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@skyux/core";
|
|
8
|
+
import * as i7 from "@skyux/indicators";
|
|
9
|
+
import * as i8 from "../shared/sky-lookup-resources.module";
|
|
10
|
+
import * as i9 from "@skyux/theme";
|
|
10
11
|
export declare class SkyAutocompleteModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyAutocompleteModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyAutocompleteModule, [typeof i1.SkyAutocompleteComponent, typeof i2.SkyAutocompleteInputDirective], [typeof
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyAutocompleteModule, [typeof i1.SkyAutocompleteComponent, typeof i2.SkyAutocompleteInputDirective, typeof i3.SkyAutcompleteSearchAsyncDisabledPipe], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.SkyAffixModule, typeof i7.SkyTextHighlightModule, typeof i7.SkyIconModule, typeof i6.SkyIdModule, typeof i8.SkyLookupResourcesModule, typeof i6.SkyNumericModule, typeof i6.SkyOverlayModule, typeof i9.SkyThemeModule, typeof i7.SkyWaitModule], [typeof i1.SkyAutocompleteComponent, typeof i2.SkyAutocompleteInputDirective]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<SkyAutocompleteModule>;
|
|
14
15
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SkyAutocompleteSearchAsyncResult } from './autocomplete-search-async-result';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AutocompleteSearchAsyncResultDisplayType } from './autocomplete-search-async-result-display-type';
|
|
4
|
+
/**
|
|
5
|
+
* Arguments passed when an asynchronous search is executed from the
|
|
6
|
+
* autocomplete or lookup component.
|
|
7
|
+
*/
|
|
8
|
+
export interface SkyAutocompleteSearchAsyncArgs {
|
|
9
|
+
/**
|
|
10
|
+
* The search text entered by the user.
|
|
11
|
+
*/
|
|
12
|
+
searchText: string;
|
|
13
|
+
/**
|
|
14
|
+
* How the search results will be displayed. Use this value to determine
|
|
15
|
+
* how many results to return.
|
|
16
|
+
*/
|
|
17
|
+
displayType: AutocompleteSearchAsyncResultDisplayType;
|
|
18
|
+
/**
|
|
19
|
+
* The offset index of the first result to return. When search is executed
|
|
20
|
+
* as a result of an infinite scroll event, for example, offset will be set
|
|
21
|
+
* to the number of items already displayed.
|
|
22
|
+
*/
|
|
23
|
+
offset: number;
|
|
24
|
+
/**
|
|
25
|
+
* A continuation token which can be set and then will be passed back with any future searches.
|
|
26
|
+
* This is helpful for applications which utilize a token instead of an offset when fetching data.
|
|
27
|
+
*/
|
|
28
|
+
continuationData?: unknown;
|
|
29
|
+
/**
|
|
30
|
+
* An Observable representing the search results. Consumers should set this
|
|
31
|
+
* when the event fires so the autocomplete or lookup component can subscribe
|
|
32
|
+
* to it and then display the results.
|
|
33
|
+
*/
|
|
34
|
+
result?: Observable<SkyAutocompleteSearchAsyncResult>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { SkyAutocompleteSearchAsyncArgs } from './autocomplete-search-async-args';
|
|
3
|
+
import { SkyAutocompleteSearchAsyncResult } from './autocomplete-search-async-result';
|
|
4
|
+
export declare type SkyAutocompleteSearchAsyncFunction = (args: SkyAutocompleteSearchAsyncArgs) => Observable<SkyAutocompleteSearchAsyncResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type AutocompleteSearchAsyncResultDisplayType = 'popover' | 'modal';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The result of searching for items to display in an autocomplete or lookup field.
|
|
3
|
+
*/
|
|
4
|
+
export interface SkyAutocompleteSearchAsyncResult {
|
|
5
|
+
/**
|
|
6
|
+
* Data provided on "load more" search result requests. Use this property for
|
|
7
|
+
* information such as a continuation token for paged database queries.
|
|
8
|
+
*/
|
|
9
|
+
continuationData?: unknown;
|
|
10
|
+
/**
|
|
11
|
+
* Indicates whether there are more results that match the search criteria.
|
|
12
|
+
*/
|
|
13
|
+
hasMore?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* A list of items matching the search criteria. When there are more items that match
|
|
16
|
+
* the search criteria, set the `hasMore` property to `true` more records can be lazy-loaded
|
|
17
|
+
* as the user scrolls through the search results.
|
|
18
|
+
*/
|
|
19
|
+
items: unknown[];
|
|
20
|
+
/**
|
|
21
|
+
* The total number of records that match the search criteria, including items not returned in
|
|
22
|
+
* the current list of items.
|
|
23
|
+
*/
|
|
24
|
+
totalCount: number;
|
|
25
|
+
}
|
|
@@ -17,19 +17,20 @@ export declare class SkyCountryFieldComponent implements AfterViewInit, ControlV
|
|
|
17
17
|
private themeSvc?;
|
|
18
18
|
/**
|
|
19
19
|
* Specifies the value for the `autocomplete` attribute on the form input.
|
|
20
|
-
* @default
|
|
20
|
+
* @default "off"
|
|
21
21
|
*/
|
|
22
22
|
autocompleteAttribute: string;
|
|
23
23
|
/**
|
|
24
24
|
* Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)
|
|
25
25
|
* country code for the default country.
|
|
26
26
|
* When search results include the default country, it appears at the top of the list.
|
|
27
|
-
* @default us
|
|
27
|
+
* @default "us"
|
|
28
28
|
*/
|
|
29
29
|
set defaultCountry(value: string);
|
|
30
30
|
get defaultCountry(): string;
|
|
31
31
|
/**
|
|
32
32
|
* Indicates whether to disable the country field.
|
|
33
|
+
* @default false
|
|
33
34
|
*/
|
|
34
35
|
set disabled(isDisabled: boolean);
|
|
35
36
|
get disabled(): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { SkyAutocompleteSearchAsyncArgs } from '../autocomplete/types/autocomplete-search-async-args';
|
|
2
3
|
import { SkyAutocompleteSearchFunction } from '../autocomplete/types/autocomplete-search-function';
|
|
3
4
|
import { SkyAutocompleteSearchFunctionFilter } from '../autocomplete/types/autocomplete-search-function-filter';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
@@ -15,13 +16,13 @@ export declare class SkyLookupAutocompleteAdapter {
|
|
|
15
16
|
/**
|
|
16
17
|
* Specifies an object property to display in the text input after users
|
|
17
18
|
* select an item in the dropdown list.
|
|
18
|
-
* @default name
|
|
19
|
+
* @default "name"
|
|
19
20
|
*/
|
|
20
21
|
set descriptorProperty(value: string);
|
|
21
22
|
get descriptorProperty(): string;
|
|
22
23
|
/**
|
|
23
24
|
* Specifies an array of object properties to search.
|
|
24
|
-
* @default [
|
|
25
|
+
* @default ["name"]
|
|
25
26
|
*/
|
|
26
27
|
set propertiesToSearch(value: string[]);
|
|
27
28
|
get propertiesToSearch(): string[];
|
|
@@ -59,9 +60,10 @@ export declare class SkyLookupAutocompleteAdapter {
|
|
|
59
60
|
* list. By default, the lookup component displays all matching results.
|
|
60
61
|
*/
|
|
61
62
|
searchResultsLimit: number;
|
|
63
|
+
searchAsync: EventEmitter<SkyAutocompleteSearchAsyncArgs>;
|
|
62
64
|
private _descriptorProperty;
|
|
63
65
|
private _propertiesToSearch;
|
|
64
66
|
private _search;
|
|
65
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyLookupAutocompleteAdapter, never>;
|
|
66
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyLookupAutocompleteAdapter, never, never, { "debounceTime": "debounceTime"; "descriptorProperty": "descriptorProperty"; "propertiesToSearch": "propertiesToSearch"; "search": "search"; "searchResultTemplate": "searchResultTemplate"; "searchTextMinimumCharacters": "searchTextMinimumCharacters"; "searchFilters": "searchFilters"; "searchResultsLimit": "searchResultsLimit"; }, {}, never>;
|
|
68
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyLookupAutocompleteAdapter, never, never, { "debounceTime": "debounceTime"; "descriptorProperty": "descriptorProperty"; "propertiesToSearch": "propertiesToSearch"; "search": "search"; "searchResultTemplate": "searchResultTemplate"; "searchTextMinimumCharacters": "searchTextMinimumCharacters"; "searchFilters": "searchFilters"; "searchResultsLimit": "searchResultsLimit"; }, { "searchAsync": "searchAsync"; }, never>;
|
|
67
69
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SkyLookupItemSelectedPipe implements PipeTransform {
|
|
4
|
+
transform(id: unknown, selectedIdMap: Map<unknown, unknown>): boolean;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyLookupItemSelectedPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SkyLookupItemSelectedPipe, "skyLookupItemSelected">;
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SkyModalInstance } from '@skyux/modals';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { SkyLookupShowMoreNativePickerAsyncContext } from './types/lookup-show-more-native-picker-async-context';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
* Internal component to implement the native picker.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SkyLookupShowMoreAsyncModalComponent implements OnInit, OnDestroy {
|
|
11
|
+
modalInstance: SkyModalInstance;
|
|
12
|
+
context: SkyLookupShowMoreNativePickerAsyncContext;
|
|
13
|
+
private changeDetector;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* Fires when users select the button to add new options to the list.
|
|
17
|
+
*/
|
|
18
|
+
addClick: Subject<void>;
|
|
19
|
+
items: unknown[];
|
|
20
|
+
displayedItems: unknown[];
|
|
21
|
+
onlyShowSelected: boolean;
|
|
22
|
+
searchText: string;
|
|
23
|
+
isSearching: boolean;
|
|
24
|
+
hasMoreItems: boolean;
|
|
25
|
+
isLoadingMore: boolean;
|
|
26
|
+
selectedIdMap: Map<unknown, unknown>;
|
|
27
|
+
private continuationData;
|
|
28
|
+
private offset;
|
|
29
|
+
private ngUnsubscribe;
|
|
30
|
+
private currentSearchSub;
|
|
31
|
+
constructor(modalInstance: SkyModalInstance, context: SkyLookupShowMoreNativePickerAsyncContext, changeDetector: ChangeDetectorRef);
|
|
32
|
+
ngOnInit(): void;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
addButtonClicked(): void;
|
|
35
|
+
clearAll(): void;
|
|
36
|
+
itemClick(selectedItem: any): void;
|
|
37
|
+
onItemSelect(newSelectState: boolean, itemToSelect: any): void;
|
|
38
|
+
searchApplied(searchText: string): void;
|
|
39
|
+
selectAll(): void;
|
|
40
|
+
infiniteScrollEnd(): void;
|
|
41
|
+
save(): void;
|
|
42
|
+
private loadSearchResults;
|
|
43
|
+
private createInitialSelectedItemsMap;
|
|
44
|
+
private performSearch;
|
|
45
|
+
private updateDisplayedItems;
|
|
46
|
+
private cancelCurrentSearch;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyLookupShowMoreAsyncModalComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyLookupShowMoreAsyncModalComponent, "sky-lookup-show-more-async-modal", never, {}, {}, never, never>;
|
|
49
|
+
}
|
|
@@ -15,6 +15,7 @@ import { SkyLookupAdapterService } from './lookup-adapter.service';
|
|
|
15
15
|
import { SkyLookupAddClickEventArgs } from './types/lookup-add-click-event-args';
|
|
16
16
|
import { SkyLookupSelectModeType } from './types/lookup-select-mode-type';
|
|
17
17
|
import { SkyLookupShowMoreConfig } from './types/lookup-show-more-config';
|
|
18
|
+
import { SkyAutocompleteSearchAsyncArgs } from '../autocomplete/types/autocomplete-search-async-args';
|
|
18
19
|
import * as i0 from "@angular/core";
|
|
19
20
|
export declare class SkyLookupComponent extends SkyLookupAutocompleteAdapter implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor {
|
|
20
21
|
private changeDetector;
|
|
@@ -133,7 +134,9 @@ export declare class SkyLookupComponent extends SkyLookupAutocompleteAdapter imp
|
|
|
133
134
|
inputKeyup(event: KeyboardEvent): void;
|
|
134
135
|
onSearchButtonClick(): void;
|
|
135
136
|
onShowMoreClick(event: SkyAutocompleteShowMoreArgs): void;
|
|
137
|
+
private createNativePickerInstance;
|
|
136
138
|
openPicker(initialSearch: string): void;
|
|
139
|
+
onSearchAsync(args: SkyAutocompleteSearchAsyncArgs): void;
|
|
137
140
|
private addToSelected;
|
|
138
141
|
private addEventListeners;
|
|
139
142
|
private removeEventListeners;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./lookup.component";
|
|
3
|
-
import * as i2 from "./lookup-
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "
|
|
7
|
-
import * as i6 from "@
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "@skyux/
|
|
10
|
-
import * as i9 from "@skyux/
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "@skyux/
|
|
13
|
-
import * as i12 from "../
|
|
14
|
-
import * as i13 from "@skyux/
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "@skyux/
|
|
3
|
+
import * as i2 from "./lookup-item-selected.pipe";
|
|
4
|
+
import * as i3 from "./lookup-show-more-async-modal.component";
|
|
5
|
+
import * as i4 from "./lookup-show-more-modal.component";
|
|
6
|
+
import * as i5 from "@angular/common";
|
|
7
|
+
import * as i6 from "@angular/forms";
|
|
8
|
+
import * as i7 from "../autocomplete/autocomplete.module";
|
|
9
|
+
import * as i8 from "@skyux/forms";
|
|
10
|
+
import * as i9 from "@skyux/indicators";
|
|
11
|
+
import * as i10 from "@skyux/lists";
|
|
12
|
+
import * as i11 from "@skyux/i18n";
|
|
13
|
+
import * as i12 from "../shared/sky-lookup-resources.module";
|
|
14
|
+
import * as i13 from "@skyux/modals";
|
|
15
|
+
import * as i14 from "../search/search.module";
|
|
16
|
+
import * as i15 from "@skyux/theme";
|
|
17
|
+
import * as i16 from "@skyux/layout";
|
|
18
|
+
import * as i17 from "@skyux/core";
|
|
17
19
|
export declare class SkyLookupModule {
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkyLookupModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyLookupModule, [typeof i1.SkyLookupComponent, typeof i2.SkyLookupShowMoreModalComponent], [typeof
|
|
21
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyLookupModule, [typeof i1.SkyLookupComponent, typeof i2.SkyLookupItemSelectedPipe, typeof i3.SkyLookupShowMoreAsyncModalComponent, typeof i4.SkyLookupShowMoreModalComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.SkyAutocompleteModule, typeof i8.SkyCheckboxModule, typeof i9.SkyIconModule, typeof i10.SkyInfiniteScrollModule, typeof i11.SkyI18nModule, typeof i12.SkyLookupResourcesModule, typeof i13.SkyModalModule, typeof i10.SkyRepeaterModule, typeof i14.SkySearchModule, typeof i15.SkyThemeModule, typeof i9.SkyTokensModule, typeof i16.SkyToolbarModule, typeof i17.SkyViewkeeperModule, typeof i9.SkyWaitModule], [typeof i1.SkyLookupComponent]>;
|
|
20
22
|
static ɵinj: i0.ɵɵInjectorDeclaration<SkyLookupModule>;
|
|
21
23
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SkyAutocompleteSearchAsyncFunction } from '../../autocomplete/types/autocomplete-search-async-function';
|
|
2
|
+
import { SkyLookupSelectModeType } from './lookup-select-mode-type';
|
|
3
|
+
import { SkyLookupShowMoreNativePickerConfig } from './lookup-show-more-native-picker-config';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Context for the show more native picker. These values are provided by the lookup component.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SkyLookupShowMoreNativePickerAsyncContext {
|
|
9
|
+
descriptorProperty: string;
|
|
10
|
+
idProperty: string;
|
|
11
|
+
initialSearch: string;
|
|
12
|
+
initialValue: unknown[];
|
|
13
|
+
searchAsync: SkyAutocompleteSearchAsyncFunction;
|
|
14
|
+
selectMode: SkyLookupSelectModeType;
|
|
15
|
+
showAddButton: boolean;
|
|
16
|
+
userConfig: SkyLookupShowMoreNativePickerConfig;
|
|
17
|
+
}
|
|
@@ -13,7 +13,7 @@ export interface SkyLookupShowMoreNativePickerConfig {
|
|
|
13
13
|
itemTemplate?: TemplateRef<any>;
|
|
14
14
|
/**
|
|
15
15
|
* Specifies a title for the picker.
|
|
16
|
-
* @default
|
|
16
|
+
* @default "Select an option/Select options"
|
|
17
17
|
*/
|
|
18
18
|
title?: string;
|
|
19
19
|
}
|
|
@@ -27,10 +27,10 @@ export declare class SkySearchComponent implements OnDestroy, OnInit, OnChanges
|
|
|
27
27
|
searchText: string;
|
|
28
28
|
/**
|
|
29
29
|
* Specifies the expand mode for the search input. The valid options
|
|
30
|
-
* include `responsive` to collapse the search input into a button on
|
|
31
|
-
* mobile devices, `none` to *not* collapse the search input on mobile
|
|
32
|
-
* devices, and `fit` to extend the search input to fit the width of its container.
|
|
33
|
-
* @default responsive
|
|
30
|
+
* include `"responsive"` to collapse the search input into a button on
|
|
31
|
+
* mobile devices, `"none"` to *not* collapse the search input on mobile
|
|
32
|
+
* devices, and `"fit"` to extend the search input to fit the width of its container.
|
|
33
|
+
* @default "responsive"
|
|
34
34
|
*/
|
|
35
35
|
expandMode: string;
|
|
36
36
|
/**
|
|
@@ -48,7 +48,7 @@ export declare class SkySearchComponent implements OnDestroy, OnInit, OnChanges
|
|
|
48
48
|
/**
|
|
49
49
|
* Specifies placeholder text to display in the search input until users
|
|
50
50
|
* enter search criteria.
|
|
51
|
-
* @default Find in this list
|
|
51
|
+
* @default "Find in this list"
|
|
52
52
|
*/
|
|
53
53
|
placeholderText: string;
|
|
54
54
|
inputAnimate: string;
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/lookup",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^12.2.
|
|
6
|
-
"@angular/core": "^12.2.
|
|
7
|
-
"@angular/router": "^12.2.
|
|
8
|
-
"@skyux/core": "^5.2.
|
|
9
|
-
"@skyux/modals": "^5.0.
|
|
5
|
+
"@angular/common": "^12.2.16",
|
|
6
|
+
"@angular/core": "^12.2.16",
|
|
7
|
+
"@angular/router": "^12.2.16",
|
|
8
|
+
"@skyux/core": "^5.2.3",
|
|
9
|
+
"@skyux/modals": "^5.0.5",
|
|
10
10
|
"@skyux/forms": "^5.0.2",
|
|
11
|
-
"@skyux/i18n": "^5.0.
|
|
12
|
-
"@skyux/indicators": "^5.
|
|
13
|
-
"@skyux/layout": "^5.2.
|
|
14
|
-
"@skyux/lists": "^5.0
|
|
15
|
-
"@skyux/theme": "^5.0.
|
|
11
|
+
"@skyux/i18n": "^5.0.2",
|
|
12
|
+
"@skyux/indicators": "^5.3.0",
|
|
13
|
+
"@skyux/layout": "^5.2.2",
|
|
14
|
+
"@skyux/lists": "^5.1.0",
|
|
15
|
+
"@skyux/theme": "^5.0.5"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"intl-tel-input": "14.1.0",
|
package/public-api.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from './modules/autocomplete/types/autocomplete-default-search-function-options';
|
|
2
2
|
export * from './modules/autocomplete/types/autocomplete-input-text-change';
|
|
3
|
+
export * from './modules/autocomplete/types/autocomplete-search-async-args';
|
|
4
|
+
export * from './modules/autocomplete/types/autocomplete-search-async-result';
|
|
5
|
+
export * from './modules/autocomplete/types/autocomplete-search-async-result-display-type';
|
|
3
6
|
export * from './modules/autocomplete/types/autocomplete-search-function';
|
|
4
7
|
export * from './modules/autocomplete/types/autocomplete-search-function-filter';
|
|
5
8
|
export * from './modules/autocomplete/types/autocomplete-search-function-response';
|