@skyux/lookup 5.2.1 → 5.5.0-beta.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/README.md +6 -4
- package/bundles/skyux-lookup.umd.js +10 -9
- package/documentation.json +468 -56
- package/esm2015/index.js +32 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-adapter.service.js +62 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-default-search-function.js +39 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-default-search-function.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-input.directive.js +220 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-input.directive.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.js +19 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.component.js +732 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.component.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.module.js +65 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.module.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-default-search-function-options.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-default-search-function-options.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-input-text-change.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-input-text-change.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message-type.js +15 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message-type.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-args.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-args.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-function.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-function.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-filter.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-filter.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-response.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-response.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-selection-change.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-selection-change.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-show-more-args.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-show-more-args.js.map +1 -0
- package/esm2015/{modules → lib/modules}/country-field/country-field.component.js +7 -3
- package/esm2015/lib/modules/country-field/country-field.component.js.map +1 -0
- package/esm2015/lib/modules/country-field/country-field.module.js +49 -0
- package/esm2015/lib/modules/country-field/country-field.module.js.map +1 -0
- package/esm2015/lib/modules/country-field/types/country.js +2 -0
- package/esm2015/lib/modules/country-field/types/country.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-adapter.service.js +21 -0
- package/esm2015/lib/modules/lookup/lookup-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-autocomplete-adapter.js +72 -0
- package/esm2015/lib/modules/lookup/lookup-autocomplete-adapter.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-item-selected.pipe.js +16 -0
- package/esm2015/lib/modules/lookup/lookup-item-selected.pipe.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-async-modal.component.js +186 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-async-modal.component.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-modal.component.js +258 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-modal.component.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup.component.js +608 -0
- package/esm2015/lib/modules/lookup/lookup.component.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup.module.js +94 -0
- package/esm2015/lib/modules/lookup/lookup.module.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-callback-args.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-callback-args.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-event-args.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-event-args.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode-type.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode-type.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode.js +16 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-config.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-config.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker-context.js +7 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker-context.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.js +7 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-config.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-config.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-context.js +7 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-context.js.map +1 -0
- package/esm2015/lib/modules/search/search-adapter.service.js +45 -0
- package/esm2015/lib/modules/search/search-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/search/search.component.js +260 -0
- package/esm2015/lib/modules/search/search.component.js.map +1 -0
- package/esm2015/lib/modules/search/search.module.js +46 -0
- package/esm2015/lib/modules/search/search.module.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-lookup-resources.module.js +72 -0
- package/esm2015/lib/modules/shared/sky-lookup-resources.module.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-lookup-string-utils.js +8 -0
- package/esm2015/lib/modules/shared/sky-lookup-string-utils.js.map +1 -0
- package/esm2015/lib/polyfills.js +30 -0
- package/esm2015/lib/polyfills.js.map +1 -0
- package/esm2015/skyux-lookup.js +2 -2
- package/esm2015/skyux-lookup.js.map +1 -0
- package/esm2015/testing/country-field/country-field-fixture.js +1 -1
- package/esm2015/testing/country-field/country-field-fixture.js.map +1 -0
- package/esm2015/testing/country-field/country-field-testing.module.js +1 -1
- package/esm2015/testing/country-field/country-field-testing.module.js.map +1 -0
- package/esm2015/testing/public-api.js +1 -1
- package/esm2015/testing/public-api.js.map +1 -0
- package/esm2015/testing/search/search-fixture.js +1 -1
- package/esm2015/testing/search/search-fixture.js.map +1 -0
- package/esm2015/testing/search/search-testing.module.js +1 -1
- package/esm2015/testing/search/search-testing.module.js.map +1 -0
- package/esm2015/testing/skyux-lookup-testing.js +1 -1
- package/esm2015/testing/skyux-lookup-testing.js.map +1 -0
- package/fesm2015/skyux-lookup-testing.js.map +1 -1
- package/fesm2015/skyux-lookup.js +12 -11
- package/fesm2015/skyux-lookup.js.map +1 -1
- package/index.d.ts +27 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-default-search-function.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-input.directive.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-search-async-disabled.pipe.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete.component.d.ts +3 -3
- package/{modules → lib/modules}/autocomplete/autocomplete.module.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-default-search-function-options.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-input-text-change.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-message-type.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-message.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-args.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-function.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-result-display-type.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-result.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-function-filter.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-function-response.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-function.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-selection-change.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-show-more-args.d.ts +0 -0
- package/{modules → lib/modules}/country-field/country-field.component.d.ts +3 -2
- package/{modules → lib/modules}/country-field/country-field.module.d.ts +0 -0
- package/{modules → lib/modules}/country-field/types/country.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-autocomplete-adapter.d.ts +2 -2
- package/{modules → lib/modules}/lookup/lookup-item-selected.pipe.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-show-more-async-modal.component.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-show-more-modal.component.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup.component.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup.module.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-add-click-callback-args.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-add-click-event-args.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-select-mode-type.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-select-mode.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-config.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-custom-picker-context.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-custom-picker.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-native-picker-async-context.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-native-picker-config.d.ts +1 -1
- package/{modules → lib/modules}/lookup/types/lookup-show-more-native-picker-context.d.ts +0 -0
- package/{modules → lib/modules}/search/search-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/search/search.component.d.ts +5 -5
- package/{modules → lib/modules}/search/search.module.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-lookup-resources.module.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-lookup-string-utils.d.ts +0 -0
- package/{polyfills.d.ts → lib/polyfills.d.ts} +0 -0
- package/package.json +23 -9
- package/skyux-lookup.d.ts +1 -1
- package/LICENSE +0 -21
- package/esm2015/modules/autocomplete/autocomplete-adapter.service.js +0 -61
- package/esm2015/modules/autocomplete/autocomplete-default-search-function.js +0 -39
- package/esm2015/modules/autocomplete/autocomplete-input.directive.js +0 -220
- package/esm2015/modules/autocomplete/autocomplete-search-async-disabled.pipe.js +0 -19
- package/esm2015/modules/autocomplete/autocomplete.component.js +0 -731
- package/esm2015/modules/autocomplete/autocomplete.module.js +0 -65
- package/esm2015/modules/autocomplete/types/autocomplete-default-search-function-options.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-input-text-change.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-message-type.js +0 -15
- package/esm2015/modules/autocomplete/types/autocomplete-message.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-args.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-function.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-result-display-type.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-result.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-function-filter.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-function-response.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-function.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-selection-change.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-show-more-args.js +0 -2
- package/esm2015/modules/country-field/country-field.module.js +0 -49
- package/esm2015/modules/country-field/types/country.js +0 -2
- package/esm2015/modules/lookup/lookup-adapter.service.js +0 -21
- package/esm2015/modules/lookup/lookup-autocomplete-adapter.js +0 -72
- package/esm2015/modules/lookup/lookup-item-selected.pipe.js +0 -16
- package/esm2015/modules/lookup/lookup-show-more-async-modal.component.js +0 -184
- package/esm2015/modules/lookup/lookup-show-more-modal.component.js +0 -256
- package/esm2015/modules/lookup/lookup.component.js +0 -602
- package/esm2015/modules/lookup/lookup.module.js +0 -94
- package/esm2015/modules/lookup/types/lookup-add-click-callback-args.js +0 -2
- package/esm2015/modules/lookup/types/lookup-add-click-event-args.js +0 -2
- package/esm2015/modules/lookup/types/lookup-select-mode-type.js +0 -2
- package/esm2015/modules/lookup/types/lookup-select-mode.js +0 -16
- package/esm2015/modules/lookup/types/lookup-show-more-config.js +0 -2
- package/esm2015/modules/lookup/types/lookup-show-more-custom-picker-context.js +0 -7
- package/esm2015/modules/lookup/types/lookup-show-more-custom-picker.js +0 -2
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-async-context.js +0 -7
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-config.js +0 -2
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-context.js +0 -7
- package/esm2015/modules/search/search-adapter.service.js +0 -45
- package/esm2015/modules/search/search.component.js +0 -260
- package/esm2015/modules/search/search.module.js +0 -46
- package/esm2015/modules/shared/sky-lookup-resources.module.js +0 -72
- package/esm2015/modules/shared/sky-lookup-string-utils.js +0 -8
- package/esm2015/polyfills.js +0 -30
- package/esm2015/public-api.js +0 -32
- package/public-api.d.ts +0 -27
|
@@ -54,4 +54,4 @@ export class SkySearchFixture {
|
|
|
54
54
|
return this.debugEl.query(By.css('.sky-search-input'));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
//# sourceMappingURL=
|
|
57
|
+
//# sourceMappingURL=search-fixture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-fixture.js","sourceRoot":"","sources":["../../../../../../../libs/components/lookup/testing/src/search/search-fixture.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAiB3B,YAAY,OAA8B,EAAE,SAAiB;QAC3D,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,YAAY,CACb,CAAC;IACJ,CAAC;IAtBD;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC;IACrD,CAAC;IAYD;;;;OAIG;IACI,KAAK,CAAC,UAAmB;QAC9B,IAAI,UAAU,EAAE;YACd,iBAAiB,CAAC,aAAa,CAC7B,IAAI,CAAC,UAAU,EAAE,CAAC,aAAa,EAC/B,UAAU,CACX,CAAC;SACH;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAEnC,KAAK,CAAC,mBAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAED;;;OAGG;IACI,KAAK;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAErE,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;YACzC,MAAM,IAAI,KAAK,CACb,qFAAqF;gBACnF,qCAAqC,CACxC,CAAC;SACH;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAEnC,KAAK,CAAC,mBAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACzD,CAAC;CACF","sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\nimport { DebugElement } from '@angular/core';\n\nimport { By } from '@angular/platform-browser';\n\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"]}
|
|
@@ -12,4 +12,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
12
12
|
exports: [SkySearchModule],
|
|
13
13
|
}]
|
|
14
14
|
}] });
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=search-testing.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-testing.module.js","sourceRoot":"","sources":["../../../../../../../libs/components/lookup/testing/src/search/search-testing.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;;AAKhD,MAAM,OAAO,sBAAsB;;oHAAtB,sBAAsB;qHAAtB,sBAAsB,YAFvB,eAAe;qHAEd,sBAAsB,YAFvB,eAAe;4FAEd,sBAAsB;kBAHlC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B","sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { SkySearchModule } from '@skyux/lookup';\n\n@NgModule({\n exports: [SkySearchModule],\n})\nexport class SkySearchTestingModule {}\n"]}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
4
|
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=skyux-lookup-testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skyux-lookup-testing.js","sourceRoot":"","sources":["../../../../../../libs/components/lookup/testing/src/skyux-lookup-testing.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-lookup-testing.js","sources":["../../../projects/lookup/testing/src/country-field/country-field-fixture.ts","../../../projects/lookup/testing/src/country-field/country-field-testing.module.ts","../../../projects/lookup/testing/src/search/search-fixture.ts","../../../projects/lookup/testing/src/search/search-testing.module.ts","../../../projects/lookup/testing/src/skyux-lookup-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\n\nimport { ComponentFixture } from '@angular/core/testing';\n\nimport { By } from '@angular/platform-browser';\n\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 {\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';\n\nimport { SkyCountryFieldModule } from '@skyux/lookup';\n\n@NgModule({\n exports: [SkyCountryFieldModule],\n})\nexport class SkyCountryFieldTestingModule {}\n","import { ComponentFixture } from '@angular/core/testing';\n\nimport { DebugElement } from '@angular/core';\n\nimport { By } from '@angular/platform-browser';\n\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';\n\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":";;;;;;;AAQA;;;MAGa,sBAAsB;IAkCjC,YAAoB,OAA8B,EAAE,SAAiB;QAAjD,YAAO,GAA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AsB;kBAHlC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B;;;ACND;;;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-lookup-testing.js","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';\n\nimport { ComponentFixture } from '@angular/core/testing';\n\nimport { By } from '@angular/platform-browser';\n\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 {\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';\n\nimport { SkyCountryFieldModule } from '@skyux/lookup';\n\n@NgModule({\n exports: [SkyCountryFieldModule],\n})\nexport class SkyCountryFieldTestingModule {}\n","import { ComponentFixture } from '@angular/core/testing';\n\nimport { DebugElement } from '@angular/core';\n\nimport { By } from '@angular/platform-browser';\n\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';\n\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":";;;;;;;AAQA;;;MAGa,sBAAsB;IAkCjC,YAAoB,OAA8B,EAAE,SAAiB;QAAjD,YAAO,GAAP,OAAO,CAAuB;QAChD,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,mBAAmB,CACpB,CAAC;KACH;;;;IAlCD,IAAW,qBAAqB;QAC9B,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;KAC5D;;;;;;IAOD,IAAW,oBAAoB;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACnC,OAAO,IAAI,KAAK,IAAI,CAAC;KACtB;;;;IAKD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;KACxC;;;;IAKD,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,KAAK,CAAC;KACrC;;;;;;IAeY,MAAM,CAAC,UAAkB;;YACpC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAChD,UAAU,EACV,IAAI,CAAC,OAAO,CACb,CAAC;YACF,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC5D,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,MAAmB;gBAClD,MAAM,aAAa,GAAG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KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;KAC5D;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;KAC5D;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;KACxD;;;MC5EU,sBAAsB;;oHAAtB,sBAAsB;qHAAtB,sBAAsB,YAFvB,eAAe;qHAEd,sBAAsB,YAFvB,eAAe;4FAEd,sBAAsB;kBAHlC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B;;;ACND;;;;;;"}
|
package/fesm2015/skyux-lookup.js
CHANGED
|
@@ -12,10 +12,10 @@ import * as i7 from '@skyux/theme';
|
|
|
12
12
|
import { SkyThemeModule } from '@skyux/theme';
|
|
13
13
|
import * as i5 from '@skyux/i18n';
|
|
14
14
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
15
|
-
import { Subject, fromEvent, of, from } from 'rxjs';
|
|
16
|
-
import { takeUntil, debounceTime, switchMap, take, map, distinctUntilChanged } from 'rxjs/operators';
|
|
17
15
|
import * as i6 from '@skyux/forms';
|
|
18
16
|
import { SkyInputBoxModule, SkyCheckboxModule } from '@skyux/forms';
|
|
17
|
+
import { Subject, fromEvent, of, from } from 'rxjs';
|
|
18
|
+
import { takeUntil, debounceTime, switchMap, take, map, distinctUntilChanged } from 'rxjs/operators';
|
|
19
19
|
import 'intl-tel-input';
|
|
20
20
|
import * as i3 from '@skyux/layout';
|
|
21
21
|
import { SkyToolbarModule } from '@skyux/layout';
|
|
@@ -554,7 +554,7 @@ class SkyAutocompleteComponent {
|
|
|
554
554
|
/**
|
|
555
555
|
* Specifies an object property to display in the text input after users
|
|
556
556
|
* select an item in the dropdown list.
|
|
557
|
-
* @default name
|
|
557
|
+
* @default "name"
|
|
558
558
|
*/
|
|
559
559
|
set descriptorProperty(value) {
|
|
560
560
|
this._descriptorProperty = value;
|
|
@@ -575,7 +575,7 @@ class SkyAutocompleteComponent {
|
|
|
575
575
|
}
|
|
576
576
|
/**
|
|
577
577
|
* Specifies the object properties to search.
|
|
578
|
-
* @default [
|
|
578
|
+
* @default ["name"]
|
|
579
579
|
*/
|
|
580
580
|
set propertiesToSearch(value) {
|
|
581
581
|
this._propertiesToSearch = value;
|
|
@@ -1282,7 +1282,7 @@ class SkyCountryFieldComponent {
|
|
|
1282
1282
|
* Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)
|
|
1283
1283
|
* country code for the default country.
|
|
1284
1284
|
* When search results include the default country, it appears at the top of the list.
|
|
1285
|
-
* @default us
|
|
1285
|
+
* @default "us"
|
|
1286
1286
|
*/
|
|
1287
1287
|
set defaultCountry(value) {
|
|
1288
1288
|
if (value !== this._defaultCountry) {
|
|
@@ -1296,6 +1296,7 @@ class SkyCountryFieldComponent {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
/**
|
|
1298
1298
|
* Indicates whether to disable the country field.
|
|
1299
|
+
* @default false
|
|
1299
1300
|
*/
|
|
1300
1301
|
set disabled(isDisabled) {
|
|
1301
1302
|
this.removeEventListeners();
|
|
@@ -1674,7 +1675,7 @@ class SkyLookupAutocompleteAdapter {
|
|
|
1674
1675
|
/**
|
|
1675
1676
|
* Specifies an object property to display in the text input after users
|
|
1676
1677
|
* select an item in the dropdown list.
|
|
1677
|
-
* @default name
|
|
1678
|
+
* @default "name"
|
|
1678
1679
|
*/
|
|
1679
1680
|
set descriptorProperty(value) {
|
|
1680
1681
|
this._descriptorProperty = value;
|
|
@@ -1684,7 +1685,7 @@ class SkyLookupAutocompleteAdapter {
|
|
|
1684
1685
|
}
|
|
1685
1686
|
/**
|
|
1686
1687
|
* Specifies an array of object properties to search.
|
|
1687
|
-
* @default [
|
|
1688
|
+
* @default ["name"]
|
|
1688
1689
|
*/
|
|
1689
1690
|
set propertiesToSearch(value) {
|
|
1690
1691
|
this._propertiesToSearch = value;
|
|
@@ -1827,10 +1828,10 @@ class SkySearchComponent {
|
|
|
1827
1828
|
this.searchClear = new EventEmitter();
|
|
1828
1829
|
/**
|
|
1829
1830
|
* Specifies the expand mode for the search input. The valid options
|
|
1830
|
-
* include `responsive` to collapse the search input into a button on
|
|
1831
|
-
* mobile devices, `none` to *not* collapse the search input on mobile
|
|
1832
|
-
* devices, and `fit` to extend the search input to fit the width of its container.
|
|
1833
|
-
* @default responsive
|
|
1831
|
+
* include `"responsive"` to collapse the search input into a button on
|
|
1832
|
+
* mobile devices, `"none"` to *not* collapse the search input on mobile
|
|
1833
|
+
* devices, and `"fit"` to extend the search input to fit the width of its container.
|
|
1834
|
+
* @default "responsive"
|
|
1834
1835
|
*/
|
|
1835
1836
|
this.expandMode = EXPAND_MODE_RESPONSIVE;
|
|
1836
1837
|
/**
|