@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,5 +1,744 @@
1
+ import { BaseHarnessFilters, HarnessPredicate, ComponentHarness } from '@angular/cdk/testing';
2
+ import { SkyHarnessFilters, SkyInputHarness, SkyQueryableComponentHarness, SkyComponentHarness } from '@skyux/core/testing';
3
+ import { ComponentFixture } from '@angular/core/testing';
4
+ import * as i0 from '@angular/core';
5
+ import * as i1 from '@skyux/lookup';
6
+ import { SkyTokenHarness, SkyTokensHarness } from '@skyux/indicators/testing';
7
+ import { SkyRepeaterItemHarness, SkyRepeaterItemHarnessFilters } from '@skyux/lists/testing';
8
+ import * as i1$1 from '@angular/platform-browser/animations';
9
+
1
10
  /**
2
- * Generated bundle index. Do not edit.
11
+ * A set of criteria that can be used to filter a list of SkyAutocompleteHarness instances.
3
12
  */
4
- /// <amd-module name="@skyux/lookup/testing" />
5
- export * from './public-api';
13
+ interface SkyAutocompleteHarnessFilters extends SkyHarnessFilters {
14
+ }
15
+
16
+ /**
17
+ * Harness to interact with the autocomplete input harness.
18
+ */
19
+ declare class SkyAutocompleteInputHarness extends SkyInputHarness {
20
+ /**
21
+ * @internal
22
+ */
23
+ static hostSelector: string;
24
+ /**
25
+ * Returns the value of the input's `aria-controls` attribute.
26
+ */
27
+ getAriaControls(): Promise<string | null>;
28
+ }
29
+
30
+ /**
31
+ * A set of criteria that can be used to filter a list of SkyAutocompleteSearchResultHarness instances.
32
+ */
33
+ interface SkyAutocompleteSearchResultHarnessFilters extends Omit<BaseHarnessFilters, 'selector'> {
34
+ /**
35
+ * Only find instances whose content matches the given value.
36
+ */
37
+ text?: string | RegExp;
38
+ }
39
+
40
+ /**
41
+ * Harness for interacting with an autocomplete search result in tests.
42
+ */
43
+ declare class SkyAutocompleteSearchResultHarness extends SkyQueryableComponentHarness {
44
+ /**
45
+ * @internal
46
+ */
47
+ static hostSelector: string;
48
+ /**
49
+ * Gets a `HarnessPredicate` that can be used to search for a
50
+ * `SkyAutocompleteSearchResultHarness` that meets certain criteria.
51
+ */
52
+ static with(filters: SkyAutocompleteSearchResultHarnessFilters): HarnessPredicate<SkyAutocompleteSearchResultHarness>;
53
+ /**
54
+ * Returns the value of the search result's descriptor property.
55
+ * This value is set by the autocomplete's `descriptorProperty` input.
56
+ */
57
+ getDescriptorValue(): Promise<string>;
58
+ /**
59
+ * Selects the search result.
60
+ */
61
+ select(): Promise<void>;
62
+ /**
63
+ * Returns the text of the search result.
64
+ */
65
+ getText(): Promise<string>;
66
+ }
67
+
68
+ /**
69
+ * Harness for interacting with an autocomplete component in tests.
70
+ */
71
+ declare class SkyAutocompleteHarness extends SkyComponentHarness {
72
+ #private;
73
+ /**
74
+ * @internal
75
+ */
76
+ static hostSelector: string;
77
+ /**
78
+ * Gets a `HarnessPredicate` that can be used to search for a
79
+ * `SkyAutocompleteHarness` that meets certain criteria.
80
+ */
81
+ static with(filters: SkyAutocompleteHarnessFilters): HarnessPredicate<SkyAutocompleteHarness>;
82
+ /**
83
+ * Blurs the autocomplete input.
84
+ * @deprecated Call `await (await autocomplete.getControl()).blur()` instead.
85
+ */
86
+ blur(): Promise<void>;
87
+ /**
88
+ * Clears the autocomplete input value.
89
+ * @deprecated Call `await (await autocomplete.getControl()).clear()` instead.
90
+ */
91
+ clear(): Promise<void>;
92
+ /**
93
+ * Enters text into the autocomplete input.
94
+ * @deprecated Call `await (await autocomplete.getControl()).setValue()` instead.
95
+ */
96
+ enterText(value: string): Promise<void>;
97
+ /**
98
+ * Focuses the autocomplete input.
99
+ * @deprecated Call `await (await autocomplete.getControl()).focus()` instead.
100
+ */
101
+ focus(): Promise<void>;
102
+ /**
103
+ * Gets the autocomplete `aria-labelledby` value.
104
+ */
105
+ getAriaLabelledby(): Promise<string | null>;
106
+ /**
107
+ * Gets the autocomplete input harness.
108
+ */
109
+ getControl(): Promise<SkyAutocompleteInputHarness>;
110
+ /**
111
+ * Returns autocomplete search result harnesses.
112
+ */
113
+ getSearchResults(filters?: SkyAutocompleteSearchResultHarnessFilters): Promise<SkyAutocompleteSearchResultHarness[]>;
114
+ /**
115
+ * Returns the text content for each autocomplete search result.
116
+ */
117
+ getSearchResultsText(filters?: SkyAutocompleteSearchResultHarnessFilters): Promise<string[]>;
118
+ /**
119
+ * Gets the value of the autocomplete input.
120
+ * @deprecated Call `await (await autocomplete.getControl()).getValue()` instead.
121
+ */
122
+ getValue(): Promise<string>;
123
+ /**
124
+ * Gets the text displayed when no search results are found.
125
+ */
126
+ getNoResultsFoundText(): Promise<string>;
127
+ /**
128
+ * Whether the autocomplete input is disabled.
129
+ * @deprecated Call `await (await autocomplete.getControl()).isDisabled()` instead.
130
+ */
131
+ isDisabled(): Promise<boolean>;
132
+ /**
133
+ * Whether the autocomplete input is focused.
134
+ * @deprecated Call `await (await autocomplete.getControl()).isFocused()` instead.
135
+ */
136
+ isFocused(): Promise<boolean>;
137
+ /**
138
+ * Whether the autocomplete is open.
139
+ */
140
+ isOpen(): Promise<boolean>;
141
+ /**
142
+ * Selects a search result.
143
+ */
144
+ selectSearchResult(filters: SkyAutocompleteSearchResultHarnessFilters): Promise<void>;
145
+ /**
146
+ * Clicks the "Add" button in the autocomplete search results panel.
147
+ * (The "Add" functionality is not included in the public API
148
+ * of a "vanilla" autocomplete component, so this method is protected
149
+ * to prevent consumers of the autocomplete harness from calling it.
150
+ * The lookup harness, which extends the autocomplete harness, may
151
+ * still access this feature, however.)
152
+ * @internal
153
+ */
154
+ protected clickAddButton(): Promise<void>;
155
+ /**
156
+ * Clicks the "Show more" button.
157
+ * (The "Show more" functionality is not included in the public API
158
+ * of a "vanilla" autocomplete component, so this method is protected
159
+ * to prevent consumers of the autocomplete harness from calling it.
160
+ * The lookup harness, which extends the autocomplete harness, may
161
+ * still access this feature, however.)
162
+ * @internal
163
+ */
164
+ protected clickShowMoreButton(): Promise<void>;
165
+ }
166
+
167
+ /**
168
+ * Allows interaction with a SKY UX country field component.
169
+ * @internal
170
+ */
171
+ declare class SkyCountryFieldFixture {
172
+ #private;
173
+ /**
174
+ * The value of the input field's autocomplete attribute.
175
+ * @deprecated The country field component's `autocompleteAttribute` is deprecated.
176
+ */
177
+ get autocompleteAttribute(): string | null;
178
+ /**
179
+ * A flag indicating whether or not the input has been disabled.
180
+ */
181
+ get disabled(): boolean;
182
+ /**
183
+ * The value of the input field.
184
+ */
185
+ get searchText(): string;
186
+ constructor(fixture: ComponentFixture<unknown>, skyTestId: string);
187
+ /**
188
+ * Enters the search text into the input field displaying search results, but making no selection.
189
+ * @param searchText The name of the country to select.
190
+ * @returns The list of country names matching the search text.
191
+ */
192
+ search(searchText: string): Promise<string[]>;
193
+ /**
194
+ * Enters the search text into the input field and selects the first result (if any).
195
+ * @param searchText The name of the country to select.
196
+ */
197
+ searchAndSelectFirstResult(searchText: string): Promise<void>;
198
+ /**
199
+ * Clears the country selection and input field.
200
+ */
201
+ clear(): Promise<void>;
202
+ }
203
+
204
+ /**
205
+ * @internal
206
+ */
207
+ declare class SkyCountryFieldTestingModule {
208
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkyCountryFieldTestingModule, never>;
209
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyCountryFieldTestingModule, never, never, [typeof i1.SkyCountryFieldModule]>;
210
+ static ɵinj: i0.ɵɵInjectorDeclaration<SkyCountryFieldTestingModule>;
211
+ }
212
+
213
+ /**
214
+ * A set of criteria that can be used to filter a list of `SkyCountryFieldHarness` instances.
215
+ */
216
+ interface SkyCountryFieldHarnessFilters extends SkyHarnessFilters {
217
+ }
218
+
219
+ /**
220
+ * A set of criteria that can be used to filter a list of `SkyCountryFieldSearchResultHarness` instances.
221
+ */
222
+ interface SkyCountryFieldSearchResultHarnessFilters extends SkyAutocompleteSearchResultHarnessFilters {
223
+ }
224
+
225
+ /**
226
+ * Harness for interacting with an autocomplete search result in tests.
227
+ */
228
+ declare class SkyCountryFieldSearchResultHarness extends SkyAutocompleteSearchResultHarness {
229
+ /**
230
+ * Gets a `HarnessPredicate` that can be used to search for a
231
+ * `SkyCountryFieldSearchResultHarness` that meets certain criteria.
232
+ */
233
+ static with(filters: SkyCountryFieldSearchResultHarnessFilters): HarnessPredicate<SkyCountryFieldSearchResultHarness>;
234
+ /**
235
+ * Returns the value of the search result's descriptor property.
236
+ * This is not needed by country field because it is always set to the country name,
237
+ * and the method is marked internal to prevent it from being documented publicly.
238
+ * @internal
239
+ */
240
+ getDescriptorValue(): Promise<string>;
241
+ }
242
+
243
+ /**
244
+ * Harness for interacting with a country field component in tests.
245
+ */
246
+ declare class SkyCountryFieldHarness extends SkyAutocompleteHarness {
247
+ #private;
248
+ /**
249
+ * Finds a standard country field component, or a country field component that is wrapped by an input box component.
250
+ * For input box implementations, we need to use the `.sky-input-box` selector since the `sky-country-field`
251
+ * element is removed from the DOM.
252
+ * @internal
253
+ */
254
+ static hostSelector: string;
255
+ /**
256
+ * Gets a `HarnessPredicate` that can be used to search for a
257
+ * `SkyCountryFieldHarness` that meets certain criteria.
258
+ * These filters only work for standalone country fields.
259
+ * For country fields wrapped inside `sky-input-box`, place filters
260
+ * on the input box instead, and query the country field using a `SkyInputBoxHarness`.
261
+ * For the input box implementation, see the code example.
262
+ */
263
+ static with(filters: SkyCountryFieldHarnessFilters): HarnessPredicate<SkyCountryFieldHarness>;
264
+ /**
265
+ * Blurs the country field input.
266
+ * @deprecated Call `await (await countryField.getControl()).blur()` instead.
267
+ */
268
+ blur(): Promise<void>;
269
+ /**
270
+ * Clears the country field input value.
271
+ * @deprecated Call `await (await countryField.getControl()).clear()` instead.
272
+ */
273
+ clear(): Promise<void>;
274
+ /**
275
+ * Enters text into the country field input.
276
+ * @deprecated Call `await (await countryField.getControl()).setValue()` instead.
277
+ */
278
+ enterText(value: string): Promise<void>;
279
+ /**
280
+ * Focuses the country field input.
281
+ * @deprecated Call `await (await countryField.getControl()).focus()` instead.
282
+ */
283
+ focus(): Promise<void>;
284
+ /**
285
+ * Gets the country field `aria-labelledby` value.
286
+ * This is not needed for country field because the id is generated internally,
287
+ * and the method is marked internal to prevent it from being documented publicly.
288
+ * @internal
289
+ */
290
+ getAriaLabelledby(): Promise<string | null>;
291
+ /**
292
+ * Returns country field search result harnesses.
293
+ */
294
+ getSearchResults(filters?: SkyCountryFieldSearchResultHarnessFilters): Promise<SkyCountryFieldSearchResultHarness[]>;
295
+ /**
296
+ * Returns the text content for each country field search result.
297
+ */
298
+ getSearchResultsText(filters?: SkyCountryFieldSearchResultHarnessFilters): Promise<string[]>;
299
+ /**
300
+ * Gets the value of the country field input.
301
+ * @deprecated Call `await (await countryField.getControl()).getValue()` instead.
302
+ */
303
+ getValue(): Promise<string>;
304
+ /**
305
+ * Gets the text displayed when no search results are found.
306
+ * For a country field, this is always the default text and the method
307
+ * is marked internal to prevent it from being documented publicly.
308
+ * @internal
309
+ */
310
+ getNoResultsFoundText(): Promise<string>;
311
+ /**
312
+ * Whether the country field input is disabled.
313
+ * @deprecated Call `await (await countryField.getControl()).isDisabled()` instead.
314
+ */
315
+ isDisabled(): Promise<boolean>;
316
+ /**
317
+ * Whether the country field input is focused.
318
+ * @deprecated Call `await (await countryField.getControl()).isFocused()` instead.
319
+ */
320
+ isFocused(): Promise<boolean>;
321
+ /**
322
+ * Whether the country field is open.
323
+ */
324
+ isOpen(): Promise<boolean>;
325
+ /**
326
+ * Selects a search result.
327
+ */
328
+ selectSearchResult(filters: SkyCountryFieldSearchResultHarnessFilters): Promise<void>;
329
+ }
330
+
331
+ /**
332
+ * A set of criteria that can be used to filter a list of `SkyLookupHarness` instances.
333
+ */
334
+ interface SkyLookupHarnessFilters extends SkyHarnessFilters {
335
+ }
336
+
337
+ /**
338
+ * A set of criteria that can be used to filter a list of `SkyLookupSearchResultHarness` instances.
339
+ */
340
+ interface SkyLookupSearchResultHarnessFilters extends SkyAutocompleteSearchResultHarnessFilters {
341
+ }
342
+
343
+ /**
344
+ * Harness for interacting with an autocomplete search result in tests.
345
+ */
346
+ declare class SkyLookupSearchResultHarness extends SkyAutocompleteSearchResultHarness {
347
+ /**
348
+ * Gets a `HarnessPredicate` that can be used to search for a
349
+ * `SkyLookupSearchResultHarness` that meets certain criteria.
350
+ */
351
+ static with(filters: SkyLookupSearchResultHarnessFilters): HarnessPredicate<SkyLookupSearchResultHarness>;
352
+ /**
353
+ * Returns the value of the search result's descriptor property.
354
+ */
355
+ getDescriptorValue(): Promise<string>;
356
+ }
357
+
358
+ /**
359
+ * Harness for interacting with a multiselect lookup selection in tests.
360
+ */
361
+ declare class SkyLookupSelectionHarness extends SkyTokenHarness {
362
+ }
363
+
364
+ /**
365
+ * Harness for interacting with a selection modal's search results in tests.
366
+ */
367
+ declare class SkySelectionModalSearchResultHarness extends SkyRepeaterItemHarness {
368
+ }
369
+
370
+ /**
371
+ * A set of criteria that can be used to filter a list of `SkySelectionModalSearchResultHarness` instances.
372
+ */
373
+ interface SkySelectionModalSearchResultHarnessFilters extends Omit<SkyRepeaterItemHarnessFilters, 'titleText' | 'ancestor'> {
374
+ }
375
+
376
+ /**
377
+ * Harness for interacting with a selection modal in tests.
378
+ */
379
+ declare class SkySelectionModalHarness extends ComponentHarness {
380
+ #private;
381
+ /**
382
+ * @internal
383
+ */
384
+ static hostSelector: string;
385
+ /**
386
+ * Clears the text of the search input.
387
+ */
388
+ clearSearchText(): Promise<void>;
389
+ /**
390
+ * Enters text into the search input and performs a search.
391
+ */
392
+ enterSearchText(value: string): Promise<void>;
393
+ /**
394
+ *
395
+ * Gets the search input's aria-label.
396
+ */
397
+ getSearchAriaLabel(): Promise<string | null>;
398
+ /**
399
+ * Selects multiple search results based on a set of criteria.
400
+ */
401
+ selectSearchResult(filters?: SkySelectionModalSearchResultHarnessFilters): Promise<void>;
402
+ /**
403
+ * Saves any selections made and closes the modal.
404
+ */
405
+ saveAndClose(): Promise<void>;
406
+ /**
407
+ *
408
+ * Gets the save button's aria-label.
409
+ */
410
+ getSaveButtonAriaLabel(): Promise<string | null>;
411
+ /**
412
+ * Closes the picker without saving any selections made.
413
+ */
414
+ cancel(): Promise<void>;
415
+ /**
416
+ * Gets a list of search results.
417
+ */
418
+ getSearchResults(filters?: SkySelectionModalSearchResultHarnessFilters): Promise<SkySelectionModalSearchResultHarness[]>;
419
+ /**
420
+ * Clears all selections made.
421
+ */
422
+ clearAll(): Promise<void>;
423
+ /**
424
+ *
425
+ * Gets the clear all button's aria-label.
426
+ */
427
+ getClearAllButtonAriaLabel(): Promise<string | null>;
428
+ /**
429
+ * Whether the selection modal is configured to allow multiple selections.
430
+ */
431
+ isMultiselect(): Promise<boolean>;
432
+ /**
433
+ * Selects all search results.
434
+ */
435
+ selectAll(): Promise<void>;
436
+ /**
437
+ *
438
+ * Gets the select all button's aria-label.
439
+ */
440
+ getSelectAllButtonAriaLabel(): Promise<string | null>;
441
+ /**
442
+ * Loads more results in the picker.
443
+ */
444
+ loadMore(): Promise<void>;
445
+ /**
446
+ * Whether the selection modal is configured to show the add button.
447
+ */
448
+ hasAddButton(): Promise<boolean>;
449
+ /**
450
+ * Clicks the add button.
451
+ */
452
+ clickAddButton(): Promise<void>;
453
+ /**
454
+ * Gets the "Only show selected" checkbox's aria-label
455
+ */
456
+ getOnlyShowSelectedAriaLabel(): Promise<string | null>;
457
+ }
458
+
459
+ /**
460
+ * A set of criteria that can be used to filter a list of `SkyLookupShowMorePickerHarness` instances.
461
+ */
462
+ interface SkyLookupShowMorePickerHarnessFilters extends Omit<BaseHarnessFilters, 'ancestor'> {
463
+ }
464
+
465
+ /**
466
+ * Harness for interacting with a lookup's "Show more" picker search results in tests.
467
+ */
468
+ declare class SkyLookupShowMorePickerSearchResultHarness extends SkySelectionModalSearchResultHarness {
469
+ }
470
+
471
+ /**
472
+ * A set of criteria that can be used to filter a list of `SkyLookupShowMorePickerSearchResultHarness` instances.
473
+ */
474
+ interface SkyLookupShowMorePickerSearchResultHarnessFilters extends SkySelectionModalSearchResultHarnessFilters {
475
+ }
476
+
477
+ /**
478
+ * Harness for interacting with a lookup's "Show more" picker in tests.
479
+ */
480
+ declare class SkyLookupShowMorePickerHarness extends SkySelectionModalHarness {
481
+ /**
482
+ * Gets a `HarnessPredicate` that can be used to search for a
483
+ * `SkyLookupShowMorePickerHarness` that meets certain criteria.
484
+ */
485
+ static with(filters: SkyLookupShowMorePickerHarnessFilters): HarnessPredicate<SkyLookupShowMorePickerHarness>;
486
+ /**
487
+ * Selects multiple search results based on a set of criteria.
488
+ */
489
+ selectSearchResult(filters?: SkyLookupShowMorePickerSearchResultHarnessFilters): Promise<void>;
490
+ /**
491
+ * Gets a list of search results.
492
+ */
493
+ getSearchResults(filters?: SkyLookupShowMorePickerSearchResultHarnessFilters): Promise<SkyLookupShowMorePickerSearchResultHarness[]>;
494
+ }
495
+
496
+ /**
497
+ * Harness for interacting with a lookup component in tests.
498
+ */
499
+ declare class SkyLookupHarness extends SkyAutocompleteHarness {
500
+ #private;
501
+ /**
502
+ * Finds a standard lookup component, or a lookup component that is wrapped by an input box component.
503
+ * For input box implementations, we need to use the `.sky-input-box` selector since the `sky-lookup`
504
+ * element is removed from the DOM.
505
+ * @internal
506
+ */
507
+ static hostSelector: string;
508
+ /**
509
+ * Gets a `HarnessPredicate` that can be used to search for a
510
+ * `SkyLookupHarness` that meets certain criteria.
511
+ *
512
+ * These filters only work for standalone lookups. For lookups
513
+ * wrapped inside `sky-input-box`, place filters on the input box
514
+ * instead and query the datepicker using a `SkyInputBoxHarness`.
515
+ * For the input box implementation, see the code example.
516
+ */
517
+ static with(filters: SkyLookupHarnessFilters): HarnessPredicate<SkyLookupHarness>;
518
+ /**
519
+ * Blurs the lookup input.
520
+ * @deprecated Call `await (await lookup.getControl()).blur()` instead.
521
+ */
522
+ blur(): Promise<void>;
523
+ /**
524
+ * Clears the lookup input value.
525
+ * @deprecated Call `await (await lookup.getControl()).clear()` instead.
526
+ */
527
+ clear(): Promise<void>;
528
+ /**
529
+ * Clicks the "Add" button on the search results panel.
530
+ */
531
+ clickAddButton(): Promise<void>;
532
+ /**
533
+ * Clicks the "Show more" button on the search results panel.
534
+ */
535
+ clickShowMoreButton(): Promise<void>;
536
+ /**
537
+ * Dismisses the selections made with a multiselect lookup.
538
+ */
539
+ dismissSelections(): Promise<void>;
540
+ /**
541
+ * Enters text into the lookup input.
542
+ * @deprecated Call `await (await lookup.getControl()).setValue()` instead.
543
+ */
544
+ enterText(value: string): Promise<void>;
545
+ /**
546
+ * Focuses the lookup input.
547
+ * @deprecated Call `await (await lookup.getControl()).focus()` instead.
548
+ */
549
+ focus(): Promise<void>;
550
+ /**
551
+ * Gets the lookup `aria-labelledby` value.
552
+ * @deprecated Don't use this property. It returns a value from a deprecated input that lookup no longer uses.
553
+ */
554
+ getAriaLabelledby(): Promise<string | null>;
555
+ /**
556
+ * Returns lookup search result harnesses.
557
+ */
558
+ getSearchResults(filters?: SkyLookupSearchResultHarnessFilters): Promise<SkyLookupSearchResultHarness[]>;
559
+ /**
560
+ * Returns the text content for each lookup search result.
561
+ */
562
+ getSearchResultsText(filters?: SkyLookupSearchResultHarnessFilters): Promise<string[]>;
563
+ /**
564
+ * Gets the "Show more" picker harness.
565
+ */
566
+ getShowMorePicker(): Promise<SkyLookupShowMorePickerHarness>;
567
+ /**
568
+ * Gets a list of selections made with a multiselect lookup.
569
+ */
570
+ getSelections(): Promise<SkyLookupSelectionHarness[]>;
571
+ /**
572
+ * Gets the text content of all selections made with a multiselect lookup.
573
+ */
574
+ getSelectionsText(): Promise<string[]>;
575
+ /**
576
+ * Gets the value of the lookup input.
577
+ * @deprecated Call `await (await lookup.getControl()).getValue()` instead.
578
+ */
579
+ getValue(): Promise<string>;
580
+ /**
581
+ * Whether the lookup input is disabled.
582
+ * @deprecated Call `await (await lookup.getControl()).isDisabled()` instead.
583
+ */
584
+ isDisabled(): Promise<boolean>;
585
+ /**
586
+ * Whether the lookup input is focused.
587
+ * @deprecated Call `await (await lookup.getControl()).isFocused()` instead.
588
+ */
589
+ isFocused(): Promise<boolean>;
590
+ /**
591
+ * Whether the lookup allows for multiple selections.
592
+ */
593
+ isMultiselect(): Promise<boolean>;
594
+ /**
595
+ * Whether the lookup is open.
596
+ */
597
+ isOpen(): Promise<boolean>;
598
+ /**
599
+ * Selects a search result.
600
+ */
601
+ selectSearchResult(filters: SkyLookupSearchResultHarnessFilters): Promise<void>;
602
+ }
603
+
604
+ /**
605
+ * Harness for interacting with multiselect lookup selections in tests.
606
+ * @internal
607
+ */
608
+ declare class SkyLookupSelectionsListHarness extends SkyTokensHarness {
609
+ /**
610
+ * Gets a list of selections.
611
+ */
612
+ getSelections(): Promise<SkyLookupSelectionHarness[]>;
613
+ /**
614
+ * Dismisses the selections in the list.
615
+ */
616
+ dismissSelections(): Promise<void>;
617
+ /**
618
+ * Gets the text content of all selections in the list.
619
+ */
620
+ getSelectionsText(): Promise<string[]>;
621
+ }
622
+
623
+ /**
624
+ * Allows interaction with a SKY UX search component.
625
+ * @deprecated Use `SkySearchHarness` instead.
626
+ * @internal
627
+ */
628
+ declare class SkySearchFixture {
629
+ #private;
630
+ /**
631
+ * Gets the search's current text.
632
+ */
633
+ get searchText(): string;
634
+ /**
635
+ * Gets the search's current placeholder text.
636
+ */
637
+ get placeholderText(): string;
638
+ constructor(fixture: ComponentFixture<any>, skyTestId: string);
639
+ /**
640
+ * Applies the specified search text, invoking the search.
641
+ * @param searchText The search text to apply. If none is specified, the search's
642
+ * current search text will be applied.
643
+ */
644
+ apply(searchText?: string): void;
645
+ /**
646
+ * Clears the current search text. If there is no search text or the search text is
647
+ * not currently applied, an error is thrown.
648
+ */
649
+ clear(): void;
650
+ }
651
+
652
+ /**
653
+ * @internal
654
+ */
655
+ declare class SkySearchTestingModule {
656
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkySearchTestingModule, never>;
657
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkySearchTestingModule, never, never, [typeof i1$1.NoopAnimationsModule, typeof i1.SkySearchModule]>;
658
+ static ɵinj: i0.ɵɵInjectorDeclaration<SkySearchTestingModule>;
659
+ }
660
+
661
+ /**
662
+ * A set of criteria that can be used to filter a list of `SkySearchHarness` instances.
663
+ */
664
+ interface SkySearchHarnessFilters extends SkyHarnessFilters {
665
+ }
666
+
667
+ /**
668
+ * Harness for interacting with a search component in tests.
669
+ */
670
+ declare class SkySearchHarness extends SkyComponentHarness {
671
+ #private;
672
+ /**
673
+ * @internal
674
+ */
675
+ static hostSelector: string;
676
+ /**
677
+ * Gets a `HarnessPredicate` that can be used to search for a
678
+ * `SkySearchHarness` that meets certain criteria.
679
+ */
680
+ static with(filters: SkySearchHarnessFilters): HarnessPredicate<SkySearchHarness>;
681
+ /**
682
+ * Blurs the search input.
683
+ */
684
+ blur(): Promise<void>;
685
+ /**
686
+ * Clears the search input.
687
+ */
688
+ clear(): Promise<void>;
689
+ /**
690
+ * Clicks the search input clear button.
691
+ */
692
+ clickClearButton(): Promise<void>;
693
+ /**
694
+ * Clicks search dismiss button to collapse search back to a button.
695
+ */
696
+ clickDismissSearchButton(): Promise<void>;
697
+ /**
698
+ * Clicks the search icon button that opens search input when it is collapsed.
699
+ */
700
+ clickOpenSearchButton(): Promise<void>;
701
+ /**
702
+ * Clicks the search submit button.
703
+ */
704
+ clickSubmitButton(): Promise<void>;
705
+ /**
706
+ * Enters text into the search input and performs a search.
707
+ */
708
+ enterText(value: string): Promise<void>;
709
+ /**
710
+ * Focuses the search input.
711
+ */
712
+ focus(): Promise<void>;
713
+ /**
714
+ * Gets the search input's `aria-label`.
715
+ */
716
+ getAriaLabel(): Promise<string | null>;
717
+ /**
718
+ * Gets the search's aria-labelledby.
719
+ */
720
+ getAriaLabelledby(): Promise<string | null>;
721
+ /**
722
+ * Gets the value of the input's placeholder attribute.
723
+ */
724
+ getPlaceholderText(): Promise<string | null>;
725
+ /**
726
+ * Gets the value of the search input.
727
+ */
728
+ getValue(): Promise<string>;
729
+ /**
730
+ * Whether the search input is collapsed.
731
+ */
732
+ isCollapsed(): Promise<boolean>;
733
+ /**
734
+ * Whether the search input is disabled.
735
+ */
736
+ isDisabled(): Promise<boolean>;
737
+ /**
738
+ * Whether the search input is focused.
739
+ */
740
+ isFocused(): Promise<boolean>;
741
+ }
742
+
743
+ export { SkyAutocompleteHarness, SkyAutocompleteInputHarness, SkyAutocompleteSearchResultHarness, SkyCountryFieldFixture, SkyCountryFieldHarness, SkyCountryFieldSearchResultHarness, SkyCountryFieldTestingModule, SkyLookupHarness, SkyLookupSearchResultHarness, SkyLookupSelectionHarness, SkyLookupSelectionsListHarness, SkyLookupShowMorePickerHarness, SkyLookupShowMorePickerSearchResultHarness, SkySearchFixture, SkySearchHarness, SkySearchTestingModule, SkySelectionModalHarness, SkySelectionModalSearchResultHarness };
744
+ export type { SkyAutocompleteHarnessFilters, SkyAutocompleteSearchResultHarnessFilters, SkyCountryFieldHarnessFilters, SkyCountryFieldSearchResultHarnessFilters, SkyLookupHarnessFilters, SkyLookupSearchResultHarnessFilters, SkyLookupShowMorePickerHarnessFilters, SkyLookupShowMorePickerSearchResultHarnessFilters, SkySearchHarnessFilters, SkySelectionModalSearchResultHarnessFilters };