@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"] }]
|
|
@@ -1211,6 +1211,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1211
1211
|
}]
|
|
1212
1212
|
}] });
|
|
1213
1213
|
|
|
1214
|
+
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;
|
|
1215
|
+
const DEFAULT_COUNTRY_CODE = 'us';
|
|
1214
1216
|
const SKY_COUNTRY_FIELD_VALIDATOR = {
|
|
1215
1217
|
provide: NG_VALIDATORS,
|
|
1216
1218
|
useExisting: forwardRef(() => SkyCountryFieldComponent),
|
|
@@ -1219,31 +1221,48 @@ const SKY_COUNTRY_FIELD_VALIDATOR = {
|
|
|
1219
1221
|
let uniqueId = 0;
|
|
1220
1222
|
class SkyCountryFieldComponent {
|
|
1221
1223
|
constructor(changeDetector, elRef, windowRef, injector, inputBoxHostSvc, themeSvc) {
|
|
1222
|
-
this.changeDetector = changeDetector;
|
|
1223
|
-
this.elRef = elRef;
|
|
1224
|
-
this.windowRef = windowRef;
|
|
1225
|
-
this.injector = injector;
|
|
1226
1224
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
1227
|
-
this
|
|
1225
|
+
_SkyCountryFieldComponent_instances.add(this);
|
|
1226
|
+
/**
|
|
1227
|
+
* Indicates whether to hide the flag in the input element.
|
|
1228
|
+
*/
|
|
1229
|
+
this.hideSelectedCountryFlag = false;
|
|
1228
1230
|
/**
|
|
1229
1231
|
* Fires when the selected country changes.
|
|
1230
1232
|
*/
|
|
1231
1233
|
this.selectedCountryChange = new EventEmitter();
|
|
1234
|
+
this.countries = [];
|
|
1232
1235
|
this.isInputFocused = false;
|
|
1233
1236
|
this.searchTextMinimumCharacters = 2;
|
|
1234
1237
|
this.currentTheme = 'default';
|
|
1235
|
-
this
|
|
1236
|
-
this
|
|
1237
|
-
this
|
|
1238
|
-
this
|
|
1239
|
-
this
|
|
1240
|
-
this
|
|
1238
|
+
_SkyCountryFieldComponent_changeDetector.set(this, void 0);
|
|
1239
|
+
_SkyCountryFieldComponent_defaultCountryData.set(this, void 0);
|
|
1240
|
+
_SkyCountryFieldComponent_elRef.set(this, void 0);
|
|
1241
|
+
_SkyCountryFieldComponent_idle.set(this, new Subject());
|
|
1242
|
+
_SkyCountryFieldComponent_injector.set(this, void 0);
|
|
1243
|
+
_SkyCountryFieldComponent_internalFormChange.set(this, false);
|
|
1244
|
+
_SkyCountryFieldComponent_isInitialChange.set(this, true);
|
|
1245
|
+
_SkyCountryFieldComponent_ngControl.set(this, null);
|
|
1246
|
+
_SkyCountryFieldComponent_ngUnsubscribe.set(this, new Subject());
|
|
1247
|
+
_SkyCountryFieldComponent_themeSvc.set(this, void 0);
|
|
1248
|
+
_SkyCountryFieldComponent_windowRef.set(this, void 0);
|
|
1249
|
+
_SkyCountryFieldComponent__defaultCountry.set(this, void 0);
|
|
1250
|
+
_SkyCountryFieldComponent__disabled.set(this, false);
|
|
1251
|
+
_SkyCountryFieldComponent__includePhoneInfo.set(this, false);
|
|
1252
|
+
_SkyCountryFieldComponent__selectedCountry.set(this, void 0);
|
|
1253
|
+
_SkyCountryFieldComponent__supportedCountryISOs.set(this, void 0);
|
|
1241
1254
|
// Angular automatically constructs these methods.
|
|
1242
1255
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1243
1256
|
this.onChange = (value) => { };
|
|
1244
1257
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1245
1258
|
this.onTouched = () => { };
|
|
1246
|
-
this
|
|
1259
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_changeDetector, changeDetector, "f");
|
|
1260
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_elRef, elRef, "f");
|
|
1261
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_windowRef, windowRef, "f");
|
|
1262
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_injector, injector, "f");
|
|
1263
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_themeSvc, themeSvc, "f");
|
|
1264
|
+
this.inputId = `sky-country-field-input-${uniqueId++}`;
|
|
1265
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1247
1266
|
this.countrySearchFormControl = new FormControl();
|
|
1248
1267
|
}
|
|
1249
1268
|
/**
|
|
@@ -1253,40 +1272,43 @@ class SkyCountryFieldComponent {
|
|
|
1253
1272
|
* @default "us"
|
|
1254
1273
|
*/
|
|
1255
1274
|
set defaultCountry(value) {
|
|
1256
|
-
if (value
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1275
|
+
if (!value) {
|
|
1276
|
+
value = DEFAULT_COUNTRY_CODE;
|
|
1277
|
+
}
|
|
1278
|
+
if (value !== __classPrivateFieldGet(this, _SkyCountryFieldComponent__defaultCountry, "f")) {
|
|
1279
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__defaultCountry, value.toLowerCase(), "f");
|
|
1280
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_defaultCountryData, this.countries.find((country) => country.iso2 === __classPrivateFieldGet(this, _SkyCountryFieldComponent__defaultCountry, "f")), "f");
|
|
1281
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault).call(this, this.selectedCountry);
|
|
1260
1282
|
}
|
|
1261
1283
|
}
|
|
1262
1284
|
get defaultCountry() {
|
|
1263
|
-
return this
|
|
1285
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__defaultCountry, "f");
|
|
1264
1286
|
}
|
|
1265
1287
|
/**
|
|
1266
1288
|
* Indicates whether to disable the country field.
|
|
1267
1289
|
* @default false
|
|
1268
1290
|
*/
|
|
1269
1291
|
set disabled(isDisabled) {
|
|
1270
|
-
this.
|
|
1292
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1271
1293
|
if (!isDisabled) {
|
|
1272
1294
|
this.addEventListeners();
|
|
1273
1295
|
}
|
|
1274
|
-
this
|
|
1275
|
-
this.
|
|
1296
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__disabled, isDisabled, "f");
|
|
1297
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1276
1298
|
}
|
|
1277
1299
|
get disabled() {
|
|
1278
|
-
return this
|
|
1300
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__disabled, "f");
|
|
1279
1301
|
}
|
|
1280
1302
|
/**
|
|
1281
1303
|
* Indicates whether to include phone information in the selected country and country dropdown.
|
|
1282
1304
|
* @default false
|
|
1283
1305
|
*/
|
|
1284
|
-
set includePhoneInfo(
|
|
1285
|
-
this
|
|
1286
|
-
this.
|
|
1306
|
+
set includePhoneInfo(value) {
|
|
1307
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__includePhoneInfo, value, "f");
|
|
1308
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1287
1309
|
}
|
|
1288
1310
|
get includePhoneInfo() {
|
|
1289
|
-
return this
|
|
1311
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__includePhoneInfo, "f") || false;
|
|
1290
1312
|
}
|
|
1291
1313
|
/**
|
|
1292
1314
|
* Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)
|
|
@@ -1297,35 +1319,36 @@ class SkyCountryFieldComponent {
|
|
|
1297
1319
|
if (Array.isArray(value)) {
|
|
1298
1320
|
value = value.map((v) => v.toLowerCase());
|
|
1299
1321
|
}
|
|
1300
|
-
this
|
|
1301
|
-
this.
|
|
1322
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__supportedCountryISOs, value, "f");
|
|
1323
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1302
1324
|
}
|
|
1303
1325
|
get supportedCountryISOs() {
|
|
1304
|
-
return this
|
|
1326
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__supportedCountryISOs, "f") || [];
|
|
1305
1327
|
}
|
|
1306
1328
|
set selectedCountry(newCountry) {
|
|
1307
|
-
if (!this.
|
|
1308
|
-
|
|
1309
|
-
|
|
1329
|
+
if (!__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesAreEqual).call(this, this.selectedCountry, newCountry)) {
|
|
1330
|
+
const newCountryIso = newCountry && newCountry.iso2;
|
|
1331
|
+
if (newCountryIso) {
|
|
1332
|
+
const isoCountry = this.countries.find((country) => country.iso2 === newCountryIso);
|
|
1310
1333
|
if (isoCountry) {
|
|
1311
1334
|
newCountry = isoCountry;
|
|
1312
1335
|
}
|
|
1313
1336
|
}
|
|
1314
|
-
this
|
|
1315
|
-
this.
|
|
1316
|
-
this
|
|
1337
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__selectedCountry, newCountry, "f");
|
|
1338
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault).call(this, newCountry);
|
|
1339
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_internalFormChange, true, "f");
|
|
1317
1340
|
this.countrySearchFormControl.setValue(this.selectedCountry);
|
|
1318
|
-
if (!this
|
|
1341
|
+
if (!__classPrivateFieldGet(this, _SkyCountryFieldComponent_isInitialChange, "f")) {
|
|
1319
1342
|
this.onChange(newCountry);
|
|
1320
1343
|
this.onTouched();
|
|
1321
1344
|
this.selectedCountryChange.emit(newCountry);
|
|
1322
1345
|
}
|
|
1323
1346
|
// Do not mark the field as "dirty"
|
|
1324
1347
|
// if the field has been initialized with a value.
|
|
1325
|
-
if (this
|
|
1326
|
-
this.
|
|
1348
|
+
if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_isInitialChange, "f") && __classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f") && __classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f").control) {
|
|
1349
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f").control.markAsPristine();
|
|
1327
1350
|
}
|
|
1328
|
-
this
|
|
1351
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_isInitialChange, false, "f");
|
|
1329
1352
|
/**
|
|
1330
1353
|
* The second portion of this if statement is complex. The control type check ensures that
|
|
1331
1354
|
* we only watch for the initial time through this function on reactive forms. However,
|
|
@@ -1333,39 +1356,38 @@ class SkyCountryFieldComponent {
|
|
|
1333
1356
|
* so we have to check for when the non-null pass through happens.
|
|
1334
1357
|
*/
|
|
1335
1358
|
}
|
|
1336
|
-
else if (this
|
|
1337
|
-
(!(this
|
|
1338
|
-
this
|
|
1359
|
+
else if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_isInitialChange, "f") &&
|
|
1360
|
+
(!(__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f") instanceof NgModel) || newCountry !== null)) {
|
|
1361
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_isInitialChange, false, "f");
|
|
1339
1362
|
}
|
|
1340
1363
|
}
|
|
1341
1364
|
get selectedCountry() {
|
|
1342
|
-
return this
|
|
1365
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__selectedCountry, "f");
|
|
1343
1366
|
}
|
|
1344
1367
|
/**
|
|
1345
1368
|
* Angular lifecycle hook for when the component is initialized
|
|
1346
1369
|
* @internal
|
|
1347
1370
|
*/
|
|
1348
1371
|
ngOnInit() {
|
|
1349
|
-
this.
|
|
1350
|
-
this
|
|
1351
|
-
this
|
|
1352
|
-
|
|
1353
|
-
this.ngControl.valueAccessor = this;
|
|
1372
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_updateInputBox).call(this);
|
|
1373
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_ngControl, __classPrivateFieldGet(this, _SkyCountryFieldComponent_injector, "f").get(NgControl, null), "f");
|
|
1374
|
+
if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f")) {
|
|
1375
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngControl, "f").valueAccessor = this;
|
|
1354
1376
|
}
|
|
1355
1377
|
else {
|
|
1356
1378
|
/**
|
|
1357
1379
|
* The initial change boolean is to determine if the form is setting the value. When no form
|
|
1358
1380
|
* is present we don't want to ignore the first change.
|
|
1359
1381
|
*/
|
|
1360
|
-
this
|
|
1382
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_isInitialChange, false, "f");
|
|
1361
1383
|
}
|
|
1362
1384
|
if (!this.defaultCountry) {
|
|
1363
|
-
this.defaultCountry =
|
|
1385
|
+
this.defaultCountry = DEFAULT_COUNTRY_CODE;
|
|
1364
1386
|
}
|
|
1365
1387
|
this.countrySearchFormControl.valueChanges
|
|
1366
|
-
.pipe(takeUntil(this
|
|
1388
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngUnsubscribe, "f")))
|
|
1367
1389
|
.subscribe((newValue) => {
|
|
1368
|
-
if (newValue && !this
|
|
1390
|
+
if (newValue && !__classPrivateFieldGet(this, _SkyCountryFieldComponent_internalFormChange, "f")) {
|
|
1369
1391
|
this.selectedCountry = newValue;
|
|
1370
1392
|
}
|
|
1371
1393
|
});
|
|
@@ -1375,11 +1397,11 @@ class SkyCountryFieldComponent {
|
|
|
1375
1397
|
}
|
|
1376
1398
|
ngAfterViewInit() {
|
|
1377
1399
|
/* istanbul ignore else */
|
|
1378
|
-
if (this
|
|
1379
|
-
this.
|
|
1400
|
+
if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_themeSvc, "f")) {
|
|
1401
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_themeSvc, "f").settingsChange.subscribe((change) => {
|
|
1380
1402
|
this.currentTheme = change.currentSettings.theme.name;
|
|
1381
|
-
this.
|
|
1382
|
-
this.
|
|
1403
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_updateInputBox).call(this);
|
|
1404
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1383
1405
|
});
|
|
1384
1406
|
}
|
|
1385
1407
|
}
|
|
@@ -1389,9 +1411,9 @@ class SkyCountryFieldComponent {
|
|
|
1389
1411
|
*/
|
|
1390
1412
|
ngOnDestroy() {
|
|
1391
1413
|
this.selectedCountryChange.complete();
|
|
1392
|
-
this.
|
|
1393
|
-
this.
|
|
1394
|
-
this.
|
|
1414
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1415
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngUnsubscribe, "f").next();
|
|
1416
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_ngUnsubscribe, "f").complete();
|
|
1395
1417
|
}
|
|
1396
1418
|
/**
|
|
1397
1419
|
* Sets the component's touched value when the autocomplete is blurred
|
|
@@ -1433,123 +1455,118 @@ class SkyCountryFieldComponent {
|
|
|
1433
1455
|
return { unsupportedCountry: true };
|
|
1434
1456
|
}
|
|
1435
1457
|
}
|
|
1436
|
-
return;
|
|
1458
|
+
return null;
|
|
1437
1459
|
}
|
|
1438
1460
|
writeValue(value) {
|
|
1439
1461
|
this.selectedCountry = value;
|
|
1440
|
-
this.
|
|
1462
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1441
1463
|
}
|
|
1442
1464
|
addEventListeners() {
|
|
1443
|
-
this.
|
|
1444
|
-
this
|
|
1445
|
-
const documentObj = this.
|
|
1465
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1466
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_idle, new Subject(), "f");
|
|
1467
|
+
const documentObj = __classPrivateFieldGet(this, _SkyCountryFieldComponent_windowRef, "f").nativeWindow.document;
|
|
1446
1468
|
fromEvent(documentObj, 'mousedown')
|
|
1447
|
-
.pipe(takeUntil(this
|
|
1469
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1448
1470
|
.subscribe((event) => {
|
|
1449
|
-
this.isInputFocused = this.
|
|
1450
|
-
this.
|
|
1471
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1472
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1451
1473
|
});
|
|
1452
1474
|
fromEvent(documentObj, 'focusin')
|
|
1453
|
-
.pipe(takeUntil(this
|
|
1475
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1454
1476
|
.subscribe((event) => {
|
|
1455
|
-
this.isInputFocused = this.
|
|
1456
|
-
this.
|
|
1477
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1478
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1457
1479
|
});
|
|
1458
1480
|
}
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1481
|
+
}
|
|
1482
|
+
_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) {
|
|
1483
|
+
if (country1 && country2) {
|
|
1484
|
+
return country1.iso2 === country2.iso2;
|
|
1485
|
+
}
|
|
1486
|
+
// NOTE: We are doing this in this way because template forms will send through `null`
|
|
1487
|
+
// and then `undefined` on empty initialization. These are functionally equivalent but will
|
|
1488
|
+
// not pass a standard triple equals check.
|
|
1489
|
+
return !country1 && !country2;
|
|
1490
|
+
}, _SkyCountryFieldComponent_countriesEqual = function _SkyCountryFieldComponent_countriesEqual(a, b) {
|
|
1491
|
+
return a.iso2 === b.iso2 && a.name === b.name;
|
|
1492
|
+
}, _SkyCountryFieldComponent_removeEventListeners = function _SkyCountryFieldComponent_removeEventListeners() {
|
|
1493
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f").next();
|
|
1494
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f").complete();
|
|
1495
|
+
}, _SkyCountryFieldComponent_setupCountries = function _SkyCountryFieldComponent_setupCountries() {
|
|
1496
|
+
/**
|
|
1497
|
+
* The json functions here ensures that we get a copy of the array and not the global original.
|
|
1498
|
+
* This ensures that multiple instances of the component don't overwrite the original data.
|
|
1499
|
+
*
|
|
1500
|
+
* We must type the window object as any here as the intl-tel-input library adds its object
|
|
1501
|
+
* to the main window object.
|
|
1502
|
+
*/
|
|
1503
|
+
this.countries = JSON.parse(
|
|
1504
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1505
|
+
JSON.stringify(window.intlTelInputGlobals.getCountryData()));
|
|
1506
|
+
// Ignoring coverage here as this will be removed in the next release.
|
|
1507
|
+
// istanbul ignore next
|
|
1508
|
+
if (!this.includePhoneInfo && !this.hideSelectedCountryFlag) {
|
|
1509
|
+
if (__classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.parentElement?.classList?.contains('sky-phone-field-country-search')) {
|
|
1510
|
+
this.includePhoneInfo = true;
|
|
1511
|
+
this.hideSelectedCountryFlag = true;
|
|
1462
1512
|
}
|
|
1463
|
-
// NOTE: We are doing this in this way because template forms will send through `null`
|
|
1464
|
-
// and then `undefined` on empty initialization. These are functionally equivalent but will
|
|
1465
|
-
// not pass a standard triple equals check.
|
|
1466
|
-
return !country1 && !country2;
|
|
1467
|
-
}
|
|
1468
|
-
countriesEqual(a, b) {
|
|
1469
|
-
return a.iso2 === b.iso2 && a.name === b.name;
|
|
1470
1513
|
}
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
this.idle.complete();
|
|
1474
|
-
}
|
|
1475
|
-
setupCountries() {
|
|
1514
|
+
/* istanbul ignore else */
|
|
1515
|
+
if (!this.includePhoneInfo) {
|
|
1476
1516
|
/**
|
|
1477
|
-
* The
|
|
1478
|
-
*
|
|
1479
|
-
*
|
|
1480
|
-
* We must type the window object as any here as the intl-tel-input library adds its object
|
|
1481
|
-
* to the main window object.
|
|
1517
|
+
* The library we get the country data from includes extra phone properties.
|
|
1518
|
+
* We want to remove these unless we are in a phone field
|
|
1482
1519
|
*/
|
|
1483
|
-
this.countries
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
if (!this.includePhoneInfo && !this.hideSelectedCountryFlag) {
|
|
1489
|
-
if (this.elRef.nativeElement.parentElement?.classList?.contains('sky-phone-field-country-search')) {
|
|
1490
|
-
this.includePhoneInfo = true;
|
|
1491
|
-
this.hideSelectedCountryFlag = true;
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
/* istanbul ignore else */
|
|
1495
|
-
if (!this.includePhoneInfo) {
|
|
1496
|
-
/**
|
|
1497
|
-
* The library we get the country data from includes extra phone properties.
|
|
1498
|
-
* We want to remove these unless we are in a phone field
|
|
1499
|
-
*/
|
|
1500
|
-
this.countries.forEach((country) => {
|
|
1501
|
-
delete country.dialCode;
|
|
1502
|
-
delete country.areaCodes;
|
|
1503
|
-
delete country.priority;
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1506
|
-
this.sortCountriesWithSelectedAndDefault(this.selectedCountry);
|
|
1507
|
-
if (this.supportedCountryISOs && this.supportedCountryISOs.length > 0) {
|
|
1508
|
-
this.countries = this.countries.filter((country) => {
|
|
1509
|
-
return this.supportedCountryISOs.indexOf(country.iso2) >= 0;
|
|
1510
|
-
});
|
|
1511
|
-
}
|
|
1520
|
+
this.countries.forEach((country) => {
|
|
1521
|
+
delete country.dialCode;
|
|
1522
|
+
delete country.areaCodes;
|
|
1523
|
+
delete country.priority;
|
|
1524
|
+
});
|
|
1512
1525
|
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
if (((this.defaultCountryData &&
|
|
1518
|
-
this.countriesEqual(a, this.defaultCountryData)) ||
|
|
1519
|
-
a.name < b.name) &&
|
|
1520
|
-
(!this.defaultCountryData ||
|
|
1521
|
-
!this.countriesEqual(this.defaultCountryData, b))) {
|
|
1522
|
-
return -1;
|
|
1523
|
-
}
|
|
1524
|
-
else {
|
|
1525
|
-
return 1;
|
|
1526
|
-
}
|
|
1526
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault).call(this, this.selectedCountry);
|
|
1527
|
+
if (this.supportedCountryISOs && this.supportedCountryISOs.length > 0) {
|
|
1528
|
+
this.countries = this.countries.filter((country) => {
|
|
1529
|
+
return this.supportedCountryISOs.indexOf(country.iso2) >= 0;
|
|
1527
1530
|
});
|
|
1528
|
-
if (selectedCountry) {
|
|
1529
|
-
// Note: We are looking up this data here to ensure we are using the offical data from the
|
|
1530
|
-
// library and not the data provided by the user on initialization of the component
|
|
1531
|
-
selectedCountryData = this.countries.find((country) => country.iso2 === selectedCountry.iso2.toLocaleLowerCase());
|
|
1532
|
-
selectedCountryIndex = this.countries.indexOf(selectedCountryData);
|
|
1533
|
-
if (selectedCountryIndex >= 0) {
|
|
1534
|
-
this.countries.splice(selectedCountryIndex, 1);
|
|
1535
|
-
sortedNewCountries.splice(0, 0, selectedCountryData);
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
this.countries = sortedNewCountries;
|
|
1539
1531
|
}
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1532
|
+
}, _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault = function _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault(selectedCountry) {
|
|
1533
|
+
let selectedCountryIndex;
|
|
1534
|
+
let selectedCountryData;
|
|
1535
|
+
const sortedNewCountries = this.countries.sort((a, b) => {
|
|
1536
|
+
if (((__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") &&
|
|
1537
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, a, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"))) ||
|
|
1538
|
+
a.name < b.name) &&
|
|
1539
|
+
(!__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") ||
|
|
1540
|
+
!__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"), b))) {
|
|
1541
|
+
return -1;
|
|
1542
|
+
}
|
|
1543
|
+
else {
|
|
1544
|
+
return 1;
|
|
1548
1545
|
}
|
|
1546
|
+
});
|
|
1547
|
+
if (selectedCountry) {
|
|
1548
|
+
// Note: We are looking up this data here to ensure we are using the offical data from the
|
|
1549
|
+
// library and not the data provided by the user on initialization of the component
|
|
1550
|
+
selectedCountryData = this.countries.find((country) => country.iso2 === selectedCountry.iso2.toLocaleLowerCase());
|
|
1551
|
+
selectedCountryIndex = this.countries.indexOf(selectedCountryData);
|
|
1552
|
+
if (selectedCountryIndex >= 0) {
|
|
1553
|
+
this.countries.splice(selectedCountryIndex, 1);
|
|
1554
|
+
sortedNewCountries.splice(0, 0, selectedCountryData);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
this.countries = sortedNewCountries;
|
|
1558
|
+
}, _SkyCountryFieldComponent_updateInputBox = function _SkyCountryFieldComponent_updateInputBox() {
|
|
1559
|
+
if (this.inputBoxHostSvc) {
|
|
1560
|
+
this.inputBoxHostSvc.populate({
|
|
1561
|
+
inputTemplate: this.inputTemplateRef,
|
|
1562
|
+
iconsInsetTemplate: this.currentTheme === 'modern'
|
|
1563
|
+
? this.searchIconTemplateRef
|
|
1564
|
+
: undefined,
|
|
1565
|
+
});
|
|
1549
1566
|
}
|
|
1550
|
-
}
|
|
1567
|
+
};
|
|
1551
1568
|
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 });
|
|
1552
|
-
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 });
|
|
1569
|
+
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 });
|
|
1553
1570
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyCountryFieldComponent, decorators: [{
|
|
1554
1571
|
type: Component,
|
|
1555
1572
|
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"] }]
|
|
@@ -1627,49 +1644,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1627
1644
|
}]
|
|
1628
1645
|
}] });
|
|
1629
1646
|
|
|
1647
|
+
var _SkySearchAdapterService_instances, _SkySearchAdapterService_renderer, _SkySearchAdapterService_getInputContainerEl, _SkySearchAdapterService_getSearchOpenButtonEl, _SkySearchAdapterService_getSearchContainerEl, _SkySearchAdapterService_getInputEl;
|
|
1630
1648
|
/**
|
|
1631
1649
|
* @internal
|
|
1632
1650
|
*/
|
|
1633
1651
|
class SkySearchAdapterService {
|
|
1634
1652
|
constructor(renderer) {
|
|
1635
|
-
this
|
|
1653
|
+
_SkySearchAdapterService_instances.add(this);
|
|
1654
|
+
_SkySearchAdapterService_renderer.set(this, void 0);
|
|
1655
|
+
__classPrivateFieldSet(this, _SkySearchAdapterService_renderer, renderer, "f");
|
|
1636
1656
|
}
|
|
1637
1657
|
selectInput(searchEl) {
|
|
1638
|
-
this.
|
|
1658
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputEl).call(this, searchEl).select();
|
|
1639
1659
|
}
|
|
1640
1660
|
focusInput(searchEl) {
|
|
1641
|
-
this.
|
|
1661
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputEl).call(this, searchEl).focus();
|
|
1642
1662
|
}
|
|
1643
1663
|
startInputAnimation(searchEl) {
|
|
1644
|
-
const buttonWidth = this.
|
|
1645
|
-
const offsetWidth = this.
|
|
1664
|
+
const buttonWidth = __classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getSearchOpenButtonEl).call(this, searchEl).clientWidth;
|
|
1665
|
+
const offsetWidth = __classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getSearchContainerEl).call(this, searchEl).offsetLeft;
|
|
1646
1666
|
const minWidth = buttonWidth + offsetWidth;
|
|
1647
|
-
this.
|
|
1667
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputContainerEl).call(this, searchEl).style.minWidth =
|
|
1648
1668
|
minWidth.toString() + 'px';
|
|
1649
|
-
this.
|
|
1669
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_renderer, "f").setStyle(__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputContainerEl).call(this, searchEl), 'min-width', minWidth.toString() + 'px');
|
|
1650
1670
|
}
|
|
1651
1671
|
endInputAnimation(searchEl) {
|
|
1652
|
-
this.
|
|
1653
|
-
}
|
|
1654
|
-
getInputContainerEl(searchEl) {
|
|
1655
|
-
return searchEl.nativeElement.querySelector('.sky-search-input-container');
|
|
1656
|
-
}
|
|
1657
|
-
getSearchOpenButtonEl(searchEl) {
|
|
1658
|
-
return searchEl.nativeElement.querySelector('.sky-search-btn-open');
|
|
1659
|
-
}
|
|
1660
|
-
getSearchContainerEl(searchEl) {
|
|
1661
|
-
return searchEl.nativeElement.querySelector('.sky-search-container');
|
|
1662
|
-
}
|
|
1663
|
-
getInputEl(searchEl) {
|
|
1664
|
-
return searchEl.nativeElement.querySelector('input');
|
|
1672
|
+
__classPrivateFieldGet(this, _SkySearchAdapterService_renderer, "f").setStyle(__classPrivateFieldGet(this, _SkySearchAdapterService_instances, "m", _SkySearchAdapterService_getInputContainerEl).call(this, searchEl), 'min-width', '');
|
|
1665
1673
|
}
|
|
1666
1674
|
}
|
|
1675
|
+
_SkySearchAdapterService_renderer = new WeakMap(), _SkySearchAdapterService_instances = new WeakSet(), _SkySearchAdapterService_getInputContainerEl = function _SkySearchAdapterService_getInputContainerEl(searchEl) {
|
|
1676
|
+
return searchEl.nativeElement.querySelector('.sky-search-input-container');
|
|
1677
|
+
}, _SkySearchAdapterService_getSearchOpenButtonEl = function _SkySearchAdapterService_getSearchOpenButtonEl(searchEl) {
|
|
1678
|
+
return searchEl.nativeElement.querySelector('.sky-search-btn-open');
|
|
1679
|
+
}, _SkySearchAdapterService_getSearchContainerEl = function _SkySearchAdapterService_getSearchContainerEl(searchEl) {
|
|
1680
|
+
return searchEl.nativeElement.querySelector('.sky-search-container');
|
|
1681
|
+
}, _SkySearchAdapterService_getInputEl = function _SkySearchAdapterService_getInputEl(searchEl) {
|
|
1682
|
+
return searchEl.nativeElement.querySelector('input');
|
|
1683
|
+
};
|
|
1667
1684
|
SkySearchAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkySearchAdapterService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1668
1685
|
SkySearchAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkySearchAdapterService });
|
|
1669
1686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkySearchAdapterService, decorators: [{
|
|
1670
1687
|
type: Injectable
|
|
1671
1688
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
1672
1689
|
|
|
1690
|
+
var _SkySearchComponent_instances, _SkySearchComponent_changeRef, _SkySearchComponent_elRef, _SkySearchComponent_mediaQueryService, _SkySearchComponent_searchAdapter, _SkySearchComponent_searchUpdated, _SkySearchComponent_searchBindingChanged, _SkySearchComponent_expandModeBindingChanged, _SkySearchComponent_shouldOpenInput, _SkySearchComponent_mediaQueryCallback, _SkySearchComponent_searchShouldCollapse;
|
|
1673
1691
|
const INPUT_SHOWN_STATE = 'inputShown';
|
|
1674
1692
|
const INPUT_HIDDEN_STATE = 'inputHidden';
|
|
1675
1693
|
const EXPAND_MODE_RESPONSIVE = 'responsive';
|
|
@@ -1677,10 +1695,7 @@ const EXPAND_MODE_FIT = 'fit';
|
|
|
1677
1695
|
const EXPAND_MODE_NONE = 'none';
|
|
1678
1696
|
class SkySearchComponent {
|
|
1679
1697
|
constructor(mediaQueryService, elRef, searchAdapter, changeRef) {
|
|
1680
|
-
this
|
|
1681
|
-
this.elRef = elRef;
|
|
1682
|
-
this.searchAdapter = searchAdapter;
|
|
1683
|
-
this.changeRef = changeRef;
|
|
1698
|
+
_SkySearchComponent_instances.add(this);
|
|
1684
1699
|
/**
|
|
1685
1700
|
* Fires when the search text is applied.
|
|
1686
1701
|
*/
|
|
@@ -1703,31 +1718,37 @@ class SkySearchComponent {
|
|
|
1703
1718
|
this.expandMode = EXPAND_MODE_RESPONSIVE;
|
|
1704
1719
|
/**
|
|
1705
1720
|
* Specifies how many milliseconds to wait before searching after users enter text in the search input.
|
|
1706
|
-
* @default 0
|
|
1707
1721
|
*/
|
|
1708
1722
|
this.debounceTime = 0;
|
|
1709
1723
|
/**
|
|
1710
1724
|
* Indicates whether to disable the filter button.
|
|
1711
|
-
* @default false
|
|
1712
1725
|
*/
|
|
1713
1726
|
this.disabled = false;
|
|
1714
|
-
this.
|
|
1715
|
-
this.
|
|
1727
|
+
this.clearButtonShown = false;
|
|
1728
|
+
this.dismissButtonShown = false;
|
|
1716
1729
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1717
|
-
this.
|
|
1730
|
+
this.isCollapsible = true;
|
|
1731
|
+
this.isFullWidth = false;
|
|
1718
1732
|
this.mobileSearchShown = false;
|
|
1719
|
-
this.
|
|
1720
|
-
this
|
|
1721
|
-
this
|
|
1733
|
+
this.searchButtonShown = false;
|
|
1734
|
+
_SkySearchComponent_changeRef.set(this, void 0);
|
|
1735
|
+
_SkySearchComponent_elRef.set(this, void 0);
|
|
1736
|
+
_SkySearchComponent_mediaQueryService.set(this, void 0);
|
|
1737
|
+
_SkySearchComponent_searchAdapter.set(this, void 0);
|
|
1738
|
+
_SkySearchComponent_searchUpdated.set(this, new Subject());
|
|
1739
|
+
__classPrivateFieldSet(this, _SkySearchComponent_mediaQueryService, mediaQueryService, "f");
|
|
1740
|
+
__classPrivateFieldSet(this, _SkySearchComponent_elRef, elRef, "f");
|
|
1741
|
+
__classPrivateFieldSet(this, _SkySearchComponent_searchAdapter, searchAdapter, "f");
|
|
1742
|
+
__classPrivateFieldSet(this, _SkySearchComponent_changeRef, changeRef, "f");
|
|
1722
1743
|
}
|
|
1723
1744
|
ngOnInit() {
|
|
1724
|
-
if (this.
|
|
1725
|
-
this.breakpointSubscription = this.
|
|
1726
|
-
this.
|
|
1727
|
-
this.
|
|
1745
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1746
|
+
this.breakpointSubscription = __classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").subscribe((args) => {
|
|
1747
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_mediaQueryCallback).call(this, args);
|
|
1748
|
+
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").detectChanges();
|
|
1728
1749
|
});
|
|
1729
1750
|
}
|
|
1730
|
-
this
|
|
1751
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f")
|
|
1731
1752
|
.asObservable()
|
|
1732
1753
|
.pipe(debounceTime(this.debounceTime), distinctUntilChanged())
|
|
1733
1754
|
.subscribe((value) => {
|
|
@@ -1735,7 +1756,7 @@ class SkySearchComponent {
|
|
|
1735
1756
|
});
|
|
1736
1757
|
}
|
|
1737
1758
|
ngOnChanges(changes) {
|
|
1738
|
-
if (this.
|
|
1759
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_expandModeBindingChanged).call(this, changes)) {
|
|
1739
1760
|
switch (this.expandMode) {
|
|
1740
1761
|
case EXPAND_MODE_NONE:
|
|
1741
1762
|
this.isCollapsible = false;
|
|
@@ -1751,18 +1772,18 @@ class SkySearchComponent {
|
|
|
1751
1772
|
break;
|
|
1752
1773
|
}
|
|
1753
1774
|
}
|
|
1754
|
-
if (this.
|
|
1755
|
-
this.clearButtonShown = this.searchText && this.searchText !== '';
|
|
1756
|
-
if (this.
|
|
1775
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchBindingChanged).call(this, changes)) {
|
|
1776
|
+
this.clearButtonShown = !!(this.searchText && this.searchText !== '');
|
|
1777
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_shouldOpenInput).call(this)) {
|
|
1757
1778
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1758
1779
|
}
|
|
1759
1780
|
}
|
|
1760
|
-
this.
|
|
1781
|
+
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").detectChanges();
|
|
1761
1782
|
}
|
|
1762
1783
|
clearSearchText() {
|
|
1763
1784
|
this.searchText = '';
|
|
1764
1785
|
this.clearButtonShown = false;
|
|
1765
|
-
this.
|
|
1786
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").focusInput(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1766
1787
|
this.searchChange.emit(this.searchText);
|
|
1767
1788
|
this.searchApply.emit(this.searchText);
|
|
1768
1789
|
this.searchClear.emit();
|
|
@@ -1780,18 +1801,18 @@ class SkySearchComponent {
|
|
|
1780
1801
|
if (searchText !== this.searchText) {
|
|
1781
1802
|
this.searchText = searchText;
|
|
1782
1803
|
}
|
|
1783
|
-
this.clearButtonShown = searchText && searchText !== '';
|
|
1804
|
+
this.clearButtonShown = !!(searchText && searchText !== '');
|
|
1784
1805
|
if (searchText && searchText !== '') {
|
|
1785
|
-
this.
|
|
1806
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").selectInput(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1786
1807
|
}
|
|
1787
1808
|
this.searchApply.emit(searchText);
|
|
1788
1809
|
}
|
|
1789
1810
|
searchTextChanged(searchText) {
|
|
1790
1811
|
this.searchText = searchText;
|
|
1791
|
-
this.
|
|
1812
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f").next(searchText);
|
|
1792
1813
|
}
|
|
1793
1814
|
toggleSearchInput(showInput) {
|
|
1794
|
-
if (this.
|
|
1815
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1795
1816
|
if (showInput) {
|
|
1796
1817
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1797
1818
|
}
|
|
@@ -1801,24 +1822,24 @@ class SkySearchComponent {
|
|
|
1801
1822
|
}
|
|
1802
1823
|
}
|
|
1803
1824
|
inputAnimationStart(event) {
|
|
1804
|
-
if (this.
|
|
1805
|
-
this.
|
|
1825
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1826
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").startInputAnimation(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1806
1827
|
if (event.toState === INPUT_SHOWN_STATE &&
|
|
1807
|
-
this.
|
|
1828
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs) {
|
|
1808
1829
|
this.mobileSearchShown = true;
|
|
1809
1830
|
this.searchButtonShown = false;
|
|
1810
1831
|
}
|
|
1811
1832
|
}
|
|
1812
1833
|
}
|
|
1813
1834
|
inputAnimationEnd(event) {
|
|
1814
|
-
if (this.
|
|
1815
|
-
this.
|
|
1835
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1836
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchAdapter, "f").endInputAnimation(__classPrivateFieldGet(this, _SkySearchComponent_elRef, "f"));
|
|
1816
1837
|
this.searchButtonShown =
|
|
1817
1838
|
event.toState === INPUT_HIDDEN_STATE &&
|
|
1818
|
-
this.
|
|
1839
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs;
|
|
1819
1840
|
if ((event.toState === INPUT_HIDDEN_STATE &&
|
|
1820
|
-
this.
|
|
1821
|
-
this.
|
|
1841
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs) ||
|
|
1842
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current !== SkyMediaBreakpoints.xs) {
|
|
1822
1843
|
this.mobileSearchShown = false;
|
|
1823
1844
|
}
|
|
1824
1845
|
}
|
|
@@ -1827,42 +1848,38 @@ class SkySearchComponent {
|
|
|
1827
1848
|
if (this.breakpointSubscription) {
|
|
1828
1849
|
this.breakpointSubscription.unsubscribe();
|
|
1829
1850
|
}
|
|
1830
|
-
this.
|
|
1831
|
-
}
|
|
1832
|
-
searchBindingChanged(changes) {
|
|
1833
|
-
return (changes['searchText'] &&
|
|
1834
|
-
changes['searchText'].previousValue !== changes['searchText'].currentValue);
|
|
1835
|
-
}
|
|
1836
|
-
expandModeBindingChanged(changes) {
|
|
1837
|
-
return (changes['expandMode'] &&
|
|
1838
|
-
changes['expandMode'].previousValue !== changes['expandMode'].currentValue);
|
|
1851
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f").complete();
|
|
1839
1852
|
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1853
|
+
}
|
|
1854
|
+
_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) {
|
|
1855
|
+
return (changes['searchText'] &&
|
|
1856
|
+
changes['searchText'].previousValue !== changes['searchText'].currentValue);
|
|
1857
|
+
}, _SkySearchComponent_expandModeBindingChanged = function _SkySearchComponent_expandModeBindingChanged(changes) {
|
|
1858
|
+
return (changes['expandMode'] &&
|
|
1859
|
+
changes['expandMode'].previousValue !== changes['expandMode'].currentValue);
|
|
1860
|
+
}, _SkySearchComponent_shouldOpenInput = function _SkySearchComponent_shouldOpenInput() {
|
|
1861
|
+
return (this.searchText !== '' &&
|
|
1862
|
+
__classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs &&
|
|
1863
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this));
|
|
1864
|
+
}, _SkySearchComponent_mediaQueryCallback = function _SkySearchComponent_mediaQueryCallback(args) {
|
|
1865
|
+
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1866
|
+
if (args === SkyMediaBreakpoints.xs) {
|
|
1867
|
+
this.inputAnimate = INPUT_HIDDEN_STATE;
|
|
1868
|
+
}
|
|
1869
|
+
else if (this.inputAnimate !== INPUT_SHOWN_STATE) {
|
|
1870
|
+
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
1871
|
+
}
|
|
1872
|
+
else {
|
|
1873
|
+
this.mobileSearchShown = false;
|
|
1856
1874
|
}
|
|
1857
|
-
this.changeRef.markForCheck();
|
|
1858
|
-
}
|
|
1859
|
-
searchShouldCollapse() {
|
|
1860
|
-
return ((this.isCollapsible || this.isCollapsible === undefined) &&
|
|
1861
|
-
this.isFullWidth !== true);
|
|
1862
1875
|
}
|
|
1863
|
-
|
|
1876
|
+
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").markForCheck();
|
|
1877
|
+
}, _SkySearchComponent_searchShouldCollapse = function _SkySearchComponent_searchShouldCollapse() {
|
|
1878
|
+
return ((this.isCollapsible || this.isCollapsible === undefined) &&
|
|
1879
|
+
this.isFullWidth !== true);
|
|
1880
|
+
};
|
|
1864
1881
|
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 });
|
|
1865
|
-
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: [
|
|
1882
|
+
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: [
|
|
1866
1883
|
trigger('inputState', [
|
|
1867
1884
|
state(INPUT_HIDDEN_STATE, style({
|
|
1868
1885
|
opacity: 0,
|
|
@@ -1965,6 +1982,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
1965
1982
|
class SkyLookupShowMoreNativePickerAsyncContext {
|
|
1966
1983
|
}
|
|
1967
1984
|
|
|
1985
|
+
var _SkyLookupShowMoreAsyncModalComponent_instances, _SkyLookupShowMoreAsyncModalComponent_changeDetector, _SkyLookupShowMoreAsyncModalComponent_continuationData, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, _SkyLookupShowMoreAsyncModalComponent_offset, _SkyLookupShowMoreAsyncModalComponent_loadSearchResults, _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap, _SkyLookupShowMoreAsyncModalComponent_performSearch, _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch;
|
|
1968
1986
|
/**
|
|
1969
1987
|
* @internal
|
|
1970
1988
|
* Internal component to implement the native picker.
|
|
@@ -1973,29 +1991,37 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
1973
1991
|
constructor(modalInstance, context, changeDetector) {
|
|
1974
1992
|
this.modalInstance = modalInstance;
|
|
1975
1993
|
this.context = context;
|
|
1976
|
-
this
|
|
1994
|
+
_SkyLookupShowMoreAsyncModalComponent_instances.add(this);
|
|
1977
1995
|
/**
|
|
1978
1996
|
* @internal
|
|
1979
1997
|
* Fires when users select the button to add new options to the list.
|
|
1980
1998
|
*/
|
|
1981
1999
|
this.addClick = new Subject();
|
|
1982
2000
|
this.displayedItems = [];
|
|
1983
|
-
this.onlyShowSelected = false;
|
|
1984
|
-
this.isSearching = false;
|
|
1985
2001
|
this.hasMoreItems = false;
|
|
1986
2002
|
this.isLoadingMore = false;
|
|
1987
|
-
this.
|
|
1988
|
-
this.
|
|
2003
|
+
this.isSearching = false;
|
|
2004
|
+
this.items = [];
|
|
2005
|
+
this.onlyShowSelected = false;
|
|
2006
|
+
this.repeaterItemTemplate = null;
|
|
2007
|
+
this.selectedIdMap = new Map();
|
|
2008
|
+
_SkyLookupShowMoreAsyncModalComponent_changeDetector.set(this, void 0);
|
|
2009
|
+
_SkyLookupShowMoreAsyncModalComponent_continuationData.set(this, void 0);
|
|
2010
|
+
_SkyLookupShowMoreAsyncModalComponent_currentSearchSub.set(this, void 0);
|
|
2011
|
+
_SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe.set(this, new Subject());
|
|
2012
|
+
_SkyLookupShowMoreAsyncModalComponent_offset.set(this, 0);
|
|
2013
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_changeDetector, changeDetector, "f");
|
|
1989
2014
|
}
|
|
1990
2015
|
ngOnInit() {
|
|
2016
|
+
this.repeaterItemTemplate = this.context.userConfig.itemTemplate || null;
|
|
1991
2017
|
this.searchText = this.context.initialSearch;
|
|
1992
|
-
this.
|
|
1993
|
-
this.
|
|
2018
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap).call(this);
|
|
2019
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_loadSearchResults).call(this);
|
|
1994
2020
|
}
|
|
1995
2021
|
ngOnDestroy() {
|
|
1996
|
-
this.
|
|
1997
|
-
this.
|
|
1998
|
-
this.
|
|
2022
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch).call(this);
|
|
2023
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, "f").next();
|
|
2024
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, "f").complete();
|
|
1999
2025
|
}
|
|
2000
2026
|
addButtonClicked() {
|
|
2001
2027
|
this.addClick.next();
|
|
@@ -2008,7 +2034,7 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2008
2034
|
this.selectedIdMap.delete(item[this.context.idProperty]);
|
|
2009
2035
|
}
|
|
2010
2036
|
this.updateDisplayedItems();
|
|
2011
|
-
this.
|
|
2037
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_changeDetector, "f").markForCheck();
|
|
2012
2038
|
}
|
|
2013
2039
|
itemClick(selectedItem) {
|
|
2014
2040
|
if (this.context.selectMode === 'single') {
|
|
@@ -2037,9 +2063,9 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2037
2063
|
this.updateDisplayedItems();
|
|
2038
2064
|
}
|
|
2039
2065
|
searchApplied(searchText) {
|
|
2040
|
-
this
|
|
2066
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_offset, 0, "f");
|
|
2041
2067
|
this.searchText = searchText;
|
|
2042
|
-
this.
|
|
2068
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_loadSearchResults).call(this);
|
|
2043
2069
|
}
|
|
2044
2070
|
selectAll() {
|
|
2045
2071
|
this.selectedIdMap = new Map();
|
|
@@ -2049,12 +2075,12 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2049
2075
|
this.updateDisplayedItems();
|
|
2050
2076
|
}
|
|
2051
2077
|
infiniteScrollEnd() {
|
|
2052
|
-
this.
|
|
2078
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch).call(this);
|
|
2053
2079
|
/* Sanity check - else case would only happen if this was called directly */
|
|
2054
2080
|
/* istanbul ignore else */
|
|
2055
2081
|
if (this.hasMoreItems) {
|
|
2056
2082
|
this.isLoadingMore = true;
|
|
2057
|
-
this.
|
|
2083
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_performSearch).call(this, (result) => {
|
|
2058
2084
|
this.items = this.items.concat(result.items);
|
|
2059
2085
|
this.updateDisplayedItems();
|
|
2060
2086
|
this.isLoadingMore = false;
|
|
@@ -2072,38 +2098,6 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2072
2098
|
});
|
|
2073
2099
|
this.modalInstance.save(selectedItems);
|
|
2074
2100
|
}
|
|
2075
|
-
loadSearchResults() {
|
|
2076
|
-
this.cancelCurrentSearch();
|
|
2077
|
-
this.isSearching = true;
|
|
2078
|
-
this.performSearch((result) => {
|
|
2079
|
-
this.isSearching = false;
|
|
2080
|
-
this.items = result.items;
|
|
2081
|
-
});
|
|
2082
|
-
}
|
|
2083
|
-
createInitialSelectedItemsMap() {
|
|
2084
|
-
this.selectedIdMap = new Map(this.context.initialValue.map((item) => [
|
|
2085
|
-
item[this.context.idProperty],
|
|
2086
|
-
item,
|
|
2087
|
-
]));
|
|
2088
|
-
}
|
|
2089
|
-
performSearch(processResults) {
|
|
2090
|
-
this.currentSearchSub = this.context
|
|
2091
|
-
.searchAsync({
|
|
2092
|
-
displayType: 'modal',
|
|
2093
|
-
offset: this.offset,
|
|
2094
|
-
searchText: this.searchText || '',
|
|
2095
|
-
continuationData: this.continuationData,
|
|
2096
|
-
})
|
|
2097
|
-
.pipe(take(1))
|
|
2098
|
-
.subscribe((result) => {
|
|
2099
|
-
processResults(result);
|
|
2100
|
-
this.continuationData = result.continuationData;
|
|
2101
|
-
this.hasMoreItems = result.hasMore;
|
|
2102
|
-
this.offset = this.items.length;
|
|
2103
|
-
this.updateDisplayedItems();
|
|
2104
|
-
this.changeDetector.markForCheck();
|
|
2105
|
-
});
|
|
2106
|
-
}
|
|
2107
2101
|
updateDisplayedItems() {
|
|
2108
2102
|
if (this.onlyShowSelected) {
|
|
2109
2103
|
this.displayedItems = this.items.filter((item) => this.selectedIdMap.has(item[this.context.idProperty]));
|
|
@@ -2112,20 +2106,49 @@ class SkyLookupShowMoreAsyncModalComponent {
|
|
|
2112
2106
|
this.displayedItems = this.items;
|
|
2113
2107
|
}
|
|
2114
2108
|
}
|
|
2115
|
-
cancelCurrentSearch() {
|
|
2116
|
-
if (this.currentSearchSub) {
|
|
2117
|
-
this.currentSearchSub.unsubscribe();
|
|
2118
|
-
this.currentSearchSub = undefined;
|
|
2119
|
-
this.isLoadingMore = false;
|
|
2120
|
-
this.isSearching = false;
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
2109
|
}
|
|
2110
|
+
_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() {
|
|
2111
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch).call(this);
|
|
2112
|
+
this.isSearching = true;
|
|
2113
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_instances, "m", _SkyLookupShowMoreAsyncModalComponent_performSearch).call(this, (result) => {
|
|
2114
|
+
this.isSearching = false;
|
|
2115
|
+
this.items = result.items;
|
|
2116
|
+
});
|
|
2117
|
+
}, _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap = function _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap() {
|
|
2118
|
+
this.selectedIdMap = new Map(this.context.initialValue.map((item) => [
|
|
2119
|
+
item[this.context.idProperty],
|
|
2120
|
+
item,
|
|
2121
|
+
]));
|
|
2122
|
+
}, _SkyLookupShowMoreAsyncModalComponent_performSearch = function _SkyLookupShowMoreAsyncModalComponent_performSearch(processResults) {
|
|
2123
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, this.context
|
|
2124
|
+
.searchAsync({
|
|
2125
|
+
displayType: 'modal',
|
|
2126
|
+
offset: __classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_offset, "f"),
|
|
2127
|
+
searchText: this.searchText || '',
|
|
2128
|
+
continuationData: __classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_continuationData, "f"),
|
|
2129
|
+
})
|
|
2130
|
+
.pipe(take(1))
|
|
2131
|
+
.subscribe((result) => {
|
|
2132
|
+
processResults(result);
|
|
2133
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_continuationData, result.continuationData, "f");
|
|
2134
|
+
this.hasMoreItems = result.hasMore || false;
|
|
2135
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_offset, this.items.length, "f");
|
|
2136
|
+
this.updateDisplayedItems();
|
|
2137
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_changeDetector, "f").markForCheck();
|
|
2138
|
+
}), "f");
|
|
2139
|
+
}, _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch = function _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch() {
|
|
2140
|
+
if (__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, "f")) {
|
|
2141
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, "f").unsubscribe();
|
|
2142
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, undefined, "f");
|
|
2143
|
+
this.isLoadingMore = false;
|
|
2144
|
+
this.isSearching = false;
|
|
2145
|
+
}
|
|
2146
|
+
};
|
|
2124
2147
|
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 });
|
|
2125
|
-
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
|
|
2148
|
+
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 });
|
|
2126
2149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupShowMoreAsyncModalComponent, decorators: [{
|
|
2127
2150
|
type: Component,
|
|
2128
|
-
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
|
|
2151
|
+
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"] }]
|
|
2129
2152
|
}], ctorParameters: function () { return [{ type: i1$1.SkyModalInstance }, { type: SkyLookupShowMoreNativePickerAsyncContext }, { type: i0.ChangeDetectorRef }]; } });
|
|
2130
2153
|
|
|
2131
2154
|
/**
|
|
@@ -2135,6 +2158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2135
2158
|
class SkyLookupShowMoreNativePickerContext {
|
|
2136
2159
|
}
|
|
2137
2160
|
|
|
2161
|
+
var _SkyLookupShowMoreModalComponent_changeDetector, _SkyLookupShowMoreModalComponent_itemIndex, _SkyLookupShowMoreModalComponent_ngUnsubscribe;
|
|
2138
2162
|
/**
|
|
2139
2163
|
* @internal
|
|
2140
2164
|
* Internal component to implement the native picker.
|
|
@@ -2143,12 +2167,12 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2143
2167
|
constructor(modalInstance, context, changeDetector) {
|
|
2144
2168
|
this.modalInstance = modalInstance;
|
|
2145
2169
|
this.context = context;
|
|
2146
|
-
this.changeDetector = changeDetector;
|
|
2147
2170
|
/**
|
|
2148
2171
|
* @internal
|
|
2149
2172
|
* Fires when users select the button to add new options to the list.
|
|
2150
2173
|
*/
|
|
2151
2174
|
this.addClick = new Subject();
|
|
2175
|
+
this.items = [];
|
|
2152
2176
|
this.dataManagerConfig = {
|
|
2153
2177
|
sortOptions: [
|
|
2154
2178
|
{
|
|
@@ -2168,17 +2192,22 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2168
2192
|
this.displayedItems = [];
|
|
2169
2193
|
this.itemsHaveMore = false;
|
|
2170
2194
|
this.onlyShowSelected = false;
|
|
2195
|
+
this.repeaterItemTemplate = null;
|
|
2196
|
+
this.searchText = '';
|
|
2171
2197
|
this.selectedItems = [];
|
|
2172
|
-
this
|
|
2173
|
-
this
|
|
2198
|
+
_SkyLookupShowMoreModalComponent_changeDetector.set(this, void 0);
|
|
2199
|
+
_SkyLookupShowMoreModalComponent_itemIndex.set(this, 0);
|
|
2200
|
+
_SkyLookupShowMoreModalComponent_ngUnsubscribe.set(this, new Subject());
|
|
2201
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_changeDetector, changeDetector, "f");
|
|
2174
2202
|
}
|
|
2175
2203
|
ngAfterViewInit() {
|
|
2204
|
+
this.repeaterItemTemplate = this.context.userConfig.itemTemplate || null;
|
|
2176
2205
|
this.searchText = this.context.initialSearch;
|
|
2177
2206
|
this.addItems();
|
|
2178
2207
|
}
|
|
2179
2208
|
ngOnDestroy() {
|
|
2180
|
-
this.
|
|
2181
|
-
this.
|
|
2209
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_ngUnsubscribe, "f").next();
|
|
2210
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_ngUnsubscribe, "f").complete();
|
|
2182
2211
|
}
|
|
2183
2212
|
addButtonClicked() {
|
|
2184
2213
|
this.addClick.next();
|
|
@@ -2186,14 +2215,12 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2186
2215
|
addItems() {
|
|
2187
2216
|
if (!this.items || this.items.length === 0) {
|
|
2188
2217
|
const selectedItems = this.selectedItems.slice();
|
|
2189
|
-
this.items = this.context.items
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
})
|
|
2196
|
-
: [];
|
|
2218
|
+
this.items = this.context.items.map((item) => {
|
|
2219
|
+
return {
|
|
2220
|
+
value: item,
|
|
2221
|
+
selected: false,
|
|
2222
|
+
};
|
|
2223
|
+
});
|
|
2197
2224
|
this.items.forEach((item) => {
|
|
2198
2225
|
const isInitialValue = this.context.initialValue === item.value;
|
|
2199
2226
|
const initialIsArray = Array.isArray(this.context.initialValue);
|
|
@@ -2208,18 +2235,18 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2208
2235
|
});
|
|
2209
2236
|
this.selectedItems = selectedItems;
|
|
2210
2237
|
this.updateDataState();
|
|
2211
|
-
this.
|
|
2238
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2212
2239
|
}
|
|
2213
|
-
this
|
|
2240
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_itemIndex, __classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f") + 10, "f");
|
|
2214
2241
|
this.searchItems(this.items).then((searchedItems) => {
|
|
2215
|
-
this.displayedItems = searchedItems.slice(0, this
|
|
2216
|
-
if (this
|
|
2242
|
+
this.displayedItems = searchedItems.slice(0, __classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f"));
|
|
2243
|
+
if (__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f") > searchedItems.length) {
|
|
2217
2244
|
this.itemsHaveMore = false;
|
|
2218
2245
|
}
|
|
2219
2246
|
else {
|
|
2220
2247
|
this.itemsHaveMore = true;
|
|
2221
2248
|
}
|
|
2222
|
-
this.
|
|
2249
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2223
2250
|
});
|
|
2224
2251
|
}
|
|
2225
2252
|
clearAll() {
|
|
@@ -2230,7 +2257,7 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2230
2257
|
});
|
|
2231
2258
|
this.selectedItems = [];
|
|
2232
2259
|
this.updateDataState();
|
|
2233
|
-
this.
|
|
2260
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2234
2261
|
}
|
|
2235
2262
|
itemClick(selectedItem) {
|
|
2236
2263
|
if (this.context.selectMode === 'single') {
|
|
@@ -2238,12 +2265,13 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2238
2265
|
}
|
|
2239
2266
|
}
|
|
2240
2267
|
onItemSelect(newSelectState, itemToSelect) {
|
|
2268
|
+
const items = this.items;
|
|
2241
2269
|
if (this.context.selectMode === 'single') {
|
|
2242
2270
|
/* Sanity check - single select mode should only alow for a `true` select state */
|
|
2243
2271
|
/* istanbul ignore else */
|
|
2244
2272
|
if (newSelectState) {
|
|
2245
2273
|
itemToSelect.selected = true;
|
|
2246
|
-
|
|
2274
|
+
items.forEach((item) => {
|
|
2247
2275
|
if (item.value !== itemToSelect.value) {
|
|
2248
2276
|
item.selected = false;
|
|
2249
2277
|
}
|
|
@@ -2253,20 +2281,20 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2253
2281
|
item.selected = false;
|
|
2254
2282
|
}
|
|
2255
2283
|
});
|
|
2256
|
-
const itemIndex =
|
|
2284
|
+
const itemIndex = items.findIndex((item) => item.value === itemToSelect.value);
|
|
2257
2285
|
this.selectedItems = [
|
|
2258
|
-
{ index: itemIndex, itemData:
|
|
2286
|
+
{ index: itemIndex, itemData: items[itemIndex].value },
|
|
2259
2287
|
];
|
|
2260
2288
|
}
|
|
2261
2289
|
}
|
|
2262
2290
|
else {
|
|
2263
2291
|
const selectedItems = this.selectedItems;
|
|
2264
|
-
const allItemsIndex =
|
|
2292
|
+
const allItemsIndex = items.findIndex((item) => item.value === itemToSelect.value);
|
|
2265
2293
|
const selectedItemsIndex = selectedItems.findIndex((selectedItem) => selectedItem.index === allItemsIndex);
|
|
2266
2294
|
if (newSelectState && selectedItemsIndex === -1) {
|
|
2267
2295
|
selectedItems.push({
|
|
2268
2296
|
index: allItemsIndex,
|
|
2269
|
-
itemData:
|
|
2297
|
+
itemData: items[allItemsIndex].value,
|
|
2270
2298
|
});
|
|
2271
2299
|
}
|
|
2272
2300
|
else if (!newSelectState && selectedItemsIndex !== -1) {
|
|
@@ -2275,12 +2303,12 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2275
2303
|
this.selectedItems = selectedItems;
|
|
2276
2304
|
}
|
|
2277
2305
|
this.updateDataState();
|
|
2278
|
-
this.
|
|
2306
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2279
2307
|
}
|
|
2280
2308
|
searchApplied(searchText) {
|
|
2281
2309
|
/* istanbul ignore else */
|
|
2282
2310
|
if (this.searchText !== searchText) {
|
|
2283
|
-
this
|
|
2311
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_itemIndex, 10, "f");
|
|
2284
2312
|
}
|
|
2285
2313
|
this.searchText = searchText;
|
|
2286
2314
|
this.updateDataState();
|
|
@@ -2307,49 +2335,50 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2307
2335
|
}
|
|
2308
2336
|
}
|
|
2309
2337
|
selectAll() {
|
|
2338
|
+
const items = this.items;
|
|
2310
2339
|
const selectedItems = this.selectedItems;
|
|
2311
2340
|
this.displayedItems.forEach((item) => {
|
|
2312
2341
|
if (!item.selected) {
|
|
2313
2342
|
item.selected = true;
|
|
2314
|
-
const index =
|
|
2315
|
-
/* Sanity check */
|
|
2343
|
+
const index = items.indexOf(item);
|
|
2316
2344
|
/* istanbul ignore else */
|
|
2317
2345
|
if (selectedItems.findIndex((selectedItem) => selectedItem.index === index) < 0) {
|
|
2318
2346
|
selectedItems.push({
|
|
2319
2347
|
index: index,
|
|
2320
|
-
itemData:
|
|
2348
|
+
itemData: items[index].value,
|
|
2321
2349
|
});
|
|
2322
2350
|
}
|
|
2323
2351
|
}
|
|
2324
2352
|
});
|
|
2325
2353
|
this.selectedItems = selectedItems;
|
|
2326
2354
|
this.updateDataState();
|
|
2327
|
-
this.
|
|
2355
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2328
2356
|
}
|
|
2329
2357
|
updateDataState() {
|
|
2358
|
+
const items = this.items;
|
|
2330
2359
|
const selectedItems = this.selectedItems;
|
|
2331
|
-
|
|
2360
|
+
items.forEach((item, index) => {
|
|
2332
2361
|
item.selected =
|
|
2333
2362
|
selectedItems.findIndex((selectedItem) => selectedItem.index === index) !== -1;
|
|
2334
2363
|
});
|
|
2335
|
-
this.searchItems(
|
|
2364
|
+
this.searchItems(items).then((searchedItems) => {
|
|
2336
2365
|
if (this.onlyShowSelected) {
|
|
2337
2366
|
searchedItems = searchedItems.filter((item) => item.selected);
|
|
2338
2367
|
}
|
|
2339
|
-
this.displayedItems = searchedItems.slice(0, this
|
|
2340
|
-
if (this
|
|
2368
|
+
this.displayedItems = searchedItems.slice(0, __classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f"));
|
|
2369
|
+
if (__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_itemIndex, "f") > searchedItems.length) {
|
|
2341
2370
|
this.itemsHaveMore = false;
|
|
2342
2371
|
}
|
|
2343
2372
|
else {
|
|
2344
2373
|
this.itemsHaveMore = true;
|
|
2345
2374
|
}
|
|
2346
|
-
this.
|
|
2375
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2347
2376
|
});
|
|
2348
2377
|
}
|
|
2349
2378
|
updateItemData(data) {
|
|
2350
2379
|
this.context.items = data;
|
|
2351
|
-
this.items =
|
|
2352
|
-
this
|
|
2380
|
+
this.items = [];
|
|
2381
|
+
__classPrivateFieldSet(this, _SkyLookupShowMoreModalComponent_itemIndex, 10, "f");
|
|
2353
2382
|
this.selectedItems.forEach((selectedItem) => {
|
|
2354
2383
|
this.context.items.forEach((item, index) => {
|
|
2355
2384
|
if (selectedItem.itemData === item) {
|
|
@@ -2358,14 +2387,15 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2358
2387
|
});
|
|
2359
2388
|
});
|
|
2360
2389
|
this.addItems();
|
|
2361
|
-
this.
|
|
2390
|
+
__classPrivateFieldGet(this, _SkyLookupShowMoreModalComponent_changeDetector, "f").markForCheck();
|
|
2362
2391
|
}
|
|
2363
2392
|
}
|
|
2393
|
+
_SkyLookupShowMoreModalComponent_changeDetector = new WeakMap(), _SkyLookupShowMoreModalComponent_itemIndex = new WeakMap(), _SkyLookupShowMoreModalComponent_ngUnsubscribe = new WeakMap();
|
|
2364
2394
|
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 });
|
|
2365
|
-
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
|
|
2395
|
+
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 });
|
|
2366
2396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupShowMoreModalComponent, decorators: [{
|
|
2367
2397
|
type: Component,
|
|
2368
|
-
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
|
|
2398
|
+
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"] }]
|
|
2369
2399
|
}], ctorParameters: function () { return [{ type: i1$1.SkyModalInstance }, { type: SkyLookupShowMoreNativePickerContext }, { type: i0.ChangeDetectorRef }]; } });
|
|
2370
2400
|
|
|
2371
2401
|
/**
|
|
@@ -2387,6 +2417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2387
2417
|
type: Injectable
|
|
2388
2418
|
}] });
|
|
2389
2419
|
|
|
2420
|
+
var _SkyLookupAutocompleteAdapter__descriptorProperty, _SkyLookupAutocompleteAdapter__propertiesToSearch, _SkyLookupAutocompleteAdapter__search;
|
|
2390
2421
|
/**
|
|
2391
2422
|
* @internal
|
|
2392
2423
|
*/
|
|
@@ -2397,6 +2428,9 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2397
2428
|
* returned via an observable.
|
|
2398
2429
|
*/
|
|
2399
2430
|
this.searchAsync = new EventEmitter();
|
|
2431
|
+
_SkyLookupAutocompleteAdapter__descriptorProperty.set(this, void 0);
|
|
2432
|
+
_SkyLookupAutocompleteAdapter__propertiesToSearch.set(this, void 0);
|
|
2433
|
+
_SkyLookupAutocompleteAdapter__search.set(this, void 0);
|
|
2400
2434
|
}
|
|
2401
2435
|
/**
|
|
2402
2436
|
* Specifies an object property to display in the text input after users
|
|
@@ -2404,20 +2438,20 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2404
2438
|
* @default "name"
|
|
2405
2439
|
*/
|
|
2406
2440
|
set descriptorProperty(value) {
|
|
2407
|
-
this
|
|
2441
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, value, "f");
|
|
2408
2442
|
}
|
|
2409
2443
|
get descriptorProperty() {
|
|
2410
|
-
return this
|
|
2444
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, "f") || 'name';
|
|
2411
2445
|
}
|
|
2412
2446
|
/**
|
|
2413
2447
|
* Specifies an array of object properties to search.
|
|
2414
2448
|
* @default ["name"]
|
|
2415
2449
|
*/
|
|
2416
2450
|
set propertiesToSearch(value) {
|
|
2417
|
-
this
|
|
2451
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, value, "f");
|
|
2418
2452
|
}
|
|
2419
2453
|
get propertiesToSearch() {
|
|
2420
|
-
return this
|
|
2454
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, "f") || ['name'];
|
|
2421
2455
|
}
|
|
2422
2456
|
/**
|
|
2423
2457
|
* Specifies a function to dynamically manage the data source when users
|
|
@@ -2428,16 +2462,17 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2428
2462
|
* `search`.
|
|
2429
2463
|
*/
|
|
2430
2464
|
set search(value) {
|
|
2431
|
-
this
|
|
2465
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__search, value, "f");
|
|
2432
2466
|
}
|
|
2433
2467
|
get search() {
|
|
2434
|
-
return (this
|
|
2468
|
+
return (__classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__search, "f") ||
|
|
2435
2469
|
skyAutocompleteDefaultSearchFunction({
|
|
2436
2470
|
propertiesToSearch: this.propertiesToSearch,
|
|
2437
2471
|
searchFilters: this.searchFilters,
|
|
2438
2472
|
}));
|
|
2439
2473
|
}
|
|
2440
2474
|
}
|
|
2475
|
+
_SkyLookupAutocompleteAdapter__descriptorProperty = new WeakMap(), _SkyLookupAutocompleteAdapter__propertiesToSearch = new WeakMap(), _SkyLookupAutocompleteAdapter__search = new WeakMap();
|
|
2441
2476
|
SkyLookupAutocompleteAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupAutocompleteAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2442
2477
|
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 });
|
|
2443
2478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupAutocompleteAdapter, decorators: [{
|
|
@@ -2462,17 +2497,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2462
2497
|
type: Output
|
|
2463
2498
|
}] } });
|
|
2464
2499
|
|
|
2500
|
+
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;
|
|
2465
2501
|
class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
2466
|
-
constructor(changeDetector, elementRef, windowRef,
|
|
2502
|
+
constructor(changeDetector, elementRef, windowRef, adapter, modalService, resourcesService, ngControl, inputBoxHostSvc, themeSvc) {
|
|
2467
2503
|
super();
|
|
2468
|
-
this.changeDetector = changeDetector;
|
|
2469
|
-
this.elementRef = elementRef;
|
|
2470
|
-
this.windowRef = windowRef;
|
|
2471
|
-
this.adapter = adapter;
|
|
2472
|
-
this.modalService = modalService;
|
|
2473
|
-
this.resourcesService = resourcesService;
|
|
2474
2504
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
2475
2505
|
this.themeSvc = themeSvc;
|
|
2506
|
+
_SkyLookupComponent_instances.add(this);
|
|
2476
2507
|
/**
|
|
2477
2508
|
* Indicates whether to disable the lookup field.
|
|
2478
2509
|
*/
|
|
@@ -2492,15 +2523,35 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2492
2523
|
this.autocompleteController = new Subject();
|
|
2493
2524
|
this.isInputFocused = false;
|
|
2494
2525
|
this.tokensController = new Subject();
|
|
2495
|
-
this
|
|
2496
|
-
this
|
|
2497
|
-
this
|
|
2526
|
+
_SkyLookupComponent_adapter.set(this, void 0);
|
|
2527
|
+
_SkyLookupComponent_elementRef.set(this, void 0);
|
|
2528
|
+
_SkyLookupComponent_changeDetector.set(this, void 0);
|
|
2529
|
+
_SkyLookupComponent_idle.set(this, new Subject());
|
|
2530
|
+
_SkyLookupComponent_markForTokenFocusOnKeyUp.set(this, false);
|
|
2531
|
+
_SkyLookupComponent_modalService.set(this, void 0);
|
|
2532
|
+
_SkyLookupComponent_ngUnsubscribe.set(this, new Subject());
|
|
2533
|
+
_SkyLookupComponent_openNativePicker.set(this, void 0);
|
|
2534
|
+
_SkyLookupComponent_resourcesService.set(this, void 0);
|
|
2535
|
+
_SkyLookupComponent_windowRef.set(this, void 0);
|
|
2536
|
+
_SkyLookupComponent__autocompleteInputDirective.set(this, void 0);
|
|
2537
|
+
_SkyLookupComponent__data.set(this, void 0);
|
|
2538
|
+
_SkyLookupComponent__selectMode.set(this, void 0);
|
|
2539
|
+
_SkyLookupComponent__tokens.set(this, void 0);
|
|
2540
|
+
_SkyLookupComponent__value.set(this, void 0);
|
|
2498
2541
|
// Angular automatically constructs these methods.
|
|
2499
2542
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2500
2543
|
this.onChange = (value) => { };
|
|
2501
2544
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2502
2545
|
this.onTouched = () => { };
|
|
2503
|
-
|
|
2546
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_changeDetector, changeDetector, "f");
|
|
2547
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_elementRef, elementRef, "f");
|
|
2548
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_windowRef, windowRef, "f");
|
|
2549
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_adapter, adapter, "f");
|
|
2550
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_modalService, modalService, "f");
|
|
2551
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_resourcesService, resourcesService, "f");
|
|
2552
|
+
if (ngControl) {
|
|
2553
|
+
ngControl.valueAccessor = this;
|
|
2554
|
+
}
|
|
2504
2555
|
}
|
|
2505
2556
|
/**
|
|
2506
2557
|
* Specifies a data source for the lookup component to search when users
|
|
@@ -2509,13 +2560,13 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2509
2560
|
* @default []
|
|
2510
2561
|
*/
|
|
2511
2562
|
set data(value) {
|
|
2512
|
-
this
|
|
2513
|
-
if (this
|
|
2514
|
-
this.
|
|
2563
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__data, value, "f");
|
|
2564
|
+
if (__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f") && this.searchAsync.observers.length === 0) {
|
|
2565
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f").componentInstance.updateItemData(value);
|
|
2515
2566
|
}
|
|
2516
2567
|
}
|
|
2517
2568
|
get data() {
|
|
2518
|
-
return this
|
|
2569
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__data, "f") || [];
|
|
2519
2570
|
}
|
|
2520
2571
|
/**
|
|
2521
2572
|
* Specifies whether users can select one option or multiple options.
|
|
@@ -2523,61 +2574,61 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2523
2574
|
*/
|
|
2524
2575
|
set selectMode(value) {
|
|
2525
2576
|
const multipleToSingle = value === 'single' && this.selectMode === 'multiple';
|
|
2526
|
-
this
|
|
2527
|
-
this.
|
|
2577
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__selectMode, value, "f");
|
|
2578
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_updateForSelectMode).call(this);
|
|
2528
2579
|
if (multipleToSingle) {
|
|
2529
2580
|
if (this.value && this.value.length > 1) {
|
|
2530
2581
|
// The `setTimeout` is needed to avoid a `ExpressionChangedAfterItHasBeenCheckedError` error in template forms.
|
|
2531
2582
|
setTimeout(() => {
|
|
2532
2583
|
this.writeValue([this.value[0]]);
|
|
2533
|
-
this.
|
|
2584
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").detectChanges();
|
|
2534
2585
|
});
|
|
2535
2586
|
}
|
|
2536
2587
|
}
|
|
2537
2588
|
}
|
|
2538
2589
|
get selectMode() {
|
|
2539
|
-
return this
|
|
2590
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__selectMode, "f") || 'multiple';
|
|
2540
2591
|
}
|
|
2541
2592
|
get tokens() {
|
|
2542
|
-
return this
|
|
2593
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__tokens, "f");
|
|
2543
2594
|
}
|
|
2544
2595
|
set tokens(value) {
|
|
2545
2596
|
// Collapse the tokens into a single token if the user has selected many options.
|
|
2546
2597
|
if (this.enableShowMore && this.value.length > 5) {
|
|
2547
|
-
this
|
|
2598
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_resourcesService, "f")
|
|
2548
2599
|
.getString('skyux_lookup_tokens_summary', this.value.length.toString())
|
|
2549
2600
|
.pipe(take(1))
|
|
2550
2601
|
.subscribe((label) => {
|
|
2551
|
-
this
|
|
2602
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__tokens, [
|
|
2552
2603
|
{
|
|
2553
2604
|
value: { [this.descriptorProperty]: label },
|
|
2554
2605
|
},
|
|
2555
|
-
];
|
|
2556
|
-
this.
|
|
2606
|
+
], "f");
|
|
2607
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2557
2608
|
});
|
|
2558
2609
|
}
|
|
2559
2610
|
else {
|
|
2560
|
-
this
|
|
2561
|
-
this.
|
|
2611
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__tokens, value, "f");
|
|
2612
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2562
2613
|
}
|
|
2563
2614
|
}
|
|
2564
2615
|
get value() {
|
|
2565
|
-
return this
|
|
2616
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__value, "f") ? __classPrivateFieldGet(this, _SkyLookupComponent__value, "f") : [];
|
|
2566
2617
|
}
|
|
2567
2618
|
set value(newValue) {
|
|
2568
|
-
this
|
|
2569
|
-
if (!this
|
|
2570
|
-
this.tokens = this.
|
|
2619
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__value, newValue, "f");
|
|
2620
|
+
if (!__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f")) {
|
|
2621
|
+
this.tokens = __classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_parseTokens).call(this, newValue);
|
|
2571
2622
|
}
|
|
2572
|
-
this.onChange(this
|
|
2623
|
+
this.onChange(__classPrivateFieldGet(this, _SkyLookupComponent__value, "f"));
|
|
2573
2624
|
this.onTouched();
|
|
2574
2625
|
}
|
|
2575
2626
|
set autocompleteInputDirective(value) {
|
|
2576
|
-
this
|
|
2577
|
-
this.
|
|
2627
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__autocompleteInputDirective, value, "f");
|
|
2628
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_updateForSelectMode).call(this);
|
|
2578
2629
|
}
|
|
2579
2630
|
get autocompleteInputDirective() {
|
|
2580
|
-
return this
|
|
2631
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__autocompleteInputDirective, "f");
|
|
2581
2632
|
}
|
|
2582
2633
|
ngOnInit() {
|
|
2583
2634
|
if (this.inputBoxHostSvc) {
|
|
@@ -2596,32 +2647,32 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2596
2647
|
// This is required for the autocomplete directive to be set after elements
|
|
2597
2648
|
// are rearranged when switching themes.
|
|
2598
2649
|
this.themeSvc.settingsChange
|
|
2599
|
-
.pipe(takeUntil(this
|
|
2650
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_ngUnsubscribe, "f")))
|
|
2600
2651
|
.subscribe(() => {
|
|
2601
|
-
this.
|
|
2652
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2602
2653
|
});
|
|
2603
2654
|
}
|
|
2604
2655
|
}
|
|
2605
2656
|
ngAfterViewInit() {
|
|
2606
2657
|
if (!this.disabled) {
|
|
2607
|
-
this.
|
|
2658
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_addEventListeners).call(this);
|
|
2608
2659
|
}
|
|
2609
2660
|
}
|
|
2610
2661
|
ngOnDestroy() {
|
|
2611
|
-
this.
|
|
2612
|
-
this.
|
|
2613
|
-
this.
|
|
2662
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_removeEventListeners).call(this);
|
|
2663
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_ngUnsubscribe, "f").next();
|
|
2664
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_ngUnsubscribe, "f").complete();
|
|
2614
2665
|
this.tokensController.complete();
|
|
2615
2666
|
}
|
|
2616
2667
|
addButtonClicked() {
|
|
2617
2668
|
this.addClick.emit({
|
|
2618
|
-
itemAdded: (args) => this.
|
|
2669
|
+
itemAdded: (args) => __classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_onAddButtonComplete).call(this, args),
|
|
2619
2670
|
});
|
|
2620
2671
|
}
|
|
2621
2672
|
onAutocompleteSelectionChange(change) {
|
|
2622
2673
|
/* istanbul ignore else */
|
|
2623
2674
|
if (change.selectedItem) {
|
|
2624
|
-
this.
|
|
2675
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_addToSelected).call(this, change.selectedItem);
|
|
2625
2676
|
}
|
|
2626
2677
|
else if (this.selectMode === 'single') {
|
|
2627
2678
|
this.writeValue([]);
|
|
@@ -2636,22 +2687,22 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2636
2687
|
}
|
|
2637
2688
|
if (this.tokens !== change) {
|
|
2638
2689
|
if (change.length === 0) {
|
|
2639
|
-
this.
|
|
2690
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2640
2691
|
}
|
|
2641
2692
|
// NOTE: We do this here instead of just using the `value` setter because we need to use the
|
|
2642
2693
|
// set of tokens returned here for the purposes of setting focus (see `onTokensKeyUp`).
|
|
2643
|
-
this
|
|
2694
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__value, change.map((token) => {
|
|
2644
2695
|
return token.value;
|
|
2645
|
-
});
|
|
2696
|
+
}), "f");
|
|
2646
2697
|
this.tokens = change;
|
|
2647
|
-
this.
|
|
2648
|
-
this.onChange(this
|
|
2698
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendAutocompleteMessage).call(this, SkyAutocompleteMessageType.RepositionDropdown);
|
|
2699
|
+
this.onChange(__classPrivateFieldGet(this, _SkyLookupComponent__value, "f"));
|
|
2649
2700
|
this.onTouched();
|
|
2650
2701
|
}
|
|
2651
2702
|
}
|
|
2652
2703
|
onTokensFocusIndexOverRange() {
|
|
2653
|
-
this.
|
|
2654
|
-
this.
|
|
2704
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.setTimeout(() => {
|
|
2705
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2655
2706
|
});
|
|
2656
2707
|
}
|
|
2657
2708
|
onTokensKeyUp(event) {
|
|
@@ -2659,15 +2710,15 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2659
2710
|
if (this.selectMode !== 'single') {
|
|
2660
2711
|
switch (event.key) {
|
|
2661
2712
|
case 'Backspace':
|
|
2662
|
-
this.
|
|
2663
|
-
this.
|
|
2713
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.RemoveActiveToken);
|
|
2714
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.FocusPreviousToken);
|
|
2664
2715
|
event.preventDefault();
|
|
2665
2716
|
break;
|
|
2666
2717
|
case 'Del':
|
|
2667
2718
|
case 'Delete':
|
|
2668
|
-
this.
|
|
2669
|
-
this.
|
|
2670
|
-
this.
|
|
2719
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.RemoveActiveToken);
|
|
2720
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.setTimeout(() => {
|
|
2721
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.FocusActiveToken);
|
|
2671
2722
|
});
|
|
2672
2723
|
event.preventDefault();
|
|
2673
2724
|
break;
|
|
@@ -2676,7 +2727,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2676
2727
|
}
|
|
2677
2728
|
writeValue(value) {
|
|
2678
2729
|
this.value = value ? value : [];
|
|
2679
|
-
this.
|
|
2730
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_updateForSelectMode).call(this);
|
|
2680
2731
|
}
|
|
2681
2732
|
registerOnChange(fn) {
|
|
2682
2733
|
this.onChange = fn;
|
|
@@ -2686,22 +2737,23 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2686
2737
|
}
|
|
2687
2738
|
// Allows Angular to disable the input.
|
|
2688
2739
|
setDisabledState(disabled) {
|
|
2689
|
-
this.
|
|
2740
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_removeEventListeners).call(this);
|
|
2690
2741
|
if (!disabled) {
|
|
2691
|
-
this.
|
|
2742
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_addEventListeners).call(this);
|
|
2692
2743
|
}
|
|
2693
2744
|
this.disabled = disabled;
|
|
2694
|
-
this.
|
|
2745
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2695
2746
|
}
|
|
2696
2747
|
clearSearchText() {
|
|
2697
2748
|
this.autocompleteInputDirective.value = undefined;
|
|
2698
|
-
this.autocompleteInputDirective.inputTextValue =
|
|
2749
|
+
this.autocompleteInputDirective.inputTextValue = '';
|
|
2699
2750
|
}
|
|
2700
2751
|
// Handles when to focus on the tokens.
|
|
2701
2752
|
// Check for empty search text on keydown, before the escape key is fully pressed.
|
|
2702
2753
|
// (Otherwise, a single character being escaped would register as empty on keyup.)
|
|
2703
2754
|
// If empty on keydown, set a flag so that the appropriate action can be taken on keyup.
|
|
2704
|
-
inputKeydown(event
|
|
2755
|
+
inputKeydown(event) {
|
|
2756
|
+
const value = event.target.value;
|
|
2705
2757
|
/* Sanity check as this should only be called when in multiple select mode */
|
|
2706
2758
|
/* istanbul ignore else */
|
|
2707
2759
|
if (this.selectMode !== 'single') {
|
|
@@ -2713,10 +2765,10 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2713
2765
|
case 'Backspace':
|
|
2714
2766
|
case 'Left':
|
|
2715
2767
|
if (value) {
|
|
2716
|
-
this
|
|
2768
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_markForTokenFocusOnKeyUp, false, "f");
|
|
2717
2769
|
}
|
|
2718
2770
|
else {
|
|
2719
|
-
this
|
|
2771
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_markForTokenFocusOnKeyUp, true, "f");
|
|
2720
2772
|
}
|
|
2721
2773
|
break;
|
|
2722
2774
|
default:
|
|
@@ -2737,8 +2789,8 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2737
2789
|
case 'Backspace':
|
|
2738
2790
|
case 'Left':
|
|
2739
2791
|
/* istanbul ignore else */
|
|
2740
|
-
if (this
|
|
2741
|
-
this.
|
|
2792
|
+
if (__classPrivateFieldGet(this, _SkyLookupComponent_markForTokenFocusOnKeyUp, "f")) {
|
|
2793
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendTokensMessage).call(this, SkyTokensMessageType.FocusLastToken);
|
|
2742
2794
|
event.preventDefault();
|
|
2743
2795
|
}
|
|
2744
2796
|
break;
|
|
@@ -2752,7 +2804,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2752
2804
|
if (this.disabled) {
|
|
2753
2805
|
return;
|
|
2754
2806
|
}
|
|
2755
|
-
this.
|
|
2807
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_sendAutocompleteMessage).call(this, SkyAutocompleteMessageType.CloseDropdown);
|
|
2756
2808
|
let isValueInTextBox = false;
|
|
2757
2809
|
if (this.selectMode === 'single') {
|
|
2758
2810
|
isValueInTextBox =
|
|
@@ -2770,65 +2822,22 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2770
2822
|
this.openPicker(event.inputValue);
|
|
2771
2823
|
}
|
|
2772
2824
|
}
|
|
2773
|
-
createNativePickerInstance(initialSearch) {
|
|
2774
|
-
const initialValue = this.value;
|
|
2775
|
-
const modalConfig = this.showMoreConfig?.nativePickerConfig || {};
|
|
2776
|
-
if (!modalConfig.itemTemplate) {
|
|
2777
|
-
modalConfig.itemTemplate = this.searchResultTemplate;
|
|
2778
|
-
}
|
|
2779
|
-
let contextProviderType;
|
|
2780
|
-
let contextProviderValue;
|
|
2781
|
-
let modalComponentType;
|
|
2782
|
-
if (this.searchAsync.observers.length > 0) {
|
|
2783
|
-
contextProviderType = SkyLookupShowMoreNativePickerAsyncContext;
|
|
2784
|
-
modalComponentType = SkyLookupShowMoreAsyncModalComponent;
|
|
2785
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext();
|
|
2786
|
-
contextProviderValue.idProperty = this.idProperty;
|
|
2787
|
-
contextProviderValue.searchAsync = (args) => {
|
|
2788
|
-
this.searchAsync.emit(args);
|
|
2789
|
-
return args.result;
|
|
2790
|
-
};
|
|
2791
|
-
}
|
|
2792
|
-
else {
|
|
2793
|
-
contextProviderType = SkyLookupShowMoreNativePickerContext;
|
|
2794
|
-
modalComponentType = SkyLookupShowMoreModalComponent;
|
|
2795
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerContext();
|
|
2796
|
-
contextProviderValue.items = this.data;
|
|
2797
|
-
contextProviderValue.search = this.search;
|
|
2798
|
-
}
|
|
2799
|
-
contextProviderValue.descriptorProperty = this.descriptorProperty;
|
|
2800
|
-
contextProviderValue.initialSearch = initialSearch;
|
|
2801
|
-
contextProviderValue.initialValue = initialValue;
|
|
2802
|
-
contextProviderValue.selectMode = this.selectMode;
|
|
2803
|
-
contextProviderValue.showAddButton = this.showAddButton;
|
|
2804
|
-
contextProviderValue.userConfig = modalConfig;
|
|
2805
|
-
return this.modalService.open(modalComponentType, {
|
|
2806
|
-
providers: [
|
|
2807
|
-
{
|
|
2808
|
-
provide: contextProviderType,
|
|
2809
|
-
useValue: contextProviderValue,
|
|
2810
|
-
},
|
|
2811
|
-
],
|
|
2812
|
-
size: 'large',
|
|
2813
|
-
wrapperClass: this.wrapperClass,
|
|
2814
|
-
});
|
|
2815
|
-
}
|
|
2816
2825
|
openPicker(initialSearch) {
|
|
2817
2826
|
if (this.showMoreConfig?.customPicker) {
|
|
2818
2827
|
this.showMoreConfig.customPicker.open({
|
|
2819
2828
|
items: this.data,
|
|
2820
|
-
initialSearch
|
|
2829
|
+
initialSearch,
|
|
2821
2830
|
initialValue: this.value,
|
|
2822
2831
|
});
|
|
2823
2832
|
}
|
|
2824
2833
|
else {
|
|
2825
2834
|
const initialValue = this.value;
|
|
2826
|
-
this
|
|
2827
|
-
this.
|
|
2835
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_openNativePicker, __classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_createNativePickerInstance).call(this, initialSearch), "f");
|
|
2836
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f").componentInstance.addClick.subscribe(() => {
|
|
2828
2837
|
this.addButtonClicked();
|
|
2829
2838
|
});
|
|
2830
|
-
this.
|
|
2831
|
-
this
|
|
2839
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f").closed.subscribe((closeArgs) => {
|
|
2840
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_openNativePicker, undefined, "f");
|
|
2832
2841
|
if (closeArgs.reason === 'save') {
|
|
2833
2842
|
let selectedItems = [];
|
|
2834
2843
|
if (this.searchAsync.observers.length > 0) {
|
|
@@ -2848,131 +2857,165 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2848
2857
|
else {
|
|
2849
2858
|
this.writeValue(initialValue);
|
|
2850
2859
|
}
|
|
2851
|
-
this.
|
|
2852
|
-
this.
|
|
2860
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2861
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2853
2862
|
});
|
|
2854
2863
|
}
|
|
2855
2864
|
}
|
|
2856
2865
|
onSearchAsync(args) {
|
|
2857
2866
|
this.searchAsync.emit(args);
|
|
2858
2867
|
}
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
this.
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2868
|
+
}
|
|
2869
|
+
_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) {
|
|
2870
|
+
const initialValue = this.value;
|
|
2871
|
+
const modalConfig = this.showMoreConfig?.nativePickerConfig || {};
|
|
2872
|
+
if (!modalConfig.itemTemplate) {
|
|
2873
|
+
modalConfig.itemTemplate = this.searchResultTemplate;
|
|
2874
|
+
}
|
|
2875
|
+
let contextProviderType;
|
|
2876
|
+
let contextProviderValue;
|
|
2877
|
+
let modalComponentType;
|
|
2878
|
+
if (this.searchAsync.observers.length > 0) {
|
|
2879
|
+
contextProviderType = SkyLookupShowMoreNativePickerAsyncContext;
|
|
2880
|
+
modalComponentType = SkyLookupShowMoreAsyncModalComponent;
|
|
2881
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext();
|
|
2882
|
+
contextProviderValue.idProperty = this.idProperty;
|
|
2883
|
+
contextProviderValue.searchAsync = (args) => {
|
|
2884
|
+
this.searchAsync.emit(args);
|
|
2885
|
+
return args.result;
|
|
2886
|
+
};
|
|
2878
2887
|
}
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2888
|
+
else {
|
|
2889
|
+
contextProviderType = SkyLookupShowMoreNativePickerContext;
|
|
2890
|
+
modalComponentType = SkyLookupShowMoreModalComponent;
|
|
2891
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerContext();
|
|
2892
|
+
contextProviderValue.items = this.data;
|
|
2893
|
+
contextProviderValue.search = this.search;
|
|
2894
|
+
}
|
|
2895
|
+
contextProviderValue.descriptorProperty = this.descriptorProperty;
|
|
2896
|
+
contextProviderValue.initialSearch = initialSearch;
|
|
2897
|
+
contextProviderValue.initialValue = initialValue;
|
|
2898
|
+
contextProviderValue.selectMode = this.selectMode;
|
|
2899
|
+
contextProviderValue.showAddButton = this.showAddButton;
|
|
2900
|
+
contextProviderValue.userConfig = modalConfig;
|
|
2901
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent_modalService, "f").open(modalComponentType, {
|
|
2902
|
+
providers: [
|
|
2903
|
+
{
|
|
2904
|
+
provide: contextProviderType,
|
|
2905
|
+
useValue: contextProviderValue,
|
|
2906
|
+
},
|
|
2907
|
+
],
|
|
2908
|
+
size: 'large',
|
|
2909
|
+
wrapperClass: this.wrapperClass,
|
|
2910
|
+
});
|
|
2911
|
+
}, _SkyLookupComponent_addToSelected = function _SkyLookupComponent_addToSelected(item) {
|
|
2912
|
+
let selectedItems;
|
|
2913
|
+
if (this.selectMode === 'single') {
|
|
2914
|
+
selectedItems = [item];
|
|
2882
2915
|
}
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2916
|
+
else {
|
|
2917
|
+
selectedItems = this.value;
|
|
2918
|
+
const idProperty = this.idProperty || '';
|
|
2919
|
+
// If items have a unique identifier, don't allow the same item to be added twice.
|
|
2920
|
+
if (!this.idProperty ||
|
|
2921
|
+
!this.value.some((existingItem) => existingItem[idProperty] === item[idProperty])) {
|
|
2922
|
+
selectedItems.push(item);
|
|
2923
|
+
}
|
|
2924
|
+
this.clearSearchText();
|
|
2925
|
+
}
|
|
2926
|
+
this.writeValue(selectedItems);
|
|
2927
|
+
}, _SkyLookupComponent_addEventListeners = function _SkyLookupComponent_addEventListeners() {
|
|
2928
|
+
__classPrivateFieldSet(this, _SkyLookupComponent_idle, new Subject(), "f");
|
|
2929
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInputOnHostClick).call(this);
|
|
2930
|
+
}, _SkyLookupComponent_removeEventListeners = function _SkyLookupComponent_removeEventListeners() {
|
|
2931
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f").next();
|
|
2932
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f").complete();
|
|
2933
|
+
}, _SkyLookupComponent_focusInputOnHostClick = function _SkyLookupComponent_focusInputOnHostClick() {
|
|
2934
|
+
let hostElement = !this.inputBoxHostSvc
|
|
2935
|
+
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2936
|
+
: this.lookupWrapperRef.nativeElement;
|
|
2937
|
+
const documentObj = __classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.document;
|
|
2938
|
+
// Handles focusing the input when the host is clicked.
|
|
2939
|
+
// The input should NOT be focused if other elements (tokens, etc.)
|
|
2940
|
+
// are currently focused or being tabbed through.
|
|
2941
|
+
fromEvent(documentObj, 'mousedown')
|
|
2942
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2943
|
+
.subscribe((event) => {
|
|
2944
|
+
hostElement = !this.inputBoxHostSvc
|
|
2945
|
+
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2886
2946
|
: this.lookupWrapperRef.nativeElement;
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
const classList = documentObj.activeElement.classList;
|
|
2913
|
-
if (!classList || !classList.contains('sky-token')) {
|
|
2914
|
-
this.focusInput();
|
|
2915
|
-
}
|
|
2916
|
-
});
|
|
2917
|
-
}
|
|
2918
|
-
focusInput() {
|
|
2919
|
-
this.adapter.focusInput(this.lookupWrapperRef);
|
|
2947
|
+
this.isInputFocused = hostElement.contains(event.target);
|
|
2948
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2949
|
+
});
|
|
2950
|
+
fromEvent(documentObj, 'focusin')
|
|
2951
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2952
|
+
.subscribe((event) => {
|
|
2953
|
+
hostElement = !this.inputBoxHostSvc
|
|
2954
|
+
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2955
|
+
: this.lookupWrapperRef.nativeElement;
|
|
2956
|
+
this.isInputFocused = hostElement.contains(event.target);
|
|
2957
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2958
|
+
});
|
|
2959
|
+
fromEvent(hostElement, 'mouseup')
|
|
2960
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2961
|
+
.subscribe(() => {
|
|
2962
|
+
const classList = documentObj.activeElement.classList;
|
|
2963
|
+
if (!classList || !classList.contains('sky-token')) {
|
|
2964
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_instances, "m", _SkyLookupComponent_focusInput).call(this);
|
|
2965
|
+
}
|
|
2966
|
+
});
|
|
2967
|
+
}, _SkyLookupComponent_focusInput = function _SkyLookupComponent_focusInput() {
|
|
2968
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_adapter, "f").focusInput(this.lookupWrapperRef);
|
|
2969
|
+
}, _SkyLookupComponent_onAddButtonComplete = function _SkyLookupComponent_onAddButtonComplete(args) {
|
|
2970
|
+
if (args.data) {
|
|
2971
|
+
this.data = args.data;
|
|
2920
2972
|
}
|
|
2921
|
-
|
|
2922
|
-
if (
|
|
2923
|
-
this
|
|
2973
|
+
if (this.data.indexOf(args.item) >= 0) {
|
|
2974
|
+
if (__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f")) {
|
|
2975
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_openNativePicker, "f")
|
|
2976
|
+
.componentInstance.onItemSelect(true, { value: args.item, selected: false });
|
|
2924
2977
|
}
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2978
|
+
else {
|
|
2979
|
+
let newValue = this.value;
|
|
2980
|
+
if (this.selectMode === 'multiple') {
|
|
2981
|
+
newValue = this.value.concat(args.item);
|
|
2929
2982
|
}
|
|
2930
2983
|
else {
|
|
2931
|
-
|
|
2932
|
-
if (this.selectMode === 'multiple') {
|
|
2933
|
-
newValue = this.value.concat(args.item);
|
|
2934
|
-
}
|
|
2935
|
-
else {
|
|
2936
|
-
newValue = [args.item];
|
|
2937
|
-
}
|
|
2938
|
-
this.writeValue(newValue);
|
|
2984
|
+
newValue = [args.item];
|
|
2939
2985
|
}
|
|
2986
|
+
this.writeValue(newValue);
|
|
2940
2987
|
}
|
|
2941
2988
|
}
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
}
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
}
|
|
2960
|
-
else {
|
|
2961
|
-
this.clearSearchText();
|
|
2962
|
-
}
|
|
2989
|
+
}, _SkyLookupComponent_parseTokens = function _SkyLookupComponent_parseTokens(data) {
|
|
2990
|
+
return data.map((item) => {
|
|
2991
|
+
return {
|
|
2992
|
+
value: item,
|
|
2993
|
+
};
|
|
2994
|
+
});
|
|
2995
|
+
}, _SkyLookupComponent_sendAutocompleteMessage = function _SkyLookupComponent_sendAutocompleteMessage(type) {
|
|
2996
|
+
this.autocompleteController.next({ type });
|
|
2997
|
+
}, _SkyLookupComponent_sendTokensMessage = function _SkyLookupComponent_sendTokensMessage(type) {
|
|
2998
|
+
this.tokensController.next({ type });
|
|
2999
|
+
}, _SkyLookupComponent_updateForSelectMode = function _SkyLookupComponent_updateForSelectMode() {
|
|
3000
|
+
if (this.autocompleteInputDirective) {
|
|
3001
|
+
if (this.selectMode === 'single') {
|
|
3002
|
+
this.autocompleteInputDirective.value = this.value && this.value[0];
|
|
3003
|
+
}
|
|
3004
|
+
else {
|
|
3005
|
+
this.clearSearchText();
|
|
2963
3006
|
}
|
|
2964
3007
|
}
|
|
2965
|
-
}
|
|
2966
|
-
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:
|
|
2967
|
-
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 });
|
|
3008
|
+
};
|
|
3009
|
+
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 });
|
|
3010
|
+
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 });
|
|
2968
3011
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLookupComponent, decorators: [{
|
|
2969
3012
|
type: Component,
|
|
2970
|
-
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(
|
|
2971
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAppWindowRef }, { type: i8.NgControl, decorators: [{
|
|
3013
|
+
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"] }]
|
|
3014
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAppWindowRef }, { type: SkyLookupAdapterService }, { type: i1$1.SkyModalService }, { type: i4$1.SkyLibResourcesService }, { type: i8.NgControl, decorators: [{
|
|
2972
3015
|
type: Self
|
|
2973
3016
|
}, {
|
|
2974
3017
|
type: Optional
|
|
2975
|
-
}] }, { type:
|
|
3018
|
+
}] }, { type: i6.SkyInputBoxHostService, decorators: [{
|
|
2976
3019
|
type: Optional
|
|
2977
3020
|
}] }, { type: i7.SkyThemeService, decorators: [{
|
|
2978
3021
|
type: Optional
|