@skyux/lookup 6.13.0 → 6.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation.json +642 -599
- package/esm2020/lib/modules/autocomplete/autocomplete-input.directive.mjs +9 -1
- package/esm2020/lib/modules/autocomplete/autocomplete.component.mjs +10 -4
- package/esm2020/testing/autocomplete/autocomplete-harness-filters.mjs +2 -0
- package/esm2020/testing/autocomplete/autocomplete-harness.mjs +157 -0
- package/esm2020/testing/autocomplete/autocomplete-input-harness.mjs +60 -0
- package/esm2020/testing/autocomplete/autocomplete-search-result-harness-filters.mjs +2 -0
- package/esm2020/testing/autocomplete/autocomplete-search-result-harness.mjs +40 -0
- package/esm2020/testing/public-api.mjs +5 -1
- package/fesm2015/skyux-lookup-testing.mjs +307 -2
- package/fesm2015/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2015/skyux-lookup.mjs +18 -3
- package/fesm2015/skyux-lookup.mjs.map +1 -1
- package/fesm2020/skyux-lookup-testing.mjs +255 -1
- package/fesm2020/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2020/skyux-lookup.mjs +17 -3
- package/fesm2020/skyux-lookup.mjs.map +1 -1
- package/lib/modules/autocomplete/autocomplete-input.directive.d.ts +1 -0
- package/package.json +11 -10
- package/testing/autocomplete/autocomplete-harness-filters.d.ts +6 -0
- package/testing/autocomplete/autocomplete-harness.d.ts +79 -0
- package/testing/autocomplete/autocomplete-input-harness.d.ts +39 -0
- package/testing/autocomplete/autocomplete-search-result-harness-filters.d.ts +10 -0
- package/testing/autocomplete/autocomplete-search-result-harness.d.ts +30 -0
- package/testing/public-api.d.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-lookup-testing.mjs","sources":["../../../../../libs/components/lookup/testing/src/country-field/country-field-fixture.ts","../../../../../libs/components/lookup/testing/src/country-field/country-field-testing.module.ts","../../../../../libs/components/lookup/testing/src/search/search-fixture.ts","../../../../../libs/components/lookup/testing/src/search/search-testing.module.ts","../../../../../libs/components/lookup/testing/src/skyux-lookup-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX country field component.\n */\nexport class SkyCountryFieldFixture {\n private debugEl: DebugElement;\n\n /**\n * The value of the input field's autocomplete attribute.\n */\n public get autocompleteAttribute(): string | null {\n return this.getInputElement().getAttribute('autocomplete');\n }\n\n /**\n * A flag indicating if the country flag is currently visible.\n * The flag will be visible only if a selection has been made\n * and if the hideSelectedCountryFlag option is false.\n */\n public get countryFlagIsVisible(): boolean {\n const flag = this.getCountryFlag();\n return flag !== null;\n }\n\n /**\n * A flag indicating whether or not the input has been disabled.\n */\n public get disabled(): boolean {\n return this.getInputElement().disabled;\n }\n\n /**\n * The value of the input field.\n */\n public get searchText(): string {\n return this.getInputElement().value;\n }\n\n constructor(private fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-country-field'\n );\n }\n\n /**\n * Enters the search text into the input field displaying search results, but making no selection.\n * @param searchText The name of the country to select.\n * @returns The list of country names matching the search text.\n */\n public async search(searchText: string): Promise<string[]> {\n const resultNodes = await this.searchAndGetResults(\n searchText,\n this.fixture\n );\n const resultArray = Array.prototype.slice.call(resultNodes);\n const results = resultArray.map((result: HTMLElement) => {\n const countryNameEl = result.querySelector('.sky-highlight-mark');\n const countryName = SkyAppTestUtility.getText(countryNameEl)!;\n return countryName;\n });\n\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n\n return results;\n }\n\n /**\n * Enters the search text into the input field and selects the first result (if any).\n * @param searchText The name of the country to select.\n */\n public async searchAndSelectFirstResult(searchText: string): Promise<void> {\n await this.searchAndSelect(searchText, 0, this.fixture);\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Clears the country selection and input field.\n */\n public clear(): Promise<void> {\n this.enterSearch('', this.fixture);\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n //#region helpers\n\n private getCountryFlag(): DebugElement {\n return this.debugEl.query(By.css('.sky-country-field-flag'));\n }\n\n private getAutocompleteElement(): HTMLElement {\n return document.querySelector('.sky-autocomplete-results') as HTMLElement;\n }\n\n private getInputElement(): HTMLTextAreaElement {\n const debugEl = this.debugEl.query(By.css('textarea'));\n return debugEl.nativeElement as HTMLTextAreaElement;\n }\n\n private blurInput(fixture: ComponentFixture<any>): Promise<void> {\n SkyAppTestUtility.fireDomEvent(this.getInputElement(), 'blur');\n fixture.detectChanges();\n return fixture.whenStable();\n }\n\n private enterSearch(\n newValue: string,\n fixture: ComponentFixture<any>\n ): Promise<void> {\n const inputElement = this.getInputElement();\n inputElement.value = newValue;\n SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');\n SkyAppTestUtility.fireDomEvent(inputElement, 'input');\n fixture.detectChanges();\n return fixture.whenStable();\n }\n\n private async searchAndGetResults(\n newValue: string,\n fixture: ComponentFixture<any>\n ): Promise<NodeListOf<HTMLElement>> {\n await this.enterSearch(newValue, fixture);\n fixture.detectChanges();\n await fixture.whenStable();\n return this.getAutocompleteElement().querySelectorAll(\n '.sky-autocomplete-result'\n );\n }\n\n private async searchAndSelect(\n newValue: string,\n index: number,\n fixture: ComponentFixture<any>\n ): Promise<void> {\n const inputElement = this.getInputElement();\n const searchResults = await this.searchAndGetResults(newValue, fixture);\n\n if (searchResults.length < index + 1) {\n throw new Error('Index out of range for results');\n }\n\n // Note: the ordering of these events is important!\n SkyAppTestUtility.fireDomEvent(inputElement, 'change');\n SkyAppTestUtility.fireDomEvent(searchResults[index], 'mousedown');\n this.blurInput(fixture);\n }\n\n //#endregion helpers\n}\n","import { NgModule } from '@angular/core';\nimport { SkyCountryFieldModule } from '@skyux/lookup';\n\n@NgModule({\n exports: [SkyCountryFieldModule],\n})\nexport class SkyCountryFieldTestingModule {}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX search component.\n */\nexport class SkySearchFixture {\n /**\n * Gets the search's current text.\n */\n public get searchText(): string {\n return this.getInputEl().nativeElement.value;\n }\n\n /**\n * Gets the search's current placeholder text.\n */\n public get placeholderText(): string {\n return this.getInputEl().nativeElement.placeholder;\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-search'\n );\n }\n\n /**\n * Applies the specified search text, invoking the search.\n * @param searchText The search text to apply. If none is specified, the search's\n * current search text will be applied.\n */\n public apply(searchText?: string) {\n if (searchText) {\n SkyAppTestUtility.setInputValue(\n this.getInputEl().nativeElement,\n searchText\n );\n }\n\n const btnEl = this.getApplyBtnEl();\n\n btnEl.triggerEventHandler('click', {});\n }\n\n /**\n * Clears the current search text. If there is no search text or the search text is\n * not currently applied, an error is thrown.\n */\n public clear() {\n const clearEl = this.debugEl.query(By.css('.sky-input-group-clear'));\n\n if (!SkyAppTestUtility.isVisible(clearEl)) {\n throw new Error(\n 'There currently is no search text or the current search text has not been applied, ' +\n 'so the clear button is not visible.'\n );\n }\n\n const btnEl = this.getClearBtnEl();\n\n btnEl.triggerEventHandler('click', {});\n }\n\n private getApplyBtnEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-search-btn-apply'));\n }\n\n private getClearBtnEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-search-btn-clear'));\n }\n\n private getInputEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-search-input'));\n }\n}\n","import { NgModule } from '@angular/core';\nimport { SkySearchModule } from '@skyux/lookup';\n\n@NgModule({\n exports: [SkySearchModule],\n})\nexport class SkySearchTestingModule {}\n","/**\n *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CAAA;;mHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAFvB,eAAe,CAAA,EAAA,CAAA,CAAA;AAEd,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAFvB,eAAe,CAAA,EAAA,CAAA,CAAA;2FAEd,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B,CAAA;;;ACLD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-lookup-testing.mjs","sources":["../../../../../libs/components/lookup/testing/src/autocomplete/autocomplete-input-harness.ts","../../../../../libs/components/lookup/testing/src/autocomplete/autocomplete-search-result-harness.ts","../../../../../libs/components/lookup/testing/src/autocomplete/autocomplete-harness.ts","../../../../../libs/components/lookup/testing/src/country-field/country-field-fixture.ts","../../../../../libs/components/lookup/testing/src/country-field/country-field-testing.module.ts","../../../../../libs/components/lookup/testing/src/search/search-fixture.ts","../../../../../libs/components/lookup/testing/src/search/search-testing.module.ts","../../../../../libs/components/lookup/testing/src/skyux-lookup-testing.ts"],"sourcesContent":["import { ComponentHarness } from '@angular/cdk/testing';\n\n/**\n * @internal\n */\nexport class SkyAutocompleteInputHarness extends ComponentHarness {\n public static hostSelector = '[skyAutocomplete]';\n\n /**\n * Blurs the input.\n */\n public async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /**\n * Clears the input value.\n */\n public async clear(): Promise<void> {\n return (await this.host()).clear();\n }\n\n /**\n * Enters text into the input.\n */\n public async enterText(value: string): Promise<void> {\n const el = await this.host();\n await el.focus();\n await el.clear();\n await el.sendKeys(value);\n }\n\n /**\n * Focuses the input.\n */\n public async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /**\n * Gets the value of the input.\n */\n public async getValue(): Promise<string> {\n return (await this.host()).getProperty('value');\n }\n\n /**\n * Whether the input is disabled.\n */\n public async isDisabled(): Promise<boolean> {\n const disabled = await (await this.host()).getAttribute('disabled');\n return disabled !== null;\n }\n\n /**\n * Whether the input is focused.\n */\n public async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Returns the value of the input's `aria-owns` attribute.\n */\n public async getAriaOwns(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-owns');\n }\n}\n","import {\n ComponentHarness,\n HarnessPredicate,\n HarnessQuery,\n} from '@angular/cdk/testing';\n\nimport { SkyAutocompleteSearchResultHarnessFilters } from './autocomplete-search-result-harness-filters';\n\n/**\n * Harness for interacting with an autocomplete search results in tests.\n */\nexport class SkyAutocompleteSearchResultHarness extends ComponentHarness {\n public static hostSelector = '.sky-autocomplete-result';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyAutocompleteSearchResultHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyAutocompleteSearchResultHarnessFilters\n ): HarnessPredicate<SkyAutocompleteSearchResultHarness> {\n return new HarnessPredicate(\n SkyAutocompleteSearchResultHarness,\n filters\n ).addOption('textContent', filters.textContent, async (harness, text) =>\n HarnessPredicate.stringMatches(await harness.textContent(), text)\n );\n }\n\n /**\n * Returns the value of the search result's descriptor property.\n * This value is set by the autocomplete's `descriptorProperty` input.\n */\n public async getDescriptorValue(): Promise<string> {\n return (await (\n await this.host()\n ).getAttribute('data-descriptor-value')) as string;\n }\n\n /**\n * Returns a child harness.\n */\n public async queryHarness<T extends ComponentHarness>(\n query: HarnessQuery<T>\n ): Promise<T | null> {\n return this.locatorForOptional(query)();\n }\n\n /**\n * Selects the search result.\n */\n public async select(): Promise<void> {\n return (await this.host()).click();\n }\n\n /**\n * Returns the text content of the search result.\n */\n public async textContent(): Promise<string> {\n return (await this.host()).text();\n }\n}\n","import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyComponentHarness, SkyOverlayHarness } from '@skyux/core/testing';\n\nimport { SkyAutocompleteHarnessFilters } from './autocomplete-harness-filters';\nimport { SkyAutocompleteInputHarness } from './autocomplete-input-harness';\nimport { SkyAutocompleteSearchResultHarness } from './autocomplete-search-result-harness';\nimport { SkyAutocompleteSearchResultHarnessFilters } from './autocomplete-search-result-harness-filters';\n\n/**\n * Harness for interacting with an autocomplete component in tests.\n */\nexport class SkyAutocompleteHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-autocomplete';\n\n #documentRootLocator = this.documentRootLocatorFactory();\n\n #getInput = this.locatorFor(SkyAutocompleteInputHarness);\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyAutocompleteHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyAutocompleteHarnessFilters\n ): HarnessPredicate<SkyAutocompleteHarness> {\n return SkyAutocompleteHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Blurs the autocomplete input.\n */\n public async blur(): Promise<void> {\n return (await this.#getInput()).blur();\n }\n\n /**\n * Clears the input value.\n */\n public async clear(): Promise<void> {\n return (await this.#getInput()).clear();\n }\n\n /**\n * Enters text into the autocomplete input.\n */\n public async enterText(value: string): Promise<void> {\n return (await this.#getInput()).enterText(value);\n }\n\n /**\n * Focuses the autocomplete input.\n */\n public async focus(): Promise<void> {\n return (await this.#getInput()).focus();\n }\n\n /**\n * Returns search result harnesses.\n */\n public async getSearchResults(\n filters?: SkyAutocompleteSearchResultHarnessFilters\n ): Promise<SkyAutocompleteSearchResultHarness[]> {\n const overlay = await this.#getOverlay();\n\n if (!overlay) {\n throw new Error(\n 'Unable to retrieve search results. The autocomplete is closed.'\n );\n }\n\n const harnesses = await overlay.queryHarnesses(\n SkyAutocompleteSearchResultHarness.with(filters || {})\n );\n\n if (filters && harnesses.length === 0) {\n // Stringify the regular expression so that it's readable in the console log.\n if (filters.textContent instanceof RegExp) {\n filters.textContent = filters.textContent.toString();\n }\n\n throw new Error(\n `Could not find search results matching filter(s): ${JSON.stringify(\n filters\n )}`\n );\n }\n\n return harnesses;\n }\n\n /**\n * Returns the text content for each search result.\n */\n public async getSearchResultsText(\n filters?: SkyAutocompleteSearchResultHarnessFilters\n ): Promise<string[]> {\n const harnesses = await this.getSearchResults(filters);\n\n const text: string[] = [];\n for (const harness of harnesses) {\n text.push(await harness.textContent());\n }\n\n return text;\n }\n\n /**\n * Gets the value of the autocomplete input.\n */\n public async getValue(): Promise<string> {\n return (await this.#getInput()).getValue();\n }\n\n /**\n * Whether the autocomplete input is disabled.\n */\n public async isDisabled(): Promise<boolean> {\n return (await this.#getInput()).isDisabled();\n }\n\n /**\n * Whether the autocomplete input is focused.\n */\n public async isFocused(): Promise<boolean> {\n return (await this.#getInput()).isFocused();\n }\n\n /**\n * Whether the autocomplete is open.\n */\n public async isOpen(): Promise<boolean> {\n const overlay = await this.#getOverlay();\n return !!overlay;\n }\n\n /**\n * Selects a search result.\n */\n public async selectSearchResult(\n filters: SkyAutocompleteSearchResultHarnessFilters\n ): Promise<void> {\n const results = await this.getSearchResults(filters);\n if (results && results.length > 0) {\n await results[0].select();\n }\n }\n\n /**\n * Clicks the \"Add\" button in the autocomplete search results panel.\n * (The \"Add\" functionality is not included in the public API\n * of a \"vanilla\" autocomplete component, so this method is protected\n * to prevent consumers of the autocomplete harness from calling it.\n * The lookup harness, which extends the autocomplete harness, may\n * still access this feature, however.)\n */\n protected async clickAddButton(): Promise<void> {\n const overlay = await this.#getOverlay();\n if (!overlay) {\n throw new Error(\n 'Unable to find the \"Add\" button. The autocomplete is closed.'\n );\n }\n\n const button = await overlay.querySelector(\n 'button.sky-autocomplete-action-add'\n );\n\n if (!button) {\n throw new Error(\n 'The \"Add\" button cannot be clicked because it does not exist.'\n );\n }\n\n await button.click();\n }\n\n /**\n * Clicks the \"Show more\" button.\n * (The \"Show more\" functionality is not included in the public API\n * of a \"vanilla\" autocomplete component, so this method is protected\n * to prevent consumers of the autocomplete harness from calling it.\n * The lookup harness, which extends the autocomplete harness, may\n * still access this feature, however.)\n */\n protected async clickShowMoreButton(): Promise<void> {\n const overlay = await this.#getOverlay();\n\n if (!overlay) {\n throw new Error(\n 'Unable to find the \"Show more\" button. ' +\n 'The autocomplete is closed.'\n );\n }\n\n const button = await overlay.querySelector(\n 'button.sky-autocomplete-action-more'\n );\n\n if (!button) {\n throw new Error(\n 'The \"Show more\" button cannot be clicked because it does not exist.'\n );\n }\n\n await button.click();\n }\n\n async #getOverlay(): Promise<SkyOverlayHarness | null> {\n const overlayId = await (await this.#getInput()).getAriaOwns();\n\n return overlayId\n ? this.#documentRootLocator.locatorForOptional(\n SkyOverlayHarness.with({ selector: `#${overlayId}` })\n )()\n : null;\n }\n}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX country field component.\n */\nexport class SkyCountryFieldFixture {\n private debugEl: DebugElement;\n\n /**\n * The value of the input field's autocomplete attribute.\n */\n public get autocompleteAttribute(): string | null {\n return this.getInputElement().getAttribute('autocomplete');\n }\n\n /**\n * A flag indicating if the country flag is currently visible.\n * The flag will be visible only if a selection has been made\n * and if the hideSelectedCountryFlag option is false.\n */\n public get countryFlagIsVisible(): boolean {\n const flag = this.getCountryFlag();\n return flag !== null;\n }\n\n /**\n * A flag indicating whether or not the input has been disabled.\n */\n public get disabled(): boolean {\n return this.getInputElement().disabled;\n }\n\n /**\n * The value of the input field.\n */\n public get searchText(): string {\n return this.getInputElement().value;\n }\n\n constructor(private fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-country-field'\n );\n }\n\n /**\n * Enters the search text into the input field displaying search results, but making no selection.\n * @param searchText The name of the country to select.\n * @returns The list of country names matching the search text.\n */\n public async search(searchText: string): Promise<string[]> {\n const resultNodes = await this.searchAndGetResults(\n searchText,\n this.fixture\n );\n const resultArray = Array.prototype.slice.call(resultNodes);\n const results = resultArray.map((result: HTMLElement) => {\n const countryNameEl = result.querySelector('.sky-highlight-mark');\n const countryName = SkyAppTestUtility.getText(countryNameEl)!;\n return countryName;\n });\n\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n\n return results;\n }\n\n /**\n * Enters the search text into the input field and selects the first result (if any).\n * @param searchText The name of the country to select.\n */\n public async searchAndSelectFirstResult(searchText: string): Promise<void> {\n await this.searchAndSelect(searchText, 0, this.fixture);\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Clears the country selection and input field.\n */\n public clear(): Promise<void> {\n this.enterSearch('', this.fixture);\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n //#region helpers\n\n private getCountryFlag(): DebugElement {\n return this.debugEl.query(By.css('.sky-country-field-flag'));\n }\n\n private getAutocompleteElement(): HTMLElement {\n return document.querySelector('.sky-autocomplete-results') as HTMLElement;\n }\n\n private getInputElement(): HTMLTextAreaElement {\n const debugEl = this.debugEl.query(By.css('textarea'));\n return debugEl.nativeElement as HTMLTextAreaElement;\n }\n\n private blurInput(fixture: ComponentFixture<any>): Promise<void> {\n SkyAppTestUtility.fireDomEvent(this.getInputElement(), 'blur');\n fixture.detectChanges();\n return fixture.whenStable();\n }\n\n private enterSearch(\n newValue: string,\n fixture: ComponentFixture<any>\n ): Promise<void> {\n const inputElement = this.getInputElement();\n inputElement.value = newValue;\n SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');\n SkyAppTestUtility.fireDomEvent(inputElement, 'input');\n fixture.detectChanges();\n return fixture.whenStable();\n }\n\n private async searchAndGetResults(\n newValue: string,\n fixture: ComponentFixture<any>\n ): Promise<NodeListOf<HTMLElement>> {\n await this.enterSearch(newValue, fixture);\n fixture.detectChanges();\n await fixture.whenStable();\n return this.getAutocompleteElement().querySelectorAll(\n '.sky-autocomplete-result'\n );\n }\n\n private async searchAndSelect(\n newValue: string,\n index: number,\n fixture: ComponentFixture<any>\n ): Promise<void> {\n const inputElement = this.getInputElement();\n const searchResults = await this.searchAndGetResults(newValue, fixture);\n\n if (searchResults.length < index + 1) {\n throw new Error('Index out of range for results');\n }\n\n // Note: the ordering of these events is important!\n SkyAppTestUtility.fireDomEvent(inputElement, 'change');\n SkyAppTestUtility.fireDomEvent(searchResults[index], 'mousedown');\n this.blurInput(fixture);\n }\n\n //#endregion helpers\n}\n","import { NgModule } from '@angular/core';\nimport { SkyCountryFieldModule } from '@skyux/lookup';\n\n@NgModule({\n exports: [SkyCountryFieldModule],\n})\nexport class SkyCountryFieldTestingModule {}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX search component.\n */\nexport class SkySearchFixture {\n /**\n * Gets the search's current text.\n */\n public get searchText(): string {\n return this.getInputEl().nativeElement.value;\n }\n\n /**\n * Gets the search's current placeholder text.\n */\n public get placeholderText(): string {\n return this.getInputEl().nativeElement.placeholder;\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-search'\n );\n }\n\n /**\n * Applies the specified search text, invoking the search.\n * @param searchText The search text to apply. If none is specified, the search's\n * current search text will be applied.\n */\n public apply(searchText?: string) {\n if (searchText) {\n SkyAppTestUtility.setInputValue(\n this.getInputEl().nativeElement,\n searchText\n );\n }\n\n const btnEl = this.getApplyBtnEl();\n\n btnEl.triggerEventHandler('click', {});\n }\n\n /**\n * Clears the current search text. If there is no search text or the search text is\n * not currently applied, an error is thrown.\n */\n public clear() {\n const clearEl = this.debugEl.query(By.css('.sky-input-group-clear'));\n\n if (!SkyAppTestUtility.isVisible(clearEl)) {\n throw new Error(\n 'There currently is no search text or the current search text has not been applied, ' +\n 'so the clear button is not visible.'\n );\n }\n\n const btnEl = this.getClearBtnEl();\n\n btnEl.triggerEventHandler('click', {});\n }\n\n private getApplyBtnEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-search-btn-apply'));\n }\n\n private getClearBtnEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-search-btn-clear'));\n }\n\n private getInputEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-search-input'));\n }\n}\n","import { NgModule } from '@angular/core';\nimport { SkySearchModule } from '@skyux/lookup';\n\n@NgModule({\n exports: [SkySearchModule],\n})\nexport class SkySearchTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAEA;;AAEG;AACG,MAAO,2BAA4B,SAAQ,gBAAgB,CAAA;AAG/D;;AAEG;IACU,IAAI,GAAA;;YACf,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;SACnC,CAAA,CAAA;AAAA,KAAA;AAED;;AAEG;IACU,KAAK,GAAA;;YAChB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACpC,CAAA,CAAA;AAAA,KAAA;AAED;;AAEG;AACU,IAAA,SAAS,CAAC,KAAa,EAAA;;AAClC,YAAA,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AAC7B,YAAA,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;AACjB,YAAA,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;AACjB,YAAA,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;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BAHlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B,CAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -285,6 +285,14 @@ class SkyAutocompleteInputDirective {
|
|
|
285
285
|
__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_renderer, "f").removeAttribute(__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_elementRef, "f").nativeElement, 'aria-activedescendant');
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
+
setAriaOwns(overlayId) {
|
|
289
|
+
if (overlayId) {
|
|
290
|
+
__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_renderer, "f").setAttribute(__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_elementRef, "f").nativeElement, 'aria-owns', overlayId);
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_renderer, "f").removeAttribute(__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_elementRef, "f").nativeElement, 'aria-owns');
|
|
294
|
+
}
|
|
295
|
+
}
|
|
288
296
|
// Angular automatically constructs these methods.
|
|
289
297
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
290
298
|
onChange(value) { }
|
|
@@ -453,7 +461,7 @@ var SkyAutocompleteMessageType;
|
|
|
453
461
|
SkyAutocompleteMessageType[SkyAutocompleteMessageType["RepositionDropdown"] = 1] = "RepositionDropdown";
|
|
454
462
|
})(SkyAutocompleteMessageType || (SkyAutocompleteMessageType = {}));
|
|
455
463
|
|
|
456
|
-
var _SkyAutocompleteComponent_instances, _SkyAutocompleteComponent_activeElementIndex, _SkyAutocompleteComponent_adapterService, _SkyAutocompleteComponent_affixer, _SkyAutocompleteComponent_affixService, _SkyAutocompleteComponent_changeDetector, _SkyAutocompleteComponent_elementRef, _SkyAutocompleteComponent_inputBoxHostSvc, _SkyAutocompleteComponent_inputDirectiveUnsubscribe, _SkyAutocompleteComponent_messageStreamSub, _SkyAutocompleteComponent_ngUnsubscribe, _SkyAutocompleteComponent_overlay, _SkyAutocompleteComponent_overlayService, _SkyAutocompleteComponent_overlayFocusableElements, _SkyAutocompleteComponent_currentSearchSub, _SkyAutocompleteComponent__data, _SkyAutocompleteComponent__debounceTime, _SkyAutocompleteComponent__descriptorProperty, _SkyAutocompleteComponent__highlightText, _SkyAutocompleteComponent__inputDirective, _SkyAutocompleteComponent__messageStream, _SkyAutocompleteComponent__propertiesToSearch, _SkyAutocompleteComponent__resultsRef, _SkyAutocompleteComponent__search, _SkyAutocompleteComponent__searchResults, _SkyAutocompleteComponent__searchResultsLimit, _SkyAutocompleteComponent__searchTextMinimumCharacters, _SkyAutocompleteComponent_searchTextChanged, _SkyAutocompleteComponent_performSearch, _SkyAutocompleteComponent_cancelCurrentSearch, _SkyAutocompleteComponent_getHighlightText, _SkyAutocompleteComponent_selectSearchResultById, _SkyAutocompleteComponent_openDropdown, _SkyAutocompleteComponent_closeDropdown, _SkyAutocompleteComponent_setActiveDescendant, _SkyAutocompleteComponent_removeActiveDescendant, _SkyAutocompleteComponent_resetSearch, _SkyAutocompleteComponent_addInputEventListeners, _SkyAutocompleteComponent_destroyOverlay, _SkyAutocompleteComponent_createAffixer, _SkyAutocompleteComponent_destroyAffixer, _SkyAutocompleteComponent_initMessageStream, _SkyAutocompleteComponent_initOverlayFocusableElements, _SkyAutocompleteComponent_getActiveElement, _SkyAutocompleteComponent_removeFocusedClass, _SkyAutocompleteComponent_addFocusedClass;
|
|
464
|
+
var _SkyAutocompleteComponent_instances, _SkyAutocompleteComponent_activeElementIndex, _SkyAutocompleteComponent_adapterService, _SkyAutocompleteComponent_affixer, _SkyAutocompleteComponent_affixService, _SkyAutocompleteComponent_changeDetector, _SkyAutocompleteComponent_elementRef, _SkyAutocompleteComponent_inputBoxHostSvc, _SkyAutocompleteComponent_inputDirectiveUnsubscribe, _SkyAutocompleteComponent_messageStreamSub, _SkyAutocompleteComponent_ngUnsubscribe, _SkyAutocompleteComponent_overlay, _SkyAutocompleteComponent_overlayService, _SkyAutocompleteComponent_overlayFocusableElements, _SkyAutocompleteComponent_currentSearchSub, _SkyAutocompleteComponent__data, _SkyAutocompleteComponent__debounceTime, _SkyAutocompleteComponent__descriptorProperty, _SkyAutocompleteComponent__highlightText, _SkyAutocompleteComponent__inputDirective, _SkyAutocompleteComponent__messageStream, _SkyAutocompleteComponent__propertiesToSearch, _SkyAutocompleteComponent__resultsRef, _SkyAutocompleteComponent__search, _SkyAutocompleteComponent__searchResults, _SkyAutocompleteComponent__searchResultsLimit, _SkyAutocompleteComponent__searchTextMinimumCharacters, _SkyAutocompleteComponent_searchTextChanged, _SkyAutocompleteComponent_performSearch, _SkyAutocompleteComponent_cancelCurrentSearch, _SkyAutocompleteComponent_getHighlightText, _SkyAutocompleteComponent_selectSearchResultById, _SkyAutocompleteComponent_openDropdown, _SkyAutocompleteComponent_closeDropdown, _SkyAutocompleteComponent_setActiveDescendant, _SkyAutocompleteComponent_removeActiveDescendant, _SkyAutocompleteComponent_updateAriaOwns, _SkyAutocompleteComponent_resetSearch, _SkyAutocompleteComponent_addInputEventListeners, _SkyAutocompleteComponent_destroyOverlay, _SkyAutocompleteComponent_createAffixer, _SkyAutocompleteComponent_destroyAffixer, _SkyAutocompleteComponent_initMessageStream, _SkyAutocompleteComponent_initOverlayFocusableElements, _SkyAutocompleteComponent_getActiveElement, _SkyAutocompleteComponent_removeFocusedClass, _SkyAutocompleteComponent_addFocusedClass;
|
|
457
465
|
let uniqueId$1 = 0;
|
|
458
466
|
class SkyAutocompleteComponent {
|
|
459
467
|
constructor(changeDetector, elementRef, affixService, adapterService, overlayService, inputBoxHostSvc) {
|
|
@@ -982,6 +990,7 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
982
990
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent_overlay, overlay, "f");
|
|
983
991
|
this.isOpen = true;
|
|
984
992
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_changeDetector, "f").markForCheck();
|
|
993
|
+
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_updateAriaOwns).call(this);
|
|
985
994
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_initOverlayFocusableElements).call(this);
|
|
986
995
|
}
|
|
987
996
|
}, _SkyAutocompleteComponent_closeDropdown = function _SkyAutocompleteComponent_closeDropdown() {
|
|
@@ -989,6 +998,7 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
989
998
|
this.isOpen = false;
|
|
990
999
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_destroyOverlay).call(this);
|
|
991
1000
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_removeActiveDescendant).call(this);
|
|
1001
|
+
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_updateAriaOwns).call(this);
|
|
992
1002
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_changeDetector, "f").markForCheck();
|
|
993
1003
|
}, _SkyAutocompleteComponent_setActiveDescendant = function _SkyAutocompleteComponent_setActiveDescendant() {
|
|
994
1004
|
const activeElement = __classPrivateFieldGet(this, _SkyAutocompleteComponent_overlayFocusableElements, "f")[__classPrivateFieldGet(this, _SkyAutocompleteComponent_activeElementIndex, "f")];
|
|
@@ -1001,6 +1011,11 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
1001
1011
|
if (this.inputDirective) {
|
|
1002
1012
|
this.inputDirective.setActiveDescendant(null);
|
|
1003
1013
|
}
|
|
1014
|
+
}, _SkyAutocompleteComponent_updateAriaOwns = function _SkyAutocompleteComponent_updateAriaOwns() {
|
|
1015
|
+
var _a;
|
|
1016
|
+
if (this.inputDirective) {
|
|
1017
|
+
this.inputDirective.setAriaOwns(((_a = __classPrivateFieldGet(this, _SkyAutocompleteComponent_overlay, "f")) === null || _a === void 0 ? void 0 : _a.id) || null);
|
|
1018
|
+
}
|
|
1004
1019
|
}, _SkyAutocompleteComponent_resetSearch = function _SkyAutocompleteComponent_resetSearch() {
|
|
1005
1020
|
this.searchResults = [];
|
|
1006
1021
|
this.searchText = '';
|
|
@@ -1095,10 +1110,10 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
1095
1110
|
}
|
|
1096
1111
|
};
|
|
1097
1112
|
SkyAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyAffixService }, { token: SkyAutocompleteAdapterService }, { token: i1.SkyOverlayService }, { token: i6.SkyInputBoxHostService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1098
|
-
SkyAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: { 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" }, outputs: { addClick: "addClick", showMoreClick: "showMoreClick", selectionChange: "selectionChange", searchAsync: "searchAsync" }, providers: [SkyAutocompleteAdapterService], queries: [{ propertyName: "inputDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true }], viewQueries: [{ propertyName: "resultsTemplateRef", first: true, predicate: ["resultsTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "resultsRef", first: true, predicate: ["resultsRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n class=\"sky-autocomplete\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen && searchText\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-owns]=\"isOpen ? resultsListId : null\"\n [attr.id]=\"resultsWrapperId\"\n>\n <ng-content></ng-content>\n</div>\n\n<ng-template #resultsTemplateRef>\n <div\n class=\"sky-autocomplete-results-container\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-elevation-4': 'modern'\n }\"\n (keydown)=\"handleKeydown($event)\"\n #resultsRef\n >\n <div\n *ngIf=\"isSearchingAsync; else resultControlsTemplateRef\"\n class=\"sky-autocomplete-results-waiting\"\n >\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resultControlsTemplateRef>\n <div\n *ngIf=\"searchText && (!showActionsArea || searchResults.length > 0)\"\n class=\"sky-autocomplete-results\"\n role=\"listbox\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.id]=\"resultsListId\"\n >\n <ng-container *ngFor=\"let result of searchResults; let i = index\">\n <div\n *ngIf=\"!searchResultsLimit || i < searchResultsLimit\"\n class=\"sky-autocomplete-result\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"isElementFocused(searchResultEl)\"\n [attr.id]=\"result.elementId\"\n [skyHighlight]=\"highlightText\"\n (mousedown)=\"onResultMouseDown(result.elementId, $event)\"\n (mousemove)=\"onResultMouseMove(i)\"\n #searchResultEl\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchResultTemplate || defaultSearchResultTemplate;\n context: { item: result.data }\n \"\n >\n </ng-container>\n </div>\n </ng-container>\n <div\n *ngIf=\"searchResults.length === 0\"\n class=\"sky-deemphasized sky-padding-squish-default\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n </div>\n <div *ngIf=\"showActionsArea\" class=\"sky-autocomplete-actions\">\n <button\n *ngIf=\"enableShowMore && (!searchText || searchResults.length > 0)\"\n class=\"sky-autocomplete-action sky-autocomplete-action-more sky-btn sky-btn-link\"\n type=\"button\"\n (mousedown)=\"moreButtonClicked()\"\n >\n <ng-container\n *ngIf=\"\n !(\n searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled\n ) &&\n searchResults.length === 0 &&\n !searchText\n \"\n >\n {{ 'skyux_autocomplete_show_all' | skyLibResources }}\n </ng-container>\n <ng-container\n *ngIf=\"\n (searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled) &&\n !searchText\n \"\n >\n {{\n 'skyux_autocomplete_show_all_count'\n | skyLibResources: (data.length | skyNumeric: { truncate: false })\n }}\n </ng-container>\n <ng-container *ngIf=\"searchText\">\n {{\n 'skyux_autocomplete_show_matches_count'\n | skyLibResources\n : (searchResultsCount === undefined\n ? data.length\n : (searchResultsCount | skyNumeric: { truncate: false }))\n }}\n </ng-container>\n </button>\n <div\n *ngIf=\"searchText && searchResults.length === 0\"\n class=\"sky-font-deemphasized sky-autocomplete-actions-no-results\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n <button\n *ngIf=\"showAddButton\"\n class=\"sky-autocomplete-action sky-autocomplete-action-add sky-btn sky-btn-link\"\n tabindex=\"0\"\n type=\"button\"\n [class.focused]=\"isElementFocused(addButtonEl)\"\n (mousedown)=\"addButtonClicked()\"\n #addButtonEl\n >\n <sky-icon *skyThemeIf=\"'modern'\" icon=\"add\" iconType=\"skyux\"></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_autocomplete_add' | skyLibResources }}\n </button>\n </div>\n</ng-template>\n\n<ng-template let-item=\"item\" #defaultSearchResultTemplate>\n {{ item[descriptorProperty] }}\n</ng-template>\n", styles: [".sky-autocomplete-results-container{position:fixed;background-color:#fff}.sky-autocomplete-results-waiting{height:70px}.sky-autocomplete-results{display:flex;flex-direction:column;padding:4px;overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}.sky-autocomplete-result{color:#212327;margin-bottom:4px;padding:3px 20px;cursor:pointer}.sky-autocomplete-result:last-child{margin-bottom:0}.sky-autocomplete-actions{border-top:1px solid #cdcfd2}.sky-autocomplete-actions .sky-autocomplete-action{border:none}.sky-autocomplete-actions .sky-autocomplete-actions-no-results{display:inline-block;padding:7px 13px}.sky-autocomplete-action-add{float:right}.sky-autocomplete-action-add sky-icon{padding-right:5px}.sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:#eeeeef}.sky-autocomplete-descendant-focus.sky-autocomplete-action{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px}::ng-deep .sky-theme-modern .sky-autocomplete-results-container{border-radius:6px}::ng-deep .sky-theme-modern .sky-autocomplete-results{padding:10px 0}::ng-deep .sky-theme-modern .sky-autocomplete-result{margin-bottom:0;padding:10px 0 10px 15px}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:inherit}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d}\n"], components: [{ type: i4.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i7.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.λ11, selector: "[skyHighlight]", inputs: ["skyHighlight"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe, "skyAutocompleteSearchAsyncDisabled": SkyAutcompleteSearchAsyncDisabledPipe, "skyNumeric": i1.SkyNumericPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1113
|
+
SkyAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: { 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" }, outputs: { addClick: "addClick", showMoreClick: "showMoreClick", selectionChange: "selectionChange", searchAsync: "searchAsync" }, providers: [SkyAutocompleteAdapterService], queries: [{ propertyName: "inputDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true }], viewQueries: [{ propertyName: "resultsTemplateRef", first: true, predicate: ["resultsTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "resultsRef", first: true, predicate: ["resultsRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n class=\"sky-autocomplete\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen && searchText\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-owns]=\"isOpen ? resultsListId : null\"\n [attr.id]=\"resultsWrapperId\"\n>\n <ng-content></ng-content>\n</div>\n\n<ng-template #resultsTemplateRef>\n <div\n class=\"sky-autocomplete-results-container\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-elevation-4': 'modern'\n }\"\n (keydown)=\"handleKeydown($event)\"\n #resultsRef\n >\n <div\n *ngIf=\"isSearchingAsync; else resultControlsTemplateRef\"\n class=\"sky-autocomplete-results-waiting\"\n >\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resultControlsTemplateRef>\n <div\n *ngIf=\"searchText && (!showActionsArea || searchResults.length > 0)\"\n class=\"sky-autocomplete-results\"\n role=\"listbox\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.id]=\"resultsListId\"\n >\n <ng-container *ngFor=\"let result of searchResults; let i = index\">\n <div\n *ngIf=\"!searchResultsLimit || i < searchResultsLimit\"\n class=\"sky-autocomplete-result\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"isElementFocused(searchResultEl)\"\n [attr.data-descriptor-value]=\"result.data[descriptorProperty]\"\n [attr.id]=\"result.elementId\"\n [skyHighlight]=\"highlightText\"\n (mousedown)=\"onResultMouseDown(result.elementId, $event)\"\n (mousemove)=\"onResultMouseMove(i)\"\n #searchResultEl\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchResultTemplate || defaultSearchResultTemplate;\n context: { item: result.data }\n \"\n >\n </ng-container>\n </div>\n </ng-container>\n <div\n *ngIf=\"searchResults.length === 0\"\n class=\"sky-deemphasized sky-padding-squish-default\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n </div>\n <div *ngIf=\"showActionsArea\" class=\"sky-autocomplete-actions\">\n <button\n *ngIf=\"enableShowMore && (!searchText || searchResults.length > 0)\"\n class=\"sky-autocomplete-action sky-autocomplete-action-more sky-btn sky-btn-link\"\n type=\"button\"\n (mousedown)=\"moreButtonClicked()\"\n >\n <ng-container\n *ngIf=\"\n !(\n searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled\n ) &&\n searchResults.length === 0 &&\n !searchText\n \"\n >\n {{ 'skyux_autocomplete_show_all' | skyLibResources }}\n </ng-container>\n <ng-container\n *ngIf=\"\n (searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled) &&\n !searchText\n \"\n >\n {{\n 'skyux_autocomplete_show_all_count'\n | skyLibResources: (data.length | skyNumeric: { truncate: false })\n }}\n </ng-container>\n <ng-container *ngIf=\"searchText\">\n {{\n 'skyux_autocomplete_show_matches_count'\n | skyLibResources\n : (searchResultsCount === undefined\n ? data.length\n : (searchResultsCount | skyNumeric: { truncate: false }))\n }}\n </ng-container>\n </button>\n <div\n *ngIf=\"searchText && searchResults.length === 0\"\n class=\"sky-font-deemphasized sky-autocomplete-actions-no-results\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n <button\n *ngIf=\"showAddButton\"\n class=\"sky-autocomplete-action sky-autocomplete-action-add sky-btn sky-btn-link\"\n tabindex=\"0\"\n type=\"button\"\n [class.focused]=\"isElementFocused(addButtonEl)\"\n (mousedown)=\"addButtonClicked()\"\n #addButtonEl\n >\n <sky-icon *skyThemeIf=\"'modern'\" icon=\"add\" iconType=\"skyux\"></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_autocomplete_add' | skyLibResources }}\n </button>\n </div>\n</ng-template>\n\n<ng-template let-item=\"item\" #defaultSearchResultTemplate>\n {{ item[descriptorProperty] }}\n</ng-template>\n", styles: [".sky-autocomplete-results-container{position:fixed;background-color:#fff}.sky-autocomplete-results-waiting{height:70px}.sky-autocomplete-results{display:flex;flex-direction:column;padding:4px;overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}.sky-autocomplete-result{color:#212327;margin-bottom:4px;padding:3px 20px;cursor:pointer}.sky-autocomplete-result:last-child{margin-bottom:0}.sky-autocomplete-actions{border-top:1px solid #cdcfd2}.sky-autocomplete-actions .sky-autocomplete-action{border:none}.sky-autocomplete-actions .sky-autocomplete-actions-no-results{display:inline-block;padding:7px 13px}.sky-autocomplete-action-add{float:right}.sky-autocomplete-action-add sky-icon{padding-right:5px}.sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:#eeeeef}.sky-autocomplete-descendant-focus.sky-autocomplete-action{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px}::ng-deep .sky-theme-modern .sky-autocomplete-results-container{border-radius:6px}::ng-deep .sky-theme-modern .sky-autocomplete-results{padding:10px 0}::ng-deep .sky-theme-modern .sky-autocomplete-result{margin-bottom:0;padding:10px 0 10px 15px}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:inherit}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d}\n"], components: [{ type: i4.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i7.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.λ11, selector: "[skyHighlight]", inputs: ["skyHighlight"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe, "skyAutocompleteSearchAsyncDisabled": SkyAutcompleteSearchAsyncDisabledPipe, "skyNumeric": i1.SkyNumericPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1099
1114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAutocompleteComponent, decorators: [{
|
|
1100
1115
|
type: Component,
|
|
1101
|
-
args: [{ selector: 'sky-autocomplete', providers: [SkyAutocompleteAdapterService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n class=\"sky-autocomplete\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen && searchText\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-owns]=\"isOpen ? resultsListId : null\"\n [attr.id]=\"resultsWrapperId\"\n>\n <ng-content></ng-content>\n</div>\n\n<ng-template #resultsTemplateRef>\n <div\n class=\"sky-autocomplete-results-container\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-elevation-4': 'modern'\n }\"\n (keydown)=\"handleKeydown($event)\"\n #resultsRef\n >\n <div\n *ngIf=\"isSearchingAsync; else resultControlsTemplateRef\"\n class=\"sky-autocomplete-results-waiting\"\n >\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resultControlsTemplateRef>\n <div\n *ngIf=\"searchText && (!showActionsArea || searchResults.length > 0)\"\n class=\"sky-autocomplete-results\"\n role=\"listbox\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.id]=\"resultsListId\"\n >\n <ng-container *ngFor=\"let result of searchResults; let i = index\">\n <div\n *ngIf=\"!searchResultsLimit || i < searchResultsLimit\"\n class=\"sky-autocomplete-result\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"isElementFocused(searchResultEl)\"\n [attr.id]=\"result.elementId\"\n [skyHighlight]=\"highlightText\"\n (mousedown)=\"onResultMouseDown(result.elementId, $event)\"\n (mousemove)=\"onResultMouseMove(i)\"\n #searchResultEl\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchResultTemplate || defaultSearchResultTemplate;\n context: { item: result.data }\n \"\n >\n </ng-container>\n </div>\n </ng-container>\n <div\n *ngIf=\"searchResults.length === 0\"\n class=\"sky-deemphasized sky-padding-squish-default\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n </div>\n <div *ngIf=\"showActionsArea\" class=\"sky-autocomplete-actions\">\n <button\n *ngIf=\"enableShowMore && (!searchText || searchResults.length > 0)\"\n class=\"sky-autocomplete-action sky-autocomplete-action-more sky-btn sky-btn-link\"\n type=\"button\"\n (mousedown)=\"moreButtonClicked()\"\n >\n <ng-container\n *ngIf=\"\n !(\n searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled\n ) &&\n searchResults.length === 0 &&\n !searchText\n \"\n >\n {{ 'skyux_autocomplete_show_all' | skyLibResources }}\n </ng-container>\n <ng-container\n *ngIf=\"\n (searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled) &&\n !searchText\n \"\n >\n {{\n 'skyux_autocomplete_show_all_count'\n | skyLibResources: (data.length | skyNumeric: { truncate: false })\n }}\n </ng-container>\n <ng-container *ngIf=\"searchText\">\n {{\n 'skyux_autocomplete_show_matches_count'\n | skyLibResources\n : (searchResultsCount === undefined\n ? data.length\n : (searchResultsCount | skyNumeric: { truncate: false }))\n }}\n </ng-container>\n </button>\n <div\n *ngIf=\"searchText && searchResults.length === 0\"\n class=\"sky-font-deemphasized sky-autocomplete-actions-no-results\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n <button\n *ngIf=\"showAddButton\"\n class=\"sky-autocomplete-action sky-autocomplete-action-add sky-btn sky-btn-link\"\n tabindex=\"0\"\n type=\"button\"\n [class.focused]=\"isElementFocused(addButtonEl)\"\n (mousedown)=\"addButtonClicked()\"\n #addButtonEl\n >\n <sky-icon *skyThemeIf=\"'modern'\" icon=\"add\" iconType=\"skyux\"></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_autocomplete_add' | skyLibResources }}\n </button>\n </div>\n</ng-template>\n\n<ng-template let-item=\"item\" #defaultSearchResultTemplate>\n {{ item[descriptorProperty] }}\n</ng-template>\n", styles: [".sky-autocomplete-results-container{position:fixed;background-color:#fff}.sky-autocomplete-results-waiting{height:70px}.sky-autocomplete-results{display:flex;flex-direction:column;padding:4px;overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}.sky-autocomplete-result{color:#212327;margin-bottom:4px;padding:3px 20px;cursor:pointer}.sky-autocomplete-result:last-child{margin-bottom:0}.sky-autocomplete-actions{border-top:1px solid #cdcfd2}.sky-autocomplete-actions .sky-autocomplete-action{border:none}.sky-autocomplete-actions .sky-autocomplete-actions-no-results{display:inline-block;padding:7px 13px}.sky-autocomplete-action-add{float:right}.sky-autocomplete-action-add sky-icon{padding-right:5px}.sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:#eeeeef}.sky-autocomplete-descendant-focus.sky-autocomplete-action{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px}::ng-deep .sky-theme-modern .sky-autocomplete-results-container{border-radius:6px}::ng-deep .sky-theme-modern .sky-autocomplete-results{padding:10px 0}::ng-deep .sky-theme-modern .sky-autocomplete-result{margin-bottom:0;padding:10px 0 10px 15px}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:inherit}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d}\n"] }]
|
|
1116
|
+
args: [{ selector: 'sky-autocomplete', providers: [SkyAutocompleteAdapterService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n class=\"sky-autocomplete\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen && searchText\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-owns]=\"isOpen ? resultsListId : null\"\n [attr.id]=\"resultsWrapperId\"\n>\n <ng-content></ng-content>\n</div>\n\n<ng-template #resultsTemplateRef>\n <div\n class=\"sky-autocomplete-results-container\"\n [skyThemeClass]=\"{\n 'sky-shadow': 'default',\n 'sky-elevation-4': 'modern'\n }\"\n (keydown)=\"handleKeydown($event)\"\n #resultsRef\n >\n <div\n *ngIf=\"isSearchingAsync; else resultControlsTemplateRef\"\n class=\"sky-autocomplete-results-waiting\"\n >\n <sky-wait [isWaiting]=\"true\"></sky-wait>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resultControlsTemplateRef>\n <div\n *ngIf=\"searchText && (!showActionsArea || searchResults.length > 0)\"\n class=\"sky-autocomplete-results\"\n role=\"listbox\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.id]=\"resultsListId\"\n >\n <ng-container *ngFor=\"let result of searchResults; let i = index\">\n <div\n *ngIf=\"!searchResultsLimit || i < searchResultsLimit\"\n class=\"sky-autocomplete-result\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"isElementFocused(searchResultEl)\"\n [attr.data-descriptor-value]=\"result.data[descriptorProperty]\"\n [attr.id]=\"result.elementId\"\n [skyHighlight]=\"highlightText\"\n (mousedown)=\"onResultMouseDown(result.elementId, $event)\"\n (mousemove)=\"onResultMouseMove(i)\"\n #searchResultEl\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchResultTemplate || defaultSearchResultTemplate;\n context: { item: result.data }\n \"\n >\n </ng-container>\n </div>\n </ng-container>\n <div\n *ngIf=\"searchResults.length === 0\"\n class=\"sky-deemphasized sky-padding-squish-default\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n </div>\n <div *ngIf=\"showActionsArea\" class=\"sky-autocomplete-actions\">\n <button\n *ngIf=\"enableShowMore && (!searchText || searchResults.length > 0)\"\n class=\"sky-autocomplete-action sky-autocomplete-action-more sky-btn sky-btn-link\"\n type=\"button\"\n (mousedown)=\"moreButtonClicked()\"\n >\n <ng-container\n *ngIf=\"\n !(\n searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled\n ) &&\n searchResults.length === 0 &&\n !searchText\n \"\n >\n {{ 'skyux_autocomplete_show_all' | skyLibResources }}\n </ng-container>\n <ng-container\n *ngIf=\"\n (searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled) &&\n !searchText\n \"\n >\n {{\n 'skyux_autocomplete_show_all_count'\n | skyLibResources: (data.length | skyNumeric: { truncate: false })\n }}\n </ng-container>\n <ng-container *ngIf=\"searchText\">\n {{\n 'skyux_autocomplete_show_matches_count'\n | skyLibResources\n : (searchResultsCount === undefined\n ? data.length\n : (searchResultsCount | skyNumeric: { truncate: false }))\n }}\n </ng-container>\n </button>\n <div\n *ngIf=\"searchText && searchResults.length === 0\"\n class=\"sky-font-deemphasized sky-autocomplete-actions-no-results\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n <button\n *ngIf=\"showAddButton\"\n class=\"sky-autocomplete-action sky-autocomplete-action-add sky-btn sky-btn-link\"\n tabindex=\"0\"\n type=\"button\"\n [class.focused]=\"isElementFocused(addButtonEl)\"\n (mousedown)=\"addButtonClicked()\"\n #addButtonEl\n >\n <sky-icon *skyThemeIf=\"'modern'\" icon=\"add\" iconType=\"skyux\"></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_autocomplete_add' | skyLibResources }}\n </button>\n </div>\n</ng-template>\n\n<ng-template let-item=\"item\" #defaultSearchResultTemplate>\n {{ item[descriptorProperty] }}\n</ng-template>\n", styles: [".sky-autocomplete-results-container{position:fixed;background-color:#fff}.sky-autocomplete-results-waiting{height:70px}.sky-autocomplete-results{display:flex;flex-direction:column;padding:4px;overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}.sky-autocomplete-result{color:#212327;margin-bottom:4px;padding:3px 20px;cursor:pointer}.sky-autocomplete-result:last-child{margin-bottom:0}.sky-autocomplete-actions{border-top:1px solid #cdcfd2}.sky-autocomplete-actions .sky-autocomplete-action{border:none}.sky-autocomplete-actions .sky-autocomplete-actions-no-results{display:inline-block;padding:7px 13px}.sky-autocomplete-action-add{float:right}.sky-autocomplete-action-add sky-icon{padding-right:5px}.sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:#eeeeef}.sky-autocomplete-descendant-focus.sky-autocomplete-action{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px}::ng-deep .sky-theme-modern .sky-autocomplete-results-container{border-radius:6px}::ng-deep .sky-theme-modern .sky-autocomplete-results{padding:10px 0}::ng-deep .sky-theme-modern .sky-autocomplete-result{margin-bottom:0;padding:10px 0 10px 15px}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:inherit}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d}\n"] }]
|
|
1102
1117
|
}], ctorParameters: function () {
|
|
1103
1118
|
return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAffixService }, { type: SkyAutocompleteAdapterService }, { type: i1.SkyOverlayService }, { type: i6.SkyInputBoxHostService, decorators: [{
|
|
1104
1119
|
type: Optional
|