@skyux/lookup 6.4.0 → 6.7.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 +522 -547
- package/esm2020/lib/modules/autocomplete/autocomplete-input.directive.mjs +2 -2
- package/esm2020/lib/modules/autocomplete/autocomplete.component.mjs +1 -1
- package/esm2020/lib/modules/country-field/country-field.component.mjs +170 -152
- package/esm2020/lib/modules/lookup/lookup-autocomplete-adapter.mjs +14 -8
- package/esm2020/lib/modules/lookup/lookup-show-more-async-modal.component.mjs +65 -58
- package/esm2020/lib/modules/lookup/lookup-show-more-modal.component.mjs +49 -41
- package/esm2020/lib/modules/lookup/lookup.component.mjs +231 -222
- package/esm2020/lib/modules/lookup/types/lookup-show-more-custom-picker-context.mjs +1 -1
- package/esm2020/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.mjs +1 -1
- package/esm2020/lib/modules/lookup/types/lookup-show-more-native-picker-context.mjs +1 -1
- package/esm2020/lib/modules/search/search-adapter.service.mjs +22 -21
- package/esm2020/lib/modules/search/search.component.mjs +68 -67
- package/esm2020/testing/country-field/country-field-fixture.mjs +1 -1
- package/fesm2015/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2015/skyux-lookup.mjs +607 -564
- package/fesm2015/skyux-lookup.mjs.map +1 -1
- package/fesm2020/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2020/skyux-lookup.mjs +605 -562
- package/fesm2020/skyux-lookup.mjs.map +1 -1
- package/lib/modules/autocomplete/autocomplete-input.directive.d.ts +1 -1
- package/lib/modules/autocomplete/autocomplete.component.d.ts +7 -7
- package/lib/modules/country-field/country-field.component.d.ts +14 -36
- package/lib/modules/lookup/lookup-autocomplete-adapter.d.ts +6 -8
- package/lib/modules/lookup/lookup-show-more-async-modal.component.d.ts +9 -16
- package/lib/modules/lookup/lookup-show-more-modal.component.d.ts +3 -4
- package/lib/modules/lookup/lookup.component.d.ts +17 -42
- package/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.d.ts +1 -1
- package/lib/modules/lookup/types/lookup-show-more-native-picker-context.d.ts +1 -1
- package/lib/modules/search/search-adapter.service.d.ts +1 -5
- package/lib/modules/search/search.component.d.ts +11 -22
- package/package.json +10 -10
- package/testing/country-field/country-field-fixture.d.ts +1 -1
|
@@ -10,7 +10,7 @@ import * as i4 from '@skyux/indicators';
|
|
|
10
10
|
import { SkyTextHighlightModule, SkyIconModule, SkyWaitModule, SkyTokensMessageType, SkyTokensModule } from '@skyux/indicators';
|
|
11
11
|
import * as i7 from '@skyux/theme';
|
|
12
12
|
import { SkyThemeModule } from '@skyux/theme';
|
|
13
|
-
import * as
|
|
13
|
+
import * as i4$1 from '@skyux/i18n';
|
|
14
14
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
15
15
|
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
|
|
16
16
|
import { Subject, fromEvent, of, from } from 'rxjs';
|
|
@@ -18,7 +18,7 @@ import { takeUntil, debounceTime, switchMap, take, map, distinctUntilChanged } f
|
|
|
18
18
|
import * as i6 from '@skyux/forms';
|
|
19
19
|
import { SkyInputBoxModule, SkyCheckboxModule } from '@skyux/forms';
|
|
20
20
|
import 'intl-tel-input';
|
|
21
|
-
import * as i4$
|
|
21
|
+
import * as i4$2 from '@skyux/layout';
|
|
22
22
|
import { SkyToolbarModule } from '@skyux/layout';
|
|
23
23
|
import * as i7$1 from '@skyux/lists';
|
|
24
24
|
import { SkyInfiniteScrollModule, SkyRepeaterModule } from '@skyux/lists';
|
|
@@ -147,7 +147,7 @@ class SkyAutocompleteInputDirective {
|
|
|
147
147
|
else {
|
|
148
148
|
__classPrivateFieldSet(this, _SkyAutocompleteInputDirective__autocompleteAttribute, value, "f");
|
|
149
149
|
}
|
|
150
|
-
__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_renderer, "f").setAttribute(__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_elementRef, "f").nativeElement, 'autocomplete', this
|
|
150
|
+
__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_renderer, "f").setAttribute(__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_elementRef, "f").nativeElement, 'autocomplete', __classPrivateFieldGet(this, _SkyAutocompleteInputDirective__autocompleteAttribute, "f"));
|
|
151
151
|
}
|
|
152
152
|
get autocompleteAttribute() {
|
|
153
153
|
return __classPrivateFieldGet(this, _SkyAutocompleteInputDirective__autocompleteAttribute, "f") || 'off';
|
|
@@ -1090,7 +1090,7 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
1092
|
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 });
|
|
1093
|
-
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: "defaultSearchResultTemplate", first: true, predicate: ["defaultSearchResultTemplate"], descendants: true, read: TemplateRef, static: true }, { 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;\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":
|
|
1093
|
+
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: "defaultSearchResultTemplate", first: true, predicate: ["defaultSearchResultTemplate"], descendants: true, read: TemplateRef, static: true }, { 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;\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 });
|
|
1094
1094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAutocompleteComponent, decorators: [{
|
|
1095
1095
|
type: Component,
|
|
1096
1096
|
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;\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"] }]
|
|
@@ -1213,6 +1213,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1213
1213
|
}]
|
|
1214
1214
|
}] });
|
|
1215
1215
|
|
|
1216
|
+
var _SkyCountryFieldComponent_instances, _SkyCountryFieldComponent_changeDetector, _SkyCountryFieldComponent_defaultCountryData, _SkyCountryFieldComponent_elRef, _SkyCountryFieldComponent_idle, _SkyCountryFieldComponent_injector, _SkyCountryFieldComponent_internalFormChange, _SkyCountryFieldComponent_isInitialChange, _SkyCountryFieldComponent_ngControl, _SkyCountryFieldComponent_ngUnsubscribe, _SkyCountryFieldComponent_themeSvc, _SkyCountryFieldComponent_windowRef, _SkyCountryFieldComponent__defaultCountry, _SkyCountryFieldComponent__disabled, _SkyCountryFieldComponent__includePhoneInfo, _SkyCountryFieldComponent__selectedCountry, _SkyCountryFieldComponent__supportedCountryISOs, _SkyCountryFieldComponent_countriesAreEqual, _SkyCountryFieldComponent_countriesEqual, _SkyCountryFieldComponent_removeEventListeners, _SkyCountryFieldComponent_setupCountries, _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault, _SkyCountryFieldComponent_updateInputBox;
|
|
1217
|
+
const DEFAULT_COUNTRY_CODE = 'us';
|
|
1216
1218
|
const SKY_COUNTRY_FIELD_VALIDATOR = {
|
|
1217
1219
|
provide: NG_VALIDATORS,
|
|
1218
1220
|
useExisting: forwardRef(() => SkyCountryFieldComponent),
|
|
@@ -1221,31 +1223,48 @@ const SKY_COUNTRY_FIELD_VALIDATOR = {
|
|
|
1221
1223
|
let uniqueId = 0;
|
|
1222
1224
|
class SkyCountryFieldComponent {
|
|
1223
1225
|
constructor(changeDetector, elRef, windowRef, injector, inputBoxHostSvc, themeSvc) {
|
|
1224
|
-
this.changeDetector = changeDetector;
|
|
1225
|
-
this.elRef = elRef;
|
|
1226
|
-
this.windowRef = windowRef;
|
|
1227
|
-
this.injector = injector;
|
|
1228
1226
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
1229
|
-
this
|
|
1227
|
+
_SkyCountryFieldComponent_instances.add(this);
|
|
1228
|
+
/**
|
|
1229
|
+
* Indicates whether to hide the flag in the input element.
|
|
1230
|
+
*/
|
|
1231
|
+
this.hideSelectedCountryFlag = false;
|
|
1230
1232
|
/**
|
|
1231
1233
|
* Fires when the selected country changes.
|
|
1232
1234
|
*/
|
|
1233
1235
|
this.selectedCountryChange = new EventEmitter();
|
|
1236
|
+
this.countries = [];
|
|
1234
1237
|
this.isInputFocused = false;
|
|
1235
1238
|
this.searchTextMinimumCharacters = 2;
|
|
1236
1239
|
this.currentTheme = 'default';
|
|
1237
|
-
this
|
|
1238
|
-
this
|
|
1239
|
-
this
|
|
1240
|
-
this
|
|
1241
|
-
this
|
|
1242
|
-
this
|
|
1240
|
+
_SkyCountryFieldComponent_changeDetector.set(this, void 0);
|
|
1241
|
+
_SkyCountryFieldComponent_defaultCountryData.set(this, void 0);
|
|
1242
|
+
_SkyCountryFieldComponent_elRef.set(this, void 0);
|
|
1243
|
+
_SkyCountryFieldComponent_idle.set(this, new Subject());
|
|
1244
|
+
_SkyCountryFieldComponent_injector.set(this, void 0);
|
|
1245
|
+
_SkyCountryFieldComponent_internalFormChange.set(this, false);
|
|
1246
|
+
_SkyCountryFieldComponent_isInitialChange.set(this, true);
|
|
1247
|
+
_SkyCountryFieldComponent_ngControl.set(this, null);
|
|
1248
|
+
_SkyCountryFieldComponent_ngUnsubscribe.set(this, new Subject());
|
|
1249
|
+
_SkyCountryFieldComponent_themeSvc.set(this, void 0);
|
|
1250
|
+
_SkyCountryFieldComponent_windowRef.set(this, void 0);
|
|
1251
|
+
_SkyCountryFieldComponent__defaultCountry.set(this, void 0);
|
|
1252
|
+
_SkyCountryFieldComponent__disabled.set(this, false);
|
|
1253
|
+
_SkyCountryFieldComponent__includePhoneInfo.set(this, false);
|
|
1254
|
+
_SkyCountryFieldComponent__selectedCountry.set(this, void 0);
|
|
1255
|
+
_SkyCountryFieldComponent__supportedCountryISOs.set(this, void 0);
|
|
1243
1256
|
// Angular automatically constructs these methods.
|
|
1244
1257
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1245
1258
|
this.onChange = (value) => { };
|
|
1246
1259
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1247
1260
|
this.onTouched = () => { };
|
|
1248
|
-
this
|
|
1261
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_changeDetector, changeDetector, "f");
|
|
1262
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_elRef, elRef, "f");
|
|
1263
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_windowRef, windowRef, "f");
|
|
1264
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_injector, injector, "f");
|
|
1265
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_themeSvc, themeSvc, "f");
|
|
1266
|
+
this.inputId = `sky-country-field-input-${uniqueId++}`;
|
|
1267
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1249
1268
|
this.countrySearchFormControl = new FormControl();
|
|
1250
1269
|
}
|
|
1251
1270
|
/**
|
|
@@ -1255,40 +1274,43 @@ class SkyCountryFieldComponent {
|
|
|
1255
1274
|
* @default "us"
|
|
1256
1275
|
*/
|
|
1257
1276
|
set defaultCountry(value) {
|
|
1258
|
-
if (value
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1277
|
+
if (!value) {
|
|
1278
|
+
value = DEFAULT_COUNTRY_CODE;
|
|
1279
|
+
}
|
|
1280
|
+
if (value !== __classPrivateFieldGet(this, _SkyCountryFieldComponent__defaultCountry, "f")) {
|
|
1281
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__defaultCountry, value.toLowerCase(), "f");
|
|
1282
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_defaultCountryData, this.countries.find((country) => country.iso2 === __classPrivateFieldGet(this, _SkyCountryFieldComponent__defaultCountry, "f")), "f");
|
|
1283
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault).call(this, this.selectedCountry);
|
|
1262
1284
|
}
|
|
1263
1285
|
}
|
|
1264
1286
|
get defaultCountry() {
|
|
1265
|
-
return this
|
|
1287
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__defaultCountry, "f");
|
|
1266
1288
|
}
|
|
1267
1289
|
/**
|
|
1268
1290
|
* Indicates whether to disable the country field.
|
|
1269
1291
|
* @default false
|
|
1270
1292
|
*/
|
|
1271
1293
|
set disabled(isDisabled) {
|
|
1272
|
-
this.
|
|
1294
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1273
1295
|
if (!isDisabled) {
|
|
1274
1296
|
this.addEventListeners();
|
|
1275
1297
|
}
|
|
1276
|
-
this
|
|
1277
|
-
this.
|
|
1298
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__disabled, isDisabled, "f");
|
|
1299
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1278
1300
|
}
|
|
1279
1301
|
get disabled() {
|
|
1280
|
-
return this
|
|
1302
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__disabled, "f");
|
|
1281
1303
|
}
|
|
1282
1304
|
/**
|
|
1283
1305
|
* Indicates whether to include phone information in the selected country and country dropdown.
|
|
1284
1306
|
* @default false
|
|
1285
1307
|
*/
|
|
1286
|
-
set includePhoneInfo(
|
|
1287
|
-
this
|
|
1288
|
-
this.
|
|
1308
|
+
set includePhoneInfo(value) {
|
|
1309
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__includePhoneInfo, value, "f");
|
|
1310
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1289
1311
|
}
|
|
1290
1312
|
get includePhoneInfo() {
|
|
1291
|
-
return this
|
|
1313
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__includePhoneInfo, "f") || false;
|
|
1292
1314
|
}
|
|
1293
1315
|
/**
|
|
1294
1316
|
* Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)
|
|
@@ -1299,35 +1321,36 @@ class SkyCountryFieldComponent {
|
|
|
1299
1321
|
if (Array.isArray(value)) {
|
|
1300
1322
|
value = value.map((v) => v.toLowerCase());
|
|
1301
1323
|
}
|
|
1302
|
-
this
|
|
1303
|
-
this.
|
|
1324
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__supportedCountryISOs, value, "f");
|
|
1325
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1304
1326
|
}
|
|
1305
1327
|
get supportedCountryISOs() {
|
|
1306
|
-
return this
|
|
1328
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__supportedCountryISOs, "f") || [];
|
|
1307
1329
|
}
|
|
1308
1330
|
set selectedCountry(newCountry) {
|
|
1309
|
-
if (!this.
|
|
1310
|
-
|
|
1311
|
-
|
|
1331
|
+
if (!__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesAreEqual).call(this, this.selectedCountry, newCountry)) {
|
|
1332
|
+
const newCountryIso = newCountry && newCountry.iso2;
|
|
1333
|
+
if (newCountryIso) {
|
|
1334
|
+
const isoCountry = this.countries.find((country) => country.iso2 === newCountryIso);
|
|
1312
1335
|
if (isoCountry) {
|
|
1313
1336
|
newCountry = isoCountry;
|
|
1314
1337
|
}
|
|
1315
1338
|
}
|
|
1316
|
-
this
|
|
1317
|
-
this.
|
|
1318
|
-
this
|
|
1339
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__selectedCountry, newCountry, "f");
|
|
1340
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault).call(this, newCountry);
|
|
1341
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_internalFormChange, true, "f");
|
|
1319
1342
|
this.countrySearchFormControl.setValue(this.selectedCountry);
|
|
1320
|
-
if (!this
|
|
1343
|
+
if (!__classPrivateFieldGet(this, _SkyCountryFieldComponent_isInitialChange, "f")) {
|
|
1321
1344
|
this.onChange(newCountry);
|
|
1322
1345
|
this.onTouched();
|
|
1323
1346
|
this.selectedCountryChange.emit(newCountry);
|
|
1324
1347
|
}
|
|
1325
1348
|
// Do not mark the field as "dirty"
|
|
1326
1349
|
// if the field has been initialized with a value.
|
|
1327
|
-
if (this
|
|
1328
|
-
this.
|
|
1350
|
+
if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_isInitialChange, "f") && __classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f") && __classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f").control) {
|
|
1351
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f").control.markAsPristine();
|
|
1329
1352
|
}
|
|
1330
|
-
this
|
|
1353
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_isInitialChange, false, "f");
|
|
1331
1354
|
/**
|
|
1332
1355
|
* The second portion of this if statement is complex. The control type check ensures that
|
|
1333
1356
|
* we only watch for the initial time through this function on reactive forms. However,
|
|
@@ -1335,39 +1358,38 @@ class SkyCountryFieldComponent {
|
|
|
1335
1358
|
* so we have to check for when the non-null pass through happens.
|
|
1336
1359
|
*/
|
|
1337
1360
|
}
|
|
1338
|
-
else if (this
|
|
1339
|
-
(!(this
|
|
1340
|
-
this
|
|
1361
|
+
else if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_isInitialChange, "f") &&
|
|
1362
|
+
(!(__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f") instanceof NgModel) || newCountry !== null)) {
|
|
1363
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_isInitialChange, false, "f");
|
|
1341
1364
|
}
|
|
1342
1365
|
}
|
|
1343
1366
|
get selectedCountry() {
|
|
1344
|
-
return this
|
|
1367
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__selectedCountry, "f");
|
|
1345
1368
|
}
|
|
1346
1369
|
/**
|
|
1347
1370
|
* Angular lifecycle hook for when the component is initialized
|
|
1348
1371
|
* @internal
|
|
1349
1372
|
*/
|
|
1350
1373
|
ngOnInit() {
|
|
1351
|
-
this.
|
|
1352
|
-
this
|
|
1353
|
-
this
|
|
1354
|
-
|
|
1355
|
-
this.ngControl.valueAccessor = this;
|
|
1374
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_updateInputBox).call(this);
|
|
1375
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_ngControl, __classPrivateFieldGet(this, _SkyCountryFieldComponent_injector, "f").get(NgControl, null), "f");
|
|
1376
|
+
if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f")) {
|
|
1377
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f").valueAccessor = this;
|
|
1356
1378
|
}
|
|
1357
1379
|
else {
|
|
1358
1380
|
/**
|
|
1359
1381
|
* The initial change boolean is to determine if the form is setting the value. When no form
|
|
1360
1382
|
* is present we don't want to ignore the first change.
|
|
1361
1383
|
*/
|
|
1362
|
-
this
|
|
1384
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_isInitialChange, false, "f");
|
|
1363
1385
|
}
|
|
1364
1386
|
if (!this.defaultCountry) {
|
|
1365
|
-
this.defaultCountry =
|
|
1387
|
+
this.defaultCountry = DEFAULT_COUNTRY_CODE;
|
|
1366
1388
|
}
|
|
1367
1389
|
this.countrySearchFormControl.valueChanges
|
|
1368
|
-
.pipe(takeUntil(this
|
|
1390
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngUnsubscribe, "f")))
|
|
1369
1391
|
.subscribe((newValue) => {
|
|
1370
|
-
if (newValue && !this
|
|
1392
|
+
if (newValue && !__classPrivateFieldGet(this, _SkyCountryFieldComponent_internalFormChange, "f")) {
|
|
1371
1393
|
this.selectedCountry = newValue;
|
|
1372
1394
|
}
|
|
1373
1395
|
});
|
|
@@ -1377,11 +1399,11 @@ class SkyCountryFieldComponent {
|
|
|
1377
1399
|
}
|
|
1378
1400
|
ngAfterViewInit() {
|
|
1379
1401
|
/* istanbul ignore else */
|
|
1380
|
-
if (this
|
|
1381
|
-
this.
|
|
1402
|
+
if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_themeSvc, "f")) {
|
|
1403
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_themeSvc, "f").settingsChange.subscribe((change) => {
|
|
1382
1404
|
this.currentTheme = change.currentSettings.theme.name;
|
|
1383
|
-
this.
|
|
1384
|
-
this.
|
|
1405
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_updateInputBox).call(this);
|
|
1406
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1385
1407
|
});
|
|
1386
1408
|
}
|
|
1387
1409
|
}
|
|
@@ -1391,9 +1413,9 @@ class SkyCountryFieldComponent {
|
|
|
1391
1413
|
*/
|
|
1392
1414
|
ngOnDestroy() {
|
|
1393
1415
|
this.selectedCountryChange.complete();
|
|
1394
|
-
this.
|
|
1395
|
-
this.
|
|
1396
|
-
this.
|
|
1416
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1417
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngUnsubscribe, "f").next();
|
|
1418
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngUnsubscribe, "f").complete();
|
|
1397
1419
|
}
|
|
1398
1420
|
/**
|
|
1399
1421
|
* Sets the component's touched value when the autocomplete is blurred
|
|
@@ -1435,124 +1457,119 @@ class SkyCountryFieldComponent {
|
|
|
1435
1457
|
return { unsupportedCountry: true };
|
|
1436
1458
|
}
|
|
1437
1459
|
}
|
|
1438
|
-
return;
|
|
1460
|
+
return null;
|
|
1439
1461
|
}
|
|
1440
1462
|
writeValue(value) {
|
|
1441
1463
|
this.selectedCountry = value;
|
|
1442
|
-
this.
|
|
1464
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1443
1465
|
}
|
|
1444
1466
|
addEventListeners() {
|
|
1445
|
-
this.
|
|
1446
|
-
this
|
|
1447
|
-
const documentObj = this.
|
|
1467
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1468
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_idle, new Subject(), "f");
|
|
1469
|
+
const documentObj = __classPrivateFieldGet(this, _SkyCountryFieldComponent_windowRef, "f").nativeWindow.document;
|
|
1448
1470
|
fromEvent(documentObj, 'mousedown')
|
|
1449
|
-
.pipe(takeUntil(this
|
|
1471
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1450
1472
|
.subscribe((event) => {
|
|
1451
|
-
this.isInputFocused = this.
|
|
1452
|
-
this.
|
|
1473
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1474
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1453
1475
|
});
|
|
1454
1476
|
fromEvent(documentObj, 'focusin')
|
|
1455
|
-
.pipe(takeUntil(this
|
|
1477
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1456
1478
|
.subscribe((event) => {
|
|
1457
|
-
this.isInputFocused = this.
|
|
1458
|
-
this.
|
|
1479
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1480
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1459
1481
|
});
|
|
1460
1482
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1483
|
+
}
|
|
1484
|
+
_SkyCountryFieldComponent_changeDetector = new WeakMap(), _SkyCountryFieldComponent_defaultCountryData = new WeakMap(), _SkyCountryFieldComponent_elRef = new WeakMap(), _SkyCountryFieldComponent_idle = new WeakMap(), _SkyCountryFieldComponent_injector = new WeakMap(), _SkyCountryFieldComponent_internalFormChange = new WeakMap(), _SkyCountryFieldComponent_isInitialChange = new WeakMap(), _SkyCountryFieldComponent_ngControl = new WeakMap(), _SkyCountryFieldComponent_ngUnsubscribe = new WeakMap(), _SkyCountryFieldComponent_themeSvc = new WeakMap(), _SkyCountryFieldComponent_windowRef = new WeakMap(), _SkyCountryFieldComponent__defaultCountry = new WeakMap(), _SkyCountryFieldComponent__disabled = new WeakMap(), _SkyCountryFieldComponent__includePhoneInfo = new WeakMap(), _SkyCountryFieldComponent__selectedCountry = new WeakMap(), _SkyCountryFieldComponent__supportedCountryISOs = new WeakMap(), _SkyCountryFieldComponent_instances = new WeakSet(), _SkyCountryFieldComponent_countriesAreEqual = function _SkyCountryFieldComponent_countriesAreEqual(country1, country2) {
|
|
1485
|
+
if (country1 && country2) {
|
|
1486
|
+
return country1.iso2 === country2.iso2;
|
|
1487
|
+
}
|
|
1488
|
+
// NOTE: We are doing this in this way because template forms will send through `null`
|
|
1489
|
+
// and then `undefined` on empty initialization. These are functionally equivalent but will
|
|
1490
|
+
// not pass a standard triple equals check.
|
|
1491
|
+
return !country1 && !country2;
|
|
1492
|
+
}, _SkyCountryFieldComponent_countriesEqual = function _SkyCountryFieldComponent_countriesEqual(a, b) {
|
|
1493
|
+
return a.iso2 === b.iso2 && a.name === b.name;
|
|
1494
|
+
}, _SkyCountryFieldComponent_removeEventListeners = function _SkyCountryFieldComponent_removeEventListeners() {
|
|
1495
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f").next();
|
|
1496
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f").complete();
|
|
1497
|
+
}, _SkyCountryFieldComponent_setupCountries = function _SkyCountryFieldComponent_setupCountries() {
|
|
1498
|
+
var _a, _b;
|
|
1499
|
+
/**
|
|
1500
|
+
* The json functions here ensures that we get a copy of the array and not the global original.
|
|
1501
|
+
* This ensures that multiple instances of the component don't overwrite the original data.
|
|
1502
|
+
*
|
|
1503
|
+
* We must type the window object as any here as the intl-tel-input library adds its object
|
|
1504
|
+
* to the main window object.
|
|
1505
|
+
*/
|
|
1506
|
+
this.countries = JSON.parse(
|
|
1507
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1508
|
+
JSON.stringify(window.intlTelInputGlobals.getCountryData()));
|
|
1509
|
+
// Ignoring coverage here as this will be removed in the next release.
|
|
1510
|
+
// istanbul ignore next
|
|
1511
|
+
if (!this.includePhoneInfo && !this.hideSelectedCountryFlag) {
|
|
1512
|
+
if ((_b = (_a = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.parentElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains('sky-phone-field-country-search')) {
|
|
1513
|
+
this.includePhoneInfo = true;
|
|
1514
|
+
this.hideSelectedCountryFlag = true;
|
|
1464
1515
|
}
|
|
1465
|
-
// NOTE: We are doing this in this way because template forms will send through `null`
|
|
1466
|
-
// and then `undefined` on empty initialization. These are functionally equivalent but will
|
|
1467
|
-
// not pass a standard triple equals check.
|
|
1468
|
-
return !country1 && !country2;
|
|
1469
|
-
}
|
|
1470
|
-
countriesEqual(a, b) {
|
|
1471
|
-
return a.iso2 === b.iso2 && a.name === b.name;
|
|
1472
1516
|
}
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
this.idle.complete();
|
|
1476
|
-
}
|
|
1477
|
-
setupCountries() {
|
|
1478
|
-
var _a, _b;
|
|
1517
|
+
/* istanbul ignore else */
|
|
1518
|
+
if (!this.includePhoneInfo) {
|
|
1479
1519
|
/**
|
|
1480
|
-
* The
|
|
1481
|
-
*
|
|
1482
|
-
*
|
|
1483
|
-
* We must type the window object as any here as the intl-tel-input library adds its object
|
|
1484
|
-
* to the main window object.
|
|
1520
|
+
* The library we get the country data from includes extra phone properties.
|
|
1521
|
+
* We want to remove these unless we are in a phone field
|
|
1485
1522
|
*/
|
|
1486
|
-
this.countries
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
if (!this.includePhoneInfo && !this.hideSelectedCountryFlag) {
|
|
1492
|
-
if ((_b = (_a = this.elRef.nativeElement.parentElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains('sky-phone-field-country-search')) {
|
|
1493
|
-
this.includePhoneInfo = true;
|
|
1494
|
-
this.hideSelectedCountryFlag = true;
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
/* istanbul ignore else */
|
|
1498
|
-
if (!this.includePhoneInfo) {
|
|
1499
|
-
/**
|
|
1500
|
-
* The library we get the country data from includes extra phone properties.
|
|
1501
|
-
* We want to remove these unless we are in a phone field
|
|
1502
|
-
*/
|
|
1503
|
-
this.countries.forEach((country) => {
|
|
1504
|
-
delete country.dialCode;
|
|
1505
|
-
delete country.areaCodes;
|
|
1506
|
-
delete country.priority;
|
|
1507
|
-
});
|
|
1508
|
-
}
|
|
1509
|
-
this.sortCountriesWithSelectedAndDefault(this.selectedCountry);
|
|
1510
|
-
if (this.supportedCountryISOs && this.supportedCountryISOs.length > 0) {
|
|
1511
|
-
this.countries = this.countries.filter((country) => {
|
|
1512
|
-
return this.supportedCountryISOs.indexOf(country.iso2) >= 0;
|
|
1513
|
-
});
|
|
1514
|
-
}
|
|
1523
|
+
this.countries.forEach((country) => {
|
|
1524
|
+
delete country.dialCode;
|
|
1525
|
+
delete country.areaCodes;
|
|
1526
|
+
delete country.priority;
|
|
1527
|
+
});
|
|
1515
1528
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
if (((this.defaultCountryData &&
|
|
1521
|
-
this.countriesEqual(a, this.defaultCountryData)) ||
|
|
1522
|
-
a.name < b.name) &&
|
|
1523
|
-
(!this.defaultCountryData ||
|
|
1524
|
-
!this.countriesEqual(this.defaultCountryData, b))) {
|
|
1525
|
-
return -1;
|
|
1526
|
-
}
|
|
1527
|
-
else {
|
|
1528
|
-
return 1;
|
|
1529
|
-
}
|
|
1529
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault).call(this, this.selectedCountry);
|
|
1530
|
+
if (this.supportedCountryISOs && this.supportedCountryISOs.length > 0) {
|
|
1531
|
+
this.countries = this.countries.filter((country) => {
|
|
1532
|
+
return this.supportedCountryISOs.indexOf(country.iso2) >= 0;
|
|
1530
1533
|
});
|
|
1531
|
-
if (selectedCountry) {
|
|
1532
|
-
// Note: We are looking up this data here to ensure we are using the offical data from the
|
|
1533
|
-
// library and not the data provided by the user on initialization of the component
|
|
1534
|
-
selectedCountryData = this.countries.find((country) => country.iso2 === selectedCountry.iso2.toLocaleLowerCase());
|
|
1535
|
-
selectedCountryIndex = this.countries.indexOf(selectedCountryData);
|
|
1536
|
-
if (selectedCountryIndex >= 0) {
|
|
1537
|
-
this.countries.splice(selectedCountryIndex, 1);
|
|
1538
|
-
sortedNewCountries.splice(0, 0, selectedCountryData);
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
this.countries = sortedNewCountries;
|
|
1542
1534
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1535
|
+
}, _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault = function _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault(selectedCountry) {
|
|
1536
|
+
let selectedCountryIndex;
|
|
1537
|
+
let selectedCountryData;
|
|
1538
|
+
const sortedNewCountries = this.countries.sort((a, b) => {
|
|
1539
|
+
if (((__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") &&
|
|
1540
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, a, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"))) ||
|
|
1541
|
+
a.name < b.name) &&
|
|
1542
|
+
(!__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") ||
|
|
1543
|
+
!__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"), b))) {
|
|
1544
|
+
return -1;
|
|
1545
|
+
}
|
|
1546
|
+
else {
|
|
1547
|
+
return 1;
|
|
1551
1548
|
}
|
|
1549
|
+
});
|
|
1550
|
+
if (selectedCountry) {
|
|
1551
|
+
// Note: We are looking up this data here to ensure we are using the offical data from the
|
|
1552
|
+
// library and not the data provided by the user on initialization of the component
|
|
1553
|
+
selectedCountryData = this.countries.find((country) => country.iso2 === selectedCountry.iso2.toLocaleLowerCase());
|
|
1554
|
+
selectedCountryIndex = this.countries.indexOf(selectedCountryData);
|
|
1555
|
+
if (selectedCountryIndex >= 0) {
|
|
1556
|
+
this.countries.splice(selectedCountryIndex, 1);
|
|
1557
|
+
sortedNewCountries.splice(0, 0, selectedCountryData);
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
this.countries = sortedNewCountries;
|
|
1561
|
+
}, _SkyCountryFieldComponent_updateInputBox = function _SkyCountryFieldComponent_updateInputBox() {
|
|
1562
|
+
if (this.inputBoxHostSvc) {
|
|
1563
|
+
this.inputBoxHostSvc.populate({
|
|
1564
|
+
inputTemplate: this.inputTemplateRef,
|
|
1565
|
+
iconsInsetTemplate: this.currentTheme === 'modern'
|
|
1566
|
+
? this.searchIconTemplateRef
|
|
1567
|
+
: undefined,
|
|
1568
|
+
});
|
|
1552
1569
|
}
|
|
1553
|
-
}
|
|
1570
|
+
};
|
|
1554
1571
|
SkyCountryFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyCountryFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyAppWindowRef }, { token: i0.Injector }, { token: i6.SkyInputBoxHostService, optional: true }, { token: i7.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1555
|
-
SkyCountryFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyCountryFieldComponent, selector: "sky-country-field", inputs: { autocompleteAttribute: "autocompleteAttribute", defaultCountry: "defaultCountry", disabled: "disabled", hideSelectedCountryFlag: "hideSelectedCountryFlag", includePhoneInfo: "includePhoneInfo", supportedCountryISOs: "supportedCountryISOs" }, outputs: { selectedCountryChange: "selectedCountryChange" }, providers: [SKY_COUNTRY_FIELD_VALIDATOR], viewQueries: [{ propertyName: "countrySearchAutocompleteDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "searchIconTemplateRef", first: true, predicate: ["searchIconTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <span\n class=\"sky-country-field-container\"\n [ngClass]=\"{\n 'sky-country-field-disabled': disabled\n }\"\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"inputId\"\n [data]=\"countries\"\n [propertiesToSearch]=\"['name', 'iso2']\"\n [searchResultTemplate]=\"countrySearchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n (selectionChange)=\"onCountrySelected($event)\"\n >\n <div\n class=\"sky-country-field-input\"\n [ngClass]=\"{\n 'sky-country-field-input-with-flag':\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n }\"\n >\n <div\n *ngIf=\"\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n \"\n class=\"sky-country-field-flag\"\n >\n <div\n class=\"iti__flag\"\n [ngClass]=\"'iti__' + selectedCountry.iso2.toLowerCase()\"\n ></div>\n </div>\n <textarea\n class=\"sky-form-control\"\n name=\"selectedCountry\"\n rows=\"1\"\n skyAutocomplete\n [attr.aria-label]=\"\n 'skyux_country_field_search_placeholder' | skyLibResources\n \"\n [attr.disabled]=\"disabled ? true : undefined\"\n [attr.id]=\"inputId\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [formControl]=\"countrySearchFormControl\"\n [placeholder]=\"\n currentTheme === 'default'\n ? ('skyux_country_field_search_placeholder' | skyLibResources)\n : ''\n \"\n (blur)=\"onAutocompleteBlur()\"\n ></textarea>\n </div>\n </sky-autocomplete>\n </span>\n</ng-template>\n\n<ng-template let-item=\"item\" #countrySearchResultTemplate>\n <div\n class=\"sky-country-field-search-result-flag\"\n [ngClass]=\"'iti__flag iti__' + item.iso2.toLowerCase()\"\n ></div>\n {{ item.name }}\n <span *ngIf=\"includePhoneInfo\" class=\"sky-deemphasized\">\n {{ item.dialCode }}\n </span>\n</ng-template>\n\n<!-- This template should only be used in modern theme input boxes. -->\n<ng-template #searchIconTemplateRef>\n <div class=\"sky-input-group-icon sky-input-box-icon-inset\">\n <sky-icon iconType=\"skyux\" icon=\"search\"></sky-icon>\n </div>\n</ng-template>\n", styles: [".iti{position:relative;display:inline-block}.iti *{box-sizing:border-box;-moz-box-sizing:border-box}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti input,.iti input[type=text],.iti input[type=tel]{position:relative;z-index:0;margin-top:0!important;margin-bottom:0!important;padding-right:36px;margin-right:0}.iti__flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.iti__selected-flag{z-index:1;position:relative;display:flex;align-items:center;height:100%;padding:0 6px 0 8px}.iti__arrow{margin-left:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}.iti__arrow--up{border-top:none;border-bottom:4px solid #555}.iti__country-list{position:absolute;z-index:2;list-style:none;text-align:left;padding:0;margin:0 0 0 -1px;box-shadow:1px 1px 4px #0003;background-color:#fff;border:1px solid #CCC;white-space:nowrap;max-height:200px;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti__country-list--dropup{bottom:100%;margin-bottom:-1px}@media (max-width: 500px){.iti__country-list{white-space:normal}}.iti__flag-box{display:inline-block;width:20px}.iti__divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #CCC}.iti__country{padding:5px 10px;outline:none}.iti__dial-code{color:#999}.iti__country.iti__highlight{background-color:#0000000d}.iti__flag-box,.iti__country-name,.iti__dial-code{vertical-align:middle}.iti__flag-box,.iti__country-name{margin-right:6px}.iti--allow-dropdown input,.iti--allow-dropdown input[type=text],.iti--allow-dropdown input[type=tel],.iti--separate-dial-code input,.iti--separate-dial-code input[type=text],.iti--separate-dial-code input[type=tel]{padding-right:6px;padding-left:52px;margin-left:0}.iti--allow-dropdown .iti__flag-container,.iti--separate-dial-code .iti__flag-container{right:auto;left:0}.iti--allow-dropdown .iti__flag-container:hover{cursor:pointer}.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag{background-color:#0000000d}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover{cursor:default}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover .iti__selected-flag,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover .iti__selected-flag{background-color:transparent}.iti--separate-dial-code .iti__selected-flag{background-color:#0000000d}.iti--separate-dial-code .iti__selected-dial-code{margin-left:6px}.iti--container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.iti--container:hover{cursor:pointer}.iti-mobile .iti--container{top:30px;bottom:30px;left:30px;right:30px;position:fixed}.iti-mobile .iti__country-list{max-height:100%;width:100%}.iti-mobile .iti__country{padding:10px;line-height:1.5em}.iti__flag{width:20px}.iti__flag.iti__be{width:18px}.iti__flag.iti__ch{width:15px}.iti__flag.iti__mc{width:19px}.iti__flag.iti__ne{width:18px}.iti__flag.iti__np{width:13px}.iti__flag.iti__va{width:15px}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag{background-size:5652px 15px}}.iti__flag.iti__ac{height:10px;background-position:0px 0px}.iti__flag.iti__ad{height:14px;background-position:-22px 0px}.iti__flag.iti__ae{height:10px;background-position:-44px 0px}.iti__flag.iti__af{height:14px;background-position:-66px 0px}.iti__flag.iti__ag{height:14px;background-position:-88px 0px}.iti__flag.iti__ai{height:10px;background-position:-110px 0px}.iti__flag.iti__al{height:15px;background-position:-132px 0px}.iti__flag.iti__am{height:10px;background-position:-154px 0px}.iti__flag.iti__ao{height:14px;background-position:-176px 0px}.iti__flag.iti__aq{height:14px;background-position:-198px 0px}.iti__flag.iti__ar{height:13px;background-position:-220px 0px}.iti__flag.iti__as{height:10px;background-position:-242px 0px}.iti__flag.iti__at{height:14px;background-position:-264px 0px}.iti__flag.iti__au{height:10px;background-position:-286px 0px}.iti__flag.iti__aw{height:14px;background-position:-308px 0px}.iti__flag.iti__ax{height:13px;background-position:-330px 0px}.iti__flag.iti__az{height:10px;background-position:-352px 0px}.iti__flag.iti__ba{height:10px;background-position:-374px 0px}.iti__flag.iti__bb{height:14px;background-position:-396px 0px}.iti__flag.iti__bd{height:12px;background-position:-418px 0px}.iti__flag.iti__be{height:15px;background-position:-440px 0px}.iti__flag.iti__bf{height:14px;background-position:-460px 0px}.iti__flag.iti__bg{height:12px;background-position:-482px 0px}.iti__flag.iti__bh{height:12px;background-position:-504px 0px}.iti__flag.iti__bi{height:12px;background-position:-526px 0px}.iti__flag.iti__bj{height:14px;background-position:-548px 0px}.iti__flag.iti__bl{height:14px;background-position:-570px 0px}.iti__flag.iti__bm{height:10px;background-position:-592px 0px}.iti__flag.iti__bn{height:10px;background-position:-614px 0px}.iti__flag.iti__bo{height:14px;background-position:-636px 0px}.iti__flag.iti__bq{height:14px;background-position:-658px 0px}.iti__flag.iti__br{height:14px;background-position:-680px 0px}.iti__flag.iti__bs{height:10px;background-position:-702px 0px}.iti__flag.iti__bt{height:14px;background-position:-724px 0px}.iti__flag.iti__bv{height:15px;background-position:-746px 0px}.iti__flag.iti__bw{height:14px;background-position:-768px 0px}.iti__flag.iti__by{height:10px;background-position:-790px 0px}.iti__flag.iti__bz{height:14px;background-position:-812px 0px}.iti__flag.iti__ca{height:10px;background-position:-834px 0px}.iti__flag.iti__cc{height:10px;background-position:-856px 0px}.iti__flag.iti__cd{height:15px;background-position:-878px 0px}.iti__flag.iti__cf{height:14px;background-position:-900px 0px}.iti__flag.iti__cg{height:14px;background-position:-922px 0px}.iti__flag.iti__ch{height:15px;background-position:-944px 0px}.iti__flag.iti__ci{height:14px;background-position:-961px 0px}.iti__flag.iti__ck{height:10px;background-position:-983px 0px}.iti__flag.iti__cl{height:14px;background-position:-1005px 0px}.iti__flag.iti__cm{height:14px;background-position:-1027px 0px}.iti__flag.iti__cn{height:14px;background-position:-1049px 0px}.iti__flag.iti__co{height:14px;background-position:-1071px 0px}.iti__flag.iti__cp{height:14px;background-position:-1093px 0px}.iti__flag.iti__cr{height:12px;background-position:-1115px 0px}.iti__flag.iti__cu{height:10px;background-position:-1137px 0px}.iti__flag.iti__cv{height:12px;background-position:-1159px 0px}.iti__flag.iti__cw{height:14px;background-position:-1181px 0px}.iti__flag.iti__cx{height:10px;background-position:-1203px 0px}.iti__flag.iti__cy{height:14px;background-position:-1225px 0px}.iti__flag.iti__cz{height:14px;background-position:-1247px 0px}.iti__flag.iti__de{height:12px;background-position:-1269px 0px}.iti__flag.iti__dg{height:10px;background-position:-1291px 0px}.iti__flag.iti__dj{height:14px;background-position:-1313px 0px}.iti__flag.iti__dk{height:15px;background-position:-1335px 0px}.iti__flag.iti__dm{height:10px;background-position:-1357px 0px}.iti__flag.iti__do{height:14px;background-position:-1379px 0px}.iti__flag.iti__dz{height:14px;background-position:-1401px 0px}.iti__flag.iti__ea{height:14px;background-position:-1423px 0px}.iti__flag.iti__ec{height:14px;background-position:-1445px 0px}.iti__flag.iti__ee{height:13px;background-position:-1467px 0px}.iti__flag.iti__eg{height:14px;background-position:-1489px 0px}.iti__flag.iti__eh{height:10px;background-position:-1511px 0px}.iti__flag.iti__er{height:10px;background-position:-1533px 0px}.iti__flag.iti__es{height:14px;background-position:-1555px 0px}.iti__flag.iti__et{height:10px;background-position:-1577px 0px}.iti__flag.iti__eu{height:14px;background-position:-1599px 0px}.iti__flag.iti__fi{height:12px;background-position:-1621px 0px}.iti__flag.iti__fj{height:10px;background-position:-1643px 0px}.iti__flag.iti__fk{height:10px;background-position:-1665px 0px}.iti__flag.iti__fm{height:11px;background-position:-1687px 0px}.iti__flag.iti__fo{height:15px;background-position:-1709px 0px}.iti__flag.iti__fr{height:14px;background-position:-1731px 0px}.iti__flag.iti__ga{height:15px;background-position:-1753px 0px}.iti__flag.iti__gb{height:10px;background-position:-1775px 0px}.iti__flag.iti__gd{height:12px;background-position:-1797px 0px}.iti__flag.iti__ge{height:14px;background-position:-1819px 0px}.iti__flag.iti__gf{height:14px;background-position:-1841px 0px}.iti__flag.iti__gg{height:14px;background-position:-1863px 0px}.iti__flag.iti__gh{height:14px;background-position:-1885px 0px}.iti__flag.iti__gi{height:10px;background-position:-1907px 0px}.iti__flag.iti__gl{height:14px;background-position:-1929px 0px}.iti__flag.iti__gm{height:14px;background-position:-1951px 0px}.iti__flag.iti__gn{height:14px;background-position:-1973px 0px}.iti__flag.iti__gp{height:14px;background-position:-1995px 0px}.iti__flag.iti__gq{height:14px;background-position:-2017px 0px}.iti__flag.iti__gr{height:14px;background-position:-2039px 0px}.iti__flag.iti__gs{height:10px;background-position:-2061px 0px}.iti__flag.iti__gt{height:13px;background-position:-2083px 0px}.iti__flag.iti__gu{height:11px;background-position:-2105px 0px}.iti__flag.iti__gw{height:10px;background-position:-2127px 0px}.iti__flag.iti__gy{height:12px;background-position:-2149px 0px}.iti__flag.iti__hk{height:14px;background-position:-2171px 0px}.iti__flag.iti__hm{height:10px;background-position:-2193px 0px}.iti__flag.iti__hn{height:10px;background-position:-2215px 0px}.iti__flag.iti__hr{height:10px;background-position:-2237px 0px}.iti__flag.iti__ht{height:12px;background-position:-2259px 0px}.iti__flag.iti__hu{height:10px;background-position:-2281px 0px}.iti__flag.iti__ic{height:14px;background-position:-2303px 0px}.iti__flag.iti__id{height:14px;background-position:-2325px 0px}.iti__flag.iti__ie{height:10px;background-position:-2347px 0px}.iti__flag.iti__il{height:15px;background-position:-2369px 0px}.iti__flag.iti__im{height:10px;background-position:-2391px 0px}.iti__flag.iti__in{height:14px;background-position:-2413px 0px}.iti__flag.iti__io{height:10px;background-position:-2435px 0px}.iti__flag.iti__iq{height:14px;background-position:-2457px 0px}.iti__flag.iti__ir{height:12px;background-position:-2479px 0px}.iti__flag.iti__is{height:15px;background-position:-2501px 0px}.iti__flag.iti__it{height:14px;background-position:-2523px 0px}.iti__flag.iti__je{height:12px;background-position:-2545px 0px}.iti__flag.iti__jm{height:10px;background-position:-2567px 0px}.iti__flag.iti__jo{height:10px;background-position:-2589px 0px}.iti__flag.iti__jp{height:14px;background-position:-2611px 0px}.iti__flag.iti__ke{height:14px;background-position:-2633px 0px}.iti__flag.iti__kg{height:12px;background-position:-2655px 0px}.iti__flag.iti__kh{height:13px;background-position:-2677px 0px}.iti__flag.iti__ki{height:10px;background-position:-2699px 0px}.iti__flag.iti__km{height:12px;background-position:-2721px 0px}.iti__flag.iti__kn{height:14px;background-position:-2743px 0px}.iti__flag.iti__kp{height:10px;background-position:-2765px 0px}.iti__flag.iti__kr{height:14px;background-position:-2787px 0px}.iti__flag.iti__kw{height:10px;background-position:-2809px 0px}.iti__flag.iti__ky{height:10px;background-position:-2831px 0px}.iti__flag.iti__kz{height:10px;background-position:-2853px 0px}.iti__flag.iti__la{height:14px;background-position:-2875px 0px}.iti__flag.iti__lb{height:14px;background-position:-2897px 0px}.iti__flag.iti__lc{height:10px;background-position:-2919px 0px}.iti__flag.iti__li{height:12px;background-position:-2941px 0px}.iti__flag.iti__lk{height:10px;background-position:-2963px 0px}.iti__flag.iti__lr{height:11px;background-position:-2985px 0px}.iti__flag.iti__ls{height:14px;background-position:-3007px 0px}.iti__flag.iti__lt{height:12px;background-position:-3029px 0px}.iti__flag.iti__lu{height:12px;background-position:-3051px 0px}.iti__flag.iti__lv{height:10px;background-position:-3073px 0px}.iti__flag.iti__ly{height:10px;background-position:-3095px 0px}.iti__flag.iti__ma{height:14px;background-position:-3117px 0px}.iti__flag.iti__mc{height:15px;background-position:-3139px 0px}.iti__flag.iti__md{height:10px;background-position:-3160px 0px}.iti__flag.iti__me{height:10px;background-position:-3182px 0px}.iti__flag.iti__mf{height:14px;background-position:-3204px 0px}.iti__flag.iti__mg{height:14px;background-position:-3226px 0px}.iti__flag.iti__mh{height:11px;background-position:-3248px 0px}.iti__flag.iti__mk{height:10px;background-position:-3270px 0px}.iti__flag.iti__ml{height:14px;background-position:-3292px 0px}.iti__flag.iti__mm{height:14px;background-position:-3314px 0px}.iti__flag.iti__mn{height:10px;background-position:-3336px 0px}.iti__flag.iti__mo{height:14px;background-position:-3358px 0px}.iti__flag.iti__mp{height:10px;background-position:-3380px 0px}.iti__flag.iti__mq{height:14px;background-position:-3402px 0px}.iti__flag.iti__mr{height:14px;background-position:-3424px 0px}.iti__flag.iti__ms{height:10px;background-position:-3446px 0px}.iti__flag.iti__mt{height:14px;background-position:-3468px 0px}.iti__flag.iti__mu{height:14px;background-position:-3490px 0px}.iti__flag.iti__mv{height:14px;background-position:-3512px 0px}.iti__flag.iti__mw{height:14px;background-position:-3534px 0px}.iti__flag.iti__mx{height:12px;background-position:-3556px 0px}.iti__flag.iti__my{height:10px;background-position:-3578px 0px}.iti__flag.iti__mz{height:14px;background-position:-3600px 0px}.iti__flag.iti__na{height:14px;background-position:-3622px 0px}.iti__flag.iti__nc{height:10px;background-position:-3644px 0px}.iti__flag.iti__ne{height:15px;background-position:-3666px 0px}.iti__flag.iti__nf{height:10px;background-position:-3686px 0px}.iti__flag.iti__ng{height:10px;background-position:-3708px 0px}.iti__flag.iti__ni{height:12px;background-position:-3730px 0px}.iti__flag.iti__nl{height:14px;background-position:-3752px 0px}.iti__flag.iti__no{height:15px;background-position:-3774px 0px}.iti__flag.iti__np{height:15px;background-position:-3796px 0px}.iti__flag.iti__nr{height:10px;background-position:-3811px 0px}.iti__flag.iti__nu{height:10px;background-position:-3833px 0px}.iti__flag.iti__nz{height:10px;background-position:-3855px 0px}.iti__flag.iti__om{height:10px;background-position:-3877px 0px}.iti__flag.iti__pa{height:14px;background-position:-3899px 0px}.iti__flag.iti__pe{height:14px;background-position:-3921px 0px}.iti__flag.iti__pf{height:14px;background-position:-3943px 0px}.iti__flag.iti__pg{height:15px;background-position:-3965px 0px}.iti__flag.iti__ph{height:10px;background-position:-3987px 0px}.iti__flag.iti__pk{height:14px;background-position:-4009px 0px}.iti__flag.iti__pl{height:13px;background-position:-4031px 0px}.iti__flag.iti__pm{height:14px;background-position:-4053px 0px}.iti__flag.iti__pn{height:10px;background-position:-4075px 0px}.iti__flag.iti__pr{height:14px;background-position:-4097px 0px}.iti__flag.iti__ps{height:10px;background-position:-4119px 0px}.iti__flag.iti__pt{height:14px;background-position:-4141px 0px}.iti__flag.iti__pw{height:13px;background-position:-4163px 0px}.iti__flag.iti__py{height:11px;background-position:-4185px 0px}.iti__flag.iti__qa{height:8px;background-position:-4207px 0px}.iti__flag.iti__re{height:14px;background-position:-4229px 0px}.iti__flag.iti__ro{height:14px;background-position:-4251px 0px}.iti__flag.iti__rs{height:14px;background-position:-4273px 0px}.iti__flag.iti__ru{height:14px;background-position:-4295px 0px}.iti__flag.iti__rw{height:14px;background-position:-4317px 0px}.iti__flag.iti__sa{height:14px;background-position:-4339px 0px}.iti__flag.iti__sb{height:10px;background-position:-4361px 0px}.iti__flag.iti__sc{height:10px;background-position:-4383px 0px}.iti__flag.iti__sd{height:10px;background-position:-4405px 0px}.iti__flag.iti__se{height:13px;background-position:-4427px 0px}.iti__flag.iti__sg{height:14px;background-position:-4449px 0px}.iti__flag.iti__sh{height:10px;background-position:-4471px 0px}.iti__flag.iti__si{height:10px;background-position:-4493px 0px}.iti__flag.iti__sj{height:15px;background-position:-4515px 0px}.iti__flag.iti__sk{height:14px;background-position:-4537px 0px}.iti__flag.iti__sl{height:14px;background-position:-4559px 0px}.iti__flag.iti__sm{height:15px;background-position:-4581px 0px}.iti__flag.iti__sn{height:14px;background-position:-4603px 0px}.iti__flag.iti__so{height:14px;background-position:-4625px 0px}.iti__flag.iti__sr{height:14px;background-position:-4647px 0px}.iti__flag.iti__ss{height:10px;background-position:-4669px 0px}.iti__flag.iti__st{height:10px;background-position:-4691px 0px}.iti__flag.iti__sv{height:12px;background-position:-4713px 0px}.iti__flag.iti__sx{height:14px;background-position:-4735px 0px}.iti__flag.iti__sy{height:14px;background-position:-4757px 0px}.iti__flag.iti__sz{height:14px;background-position:-4779px 0px}.iti__flag.iti__ta{height:10px;background-position:-4801px 0px}.iti__flag.iti__tc{height:10px;background-position:-4823px 0px}.iti__flag.iti__td{height:14px;background-position:-4845px 0px}.iti__flag.iti__tf{height:14px;background-position:-4867px 0px}.iti__flag.iti__tg{height:13px;background-position:-4889px 0px}.iti__flag.iti__th{height:14px;background-position:-4911px 0px}.iti__flag.iti__tj{height:10px;background-position:-4933px 0px}.iti__flag.iti__tk{height:10px;background-position:-4955px 0px}.iti__flag.iti__tl{height:10px;background-position:-4977px 0px}.iti__flag.iti__tm{height:14px;background-position:-4999px 0px}.iti__flag.iti__tn{height:14px;background-position:-5021px 0px}.iti__flag.iti__to{height:10px;background-position:-5043px 0px}.iti__flag.iti__tr{height:14px;background-position:-5065px 0px}.iti__flag.iti__tt{height:12px;background-position:-5087px 0px}.iti__flag.iti__tv{height:10px;background-position:-5109px 0px}.iti__flag.iti__tw{height:14px;background-position:-5131px 0px}.iti__flag.iti__tz{height:14px;background-position:-5153px 0px}.iti__flag.iti__ua{height:14px;background-position:-5175px 0px}.iti__flag.iti__ug{height:14px;background-position:-5197px 0px}.iti__flag.iti__um{height:11px;background-position:-5219px 0px}.iti__flag.iti__un{height:14px;background-position:-5241px 0px}.iti__flag.iti__us{height:11px;background-position:-5263px 0px}.iti__flag.iti__uy{height:14px;background-position:-5285px 0px}.iti__flag.iti__uz{height:10px;background-position:-5307px 0px}.iti__flag.iti__va{height:15px;background-position:-5329px 0px}.iti__flag.iti__vc{height:14px;background-position:-5346px 0px}.iti__flag.iti__ve{height:14px;background-position:-5368px 0px}.iti__flag.iti__vg{height:10px;background-position:-5390px 0px}.iti__flag.iti__vi{height:14px;background-position:-5412px 0px}.iti__flag.iti__vn{height:14px;background-position:-5434px 0px}.iti__flag.iti__vu{height:12px;background-position:-5456px 0px}.iti__flag.iti__wf{height:14px;background-position:-5478px 0px}.iti__flag.iti__ws{height:10px;background-position:-5500px 0px}.iti__flag.iti__xk{height:15px;background-position:-5522px 0px}.iti__flag.iti__ye{height:14px;background-position:-5544px 0px}.iti__flag.iti__yt{height:14px;background-position:-5566px 0px}.iti__flag.iti__za{height:14px;background-position:-5588px 0px}.iti__flag.iti__zm{height:14px;background-position:-5610px 0px}.iti__flag.iti__zw{height:10px;background-position:-5632px 0px}.iti__flag{height:15px;box-shadow:0 0 1px #888;background-image:url(../img/flags.png);background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag{background-image:url(../img/flags@2x.png)}}.iti__flag.iti__np{background-color:transparent}.sky-country-field-country-btn+::ng-deep .sky-form-control{border-left:none}.sky-country-field-container{width:100%}.sky-country-field-search-result-flag{display:inline-block;margin-right:5px}.sky-country-field-flag{display:none}.sky-country-field-disabled .sky-country-field-input{cursor:default;background-color:#cdcfd2}.sky-country-field-disabled .sky-country-field-flag{opacity:.65}.sky-country-field-input{cursor:text;display:flex;position:relative}.sky-country-field-input .sky-country-field-flag{align-items:center;margin-bottom:auto;margin-top:auto;position:absolute;left:13px;height:35px;bottom:0}.sky-country-field-input textarea{overflow:hidden;resize:none;white-space:nowrap}.sky-country-field-input-with-flag .sky-country-field-flag{display:flex}.sky-country-field-input-with-flag .sky-form-control{padding-left:40px}.sky-country-field-country-selected,.sky-country-field-country-default{border-bottom:1px solid #e2e3e4}:host(.ng-invalid.ng-touched) .sky-country-field-input textarea{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044;outline:none}::ng-deep .sky-theme-modern .sky-country-field-disabled .sky-country-field-flag{filter:grayscale(100%)}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input{background-color:transparent;border-radius:6px}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input textarea.sky-form-control{overflow:hidden;resize:none;white-space:nowrap}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input-with-flag .sky-country-field-flag{height:40px;left:15px;opacity:1}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input-with-flag .sky-form-control{padding-left:45px}.iti__flag{max-width:25px;max-height:13px;background-image:url(https://sky.blackbaudcdn.net/static/skyux-public-assets/1.0.0-beta.2/assets/images/intl-tel-input/flags.webp)!important}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag .iti__flag{background-image:url(https://sky.blackbaudcdn.net/static/skyux-public-assets/1.0.0-beta.2/assets/images/intl-tel-input/flags@2x.webp)!important}}\n"], components: [{ type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: SkyAutocompleteInputDirective, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1572
|
+
SkyCountryFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyCountryFieldComponent, selector: "sky-country-field", inputs: { autocompleteAttribute: "autocompleteAttribute", defaultCountry: "defaultCountry", disabled: "disabled", hideSelectedCountryFlag: "hideSelectedCountryFlag", includePhoneInfo: "includePhoneInfo", supportedCountryISOs: "supportedCountryISOs" }, outputs: { selectedCountryChange: "selectedCountryChange" }, providers: [SKY_COUNTRY_FIELD_VALIDATOR], viewQueries: [{ propertyName: "countrySearchAutocompleteDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "searchIconTemplateRef", first: true, predicate: ["searchIconTemplateRef"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <span\n class=\"sky-country-field-container\"\n [ngClass]=\"{\n 'sky-country-field-disabled': disabled\n }\"\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"inputId\"\n [data]=\"countries\"\n [propertiesToSearch]=\"['name', 'iso2']\"\n [searchResultTemplate]=\"countrySearchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n (selectionChange)=\"onCountrySelected($event)\"\n >\n <div\n class=\"sky-country-field-input\"\n [ngClass]=\"{\n 'sky-country-field-input-with-flag':\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n }\"\n >\n <div\n *ngIf=\"\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n \"\n class=\"sky-country-field-flag\"\n >\n <div\n class=\"iti__flag\"\n [ngClass]=\"'iti__' + selectedCountry.iso2.toLowerCase()\"\n ></div>\n </div>\n <textarea\n class=\"sky-form-control\"\n name=\"selectedCountry\"\n rows=\"1\"\n skyAutocomplete\n [attr.aria-label]=\"\n 'skyux_country_field_search_placeholder' | skyLibResources\n \"\n [attr.disabled]=\"disabled ? true : undefined\"\n [attr.id]=\"inputId\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [formControl]=\"countrySearchFormControl\"\n [placeholder]=\"\n currentTheme === 'default'\n ? ('skyux_country_field_search_placeholder' | skyLibResources)\n : ''\n \"\n (blur)=\"onAutocompleteBlur()\"\n ></textarea>\n </div>\n </sky-autocomplete>\n </span>\n</ng-template>\n\n<ng-template let-item=\"item\" #countrySearchResultTemplate>\n <div\n class=\"sky-country-field-search-result-flag\"\n [ngClass]=\"'iti__flag iti__' + item.iso2.toLowerCase()\"\n ></div>\n {{ item.name }}\n <span *ngIf=\"includePhoneInfo\" class=\"sky-deemphasized\">\n {{ item.dialCode }}\n </span>\n</ng-template>\n\n<!-- This template should only be used in modern theme input boxes. -->\n<ng-template #searchIconTemplateRef>\n <div class=\"sky-input-group-icon sky-input-box-icon-inset\">\n <sky-icon iconType=\"skyux\" icon=\"search\"></sky-icon>\n </div>\n</ng-template>\n", styles: [".iti{position:relative;display:inline-block}.iti *{box-sizing:border-box;-moz-box-sizing:border-box}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti input,.iti input[type=text],.iti input[type=tel]{position:relative;z-index:0;margin-top:0!important;margin-bottom:0!important;padding-right:36px;margin-right:0}.iti__flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.iti__selected-flag{z-index:1;position:relative;display:flex;align-items:center;height:100%;padding:0 6px 0 8px}.iti__arrow{margin-left:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}.iti__arrow--up{border-top:none;border-bottom:4px solid #555}.iti__country-list{position:absolute;z-index:2;list-style:none;text-align:left;padding:0;margin:0 0 0 -1px;box-shadow:1px 1px 4px #0003;background-color:#fff;border:1px solid #CCC;white-space:nowrap;max-height:200px;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti__country-list--dropup{bottom:100%;margin-bottom:-1px}@media (max-width: 500px){.iti__country-list{white-space:normal}}.iti__flag-box{display:inline-block;width:20px}.iti__divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #CCC}.iti__country{padding:5px 10px;outline:none}.iti__dial-code{color:#999}.iti__country.iti__highlight{background-color:#0000000d}.iti__flag-box,.iti__country-name,.iti__dial-code{vertical-align:middle}.iti__flag-box,.iti__country-name{margin-right:6px}.iti--allow-dropdown input,.iti--allow-dropdown input[type=text],.iti--allow-dropdown input[type=tel],.iti--separate-dial-code input,.iti--separate-dial-code input[type=text],.iti--separate-dial-code input[type=tel]{padding-right:6px;padding-left:52px;margin-left:0}.iti--allow-dropdown .iti__flag-container,.iti--separate-dial-code .iti__flag-container{right:auto;left:0}.iti--allow-dropdown .iti__flag-container:hover{cursor:pointer}.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag{background-color:#0000000d}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover{cursor:default}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover .iti__selected-flag,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover .iti__selected-flag{background-color:transparent}.iti--separate-dial-code .iti__selected-flag{background-color:#0000000d}.iti--separate-dial-code .iti__selected-dial-code{margin-left:6px}.iti--container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.iti--container:hover{cursor:pointer}.iti-mobile .iti--container{top:30px;bottom:30px;left:30px;right:30px;position:fixed}.iti-mobile .iti__country-list{max-height:100%;width:100%}.iti-mobile .iti__country{padding:10px;line-height:1.5em}.iti__flag{width:20px}.iti__flag.iti__be{width:18px}.iti__flag.iti__ch{width:15px}.iti__flag.iti__mc{width:19px}.iti__flag.iti__ne{width:18px}.iti__flag.iti__np{width:13px}.iti__flag.iti__va{width:15px}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag{background-size:5652px 15px}}.iti__flag.iti__ac{height:10px;background-position:0px 0px}.iti__flag.iti__ad{height:14px;background-position:-22px 0px}.iti__flag.iti__ae{height:10px;background-position:-44px 0px}.iti__flag.iti__af{height:14px;background-position:-66px 0px}.iti__flag.iti__ag{height:14px;background-position:-88px 0px}.iti__flag.iti__ai{height:10px;background-position:-110px 0px}.iti__flag.iti__al{height:15px;background-position:-132px 0px}.iti__flag.iti__am{height:10px;background-position:-154px 0px}.iti__flag.iti__ao{height:14px;background-position:-176px 0px}.iti__flag.iti__aq{height:14px;background-position:-198px 0px}.iti__flag.iti__ar{height:13px;background-position:-220px 0px}.iti__flag.iti__as{height:10px;background-position:-242px 0px}.iti__flag.iti__at{height:14px;background-position:-264px 0px}.iti__flag.iti__au{height:10px;background-position:-286px 0px}.iti__flag.iti__aw{height:14px;background-position:-308px 0px}.iti__flag.iti__ax{height:13px;background-position:-330px 0px}.iti__flag.iti__az{height:10px;background-position:-352px 0px}.iti__flag.iti__ba{height:10px;background-position:-374px 0px}.iti__flag.iti__bb{height:14px;background-position:-396px 0px}.iti__flag.iti__bd{height:12px;background-position:-418px 0px}.iti__flag.iti__be{height:15px;background-position:-440px 0px}.iti__flag.iti__bf{height:14px;background-position:-460px 0px}.iti__flag.iti__bg{height:12px;background-position:-482px 0px}.iti__flag.iti__bh{height:12px;background-position:-504px 0px}.iti__flag.iti__bi{height:12px;background-position:-526px 0px}.iti__flag.iti__bj{height:14px;background-position:-548px 0px}.iti__flag.iti__bl{height:14px;background-position:-570px 0px}.iti__flag.iti__bm{height:10px;background-position:-592px 0px}.iti__flag.iti__bn{height:10px;background-position:-614px 0px}.iti__flag.iti__bo{height:14px;background-position:-636px 0px}.iti__flag.iti__bq{height:14px;background-position:-658px 0px}.iti__flag.iti__br{height:14px;background-position:-680px 0px}.iti__flag.iti__bs{height:10px;background-position:-702px 0px}.iti__flag.iti__bt{height:14px;background-position:-724px 0px}.iti__flag.iti__bv{height:15px;background-position:-746px 0px}.iti__flag.iti__bw{height:14px;background-position:-768px 0px}.iti__flag.iti__by{height:10px;background-position:-790px 0px}.iti__flag.iti__bz{height:14px;background-position:-812px 0px}.iti__flag.iti__ca{height:10px;background-position:-834px 0px}.iti__flag.iti__cc{height:10px;background-position:-856px 0px}.iti__flag.iti__cd{height:15px;background-position:-878px 0px}.iti__flag.iti__cf{height:14px;background-position:-900px 0px}.iti__flag.iti__cg{height:14px;background-position:-922px 0px}.iti__flag.iti__ch{height:15px;background-position:-944px 0px}.iti__flag.iti__ci{height:14px;background-position:-961px 0px}.iti__flag.iti__ck{height:10px;background-position:-983px 0px}.iti__flag.iti__cl{height:14px;background-position:-1005px 0px}.iti__flag.iti__cm{height:14px;background-position:-1027px 0px}.iti__flag.iti__cn{height:14px;background-position:-1049px 0px}.iti__flag.iti__co{height:14px;background-position:-1071px 0px}.iti__flag.iti__cp{height:14px;background-position:-1093px 0px}.iti__flag.iti__cr{height:12px;background-position:-1115px 0px}.iti__flag.iti__cu{height:10px;background-position:-1137px 0px}.iti__flag.iti__cv{height:12px;background-position:-1159px 0px}.iti__flag.iti__cw{height:14px;background-position:-1181px 0px}.iti__flag.iti__cx{height:10px;background-position:-1203px 0px}.iti__flag.iti__cy{height:14px;background-position:-1225px 0px}.iti__flag.iti__cz{height:14px;background-position:-1247px 0px}.iti__flag.iti__de{height:12px;background-position:-1269px 0px}.iti__flag.iti__dg{height:10px;background-position:-1291px 0px}.iti__flag.iti__dj{height:14px;background-position:-1313px 0px}.iti__flag.iti__dk{height:15px;background-position:-1335px 0px}.iti__flag.iti__dm{height:10px;background-position:-1357px 0px}.iti__flag.iti__do{height:14px;background-position:-1379px 0px}.iti__flag.iti__dz{height:14px;background-position:-1401px 0px}.iti__flag.iti__ea{height:14px;background-position:-1423px 0px}.iti__flag.iti__ec{height:14px;background-position:-1445px 0px}.iti__flag.iti__ee{height:13px;background-position:-1467px 0px}.iti__flag.iti__eg{height:14px;background-position:-1489px 0px}.iti__flag.iti__eh{height:10px;background-position:-1511px 0px}.iti__flag.iti__er{height:10px;background-position:-1533px 0px}.iti__flag.iti__es{height:14px;background-position:-1555px 0px}.iti__flag.iti__et{height:10px;background-position:-1577px 0px}.iti__flag.iti__eu{height:14px;background-position:-1599px 0px}.iti__flag.iti__fi{height:12px;background-position:-1621px 0px}.iti__flag.iti__fj{height:10px;background-position:-1643px 0px}.iti__flag.iti__fk{height:10px;background-position:-1665px 0px}.iti__flag.iti__fm{height:11px;background-position:-1687px 0px}.iti__flag.iti__fo{height:15px;background-position:-1709px 0px}.iti__flag.iti__fr{height:14px;background-position:-1731px 0px}.iti__flag.iti__ga{height:15px;background-position:-1753px 0px}.iti__flag.iti__gb{height:10px;background-position:-1775px 0px}.iti__flag.iti__gd{height:12px;background-position:-1797px 0px}.iti__flag.iti__ge{height:14px;background-position:-1819px 0px}.iti__flag.iti__gf{height:14px;background-position:-1841px 0px}.iti__flag.iti__gg{height:14px;background-position:-1863px 0px}.iti__flag.iti__gh{height:14px;background-position:-1885px 0px}.iti__flag.iti__gi{height:10px;background-position:-1907px 0px}.iti__flag.iti__gl{height:14px;background-position:-1929px 0px}.iti__flag.iti__gm{height:14px;background-position:-1951px 0px}.iti__flag.iti__gn{height:14px;background-position:-1973px 0px}.iti__flag.iti__gp{height:14px;background-position:-1995px 0px}.iti__flag.iti__gq{height:14px;background-position:-2017px 0px}.iti__flag.iti__gr{height:14px;background-position:-2039px 0px}.iti__flag.iti__gs{height:10px;background-position:-2061px 0px}.iti__flag.iti__gt{height:13px;background-position:-2083px 0px}.iti__flag.iti__gu{height:11px;background-position:-2105px 0px}.iti__flag.iti__gw{height:10px;background-position:-2127px 0px}.iti__flag.iti__gy{height:12px;background-position:-2149px 0px}.iti__flag.iti__hk{height:14px;background-position:-2171px 0px}.iti__flag.iti__hm{height:10px;background-position:-2193px 0px}.iti__flag.iti__hn{height:10px;background-position:-2215px 0px}.iti__flag.iti__hr{height:10px;background-position:-2237px 0px}.iti__flag.iti__ht{height:12px;background-position:-2259px 0px}.iti__flag.iti__hu{height:10px;background-position:-2281px 0px}.iti__flag.iti__ic{height:14px;background-position:-2303px 0px}.iti__flag.iti__id{height:14px;background-position:-2325px 0px}.iti__flag.iti__ie{height:10px;background-position:-2347px 0px}.iti__flag.iti__il{height:15px;background-position:-2369px 0px}.iti__flag.iti__im{height:10px;background-position:-2391px 0px}.iti__flag.iti__in{height:14px;background-position:-2413px 0px}.iti__flag.iti__io{height:10px;background-position:-2435px 0px}.iti__flag.iti__iq{height:14px;background-position:-2457px 0px}.iti__flag.iti__ir{height:12px;background-position:-2479px 0px}.iti__flag.iti__is{height:15px;background-position:-2501px 0px}.iti__flag.iti__it{height:14px;background-position:-2523px 0px}.iti__flag.iti__je{height:12px;background-position:-2545px 0px}.iti__flag.iti__jm{height:10px;background-position:-2567px 0px}.iti__flag.iti__jo{height:10px;background-position:-2589px 0px}.iti__flag.iti__jp{height:14px;background-position:-2611px 0px}.iti__flag.iti__ke{height:14px;background-position:-2633px 0px}.iti__flag.iti__kg{height:12px;background-position:-2655px 0px}.iti__flag.iti__kh{height:13px;background-position:-2677px 0px}.iti__flag.iti__ki{height:10px;background-position:-2699px 0px}.iti__flag.iti__km{height:12px;background-position:-2721px 0px}.iti__flag.iti__kn{height:14px;background-position:-2743px 0px}.iti__flag.iti__kp{height:10px;background-position:-2765px 0px}.iti__flag.iti__kr{height:14px;background-position:-2787px 0px}.iti__flag.iti__kw{height:10px;background-position:-2809px 0px}.iti__flag.iti__ky{height:10px;background-position:-2831px 0px}.iti__flag.iti__kz{height:10px;background-position:-2853px 0px}.iti__flag.iti__la{height:14px;background-position:-2875px 0px}.iti__flag.iti__lb{height:14px;background-position:-2897px 0px}.iti__flag.iti__lc{height:10px;background-position:-2919px 0px}.iti__flag.iti__li{height:12px;background-position:-2941px 0px}.iti__flag.iti__lk{height:10px;background-position:-2963px 0px}.iti__flag.iti__lr{height:11px;background-position:-2985px 0px}.iti__flag.iti__ls{height:14px;background-position:-3007px 0px}.iti__flag.iti__lt{height:12px;background-position:-3029px 0px}.iti__flag.iti__lu{height:12px;background-position:-3051px 0px}.iti__flag.iti__lv{height:10px;background-position:-3073px 0px}.iti__flag.iti__ly{height:10px;background-position:-3095px 0px}.iti__flag.iti__ma{height:14px;background-position:-3117px 0px}.iti__flag.iti__mc{height:15px;background-position:-3139px 0px}.iti__flag.iti__md{height:10px;background-position:-3160px 0px}.iti__flag.iti__me{height:10px;background-position:-3182px 0px}.iti__flag.iti__mf{height:14px;background-position:-3204px 0px}.iti__flag.iti__mg{height:14px;background-position:-3226px 0px}.iti__flag.iti__mh{height:11px;background-position:-3248px 0px}.iti__flag.iti__mk{height:10px;background-position:-3270px 0px}.iti__flag.iti__ml{height:14px;background-position:-3292px 0px}.iti__flag.iti__mm{height:14px;background-position:-3314px 0px}.iti__flag.iti__mn{height:10px;background-position:-3336px 0px}.iti__flag.iti__mo{height:14px;background-position:-3358px 0px}.iti__flag.iti__mp{height:10px;background-position:-3380px 0px}.iti__flag.iti__mq{height:14px;background-position:-3402px 0px}.iti__flag.iti__mr{height:14px;background-position:-3424px 0px}.iti__flag.iti__ms{height:10px;background-position:-3446px 0px}.iti__flag.iti__mt{height:14px;background-position:-3468px 0px}.iti__flag.iti__mu{height:14px;background-position:-3490px 0px}.iti__flag.iti__mv{height:14px;background-position:-3512px 0px}.iti__flag.iti__mw{height:14px;background-position:-3534px 0px}.iti__flag.iti__mx{height:12px;background-position:-3556px 0px}.iti__flag.iti__my{height:10px;background-position:-3578px 0px}.iti__flag.iti__mz{height:14px;background-position:-3600px 0px}.iti__flag.iti__na{height:14px;background-position:-3622px 0px}.iti__flag.iti__nc{height:10px;background-position:-3644px 0px}.iti__flag.iti__ne{height:15px;background-position:-3666px 0px}.iti__flag.iti__nf{height:10px;background-position:-3686px 0px}.iti__flag.iti__ng{height:10px;background-position:-3708px 0px}.iti__flag.iti__ni{height:12px;background-position:-3730px 0px}.iti__flag.iti__nl{height:14px;background-position:-3752px 0px}.iti__flag.iti__no{height:15px;background-position:-3774px 0px}.iti__flag.iti__np{height:15px;background-position:-3796px 0px}.iti__flag.iti__nr{height:10px;background-position:-3811px 0px}.iti__flag.iti__nu{height:10px;background-position:-3833px 0px}.iti__flag.iti__nz{height:10px;background-position:-3855px 0px}.iti__flag.iti__om{height:10px;background-position:-3877px 0px}.iti__flag.iti__pa{height:14px;background-position:-3899px 0px}.iti__flag.iti__pe{height:14px;background-position:-3921px 0px}.iti__flag.iti__pf{height:14px;background-position:-3943px 0px}.iti__flag.iti__pg{height:15px;background-position:-3965px 0px}.iti__flag.iti__ph{height:10px;background-position:-3987px 0px}.iti__flag.iti__pk{height:14px;background-position:-4009px 0px}.iti__flag.iti__pl{height:13px;background-position:-4031px 0px}.iti__flag.iti__pm{height:14px;background-position:-4053px 0px}.iti__flag.iti__pn{height:10px;background-position:-4075px 0px}.iti__flag.iti__pr{height:14px;background-position:-4097px 0px}.iti__flag.iti__ps{height:10px;background-position:-4119px 0px}.iti__flag.iti__pt{height:14px;background-position:-4141px 0px}.iti__flag.iti__pw{height:13px;background-position:-4163px 0px}.iti__flag.iti__py{height:11px;background-position:-4185px 0px}.iti__flag.iti__qa{height:8px;background-position:-4207px 0px}.iti__flag.iti__re{height:14px;background-position:-4229px 0px}.iti__flag.iti__ro{height:14px;background-position:-4251px 0px}.iti__flag.iti__rs{height:14px;background-position:-4273px 0px}.iti__flag.iti__ru{height:14px;background-position:-4295px 0px}.iti__flag.iti__rw{height:14px;background-position:-4317px 0px}.iti__flag.iti__sa{height:14px;background-position:-4339px 0px}.iti__flag.iti__sb{height:10px;background-position:-4361px 0px}.iti__flag.iti__sc{height:10px;background-position:-4383px 0px}.iti__flag.iti__sd{height:10px;background-position:-4405px 0px}.iti__flag.iti__se{height:13px;background-position:-4427px 0px}.iti__flag.iti__sg{height:14px;background-position:-4449px 0px}.iti__flag.iti__sh{height:10px;background-position:-4471px 0px}.iti__flag.iti__si{height:10px;background-position:-4493px 0px}.iti__flag.iti__sj{height:15px;background-position:-4515px 0px}.iti__flag.iti__sk{height:14px;background-position:-4537px 0px}.iti__flag.iti__sl{height:14px;background-position:-4559px 0px}.iti__flag.iti__sm{height:15px;background-position:-4581px 0px}.iti__flag.iti__sn{height:14px;background-position:-4603px 0px}.iti__flag.iti__so{height:14px;background-position:-4625px 0px}.iti__flag.iti__sr{height:14px;background-position:-4647px 0px}.iti__flag.iti__ss{height:10px;background-position:-4669px 0px}.iti__flag.iti__st{height:10px;background-position:-4691px 0px}.iti__flag.iti__sv{height:12px;background-position:-4713px 0px}.iti__flag.iti__sx{height:14px;background-position:-4735px 0px}.iti__flag.iti__sy{height:14px;background-position:-4757px 0px}.iti__flag.iti__sz{height:14px;background-position:-4779px 0px}.iti__flag.iti__ta{height:10px;background-position:-4801px 0px}.iti__flag.iti__tc{height:10px;background-position:-4823px 0px}.iti__flag.iti__td{height:14px;background-position:-4845px 0px}.iti__flag.iti__tf{height:14px;background-position:-4867px 0px}.iti__flag.iti__tg{height:13px;background-position:-4889px 0px}.iti__flag.iti__th{height:14px;background-position:-4911px 0px}.iti__flag.iti__tj{height:10px;background-position:-4933px 0px}.iti__flag.iti__tk{height:10px;background-position:-4955px 0px}.iti__flag.iti__tl{height:10px;background-position:-4977px 0px}.iti__flag.iti__tm{height:14px;background-position:-4999px 0px}.iti__flag.iti__tn{height:14px;background-position:-5021px 0px}.iti__flag.iti__to{height:10px;background-position:-5043px 0px}.iti__flag.iti__tr{height:14px;background-position:-5065px 0px}.iti__flag.iti__tt{height:12px;background-position:-5087px 0px}.iti__flag.iti__tv{height:10px;background-position:-5109px 0px}.iti__flag.iti__tw{height:14px;background-position:-5131px 0px}.iti__flag.iti__tz{height:14px;background-position:-5153px 0px}.iti__flag.iti__ua{height:14px;background-position:-5175px 0px}.iti__flag.iti__ug{height:14px;background-position:-5197px 0px}.iti__flag.iti__um{height:11px;background-position:-5219px 0px}.iti__flag.iti__un{height:14px;background-position:-5241px 0px}.iti__flag.iti__us{height:11px;background-position:-5263px 0px}.iti__flag.iti__uy{height:14px;background-position:-5285px 0px}.iti__flag.iti__uz{height:10px;background-position:-5307px 0px}.iti__flag.iti__va{height:15px;background-position:-5329px 0px}.iti__flag.iti__vc{height:14px;background-position:-5346px 0px}.iti__flag.iti__ve{height:14px;background-position:-5368px 0px}.iti__flag.iti__vg{height:10px;background-position:-5390px 0px}.iti__flag.iti__vi{height:14px;background-position:-5412px 0px}.iti__flag.iti__vn{height:14px;background-position:-5434px 0px}.iti__flag.iti__vu{height:12px;background-position:-5456px 0px}.iti__flag.iti__wf{height:14px;background-position:-5478px 0px}.iti__flag.iti__ws{height:10px;background-position:-5500px 0px}.iti__flag.iti__xk{height:15px;background-position:-5522px 0px}.iti__flag.iti__ye{height:14px;background-position:-5544px 0px}.iti__flag.iti__yt{height:14px;background-position:-5566px 0px}.iti__flag.iti__za{height:14px;background-position:-5588px 0px}.iti__flag.iti__zm{height:14px;background-position:-5610px 0px}.iti__flag.iti__zw{height:10px;background-position:-5632px 0px}.iti__flag{height:15px;box-shadow:0 0 1px #888;background-image:url(../img/flags.png);background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag{background-image:url(../img/flags@2x.png)}}.iti__flag.iti__np{background-color:transparent}.sky-country-field-country-btn+::ng-deep .sky-form-control{border-left:none}.sky-country-field-container{width:100%}.sky-country-field-search-result-flag{display:inline-block;margin-right:5px}.sky-country-field-flag{display:none}.sky-country-field-disabled .sky-country-field-input{cursor:default;background-color:#cdcfd2}.sky-country-field-disabled .sky-country-field-flag{opacity:.65}.sky-country-field-input{cursor:text;display:flex;position:relative}.sky-country-field-input .sky-country-field-flag{align-items:center;margin-bottom:auto;margin-top:auto;position:absolute;left:13px;height:35px;bottom:0}.sky-country-field-input textarea{overflow:hidden;resize:none;white-space:nowrap}.sky-country-field-input-with-flag .sky-country-field-flag{display:flex}.sky-country-field-input-with-flag .sky-form-control{padding-left:40px}.sky-country-field-country-selected,.sky-country-field-country-default{border-bottom:1px solid #e2e3e4}:host(.ng-invalid.ng-touched) .sky-country-field-input textarea{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044;outline:none}::ng-deep .sky-theme-modern .sky-country-field-disabled .sky-country-field-flag{filter:grayscale(100%)}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input{background-color:transparent;border-radius:6px}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input textarea.sky-form-control{overflow:hidden;resize:none;white-space:nowrap}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input-with-flag .sky-country-field-flag{height:40px;left:15px;opacity:1}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input-with-flag .sky-form-control{padding-left:45px}.iti__flag{max-width:25px;max-height:13px;background-image:url(https://sky.blackbaudcdn.net/static/skyux-public-assets/1.0.0-beta.2/assets/images/intl-tel-input/flags.webp)!important}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag .iti__flag{background-image:url(https://sky.blackbaudcdn.net/static/skyux-public-assets/1.0.0-beta.2/assets/images/intl-tel-input/flags@2x.webp)!important}}\n"], components: [{ type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: SkyAutocompleteInputDirective, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1556
1573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyCountryFieldComponent, decorators: [{
|
|
1557
1574
|
type: Component,
|
|
1558
1575
|
args: [{ selector: 'sky-country-field', providers: [SKY_COUNTRY_FIELD_VALIDATOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <span\n class=\"sky-country-field-container\"\n [ngClass]=\"{\n 'sky-country-field-disabled': disabled\n }\"\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"inputId\"\n [data]=\"countries\"\n [propertiesToSearch]=\"['name', 'iso2']\"\n [searchResultTemplate]=\"countrySearchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n (selectionChange)=\"onCountrySelected($event)\"\n >\n <div\n class=\"sky-country-field-input\"\n [ngClass]=\"{\n 'sky-country-field-input-with-flag':\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n }\"\n >\n <div\n *ngIf=\"\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n \"\n class=\"sky-country-field-flag\"\n >\n <div\n class=\"iti__flag\"\n [ngClass]=\"'iti__' + selectedCountry.iso2.toLowerCase()\"\n ></div>\n </div>\n <textarea\n class=\"sky-form-control\"\n name=\"selectedCountry\"\n rows=\"1\"\n skyAutocomplete\n [attr.aria-label]=\"\n 'skyux_country_field_search_placeholder' | skyLibResources\n \"\n [attr.disabled]=\"disabled ? true : undefined\"\n [attr.id]=\"inputId\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [formControl]=\"countrySearchFormControl\"\n [placeholder]=\"\n currentTheme === 'default'\n ? ('skyux_country_field_search_placeholder' | skyLibResources)\n : ''\n \"\n (blur)=\"onAutocompleteBlur()\"\n ></textarea>\n </div>\n </sky-autocomplete>\n </span>\n</ng-template>\n\n<ng-template let-item=\"item\" #countrySearchResultTemplate>\n <div\n class=\"sky-country-field-search-result-flag\"\n [ngClass]=\"'iti__flag iti__' + item.iso2.toLowerCase()\"\n ></div>\n {{ item.name }}\n <span *ngIf=\"includePhoneInfo\" class=\"sky-deemphasized\">\n {{ item.dialCode }}\n </span>\n</ng-template>\n\n<!-- This template should only be used in modern theme input boxes. -->\n<ng-template #searchIconTemplateRef>\n <div class=\"sky-input-group-icon sky-input-box-icon-inset\">\n <sky-icon iconType=\"skyux\" icon=\"search\"></sky-icon>\n </div>\n</ng-template>\n", styles: [".iti{position:relative;display:inline-block}.iti *{box-sizing:border-box;-moz-box-sizing:border-box}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti input,.iti input[type=text],.iti input[type=tel]{position:relative;z-index:0;margin-top:0!important;margin-bottom:0!important;padding-right:36px;margin-right:0}.iti__flag-container{position:absolute;top:0;bottom:0;right:0;padding:1px}.iti__selected-flag{z-index:1;position:relative;display:flex;align-items:center;height:100%;padding:0 6px 0 8px}.iti__arrow{margin-left:6px;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #555}.iti__arrow--up{border-top:none;border-bottom:4px solid #555}.iti__country-list{position:absolute;z-index:2;list-style:none;text-align:left;padding:0;margin:0 0 0 -1px;box-shadow:1px 1px 4px #0003;background-color:#fff;border:1px solid #CCC;white-space:nowrap;max-height:200px;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti__country-list--dropup{bottom:100%;margin-bottom:-1px}@media (max-width: 500px){.iti__country-list{white-space:normal}}.iti__flag-box{display:inline-block;width:20px}.iti__divider{padding-bottom:5px;margin-bottom:5px;border-bottom:1px solid #CCC}.iti__country{padding:5px 10px;outline:none}.iti__dial-code{color:#999}.iti__country.iti__highlight{background-color:#0000000d}.iti__flag-box,.iti__country-name,.iti__dial-code{vertical-align:middle}.iti__flag-box,.iti__country-name{margin-right:6px}.iti--allow-dropdown input,.iti--allow-dropdown input[type=text],.iti--allow-dropdown input[type=tel],.iti--separate-dial-code input,.iti--separate-dial-code input[type=text],.iti--separate-dial-code input[type=tel]{padding-right:6px;padding-left:52px;margin-left:0}.iti--allow-dropdown .iti__flag-container,.iti--separate-dial-code .iti__flag-container{right:auto;left:0}.iti--allow-dropdown .iti__flag-container:hover{cursor:pointer}.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag{background-color:#0000000d}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover{cursor:default}.iti--allow-dropdown input[disabled]+.iti__flag-container:hover .iti__selected-flag,.iti--allow-dropdown input[readonly]+.iti__flag-container:hover .iti__selected-flag{background-color:transparent}.iti--separate-dial-code .iti__selected-flag{background-color:#0000000d}.iti--separate-dial-code .iti__selected-dial-code{margin-left:6px}.iti--container{position:absolute;top:-1000px;left:-1000px;z-index:1060;padding:1px}.iti--container:hover{cursor:pointer}.iti-mobile .iti--container{top:30px;bottom:30px;left:30px;right:30px;position:fixed}.iti-mobile .iti__country-list{max-height:100%;width:100%}.iti-mobile .iti__country{padding:10px;line-height:1.5em}.iti__flag{width:20px}.iti__flag.iti__be{width:18px}.iti__flag.iti__ch{width:15px}.iti__flag.iti__mc{width:19px}.iti__flag.iti__ne{width:18px}.iti__flag.iti__np{width:13px}.iti__flag.iti__va{width:15px}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag{background-size:5652px 15px}}.iti__flag.iti__ac{height:10px;background-position:0px 0px}.iti__flag.iti__ad{height:14px;background-position:-22px 0px}.iti__flag.iti__ae{height:10px;background-position:-44px 0px}.iti__flag.iti__af{height:14px;background-position:-66px 0px}.iti__flag.iti__ag{height:14px;background-position:-88px 0px}.iti__flag.iti__ai{height:10px;background-position:-110px 0px}.iti__flag.iti__al{height:15px;background-position:-132px 0px}.iti__flag.iti__am{height:10px;background-position:-154px 0px}.iti__flag.iti__ao{height:14px;background-position:-176px 0px}.iti__flag.iti__aq{height:14px;background-position:-198px 0px}.iti__flag.iti__ar{height:13px;background-position:-220px 0px}.iti__flag.iti__as{height:10px;background-position:-242px 0px}.iti__flag.iti__at{height:14px;background-position:-264px 0px}.iti__flag.iti__au{height:10px;background-position:-286px 0px}.iti__flag.iti__aw{height:14px;background-position:-308px 0px}.iti__flag.iti__ax{height:13px;background-position:-330px 0px}.iti__flag.iti__az{height:10px;background-position:-352px 0px}.iti__flag.iti__ba{height:10px;background-position:-374px 0px}.iti__flag.iti__bb{height:14px;background-position:-396px 0px}.iti__flag.iti__bd{height:12px;background-position:-418px 0px}.iti__flag.iti__be{height:15px;background-position:-440px 0px}.iti__flag.iti__bf{height:14px;background-position:-460px 0px}.iti__flag.iti__bg{height:12px;background-position:-482px 0px}.iti__flag.iti__bh{height:12px;background-position:-504px 0px}.iti__flag.iti__bi{height:12px;background-position:-526px 0px}.iti__flag.iti__bj{height:14px;background-position:-548px 0px}.iti__flag.iti__bl{height:14px;background-position:-570px 0px}.iti__flag.iti__bm{height:10px;background-position:-592px 0px}.iti__flag.iti__bn{height:10px;background-position:-614px 0px}.iti__flag.iti__bo{height:14px;background-position:-636px 0px}.iti__flag.iti__bq{height:14px;background-position:-658px 0px}.iti__flag.iti__br{height:14px;background-position:-680px 0px}.iti__flag.iti__bs{height:10px;background-position:-702px 0px}.iti__flag.iti__bt{height:14px;background-position:-724px 0px}.iti__flag.iti__bv{height:15px;background-position:-746px 0px}.iti__flag.iti__bw{height:14px;background-position:-768px 0px}.iti__flag.iti__by{height:10px;background-position:-790px 0px}.iti__flag.iti__bz{height:14px;background-position:-812px 0px}.iti__flag.iti__ca{height:10px;background-position:-834px 0px}.iti__flag.iti__cc{height:10px;background-position:-856px 0px}.iti__flag.iti__cd{height:15px;background-position:-878px 0px}.iti__flag.iti__cf{height:14px;background-position:-900px 0px}.iti__flag.iti__cg{height:14px;background-position:-922px 0px}.iti__flag.iti__ch{height:15px;background-position:-944px 0px}.iti__flag.iti__ci{height:14px;background-position:-961px 0px}.iti__flag.iti__ck{height:10px;background-position:-983px 0px}.iti__flag.iti__cl{height:14px;background-position:-1005px 0px}.iti__flag.iti__cm{height:14px;background-position:-1027px 0px}.iti__flag.iti__cn{height:14px;background-position:-1049px 0px}.iti__flag.iti__co{height:14px;background-position:-1071px 0px}.iti__flag.iti__cp{height:14px;background-position:-1093px 0px}.iti__flag.iti__cr{height:12px;background-position:-1115px 0px}.iti__flag.iti__cu{height:10px;background-position:-1137px 0px}.iti__flag.iti__cv{height:12px;background-position:-1159px 0px}.iti__flag.iti__cw{height:14px;background-position:-1181px 0px}.iti__flag.iti__cx{height:10px;background-position:-1203px 0px}.iti__flag.iti__cy{height:14px;background-position:-1225px 0px}.iti__flag.iti__cz{height:14px;background-position:-1247px 0px}.iti__flag.iti__de{height:12px;background-position:-1269px 0px}.iti__flag.iti__dg{height:10px;background-position:-1291px 0px}.iti__flag.iti__dj{height:14px;background-position:-1313px 0px}.iti__flag.iti__dk{height:15px;background-position:-1335px 0px}.iti__flag.iti__dm{height:10px;background-position:-1357px 0px}.iti__flag.iti__do{height:14px;background-position:-1379px 0px}.iti__flag.iti__dz{height:14px;background-position:-1401px 0px}.iti__flag.iti__ea{height:14px;background-position:-1423px 0px}.iti__flag.iti__ec{height:14px;background-position:-1445px 0px}.iti__flag.iti__ee{height:13px;background-position:-1467px 0px}.iti__flag.iti__eg{height:14px;background-position:-1489px 0px}.iti__flag.iti__eh{height:10px;background-position:-1511px 0px}.iti__flag.iti__er{height:10px;background-position:-1533px 0px}.iti__flag.iti__es{height:14px;background-position:-1555px 0px}.iti__flag.iti__et{height:10px;background-position:-1577px 0px}.iti__flag.iti__eu{height:14px;background-position:-1599px 0px}.iti__flag.iti__fi{height:12px;background-position:-1621px 0px}.iti__flag.iti__fj{height:10px;background-position:-1643px 0px}.iti__flag.iti__fk{height:10px;background-position:-1665px 0px}.iti__flag.iti__fm{height:11px;background-position:-1687px 0px}.iti__flag.iti__fo{height:15px;background-position:-1709px 0px}.iti__flag.iti__fr{height:14px;background-position:-1731px 0px}.iti__flag.iti__ga{height:15px;background-position:-1753px 0px}.iti__flag.iti__gb{height:10px;background-position:-1775px 0px}.iti__flag.iti__gd{height:12px;background-position:-1797px 0px}.iti__flag.iti__ge{height:14px;background-position:-1819px 0px}.iti__flag.iti__gf{height:14px;background-position:-1841px 0px}.iti__flag.iti__gg{height:14px;background-position:-1863px 0px}.iti__flag.iti__gh{height:14px;background-position:-1885px 0px}.iti__flag.iti__gi{height:10px;background-position:-1907px 0px}.iti__flag.iti__gl{height:14px;background-position:-1929px 0px}.iti__flag.iti__gm{height:14px;background-position:-1951px 0px}.iti__flag.iti__gn{height:14px;background-position:-1973px 0px}.iti__flag.iti__gp{height:14px;background-position:-1995px 0px}.iti__flag.iti__gq{height:14px;background-position:-2017px 0px}.iti__flag.iti__gr{height:14px;background-position:-2039px 0px}.iti__flag.iti__gs{height:10px;background-position:-2061px 0px}.iti__flag.iti__gt{height:13px;background-position:-2083px 0px}.iti__flag.iti__gu{height:11px;background-position:-2105px 0px}.iti__flag.iti__gw{height:10px;background-position:-2127px 0px}.iti__flag.iti__gy{height:12px;background-position:-2149px 0px}.iti__flag.iti__hk{height:14px;background-position:-2171px 0px}.iti__flag.iti__hm{height:10px;background-position:-2193px 0px}.iti__flag.iti__hn{height:10px;background-position:-2215px 0px}.iti__flag.iti__hr{height:10px;background-position:-2237px 0px}.iti__flag.iti__ht{height:12px;background-position:-2259px 0px}.iti__flag.iti__hu{height:10px;background-position:-2281px 0px}.iti__flag.iti__ic{height:14px;background-position:-2303px 0px}.iti__flag.iti__id{height:14px;background-position:-2325px 0px}.iti__flag.iti__ie{height:10px;background-position:-2347px 0px}.iti__flag.iti__il{height:15px;background-position:-2369px 0px}.iti__flag.iti__im{height:10px;background-position:-2391px 0px}.iti__flag.iti__in{height:14px;background-position:-2413px 0px}.iti__flag.iti__io{height:10px;background-position:-2435px 0px}.iti__flag.iti__iq{height:14px;background-position:-2457px 0px}.iti__flag.iti__ir{height:12px;background-position:-2479px 0px}.iti__flag.iti__is{height:15px;background-position:-2501px 0px}.iti__flag.iti__it{height:14px;background-position:-2523px 0px}.iti__flag.iti__je{height:12px;background-position:-2545px 0px}.iti__flag.iti__jm{height:10px;background-position:-2567px 0px}.iti__flag.iti__jo{height:10px;background-position:-2589px 0px}.iti__flag.iti__jp{height:14px;background-position:-2611px 0px}.iti__flag.iti__ke{height:14px;background-position:-2633px 0px}.iti__flag.iti__kg{height:12px;background-position:-2655px 0px}.iti__flag.iti__kh{height:13px;background-position:-2677px 0px}.iti__flag.iti__ki{height:10px;background-position:-2699px 0px}.iti__flag.iti__km{height:12px;background-position:-2721px 0px}.iti__flag.iti__kn{height:14px;background-position:-2743px 0px}.iti__flag.iti__kp{height:10px;background-position:-2765px 0px}.iti__flag.iti__kr{height:14px;background-position:-2787px 0px}.iti__flag.iti__kw{height:10px;background-position:-2809px 0px}.iti__flag.iti__ky{height:10px;background-position:-2831px 0px}.iti__flag.iti__kz{height:10px;background-position:-2853px 0px}.iti__flag.iti__la{height:14px;background-position:-2875px 0px}.iti__flag.iti__lb{height:14px;background-position:-2897px 0px}.iti__flag.iti__lc{height:10px;background-position:-2919px 0px}.iti__flag.iti__li{height:12px;background-position:-2941px 0px}.iti__flag.iti__lk{height:10px;background-position:-2963px 0px}.iti__flag.iti__lr{height:11px;background-position:-2985px 0px}.iti__flag.iti__ls{height:14px;background-position:-3007px 0px}.iti__flag.iti__lt{height:12px;background-position:-3029px 0px}.iti__flag.iti__lu{height:12px;background-position:-3051px 0px}.iti__flag.iti__lv{height:10px;background-position:-3073px 0px}.iti__flag.iti__ly{height:10px;background-position:-3095px 0px}.iti__flag.iti__ma{height:14px;background-position:-3117px 0px}.iti__flag.iti__mc{height:15px;background-position:-3139px 0px}.iti__flag.iti__md{height:10px;background-position:-3160px 0px}.iti__flag.iti__me{height:10px;background-position:-3182px 0px}.iti__flag.iti__mf{height:14px;background-position:-3204px 0px}.iti__flag.iti__mg{height:14px;background-position:-3226px 0px}.iti__flag.iti__mh{height:11px;background-position:-3248px 0px}.iti__flag.iti__mk{height:10px;background-position:-3270px 0px}.iti__flag.iti__ml{height:14px;background-position:-3292px 0px}.iti__flag.iti__mm{height:14px;background-position:-3314px 0px}.iti__flag.iti__mn{height:10px;background-position:-3336px 0px}.iti__flag.iti__mo{height:14px;background-position:-3358px 0px}.iti__flag.iti__mp{height:10px;background-position:-3380px 0px}.iti__flag.iti__mq{height:14px;background-position:-3402px 0px}.iti__flag.iti__mr{height:14px;background-position:-3424px 0px}.iti__flag.iti__ms{height:10px;background-position:-3446px 0px}.iti__flag.iti__mt{height:14px;background-position:-3468px 0px}.iti__flag.iti__mu{height:14px;background-position:-3490px 0px}.iti__flag.iti__mv{height:14px;background-position:-3512px 0px}.iti__flag.iti__mw{height:14px;background-position:-3534px 0px}.iti__flag.iti__mx{height:12px;background-position:-3556px 0px}.iti__flag.iti__my{height:10px;background-position:-3578px 0px}.iti__flag.iti__mz{height:14px;background-position:-3600px 0px}.iti__flag.iti__na{height:14px;background-position:-3622px 0px}.iti__flag.iti__nc{height:10px;background-position:-3644px 0px}.iti__flag.iti__ne{height:15px;background-position:-3666px 0px}.iti__flag.iti__nf{height:10px;background-position:-3686px 0px}.iti__flag.iti__ng{height:10px;background-position:-3708px 0px}.iti__flag.iti__ni{height:12px;background-position:-3730px 0px}.iti__flag.iti__nl{height:14px;background-position:-3752px 0px}.iti__flag.iti__no{height:15px;background-position:-3774px 0px}.iti__flag.iti__np{height:15px;background-position:-3796px 0px}.iti__flag.iti__nr{height:10px;background-position:-3811px 0px}.iti__flag.iti__nu{height:10px;background-position:-3833px 0px}.iti__flag.iti__nz{height:10px;background-position:-3855px 0px}.iti__flag.iti__om{height:10px;background-position:-3877px 0px}.iti__flag.iti__pa{height:14px;background-position:-3899px 0px}.iti__flag.iti__pe{height:14px;background-position:-3921px 0px}.iti__flag.iti__pf{height:14px;background-position:-3943px 0px}.iti__flag.iti__pg{height:15px;background-position:-3965px 0px}.iti__flag.iti__ph{height:10px;background-position:-3987px 0px}.iti__flag.iti__pk{height:14px;background-position:-4009px 0px}.iti__flag.iti__pl{height:13px;background-position:-4031px 0px}.iti__flag.iti__pm{height:14px;background-position:-4053px 0px}.iti__flag.iti__pn{height:10px;background-position:-4075px 0px}.iti__flag.iti__pr{height:14px;background-position:-4097px 0px}.iti__flag.iti__ps{height:10px;background-position:-4119px 0px}.iti__flag.iti__pt{height:14px;background-position:-4141px 0px}.iti__flag.iti__pw{height:13px;background-position:-4163px 0px}.iti__flag.iti__py{height:11px;background-position:-4185px 0px}.iti__flag.iti__qa{height:8px;background-position:-4207px 0px}.iti__flag.iti__re{height:14px;background-position:-4229px 0px}.iti__flag.iti__ro{height:14px;background-position:-4251px 0px}.iti__flag.iti__rs{height:14px;background-position:-4273px 0px}.iti__flag.iti__ru{height:14px;background-position:-4295px 0px}.iti__flag.iti__rw{height:14px;background-position:-4317px 0px}.iti__flag.iti__sa{height:14px;background-position:-4339px 0px}.iti__flag.iti__sb{height:10px;background-position:-4361px 0px}.iti__flag.iti__sc{height:10px;background-position:-4383px 0px}.iti__flag.iti__sd{height:10px;background-position:-4405px 0px}.iti__flag.iti__se{height:13px;background-position:-4427px 0px}.iti__flag.iti__sg{height:14px;background-position:-4449px 0px}.iti__flag.iti__sh{height:10px;background-position:-4471px 0px}.iti__flag.iti__si{height:10px;background-position:-4493px 0px}.iti__flag.iti__sj{height:15px;background-position:-4515px 0px}.iti__flag.iti__sk{height:14px;background-position:-4537px 0px}.iti__flag.iti__sl{height:14px;background-position:-4559px 0px}.iti__flag.iti__sm{height:15px;background-position:-4581px 0px}.iti__flag.iti__sn{height:14px;background-position:-4603px 0px}.iti__flag.iti__so{height:14px;background-position:-4625px 0px}.iti__flag.iti__sr{height:14px;background-position:-4647px 0px}.iti__flag.iti__ss{height:10px;background-position:-4669px 0px}.iti__flag.iti__st{height:10px;background-position:-4691px 0px}.iti__flag.iti__sv{height:12px;background-position:-4713px 0px}.iti__flag.iti__sx{height:14px;background-position:-4735px 0px}.iti__flag.iti__sy{height:14px;background-position:-4757px 0px}.iti__flag.iti__sz{height:14px;background-position:-4779px 0px}.iti__flag.iti__ta{height:10px;background-position:-4801px 0px}.iti__flag.iti__tc{height:10px;background-position:-4823px 0px}.iti__flag.iti__td{height:14px;background-position:-4845px 0px}.iti__flag.iti__tf{height:14px;background-position:-4867px 0px}.iti__flag.iti__tg{height:13px;background-position:-4889px 0px}.iti__flag.iti__th{height:14px;background-position:-4911px 0px}.iti__flag.iti__tj{height:10px;background-position:-4933px 0px}.iti__flag.iti__tk{height:10px;background-position:-4955px 0px}.iti__flag.iti__tl{height:10px;background-position:-4977px 0px}.iti__flag.iti__tm{height:14px;background-position:-4999px 0px}.iti__flag.iti__tn{height:14px;background-position:-5021px 0px}.iti__flag.iti__to{height:10px;background-position:-5043px 0px}.iti__flag.iti__tr{height:14px;background-position:-5065px 0px}.iti__flag.iti__tt{height:12px;background-position:-5087px 0px}.iti__flag.iti__tv{height:10px;background-position:-5109px 0px}.iti__flag.iti__tw{height:14px;background-position:-5131px 0px}.iti__flag.iti__tz{height:14px;background-position:-5153px 0px}.iti__flag.iti__ua{height:14px;background-position:-5175px 0px}.iti__flag.iti__ug{height:14px;background-position:-5197px 0px}.iti__flag.iti__um{height:11px;background-position:-5219px 0px}.iti__flag.iti__un{height:14px;background-position:-5241px 0px}.iti__flag.iti__us{height:11px;background-position:-5263px 0px}.iti__flag.iti__uy{height:14px;background-position:-5285px 0px}.iti__flag.iti__uz{height:10px;background-position:-5307px 0px}.iti__flag.iti__va{height:15px;background-position:-5329px 0px}.iti__flag.iti__vc{height:14px;background-position:-5346px 0px}.iti__flag.iti__ve{height:14px;background-position:-5368px 0px}.iti__flag.iti__vg{height:10px;background-position:-5390px 0px}.iti__flag.iti__vi{height:14px;background-position:-5412px 0px}.iti__flag.iti__vn{height:14px;background-position:-5434px 0px}.iti__flag.iti__vu{height:12px;background-position:-5456px 0px}.iti__flag.iti__wf{height:14px;background-position:-5478px 0px}.iti__flag.iti__ws{height:10px;background-position:-5500px 0px}.iti__flag.iti__xk{height:15px;background-position:-5522px 0px}.iti__flag.iti__ye{height:14px;background-position:-5544px 0px}.iti__flag.iti__yt{height:14px;background-position:-5566px 0px}.iti__flag.iti__za{height:14px;background-position:-5588px 0px}.iti__flag.iti__zm{height:14px;background-position:-5610px 0px}.iti__flag.iti__zw{height:10px;background-position:-5632px 0px}.iti__flag{height:15px;box-shadow:0 0 1px #888;background-image:url(../img/flags.png);background-repeat:no-repeat;background-color:#dbdbdb;background-position:20px 0}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag{background-image:url(../img/flags@2x.png)}}.iti__flag.iti__np{background-color:transparent}.sky-country-field-country-btn+::ng-deep .sky-form-control{border-left:none}.sky-country-field-container{width:100%}.sky-country-field-search-result-flag{display:inline-block;margin-right:5px}.sky-country-field-flag{display:none}.sky-country-field-disabled .sky-country-field-input{cursor:default;background-color:#cdcfd2}.sky-country-field-disabled .sky-country-field-flag{opacity:.65}.sky-country-field-input{cursor:text;display:flex;position:relative}.sky-country-field-input .sky-country-field-flag{align-items:center;margin-bottom:auto;margin-top:auto;position:absolute;left:13px;height:35px;bottom:0}.sky-country-field-input textarea{overflow:hidden;resize:none;white-space:nowrap}.sky-country-field-input-with-flag .sky-country-field-flag{display:flex}.sky-country-field-input-with-flag .sky-form-control{padding-left:40px}.sky-country-field-country-selected,.sky-country-field-country-default{border-bottom:1px solid #e2e3e4}:host(.ng-invalid.ng-touched) .sky-country-field-input textarea{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044;outline:none}::ng-deep .sky-theme-modern .sky-country-field-disabled .sky-country-field-flag{filter:grayscale(100%)}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input{background-color:transparent;border-radius:6px}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input textarea.sky-form-control{overflow:hidden;resize:none;white-space:nowrap}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input-with-flag .sky-country-field-flag{height:40px;left:15px;opacity:1}::ng-deep .sky-theme-modern .sky-input-box .sky-form-group .sky-country-field-input-with-flag .sky-form-control{padding-left:45px}.iti__flag{max-width:25px;max-height:13px;background-image:url(https://sky.blackbaudcdn.net/static/skyux-public-assets/1.0.0-beta.2/assets/images/intl-tel-input/flags.webp)!important}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){.iti__flag .iti__flag{background-image:url(https://sky.blackbaudcdn.net/static/skyux-public-assets/1.0.0-beta.2/assets/images/intl-tel-input/flags@2x.webp)!important}}\n"] }]
|
|
@@ -1632,49 +1649,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1632
1649
|
}]
|
|
1633
1650
|
}] });
|
|
1634
1651
|
|
|
1652
|
+
var _SkySearchAdapterService_instances, _SkySearchAdapterService_renderer, _SkySearchAdapterService_getInputContainerEl, _SkySearchAdapterService_getSearchOpenButtonEl, _SkySearchAdapterService_getSearchContainerEl, _SkySearchAdapterService_getInputEl;
|
|
1635
1653
|
/**
|
|
1636
1654
|
* @internal
|
|
1637
1655
|
*/
|
|
1638
1656
|
class SkySearchAdapterService {
|
|
1639
1657
|
constructor(renderer) {
|
|
1640
|
-
this
|
|
1658
|
+
_SkySearchAdapterService_instances.add(this);
|
|
1659
|
+
_SkySearchAdapterService_renderer.set(this, void 0);
|
|
1660
|
+
__classPrivateFieldSet(this, _SkySearchAdapterService_renderer, renderer, "f");
|
|
1641
1661
|
}
|
|
1642
1662
|
selectInput(searchEl) {
|
|
1643
|
-
this.
|
|
1663
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputEl).call(this, searchEl).select();
|
|
1644
1664
|
}
|
|
1645
1665
|
focusInput(searchEl) {
|
|
1646
|
-
this.
|
|
1666
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputEl).call(this, searchEl).focus();
|
|
1647
1667
|
}
|
|
1648
1668
|
startInputAnimation(searchEl) {
|
|
1649
|
-
const buttonWidth = this.
|
|
1650
|
-
const offsetWidth = this.
|
|
1669
|
+
const buttonWidth = __classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getSearchOpenButtonEl).call(this, searchEl).clientWidth;
|
|
1670
|
+
const offsetWidth = __classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getSearchContainerEl).call(this, searchEl).offsetLeft;
|
|
1651
1671
|
const minWidth = buttonWidth + offsetWidth;
|
|
1652
|
-
this.
|
|
1672
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputContainerEl).call(this, searchEl).style.minWidth =
|
|
1653
1673
|
minWidth.toString() + 'px';
|
|
1654
|
-
this.
|
|
1674
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_renderer, "f").setStyle(__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputContainerEl).call(this, searchEl), 'min-width', minWidth.toString() + 'px');
|
|
1655
1675
|
}
|
|
1656
1676
|
endInputAnimation(searchEl) {
|
|
1657
|
-
this.
|
|
1658
|
-
}
|
|
1659
|
-
getInputContainerEl(searchEl) {
|
|
1660
|
-
return searchEl.nativeElement.querySelector('.sky-search-input-container');
|
|
1661
|
-
}
|
|
1662
|
-
getSearchOpenButtonEl(searchEl) {
|
|
1663
|
-
return searchEl.nativeElement.querySelector('.sky-search-btn-open');
|
|
1664
|
-
}
|
|
1665
|
-
getSearchContainerEl(searchEl) {
|
|
1666
|
-
return searchEl.nativeElement.querySelector('.sky-search-container');
|
|
1667
|
-
}
|
|
1668
|
-
getInputEl(searchEl) {
|
|
1669
|
-
return searchEl.nativeElement.querySelector('input');
|
|
1677
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_renderer, "f").setStyle(__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputContainerEl).call(this, searchEl), 'min-width', '');
|
|
1670
1678
|
}
|
|
1671
1679
|
}
|
|
1680
|
+
_SkySearchAdapterService_renderer = new WeakMap(), _SkySearchAdapterService_instances = new WeakSet(), _SkySearchAdapterService_getInputContainerEl = function _SkySearchAdapterService_getInputContainerEl(searchEl) {
|
|
1681
|
+
return searchEl.nativeElement.querySelector('.sky-search-input-container');
|
|
1682
|
+
}, _SkySearchAdapterService_getSearchOpenButtonEl = function _SkySearchAdapterService_getSearchOpenButtonEl(searchEl) {
|
|
1683
|
+
return searchEl.nativeElement.querySelector('.sky-search-btn-open');
|
|
1684
|
+
}, _SkySearchAdapterService_getSearchContainerEl = function _SkySearchAdapterService_getSearchContainerEl(searchEl) {
|
|
1685
|
+
return searchEl.nativeElement.querySelector('.sky-search-container');
|
|
1686
|
+
}, _SkySearchAdapterService_getInputEl = function _SkySearchAdapterService_getInputEl(searchEl) {
|
|
1687
|
+
return searchEl.nativeElement.querySelector('input');
|
|
1688
|
+
};
|
|
1672
1689
|
SkySearchAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkySearchAdapterService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1673
1690
|
SkySearchAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkySearchAdapterService });
|
|
1674
1691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkySearchAdapterService, decorators: [{
|
|
1675
1692
|
type: Injectable
|
|
1676
1693
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
1677
1694
|
|
|
1695
|
+
var _SkySearchComponent_instances, _SkySearchComponent_changeRef, _SkySearchComponent_elRef, _SkySearchComponent_mediaQueryService, _SkySearchComponent_searchAdapter, _SkySearchComponent_searchUpdated, _SkySearchComponent_searchBindingChanged, _SkySearchComponent_expandModeBindingChanged, _SkySearchComponent_shouldOpenInput, _SkySearchComponent_mediaQueryCallback, _SkySearchComponent_searchShouldCollapse;
|
|
1678
1696
|
const INPUT_SHOWN_STATE = 'inputShown';
|
|
1679
1697
|
const INPUT_HIDDEN_STATE = 'inputHidden';
|
|
1680
1698
|
const EXPAND_MODE_RESPONSIVE = 'responsive';
|
|
@@ -1682,10 +1700,7 @@ const EXPAND_MODE_FIT = 'fit';
|
|
|
1682
1700
|
const EXPAND_MODE_NONE = 'none';
|
|
1683
1701
|
class SkySearchComponent {
|
|
1684
1702
|
constructor(mediaQueryService, elRef, searchAdapter, changeRef) {
|
|
1685
|
-
this
|
|
1686
|
-
this.elRef = elRef;
|
|
1687
|
-
this.searchAdapter = searchAdapter;
|
|
1688
|
-
this.changeRef = changeRef;
|
|
1703
|
+
_SkySearchComponent_instances.add(this);
|
|
1689
1704
|
/**
|
|
1690
1705
|
* Fires when the search text is applied.
|
|
1691
1706
|
*/
|
|
@@ -1708,31 +1723,37 @@ class SkySearchComponent {
|
|
|
1708
1723
|
this.expandMode = EXPAND_MODE_RESPONSIVE;
|
|
1709
1724
|
/**
|
|
1710
1725
|
* Specifies how many milliseconds to wait before searching after users enter text in the search input.
|
|
1711
|
-
* @default 0
|
|
1712
1726
|
*/
|
|
1713
1727
|
this.debounceTime = 0;
|
|
1714
1728
|
/**
|
|
1715
1729
|
* Indicates whether to disable the filter button.
|
|
1716
|
-
* @default false
|
|
1717
1730
|
*/
|
|
1718
1731
|
this.disabled = false;
|
|
1719
|
-
this.
|
|
1720
|
-
this.
|
|
1732
|
+
this.clearButtonShown = false;
|
|
1733
|
+
this.dismissButtonShown = false;
|
|
1721
1734
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1722
|
-
this.
|
|
1735
|
+
this.isCollapsible = true;
|
|
1736
|
+
this.isFullWidth = false;
|
|
1723
1737
|
this.mobileSearchShown = false;
|
|
1724
|
-
this.
|
|
1725
|
-
this
|
|
1726
|
-
this
|
|
1738
|
+
this.searchButtonShown = false;
|
|
1739
|
+
_SkySearchComponent_changeRef.set(this, void 0);
|
|
1740
|
+
_SkySearchComponent_elRef.set(this, void 0);
|
|
1741
|
+
_SkySearchComponent_mediaQueryService.set(this, void 0);
|
|
1742
|
+
_SkySearchComponent_searchAdapter.set(this, void 0);
|
|
1743
|
+
_SkySearchComponent_searchUpdated.set(this, new Subject());
|
|
1744
|
+
__classPrivateFieldSet(this, _SkySearchComponent_mediaQueryService, mediaQueryService, "f");
|
|
1745
|
+
__classPrivateFieldSet(this, _SkySearchComponent_elRef, elRef, "f");
|
|
1746
|
+
__classPrivateFieldSet(this, _SkySearchComponent_searchAdapter, searchAdapter, "f");
|
|
1747
|
+
__classPrivateFieldSet(this, _SkySearchComponent_changeRef, changeRef, "f");
|
|
1727
1748
|
}
|
|
1728
1749
|
ngOnInit() {
|
|
1729
|
-
if (this.
|
|
1730
|
-
this.breakpointSubscription = this.
|
|
1731
|
-
this.
|
|
1732
|
-
this.
|
|
1750
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1751
|
+
this.breakpointSubscription = __classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").subscribe((args) => {
|
|
1752
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_mediaQueryCallback).call(this, args);
|
|
1753
|
+
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").detectChanges();
|
|
1733
1754
|
});
|
|
1734
1755
|
}
|
|
1735
|
-
this
|
|
1756
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f")
|
|
1736
1757
|
.asObservable()
|
|
1737
1758
|
.pipe(debounceTime(this.debounceTime), distinctUntilChanged())
|
|
1738
1759
|
.subscribe((value) => {
|
|
@@ -1740,7 +1761,7 @@ class SkySearchComponent {
|
|
|
1740
1761
|
});
|
|
1741
1762
|
}
|
|
1742
1763
|
ngOnChanges(changes) {
|
|
1743
|
-
if (this.
|
|
1764
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_expandModeBindingChanged).call(this, changes)) {
|
|
1744
1765
|
switch (this.expandMode) {
|
|
1745
1766
|
case EXPAND_MODE_NONE:
|
|
1746
1767
|
this.isCollapsible = false;
|
|
@@ -1756,18 +1777,18 @@ class SkySearchComponent {
|
|
|
1756
1777
|
break;
|
|
1757
1778
|
}
|
|
1758
1779
|
}
|
|
1759
|
-
if (this.
|
|
1760
|
-
this.clearButtonShown = this.searchText && this.searchText !== '';
|
|
1761
|
-
if (this.
|
|
1780
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchBindingChanged).call(this, changes)) {
|
|
1781
|
+
this.clearButtonShown = !!(this.searchText && this.searchText !== '');
|
|
1782
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_shouldOpenInput).call(this)) {
|
|
1762
1783
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1763
1784
|
}
|
|
1764
1785
|
}
|
|
1765
|
-
this.
|
|
1786
|
+
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").detectChanges();
|
|
1766
1787
|
}
|
|
1767
1788
|
clearSearchText() {
|
|
1768
1789
|
this.searchText = '';
|
|
1769
1790
|
this.clearButtonShown = false;
|
|
1770
|
-
this.
|
|
1791
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").focusInput(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1771
1792
|
this.searchChange.emit(this.searchText);
|
|
1772
1793
|
this.searchApply.emit(this.searchText);
|
|
1773
1794
|
this.searchClear.emit();
|
|
@@ -1785,18 +1806,18 @@ class SkySearchComponent {
|
|
|
1785
1806
|
if (searchText !== this.searchText) {
|
|
1786
1807
|
this.searchText = searchText;
|
|
1787
1808
|
}
|
|
1788
|
-
this.clearButtonShown = searchText && searchText !== '';
|
|
1809
|
+
this.clearButtonShown = !!(searchText && searchText !== '');
|
|
1789
1810
|
if (searchText && searchText !== '') {
|
|
1790
|
-
this.
|
|
1811
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").selectInput(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1791
1812
|
}
|
|
1792
1813
|
this.searchApply.emit(searchText);
|
|
1793
1814
|
}
|
|
1794
1815
|
searchTextChanged(searchText) {
|
|
1795
1816
|
this.searchText = searchText;
|
|
1796
|
-
this.
|
|
1817
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f").next(searchText);
|
|
1797
1818
|
}
|
|
1798
1819
|
toggleSearchInput(showInput) {
|
|
1799
|
-
if (this.
|
|
1820
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1800
1821
|
if (showInput) {
|
|
1801
1822
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1802
1823
|
}
|
|
@@ -1806,24 +1827,24 @@ class SkySearchComponent {
|
|
|
1806
1827
|
}
|
|
1807
1828
|
}
|
|
1808
1829
|
inputAnimationStart(event) {
|
|
1809
|
-
if (this.
|
|
1810
|
-
this.
|
|
1830
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1831
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").startInputAnimation(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1811
1832
|
if (event.toState === INPUT_SHOWN_STATE &&
|
|
1812
|
-
this.
|
|
1833
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs) {
|
|
1813
1834
|
this.mobileSearchShown = true;
|
|
1814
1835
|
this.searchButtonShown = false;
|
|
1815
1836
|
}
|
|
1816
1837
|
}
|
|
1817
1838
|
}
|
|
1818
1839
|
inputAnimationEnd(event) {
|
|
1819
|
-
if (this.
|
|
1820
|
-
this.
|
|
1840
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1841
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").endInputAnimation(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1821
1842
|
this.searchButtonShown =
|
|
1822
1843
|
event.toState === INPUT_HIDDEN_STATE &&
|
|
1823
|
-
this.
|
|
1844
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs;
|
|
1824
1845
|
if ((event.toState === INPUT_HIDDEN_STATE &&
|
|
1825
|
-
this.
|
|
1826
|
-
this.
|
|
1846
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs) ||
|
|
1847
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current !== SkyMediaBreakpoints.xs) {
|
|
1827
1848
|
this.mobileSearchShown = false;
|
|
1828
1849
|
}
|
|
1829
1850
|
}
|
|
@@ -1832,42 +1853,38 @@ class SkySearchComponent {
|
|
|
1832
1853
|
if (this.breakpointSubscription) {
|
|
1833
1854
|
this.breakpointSubscription.unsubscribe();
|
|
1834
1855
|
}
|
|
1835
|
-
this.
|
|
1836
|
-
}
|
|
1837
|
-
searchBindingChanged(changes) {
|
|
1838
|
-
return (changes['searchText'] &&
|
|
1839
|
-
changes['searchText'].previousValue !== changes['searchText'].currentValue);
|
|
1840
|
-
}
|
|
1841
|
-
expandModeBindingChanged(changes) {
|
|
1842
|
-
return (changes['expandMode'] &&
|
|
1843
|
-
changes['expandMode'].previousValue !== changes['expandMode'].currentValue);
|
|
1856
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f").complete();
|
|
1844
1857
|
}
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1858
|
+
}
|
|
1859
|
+
_SkySearchComponent_changeRef = new WeakMap(), _SkySearchComponent_elRef = new WeakMap(), _SkySearchComponent_mediaQueryService = new WeakMap(), _SkySearchComponent_searchAdapter = new WeakMap(), _SkySearchComponent_searchUpdated = new WeakMap(), _SkySearchComponent_instances = new WeakSet(), _SkySearchComponent_searchBindingChanged = function _SkySearchComponent_searchBindingChanged(changes) {
|
|
1860
|
+
return (changes['searchText'] &&
|
|
1861
|
+
changes['searchText'].previousValue !== changes['searchText'].currentValue);
|
|
1862
|
+
}, _SkySearchComponent_expandModeBindingChanged = function _SkySearchComponent_expandModeBindingChanged(changes) {
|
|
1863
|
+
return (changes['expandMode'] &&
|
|
1864
|
+
changes['expandMode'].previousValue !== changes['expandMode'].currentValue);
|
|
1865
|
+
}, _SkySearchComponent_shouldOpenInput = function _SkySearchComponent_shouldOpenInput() {
|
|
1866
|
+
return (this.searchText !== '' &&
|
|
1867
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs &&
|
|
1868
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this));
|
|
1869
|
+
}, _SkySearchComponent_mediaQueryCallback = function _SkySearchComponent_mediaQueryCallback(args) {
|
|
1870
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1871
|
+
if (args === SkyMediaBreakpoints.xs) {
|
|
1872
|
+
this.inputAnimate = INPUT_HIDDEN_STATE;
|
|
1873
|
+
}
|
|
1874
|
+
else if (this.inputAnimate !== INPUT_SHOWN_STATE) {
|
|
1875
|
+
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1876
|
+
}
|
|
1877
|
+
else {
|
|
1878
|
+
this.mobileSearchShown = false;
|
|
1861
1879
|
}
|
|
1862
|
-
this.changeRef.markForCheck();
|
|
1863
|
-
}
|
|
1864
|
-
searchShouldCollapse() {
|
|
1865
|
-
return ((this.isCollapsible || this.isCollapsible === undefined) &&
|
|
1866
|
-
this.isFullWidth !== true);
|
|
1867
1880
|
}
|
|
1868
|
-
|
|
1881
|
+
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").markForCheck();
|
|
1882
|
+
}, _SkySearchComponent_searchShouldCollapse = function _SkySearchComponent_searchShouldCollapse() {
|
|
1883
|
+
return ((this.isCollapsible || this.isCollapsible === undefined) &&
|
|
1884
|
+
this.isFullWidth !== true);
|
|
1885
|
+
};
|
|
1869
1886
|
SkySearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkySearchComponent, deps: [{ token: i1.SkyMediaQueryService }, { token: i0.ElementRef }, { token: SkySearchAdapterService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1870
|
-
SkySearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkySearchComponent, selector: "sky-search", inputs: { searchText: "searchText", expandMode: "expandMode", debounceTime: "debounceTime", disabled: "disabled", placeholderText: "placeholderText" }, outputs: { searchApply: "searchApply", searchChange: "searchChange", searchClear: "searchClear" }, providers: [SkySearchAdapterService], usesOnChanges: true, ngImport: i0, template: "<div class=\"sky-search-container\">\n <div class=\"sky-search-button-container\">\n <button\n class=\"sky-btn sky-btn-default sky-btn-icon sky-search-btn-open\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_search_open' | skyLibResources\"\n [hidden]=\"!searchButtonShown\"\n [ngClass]=\"{ 'sky-search-btn-open-applied': clearButtonShown }\"\n (click)=\"toggleSearchInput(true)\"\n >\n <ng-container *ngTemplateOutlet=\"searchIconTemplate\"></ng-container>\n </button>\n </div>\n <div\n class=\"sky-search-dismiss-container\"\n [hidden]=\"searchButtonShown\"\n [ngClass]=\"{\n 'sky-search-dismiss-absolute': mobileSearchShown || isFullWidth\n }\"\n >\n <div class=\"sky-search-item-input\">\n <div\n class=\"sky-search-input-container\"\n [@inputState]=\"inputAnimate\"\n (@inputState.start)=\"inputAnimationStart($event)\"\n (@inputState.done)=\"inputAnimationEnd($event)\"\n [ngClass]=\"{\n 'sky-search-input-container-has-value': searchText?.trim()\n }\"\n >\n <sky-input-box>\n <input\n class=\"sky-form-control sky-search-input sky-rounded-corners\"\n type=\"text\"\n [attr.aria-label]=\"'skyux_search_label' | skyLibResources\"\n [attr.placeholder]=\"\n placeholderText || ('skyux_search_placeholder' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n [ngModel]=\"searchText\"\n (keyup)=\"enterPress($event, searchText)\"\n (ngModelChange)=\"searchTextChanged($event)\"\n skyId\n #searchInput=\"skyId\"\n />\n <span\n class=\"sky-input-group-btn sky-input-group-clear sky-input-box-btn-inset\"\n [hidden]=\"!clearButtonShown\"\n >\n <button\n aria-hidden=\"true\"\n class=\"sky-btn sky-btn-default sky-search-btn sky-search-btn-clear\"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"disabled\"\n (click)=\"clearSearchText()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"times\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"close\"\n iconType=\"skyux\"\n size=\"sm\"\n ></sky-icon>\n </button>\n </span>\n <span\n *skyThemeIf=\"'default'\"\n class=\"sky-input-group-btn sky-input-box-btn-inset\"\n >\n <button\n class=\"sky-btn sky-btn-default sky-search-btn sky-search-btn-apply\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_search_label' | skyLibResources\"\n [disabled]=\"disabled\"\n (click)=\"applySearchText(searchText)\"\n >\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplate\"\n ></ng-container>\n </button>\n </span>\n <div\n *skyThemeIf=\"'modern'\"\n aria-hidden=\"true\"\n class=\"sky-input-group-icon sky-input-box-icon-inset-left\"\n >\n <ng-container *ngTemplateOutlet=\"searchIconTemplate\"></ng-container>\n </div>\n </sky-input-box>\n </div>\n </div>\n <div class=\"sky-search-item-dismiss\">\n <button\n *ngIf=\"mobileSearchShown\"\n class=\"sky-btn sky-btn-secondary sky-search-btn-dismiss\"\n type=\"button\"\n [attr.title]=\"'skyux_search_dismiss' | skyLibResources\"\n (click)=\"toggleSearchInput(false)\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"chevron-circle-left\" size=\"lg\">\n </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"double-chevron-left\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </button>\n </div>\n </div>\n</div>\n\n<ng-template #searchIconTemplate>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"search\" size=\"lg\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"search\"\n iconType=\"skyux\"\n size=\"lg\"\n ></sky-icon>\n</ng-template>\n", styles: ["sky-search .sky-search-container .sky-form-group{margin-bottom:0}sky-search .sky-search-input{border-top-right-radius:0;border-bottom-right-radius:0;border-right:0 none}sky-search .sky-search-input:focus{border:0 none;box-shadow:none;outline:none}sky-search .sky-search-input::-ms-clear{display:none}sky-search .sky-search-btn{border-left:0 none}sky-search .sky-search-btn:hover,sky-search .sky-search-btn:focus{background-color:#fff}sky-search .sky-search-btn-apply{padding-left:6px;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-search .sky-search-btn-clear{border-right:0 none;padding-right:6px;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2}sky-search .sky-search-input-focused .sky-search-btn{border-color:transparent;border-top:0 none;border-bottom:0 none}sky-search .sky-search-input-focused .sky-search-btn-apply{border-right:0 none}sky-search .sky-search-input-container .sky-input-group-btn>button:focus{z-index:3}sky-search .sky-search-input-container{min-width:auto}sky-search .sky-responsive-container-xs .sky-search-input-container,sky-search .sky-responsive-container-sm .sky-search-input-container,sky-search .sky-responsive-container-md .sky-search-input-container,sky-search .sky-responsive-container-lg .sky-search-input-container{min-width:auto}@media (min-width: 768px){sky-search .sky-search-input-container{min-width:300px}}sky-search .sky-responsive-container-sm .sky-search-input-container,sky-search .sky-responsive-container-md .sky-search-input-container,sky-search .sky-responsive-container-lg .sky-search-input-container{min-width:300px}@media (max-width: 767px){sky-search .sky-search-input,sky-search .sky-search-btn-apply,sky-search .sky-search-btn-clear{font-size:15px}}sky-search .sky-search-btn-open-applied.sky-search-btn-open,sky-search .sky-search-btn-open-applied.sky-search-btn-open:hover{color:#72bf44;border:2px solid #72bf44;padding:5px 11px}sky-search .sky-search-dismiss-container{display:flex}sky-search .sky-search-item-dismiss{flex-shrink:0;display:flex}sky-search .sky-search-item-dismiss>.sky-btn{border-color:transparent}sky-search .sky-search-item-input{flex-grow:1;display:flex}sky-search .sky-search-dismiss-absolute{align-items:center;position:absolute;background-color:#fff;top:0;left:0;bottom:0;right:0;padding:5px}.sky-theme-modern sky-search .sky-input-box .sky-input-group-btn .sky-btn.sky-search-btn{width:40px}.sky-theme-modern sky-search .sky-input-box .sky-input-group-btn .sky-btn.sky-search-btn .sky-icon.sky-i-close{color:#1c1d1f;font-size:inherit}.sky-theme-modern sky-search .sky-search-btn-open-applied.sky-search-btn-open,.sky-theme-modern sky-search .sky-search-btn-open-applied.sky-search-btn-open:hover{border:none;box-shadow:inset 0 0 0 2px #72bf44;padding:8px 14px}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container.sky-search-input-container-has-value .sky-input-box-group-form-control:not(.sky-input-box-group-form-control-focus,:hover) .sky-form-group{border:none;border-radius:unset;box-shadow:inset 0 -1px #1870b8}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 10px}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-group-icon .sky-icon{font-size:17.3333px;color:#1c1d1f}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group{box-shadow:none}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group .sky-input-box-form-group-inner input{flex-basis:auto;width:auto;padding:10px 10px 10px 0;margin:0}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group .sky-input-box-form-group-inner input::placeholder{font-style:normal;color:inherit;font-weight:400}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group .sky-input-box-form-group-inner input:focus::placeholder{color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-search-dismiss-absolute{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-search-btn-open-applied.sky-search-btn-open,.sky-theme-modern.sky-theme-mode-dark .sky-search-btn-open-applied.sky-search-btn-open:hover{color:#72bf44}.sky-theme-modern.sky-theme-mode-dark sky-search .sky-input-box .sky-input-group-btn .sky-btn.sky-search-btn .sky-icon.sky-i-close{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark sky-search .sky-input-group-icon .sky-icon{font-size:17.333px;color:#fbfcfe}\n"], components: [{ type: i6.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe }, animations: [
|
|
1887
|
+
SkySearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkySearchComponent, selector: "sky-search", inputs: { searchText: "searchText", expandMode: "expandMode", debounceTime: "debounceTime", disabled: "disabled", placeholderText: "placeholderText" }, outputs: { searchApply: "searchApply", searchChange: "searchChange", searchClear: "searchClear" }, providers: [SkySearchAdapterService], usesOnChanges: true, ngImport: i0, template: "<div class=\"sky-search-container\">\n <div class=\"sky-search-button-container\">\n <button\n class=\"sky-btn sky-btn-default sky-btn-icon sky-search-btn-open\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_search_open' | skyLibResources\"\n [hidden]=\"!searchButtonShown\"\n [ngClass]=\"{ 'sky-search-btn-open-applied': clearButtonShown }\"\n (click)=\"toggleSearchInput(true)\"\n >\n <ng-container *ngTemplateOutlet=\"searchIconTemplate\"></ng-container>\n </button>\n </div>\n <div\n class=\"sky-search-dismiss-container\"\n [hidden]=\"searchButtonShown\"\n [ngClass]=\"{\n 'sky-search-dismiss-absolute': mobileSearchShown || isFullWidth\n }\"\n >\n <div class=\"sky-search-item-input\">\n <div\n class=\"sky-search-input-container\"\n [@inputState]=\"inputAnimate\"\n (@inputState.start)=\"inputAnimationStart($event)\"\n (@inputState.done)=\"inputAnimationEnd($event)\"\n [ngClass]=\"{\n 'sky-search-input-container-has-value': searchText?.trim()\n }\"\n >\n <sky-input-box>\n <input\n class=\"sky-form-control sky-search-input sky-rounded-corners\"\n type=\"text\"\n [attr.aria-label]=\"'skyux_search_label' | skyLibResources\"\n [attr.placeholder]=\"\n placeholderText || ('skyux_search_placeholder' | skyLibResources)\n \"\n [disabled]=\"disabled\"\n [ngModel]=\"searchText\"\n (keyup)=\"enterPress($event, searchText)\"\n (ngModelChange)=\"searchTextChanged($event)\"\n skyId\n #searchInput=\"skyId\"\n />\n <span\n class=\"sky-input-group-btn sky-input-group-clear sky-input-box-btn-inset\"\n [hidden]=\"!clearButtonShown\"\n >\n <button\n aria-hidden=\"true\"\n class=\"sky-btn sky-btn-default sky-search-btn sky-search-btn-clear\"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"disabled\"\n (click)=\"clearSearchText()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"times\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"close\"\n iconType=\"skyux\"\n size=\"sm\"\n ></sky-icon>\n </button>\n </span>\n <span\n *skyThemeIf=\"'default'\"\n class=\"sky-input-group-btn sky-input-box-btn-inset\"\n >\n <button\n class=\"sky-btn sky-btn-default sky-search-btn sky-search-btn-apply\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_search_label' | skyLibResources\"\n [disabled]=\"disabled\"\n (click)=\"applySearchText(searchText)\"\n >\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplate\"\n ></ng-container>\n </button>\n </span>\n <div\n *skyThemeIf=\"'modern'\"\n aria-hidden=\"true\"\n class=\"sky-input-group-icon sky-input-box-icon-inset-left\"\n >\n <ng-container *ngTemplateOutlet=\"searchIconTemplate\"></ng-container>\n </div>\n </sky-input-box>\n </div>\n </div>\n <div class=\"sky-search-item-dismiss\">\n <button\n *ngIf=\"mobileSearchShown\"\n class=\"sky-btn sky-btn-secondary sky-search-btn-dismiss\"\n type=\"button\"\n [attr.title]=\"'skyux_search_dismiss' | skyLibResources\"\n (click)=\"toggleSearchInput(false)\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"chevron-circle-left\" size=\"lg\">\n </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"double-chevron-left\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </button>\n </div>\n </div>\n</div>\n\n<ng-template #searchIconTemplate>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"search\" size=\"lg\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"search\"\n iconType=\"skyux\"\n size=\"lg\"\n ></sky-icon>\n</ng-template>\n", styles: ["sky-search .sky-search-container .sky-form-group{margin-bottom:0}sky-search .sky-search-input{border-top-right-radius:0;border-bottom-right-radius:0;border-right:0 none}sky-search .sky-search-input:focus{border:0 none;box-shadow:none;outline:none}sky-search .sky-search-input::-ms-clear{display:none}sky-search .sky-search-btn{border-left:0 none}sky-search .sky-search-btn:hover,sky-search .sky-search-btn:focus{background-color:#fff}sky-search .sky-search-btn-apply{padding-left:6px;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-right:1px solid #cdcfd2}sky-search .sky-search-btn-clear{border-right:0 none;padding-right:6px;border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2}sky-search .sky-search-input-focused .sky-search-btn{border-color:transparent;border-top:0 none;border-bottom:0 none}sky-search .sky-search-input-focused .sky-search-btn-apply{border-right:0 none}sky-search .sky-search-input-container .sky-input-group-btn>button:focus{z-index:3}sky-search .sky-search-input-container{min-width:auto}sky-search .sky-responsive-container-xs .sky-search-input-container,sky-search .sky-responsive-container-sm .sky-search-input-container,sky-search .sky-responsive-container-md .sky-search-input-container,sky-search .sky-responsive-container-lg .sky-search-input-container{min-width:auto}@media (min-width: 768px){sky-search .sky-search-input-container{min-width:300px}}sky-search .sky-responsive-container-sm .sky-search-input-container,sky-search .sky-responsive-container-md .sky-search-input-container,sky-search .sky-responsive-container-lg .sky-search-input-container{min-width:300px}@media (max-width: 767px){sky-search .sky-search-input,sky-search .sky-search-btn-apply,sky-search .sky-search-btn-clear{font-size:15px}}sky-search .sky-search-btn-open-applied.sky-search-btn-open,sky-search .sky-search-btn-open-applied.sky-search-btn-open:hover{color:#72bf44;border:2px solid #72bf44;padding:5px 11px}sky-search .sky-search-dismiss-container{display:flex}sky-search .sky-search-item-dismiss{flex-shrink:0;display:flex}sky-search .sky-search-item-dismiss>.sky-btn{border-color:transparent}sky-search .sky-search-item-input{flex-grow:1;display:flex}sky-search .sky-search-dismiss-absolute{align-items:center;position:absolute;background-color:#fff;top:0;left:0;bottom:0;right:0;padding:5px}.sky-theme-modern sky-search .sky-input-box .sky-input-group-btn .sky-btn.sky-search-btn{width:40px}.sky-theme-modern sky-search .sky-input-box .sky-input-group-btn .sky-btn.sky-search-btn .sky-icon.sky-i-close{color:#1c1d1f;font-size:inherit}.sky-theme-modern sky-search .sky-search-btn-open-applied.sky-search-btn-open,.sky-theme-modern sky-search .sky-search-btn-open-applied.sky-search-btn-open:hover{border:none;box-shadow:inset 0 0 0 2px #72bf44;padding:8px 14px}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container.sky-search-input-container-has-value .sky-input-box-group-form-control:not(.sky-input-box-group-form-control-focus,:hover) .sky-form-group{border:none;border-radius:unset;box-shadow:inset 0 -1px #1870b8}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-icon-inset-left-wrapper .sky-input-box-icon-inset-left{padding:0 10px}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-group-icon .sky-icon{font-size:17.3333px;color:#1c1d1f}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group{box-shadow:none}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group .sky-input-box-form-group-inner input{flex-basis:auto;width:auto;padding:10px 10px 10px 0;margin:0}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group .sky-input-box-form-group-inner input::placeholder{font-style:normal;color:inherit;font-weight:400}.sky-theme-modern sky-search .sky-search-container .sky-search-input-container .sky-input-box-group .sky-form-group .sky-input-box-form-group-inner input:focus::placeholder{color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-search-dismiss-absolute{background-color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-search-btn-open-applied.sky-search-btn-open,.sky-theme-modern.sky-theme-mode-dark .sky-search-btn-open-applied.sky-search-btn-open:hover{color:#72bf44}.sky-theme-modern.sky-theme-mode-dark sky-search .sky-input-box .sky-input-group-btn .sky-btn.sky-search-btn .sky-icon.sky-i-close{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark sky-search .sky-input-group-icon .sky-icon{font-size:17.333px;color:#fbfcfe}\n"], components: [{ type: i6.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe }, animations: [
|
|
1871
1888
|
trigger('inputState', [
|
|
1872
1889
|
state(INPUT_HIDDEN_STATE, style({
|
|
1873
1890
|
opacity: 0,
|
|
@@ -1970,6 +1987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1970
1987
|
class SkyLookupShowMoreNativePickerAsyncContext {
|
|
1971
1988
|
}
|
|
1972
1989
|
|
|
1990
|
+
var _SkyLookupShowMoreAsyncModalComponent_instances, _SkyLookupShowMoreAsyncModalComponent_changeDetector, _SkyLookupShowMoreAsyncModalComponent_continuationData, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, _SkyLookupShowMoreAsyncModalComponent_offset, _SkyLookupShowMoreAsyncModalComponent_loadSearchResults, _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap, _SkyLookupShowMoreAsyncModalComponent_performSearch, _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch;
|
|
1973
1991
|
/**
|
|
1974
1992
|
* @internal
|
|
1975
1993
|
* Internal component to implement the native picker.
|
|
@@ -1978,29 +1996,37 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
1978
1996
|
constructor(modalInstance, context, changeDetector) {
|
|
1979
1997
|
this.modalInstance = modalInstance;
|
|
1980
1998
|
this.context = context;
|
|
1981
|
-
this
|
|
1999
|
+
_SkyLookupShowMoreAsyncModalComponent_instances.add(this);
|
|
1982
2000
|
/**
|
|
1983
2001
|
* @internal
|
|
1984
2002
|
* Fires when users select the button to add new options to the list.
|
|
1985
2003
|
*/
|
|
1986
2004
|
this.addClick = new Subject();
|
|
1987
2005
|
this.displayedItems = [];
|
|
1988
|
-
this.onlyShowSelected = false;
|
|
1989
|
-
this.isSearching = false;
|
|
1990
2006
|
this.hasMoreItems = false;
|
|
1991
2007
|
this.isLoadingMore = false;
|
|
1992
|
-
this.
|
|
1993
|
-
this.
|
|
2008
|
+
this.isSearching = false;
|
|
2009
|
+
this.items = [];
|
|
2010
|
+
this.onlyShowSelected = false;
|
|
2011
|
+
this.repeaterItemTemplate = null;
|
|
2012
|
+
this.selectedIdMap = new Map();
|
|
2013
|
+
_SkyLookupShowMoreAsyncModalComponent_changeDetector.set(this, void 0);
|
|
2014
|
+
_SkyLookupShowMoreAsyncModalComponent_continuationData.set(this, void 0);
|
|
2015
|
+
_SkyLookupShowMoreAsyncModalComponent_currentSearchSub.set(this, void 0);
|
|
2016
|
+
_SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe.set(this, new Subject());
|
|
2017
|
+
_SkyLookupShowMoreAsyncModalComponent_offset.set(this, 0);
|
|
2018
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_changeDetector, changeDetector, "f");
|
|
1994
2019
|
}
|
|
1995
2020
|
ngOnInit() {
|
|
2021
|
+
this.repeaterItemTemplate = this.context.userConfig.itemTemplate || null;
|
|
1996
2022
|
this.searchText = this.context.initialSearch;
|
|
1997
|
-
this.
|
|
1998
|
-
this.
|
|
2023
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap).call(this);
|
|
2024
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_loadSearchResults).call(this);
|
|
1999
2025
|
}
|
|
2000
2026
|
ngOnDestroy() {
|
|
2001
|
-
this.
|
|
2002
|
-
this.
|
|
2003
|
-
this.
|
|
2027
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch).call(this);
|
|
2028
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, "f").next();
|
|
2029
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, "f").complete();
|
|
2004
2030
|
}
|
|
2005
2031
|
addButtonClicked() {
|
|
2006
2032
|
this.addClick.next();
|
|
@@ -2013,7 +2039,7 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2013
2039
|
this.selectedIdMap.delete(item[this.context.idProperty]);
|
|
2014
2040
|
}
|
|
2015
2041
|
this.updateDisplayedItems();
|
|
2016
|
-
this.
|
|
2042
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_changeDetector, "f").markForCheck();
|
|
2017
2043
|
}
|
|
2018
2044
|
itemClick(selectedItem) {
|
|
2019
2045
|
if (this.context.selectMode === 'single') {
|
|
@@ -2042,9 +2068,9 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2042
2068
|
this.updateDisplayedItems();
|
|
2043
2069
|
}
|
|
2044
2070
|
searchApplied(searchText) {
|
|
2045
|
-
this
|
|
2071
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_offset, 0, "f");
|
|
2046
2072
|
this.searchText = searchText;
|
|
2047
|
-
this.
|
|
2073
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_loadSearchResults).call(this);
|
|
2048
2074
|
}
|
|
2049
2075
|
selectAll() {
|
|
2050
2076
|
this.selectedIdMap = new Map();
|
|
@@ -2054,12 +2080,12 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2054
2080
|
this.updateDisplayedItems();
|
|
2055
2081
|
}
|
|
2056
2082
|
infiniteScrollEnd() {
|
|
2057
|
-
this.
|
|
2083
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch).call(this);
|
|
2058
2084
|
/* Sanity check - else case would only happen if this was called directly */
|
|
2059
2085
|
/* istanbul ignore else */
|
|
2060
2086
|
if (this.hasMoreItems) {
|
|
2061
2087
|
this.isLoadingMore = true;
|
|
2062
|
-
this.
|
|
2088
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_performSearch).call(this, (result) => {
|
|
2063
2089
|
this.items = this.items.concat(result.items);
|
|
2064
2090
|
this.updateDisplayedItems();
|
|
2065
2091
|
this.isLoadingMore = false;
|
|
@@ -2077,38 +2103,6 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2077
2103
|
});
|
|
2078
2104
|
this.modalInstance.save(selectedItems);
|
|
2079
2105
|
}
|
|
2080
|
-
loadSearchResults() {
|
|
2081
|
-
this.cancelCurrentSearch();
|
|
2082
|
-
this.isSearching = true;
|
|
2083
|
-
this.performSearch((result) => {
|
|
2084
|
-
this.isSearching = false;
|
|
2085
|
-
this.items = result.items;
|
|
2086
|
-
});
|
|
2087
|
-
}
|
|
2088
|
-
createInitialSelectedItemsMap() {
|
|
2089
|
-
this.selectedIdMap = new Map(this.context.initialValue.map((item) => [
|
|
2090
|
-
item[this.context.idProperty],
|
|
2091
|
-
item,
|
|
2092
|
-
]));
|
|
2093
|
-
}
|
|
2094
|
-
performSearch(processResults) {
|
|
2095
|
-
this.currentSearchSub = this.context
|
|
2096
|
-
.searchAsync({
|
|
2097
|
-
displayType: 'modal',
|
|
2098
|
-
offset: this.offset,
|
|
2099
|
-
searchText: this.searchText || '',
|
|
2100
|
-
continuationData: this.continuationData,
|
|
2101
|
-
})
|
|
2102
|
-
.pipe(take(1))
|
|
2103
|
-
.subscribe((result) => {
|
|
2104
|
-
processResults(result);
|
|
2105
|
-
this.continuationData = result.continuationData;
|
|
2106
|
-
this.hasMoreItems = result.hasMore;
|
|
2107
|
-
this.offset = this.items.length;
|
|
2108
|
-
this.updateDisplayedItems();
|
|
2109
|
-
this.changeDetector.markForCheck();
|
|
2110
|
-
});
|
|
2111
|
-
}
|
|
2112
2106
|
updateDisplayedItems() {
|
|
2113
2107
|
if (this.onlyShowSelected) {
|
|
2114
2108
|
this.displayedItems = this.items.filter((item) => this.selectedIdMap.has(item[this.context.idProperty]));
|
|
@@ -2117,20 +2111,49 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2117
2111
|
this.displayedItems = this.items;
|
|
2118
2112
|
}
|
|
2119
2113
|
}
|
|
2120
|
-
cancelCurrentSearch() {
|
|
2121
|
-
if (this.currentSearchSub) {
|
|
2122
|
-
this.currentSearchSub.unsubscribe();
|
|
2123
|
-
this.currentSearchSub = undefined;
|
|
2124
|
-
this.isLoadingMore = false;
|
|
2125
|
-
this.isSearching = false;
|
|
2126
|
-
}
|
|
2127
|
-
}
|
|
2128
2114
|
}
|
|
2115
|
+
_SkyLookupShowMoreAsyncModalComponent_changeDetector = new WeakMap(), _SkyLookupShowMoreAsyncModalComponent_continuationData = new WeakMap(), _SkyLookupShowMoreAsyncModalComponent_currentSearchSub = new WeakMap(), _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe = new WeakMap(), _SkyLookupShowMoreAsyncModalComponent_offset = new WeakMap(), _SkyLookupShowMoreAsyncModalComponent_instances = new WeakSet(), _SkyLookupShowMoreAsyncModalComponent_loadSearchResults = function _SkyLookupShowMoreAsyncModalComponent_loadSearchResults() {
|
|
2116
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch).call(this);
|
|
2117
|
+
this.isSearching = true;
|
|
2118
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_performSearch).call(this, (result) => {
|
|
2119
|
+
this.isSearching = false;
|
|
2120
|
+
this.items = result.items;
|
|
2121
|
+
});
|
|
2122
|
+
}, _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap = function _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap() {
|
|
2123
|
+
this.selectedIdMap = new Map(this.context.initialValue.map((item) => [
|
|
2124
|
+
item[this.context.idProperty],
|
|
2125
|
+
item,
|
|
2126
|
+
]));
|
|
2127
|
+
}, _SkyLookupShowMoreAsyncModalComponent_performSearch = function _SkyLookupShowMoreAsyncModalComponent_performSearch(processResults) {
|
|
2128
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, this.context
|
|
2129
|
+
.searchAsync({
|
|
2130
|
+
displayType: 'modal',
|
|
2131
|
+
offset: __classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_offset, "f"),
|
|
2132
|
+
searchText: this.searchText || '',
|
|
2133
|
+
continuationData: __classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_continuationData, "f"),
|
|
2134
|
+
})
|
|
2135
|
+
.pipe(take(1))
|
|
2136
|
+
.subscribe((result) => {
|
|
2137
|
+
processResults(result);
|
|
2138
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_continuationData, result.continuationData, "f");
|
|
2139
|
+
this.hasMoreItems = result.hasMore || false;
|
|
2140
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_offset, this.items.length, "f");
|
|
2141
|
+
this.updateDisplayedItems();
|
|
2142
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_changeDetector, "f").markForCheck();
|
|
2143
|
+
}), "f");
|
|
2144
|
+
}, _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch = function _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch() {
|
|
2145
|
+
if (__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, "f")) {
|
|
2146
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, "f").unsubscribe();
|
|
2147
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, undefined, "f");
|
|
2148
|
+
this.isLoadingMore = false;
|
|
2149
|
+
this.isSearching = false;
|
|
2150
|
+
}
|
|
2151
|
+
};
|
|
2129
2152
|
SkyLookupShowMoreAsyncModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupShowMoreAsyncModalComponent, deps: [{ token: i1$1.SkyModalInstance }, { token: SkyLookupShowMoreNativePickerAsyncContext }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2130
|
-
SkyLookupShowMoreAsyncModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLookupShowMoreAsyncModalComponent, selector: "sky-lookup-show-more-async-modal", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <sky-wait [isWaiting]=\"isSearching\"></sky-wait>\n <div
|
|
2153
|
+
SkyLookupShowMoreAsyncModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLookupShowMoreAsyncModalComponent, selector: "sky-lookup-show-more-async-modal", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <sky-wait [isWaiting]=\"isSearching\"></sky-wait>\n <div [skyViewkeeper]=\"['.sky-lookup-show-more-toolbar-wrapper']\">\n <div class=\"sky-lookup-show-more-toolbar-wrapper\">\n <sky-toolbar class=\"sky-lookup-show-more-modal-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-search\n [debounceTime]=\"250\"\n [searchText]=\"searchText\"\n (searchApply)=\"searchApplied($event)\"\n >\n </sky-search>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <button\n *ngIf=\"context.showAddButton\"\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-add\"\n (click)=\"addButtonClicked()\"\n >\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"add\"\n iconType=\"skyux\"\n ></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_lookup_show_more_add' | skyLibResources }}\n </button>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n <sky-toolbar\n *ngIf=\"context.selectMode === 'multiple'\"\n class=\"sky-lookup-show-more-modal-muiltiselect-toolbar\"\n >\n <sky-toolbar-section>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-select-all-btn\"\n type=\"button\"\n (click)=\"selectAll()\"\n >\n {{\n 'skyux_lookup_show_more_select_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-clear-all-btn\"\n type=\"button\"\n (click)=\"clearAll()\"\n >\n {{\n 'skyux_lookup_show_more_clear_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <sky-checkbox\n [(checked)]=\"onlyShowSelected\"\n (change)=\"updateDisplayedItems()\"\n >\n <sky-checkbox-label>\n {{\n 'skyux_lookup_show_more_show_selected_option_title'\n | skyLibResources\n }}\n </sky-checkbox-label>\n </sky-checkbox>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"!isSearching && displayedItems.length === 0\"\n class=\"sky-font-deemphasized sky-lookup-show-more-no-results\"\n >\n {{ 'skyux_lookup_show_more_no_results' | skyLibResources }}\n </div>\n <sky-repeater class=\"sky-lookup-show-more-repeater\" expandMode=\"none\">\n <sky-repeater-item\n *ngFor=\"let item of displayedItems\"\n [isSelected]=\"\n item[context.idProperty] | skyLookupItemSelected: selectedIdMap\n \"\n [selectable]=\"context.selectMode === 'multiple'\"\n (click)=\"itemClick(item)\"\n (keyup.enter)=\"itemClick(item)\"\n (isSelectedChange)=\"onItemSelect($event, item)\"\n >\n <sky-repeater-item-content>\n <ng-container\n *ngTemplateOutlet=\"\n repeaterItemTemplate ?? defaultItemTemplate;\n context: { item: item }\n \"\n >\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n <sky-infinite-scroll\n [enabled]=\"hasMoreItems\"\n [loading]=\"isLoadingMore\"\n (scrollEnd)=\"infiniteScrollEnd()\"\n >\n </sky-infinite-scroll>\n </div>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"sky-btn sky-btn-primary sky-margin-inline-compact sky-lookup-show-more-modal-save\"\n type=\"button\"\n [disabled]=\"isSearching\"\n (click)=\"save()\"\n >\n {{ 'skyux_lookup_show_more_select' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-close\"\n type=\"button\"\n (click)=\"modalInstance.close()\"\n >\n {{ 'skyux_lookup_show_more_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n\n<ng-template let-item=\"item\" #defaultItemTemplate>\n {{ item[context.descriptorProperty] }}\n</ng-template>\n\n<ng-template #defaultTitle>\n <ng-container *ngIf=\"context.selectMode === 'single'\">\n {{ 'skyux_lookup_show_more_modal_title_single' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"context.selectMode === 'multiple'\">\n {{ 'skyux_lookup_show_more_modal_title_multiple' | skyLibResources }}\n </ng-container>\n</ng-template>\n", styles: [".sky-lookup-show-more-no-results{padding:20px 0}:host-context(.sky-theme-modern) .sky-lookup-show-more-no-results{padding:30px 0}.sky-theme-modern .sky-lookup-show-more-no-results{padding:30px 0}\n"], components: [{ type: i1$1.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { type: i1$1.λ4, selector: "sky-modal-header" }, { type: i1$1.λ2, selector: "sky-modal-content" }, { type: i4.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { type: i4$2.λ37, selector: "sky-toolbar" }, { type: i4$2.λ38, selector: "sky-toolbar-section" }, { type: i4$2.λ39, selector: "sky-toolbar-item" }, { type: SkySearchComponent, selector: "sky-search", inputs: ["searchText", "expandMode", "debounceTime", "disabled", "placeholderText"], outputs: ["searchApply", "searchChange", "searchClear"] }, { type: i4$2.λ40, selector: "sky-toolbar-view-actions" }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i6.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: i6.λ4, selector: "sky-checkbox-label" }, { type: i7$1.λ11, selector: "sky-repeater", inputs: ["activeIndex", "ariaLabel", "reorderable", "expandMode"], outputs: ["activeIndexChange", "orderChange"] }, { type: i7$1.λ10, selector: "sky-repeater-item", inputs: ["disabled", "itemName", "inlineFormConfig", "inlineFormTemplate", "isExpanded", "isSelected", "reorderable", "selectable", "showInlineForm", "tag"], outputs: ["collapse", "expand", "inlineFormClose", "isSelectedChange"] }, { type: i7$1.λ8, selector: "sky-repeater-item-content" }, { type: i7$1.λ6, selector: "sky-infinite-scroll", inputs: ["enabled", "loading"], outputs: ["scrollEnd"] }, { type: i1$1.λ3, selector: "sky-modal-footer" }], directives: [{ type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i6$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe, "skyLookupItemSelected": SkyLookupItemSelectedPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2131
2154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupShowMoreAsyncModalComponent, decorators: [{
|
|
2132
2155
|
type: Component,
|
|
2133
|
-
args: [{ selector: 'sky-lookup-show-more-async-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <sky-wait [isWaiting]=\"isSearching\"></sky-wait>\n <div
|
|
2156
|
+
args: [{ selector: 'sky-lookup-show-more-async-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <sky-wait [isWaiting]=\"isSearching\"></sky-wait>\n <div [skyViewkeeper]=\"['.sky-lookup-show-more-toolbar-wrapper']\">\n <div class=\"sky-lookup-show-more-toolbar-wrapper\">\n <sky-toolbar class=\"sky-lookup-show-more-modal-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-search\n [debounceTime]=\"250\"\n [searchText]=\"searchText\"\n (searchApply)=\"searchApplied($event)\"\n >\n </sky-search>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <button\n *ngIf=\"context.showAddButton\"\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-add\"\n (click)=\"addButtonClicked()\"\n >\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"add\"\n iconType=\"skyux\"\n ></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_lookup_show_more_add' | skyLibResources }}\n </button>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n <sky-toolbar\n *ngIf=\"context.selectMode === 'multiple'\"\n class=\"sky-lookup-show-more-modal-muiltiselect-toolbar\"\n >\n <sky-toolbar-section>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-select-all-btn\"\n type=\"button\"\n (click)=\"selectAll()\"\n >\n {{\n 'skyux_lookup_show_more_select_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-clear-all-btn\"\n type=\"button\"\n (click)=\"clearAll()\"\n >\n {{\n 'skyux_lookup_show_more_clear_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <sky-checkbox\n [(checked)]=\"onlyShowSelected\"\n (change)=\"updateDisplayedItems()\"\n >\n <sky-checkbox-label>\n {{\n 'skyux_lookup_show_more_show_selected_option_title'\n | skyLibResources\n }}\n </sky-checkbox-label>\n </sky-checkbox>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"!isSearching && displayedItems.length === 0\"\n class=\"sky-font-deemphasized sky-lookup-show-more-no-results\"\n >\n {{ 'skyux_lookup_show_more_no_results' | skyLibResources }}\n </div>\n <sky-repeater class=\"sky-lookup-show-more-repeater\" expandMode=\"none\">\n <sky-repeater-item\n *ngFor=\"let item of displayedItems\"\n [isSelected]=\"\n item[context.idProperty] | skyLookupItemSelected: selectedIdMap\n \"\n [selectable]=\"context.selectMode === 'multiple'\"\n (click)=\"itemClick(item)\"\n (keyup.enter)=\"itemClick(item)\"\n (isSelectedChange)=\"onItemSelect($event, item)\"\n >\n <sky-repeater-item-content>\n <ng-container\n *ngTemplateOutlet=\"\n repeaterItemTemplate ?? defaultItemTemplate;\n context: { item: item }\n \"\n >\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n <sky-infinite-scroll\n [enabled]=\"hasMoreItems\"\n [loading]=\"isLoadingMore\"\n (scrollEnd)=\"infiniteScrollEnd()\"\n >\n </sky-infinite-scroll>\n </div>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"sky-btn sky-btn-primary sky-margin-inline-compact sky-lookup-show-more-modal-save\"\n type=\"button\"\n [disabled]=\"isSearching\"\n (click)=\"save()\"\n >\n {{ 'skyux_lookup_show_more_select' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-close\"\n type=\"button\"\n (click)=\"modalInstance.close()\"\n >\n {{ 'skyux_lookup_show_more_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n\n<ng-template let-item=\"item\" #defaultItemTemplate>\n {{ item[context.descriptorProperty] }}\n</ng-template>\n\n<ng-template #defaultTitle>\n <ng-container *ngIf=\"context.selectMode === 'single'\">\n {{ 'skyux_lookup_show_more_modal_title_single' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"context.selectMode === 'multiple'\">\n {{ 'skyux_lookup_show_more_modal_title_multiple' | skyLibResources }}\n </ng-container>\n</ng-template>\n", styles: [".sky-lookup-show-more-no-results{padding:20px 0}:host-context(.sky-theme-modern) .sky-lookup-show-more-no-results{padding:30px 0}.sky-theme-modern .sky-lookup-show-more-no-results{padding:30px 0}\n"] }]
|
|
2134
2157
|
}], ctorParameters: function () { return [{ type: i1$1.SkyModalInstance }, { type: SkyLookupShowMoreNativePickerAsyncContext }, { type: i0.ChangeDetectorRef }]; } });
|
|
2135
2158
|
|
|
2136
2159
|
/**
|
|
@@ -2140,6 +2163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2140
2163
|
class SkyLookupShowMoreNativePickerContext {
|
|
2141
2164
|
}
|
|
2142
2165
|
|
|
2166
|
+
var _SkyLookupShowMoreModalComponent_changeDetector, _SkyLookupShowMoreModalComponent_itemIndex, _SkyLookupShowMoreModalComponent_ngUnsubscribe;
|
|
2143
2167
|
/**
|
|
2144
2168
|
* @internal
|
|
2145
2169
|
* Internal component to implement the native picker.
|
|
@@ -2148,12 +2172,12 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2148
2172
|
constructor(modalInstance, context, changeDetector) {
|
|
2149
2173
|
this.modalInstance = modalInstance;
|
|
2150
2174
|
this.context = context;
|
|
2151
|
-
this.changeDetector = changeDetector;
|
|
2152
2175
|
/**
|
|
2153
2176
|
* @internal
|
|
2154
2177
|
* Fires when users select the button to add new options to the list.
|
|
2155
2178
|
*/
|
|
2156
2179
|
this.addClick = new Subject();
|
|
2180
|
+
this.items = [];
|
|
2157
2181
|
this.dataManagerConfig = {
|
|
2158
2182
|
sortOptions: [
|
|
2159
2183
|
{
|
|
@@ -2173,17 +2197,22 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2173
2197
|
this.displayedItems = [];
|
|
2174
2198
|
this.itemsHaveMore = false;
|
|
2175
2199
|
this.onlyShowSelected = false;
|
|
2200
|
+
this.repeaterItemTemplate = null;
|
|
2201
|
+
this.searchText = '';
|
|
2176
2202
|
this.selectedItems = [];
|
|
2177
|
-
this
|
|
2178
|
-
this
|
|
2203
|
+
_SkyLookupShowMoreModalComponent_changeDetector.set(this, void 0);
|
|
2204
|
+
_SkyLookupShowMoreModalComponent_itemIndex.set(this, 0);
|
|
2205
|
+
_SkyLookupShowMoreModalComponent_ngUnsubscribe.set(this, new Subject());
|
|
2206
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_changeDetector, changeDetector, "f");
|
|
2179
2207
|
}
|
|
2180
2208
|
ngAfterViewInit() {
|
|
2209
|
+
this.repeaterItemTemplate = this.context.userConfig.itemTemplate || null;
|
|
2181
2210
|
this.searchText = this.context.initialSearch;
|
|
2182
2211
|
this.addItems();
|
|
2183
2212
|
}
|
|
2184
2213
|
ngOnDestroy() {
|
|
2185
|
-
this.
|
|
2186
|
-
this.
|
|
2214
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_ngUnsubscribe, "f").next();
|
|
2215
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_ngUnsubscribe, "f").complete();
|
|
2187
2216
|
}
|
|
2188
2217
|
addButtonClicked() {
|
|
2189
2218
|
this.addClick.next();
|
|
@@ -2191,14 +2220,12 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2191
2220
|
addItems() {
|
|
2192
2221
|
if (!this.items || this.items.length === 0) {
|
|
2193
2222
|
const selectedItems = this.selectedItems.slice();
|
|
2194
|
-
this.items = this.context.items
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
})
|
|
2201
|
-
: [];
|
|
2223
|
+
this.items = this.context.items.map((item) => {
|
|
2224
|
+
return {
|
|
2225
|
+
value: item,
|
|
2226
|
+
selected: false,
|
|
2227
|
+
};
|
|
2228
|
+
});
|
|
2202
2229
|
this.items.forEach((item) => {
|
|
2203
2230
|
const isInitialValue = this.context.initialValue === item.value;
|
|
2204
2231
|
const initialIsArray = Array.isArray(this.context.initialValue);
|
|
@@ -2213,18 +2240,18 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2213
2240
|
});
|
|
2214
2241
|
this.selectedItems = selectedItems;
|
|
2215
2242
|
this.updateDataState();
|
|
2216
|
-
this.
|
|
2243
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2217
2244
|
}
|
|
2218
|
-
this
|
|
2245
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_itemIndex, __classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f") + 10, "f");
|
|
2219
2246
|
this.searchItems(this.items).then((searchedItems) => {
|
|
2220
|
-
this.displayedItems = searchedItems.slice(0, this
|
|
2221
|
-
if (this
|
|
2247
|
+
this.displayedItems = searchedItems.slice(0, __classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f"));
|
|
2248
|
+
if (__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f") > searchedItems.length) {
|
|
2222
2249
|
this.itemsHaveMore = false;
|
|
2223
2250
|
}
|
|
2224
2251
|
else {
|
|
2225
2252
|
this.itemsHaveMore = true;
|
|
2226
2253
|
}
|
|
2227
|
-
this.
|
|
2254
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2228
2255
|
});
|
|
2229
2256
|
}
|
|
2230
2257
|
clearAll() {
|
|
@@ -2235,7 +2262,7 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2235
2262
|
});
|
|
2236
2263
|
this.selectedItems = [];
|
|
2237
2264
|
this.updateDataState();
|
|
2238
|
-
this.
|
|
2265
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2239
2266
|
}
|
|
2240
2267
|
itemClick(selectedItem) {
|
|
2241
2268
|
if (this.context.selectMode === 'single') {
|
|
@@ -2243,12 +2270,13 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2243
2270
|
}
|
|
2244
2271
|
}
|
|
2245
2272
|
onItemSelect(newSelectState, itemToSelect) {
|
|
2273
|
+
const items = this.items;
|
|
2246
2274
|
if (this.context.selectMode === 'single') {
|
|
2247
2275
|
/* Sanity check - single select mode should only alow for a `true` select state */
|
|
2248
2276
|
/* istanbul ignore else */
|
|
2249
2277
|
if (newSelectState) {
|
|
2250
2278
|
itemToSelect.selected = true;
|
|
2251
|
-
|
|
2279
|
+
items.forEach((item) => {
|
|
2252
2280
|
if (item.value !== itemToSelect.value) {
|
|
2253
2281
|
item.selected = false;
|
|
2254
2282
|
}
|
|
@@ -2258,20 +2286,20 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2258
2286
|
item.selected = false;
|
|
2259
2287
|
}
|
|
2260
2288
|
});
|
|
2261
|
-
const itemIndex =
|
|
2289
|
+
const itemIndex = items.findIndex((item) => item.value === itemToSelect.value);
|
|
2262
2290
|
this.selectedItems = [
|
|
2263
|
-
{ index: itemIndex, itemData:
|
|
2291
|
+
{ index: itemIndex, itemData: items[itemIndex].value },
|
|
2264
2292
|
];
|
|
2265
2293
|
}
|
|
2266
2294
|
}
|
|
2267
2295
|
else {
|
|
2268
2296
|
const selectedItems = this.selectedItems;
|
|
2269
|
-
const allItemsIndex =
|
|
2297
|
+
const allItemsIndex = items.findIndex((item) => item.value === itemToSelect.value);
|
|
2270
2298
|
const selectedItemsIndex = selectedItems.findIndex((selectedItem) => selectedItem.index === allItemsIndex);
|
|
2271
2299
|
if (newSelectState && selectedItemsIndex === -1) {
|
|
2272
2300
|
selectedItems.push({
|
|
2273
2301
|
index: allItemsIndex,
|
|
2274
|
-
itemData:
|
|
2302
|
+
itemData: items[allItemsIndex].value,
|
|
2275
2303
|
});
|
|
2276
2304
|
}
|
|
2277
2305
|
else if (!newSelectState && selectedItemsIndex !== -1) {
|
|
@@ -2280,12 +2308,12 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2280
2308
|
this.selectedItems = selectedItems;
|
|
2281
2309
|
}
|
|
2282
2310
|
this.updateDataState();
|
|
2283
|
-
this.
|
|
2311
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2284
2312
|
}
|
|
2285
2313
|
searchApplied(searchText) {
|
|
2286
2314
|
/* istanbul ignore else */
|
|
2287
2315
|
if (this.searchText !== searchText) {
|
|
2288
|
-
this
|
|
2316
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_itemIndex, 10, "f");
|
|
2289
2317
|
}
|
|
2290
2318
|
this.searchText = searchText;
|
|
2291
2319
|
this.updateDataState();
|
|
@@ -2312,49 +2340,50 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2312
2340
|
}
|
|
2313
2341
|
}
|
|
2314
2342
|
selectAll() {
|
|
2343
|
+
const items = this.items;
|
|
2315
2344
|
const selectedItems = this.selectedItems;
|
|
2316
2345
|
this.displayedItems.forEach((item) => {
|
|
2317
2346
|
if (!item.selected) {
|
|
2318
2347
|
item.selected = true;
|
|
2319
|
-
const index =
|
|
2320
|
-
/* Sanity check */
|
|
2348
|
+
const index = items.indexOf(item);
|
|
2321
2349
|
/* istanbul ignore else */
|
|
2322
2350
|
if (selectedItems.findIndex((selectedItem) => selectedItem.index === index) < 0) {
|
|
2323
2351
|
selectedItems.push({
|
|
2324
2352
|
index: index,
|
|
2325
|
-
itemData:
|
|
2353
|
+
itemData: items[index].value,
|
|
2326
2354
|
});
|
|
2327
2355
|
}
|
|
2328
2356
|
}
|
|
2329
2357
|
});
|
|
2330
2358
|
this.selectedItems = selectedItems;
|
|
2331
2359
|
this.updateDataState();
|
|
2332
|
-
this.
|
|
2360
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2333
2361
|
}
|
|
2334
2362
|
updateDataState() {
|
|
2363
|
+
const items = this.items;
|
|
2335
2364
|
const selectedItems = this.selectedItems;
|
|
2336
|
-
|
|
2365
|
+
items.forEach((item, index) => {
|
|
2337
2366
|
item.selected =
|
|
2338
2367
|
selectedItems.findIndex((selectedItem) => selectedItem.index === index) !== -1;
|
|
2339
2368
|
});
|
|
2340
|
-
this.searchItems(
|
|
2369
|
+
this.searchItems(items).then((searchedItems) => {
|
|
2341
2370
|
if (this.onlyShowSelected) {
|
|
2342
2371
|
searchedItems = searchedItems.filter((item) => item.selected);
|
|
2343
2372
|
}
|
|
2344
|
-
this.displayedItems = searchedItems.slice(0, this
|
|
2345
|
-
if (this
|
|
2373
|
+
this.displayedItems = searchedItems.slice(0, __classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f"));
|
|
2374
|
+
if (__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f") > searchedItems.length) {
|
|
2346
2375
|
this.itemsHaveMore = false;
|
|
2347
2376
|
}
|
|
2348
2377
|
else {
|
|
2349
2378
|
this.itemsHaveMore = true;
|
|
2350
2379
|
}
|
|
2351
|
-
this.
|
|
2380
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2352
2381
|
});
|
|
2353
2382
|
}
|
|
2354
2383
|
updateItemData(data) {
|
|
2355
2384
|
this.context.items = data;
|
|
2356
|
-
this.items =
|
|
2357
|
-
this
|
|
2385
|
+
this.items = [];
|
|
2386
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_itemIndex, 10, "f");
|
|
2358
2387
|
this.selectedItems.forEach((selectedItem) => {
|
|
2359
2388
|
this.context.items.forEach((item, index) => {
|
|
2360
2389
|
if (selectedItem.itemData === item) {
|
|
@@ -2363,14 +2392,15 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2363
2392
|
});
|
|
2364
2393
|
});
|
|
2365
2394
|
this.addItems();
|
|
2366
|
-
this.
|
|
2395
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2367
2396
|
}
|
|
2368
2397
|
}
|
|
2398
|
+
_SkyLookupShowMoreModalComponent_changeDetector = new WeakMap(), _SkyLookupShowMoreModalComponent_itemIndex = new WeakMap(), _SkyLookupShowMoreModalComponent_ngUnsubscribe = new WeakMap();
|
|
2369
2399
|
SkyLookupShowMoreModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupShowMoreModalComponent, deps: [{ token: i1$1.SkyModalInstance }, { token: SkyLookupShowMoreNativePickerContext }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2370
|
-
SkyLookupShowMoreModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLookupShowMoreModalComponent, selector: "skyux-lookup-show-more-modal", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <div
|
|
2400
|
+
SkyLookupShowMoreModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLookupShowMoreModalComponent, selector: "skyux-lookup-show-more-modal", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <div [skyViewkeeper]=\"['.sky-lookup-show-more-toolbar-wrapper']\">\n <div class=\"sky-lookup-show-more-toolbar-wrapper\">\n <sky-toolbar class=\"sky-lookup-show-more-modal-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-search\n [debounceTime]=\"250\"\n [searchText]=\"searchText\"\n (searchApply)=\"searchApplied($event)\"\n >\n </sky-search>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <button\n *ngIf=\"context.showAddButton\"\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-add\"\n (click)=\"addButtonClicked()\"\n >\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"add\"\n iconType=\"skyux\"\n ></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_lookup_show_more_add' | skyLibResources }}\n </button>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n <sky-toolbar\n *ngIf=\"context.selectMode === 'multiple'\"\n class=\"sky-lookup-show-more-modal-muiltiselect-toolbar\"\n >\n <sky-toolbar-section>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-select-all-btn\"\n type=\"button\"\n (click)=\"selectAll()\"\n >\n {{\n 'skyux_lookup_show_more_select_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-clear-all-btn\"\n type=\"button\"\n (click)=\"clearAll()\"\n >\n {{\n 'skyux_lookup_show_more_clear_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <sky-checkbox\n [(checked)]=\"onlyShowSelected\"\n (change)=\"updateDataState()\"\n >\n <sky-checkbox-label>\n {{\n 'skyux_lookup_show_more_show_selected_option_title'\n | skyLibResources\n }}\n </sky-checkbox-label>\n </sky-checkbox>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"displayedItems.length === 0\"\n class=\"sky-font-deemphasized sky-lookup-show-more-no-results\"\n >\n {{ 'skyux_lookup_show_more_no_results' | skyLibResources }}\n </div>\n <sky-repeater class=\"sky-lookup-show-more-repeater\" expandMode=\"none\">\n <sky-repeater-item\n *ngFor=\"let item of displayedItems\"\n [selectable]=\"context.selectMode === 'multiple'\"\n [(isSelected)]=\"item.selected\"\n (click)=\"itemClick(item)\"\n (keyup.enter)=\"itemClick(item)\"\n (isSelectedChange)=\"onItemSelect($event, item)\"\n >\n <sky-repeater-item-content>\n <ng-container\n *ngTemplateOutlet=\"\n repeaterItemTemplate ?? defaultItemTemplate;\n context: { item: item.value }\n \"\n >\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n <sky-infinite-scroll [enabled]=\"itemsHaveMore\" (scrollEnd)=\"addItems()\">\n </sky-infinite-scroll>\n </div>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"sky-btn sky-btn-primary sky-margin-inline-compact sky-lookup-show-more-modal-save\"\n type=\"button\"\n (click)=\"modalInstance.save(selectedItems)\"\n >\n {{ 'skyux_lookup_show_more_select' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-close\"\n type=\"button\"\n (click)=\"modalInstance.close()\"\n >\n {{ 'skyux_lookup_show_more_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n\n<ng-template let-item=\"item\" #defaultItemTemplate>\n {{ item[context.descriptorProperty] }}\n</ng-template>\n\n<ng-template #defaultTitle>\n <ng-container *ngIf=\"context.selectMode === 'single'\">\n {{ 'skyux_lookup_show_more_modal_title_single' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"context.selectMode === 'multiple'\">\n {{ 'skyux_lookup_show_more_modal_title_multiple' | skyLibResources }}\n </ng-container>\n</ng-template>\n", styles: [".sky-lookup-show-more-no-results{padding:20px 0}:host-context(.sky-theme-modern) .sky-lookup-show-more-no-results{padding:30px 0}.sky-theme-modern .sky-lookup-show-more-no-results{padding:30px 0}\n"], components: [{ type: i1$1.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { type: i1$1.λ4, selector: "sky-modal-header" }, { type: i1$1.λ2, selector: "sky-modal-content" }, { type: i4$2.λ37, selector: "sky-toolbar" }, { type: i4$2.λ38, selector: "sky-toolbar-section" }, { type: i4$2.λ39, selector: "sky-toolbar-item" }, { type: SkySearchComponent, selector: "sky-search", inputs: ["searchText", "expandMode", "debounceTime", "disabled", "placeholderText"], outputs: ["searchApply", "searchChange", "searchClear"] }, { type: i4$2.λ40, selector: "sky-toolbar-view-actions" }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i6.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: i6.λ4, selector: "sky-checkbox-label" }, { type: i7$1.λ11, selector: "sky-repeater", inputs: ["activeIndex", "ariaLabel", "reorderable", "expandMode"], outputs: ["activeIndexChange", "orderChange"] }, { type: i7$1.λ10, selector: "sky-repeater-item", inputs: ["disabled", "itemName", "inlineFormConfig", "inlineFormTemplate", "isExpanded", "isSelected", "reorderable", "selectable", "showInlineForm", "tag"], outputs: ["collapse", "expand", "inlineFormClose", "isSelectedChange"] }, { type: i7$1.λ8, selector: "sky-repeater-item-content" }, { type: i7$1.λ6, selector: "sky-infinite-scroll", inputs: ["enabled", "loading"], outputs: ["scrollEnd"] }, { type: i1$1.λ3, selector: "sky-modal-footer" }], directives: [{ type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i6$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2371
2401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupShowMoreModalComponent, decorators: [{
|
|
2372
2402
|
type: Component,
|
|
2373
|
-
args: [{ selector: 'skyux-lookup-show-more-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <div
|
|
2403
|
+
args: [{ selector: 'skyux-lookup-show-more-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <div [skyViewkeeper]=\"['.sky-lookup-show-more-toolbar-wrapper']\">\n <div class=\"sky-lookup-show-more-toolbar-wrapper\">\n <sky-toolbar class=\"sky-lookup-show-more-modal-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-search\n [debounceTime]=\"250\"\n [searchText]=\"searchText\"\n (searchApply)=\"searchApplied($event)\"\n >\n </sky-search>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <button\n *ngIf=\"context.showAddButton\"\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-add\"\n (click)=\"addButtonClicked()\"\n >\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"add\"\n iconType=\"skyux\"\n ></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_lookup_show_more_add' | skyLibResources }}\n </button>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n <sky-toolbar\n *ngIf=\"context.selectMode === 'multiple'\"\n class=\"sky-lookup-show-more-modal-muiltiselect-toolbar\"\n >\n <sky-toolbar-section>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-select-all-btn\"\n type=\"button\"\n (click)=\"selectAll()\"\n >\n {{\n 'skyux_lookup_show_more_select_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-clear-all-btn\"\n type=\"button\"\n (click)=\"clearAll()\"\n >\n {{\n 'skyux_lookup_show_more_clear_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <sky-checkbox\n [(checked)]=\"onlyShowSelected\"\n (change)=\"updateDataState()\"\n >\n <sky-checkbox-label>\n {{\n 'skyux_lookup_show_more_show_selected_option_title'\n | skyLibResources\n }}\n </sky-checkbox-label>\n </sky-checkbox>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"displayedItems.length === 0\"\n class=\"sky-font-deemphasized sky-lookup-show-more-no-results\"\n >\n {{ 'skyux_lookup_show_more_no_results' | skyLibResources }}\n </div>\n <sky-repeater class=\"sky-lookup-show-more-repeater\" expandMode=\"none\">\n <sky-repeater-item\n *ngFor=\"let item of displayedItems\"\n [selectable]=\"context.selectMode === 'multiple'\"\n [(isSelected)]=\"item.selected\"\n (click)=\"itemClick(item)\"\n (keyup.enter)=\"itemClick(item)\"\n (isSelectedChange)=\"onItemSelect($event, item)\"\n >\n <sky-repeater-item-content>\n <ng-container\n *ngTemplateOutlet=\"\n repeaterItemTemplate ?? defaultItemTemplate;\n context: { item: item.value }\n \"\n >\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n <sky-infinite-scroll [enabled]=\"itemsHaveMore\" (scrollEnd)=\"addItems()\">\n </sky-infinite-scroll>\n </div>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"sky-btn sky-btn-primary sky-margin-inline-compact sky-lookup-show-more-modal-save\"\n type=\"button\"\n (click)=\"modalInstance.save(selectedItems)\"\n >\n {{ 'skyux_lookup_show_more_select' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-close\"\n type=\"button\"\n (click)=\"modalInstance.close()\"\n >\n {{ 'skyux_lookup_show_more_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n\n<ng-template let-item=\"item\" #defaultItemTemplate>\n {{ item[context.descriptorProperty] }}\n</ng-template>\n\n<ng-template #defaultTitle>\n <ng-container *ngIf=\"context.selectMode === 'single'\">\n {{ 'skyux_lookup_show_more_modal_title_single' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"context.selectMode === 'multiple'\">\n {{ 'skyux_lookup_show_more_modal_title_multiple' | skyLibResources }}\n </ng-container>\n</ng-template>\n", styles: [".sky-lookup-show-more-no-results{padding:20px 0}:host-context(.sky-theme-modern) .sky-lookup-show-more-no-results{padding:30px 0}.sky-theme-modern .sky-lookup-show-more-no-results{padding:30px 0}\n"] }]
|
|
2374
2404
|
}], ctorParameters: function () { return [{ type: i1$1.SkyModalInstance }, { type: SkyLookupShowMoreNativePickerContext }, { type: i0.ChangeDetectorRef }]; } });
|
|
2375
2405
|
|
|
2376
2406
|
/**
|
|
@@ -2392,6 +2422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2392
2422
|
type: Injectable
|
|
2393
2423
|
}] });
|
|
2394
2424
|
|
|
2425
|
+
var _SkyLookupAutocompleteAdapter__descriptorProperty, _SkyLookupAutocompleteAdapter__propertiesToSearch, _SkyLookupAutocompleteAdapter__search;
|
|
2395
2426
|
/**
|
|
2396
2427
|
* @internal
|
|
2397
2428
|
*/
|
|
@@ -2402,6 +2433,9 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2402
2433
|
* returned via an observable.
|
|
2403
2434
|
*/
|
|
2404
2435
|
this.searchAsync = new EventEmitter();
|
|
2436
|
+
_SkyLookupAutocompleteAdapter__descriptorProperty.set(this, void 0);
|
|
2437
|
+
_SkyLookupAutocompleteAdapter__propertiesToSearch.set(this, void 0);
|
|
2438
|
+
_SkyLookupAutocompleteAdapter__search.set(this, void 0);
|
|
2405
2439
|
}
|
|
2406
2440
|
/**
|
|
2407
2441
|
* Specifies an object property to display in the text input after users
|
|
@@ -2409,20 +2443,20 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2409
2443
|
* @default "name"
|
|
2410
2444
|
*/
|
|
2411
2445
|
set descriptorProperty(value) {
|
|
2412
|
-
this
|
|
2446
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, value, "f");
|
|
2413
2447
|
}
|
|
2414
2448
|
get descriptorProperty() {
|
|
2415
|
-
return this
|
|
2449
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, "f") || 'name';
|
|
2416
2450
|
}
|
|
2417
2451
|
/**
|
|
2418
2452
|
* Specifies an array of object properties to search.
|
|
2419
2453
|
* @default ["name"]
|
|
2420
2454
|
*/
|
|
2421
2455
|
set propertiesToSearch(value) {
|
|
2422
|
-
this
|
|
2456
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, value, "f");
|
|
2423
2457
|
}
|
|
2424
2458
|
get propertiesToSearch() {
|
|
2425
|
-
return this
|
|
2459
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, "f") || ['name'];
|
|
2426
2460
|
}
|
|
2427
2461
|
/**
|
|
2428
2462
|
* Specifies a function to dynamically manage the data source when users
|
|
@@ -2433,16 +2467,17 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2433
2467
|
* `search`.
|
|
2434
2468
|
*/
|
|
2435
2469
|
set search(value) {
|
|
2436
|
-
this
|
|
2470
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__search, value, "f");
|
|
2437
2471
|
}
|
|
2438
2472
|
get search() {
|
|
2439
|
-
return (this
|
|
2473
|
+
return (__classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__search, "f") ||
|
|
2440
2474
|
skyAutocompleteDefaultSearchFunction({
|
|
2441
2475
|
propertiesToSearch: this.propertiesToSearch,
|
|
2442
2476
|
searchFilters: this.searchFilters,
|
|
2443
2477
|
}));
|
|
2444
2478
|
}
|
|
2445
2479
|
}
|
|
2480
|
+
_SkyLookupAutocompleteAdapter__descriptorProperty = new WeakMap(), _SkyLookupAutocompleteAdapter__propertiesToSearch = new WeakMap(), _SkyLookupAutocompleteAdapter__search = new WeakMap();
|
|
2446
2481
|
SkyLookupAutocompleteAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupAutocompleteAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2447
2482
|
SkyLookupAutocompleteAdapter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: SkyLookupAutocompleteAdapter, inputs: { debounceTime: "debounceTime", descriptorProperty: "descriptorProperty", propertiesToSearch: "propertiesToSearch", search: "search", searchResultTemplate: "searchResultTemplate", searchTextMinimumCharacters: "searchTextMinimumCharacters", searchFilters: "searchFilters", searchResultsLimit: "searchResultsLimit" }, outputs: { searchAsync: "searchAsync" }, ngImport: i0 });
|
|
2448
2483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupAutocompleteAdapter, decorators: [{
|
|
@@ -2467,17 +2502,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2467
2502
|
type: Output
|
|
2468
2503
|
}] } });
|
|
2469
2504
|
|
|
2505
|
+
var _SkyLookupComponent_instances, _SkyLookupComponent_adapter, _SkyLookupComponent_elementRef, _SkyLookupComponent_changeDetector, _SkyLookupComponent_idle, _SkyLookupComponent_markForTokenFocusOnKeyUp, _SkyLookupComponent_modalService, _SkyLookupComponent_ngUnsubscribe, _SkyLookupComponent_openNativePicker, _SkyLookupComponent_resourcesService, _SkyLookupComponent_windowRef, _SkyLookupComponent__autocompleteInputDirective, _SkyLookupComponent__data, _SkyLookupComponent__selectMode, _SkyLookupComponent__tokens, _SkyLookupComponent__value, _SkyLookupComponent_createNativePickerInstance, _SkyLookupComponent_addToSelected, _SkyLookupComponent_addEventListeners, _SkyLookupComponent_removeEventListeners, _SkyLookupComponent_focusInputOnHostClick, _SkyLookupComponent_focusInput, _SkyLookupComponent_onAddButtonComplete, _SkyLookupComponent_parseTokens, _SkyLookupComponent_sendAutocompleteMessage, _SkyLookupComponent_sendTokensMessage, _SkyLookupComponent_updateForSelectMode;
|
|
2470
2506
|
class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
2471
|
-
constructor(changeDetector, elementRef, windowRef,
|
|
2507
|
+
constructor(changeDetector, elementRef, windowRef, adapter, modalService, resourcesService, ngControl, inputBoxHostSvc, themeSvc) {
|
|
2472
2508
|
super();
|
|
2473
|
-
this.changeDetector = changeDetector;
|
|
2474
|
-
this.elementRef = elementRef;
|
|
2475
|
-
this.windowRef = windowRef;
|
|
2476
|
-
this.adapter = adapter;
|
|
2477
|
-
this.modalService = modalService;
|
|
2478
|
-
this.resourcesService = resourcesService;
|
|
2479
2509
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
2480
2510
|
this.themeSvc = themeSvc;
|
|
2511
|
+
_SkyLookupComponent_instances.add(this);
|
|
2481
2512
|
/**
|
|
2482
2513
|
* Indicates whether to disable the lookup field.
|
|
2483
2514
|
*/
|
|
@@ -2497,15 +2528,35 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2497
2528
|
this.autocompleteController = new Subject();
|
|
2498
2529
|
this.isInputFocused = false;
|
|
2499
2530
|
this.tokensController = new Subject();
|
|
2500
|
-
this
|
|
2501
|
-
this
|
|
2502
|
-
this
|
|
2531
|
+
_SkyLookupComponent_adapter.set(this, void 0);
|
|
2532
|
+
_SkyLookupComponent_elementRef.set(this, void 0);
|
|
2533
|
+
_SkyLookupComponent_changeDetector.set(this, void 0);
|
|
2534
|
+
_SkyLookupComponent_idle.set(this, new Subject());
|
|
2535
|
+
_SkyLookupComponent_markForTokenFocusOnKeyUp.set(this, false);
|
|
2536
|
+
_SkyLookupComponent_modalService.set(this, void 0);
|
|
2537
|
+
_SkyLookupComponent_ngUnsubscribe.set(this, new Subject());
|
|
2538
|
+
_SkyLookupComponent_openNativePicker.set(this, void 0);
|
|
2539
|
+
_SkyLookupComponent_resourcesService.set(this, void 0);
|
|
2540
|
+
_SkyLookupComponent_windowRef.set(this, void 0);
|
|
2541
|
+
_SkyLookupComponent__autocompleteInputDirective.set(this, void 0);
|
|
2542
|
+
_SkyLookupComponent__data.set(this, void 0);
|
|
2543
|
+
_SkyLookupComponent__selectMode.set(this, void 0);
|
|
2544
|
+
_SkyLookupComponent__tokens.set(this, void 0);
|
|
2545
|
+
_SkyLookupComponent__value.set(this, void 0);
|
|
2503
2546
|
// Angular automatically constructs these methods.
|
|
2504
2547
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2505
2548
|
this.onChange = (value) => { };
|
|
2506
2549
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2507
2550
|
this.onTouched = () => { };
|
|
2508
|
-
|
|
2551
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_changeDetector, changeDetector, "f");
|
|
2552
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_elementRef, elementRef, "f");
|
|
2553
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_windowRef, windowRef, "f");
|
|
2554
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_adapter, adapter, "f");
|
|
2555
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_modalService, modalService, "f");
|
|
2556
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_resourcesService, resourcesService, "f");
|
|
2557
|
+
if (ngControl) {
|
|
2558
|
+
ngControl.valueAccessor = this;
|
|
2559
|
+
}
|
|
2509
2560
|
}
|
|
2510
2561
|
/**
|
|
2511
2562
|
* Specifies a data source for the lookup component to search when users
|
|
@@ -2514,13 +2565,13 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2514
2565
|
* @default []
|
|
2515
2566
|
*/
|
|
2516
2567
|
set data(value) {
|
|
2517
|
-
this
|
|
2518
|
-
if (this
|
|
2519
|
-
this.
|
|
2568
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__data, value, "f");
|
|
2569
|
+
if (__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f") && this.searchAsync.observers.length === 0) {
|
|
2570
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f").componentInstance.updateItemData(value);
|
|
2520
2571
|
}
|
|
2521
2572
|
}
|
|
2522
2573
|
get data() {
|
|
2523
|
-
return this
|
|
2574
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__data, "f") || [];
|
|
2524
2575
|
}
|
|
2525
2576
|
/**
|
|
2526
2577
|
* Specifies whether users can select one option or multiple options.
|
|
@@ -2528,61 +2579,61 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2528
2579
|
*/
|
|
2529
2580
|
set selectMode(value) {
|
|
2530
2581
|
const multipleToSingle = value === 'single' && this.selectMode === 'multiple';
|
|
2531
|
-
this
|
|
2532
|
-
this.
|
|
2582
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__selectMode, value, "f");
|
|
2583
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_updateForSelectMode).call(this);
|
|
2533
2584
|
if (multipleToSingle) {
|
|
2534
2585
|
if (this.value && this.value.length > 1) {
|
|
2535
2586
|
// The `setTimeout` is needed to avoid a `ExpressionChangedAfterItHasBeenCheckedError` error in template forms.
|
|
2536
2587
|
setTimeout(() => {
|
|
2537
2588
|
this.writeValue([this.value[0]]);
|
|
2538
|
-
this.
|
|
2589
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").detectChanges();
|
|
2539
2590
|
});
|
|
2540
2591
|
}
|
|
2541
2592
|
}
|
|
2542
2593
|
}
|
|
2543
2594
|
get selectMode() {
|
|
2544
|
-
return this
|
|
2595
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__selectMode, "f") || 'multiple';
|
|
2545
2596
|
}
|
|
2546
2597
|
get tokens() {
|
|
2547
|
-
return this
|
|
2598
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__tokens, "f");
|
|
2548
2599
|
}
|
|
2549
2600
|
set tokens(value) {
|
|
2550
2601
|
// Collapse the tokens into a single token if the user has selected many options.
|
|
2551
2602
|
if (this.enableShowMore && this.value.length > 5) {
|
|
2552
|
-
this
|
|
2603
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_resourcesService, "f")
|
|
2553
2604
|
.getString('skyux_lookup_tokens_summary', this.value.length.toString())
|
|
2554
2605
|
.pipe(take(1))
|
|
2555
2606
|
.subscribe((label) => {
|
|
2556
|
-
this
|
|
2607
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__tokens, [
|
|
2557
2608
|
{
|
|
2558
2609
|
value: { [this.descriptorProperty]: label },
|
|
2559
2610
|
},
|
|
2560
|
-
];
|
|
2561
|
-
this.
|
|
2611
|
+
], "f");
|
|
2612
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2562
2613
|
});
|
|
2563
2614
|
}
|
|
2564
2615
|
else {
|
|
2565
|
-
this
|
|
2566
|
-
this.
|
|
2616
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__tokens, value, "f");
|
|
2617
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2567
2618
|
}
|
|
2568
2619
|
}
|
|
2569
2620
|
get value() {
|
|
2570
|
-
return this
|
|
2621
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__value, "f") ? __classPrivateFieldGet(this, _SkyLookupComponent__value, "f") : [];
|
|
2571
2622
|
}
|
|
2572
2623
|
set value(newValue) {
|
|
2573
|
-
this
|
|
2574
|
-
if (!this
|
|
2575
|
-
this.tokens = this.
|
|
2624
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__value, newValue, "f");
|
|
2625
|
+
if (!__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f")) {
|
|
2626
|
+
this.tokens = __classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_parseTokens).call(this, newValue);
|
|
2576
2627
|
}
|
|
2577
|
-
this.onChange(this
|
|
2628
|
+
this.onChange(__classPrivateFieldGet(this, _SkyLookupComponent__value, "f"));
|
|
2578
2629
|
this.onTouched();
|
|
2579
2630
|
}
|
|
2580
2631
|
set autocompleteInputDirective(value) {
|
|
2581
|
-
this
|
|
2582
|
-
this.
|
|
2632
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__autocompleteInputDirective, value, "f");
|
|
2633
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_updateForSelectMode).call(this);
|
|
2583
2634
|
}
|
|
2584
2635
|
get autocompleteInputDirective() {
|
|
2585
|
-
return this
|
|
2636
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__autocompleteInputDirective, "f");
|
|
2586
2637
|
}
|
|
2587
2638
|
ngOnInit() {
|
|
2588
2639
|
if (this.inputBoxHostSvc) {
|
|
@@ -2601,32 +2652,32 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2601
2652
|
// This is required for the autocomplete directive to be set after elements
|
|
2602
2653
|
// are rearranged when switching themes.
|
|
2603
2654
|
this.themeSvc.settingsChange
|
|
2604
|
-
.pipe(takeUntil(this
|
|
2655
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_ngUnsubscribe, "f")))
|
|
2605
2656
|
.subscribe(() => {
|
|
2606
|
-
this.
|
|
2657
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2607
2658
|
});
|
|
2608
2659
|
}
|
|
2609
2660
|
}
|
|
2610
2661
|
ngAfterViewInit() {
|
|
2611
2662
|
if (!this.disabled) {
|
|
2612
|
-
this.
|
|
2663
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_addEventListeners).call(this);
|
|
2613
2664
|
}
|
|
2614
2665
|
}
|
|
2615
2666
|
ngOnDestroy() {
|
|
2616
|
-
this.
|
|
2617
|
-
this.
|
|
2618
|
-
this.
|
|
2667
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_removeEventListeners).call(this);
|
|
2668
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_ngUnsubscribe, "f").next();
|
|
2669
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_ngUnsubscribe, "f").complete();
|
|
2619
2670
|
this.tokensController.complete();
|
|
2620
2671
|
}
|
|
2621
2672
|
addButtonClicked() {
|
|
2622
2673
|
this.addClick.emit({
|
|
2623
|
-
itemAdded: (args) => this.
|
|
2674
|
+
itemAdded: (args) => __classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_onAddButtonComplete).call(this, args),
|
|
2624
2675
|
});
|
|
2625
2676
|
}
|
|
2626
2677
|
onAutocompleteSelectionChange(change) {
|
|
2627
2678
|
/* istanbul ignore else */
|
|
2628
2679
|
if (change.selectedItem) {
|
|
2629
|
-
this.
|
|
2680
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_addToSelected).call(this, change.selectedItem);
|
|
2630
2681
|
}
|
|
2631
2682
|
else if (this.selectMode === 'single') {
|
|
2632
2683
|
this.writeValue([]);
|
|
@@ -2641,22 +2692,22 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2641
2692
|
}
|
|
2642
2693
|
if (this.tokens !== change) {
|
|
2643
2694
|
if (change.length === 0) {
|
|
2644
|
-
this.
|
|
2695
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2645
2696
|
}
|
|
2646
2697
|
// NOTE: We do this here instead of just using the `value` setter because we need to use the
|
|
2647
2698
|
// set of tokens returned here for the purposes of setting focus (see `onTokensKeyUp`).
|
|
2648
|
-
this
|
|
2699
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__value, change.map((token) => {
|
|
2649
2700
|
return token.value;
|
|
2650
|
-
});
|
|
2701
|
+
}), "f");
|
|
2651
2702
|
this.tokens = change;
|
|
2652
|
-
this.
|
|
2653
|
-
this.onChange(this
|
|
2703
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendAutocompleteMessage).call(this, SkyAutocompleteMessageType.RepositionDropdown);
|
|
2704
|
+
this.onChange(__classPrivateFieldGet(this, _SkyLookupComponent__value, "f"));
|
|
2654
2705
|
this.onTouched();
|
|
2655
2706
|
}
|
|
2656
2707
|
}
|
|
2657
2708
|
onTokensFocusIndexOverRange() {
|
|
2658
|
-
this.
|
|
2659
|
-
this.
|
|
2709
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.setTimeout(() => {
|
|
2710
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2660
2711
|
});
|
|
2661
2712
|
}
|
|
2662
2713
|
onTokensKeyUp(event) {
|
|
@@ -2664,15 +2715,15 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2664
2715
|
if (this.selectMode !== 'single') {
|
|
2665
2716
|
switch (event.key) {
|
|
2666
2717
|
case 'Backspace':
|
|
2667
|
-
this.
|
|
2668
|
-
this.
|
|
2718
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.RemoveActiveToken);
|
|
2719
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.FocusPreviousToken);
|
|
2669
2720
|
event.preventDefault();
|
|
2670
2721
|
break;
|
|
2671
2722
|
case 'Del':
|
|
2672
2723
|
case 'Delete':
|
|
2673
|
-
this.
|
|
2674
|
-
this.
|
|
2675
|
-
this.
|
|
2724
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.RemoveActiveToken);
|
|
2725
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.setTimeout(() => {
|
|
2726
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.FocusActiveToken);
|
|
2676
2727
|
});
|
|
2677
2728
|
event.preventDefault();
|
|
2678
2729
|
break;
|
|
@@ -2681,7 +2732,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2681
2732
|
}
|
|
2682
2733
|
writeValue(value) {
|
|
2683
2734
|
this.value = value ? value : [];
|
|
2684
|
-
this.
|
|
2735
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_updateForSelectMode).call(this);
|
|
2685
2736
|
}
|
|
2686
2737
|
registerOnChange(fn) {
|
|
2687
2738
|
this.onChange = fn;
|
|
@@ -2691,22 +2742,23 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2691
2742
|
}
|
|
2692
2743
|
// Allows Angular to disable the input.
|
|
2693
2744
|
setDisabledState(disabled) {
|
|
2694
|
-
this.
|
|
2745
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_removeEventListeners).call(this);
|
|
2695
2746
|
if (!disabled) {
|
|
2696
|
-
this.
|
|
2747
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_addEventListeners).call(this);
|
|
2697
2748
|
}
|
|
2698
2749
|
this.disabled = disabled;
|
|
2699
|
-
this.
|
|
2750
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2700
2751
|
}
|
|
2701
2752
|
clearSearchText() {
|
|
2702
2753
|
this.autocompleteInputDirective.value = undefined;
|
|
2703
|
-
this.autocompleteInputDirective.inputTextValue =
|
|
2754
|
+
this.autocompleteInputDirective.inputTextValue = '';
|
|
2704
2755
|
}
|
|
2705
2756
|
// Handles when to focus on the tokens.
|
|
2706
2757
|
// Check for empty search text on keydown, before the escape key is fully pressed.
|
|
2707
2758
|
// (Otherwise, a single character being escaped would register as empty on keyup.)
|
|
2708
2759
|
// If empty on keydown, set a flag so that the appropriate action can be taken on keyup.
|
|
2709
|
-
inputKeydown(event
|
|
2760
|
+
inputKeydown(event) {
|
|
2761
|
+
const value = event.target.value;
|
|
2710
2762
|
/* Sanity check as this should only be called when in multiple select mode */
|
|
2711
2763
|
/* istanbul ignore else */
|
|
2712
2764
|
if (this.selectMode !== 'single') {
|
|
@@ -2718,10 +2770,10 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2718
2770
|
case 'Backspace':
|
|
2719
2771
|
case 'Left':
|
|
2720
2772
|
if (value) {
|
|
2721
|
-
this
|
|
2773
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_markForTokenFocusOnKeyUp, false, "f");
|
|
2722
2774
|
}
|
|
2723
2775
|
else {
|
|
2724
|
-
this
|
|
2776
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_markForTokenFocusOnKeyUp, true, "f");
|
|
2725
2777
|
}
|
|
2726
2778
|
break;
|
|
2727
2779
|
default:
|
|
@@ -2742,8 +2794,8 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2742
2794
|
case 'Backspace':
|
|
2743
2795
|
case 'Left':
|
|
2744
2796
|
/* istanbul ignore else */
|
|
2745
|
-
if (this
|
|
2746
|
-
this.
|
|
2797
|
+
if (__classPrivateFieldGet(this, _SkyLookupComponent_markForTokenFocusOnKeyUp, "f")) {
|
|
2798
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.FocusLastToken);
|
|
2747
2799
|
event.preventDefault();
|
|
2748
2800
|
}
|
|
2749
2801
|
break;
|
|
@@ -2757,7 +2809,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2757
2809
|
if (this.disabled) {
|
|
2758
2810
|
return;
|
|
2759
2811
|
}
|
|
2760
|
-
this.
|
|
2812
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendAutocompleteMessage).call(this, SkyAutocompleteMessageType.CloseDropdown);
|
|
2761
2813
|
let isValueInTextBox = false;
|
|
2762
2814
|
if (this.selectMode === 'single') {
|
|
2763
2815
|
isValueInTextBox =
|
|
@@ -2775,67 +2827,23 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2775
2827
|
this.openPicker(event.inputValue);
|
|
2776
2828
|
}
|
|
2777
2829
|
}
|
|
2778
|
-
createNativePickerInstance(initialSearch) {
|
|
2779
|
-
var _a;
|
|
2780
|
-
const initialValue = this.value;
|
|
2781
|
-
const modalConfig = ((_a = this.showMoreConfig) === null || _a === void 0 ? void 0 : _a.nativePickerConfig) || {};
|
|
2782
|
-
if (!modalConfig.itemTemplate) {
|
|
2783
|
-
modalConfig.itemTemplate = this.searchResultTemplate;
|
|
2784
|
-
}
|
|
2785
|
-
let contextProviderType;
|
|
2786
|
-
let contextProviderValue;
|
|
2787
|
-
let modalComponentType;
|
|
2788
|
-
if (this.searchAsync.observers.length > 0) {
|
|
2789
|
-
contextProviderType = SkyLookupShowMoreNativePickerAsyncContext;
|
|
2790
|
-
modalComponentType = SkyLookupShowMoreAsyncModalComponent;
|
|
2791
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext();
|
|
2792
|
-
contextProviderValue.idProperty = this.idProperty;
|
|
2793
|
-
contextProviderValue.searchAsync = (args) => {
|
|
2794
|
-
this.searchAsync.emit(args);
|
|
2795
|
-
return args.result;
|
|
2796
|
-
};
|
|
2797
|
-
}
|
|
2798
|
-
else {
|
|
2799
|
-
contextProviderType = SkyLookupShowMoreNativePickerContext;
|
|
2800
|
-
modalComponentType = SkyLookupShowMoreModalComponent;
|
|
2801
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerContext();
|
|
2802
|
-
contextProviderValue.items = this.data;
|
|
2803
|
-
contextProviderValue.search = this.search;
|
|
2804
|
-
}
|
|
2805
|
-
contextProviderValue.descriptorProperty = this.descriptorProperty;
|
|
2806
|
-
contextProviderValue.initialSearch = initialSearch;
|
|
2807
|
-
contextProviderValue.initialValue = initialValue;
|
|
2808
|
-
contextProviderValue.selectMode = this.selectMode;
|
|
2809
|
-
contextProviderValue.showAddButton = this.showAddButton;
|
|
2810
|
-
contextProviderValue.userConfig = modalConfig;
|
|
2811
|
-
return this.modalService.open(modalComponentType, {
|
|
2812
|
-
providers: [
|
|
2813
|
-
{
|
|
2814
|
-
provide: contextProviderType,
|
|
2815
|
-
useValue: contextProviderValue,
|
|
2816
|
-
},
|
|
2817
|
-
],
|
|
2818
|
-
size: 'large',
|
|
2819
|
-
wrapperClass: this.wrapperClass,
|
|
2820
|
-
});
|
|
2821
|
-
}
|
|
2822
2830
|
openPicker(initialSearch) {
|
|
2823
2831
|
var _a;
|
|
2824
2832
|
if ((_a = this.showMoreConfig) === null || _a === void 0 ? void 0 : _a.customPicker) {
|
|
2825
2833
|
this.showMoreConfig.customPicker.open({
|
|
2826
2834
|
items: this.data,
|
|
2827
|
-
initialSearch
|
|
2835
|
+
initialSearch,
|
|
2828
2836
|
initialValue: this.value,
|
|
2829
2837
|
});
|
|
2830
2838
|
}
|
|
2831
2839
|
else {
|
|
2832
2840
|
const initialValue = this.value;
|
|
2833
|
-
this
|
|
2834
|
-
this.
|
|
2841
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_openNativePicker, __classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_createNativePickerInstance).call(this, initialSearch), "f");
|
|
2842
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f").componentInstance.addClick.subscribe(() => {
|
|
2835
2843
|
this.addButtonClicked();
|
|
2836
2844
|
});
|
|
2837
|
-
this.
|
|
2838
|
-
this
|
|
2845
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f").closed.subscribe((closeArgs) => {
|
|
2846
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_openNativePicker, undefined, "f");
|
|
2839
2847
|
if (closeArgs.reason === 'save') {
|
|
2840
2848
|
let selectedItems = [];
|
|
2841
2849
|
if (this.searchAsync.observers.length > 0) {
|
|
@@ -2855,132 +2863,167 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2855
2863
|
else {
|
|
2856
2864
|
this.writeValue(initialValue);
|
|
2857
2865
|
}
|
|
2858
|
-
this.
|
|
2859
|
-
this.
|
|
2866
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2867
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2860
2868
|
});
|
|
2861
2869
|
}
|
|
2862
2870
|
}
|
|
2863
2871
|
onSearchAsync(args) {
|
|
2864
2872
|
this.searchAsync.emit(args);
|
|
2865
2873
|
}
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2874
|
+
}
|
|
2875
|
+
_SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = new WeakMap(), _SkyLookupComponent_changeDetector = new WeakMap(), _SkyLookupComponent_idle = new WeakMap(), _SkyLookupComponent_markForTokenFocusOnKeyUp = new WeakMap(), _SkyLookupComponent_modalService = new WeakMap(), _SkyLookupComponent_ngUnsubscribe = new WeakMap(), _SkyLookupComponent_openNativePicker = new WeakMap(), _SkyLookupComponent_resourcesService = new WeakMap(), _SkyLookupComponent_windowRef = new WeakMap(), _SkyLookupComponent__autocompleteInputDirective = new WeakMap(), _SkyLookupComponent__data = new WeakMap(), _SkyLookupComponent__selectMode = new WeakMap(), _SkyLookupComponent__tokens = new WeakMap(), _SkyLookupComponent__value = new WeakMap(), _SkyLookupComponent_instances = new WeakSet(), _SkyLookupComponent_createNativePickerInstance = function _SkyLookupComponent_createNativePickerInstance(initialSearch) {
|
|
2876
|
+
var _a;
|
|
2877
|
+
const initialValue = this.value;
|
|
2878
|
+
const modalConfig = ((_a = this.showMoreConfig) === null || _a === void 0 ? void 0 : _a.nativePickerConfig) || {};
|
|
2879
|
+
if (!modalConfig.itemTemplate) {
|
|
2880
|
+
modalConfig.itemTemplate = this.searchResultTemplate;
|
|
2881
|
+
}
|
|
2882
|
+
let contextProviderType;
|
|
2883
|
+
let contextProviderValue;
|
|
2884
|
+
let modalComponentType;
|
|
2885
|
+
if (this.searchAsync.observers.length > 0) {
|
|
2886
|
+
contextProviderType = SkyLookupShowMoreNativePickerAsyncContext;
|
|
2887
|
+
modalComponentType = SkyLookupShowMoreAsyncModalComponent;
|
|
2888
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext();
|
|
2889
|
+
contextProviderValue.idProperty = this.idProperty;
|
|
2890
|
+
contextProviderValue.searchAsync = (args) => {
|
|
2891
|
+
this.searchAsync.emit(args);
|
|
2892
|
+
return args.result;
|
|
2893
|
+
};
|
|
2885
2894
|
}
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2895
|
+
else {
|
|
2896
|
+
contextProviderType = SkyLookupShowMoreNativePickerContext;
|
|
2897
|
+
modalComponentType = SkyLookupShowMoreModalComponent;
|
|
2898
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerContext();
|
|
2899
|
+
contextProviderValue.items = this.data;
|
|
2900
|
+
contextProviderValue.search = this.search;
|
|
2901
|
+
}
|
|
2902
|
+
contextProviderValue.descriptorProperty = this.descriptorProperty;
|
|
2903
|
+
contextProviderValue.initialSearch = initialSearch;
|
|
2904
|
+
contextProviderValue.initialValue = initialValue;
|
|
2905
|
+
contextProviderValue.selectMode = this.selectMode;
|
|
2906
|
+
contextProviderValue.showAddButton = this.showAddButton;
|
|
2907
|
+
contextProviderValue.userConfig = modalConfig;
|
|
2908
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent_modalService, "f").open(modalComponentType, {
|
|
2909
|
+
providers: [
|
|
2910
|
+
{
|
|
2911
|
+
provide: contextProviderType,
|
|
2912
|
+
useValue: contextProviderValue,
|
|
2913
|
+
},
|
|
2914
|
+
],
|
|
2915
|
+
size: 'large',
|
|
2916
|
+
wrapperClass: this.wrapperClass,
|
|
2917
|
+
});
|
|
2918
|
+
}, _SkyLookupComponent_addToSelected = function _SkyLookupComponent_addToSelected(item) {
|
|
2919
|
+
let selectedItems;
|
|
2920
|
+
if (this.selectMode === 'single') {
|
|
2921
|
+
selectedItems = [item];
|
|
2889
2922
|
}
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2923
|
+
else {
|
|
2924
|
+
selectedItems = this.value;
|
|
2925
|
+
const idProperty = this.idProperty || '';
|
|
2926
|
+
// If items have a unique identifier, don't allow the same item to be added twice.
|
|
2927
|
+
if (!this.idProperty ||
|
|
2928
|
+
!this.value.some((existingItem) => existingItem[idProperty] === item[idProperty])) {
|
|
2929
|
+
selectedItems.push(item);
|
|
2930
|
+
}
|
|
2931
|
+
this.clearSearchText();
|
|
2932
|
+
}
|
|
2933
|
+
this.writeValue(selectedItems);
|
|
2934
|
+
}, _SkyLookupComponent_addEventListeners = function _SkyLookupComponent_addEventListeners() {
|
|
2935
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_idle, new Subject(), "f");
|
|
2936
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInputOnHostClick).call(this);
|
|
2937
|
+
}, _SkyLookupComponent_removeEventListeners = function _SkyLookupComponent_removeEventListeners() {
|
|
2938
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f").next();
|
|
2939
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f").complete();
|
|
2940
|
+
}, _SkyLookupComponent_focusInputOnHostClick = function _SkyLookupComponent_focusInputOnHostClick() {
|
|
2941
|
+
let hostElement = !this.inputBoxHostSvc
|
|
2942
|
+
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2943
|
+
: this.lookupWrapperRef.nativeElement;
|
|
2944
|
+
const documentObj = __classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.document;
|
|
2945
|
+
// Handles focusing the input when the host is clicked.
|
|
2946
|
+
// The input should NOT be focused if other elements (tokens, etc.)
|
|
2947
|
+
// are currently focused or being tabbed through.
|
|
2948
|
+
fromEvent(documentObj, 'mousedown')
|
|
2949
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2950
|
+
.subscribe((event) => {
|
|
2951
|
+
hostElement = !this.inputBoxHostSvc
|
|
2952
|
+
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2893
2953
|
: this.lookupWrapperRef.nativeElement;
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
const classList = documentObj.activeElement.classList;
|
|
2920
|
-
if (!classList || !classList.contains('sky-token')) {
|
|
2921
|
-
this.focusInput();
|
|
2922
|
-
}
|
|
2923
|
-
});
|
|
2924
|
-
}
|
|
2925
|
-
focusInput() {
|
|
2926
|
-
this.adapter.focusInput(this.lookupWrapperRef);
|
|
2954
|
+
this.isInputFocused = hostElement.contains(event.target);
|
|
2955
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2956
|
+
});
|
|
2957
|
+
fromEvent(documentObj, 'focusin')
|
|
2958
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2959
|
+
.subscribe((event) => {
|
|
2960
|
+
hostElement = !this.inputBoxHostSvc
|
|
2961
|
+
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2962
|
+
: this.lookupWrapperRef.nativeElement;
|
|
2963
|
+
this.isInputFocused = hostElement.contains(event.target);
|
|
2964
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2965
|
+
});
|
|
2966
|
+
fromEvent(hostElement, 'mouseup')
|
|
2967
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2968
|
+
.subscribe(() => {
|
|
2969
|
+
const classList = documentObj.activeElement.classList;
|
|
2970
|
+
if (!classList || !classList.contains('sky-token')) {
|
|
2971
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2972
|
+
}
|
|
2973
|
+
});
|
|
2974
|
+
}, _SkyLookupComponent_focusInput = function _SkyLookupComponent_focusInput() {
|
|
2975
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_adapter, "f").focusInput(this.lookupWrapperRef);
|
|
2976
|
+
}, _SkyLookupComponent_onAddButtonComplete = function _SkyLookupComponent_onAddButtonComplete(args) {
|
|
2977
|
+
if (args.data) {
|
|
2978
|
+
this.data = args.data;
|
|
2927
2979
|
}
|
|
2928
|
-
|
|
2929
|
-
if (
|
|
2930
|
-
this
|
|
2980
|
+
if (this.data.indexOf(args.item) >= 0) {
|
|
2981
|
+
if (__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f")) {
|
|
2982
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f")
|
|
2983
|
+
.componentInstance.onItemSelect(true, { value: args.item, selected: false });
|
|
2931
2984
|
}
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2985
|
+
else {
|
|
2986
|
+
let newValue = this.value;
|
|
2987
|
+
if (this.selectMode === 'multiple') {
|
|
2988
|
+
newValue = this.value.concat(args.item);
|
|
2936
2989
|
}
|
|
2937
2990
|
else {
|
|
2938
|
-
|
|
2939
|
-
if (this.selectMode === 'multiple') {
|
|
2940
|
-
newValue = this.value.concat(args.item);
|
|
2941
|
-
}
|
|
2942
|
-
else {
|
|
2943
|
-
newValue = [args.item];
|
|
2944
|
-
}
|
|
2945
|
-
this.writeValue(newValue);
|
|
2991
|
+
newValue = [args.item];
|
|
2946
2992
|
}
|
|
2993
|
+
this.writeValue(newValue);
|
|
2947
2994
|
}
|
|
2948
2995
|
}
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
}
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
}
|
|
2967
|
-
else {
|
|
2968
|
-
this.clearSearchText();
|
|
2969
|
-
}
|
|
2996
|
+
}, _SkyLookupComponent_parseTokens = function _SkyLookupComponent_parseTokens(data) {
|
|
2997
|
+
return data.map((item) => {
|
|
2998
|
+
return {
|
|
2999
|
+
value: item,
|
|
3000
|
+
};
|
|
3001
|
+
});
|
|
3002
|
+
}, _SkyLookupComponent_sendAutocompleteMessage = function _SkyLookupComponent_sendAutocompleteMessage(type) {
|
|
3003
|
+
this.autocompleteController.next({ type });
|
|
3004
|
+
}, _SkyLookupComponent_sendTokensMessage = function _SkyLookupComponent_sendTokensMessage(type) {
|
|
3005
|
+
this.tokensController.next({ type });
|
|
3006
|
+
}, _SkyLookupComponent_updateForSelectMode = function _SkyLookupComponent_updateForSelectMode() {
|
|
3007
|
+
if (this.autocompleteInputDirective) {
|
|
3008
|
+
if (this.selectMode === 'single') {
|
|
3009
|
+
this.autocompleteInputDirective.value = this.value && this.value[0];
|
|
3010
|
+
}
|
|
3011
|
+
else {
|
|
3012
|
+
this.clearSearchText();
|
|
2970
3013
|
}
|
|
2971
3014
|
}
|
|
2972
|
-
}
|
|
2973
|
-
SkyLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyAppWindowRef }, { token:
|
|
2974
|
-
SkyLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLookupComponent, selector: "sky-lookup", inputs: { ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", autocompleteAttribute: "autocompleteAttribute", data: "data", disabled: "disabled", enableShowMore: "enableShowMore", placeholderText: "placeholderText", idProperty: "idProperty", showAddButton: "showAddButton", showMoreConfig: "showMoreConfig", selectMode: "selectMode", wrapperClass: "wrapperClass" }, outputs: { addClick: "addClick" }, providers: [SkyLookupAdapterService], viewQueries: [{ propertyName: "autocompleteInputDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true, read: SkyAutocompleteInputDirective }, { propertyName: "showMoreButtonTemplateRef", first: true, predicate: ["showMoreButtonTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "lookupWrapperRef", first: true, predicate: ["lookupWrapper"], descendants: true, read: ElementRef }, { propertyName: "searchIconTemplateRef", first: true, predicate: ["searchIconTemplateRef"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <div\n class=\"sky-lookup\"\n [ngClass]=\"{\n 'sky-lookup-focused': isInputFocused,\n 'sky-lookup-disabled': disabled,\n 'sky-lookup-single': selectMode === 'single'\n }\"\n #lookupWrapper\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"ariaLabelledBy\"\n [data]=\"data\"\n [debounceTime]=\"debounceTime\"\n [descriptorProperty]=\"descriptorProperty\"\n [enableShowMore]=\"enableShowMore\"\n [messageStream]=\"autocompleteController\"\n [propertiesToSearch]=\"propertiesToSearch\"\n [search]=\"search\"\n [searchAsyncDisabled]=\"searchAsync.observers.length === 0\"\n [searchFilters]=\"searchFilters\"\n [searchResultsLimit]=\"searchResultsLimit\"\n [searchResultTemplate]=\"searchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n [showAddButton]=\"showAddButton\"\n [wrapperClass]=\"wrapperClass\"\n (addClick)=\"addButtonClicked()\"\n (searchAsync)=\"onSearchAsync($event)\"\n (selectionChange)=\"onAutocompleteSelectionChange($event)\"\n (showMoreClick)=\"onShowMoreClick($event)\"\n >\n <div class=\"sky-lookup-search-flex-wrapper\">\n <div\n class=\"sky-lookup-search\"\n [ngClass]=\"{\n 'sky-field-status-active': isInputFocused && !disabled\n }\"\n >\n <sky-tokens\n *ngIf=\"selectMode === 'multiple'\"\n class=\"sky-lookup-tokens\"\n [disabled]=\"disabled\"\n [displayWith]=\"descriptorProperty\"\n [focusable]=\"false\"\n [messageStream]=\"tokensController\"\n [trackWith]=\"idProperty\"\n [tokens]=\"tokens\"\n (keyup)=\"onTokensKeyUp($event)\"\n (tokensChange)=\"onTokensChange($event)\"\n (tokenSelected)=\"enableShowMore ? openPicker(undefined) : undefined\"\n (focusIndexOverRange)=\"onTokensFocusIndexOverRange()\"\n >\n <textarea\n class=\"sky-form-control sky-lookup-input\"\n rows=\"1\"\n skyAutocomplete\n wrap=\"off\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.placeholder]=\"placeholderText\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [disabled]=\"disabled\"\n (blur)=\"onAutocompleteBlur()\"\n (keydown)=\"inputKeydown($event, $event.target.value)\"\n (keyup)=\"inputKeyup($event)\"\n ></textarea>\n </sky-tokens>\n <div\n *ngIf=\"selectMode === 'single'\"\n class=\"sky-lookup-single-control\"\n >\n <textarea\n class=\"sky-form-control sky-lookup-input\"\n rows=\"1\"\n skyAutocomplete\n wrap=\"off\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.placeholder]=\"placeholderText\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [disabled]=\"disabled\"\n (blur)=\"onAutocompleteBlur()\"\n ></textarea>\n </div>\n </div>\n <ng-container *ngIf=\"!inputBoxHostSvc && enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"showMoreButtonTemplateRef\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!inputBoxHostSvc && !enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplateRef\"\n ></ng-container>\n </ng-container>\n </div>\n </sky-autocomplete>\n </div>\n</ng-template>\n\n<ng-template #showMoreButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n class=\"sky-btn sky-btn-default\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'sky-btn-disabled': disabled }\"\n type=\"button\"\n [attr.aria-label]=\"\n 'skyux_lookup_search_button_show_more' | skyLibResources\n \"\n (click)=\"onSearchButtonClick()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"search\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n iconType=\"skyux\"\n icon=\"search\"\n ></sky-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #searchIconTemplateRef>\n <div\n class=\"sky-input-group-icon sky-input-box-icon-inset\"\n [ngClass]=\"{ 'sky-lookup-disabled': disabled }\"\n >\n <sky-icon\n *skyThemeIf=\"'default'\"\n icon=\"search\"\n [attr.aria-label]=\"'skyux_lookup_search_icon' | skyLibResources\"\n ></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n iconType=\"skyux\"\n icon=\"search\"\n [attr.aria-label]=\"'skyux_lookup_search_icon' | skyLibResources\"\n ></sky-icon>\n </div>\n</ng-template>\n", styles: [".sky-lookup .sky-lookup-input.sky-form-control{resize:none;border:0;box-sizing:content-box;height:1.428571429em;overflow:hidden;padding:0;background-color:transparent}.sky-lookup .sky-lookup-input.sky-form-control:focus{outline:none;box-shadow:none}.sky-lookup .sky-lookup-search-flex-wrapper{display:flex}.sky-lookup.sky-lookup-disabled .sky-lookup-search{background-color:#cdcfd2}.sky-lookup sky-tokens.sky-lookup-tokens:focus{outline:none}.sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-5px;margin-bottom:-5px}.sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-top:5px;padding-bottom:5px;padding-left:10px;flex-basis:100px}.sky-lookup .sky-lookup-single-control{display:inline-flex;padding-left:7px;width:100%}.sky-lookup-search{cursor:text;background-color:#fff;line-height:1.428571429em;padding:6px 12px 6px 3px;flex-grow:1}.sky-lookup-search:not(.sky-field-status-active){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}.sky-lookup-disabled .sky-lookup-search{cursor:default}.sky-lookup-focused .sky-tokens-content{flex-basis:100px}.sky-lookup-single sky-tokens.sky-lookup-tokens sky-token{display:none}sky-lookup.ng-invalid.ng-touched .sky-lookup-search{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044;outline:none}sky-input-box .sky-lookup{width:100%}sky-input-box .sky-lookup .sky-lookup-search{border:none;padding-bottom:5px;width:100%}:host-context(.sky-theme-modern) sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-6px}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:0;margin-bottom:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens sky-token{padding-bottom:0;padding-top:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-bottom:0;padding-top:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content:first-child{padding-left:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup.sky-lookup-single sky-tokens.sky-lookup-tokens .sky-tokens-content{padding-left:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-search{background-color:transparent;padding:0 0 0 15px}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-search.sky-field-status-active{box-shadow:none}:host-context(.sky-theme-modern) sky-input-box .sky-lookup textarea.sky-lookup-input.sky-form-control{padding-left:0;resize:none}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-single-control{padding-left:0}.sky-theme-modern sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-6px}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:0;margin-bottom:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens sky-token{padding-bottom:0;padding-top:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-bottom:0;padding-top:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content:first-child{padding-left:0}.sky-theme-modern sky-input-box .sky-lookup.sky-lookup-single sky-tokens.sky-lookup-tokens .sky-tokens-content{padding-left:0}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-search{background-color:transparent;padding:0 0 0 15px}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-search.sky-field-status-active{box-shadow:none}.sky-theme-modern sky-input-box .sky-lookup textarea.sky-lookup-input.sky-form-control{padding-left:0;resize:none}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-single-control{padding-left:0}\n"], components: [{ type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync"] }, { type: i4.λ13, selector: "sky-tokens", inputs: ["disabled", "dismissible", "displayWith", "trackWith", "focusable", "tokens", "messageStream"], outputs: ["focusIndexOverRange", "focusIndexUnderRange", "tokenSelected", "tokensChange"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: SkyAutocompleteInputDirective, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3015
|
+
};
|
|
3016
|
+
SkyLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyAppWindowRef }, { token: SkyLookupAdapterService }, { token: i1$1.SkyModalService }, { token: i4$1.SkyLibResourcesService }, { token: i8.NgControl, optional: true, self: true }, { token: i6.SkyInputBoxHostService, optional: true }, { token: i7.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3017
|
+
SkyLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLookupComponent, selector: "sky-lookup", inputs: { ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", autocompleteAttribute: "autocompleteAttribute", data: "data", disabled: "disabled", enableShowMore: "enableShowMore", placeholderText: "placeholderText", idProperty: "idProperty", showAddButton: "showAddButton", showMoreConfig: "showMoreConfig", selectMode: "selectMode", wrapperClass: "wrapperClass" }, outputs: { addClick: "addClick" }, providers: [SkyLookupAdapterService], viewQueries: [{ propertyName: "autocompleteInputDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true, read: SkyAutocompleteInputDirective }, { propertyName: "showMoreButtonTemplateRef", first: true, predicate: ["showMoreButtonTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "inputTemplateRef", first: true, predicate: ["inputTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "lookupWrapperRef", first: true, predicate: ["lookupWrapper"], descendants: true, read: ElementRef }, { propertyName: "searchIconTemplateRef", first: true, predicate: ["searchIconTemplateRef"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <div\n class=\"sky-lookup\"\n [ngClass]=\"{\n 'sky-lookup-focused': isInputFocused,\n 'sky-lookup-disabled': disabled,\n 'sky-lookup-single': selectMode === 'single'\n }\"\n #lookupWrapper\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"ariaLabelledBy\"\n [data]=\"data\"\n [debounceTime]=\"debounceTime\"\n [descriptorProperty]=\"descriptorProperty\"\n [enableShowMore]=\"enableShowMore\"\n [messageStream]=\"autocompleteController\"\n [propertiesToSearch]=\"propertiesToSearch\"\n [search]=\"search\"\n [searchAsyncDisabled]=\"searchAsync.observers.length === 0\"\n [searchFilters]=\"searchFilters\"\n [searchResultsLimit]=\"searchResultsLimit\"\n [searchResultTemplate]=\"searchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n [showAddButton]=\"showAddButton\"\n [wrapperClass]=\"wrapperClass\"\n (addClick)=\"addButtonClicked()\"\n (searchAsync)=\"onSearchAsync($event)\"\n (selectionChange)=\"onAutocompleteSelectionChange($event)\"\n (showMoreClick)=\"onShowMoreClick($event)\"\n >\n <div class=\"sky-lookup-search-flex-wrapper\">\n <div\n class=\"sky-lookup-search\"\n [ngClass]=\"{\n 'sky-field-status-active': isInputFocused && !disabled\n }\"\n >\n <sky-tokens\n *ngIf=\"selectMode === 'multiple'\"\n class=\"sky-lookup-tokens\"\n [disabled]=\"disabled\"\n [displayWith]=\"descriptorProperty\"\n [focusable]=\"false\"\n [messageStream]=\"tokensController\"\n [trackWith]=\"idProperty\"\n [tokens]=\"tokens\"\n (keyup)=\"onTokensKeyUp($event)\"\n (tokensChange)=\"onTokensChange($event)\"\n (tokenSelected)=\"enableShowMore ? openPicker('') : undefined\"\n (focusIndexOverRange)=\"onTokensFocusIndexOverRange()\"\n >\n <textarea\n class=\"sky-form-control sky-lookup-input\"\n rows=\"1\"\n skyAutocomplete\n wrap=\"off\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.placeholder]=\"placeholderText\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [disabled]=\"disabled\"\n (blur)=\"onAutocompleteBlur()\"\n (keydown)=\"inputKeydown($event)\"\n (keyup)=\"inputKeyup($event)\"\n ></textarea>\n </sky-tokens>\n <div\n *ngIf=\"selectMode === 'single'\"\n class=\"sky-lookup-single-control\"\n >\n <textarea\n class=\"sky-form-control sky-lookup-input\"\n rows=\"1\"\n skyAutocomplete\n wrap=\"off\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.placeholder]=\"placeholderText\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [disabled]=\"disabled\"\n (blur)=\"onAutocompleteBlur()\"\n ></textarea>\n </div>\n </div>\n <ng-container *ngIf=\"!inputBoxHostSvc && enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"showMoreButtonTemplateRef\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!inputBoxHostSvc && !enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplateRef\"\n ></ng-container>\n </ng-container>\n </div>\n </sky-autocomplete>\n </div>\n</ng-template>\n\n<ng-template #showMoreButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n class=\"sky-btn sky-btn-default\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'sky-btn-disabled': disabled }\"\n type=\"button\"\n [attr.aria-label]=\"\n 'skyux_lookup_search_button_show_more' | skyLibResources\n \"\n (click)=\"onSearchButtonClick()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"search\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n iconType=\"skyux\"\n icon=\"search\"\n ></sky-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #searchIconTemplateRef>\n <div\n class=\"sky-input-group-icon sky-input-box-icon-inset\"\n [ngClass]=\"{ 'sky-lookup-disabled': disabled }\"\n >\n <sky-icon\n *skyThemeIf=\"'default'\"\n icon=\"search\"\n [attr.aria-label]=\"'skyux_lookup_search_icon' | skyLibResources\"\n ></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n iconType=\"skyux\"\n icon=\"search\"\n [attr.aria-label]=\"'skyux_lookup_search_icon' | skyLibResources\"\n ></sky-icon>\n </div>\n</ng-template>\n", styles: [".sky-lookup .sky-lookup-input.sky-form-control{resize:none;border:0;box-sizing:content-box;height:1.428571429em;overflow:hidden;padding:0;background-color:transparent}.sky-lookup .sky-lookup-input.sky-form-control:focus{outline:none;box-shadow:none}.sky-lookup .sky-lookup-search-flex-wrapper{display:flex}.sky-lookup.sky-lookup-disabled .sky-lookup-search{background-color:#cdcfd2}.sky-lookup sky-tokens.sky-lookup-tokens:focus{outline:none}.sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-5px;margin-bottom:-5px}.sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-top:5px;padding-bottom:5px;padding-left:10px;flex-basis:100px}.sky-lookup .sky-lookup-single-control{display:inline-flex;padding-left:7px;width:100%}.sky-lookup-search{cursor:text;background-color:#fff;line-height:1.428571429em;padding:6px 12px 6px 3px;flex-grow:1}.sky-lookup-search:not(.sky-field-status-active){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}.sky-lookup-disabled .sky-lookup-search{cursor:default}.sky-lookup-focused .sky-tokens-content{flex-basis:100px}.sky-lookup-single sky-tokens.sky-lookup-tokens sky-token{display:none}sky-lookup.ng-invalid.ng-touched .sky-lookup-search{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044;outline:none}sky-input-box .sky-lookup{width:100%}sky-input-box .sky-lookup .sky-lookup-search{border:none;padding-bottom:5px;width:100%}:host-context(.sky-theme-modern) sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-6px}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:0;margin-bottom:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens sky-token{padding-bottom:0;padding-top:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-bottom:0;padding-top:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content:first-child{padding-left:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup.sky-lookup-single sky-tokens.sky-lookup-tokens .sky-tokens-content{padding-left:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-search{background-color:transparent;padding:0 0 0 15px}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-search.sky-field-status-active{box-shadow:none}:host-context(.sky-theme-modern) sky-input-box .sky-lookup textarea.sky-lookup-input.sky-form-control{padding-left:0;resize:none}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-single-control{padding-left:0}.sky-theme-modern sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-6px}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:0;margin-bottom:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens sky-token{padding-bottom:0;padding-top:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-bottom:0;padding-top:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content:first-child{padding-left:0}.sky-theme-modern sky-input-box .sky-lookup.sky-lookup-single sky-tokens.sky-lookup-tokens .sky-tokens-content{padding-left:0}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-search{background-color:transparent;padding:0 0 0 15px}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-search.sky-field-status-active{box-shadow:none}.sky-theme-modern sky-input-box .sky-lookup textarea.sky-lookup-input.sky-form-control{padding-left:0;resize:none}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-single-control{padding-left:0}\n"], components: [{ type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync"] }, { type: i4.λ13, selector: "sky-tokens", inputs: ["disabled", "dismissible", "displayWith", "trackWith", "focusable", "tokens", "messageStream"], outputs: ["focusIndexOverRange", "focusIndexUnderRange", "tokenSelected", "tokensChange"] }, { type: i4.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i6$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: SkyAutocompleteInputDirective, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2975
3018
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupComponent, decorators: [{
|
|
2976
3019
|
type: Component,
|
|
2977
|
-
args: [{ selector: 'sky-lookup', providers: [SkyLookupAdapterService], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <div\n class=\"sky-lookup\"\n [ngClass]=\"{\n 'sky-lookup-focused': isInputFocused,\n 'sky-lookup-disabled': disabled,\n 'sky-lookup-single': selectMode === 'single'\n }\"\n #lookupWrapper\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"ariaLabelledBy\"\n [data]=\"data\"\n [debounceTime]=\"debounceTime\"\n [descriptorProperty]=\"descriptorProperty\"\n [enableShowMore]=\"enableShowMore\"\n [messageStream]=\"autocompleteController\"\n [propertiesToSearch]=\"propertiesToSearch\"\n [search]=\"search\"\n [searchAsyncDisabled]=\"searchAsync.observers.length === 0\"\n [searchFilters]=\"searchFilters\"\n [searchResultsLimit]=\"searchResultsLimit\"\n [searchResultTemplate]=\"searchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n [showAddButton]=\"showAddButton\"\n [wrapperClass]=\"wrapperClass\"\n (addClick)=\"addButtonClicked()\"\n (searchAsync)=\"onSearchAsync($event)\"\n (selectionChange)=\"onAutocompleteSelectionChange($event)\"\n (showMoreClick)=\"onShowMoreClick($event)\"\n >\n <div class=\"sky-lookup-search-flex-wrapper\">\n <div\n class=\"sky-lookup-search\"\n [ngClass]=\"{\n 'sky-field-status-active': isInputFocused && !disabled\n }\"\n >\n <sky-tokens\n *ngIf=\"selectMode === 'multiple'\"\n class=\"sky-lookup-tokens\"\n [disabled]=\"disabled\"\n [displayWith]=\"descriptorProperty\"\n [focusable]=\"false\"\n [messageStream]=\"tokensController\"\n [trackWith]=\"idProperty\"\n [tokens]=\"tokens\"\n (keyup)=\"onTokensKeyUp($event)\"\n (tokensChange)=\"onTokensChange($event)\"\n (tokenSelected)=\"enableShowMore ? openPicker(
|
|
3020
|
+
args: [{ selector: 'sky-lookup', providers: [SkyLookupAdapterService], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <div\n class=\"sky-lookup\"\n [ngClass]=\"{\n 'sky-lookup-focused': isInputFocused,\n 'sky-lookup-disabled': disabled,\n 'sky-lookup-single': selectMode === 'single'\n }\"\n #lookupWrapper\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"ariaLabelledBy\"\n [data]=\"data\"\n [debounceTime]=\"debounceTime\"\n [descriptorProperty]=\"descriptorProperty\"\n [enableShowMore]=\"enableShowMore\"\n [messageStream]=\"autocompleteController\"\n [propertiesToSearch]=\"propertiesToSearch\"\n [search]=\"search\"\n [searchAsyncDisabled]=\"searchAsync.observers.length === 0\"\n [searchFilters]=\"searchFilters\"\n [searchResultsLimit]=\"searchResultsLimit\"\n [searchResultTemplate]=\"searchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n [showAddButton]=\"showAddButton\"\n [wrapperClass]=\"wrapperClass\"\n (addClick)=\"addButtonClicked()\"\n (searchAsync)=\"onSearchAsync($event)\"\n (selectionChange)=\"onAutocompleteSelectionChange($event)\"\n (showMoreClick)=\"onShowMoreClick($event)\"\n >\n <div class=\"sky-lookup-search-flex-wrapper\">\n <div\n class=\"sky-lookup-search\"\n [ngClass]=\"{\n 'sky-field-status-active': isInputFocused && !disabled\n }\"\n >\n <sky-tokens\n *ngIf=\"selectMode === 'multiple'\"\n class=\"sky-lookup-tokens\"\n [disabled]=\"disabled\"\n [displayWith]=\"descriptorProperty\"\n [focusable]=\"false\"\n [messageStream]=\"tokensController\"\n [trackWith]=\"idProperty\"\n [tokens]=\"tokens\"\n (keyup)=\"onTokensKeyUp($event)\"\n (tokensChange)=\"onTokensChange($event)\"\n (tokenSelected)=\"enableShowMore ? openPicker('') : undefined\"\n (focusIndexOverRange)=\"onTokensFocusIndexOverRange()\"\n >\n <textarea\n class=\"sky-form-control sky-lookup-input\"\n rows=\"1\"\n skyAutocomplete\n wrap=\"off\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.placeholder]=\"placeholderText\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [disabled]=\"disabled\"\n (blur)=\"onAutocompleteBlur()\"\n (keydown)=\"inputKeydown($event)\"\n (keyup)=\"inputKeyup($event)\"\n ></textarea>\n </sky-tokens>\n <div\n *ngIf=\"selectMode === 'single'\"\n class=\"sky-lookup-single-control\"\n >\n <textarea\n class=\"sky-form-control sky-lookup-input\"\n rows=\"1\"\n skyAutocomplete\n wrap=\"off\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.placeholder]=\"placeholderText\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [disabled]=\"disabled\"\n (blur)=\"onAutocompleteBlur()\"\n ></textarea>\n </div>\n </div>\n <ng-container *ngIf=\"!inputBoxHostSvc && enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"showMoreButtonTemplateRef\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!inputBoxHostSvc && !enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplateRef\"\n ></ng-container>\n </ng-container>\n </div>\n </sky-autocomplete>\n </div>\n</ng-template>\n\n<ng-template #showMoreButtonTemplateRef>\n <div class=\"sky-input-group-btn\">\n <button\n class=\"sky-btn sky-btn-default\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'sky-btn-disabled': disabled }\"\n type=\"button\"\n [attr.aria-label]=\"\n 'skyux_lookup_search_button_show_more' | skyLibResources\n \"\n (click)=\"onSearchButtonClick()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"search\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n iconType=\"skyux\"\n icon=\"search\"\n ></sky-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #searchIconTemplateRef>\n <div\n class=\"sky-input-group-icon sky-input-box-icon-inset\"\n [ngClass]=\"{ 'sky-lookup-disabled': disabled }\"\n >\n <sky-icon\n *skyThemeIf=\"'default'\"\n icon=\"search\"\n [attr.aria-label]=\"'skyux_lookup_search_icon' | skyLibResources\"\n ></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n iconType=\"skyux\"\n icon=\"search\"\n [attr.aria-label]=\"'skyux_lookup_search_icon' | skyLibResources\"\n ></sky-icon>\n </div>\n</ng-template>\n", styles: [".sky-lookup .sky-lookup-input.sky-form-control{resize:none;border:0;box-sizing:content-box;height:1.428571429em;overflow:hidden;padding:0;background-color:transparent}.sky-lookup .sky-lookup-input.sky-form-control:focus{outline:none;box-shadow:none}.sky-lookup .sky-lookup-search-flex-wrapper{display:flex}.sky-lookup.sky-lookup-disabled .sky-lookup-search{background-color:#cdcfd2}.sky-lookup sky-tokens.sky-lookup-tokens:focus{outline:none}.sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-5px;margin-bottom:-5px}.sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-top:5px;padding-bottom:5px;padding-left:10px;flex-basis:100px}.sky-lookup .sky-lookup-single-control{display:inline-flex;padding-left:7px;width:100%}.sky-lookup-search{cursor:text;background-color:#fff;line-height:1.428571429em;padding:6px 12px 6px 3px;flex-grow:1}.sky-lookup-search:not(.sky-field-status-active){border-top:1px solid #cdcfd2;border-bottom:1px solid #cdcfd2;border-left:1px solid #cdcfd2;border-right:1px solid #cdcfd2}.sky-lookup-disabled .sky-lookup-search{cursor:default}.sky-lookup-focused .sky-tokens-content{flex-basis:100px}.sky-lookup-single sky-tokens.sky-lookup-tokens sky-token{display:none}sky-lookup.ng-invalid.ng-touched .sky-lookup-search{box-shadow:0 0 8px #ef404499;border:1px solid #ef4044;outline:none}sky-input-box .sky-lookup{width:100%}sky-input-box .sky-lookup .sky-lookup-search{border:none;padding-bottom:5px;width:100%}:host-context(.sky-theme-modern) sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-6px}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:0;margin-bottom:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens sky-token{padding-bottom:0;padding-top:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-bottom:0;padding-top:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content:first-child{padding-left:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup.sky-lookup-single sky-tokens.sky-lookup-tokens .sky-tokens-content{padding-left:0}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-search{background-color:transparent;padding:0 0 0 15px}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-search.sky-field-status-active{box-shadow:none}:host-context(.sky-theme-modern) sky-input-box .sky-lookup textarea.sky-lookup-input.sky-form-control{padding-left:0;resize:none}:host-context(.sky-theme-modern) sky-input-box .sky-lookup .sky-lookup-single-control{padding-left:0}.sky-theme-modern sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:-6px}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens{margin-top:0;margin-bottom:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens sky-token{padding-bottom:0;padding-top:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content{padding-bottom:0;padding-top:0}.sky-theme-modern sky-input-box .sky-lookup sky-tokens.sky-lookup-tokens .sky-tokens .sky-tokens-content:first-child{padding-left:0}.sky-theme-modern sky-input-box .sky-lookup.sky-lookup-single sky-tokens.sky-lookup-tokens .sky-tokens-content{padding-left:0}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-search{background-color:transparent;padding:0 0 0 15px}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-search.sky-field-status-active{box-shadow:none}.sky-theme-modern sky-input-box .sky-lookup textarea.sky-lookup-input.sky-form-control{padding-left:0;resize:none}.sky-theme-modern sky-input-box .sky-lookup .sky-lookup-single-control{padding-left:0}\n"] }]
|
|
2978
3021
|
}], ctorParameters: function () {
|
|
2979
|
-
return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAppWindowRef }, { type: i8.NgControl, decorators: [{
|
|
3022
|
+
return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAppWindowRef }, { type: SkyLookupAdapterService }, { type: i1$1.SkyModalService }, { type: i4$1.SkyLibResourcesService }, { type: i8.NgControl, decorators: [{
|
|
2980
3023
|
type: Self
|
|
2981
3024
|
}, {
|
|
2982
3025
|
type: Optional
|
|
2983
|
-
}] }, { type:
|
|
3026
|
+
}] }, { type: i6.SkyInputBoxHostService, decorators: [{
|
|
2984
3027
|
type: Optional
|
|
2985
3028
|
}] }, { type: i7.SkyThemeService, decorators: [{
|
|
2986
3029
|
type: Optional
|