@skyux/lookup 12.22.0 → 13.0.0-alpha.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.
Files changed (95) hide show
  1. package/fesm2022/skyux-lookup-testing.mjs +8 -8
  2. package/fesm2022/skyux-lookup-testing.mjs.map +1 -1
  3. package/fesm2022/skyux-lookup.mjs +73 -73
  4. package/fesm2022/skyux-lookup.mjs.map +1 -1
  5. package/index.d.ts +1239 -41
  6. package/package.json +17 -17
  7. package/testing/index.d.ts +742 -3
  8. package/lib/modules/autocomplete/autocomplete-adapter.service.d.ts +0 -26
  9. package/lib/modules/autocomplete/autocomplete-default-search-function.d.ts +0 -3
  10. package/lib/modules/autocomplete/autocomplete-input.directive.d.ts +0 -51
  11. package/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.d.ts +0 -11
  12. package/lib/modules/autocomplete/autocomplete.component.d.ts +0 -202
  13. package/lib/modules/autocomplete/autocomplete.module.d.ts +0 -16
  14. package/lib/modules/autocomplete/types/autocomplete-default-search-function-options.d.ts +0 -10
  15. package/lib/modules/autocomplete/types/autocomplete-input-text-change.d.ts +0 -6
  16. package/lib/modules/autocomplete/types/autocomplete-message-type.d.ts +0 -13
  17. package/lib/modules/autocomplete/types/autocomplete-message.d.ts +0 -10
  18. package/lib/modules/autocomplete/types/autocomplete-search-args.d.ts +0 -4
  19. package/lib/modules/autocomplete/types/autocomplete-search-async-args.d.ts +0 -35
  20. package/lib/modules/autocomplete/types/autocomplete-search-async-function.d.ts +0 -4
  21. package/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.d.ts +0 -1
  22. package/lib/modules/autocomplete/types/autocomplete-search-async-result.d.ts +0 -25
  23. package/lib/modules/autocomplete/types/autocomplete-search-context.d.ts +0 -1
  24. package/lib/modules/autocomplete/types/autocomplete-search-function-filter.d.ts +0 -2
  25. package/lib/modules/autocomplete/types/autocomplete-search-function-response.d.ts +0 -1
  26. package/lib/modules/autocomplete/types/autocomplete-search-function.d.ts +0 -3
  27. package/lib/modules/autocomplete/types/autocomplete-selection-change.d.ts +0 -6
  28. package/lib/modules/autocomplete/types/autocomplete-show-more-args.d.ts +0 -9
  29. package/lib/modules/country-field/clone-country-data.d.ts +0 -7
  30. package/lib/modules/country-field/country-field.component.d.ts +0 -97
  31. package/lib/modules/country-field/country-field.module.d.ts +0 -13
  32. package/lib/modules/country-field/types/country-field-context-token.d.ts +0 -6
  33. package/lib/modules/country-field/types/country-field-context.d.ts +0 -6
  34. package/lib/modules/country-field/types/country.d.ts +0 -29
  35. package/lib/modules/lookup/lookup-adapter.service.d.ts +0 -10
  36. package/lib/modules/lookup/lookup-autocomplete-adapter.d.ts +0 -78
  37. package/lib/modules/lookup/lookup-show-more-modal.component.d.ts +0 -57
  38. package/lib/modules/lookup/lookup.component.d.ts +0 -161
  39. package/lib/modules/lookup/lookup.module.d.ts +0 -13
  40. package/lib/modules/lookup/types/lookup-add-click-callback-args.d.ts +0 -16
  41. package/lib/modules/lookup/types/lookup-add-click-event-args.d.ts +0 -11
  42. package/lib/modules/lookup/types/lookup-select-mode-type.d.ts +0 -1
  43. package/lib/modules/lookup/types/lookup-select-mode.d.ts +0 -14
  44. package/lib/modules/lookup/types/lookup-show-more-config.d.ts +0 -18
  45. package/lib/modules/lookup/types/lookup-show-more-custom-picker-context.d.ts +0 -18
  46. package/lib/modules/lookup/types/lookup-show-more-custom-picker.d.ts +0 -7
  47. package/lib/modules/lookup/types/lookup-show-more-native-picker-config.d.ts +0 -26
  48. package/lib/modules/lookup/types/lookup-show-more-native-picker-context.d.ts +0 -18
  49. package/lib/modules/search/search-adapter.service.d.ts +0 -15
  50. package/lib/modules/search/search.component.d.ts +0 -90
  51. package/lib/modules/search/search.module.d.ts +0 -14
  52. package/lib/modules/selection-modal/selection-modal-item-selected.pipe.d.ts +0 -10
  53. package/lib/modules/selection-modal/selection-modal.component.d.ts +0 -46
  54. package/lib/modules/selection-modal/selection-modal.module.d.ts +0 -10
  55. package/lib/modules/selection-modal/selection-modal.service.d.ts +0 -18
  56. package/lib/modules/selection-modal/types/selection-modal-add-click-callback-args.d.ts +0 -9
  57. package/lib/modules/selection-modal/types/selection-modal-add-click-event-args.d.ts +0 -11
  58. package/lib/modules/selection-modal/types/selection-modal-close-args.d.ts +0 -14
  59. package/lib/modules/selection-modal/types/selection-modal-context.d.ts +0 -19
  60. package/lib/modules/selection-modal/types/selection-modal-instance.d.ts +0 -33
  61. package/lib/modules/selection-modal/types/selection-modal-open-args.d.ts +0 -70
  62. package/lib/modules/selection-modal/types/selection-modal-result.d.ts +0 -14
  63. package/lib/modules/selection-modal/types/selection-modal-search-args.d.ts +0 -21
  64. package/lib/modules/selection-modal/types/selection-modal-search-result.d.ts +0 -25
  65. package/lib/modules/shared/sky-lookup-resources.module.d.ts +0 -10
  66. package/lib/modules/shared/sky-lookup-string-utils.d.ts +0 -5
  67. package/testing/legacy/country-field/country-field-fixture.d.ts +0 -37
  68. package/testing/legacy/country-field/country-field-testing.module.d.ts +0 -10
  69. package/testing/legacy/search/search-fixture.d.ts +0 -29
  70. package/testing/legacy/search/search-testing.module.d.ts +0 -11
  71. package/testing/modules/autocomplete/autocomplete-harness-filters.d.ts +0 -6
  72. package/testing/modules/autocomplete/autocomplete-harness.d.ts +0 -104
  73. package/testing/modules/autocomplete/autocomplete-input-harness.d.ts +0 -14
  74. package/testing/modules/autocomplete/autocomplete-search-result-harness-filters.d.ts +0 -10
  75. package/testing/modules/autocomplete/autocomplete-search-result-harness.d.ts +0 -30
  76. package/testing/modules/country-field/country-field-harness-filters.d.ts +0 -6
  77. package/testing/modules/country-field/country-field-harness.d.ts +0 -92
  78. package/testing/modules/country-field/country-field-search-result-harness-filters.d.ts +0 -6
  79. package/testing/modules/country-field/country-field-search-result-harness.d.ts +0 -20
  80. package/testing/modules/lookup/lookup-harness-filters.d.ts +0 -6
  81. package/testing/modules/lookup/lookup-harness.d.ts +0 -114
  82. package/testing/modules/lookup/lookup-search-result-harness-filters.d.ts +0 -6
  83. package/testing/modules/lookup/lookup-search-result-harness.d.ts +0 -17
  84. package/testing/modules/lookup/lookup-selection-harness.d.ts +0 -6
  85. package/testing/modules/lookup/lookup-selections-list-harness.d.ts +0 -20
  86. package/testing/modules/lookup/lookup-show-more-picker-harness-filters.d.ts +0 -6
  87. package/testing/modules/lookup/lookup-show-more-picker-harness.d.ts +0 -23
  88. package/testing/modules/lookup/lookup-show-more-picker-search-result-harness-filters.d.ts +0 -6
  89. package/testing/modules/lookup/lookup-show-more-picker-search-result-harness.d.ts +0 -6
  90. package/testing/modules/search/search-harness-filters.d.ts +0 -6
  91. package/testing/modules/search/search-harness.d.ts +0 -78
  92. package/testing/modules/selection-modal/selection-modal-harness.d.ts +0 -85
  93. package/testing/modules/selection-modal/selection-modal-search-result-harness-filters.d.ts +0 -6
  94. package/testing/modules/selection-modal/selection-modal-search-result-harness.d.ts +0 -6
  95. package/testing/public-api.d.ts +0 -28
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * @deprecated The `SkySelectionModalModule` is no longer needed and can be removed from your application.
4
- * @internal
5
- */
6
- export declare class SkySelectionModalModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<SkySelectionModalModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkySelectionModalModule, never, never, never>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<SkySelectionModalModule>;
10
- }
@@ -1,18 +0,0 @@
1
- import { SkyModalService } from '@skyux/modals';
2
- import { SkySelectionModalInstance } from './types/selection-modal-instance';
3
- import { SkySelectionModalOpenArgs } from './types/selection-modal-open-args';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Displays a modal for selecting one or more values.
7
- */
8
- export declare class SkySelectionModalService {
9
- #private;
10
- constructor(modalSvc: SkyModalService);
11
- /**
12
- * Opens the selection modal.
13
- * @param args Parameters for the selection modal.
14
- */
15
- open(args: SkySelectionModalOpenArgs): SkySelectionModalInstance;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<SkySelectionModalService, never>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<SkySelectionModalService>;
18
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Specifies the information for the callback used when adding a new item to a selection modal instance.
3
- */
4
- export interface SkySelectionModalAddCallbackArgs {
5
- /**
6
- * The new item which has been added to the data. This item will be automatically selected.
7
- */
8
- item: any;
9
- }
@@ -1,11 +0,0 @@
1
- import { SkySelectionModalAddCallbackArgs } from './selection-modal-add-click-callback-args';
2
- /**
3
- * Specifies a callback function for the consumer to use to notify the selection modal that a new item has been added.
4
- */
5
- export interface SkySelectionModalAddClickEventArgs {
6
- /**
7
- * A callback function for the consumer to use to notify the selection modal that a new item has been added.
8
- * @param args Specifies information about the item that was added.
9
- */
10
- itemAdded: (args: SkySelectionModalAddCallbackArgs) => void;
11
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * The result from the selection modal.
3
- */
4
- export interface SkySelectionModalCloseArgs {
5
- /**
6
- * Indicates why the selection modal was closed.
7
- */
8
- reason: 'cancel' | 'close' | 'save';
9
- /**
10
- * A collection of items the user selected. This property is only
11
- * set when the `result` property is set to `save`.
12
- */
13
- selectedItems?: unknown[];
14
- }
@@ -1,19 +0,0 @@
1
- import { SkyAutocompleteSearchAsyncFunction } from '../../autocomplete/types/autocomplete-search-async-function';
2
- import { SkyLookupSelectModeType } from '../../lookup/types/lookup-select-mode-type';
3
- import { SkyLookupShowMoreNativePickerConfig } from '../../lookup/types/lookup-show-more-native-picker-config';
4
- /**
5
- * @internal
6
- * Context for the selection modal. These values are provided by the selection modal service.
7
- */
8
- export declare class SkySelectionModalContext {
9
- descriptorProperty: string;
10
- idProperty: string;
11
- initialSearch: string;
12
- initialValue: unknown[];
13
- searchAsync: SkyAutocompleteSearchAsyncFunction;
14
- selectionDescriptor: string;
15
- selectMode: SkyLookupSelectModeType;
16
- showAddButton: boolean;
17
- userConfig: SkyLookupShowMoreNativePickerConfig;
18
- constructor(descriptorProperty: string, idProperty: string, initialSearch: string, initialValue: unknown[], searchAsync: SkyAutocompleteSearchAsyncFunction, selectMode: SkyLookupSelectModeType, selectionDescriptor: string, showAddButton: boolean, userConfig: SkyLookupShowMoreNativePickerConfig);
19
- }
@@ -1,33 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { SkySelectionModalCloseArgs } from './selection-modal-close-args';
3
- /**
4
- * Represents an instance of a selection modal.
5
- */
6
- export declare class SkySelectionModalInstance {
7
- #private;
8
- /**
9
- * An event that the selection modal instance emits when it closes.
10
- * It emits a `SkySelectionModalCloseArgs` object with a `selectedItems` property that includes
11
- * items selected by users on close or save and a `reason` property that indicates
12
- * whether the selection modal was saved or closed without saving.
13
- * The `reason` property accepts `"cancel"`, `"close"`, and `"save"`.
14
- */
15
- get closed(): Observable<SkySelectionModalCloseArgs>;
16
- /**
17
- * @internal
18
- */
19
- get itemAdded(): Observable<unknown>;
20
- /**
21
- * @internal
22
- */
23
- id: string;
24
- constructor(id: string);
25
- /**
26
- * @internal
27
- */
28
- close(args: SkySelectionModalCloseArgs): void;
29
- /**
30
- * @internal
31
- */
32
- addItem(itemToAdd: unknown): void;
33
- }
@@ -1,70 +0,0 @@
1
- import { TemplateRef } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { SkyLookupSelectModeType } from '../../lookup/types/lookup-select-mode-type';
4
- import { SkySelectionModalAddClickEventArgs } from './selection-modal-add-click-event-args';
5
- import { SkySelectionModalSearchArgs } from './selection-modal-search-args';
6
- import { SkySelectionModalSearchResult } from './selection-modal-search-result';
7
- /**
8
- * Parameters for the selection modal.
9
- */
10
- export interface SkySelectionModalOpenArgs {
11
- /**
12
- * The template to format each option in the search results. The selection modal
13
- * injects values into the template as `item` variables that reference all the object
14
- * properties of the options. If you do not specify a template, the item's descriptor
15
- * property value is displayed.
16
- */
17
- itemTemplate?: TemplateRef<unknown>;
18
- /**
19
- * The title for the selection modal.
20
- * @default "Select an option/Select options"
21
- * @deprecated Use the `selectionDescriptor` input to give context to the title and accessibility labels instead.
22
- */
23
- title?: string;
24
- /**
25
- * The initial value for the selection modal.
26
- */
27
- value?: unknown[];
28
- /**
29
- * Specifies an object property to display in the text input after users
30
- * select an item in the dropdown list.
31
- */
32
- descriptorProperty: string;
33
- /**
34
- * An object property that represents the object's unique identifier.
35
- */
36
- idProperty: string;
37
- /**
38
- * The initial search text.
39
- */
40
- initialSearch?: string;
41
- /**
42
- * Called when users enter new search information and returns results via an observable.
43
- */
44
- searchAsync: (args: SkySelectionModalSearchArgs) => Observable<SkySelectionModalSearchResult> | undefined;
45
- /**
46
- * Specifies whether users can select one option or multiple options.
47
- * @default "multiple"
48
- */
49
- selectMode: SkyLookupSelectModeType;
50
- /**
51
- * Whether to display a button that lets users add options to the list.
52
- * @default false
53
- */
54
- showAddButton?: boolean;
55
- /**
56
- * Called when users select the button to add options to the list.
57
- */
58
- addClick?: (args: SkySelectionModalAddClickEventArgs) => void;
59
- /**
60
- * The CSS class to add to the modal, such as `ag-custom-component-popup` for
61
- * using a modal as part of a cell editor in Data Entry Grid.
62
- */
63
- wrapperClass?: string;
64
- /**
65
- * A descriptor for the item or items being selected. Use a plural term when `selectMode` is set to `multiple`; otherwise, use a singular term. The descriptor helps set the selection modal's `aria-label` attributes for the multiselect toolbar controls, the search input, and the save button to provide text equivalents for screen readers [to support accessibility](https://developer.blackbaud.com/skyux/components/checkbox#accessibility).
66
- * For example, when the descriptor is "constituents," the search input's `aria-label` is "Search constituents." For more information about the `aria-label` attribute, see the [WAI-ARIA definition](https://www.w3.org/TR/wai-aria/#aria-label).
67
- * @default "item"/"items"
68
- */
69
- selectionDescriptor?: string;
70
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * The result from the selection modal.
3
- */
4
- export interface SkySelectionModalResult {
5
- /**
6
- * Indicates whether the user saved or canceled the modal.
7
- */
8
- result: 'save' | 'cancel';
9
- /**
10
- * A collection of items the user selected. This property is only
11
- * set when the `result` property is set to `save`.
12
- */
13
- selectedItems?: unknown[];
14
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * Arguments passed when an asynchronous search is executed from the
3
- * selection modal service.
4
- */
5
- export interface SkySelectionModalSearchArgs {
6
- /**
7
- * The search text entered by the user.
8
- */
9
- searchText: string;
10
- /**
11
- * The offset index of the first result to return. When search is executed
12
- * as a result of an infinite scroll event, for example, offset will be set
13
- * to the number of items already displayed.
14
- */
15
- offset: number;
16
- /**
17
- * A continuation token which can be set and then will be passed back with any future searches.
18
- * This is helpful for applications which utilize a token instead of an offset when fetching data.
19
- */
20
- continuationData?: unknown;
21
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * The result of searching for items to display in a selection modal.
3
- */
4
- export interface SkySelectionModalSearchResult {
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
- }
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@skyux/i18n";
3
- /**
4
- * Import into any component library module that needs to use resource strings.
5
- */
6
- export declare class SkyLookupResourcesModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyLookupResourcesModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyLookupResourcesModule, never, never, [typeof i1.SkyI18nModule]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<SkyLookupResourcesModule>;
10
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Removes diacritical characters from strings and replaces them with their normalized equivalent.
3
- * For example: è becomes e, Å becomes A.
4
- */
5
- export declare function normalizeDiacritics(value: string): string;
@@ -1,37 +0,0 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- /**
3
- * Allows interaction with a SKY UX country field component.
4
- * @internal
5
- */
6
- export declare class SkyCountryFieldFixture {
7
- #private;
8
- /**
9
- * The value of the input field's autocomplete attribute.
10
- * @deprecated The country field component's `autocompleteAttribute` is deprecated.
11
- */
12
- get autocompleteAttribute(): string | null;
13
- /**
14
- * A flag indicating whether or not the input has been disabled.
15
- */
16
- get disabled(): boolean;
17
- /**
18
- * The value of the input field.
19
- */
20
- get searchText(): string;
21
- constructor(fixture: ComponentFixture<unknown>, skyTestId: string);
22
- /**
23
- * Enters the search text into the input field displaying search results, but making no selection.
24
- * @param searchText The name of the country to select.
25
- * @returns The list of country names matching the search text.
26
- */
27
- search(searchText: string): Promise<string[]>;
28
- /**
29
- * Enters the search text into the input field and selects the first result (if any).
30
- * @param searchText The name of the country to select.
31
- */
32
- searchAndSelectFirstResult(searchText: string): Promise<void>;
33
- /**
34
- * Clears the country selection and input field.
35
- */
36
- clear(): Promise<void>;
37
- }
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@skyux/lookup";
3
- /**
4
- * @internal
5
- */
6
- export declare class SkyCountryFieldTestingModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyCountryFieldTestingModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyCountryFieldTestingModule, never, never, [typeof i1.SkyCountryFieldModule]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<SkyCountryFieldTestingModule>;
10
- }
@@ -1,29 +0,0 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- /**
3
- * Allows interaction with a SKY UX search component.
4
- * @deprecated Use `SkySearchHarness` instead.
5
- * @internal
6
- */
7
- export declare class SkySearchFixture {
8
- #private;
9
- /**
10
- * Gets the search's current text.
11
- */
12
- get searchText(): string;
13
- /**
14
- * Gets the search's current placeholder text.
15
- */
16
- get placeholderText(): string;
17
- constructor(fixture: ComponentFixture<any>, skyTestId: string);
18
- /**
19
- * Applies the specified search text, invoking the search.
20
- * @param searchText The search text to apply. If none is specified, the search's
21
- * current search text will be applied.
22
- */
23
- apply(searchText?: string): void;
24
- /**
25
- * Clears the current search text. If there is no search text or the search text is
26
- * not currently applied, an error is thrown.
27
- */
28
- clear(): void;
29
- }
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@angular/platform-browser/animations";
3
- import * as i2 from "@skyux/lookup";
4
- /**
5
- * @internal
6
- */
7
- export declare class SkySearchTestingModule {
8
- static ɵfac: i0.ɵɵFactoryDeclaration<SkySearchTestingModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkySearchTestingModule, never, never, [typeof i1.NoopAnimationsModule, typeof i2.SkySearchModule]>;
10
- static ɵinj: i0.ɵɵInjectorDeclaration<SkySearchTestingModule>;
11
- }
@@ -1,6 +0,0 @@
1
- import { SkyHarnessFilters } from '@skyux/core/testing';
2
- /**
3
- * A set of criteria that can be used to filter a list of SkyAutocompleteHarness instances.
4
- */
5
- export interface SkyAutocompleteHarnessFilters extends SkyHarnessFilters {
6
- }
@@ -1,104 +0,0 @@
1
- import { HarnessPredicate } from '@angular/cdk/testing';
2
- import { SkyComponentHarness } from '@skyux/core/testing';
3
- import { SkyAutocompleteHarnessFilters } from './autocomplete-harness-filters';
4
- import { SkyAutocompleteInputHarness } from './autocomplete-input-harness';
5
- import { SkyAutocompleteSearchResultHarness } from './autocomplete-search-result-harness';
6
- import { SkyAutocompleteSearchResultHarnessFilters } from './autocomplete-search-result-harness-filters';
7
- /**
8
- * Harness for interacting with an autocomplete component in tests.
9
- */
10
- export declare class SkyAutocompleteHarness extends SkyComponentHarness {
11
- #private;
12
- /**
13
- * @internal
14
- */
15
- static hostSelector: string;
16
- /**
17
- * Gets a `HarnessPredicate` that can be used to search for a
18
- * `SkyAutocompleteHarness` that meets certain criteria.
19
- */
20
- static with(filters: SkyAutocompleteHarnessFilters): HarnessPredicate<SkyAutocompleteHarness>;
21
- /**
22
- * Blurs the autocomplete input.
23
- * @deprecated Call `await (await autocomplete.getControl()).blur()` instead.
24
- */
25
- blur(): Promise<void>;
26
- /**
27
- * Clears the autocomplete input value.
28
- * @deprecated Call `await (await autocomplete.getControl()).clear()` instead.
29
- */
30
- clear(): Promise<void>;
31
- /**
32
- * Enters text into the autocomplete input.
33
- * @deprecated Call `await (await autocomplete.getControl()).setValue()` instead.
34
- */
35
- enterText(value: string): Promise<void>;
36
- /**
37
- * Focuses the autocomplete input.
38
- * @deprecated Call `await (await autocomplete.getControl()).focus()` instead.
39
- */
40
- focus(): Promise<void>;
41
- /**
42
- * Gets the autocomplete `aria-labelledby` value.
43
- */
44
- getAriaLabelledby(): Promise<string | null>;
45
- /**
46
- * Gets the autocomplete input harness.
47
- */
48
- getControl(): Promise<SkyAutocompleteInputHarness>;
49
- /**
50
- * Returns autocomplete search result harnesses.
51
- */
52
- getSearchResults(filters?: SkyAutocompleteSearchResultHarnessFilters): Promise<SkyAutocompleteSearchResultHarness[]>;
53
- /**
54
- * Returns the text content for each autocomplete search result.
55
- */
56
- getSearchResultsText(filters?: SkyAutocompleteSearchResultHarnessFilters): Promise<string[]>;
57
- /**
58
- * Gets the value of the autocomplete input.
59
- * @deprecated Call `await (await autocomplete.getControl()).getValue()` instead.
60
- */
61
- getValue(): Promise<string>;
62
- /**
63
- * Gets the text displayed when no search results are found.
64
- */
65
- getNoResultsFoundText(): Promise<string>;
66
- /**
67
- * Whether the autocomplete input is disabled.
68
- * @deprecated Call `await (await autocomplete.getControl()).isDisabled()` instead.
69
- */
70
- isDisabled(): Promise<boolean>;
71
- /**
72
- * Whether the autocomplete input is focused.
73
- * @deprecated Call `await (await autocomplete.getControl()).isFocused()` instead.
74
- */
75
- isFocused(): Promise<boolean>;
76
- /**
77
- * Whether the autocomplete is open.
78
- */
79
- isOpen(): Promise<boolean>;
80
- /**
81
- * Selects a search result.
82
- */
83
- selectSearchResult(filters: SkyAutocompleteSearchResultHarnessFilters): Promise<void>;
84
- /**
85
- * Clicks the "Add" button in the autocomplete search results panel.
86
- * (The "Add" functionality is not included in the public API
87
- * of a "vanilla" autocomplete component, so this method is protected
88
- * to prevent consumers of the autocomplete harness from calling it.
89
- * The lookup harness, which extends the autocomplete harness, may
90
- * still access this feature, however.)
91
- * @internal
92
- */
93
- protected clickAddButton(): Promise<void>;
94
- /**
95
- * Clicks the "Show more" button.
96
- * (The "Show more" functionality is not included in the public API
97
- * of a "vanilla" autocomplete component, so this method is protected
98
- * to prevent consumers of the autocomplete harness from calling it.
99
- * The lookup harness, which extends the autocomplete harness, may
100
- * still access this feature, however.)
101
- * @internal
102
- */
103
- protected clickShowMoreButton(): Promise<void>;
104
- }
@@ -1,14 +0,0 @@
1
- import { SkyInputHarness } from '@skyux/core/testing';
2
- /**
3
- * Harness to interact with the autocomplete input harness.
4
- */
5
- export declare class SkyAutocompleteInputHarness extends SkyInputHarness {
6
- /**
7
- * @internal
8
- */
9
- static hostSelector: string;
10
- /**
11
- * Returns the value of the input's `aria-controls` attribute.
12
- */
13
- getAriaControls(): Promise<string | null>;
14
- }
@@ -1,10 +0,0 @@
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
- text?: string | RegExp;
10
- }
@@ -1,30 +0,0 @@
1
- import { HarnessPredicate } from '@angular/cdk/testing';
2
- import { SkyQueryableComponentHarness } from '@skyux/core/testing';
3
- import { SkyAutocompleteSearchResultHarnessFilters } from './autocomplete-search-result-harness-filters';
4
- /**
5
- * Harness for interacting with an autocomplete search result in tests.
6
- */
7
- export declare class SkyAutocompleteSearchResultHarness extends SkyQueryableComponentHarness {
8
- /**
9
- * @internal
10
- */
11
- static hostSelector: string;
12
- /**
13
- * Gets a `HarnessPredicate` that can be used to search for a
14
- * `SkyAutocompleteSearchResultHarness` that meets certain criteria.
15
- */
16
- static with(filters: SkyAutocompleteSearchResultHarnessFilters): HarnessPredicate<SkyAutocompleteSearchResultHarness>;
17
- /**
18
- * Returns the value of the search result's descriptor property.
19
- * This value is set by the autocomplete's `descriptorProperty` input.
20
- */
21
- getDescriptorValue(): Promise<string>;
22
- /**
23
- * Selects the search result.
24
- */
25
- select(): Promise<void>;
26
- /**
27
- * Returns the text of the search result.
28
- */
29
- getText(): Promise<string>;
30
- }
@@ -1,6 +0,0 @@
1
- import { SkyHarnessFilters } from '@skyux/core/testing';
2
- /**
3
- * A set of criteria that can be used to filter a list of `SkyCountryFieldHarness` instances.
4
- */
5
- export interface SkyCountryFieldHarnessFilters extends SkyHarnessFilters {
6
- }
@@ -1,92 +0,0 @@
1
- import { HarnessPredicate } from '@angular/cdk/testing';
2
- import { SkyAutocompleteHarness } from '../autocomplete/autocomplete-harness';
3
- import { SkyCountryFieldHarnessFilters } from './country-field-harness-filters';
4
- import { SkyCountryFieldSearchResultHarness } from './country-field-search-result-harness';
5
- import { SkyCountryFieldSearchResultHarnessFilters } from './country-field-search-result-harness-filters';
6
- /**
7
- * Harness for interacting with a country field component in tests.
8
- */
9
- export declare class SkyCountryFieldHarness extends SkyAutocompleteHarness {
10
- #private;
11
- /**
12
- * Finds a standard country field component, or a country field component that is wrapped by an input box component.
13
- * For input box implementations, we need to use the `.sky-input-box` selector since the `sky-country-field`
14
- * element is removed from the DOM.
15
- * @internal
16
- */
17
- static hostSelector: string;
18
- /**
19
- * Gets a `HarnessPredicate` that can be used to search for a
20
- * `SkyCountryFieldHarness` that meets certain criteria.
21
- * These filters only work for standalone country fields.
22
- * For country fields wrapped inside `sky-input-box`, place filters
23
- * on the input box instead, and query the country field using a `SkyInputBoxHarness`.
24
- * For the input box implementation, see the code example.
25
- */
26
- static with(filters: SkyCountryFieldHarnessFilters): HarnessPredicate<SkyCountryFieldHarness>;
27
- /**
28
- * Blurs the country field input.
29
- * @deprecated Call `await (await countryField.getControl()).blur()` instead.
30
- */
31
- blur(): Promise<void>;
32
- /**
33
- * Clears the country field input value.
34
- * @deprecated Call `await (await countryField.getControl()).clear()` instead.
35
- */
36
- clear(): Promise<void>;
37
- /**
38
- * Enters text into the country field input.
39
- * @deprecated Call `await (await countryField.getControl()).setValue()` instead.
40
- */
41
- enterText(value: string): Promise<void>;
42
- /**
43
- * Focuses the country field input.
44
- * @deprecated Call `await (await countryField.getControl()).focus()` instead.
45
- */
46
- focus(): Promise<void>;
47
- /**
48
- * Gets the country field `aria-labelledby` value.
49
- * This is not needed for country field because the id is generated internally,
50
- * and the method is marked internal to prevent it from being documented publicly.
51
- * @internal
52
- */
53
- getAriaLabelledby(): Promise<string | null>;
54
- /**
55
- * Returns country field search result harnesses.
56
- */
57
- getSearchResults(filters?: SkyCountryFieldSearchResultHarnessFilters): Promise<SkyCountryFieldSearchResultHarness[]>;
58
- /**
59
- * Returns the text content for each country field search result.
60
- */
61
- getSearchResultsText(filters?: SkyCountryFieldSearchResultHarnessFilters): Promise<string[]>;
62
- /**
63
- * Gets the value of the country field input.
64
- * @deprecated Call `await (await countryField.getControl()).getValue()` instead.
65
- */
66
- getValue(): Promise<string>;
67
- /**
68
- * Gets the text displayed when no search results are found.
69
- * For a country field, this is always the default text and the method
70
- * is marked internal to prevent it from being documented publicly.
71
- * @internal
72
- */
73
- getNoResultsFoundText(): Promise<string>;
74
- /**
75
- * Whether the country field input is disabled.
76
- * @deprecated Call `await (await countryField.getControl()).isDisabled()` instead.
77
- */
78
- isDisabled(): Promise<boolean>;
79
- /**
80
- * Whether the country field input is focused.
81
- * @deprecated Call `await (await countryField.getControl()).isFocused()` instead.
82
- */
83
- isFocused(): Promise<boolean>;
84
- /**
85
- * Whether the country field is open.
86
- */
87
- isOpen(): Promise<boolean>;
88
- /**
89
- * Selects a search result.
90
- */
91
- selectSearchResult(filters: SkyCountryFieldSearchResultHarnessFilters): Promise<void>;
92
- }
@@ -1,6 +0,0 @@
1
- import { SkyAutocompleteSearchResultHarnessFilters } from '../autocomplete/autocomplete-search-result-harness-filters';
2
- /**
3
- * A set of criteria that can be used to filter a list of `SkyCountryFieldSearchResultHarness` instances.
4
- */
5
- export interface SkyCountryFieldSearchResultHarnessFilters extends SkyAutocompleteSearchResultHarnessFilters {
6
- }