@skyux/lookup 7.0.0-beta.0 → 7.0.0-beta.10
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 +3474 -1303
- package/esm2020/lib/modules/autocomplete/autocomplete-default-search-function.mjs +1 -1
- package/esm2020/lib/modules/autocomplete/autocomplete-input.directive.mjs +2 -2
- package/esm2020/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.mjs +1 -1
- package/esm2020/lib/modules/autocomplete/autocomplete.component.mjs +66 -41
- package/esm2020/lib/modules/autocomplete/types/autocomplete-default-search-function-options.mjs +1 -1
- package/esm2020/lib/modules/country-field/country-field.component.mjs +36 -30
- package/esm2020/lib/modules/lookup/lookup-autocomplete-adapter.mjs +45 -14
- package/esm2020/lib/modules/lookup/lookup-show-more-modal.component.mjs +2 -2
- package/esm2020/lib/modules/lookup/lookup.component.mjs +60 -41
- package/esm2020/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.mjs +11 -1
- package/esm2020/lib/modules/lookup/types/lookup-show-more-native-picker-context.mjs +11 -1
- package/esm2020/lib/modules/search/search.component.mjs +52 -27
- package/esm2020/lib/modules/shared/sky-lookup-resources.module.mjs +1 -2
- package/esm2020/testing/country-field/country-field-fixture.mjs +55 -57
- package/esm2020/testing/lookup/lookup-harness.mjs +1 -2
- package/esm2020/testing/search/search-fixture.mjs +19 -17
- package/fesm2015/skyux-lookup-testing.mjs +75 -78
- package/fesm2015/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2015/skyux-lookup.mjs +282 -151
- package/fesm2015/skyux-lookup.mjs.map +1 -1
- package/fesm2020/skyux-lookup-testing.mjs +71 -74
- package/fesm2020/skyux-lookup-testing.mjs.map +1 -1
- package/fesm2020/skyux-lookup.mjs +276 -151
- package/fesm2020/skyux-lookup.mjs.map +1 -1
- package/lib/modules/autocomplete/autocomplete-input.directive.d.ts +1 -1
- package/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.d.ts +1 -1
- package/lib/modules/autocomplete/autocomplete.component.d.ts +20 -14
- package/lib/modules/autocomplete/types/autocomplete-default-search-function-options.d.ts +1 -1
- package/lib/modules/country-field/country-field.component.d.ts +8 -8
- package/lib/modules/lookup/lookup-autocomplete-adapter.d.ts +7 -5
- package/lib/modules/lookup/lookup.component.d.ts +17 -11
- package/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.d.ts +1 -0
- package/lib/modules/lookup/types/lookup-show-more-native-picker-context.d.ts +1 -0
- package/lib/modules/search/search.component.d.ts +8 -3
- package/package.json +11 -11
- package/testing/country-field/country-field-fixture.d.ts +1 -9
- package/testing/lookup/lookup-harness.d.ts +0 -1
- package/testing/search/search-fixture.d.ts +1 -4
|
@@ -40,7 +40,6 @@ const RESOURCES = {
|
|
|
40
40
|
skyux_autocomplete_show_all_count: { message: 'Show all {0}' },
|
|
41
41
|
skyux_autocomplete_show_matches_count: { message: 'Show matches ({0})' },
|
|
42
42
|
skyux_country_field_search_placeholder: { message: 'Search for a country' },
|
|
43
|
-
skyux_lookup_search_icon: { message: 'Search' },
|
|
44
43
|
skyux_lookup_search_button_show_more: {
|
|
45
44
|
message: 'Show all search results',
|
|
46
45
|
},
|
|
@@ -157,7 +156,7 @@ class SkyAutocompleteInputDirective {
|
|
|
157
156
|
* @default false
|
|
158
157
|
*/
|
|
159
158
|
set disabled(value) {
|
|
160
|
-
__classPrivateFieldSet(this, _SkyAutocompleteInputDirective__disabled, value, "f");
|
|
159
|
+
__classPrivateFieldSet(this, _SkyAutocompleteInputDirective__disabled, value !== null && value !== void 0 ? value : false, "f");
|
|
161
160
|
__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_renderer, "f").setProperty(__classPrivateFieldGet(this, _SkyAutocompleteInputDirective_elementRef, "f").nativeElement, 'disabled', value);
|
|
162
161
|
}
|
|
163
162
|
get disabled() {
|
|
@@ -461,7 +460,7 @@ var SkyAutocompleteMessageType;
|
|
|
461
460
|
SkyAutocompleteMessageType[SkyAutocompleteMessageType["RepositionDropdown"] = 1] = "RepositionDropdown";
|
|
462
461
|
})(SkyAutocompleteMessageType || (SkyAutocompleteMessageType = {}));
|
|
463
462
|
|
|
464
|
-
var _SkyAutocompleteComponent_instances, _SkyAutocompleteComponent_activeElementIndex, _SkyAutocompleteComponent_adapterService, _SkyAutocompleteComponent_affixer, _SkyAutocompleteComponent_affixService, _SkyAutocompleteComponent_changeDetector, _SkyAutocompleteComponent_elementRef, _SkyAutocompleteComponent_inputBoxHostSvc, _SkyAutocompleteComponent_inputDirectiveUnsubscribe, _SkyAutocompleteComponent_messageStreamSub, _SkyAutocompleteComponent_ngUnsubscribe, _SkyAutocompleteComponent_overlay, _SkyAutocompleteComponent_overlayService, _SkyAutocompleteComponent_overlayFocusableElements, _SkyAutocompleteComponent_currentSearchSub, _SkyAutocompleteComponent__data, _SkyAutocompleteComponent__debounceTime, _SkyAutocompleteComponent__descriptorProperty, _SkyAutocompleteComponent__highlightText, _SkyAutocompleteComponent__inputDirective, _SkyAutocompleteComponent__messageStream, _SkyAutocompleteComponent__propertiesToSearch, _SkyAutocompleteComponent__resultsRef, _SkyAutocompleteComponent__search, _SkyAutocompleteComponent__searchResults, _SkyAutocompleteComponent__searchResultsLimit, _SkyAutocompleteComponent__searchTextMinimumCharacters, _SkyAutocompleteComponent_searchTextChanged, _SkyAutocompleteComponent_performSearch, _SkyAutocompleteComponent_cancelCurrentSearch, _SkyAutocompleteComponent_getHighlightText, _SkyAutocompleteComponent_selectSearchResultById, _SkyAutocompleteComponent_openDropdown, _SkyAutocompleteComponent_closeDropdown, _SkyAutocompleteComponent_setActiveDescendant, _SkyAutocompleteComponent_removeActiveDescendant, _SkyAutocompleteComponent_updateAriaOwns, _SkyAutocompleteComponent_resetSearch, _SkyAutocompleteComponent_addInputEventListeners, _SkyAutocompleteComponent_destroyOverlay, _SkyAutocompleteComponent_createAffixer, _SkyAutocompleteComponent_destroyAffixer, _SkyAutocompleteComponent_initMessageStream, _SkyAutocompleteComponent_initOverlayFocusableElements, _SkyAutocompleteComponent_getActiveElement, _SkyAutocompleteComponent_removeFocusedClass, _SkyAutocompleteComponent_addFocusedClass;
|
|
463
|
+
var _SkyAutocompleteComponent_instances, _SkyAutocompleteComponent_activeElementIndex, _SkyAutocompleteComponent_adapterService, _SkyAutocompleteComponent_affixer, _SkyAutocompleteComponent_affixService, _SkyAutocompleteComponent_changeDetector, _SkyAutocompleteComponent_elementRef, _SkyAutocompleteComponent_inputBoxHostSvc, _SkyAutocompleteComponent_inputDirectiveUnsubscribe, _SkyAutocompleteComponent_messageStreamSub, _SkyAutocompleteComponent_ngUnsubscribe, _SkyAutocompleteComponent_overlay, _SkyAutocompleteComponent_overlayService, _SkyAutocompleteComponent_overlayFocusableElements, _SkyAutocompleteComponent_currentSearchSub, _SkyAutocompleteComponent__data, _SkyAutocompleteComponent__debounceTime, _SkyAutocompleteComponent__descriptorProperty, _SkyAutocompleteComponent__highlightText, _SkyAutocompleteComponent__inputDirective, _SkyAutocompleteComponent__messageStream, _SkyAutocompleteComponent__propertiesToSearch, _SkyAutocompleteComponent__resultsRef, _SkyAutocompleteComponent__search, _SkyAutocompleteComponent__searchFilters, _SkyAutocompleteComponent__searchResults, _SkyAutocompleteComponent__searchResultsLimit, _SkyAutocompleteComponent__searchTextMinimumCharacters, _SkyAutocompleteComponent_searchTextChanged, _SkyAutocompleteComponent_performSearch, _SkyAutocompleteComponent_cancelCurrentSearch, _SkyAutocompleteComponent_getHighlightText, _SkyAutocompleteComponent_selectSearchResultById, _SkyAutocompleteComponent_openDropdown, _SkyAutocompleteComponent_closeDropdown, _SkyAutocompleteComponent_setActiveDescendant, _SkyAutocompleteComponent_removeActiveDescendant, _SkyAutocompleteComponent_updateAriaOwns, _SkyAutocompleteComponent_resetSearch, _SkyAutocompleteComponent_addInputEventListeners, _SkyAutocompleteComponent_destroyOverlay, _SkyAutocompleteComponent_createAffixer, _SkyAutocompleteComponent_destroyAffixer, _SkyAutocompleteComponent_initMessageStream, _SkyAutocompleteComponent_initOverlayFocusableElements, _SkyAutocompleteComponent_getActiveElement, _SkyAutocompleteComponent_removeFocusedClass, _SkyAutocompleteComponent_addFocusedClass, _SkyAutocompleteComponent_updateDefaultSearchOptions;
|
|
465
464
|
let uniqueId$1 = 0;
|
|
466
465
|
class SkyAutocompleteComponent {
|
|
467
466
|
constructor(changeDetector, elementRef, affixService, adapterService, overlayService, inputBoxHostSvc) {
|
|
@@ -474,12 +473,14 @@ class SkyAutocompleteComponent {
|
|
|
474
473
|
/**
|
|
475
474
|
* @internal
|
|
476
475
|
* Indicates whether to display a button that lets users add options to the data source.
|
|
476
|
+
* @default false
|
|
477
477
|
*/
|
|
478
478
|
this.showAddButton = false;
|
|
479
479
|
/**
|
|
480
480
|
* @internal
|
|
481
481
|
* Allows async search to be disabled even when a listener is specified for
|
|
482
482
|
* the `searchAsync` output.
|
|
483
|
+
* @default false
|
|
483
484
|
*/
|
|
484
485
|
this.searchAsyncDisabled = false;
|
|
485
486
|
/**
|
|
@@ -526,24 +527,29 @@ class SkyAutocompleteComponent {
|
|
|
526
527
|
*/
|
|
527
528
|
_SkyAutocompleteComponent_overlayFocusableElements.set(this, []);
|
|
528
529
|
_SkyAutocompleteComponent_currentSearchSub.set(this, void 0);
|
|
529
|
-
_SkyAutocompleteComponent__data.set(this,
|
|
530
|
-
_SkyAutocompleteComponent__debounceTime.set(this,
|
|
531
|
-
_SkyAutocompleteComponent__descriptorProperty.set(this,
|
|
530
|
+
_SkyAutocompleteComponent__data.set(this, []);
|
|
531
|
+
_SkyAutocompleteComponent__debounceTime.set(this, 0);
|
|
532
|
+
_SkyAutocompleteComponent__descriptorProperty.set(this, 'name');
|
|
532
533
|
_SkyAutocompleteComponent__highlightText.set(this, void 0);
|
|
533
534
|
_SkyAutocompleteComponent__inputDirective.set(this, void 0);
|
|
534
535
|
_SkyAutocompleteComponent__messageStream.set(this, new Subject());
|
|
535
|
-
_SkyAutocompleteComponent__propertiesToSearch.set(this,
|
|
536
|
+
_SkyAutocompleteComponent__propertiesToSearch.set(this, ['name']);
|
|
536
537
|
_SkyAutocompleteComponent__resultsRef.set(this, void 0);
|
|
537
538
|
_SkyAutocompleteComponent__search.set(this, void 0);
|
|
539
|
+
_SkyAutocompleteComponent__searchFilters.set(this, void 0);
|
|
538
540
|
_SkyAutocompleteComponent__searchResults.set(this, void 0);
|
|
539
|
-
_SkyAutocompleteComponent__searchResultsLimit.set(this,
|
|
540
|
-
_SkyAutocompleteComponent__searchTextMinimumCharacters.set(this,
|
|
541
|
+
_SkyAutocompleteComponent__searchResultsLimit.set(this, 0);
|
|
542
|
+
_SkyAutocompleteComponent__searchTextMinimumCharacters.set(this, 1);
|
|
541
543
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent_changeDetector, changeDetector, "f");
|
|
542
544
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent_elementRef, elementRef, "f");
|
|
543
545
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent_affixService, affixService, "f");
|
|
544
546
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent_adapterService, adapterService, "f");
|
|
545
547
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent_overlayService, overlayService, "f");
|
|
546
548
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent_inputBoxHostSvc, inputBoxHostSvc, "f");
|
|
549
|
+
this.searchOrDefault = skyAutocompleteDefaultSearchFunction({
|
|
550
|
+
propertiesToSearch: ['name'],
|
|
551
|
+
searchFilters: undefined,
|
|
552
|
+
});
|
|
547
553
|
const id = ++uniqueId$1;
|
|
548
554
|
this.resultsListId = `sky-autocomplete-list-${id}`;
|
|
549
555
|
this.resultsWrapperId = `sky-autocomplete-wrapper-${id}`;
|
|
@@ -554,10 +560,10 @@ class SkyAutocompleteComponent {
|
|
|
554
560
|
* changes due to server calls, use `search` or `searchAsync` instead.
|
|
555
561
|
*/
|
|
556
562
|
set data(value) {
|
|
557
|
-
__classPrivateFieldSet(this, _SkyAutocompleteComponent__data, value, "f");
|
|
563
|
+
__classPrivateFieldSet(this, _SkyAutocompleteComponent__data, value !== null && value !== void 0 ? value : [], "f");
|
|
558
564
|
}
|
|
559
565
|
get data() {
|
|
560
|
-
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__data, "f")
|
|
566
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__data, "f");
|
|
561
567
|
}
|
|
562
568
|
/**
|
|
563
569
|
* Specifies how many milliseconds to wait before searching while users
|
|
@@ -565,10 +571,10 @@ class SkyAutocompleteComponent {
|
|
|
565
571
|
* @default 0
|
|
566
572
|
*/
|
|
567
573
|
set debounceTime(value) {
|
|
568
|
-
__classPrivateFieldSet(this, _SkyAutocompleteComponent__debounceTime, value, "f");
|
|
574
|
+
__classPrivateFieldSet(this, _SkyAutocompleteComponent__debounceTime, value !== null && value !== void 0 ? value : 0, "f");
|
|
569
575
|
}
|
|
570
576
|
get debounceTime() {
|
|
571
|
-
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__debounceTime, "f")
|
|
577
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__debounceTime, "f");
|
|
572
578
|
}
|
|
573
579
|
/**
|
|
574
580
|
* Specifies an object property to display in the text input after users
|
|
@@ -576,10 +582,10 @@ class SkyAutocompleteComponent {
|
|
|
576
582
|
* @default "name"
|
|
577
583
|
*/
|
|
578
584
|
set descriptorProperty(value) {
|
|
579
|
-
__classPrivateFieldSet(this, _SkyAutocompleteComponent__descriptorProperty, value, "f");
|
|
585
|
+
__classPrivateFieldSet(this, _SkyAutocompleteComponent__descriptorProperty, value || 'name', "f");
|
|
580
586
|
}
|
|
581
587
|
get descriptorProperty() {
|
|
582
|
-
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__descriptorProperty, "f")
|
|
588
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__descriptorProperty, "f");
|
|
583
589
|
}
|
|
584
590
|
/**
|
|
585
591
|
* Specifies an observable of `SkyAutocompleteMessage` that can close the dropdown.
|
|
@@ -595,30 +601,33 @@ class SkyAutocompleteComponent {
|
|
|
595
601
|
/**
|
|
596
602
|
* Specifies the object properties to search.
|
|
597
603
|
* @default ["name"]
|
|
604
|
+
* @deprecated We recommend against using this property. To search specific properties, use the `searchAsync` event instead.
|
|
598
605
|
*/
|
|
599
606
|
set propertiesToSearch(value) {
|
|
600
|
-
__classPrivateFieldSet(this, _SkyAutocompleteComponent__propertiesToSearch, value, "f");
|
|
607
|
+
__classPrivateFieldSet(this, _SkyAutocompleteComponent__propertiesToSearch, value !== null && value !== void 0 ? value : ['name'], "f");
|
|
608
|
+
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_updateDefaultSearchOptions).call(this);
|
|
601
609
|
}
|
|
602
610
|
get propertiesToSearch() {
|
|
603
|
-
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__propertiesToSearch, "f")
|
|
611
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__propertiesToSearch, "f");
|
|
604
612
|
}
|
|
605
613
|
/**
|
|
606
614
|
* Specifies a function to dynamically manage the data source when users
|
|
607
615
|
* change the text in the autocomplete field. The search function must return
|
|
608
616
|
* an array or a promise of an array. The `search` property is particularly
|
|
609
|
-
* useful when the data source does not live in the source code.
|
|
610
|
-
*
|
|
611
|
-
* `search`.
|
|
617
|
+
* useful when the data source does not live in the source code.
|
|
618
|
+
* @deprecated We recommend against using this property. To call a remote data source, use the `searchAsync` event instead.
|
|
612
619
|
*/
|
|
613
620
|
set search(value) {
|
|
614
621
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent__search, value, "f");
|
|
622
|
+
this.searchOrDefault =
|
|
623
|
+
value ||
|
|
624
|
+
skyAutocompleteDefaultSearchFunction({
|
|
625
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
626
|
+
searchFilters: this.searchFilters,
|
|
627
|
+
});
|
|
615
628
|
}
|
|
616
629
|
get search() {
|
|
617
|
-
return
|
|
618
|
-
skyAutocompleteDefaultSearchFunction({
|
|
619
|
-
propertiesToSearch: this.propertiesToSearch,
|
|
620
|
-
searchFilters: this.searchFilters,
|
|
621
|
-
}));
|
|
630
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__search, "f");
|
|
622
631
|
}
|
|
623
632
|
/**
|
|
624
633
|
* Specifies the minimum number of characters that users must enter before
|
|
@@ -627,28 +636,35 @@ class SkyAutocompleteComponent {
|
|
|
627
636
|
* @default 1
|
|
628
637
|
*/
|
|
629
638
|
set searchTextMinimumCharacters(value) {
|
|
630
|
-
__classPrivateFieldSet(this, _SkyAutocompleteComponent__searchTextMinimumCharacters, value, "f");
|
|
639
|
+
__classPrivateFieldSet(this, _SkyAutocompleteComponent__searchTextMinimumCharacters, value && value > 0 ? value : 1, "f");
|
|
631
640
|
}
|
|
632
641
|
get searchTextMinimumCharacters() {
|
|
633
|
-
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__searchTextMinimumCharacters, "f")
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
642
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__searchTextMinimumCharacters, "f");
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Specifies an array of functions to call against each search result in order
|
|
646
|
+
* to filter the search results when using the default search function. When
|
|
647
|
+
* using the `search` property to specify a custom search function, you must
|
|
648
|
+
* manually apply filters inside that function. The function must return `true`
|
|
649
|
+
* or `false` for each result to indicate whether to display it in the dropdown list.
|
|
650
|
+
* @deprecated We recommend against using this property. To filter results, use the `searchAsync` event instead.
|
|
651
|
+
*/
|
|
652
|
+
set searchFilters(value) {
|
|
653
|
+
__classPrivateFieldSet(this, _SkyAutocompleteComponent__searchFilters, value, "f");
|
|
654
|
+
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_updateDefaultSearchOptions).call(this);
|
|
655
|
+
}
|
|
656
|
+
get searchFilters() {
|
|
657
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__searchFilters, "f");
|
|
637
658
|
}
|
|
638
659
|
/**
|
|
639
660
|
* Specifies the maximum number of search results to display in the dropdown list.
|
|
640
661
|
* By default, the component displays all matching results.
|
|
641
662
|
*/
|
|
642
663
|
set searchResultsLimit(value) {
|
|
643
|
-
__classPrivateFieldSet(this, _SkyAutocompleteComponent__searchResultsLimit, value, "f");
|
|
664
|
+
__classPrivateFieldSet(this, _SkyAutocompleteComponent__searchResultsLimit, value || 0, "f");
|
|
644
665
|
}
|
|
645
666
|
get searchResultsLimit() {
|
|
646
|
-
|
|
647
|
-
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__searchResultsLimit, "f");
|
|
648
|
-
}
|
|
649
|
-
else {
|
|
650
|
-
return this.enableShowMore ? 5 : __classPrivateFieldGet(this, _SkyAutocompleteComponent__searchResultsLimit, "f");
|
|
651
|
-
}
|
|
667
|
+
return __classPrivateFieldGet(this, _SkyAutocompleteComponent__searchResultsLimit, "f");
|
|
652
668
|
}
|
|
653
669
|
//#endregion
|
|
654
670
|
//#region template_properties
|
|
@@ -665,7 +681,7 @@ class SkyAutocompleteComponent {
|
|
|
665
681
|
__classPrivateFieldSet(this, _SkyAutocompleteComponent__highlightText, value, "f");
|
|
666
682
|
}
|
|
667
683
|
get showActionsArea() {
|
|
668
|
-
return this.showAddButton || this.enableShowMore;
|
|
684
|
+
return !!this.showAddButton || !!this.enableShowMore;
|
|
669
685
|
}
|
|
670
686
|
//#endregion
|
|
671
687
|
set inputDirective(directive) {
|
|
@@ -841,7 +857,7 @@ class SkyAutocompleteComponent {
|
|
|
841
857
|
return ref === __classPrivateFieldGet(this, _SkyAutocompleteComponent_overlayFocusableElements, "f")[__classPrivateFieldGet(this, _SkyAutocompleteComponent_activeElementIndex, "f")];
|
|
842
858
|
}
|
|
843
859
|
}
|
|
844
|
-
_SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteComponent_adapterService = new WeakMap(), _SkyAutocompleteComponent_affixer = new WeakMap(), _SkyAutocompleteComponent_affixService = new WeakMap(), _SkyAutocompleteComponent_changeDetector = new WeakMap(), _SkyAutocompleteComponent_elementRef = new WeakMap(), _SkyAutocompleteComponent_inputBoxHostSvc = new WeakMap(), _SkyAutocompleteComponent_inputDirectiveUnsubscribe = new WeakMap(), _SkyAutocompleteComponent_messageStreamSub = new WeakMap(), _SkyAutocompleteComponent_ngUnsubscribe = new WeakMap(), _SkyAutocompleteComponent_overlay = new WeakMap(), _SkyAutocompleteComponent_overlayService = new WeakMap(), _SkyAutocompleteComponent_overlayFocusableElements = new WeakMap(), _SkyAutocompleteComponent_currentSearchSub = new WeakMap(), _SkyAutocompleteComponent__data = new WeakMap(), _SkyAutocompleteComponent__debounceTime = new WeakMap(), _SkyAutocompleteComponent__descriptorProperty = new WeakMap(), _SkyAutocompleteComponent__highlightText = new WeakMap(), _SkyAutocompleteComponent__inputDirective = new WeakMap(), _SkyAutocompleteComponent__messageStream = new WeakMap(), _SkyAutocompleteComponent__propertiesToSearch = new WeakMap(), _SkyAutocompleteComponent__resultsRef = new WeakMap(), _SkyAutocompleteComponent__search = new WeakMap(), _SkyAutocompleteComponent__searchResults = new WeakMap(), _SkyAutocompleteComponent__searchResultsLimit = new WeakMap(), _SkyAutocompleteComponent__searchTextMinimumCharacters = new WeakMap(), _SkyAutocompleteComponent_instances = new WeakSet(), _SkyAutocompleteComponent_searchTextChanged = function _SkyAutocompleteComponent_searchTextChanged(searchText) {
|
|
860
|
+
_SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteComponent_adapterService = new WeakMap(), _SkyAutocompleteComponent_affixer = new WeakMap(), _SkyAutocompleteComponent_affixService = new WeakMap(), _SkyAutocompleteComponent_changeDetector = new WeakMap(), _SkyAutocompleteComponent_elementRef = new WeakMap(), _SkyAutocompleteComponent_inputBoxHostSvc = new WeakMap(), _SkyAutocompleteComponent_inputDirectiveUnsubscribe = new WeakMap(), _SkyAutocompleteComponent_messageStreamSub = new WeakMap(), _SkyAutocompleteComponent_ngUnsubscribe = new WeakMap(), _SkyAutocompleteComponent_overlay = new WeakMap(), _SkyAutocompleteComponent_overlayService = new WeakMap(), _SkyAutocompleteComponent_overlayFocusableElements = new WeakMap(), _SkyAutocompleteComponent_currentSearchSub = new WeakMap(), _SkyAutocompleteComponent__data = new WeakMap(), _SkyAutocompleteComponent__debounceTime = new WeakMap(), _SkyAutocompleteComponent__descriptorProperty = new WeakMap(), _SkyAutocompleteComponent__highlightText = new WeakMap(), _SkyAutocompleteComponent__inputDirective = new WeakMap(), _SkyAutocompleteComponent__messageStream = new WeakMap(), _SkyAutocompleteComponent__propertiesToSearch = new WeakMap(), _SkyAutocompleteComponent__resultsRef = new WeakMap(), _SkyAutocompleteComponent__search = new WeakMap(), _SkyAutocompleteComponent__searchFilters = new WeakMap(), _SkyAutocompleteComponent__searchResults = new WeakMap(), _SkyAutocompleteComponent__searchResultsLimit = new WeakMap(), _SkyAutocompleteComponent__searchTextMinimumCharacters = new WeakMap(), _SkyAutocompleteComponent_instances = new WeakSet(), _SkyAutocompleteComponent_searchTextChanged = function _SkyAutocompleteComponent_searchTextChanged(searchText) {
|
|
845
861
|
const isEmpty = !searchText || !searchText.trim() || searchText.match(/^\s+$/);
|
|
846
862
|
if (isEmpty) {
|
|
847
863
|
// Emit selectionChange if value has been cleared.
|
|
@@ -923,7 +939,7 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
923
939
|
this.searchAsync.emit(searchAsyncArgs);
|
|
924
940
|
return searchAsyncArgs.result || of(undefined);
|
|
925
941
|
}
|
|
926
|
-
const result = this.
|
|
942
|
+
const result = this.searchOrDefault(this.searchText, this.data, {
|
|
927
943
|
context: 'popover',
|
|
928
944
|
});
|
|
929
945
|
if (result instanceof Array) {
|
|
@@ -1108,12 +1124,20 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
1108
1124
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_adapterService, "f").addCSSClass(__classPrivateFieldGet(this, _SkyAutocompleteComponent_overlayFocusableElements, "f")[__classPrivateFieldGet(this, _SkyAutocompleteComponent_activeElementIndex, "f")], 'sky-autocomplete-descendant-focus');
|
|
1109
1125
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_setActiveDescendant).call(this);
|
|
1110
1126
|
}
|
|
1127
|
+
}, _SkyAutocompleteComponent_updateDefaultSearchOptions = function _SkyAutocompleteComponent_updateDefaultSearchOptions() {
|
|
1128
|
+
// Reset default search if it is what is being used.
|
|
1129
|
+
if (this.search !== this.searchOrDefault) {
|
|
1130
|
+
this.searchOrDefault = skyAutocompleteDefaultSearchFunction({
|
|
1131
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
1132
|
+
searchFilters: this.searchFilters,
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1111
1135
|
};
|
|
1112
1136
|
SkyAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyAffixService }, { token: SkyAutocompleteAdapterService }, { token: i1.SkyOverlayService }, { token: i5.SkyInputBoxHostService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1113
|
-
SkyAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: { ariaLabelledBy: "ariaLabelledBy", data: "data", debounceTime: "debounceTime", descriptorProperty: "descriptorProperty", enableShowMore: "enableShowMore", messageStream: "messageStream", wrapperClass: "wrapperClass", propertiesToSearch: "propertiesToSearch", search: "search", searchResultTemplate: "searchResultTemplate", searchTextMinimumCharacters: "searchTextMinimumCharacters", searchFilters: "searchFilters", searchResultsLimit: "searchResultsLimit", showAddButton: "showAddButton", noResultsFoundText: "noResultsFoundText", searchAsyncDisabled: "searchAsyncDisabled" }, outputs: { addClick: "addClick", showMoreClick: "showMoreClick", selectionChange: "selectionChange", searchAsync: "searchAsync" }, providers: [SkyAutocompleteAdapterService], queries: [{ propertyName: "inputDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true }], viewQueries: [{ propertyName: "resultsTemplateRef", first: true, predicate: ["resultsTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "resultsRef", first: true, predicate: ["resultsRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n class=\"sky-autocomplete\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen
|
|
1137
|
+
SkyAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAutocompleteComponent, selector: "sky-autocomplete", inputs: { ariaLabelledBy: "ariaLabelledBy", data: "data", debounceTime: "debounceTime", descriptorProperty: "descriptorProperty", enableShowMore: "enableShowMore", messageStream: "messageStream", wrapperClass: "wrapperClass", propertiesToSearch: "propertiesToSearch", search: "search", searchResultTemplate: "searchResultTemplate", searchTextMinimumCharacters: "searchTextMinimumCharacters", searchFilters: "searchFilters", searchResultsLimit: "searchResultsLimit", showAddButton: "showAddButton", noResultsFoundText: "noResultsFoundText", searchAsyncDisabled: "searchAsyncDisabled" }, outputs: { addClick: "addClick", showMoreClick: "showMoreClick", selectionChange: "selectionChange", searchAsync: "searchAsync" }, providers: [SkyAutocompleteAdapterService], queries: [{ propertyName: "inputDirective", first: true, predicate: SkyAutocompleteInputDirective, descendants: true }], viewQueries: [{ propertyName: "resultsTemplateRef", first: true, predicate: ["resultsTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "resultsRef", first: true, predicate: ["resultsRef"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n class=\"sky-autocomplete\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\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=\"\n (!searchResultsLimit || i < searchResultsLimit) &&\n !(enableShowMore && i >= 5)\n \"\n class=\"sky-autocomplete-result\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"isElementFocused(searchResultEl)\"\n [attr.data-descriptor-value]=\"result.data[descriptorProperty]\"\n [attr.id]=\"result.elementId\"\n [skyHighlight]=\"highlightText\"\n (mousedown)=\"onResultMouseDown(result.elementId, $event)\"\n (mousemove)=\"onResultMouseMove(i)\"\n #searchResultEl\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchResultTemplate || defaultSearchResultTemplate;\n context: { item: result.data }\n \"\n >\n </ng-container>\n </div>\n </ng-container>\n <div\n *ngIf=\"searchResults.length === 0\"\n class=\"sky-deemphasized sky-padding-squish-default\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n </div>\n <div *ngIf=\"showActionsArea\" class=\"sky-autocomplete-actions\">\n <button\n *ngIf=\"enableShowMore && (!searchText || searchResults.length > 0)\"\n class=\"sky-autocomplete-action sky-autocomplete-action-more sky-btn sky-btn-link\"\n type=\"button\"\n (mousedown)=\"moreButtonClicked()\"\n >\n <ng-container\n *ngIf=\"\n !(\n searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled\n ) &&\n searchResults.length === 0 &&\n !searchText\n \"\n >\n {{ 'skyux_autocomplete_show_all' | skyLibResources }}\n </ng-container>\n <ng-container\n *ngIf=\"\n (searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled) &&\n !searchText\n \"\n >\n {{\n 'skyux_autocomplete_show_all_count'\n | skyLibResources: (data.length | skyNumeric: { truncate: false })\n }}\n </ng-container>\n <ng-container *ngIf=\"searchText\">\n {{\n 'skyux_autocomplete_show_matches_count'\n | skyLibResources\n : (searchResultsCount === undefined\n ? data.length\n : (searchResultsCount | skyNumeric: { truncate: false }))\n }}\n </ng-container>\n </button>\n <div\n *ngIf=\"searchText && searchResults.length === 0\"\n class=\"sky-font-deemphasized sky-autocomplete-actions-no-results\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n <button\n *ngIf=\"showAddButton\"\n class=\"sky-autocomplete-action sky-autocomplete-action-add sky-btn sky-btn-link\"\n tabindex=\"0\"\n type=\"button\"\n [class.focused]=\"isElementFocused(addButtonEl)\"\n (mousedown)=\"addButtonClicked()\"\n #addButtonEl\n >\n <sky-icon *skyThemeIf=\"'modern'\" icon=\"add\" iconType=\"skyux\"></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_autocomplete_add' | skyLibResources }}\n </button>\n </div>\n</ng-template>\n\n<ng-template let-item=\"item\" #defaultSearchResultTemplate>\n {{ item[descriptorProperty] }}\n</ng-template>\n", styles: [".sky-autocomplete-results-container{position:fixed;background-color:#fff}.sky-autocomplete-results-waiting{height:70px}.sky-autocomplete-results{display:flex;flex-direction:column;padding:4px;overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}.sky-autocomplete-result{color:#212327;margin-bottom:4px;padding:3px 20px;cursor:pointer}.sky-autocomplete-result:last-child{margin-bottom:0}.sky-autocomplete-actions{border-top:1px solid #cdcfd2}.sky-autocomplete-actions .sky-autocomplete-action{border:none}.sky-autocomplete-actions .sky-autocomplete-actions-no-results{display:inline-block;padding:7px 13px}.sky-autocomplete-action-add{float:right}.sky-autocomplete-action-add sky-icon{padding-right:5px}.sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:#eeeeef}.sky-autocomplete-descendant-focus.sky-autocomplete-action{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px}::ng-deep .sky-theme-modern .sky-autocomplete-results-container{border-radius:6px}::ng-deep .sky-theme-modern .sky-autocomplete-results{padding:10px 0}::ng-deep .sky-theme-modern .sky-autocomplete-result{margin-bottom:0;padding:10px 0 10px 15px}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:inherit}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i6.λ11, selector: "[skyHighlight]", inputs: ["skyHighlight"] }, { kind: "component", type: i6.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i7.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { kind: "directive", type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "component", type: i6.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { kind: "pipe", type: i4$1.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: i1.SkyNumericPipe, name: "skyNumeric" }, { kind: "pipe", type: SkyAutcompleteSearchAsyncDisabledPipe, name: "skyAutocompleteSearchAsyncDisabled" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1114
1138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAutocompleteComponent, decorators: [{
|
|
1115
1139
|
type: Component,
|
|
1116
|
-
args: [{ selector: 'sky-autocomplete', providers: [SkyAutocompleteAdapterService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n class=\"sky-autocomplete\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen
|
|
1140
|
+
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\"\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=\"\n (!searchResultsLimit || i < searchResultsLimit) &&\n !(enableShowMore && i >= 5)\n \"\n class=\"sky-autocomplete-result\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"isElementFocused(searchResultEl)\"\n [attr.data-descriptor-value]=\"result.data[descriptorProperty]\"\n [attr.id]=\"result.elementId\"\n [skyHighlight]=\"highlightText\"\n (mousedown)=\"onResultMouseDown(result.elementId, $event)\"\n (mousemove)=\"onResultMouseMove(i)\"\n #searchResultEl\n >\n <ng-container\n *ngTemplateOutlet=\"\n searchResultTemplate || defaultSearchResultTemplate;\n context: { item: result.data }\n \"\n >\n </ng-container>\n </div>\n </ng-container>\n <div\n *ngIf=\"searchResults.length === 0\"\n class=\"sky-deemphasized sky-padding-squish-default\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n </div>\n <div *ngIf=\"showActionsArea\" class=\"sky-autocomplete-actions\">\n <button\n *ngIf=\"enableShowMore && (!searchText || searchResults.length > 0)\"\n class=\"sky-autocomplete-action sky-autocomplete-action-more sky-btn sky-btn-link\"\n type=\"button\"\n (mousedown)=\"moreButtonClicked()\"\n >\n <ng-container\n *ngIf=\"\n !(\n searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled\n ) &&\n searchResults.length === 0 &&\n !searchText\n \"\n >\n {{ 'skyux_autocomplete_show_all' | skyLibResources }}\n </ng-container>\n <ng-container\n *ngIf=\"\n (searchAsync\n | skyAutocompleteSearchAsyncDisabled: searchAsyncDisabled) &&\n !searchText\n \"\n >\n {{\n 'skyux_autocomplete_show_all_count'\n | skyLibResources: (data.length | skyNumeric: { truncate: false })\n }}\n </ng-container>\n <ng-container *ngIf=\"searchText\">\n {{\n 'skyux_autocomplete_show_matches_count'\n | skyLibResources\n : (searchResultsCount === undefined\n ? data.length\n : (searchResultsCount | skyNumeric: { truncate: false }))\n }}\n </ng-container>\n </button>\n <div\n *ngIf=\"searchText && searchResults.length === 0\"\n class=\"sky-font-deemphasized sky-autocomplete-actions-no-results\"\n >\n {{\n noResultsFoundText ||\n ('skyux_autocomplete_no_results' | skyLibResources)\n }}\n </div>\n <button\n *ngIf=\"showAddButton\"\n class=\"sky-autocomplete-action sky-autocomplete-action-add sky-btn sky-btn-link\"\n tabindex=\"0\"\n type=\"button\"\n [class.focused]=\"isElementFocused(addButtonEl)\"\n (mousedown)=\"addButtonClicked()\"\n #addButtonEl\n >\n <sky-icon *skyThemeIf=\"'modern'\" icon=\"add\" iconType=\"skyux\"></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_autocomplete_add' | skyLibResources }}\n </button>\n </div>\n</ng-template>\n\n<ng-template let-item=\"item\" #defaultSearchResultTemplate>\n {{ item[descriptorProperty] }}\n</ng-template>\n", styles: [".sky-autocomplete-results-container{position:fixed;background-color:#fff}.sky-autocomplete-results-waiting{height:70px}.sky-autocomplete-results{display:flex;flex-direction:column;padding:4px;overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}.sky-autocomplete-result{color:#212327;margin-bottom:4px;padding:3px 20px;cursor:pointer}.sky-autocomplete-result:last-child{margin-bottom:0}.sky-autocomplete-actions{border-top:1px solid #cdcfd2}.sky-autocomplete-actions .sky-autocomplete-action{border:none}.sky-autocomplete-actions .sky-autocomplete-actions-no-results{display:inline-block;padding:7px 13px}.sky-autocomplete-action-add{float:right}.sky-autocomplete-action-add sky-icon{padding-right:5px}.sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:#eeeeef}.sky-autocomplete-descendant-focus.sky-autocomplete-action{outline:thin dotted;outline:-webkit-focus-ring-color auto 5px}::ng-deep .sky-theme-modern .sky-autocomplete-results-container{border-radius:6px}::ng-deep .sky-theme-modern .sky-autocomplete-results{padding:10px 0}::ng-deep .sky-theme-modern .sky-autocomplete-result{margin-bottom:0;padding:10px 0 10px 15px}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus:not(.sky-autocomplete-action){background-color:inherit}::ng-deep .sky-theme-modern .sky-autocomplete-descendant-focus{border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 8px #0000004d}\n"] }]
|
|
1117
1141
|
}], ctorParameters: function () {
|
|
1118
1142
|
return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAffixService }, { type: SkyAutocompleteAdapterService }, { type: i1.SkyOverlayService }, { type: i5.SkyInputBoxHostService, decorators: [{
|
|
1119
1143
|
type: Optional
|
|
@@ -1225,7 +1249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1225
1249
|
}]
|
|
1226
1250
|
}] });
|
|
1227
1251
|
|
|
1228
|
-
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;
|
|
1252
|
+
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__hideSelectedCountryFlag, _SkyCountryFieldComponent__includePhoneInfo, _SkyCountryFieldComponent__selectedCountry, _SkyCountryFieldComponent__supportedCountryISOs, _SkyCountryFieldComponent_addEventListeners, _SkyCountryFieldComponent_countriesAreEqual, _SkyCountryFieldComponent_countriesEqual, _SkyCountryFieldComponent_removeEventListeners, _SkyCountryFieldComponent_setupCountries, _SkyCountryFieldComponent_sortCountriesWithSelectedAndDefault, _SkyCountryFieldComponent_updateInputBox;
|
|
1229
1253
|
const DEFAULT_COUNTRY_CODE = 'us';
|
|
1230
1254
|
const SKY_COUNTRY_FIELD_VALIDATOR = {
|
|
1231
1255
|
provide: NG_VALIDATORS,
|
|
@@ -1237,10 +1261,6 @@ class SkyCountryFieldComponent {
|
|
|
1237
1261
|
constructor(changeDetector, elRef, windowRef, injector, inputBoxHostSvc, themeSvc) {
|
|
1238
1262
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
1239
1263
|
_SkyCountryFieldComponent_instances.add(this);
|
|
1240
|
-
/**
|
|
1241
|
-
* Indicates whether to hide the flag in the input element.
|
|
1242
|
-
*/
|
|
1243
|
-
this.hideSelectedCountryFlag = false;
|
|
1244
1264
|
/**
|
|
1245
1265
|
* Fires when the selected country changes.
|
|
1246
1266
|
*/
|
|
@@ -1262,6 +1282,7 @@ class SkyCountryFieldComponent {
|
|
|
1262
1282
|
_SkyCountryFieldComponent_windowRef.set(this, void 0);
|
|
1263
1283
|
_SkyCountryFieldComponent__defaultCountry.set(this, void 0);
|
|
1264
1284
|
_SkyCountryFieldComponent__disabled.set(this, false);
|
|
1285
|
+
_SkyCountryFieldComponent__hideSelectedCountryFlag.set(this, false);
|
|
1265
1286
|
_SkyCountryFieldComponent__includePhoneInfo.set(this, false);
|
|
1266
1287
|
_SkyCountryFieldComponent__selectedCountry.set(this, void 0);
|
|
1267
1288
|
_SkyCountryFieldComponent__supportedCountryISOs.set(this, void 0);
|
|
@@ -1305,24 +1326,34 @@ class SkyCountryFieldComponent {
|
|
|
1305
1326
|
set disabled(isDisabled) {
|
|
1306
1327
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1307
1328
|
if (!isDisabled) {
|
|
1308
|
-
this.
|
|
1329
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_addEventListeners).call(this);
|
|
1309
1330
|
}
|
|
1310
|
-
__classPrivateFieldSet(this, _SkyCountryFieldComponent__disabled, isDisabled, "f");
|
|
1331
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__disabled, isDisabled !== null && isDisabled !== void 0 ? isDisabled : false, "f");
|
|
1311
1332
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1312
1333
|
}
|
|
1313
1334
|
get disabled() {
|
|
1314
1335
|
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__disabled, "f");
|
|
1315
1336
|
}
|
|
1337
|
+
/**
|
|
1338
|
+
* Indicates whether to hide the flag in the input element.
|
|
1339
|
+
* @default false
|
|
1340
|
+
*/
|
|
1341
|
+
set hideSelectedCountryFlag(value) {
|
|
1342
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__hideSelectedCountryFlag, value !== null && value !== void 0 ? value : false, "f");
|
|
1343
|
+
}
|
|
1344
|
+
get hideSelectedCountryFlag() {
|
|
1345
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__hideSelectedCountryFlag, "f");
|
|
1346
|
+
}
|
|
1316
1347
|
/**
|
|
1317
1348
|
* Indicates whether to include phone information in the selected country and country dropdown.
|
|
1318
1349
|
* @default false
|
|
1319
1350
|
*/
|
|
1320
1351
|
set includePhoneInfo(value) {
|
|
1321
|
-
__classPrivateFieldSet(this, _SkyCountryFieldComponent__includePhoneInfo, value, "f");
|
|
1352
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__includePhoneInfo, value !== null && value !== void 0 ? value : false, "f");
|
|
1322
1353
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1323
1354
|
}
|
|
1324
1355
|
get includePhoneInfo() {
|
|
1325
|
-
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__includePhoneInfo, "f")
|
|
1356
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__includePhoneInfo, "f");
|
|
1326
1357
|
}
|
|
1327
1358
|
/**
|
|
1328
1359
|
* Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)
|
|
@@ -1406,7 +1437,7 @@ class SkyCountryFieldComponent {
|
|
|
1406
1437
|
}
|
|
1407
1438
|
});
|
|
1408
1439
|
if (!this.disabled) {
|
|
1409
|
-
this.
|
|
1440
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_addEventListeners).call(this);
|
|
1410
1441
|
}
|
|
1411
1442
|
}
|
|
1412
1443
|
ngAfterViewInit() {
|
|
@@ -1475,25 +1506,24 @@ class SkyCountryFieldComponent {
|
|
|
1475
1506
|
this.selectedCountry = value;
|
|
1476
1507
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1477
1508
|
}
|
|
1478
|
-
addEventListeners() {
|
|
1479
|
-
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1480
|
-
__classPrivateFieldSet(this, _SkyCountryFieldComponent_idle, new Subject(), "f");
|
|
1481
|
-
const documentObj = __classPrivateFieldGet(this, _SkyCountryFieldComponent_windowRef, "f").nativeWindow.document;
|
|
1482
|
-
fromEvent(documentObj, 'mousedown')
|
|
1483
|
-
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1484
|
-
.subscribe((event) => {
|
|
1485
|
-
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1486
|
-
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1487
|
-
});
|
|
1488
|
-
fromEvent(documentObj, 'focusin')
|
|
1489
|
-
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1490
|
-
.subscribe((event) => {
|
|
1491
|
-
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1492
|
-
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
1509
|
}
|
|
1496
|
-
_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(),
|
|
1510
|
+
_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__hideSelectedCountryFlag = new WeakMap(), _SkyCountryFieldComponent__includePhoneInfo = new WeakMap(), _SkyCountryFieldComponent__selectedCountry = new WeakMap(), _SkyCountryFieldComponent__supportedCountryISOs = new WeakMap(), _SkyCountryFieldComponent_instances = new WeakSet(), _SkyCountryFieldComponent_addEventListeners = function _SkyCountryFieldComponent_addEventListeners() {
|
|
1511
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1512
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_idle, new Subject(), "f");
|
|
1513
|
+
const documentObj = __classPrivateFieldGet(this, _SkyCountryFieldComponent_windowRef, "f").nativeWindow.document;
|
|
1514
|
+
fromEvent(documentObj, 'mousedown')
|
|
1515
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1516
|
+
.subscribe((event) => {
|
|
1517
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1518
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1519
|
+
});
|
|
1520
|
+
fromEvent(documentObj, 'focusin')
|
|
1521
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1522
|
+
.subscribe((event) => {
|
|
1523
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1524
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1525
|
+
});
|
|
1526
|
+
}, _SkyCountryFieldComponent_countriesAreEqual = function _SkyCountryFieldComponent_countriesAreEqual(country1, country2) {
|
|
1497
1527
|
if (country1 && country2) {
|
|
1498
1528
|
return country1.iso2 === country2.iso2;
|
|
1499
1529
|
}
|
|
@@ -1550,7 +1580,7 @@ _SkyCountryFieldComponent_changeDetector = new WeakMap(), _SkyCountryFieldCompon
|
|
|
1550
1580
|
const sortedNewCountries = this.countries.sort((a, b) => {
|
|
1551
1581
|
if (((__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") &&
|
|
1552
1582
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, a, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"))) ||
|
|
1553
|
-
a.name < b.name) &&
|
|
1583
|
+
(a.name && b.name && a.name < b.name)) &&
|
|
1554
1584
|
(!__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") ||
|
|
1555
1585
|
!__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"), b))) {
|
|
1556
1586
|
return -1;
|
|
@@ -1705,7 +1735,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1705
1735
|
type: Injectable
|
|
1706
1736
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
1707
1737
|
|
|
1708
|
-
var _SkySearchComponent_instances, _SkySearchComponent_changeRef, _SkySearchComponent_elRef, _SkySearchComponent_mediaQueryService, _SkySearchComponent_searchAdapter, _SkySearchComponent_searchUpdated, _SkySearchComponent_searchBindingChanged, _SkySearchComponent_expandModeBindingChanged, _SkySearchComponent_shouldOpenInput, _SkySearchComponent_mediaQueryCallback, _SkySearchComponent_searchShouldCollapse;
|
|
1738
|
+
var _SkySearchComponent_instances, _SkySearchComponent_changeRef, _SkySearchComponent_elRef, _SkySearchComponent_mediaQueryService, _SkySearchComponent_searchAdapter, _SkySearchComponent_searchUpdated, _SkySearchComponent_searchUpdatedSub, _SkySearchComponent__debounceTime, _SkySearchComponent__disabled, _SkySearchComponent__expandMode, _SkySearchComponent_searchBindingChanged, _SkySearchComponent_expandModeBindingChanged, _SkySearchComponent_shouldOpenInput, _SkySearchComponent_mediaQueryCallback, _SkySearchComponent_searchShouldCollapse, _SkySearchComponent_setupSearchChangedEvent;
|
|
1709
1739
|
const INPUT_SHOWN_STATE = 'inputShown';
|
|
1710
1740
|
const INPUT_HIDDEN_STATE = 'inputHidden';
|
|
1711
1741
|
const EXPAND_MODE_RESPONSIVE = 'responsive';
|
|
@@ -1726,22 +1756,6 @@ class SkySearchComponent {
|
|
|
1726
1756
|
* Fires when the search text is cleared.
|
|
1727
1757
|
*/
|
|
1728
1758
|
this.searchClear = new EventEmitter();
|
|
1729
|
-
/**
|
|
1730
|
-
* Specifies the expand mode for the search input. The valid options
|
|
1731
|
-
* include `"responsive"` to collapse the search input into a button on
|
|
1732
|
-
* mobile devices, `"none"` to *not* collapse the search input on mobile
|
|
1733
|
-
* devices, and `"fit"` to extend the search input to fit the width of its container.
|
|
1734
|
-
* @default "responsive"
|
|
1735
|
-
*/
|
|
1736
|
-
this.expandMode = EXPAND_MODE_RESPONSIVE;
|
|
1737
|
-
/**
|
|
1738
|
-
* Specifies how many milliseconds to wait before searching after users enter text in the search input.
|
|
1739
|
-
*/
|
|
1740
|
-
this.debounceTime = 0;
|
|
1741
|
-
/**
|
|
1742
|
-
* Indicates whether to disable the filter button.
|
|
1743
|
-
*/
|
|
1744
|
-
this.disabled = false;
|
|
1745
1759
|
this.clearButtonShown = false;
|
|
1746
1760
|
this.dismissButtonShown = false;
|
|
1747
1761
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
@@ -1754,11 +1768,49 @@ class SkySearchComponent {
|
|
|
1754
1768
|
_SkySearchComponent_mediaQueryService.set(this, void 0);
|
|
1755
1769
|
_SkySearchComponent_searchAdapter.set(this, void 0);
|
|
1756
1770
|
_SkySearchComponent_searchUpdated.set(this, new Subject());
|
|
1771
|
+
_SkySearchComponent_searchUpdatedSub.set(this, void 0);
|
|
1772
|
+
_SkySearchComponent__debounceTime.set(this, 0);
|
|
1773
|
+
_SkySearchComponent__disabled.set(this, false);
|
|
1774
|
+
_SkySearchComponent__expandMode.set(this, EXPAND_MODE_RESPONSIVE);
|
|
1757
1775
|
__classPrivateFieldSet(this, _SkySearchComponent_mediaQueryService, mediaQueryService, "f");
|
|
1758
1776
|
__classPrivateFieldSet(this, _SkySearchComponent_elRef, elRef, "f");
|
|
1759
1777
|
__classPrivateFieldSet(this, _SkySearchComponent_searchAdapter, searchAdapter, "f");
|
|
1760
1778
|
__classPrivateFieldSet(this, _SkySearchComponent_changeRef, changeRef, "f");
|
|
1761
1779
|
}
|
|
1780
|
+
/**
|
|
1781
|
+
* Specifies the expand mode for the search input. The valid options
|
|
1782
|
+
* include `"responsive"` to collapse the search input into a button on
|
|
1783
|
+
* mobile devices, `"none"` to *not* collapse the search input on mobile
|
|
1784
|
+
* devices, and `"fit"` to extend the search input to fit the width of its container.
|
|
1785
|
+
* @default "responsive"
|
|
1786
|
+
*/
|
|
1787
|
+
set expandMode(value) {
|
|
1788
|
+
__classPrivateFieldSet(this, _SkySearchComponent__expandMode, value !== null && value !== void 0 ? value : EXPAND_MODE_RESPONSIVE, "f");
|
|
1789
|
+
}
|
|
1790
|
+
get expandMode() {
|
|
1791
|
+
return __classPrivateFieldGet(this, _SkySearchComponent__expandMode, "f");
|
|
1792
|
+
}
|
|
1793
|
+
/**
|
|
1794
|
+
* Specifies how many milliseconds to wait before searching after users enter text in the search input.
|
|
1795
|
+
* @default 0
|
|
1796
|
+
*/
|
|
1797
|
+
set debounceTime(value) {
|
|
1798
|
+
__classPrivateFieldSet(this, _SkySearchComponent__debounceTime, value !== null && value !== void 0 ? value : 0, "f");
|
|
1799
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_setupSearchChangedEvent).call(this);
|
|
1800
|
+
}
|
|
1801
|
+
get debounceTime() {
|
|
1802
|
+
return __classPrivateFieldGet(this, _SkySearchComponent__debounceTime, "f");
|
|
1803
|
+
}
|
|
1804
|
+
/**
|
|
1805
|
+
* Indicates whether to disable the filter button.
|
|
1806
|
+
* @default false
|
|
1807
|
+
*/
|
|
1808
|
+
set disabled(value) {
|
|
1809
|
+
__classPrivateFieldSet(this, _SkySearchComponent__disabled, value !== null && value !== void 0 ? value : false, "f");
|
|
1810
|
+
}
|
|
1811
|
+
get disabled() {
|
|
1812
|
+
return __classPrivateFieldGet(this, _SkySearchComponent__disabled, "f");
|
|
1813
|
+
}
|
|
1762
1814
|
ngOnInit() {
|
|
1763
1815
|
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1764
1816
|
this.breakpointSubscription = __classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").subscribe((args) => {
|
|
@@ -1766,12 +1818,7 @@ class SkySearchComponent {
|
|
|
1766
1818
|
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").detectChanges();
|
|
1767
1819
|
});
|
|
1768
1820
|
}
|
|
1769
|
-
__classPrivateFieldGet(this,
|
|
1770
|
-
.asObservable()
|
|
1771
|
-
.pipe(debounceTime(this.debounceTime), distinctUntilChanged())
|
|
1772
|
-
.subscribe((value) => {
|
|
1773
|
-
this.searchChange.emit(value);
|
|
1774
|
-
});
|
|
1821
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_setupSearchChangedEvent).call(this);
|
|
1775
1822
|
}
|
|
1776
1823
|
ngOnChanges(changes) {
|
|
1777
1824
|
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_expandModeBindingChanged).call(this, changes)) {
|
|
@@ -1863,13 +1910,15 @@ class SkySearchComponent {
|
|
|
1863
1910
|
}
|
|
1864
1911
|
}
|
|
1865
1912
|
ngOnDestroy() {
|
|
1913
|
+
var _a;
|
|
1866
1914
|
if (this.breakpointSubscription) {
|
|
1867
1915
|
this.breakpointSubscription.unsubscribe();
|
|
1868
1916
|
}
|
|
1869
1917
|
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f").complete();
|
|
1918
|
+
(_a = __classPrivateFieldGet(this, _SkySearchComponent_searchUpdatedSub, "f")) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1870
1919
|
}
|
|
1871
1920
|
}
|
|
1872
|
-
_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) {
|
|
1921
|
+
_SkySearchComponent_changeRef = new WeakMap(), _SkySearchComponent_elRef = new WeakMap(), _SkySearchComponent_mediaQueryService = new WeakMap(), _SkySearchComponent_searchAdapter = new WeakMap(), _SkySearchComponent_searchUpdated = new WeakMap(), _SkySearchComponent_searchUpdatedSub = new WeakMap(), _SkySearchComponent__debounceTime = new WeakMap(), _SkySearchComponent__disabled = new WeakMap(), _SkySearchComponent__expandMode = new WeakMap(), _SkySearchComponent_instances = new WeakSet(), _SkySearchComponent_searchBindingChanged = function _SkySearchComponent_searchBindingChanged(changes) {
|
|
1873
1922
|
return (changes['searchText'] &&
|
|
1874
1923
|
changes['searchText'].previousValue !== changes['searchText'].currentValue);
|
|
1875
1924
|
}, _SkySearchComponent_expandModeBindingChanged = function _SkySearchComponent_expandModeBindingChanged(changes) {
|
|
@@ -1895,9 +1944,17 @@ _SkySearchComponent_changeRef = new WeakMap(), _SkySearchComponent_elRef = new W
|
|
|
1895
1944
|
}, _SkySearchComponent_searchShouldCollapse = function _SkySearchComponent_searchShouldCollapse() {
|
|
1896
1945
|
return ((this.isCollapsible || this.isCollapsible === undefined) &&
|
|
1897
1946
|
this.isFullWidth !== true);
|
|
1947
|
+
}, _SkySearchComponent_setupSearchChangedEvent = function _SkySearchComponent_setupSearchChangedEvent() {
|
|
1948
|
+
var _a;
|
|
1949
|
+
(_a = __classPrivateFieldGet(this, _SkySearchComponent_searchUpdatedSub, "f")) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1950
|
+
__classPrivateFieldSet(this, _SkySearchComponent_searchUpdatedSub, __classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f")
|
|
1951
|
+
.pipe(debounceTime(this.debounceTime), distinctUntilChanged())
|
|
1952
|
+
.subscribe((value) => {
|
|
1953
|
+
this.searchChange.emit(value);
|
|
1954
|
+
}), "f");
|
|
1898
1955
|
};
|
|
1899
1956
|
SkySearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkySearchComponent, deps: [{ token: i1.SkyMediaQueryService }, { token: i0.ElementRef }, { token: SkySearchAdapterService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1900
|
-
SkySearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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;inset: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"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "directive", type: i1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "pipe", type: i4$1.SkyLibResourcesPipe, name: "skyLibResources" }], animations: [
|
|
1957
|
+
SkySearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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 [disabled]=\"disabled\">\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;inset: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{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"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "directive", type: i1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "pipe", type: i4$1.SkyLibResourcesPipe, name: "skyLibResources" }], animations: [
|
|
1901
1958
|
trigger('inputState', [
|
|
1902
1959
|
state(INPUT_HIDDEN_STATE, style({
|
|
1903
1960
|
opacity: 0,
|
|
@@ -1924,7 +1981,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1924
1981
|
})),
|
|
1925
1982
|
transition('* <=> *', animate('150ms')),
|
|
1926
1983
|
]),
|
|
1927
|
-
], providers: [SkySearchAdapterService], 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;inset: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{
|
|
1984
|
+
], providers: [SkySearchAdapterService], 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 [disabled]=\"disabled\">\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;inset: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{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"] }]
|
|
1928
1985
|
}], ctorParameters: function () { return [{ type: i1.SkyMediaQueryService }, { type: i0.ElementRef }, { type: SkySearchAdapterService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { searchApply: [{
|
|
1929
1986
|
type: Output
|
|
1930
1987
|
}], searchChange: [{
|
|
@@ -1996,6 +2053,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1996
2053
|
* Context for the show more native picker. These values are provided by the lookup component.
|
|
1997
2054
|
*/
|
|
1998
2055
|
class SkyLookupShowMoreNativePickerAsyncContext {
|
|
2056
|
+
constructor(descriptorProperty, idProperty, initialSearch, initialValue, searchAsync, selectMode, showAddButton, userConfig) {
|
|
2057
|
+
this.descriptorProperty = descriptorProperty;
|
|
2058
|
+
this.idProperty = idProperty;
|
|
2059
|
+
this.initialSearch = initialSearch;
|
|
2060
|
+
this.initialValue = initialValue;
|
|
2061
|
+
this.searchAsync = searchAsync;
|
|
2062
|
+
this.selectMode = selectMode;
|
|
2063
|
+
this.showAddButton = showAddButton;
|
|
2064
|
+
this.userConfig = userConfig;
|
|
2065
|
+
}
|
|
1999
2066
|
}
|
|
2000
2067
|
|
|
2001
2068
|
var _SkyLookupShowMoreAsyncModalComponent_instances, _SkyLookupShowMoreAsyncModalComponent_changeDetector, _SkyLookupShowMoreAsyncModalComponent_continuationData, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, _SkyLookupShowMoreAsyncModalComponent_logSvc, _SkyLookupShowMoreAsyncModalComponent_offset, _SkyLookupShowMoreAsyncModalComponent_loadSearchResults, _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap, _SkyLookupShowMoreAsyncModalComponent_performSearch, _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch;
|
|
@@ -2178,6 +2245,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2178
2245
|
* Context for the show more native picker. These values are provided by the lookup component.
|
|
2179
2246
|
*/
|
|
2180
2247
|
class SkyLookupShowMoreNativePickerContext {
|
|
2248
|
+
constructor(descriptorProperty, initialSearch, initialValue, items, search, selectMode, showAddButton, userConfig) {
|
|
2249
|
+
this.descriptorProperty = descriptorProperty;
|
|
2250
|
+
this.initialSearch = initialSearch;
|
|
2251
|
+
this.initialValue = initialValue;
|
|
2252
|
+
this.items = items;
|
|
2253
|
+
this.search = search;
|
|
2254
|
+
this.selectMode = selectMode;
|
|
2255
|
+
this.showAddButton = showAddButton;
|
|
2256
|
+
this.userConfig = userConfig;
|
|
2257
|
+
}
|
|
2181
2258
|
}
|
|
2182
2259
|
|
|
2183
2260
|
var _SkyLookupShowMoreModalComponent_changeDetector, _SkyLookupShowMoreModalComponent_itemIndex, _SkyLookupShowMoreModalComponent_ngUnsubscribe;
|
|
@@ -2384,7 +2461,7 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2384
2461
|
updateDataState() {
|
|
2385
2462
|
const items = this.items;
|
|
2386
2463
|
const selectedItems = this.selectedItems;
|
|
2387
|
-
items.forEach((item, index) => {
|
|
2464
|
+
items === null || items === void 0 ? void 0 : items.forEach((item, index) => {
|
|
2388
2465
|
item.selected =
|
|
2389
2466
|
selectedItems.findIndex((selectedItem) => selectedItem.index === index) !== -1;
|
|
2390
2467
|
});
|
|
@@ -2444,20 +2521,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2444
2521
|
type: Injectable
|
|
2445
2522
|
}] });
|
|
2446
2523
|
|
|
2447
|
-
var _SkyLookupAutocompleteAdapter__descriptorProperty, _SkyLookupAutocompleteAdapter__propertiesToSearch, _SkyLookupAutocompleteAdapter__search;
|
|
2524
|
+
var _SkyLookupAutocompleteAdapter_instances, _SkyLookupAutocompleteAdapter__descriptorProperty, _SkyLookupAutocompleteAdapter__propertiesToSearch, _SkyLookupAutocompleteAdapter__search, _SkyLookupAutocompleteAdapter__searchFilters, _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions;
|
|
2448
2525
|
/**
|
|
2449
2526
|
* @internal
|
|
2450
2527
|
*/
|
|
2451
2528
|
class SkyLookupAutocompleteAdapter {
|
|
2452
2529
|
constructor() {
|
|
2530
|
+
_SkyLookupAutocompleteAdapter_instances.add(this);
|
|
2453
2531
|
/**
|
|
2454
2532
|
* Fires when users enter new search information and allows results to be
|
|
2455
2533
|
* returned via an observable.
|
|
2456
2534
|
*/
|
|
2457
2535
|
this.searchAsync = new EventEmitter();
|
|
2458
|
-
|
|
2459
|
-
|
|
2536
|
+
this.searchOrDefault = skyAutocompleteDefaultSearchFunction({
|
|
2537
|
+
propertiesToSearch: ['name'],
|
|
2538
|
+
searchFilters: undefined,
|
|
2539
|
+
});
|
|
2540
|
+
_SkyLookupAutocompleteAdapter__descriptorProperty.set(this, 'name');
|
|
2541
|
+
_SkyLookupAutocompleteAdapter__propertiesToSearch.set(this, ['name']);
|
|
2460
2542
|
_SkyLookupAutocompleteAdapter__search.set(this, void 0);
|
|
2543
|
+
_SkyLookupAutocompleteAdapter__searchFilters.set(this, void 0);
|
|
2461
2544
|
}
|
|
2462
2545
|
/**
|
|
2463
2546
|
* Specifies an object property to display in the text input after users
|
|
@@ -2465,20 +2548,21 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2465
2548
|
* @default "name"
|
|
2466
2549
|
*/
|
|
2467
2550
|
set descriptorProperty(value) {
|
|
2468
|
-
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, value, "f");
|
|
2551
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, value || 'name', "f");
|
|
2469
2552
|
}
|
|
2470
2553
|
get descriptorProperty() {
|
|
2471
|
-
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, "f")
|
|
2554
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, "f");
|
|
2472
2555
|
}
|
|
2473
2556
|
/**
|
|
2474
2557
|
* Specifies an array of object properties to search.
|
|
2475
2558
|
* @default ["name"]
|
|
2476
2559
|
*/
|
|
2477
2560
|
set propertiesToSearch(value) {
|
|
2478
|
-
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, value, "f");
|
|
2561
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, value !== null && value !== void 0 ? value : ['name'], "f");
|
|
2562
|
+
__classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter_instances, "m", _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions).call(this);
|
|
2479
2563
|
}
|
|
2480
2564
|
get propertiesToSearch() {
|
|
2481
|
-
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, "f")
|
|
2565
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, "f");
|
|
2482
2566
|
}
|
|
2483
2567
|
/**
|
|
2484
2568
|
* Specifies a function to dynamically manage the data source when users
|
|
@@ -2490,16 +2574,40 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2490
2574
|
*/
|
|
2491
2575
|
set search(value) {
|
|
2492
2576
|
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__search, value, "f");
|
|
2577
|
+
this.searchOrDefault =
|
|
2578
|
+
value ||
|
|
2579
|
+
skyAutocompleteDefaultSearchFunction({
|
|
2580
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
2581
|
+
searchFilters: this.searchFilters,
|
|
2582
|
+
});
|
|
2493
2583
|
}
|
|
2494
2584
|
get search() {
|
|
2495
|
-
return
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2585
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__search, "f");
|
|
2586
|
+
}
|
|
2587
|
+
/**
|
|
2588
|
+
* Specifies an array of functions to call against each search result in order
|
|
2589
|
+
* to filter the search results when using the default search function. When
|
|
2590
|
+
* using a custom search function via the `search` property filters must be
|
|
2591
|
+
* applied manually inside that function. The function must return `true` or
|
|
2592
|
+
* `false` for each result to indicate whether to display it in the dropdown list.
|
|
2593
|
+
*/
|
|
2594
|
+
set searchFilters(value) {
|
|
2595
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__searchFilters, value, "f");
|
|
2596
|
+
__classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter_instances, "m", _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions).call(this);
|
|
2597
|
+
}
|
|
2598
|
+
get searchFilters() {
|
|
2599
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__searchFilters, "f");
|
|
2500
2600
|
}
|
|
2501
2601
|
}
|
|
2502
|
-
_SkyLookupAutocompleteAdapter__descriptorProperty = new WeakMap(), _SkyLookupAutocompleteAdapter__propertiesToSearch = new WeakMap(), _SkyLookupAutocompleteAdapter__search = new WeakMap()
|
|
2602
|
+
_SkyLookupAutocompleteAdapter__descriptorProperty = new WeakMap(), _SkyLookupAutocompleteAdapter__propertiesToSearch = new WeakMap(), _SkyLookupAutocompleteAdapter__search = new WeakMap(), _SkyLookupAutocompleteAdapter__searchFilters = new WeakMap(), _SkyLookupAutocompleteAdapter_instances = new WeakSet(), _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions = function _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions() {
|
|
2603
|
+
// Reset default search if it is what is being used.
|
|
2604
|
+
if (this.search !== this.searchOrDefault) {
|
|
2605
|
+
this.searchOrDefault = skyAutocompleteDefaultSearchFunction({
|
|
2606
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
2607
|
+
searchFilters: this.searchFilters,
|
|
2608
|
+
});
|
|
2609
|
+
}
|
|
2610
|
+
};
|
|
2503
2611
|
SkyLookupAutocompleteAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyLookupAutocompleteAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2504
2612
|
SkyLookupAutocompleteAdapter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: SkyLookupAutocompleteAdapter, inputs: { debounceTime: "debounceTime", descriptorProperty: "descriptorProperty", propertiesToSearch: "propertiesToSearch", search: "search", searchResultTemplate: "searchResultTemplate", searchTextMinimumCharacters: "searchTextMinimumCharacters", searchFilters: "searchFilters", searchResultsLimit: "searchResultsLimit" }, outputs: { searchAsync: "searchAsync" }, ngImport: i0 });
|
|
2505
2613
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyLookupAutocompleteAdapter, decorators: [{
|
|
@@ -2524,25 +2632,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2524
2632
|
type: Output
|
|
2525
2633
|
}] } });
|
|
2526
2634
|
|
|
2527
|
-
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;
|
|
2635
|
+
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__disabled, _SkyLookupComponent__enableShowMore, _SkyLookupComponent__selectMode, _SkyLookupComponent__showAddButton, _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;
|
|
2528
2636
|
class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
2529
2637
|
constructor(changeDetector, elementRef, windowRef, adapter, modalService, resourcesService, ngControl, inputBoxHostSvc, themeSvc) {
|
|
2530
2638
|
super();
|
|
2531
2639
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
2532
2640
|
this.themeSvc = themeSvc;
|
|
2533
2641
|
_SkyLookupComponent_instances.add(this);
|
|
2534
|
-
/**
|
|
2535
|
-
* Indicates whether to disable the lookup field.
|
|
2536
|
-
*/
|
|
2537
|
-
this.disabled = false;
|
|
2538
|
-
/**
|
|
2539
|
-
* Indicates whether to enable users to open a picker where they can view all options.
|
|
2540
|
-
*/
|
|
2541
|
-
this.enableShowMore = false;
|
|
2542
|
-
/**
|
|
2543
|
-
* Indicates whether to display a button that lets users add options to the list.
|
|
2544
|
-
*/
|
|
2545
|
-
this.showAddButton = false;
|
|
2546
2642
|
/**
|
|
2547
2643
|
* Fires when users select the button to add options to the list.
|
|
2548
2644
|
*/
|
|
@@ -2562,7 +2658,10 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2562
2658
|
_SkyLookupComponent_windowRef.set(this, void 0);
|
|
2563
2659
|
_SkyLookupComponent__autocompleteInputDirective.set(this, void 0);
|
|
2564
2660
|
_SkyLookupComponent__data.set(this, void 0);
|
|
2661
|
+
_SkyLookupComponent__disabled.set(this, false);
|
|
2662
|
+
_SkyLookupComponent__enableShowMore.set(this, false);
|
|
2565
2663
|
_SkyLookupComponent__selectMode.set(this, void 0);
|
|
2664
|
+
_SkyLookupComponent__showAddButton.set(this, false);
|
|
2566
2665
|
_SkyLookupComponent__tokens.set(this, void 0);
|
|
2567
2666
|
_SkyLookupComponent__value.set(this, void 0);
|
|
2568
2667
|
// Angular automatically constructs these methods.
|
|
@@ -2595,6 +2694,36 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2595
2694
|
get data() {
|
|
2596
2695
|
return __classPrivateFieldGet(this, _SkyLookupComponent__data, "f") || [];
|
|
2597
2696
|
}
|
|
2697
|
+
/**
|
|
2698
|
+
* Indicates whether to disable the lookup field.
|
|
2699
|
+
* @default false
|
|
2700
|
+
*/
|
|
2701
|
+
set disabled(value) {
|
|
2702
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__disabled, value !== null && value !== void 0 ? value : false, "f");
|
|
2703
|
+
}
|
|
2704
|
+
get disabled() {
|
|
2705
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__disabled, "f");
|
|
2706
|
+
}
|
|
2707
|
+
/**
|
|
2708
|
+
* Indicates whether to enable users to open a picker where they can view all options.
|
|
2709
|
+
* @default false
|
|
2710
|
+
*/
|
|
2711
|
+
set enableShowMore(value) {
|
|
2712
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__enableShowMore, value !== null && value !== void 0 ? value : false, "f");
|
|
2713
|
+
}
|
|
2714
|
+
get enableShowMore() {
|
|
2715
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__enableShowMore, "f");
|
|
2716
|
+
}
|
|
2717
|
+
/**
|
|
2718
|
+
* Indicates whether to display a button that lets users add options to the list.
|
|
2719
|
+
* @default false
|
|
2720
|
+
*/
|
|
2721
|
+
set showAddButton(value) {
|
|
2722
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__showAddButton, value !== null && value !== void 0 ? value : false, "f");
|
|
2723
|
+
}
|
|
2724
|
+
get showAddButton() {
|
|
2725
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__showAddButton, "f");
|
|
2726
|
+
}
|
|
2598
2727
|
/**
|
|
2599
2728
|
* Specifies whether users can select one option or multiple options.
|
|
2600
2729
|
* @default "multiple"
|
|
@@ -2658,7 +2787,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2658
2787
|
return __classPrivateFieldGet(this, _SkyLookupComponent__autocompleteInputDirective, "f");
|
|
2659
2788
|
}
|
|
2660
2789
|
ngOnInit() {
|
|
2661
|
-
if (this.inputBoxHostSvc) {
|
|
2790
|
+
if (this.inputBoxHostSvc && this.inputTemplateRef) {
|
|
2662
2791
|
this.inputBoxHostSvc.populate({
|
|
2663
2792
|
inputTemplate: this.inputTemplateRef,
|
|
2664
2793
|
buttonsTemplate: this.enableShowMore
|
|
@@ -2772,8 +2901,10 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2772
2901
|
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2773
2902
|
}
|
|
2774
2903
|
clearSearchText() {
|
|
2775
|
-
this.autocompleteInputDirective
|
|
2776
|
-
|
|
2904
|
+
if (this.autocompleteInputDirective) {
|
|
2905
|
+
this.autocompleteInputDirective.value = undefined;
|
|
2906
|
+
this.autocompleteInputDirective.inputTextValue = '';
|
|
2907
|
+
}
|
|
2777
2908
|
}
|
|
2778
2909
|
// Handles when to focus on the tokens.
|
|
2779
2910
|
// Check for empty search text on keydown, before the escape key is fully pressed.
|
|
@@ -2827,6 +2958,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2827
2958
|
}
|
|
2828
2959
|
}
|
|
2829
2960
|
onSearchButtonClick() {
|
|
2961
|
+
var _a, _b;
|
|
2830
2962
|
/*istanbul ignore next*/
|
|
2831
2963
|
if (this.disabled) {
|
|
2832
2964
|
return;
|
|
@@ -2835,12 +2967,16 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2835
2967
|
let isValueInTextBox = false;
|
|
2836
2968
|
if (this.selectMode === 'single') {
|
|
2837
2969
|
isValueInTextBox =
|
|
2838
|
-
this.autocompleteInputDirective.value &&
|
|
2970
|
+
((_a = this.autocompleteInputDirective) === null || _a === void 0 ? void 0 : _a.value) &&
|
|
2839
2971
|
this.autocompleteInputDirective.inputTextValue ===
|
|
2840
2972
|
this.autocompleteInputDirective.value[this.descriptorProperty];
|
|
2841
2973
|
}
|
|
2842
|
-
|
|
2843
|
-
this.autocompleteInputDirective
|
|
2974
|
+
let searchValue = '';
|
|
2975
|
+
if (!isValueInTextBox && this.autocompleteInputDirective) {
|
|
2976
|
+
searchValue = this.autocompleteInputDirective.inputTextValue;
|
|
2977
|
+
}
|
|
2978
|
+
this.openPicker(searchValue);
|
|
2979
|
+
(_b = this.autocompleteInputDirective) === null || _b === void 0 ? void 0 : _b.restoreInputTextValueToPreviousState();
|
|
2844
2980
|
}
|
|
2845
2981
|
onShowMoreClick(event) {
|
|
2846
2982
|
/* Sanity check */
|
|
@@ -2898,7 +3034,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2898
3034
|
this.searchAsync.emit(args);
|
|
2899
3035
|
}
|
|
2900
3036
|
}
|
|
2901
|
-
_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) {
|
|
3037
|
+
_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__disabled = new WeakMap(), _SkyLookupComponent__enableShowMore = new WeakMap(), _SkyLookupComponent__selectMode = new WeakMap(), _SkyLookupComponent__showAddButton = new WeakMap(), _SkyLookupComponent__tokens = new WeakMap(), _SkyLookupComponent__value = new WeakMap(), _SkyLookupComponent_instances = new WeakSet(), _SkyLookupComponent_createNativePickerInstance = function _SkyLookupComponent_createNativePickerInstance(initialSearch) {
|
|
2902
3038
|
var _a;
|
|
2903
3039
|
const initialValue = this.value;
|
|
2904
3040
|
const modalConfig = ((_a = this.showMoreConfig) === null || _a === void 0 ? void 0 : _a.nativePickerConfig) || {};
|
|
@@ -2911,26 +3047,16 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2911
3047
|
if (this.searchAsync.observers.length > 0) {
|
|
2912
3048
|
contextProviderType = SkyLookupShowMoreNativePickerAsyncContext;
|
|
2913
3049
|
modalComponentType = SkyLookupShowMoreAsyncModalComponent;
|
|
2914
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext()
|
|
2915
|
-
contextProviderValue.idProperty = this.idProperty;
|
|
2916
|
-
contextProviderValue.searchAsync = (args) => {
|
|
3050
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext(this.descriptorProperty, this.idProperty, initialSearch, initialValue, (args) => {
|
|
2917
3051
|
this.searchAsync.emit(args);
|
|
2918
3052
|
return args.result;
|
|
2919
|
-
};
|
|
3053
|
+
}, this.selectMode, this.showAddButton, modalConfig);
|
|
2920
3054
|
}
|
|
2921
3055
|
else {
|
|
2922
3056
|
contextProviderType = SkyLookupShowMoreNativePickerContext;
|
|
2923
3057
|
modalComponentType = SkyLookupShowMoreModalComponent;
|
|
2924
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerContext();
|
|
2925
|
-
|
|
2926
|
-
contextProviderValue.search = this.search;
|
|
2927
|
-
}
|
|
2928
|
-
contextProviderValue.descriptorProperty = this.descriptorProperty;
|
|
2929
|
-
contextProviderValue.initialSearch = initialSearch;
|
|
2930
|
-
contextProviderValue.initialValue = initialValue;
|
|
2931
|
-
contextProviderValue.selectMode = this.selectMode;
|
|
2932
|
-
contextProviderValue.showAddButton = this.showAddButton;
|
|
2933
|
-
contextProviderValue.userConfig = modalConfig;
|
|
3058
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerContext(this.descriptorProperty, initialSearch, initialValue, this.data, this.searchOrDefault, this.selectMode, this.showAddButton, modalConfig);
|
|
3059
|
+
}
|
|
2934
3060
|
return __classPrivateFieldGet(this, _SkyLookupComponent_modalService, "f").open(modalComponentType, {
|
|
2935
3061
|
providers: [
|
|
2936
3062
|
{
|
|
@@ -2964,9 +3090,10 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2964
3090
|
__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f").next();
|
|
2965
3091
|
__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f").complete();
|
|
2966
3092
|
}, _SkyLookupComponent_focusInputOnHostClick = function _SkyLookupComponent_focusInputOnHostClick() {
|
|
3093
|
+
var _a;
|
|
2967
3094
|
let hostElement = !this.inputBoxHostSvc
|
|
2968
3095
|
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2969
|
-
: this.lookupWrapperRef.nativeElement;
|
|
3096
|
+
: (_a = this.lookupWrapperRef) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
2970
3097
|
const documentObj = __classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.document;
|
|
2971
3098
|
// Handles focusing the input when the host is clicked.
|
|
2972
3099
|
// The input should NOT be focused if other elements (tokens, etc.)
|
|
@@ -2974,18 +3101,20 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2974
3101
|
fromEvent(documentObj, 'mousedown')
|
|
2975
3102
|
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2976
3103
|
.subscribe((event) => {
|
|
3104
|
+
var _a;
|
|
2977
3105
|
hostElement = !this.inputBoxHostSvc
|
|
2978
3106
|
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2979
|
-
: this.lookupWrapperRef.nativeElement;
|
|
3107
|
+
: (_a = this.lookupWrapperRef) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
2980
3108
|
this.isInputFocused = hostElement.contains(event.target);
|
|
2981
3109
|
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2982
3110
|
});
|
|
2983
3111
|
fromEvent(documentObj, 'focusin')
|
|
2984
3112
|
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyLookupComponent_idle, "f")))
|
|
2985
3113
|
.subscribe((event) => {
|
|
3114
|
+
var _a;
|
|
2986
3115
|
hostElement = !this.inputBoxHostSvc
|
|
2987
3116
|
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2988
|
-
: this.lookupWrapperRef.nativeElement;
|
|
3117
|
+
: (_a = this.lookupWrapperRef) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
2989
3118
|
this.isInputFocused = hostElement.contains(event.target);
|
|
2990
3119
|
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2991
3120
|
});
|
|
@@ -2998,7 +3127,9 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2998
3127
|
}
|
|
2999
3128
|
});
|
|
3000
3129
|
}, _SkyLookupComponent_focusInput = function _SkyLookupComponent_focusInput() {
|
|
3001
|
-
|
|
3130
|
+
if (this.lookupWrapperRef) {
|
|
3131
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_adapter, "f").focusInput(this.lookupWrapperRef);
|
|
3132
|
+
}
|
|
3002
3133
|
}, _SkyLookupComponent_onAddButtonComplete = function _SkyLookupComponent_onAddButtonComplete(args) {
|
|
3003
3134
|
if (args.data) {
|
|
3004
3135
|
this.data = args.data;
|
|
@@ -3040,10 +3171,10 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
3040
3171
|
}
|
|
3041
3172
|
};
|
|
3042
3173
|
SkyLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", 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: i5$1.NgControl, optional: true, self: true }, { token: i5.SkyInputBoxHostService, optional: true }, { token: i7.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3043
|
-
SkyLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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 [attr.data-sky-lookup-show-more-picker-id]=\"showMorePickerId\"\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-token{z-index:1}: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-token{z-index:1}.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"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", 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"] }, { kind: "directive", type: SkyAutocompleteInputDirective, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { kind: "component", type: i6.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "component", type: i6.λ13, selector: "sky-tokens", inputs: ["disabled", "dismissible", "displayWith", "trackWith", "focusable", "tokens", "messageStream"], outputs: ["focusIndexOverRange", "focusIndexUnderRange", "tokenSelected", "tokensChange"] }, { kind: "pipe", type: i4$1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3174
|
+
SkyLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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 [attr.data-sky-lookup-show-more-picker-id]=\"showMorePickerId\"\n [data]=\"data\"\n [debounceTime]=\"debounceTime\"\n [descriptorProperty]=\"descriptorProperty\"\n [enableShowMore]=\"enableShowMore\"\n [messageStream]=\"autocompleteController\"\n [propertiesToSearch]=\"propertiesToSearch\"\n [search]=\"searchOrDefault\"\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 <ng-container *ngIf=\"!inputBoxHostSvc && !enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplateRef\"\n ></ng-container>\n </ng-container>\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 <ng-container *ngIf=\"!inputBoxHostSvc && !enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplateRef\"\n ></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!inputBoxHostSvc && enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"showMoreButtonTemplateRef\"\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 *skyThemeIf=\"'default'\" icon=\"search\"></sky-icon>\n <sky-icon *skyThemeIf=\"'modern'\" iconType=\"skyux\" icon=\"search\"></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-token{z-index:1}: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-token{z-index:1}.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"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", 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"] }, { kind: "directive", type: SkyAutocompleteInputDirective, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { kind: "component", type: i6.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i7.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "component", type: i6.λ13, selector: "sky-tokens", inputs: ["disabled", "dismissible", "displayWith", "trackWith", "focusable", "tokens", "messageStream"], outputs: ["focusIndexOverRange", "focusIndexUnderRange", "tokenSelected", "tokensChange"] }, { kind: "pipe", type: i4$1.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3044
3175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyLookupComponent, decorators: [{
|
|
3045
3176
|
type: Component,
|
|
3046
|
-
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 [attr.data-sky-lookup-show-more-picker-id]=\"showMorePickerId\"\n [data]=\"data\"\n [debounceTime]=\"debounceTime\"\n [descriptorProperty]=\"descriptorProperty\"\n [enableShowMore]=\"enableShowMore\"\n [messageStream]=\"autocompleteController\"\n [propertiesToSearch]=\"propertiesToSearch\"\n [search]=\"
|
|
3177
|
+
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 [attr.data-sky-lookup-show-more-picker-id]=\"showMorePickerId\"\n [data]=\"data\"\n [debounceTime]=\"debounceTime\"\n [descriptorProperty]=\"descriptorProperty\"\n [enableShowMore]=\"enableShowMore\"\n [messageStream]=\"autocompleteController\"\n [propertiesToSearch]=\"propertiesToSearch\"\n [search]=\"searchOrDefault\"\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 <ng-container *ngIf=\"!inputBoxHostSvc && !enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplateRef\"\n ></ng-container>\n </ng-container>\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 <ng-container *ngIf=\"!inputBoxHostSvc && !enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"searchIconTemplateRef\"\n ></ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"!inputBoxHostSvc && enableShowMore\">\n <ng-container\n *ngTemplateOutlet=\"showMoreButtonTemplateRef\"\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 *skyThemeIf=\"'default'\" icon=\"search\"></sky-icon>\n <sky-icon *skyThemeIf=\"'modern'\" iconType=\"skyux\" icon=\"search\"></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-token{z-index:1}: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-token{z-index:1}.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"] }]
|
|
3047
3178
|
}], ctorParameters: function () {
|
|
3048
3179
|
return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAppWindowRef }, { type: SkyLookupAdapterService }, { type: i1$1.SkyModalService }, { type: i4$1.SkyLibResourcesService }, { type: i5$1.NgControl, decorators: [{
|
|
3049
3180
|
type: Self
|