@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 ?? 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 ?? [], "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 ?? 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 ?? ['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) {
|
|
@@ -1107,12 +1123,20 @@ _SkyAutocompleteComponent_activeElementIndex = new WeakMap(), _SkyAutocompleteCo
|
|
|
1107
1123
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_adapterService, "f").addCSSClass(__classPrivateFieldGet(this, _SkyAutocompleteComponent_overlayFocusableElements, "f")[__classPrivateFieldGet(this, _SkyAutocompleteComponent_activeElementIndex, "f")], 'sky-autocomplete-descendant-focus');
|
|
1108
1124
|
__classPrivateFieldGet(this, _SkyAutocompleteComponent_instances, "m", _SkyAutocompleteComponent_setActiveDescendant).call(this);
|
|
1109
1125
|
}
|
|
1126
|
+
}, _SkyAutocompleteComponent_updateDefaultSearchOptions = function _SkyAutocompleteComponent_updateDefaultSearchOptions() {
|
|
1127
|
+
// Reset default search if it is what is being used.
|
|
1128
|
+
if (this.search !== this.searchOrDefault) {
|
|
1129
|
+
this.searchOrDefault = skyAutocompleteDefaultSearchFunction({
|
|
1130
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
1131
|
+
searchFilters: this.searchFilters,
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1110
1134
|
};
|
|
1111
1135
|
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 });
|
|
1112
|
-
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
|
|
1136
|
+
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 });
|
|
1113
1137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAutocompleteComponent, decorators: [{
|
|
1114
1138
|
type: Component,
|
|
1115
|
-
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
|
|
1139
|
+
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"] }]
|
|
1116
1140
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAffixService }, { type: SkyAutocompleteAdapterService }, { type: i1.SkyOverlayService }, { type: i5.SkyInputBoxHostService, decorators: [{
|
|
1117
1141
|
type: Optional
|
|
1118
1142
|
}] }]; }, propDecorators: { ariaLabelledBy: [{
|
|
@@ -1222,7 +1246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1222
1246
|
}]
|
|
1223
1247
|
}] });
|
|
1224
1248
|
|
|
1225
|
-
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;
|
|
1249
|
+
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;
|
|
1226
1250
|
const DEFAULT_COUNTRY_CODE = 'us';
|
|
1227
1251
|
const SKY_COUNTRY_FIELD_VALIDATOR = {
|
|
1228
1252
|
provide: NG_VALIDATORS,
|
|
@@ -1234,10 +1258,6 @@ class SkyCountryFieldComponent {
|
|
|
1234
1258
|
constructor(changeDetector, elRef, windowRef, injector, inputBoxHostSvc, themeSvc) {
|
|
1235
1259
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
1236
1260
|
_SkyCountryFieldComponent_instances.add(this);
|
|
1237
|
-
/**
|
|
1238
|
-
* Indicates whether to hide the flag in the input element.
|
|
1239
|
-
*/
|
|
1240
|
-
this.hideSelectedCountryFlag = false;
|
|
1241
1261
|
/**
|
|
1242
1262
|
* Fires when the selected country changes.
|
|
1243
1263
|
*/
|
|
@@ -1259,6 +1279,7 @@ class SkyCountryFieldComponent {
|
|
|
1259
1279
|
_SkyCountryFieldComponent_windowRef.set(this, void 0);
|
|
1260
1280
|
_SkyCountryFieldComponent__defaultCountry.set(this, void 0);
|
|
1261
1281
|
_SkyCountryFieldComponent__disabled.set(this, false);
|
|
1282
|
+
_SkyCountryFieldComponent__hideSelectedCountryFlag.set(this, false);
|
|
1262
1283
|
_SkyCountryFieldComponent__includePhoneInfo.set(this, false);
|
|
1263
1284
|
_SkyCountryFieldComponent__selectedCountry.set(this, void 0);
|
|
1264
1285
|
_SkyCountryFieldComponent__supportedCountryISOs.set(this, void 0);
|
|
@@ -1302,24 +1323,34 @@ class SkyCountryFieldComponent {
|
|
|
1302
1323
|
set disabled(isDisabled) {
|
|
1303
1324
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1304
1325
|
if (!isDisabled) {
|
|
1305
|
-
this.
|
|
1326
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_addEventListeners).call(this);
|
|
1306
1327
|
}
|
|
1307
|
-
__classPrivateFieldSet(this, _SkyCountryFieldComponent__disabled, isDisabled, "f");
|
|
1328
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__disabled, isDisabled ?? false, "f");
|
|
1308
1329
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1309
1330
|
}
|
|
1310
1331
|
get disabled() {
|
|
1311
1332
|
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__disabled, "f");
|
|
1312
1333
|
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Indicates whether to hide the flag in the input element.
|
|
1336
|
+
* @default false
|
|
1337
|
+
*/
|
|
1338
|
+
set hideSelectedCountryFlag(value) {
|
|
1339
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__hideSelectedCountryFlag, value ?? false, "f");
|
|
1340
|
+
}
|
|
1341
|
+
get hideSelectedCountryFlag() {
|
|
1342
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__hideSelectedCountryFlag, "f");
|
|
1343
|
+
}
|
|
1313
1344
|
/**
|
|
1314
1345
|
* Indicates whether to include phone information in the selected country and country dropdown.
|
|
1315
1346
|
* @default false
|
|
1316
1347
|
*/
|
|
1317
1348
|
set includePhoneInfo(value) {
|
|
1318
|
-
__classPrivateFieldSet(this, _SkyCountryFieldComponent__includePhoneInfo, value, "f");
|
|
1349
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent__includePhoneInfo, value ?? false, "f");
|
|
1319
1350
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_setupCountries).call(this);
|
|
1320
1351
|
}
|
|
1321
1352
|
get includePhoneInfo() {
|
|
1322
|
-
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__includePhoneInfo, "f")
|
|
1353
|
+
return __classPrivateFieldGet(this, _SkyCountryFieldComponent__includePhoneInfo, "f");
|
|
1323
1354
|
}
|
|
1324
1355
|
/**
|
|
1325
1356
|
* Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)
|
|
@@ -1403,7 +1434,7 @@ class SkyCountryFieldComponent {
|
|
|
1403
1434
|
}
|
|
1404
1435
|
});
|
|
1405
1436
|
if (!this.disabled) {
|
|
1406
|
-
this.
|
|
1437
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_addEventListeners).call(this);
|
|
1407
1438
|
}
|
|
1408
1439
|
}
|
|
1409
1440
|
ngAfterViewInit() {
|
|
@@ -1472,25 +1503,24 @@ class SkyCountryFieldComponent {
|
|
|
1472
1503
|
this.selectedCountry = value;
|
|
1473
1504
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1474
1505
|
}
|
|
1475
|
-
addEventListeners() {
|
|
1476
|
-
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1477
|
-
__classPrivateFieldSet(this, _SkyCountryFieldComponent_idle, new Subject(), "f");
|
|
1478
|
-
const documentObj = __classPrivateFieldGet(this, _SkyCountryFieldComponent_windowRef, "f").nativeWindow.document;
|
|
1479
|
-
fromEvent(documentObj, 'mousedown')
|
|
1480
|
-
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1481
|
-
.subscribe((event) => {
|
|
1482
|
-
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1483
|
-
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1484
|
-
});
|
|
1485
|
-
fromEvent(documentObj, 'focusin')
|
|
1486
|
-
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1487
|
-
.subscribe((event) => {
|
|
1488
|
-
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1489
|
-
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1490
|
-
});
|
|
1491
|
-
}
|
|
1492
1506
|
}
|
|
1493
|
-
_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(),
|
|
1507
|
+
_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() {
|
|
1508
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_removeEventListeners).call(this);
|
|
1509
|
+
__classPrivateFieldSet(this, _SkyCountryFieldComponent_idle, new Subject(), "f");
|
|
1510
|
+
const documentObj = __classPrivateFieldGet(this, _SkyCountryFieldComponent_windowRef, "f").nativeWindow.document;
|
|
1511
|
+
fromEvent(documentObj, 'mousedown')
|
|
1512
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1513
|
+
.subscribe((event) => {
|
|
1514
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1515
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1516
|
+
});
|
|
1517
|
+
fromEvent(documentObj, 'focusin')
|
|
1518
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyCountryFieldComponent_idle, "f")))
|
|
1519
|
+
.subscribe((event) => {
|
|
1520
|
+
this.isInputFocused = __classPrivateFieldGet(this, _SkyCountryFieldComponent_elRef, "f").nativeElement.contains(event.target);
|
|
1521
|
+
__classPrivateFieldGet(this, _SkyCountryFieldComponent_changeDetector, "f").markForCheck();
|
|
1522
|
+
});
|
|
1523
|
+
}, _SkyCountryFieldComponent_countriesAreEqual = function _SkyCountryFieldComponent_countriesAreEqual(country1, country2) {
|
|
1494
1524
|
if (country1 && country2) {
|
|
1495
1525
|
return country1.iso2 === country2.iso2;
|
|
1496
1526
|
}
|
|
@@ -1546,7 +1576,7 @@ _SkyCountryFieldComponent_changeDetector = new WeakMap(), _SkyCountryFieldCompon
|
|
|
1546
1576
|
const sortedNewCountries = this.countries.sort((a, b) => {
|
|
1547
1577
|
if (((__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") &&
|
|
1548
1578
|
__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, a, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"))) ||
|
|
1549
|
-
a.name < b.name) &&
|
|
1579
|
+
(a.name && b.name && a.name < b.name)) &&
|
|
1550
1580
|
(!__classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f") ||
|
|
1551
1581
|
!__classPrivateFieldGet(this, _SkyCountryFieldComponent_instances, "m", _SkyCountryFieldComponent_countriesEqual).call(this, __classPrivateFieldGet(this, _SkyCountryFieldComponent_defaultCountryData, "f"), b))) {
|
|
1552
1582
|
return -1;
|
|
@@ -1699,7 +1729,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1699
1729
|
type: Injectable
|
|
1700
1730
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
1701
1731
|
|
|
1702
|
-
var _SkySearchComponent_instances, _SkySearchComponent_changeRef, _SkySearchComponent_elRef, _SkySearchComponent_mediaQueryService, _SkySearchComponent_searchAdapter, _SkySearchComponent_searchUpdated, _SkySearchComponent_searchBindingChanged, _SkySearchComponent_expandModeBindingChanged, _SkySearchComponent_shouldOpenInput, _SkySearchComponent_mediaQueryCallback, _SkySearchComponent_searchShouldCollapse;
|
|
1732
|
+
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;
|
|
1703
1733
|
const INPUT_SHOWN_STATE = 'inputShown';
|
|
1704
1734
|
const INPUT_HIDDEN_STATE = 'inputHidden';
|
|
1705
1735
|
const EXPAND_MODE_RESPONSIVE = 'responsive';
|
|
@@ -1720,22 +1750,6 @@ class SkySearchComponent {
|
|
|
1720
1750
|
* Fires when the search text is cleared.
|
|
1721
1751
|
*/
|
|
1722
1752
|
this.searchClear = new EventEmitter();
|
|
1723
|
-
/**
|
|
1724
|
-
* Specifies the expand mode for the search input. The valid options
|
|
1725
|
-
* include `"responsive"` to collapse the search input into a button on
|
|
1726
|
-
* mobile devices, `"none"` to *not* collapse the search input on mobile
|
|
1727
|
-
* devices, and `"fit"` to extend the search input to fit the width of its container.
|
|
1728
|
-
* @default "responsive"
|
|
1729
|
-
*/
|
|
1730
|
-
this.expandMode = EXPAND_MODE_RESPONSIVE;
|
|
1731
|
-
/**
|
|
1732
|
-
* Specifies how many milliseconds to wait before searching after users enter text in the search input.
|
|
1733
|
-
*/
|
|
1734
|
-
this.debounceTime = 0;
|
|
1735
|
-
/**
|
|
1736
|
-
* Indicates whether to disable the filter button.
|
|
1737
|
-
*/
|
|
1738
|
-
this.disabled = false;
|
|
1739
1753
|
this.clearButtonShown = false;
|
|
1740
1754
|
this.dismissButtonShown = false;
|
|
1741
1755
|
this.inputAnimate = INPUT_SHOWN_STATE;
|
|
@@ -1748,11 +1762,49 @@ class SkySearchComponent {
|
|
|
1748
1762
|
_SkySearchComponent_mediaQueryService.set(this, void 0);
|
|
1749
1763
|
_SkySearchComponent_searchAdapter.set(this, void 0);
|
|
1750
1764
|
_SkySearchComponent_searchUpdated.set(this, new Subject());
|
|
1765
|
+
_SkySearchComponent_searchUpdatedSub.set(this, void 0);
|
|
1766
|
+
_SkySearchComponent__debounceTime.set(this, 0);
|
|
1767
|
+
_SkySearchComponent__disabled.set(this, false);
|
|
1768
|
+
_SkySearchComponent__expandMode.set(this, EXPAND_MODE_RESPONSIVE);
|
|
1751
1769
|
__classPrivateFieldSet(this, _SkySearchComponent_mediaQueryService, mediaQueryService, "f");
|
|
1752
1770
|
__classPrivateFieldSet(this, _SkySearchComponent_elRef, elRef, "f");
|
|
1753
1771
|
__classPrivateFieldSet(this, _SkySearchComponent_searchAdapter, searchAdapter, "f");
|
|
1754
1772
|
__classPrivateFieldSet(this, _SkySearchComponent_changeRef, changeRef, "f");
|
|
1755
1773
|
}
|
|
1774
|
+
/**
|
|
1775
|
+
* Specifies the expand mode for the search input. The valid options
|
|
1776
|
+
* include `"responsive"` to collapse the search input into a button on
|
|
1777
|
+
* mobile devices, `"none"` to *not* collapse the search input on mobile
|
|
1778
|
+
* devices, and `"fit"` to extend the search input to fit the width of its container.
|
|
1779
|
+
* @default "responsive"
|
|
1780
|
+
*/
|
|
1781
|
+
set expandMode(value) {
|
|
1782
|
+
__classPrivateFieldSet(this, _SkySearchComponent__expandMode, value ?? EXPAND_MODE_RESPONSIVE, "f");
|
|
1783
|
+
}
|
|
1784
|
+
get expandMode() {
|
|
1785
|
+
return __classPrivateFieldGet(this, _SkySearchComponent__expandMode, "f");
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Specifies how many milliseconds to wait before searching after users enter text in the search input.
|
|
1789
|
+
* @default 0
|
|
1790
|
+
*/
|
|
1791
|
+
set debounceTime(value) {
|
|
1792
|
+
__classPrivateFieldSet(this, _SkySearchComponent__debounceTime, value ?? 0, "f");
|
|
1793
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_setupSearchChangedEvent).call(this);
|
|
1794
|
+
}
|
|
1795
|
+
get debounceTime() {
|
|
1796
|
+
return __classPrivateFieldGet(this, _SkySearchComponent__debounceTime, "f");
|
|
1797
|
+
}
|
|
1798
|
+
/**
|
|
1799
|
+
* Indicates whether to disable the filter button.
|
|
1800
|
+
* @default false
|
|
1801
|
+
*/
|
|
1802
|
+
set disabled(value) {
|
|
1803
|
+
__classPrivateFieldSet(this, _SkySearchComponent__disabled, value ?? false, "f");
|
|
1804
|
+
}
|
|
1805
|
+
get disabled() {
|
|
1806
|
+
return __classPrivateFieldGet(this, _SkySearchComponent__disabled, "f");
|
|
1807
|
+
}
|
|
1756
1808
|
ngOnInit() {
|
|
1757
1809
|
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_searchShouldCollapse).call(this)) {
|
|
1758
1810
|
this.breakpointSubscription = __classPrivateFieldGet(this, _SkySearchComponent_mediaQueryService, "f").subscribe((args) => {
|
|
@@ -1760,12 +1812,7 @@ class SkySearchComponent {
|
|
|
1760
1812
|
__classPrivateFieldGet(this, _SkySearchComponent_changeRef, "f").detectChanges();
|
|
1761
1813
|
});
|
|
1762
1814
|
}
|
|
1763
|
-
__classPrivateFieldGet(this,
|
|
1764
|
-
.asObservable()
|
|
1765
|
-
.pipe(debounceTime(this.debounceTime), distinctUntilChanged())
|
|
1766
|
-
.subscribe((value) => {
|
|
1767
|
-
this.searchChange.emit(value);
|
|
1768
|
-
});
|
|
1815
|
+
__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_setupSearchChangedEvent).call(this);
|
|
1769
1816
|
}
|
|
1770
1817
|
ngOnChanges(changes) {
|
|
1771
1818
|
if (__classPrivateFieldGet(this, _SkySearchComponent_instances, "m", _SkySearchComponent_expandModeBindingChanged).call(this, changes)) {
|
|
@@ -1861,9 +1908,10 @@ class SkySearchComponent {
|
|
|
1861
1908
|
this.breakpointSubscription.unsubscribe();
|
|
1862
1909
|
}
|
|
1863
1910
|
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f").complete();
|
|
1911
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdatedSub, "f")?.unsubscribe();
|
|
1864
1912
|
}
|
|
1865
1913
|
}
|
|
1866
|
-
_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) {
|
|
1914
|
+
_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) {
|
|
1867
1915
|
return (changes['searchText'] &&
|
|
1868
1916
|
changes['searchText'].previousValue !== changes['searchText'].currentValue);
|
|
1869
1917
|
}, _SkySearchComponent_expandModeBindingChanged = function _SkySearchComponent_expandModeBindingChanged(changes) {
|
|
@@ -1889,9 +1937,16 @@ _SkySearchComponent_changeRef = new WeakMap(), _SkySearchComponent_elRef = new W
|
|
|
1889
1937
|
}, _SkySearchComponent_searchShouldCollapse = function _SkySearchComponent_searchShouldCollapse() {
|
|
1890
1938
|
return ((this.isCollapsible || this.isCollapsible === undefined) &&
|
|
1891
1939
|
this.isFullWidth !== true);
|
|
1940
|
+
}, _SkySearchComponent_setupSearchChangedEvent = function _SkySearchComponent_setupSearchChangedEvent() {
|
|
1941
|
+
__classPrivateFieldGet(this, _SkySearchComponent_searchUpdatedSub, "f")?.unsubscribe();
|
|
1942
|
+
__classPrivateFieldSet(this, _SkySearchComponent_searchUpdatedSub, __classPrivateFieldGet(this, _SkySearchComponent_searchUpdated, "f")
|
|
1943
|
+
.pipe(debounceTime(this.debounceTime), distinctUntilChanged())
|
|
1944
|
+
.subscribe((value) => {
|
|
1945
|
+
this.searchChange.emit(value);
|
|
1946
|
+
}), "f");
|
|
1892
1947
|
};
|
|
1893
1948
|
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 });
|
|
1894
|
-
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: [
|
|
1949
|
+
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: [
|
|
1895
1950
|
trigger('inputState', [
|
|
1896
1951
|
state(INPUT_HIDDEN_STATE, style({
|
|
1897
1952
|
opacity: 0,
|
|
@@ -1918,7 +1973,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1918
1973
|
})),
|
|
1919
1974
|
transition('* <=> *', animate('150ms')),
|
|
1920
1975
|
]),
|
|
1921
|
-
], 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{
|
|
1976
|
+
], 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"] }]
|
|
1922
1977
|
}], ctorParameters: function () { return [{ type: i1.SkyMediaQueryService }, { type: i0.ElementRef }, { type: SkySearchAdapterService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { searchApply: [{
|
|
1923
1978
|
type: Output
|
|
1924
1979
|
}], searchChange: [{
|
|
@@ -1990,6 +2045,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1990
2045
|
* Context for the show more native picker. These values are provided by the lookup component.
|
|
1991
2046
|
*/
|
|
1992
2047
|
class SkyLookupShowMoreNativePickerAsyncContext {
|
|
2048
|
+
constructor(descriptorProperty, idProperty, initialSearch, initialValue, searchAsync, selectMode, showAddButton, userConfig) {
|
|
2049
|
+
this.descriptorProperty = descriptorProperty;
|
|
2050
|
+
this.idProperty = idProperty;
|
|
2051
|
+
this.initialSearch = initialSearch;
|
|
2052
|
+
this.initialValue = initialValue;
|
|
2053
|
+
this.searchAsync = searchAsync;
|
|
2054
|
+
this.selectMode = selectMode;
|
|
2055
|
+
this.showAddButton = showAddButton;
|
|
2056
|
+
this.userConfig = userConfig;
|
|
2057
|
+
}
|
|
1993
2058
|
}
|
|
1994
2059
|
|
|
1995
2060
|
var _SkyLookupShowMoreAsyncModalComponent_instances, _SkyLookupShowMoreAsyncModalComponent_changeDetector, _SkyLookupShowMoreAsyncModalComponent_continuationData, _SkyLookupShowMoreAsyncModalComponent_currentSearchSub, _SkyLookupShowMoreAsyncModalComponent_ngUnsubscribe, _SkyLookupShowMoreAsyncModalComponent_logSvc, _SkyLookupShowMoreAsyncModalComponent_offset, _SkyLookupShowMoreAsyncModalComponent_loadSearchResults, _SkyLookupShowMoreAsyncModalComponent_createInitialSelectedItemsMap, _SkyLookupShowMoreAsyncModalComponent_performSearch, _SkyLookupShowMoreAsyncModalComponent_cancelCurrentSearch;
|
|
@@ -2172,6 +2237,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2172
2237
|
* Context for the show more native picker. These values are provided by the lookup component.
|
|
2173
2238
|
*/
|
|
2174
2239
|
class SkyLookupShowMoreNativePickerContext {
|
|
2240
|
+
constructor(descriptorProperty, initialSearch, initialValue, items, search, selectMode, showAddButton, userConfig) {
|
|
2241
|
+
this.descriptorProperty = descriptorProperty;
|
|
2242
|
+
this.initialSearch = initialSearch;
|
|
2243
|
+
this.initialValue = initialValue;
|
|
2244
|
+
this.items = items;
|
|
2245
|
+
this.search = search;
|
|
2246
|
+
this.selectMode = selectMode;
|
|
2247
|
+
this.showAddButton = showAddButton;
|
|
2248
|
+
this.userConfig = userConfig;
|
|
2249
|
+
}
|
|
2175
2250
|
}
|
|
2176
2251
|
|
|
2177
2252
|
var _SkyLookupShowMoreModalComponent_changeDetector, _SkyLookupShowMoreModalComponent_itemIndex, _SkyLookupShowMoreModalComponent_ngUnsubscribe;
|
|
@@ -2378,7 +2453,7 @@ class SkyLookupShowMoreModalComponent {
|
|
|
2378
2453
|
updateDataState() {
|
|
2379
2454
|
const items = this.items;
|
|
2380
2455
|
const selectedItems = this.selectedItems;
|
|
2381
|
-
items
|
|
2456
|
+
items?.forEach((item, index) => {
|
|
2382
2457
|
item.selected =
|
|
2383
2458
|
selectedItems.findIndex((selectedItem) => selectedItem.index === index) !== -1;
|
|
2384
2459
|
});
|
|
@@ -2438,20 +2513,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2438
2513
|
type: Injectable
|
|
2439
2514
|
}] });
|
|
2440
2515
|
|
|
2441
|
-
var _SkyLookupAutocompleteAdapter__descriptorProperty, _SkyLookupAutocompleteAdapter__propertiesToSearch, _SkyLookupAutocompleteAdapter__search;
|
|
2516
|
+
var _SkyLookupAutocompleteAdapter_instances, _SkyLookupAutocompleteAdapter__descriptorProperty, _SkyLookupAutocompleteAdapter__propertiesToSearch, _SkyLookupAutocompleteAdapter__search, _SkyLookupAutocompleteAdapter__searchFilters, _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions;
|
|
2442
2517
|
/**
|
|
2443
2518
|
* @internal
|
|
2444
2519
|
*/
|
|
2445
2520
|
class SkyLookupAutocompleteAdapter {
|
|
2446
2521
|
constructor() {
|
|
2522
|
+
_SkyLookupAutocompleteAdapter_instances.add(this);
|
|
2447
2523
|
/**
|
|
2448
2524
|
* Fires when users enter new search information and allows results to be
|
|
2449
2525
|
* returned via an observable.
|
|
2450
2526
|
*/
|
|
2451
2527
|
this.searchAsync = new EventEmitter();
|
|
2452
|
-
|
|
2453
|
-
|
|
2528
|
+
this.searchOrDefault = skyAutocompleteDefaultSearchFunction({
|
|
2529
|
+
propertiesToSearch: ['name'],
|
|
2530
|
+
searchFilters: undefined,
|
|
2531
|
+
});
|
|
2532
|
+
_SkyLookupAutocompleteAdapter__descriptorProperty.set(this, 'name');
|
|
2533
|
+
_SkyLookupAutocompleteAdapter__propertiesToSearch.set(this, ['name']);
|
|
2454
2534
|
_SkyLookupAutocompleteAdapter__search.set(this, void 0);
|
|
2535
|
+
_SkyLookupAutocompleteAdapter__searchFilters.set(this, void 0);
|
|
2455
2536
|
}
|
|
2456
2537
|
/**
|
|
2457
2538
|
* Specifies an object property to display in the text input after users
|
|
@@ -2459,20 +2540,21 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2459
2540
|
* @default "name"
|
|
2460
2541
|
*/
|
|
2461
2542
|
set descriptorProperty(value) {
|
|
2462
|
-
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, value, "f");
|
|
2543
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, value || 'name', "f");
|
|
2463
2544
|
}
|
|
2464
2545
|
get descriptorProperty() {
|
|
2465
|
-
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, "f")
|
|
2546
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__descriptorProperty, "f");
|
|
2466
2547
|
}
|
|
2467
2548
|
/**
|
|
2468
2549
|
* Specifies an array of object properties to search.
|
|
2469
2550
|
* @default ["name"]
|
|
2470
2551
|
*/
|
|
2471
2552
|
set propertiesToSearch(value) {
|
|
2472
|
-
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, value, "f");
|
|
2553
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, value ?? ['name'], "f");
|
|
2554
|
+
__classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter_instances, "m", _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions).call(this);
|
|
2473
2555
|
}
|
|
2474
2556
|
get propertiesToSearch() {
|
|
2475
|
-
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, "f")
|
|
2557
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__propertiesToSearch, "f");
|
|
2476
2558
|
}
|
|
2477
2559
|
/**
|
|
2478
2560
|
* Specifies a function to dynamically manage the data source when users
|
|
@@ -2484,16 +2566,40 @@ class SkyLookupAutocompleteAdapter {
|
|
|
2484
2566
|
*/
|
|
2485
2567
|
set search(value) {
|
|
2486
2568
|
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__search, value, "f");
|
|
2569
|
+
this.searchOrDefault =
|
|
2570
|
+
value ||
|
|
2571
|
+
skyAutocompleteDefaultSearchFunction({
|
|
2572
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
2573
|
+
searchFilters: this.searchFilters,
|
|
2574
|
+
});
|
|
2487
2575
|
}
|
|
2488
2576
|
get search() {
|
|
2489
|
-
return
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2577
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__search, "f");
|
|
2578
|
+
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Specifies an array of functions to call against each search result in order
|
|
2581
|
+
* to filter the search results when using the default search function. When
|
|
2582
|
+
* using a custom search function via the `search` property filters must be
|
|
2583
|
+
* applied manually inside that function. The function must return `true` or
|
|
2584
|
+
* `false` for each result to indicate whether to display it in the dropdown list.
|
|
2585
|
+
*/
|
|
2586
|
+
set searchFilters(value) {
|
|
2587
|
+
__classPrivateFieldSet(this, _SkyLookupAutocompleteAdapter__searchFilters, value, "f");
|
|
2588
|
+
__classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter_instances, "m", _SkyLookupAutocompleteAdapter_updateDefaultSearchOptions).call(this);
|
|
2589
|
+
}
|
|
2590
|
+
get searchFilters() {
|
|
2591
|
+
return __classPrivateFieldGet(this, _SkyLookupAutocompleteAdapter__searchFilters, "f");
|
|
2494
2592
|
}
|
|
2495
2593
|
}
|
|
2496
|
-
_SkyLookupAutocompleteAdapter__descriptorProperty = new WeakMap(), _SkyLookupAutocompleteAdapter__propertiesToSearch = new WeakMap(), _SkyLookupAutocompleteAdapter__search = new WeakMap()
|
|
2594
|
+
_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() {
|
|
2595
|
+
// Reset default search if it is what is being used.
|
|
2596
|
+
if (this.search !== this.searchOrDefault) {
|
|
2597
|
+
this.searchOrDefault = skyAutocompleteDefaultSearchFunction({
|
|
2598
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
2599
|
+
searchFilters: this.searchFilters,
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
};
|
|
2497
2603
|
SkyLookupAutocompleteAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyLookupAutocompleteAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2498
2604
|
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 });
|
|
2499
2605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyLookupAutocompleteAdapter, decorators: [{
|
|
@@ -2518,25 +2624,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2518
2624
|
type: Output
|
|
2519
2625
|
}] } });
|
|
2520
2626
|
|
|
2521
|
-
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;
|
|
2627
|
+
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;
|
|
2522
2628
|
class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
2523
2629
|
constructor(changeDetector, elementRef, windowRef, adapter, modalService, resourcesService, ngControl, inputBoxHostSvc, themeSvc) {
|
|
2524
2630
|
super();
|
|
2525
2631
|
this.inputBoxHostSvc = inputBoxHostSvc;
|
|
2526
2632
|
this.themeSvc = themeSvc;
|
|
2527
2633
|
_SkyLookupComponent_instances.add(this);
|
|
2528
|
-
/**
|
|
2529
|
-
* Indicates whether to disable the lookup field.
|
|
2530
|
-
*/
|
|
2531
|
-
this.disabled = false;
|
|
2532
|
-
/**
|
|
2533
|
-
* Indicates whether to enable users to open a picker where they can view all options.
|
|
2534
|
-
*/
|
|
2535
|
-
this.enableShowMore = false;
|
|
2536
|
-
/**
|
|
2537
|
-
* Indicates whether to display a button that lets users add options to the list.
|
|
2538
|
-
*/
|
|
2539
|
-
this.showAddButton = false;
|
|
2540
2634
|
/**
|
|
2541
2635
|
* Fires when users select the button to add options to the list.
|
|
2542
2636
|
*/
|
|
@@ -2556,7 +2650,10 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2556
2650
|
_SkyLookupComponent_windowRef.set(this, void 0);
|
|
2557
2651
|
_SkyLookupComponent__autocompleteInputDirective.set(this, void 0);
|
|
2558
2652
|
_SkyLookupComponent__data.set(this, void 0);
|
|
2653
|
+
_SkyLookupComponent__disabled.set(this, false);
|
|
2654
|
+
_SkyLookupComponent__enableShowMore.set(this, false);
|
|
2559
2655
|
_SkyLookupComponent__selectMode.set(this, void 0);
|
|
2656
|
+
_SkyLookupComponent__showAddButton.set(this, false);
|
|
2560
2657
|
_SkyLookupComponent__tokens.set(this, void 0);
|
|
2561
2658
|
_SkyLookupComponent__value.set(this, void 0);
|
|
2562
2659
|
// Angular automatically constructs these methods.
|
|
@@ -2589,6 +2686,36 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2589
2686
|
get data() {
|
|
2590
2687
|
return __classPrivateFieldGet(this, _SkyLookupComponent__data, "f") || [];
|
|
2591
2688
|
}
|
|
2689
|
+
/**
|
|
2690
|
+
* Indicates whether to disable the lookup field.
|
|
2691
|
+
* @default false
|
|
2692
|
+
*/
|
|
2693
|
+
set disabled(value) {
|
|
2694
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__disabled, value ?? false, "f");
|
|
2695
|
+
}
|
|
2696
|
+
get disabled() {
|
|
2697
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__disabled, "f");
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* Indicates whether to enable users to open a picker where they can view all options.
|
|
2701
|
+
* @default false
|
|
2702
|
+
*/
|
|
2703
|
+
set enableShowMore(value) {
|
|
2704
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__enableShowMore, value ?? false, "f");
|
|
2705
|
+
}
|
|
2706
|
+
get enableShowMore() {
|
|
2707
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__enableShowMore, "f");
|
|
2708
|
+
}
|
|
2709
|
+
/**
|
|
2710
|
+
* Indicates whether to display a button that lets users add options to the list.
|
|
2711
|
+
* @default false
|
|
2712
|
+
*/
|
|
2713
|
+
set showAddButton(value) {
|
|
2714
|
+
__classPrivateFieldSet(this, _SkyLookupComponent__showAddButton, value ?? false, "f");
|
|
2715
|
+
}
|
|
2716
|
+
get showAddButton() {
|
|
2717
|
+
return __classPrivateFieldGet(this, _SkyLookupComponent__showAddButton, "f");
|
|
2718
|
+
}
|
|
2592
2719
|
/**
|
|
2593
2720
|
* Specifies whether users can select one option or multiple options.
|
|
2594
2721
|
* @default "multiple"
|
|
@@ -2652,7 +2779,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2652
2779
|
return __classPrivateFieldGet(this, _SkyLookupComponent__autocompleteInputDirective, "f");
|
|
2653
2780
|
}
|
|
2654
2781
|
ngOnInit() {
|
|
2655
|
-
if (this.inputBoxHostSvc) {
|
|
2782
|
+
if (this.inputBoxHostSvc && this.inputTemplateRef) {
|
|
2656
2783
|
this.inputBoxHostSvc.populate({
|
|
2657
2784
|
inputTemplate: this.inputTemplateRef,
|
|
2658
2785
|
buttonsTemplate: this.enableShowMore
|
|
@@ -2766,8 +2893,10 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2766
2893
|
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2767
2894
|
}
|
|
2768
2895
|
clearSearchText() {
|
|
2769
|
-
this.autocompleteInputDirective
|
|
2770
|
-
|
|
2896
|
+
if (this.autocompleteInputDirective) {
|
|
2897
|
+
this.autocompleteInputDirective.value = undefined;
|
|
2898
|
+
this.autocompleteInputDirective.inputTextValue = '';
|
|
2899
|
+
}
|
|
2771
2900
|
}
|
|
2772
2901
|
// Handles when to focus on the tokens.
|
|
2773
2902
|
// Check for empty search text on keydown, before the escape key is fully pressed.
|
|
@@ -2829,12 +2958,16 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2829
2958
|
let isValueInTextBox = false;
|
|
2830
2959
|
if (this.selectMode === 'single') {
|
|
2831
2960
|
isValueInTextBox =
|
|
2832
|
-
this.autocompleteInputDirective
|
|
2961
|
+
this.autocompleteInputDirective?.value &&
|
|
2833
2962
|
this.autocompleteInputDirective.inputTextValue ===
|
|
2834
2963
|
this.autocompleteInputDirective.value[this.descriptorProperty];
|
|
2835
2964
|
}
|
|
2836
|
-
|
|
2837
|
-
this.autocompleteInputDirective
|
|
2965
|
+
let searchValue = '';
|
|
2966
|
+
if (!isValueInTextBox && this.autocompleteInputDirective) {
|
|
2967
|
+
searchValue = this.autocompleteInputDirective.inputTextValue;
|
|
2968
|
+
}
|
|
2969
|
+
this.openPicker(searchValue);
|
|
2970
|
+
this.autocompleteInputDirective?.restoreInputTextValueToPreviousState();
|
|
2838
2971
|
}
|
|
2839
2972
|
onShowMoreClick(event) {
|
|
2840
2973
|
/* Sanity check */
|
|
@@ -2891,7 +3024,7 @@ class SkyLookupComponent extends SkyLookupAutocompleteAdapter {
|
|
|
2891
3024
|
this.searchAsync.emit(args);
|
|
2892
3025
|
}
|
|
2893
3026
|
}
|
|
2894
|
-
_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) {
|
|
3027
|
+
_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) {
|
|
2895
3028
|
const initialValue = this.value;
|
|
2896
3029
|
const modalConfig = this.showMoreConfig?.nativePickerConfig || {};
|
|
2897
3030
|
if (!modalConfig.itemTemplate) {
|
|
@@ -2903,26 +3036,16 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2903
3036
|
if (this.searchAsync.observers.length > 0) {
|
|
2904
3037
|
contextProviderType = SkyLookupShowMoreNativePickerAsyncContext;
|
|
2905
3038
|
modalComponentType = SkyLookupShowMoreAsyncModalComponent;
|
|
2906
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext()
|
|
2907
|
-
contextProviderValue.idProperty = this.idProperty;
|
|
2908
|
-
contextProviderValue.searchAsync = (args) => {
|
|
3039
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerAsyncContext(this.descriptorProperty, this.idProperty, initialSearch, initialValue, (args) => {
|
|
2909
3040
|
this.searchAsync.emit(args);
|
|
2910
3041
|
return args.result;
|
|
2911
|
-
};
|
|
3042
|
+
}, this.selectMode, this.showAddButton, modalConfig);
|
|
2912
3043
|
}
|
|
2913
3044
|
else {
|
|
2914
3045
|
contextProviderType = SkyLookupShowMoreNativePickerContext;
|
|
2915
3046
|
modalComponentType = SkyLookupShowMoreModalComponent;
|
|
2916
|
-
contextProviderValue = new SkyLookupShowMoreNativePickerContext();
|
|
2917
|
-
|
|
2918
|
-
contextProviderValue.search = this.search;
|
|
2919
|
-
}
|
|
2920
|
-
contextProviderValue.descriptorProperty = this.descriptorProperty;
|
|
2921
|
-
contextProviderValue.initialSearch = initialSearch;
|
|
2922
|
-
contextProviderValue.initialValue = initialValue;
|
|
2923
|
-
contextProviderValue.selectMode = this.selectMode;
|
|
2924
|
-
contextProviderValue.showAddButton = this.showAddButton;
|
|
2925
|
-
contextProviderValue.userConfig = modalConfig;
|
|
3047
|
+
contextProviderValue = new SkyLookupShowMoreNativePickerContext(this.descriptorProperty, initialSearch, initialValue, this.data, this.searchOrDefault, this.selectMode, this.showAddButton, modalConfig);
|
|
3048
|
+
}
|
|
2926
3049
|
return __classPrivateFieldGet(this, _SkyLookupComponent_modalService, "f").open(modalComponentType, {
|
|
2927
3050
|
providers: [
|
|
2928
3051
|
{
|
|
@@ -2958,7 +3081,7 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2958
3081
|
}, _SkyLookupComponent_focusInputOnHostClick = function _SkyLookupComponent_focusInputOnHostClick() {
|
|
2959
3082
|
let hostElement = !this.inputBoxHostSvc
|
|
2960
3083
|
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2961
|
-
: this.lookupWrapperRef
|
|
3084
|
+
: this.lookupWrapperRef?.nativeElement;
|
|
2962
3085
|
const documentObj = __classPrivateFieldGet(this, _SkyLookupComponent_windowRef, "f").nativeWindow.document;
|
|
2963
3086
|
// Handles focusing the input when the host is clicked.
|
|
2964
3087
|
// The input should NOT be focused if other elements (tokens, etc.)
|
|
@@ -2968,7 +3091,7 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2968
3091
|
.subscribe((event) => {
|
|
2969
3092
|
hostElement = !this.inputBoxHostSvc
|
|
2970
3093
|
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2971
|
-
: this.lookupWrapperRef
|
|
3094
|
+
: this.lookupWrapperRef?.nativeElement;
|
|
2972
3095
|
this.isInputFocused = hostElement.contains(event.target);
|
|
2973
3096
|
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2974
3097
|
});
|
|
@@ -2977,7 +3100,7 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2977
3100
|
.subscribe((event) => {
|
|
2978
3101
|
hostElement = !this.inputBoxHostSvc
|
|
2979
3102
|
? __classPrivateFieldGet(this, _SkyLookupComponent_elementRef, "f").nativeElement
|
|
2980
|
-
: this.lookupWrapperRef
|
|
3103
|
+
: this.lookupWrapperRef?.nativeElement;
|
|
2981
3104
|
this.isInputFocused = hostElement.contains(event.target);
|
|
2982
3105
|
__classPrivateFieldGet(this, _SkyLookupComponent_changeDetector, "f").markForCheck();
|
|
2983
3106
|
});
|
|
@@ -2990,7 +3113,9 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
2990
3113
|
}
|
|
2991
3114
|
});
|
|
2992
3115
|
}, _SkyLookupComponent_focusInput = function _SkyLookupComponent_focusInput() {
|
|
2993
|
-
|
|
3116
|
+
if (this.lookupWrapperRef) {
|
|
3117
|
+
__classPrivateFieldGet(this, _SkyLookupComponent_adapter, "f").focusInput(this.lookupWrapperRef);
|
|
3118
|
+
}
|
|
2994
3119
|
}, _SkyLookupComponent_onAddButtonComplete = function _SkyLookupComponent_onAddButtonComplete(args) {
|
|
2995
3120
|
if (args.data) {
|
|
2996
3121
|
this.data = args.data;
|
|
@@ -3032,10 +3157,10 @@ _SkyLookupComponent_adapter = new WeakMap(), _SkyLookupComponent_elementRef = ne
|
|
|
3032
3157
|
}
|
|
3033
3158
|
};
|
|
3034
3159
|
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 });
|
|
3035
|
-
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 });
|
|
3160
|
+
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 });
|
|
3036
3161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyLookupComponent, decorators: [{
|
|
3037
3162
|
type: Component,
|
|
3038
|
-
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]=\"
|
|
3163
|
+
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"] }]
|
|
3039
3164
|
}], ctorParameters: function () { 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: [{
|
|
3040
3165
|
type: Self
|
|
3041
3166
|
}, {
|