ng-select2-component 8.0.6 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -412,10 +412,8 @@
412
412
  finally { if (e_2) throw e_2.error; }
413
413
  }
414
414
  }
415
- else {
416
- if ((( /** @type {?} */(groupOrOption))).value === value) {
417
- return ( /** @type {?} */(groupOrOption));
418
- }
415
+ else if ((( /** @type {?} */(groupOrOption))).value === value) {
416
+ return ( /** @type {?} */(groupOrOption));
419
417
  }
420
418
  }
421
419
  }
@@ -511,46 +509,13 @@
511
509
  }
512
510
  return null;
513
511
  };
514
- /**
515
- * @private
516
- * @param {?} data
517
- * @return {?}
518
- */
519
- Select2Utils.getOptionsCount = function (data) {
520
- var e_6, _a;
521
- /** @type {?} */
522
- var count = 0;
523
- if (Array.isArray(data)) {
524
- try {
525
- for (var data_3 = __values(data), data_3_1 = data_3.next(); !data_3_1.done; data_3_1 = data_3.next()) {
526
- var groupOrOption = data_3_1.value;
527
- /** @type {?} */
528
- var options = (( /** @type {?} */(groupOrOption))).options;
529
- if (options) {
530
- count += options.length;
531
- }
532
- else {
533
- count++;
534
- }
535
- }
536
- }
537
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
538
- finally {
539
- try {
540
- if (data_3_1 && !data_3_1.done && (_a = data_3.return)) _a.call(data_3);
541
- }
542
- finally { if (e_6) throw e_6.error; }
543
- }
544
- }
545
- return count;
546
- };
547
512
  /**
548
513
  * @param {?} filteredData
549
514
  * @param {?} value
550
515
  * @return {?}
551
516
  */
552
517
  Select2Utils.valueIsNotInFilteredData = function (filteredData, value) {
553
- var e_7, _a, e_8, _b;
518
+ var e_6, _a, e_7, _b;
554
519
  if (Select2Utils.isNullOrUndefined(value)) {
555
520
  return true;
556
521
  }
@@ -561,34 +526,32 @@
561
526
  var options = (( /** @type {?} */(groupOrOption))).options;
562
527
  if (options) {
563
528
  try {
564
- for (var options_3 = (e_8 = void 0, __values(options)), options_3_1 = options_3.next(); !options_3_1.done; options_3_1 = options_3.next()) {
529
+ for (var options_3 = (e_7 = void 0, __values(options)), options_3_1 = options_3.next(); !options_3_1.done; options_3_1 = options_3.next()) {
565
530
  var option = options_3_1.value;
566
531
  if (option.value === value) {
567
532
  return false;
568
533
  }
569
534
  }
570
535
  }
571
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
536
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
572
537
  finally {
573
538
  try {
574
539
  if (options_3_1 && !options_3_1.done && (_b = options_3.return)) _b.call(options_3);
575
540
  }
576
- finally { if (e_8) throw e_8.error; }
541
+ finally { if (e_7) throw e_7.error; }
577
542
  }
578
543
  }
579
- else {
580
- if ((( /** @type {?} */(groupOrOption))).value === value) {
581
- return false;
582
- }
544
+ else if ((( /** @type {?} */(groupOrOption))).value === value) {
545
+ return false;
583
546
  }
584
547
  }
585
548
  }
586
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
549
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
587
550
  finally {
588
551
  try {
589
552
  if (filteredData_1_1 && !filteredData_1_1.done && (_a = filteredData_1.return)) _a.call(filteredData_1);
590
553
  }
591
- finally { if (e_7) throw e_7.error; }
554
+ finally { if (e_6) throw e_6.error; }
592
555
  }
593
556
  return true;
594
557
  };
@@ -610,10 +573,8 @@
610
573
  for (var j = options.length - 1; j >= 0; j--) {
611
574
  /** @type {?} */
612
575
  var option = options[j];
613
- if (findIt) {
614
- if (!option.disabled && !option.hide) {
615
- return option;
616
- }
576
+ if (findIt && !option.disabled && !option.hide) {
577
+ return option;
617
578
  }
618
579
  if (!findIt) {
619
580
  findIt = option.value === hoveringValue;
@@ -623,10 +584,8 @@
623
584
  else {
624
585
  /** @type {?} */
625
586
  var option = ( /** @type {?} */(groupOrOption));
626
- if (findIt) {
627
- if (!option.disabled && !option.hide) {
628
- return option;
629
- }
587
+ if (findIt && !option.disabled && !option.hide) {
588
+ return option;
630
589
  }
631
590
  if (!findIt) {
632
591
  findIt = option.value === hoveringValue;
@@ -642,7 +601,7 @@
642
601
  * @return {?}
643
602
  */
644
603
  Select2Utils.getNextOption = function (filteredData, hoveringValue) {
645
- var e_9, _a, e_10, _b;
604
+ var e_8, _a, e_9, _b;
646
605
  /** @type {?} */
647
606
  var findIt = Select2Utils.isNullOrUndefined(hoveringValue);
648
607
  try {
@@ -652,7 +611,7 @@
652
611
  var options = (( /** @type {?} */(groupOrOption))).options;
653
612
  if (options) {
654
613
  try {
655
- for (var options_4 = (e_10 = void 0, __values(options)), options_4_1 = options_4.next(); !options_4_1.done; options_4_1 = options_4.next()) {
614
+ for (var options_4 = (e_9 = void 0, __values(options)), options_4_1 = options_4.next(); !options_4_1.done; options_4_1 = options_4.next()) {
656
615
  var option = options_4_1.value;
657
616
  if (findIt) {
658
617
  if (!option.disabled && !option.hide) {
@@ -664,12 +623,12 @@
664
623
  }
665
624
  }
666
625
  }
667
- catch (e_10_1) { e_10 = { error: e_10_1 }; }
626
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
668
627
  finally {
669
628
  try {
670
629
  if (options_4_1 && !options_4_1.done && (_b = options_4.return)) _b.call(options_4);
671
630
  }
672
- finally { if (e_10) throw e_10.error; }
631
+ finally { if (e_9) throw e_9.error; }
673
632
  }
674
633
  }
675
634
  else {
@@ -686,77 +645,77 @@
686
645
  }
687
646
  }
688
647
  }
689
- catch (e_9_1) { e_9 = { error: e_9_1 }; }
648
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
690
649
  finally {
691
650
  try {
692
651
  if (filteredData_2_1 && !filteredData_2_1.done && (_a = filteredData_2.return)) _a.call(filteredData_2);
693
652
  }
694
- finally { if (e_9) throw e_9.error; }
653
+ finally { if (e_8) throw e_8.error; }
695
654
  }
696
655
  return null;
697
656
  };
698
657
  /**
699
- * @private
700
- * @param {?} value
701
- * @return {?}
702
- */
703
- Select2Utils.isNullOrUndefined = function (value) {
704
- return value === null || value === undefined;
705
- };
706
- /**
707
- * @private
708
- * @param {?} label
709
- * @param {?} searchText
710
- * @param {?} editPattern
711
- * @return {?}
712
- */
713
- Select2Utils.containSearchText = function (label, searchText, editPattern) {
714
- return searchText
715
- ? Select2Utils.formatSansUnicode(label).match(new RegExp(Select2Utils.formatPattern(searchText, editPattern), 'i')) !== null
716
- : true;
717
- };
718
- /**
719
- * @private
720
- * @param {?} str
721
- * @return {?}
722
- */
723
- Select2Utils.protectPattern = function (str) {
724
- return str.replace(protectRegexp, '\\$&');
725
- };
726
- /**
727
- * @private
728
- * @param {?} str
658
+ * @param {?} data
659
+ * @param {?=} maxResults
729
660
  * @return {?}
730
661
  */
731
- Select2Utils.formatSansUnicode = function (str) {
732
- var e_11, _a;
733
- try {
734
- for (var unicodePatterns_1 = __values(unicodePatterns), unicodePatterns_1_1 = unicodePatterns_1.next(); !unicodePatterns_1_1.done; unicodePatterns_1_1 = unicodePatterns_1.next()) {
735
- var unicodePattern = unicodePatterns_1_1.value;
736
- str = str.replace(unicodePattern.s, unicodePattern.l);
737
- }
738
- }
739
- catch (e_11_1) { e_11 = { error: e_11_1 }; }
740
- finally {
662
+ Select2Utils.getReduceData = function (data, maxResults) {
663
+ var e_10, _a, e_11, _b;
664
+ if (maxResults === void 0) { maxResults = 0; }
665
+ if (maxResults > 0) {
666
+ /** @type {?} */
667
+ var counter = 0;
668
+ /** @type {?} */
669
+ var result = [];
741
670
  try {
742
- if (unicodePatterns_1_1 && !unicodePatterns_1_1.done && (_a = unicodePatterns_1.return)) _a.call(unicodePatterns_1);
671
+ // debugger;
672
+ for (var data_3 = __values(data), data_3_1 = data_3.next(); !data_3_1.done; data_3_1 = data_3.next()) {
673
+ var groupOrOption = data_3_1.value;
674
+ /** @type {?} */
675
+ var options = (( /** @type {?} */(groupOrOption))).options;
676
+ if (options) {
677
+ /** @type {?} */
678
+ var group = Object.assign(Object.assign({}, groupOrOption), { options: [] });
679
+ result.push(group);
680
+ try {
681
+ for (var options_5 = (e_11 = void 0, __values(options)), options_5_1 = options_5.next(); !options_5_1.done; options_5_1 = options_5.next()) {
682
+ var item = options_5_1.value;
683
+ group.options.push(item);
684
+ counter++;
685
+ if (counter === maxResults) {
686
+ return { result: result, reduce: true };
687
+ }
688
+ }
689
+ }
690
+ catch (e_11_1) { e_11 = { error: e_11_1 }; }
691
+ finally {
692
+ try {
693
+ if (options_5_1 && !options_5_1.done && (_b = options_5.return)) _b.call(options_5);
694
+ }
695
+ finally { if (e_11) throw e_11.error; }
696
+ }
697
+ }
698
+ else {
699
+ result.push(groupOrOption);
700
+ counter++;
701
+ }
702
+ if (counter === maxResults) {
703
+ return { result: result, reduce: true };
704
+ }
705
+ }
706
+ }
707
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
708
+ finally {
709
+ try {
710
+ if (data_3_1 && !data_3_1.done && (_a = data_3.return)) _a.call(data_3);
711
+ }
712
+ finally { if (e_10) throw e_10.error; }
743
713
  }
744
- finally { if (e_11) throw e_11.error; }
714
+ return { result: result, reduce: false };
745
715
  }
746
- return str;
747
- };
748
- /**
749
- * @private
750
- * @param {?} str
751
- * @param {?} editPattern
752
- * @return {?}
753
- */
754
- Select2Utils.formatPattern = function (str, editPattern) {
755
- str = Select2Utils.formatSansUnicode(Select2Utils.protectPattern(str));
756
- if (editPattern && typeof editPattern === 'function') {
757
- str = editPattern(str);
716
+ else {
717
+ return { result: data, reduce: false };
758
718
  }
759
- return str;
760
719
  };
761
720
  /**
762
721
  * @param {?} data
@@ -790,10 +749,7 @@
790
749
  * @param {?} group
791
750
  * @return {?}
792
751
  */ group) { return Select2Utils.containSearchText(group.label, searchText, editPattern); }));
793
- result.push({
794
- label: groupOrOption.label,
795
- options: filteredOptions,
796
- });
752
+ result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
797
753
  }
798
754
  }
799
755
  else if (Select2Utils.containSearchText(groupOrOption.label, searchText, editPattern)) {
@@ -838,10 +794,7 @@
838
794
  * @return {?}
839
795
  */ group) { return Select2Utils.isSelected(selectedOptions, group, true) === 'false'; }));
840
796
  if (filteredOptions.length) {
841
- result.push({
842
- label: groupOrOption.label,
843
- options: filteredOptions,
844
- });
797
+ result.push(Object.assign(Object.assign({}, groupOrOption), { options: filteredOptions }));
845
798
  }
846
799
  }
847
800
  else if (Select2Utils.isSelected(selectedOptions, ( /** @type {?} */(groupOrOption)), true) === 'false') {
@@ -908,6 +861,102 @@
908
861
  }
909
862
  }
910
863
  };
864
+ /**
865
+ * @private
866
+ * @param {?} data
867
+ * @return {?}
868
+ */
869
+ Select2Utils.getOptionsCount = function (data) {
870
+ var e_14, _a;
871
+ /** @type {?} */
872
+ var count = 0;
873
+ if (Array.isArray(data)) {
874
+ try {
875
+ for (var data_6 = __values(data), data_6_1 = data_6.next(); !data_6_1.done; data_6_1 = data_6.next()) {
876
+ var groupOrOption = data_6_1.value;
877
+ /** @type {?} */
878
+ var options = (( /** @type {?} */(groupOrOption))).options;
879
+ if (options) {
880
+ count += options.length;
881
+ }
882
+ else {
883
+ count++;
884
+ }
885
+ }
886
+ }
887
+ catch (e_14_1) { e_14 = { error: e_14_1 }; }
888
+ finally {
889
+ try {
890
+ if (data_6_1 && !data_6_1.done && (_a = data_6.return)) _a.call(data_6);
891
+ }
892
+ finally { if (e_14) throw e_14.error; }
893
+ }
894
+ }
895
+ return count;
896
+ };
897
+ /**
898
+ * @private
899
+ * @param {?} value
900
+ * @return {?}
901
+ */
902
+ Select2Utils.isNullOrUndefined = function (value) {
903
+ return value === null || value === undefined;
904
+ };
905
+ /**
906
+ * @private
907
+ * @param {?} label
908
+ * @param {?} searchText
909
+ * @param {?} editPattern
910
+ * @return {?}
911
+ */
912
+ Select2Utils.containSearchText = function (label, searchText, editPattern) {
913
+ return searchText
914
+ ? Select2Utils.formatSansUnicode(label).match(new RegExp(Select2Utils.formatPattern(searchText, editPattern), 'i')) !== null
915
+ : true;
916
+ };
917
+ /**
918
+ * @private
919
+ * @param {?} str
920
+ * @return {?}
921
+ */
922
+ Select2Utils.protectPattern = function (str) {
923
+ return str.replace(protectRegexp, '\\$&');
924
+ };
925
+ /**
926
+ * @private
927
+ * @param {?} str
928
+ * @return {?}
929
+ */
930
+ Select2Utils.formatSansUnicode = function (str) {
931
+ var e_15, _a;
932
+ try {
933
+ for (var unicodePatterns_1 = __values(unicodePatterns), unicodePatterns_1_1 = unicodePatterns_1.next(); !unicodePatterns_1_1.done; unicodePatterns_1_1 = unicodePatterns_1.next()) {
934
+ var unicodePattern = unicodePatterns_1_1.value;
935
+ str = str.replace(unicodePattern.s, unicodePattern.l);
936
+ }
937
+ }
938
+ catch (e_15_1) { e_15 = { error: e_15_1 }; }
939
+ finally {
940
+ try {
941
+ if (unicodePatterns_1_1 && !unicodePatterns_1_1.done && (_a = unicodePatterns_1.return)) _a.call(unicodePatterns_1);
942
+ }
943
+ finally { if (e_15) throw e_15.error; }
944
+ }
945
+ return str;
946
+ };
947
+ /**
948
+ * @private
949
+ * @param {?} str
950
+ * @param {?} editPattern
951
+ * @return {?}
952
+ */
953
+ Select2Utils.formatPattern = function (str, editPattern) {
954
+ str = Select2Utils.formatSansUnicode(Select2Utils.protectPattern(str));
955
+ if (editPattern && typeof editPattern === 'function') {
956
+ str = editPattern(str);
957
+ }
958
+ return str;
959
+ };
911
960
  return Select2Utils;
912
961
  }());
913
962
 
@@ -937,6 +986,14 @@
937
986
  * use the material style
938
987
  */
939
988
  this.styleMode = 'default';
989
+ /**
990
+ * maximum results limit (0 = no limit)
991
+ */
992
+ this.maxResults = 0;
993
+ /**
994
+ * message when maximum results
995
+ */
996
+ this.maxResultsMessage = 'Too many results…';
940
997
  /**
941
998
  * infinite scroll distance
942
999
  */
@@ -1638,6 +1695,15 @@
1638
1695
  if (!_this.customSearchEnabled && _this.searchText && _this.searchText.length >= +_this.minCharForSearch) {
1639
1696
  result = Select2Utils.getFilteredData(result, _this.searchText, _this.editPattern);
1640
1697
  }
1698
+ if (_this.maxResults > 0) {
1699
+ /** @type {?} */
1700
+ var data = Select2Utils.getReduceData(result, +_this.maxResults);
1701
+ result = data.result;
1702
+ _this.maxResultsExceeded = data.reduce;
1703
+ }
1704
+ else {
1705
+ _this.maxResultsExceeded = false;
1706
+ }
1641
1707
  if (Select2Utils.valueIsNotInFilteredData(result, _this.hoveringValue)) {
1642
1708
  _this.hoveringValue = Select2Utils.getFirstAvailableOption(result);
1643
1709
  }
@@ -1747,10 +1813,9 @@
1747
1813
  * @return {?}
1748
1814
  */
1749
1815
  Select2.prototype.focusin = function () {
1750
- if (this.disabled) {
1751
- return;
1816
+ if (!this.disabled) {
1817
+ this._focus(true);
1752
1818
  }
1753
- this._focus(true);
1754
1819
  };
1755
1820
  /**
1756
1821
  * @return {?}
@@ -1761,57 +1826,6 @@
1761
1826
  this._onTouched();
1762
1827
  }
1763
1828
  };
1764
- /**
1765
- * @private
1766
- * @return {?}
1767
- */
1768
- Select2.prototype.moveUp = function () {
1769
- this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData, this.hoveringValue));
1770
- };
1771
- /**
1772
- * @private
1773
- * @return {?}
1774
- */
1775
- Select2.prototype.moveDown = function () {
1776
- this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData, this.hoveringValue));
1777
- };
1778
- /**
1779
- * @private
1780
- * @param {?} option
1781
- * @return {?}
1782
- */
1783
- Select2.prototype.updateScrollFromOption = function (option) {
1784
- if (option) {
1785
- this.hoveringValue = option.value;
1786
- /** @type {?} */
1787
- var domElement = this.results.find(( /**
1788
- * @param {?} r
1789
- * @return {?}
1790
- */function (/**
1791
- * @param {?} r
1792
- * @return {?}
1793
- */ r) { return r.nativeElement.innerText.trim() === option.label; }));
1794
- if (domElement && this.resultsElement) {
1795
- this.resultsElement.scrollTop = 0;
1796
- /** @type {?} */
1797
- var listClientRect = this.resultsElement.getBoundingClientRect();
1798
- /** @type {?} */
1799
- var optionClientRect = domElement.nativeElement.getBoundingClientRect();
1800
- this.resultsElement.scrollTop = optionClientRect.top - listClientRect.top;
1801
- }
1802
- }
1803
- };
1804
- /**
1805
- * @private
1806
- * @return {?}
1807
- */
1808
- Select2.prototype.selectByEnter = function () {
1809
- if (this.hoveringValue) {
1810
- /** @type {?} */
1811
- var option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
1812
- this.select(option);
1813
- }
1814
- };
1815
1829
  /**
1816
1830
  * @param {?} option
1817
1831
  * @return {?}
@@ -2044,6 +2058,57 @@
2044
2058
  (this._parentForm && this._parentForm.submitted);
2045
2059
  return !!(isInvalid && (isTouched || isSubmitted));
2046
2060
  };
2061
+ /**
2062
+ * @private
2063
+ * @return {?}
2064
+ */
2065
+ Select2.prototype.moveUp = function () {
2066
+ this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData, this.hoveringValue));
2067
+ };
2068
+ /**
2069
+ * @private
2070
+ * @return {?}
2071
+ */
2072
+ Select2.prototype.moveDown = function () {
2073
+ this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData, this.hoveringValue));
2074
+ };
2075
+ /**
2076
+ * @private
2077
+ * @param {?} option
2078
+ * @return {?}
2079
+ */
2080
+ Select2.prototype.updateScrollFromOption = function (option) {
2081
+ if (option) {
2082
+ this.hoveringValue = option.value;
2083
+ /** @type {?} */
2084
+ var domElement = this.results.find(( /**
2085
+ * @param {?} r
2086
+ * @return {?}
2087
+ */function (/**
2088
+ * @param {?} r
2089
+ * @return {?}
2090
+ */ r) { return r.nativeElement.innerText.trim() === option.label; }));
2091
+ if (domElement && this.resultsElement) {
2092
+ this.resultsElement.scrollTop = 0;
2093
+ /** @type {?} */
2094
+ var listClientRect = this.resultsElement.getBoundingClientRect();
2095
+ /** @type {?} */
2096
+ var optionClientRect = domElement.nativeElement.getBoundingClientRect();
2097
+ this.resultsElement.scrollTop = optionClientRect.top - listClientRect.top;
2098
+ }
2099
+ }
2100
+ };
2101
+ /**
2102
+ * @private
2103
+ * @return {?}
2104
+ */
2105
+ Select2.prototype.selectByEnter = function () {
2106
+ if (this.hoveringValue) {
2107
+ /** @type {?} */
2108
+ var option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
2109
+ this.select(option);
2110
+ }
2111
+ };
2047
2112
  /**
2048
2113
  * @private
2049
2114
  * @param {?} event
@@ -2196,8 +2261,8 @@
2196
2261
  Select2.decorators = [
2197
2262
  { type: core.Component, args: [{
2198
2263
  selector: 'select2',
2199
- template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default select2-container--focus\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [attr.tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\">&nbsp;</span>\n <span *ngIf=\"select2Option\" [innerHTML]=\"select2Option.label\"></span>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"!multiple && resettable && select2Option && !(disabled || readonly)\"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li *ngFor=\"let op of option; trackBy: trackBy\" class=\"select2-selection__choice\" [title]=\"op.label\">\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span [innerHTML]=\"op.label\"></span>\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n",
2200
- styles: [".select2-label{color:#000;color:var(--select2-label-text-color,#000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{opacity:0;position:absolute;width:0}.select2-container .select2-selection--single{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;flex:1 1 auto;overflow:hidden;padding:0 0 0 8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{border:none;box-sizing:border-box;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:#fff;background:var(--select2-dropdown-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-dropdown-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);box-sizing:border-box;display:block;height:0;overflow:hidden;position:absolute;width:100%;z-index:1051}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:#000;color:var(--select2-option-text-color,#000);padding:6px;user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{opacity:1;width:100%}.select2-container--open .select2-dropdown{height:auto;overflow:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{background:#fff;border:0;display:block;filter:alpha(opacity=0);height:auto;left:0;margin:0;min-height:100%;min-width:100%;opacity:0;padding:0;position:fixed;top:0;width:auto;z-index:99}.select2-required:before{color:red;color:var(--select2-required-color,red);content:\"*\"}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:#fff;background:var(--select2-selection-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;color:var(--select2-selection-text-color,#444);line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;color:var(--select2-placeholder-color,#999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow,ellipsis);white-space:nowrap}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__arrow,.select2-container--default .select2-selection--single .select2-selection__reset{align-items:center;display:flex;justify-content:center;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow:before{border-bottom:0 solid var(--select2-arrow-color,#888);border-color:#888 transparent;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid var(--select2-arrow-color,#888);content:\" \";height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:#999;color:var(--select2-reset-color,#999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:#eee;background:var(--select2-selection-disabled-background,#eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-bottom-color:var(--select2-arrow-color,#888);border-color:transparent transparent #888;border-right-color:transparent;border-top-color:transparent;border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:#fff;background:var(--select2-selection-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;flex:1 1 auto;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;color:var(--select2-placeholder-color,#999);display:block;float:left;margin-top:5px;overflow:hidden;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow,ellipsis);white-space:nowrap;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px;margin-top:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background:#e4e4e4;background:var(--select2-selection-choice-background,#e4e4e4);border:1px solid #aaa;border:1px solid var(--select2-selection-choice-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);color:#000;color:var(--select2-selection-choice-text-color,#000);cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;color:var(--select2-selection-choice-close-color,#999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333;color:var(--select2-selection-choice-hover-close-color,#333)}.select2-container--default.select2-container--focused .select2-selection--multiple,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single{border:1px solid #000;border:1px solid var(--select2-selection-focus-border-color,#000);outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:#eee;background:var(--select2-selection-disabled-background,#eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{background:#fff;background:1px solid var(--select2-search-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-search-border-color,#aaa);border-radius:0;border-radius:var(--select2-search-border-radius,0)}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;background:transparent;border:none;box-shadow:none;outline:none}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{background:transparent;background:var(--select2-option-disabled-background,transparent);color:#999;color:var(--select2-option-disabled-text-color,#999)}.select2-container--default .select2-results__option[aria-selected=true]{background:#ddd;background:var(--select2-option-selected-background,#ddd);color:#000;color:var(--select2-option-selected-text-color,#000)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:#5897fb;background:var(--select2-option-highlighted-background,#5897fb);color:#fff;color:var(--select2-option-highlighted-text-color,#fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{background:transparent;background:var(--select2-option-group-background,transparent);color:grey;color:var(--select2-option-group-text-color,grey);cursor:default;display:block;padding:6px}.select2-no-result{color:#888;color:var(--select2-no-result-color,#888);font-style:italic;font-style:var(--select2-font-style-color,italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-selection--multiple,:host.nostyle .select2-selection--single{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{align-items:baseline;border-top:.84375em solid transparent;display:inline-flex;height:auto;padding:.4375em 0;width:100%}:host.material .select2-container--default .select2-selection--multiple,:host.material .select2-container--default .select2-selection--single{border:0;border-radius:0;box-sizing:border-box;height:24px;width:100%}:host.material .select2-container--default .select2-selection--multiple:before,:host.material .select2-container--default .select2-selection--single:before{background:#ddd;background:var(--select2-material-underline,#ddd);bottom:1.65em;content:\" \";display:block;height:1px;position:absolute;width:100%}:host.material .select2-container--default .select2-selection--multiple:after,:host.material .select2-container--default .select2-selection--single:after{background:#5a419e;background:var(--select2-material-underline-active,#5a419e);bottom:1.63em;content:\" \";display:block;height:2px;left:50%;position:absolute;transition:none;width:0}:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered,:host.material .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:inherit;padding-left:1px}:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder{color:rgba(0,0,0,.38);color:var(--select2-material-placeholder-color,rgba(0,0,0,.38));display:block;left:0;position:absolute;top:20px;transform-origin:0 21px;transition:transform .3s}:host.material .select2-container--default .select2-container--open{bottom:1.6em;left:0}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after{left:0;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}:host.material .select2-container--default .select2-dropdown{border:0;border-radius:0;box-shadow:0 5px 5px rgba(0,0,0,.5)}:host.material .select2-container--default .select2-results__option--highlighted[aria-selected],:host.material .select2-container--default .select2-results__option[aria-selected=true]{background:rgba(0,0,0,.04);background:var(--select2-material-option-selected-background,rgba(0,0,0,.04));color:#000;color:var(--select2-material-option-highlighted-text-color,#000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:#ff5722;color:var(--select2-material-option-selected-text-color,#ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--disabled .select2-selection--single{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before{background:linear-gradient(90deg,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0);background:var(--select2-material-underline-disabled,linear-gradient(90deg,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0));background-position:0 bottom;background-repeat:repeat-x;background-size:4px 1px}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before{background:red;background:var(--select2-material-underline-invalid,red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple,:host.material:not(.select2-container--open) .select2-focused .select2-selection--single{border:0}:host.material .select2-subscript-wrapper{color:#888;color:var(--select2-hint-text-color,#888);font-size:75%;position:absolute;top:calc(100% - 1.72917em)}::ng-deep .select2-overlay-backdrop{background:rgba(0,0,0,.32);background:var(--select2-overlay-backdrop,transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance:none){select2.material .select2-container--default .select2-selection--multiple,select2.material .select2-container--default .select2-selection--single{height:26px}}@supports (-ms-scroll-limit:0){select2.material .select2-container--default .select2-selection--multiple,select2.material .select2-container--default .select2-selection--single{height:25px}}"]
2264
+ template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default select2-container--focus\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [attr.tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\">&nbsp;</span>\n <span *ngIf=\"select2Option\" [innerHTML]=\"select2Option.label\"></span>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"!multiple && resettable && select2Option && !(disabled || readonly)\"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li *ngFor=\"let op of option; trackBy: trackBy\" class=\"select2-selection__choice\" [title]=\"op.label\">\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span [innerHTML]=\"op.label\"></span>\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n <li\n class=\"select2-too-much-result select2-results__option\"\n *ngIf=\"maxResultsExceeded\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n",
2265
+ styles: [".select2-label{color:#000;color:var(--select2-label-text-color,#000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{opacity:0;position:absolute;width:0}.select2-container .select2-selection--single{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;flex:1 1 auto;overflow:hidden;padding:0 0 0 8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{border:none;box-sizing:border-box;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:#fff;background:var(--select2-dropdown-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-dropdown-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);box-sizing:border-box;display:block;height:0;overflow:hidden;position:absolute;width:100%;z-index:1051}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;color:#000;color:var(--select2-option-text-color,#000);padding:6px;user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{opacity:1;width:100%}.select2-container--open .select2-dropdown{height:auto;overflow:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{background:#fff;border:0;display:block;filter:alpha(opacity=0);height:auto;left:0;margin:0;min-height:100%;min-width:100%;opacity:0;padding:0;position:fixed;top:0;width:auto;z-index:99}.select2-required:before{color:red;color:var(--select2-required-color,red);content:\"*\"}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:#fff;background:var(--select2-selection-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;color:var(--select2-selection-text-color,#444);line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;color:var(--select2-placeholder-color,#999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow,ellipsis);white-space:nowrap}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__arrow,.select2-container--default .select2-selection--single .select2-selection__reset{align-items:center;display:flex;justify-content:center;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow:before{border-bottom:0 solid var(--select2-arrow-color,#888);border-color:#888 transparent;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid var(--select2-arrow-color,#888);content:\" \";height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:#999;color:var(--select2-reset-color,#999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:#eee;background:var(--select2-selection-disabled-background,#eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-bottom-color:var(--select2-arrow-color,#888);border-color:transparent transparent #888;border-right-color:transparent;border-top-color:transparent;border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:#fff;background:var(--select2-selection-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-selection-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;flex:1 1 auto;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;color:var(--select2-placeholder-color,#999);display:block;float:left;margin-top:5px;overflow:hidden;text-overflow:ellipsis;text-overflow:var(--select2-placeholder-overflow,ellipsis);white-space:nowrap;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px;margin-top:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background:#e4e4e4;background:var(--select2-selection-choice-background,#e4e4e4);border:1px solid #aaa;border:1px solid var(--select2-selection-choice-border-color,#aaa);border-radius:4px;border-radius:var(--select2-selection-border-radius,4px);color:#000;color:var(--select2-selection-choice-text-color,#000);cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;color:var(--select2-selection-choice-close-color,#999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333;color:var(--select2-selection-choice-hover-close-color,#333)}.select2-container--default.select2-container--focused .select2-selection--multiple,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single{border:1px solid #000;border:1px solid var(--select2-selection-focus-border-color,#000);outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:#eee;background:var(--select2-selection-disabled-background,#eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{background:#fff;background:1px solid var(--select2-search-background,#fff);border:1px solid #aaa;border:1px solid var(--select2-search-border-color,#aaa);border-radius:0;border-radius:var(--select2-search-border-radius,0)}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;background:transparent;border:none;box-shadow:none;outline:none}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{background:transparent;background:var(--select2-option-disabled-background,transparent);color:#999;color:var(--select2-option-disabled-text-color,#999)}.select2-container--default .select2-results__option[aria-selected=true]{background:#ddd;background:var(--select2-option-selected-background,#ddd);color:#000;color:var(--select2-option-selected-text-color,#000)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:#5897fb;background:var(--select2-option-highlighted-background,#5897fb);color:#fff;color:var(--select2-option-highlighted-text-color,#fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{background:transparent;background:var(--select2-option-group-background,transparent);color:grey;color:var(--select2-option-group-text-color,grey);cursor:default;display:block;padding:6px}.select2-no-result{color:#888;color:var(--select2-no-result-color,#888);font-style:italic;font-style:var(--select2-no-result-font-style,italic)}.select2-too-much-result{color:#888;color:var(--select2-too-much-result-color,#888);font-style:italic;font-style:var(--select2-too-much-font-style,italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-selection--multiple,:host.nostyle .select2-selection--single{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{align-items:baseline;border-top:.84375em solid transparent;display:inline-flex;height:auto;padding:.4375em 0;width:100%}:host.material .select2-container--default .select2-selection--multiple,:host.material .select2-container--default .select2-selection--single{border:0;border-radius:0;box-sizing:border-box;height:24px;width:100%}:host.material .select2-container--default .select2-selection--multiple:before,:host.material .select2-container--default .select2-selection--single:before{background:#ddd;background:var(--select2-material-underline,#ddd);bottom:1.65em;content:\" \";display:block;height:1px;position:absolute;width:100%}:host.material .select2-container--default .select2-selection--multiple:after,:host.material .select2-container--default .select2-selection--single:after{background:#5a419e;background:var(--select2-material-underline-active,#5a419e);bottom:1.63em;content:\" \";display:block;height:2px;left:50%;position:absolute;transition:none;width:0}:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered,:host.material .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:inherit;padding-left:1px}:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder{color:rgba(0,0,0,.38);color:var(--select2-material-placeholder-color,rgba(0,0,0,.38));display:block;left:0;position:absolute;top:20px;transform-origin:0 21px;transition:transform .3s}:host.material .select2-container--default .select2-container--open{bottom:1.6em;left:0}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after{left:0;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}:host.material .select2-container--default .select2-dropdown{border:0;border-radius:0;box-shadow:0 5px 5px rgba(0,0,0,.5)}:host.material .select2-container--default .select2-results__option--highlighted[aria-selected],:host.material .select2-container--default .select2-results__option[aria-selected=true]{background:rgba(0,0,0,.04);background:var(--select2-material-option-selected-background,rgba(0,0,0,.04));color:#000;color:var(--select2-material-option-highlighted-text-color,#000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:#ff5722;color:var(--select2-material-option-selected-text-color,#ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--disabled .select2-selection--single{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before{background:linear-gradient(90deg,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0);background:var(--select2-material-underline-disabled,linear-gradient(90deg,rgba(0,0,0,.26) 0,rgba(0,0,0,.26) 33%,transparent 0));background-position:0 bottom;background-repeat:repeat-x;background-size:4px 1px}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before{background:red;background:var(--select2-material-underline-invalid,red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple,:host.material:not(.select2-container--open) .select2-focused .select2-selection--single{border:0}:host.material .select2-subscript-wrapper{color:#888;color:var(--select2-hint-text-color,#888);font-size:75%;position:absolute;top:calc(100% - 1.72917em)}::ng-deep .select2-overlay-backdrop{background:rgba(0,0,0,.32);background:var(--select2-overlay-backdrop,transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance:none){select2.material .select2-container--default .select2-selection--multiple,select2.material .select2-container--default .select2-selection--single{height:26px}}@supports (-ms-scroll-limit:0){select2.material .select2-container--default .select2-selection--multiple,select2.material .select2-container--default .select2-selection--single{height:25px}}"]
2201
2266
  }] }
2202
2267
  ];
2203
2268
  /** @nocollapse */
@@ -2221,6 +2286,8 @@
2221
2286
  overlay: [{ type: core.Input }],
2222
2287
  styleMode: [{ type: core.Input }],
2223
2288
  noResultMessage: [{ type: core.Input }],
2289
+ maxResults: [{ type: core.Input }],
2290
+ maxResultsMessage: [{ type: core.Input }],
2224
2291
  infiniteScrollDistance: [{ type: core.Input }],
2225
2292
  infiniteScrollThrottle: [{ type: core.Input }],
2226
2293
  infiniteScroll: [{ type: core.Input }],
@@ -2280,6 +2347,16 @@
2280
2347
  * @type {?}
2281
2348
  */
2282
2349
  Select2.prototype.noResultMessage;
2350
+ /**
2351
+ * maximum results limit (0 = no limit)
2352
+ * @type {?}
2353
+ */
2354
+ Select2.prototype.maxResults;
2355
+ /**
2356
+ * message when maximum results
2357
+ * @type {?}
2358
+ */
2359
+ Select2.prototype.maxResultsMessage;
2283
2360
  /**
2284
2361
  * infinite scroll distance
2285
2362
  * @type {?}
@@ -2342,6 +2419,8 @@
2342
2419
  Select2.prototype._triggerRect;
2343
2420
  /** @type {?} */
2344
2421
  Select2.prototype._dropdownRect;
2422
+ /** @type {?} */
2423
+ Select2.prototype.maxResultsExceeded;
2345
2424
  /**
2346
2425
  * @type {?}
2347
2426
  * @private