carbon-components-angular 5.72.1 → 5.72.2

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.
Files changed (129) hide show
  1. package/combobox/combobox.component.d.ts +3 -0
  2. package/docs/documentation/components/ComboBox.html +214 -67
  3. package/docs/documentation/components/Dropdown.html +322 -134
  4. package/docs/documentation/components/DropdownList.html +6 -2
  5. package/docs/documentation/components/RadioGroup.html +166 -77
  6. package/docs/documentation/coverage.html +10 -10
  7. package/docs/documentation/js/search/search_index.js +2 -2
  8. package/docs/documentation/modules/DialogModule/dependencies.svg +34 -34
  9. package/docs/documentation/modules/DialogModule.html +34 -34
  10. package/docs/documentation/modules/DocumentationModule/dependencies.svg +4 -4
  11. package/docs/documentation/modules/DocumentationModule.html +4 -4
  12. package/docs/documentation/modules/FileUploaderModule/dependencies.svg +37 -37
  13. package/docs/documentation/modules/FileUploaderModule.html +37 -37
  14. package/docs/documentation/modules/GridModule/dependencies.svg +63 -63
  15. package/docs/documentation/modules/GridModule.html +63 -63
  16. package/docs/documentation/modules/HeaderModule/dependencies.svg +4 -4
  17. package/docs/documentation/modules/HeaderModule.html +4 -4
  18. package/docs/documentation/modules/I18nModule/dependencies.svg +13 -13
  19. package/docs/documentation/modules/I18nModule.html +13 -13
  20. package/docs/documentation/modules/IconModule/dependencies.svg +4 -4
  21. package/docs/documentation/modules/IconModule.html +4 -4
  22. package/docs/documentation/modules/InlineLoadingModule/dependencies.svg +15 -15
  23. package/docs/documentation/modules/InlineLoadingModule.html +15 -15
  24. package/docs/documentation/modules/InputModule/dependencies.svg +76 -76
  25. package/docs/documentation/modules/InputModule.html +76 -76
  26. package/docs/documentation/modules/ListModule/dependencies.svg +4 -4
  27. package/docs/documentation/modules/ListModule.html +4 -4
  28. package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
  29. package/docs/documentation/modules/LoadingModule.html +4 -4
  30. package/docs/documentation/modules/MenuButtonModule/dependencies.svg +28 -28
  31. package/docs/documentation/modules/MenuButtonModule.html +28 -28
  32. package/docs/documentation/modules/ModalModule/dependencies.svg +113 -113
  33. package/docs/documentation/modules/ModalModule.html +113 -113
  34. package/docs/documentation/modules/NFormsModule/dependencies.svg +4 -4
  35. package/docs/documentation/modules/NFormsModule.html +4 -4
  36. package/docs/documentation/modules/NotificationModule/dependencies.svg +4 -4
  37. package/docs/documentation/modules/NotificationModule.html +4 -4
  38. package/docs/documentation/modules/NumberModule/dependencies.svg +24 -24
  39. package/docs/documentation/modules/NumberModule.html +24 -24
  40. package/docs/documentation/modules/PaginationModule/dependencies.svg +57 -57
  41. package/docs/documentation/modules/PaginationModule.html +57 -57
  42. package/docs/documentation/modules/PanelModule/dependencies.svg +36 -36
  43. package/docs/documentation/modules/PanelModule.html +36 -36
  44. package/docs/documentation/modules/PlaceholderModule/dependencies.svg +4 -4
  45. package/docs/documentation/modules/PlaceholderModule.html +4 -4
  46. package/docs/documentation/modules/PopoverModule/dependencies.svg +4 -4
  47. package/docs/documentation/modules/PopoverModule.html +4 -4
  48. package/docs/documentation/modules/ProgressBarModule/dependencies.svg +4 -4
  49. package/docs/documentation/modules/ProgressBarModule.html +4 -4
  50. package/docs/documentation/modules/ProgressIndicatorModule/dependencies.svg +4 -4
  51. package/docs/documentation/modules/ProgressIndicatorModule.html +4 -4
  52. package/docs/documentation/modules/RadioModule/dependencies.svg +61 -57
  53. package/docs/documentation/modules/RadioModule.html +61 -57
  54. package/docs/documentation/modules/SearchModule/dependencies.svg +48 -44
  55. package/docs/documentation/modules/SearchModule.html +48 -44
  56. package/docs/documentation/modules/SelectModule/dependencies.svg +60 -60
  57. package/docs/documentation/modules/SelectModule.html +60 -60
  58. package/docs/documentation/modules/SideNavModule/dependencies.svg +40 -40
  59. package/docs/documentation/modules/SideNavModule.html +40 -40
  60. package/docs/documentation/modules/SliderModule/dependencies.svg +41 -45
  61. package/docs/documentation/modules/SliderModule.html +41 -45
  62. package/docs/documentation/modules/TabsModule/dependencies.svg +120 -120
  63. package/docs/documentation/modules/TabsModule.html +120 -120
  64. package/docs/documentation/modules/ThemeModule/dependencies.svg +13 -13
  65. package/docs/documentation/modules/ThemeModule.html +13 -13
  66. package/docs/documentation/modules/TilesModule/dependencies.svg +106 -106
  67. package/docs/documentation/modules/TilesModule.html +106 -106
  68. package/docs/documentation/modules/TimePickerModule/dependencies.svg +41 -45
  69. package/docs/documentation/modules/TimePickerModule.html +41 -45
  70. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +46 -42
  71. package/docs/documentation/modules/TimePickerSelectModule.html +46 -42
  72. package/docs/documentation/modules/ToggleModule/dependencies.svg +17 -17
  73. package/docs/documentation/modules/ToggleModule.html +17 -17
  74. package/docs/documentation/modules/ToggletipModule/dependencies.svg +4 -4
  75. package/docs/documentation/modules/ToggletipModule.html +4 -4
  76. package/docs/documentation/modules/TooltipModule/dependencies.svg +28 -28
  77. package/docs/documentation/modules/TooltipModule.html +28 -28
  78. package/docs/documentation/modules/TreeviewModule/dependencies.svg +4 -4
  79. package/docs/documentation/modules/TreeviewModule.html +4 -4
  80. package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
  81. package/docs/documentation/modules/UIShellModule.html +4 -4
  82. package/docs/documentation.json +261 -231
  83. package/docs/storybook/3224.14e2c79a.iframe.bundle.js +1 -0
  84. package/docs/storybook/557.d4341469.iframe.bundle.js +1 -0
  85. package/docs/storybook/955.7522f55b.iframe.bundle.js +1 -0
  86. package/docs/storybook/combobox-combobox-stories.e3d08f7d.iframe.bundle.js +1 -0
  87. package/docs/storybook/dropdown-dropdown-stories.cf59b2ab.iframe.bundle.js +1 -0
  88. package/docs/storybook/iframe.html +2 -2
  89. package/docs/storybook/{main.d2b9abb3.iframe.bundle.js → main.a1247bb8.iframe.bundle.js} +1 -1
  90. package/docs/storybook/modal-modal-stories.cc2d04cb.iframe.bundle.js +1 -0
  91. package/docs/storybook/{pagination-pagination-nav-stories.547eede3.iframe.bundle.js → pagination-pagination-nav-stories.01637d11.iframe.bundle.js} +1 -1
  92. package/docs/storybook/{pagination-pagination-stories.fa7c9094.iframe.bundle.js → pagination-pagination-stories.40d17ebd.iframe.bundle.js} +1 -1
  93. package/docs/storybook/{patterns-filtering-single-selection-stories.ec91f833.iframe.bundle.js → patterns-filtering-multi-selection-stories.a46a1d6e.iframe.bundle.js} +1 -1
  94. package/docs/storybook/{patterns-filtering-multiple-categories-stories.531f27d7.iframe.bundle.js → patterns-filtering-multiple-categories-stories.740c719e.iframe.bundle.js} +1 -1
  95. package/docs/storybook/{patterns-filtering-multi-selection-stories.9086f77f.iframe.bundle.js → patterns-filtering-single-selection-stories.cc647b4a.iframe.bundle.js} +1 -1
  96. package/docs/storybook/{patterns-forms-multi-step-form-stories.8696062a.iframe.bundle.js → patterns-forms-multi-step-form-stories.2ea46e56.iframe.bundle.js} +1 -1
  97. package/docs/storybook/{patterns-loading-large-loading-stories.734fb9bc.iframe.bundle.js → patterns-loading-large-loading-stories.e6ae3e31.iframe.bundle.js} +1 -1
  98. package/docs/storybook/{patterns-loading-progressive-loading-stories.10bcf9f2.iframe.bundle.js → patterns-loading-progressive-loading-stories.63165c09.iframe.bundle.js} +1 -1
  99. package/docs/storybook/project.json +1 -1
  100. package/docs/storybook/radio-radio-stories.8ff73370.iframe.bundle.js +1 -0
  101. package/docs/storybook/runtime~main.b11c471e.iframe.bundle.js +1 -0
  102. package/dropdown/dropdown.component.d.ts +8 -1
  103. package/dropdown/list/dropdown-list.component.d.ts +1 -1
  104. package/esm2020/combobox/combobox.component.mjs +19 -9
  105. package/esm2020/dropdown/dropdown.component.mjs +31 -15
  106. package/esm2020/dropdown/list/dropdown-list.component.mjs +1 -1
  107. package/esm2020/radio/radio-group.component.mjs +19 -7
  108. package/fesm2015/carbon-components-angular-combobox.mjs +18 -8
  109. package/fesm2015/carbon-components-angular-combobox.mjs.map +1 -1
  110. package/fesm2015/carbon-components-angular-dropdown.mjs +31 -14
  111. package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
  112. package/fesm2015/carbon-components-angular-radio.mjs +18 -6
  113. package/fesm2015/carbon-components-angular-radio.mjs.map +1 -1
  114. package/fesm2020/carbon-components-angular-combobox.mjs +18 -8
  115. package/fesm2020/carbon-components-angular-combobox.mjs.map +1 -1
  116. package/fesm2020/carbon-components-angular-dropdown.mjs +30 -14
  117. package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
  118. package/fesm2020/carbon-components-angular-radio.mjs +18 -6
  119. package/fesm2020/carbon-components-angular-radio.mjs.map +1 -1
  120. package/package.json +1 -1
  121. package/radio/radio-group.component.d.ts +4 -2
  122. package/docs/storybook/1250.47c381c1.iframe.bundle.js +0 -1
  123. package/docs/storybook/3224.3e279e46.iframe.bundle.js +0 -1
  124. package/docs/storybook/955.99b6ac85.iframe.bundle.js +0 -1
  125. package/docs/storybook/combobox-combobox-stories.e7427226.iframe.bundle.js +0 -1
  126. package/docs/storybook/dropdown-dropdown-stories.a76101be.iframe.bundle.js +0 -1
  127. package/docs/storybook/modal-modal-stories.0a864a6a.iframe.bundle.js +0 -1
  128. package/docs/storybook/radio-radio-stories.444fc044.iframe.bundle.js +0 -1
  129. package/docs/storybook/runtime~main.86875b86.iframe.bundle.js +0 -1
@@ -26053,7 +26053,7 @@
26053
26053
  },
26054
26054
  {
26055
26055
  "name": "ComboBox",
26056
- "id": "component-ComboBox-4c0234bb06eac6fac0ee3dacf055094927ba411a168a303945631f9e5c3b57118ff618328c26ebd79ce16cd844bff8bad7f86415f6d7e0bff2a76cf0a6762814",
26056
+ "id": "component-ComboBox-01df5a8c617e643167be1a25ea303f8ac883421cc1efcdf2681a19900f42023b15d94cee9e7dca6c68e6ae66d98e6c7b7cd2133cdac75cf1a44fa20e61a189b0",
26057
26057
  "file": "src/combobox/combobox.component.ts",
26058
26058
  "encapsulation": [],
26059
26059
  "entryComponents": [],
@@ -26654,7 +26654,7 @@
26654
26654
  "optional": false,
26655
26655
  "returnType": "void",
26656
26656
  "typeParameters": [],
26657
- "line": 870,
26657
+ "line": 883,
26658
26658
  "deprecated": false,
26659
26659
  "deprecationMessage": "",
26660
26660
  "rawdescription": "\n\nCreates the `Dropdown` list as an element that is appended to the DOM body.\n",
@@ -26666,7 +26666,7 @@
26666
26666
  "optional": false,
26667
26667
  "returnType": "void",
26668
26668
  "typeParameters": [],
26669
- "line": 881,
26669
+ "line": 894,
26670
26670
  "deprecated": false,
26671
26671
  "deprecationMessage": "",
26672
26672
  "rawdescription": "\n\nCreates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n",
@@ -26685,7 +26685,7 @@
26685
26685
  "optional": false,
26686
26686
  "returnType": "void",
26687
26687
  "typeParameters": [],
26688
- "line": 850,
26688
+ "line": 863,
26689
26689
  "deprecated": false,
26690
26690
  "deprecationMessage": "",
26691
26691
  "rawdescription": "\n\nHandles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n",
@@ -26708,7 +26708,7 @@
26708
26708
  "optional": false,
26709
26709
  "returnType": "void",
26710
26710
  "typeParameters": [],
26711
- "line": 630,
26711
+ "line": 635,
26712
26712
  "deprecated": false,
26713
26713
  "deprecationMessage": ""
26714
26714
  },
@@ -26725,7 +26725,7 @@
26725
26725
  "optional": false,
26726
26726
  "returnType": "void",
26727
26727
  "typeParameters": [],
26728
- "line": 910,
26728
+ "line": 923,
26729
26729
  "deprecated": false,
26730
26730
  "deprecationMessage": "",
26731
26731
  "rawdescription": "\n\nHandles clicks outside of the `Dropdown` list.\n",
@@ -26748,7 +26748,7 @@
26748
26748
  "optional": false,
26749
26749
  "returnType": "any",
26750
26750
  "typeParameters": [],
26751
- "line": 890,
26751
+ "line": 903,
26752
26752
  "deprecated": false,
26753
26753
  "deprecationMessage": "",
26754
26754
  "rawdescription": "\n\nDetects whether or not the `Dropdown` list is visible within all scrollable parents.\nThis can be overridden by passing in a value to the `dropUp` input.\n",
@@ -26767,7 +26767,7 @@
26767
26767
  "optional": false,
26768
26768
  "returnType": "void",
26769
26769
  "typeParameters": [],
26770
- "line": 822,
26770
+ "line": 835,
26771
26771
  "deprecated": false,
26772
26772
  "deprecationMessage": "",
26773
26773
  "jsdoctags": [
@@ -26795,7 +26795,7 @@
26795
26795
  "optional": false,
26796
26796
  "returnType": "void",
26797
26797
  "typeParameters": [],
26798
- "line": 696,
26798
+ "line": 709,
26799
26799
  "deprecated": false,
26800
26800
  "deprecationMessage": "",
26801
26801
  "modifierKind": [
@@ -26819,7 +26819,7 @@
26819
26819
  "optional": false,
26820
26820
  "returnType": "void",
26821
26821
  "typeParameters": [],
26822
- "line": 730,
26822
+ "line": 743,
26823
26823
  "deprecated": false,
26824
26824
  "deprecationMessage": "",
26825
26825
  "rawdescription": "\n\nCloses the dropdown and emits the close event.\n",
@@ -26841,7 +26841,7 @@
26841
26841
  "optional": false,
26842
26842
  "returnType": "void",
26843
26843
  "typeParameters": [],
26844
- "line": 919,
26844
+ "line": 932,
26845
26845
  "deprecated": false,
26846
26846
  "deprecationMessage": "",
26847
26847
  "jsdoctags": [
@@ -26869,7 +26869,7 @@
26869
26869
  "optional": false,
26870
26870
  "returnType": "void",
26871
26871
  "typeParameters": [],
26872
- "line": 605,
26872
+ "line": 610,
26873
26873
  "deprecated": false,
26874
26874
  "deprecationMessage": "",
26875
26875
  "rawdescription": "\n\nHandles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n",
@@ -26908,7 +26908,7 @@
26908
26908
  "optional": false,
26909
26909
  "returnType": "boolean",
26910
26910
  "typeParameters": [],
26911
- "line": 843,
26911
+ "line": 856,
26912
26912
  "deprecated": false,
26913
26913
  "deprecationMessage": "",
26914
26914
  "modifierKind": [
@@ -26932,7 +26932,7 @@
26932
26932
  "optional": false,
26933
26933
  "returnType": "void",
26934
26934
  "typeParameters": [],
26935
- "line": 667,
26935
+ "line": 679,
26936
26936
  "deprecated": false,
26937
26937
  "deprecationMessage": ""
26938
26938
  },
@@ -26956,7 +26956,7 @@
26956
26956
  "optional": false,
26957
26957
  "returnType": "void",
26958
26958
  "typeParameters": [],
26959
- "line": 778,
26959
+ "line": 791,
26960
26960
  "deprecated": false,
26961
26961
  "deprecationMessage": "",
26962
26962
  "rawdescription": "\n\nSets the list group filter, and manages single select item selection.\n",
@@ -26999,7 +26999,7 @@
26999
26999
  "optional": false,
27000
27000
  "returnType": "void",
27001
27001
  "typeParameters": [],
27002
- "line": 811,
27002
+ "line": 824,
27003
27003
  "deprecated": false,
27004
27004
  "deprecationMessage": "",
27005
27005
  "rawdescription": "\n\nIntended to be used to add items to the list.\n",
@@ -27025,7 +27025,7 @@
27025
27025
  "optional": false,
27026
27026
  "returnType": "void",
27027
27027
  "typeParameters": [],
27028
- "line": 744,
27028
+ "line": 757,
27029
27029
  "deprecated": false,
27030
27030
  "deprecationMessage": "",
27031
27031
  "rawdescription": "\n\nOpens the dropdown.\n",
@@ -27047,7 +27047,7 @@
27047
27047
  "optional": false,
27048
27048
  "returnType": "void",
27049
27049
  "typeParameters": [],
27050
- "line": 671,
27050
+ "line": 683,
27051
27051
  "deprecated": false,
27052
27052
  "deprecationMessage": "",
27053
27053
  "jsdoctags": [
@@ -27075,7 +27075,7 @@
27075
27075
  "optional": false,
27076
27076
  "returnType": "void",
27077
27077
  "typeParameters": [],
27078
- "line": 675,
27078
+ "line": 688,
27079
27079
  "deprecated": false,
27080
27080
  "deprecationMessage": "",
27081
27081
  "jsdoctags": [
@@ -27103,7 +27103,7 @@
27103
27103
  "optional": false,
27104
27104
  "returnType": "void",
27105
27105
  "typeParameters": [],
27106
- "line": 684,
27106
+ "line": 697,
27107
27107
  "deprecated": false,
27108
27108
  "deprecationMessage": "",
27109
27109
  "rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the combobox.\n\nex: `this.formGroup.get(\"myCoolCombobox\").disable();`\n",
@@ -27126,7 +27126,7 @@
27126
27126
  "optional": false,
27127
27127
  "returnType": "void",
27128
27128
  "typeParameters": [],
27129
- "line": 767,
27129
+ "line": 780,
27130
27130
  "deprecated": false,
27131
27131
  "deprecationMessage": "",
27132
27132
  "rawdescription": "\n\nToggles the dropdown.\n",
@@ -27141,7 +27141,7 @@
27141
27141
  "optional": false,
27142
27142
  "returnType": "void",
27143
27143
  "typeParameters": [],
27144
- "line": 691,
27144
+ "line": 704,
27145
27145
  "deprecated": false,
27146
27146
  "deprecationMessage": "",
27147
27147
  "rawdescription": "\n\nCalled by `n-pill-input` when the selected pills have changed.\n",
@@ -27163,7 +27163,7 @@
27163
27163
  "optional": false,
27164
27164
  "returnType": "void",
27165
27165
  "typeParameters": [],
27166
- "line": 635,
27166
+ "line": 640,
27167
27167
  "deprecated": false,
27168
27168
  "deprecationMessage": "",
27169
27169
  "jsdoctags": [
@@ -27210,7 +27210,7 @@
27210
27210
  "deprecationMessage": "",
27211
27211
  "rawdescription": "\n\nHandles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n",
27212
27212
  "description": "<p>Handles <code>Escape/Tab</code> key closing the dropdown, and arrow up/down focus to/from the dropdown list.</p>\n",
27213
- "line": 605
27213
+ "line": 610
27214
27214
  }
27215
27215
  ],
27216
27216
  "standalone": false,
@@ -27218,7 +27218,7 @@
27218
27218
  "description": "<p>Get started with importing the module:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { ComboBoxModule } from &#39;carbon-components-angular&#39;;</code></pre></div><p>ComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\nMulti-select comboboxes also provide &quot;pills&quot; of selected items.</p>\n<p><a href=\"../../?path=/story/components-combobox--basic\">See demo</a></p>\n",
27219
27219
  "rawdescription": "\n\nGet started with importing the module:\n\n```typescript\nimport { ComboBoxModule } from 'carbon-components-angular';\n```\n\nComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\nMulti-select comboboxes also provide \"pills\" of selected items.\n\n[See demo](../../?path=/story/components-combobox--basic)\n",
27220
27220
  "type": "component",
27221
- "sourceCode": "import {\n\tComponent,\n\tOnChanges,\n\tContentChild,\n\tInput,\n\tOutput,\n\tHostListener,\n\tElementRef,\n\tViewChild,\n\tEventEmitter,\n\tAfterViewInit,\n\tAfterContentInit,\n\tHostBinding,\n\tTemplateRef,\n\tOnDestroy\n} from \"@angular/core\";\nimport { AbstractDropdownView, DropdownService } from \"carbon-components-angular/dropdown\";\nimport { ListItem } from \"carbon-components-angular/dropdown\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { filter } from \"rxjs/operators\";\nimport {\n\tgetScrollableParents,\n\thasScrollableParents\n} from \"carbon-components-angular/utils\";\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { ComboBoxModule } from 'carbon-components-angular';\n * ```\n *\n * ComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\n * Multi-select comboboxes also provide \"pills\" of selected items.\n *\n * [See demo](../../?path=/story/components-combobox--basic)\n */\n@Component({\n\tselector: \"cds-combo-box, ibm-combo-box\",\n\ttemplate: `\n\t\t<div\n\t\t\tclass=\"cds--list-box__wrapper\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--list-box__wrapper--fluid': fluid,\n\t\t\t\t'cds--list-box__wrapper--fluid--invalid': fluid && invalid,\n\t\t\t\t'cds--list-box__wrapper--fluid--focus': fluid && _isFocused,\n\t\t\t\t'cds--list-box__wrapper--decorator': !!decorator\n\t\t\t}\">\n\t\t\t<label\n\t\t\t\t*ngIf=\"label\"\n\t\t\t\t[for]=\"id\"\n\t\t\t\t[id]=\"labelId\"\n\t\t\t\tclass=\"cds--label\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--label--disabled': disabled,\n\t\t\t\t\t'cds--visually-hidden': hideLabel\n\t\t\t\t}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t</label>\n\t\t\t<div\n\t\t\t\t#listbox\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--multi-select cds--multi-select--filterable': type === 'multi',\n\t\t\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t\t\t'cds--list-box--expanded': open,\n\t\t\t\t\t'cds--list-box--sm': size === 'sm',\n\t\t\t\t\t'cds--list-box--md': size === 'md',\n\t\t\t\t\t'cds--list-box--lg': size === 'lg',\n\t\t\t\t\t'cds--list-box--disabled': disabled,\n\t\t\t\t\t'cds--combo-box--readonly': readonly,\n\t\t\t\t\t'cds--combo-box--warning cds--list-box--warning': warn,\n\t\t\t\t\t'cds--list-box--invalid': invalid\n\t\t\t\t}\"\n\t\t\t\tclass=\"cds--list-box cds--combo-box\"\n\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--list-box__field\"\n\t\t\t\t\t(click)=\"toggleDropdown()\"\n\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"type === 'multi' && pills.length > 0\"\n\t\t\t\t\t\tclass=\"cds--tag cds--tag--filter cds--tag--high-contrast\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--tag--disabled': disabled || readonly}\">\n\t\t\t\t\t\t<span class=\"cds--tag__label\">{{ pills.length }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t(click)=\"clearSelected($event)\"\n\t\t\t\t\t\t\t(blur)=\"onBlur()\"\n\t\t\t\t\t\t\t(keydown.enter)=\"clearSelected($event)\"\n\t\t\t\t\t\t\tclass=\"cds--tag__close-icon\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\t[title]=\"clearSelectionsTitle\"\n\t\t\t\t\t\t\t[disabled]=\"disabled || readonly\"\n\t\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[readOnly]=\"readonly\"\n\t\t\t\t\t\t(input)=\"onSearch($event.target.value)\"\n\t\t\t\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t\t\t\t(blur)=\"fluid ? handleFocus($event) : onBlur()\"\n\t\t\t\t\t\t(keydown.enter)=\"onSubmit($event)\"\n\t\t\t\t\t\t[value]=\"selectedValue\"\n\t\t\t\t\t\tclass=\"cds--text-input\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--text-input--empty': !showClearButton}\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[id]=\"id\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"labelId\"\n\t\t\t\t\t\t[attr.aria-expanded]=\"open\"\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\t[attr.maxlength]=\"maxLength\"\n\t\t\t\t\t\t[attr.aria-controls]=\"open ? view?.listId : null\"\n\t\t\t\t\t\t[attr.aria-autocomplete]=\"autocomplete\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"/>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"showClearButton\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__selection\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\"\n\t\t\t\t\t\t[title]=\"clearSelectionTitle\"\n\t\t\t\t\t\t(keyup.enter)=\"clearInput($event)\"\n\t\t\t\t\t\t(click)=\"clearInput($event)\"\n\t\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t\t<svg cdsIcon=\"close\" size=\"16\"></svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__menu-icon\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t[title]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[attr.aria-label]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': open}\">\n\t\t\t\t\t\t<svg cdsIcon=\"chevron--down\" size=\"16\"></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<ng-container *ngIf=\"decorator\">\n\t\t\t\t\t<div class=\"cds--list-box__inner-wrapper--decorator\">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]=\"decorator\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t\t<div\n\t\t\t\t\t#dropdownMenu\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t\t\t}\">\n\t\t\t\t\t<ng-content *ngIf=\"open\"></ng-content>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n\t\t\t<div\n\t\t\t\t*ngIf=\"helperText && !invalid && !warn && !fluid\"\n\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboBox,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnDestroy {\n\t/**\n\t * Text to show when nothing is selected.\n\t */\n\t@Input() set placeholder(value: string | Observable<string>) {\n\t\tthis._placeholder.override(value);\n\t}\n\n\tget placeholder() {\n\t\treturn this._placeholder.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when closed\n\t */\n\t@Input() set openMenuAria(value: string | Observable<string>) {\n\t\tthis._openMenuAria.override(value);\n\t}\n\n\tget openMenuAria() {\n\t\treturn this._openMenuAria.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when opened\n\t */\n\t@Input() set closeMenuAria(value: string | Observable<string>) {\n\t\tthis._closeMenuAria.override(value);\n\t}\n\n\tget closeMenuAria() {\n\t\treturn this._closeMenuAria.value;\n\t}\n\t/**\n\t * Value to display on the clear selections icon, when multi is selected\n\t */\n\t@Input() set clearSelectionsTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionsTitle.override(value);\n\t}\n\n\tget clearSelectionsTitle() {\n\t\treturn this._clearSelectionsTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes to clear selections, when multi is selected\n\t */\n\t@Input() set clearSelectionsAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionsAria.override(value);\n\t}\n\n\tget clearSelectionsAria() {\n\t\treturn this._clearSelectionsAria.value;\n\t}\n\t/**\n\t * Value to display on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionTitle.override(value);\n\t}\n\n\tget clearSelectionTitle() {\n\t\treturn this._clearSelectionTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionAria.override(value);\n\t}\n\n\tget clearSelectionAria() {\n\t\treturn this._clearSelectionAria.value;\n\t}\n\tstatic comboBoxCount = 0;\n\t@Input() id = `combobox-${ComboBox.comboBoxCount++}`;\n\t@Input() labelId = `combobox-label-${ComboBox.comboBoxCount++}`;\n\t/**\n\t * List of items to fill the content with.\n\t *\n\t * **Example:**\n\t * ```javascript\n\t * items = [\n\t *\t\t{\n\t *\t\t\tcontent: \"Abacus\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Byte\",\n\t *\t\t\tselected: false,\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Computer\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Digital\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t * ];\n\t * ```\n\t *\n\t */\n\t@Input() items: Array<ListItem> = [];\n\t/**\n\t * Combo box type (supporting single or multi selection of items).\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * Combo box render size.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() itemValueKey: string;\n\t/**\n\t * Label for the combobox.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Hide label while keeping it accessible for screen readers\n\t */\n\t@Input() hideLabel = false;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\n\t/**\n\t * **Experimental**: Optional decorator (e.g. AI label).\n\t */\n\t@Input() decorator: TemplateRef<any>;\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline: boolean = null;\n\t/**\n\t * Set to `true` to show the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if combobox is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t* Set to `true` to show a warning (contents set by warnText)\n\t*/\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\t/**\n\t * Max length value to limit input characters\n\t */\n\t@Input() maxLength: number = null;\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Specify feedback (mode) of the selection.\n\t * `top`: selected item jumps to top\n\t * `fixed`: selected item stays at its position\n\t * `top-after-reopen`: selected item jump to top after reopen dropdown\n\t */\n\t@Input() selectionFeedback: \"top\" | \"fixed\" | \"top-after-reopen\" = \"top-after-reopen\";\n\t/**\n\t * Specify aria-autocomplete attribute of text input.\n\t * \"list\", is the expected value for a combobox that invokes a drop-down list\n\t */\n\t@Input() autocomplete = \"list\";\n\t/**\n\t * Overrides the automatic dropUp.\n\t */\n\t@Input() dropUp: boolean;\n\t/**\n\t * Set to `true` to disable combobox.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for readonly state.\n\t */\n\t@Input() readonly = false;\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@Input() fluid = false;\n\t/**\n\t * Emits a ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t * \t\tcontent: \"one\",\n\t * \t\tselected: true\n\t * }\n\t * ```\n\t */\n\t@Output() selected = new EventEmitter<ListItem | ListItem[]>();\n\t/**\n\t * Intended to be used to add items to the list.\n\t *\n\t * Emits an event that includes the current item list, the suggested index for the new item, and a simple ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t *\t{\n\t *\t\titems: [{content: \"one\", selected: true}, {content: \"two\", selected: true}],\n\t *\t\tindex: 1,\n\t *\t\tvalue: {\n\t *\t\t\tcontent: \"some user string\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t *\t}\n\t * ```\n\t *\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t *\tafter: 1,\n\t *\tvalue: \"some user string\"\n\t * }\n\t * ```\n\t */\n\t@Output() submit = new EventEmitter<{\n\t\titems: ListItem[],\n\t\tindex: number,\n\t\tvalue: {\n\t\t\tcontent: string,\n\t\t\tselected: boolean\n\t\t}\n\t}>();\n\t/** Emits an empty event when the menu is closed */\n\t@Output() close = new EventEmitter<void>();\n\t/** Emits the search string from the input */\n\t@Output() search = new EventEmitter<string>();\n\t/** Emits an event when the clear button is clicked. */\n\t@Output() clear = new EventEmitter<Event>();\n\t/** ContentChild reference to the instantiated dropdown list */\n\t@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;\n\t@ViewChild(\"dropdownMenu\") dropdownMenu;\n\t@ViewChild(\"input\", { static: true }) input: ElementRef;\n\t@ViewChild(\"listbox\", { static: true }) listbox: ElementRef;\n\t@HostBinding(\"class.cds--list-box__wrapper\") hostClass = true;\n\n\tpublic open = false;\n\n\tpublic showClearButton = false;\n\n\t/** Selected items for multi-select combo-boxes. */\n\tpublic pills = [];\n\t/** used to update the displayValue */\n\tpublic selectedValue = \"\";\n\n\toutsideClick = this._outsideClick.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\t/**\n\t * controls whether the `drop-up` class is applied\n\t */\n\t_dropUp = false;\n\n\tprotected noop = this._noop.bind(this);\n\tprotected onTouchedCallback: () => void = this._noop;\n\tprotected propagateChangeCallback: (_: any) => void = this._noop;\n\n\tprotected _placeholder = this.i18n.getOverridable(\"COMBOBOX.PLACEHOLDER\");\n\tprotected _closeMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLOSE_MENU\");\n\tprotected _openMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.OPEN_MENU\");\n\tprotected _clearSelectionsTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionsAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTED\");\n\tprotected _clearSelectionAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTED\");\n\n\tprotected _isFocused = false;\n\n\t/**\n\t * Creates an instance of ComboBox.\n\t */\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected dropdownService: DropdownService,\n\t\tprotected i18n: I18n\n\t) {}\n\n\t/**\n\t * Lifecycle hook.\n\t * Updates pills if necessary.\n\t *\n\t */\n\tngOnChanges(changes) {\n\t\tif (changes.items) {\n\t\t\tthis.view.items = changes.items.currentValue;\n\t\t\tthis.updateSelected();\n\t\t\t// If new items are added into the combobox while there is search input,\n\t\t\t// repeat the search. Search should only trigger for type 'single' when there is no value selected.\n\t\t\tif (this.type === \"multi\" || (this.type === \"single\" && !this.selectedValue)) {\n\t\t\t\tthis.onSearch(this.input.nativeElement.value, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets initial state that depends on child components\n\t * Subscribes to select events and handles focus/filtering/initial list updates\n\t */\n\tngAfterContentInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\n\t\t\t// function to check if the event is organic (isUpdate === false) or programmatic\n\t\t\tconst isUpdate = event => event && event.isUpdate;\n\n\t\t\tthis.view.select.subscribe(event => {\n\t\t\t\tif (Array.isArray(event)) {\n\t\t\t\t\tthis.updatePills();\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tif (this.itemValueKey && this.view.getSelected()) {\n\t\t\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.itemValueKey]);\n\t\t\t\t\t\t\tthis.propagateChangeCallback(values);\n\t\t\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.propagateChangeCallback(this.view.getSelected());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.selected.emit(event);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If type is single, dropdown list will emit an object\n\t\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\t\tthis.showClearButton = true;\n\t\t\t\t\t\tthis.selectedValue = event.item.content;\n\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t\t\t\tthis.propagateChangeCallback(event.item[this.itemValueKey]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.propagateChangeCallback(event.item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.selectedValue = \"\";\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tthis.propagateChangeCallback(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// not guarding these since the nativeElement has to be loaded\n\t\t\t\t\t// for select to even fire\n\t\t\t\t\t// only focus for \"organic\" selections\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tthis.elementRef.nativeElement.querySelector(\"input\").focus();\n\t\t\t\t\t\tthis.view.filterBy(\"\");\n\t\t\t\t\t\tthis.selected.emit(event.item);\n\t\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t// update the rest of combobox with any pre-selected items\n\t\t\t// setTimeout just defers the call to the next check cycle\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.updateSelected();\n\t\t\t});\n\n\t\t\tthis.view.blurIntent.pipe(filter(v => v === \"top\")).subscribe(() => {\n\t\t\t\tthis.elementRef.nativeElement.querySelector(\".cds--text-input\").focus();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Binds event handlers against the rendered view\n\t */\n\tngAfterViewInit() {\n\t\t// if appendInline is default valued (null) we should:\n\t\t// 1. if there are scrollable parents (not including body) don't append inline\n\t\t// this should also cover the case where the dropdown is in a modal\n\t\t// (where we _do_ want to append to the placeholder)\n\t\tif (this.appendInline === null && hasScrollableParents(this.elementRef.nativeElement)) {\n\t\t\tthis.appendInline = false;\n\t\t// 2. otherwise we should append inline\n\t\t} else if (this.appendInline === null) {\n\t\t\tthis.appendInline = true;\n\t\t}\n\t}\n\n\t/**\n\t * Removing the `Dropdown` from the body if it is appended to the body.\n\t */\n\tngOnDestroy() {\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Handles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\thostkeys(ev: KeyboardEvent) {\n\t\tif (ev.key === \"Escape\") {\n\t\t\tthis.closeDropdown();\n\t\t} else if ((ev.key === \"ArrowDown\")\n\t\t\t&& (!this.dropdownMenu || !this.dropdownMenu.nativeElement.contains(ev.target))) {\n\t\t\tev.preventDefault();\n\t\t\tthis.openDropdown();\n\t\t\tsetTimeout(() => { this.view.initFocus(); }, 0);\n\t\t}\n\n\t\tif (\n\t\t\tthis.open && ev.key === \"Tab\" &&\n\t\t\t(this.dropdownMenu.nativeElement.contains(ev.target as Node) || ev.target === this.input.nativeElement)\n\t\t) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tif (this.open && ev.key === \"Tab\" && ev.shiftKey) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/*\n\t * no-op method for null event listeners, and other no op calls\n\t */\n\t_noop() {}\n\n\t/*\n\t * propagates the value provided from ngModel\n\t */\n\twriteValue(value: any) {\n\t\tif (this.type === \"single\") {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the specified item and update its state\n\t\t\t\tconst newValue = Object.assign({}, this.view.getListItems().find(item => item[this.itemValueKey] === value));\n\t\t\t\tnewValue.selected = true;\n\t\t\t\tthis.view.propagateSelected([newValue]);\n\t\t\t} else {\n\t\t\t\t// all items in propagateSelected must be iterable\n\t\t\t\tthis.view.propagateSelected([value || \"\"]);\n\t\t\t}\n\t\t\tthis.showClearButton = !!(value && this.view.getSelected().length);\n\t\t} else {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the items and update their state based on the received value array\n\t\t\t\t// this way we don't lose any additional metadata that may be passed in via the `items` Input\n\t\t\t\tlet newValues = [];\n\t\t\t\tfor (const v of value ?? []) {\n\t\t\t\t\tfor (const item of this.view.getListItems()) {\n\t\t\t\t\t\tif (item[this.itemValueKey] === v) {\n\t\t\t\t\t\t\tnewValues.push(Object.assign({}, item, { selected: true }));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.view.propagateSelected(newValues);\n\t\t\t} else {\n\t\t\t\tthis.view.propagateSelected(value ? value : [\"\"]);\n\t\t\t}\n\t\t}\n\t\tthis.updateSelected();\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChangeCallback = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the combobox.\n\t *\n\t * ex: `this.formGroup.get(\"myCoolCombobox\").disable();`\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Called by `n-pill-input` when the selected pills have changed.\n\t */\n\tpublic updatePills() {\n\t\tthis.pills = this.view.getSelected() || [];\n\t\tthis.checkForReorder();\n\t}\n\n\tpublic clearSelected(event) {\n\t\tthis.items = this.items.map(item => {\n\t\t\tif (!item.disabled) {\n\t\t\t\titem.selected = false;\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t\tthis.view.items = this.items;\n\t\tthis.updatePills();\n\t\t/**\n\t\t * @todo - In next major version update to the following:\n\t\t * const selected = this.type === \"multi\" ? this.view.getSelected() : undefined;\n\t\t *\n\t\t * Previously it returned an empty array even for type === 'single'\n\t\t * Also resolve #ref-1245723\n\t\t */\n\t\t// On type=multi we just emit getSelected() (just in case there's any disabled but selected items)\n\t\tconst selected = this.view.getSelected();\n\n\t\t// in case there are disabled items they should be mapped according to itemValueKey\n\t\tif (this.itemValueKey && selected) {\n\t\t\tconst values = selected.map((item) => item[this.itemValueKey]);\n\t\t\tthis.propagateChangeCallback(values);\n\t\t} else {\n\t\t\tthis.propagateChangeCallback(selected);\n\t\t}\n\n\t\tthis.selected.emit(selected as any);\n\t\tthis.clear.emit(event);\n\t}\n\n\t/**\n\t * Closes the dropdown and emits the close event.\n\t */\n\tpublic closeDropdown() {\n\t\tthis.open = false;\n\t\tthis.checkForReorder();\n\t\tthis.close.emit();\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t}\n\n\t/**\n\t * Opens the dropdown.\n\t */\n\tpublic openDropdown() {\n\t\tif (this.disabled || this.readonly) { return; }\n\t\tthis.open = true;\n\t\tthis._dropUp = false;\n\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\n\t\t// set the dropdown menu to drop up if it is near the bottom of the screen\n\t\t// setTimeout lets us do the calculations after it is visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tif (this.dropUp === null || this.dropUp === undefined) {\n\t\t\t\tthis._dropUp = this._shouldDropUp();\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\t/**\n\t * Toggles the dropdown.\n\t */\n\tpublic toggleDropdown() {\n\t\tif (this.open) {\n\t\t\tthis.closeDropdown();\n\t\t} else {\n\t\t\tthis.openDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the list group filter, and manages single select item selection.\n\t */\n\tpublic onSearch(searchString, shouldEmitSearch = true) {\n\t\tif (shouldEmitSearch) {\n\t\t\tthis.search.emit(searchString);\n\t\t}\n\t\tthis.showClearButton = !!searchString;\n\t\tthis.view.filterBy(searchString);\n\t\tif (searchString !== \"\") {\n\t\t\tif (!this.open) {\n\t\t\t\tthis.openDropdown();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.selectedValue = \"\";\n\t\t\tif (this.type === \"multi\" &&\n\t\t\t\t(this.selectionFeedback === \"top\" || this.selectionFeedback === \"top-after-reopen\")) {\n\t\t\t\tthis.view.reorderSelected();\n\t\t\t}\n\t\t}\n\t\tif (this.type === \"single\") {\n\t\t\t// deselect if the input doesn't match the content\n\t\t\t// of any given item\n\t\t\tconst matches = this.view.getListItems().some(item => item.content.toLowerCase().includes(searchString.toLowerCase()));\n\t\t\tif (!matches) {\n\t\t\t\tconst selected = this.view.getSelected();\n\t\t\t\tif (!selected || !selected[0]) {\n\t\t\t\t\tthis.view.filterBy(searchString);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Intended to be used to add items to the list.\n\t */\n\tpublic onSubmit(event: KeyboardEvent) {\n\t\tthis.submit.emit({\n\t\t\titems: this.view.getListItems(),\n\t\t\tindex: 0,\n\t\t\tvalue: {\n\t\t\t\tcontent: (event.target as HTMLInputElement).value,\n\t\t\t\tselected: false\n\t\t\t}\n\t\t});\n\t}\n\n\tclearInput(event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\n\t\tif (this.disabled || this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === \"single\") { // don't want to clear selected or close if multi\n\t\t\tthis.clearSelected(event);\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tthis.selectedValue = \"\";\n\t\tthis.input.nativeElement.value = \"\";\n\n\t\tthis.showClearButton = false;\n\t\tthis.input.nativeElement.focus();\n\t\tthis.onSearch(this.input.nativeElement.value);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\tif ((event.key === \"Escape\") && this.open) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeDropdown();\n\t\t\tthis.input.nativeElement.focus();\n\t\t} else if (this.open && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.input.nativeElement.focus();\n\t\t\tthis.input.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", { bubbles: true, cancelable: true, key: \"Tab\" }));\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.listbox.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\t`${this.elementRef.nativeElement.className}${this.open ? \" cds--list-box--expanded\" : \"\"}`);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Detects whether or not the `Dropdown` list is visible within all scrollable parents.\n\t * This can be overridden by passing in a value to the `dropUp` input.\n\t */\n\t_shouldDropUp() {\n\t\t// check if dropdownMenu exists first.\n\t\tconst menu = this.dropdownMenu && this.dropdownMenu.nativeElement.querySelector(\".cds--list-box__menu\");\n\t\t// check if menu exists first.\n\t\tconst menuRect = menu && menu.getBoundingClientRect();\n\t\tif (menu && menuRect) {\n\t\t\tconst scrollableParents = getScrollableParents(menu);\n\t\t\treturn scrollableParents.reduce((shouldDropUp: boolean, parent: HTMLElement) => {\n\t\t\t\tconst parentRect = parent.getBoundingClientRect();\n\t\t\t\tconst isBelowParent = !(menuRect.bottom <= parentRect.bottom);\n\t\t\t\treturn shouldDropUp || isBelowParent;\n\t\t\t}, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Handles clicks outside of the `Dropdown` list.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\thandleFocus(event: FocusEvent) {\n\t\tthis._isFocused = event.type === \"focus\";\n\t}\n\n\tprotected updateSelected() {\n\t\tconst selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\tthis.updatePills();\n\t\t} else if (selected) {\n\t\t\tconst value = selected[0] ? selected[0].content : \"\";\n\t\t\tconst changeCallbackValue = selected[0] ? selected[0] : \"\";\n\t\t\tthis.selectedValue = value;\n\t\t\tthis.showClearButton = !!value;\n\t\t}\n\t}\n\n\tprotected checkForReorder() {\n\t\tconst topAfterReopen = !this.open && this.selectionFeedback === \"top-after-reopen\";\n\t\tif ((this.type === \"multi\") && (topAfterReopen || this.selectionFeedback === \"top\")) {\n\t\t\tthis.view.reorderSelected(true);\n\t\t}\n\t}\n}\n",
27221
+ "sourceCode": "import {\n\tComponent,\n\tOnChanges,\n\tContentChild,\n\tInput,\n\tOutput,\n\tHostListener,\n\tElementRef,\n\tViewChild,\n\tEventEmitter,\n\tAfterViewInit,\n\tAfterContentInit,\n\tHostBinding,\n\tTemplateRef,\n\tOnDestroy\n} from \"@angular/core\";\nimport { AbstractDropdownView, DropdownService } from \"carbon-components-angular/dropdown\";\nimport { ListItem } from \"carbon-components-angular/dropdown\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { filter } from \"rxjs/operators\";\nimport {\n\tgetScrollableParents,\n\thasScrollableParents\n} from \"carbon-components-angular/utils\";\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { ComboBoxModule } from 'carbon-components-angular';\n * ```\n *\n * ComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\n * Multi-select comboboxes also provide \"pills\" of selected items.\n *\n * [See demo](../../?path=/story/components-combobox--basic)\n */\n@Component({\n\tselector: \"cds-combo-box, ibm-combo-box\",\n\ttemplate: `\n\t\t<div\n\t\t\tclass=\"cds--list-box__wrapper\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--list-box__wrapper--fluid': fluid,\n\t\t\t\t'cds--list-box__wrapper--fluid--invalid': fluid && invalid,\n\t\t\t\t'cds--list-box__wrapper--fluid--focus': fluid && _isFocused,\n\t\t\t\t'cds--list-box__wrapper--decorator': !!decorator\n\t\t\t}\">\n\t\t\t<label\n\t\t\t\t*ngIf=\"label\"\n\t\t\t\t[for]=\"id\"\n\t\t\t\t[id]=\"labelId\"\n\t\t\t\tclass=\"cds--label\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--label--disabled': disabled,\n\t\t\t\t\t'cds--visually-hidden': hideLabel\n\t\t\t\t}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t</label>\n\t\t\t<div\n\t\t\t\t#listbox\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--multi-select cds--multi-select--filterable': type === 'multi',\n\t\t\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t\t\t'cds--list-box--expanded': open,\n\t\t\t\t\t'cds--list-box--sm': size === 'sm',\n\t\t\t\t\t'cds--list-box--md': size === 'md',\n\t\t\t\t\t'cds--list-box--lg': size === 'lg',\n\t\t\t\t\t'cds--list-box--disabled': disabled,\n\t\t\t\t\t'cds--combo-box--readonly': readonly,\n\t\t\t\t\t'cds--combo-box--warning cds--list-box--warning': warn,\n\t\t\t\t\t'cds--list-box--invalid': invalid\n\t\t\t\t}\"\n\t\t\t\tclass=\"cds--list-box cds--combo-box\"\n\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--list-box__field\"\n\t\t\t\t\t(click)=\"toggleDropdown()\"\n\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"type === 'multi' && pills.length > 0\"\n\t\t\t\t\t\tclass=\"cds--tag cds--tag--filter cds--tag--high-contrast\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--tag--disabled': disabled || readonly}\">\n\t\t\t\t\t\t<span class=\"cds--tag__label\">{{ pills.length }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t(click)=\"clearSelected($event)\"\n\t\t\t\t\t\t\t(blur)=\"onBlur()\"\n\t\t\t\t\t\t\t(keydown.enter)=\"clearSelected($event)\"\n\t\t\t\t\t\t\tclass=\"cds--tag__close-icon\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\t[title]=\"clearSelectionsTitle\"\n\t\t\t\t\t\t\t[disabled]=\"disabled || readonly\"\n\t\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[readOnly]=\"readonly\"\n\t\t\t\t\t\t(input)=\"onSearch($event.target.value)\"\n\t\t\t\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t\t\t\t(blur)=\"fluid ? handleFocus($event) : onBlur()\"\n\t\t\t\t\t\t(keydown.enter)=\"onSubmit($event)\"\n\t\t\t\t\t\t[value]=\"selectedValue\"\n\t\t\t\t\t\tclass=\"cds--text-input\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--text-input--empty': !showClearButton}\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[id]=\"id\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"labelId\"\n\t\t\t\t\t\t[attr.aria-expanded]=\"open\"\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\t[attr.maxlength]=\"maxLength\"\n\t\t\t\t\t\t[attr.aria-controls]=\"open ? view?.listId : null\"\n\t\t\t\t\t\t[attr.aria-autocomplete]=\"autocomplete\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"/>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"showClearButton\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__selection\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\"\n\t\t\t\t\t\t[title]=\"clearSelectionTitle\"\n\t\t\t\t\t\t(keyup.enter)=\"clearInput($event)\"\n\t\t\t\t\t\t(click)=\"clearInput($event)\"\n\t\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t\t<svg cdsIcon=\"close\" size=\"16\"></svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__menu-icon\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t[title]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[attr.aria-label]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': open}\">\n\t\t\t\t\t\t<svg cdsIcon=\"chevron--down\" size=\"16\"></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<ng-container *ngIf=\"decorator\">\n\t\t\t\t\t<div class=\"cds--list-box__inner-wrapper--decorator\">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]=\"decorator\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t\t<div\n\t\t\t\t\t#dropdownMenu\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t\t\t}\">\n\t\t\t\t\t<ng-content *ngIf=\"open\"></ng-content>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n\t\t\t<div\n\t\t\t\t*ngIf=\"helperText && !invalid && !warn && !fluid\"\n\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboBox,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnDestroy {\n\t/**\n\t * Text to show when nothing is selected.\n\t */\n\t@Input() set placeholder(value: string | Observable<string>) {\n\t\tthis._placeholder.override(value);\n\t}\n\n\tget placeholder() {\n\t\treturn this._placeholder.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when closed\n\t */\n\t@Input() set openMenuAria(value: string | Observable<string>) {\n\t\tthis._openMenuAria.override(value);\n\t}\n\n\tget openMenuAria() {\n\t\treturn this._openMenuAria.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when opened\n\t */\n\t@Input() set closeMenuAria(value: string | Observable<string>) {\n\t\tthis._closeMenuAria.override(value);\n\t}\n\n\tget closeMenuAria() {\n\t\treturn this._closeMenuAria.value;\n\t}\n\t/**\n\t * Value to display on the clear selections icon, when multi is selected\n\t */\n\t@Input() set clearSelectionsTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionsTitle.override(value);\n\t}\n\n\tget clearSelectionsTitle() {\n\t\treturn this._clearSelectionsTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes to clear selections, when multi is selected\n\t */\n\t@Input() set clearSelectionsAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionsAria.override(value);\n\t}\n\n\tget clearSelectionsAria() {\n\t\treturn this._clearSelectionsAria.value;\n\t}\n\t/**\n\t * Value to display on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionTitle.override(value);\n\t}\n\n\tget clearSelectionTitle() {\n\t\treturn this._clearSelectionTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionAria.override(value);\n\t}\n\n\tget clearSelectionAria() {\n\t\treturn this._clearSelectionAria.value;\n\t}\n\tstatic comboBoxCount = 0;\n\t@Input() id = `combobox-${ComboBox.comboBoxCount++}`;\n\t@Input() labelId = `combobox-label-${ComboBox.comboBoxCount++}`;\n\t/**\n\t * List of items to fill the content with.\n\t *\n\t * **Example:**\n\t * ```javascript\n\t * items = [\n\t *\t\t{\n\t *\t\t\tcontent: \"Abacus\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Byte\",\n\t *\t\t\tselected: false,\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Computer\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Digital\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t * ];\n\t * ```\n\t *\n\t */\n\t@Input() items: Array<ListItem> = [];\n\t/**\n\t * Combo box type (supporting single or multi selection of items).\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * Combo box render size.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() itemValueKey: string;\n\t/**\n\t * Label for the combobox.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Hide label while keeping it accessible for screen readers\n\t */\n\t@Input() hideLabel = false;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\n\t/**\n\t * **Experimental**: Optional decorator (e.g. AI label).\n\t */\n\t@Input() decorator: TemplateRef<any>;\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline: boolean = null;\n\t/**\n\t * Set to `true` to show the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if combobox is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t* Set to `true` to show a warning (contents set by warnText)\n\t*/\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\t/**\n\t * Max length value to limit input characters\n\t */\n\t@Input() maxLength: number = null;\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Specify feedback (mode) of the selection.\n\t * `top`: selected item jumps to top\n\t * `fixed`: selected item stays at its position\n\t * `top-after-reopen`: selected item jump to top after reopen dropdown\n\t */\n\t@Input() selectionFeedback: \"top\" | \"fixed\" | \"top-after-reopen\" = \"top-after-reopen\";\n\t/**\n\t * Specify aria-autocomplete attribute of text input.\n\t * \"list\", is the expected value for a combobox that invokes a drop-down list\n\t */\n\t@Input() autocomplete = \"list\";\n\t/**\n\t * Overrides the automatic dropUp.\n\t */\n\t@Input() dropUp: boolean;\n\t/**\n\t * Set to `true` to disable combobox.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for readonly state.\n\t */\n\t@Input() readonly = false;\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@Input() fluid = false;\n\t/**\n\t * Emits a ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t * \t\tcontent: \"one\",\n\t * \t\tselected: true\n\t * }\n\t * ```\n\t */\n\t@Output() selected = new EventEmitter<ListItem | ListItem[]>();\n\t/**\n\t * Intended to be used to add items to the list.\n\t *\n\t * Emits an event that includes the current item list, the suggested index for the new item, and a simple ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t *\t{\n\t *\t\titems: [{content: \"one\", selected: true}, {content: \"two\", selected: true}],\n\t *\t\tindex: 1,\n\t *\t\tvalue: {\n\t *\t\t\tcontent: \"some user string\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t *\t}\n\t * ```\n\t *\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t *\tafter: 1,\n\t *\tvalue: \"some user string\"\n\t * }\n\t * ```\n\t */\n\t@Output() submit = new EventEmitter<{\n\t\titems: ListItem[],\n\t\tindex: number,\n\t\tvalue: {\n\t\t\tcontent: string,\n\t\t\tselected: boolean\n\t\t}\n\t}>();\n\t/** Emits an empty event when the menu is closed */\n\t@Output() close = new EventEmitter<void>();\n\t/** Emits the search string from the input */\n\t@Output() search = new EventEmitter<string>();\n\t/** Emits an event when the clear button is clicked. */\n\t@Output() clear = new EventEmitter<Event>();\n\t/** ContentChild reference to the instantiated dropdown list */\n\t@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;\n\t@ViewChild(\"dropdownMenu\") dropdownMenu;\n\t@ViewChild(\"input\", { static: true }) input: ElementRef;\n\t@ViewChild(\"listbox\", { static: true }) listbox: ElementRef;\n\t@HostBinding(\"class.cds--list-box__wrapper\") hostClass = true;\n\n\tpublic open = false;\n\n\tpublic showClearButton = false;\n\n\t/** Selected items for multi-select combo-boxes. */\n\tpublic pills = [];\n\t/** used to update the displayValue */\n\tpublic selectedValue = \"\";\n\n\toutsideClick = this._outsideClick.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\t/**\n\t * controls whether the `drop-up` class is applied\n\t */\n\t_dropUp = false;\n\n\tprotected noop = this._noop.bind(this);\n\tprotected onTouchedCallback: () => void = this._noop;\n\tprotected propagateChangeCallback: (_: any) => void = this._noop;\n\n\tprotected _placeholder = this.i18n.getOverridable(\"COMBOBOX.PLACEHOLDER\");\n\tprotected _closeMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLOSE_MENU\");\n\tprotected _openMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.OPEN_MENU\");\n\tprotected _clearSelectionsTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionsAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTED\");\n\tprotected _clearSelectionAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTED\");\n\n\tprotected _isFocused = false;\n\n\tprivate _writtenValue: any;\n\tprivate _isUsingNgControl = false;\n\n\t/**\n\t * Creates an instance of ComboBox.\n\t */\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected dropdownService: DropdownService,\n\t\tprotected i18n: I18n\n\t) {}\n\n\t/**\n\t * Lifecycle hook.\n\t * Updates pills if necessary.\n\t *\n\t */\n\tngOnChanges(changes) {\n\t\tif (changes.items) {\n\t\t\tthis.view.items = changes.items.currentValue;\n\t\t\tthis.updateSelected();\n\t\t\t// If new items are added into the combobox while there is search input,\n\t\t\t// repeat the search. Search should only trigger for type 'single' when there is no value selected.\n\t\t\tif (this.type === \"multi\" || (this.type === \"single\" && !this.selectedValue)) {\n\t\t\t\tthis.onSearch(this.input.nativeElement.value, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets initial state that depends on child components\n\t * Subscribes to select events and handles focus/filtering/initial list updates\n\t */\n\tngAfterContentInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\n\t\t\t// function to check if the event is organic (isUpdate === false) or programmatic\n\t\t\tconst isUpdate = event => event && event.isUpdate;\n\n\t\t\tthis.view.select.subscribe(event => {\n\t\t\t\tif (Array.isArray(event)) {\n\t\t\t\t\tthis.updatePills();\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tif (this.itemValueKey && this.view.getSelected()) {\n\t\t\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.itemValueKey]);\n\t\t\t\t\t\t\tthis._propagateChange(values);\n\t\t\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._propagateChange(this.view.getSelected());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.selected.emit(event);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If type is single, dropdown list will emit an object\n\t\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\t\tthis.showClearButton = true;\n\t\t\t\t\t\tthis.selectedValue = event.item.content;\n\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t\t\t\tthis._propagateChange(event.item[this.itemValueKey]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._propagateChange(event.item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.selectedValue = \"\";\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tthis._propagateChange(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// not guarding these since the nativeElement has to be loaded\n\t\t\t\t\t// for select to even fire\n\t\t\t\t\t// only focus for \"organic\" selections\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tthis.elementRef.nativeElement.querySelector(\"input\").focus();\n\t\t\t\t\t\tthis.view.filterBy(\"\");\n\t\t\t\t\t\tthis.selected.emit(event.item);\n\t\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t\t} else if (this._isUsingNgControl) {\n\t\t\t\t\t\tthis.writeValue(this._writtenValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t// update the rest of combobox with any pre-selected items\n\t\t\t// setTimeout just defers the call to the next check cycle\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.updateSelected();\n\t\t\t});\n\n\t\t\tthis.view.blurIntent.pipe(filter(v => v === \"top\")).subscribe(() => {\n\t\t\t\tthis.elementRef.nativeElement.querySelector(\".cds--text-input\").focus();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Binds event handlers against the rendered view\n\t */\n\tngAfterViewInit() {\n\t\t// if appendInline is default valued (null) we should:\n\t\t// 1. if there are scrollable parents (not including body) don't append inline\n\t\t// this should also cover the case where the dropdown is in a modal\n\t\t// (where we _do_ want to append to the placeholder)\n\t\tif (this.appendInline === null && hasScrollableParents(this.elementRef.nativeElement)) {\n\t\t\tthis.appendInline = false;\n\t\t// 2. otherwise we should append inline\n\t\t} else if (this.appendInline === null) {\n\t\t\tthis.appendInline = true;\n\t\t}\n\t}\n\n\t/**\n\t * Removing the `Dropdown` from the body if it is appended to the body.\n\t */\n\tngOnDestroy() {\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Handles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\thostkeys(ev: KeyboardEvent) {\n\t\tif (ev.key === \"Escape\") {\n\t\t\tthis.closeDropdown();\n\t\t} else if ((ev.key === \"ArrowDown\")\n\t\t\t&& (!this.dropdownMenu || !this.dropdownMenu.nativeElement.contains(ev.target))) {\n\t\t\tev.preventDefault();\n\t\t\tthis.openDropdown();\n\t\t\tsetTimeout(() => { this.view.initFocus(); }, 0);\n\t\t}\n\n\t\tif (\n\t\t\tthis.open && ev.key === \"Tab\" &&\n\t\t\t(this.dropdownMenu.nativeElement.contains(ev.target as Node) || ev.target === this.input.nativeElement)\n\t\t) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tif (this.open && ev.key === \"Tab\" && ev.shiftKey) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/*\n\t * no-op method for null event listeners, and other no op calls\n\t */\n\t_noop() {}\n\n\t/*\n\t * propagates the value provided from ngModel\n\t */\n\twriteValue(value: any) {\n\t\tthis._writtenValue = value;\n\n\t\tif (this.type === \"single\") {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the specified item and update its state\n\t\t\t\tconst newValue = Object.assign({}, this.view.getListItems().find(item => item[this.itemValueKey] === value));\n\t\t\t\tnewValue.selected = true;\n\t\t\t\tthis.view.propagateSelected([newValue]);\n\t\t\t} else {\n\t\t\t\t// all items in propagateSelected must be iterable\n\t\t\t\tthis.view.propagateSelected([value || \"\"]);\n\t\t\t}\n\t\t\tthis.showClearButton = !!(value && this.view.getSelected().length);\n\t\t} else {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the items and update their state based on the received value array\n\t\t\t\t// this way we don't lose any additional metadata that may be passed in via the `items` Input\n\t\t\t\tlet newValues = [];\n\t\t\t\tfor (const v of value ?? []) {\n\t\t\t\t\tfor (const item of this.view.getListItems()) {\n\t\t\t\t\t\tif (item[this.itemValueKey] === v) {\n\t\t\t\t\t\t\tnewValues.push(Object.assign({}, item, { selected: true }));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.view.propagateSelected(newValues);\n\t\t\t} else {\n\t\t\t\tthis.view.propagateSelected(value ? value : [\"\"]);\n\t\t\t}\n\t\t}\n\t\tthis.updateSelected();\n\t}\n\n\tprivate _propagateChange(value: any) {\n\t\tthis._writtenValue = value;\n\t\tthis.propagateChangeCallback(value);\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis._isUsingNgControl = true;\n\t\tthis.propagateChangeCallback = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the combobox.\n\t *\n\t * ex: `this.formGroup.get(\"myCoolCombobox\").disable();`\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Called by `n-pill-input` when the selected pills have changed.\n\t */\n\tpublic updatePills() {\n\t\tthis.pills = this.view.getSelected() || [];\n\t\tthis.checkForReorder();\n\t}\n\n\tpublic clearSelected(event) {\n\t\tthis.items = this.items.map(item => {\n\t\t\tif (!item.disabled) {\n\t\t\t\titem.selected = false;\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t\tthis.view.propagateSelected([]);\n\t\tthis.updatePills();\n\t\t/**\n\t\t * @todo - In next major version update to the following:\n\t\t * const selected = this.type === \"multi\" ? this.view.getSelected() : undefined;\n\t\t *\n\t\t * Previously it returned an empty array even for type === 'single'\n\t\t * Also resolve #ref-1245723\n\t\t */\n\t\t// On type=multi we just emit getSelected() (just in case there's any disabled but selected items)\n\t\tconst selected = this.view.getSelected();\n\n\t\t// in case there are disabled items they should be mapped according to itemValueKey\n\t\tif (this.itemValueKey && selected) {\n\t\t\tconst values = selected.map((item) => item[this.itemValueKey]);\n\t\t\tthis._propagateChange(values);\n\t\t} else {\n\t\t\tthis._propagateChange(selected);\n\t\t}\n\n\t\tthis.selected.emit(selected as any);\n\t\tthis.clear.emit(event);\n\t}\n\n\t/**\n\t * Closes the dropdown and emits the close event.\n\t */\n\tpublic closeDropdown() {\n\t\tthis.open = false;\n\t\tthis.checkForReorder();\n\t\tthis.close.emit();\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t}\n\n\t/**\n\t * Opens the dropdown.\n\t */\n\tpublic openDropdown() {\n\t\tif (this.disabled || this.readonly) { return; }\n\t\tthis.open = true;\n\t\tthis._dropUp = false;\n\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\n\t\t// set the dropdown menu to drop up if it is near the bottom of the screen\n\t\t// setTimeout lets us do the calculations after it is visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tif (this.dropUp === null || this.dropUp === undefined) {\n\t\t\t\tthis._dropUp = this._shouldDropUp();\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\t/**\n\t * Toggles the dropdown.\n\t */\n\tpublic toggleDropdown() {\n\t\tif (this.open) {\n\t\t\tthis.closeDropdown();\n\t\t} else {\n\t\t\tthis.openDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the list group filter, and manages single select item selection.\n\t */\n\tpublic onSearch(searchString, shouldEmitSearch = true) {\n\t\tif (shouldEmitSearch) {\n\t\t\tthis.search.emit(searchString);\n\t\t}\n\t\tthis.showClearButton = !!searchString;\n\t\tthis.view.filterBy(searchString);\n\t\tif (searchString !== \"\") {\n\t\t\tif (!this.open) {\n\t\t\t\tthis.openDropdown();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.selectedValue = \"\";\n\t\t\tif (this.type === \"multi\" &&\n\t\t\t\t(this.selectionFeedback === \"top\" || this.selectionFeedback === \"top-after-reopen\")) {\n\t\t\t\tthis.view.reorderSelected();\n\t\t\t}\n\t\t}\n\t\tif (this.type === \"single\") {\n\t\t\t// deselect if the input doesn't match the content\n\t\t\t// of any given item\n\t\t\tconst matches = this.view.getListItems().some(item => item.content.toLowerCase().includes(searchString.toLowerCase()));\n\t\t\tif (!matches) {\n\t\t\t\tconst selected = this.view.getSelected();\n\t\t\t\tif (!selected || !selected[0]) {\n\t\t\t\t\tthis.view.filterBy(searchString);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Intended to be used to add items to the list.\n\t */\n\tpublic onSubmit(event: KeyboardEvent) {\n\t\tthis.submit.emit({\n\t\t\titems: this.view.getListItems(),\n\t\t\tindex: 0,\n\t\t\tvalue: {\n\t\t\t\tcontent: (event.target as HTMLInputElement).value,\n\t\t\t\tselected: false\n\t\t\t}\n\t\t});\n\t}\n\n\tclearInput(event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\n\t\tif (this.disabled || this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === \"single\") { // don't want to clear selected or close if multi\n\t\t\tthis.clearSelected(event);\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tthis.selectedValue = \"\";\n\t\tthis.input.nativeElement.value = \"\";\n\n\t\tthis.showClearButton = false;\n\t\tthis.input.nativeElement.focus();\n\t\tthis.onSearch(this.input.nativeElement.value);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\tif ((event.key === \"Escape\") && this.open) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeDropdown();\n\t\t\tthis.input.nativeElement.focus();\n\t\t} else if (this.open && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.input.nativeElement.focus();\n\t\t\tthis.input.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", { bubbles: true, cancelable: true, key: \"Tab\" }));\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.listbox.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\t`${this.elementRef.nativeElement.className}${this.open ? \" cds--list-box--expanded\" : \"\"}`);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Detects whether or not the `Dropdown` list is visible within all scrollable parents.\n\t * This can be overridden by passing in a value to the `dropUp` input.\n\t */\n\t_shouldDropUp() {\n\t\t// check if dropdownMenu exists first.\n\t\tconst menu = this.dropdownMenu && this.dropdownMenu.nativeElement.querySelector(\".cds--list-box__menu\");\n\t\t// check if menu exists first.\n\t\tconst menuRect = menu && menu.getBoundingClientRect();\n\t\tif (menu && menuRect) {\n\t\t\tconst scrollableParents = getScrollableParents(menu);\n\t\t\treturn scrollableParents.reduce((shouldDropUp: boolean, parent: HTMLElement) => {\n\t\t\t\tconst parentRect = parent.getBoundingClientRect();\n\t\t\t\tconst isBelowParent = !(menuRect.bottom <= parentRect.bottom);\n\t\t\t\treturn shouldDropUp || isBelowParent;\n\t\t\t}, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Handles clicks outside of the `Dropdown` list.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\thandleFocus(event: FocusEvent) {\n\t\tthis._isFocused = event.type === \"focus\";\n\t}\n\n\tprotected updateSelected() {\n\t\tconst selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\tthis.updatePills();\n\t\t} else if (selected) {\n\t\t\tconst value = selected[0] ? selected[0].content : \"\";\n\t\t\tconst changeCallbackValue = selected[0] ? selected[0] : \"\";\n\t\t\tthis.selectedValue = value;\n\t\t\tthis.showClearButton = !!value;\n\t\t}\n\t}\n\n\tprotected checkForReorder() {\n\t\tconst topAfterReopen = !this.open && this.selectionFeedback === \"top-after-reopen\";\n\t\tif ((this.type === \"multi\") && (topAfterReopen || this.selectionFeedback === \"top\")) {\n\t\t\tthis.view.reorderSelected(true);\n\t\t}\n\t}\n}\n",
27222
27222
  "assetsDirs": [],
27223
27223
  "styleUrlsData": "",
27224
27224
  "stylesData": "",
@@ -27247,7 +27247,7 @@
27247
27247
  "deprecationMessage": ""
27248
27248
  }
27249
27249
  ],
27250
- "line": 482,
27250
+ "line": 485,
27251
27251
  "rawdescription": "\n\nCreates an instance of ComboBox.\n",
27252
27252
  "jsdoctags": [
27253
27253
  {
@@ -32255,7 +32255,7 @@
32255
32255
  },
32256
32256
  {
32257
32257
  "name": "Dropdown",
32258
- "id": "component-Dropdown-497142e1142f75cf01eb89dfae3eea2f17fe84b2b116a53cabd7a1edbbf7b5fd07338d726c3ac03f2728bde4c31fbb8daef7d4519f1bfbbb726671fdffeccfd9",
32258
+ "id": "component-Dropdown-8323b47b0d5e3f1be053855e9caaf816eeb43797684a23deb2f798678d396b662a0ce7965b19db845d26a22d4b0904c52285556976ef4890d549b5a9d34d4119",
32259
32259
  "file": "src/dropdown/dropdown.component.ts",
32260
32260
  "encapsulation": [],
32261
32261
  "entryComponents": [],
@@ -32274,6 +32274,17 @@
32274
32274
  "viewProviders": [],
32275
32275
  "hostDirectives": [],
32276
32276
  "inputsClass": [
32277
+ {
32278
+ "name": "allowNullValues",
32279
+ "defaultValue": "false",
32280
+ "deprecated": false,
32281
+ "deprecationMessage": "",
32282
+ "rawdescription": "\n\nSet to `true` to allow null values in the dropdown ListItems.\n",
32283
+ "description": "<p>Set to <code>true</code> to allow null values in the dropdown ListItems.</p>\n",
32284
+ "line": 331,
32285
+ "type": "boolean",
32286
+ "decorators": []
32287
+ },
32277
32288
  {
32278
32289
  "name": "appendInline",
32279
32290
  "defaultValue": "null",
@@ -32281,7 +32292,7 @@
32281
32292
  "deprecationMessage": "",
32282
32293
  "rawdescription": "\n\nset to `true` to place the dropdown view inline with the component\n",
32283
32294
  "description": "<p>set to <code>true</code> to place the dropdown view inline with the component</p>\n",
32284
- "line": 296,
32295
+ "line": 297,
32285
32296
  "type": "boolean",
32286
32297
  "decorators": []
32287
32298
  },
@@ -32292,7 +32303,7 @@
32292
32303
  "deprecationMessage": "",
32293
32304
  "rawdescription": "\n\nSets the optional clear button tooltip text.\n",
32294
32305
  "description": "<p>Sets the optional clear button tooltip text.</p>\n",
32295
- "line": 242,
32306
+ "line": 243,
32296
32307
  "type": "string",
32297
32308
  "decorators": []
32298
32309
  },
@@ -32302,7 +32313,7 @@
32302
32313
  "deprecationMessage": "",
32303
32314
  "rawdescription": "\n\n**Experimental**: Optional decorator (e.g. AI label).\n",
32304
32315
  "description": "<p><strong>Experimental</strong>: Optional decorator (e.g. AI label).</p>\n",
32305
- "line": 230,
32316
+ "line": 231,
32306
32317
  "type": "TemplateRef<any>",
32307
32318
  "decorators": []
32308
32319
  },
@@ -32313,7 +32324,7 @@
32313
32324
  "deprecationMessage": "",
32314
32325
  "rawdescription": "\n\nSet to `true` for a dropdown without arrow key activation.\n",
32315
32326
  "description": "<p>Set to <code>true</code> for a dropdown without arrow key activation.</p>\n",
32316
- "line": 276,
32327
+ "line": 277,
32317
32328
  "type": "boolean",
32318
32329
  "decorators": []
32319
32330
  },
@@ -32324,7 +32335,7 @@
32324
32335
  "deprecationMessage": "",
32325
32336
  "rawdescription": "\n\nSet to `true` to disable the dropdown.\n",
32326
32337
  "description": "<p>Set to <code>true</code> to disable the dropdown.</p>\n",
32327
- "line": 260,
32338
+ "line": 261,
32328
32339
  "type": "boolean",
32329
32340
  "decorators": []
32330
32341
  },
@@ -32335,7 +32346,7 @@
32335
32346
  "deprecationMessage": "",
32336
32347
  "rawdescription": "\n\nThe selected value from the `Dropdown`. Can be a string or template.\n",
32337
32348
  "description": "<p>The selected value from the <code>Dropdown</code>. Can be a string or template.</p>\n",
32338
- "line": 238,
32349
+ "line": 239,
32339
32350
  "type": "string | TemplateRef<any>",
32340
32351
  "decorators": []
32341
32352
  },
@@ -32345,7 +32356,7 @@
32345
32356
  "deprecationMessage": "",
32346
32357
  "rawdescription": "\n\nOverrides the automatic dropUp.\n",
32347
32358
  "description": "<p>Overrides the automatic dropUp.</p>\n",
32348
- "line": 326,
32359
+ "line": 327,
32349
32360
  "type": "boolean",
32350
32361
  "decorators": []
32351
32362
  },
@@ -32356,7 +32367,7 @@
32356
32367
  "deprecationMessage": "",
32357
32368
  "rawdescription": "\n\nExperimental: enable fluid state\n",
32358
32369
  "description": "<p>Experimental: enable fluid state</p>\n",
32359
- "line": 364,
32370
+ "line": 369,
32360
32371
  "type": "boolean",
32361
32372
  "decorators": []
32362
32373
  },
@@ -32366,7 +32377,7 @@
32366
32377
  "deprecationMessage": "",
32367
32378
  "rawdescription": "\n\nSets the optional helper text.\n",
32368
32379
  "description": "<p>Sets the optional helper text.</p>\n",
32369
- "line": 226,
32380
+ "line": 227,
32370
32381
  "type": "string | TemplateRef<any>",
32371
32382
  "decorators": []
32372
32383
  },
@@ -32377,7 +32388,7 @@
32377
32388
  "deprecationMessage": "",
32378
32389
  "rawdescription": "\n\nHide label while keeping it accessible for screen readers\n",
32379
32390
  "description": "<p>Hide label while keeping it accessible for screen readers</p>\n",
32380
- "line": 222,
32391
+ "line": 223,
32381
32392
  "type": "boolean",
32382
32393
  "decorators": []
32383
32394
  },
@@ -32386,7 +32397,7 @@
32386
32397
  "defaultValue": "`dropdown-${Dropdown.dropdownCount++}`",
32387
32398
  "deprecated": false,
32388
32399
  "deprecationMessage": "",
32389
- "line": 214,
32400
+ "line": 215,
32390
32401
  "type": "string",
32391
32402
  "decorators": []
32392
32403
  },
@@ -32397,7 +32408,7 @@
32397
32408
  "deprecationMessage": "",
32398
32409
  "rawdescription": "\n\nSet to `true` for an inline dropdown.\n",
32399
32410
  "description": "<p>Set to <code>true</code> for an inline dropdown.</p>\n",
32400
- "line": 272,
32411
+ "line": 273,
32401
32412
  "type": "boolean",
32402
32413
  "decorators": []
32403
32414
  },
@@ -32408,7 +32419,7 @@
32408
32419
  "deprecationMessage": "",
32409
32420
  "rawdescription": "\n\nSet to `true` for invalid state.\n",
32410
32421
  "description": "<p>Set to <code>true</code> for invalid state.</p>\n",
32411
- "line": 280,
32422
+ "line": 281,
32412
32423
  "type": "boolean",
32413
32424
  "decorators": []
32414
32425
  },
@@ -32418,7 +32429,7 @@
32418
32429
  "deprecationMessage": "",
32419
32430
  "rawdescription": "\n\nValue displayed if dropdown is in invalid state.\n",
32420
32431
  "description": "<p>Value displayed if dropdown is in invalid state.</p>\n",
32421
- "line": 284,
32432
+ "line": 285,
32422
32433
  "type": "string | TemplateRef<any>",
32423
32434
  "decorators": []
32424
32435
  },
@@ -32428,7 +32439,7 @@
32428
32439
  "deprecationMessage": "",
32429
32440
  "rawdescription": "\n\nSpecifies the property to be used as the return value to `ngModel`\n",
32430
32441
  "description": "<p>Specifies the property to be used as the return value to <code>ngModel</code></p>\n",
32431
- "line": 305,
32442
+ "line": 306,
32432
32443
  "type": "string",
32433
32444
  "decorators": []
32434
32445
  },
@@ -32438,7 +32449,7 @@
32438
32449
  "deprecationMessage": "",
32439
32450
  "rawdescription": "\n\nLabel for the dropdown.\n",
32440
32451
  "description": "<p>Label for the dropdown.</p>\n",
32441
- "line": 218,
32452
+ "line": 219,
32442
32453
  "type": "string | TemplateRef<any>",
32443
32454
  "decorators": []
32444
32455
  },
@@ -32449,7 +32460,7 @@
32449
32460
  "deprecationMessage": "",
32450
32461
  "rawdescription": "\n\nAccessible label for the button that opens the dropdown list.\nDefaults to the `DROPDOWN.OPEN` value from the i18n service.\n",
32451
32462
  "description": "<p>Accessible label for the button that opens the dropdown list.\nDefaults to the <code>DROPDOWN.OPEN</code> value from the i18n service.</p>\n",
32452
- "line": 317,
32463
+ "line": 318,
32453
32464
  "type": "any",
32454
32465
  "decorators": []
32455
32466
  },
@@ -32460,7 +32471,7 @@
32460
32471
  "deprecationMessage": "",
32461
32472
  "rawdescription": "\n\nValue displayed if no item is selected.\n",
32462
32473
  "description": "<p>Value displayed if no item is selected.</p>\n",
32463
- "line": 234,
32474
+ "line": 235,
32464
32475
  "type": "string",
32465
32476
  "decorators": []
32466
32477
  },
@@ -32471,7 +32482,7 @@
32471
32482
  "deprecationMessage": "",
32472
32483
  "rawdescription": "\n\nSet to `true` for a readonly state.\n",
32473
32484
  "description": "<p>Set to <code>true</code> for a readonly state.</p>\n",
32474
- "line": 264,
32485
+ "line": 265,
32475
32486
  "type": "boolean",
32476
32487
  "decorators": []
32477
32488
  },
@@ -32481,7 +32492,7 @@
32481
32492
  "deprecationMessage": "",
32482
32493
  "rawdescription": "\n\nQuery string for the element that contains the `Dropdown`.\nUsed to trigger closing the dropdown if it scrolls outside of the viewport of the `scrollableContainer`.\n",
32483
32494
  "description": "<p>Query string for the element that contains the <code>Dropdown</code>.\nUsed to trigger closing the dropdown if it scrolls outside of the viewport of the <code>scrollableContainer</code>.</p>\n",
32484
- "line": 301,
32495
+ "line": 302,
32485
32496
  "type": "string",
32486
32497
  "decorators": []
32487
32498
  },
@@ -32492,7 +32503,7 @@
32492
32503
  "deprecationMessage": "",
32493
32504
  "rawdescription": "\n\nProvides the label for the \"# selected\" text.\nDefaults to the `DROPDOWN.SELECTED` value from the i18n service.\n",
32494
32505
  "description": "<p>Provides the label for the &quot;# selected&quot; text.\nDefaults to the <code>DROPDOWN.SELECTED</code> value from the i18n service.</p>\n",
32495
- "line": 322,
32506
+ "line": 323,
32496
32507
  "type": "any",
32497
32508
  "decorators": []
32498
32509
  },
@@ -32503,7 +32514,7 @@
32503
32514
  "deprecationMessage": "",
32504
32515
  "rawdescription": "\n\nSpecify feedback (mode) of the selection.\n`top`: selected item jumps to top\n`fixed`: selected item stays at it's position\n`top-after-reopen`: selected item jump to top after reopen dropdown\n",
32505
32516
  "description": "<p>Specify feedback (mode) of the selection.\n<code>top</code>: selected item jumps to top\n<code>fixed</code>: selected item stays at it&#39;s position\n<code>top-after-reopen</code>: selected item jump to top after reopen dropdown</p>\n",
32506
- "line": 312,
32517
+ "line": 313,
32507
32518
  "type": "\"top\" | \"fixed\" | \"top-after-reopen\"",
32508
32519
  "decorators": []
32509
32520
  },
@@ -32514,7 +32525,7 @@
32514
32525
  "deprecationMessage": "",
32515
32526
  "rawdescription": "\n\nSize to render the dropdown field.\n",
32516
32527
  "description": "<p>Size to render the dropdown field.</p>\n",
32517
- "line": 246,
32528
+ "line": 247,
32518
32529
  "type": "\"sm\" | \"md\" | \"lg\"",
32519
32530
  "decorators": []
32520
32531
  },
@@ -32525,7 +32536,7 @@
32525
32536
  "deprecationMessage": "",
32526
32537
  "rawdescription": "\n\nSet to `true` for a loading dropdown.\n",
32527
32538
  "description": "<p>Set to <code>true</code> for a loading dropdown.</p>\n",
32528
- "line": 268,
32539
+ "line": 269,
32529
32540
  "type": "boolean",
32530
32541
  "decorators": []
32531
32542
  },
@@ -32536,15 +32547,15 @@
32536
32547
  "deprecationMessage": "since v5 - Use `cdsLayer` directive instead\n`light` or `dark` dropdown theme",
32537
32548
  "jsdoctags": [
32538
32549
  {
32539
- "pos": 8031,
32540
- "end": 8126,
32550
+ "pos": 8080,
32551
+ "end": 8175,
32541
32552
  "flags": 16842752,
32542
32553
  "modifierFlagsCache": 0,
32543
32554
  "transformFlags": 0,
32544
32555
  "kind": 338,
32545
32556
  "tagName": {
32546
- "pos": 8032,
32547
- "end": 8042,
32557
+ "pos": 8081,
32558
+ "end": 8091,
32548
32559
  "flags": 16842752,
32549
32560
  "modifierFlagsCache": 0,
32550
32561
  "transformFlags": 0,
@@ -32554,7 +32565,7 @@
32554
32565
  "comment": "<p>since v5 - Use <code>cdsLayer</code> directive instead\n<code>light</code> or <code>dark</code> dropdown theme</p>\n"
32555
32566
  }
32556
32567
  ],
32557
- "line": 256,
32568
+ "line": 257,
32558
32569
  "type": "\"light\" | \"dark\"",
32559
32570
  "decorators": []
32560
32571
  },
@@ -32565,7 +32576,7 @@
32565
32576
  "deprecationMessage": "",
32566
32577
  "rawdescription": "\n\nDefines whether or not the `Dropdown` supports selecting multiple items as opposed to single\nitem selection.\n",
32567
32578
  "description": "<p>Defines whether or not the <code>Dropdown</code> supports selecting multiple items as opposed to single\nitem selection.</p>\n",
32568
- "line": 251,
32579
+ "line": 252,
32569
32580
  "type": "\"single\" | \"multi\"",
32570
32581
  "decorators": []
32571
32582
  },
@@ -32576,7 +32587,7 @@
32576
32587
  "deprecationMessage": "",
32577
32588
  "rawdescription": "\n\nSet to `true` to show a warning (contents set by warningText)\n",
32578
32589
  "description": "<p>Set to <code>true</code> to show a warning (contents set by warningText)</p>\n",
32579
- "line": 288,
32590
+ "line": 289,
32580
32591
  "type": "boolean",
32581
32592
  "decorators": []
32582
32593
  },
@@ -32586,7 +32597,7 @@
32586
32597
  "deprecationMessage": "",
32587
32598
  "rawdescription": "\n\nSets the warning text\n",
32588
32599
  "description": "<p>Sets the warning text</p>\n",
32589
- "line": 292,
32600
+ "line": 293,
32590
32601
  "type": "string | TemplateRef<any>",
32591
32602
  "decorators": []
32592
32603
  }
@@ -32599,7 +32610,7 @@
32599
32610
  "deprecationMessage": "",
32600
32611
  "rawdescription": "\n\nEmits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n",
32601
32612
  "description": "<p>Emits event notifying to other classes that the <code>Dropdown</code> has been closed (collapsed).</p>\n",
32602
- "line": 338,
32613
+ "line": 343,
32603
32614
  "type": "EventEmitter<any>"
32604
32615
  },
32605
32616
  {
@@ -32609,7 +32620,7 @@
32609
32620
  "deprecationMessage": "",
32610
32621
  "rawdescription": "\n\nEmits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n",
32611
32622
  "description": "<p>Emits event notifying to other classes that the <code>Dropdown</code> has been closed (collapsed).</p>\n",
32612
- "line": 334,
32623
+ "line": 339,
32613
32624
  "type": "EventEmitter<any>"
32614
32625
  },
32615
32626
  {
@@ -32619,7 +32630,7 @@
32619
32630
  "deprecationMessage": "",
32620
32631
  "rawdescription": "\n\nEmits selection events.\n",
32621
32632
  "description": "<p>Emits selection events.</p>\n",
32622
- "line": 330,
32633
+ "line": 335,
32623
32634
  "type": "EventEmitter<Object>"
32624
32635
  }
32625
32636
  ],
@@ -32632,7 +32643,7 @@
32632
32643
  "type": "",
32633
32644
  "optional": false,
32634
32645
  "description": "<p>controls whether the <code>drop-up</code> class is applied</p>\n",
32635
- "line": 374,
32646
+ "line": 379,
32636
32647
  "rawdescription": "\n\ncontrols whether the `drop-up` class is applied\n"
32637
32648
  },
32638
32649
  {
@@ -32642,7 +32653,7 @@
32642
32653
  "type": "",
32643
32654
  "optional": false,
32644
32655
  "description": "<p>Maintains a reference to the view DOM element of the <code>Dropdown</code> button.</p>\n",
32645
- "line": 347,
32656
+ "line": 352,
32646
32657
  "rawdescription": "\n\nMaintains a reference to the view DOM element of the `Dropdown` button.\n",
32647
32658
  "decorators": [
32648
32659
  {
@@ -32662,7 +32673,7 @@
32662
32673
  "type": "number",
32663
32674
  "optional": false,
32664
32675
  "description": "",
32665
- "line": 194,
32676
+ "line": 195,
32666
32677
  "modifierKind": [
32667
32678
  126
32668
32679
  ]
@@ -32674,7 +32685,7 @@
32674
32685
  "type": "",
32675
32686
  "optional": false,
32676
32687
  "description": "<p>ViewChid of the dropdown view.</p>\n",
32677
- "line": 351,
32688
+ "line": 356,
32678
32689
  "rawdescription": "\n\nViewChid of the dropdown view.\n",
32679
32690
  "decorators": [
32680
32691
  {
@@ -32694,7 +32705,7 @@
32694
32705
  "type": "",
32695
32706
  "optional": false,
32696
32707
  "description": "",
32697
- "line": 353,
32708
+ "line": 358,
32698
32709
  "decorators": [
32699
32710
  {
32700
32711
  "name": "HostBinding",
@@ -32713,7 +32724,7 @@
32713
32724
  "type": "",
32714
32725
  "optional": false,
32715
32726
  "description": "",
32716
- "line": 355,
32727
+ "line": 360,
32717
32728
  "decorators": [
32718
32729
  {
32719
32730
  "name": "HostBinding",
@@ -32732,7 +32743,7 @@
32732
32743
  "type": "",
32733
32744
  "optional": false,
32734
32745
  "description": "",
32735
- "line": 381
32746
+ "line": 386
32736
32747
  },
32737
32748
  {
32738
32749
  "name": "menuIsClosed",
@@ -32742,7 +32753,7 @@
32742
32753
  "type": "",
32743
32754
  "optional": false,
32744
32755
  "description": "<p>Set to <code>true</code> if the dropdown is closed (not expanded).</p>\n",
32745
- "line": 369,
32756
+ "line": 374,
32746
32757
  "rawdescription": "\n\nSet to `true` if the dropdown is closed (not expanded).\n"
32747
32758
  },
32748
32759
  {
@@ -32753,7 +32764,7 @@
32753
32764
  "type": "",
32754
32765
  "optional": false,
32755
32766
  "description": "",
32756
- "line": 378
32767
+ "line": 383
32757
32768
  },
32758
32769
  {
32759
32770
  "name": "outsideClick",
@@ -32763,7 +32774,7 @@
32763
32774
  "type": "",
32764
32775
  "optional": false,
32765
32776
  "description": "",
32766
- "line": 379
32777
+ "line": 384
32767
32778
  },
32768
32779
  {
32769
32780
  "name": "outsideKey",
@@ -32773,7 +32784,7 @@
32773
32784
  "type": "",
32774
32785
  "optional": false,
32775
32786
  "description": "",
32776
- "line": 380
32787
+ "line": 385
32777
32788
  },
32778
32789
  {
32779
32790
  "name": "propagateChange",
@@ -32783,7 +32794,7 @@
32783
32794
  "type": "",
32784
32795
  "optional": false,
32785
32796
  "description": "<p>function passed in by <code>registerOnChange</code></p>\n",
32786
- "line": 542,
32797
+ "line": 555,
32787
32798
  "rawdescription": "\n\nfunction passed in by `registerOnChange`\n"
32788
32799
  },
32789
32800
  {
@@ -32793,7 +32804,7 @@
32793
32804
  "type": "AbstractDropdownView",
32794
32805
  "optional": false,
32795
32806
  "description": "<p>Maintains a reference to the <code>AbstractDropdownView</code> object within the content DOM.</p>\n",
32796
- "line": 343,
32807
+ "line": 348,
32797
32808
  "rawdescription": "\n\nMaintains a reference to the `AbstractDropdownView` object within the content DOM.\n",
32798
32809
  "decorators": [
32799
32810
  {
@@ -32813,7 +32824,7 @@
32813
32824
  "optional": false,
32814
32825
  "returnType": "void",
32815
32826
  "typeParameters": [],
32816
- "line": 721,
32827
+ "line": 740,
32817
32828
  "deprecated": false,
32818
32829
  "deprecationMessage": "",
32819
32830
  "rawdescription": "\n\nCreates the `Dropdown` list as an element that is appended to the DOM body.\n",
@@ -32825,7 +32836,7 @@
32825
32836
  "optional": false,
32826
32837
  "returnType": "void",
32827
32838
  "typeParameters": [],
32828
- "line": 713,
32839
+ "line": 732,
32829
32840
  "deprecated": false,
32830
32841
  "deprecationMessage": "",
32831
32842
  "rawdescription": "\n\nCreates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n",
@@ -32844,7 +32855,7 @@
32844
32855
  "optional": false,
32845
32856
  "returnType": "void",
32846
32857
  "typeParameters": [],
32847
- "line": 693,
32858
+ "line": 712,
32848
32859
  "deprecated": false,
32849
32860
  "deprecationMessage": "",
32850
32861
  "rawdescription": "\n\nHandles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n",
@@ -32867,7 +32878,7 @@
32867
32878
  "optional": false,
32868
32879
  "returnType": "void",
32869
32880
  "typeParameters": [],
32870
- "line": 673,
32881
+ "line": 692,
32871
32882
  "deprecated": false,
32872
32883
  "deprecationMessage": ""
32873
32884
  },
@@ -32884,7 +32895,7 @@
32884
32895
  "optional": false,
32885
32896
  "returnType": "void",
32886
32897
  "typeParameters": [],
32887
- "line": 677,
32898
+ "line": 696,
32888
32899
  "deprecated": false,
32889
32900
  "deprecationMessage": "",
32890
32901
  "rawdescription": "\n\nHandles clicks outside of the `Dropdown`.\n",
@@ -32914,7 +32925,7 @@
32914
32925
  "optional": false,
32915
32926
  "returnType": "void",
32916
32927
  "typeParameters": [],
32917
- "line": 685,
32928
+ "line": 704,
32918
32929
  "deprecated": false,
32919
32930
  "deprecationMessage": "",
32920
32931
  "jsdoctags": [
@@ -32935,7 +32946,7 @@
32935
32946
  "optional": false,
32936
32947
  "returnType": "any",
32937
32948
  "typeParameters": [],
32938
- "line": 735,
32949
+ "line": 754,
32939
32950
  "deprecated": false,
32940
32951
  "deprecationMessage": "",
32941
32952
  "rawdescription": "\n\nDetects whether or not the `Dropdown` list is visible within all scrollable parents.\nThis can be overridden by passing in a value to the `dropUp` input.\n",
@@ -32947,7 +32958,7 @@
32947
32958
  "optional": false,
32948
32959
  "returnType": "void",
32949
32960
  "typeParameters": [],
32950
- "line": 654,
32961
+ "line": 673,
32951
32962
  "deprecated": false,
32952
32963
  "deprecationMessage": ""
32953
32964
  },
@@ -32964,7 +32975,7 @@
32964
32975
  "optional": false,
32965
32976
  "returnType": "void",
32966
32977
  "typeParameters": [],
32967
- "line": 594,
32978
+ "line": 613,
32968
32979
  "deprecated": false,
32969
32980
  "deprecationMessage": "",
32970
32981
  "jsdoctags": [
@@ -32985,7 +32996,7 @@
32985
32996
  "optional": false,
32986
32997
  "returnType": "void",
32987
32998
  "typeParameters": [],
32988
- "line": 799,
32999
+ "line": 818,
32989
33000
  "deprecated": false,
32990
33001
  "deprecationMessage": "",
32991
33002
  "rawdescription": "\n\nCollapsing the dropdown menu and removing unnecessary `EventListeners`.\n",
@@ -32997,7 +33008,7 @@
32997
33008
  "optional": false,
32998
33009
  "returnType": "Observable<string>",
32999
33010
  "typeParameters": [],
33000
- "line": 613,
33011
+ "line": 632,
33001
33012
  "deprecated": false,
33002
33013
  "deprecationMessage": "",
33003
33014
  "rawdescription": "\n\nReturns the display value if there is a selection and displayValue is set,\nif there is just a selection the ListItem content property will be returned,\notherwise the placeholder will be returned.\n",
@@ -33009,7 +33020,7 @@
33009
33020
  "optional": false,
33010
33021
  "returnType": "{ items: any; item?: undefined; } | { item: any; items?: undefined; } | { items?: undefined; item?: undefined; }",
33011
33022
  "typeParameters": [],
33012
- "line": 634,
33023
+ "line": 653,
33013
33024
  "deprecated": false,
33014
33025
  "deprecationMessage": ""
33015
33026
  },
@@ -33019,7 +33030,7 @@
33019
33030
  "optional": false,
33020
33031
  "returnType": "number",
33021
33032
  "typeParameters": [],
33022
- "line": 648,
33033
+ "line": 667,
33023
33034
  "deprecated": false,
33024
33035
  "deprecationMessage": ""
33025
33036
  },
@@ -33036,7 +33047,7 @@
33036
33047
  "optional": false,
33037
33048
  "returnType": "void",
33038
33049
  "typeParameters": [],
33039
- "line": 841,
33050
+ "line": 860,
33040
33051
  "deprecated": false,
33041
33052
  "deprecationMessage": "",
33042
33053
  "jsdoctags": [
@@ -33057,7 +33068,7 @@
33057
33068
  "optional": false,
33058
33069
  "returnType": "boolean",
33059
33070
  "typeParameters": [],
33060
- "line": 630,
33071
+ "line": 649,
33061
33072
  "deprecated": false,
33062
33073
  "deprecationMessage": ""
33063
33074
  },
@@ -33074,7 +33085,7 @@
33074
33085
  "optional": false,
33075
33086
  "returnType": "boolean",
33076
33087
  "typeParameters": [],
33077
- "line": 837,
33088
+ "line": 856,
33078
33089
  "deprecated": false,
33079
33090
  "deprecationMessage": "",
33080
33091
  "modifierKind": [
@@ -33098,7 +33109,7 @@
33098
33109
  "optional": false,
33099
33110
  "returnType": "void",
33100
33111
  "typeParameters": [],
33101
- "line": 524,
33112
+ "line": 536,
33102
33113
  "deprecated": false,
33103
33114
  "deprecationMessage": ""
33104
33115
  },
@@ -33115,7 +33126,7 @@
33115
33126
  "optional": false,
33116
33127
  "returnType": "void",
33117
33128
  "typeParameters": [],
33118
- "line": 559,
33129
+ "line": 578,
33119
33130
  "deprecated": false,
33120
33131
  "deprecationMessage": "",
33121
33132
  "rawdescription": "\n\nAdds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n",
@@ -33147,7 +33158,7 @@
33147
33158
  "optional": false,
33148
33159
  "returnType": "void",
33149
33160
  "typeParameters": [],
33150
- "line": 755,
33161
+ "line": 774,
33151
33162
  "deprecated": false,
33152
33163
  "deprecationMessage": "",
33153
33164
  "rawdescription": "\n\nExpands the dropdown menu in the view.\n",
@@ -33166,7 +33177,7 @@
33166
33177
  "optional": false,
33167
33178
  "returnType": "void",
33168
33179
  "typeParameters": [],
33169
- "line": 528,
33180
+ "line": 540,
33170
33181
  "deprecated": false,
33171
33182
  "deprecationMessage": "",
33172
33183
  "jsdoctags": [
@@ -33194,7 +33205,7 @@
33194
33205
  "optional": false,
33195
33206
  "returnType": "void",
33196
33207
  "typeParameters": [],
33197
- "line": 535,
33208
+ "line": 548,
33198
33209
  "deprecated": false,
33199
33210
  "deprecationMessage": "",
33200
33211
  "rawdescription": "\n\nRegistering the function injected to control the touch use of the `Dropdown`.\n",
@@ -33224,7 +33235,7 @@
33224
33235
  "optional": false,
33225
33236
  "returnType": "void",
33226
33237
  "typeParameters": [],
33227
- "line": 551,
33238
+ "line": 570,
33228
33239
  "deprecated": false,
33229
33240
  "deprecationMessage": "",
33230
33241
  "rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the dropdown.\n\nex: `this.formGroup.get(\"myDropdown\").disable();`\n\n",
@@ -33232,8 +33243,8 @@
33232
33243
  "jsdoctags": [
33233
33244
  {
33234
33245
  "name": {
33235
- "pos": 16754,
33236
- "end": 16764,
33246
+ "pos": 17341,
33247
+ "end": 17351,
33237
33248
  "flags": 16842752,
33238
33249
  "modifierFlagsCache": 0,
33239
33250
  "transformFlags": 0,
@@ -33244,8 +33255,8 @@
33244
33255
  "deprecated": false,
33245
33256
  "deprecationMessage": "",
33246
33257
  "tagName": {
33247
- "pos": 16748,
33248
- "end": 16753,
33258
+ "pos": 17335,
33259
+ "end": 17340,
33249
33260
  "flags": 16842752,
33250
33261
  "modifierFlagsCache": 0,
33251
33262
  "transformFlags": 0,
@@ -33262,7 +33273,7 @@
33262
33273
  "optional": false,
33263
33274
  "returnType": "void",
33264
33275
  "typeParameters": [],
33265
- "line": 829,
33276
+ "line": 848,
33266
33277
  "deprecated": false,
33267
33278
  "deprecationMessage": "",
33268
33279
  "rawdescription": "\n\nControls toggling menu states between open/expanded and closed/collapsed.\n",
@@ -33274,7 +33285,7 @@
33274
33285
  "optional": false,
33275
33286
  "returnType": "boolean",
33276
33287
  "typeParameters": [],
33277
- "line": 668,
33288
+ "line": 687,
33278
33289
  "deprecated": false,
33279
33290
  "deprecationMessage": "",
33280
33291
  "rawdescription": "\n\nReturns `true` if there is a value selected.\n",
@@ -33293,7 +33304,7 @@
33293
33304
  "optional": false,
33294
33305
  "returnType": "void",
33295
33306
  "typeParameters": [],
33296
- "line": 485,
33307
+ "line": 497,
33297
33308
  "deprecated": false,
33298
33309
  "deprecationMessage": "",
33299
33310
  "rawdescription": "\n\nPropagates the injected `value`.\n",
@@ -33319,7 +33330,7 @@
33319
33330
  "defaultValue": "true",
33320
33331
  "deprecated": false,
33321
33332
  "deprecationMessage": "",
33322
- "line": 353,
33333
+ "line": 358,
33323
33334
  "type": "boolean",
33324
33335
  "decorators": []
33325
33336
  },
@@ -33328,7 +33339,7 @@
33328
33339
  "defaultValue": "true",
33329
33340
  "deprecated": false,
33330
33341
  "deprecationMessage": "",
33331
- "line": 355,
33342
+ "line": 360,
33332
33343
  "type": "boolean",
33333
33344
  "decorators": []
33334
33345
  },
@@ -33336,7 +33347,7 @@
33336
33347
  "name": "class.cds--list-box__wrapper--decorator",
33337
33348
  "deprecated": false,
33338
33349
  "deprecationMessage": "",
33339
- "line": 357,
33350
+ "line": 362,
33340
33351
  "type": "boolean",
33341
33352
  "decorators": []
33342
33353
  },
@@ -33344,7 +33355,7 @@
33344
33355
  "name": "class.cds--list-box__wrapper--fluid--focus",
33345
33356
  "deprecated": false,
33346
33357
  "deprecationMessage": "",
33347
- "line": 199,
33358
+ "line": 200,
33348
33359
  "type": "boolean",
33349
33360
  "decorators": []
33350
33361
  },
@@ -33352,7 +33363,7 @@
33352
33363
  "name": "class.cds--list-box__wrapper--fluid--invalid",
33353
33364
  "deprecated": false,
33354
33365
  "deprecationMessage": "",
33355
- "line": 195,
33366
+ "line": 196,
33356
33367
  "type": "boolean",
33357
33368
  "decorators": []
33358
33369
  }
@@ -33375,7 +33386,7 @@
33375
33386
  "deprecationMessage": "",
33376
33387
  "rawdescription": "\n\nAdds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n",
33377
33388
  "description": "<p>Adds keyboard functionality for navigation, selection and closing of the <code>Dropdown</code>.</p>\n",
33378
- "line": 559
33389
+ "line": 578
33379
33390
  }
33380
33391
  ],
33381
33392
  "standalone": false,
@@ -33383,7 +33394,7 @@
33383
33394
  "description": "<p>Drop-down lists enable users to select one or more items from a list.</p>\n<h4>Opening behavior/List DOM placement</h4>\n<p>By default the dropdown will try to figure out the best placement for the dropdown list.</p>\n<p>If it&#39;s not contained within any scrolling elements, it will open inline, if it <em>is</em>\ncontained within a scrolling container it will try to open in the body, or an <code>cds-placeholder</code>.</p>\n<p>To control this behavior you can use the <code>appendInline</code> input:</p>\n<ul>\n<li><code>[appendInline]=&quot;null&quot;</code> is the default (auto detection)</li>\n<li><code>[appendInline]=&quot;false&quot;</code> will always append to the body/<code>cds-placeholder</code></li>\n<li><code>[appendInline]=&quot;true&quot;</code> will always append inline (next to the dropdown button)</li>\n</ul>\n<p>Get started with importing the module:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { DropdownModule } from &#39;carbon-components-angular&#39;;</code></pre></div><p><a href=\"../../?path=/story/components-dropdown--basic\">See demo</a></p>\n",
33384
33395
  "rawdescription": "\n\nDrop-down lists enable users to select one or more items from a list.\n\n#### Opening behavior/List DOM placement\nBy default the dropdown will try to figure out the best placement for the dropdown list.\n\nIf it's not contained within any scrolling elements, it will open inline, if it _is_\ncontained within a scrolling container it will try to open in the body, or an `cds-placeholder`.\n\nTo control this behavior you can use the `appendInline` input:\n- `[appendInline]=\"null\"` is the default (auto detection)\n- `[appendInline]=\"false\"` will always append to the body/`cds-placeholder`\n- `[appendInline]=\"true\"` will always append inline (next to the dropdown button)\n\nGet started with importing the module:\n\n```typescript\nimport { DropdownModule } from 'carbon-components-angular';\n```\n\n[See demo](../../?path=/story/components-dropdown--basic)\n",
33385
33396
  "type": "component",
33386
- "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tElementRef,\n\tContentChild,\n\tOnInit,\n\tViewChild,\n\tAfterContentInit,\n\tHostListener,\n\tOnDestroy,\n\tHostBinding,\n\tTemplateRef,\n\tAfterViewInit\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from \"@angular/forms\";\n\n// Observable import is required here so typescript can compile correctly\nimport {\n\tObservable,\n\tof,\n\tSubscription\n} from \"rxjs\";\n\nimport { AbstractDropdownView } from \"./abstract-dropdown-view.class\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { ListItem } from \"./list-item.interface\";\nimport { DropdownService } from \"./dropdown.service\";\nimport { ElementService, getScrollableParents } from \"carbon-components-angular/utils\";\nimport { hasScrollableParents } from \"carbon-components-angular/utils\";\n\n/**\n * Drop-down lists enable users to select one or more items from a list.\n *\n * #### Opening behavior/List DOM placement\n * By default the dropdown will try to figure out the best placement for the dropdown list.\n *\n * If it's not contained within any scrolling elements, it will open inline, if it _is_\n * contained within a scrolling container it will try to open in the body, or an `cds-placeholder`.\n *\n * To control this behavior you can use the `appendInline` input:\n * - `[appendInline]=\"null\"` is the default (auto detection)\n * - `[appendInline]=\"false\"` will always append to the body/`cds-placeholder`\n * - `[appendInline]=\"true\"` will always append inline (next to the dropdown button)\n *\n * Get started with importing the module:\n *\n * ```typescript\n * import { DropdownModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-dropdown--basic)\n */\n@Component({\n\tselector: \"cds-dropdown, ibm-dropdown\",\n\ttemplate: `\n\t<label\n\t\t*ngIf=\"label && !skeleton\"\n\t\t[for]=\"id\"\n\t\tclass=\"cds--label\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--label--disabled': disabled,\n\t\t\t'cds--visually-hidden': hideLabel\n\t\t}\">\n\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t</label>\n\t<div\n\t\tclass=\"cds--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--dropdown': type !== 'multi' && !(skeleton && fluid),\n\t\t\t'cds--multiselect': type === 'multi',\n\t\t\t'cds--multi-select--selected': type === 'multi' && getSelectedCount() > 0,\n\t\t\t'cds--dropdown--light': theme === 'light',\n\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t'cds--list-box--inline': inline,\n\t\t\t'cds--skeleton': skeleton,\n\t\t\t'cds--dropdown--disabled cds--list-box--disabled': disabled,\n\t\t\t'cds--dropdown--readonly': readonly,\n\t\t\t'cds--dropdown--invalid': invalid,\n\t\t\t'cds--dropdown--warning cds--list-box--warning': warn,\n\t\t\t'cds--dropdown--sm cds--list-box--sm': size === 'sm',\n\t\t\t'cds--dropdown--md cds--list-box--md': size === 'md',\n\t\t\t'cds--dropdown--lg cds--list-box--lg': size === 'lg',\n\t\t\t'cds--list-box--expanded': !menuIsClosed,\n\t\t\t'cds--list-box--invalid': invalid\n\t\t}\"\n\t\t[attr.data-invalid]=\"invalid ? true : null\">\n\t\t<div *ngIf=\"skeleton && fluid\" class=\"cds--list-box__label\"></div>\n\t\t<button\n\t\t\t#dropdownButton\n\t\t\t[id]=\"id\"\n\t\t\ttype=\"button\"\n\t\t\tclass=\"cds--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\taria-haspopup=\"listbox\"\n\t\t\t(click)=\"disabled || readonly ? $event.stopPropagation() : toggleMenu()\"\n\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t(blur)=\"fluid ? handleFocus($event) : onBlur()\"\n\t\t\t[attr.disabled]=\"disabled ? true : null\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t(keydown.enter)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"cds--list-box__selection cds--tag--filter cds--list-box__selection--multi\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[title]=\"clearText\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"cds--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<span class=\"cds--list-box__menu-icon\">\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t</button>\n\t\t<ng-container *ngIf=\"decorator\">\n\t\t\t<div class=\"cds--list-box__inner-wrapper--decorator\">\n\t\t\t\t<ng-template [ngTemplateOutlet]=\"decorator\"></ng-template>\n\t\t\t</div>\n\t\t</ng-container>\n\t\t<svg\n\t\t\t*ngIf=\"invalid\"\n\t\t\tclass=\"cds--list-box__invalid-icon\"\n\t\t\tcdsIcon=\"warning--filled\"\n\t\t\tsize=\"16\">\n\t\t</svg>\n\t\t<svg\n\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\tsize=\"16\"\n\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t</svg>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n\t<div\n\t\t*ngIf=\"helperText && !invalid && !warn && !skeleton && !fluid\"\n\t\tclass=\"cds--form__helper-text\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--form__helper-text--disabled': disabled\n\t\t}\">\n\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t</div>\n\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t</div>\n\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Dropdown,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Dropdown implements OnInit, AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {\n\tstatic dropdownCount = 0;\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid--invalid\") get fluidInvalidClass() {\n\t\treturn this.invalid && this.fluid;\n\t}\n\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid--focus\") get fluidFocusClass() {\n\t\treturn this.fluid && this._isFocused && this.menuIsClosed;\n\t}\n\n\tprotected get writtenValue() {\n\t\treturn this._writtenValue;\n\t}\n\n\tprotected set writtenValue(val: any[]) {\n\t\tif (val && val.length === 0) {\n\t\t\tthis.clearSelected();\n\t\t}\n\t\tthis._writtenValue = val;\n\t}\n\n\t@Input() id = `dropdown-${Dropdown.dropdownCount++}`;\n\t/**\n\t * Label for the dropdown.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Hide label while keeping it accessible for screen readers\n\t */\n\t@Input() hideLabel = false;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * **Experimental**: Optional decorator (e.g. AI label).\n\t */\n\t@Input() decorator: TemplateRef<any>;\n\t/**\n\t * Value displayed if no item is selected.\n\t */\n\t@Input() placeholder = \"\";\n\t/**\n\t * The selected value from the `Dropdown`. Can be a string or template.\n\t */\n\t@Input() displayValue: string | TemplateRef<any> = \"\";\n\t/**\n\t * Sets the optional clear button tooltip text.\n\t */\n\t@Input() clearText: string = this.i18n.get().DROPDOWN.CLEAR;\n\t/**\n\t * Size to render the dropdown field.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Defines whether or not the `Dropdown` supports selecting multiple items as opposed to single\n\t * item selection.\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * `light` or `dark` dropdown theme\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Set to `true` to disable the dropdown.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for a readonly state.\n\t */\n\t@Input() readonly = false;\n\t/**\n\t * Set to `true` for a loading dropdown.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * Set to `true` for an inline dropdown.\n\t */\n\t@Input() inline = false;\n\t/**\n\t * Set to `true` for a dropdown without arrow key activation.\n\t */\n\t@Input() disableArrowKeys = false;\n\t/**\n\t * Set to `true` for invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if dropdown is in invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning (contents set by warningText)\n\t */\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline: boolean = null;\n\t/**\n\t * Query string for the element that contains the `Dropdown`.\n\t * Used to trigger closing the dropdown if it scrolls outside of the viewport of the `scrollableContainer`.\n\t */\n\t@Input() scrollableContainer: string;\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() itemValueKey: string;\n\t/**\n\t * Specify feedback (mode) of the selection.\n\t * `top`: selected item jumps to top\n\t * `fixed`: selected item stays at it's position\n\t * `top-after-reopen`: selected item jump to top after reopen dropdown\n\t */\n\t@Input() selectionFeedback: \"top\" | \"fixed\" | \"top-after-reopen\" = \"top-after-reopen\";\n\t/**\n\t * Accessible label for the button that opens the dropdown list.\n\t * Defaults to the `DROPDOWN.OPEN` value from the i18n service.\n\t */\n\t@Input() menuButtonLabel = this.i18n.get().DROPDOWN.OPEN;\n\t/**\n\t * Provides the label for the \"# selected\" text.\n\t * Defaults to the `DROPDOWN.SELECTED` value from the i18n service.\n\t */\n\t@Input() selectedLabel = this.i18n.get().DROPDOWN.SELECTED;\n\t/**\n\t * Overrides the automatic dropUp.\n\t */\n\t@Input() dropUp: boolean;\n\t/**\n\t * Emits selection events.\n\t */\n\t@Output() selected: EventEmitter<Object> = new EventEmitter<Object>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter<any>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() close: EventEmitter<any> = new EventEmitter<any>();\n\n\t/**\n\t * Maintains a reference to the `AbstractDropdownView` object within the content DOM.\n\t */\n\t@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;\n\t/**\n\t * Maintains a reference to the view DOM element of the `Dropdown` button.\n\t */\n\t@ViewChild(\"dropdownButton\", { static: true }) dropdownButton;\n\t/**\n\t * ViewChid of the dropdown view.\n\t */\n\t@ViewChild(\"dropdownMenu\", { static: true }) dropdownMenu;\n\n\t@HostBinding(\"class.cds--dropdown__wrapper\") hostClass = true;\n\n\t@HostBinding(\"class.cds--list-box__wrapper\") hostWrapperClass = true;\n\n\t@HostBinding(\"class.cds--list-box__wrapper--decorator\") get hasDecorator() {\n\t\treturn !!this.decorator;\n\t}\n\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid\") @Input() fluid = false;\n\n\t/**\n\t * Set to `true` if the dropdown is closed (not expanded).\n\t */\n\tmenuIsClosed = true;\n\n\t/**\n\t * controls whether the `drop-up` class is applied\n\t */\n\t_dropUp = false;\n\n\t// .bind creates a new function, so we declare the methods below\n\t// but .bind them up here\n\tnoop = this._noop.bind(this);\n\toutsideClick = this._outsideClick.bind(this);\n\toutsideKey = this._outsideKey.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\n\tprotected visibilitySubscription = new Subscription();\n\n\tprotected onTouchedCallback: () => void = this._noop;\n\n\tprotected _isFocused = false;\n\n\t// primarily used to capture and propagate input to `writeValue` before the content is available\n\tprivate _writtenValue: any = [];\n\n\t/**\n\t * Creates an instance of Dropdown.\n\t */\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected i18n: I18n,\n\t\tprotected dropdownService: DropdownService,\n\t\tprotected elementService: ElementService) {}\n\n\t/**\n\t * Updates the `type` property in the `@ContentChild`.\n\t * The `type` property specifies whether the `Dropdown` allows single selection or multi selection.\n\t */\n\tngOnInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\t\t}\n\t}\n\n\t/**\n\t * Initializes classes and subscribes to events for single or multi selection.\n\t */\n\tngAfterContentInit() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tif ((this.writtenValue && this.writtenValue.length) || typeof this.writtenValue === \"number\") {\n\t\t\tthis.writeValue(this.writtenValue);\n\t\t}\n\t\tthis.view.type = this.type;\n\t\tthis.view.size = this.size;\n\n\t\t// function to check if the event is organic (isUpdate === false) or programmatic\n\t\tconst isUpdate = event => event && event.isUpdate;\n\n\t\tthis.view.select.subscribe(event => {\n\t\t\tif (this.type === \"single\" && !isUpdate(event) && !Array.isArray(event)) {\n\t\t\t\tthis.closeMenu();\n\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t\tthis.propagateChange(event.item[this.itemValueKey]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.propagateChange(event.item);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.type === \"multi\" && !isUpdate(event)) {\n\t\t\t\t// if we have a `value` selector and selected items map them appropriately\n\t\t\t\tif (this.itemValueKey && this.view.getSelected()) {\n\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.itemValueKey]);\n\t\t\t\t\tthis.propagateChange(values);\n\t\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(this.view.getSelected());\n\t\t\t\t}\n\t\t\t}\n\t\t\t// only emit selected for \"organic\" selections\n\t\t\tif (!isUpdate(event)) {\n\t\t\t\tthis.checkForReorder();\n\t\t\t\tthis.selected.emit(event);\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\t// if appendInline is default valued (null) we should:\n\t\t// 1. if there are scrollable parents (not including body) don't append inline\n\t\t// this should also cover the case where the dropdown is in a modal\n\t\t// (where we _do_ want to append to the placeholder)\n\t\tif (this.appendInline === null && hasScrollableParents(this.elementRef.nativeElement)) {\n\t\t\tthis.appendInline = false;\n\t\t\t// 2. otherwise we should append inline\n\t\t} else if (this.appendInline === null) {\n\t\t\tthis.appendInline = true;\n\t\t}\n\t\tthis.checkForReorder();\n\t}\n\n\t/**\n\t * Removing the `Dropdown` from the body if it is appended to the body.\n\t */\n\tngOnDestroy() {\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Propagates the injected `value`.\n\t */\n\twriteValue(value: any) {\n\t\t// cache the written value so we can use it in `AfterContentInit`\n\t\tthis.writtenValue = value;\n\t\tthis.view.onItemsReady(() => {\n\t\t\t// propagate null/falsey as an array (deselect everything)\n\t\t\tif (!value) {\n\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t} else if (this.type === \"single\") {\n\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t// clone the specified item and update its state\n\t\t\t\t\tconst newValue = Object.assign({}, this.view.getListItems().find(item => item[this.itemValueKey] === value));\n\t\t\t\t\tnewValue.selected = true;\n\t\t\t\t\tthis.view.propagateSelected([newValue]);\n\t\t\t\t} else {\n\t\t\t\t\t// pass the singular value as an array of ListItem\n\t\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t// clone the items and update their state based on the received value array\n\t\t\t\t\t// this way we don't lose any additional metadata that may be passed in via the `items` Input\n\t\t\t\t\tlet newValues = [];\n\t\t\t\t\tfor (const v of value) {\n\t\t\t\t\t\tfor (const item of this.view.getListItems()) {\n\t\t\t\t\t\t\tif (item[this.itemValueKey] === v) {\n\t\t\t\t\t\t\t\tnewValues.push(Object.assign({}, item, { selected: true }));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.view.propagateSelected(newValues);\n\t\t\t\t} else {\n\t\t\t\t\t// we can safely assume we're passing an array of `ListItem`s\n\t\t\t\t\tthis.view.propagateSelected(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.checkForReorder();\n\t\t});\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\t/**\n\t * Registering the function injected to control the touch use of the `Dropdown`.\n\t */\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\t/**\n\t * function passed in by `registerOnChange`\n\t */\n\tpropagateChange = (_: any) => { };\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the dropdown.\n\t *\n\t * ex: `this.formGroup.get(\"myDropdown\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the input\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Adds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ((event.key === \"Escape\") && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close other widgets that listen for Escape\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (this.menuIsClosed && (event.key === \" \" || event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) {\n\t\t\tif (this.disableArrowKeys && (event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tthis.openMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && event.shiftKey) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (this.type === \"multi\") { return; }\n\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.closedDropdownNavigation(event);\n\t\t}\n\t}\n\n\tclosedDropdownNavigation(event) {\n\t\tif (event.key === \"ArrowDown\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getNextItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t} else if (event.key === \"ArrowUp\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getPrevItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t}\n\t}\n\n\t/**\n\t * Returns the display value if there is a selection and displayValue is set,\n\t * if there is just a selection the ListItem content property will be returned,\n\t * otherwise the placeholder will be returned.\n\t */\n\tgetDisplayStringValue(): Observable<string> {\n\t\tif (!this.view || this.skeleton) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (selected.length && (!this.displayValue || !this.isRenderString())) {\n\t\t\tif (this.type === \"multi\") {\n\t\t\t\treturn of(this.placeholder);\n\t\t\t} else {\n\t\t\t\treturn of(selected[0].content);\n\t\t\t}\n\t\t} else if (selected.length && this.isRenderString()) {\n\t\t\treturn of(this.displayValue as string);\n\t\t}\n\t\treturn of(this.placeholder);\n\t}\n\n\tisRenderString(): boolean {\n\t\treturn typeof this.displayValue === \"string\";\n\t}\n\n\tgetRenderTemplateContext() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\treturn { items: selected };\n\t\t} else if (selected && selected.length > 0) {\n\t\t\treturn { item: selected[0] }; // this is to be compatible with the dropdown-list template\n\t\t} else {\n\t\t\treturn {};\n\t\t}\n\t}\n\n\tgetSelectedCount(): number {\n\t\tif (this.view.getSelected()) {\n\t\t\treturn this.view.getSelected().length;\n\t\t}\n\t}\n\n\tclearSelected() {\n\t\tif (this.disabled || this.getSelectedCount() === 0) {\n\t\t\treturn;\n\t\t}\n\t\tfor (const item of this.view.getListItems()) {\n\t\t\titem.selected = false;\n\t\t}\n\t\tthis.selected.emit([]);\n\t\tthis.propagateChange([]);\n\t}\n\n\t/**\n\t * Returns `true` if there is a value selected.\n\t */\n\tvalueSelected(): boolean {\n\t\tif (this.view.getSelected()) { return true; }\n\t\treturn false;\n\t}\n\n\t_noop() { }\n\t/**\n\t * Handles clicks outside of the `Dropdown`.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t_outsideKey(event) {\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\tif (event.key === \"Escape\" && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (!this.menuIsClosed && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t\tthis.dropdownButton.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", { bubbles: true, cancelable: true, key: \"Tab\" }));\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tconst lightClass = this.theme === \"light\" ? \" cds--list-box--light\" : \"\";\n\t\tconst expandedClass = !this.menuIsClosed ? \" cds--list-box--expanded\" : \"\";\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.dropdownButton.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\t`${this.elementRef.nativeElement.className}${lightClass}${expandedClass}`);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Detects whether or not the `Dropdown` list is visible within all scrollable parents.\n\t * This can be overridden by passing in a value to the `dropUp` input.\n\t */\n\t_shouldDropUp() {\n\t\t// check if dropdownMenu exists first.\n\t\tconst menu = this.dropdownMenu && this.dropdownMenu.nativeElement.querySelector(\".cds--list-box__menu\");\n\t\t// check if menu exists first.\n\t\tconst menuRect = menu && menu.getBoundingClientRect();\n\t\tif (menu && menuRect) {\n\t\t\tconst scrollableParents = getScrollableParents(menu);\n\t\t\treturn scrollableParents.reduce((shouldDropUp: boolean, parent: HTMLElement) => {\n\t\t\t\tconst parentRect = parent.getBoundingClientRect();\n\t\t\t\tconst isBelowParent = !(menuRect.bottom <= parentRect.bottom);\n\t\t\t\treturn shouldDropUp || isBelowParent;\n\t\t\t}, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Expands the dropdown menu in the view.\n\t */\n\topenMenu() {\n\t\t// prevents the dropdown from opening when list of items is empty\n\t\tif (this.view.getListItems().length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._dropUp = false;\n\t\tthis.menuIsClosed = false;\n\n\t\t// move the dropdown list to the body if we're not appending inline\n\t\t// and position it relative to the dropdown wrapper\n\t\tif (!this.appendInline) {\n\t\t\tconst target = this.dropdownButton.nativeElement;\n\t\t\tconst parent = this.elementRef.nativeElement;\n\t\t\tthis.visibilitySubscription = this.elementService\n\t\t\t\t.visibility(target, parent)\n\t\t\t\t.subscribe(value => {\n\t\t\t\t\tif (!value.visible) {\n\t\t\t\t\t\tthis.closeMenu();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\t// set the dropdown menu to drop up if it's near the bottom of the screen\n\t\t// setTimeout lets us measure after it's visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tif (this.dropUp === null || this.dropUp === undefined) {\n\t\t\t\tthis._dropUp = this._shouldDropUp();\n\t\t\t}\n\t\t}, 0);\n\n\t\t// we bind noop to document.body.firstElementChild to allow safari to fire events\n\t\t// from document. Then we unbind everything later to keep things light.\n\t\tdocument.body.firstElementChild.addEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.addEventListener(\"keydown\", this.noop, true);\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.addEventListener(\"keydown\", this.outsideKey, true);\n\t\tsetTimeout(() => this.view.initFocus(), 0);\n\t}\n\n\t/**\n\t * Collapsing the dropdown menu and removing unnecessary `EventListeners`.\n\t */\n\tcloseMenu() {\n\t\t// return early if the menu is already closed\n\t\tif (this.menuIsClosed) { return; }\n\t\tthis.menuIsClosed = true;\n\t\tthis.checkForReorder();\n\t\tthis.onClose.emit();\n\t\tthis.close.emit();\n\n\t\t// focus the trigger button when we close ...\n\t\tthis.dropdownButton.nativeElement.focus();\n\n\t\t// remove the conditional once this api is settled and part of abstract-dropdown-view.class\n\t\tif (this.view[\"disableScroll\"]) {\n\t\t\tthis.view[\"disableScroll\"]();\n\t\t}\n\n\t\t// move the list back in the component on close\n\t\tif (!this.appendInline) {\n\t\t\tthis.visibilitySubscription.unsubscribe();\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t\tdocument.body.firstElementChild.removeEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.removeEventListener(\"keydown\", this.noop, true);\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.removeEventListener(\"keydown\", this.outsideKey, true);\n\t}\n\n\t/**\n\t * Controls toggling menu states between open/expanded and closed/collapsed.\n\t */\n\ttoggleMenu() {\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.openMenu();\n\t\t} else {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\thandleFocus(event: FocusEvent) {\n\t\tthis._isFocused = event.type === \"focus\";\n\t\tif (event.type === \"blur\") {\n\t\t\tthis.onBlur();\n\t\t}\n\t}\n\n\t/**\n\t * Controls when it's needed to apply the selection feedback\n\t */\n\tprotected checkForReorder() {\n\t\tconst topAfterReopen = this.menuIsClosed && this.selectionFeedback === \"top-after-reopen\";\n\t\tif ((this.type === \"multi\") && (topAfterReopen || this.selectionFeedback === \"top\")) {\n\t\t\tthis.view.reorderSelected();\n\t\t}\n\t}\n}\n",
33397
+ "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tElementRef,\n\tContentChild,\n\tOnInit,\n\tViewChild,\n\tAfterContentInit,\n\tHostListener,\n\tOnDestroy,\n\tHostBinding,\n\tTemplateRef,\n\tAfterViewInit\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from \"@angular/forms\";\n\n// Observable import is required here so typescript can compile correctly\nimport {\n\tObservable,\n\tof,\n\tSubscription\n} from \"rxjs\";\nimport { isNull, isUndefined } from \"lodash-es\";\n\nimport { AbstractDropdownView } from \"./abstract-dropdown-view.class\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { ListItem } from \"./list-item.interface\";\nimport { DropdownService } from \"./dropdown.service\";\nimport { ElementService, getScrollableParents } from \"carbon-components-angular/utils\";\nimport { hasScrollableParents } from \"carbon-components-angular/utils\";\n\n/**\n * Drop-down lists enable users to select one or more items from a list.\n *\n * #### Opening behavior/List DOM placement\n * By default the dropdown will try to figure out the best placement for the dropdown list.\n *\n * If it's not contained within any scrolling elements, it will open inline, if it _is_\n * contained within a scrolling container it will try to open in the body, or an `cds-placeholder`.\n *\n * To control this behavior you can use the `appendInline` input:\n * - `[appendInline]=\"null\"` is the default (auto detection)\n * - `[appendInline]=\"false\"` will always append to the body/`cds-placeholder`\n * - `[appendInline]=\"true\"` will always append inline (next to the dropdown button)\n *\n * Get started with importing the module:\n *\n * ```typescript\n * import { DropdownModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-dropdown--basic)\n */\n@Component({\n\tselector: \"cds-dropdown, ibm-dropdown\",\n\ttemplate: `\n\t<label\n\t\t*ngIf=\"label && !skeleton\"\n\t\t[for]=\"id\"\n\t\tclass=\"cds--label\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--label--disabled': disabled,\n\t\t\t'cds--visually-hidden': hideLabel\n\t\t}\">\n\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t</label>\n\t<div\n\t\tclass=\"cds--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--dropdown': type !== 'multi' && !(skeleton && fluid),\n\t\t\t'cds--multiselect': type === 'multi',\n\t\t\t'cds--multi-select--selected': type === 'multi' && getSelectedCount() > 0,\n\t\t\t'cds--dropdown--light': theme === 'light',\n\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t'cds--list-box--inline': inline,\n\t\t\t'cds--skeleton': skeleton,\n\t\t\t'cds--dropdown--disabled cds--list-box--disabled': disabled,\n\t\t\t'cds--dropdown--readonly': readonly,\n\t\t\t'cds--dropdown--invalid': invalid,\n\t\t\t'cds--dropdown--warning cds--list-box--warning': warn,\n\t\t\t'cds--dropdown--sm cds--list-box--sm': size === 'sm',\n\t\t\t'cds--dropdown--md cds--list-box--md': size === 'md',\n\t\t\t'cds--dropdown--lg cds--list-box--lg': size === 'lg',\n\t\t\t'cds--list-box--expanded': !menuIsClosed,\n\t\t\t'cds--list-box--invalid': invalid\n\t\t}\"\n\t\t[attr.data-invalid]=\"invalid ? true : null\">\n\t\t<div *ngIf=\"skeleton && fluid\" class=\"cds--list-box__label\"></div>\n\t\t<button\n\t\t\t#dropdownButton\n\t\t\t[id]=\"id\"\n\t\t\ttype=\"button\"\n\t\t\tclass=\"cds--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\taria-haspopup=\"listbox\"\n\t\t\t(click)=\"disabled || readonly ? $event.stopPropagation() : toggleMenu()\"\n\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t(blur)=\"fluid ? handleFocus($event) : onBlur()\"\n\t\t\t[attr.disabled]=\"disabled ? true : null\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t(keydown.enter)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"cds--list-box__selection cds--tag--filter cds--list-box__selection--multi\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[title]=\"clearText\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"cds--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<span class=\"cds--list-box__menu-icon\">\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t</button>\n\t\t<ng-container *ngIf=\"decorator\">\n\t\t\t<div class=\"cds--list-box__inner-wrapper--decorator\">\n\t\t\t\t<ng-template [ngTemplateOutlet]=\"decorator\"></ng-template>\n\t\t\t</div>\n\t\t</ng-container>\n\t\t<svg\n\t\t\t*ngIf=\"invalid\"\n\t\t\tclass=\"cds--list-box__invalid-icon\"\n\t\t\tcdsIcon=\"warning--filled\"\n\t\t\tsize=\"16\">\n\t\t</svg>\n\t\t<svg\n\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\tsize=\"16\"\n\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t</svg>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n\t<div\n\t\t*ngIf=\"helperText && !invalid && !warn && !skeleton && !fluid\"\n\t\tclass=\"cds--form__helper-text\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--form__helper-text--disabled': disabled\n\t\t}\">\n\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t</div>\n\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t</div>\n\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Dropdown,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Dropdown implements OnInit, AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {\n\tstatic dropdownCount = 0;\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid--invalid\") get fluidInvalidClass() {\n\t\treturn this.invalid && this.fluid;\n\t}\n\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid--focus\") get fluidFocusClass() {\n\t\treturn this.fluid && this._isFocused && this.menuIsClosed;\n\t}\n\n\tprotected get writtenValue() {\n\t\treturn this._writtenValue;\n\t}\n\n\tprotected set writtenValue(val: any[]) {\n\t\tif (val && val.length === 0) {\n\t\t\tthis.clearSelected();\n\t\t}\n\t\tthis._writtenValue = val;\n\t}\n\n\t@Input() id = `dropdown-${Dropdown.dropdownCount++}`;\n\t/**\n\t * Label for the dropdown.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Hide label while keeping it accessible for screen readers\n\t */\n\t@Input() hideLabel = false;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * **Experimental**: Optional decorator (e.g. AI label).\n\t */\n\t@Input() decorator: TemplateRef<any>;\n\t/**\n\t * Value displayed if no item is selected.\n\t */\n\t@Input() placeholder = \"\";\n\t/**\n\t * The selected value from the `Dropdown`. Can be a string or template.\n\t */\n\t@Input() displayValue: string | TemplateRef<any> = \"\";\n\t/**\n\t * Sets the optional clear button tooltip text.\n\t */\n\t@Input() clearText: string = this.i18n.get().DROPDOWN.CLEAR;\n\t/**\n\t * Size to render the dropdown field.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Defines whether or not the `Dropdown` supports selecting multiple items as opposed to single\n\t * item selection.\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * `light` or `dark` dropdown theme\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Set to `true` to disable the dropdown.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for a readonly state.\n\t */\n\t@Input() readonly = false;\n\t/**\n\t * Set to `true` for a loading dropdown.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * Set to `true` for an inline dropdown.\n\t */\n\t@Input() inline = false;\n\t/**\n\t * Set to `true` for a dropdown without arrow key activation.\n\t */\n\t@Input() disableArrowKeys = false;\n\t/**\n\t * Set to `true` for invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if dropdown is in invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning (contents set by warningText)\n\t */\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline: boolean = null;\n\t/**\n\t * Query string for the element that contains the `Dropdown`.\n\t * Used to trigger closing the dropdown if it scrolls outside of the viewport of the `scrollableContainer`.\n\t */\n\t@Input() scrollableContainer: string;\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() itemValueKey: string;\n\t/**\n\t * Specify feedback (mode) of the selection.\n\t * `top`: selected item jumps to top\n\t * `fixed`: selected item stays at it's position\n\t * `top-after-reopen`: selected item jump to top after reopen dropdown\n\t */\n\t@Input() selectionFeedback: \"top\" | \"fixed\" | \"top-after-reopen\" = \"top-after-reopen\";\n\t/**\n\t * Accessible label for the button that opens the dropdown list.\n\t * Defaults to the `DROPDOWN.OPEN` value from the i18n service.\n\t */\n\t@Input() menuButtonLabel = this.i18n.get().DROPDOWN.OPEN;\n\t/**\n\t * Provides the label for the \"# selected\" text.\n\t * Defaults to the `DROPDOWN.SELECTED` value from the i18n service.\n\t */\n\t@Input() selectedLabel = this.i18n.get().DROPDOWN.SELECTED;\n\t/**\n\t * Overrides the automatic dropUp.\n\t */\n\t@Input() dropUp: boolean;\n\t/**\n\t * Set to `true` to allow null values in the dropdown ListItems.\n\t */\n\t@Input() allowNullValues = false;\n\t/**\n\t * Emits selection events.\n\t */\n\t@Output() selected: EventEmitter<Object> = new EventEmitter<Object>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter<any>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() close: EventEmitter<any> = new EventEmitter<any>();\n\n\t/**\n\t * Maintains a reference to the `AbstractDropdownView` object within the content DOM.\n\t */\n\t@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;\n\t/**\n\t * Maintains a reference to the view DOM element of the `Dropdown` button.\n\t */\n\t@ViewChild(\"dropdownButton\", { static: true }) dropdownButton;\n\t/**\n\t * ViewChid of the dropdown view.\n\t */\n\t@ViewChild(\"dropdownMenu\", { static: true }) dropdownMenu;\n\n\t@HostBinding(\"class.cds--dropdown__wrapper\") hostClass = true;\n\n\t@HostBinding(\"class.cds--list-box__wrapper\") hostWrapperClass = true;\n\n\t@HostBinding(\"class.cds--list-box__wrapper--decorator\") get hasDecorator() {\n\t\treturn !!this.decorator;\n\t}\n\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid\") @Input() fluid = false;\n\n\t/**\n\t * Set to `true` if the dropdown is closed (not expanded).\n\t */\n\tmenuIsClosed = true;\n\n\t/**\n\t * controls whether the `drop-up` class is applied\n\t */\n\t_dropUp = false;\n\n\t// .bind creates a new function, so we declare the methods below\n\t// but .bind them up here\n\tnoop = this._noop.bind(this);\n\toutsideClick = this._outsideClick.bind(this);\n\toutsideKey = this._outsideKey.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\n\tprotected visibilitySubscription = new Subscription();\n\n\tprotected onTouchedCallback: () => void = this._noop;\n\n\tprotected _isFocused = false;\n\n\t// primarily used to capture and propagate input to `writeValue` before the content is available\n\tprivate _writtenValue: any = [];\n\n\tprivate _isUsingNgControl = false;\n\n\tprivate selectionSubscription: Subscription;\n\n\t/**\n\t * Creates an instance of Dropdown.\n\t */\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected i18n: I18n,\n\t\tprotected dropdownService: DropdownService,\n\t\tprotected elementService: ElementService) {}\n\n\t/**\n\t * Updates the `type` property in the `@ContentChild`.\n\t * The `type` property specifies whether the `Dropdown` allows single selection or multi selection.\n\t */\n\tngOnInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\t\t}\n\t}\n\n\t/**\n\t * Initializes classes and subscribes to events for single or multi selection.\n\t */\n\tngAfterContentInit() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.view.type = this.type;\n\t\tthis.view.size = this.size;\n\n\t\t// function to check if the event is organic (isUpdate === false) or programmatic\n\t\tconst isUpdate = event => event && event.isUpdate;\n\n\t\tthis.selectionSubscription = this.view.select.subscribe(event => {\n\t\t\tif (this.type === \"single\" && !isUpdate(event) && !Array.isArray(event)) {\n\t\t\t\tthis.closeMenu();\n\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t\tthis._propagateChange(event.item[this.itemValueKey]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._propagateChange(event.item);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._propagateChange(null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.type === \"multi\" && !isUpdate(event)) {\n\t\t\t\t// if we have a `value` selector and selected items map them appropriately\n\t\t\t\tif (this.itemValueKey && this.view.getSelected()) {\n\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.itemValueKey]);\n\t\t\t\t\tthis._propagateChange(values);\n\t\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t} else {\n\t\t\t\t\tthis._propagateChange(this.view.getSelected());\n\t\t\t\t}\n\t\t\t}\n\t\t\t// only emit selected for \"organic\" selections\n\t\t\tif (!isUpdate(event)) {\n\t\t\t\tthis.checkForReorder();\n\t\t\t\tthis.selected.emit(event);\n\t\t\t} else if (this._isUsingNgControl) {\n\t\t\t\tthis.writeValue(this.writtenValue);\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\t// if appendInline is default valued (null) we should:\n\t\t// 1. if there are scrollable parents (not including body) don't append inline\n\t\t// this should also cover the case where the dropdown is in a modal\n\t\t// (where we _do_ want to append to the placeholder)\n\t\tif (this.appendInline === null && hasScrollableParents(this.elementRef.nativeElement)) {\n\t\t\tthis.appendInline = false;\n\t\t\t// 2. otherwise we should append inline\n\t\t} else if (this.appendInline === null) {\n\t\t\tthis.appendInline = true;\n\t\t}\n\t\tthis.checkForReorder();\n\t}\n\n\t/**\n\t * Removing the `Dropdown` from the body if it is appended to the body.\n\t */\n\tngOnDestroy() {\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\n\t\tthis.visibilitySubscription?.unsubscribe();\n\t\tthis.selectionSubscription?.unsubscribe();\n\t}\n\n\t/**\n\t * Propagates the injected `value`.\n\t */\n\twriteValue(value: any) {\n\t\t// cache the written value so we can use it in `AfterContentInit`\n\t\tthis.writtenValue = value;\n\t\tthis.view.onItemsReady(() => {\n\t\t\t// propagate null/undefined as an array (deselect everything) unless `allowNullValues` is true\n\t\t\tif (isUndefined(value) || (isNull(value) && !this.allowNullValues)) {\n\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t} else if (this.type === \"single\") {\n\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t// clone the specified item and update its state\n\t\t\t\t\tconst newValue = Object.assign({}, this.view.getListItems().find(item => item[this.itemValueKey] === value));\n\t\t\t\t\tnewValue.selected = true;\n\t\t\t\t\tthis.view.propagateSelected([newValue]);\n\t\t\t\t} else {\n\t\t\t\t\t// pass the singular value as an array of ListItem\n\t\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t// clone the items and update their state based on the received value array\n\t\t\t\t\t// this way we don't lose any additional metadata that may be passed in via the `items` Input\n\t\t\t\t\tlet newValues = [];\n\t\t\t\t\tfor (const v of value) {\n\t\t\t\t\t\tfor (const item of this.view.getListItems()) {\n\t\t\t\t\t\t\tif (item[this.itemValueKey] === v) {\n\t\t\t\t\t\t\t\tnewValues.push(Object.assign({}, item, { selected: true }));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.view.propagateSelected(newValues);\n\t\t\t\t} else {\n\t\t\t\t\t// we can safely assume we're passing an array of `ListItem`s\n\t\t\t\t\tthis.view.propagateSelected(value || [value]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.checkForReorder();\n\t\t});\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis._isUsingNgControl = true;\n\t\tthis.propagateChange = fn;\n\t}\n\n\t/**\n\t * Registering the function injected to control the touch use of the `Dropdown`.\n\t */\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\t/**\n\t * function passed in by `registerOnChange`\n\t */\n\tpropagateChange = (_: any) => { };\n\n\t// used only to update writtenValue\n\tprivate _propagateChange(value: any) {\n\t\tthis.writtenValue = value;\n\t\tthis.propagateChange(value);\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the dropdown.\n\t *\n\t * ex: `this.formGroup.get(\"myDropdown\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the input\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Adds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ((event.key === \"Escape\") && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close other widgets that listen for Escape\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (this.menuIsClosed && (event.key === \" \" || event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) {\n\t\t\tif (this.disableArrowKeys && (event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tthis.openMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && event.shiftKey) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (this.type === \"multi\") { return; }\n\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.closedDropdownNavigation(event);\n\t\t}\n\t}\n\n\tclosedDropdownNavigation(event) {\n\t\tif (event.key === \"ArrowDown\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getNextItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t} else if (event.key === \"ArrowUp\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getPrevItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t}\n\t}\n\n\t/**\n\t * Returns the display value if there is a selection and displayValue is set,\n\t * if there is just a selection the ListItem content property will be returned,\n\t * otherwise the placeholder will be returned.\n\t */\n\tgetDisplayStringValue(): Observable<string> {\n\t\tif (!this.view || this.skeleton) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (selected.length && (!this.displayValue || !this.isRenderString())) {\n\t\t\tif (this.type === \"multi\") {\n\t\t\t\treturn of(this.placeholder);\n\t\t\t} else {\n\t\t\t\treturn of(selected[0].content);\n\t\t\t}\n\t\t} else if (selected.length && this.isRenderString()) {\n\t\t\treturn of(this.displayValue as string);\n\t\t}\n\t\treturn of(this.placeholder);\n\t}\n\n\tisRenderString(): boolean {\n\t\treturn typeof this.displayValue === \"string\";\n\t}\n\n\tgetRenderTemplateContext() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\treturn { items: selected };\n\t\t} else if (selected && selected.length > 0) {\n\t\t\treturn { item: selected[0] }; // this is to be compatible with the dropdown-list template\n\t\t} else {\n\t\t\treturn {};\n\t\t}\n\t}\n\n\tgetSelectedCount(): number {\n\t\tif (this.view.getSelected()) {\n\t\t\treturn this.view.getSelected().length;\n\t\t}\n\t}\n\n\tclearSelected() {\n\t\tif (this.disabled || this.getSelectedCount() === 0) {\n\t\t\treturn;\n\t\t}\n\t\tfor (const item of this.view.getListItems()) {\n\t\t\titem.selected = false;\n\t\t}\n\t\tthis.selected.emit([]);\n\t\tthis._propagateChange([]);\n\t}\n\n\t/**\n\t * Returns `true` if there is a value selected.\n\t */\n\tvalueSelected(): boolean {\n\t\tif (this.view.getSelected()) { return true; }\n\t\treturn false;\n\t}\n\n\t_noop() { }\n\t/**\n\t * Handles clicks outside of the `Dropdown`.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t_outsideKey(event) {\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\tif (event.key === \"Escape\" && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (!this.menuIsClosed && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t\tthis.dropdownButton.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", { bubbles: true, cancelable: true, key: \"Tab\" }));\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tconst lightClass = this.theme === \"light\" ? \" cds--list-box--light\" : \"\";\n\t\tconst expandedClass = !this.menuIsClosed ? \" cds--list-box--expanded\" : \"\";\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.dropdownButton.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\t`${this.elementRef.nativeElement.className}${lightClass}${expandedClass}`);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Detects whether or not the `Dropdown` list is visible within all scrollable parents.\n\t * This can be overridden by passing in a value to the `dropUp` input.\n\t */\n\t_shouldDropUp() {\n\t\t// check if dropdownMenu exists first.\n\t\tconst menu = this.dropdownMenu && this.dropdownMenu.nativeElement.querySelector(\".cds--list-box__menu\");\n\t\t// check if menu exists first.\n\t\tconst menuRect = menu && menu.getBoundingClientRect();\n\t\tif (menu && menuRect) {\n\t\t\tconst scrollableParents = getScrollableParents(menu);\n\t\t\treturn scrollableParents.reduce((shouldDropUp: boolean, parent: HTMLElement) => {\n\t\t\t\tconst parentRect = parent.getBoundingClientRect();\n\t\t\t\tconst isBelowParent = !(menuRect.bottom <= parentRect.bottom);\n\t\t\t\treturn shouldDropUp || isBelowParent;\n\t\t\t}, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Expands the dropdown menu in the view.\n\t */\n\topenMenu() {\n\t\t// prevents the dropdown from opening when list of items is empty\n\t\tif (this.view.getListItems().length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._dropUp = false;\n\t\tthis.menuIsClosed = false;\n\n\t\t// move the dropdown list to the body if we're not appending inline\n\t\t// and position it relative to the dropdown wrapper\n\t\tif (!this.appendInline) {\n\t\t\tconst target = this.dropdownButton.nativeElement;\n\t\t\tconst parent = this.elementRef.nativeElement;\n\t\t\tthis.visibilitySubscription = this.elementService\n\t\t\t\t.visibility(target, parent)\n\t\t\t\t.subscribe(value => {\n\t\t\t\t\tif (!value.visible) {\n\t\t\t\t\t\tthis.closeMenu();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\t// set the dropdown menu to drop up if it's near the bottom of the screen\n\t\t// setTimeout lets us measure after it's visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tif (this.dropUp === null || this.dropUp === undefined) {\n\t\t\t\tthis._dropUp = this._shouldDropUp();\n\t\t\t}\n\t\t}, 0);\n\n\t\t// we bind noop to document.body.firstElementChild to allow safari to fire events\n\t\t// from document. Then we unbind everything later to keep things light.\n\t\tdocument.body.firstElementChild.addEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.addEventListener(\"keydown\", this.noop, true);\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.addEventListener(\"keydown\", this.outsideKey, true);\n\t\tsetTimeout(() => this.view.initFocus(), 0);\n\t}\n\n\t/**\n\t * Collapsing the dropdown menu and removing unnecessary `EventListeners`.\n\t */\n\tcloseMenu() {\n\t\t// return early if the menu is already closed\n\t\tif (this.menuIsClosed) { return; }\n\t\tthis.menuIsClosed = true;\n\t\tthis.checkForReorder();\n\t\tthis.onClose.emit();\n\t\tthis.close.emit();\n\n\t\t// focus the trigger button when we close ...\n\t\tthis.dropdownButton.nativeElement.focus();\n\n\t\t// remove the conditional once this api is settled and part of abstract-dropdown-view.class\n\t\tif (this.view[\"disableScroll\"]) {\n\t\t\tthis.view[\"disableScroll\"]();\n\t\t}\n\n\t\t// move the list back in the component on close\n\t\tif (!this.appendInline) {\n\t\t\tthis.visibilitySubscription.unsubscribe();\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t\tdocument.body.firstElementChild.removeEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.removeEventListener(\"keydown\", this.noop, true);\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.removeEventListener(\"keydown\", this.outsideKey, true);\n\t}\n\n\t/**\n\t * Controls toggling menu states between open/expanded and closed/collapsed.\n\t */\n\ttoggleMenu() {\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.openMenu();\n\t\t} else {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\thandleFocus(event: FocusEvent) {\n\t\tthis._isFocused = event.type === \"focus\";\n\t\tif (event.type === \"blur\") {\n\t\t\tthis.onBlur();\n\t\t}\n\t}\n\n\t/**\n\t * Controls when it's needed to apply the selection feedback\n\t */\n\tprotected checkForReorder() {\n\t\tconst topAfterReopen = this.menuIsClosed && this.selectionFeedback === \"top-after-reopen\";\n\t\tif ((this.type === \"multi\") && (topAfterReopen || this.selectionFeedback === \"top\")) {\n\t\t\tthis.view.reorderSelected();\n\t\t}\n\t}\n}\n",
33387
33398
  "assetsDirs": [],
33388
33399
  "styleUrlsData": "",
33389
33400
  "stylesData": "",
@@ -33418,7 +33429,7 @@
33418
33429
  "deprecationMessage": ""
33419
33430
  }
33420
33431
  ],
33421
- "line": 390,
33432
+ "line": 399,
33422
33433
  "rawdescription": "\n\nCreates an instance of Dropdown.\n",
33423
33434
  "jsdoctags": [
33424
33435
  {
@@ -33474,7 +33485,7 @@
33474
33485
  "name": "fluidInvalidClass",
33475
33486
  "type": "",
33476
33487
  "returnType": "",
33477
- "line": 195
33488
+ "line": 196
33478
33489
  }
33479
33490
  },
33480
33491
  "fluidFocusClass": {
@@ -33483,7 +33494,7 @@
33483
33494
  "name": "fluidFocusClass",
33484
33495
  "type": "",
33485
33496
  "returnType": "",
33486
- "line": 199
33497
+ "line": 200
33487
33498
  }
33488
33499
  },
33489
33500
  "hasDecorator": {
@@ -33492,14 +33503,14 @@
33492
33503
  "name": "hasDecorator",
33493
33504
  "type": "",
33494
33505
  "returnType": "",
33495
- "line": 357
33506
+ "line": 362
33496
33507
  }
33497
33508
  }
33498
33509
  }
33499
33510
  },
33500
33511
  {
33501
33512
  "name": "DropdownList",
33502
- "id": "component-DropdownList-2962a296e4b76167cde4c2e261085e0728345b5a38b21703280b336d812f03e0af28abd7428b954103fbf3988dba72cd0b6a658eeb927759801fb662d167d727",
33513
+ "id": "component-DropdownList-94f3bf70177862d120129d4920477ebd053b337114916c63546dff3586f8d1c7397a6c112defab77f84aac8636edfdf17681b7a33f6419a4aa46e0bae2ede828",
33503
33514
  "file": "src/dropdown/list/dropdown-list.component.ts",
33504
33515
  "encapsulation": [],
33505
33516
  "entryComponents": [],
@@ -34206,7 +34217,7 @@
34206
34217
  "args": [
34207
34218
  {
34208
34219
  "name": "items",
34209
- "type": "",
34220
+ "type": "ListItem[]",
34210
34221
  "deprecated": false,
34211
34222
  "deprecationMessage": ""
34212
34223
  }
@@ -34222,7 +34233,7 @@
34222
34233
  "jsdoctags": [
34223
34234
  {
34224
34235
  "name": "items",
34225
- "type": "",
34236
+ "type": "ListItem[]",
34226
34237
  "deprecated": false,
34227
34238
  "deprecationMessage": "",
34228
34239
  "tagName": {
@@ -34241,7 +34252,7 @@
34241
34252
  "description": "<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\">&lt;cds-dropdown-list [items]=&quot;listItems&quot;&gt;&lt;/cds-dropdown-list&gt;</code></pre></div><b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">listItems = [\n {\n content: &quot;item one&quot;,\n selected: false\n },\n {\n content: &quot;item two&quot;,\n selected: false,\n },\n {\n content: &quot;item three&quot;,\n selected: false\n },\n {\n content: &quot;item four&quot;,\n selected: false\n }\n];</code></pre></div>",
34242
34253
  "rawdescription": "\n\n```html\n<cds-dropdown-list [items]=\"listItems\"></cds-dropdown-list>\n```\n```typescript\nlistItems = [\n\t{\n\t\tcontent: \"item one\",\n\t\tselected: false\n\t},\n\t{\n\t\tcontent: \"item two\",\n\t\tselected: false,\n\t},\n\t{\n\t\tcontent: \"item three\",\n\t\tselected: false\n\t},\n\t{\n\t\tcontent: \"item four\",\n\t\tselected: false\n\t}\n];\n```\n",
34243
34254
  "type": "component",
34244
- "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tOnDestroy,\n\tEventEmitter,\n\tTemplateRef,\n\tAfterViewInit,\n\tViewChild,\n\tElementRef,\n\tViewChildren,\n\tQueryList,\n\tApplicationRef\n} from \"@angular/core\";\nimport { Observable, isObservable, Subscription, of } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { AbstractDropdownView } from \"../abstract-dropdown-view.class\";\nimport { ListItem } from \"../list-item.interface\";\nimport { watchFocusJump } from \"../dropdowntools\";\nimport { ScrollCustomEvent } from \"./scroll-custom-event.interface\";\n\n\n/**\n * ```html\n * <cds-dropdown-list [items]=\"listItems\"></cds-dropdown-list>\n * ```\n * ```typescript\n * listItems = [\n * \t{\n * \t\tcontent: \"item one\",\n * \t\tselected: false\n * \t},\n * \t{\n * \t\tcontent: \"item two\",\n * \t\tselected: false,\n * \t},\n * \t{\n * \t\tcontent: \"item three\",\n * \t\tselected: false\n * \t},\n * \t{\n * \t\tcontent: \"item four\",\n * \t\tselected: false\n * \t}\n * ];\n * ```\n */\n@Component({\n\tselector: \"cds-dropdown-list, ibm-dropdown-list\",\n\ttemplate: `\n\t\t<ul\n\t\t\t#list\n\t\t\t[id]=\"listId\"\n\t\t\trole=\"listbox\"\n\t\t\tclass=\"cds--list-box__menu cds--multi-select\"\n\t\t\t(scroll)=\"emitScroll($event)\"\n\t\t\t(keydown)=\"navigateList($event)\"\n\t\t\ttabindex=\"0\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t[attr.aria-activedescendant]=\"highlightedItem\">\n\t\t\t<li\n\t\t\t\trole=\"option\"\n\t\t\t\t*ngFor=\"let item of displayItems; let i = index\"\n\t\t\t\t(click)=\"doClick($event, item)\"\n\t\t\t\tclass=\"cds--list-box__menu-item\"\n\t\t\t\t[attr.aria-selected]=\"item.selected\"\n\t\t\t\t[id]=\"getItemId(i)\"\n\t\t\t\t[attr.tabindex]=\"highlightedItem === getItemId(i) ? 0 : null\"\n\t\t\t\t[attr.title]=\" showTitles ? item.content : null\"\n\t\t\t\t[attr.disabled]=\"item.disabled ? true : null\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--list-box__menu-item--active': item.selected,\n\t\t\t\t\t'cds--list-box__menu-item--highlighted': highlightedItem === getItemId(i)\n\t\t\t\t}\">\n\t\t\t\t<div\n\t\t\t\t\t#listItem\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tclass=\"cds--list-box__menu-item__option\">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"!listTpl && type === 'multi'\"\n\t\t\t\t\t\tclass=\"cds--form-item cds--checkbox-wrapper\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t[attr.data-contained-checkbox-state]=\"item.selected\"\n\t\t\t\t\t\t\tclass=\"cds--checkbox-label\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass=\"cds--checkbox\"\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t[checked]=\"item.selected\"\n\t\t\t\t\t\t\t\t[disabled]=\"item.disabled\"\n\t\t\t\t\t\t\t\ttabindex=\"-1\">\n\t\t\t\t\t\t\t<span class=\"cds--checkbox-appearance\"></span>\n\t\t\t\t\t\t\t<span class=\"cds--checkbox-label-text\">{{item.content}}</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ng-container *ngIf=\"!listTpl && type === 'single'\">{{item.content}}</ng-container>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"!listTpl && type === 'single'\"\n\t\t\t\t\t\tcdsIcon=\"checkmark\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__menu-item__selected-icon\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t*ngIf=\"listTpl\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{item: item}\"\n\t\t\t\t\t\t[ngTemplateOutlet]=\"listTpl\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: AbstractDropdownView,\n\t\t\tuseExisting: DropdownList\n\t\t}\n\t]\n})\nexport class DropdownList implements AbstractDropdownView, AfterViewInit, OnDestroy {\n\tstatic listCount = 0;\n\t@Input() ariaLabel = this.i18n.get().DROPDOWN_LIST.LABEL;\n\t/**\n\t * The list items belonging to the `DropdownList`.\n\t */\n\t@Input() set items(value: Array<ListItem> | Observable<Array<ListItem>>) {\n\t\tif (isObservable(value)) {\n\t\t\tif (this._itemsSubscription) {\n\t\t\t\tthis._itemsSubscription.unsubscribe();\n\t\t\t}\n\t\t\tthis._itemsReady = new Observable<boolean>((observer) => {\n\t\t\t\tthis._itemsSubscription = value.subscribe(v => {\n\t\t\t\t\tthis.updateList(v);\n\t\t\t\t\tobserver.next(true);\n\t\t\t\t\tobserver.complete();\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.onItemsReady(null);\n\t\t} else {\n\t\t\tthis.updateList(value);\n\t\t}\n\t\tthis._originalItems = value;\n\t}\n\n\tget items(): Array<ListItem> | Observable<Array<ListItem>> {\n\t\treturn this._originalItems;\n\t}\n\t/**\n\t * Template to bind to items in the `DropdownList` (optional).\n\t */\n\t@Input() listTpl: string | TemplateRef<any> = null;\n\t/**\n\t * Event to emit selection of a list item within the `DropdownList`.\n\t */\n\t@Output() select: EventEmitter<{ item: ListItem, isUpdate?: boolean } | ListItem[]> = new EventEmitter();\n\t/**\n\t * Event to emit scroll event of a list within the `DropdownList`.\n\t */\n\t@Output() scroll: EventEmitter<ScrollCustomEvent> = new EventEmitter();\n\t/**\n\t * Event to suggest a blur on the view.\n\t * Emits _after_ the first/last item has been focused.\n\t * ex.\n\t * ArrowUp -> focus first item\n\t * ArrowUp -> emit event\n\t *\n\t * When this event fires focus should be placed on some element outside of the list - blurring the list as a result\n\t */\n\t@Output() blurIntent = new EventEmitter<\"top\" | \"bottom\">();\n\t/**\n\t * Maintains a reference to the view DOM element for the unordered list of items within the `DropdownList`.\n\t */\n\t@ViewChild(\"list\", { static: true }) list: ElementRef;\n\t/**\n\t * Defines whether or not the `DropdownList` supports selecting multiple items as opposed to single\n\t * item selection.\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\n\t/**\n\t * Defines whether to show title attribute or not\n\t */\n\t@Input() showTitles = true;\n\n\t/**\n\t * Defines the rendering size of the `DropdownList` input component.\n\t */\n\tpublic size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\tpublic listId = `listbox-${DropdownList.listCount++}`;\n\tpublic highlightedItem = null;\n\t/**\n\t * Holds the list of items that will be displayed in the `DropdownList`.\n\t * It differs from the the complete set of items when filtering is used (but\n\t * it is always a subset of the total items in `DropdownList`).\n\t */\n\tpublic displayItems: Array<ListItem> = [];\n\t/**\n\t * Maintains the index for the selected item within the `DropdownList`.\n\t */\n\tprotected index = -1;\n\t/**\n\t * An array holding the HTML list elements in the view.\n\t */\n\t@ViewChildren(\"listItem\") protected listElementList: QueryList<ElementRef>;\n\t/**\n\t * Observable bound to keydown events to control filtering.\n\t */\n\tprotected focusJump;\n\t/**\n\t * Tracks the current (if any) subscription to the items observable so we can clean up when the input is updated.\n\t */\n\tprotected _itemsSubscription: Subscription;\n\t/**\n\t * Used to retain the original items passed to the setter.\n\t */\n\tprotected _originalItems: Array<ListItem> | Observable<Array<ListItem>>;\n\t/**\n\t * Useful representation of the items, should be accessed via `getListItems`.\n\t */\n\tprotected _items: Array<ListItem> = [];\n\t/**\n\t * Used to wait for items in case they are passed through an observable.\n\t */\n\tprotected _itemsReady: Observable<boolean>;\n\n\t/**\n\t * Creates an instance of `DropdownList`.\n\t */\n\tconstructor(public elementRef: ElementRef, protected i18n: I18n, protected appRef: ApplicationRef) {}\n\n\t/**\n\t * Retrieves array of list items and index of the selected item after view has rendered.\n\t * Additionally, any Observables for the `DropdownList` are initialized.\n\t */\n\tngAfterViewInit() {\n\t\tthis.index = this.getListItems().findIndex(item => item.selected);\n\t\tthis.setupFocusObservable();\n\t\tsetTimeout(() => {\n\t\t\tthis.doEmitSelect(true);\n\t\t});\n\t}\n\n\t/**\n\t * Removes any Observables on destruction of the component.\n\t */\n\tngOnDestroy() {\n\t\tif (this.focusJump) {\n\t\t\tthis.focusJump.unsubscribe();\n\t\t}\n\t\tif (this._itemsSubscription) {\n\t\t\tthis._itemsSubscription.unsubscribe();\n\t\t}\n\t}\n\n\tdoEmitSelect(isUpdate = true) {\n\t\tif (this.type === \"single\") {\n\t\t\tthis.select.emit({ item: this._items.find(item => item.selected), isUpdate: isUpdate });\n\t\t} else {\n\t\t\t// abuse javascripts object mutability until we can break the API and switch to\n\t\t\t// { items: [], isUpdate: true }\n\t\t\tconst selected = this.getSelected() || [];\n\t\t\tselected[\"isUpdate\"] = isUpdate;\n\t\t\tthis.select.emit(selected);\n\t\t}\n\t}\n\n\tgetItemId(index: number) {\n\t\treturn `${this.listId}-${index}`;\n\t}\n\n\t/**\n\t * Updates the displayed list of items and then retrieves the most current properties for the `DropdownList` from the DOM.\n\t */\n\tupdateList(items) {\n\t\tthis._items = items.map(item => Object.assign({}, item));\n\t\tthis.displayItems = this._items;\n\t\tthis.updateIndex();\n\t\tthis.setupFocusObservable();\n\t\tthis.doEmitSelect();\n\t}\n\n\t/**\n\t * Filters the items being displayed in the DOM list.\n\t */\n\tfilterBy(query = \"\") {\n\t\tif (query) {\n\t\t\tthis.displayItems = this.getListItems().filter(item => item.content.toLowerCase().includes(query.toLowerCase()));\n\t\t\t// Reset index if items were found\n\t\t\t// Prevent selecting index in list that are undefined.\n\t\t\tif (this.displayItems) {\n\t\t\t\tthis.index = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.displayItems = this.getListItems();\n\t\t}\n\n\t\tthis.updateIndex();\n\t}\n\n\t/**\n\t * Initializes (or re-initializes) the Observable that handles switching focus to an element based on\n\t * key input matching the first letter of the item in the list.\n\t */\n\tsetupFocusObservable() {\n\t\tif (!this.list) { return; }\n\t\tif (this.focusJump) {\n\t\t\tthis.focusJump.unsubscribe();\n\t\t}\n\t\tlet elList = Array.from(this.list.nativeElement.querySelectorAll(\"li\"));\n\t\tthis.focusJump = watchFocusJump(this.list.nativeElement, elList)\n\t\t\t.subscribe(el => {\n\t\t\t\tel.focus();\n\t\t\t});\n\t}\n\n\t/**\n\t * Returns the `ListItem` that is subsequent to the selected item in the `DropdownList`.\n\t */\n\tgetNextItem(): ListItem {\n\t\tif (this.index < this.displayItems.length - 1) {\n\t\t\tthis.index++;\n\t\t}\n\t\treturn this.displayItems[this.index];\n\t}\n\n\t/**\n\t * Returns `true` if the selected item is not the last item in the `DropdownList`.\n\t */\n\thasNextElement(): boolean {\n\t\treturn this.index < this.displayItems.length - 1 &&\n\t\t\t(!(this.index === this.displayItems.length - 2) || !this.displayItems[this.index + 1].disabled);\n\t}\n\n\t/**\n\t * Returns the `HTMLElement` for the item that is subsequent to the selected item.\n\t */\n\tgetNextElement(): HTMLElement {\n\t\t// Only return native elements if they are rendered\n\t\tconst elemList = this.listElementList ? this.listElementList.toArray() : [];\n\t\tif (!elemList.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Start checking from next index\n\t\t * Continue looping through the list until a non disabeled element is found or\n\t\t * end of list is reached\n\t\t */\n\t\tfor (let i = this.index + 1; i < elemList.length; i++) {\n\t\t\t// If the values in the list are not disabled\n\t\t\tif (!this.displayItems[i].disabled) {\n\t\t\t\tthis.index = i;\n\t\t\t\treturn elemList[i].nativeElement;\n\t\t\t}\n\t\t}\n\n\t\treturn elemList[this.index]?.nativeElement;\n\t}\n\n\t/**\n\t * Returns the `ListItem` that precedes the selected item within `DropdownList`.\n\t */\n\tgetPrevItem(): ListItem {\n\t\tif (this.index > 0) {\n\t\t\tthis.index--;\n\t\t}\n\t\treturn this.displayItems[this.index];\n\t}\n\n\t/**\n\t * Returns `true` if the selected item is not the first in the list.\n\t */\n\thasPrevElement(): boolean {\n\t\treturn this.index > 0 && (!(this.index === 1) || !this.displayItems[0].disabled);\n\t}\n\n\t/**\n\t * Returns the `HTMLElement` for the item that precedes the selected item.\n\t */\n\tgetPrevElement(): HTMLElement {\n\t\t// Only return native elements if they are rendered\n\t\tconst elemList = this.listElementList ? this.listElementList.toArray() : [];\n\t\tif (!elemList.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Start checking from next index\n\t\t * Continue looping through the list until a non disabeled element is found or\n\t\t * end of list is reached\n\t\t */\n\t\tfor (let i = this.index - 1; i < this.index && i >= 0; i--) {\n\t\t\t// If the values in the list are not disabled\n\t\t\tif (!this.displayItems[i].disabled) {\n\t\t\t\tthis.index = i;\n\t\t\t\treturn elemList[i].nativeElement;\n\t\t\t}\n\t\t}\n\n\t\treturn elemList[this.index].nativeElement;\n\t}\n\n\t/**\n\t * Returns the `ListItem` that is selected within `DropdownList`.\n\t */\n\tgetCurrentItem(): ListItem {\n\t\tif (this.index < 0) {\n\t\t\treturn this.displayItems[0];\n\t\t}\n\t\treturn this.displayItems[this.index];\n\t}\n\n\t/**\n\t * Returns the `HTMLElement` for the item that is selected within the `DropdownList`.\n\t */\n\tgetCurrentElement(): HTMLElement {\n\t\tif (this.index < 0) {\n\t\t\treturn this.listElementList.first.nativeElement;\n\t\t}\n\t\treturn this.listElementList.toArray()[this.index].nativeElement;\n\t}\n\n\t/**\n\t * Returns the items as an Array\n\t */\n\tgetListItems(): Array<ListItem> {\n\t\treturn this._items;\n\t}\n\n\t/**\n\t * Returns a list containing the selected item(s) in the `DropdownList`.\n\t */\n\tgetSelected(): ListItem[] {\n\t\tlet selected = this.getListItems().filter(item => item.selected);\n\t\tif (selected.length === 0) {\n\t\t\treturn [];\n\t\t}\n\t\treturn selected;\n\t}\n\n\t/**\n\t * Transforms array input list of items to the correct state by updating the selected item(s).\n\t */\n\tpropagateSelected(value: Array<ListItem>): void {\n\t\t// if we get a non-array, log out an error (since it is one)\n\t\tif (!Array.isArray(value)) {\n\t\t\tconsole.error(`${this.constructor.name}.propagateSelected expects an Array<ListItem>, got ${JSON.stringify(value)}`);\n\t\t}\n\t\tthis.onItemsReady(() => {\n\t\t\tconst selectedNewItems = [];\n\t\t\tfor (let newItem of value) {\n\t\t\t\tif (newItem && newItem.selected) {\n\t\t\t\t\t// copy the item\n\t\t\t\t\tlet tempNewItem: string | ListItem = Object.assign({}, newItem);\n\t\t\t\t\t// deleted selected because it's what we _want_ to change\n\t\t\t\t\tdelete tempNewItem.selected;\n\t\t\t\t\t// stringify for compare later\n\t\t\t\t\ttempNewItem = JSON.stringify(tempNewItem);\n\t\t\t\t\t// add to the list of selected items\n\t\t\t\t\tselectedNewItems.push(tempNewItem);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// loop through the list items and update the `selected` state for matching items in `value`\n\t\t\tfor (let oldItem of this.getListItems()) {\n\t\t\t\t// fast path when no items are selected\n\t\t\t\tif (selectedNewItems.length === 0) {\n\t\t\t\t\toldItem.selected = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// copy the item\n\t\t\t\tlet tempOldItem: string | ListItem = Object.assign({}, oldItem);\n\t\t\t\t// deleted selected because it's what we _want_ to change\n\t\t\t\tdelete tempOldItem.selected;\n\t\t\t\t// stringify for compare\n\t\t\t\ttempOldItem = JSON.stringify(tempOldItem);\n\t\t\t\tfor (let selectedNewItem of selectedNewItems) {\n\t\t\t\t\t// do the compare\n\t\t\t\t\tif (tempOldItem.includes(selectedNewItem)) {\n\t\t\t\t\t\toldItem.selected = true;\n\t\t\t\t\t\t// if we've found a matching item, we can stop looping\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toldItem.selected = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Initializes focus in the list, effectively a wrapper for `getCurrentElement().focus()`\n\t */\n\tinitFocus() {\n\t\tif (this.index < 0) {\n\t\t\tthis.updateIndex();\n\t\t}\n\n\t\tthis.list.nativeElement.focus();\n\t\tsetTimeout(() => {\n\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t});\n\t}\n\n\tupdateIndex() {\n\t\t// initialize index on the first selected item or\n\t\t// on the next non disabled item if no items are selected\n\t\t// in case, if all items are disabled, the index value will remain same\n\t\tconst selected = this.getSelected();\n\t\tif (selected.length) {\n\t\t\tthis.index = this.displayItems.indexOf(selected[0]);\n\t\t} else if (this.index < 0 && this.hasNextElement()) {\n\t\t\tthis.getNextElement();\n\t\t}\n\t}\n\n\t/**\n\t * Manages the keyboard accessibility for navigation and selection within a `DropdownList`.\n\t */\n\tnavigateList(event: KeyboardEvent) {\n\t\tif (event.key === \"Enter\" || event.key === \" \") {\n\t\t\tif (this.listElementList.some(option => option.nativeElement === event.target)) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t\tif (event.key === \"Enter\") {\n\t\t\t\tthis.doClick(event, this.getCurrentItem());\n\t\t\t}\n\t\t} else if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n\t\t\tevent.preventDefault();\n\t\t\tif (event.key === \"ArrowDown\") {\n\t\t\t\tif (this.hasNextElement()) {\n\t\t\t\t\tthis.getNextElement()?.scrollIntoView({ block: \"end\" });\n\t\t\t\t} else {\n\t\t\t\t\tthis.blurIntent.emit(\"bottom\");\n\t\t\t\t}\n\t\t\t} else if (event.key === \"ArrowUp\") {\n\t\t\t\tif (this.hasPrevElement()) {\n\t\t\t\t\tthis.getPrevElement().scrollIntoView({ block: \"nearest\" });\n\t\t\t\t} else {\n\t\t\t\t\tthis.blurIntent.emit(\"top\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Emits the selected item or items after a mouse click event has occurred.\n\t */\n\tdoClick(event, item) {\n\t\tevent.preventDefault();\n\t\tif (item && !item.disabled) {\n\t\t\tthis.list.nativeElement.focus();\n\t\t\tif (this.type === \"single\") {\n\t\t\t\titem.selected = true;\n\t\t\t\t// reset the selection\n\t\t\t\tfor (let otherItem of this.getListItems()) {\n\t\t\t\t\tif (item !== otherItem) { otherItem.selected = false; }\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem.selected = !item.selected;\n\t\t\t}\n\t\t\tthis.index = this.displayItems.indexOf(item);\n\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t\tthis.doEmitSelect(false);\n\t\t\tthis.appRef.tick();\n\t\t}\n\t}\n\n\tonItemFocus(index) {\n\t\tconst element = this.listElementList.toArray()[index].nativeElement;\n\t\telement.classList.add(\"cds--list-box__menu-item--highlighted\");\n\t\telement.tabIndex = 0;\n\t}\n\n\tonItemBlur(index) {\n\t\tconst element = this.listElementList.toArray()[index].nativeElement;\n\t\telement.classList.remove(\"cds--list-box__menu-item--highlighted\");\n\t\telement.tabIndex = -1;\n\t}\n\n\t/**\n\t * Emits the scroll event of the options list\n\t */\n\temitScroll(event) {\n\t\tconst atTop: boolean = event.srcElement.scrollTop === 0;\n\t\tconst atBottom: boolean = event.srcElement.scrollHeight - event.srcElement.scrollTop === event.srcElement.clientHeight;\n\t\tconst customScrollEvent = { atTop, atBottom, event };\n\t\tthis.scroll.emit(customScrollEvent);\n\t}\n\n\t/**\n\t * Subscribe the function passed to an internal observable that will resolve once the items are ready\n\t */\n\tonItemsReady(subcription: () => void): void {\n\t\t// this subscription will auto unsubscribe because of the `first()` pipe\n\t\t(this._itemsReady || of(true)).pipe(first()).subscribe(subcription);\n\t}\n\n\treorderSelected(moveFocus = true): void {\n\t\tthis.displayItems = [...this.getSelected(), ...this.getListItems().filter(item => !item.selected)];\n\t\tif (moveFocus) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.updateIndex();\n\t\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t\t});\n\t\t}\n\t}\n}\n",
34255
+ "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tOnDestroy,\n\tEventEmitter,\n\tTemplateRef,\n\tAfterViewInit,\n\tViewChild,\n\tElementRef,\n\tViewChildren,\n\tQueryList,\n\tApplicationRef\n} from \"@angular/core\";\nimport { Observable, isObservable, Subscription, of } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { AbstractDropdownView } from \"../abstract-dropdown-view.class\";\nimport { ListItem } from \"../list-item.interface\";\nimport { watchFocusJump } from \"../dropdowntools\";\nimport { ScrollCustomEvent } from \"./scroll-custom-event.interface\";\n\n\n/**\n * ```html\n * <cds-dropdown-list [items]=\"listItems\"></cds-dropdown-list>\n * ```\n * ```typescript\n * listItems = [\n * \t{\n * \t\tcontent: \"item one\",\n * \t\tselected: false\n * \t},\n * \t{\n * \t\tcontent: \"item two\",\n * \t\tselected: false,\n * \t},\n * \t{\n * \t\tcontent: \"item three\",\n * \t\tselected: false\n * \t},\n * \t{\n * \t\tcontent: \"item four\",\n * \t\tselected: false\n * \t}\n * ];\n * ```\n */\n@Component({\n\tselector: \"cds-dropdown-list, ibm-dropdown-list\",\n\ttemplate: `\n\t\t<ul\n\t\t\t#list\n\t\t\t[id]=\"listId\"\n\t\t\trole=\"listbox\"\n\t\t\tclass=\"cds--list-box__menu cds--multi-select\"\n\t\t\t(scroll)=\"emitScroll($event)\"\n\t\t\t(keydown)=\"navigateList($event)\"\n\t\t\ttabindex=\"0\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t[attr.aria-activedescendant]=\"highlightedItem\">\n\t\t\t<li\n\t\t\t\trole=\"option\"\n\t\t\t\t*ngFor=\"let item of displayItems; let i = index\"\n\t\t\t\t(click)=\"doClick($event, item)\"\n\t\t\t\tclass=\"cds--list-box__menu-item\"\n\t\t\t\t[attr.aria-selected]=\"item.selected\"\n\t\t\t\t[id]=\"getItemId(i)\"\n\t\t\t\t[attr.tabindex]=\"highlightedItem === getItemId(i) ? 0 : null\"\n\t\t\t\t[attr.title]=\" showTitles ? item.content : null\"\n\t\t\t\t[attr.disabled]=\"item.disabled ? true : null\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--list-box__menu-item--active': item.selected,\n\t\t\t\t\t'cds--list-box__menu-item--highlighted': highlightedItem === getItemId(i)\n\t\t\t\t}\">\n\t\t\t\t<div\n\t\t\t\t\t#listItem\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tclass=\"cds--list-box__menu-item__option\">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"!listTpl && type === 'multi'\"\n\t\t\t\t\t\tclass=\"cds--form-item cds--checkbox-wrapper\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t[attr.data-contained-checkbox-state]=\"item.selected\"\n\t\t\t\t\t\t\tclass=\"cds--checkbox-label\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclass=\"cds--checkbox\"\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t[checked]=\"item.selected\"\n\t\t\t\t\t\t\t\t[disabled]=\"item.disabled\"\n\t\t\t\t\t\t\t\ttabindex=\"-1\">\n\t\t\t\t\t\t\t<span class=\"cds--checkbox-appearance\"></span>\n\t\t\t\t\t\t\t<span class=\"cds--checkbox-label-text\">{{item.content}}</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ng-container *ngIf=\"!listTpl && type === 'single'\">{{item.content}}</ng-container>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"!listTpl && type === 'single'\"\n\t\t\t\t\t\tcdsIcon=\"checkmark\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__menu-item__selected-icon\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t*ngIf=\"listTpl\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{item: item}\"\n\t\t\t\t\t\t[ngTemplateOutlet]=\"listTpl\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: AbstractDropdownView,\n\t\t\tuseExisting: DropdownList\n\t\t}\n\t]\n})\nexport class DropdownList implements AbstractDropdownView, AfterViewInit, OnDestroy {\n\tstatic listCount = 0;\n\t@Input() ariaLabel = this.i18n.get().DROPDOWN_LIST.LABEL;\n\t/**\n\t * The list items belonging to the `DropdownList`.\n\t */\n\t@Input() set items(value: Array<ListItem> | Observable<Array<ListItem>>) {\n\t\tif (isObservable(value)) {\n\t\t\tif (this._itemsSubscription) {\n\t\t\t\tthis._itemsSubscription.unsubscribe();\n\t\t\t}\n\t\t\tthis._itemsReady = new Observable<boolean>((observer) => {\n\t\t\t\tthis._itemsSubscription = value.subscribe(v => {\n\t\t\t\t\tthis.updateList(v);\n\t\t\t\t\tobserver.next(true);\n\t\t\t\t\tobserver.complete();\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.onItemsReady(null);\n\t\t} else {\n\t\t\tthis.updateList(value);\n\t\t}\n\t\tthis._originalItems = value;\n\t}\n\n\tget items(): Array<ListItem> | Observable<Array<ListItem>> {\n\t\treturn this._originalItems;\n\t}\n\t/**\n\t * Template to bind to items in the `DropdownList` (optional).\n\t */\n\t@Input() listTpl: string | TemplateRef<any> = null;\n\t/**\n\t * Event to emit selection of a list item within the `DropdownList`.\n\t */\n\t@Output() select: EventEmitter<{ item: ListItem, isUpdate?: boolean } | ListItem[]> = new EventEmitter();\n\t/**\n\t * Event to emit scroll event of a list within the `DropdownList`.\n\t */\n\t@Output() scroll: EventEmitter<ScrollCustomEvent> = new EventEmitter();\n\t/**\n\t * Event to suggest a blur on the view.\n\t * Emits _after_ the first/last item has been focused.\n\t * ex.\n\t * ArrowUp -> focus first item\n\t * ArrowUp -> emit event\n\t *\n\t * When this event fires focus should be placed on some element outside of the list - blurring the list as a result\n\t */\n\t@Output() blurIntent = new EventEmitter<\"top\" | \"bottom\">();\n\t/**\n\t * Maintains a reference to the view DOM element for the unordered list of items within the `DropdownList`.\n\t */\n\t@ViewChild(\"list\", { static: true }) list: ElementRef;\n\t/**\n\t * Defines whether or not the `DropdownList` supports selecting multiple items as opposed to single\n\t * item selection.\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\n\t/**\n\t * Defines whether to show title attribute or not\n\t */\n\t@Input() showTitles = true;\n\n\t/**\n\t * Defines the rendering size of the `DropdownList` input component.\n\t */\n\tpublic size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\tpublic listId = `listbox-${DropdownList.listCount++}`;\n\tpublic highlightedItem = null;\n\t/**\n\t * Holds the list of items that will be displayed in the `DropdownList`.\n\t * It differs from the the complete set of items when filtering is used (but\n\t * it is always a subset of the total items in `DropdownList`).\n\t */\n\tpublic displayItems: Array<ListItem> = [];\n\t/**\n\t * Maintains the index for the selected item within the `DropdownList`.\n\t */\n\tprotected index = -1;\n\t/**\n\t * An array holding the HTML list elements in the view.\n\t */\n\t@ViewChildren(\"listItem\") protected listElementList: QueryList<ElementRef>;\n\t/**\n\t * Observable bound to keydown events to control filtering.\n\t */\n\tprotected focusJump;\n\t/**\n\t * Tracks the current (if any) subscription to the items observable so we can clean up when the input is updated.\n\t */\n\tprotected _itemsSubscription: Subscription;\n\t/**\n\t * Used to retain the original items passed to the setter.\n\t */\n\tprotected _originalItems: Array<ListItem> | Observable<Array<ListItem>>;\n\t/**\n\t * Useful representation of the items, should be accessed via `getListItems`.\n\t */\n\tprotected _items: Array<ListItem> = [];\n\t/**\n\t * Used to wait for items in case they are passed through an observable.\n\t */\n\tprotected _itemsReady: Observable<boolean>;\n\n\t/**\n\t * Creates an instance of `DropdownList`.\n\t */\n\tconstructor(public elementRef: ElementRef, protected i18n: I18n, protected appRef: ApplicationRef) {}\n\n\t/**\n\t * Retrieves array of list items and index of the selected item after view has rendered.\n\t * Additionally, any Observables for the `DropdownList` are initialized.\n\t */\n\tngAfterViewInit() {\n\t\tthis.index = this.getListItems().findIndex(item => item.selected);\n\t\tthis.setupFocusObservable();\n\t\tsetTimeout(() => {\n\t\t\tthis.doEmitSelect(true);\n\t\t});\n\t}\n\n\t/**\n\t * Removes any Observables on destruction of the component.\n\t */\n\tngOnDestroy() {\n\t\tif (this.focusJump) {\n\t\t\tthis.focusJump.unsubscribe();\n\t\t}\n\t\tif (this._itemsSubscription) {\n\t\t\tthis._itemsSubscription.unsubscribe();\n\t\t}\n\t}\n\n\tdoEmitSelect(isUpdate = true) {\n\t\tif (this.type === \"single\") {\n\t\t\tthis.select.emit({ item: this._items.find(item => item.selected), isUpdate: isUpdate });\n\t\t} else {\n\t\t\t// abuse javascripts object mutability until we can break the API and switch to\n\t\t\t// { items: [], isUpdate: true }\n\t\t\tconst selected = this.getSelected() || [];\n\t\t\tselected[\"isUpdate\"] = isUpdate;\n\t\t\tthis.select.emit(selected);\n\t\t}\n\t}\n\n\tgetItemId(index: number) {\n\t\treturn `${this.listId}-${index}`;\n\t}\n\n\t/**\n\t * Updates the displayed list of items and then retrieves the most current properties for the `DropdownList` from the DOM.\n\t */\n\tupdateList(items: ListItem[]) {\n\t\tthis._items = items.map(item => Object.assign({}, item));\n\t\tthis.displayItems = this._items;\n\t\tthis.updateIndex();\n\t\tthis.setupFocusObservable();\n\t\tthis.doEmitSelect();\n\t}\n\n\t/**\n\t * Filters the items being displayed in the DOM list.\n\t */\n\tfilterBy(query = \"\") {\n\t\tif (query) {\n\t\t\tthis.displayItems = this.getListItems().filter(item => item.content.toLowerCase().includes(query.toLowerCase()));\n\t\t\t// Reset index if items were found\n\t\t\t// Prevent selecting index in list that are undefined.\n\t\t\tif (this.displayItems) {\n\t\t\t\tthis.index = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.displayItems = this.getListItems();\n\t\t}\n\n\t\tthis.updateIndex();\n\t}\n\n\t/**\n\t * Initializes (or re-initializes) the Observable that handles switching focus to an element based on\n\t * key input matching the first letter of the item in the list.\n\t */\n\tsetupFocusObservable() {\n\t\tif (!this.list) { return; }\n\t\tif (this.focusJump) {\n\t\t\tthis.focusJump.unsubscribe();\n\t\t}\n\t\tlet elList = Array.from(this.list.nativeElement.querySelectorAll(\"li\"));\n\t\tthis.focusJump = watchFocusJump(this.list.nativeElement, elList)\n\t\t\t.subscribe(el => {\n\t\t\t\tel.focus();\n\t\t\t});\n\t}\n\n\t/**\n\t * Returns the `ListItem` that is subsequent to the selected item in the `DropdownList`.\n\t */\n\tgetNextItem(): ListItem {\n\t\tif (this.index < this.displayItems.length - 1) {\n\t\t\tthis.index++;\n\t\t}\n\t\treturn this.displayItems[this.index];\n\t}\n\n\t/**\n\t * Returns `true` if the selected item is not the last item in the `DropdownList`.\n\t */\n\thasNextElement(): boolean {\n\t\treturn this.index < this.displayItems.length - 1 &&\n\t\t\t(!(this.index === this.displayItems.length - 2) || !this.displayItems[this.index + 1].disabled);\n\t}\n\n\t/**\n\t * Returns the `HTMLElement` for the item that is subsequent to the selected item.\n\t */\n\tgetNextElement(): HTMLElement {\n\t\t// Only return native elements if they are rendered\n\t\tconst elemList = this.listElementList ? this.listElementList.toArray() : [];\n\t\tif (!elemList.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Start checking from next index\n\t\t * Continue looping through the list until a non disabeled element is found or\n\t\t * end of list is reached\n\t\t */\n\t\tfor (let i = this.index + 1; i < elemList.length; i++) {\n\t\t\t// If the values in the list are not disabled\n\t\t\tif (!this.displayItems[i].disabled) {\n\t\t\t\tthis.index = i;\n\t\t\t\treturn elemList[i].nativeElement;\n\t\t\t}\n\t\t}\n\n\t\treturn elemList[this.index]?.nativeElement;\n\t}\n\n\t/**\n\t * Returns the `ListItem` that precedes the selected item within `DropdownList`.\n\t */\n\tgetPrevItem(): ListItem {\n\t\tif (this.index > 0) {\n\t\t\tthis.index--;\n\t\t}\n\t\treturn this.displayItems[this.index];\n\t}\n\n\t/**\n\t * Returns `true` if the selected item is not the first in the list.\n\t */\n\thasPrevElement(): boolean {\n\t\treturn this.index > 0 && (!(this.index === 1) || !this.displayItems[0].disabled);\n\t}\n\n\t/**\n\t * Returns the `HTMLElement` for the item that precedes the selected item.\n\t */\n\tgetPrevElement(): HTMLElement {\n\t\t// Only return native elements if they are rendered\n\t\tconst elemList = this.listElementList ? this.listElementList.toArray() : [];\n\t\tif (!elemList.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Start checking from next index\n\t\t * Continue looping through the list until a non disabeled element is found or\n\t\t * end of list is reached\n\t\t */\n\t\tfor (let i = this.index - 1; i < this.index && i >= 0; i--) {\n\t\t\t// If the values in the list are not disabled\n\t\t\tif (!this.displayItems[i].disabled) {\n\t\t\t\tthis.index = i;\n\t\t\t\treturn elemList[i].nativeElement;\n\t\t\t}\n\t\t}\n\n\t\treturn elemList[this.index].nativeElement;\n\t}\n\n\t/**\n\t * Returns the `ListItem` that is selected within `DropdownList`.\n\t */\n\tgetCurrentItem(): ListItem {\n\t\tif (this.index < 0) {\n\t\t\treturn this.displayItems[0];\n\t\t}\n\t\treturn this.displayItems[this.index];\n\t}\n\n\t/**\n\t * Returns the `HTMLElement` for the item that is selected within the `DropdownList`.\n\t */\n\tgetCurrentElement(): HTMLElement {\n\t\tif (this.index < 0) {\n\t\t\treturn this.listElementList.first.nativeElement;\n\t\t}\n\t\treturn this.listElementList.toArray()[this.index].nativeElement;\n\t}\n\n\t/**\n\t * Returns the items as an Array\n\t */\n\tgetListItems(): Array<ListItem> {\n\t\treturn this._items;\n\t}\n\n\t/**\n\t * Returns a list containing the selected item(s) in the `DropdownList`.\n\t */\n\tgetSelected(): ListItem[] {\n\t\tlet selected = this.getListItems().filter(item => item.selected);\n\t\tif (selected.length === 0) {\n\t\t\treturn [];\n\t\t}\n\t\treturn selected;\n\t}\n\n\t/**\n\t * Transforms array input list of items to the correct state by updating the selected item(s).\n\t */\n\tpropagateSelected(value: Array<ListItem>): void {\n\t\t// if we get a non-array, log out an error (since it is one)\n\t\tif (!Array.isArray(value)) {\n\t\t\tconsole.error(`${this.constructor.name}.propagateSelected expects an Array<ListItem>, got ${JSON.stringify(value)}`);\n\t\t}\n\t\tthis.onItemsReady(() => {\n\t\t\tconst selectedNewItems = [];\n\t\t\tfor (let newItem of value) {\n\t\t\t\tif (newItem && newItem.selected) {\n\t\t\t\t\t// copy the item\n\t\t\t\t\tlet tempNewItem: string | ListItem = Object.assign({}, newItem);\n\t\t\t\t\t// deleted selected because it's what we _want_ to change\n\t\t\t\t\tdelete tempNewItem.selected;\n\t\t\t\t\t// stringify for compare later\n\t\t\t\t\ttempNewItem = JSON.stringify(tempNewItem);\n\t\t\t\t\t// add to the list of selected items\n\t\t\t\t\tselectedNewItems.push(tempNewItem);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// loop through the list items and update the `selected` state for matching items in `value`\n\t\t\tfor (let oldItem of this.getListItems()) {\n\t\t\t\t// fast path when no items are selected\n\t\t\t\tif (selectedNewItems.length === 0) {\n\t\t\t\t\toldItem.selected = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// copy the item\n\t\t\t\tlet tempOldItem: string | ListItem = Object.assign({}, oldItem);\n\t\t\t\t// deleted selected because it's what we _want_ to change\n\t\t\t\tdelete tempOldItem.selected;\n\t\t\t\t// stringify for compare\n\t\t\t\ttempOldItem = JSON.stringify(tempOldItem);\n\t\t\t\tfor (let selectedNewItem of selectedNewItems) {\n\t\t\t\t\t// do the compare\n\t\t\t\t\tif (tempOldItem.includes(selectedNewItem)) {\n\t\t\t\t\t\toldItem.selected = true;\n\t\t\t\t\t\t// if we've found a matching item, we can stop looping\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toldItem.selected = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Initializes focus in the list, effectively a wrapper for `getCurrentElement().focus()`\n\t */\n\tinitFocus() {\n\t\tif (this.index < 0) {\n\t\t\tthis.updateIndex();\n\t\t}\n\n\t\tthis.list.nativeElement.focus();\n\t\tsetTimeout(() => {\n\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t});\n\t}\n\n\tupdateIndex() {\n\t\t// initialize index on the first selected item or\n\t\t// on the next non disabled item if no items are selected\n\t\t// in case, if all items are disabled, the index value will remain same\n\t\tconst selected = this.getSelected();\n\t\tif (selected.length) {\n\t\t\tthis.index = this.displayItems.indexOf(selected[0]);\n\t\t} else if (this.index < 0 && this.hasNextElement()) {\n\t\t\tthis.getNextElement();\n\t\t}\n\t}\n\n\t/**\n\t * Manages the keyboard accessibility for navigation and selection within a `DropdownList`.\n\t */\n\tnavigateList(event: KeyboardEvent) {\n\t\tif (event.key === \"Enter\" || event.key === \" \") {\n\t\t\tif (this.listElementList.some(option => option.nativeElement === event.target)) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t\tif (event.key === \"Enter\") {\n\t\t\t\tthis.doClick(event, this.getCurrentItem());\n\t\t\t}\n\t\t} else if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n\t\t\tevent.preventDefault();\n\t\t\tif (event.key === \"ArrowDown\") {\n\t\t\t\tif (this.hasNextElement()) {\n\t\t\t\t\tthis.getNextElement()?.scrollIntoView({ block: \"end\" });\n\t\t\t\t} else {\n\t\t\t\t\tthis.blurIntent.emit(\"bottom\");\n\t\t\t\t}\n\t\t\t} else if (event.key === \"ArrowUp\") {\n\t\t\t\tif (this.hasPrevElement()) {\n\t\t\t\t\tthis.getPrevElement().scrollIntoView({ block: \"nearest\" });\n\t\t\t\t} else {\n\t\t\t\t\tthis.blurIntent.emit(\"top\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Emits the selected item or items after a mouse click event has occurred.\n\t */\n\tdoClick(event, item) {\n\t\tevent.preventDefault();\n\t\tif (item && !item.disabled) {\n\t\t\tthis.list.nativeElement.focus();\n\t\t\tif (this.type === \"single\") {\n\t\t\t\titem.selected = true;\n\t\t\t\t// reset the selection\n\t\t\t\tfor (let otherItem of this.getListItems()) {\n\t\t\t\t\tif (item !== otherItem) { otherItem.selected = false; }\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\titem.selected = !item.selected;\n\t\t\t}\n\t\t\tthis.index = this.displayItems.indexOf(item);\n\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t\tthis.doEmitSelect(false);\n\t\t\tthis.appRef.tick();\n\t\t}\n\t}\n\n\tonItemFocus(index) {\n\t\tconst element = this.listElementList.toArray()[index].nativeElement;\n\t\telement.classList.add(\"cds--list-box__menu-item--highlighted\");\n\t\telement.tabIndex = 0;\n\t}\n\n\tonItemBlur(index) {\n\t\tconst element = this.listElementList.toArray()[index].nativeElement;\n\t\telement.classList.remove(\"cds--list-box__menu-item--highlighted\");\n\t\telement.tabIndex = -1;\n\t}\n\n\t/**\n\t * Emits the scroll event of the options list\n\t */\n\temitScroll(event) {\n\t\tconst atTop: boolean = event.srcElement.scrollTop === 0;\n\t\tconst atBottom: boolean = event.srcElement.scrollHeight - event.srcElement.scrollTop === event.srcElement.clientHeight;\n\t\tconst customScrollEvent = { atTop, atBottom, event };\n\t\tthis.scroll.emit(customScrollEvent);\n\t}\n\n\t/**\n\t * Subscribe the function passed to an internal observable that will resolve once the items are ready\n\t */\n\tonItemsReady(subcription: () => void): void {\n\t\t// this subscription will auto unsubscribe because of the `first()` pipe\n\t\t(this._itemsReady || of(true)).pipe(first()).subscribe(subcription);\n\t}\n\n\treorderSelected(moveFocus = true): void {\n\t\tthis.displayItems = [...this.getSelected(), ...this.getListItems().filter(item => !item.selected)];\n\t\tif (moveFocus) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.updateIndex();\n\t\t\t\tthis.highlightedItem = this.getItemId(this.index);\n\t\t\t});\n\t\t}\n\t}\n}\n",
34245
34256
  "assetsDirs": [],
34246
34257
  "styleUrlsData": "",
34247
34258
  "stylesData": "",
@@ -34439,7 +34450,7 @@
34439
34450
  },
34440
34451
  {
34441
34452
  "name": "DynamicListComboBox",
34442
- "id": "component-DynamicListComboBox-a884061eb02e30165efa134891662a9533806f1b8d5e759da5fc49006255d37e26ea777533920b08c54e3c79687bb29d10f6041c5dc2702d020109fb43781f49",
34453
+ "id": "component-DynamicListComboBox-1c9aa4d55f79938ecc1920aa73daf986566aa07e52949d4d2cfa9bbea1a4f9b866a822a5f988a04f697ee3920fd15513a149d911e96c7ee50f08d83b89e4ae53",
34443
34454
  "file": "src/combobox/stories/app-dynamic-list-combobox.component.ts",
34444
34455
  "encapsulation": [],
34445
34456
  "entryComponents": [],
@@ -34449,7 +34460,7 @@
34449
34460
  "selector": "app-dynamic-list-combobox",
34450
34461
  "styleUrls": [],
34451
34462
  "styles": [],
34452
- "template": "<cds-combo-box\n\t[(items)]=\"items\"\n\ttype=\"multi\"\n\t(selected)=\"updateSelected($event)\">\n\t<cds-dropdown-list></cds-dropdown-list>\n</cds-combo-box>\n\t",
34463
+ "template": "<cds-combo-box\n\t[(items)]=\"items\"\n\titemValueKey=\"content\"\n\ttype=\"multi\"\n\t(selected)=\"updateSelected($event)\">\n\t<cds-dropdown-list></cds-dropdown-list>\n</cds-combo-box>\n\t",
34453
34464
  "templateUrl": [],
34454
34465
  "viewProviders": [],
34455
34466
  "hostDirectives": [],
@@ -34464,7 +34475,7 @@
34464
34475
  "type": "[]",
34465
34476
  "optional": false,
34466
34477
  "description": "",
34467
- "line": 15
34478
+ "line": 16
34468
34479
  }
34469
34480
  ],
34470
34481
  "methodsClass": [
@@ -34481,7 +34492,7 @@
34481
34492
  "optional": false,
34482
34493
  "returnType": "void",
34483
34494
  "typeParameters": [],
34484
- "line": 30,
34495
+ "line": 31,
34485
34496
  "deprecated": false,
34486
34497
  "deprecationMessage": "",
34487
34498
  "jsdoctags": [
@@ -34506,7 +34517,7 @@
34506
34517
  "description": "",
34507
34518
  "rawdescription": "\n",
34508
34519
  "type": "component",
34509
- "sourceCode": "import { Component, AfterViewInit } from \"@angular/core\";\n\n@Component({\n\tselector: \"app-dynamic-list-combobox\",\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(items)]=\"items\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"updateSelected($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})\nexport class DynamicListComboBox implements AfterViewInit {\n\titems = [\n\t\t{\n\t\t\tcontent: \"one\"\n\t\t},\n\t\t{\n\t\t\tcontent: \"two\"\n\t\t},\n\t\t{\n\t\t\tcontent: \"three\"\n\t\t},\n\t\t{\n\t\t\tcontent: \"four\"\n\t\t}\n\t];\n\n\tupdateSelected(event) {\n\t\tthis.items.forEach((item: any) => {\n\t\t\tif (event.some(selectedItem => selectedItem.content === item.content)) {\n\t\t\t\titem.selected = true;\n\t\t\t} else {\n\t\t\t\titem.selected = false;\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tconst newItems = JSON.parse(JSON.stringify(this.items));\n\t\t\tnewItems.push({ content: `New ${newItems.length}` });\n\t\t\tthis.items = newItems;\n\t\t}, 4000);\n\t}\n}\n",
34520
+ "sourceCode": "import { Component, AfterViewInit } from \"@angular/core\";\n\n@Component({\n\tselector: \"app-dynamic-list-combobox\",\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(items)]=\"items\"\n\t\t\titemValueKey=\"content\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"updateSelected($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})\nexport class DynamicListComboBox implements AfterViewInit {\n\titems = [\n\t\t{\n\t\t\tcontent: \"one\"\n\t\t},\n\t\t{\n\t\t\tcontent: \"two\"\n\t\t},\n\t\t{\n\t\t\tcontent: \"three\"\n\t\t},\n\t\t{\n\t\t\tcontent: \"four\"\n\t\t}\n\t];\n\n\tupdateSelected(event) {\n\t\tthis.items.forEach((item: any) => {\n\t\t\tif (event.some(selectedItem => selectedItem.content === item.content)) {\n\t\t\t\titem.selected = true;\n\t\t\t} else {\n\t\t\t\titem.selected = false;\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tconst newItems = JSON.parse(JSON.stringify(this.items));\n\t\t\tnewItems.push({ content: `New ${newItems.length}` });\n\t\t\tthis.items = newItems;\n\t\t}, 4000);\n\t}\n}\n",
34510
34521
  "assetsDirs": [],
34511
34522
  "styleUrlsData": "",
34512
34523
  "stylesData": "",
@@ -42203,7 +42214,7 @@
42203
42214
  },
42204
42215
  {
42205
42216
  "name": "MockQueryCombobox",
42206
- "id": "component-MockQueryCombobox-0aa6a59d20da3dbd55a5faa6326bd9712ddf9fa070499d3201edac39f9fe471269cf0c44744a8831c0283e815c44810e0ca0448d1be8120c85d38504019b09db",
42217
+ "id": "component-MockQueryCombobox-fb25ff9ce1e14a38ef8cd0418b432bf10e3204ff81cc8feacc51c410e01e3ac9c3bda0e358e09da67775c8abd741f76ff9c6cd10d538ce413ca2f31d812857b8",
42207
42218
  "file": "src/combobox/stories/app-mock-query-search.component.ts",
42208
42219
  "encapsulation": [],
42209
42220
  "entryComponents": [],
@@ -42213,7 +42224,7 @@
42213
42224
  "selector": "app-mock-query-search",
42214
42225
  "styleUrls": [],
42215
42226
  "styles": [],
42216
- "template": "<cds-combo-box\n\tappendInline=\"true\"\n\t[items]=\"filterItems\"\n\t(search)=\"onSearch($event)\"\n\t(selected)=\"selected($event)\">\n\t<cds-dropdown-list></cds-dropdown-list>\n</cds-combo-box>\n\t",
42227
+ "template": "<cds-combo-box\n\tappendInline=\"true\"\n\t[items]=\"filterItems\"\n\titemValueKey=\"content\"\n\t(search)=\"onSearch($event)\"\n\t(selected)=\"selected($event)\">\n\t<cds-dropdown-list></cds-dropdown-list>\n</cds-combo-box>\n\t",
42217
42228
  "templateUrl": [],
42218
42229
  "viewProviders": [],
42219
42230
  "hostDirectives": [],
@@ -42227,7 +42238,7 @@
42227
42238
  "type": "any",
42228
42239
  "optional": false,
42229
42240
  "description": "",
42230
- "line": 17
42241
+ "line": 18
42231
42242
  },
42232
42243
  {
42233
42244
  "name": "filterItems",
@@ -42237,7 +42248,7 @@
42237
42248
  "type": "any",
42238
42249
  "optional": false,
42239
42250
  "description": "",
42240
- "line": 16
42251
+ "line": 17
42241
42252
  }
42242
42253
  ],
42243
42254
  "methodsClass": [
@@ -42289,7 +42300,7 @@
42289
42300
  "description": "",
42290
42301
  "rawdescription": "\n",
42291
42302
  "type": "component",
42292
- "sourceCode": "import { Component } from \"@angular/core\";\n\n@Component({\n\tselector: \"app-mock-query-search\",\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\tappendInline=\"true\"\n\t\t\t[items]=\"filterItems\"\n\t\t\t(search)=\"onSearch($event)\"\n\t\t\t(selected)=\"selected($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})\nexport class MockQueryCombobox {\n\tfilterItems: any = [];\n\tcurrentlySelected: any;\n\n\tonSearch() {\n\t\t// Call API or search through items list\n\t\tsetTimeout(() => {\n\t\t\tconst array = [\n\t\t\t\t{ content: `Random ${Math.random()}` },\n\t\t\t\t{ content: `Random ${Math.random()}` },\n\t\t\t\t{ content: `Random ${Math.random()}` },\n\t\t\t\t{ content: `Random ${Math.random()}` }\n\t\t\t];\n\n\t\t\t// Include current selected in the list to avoid auto clear\n\t\t\tif (this.currentlySelected) {\n\t\t\t\tarray.push(this.currentlySelected);\n\t\t\t}\n\t\t\tthis.filterItems = array;\n\t\t}, 1000);\n\t}\n\n\tselected(event: any) {\n\t\t/**\n\t\t * #ref-1245723\n\t\t * Update this on major release\n\t\t */\n\t\tif (Array.isArray(event) && !event.length) {\n\t\t\tthis.currentlySelected = undefined;\n\t\t} else {\n\t\t\tthis.currentlySelected = event;\n\t\t}\n\t}\n}\n",
42303
+ "sourceCode": "import { Component, Input } from \"@angular/core\";\n\n@Component({\n\tselector: \"app-mock-query-search\",\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\tappendInline=\"true\"\n\t\t\t[items]=\"filterItems\"\n\t\t\titemValueKey=\"content\"\n\t\t\t(search)=\"onSearch($event)\"\n\t\t\t(selected)=\"selected($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})\nexport class MockQueryCombobox {\n\tfilterItems: any = [];\n\tcurrentlySelected: any;\n\tonSearch() {\n\t\t// Call API or search through items list\n\t\tsetTimeout(() => {\n\t\t\tconst array = [\n\t\t\t\t{ content: `Random ${Math.random()}` },\n\t\t\t\t{ content: `Random ${Math.random()}` },\n\t\t\t\t{ content: `Random ${Math.random()}` },\n\t\t\t\t{ content: `Random ${Math.random()}` }\n\t\t\t];\n\n\t\t\t// Include current selected in the list to avoid auto clear\n\t\t\tif (this.currentlySelected) {\n\t\t\t\tarray.push(this.currentlySelected);\n\t\t\t}\n\t\t\tthis.filterItems = array;\n\t\t}, 1000);\n\t}\n\n\tselected(event: any) {\n\t\t/**\n\t\t * #ref-1245723\n\t\t * Update this on major release\n\t\t */\n\t\tif (Array.isArray(event) && !event.length) {\n\t\t\tthis.currentlySelected = undefined;\n\t\t} else {\n\t\t\tthis.currentlySelected = event;\n\t\t}\n\t}\n}\n",
42293
42304
  "assetsDirs": [],
42294
42305
  "styleUrlsData": "",
42295
42306
  "stylesData": "",
@@ -50894,7 +50905,7 @@
50894
50905
  },
50895
50906
  {
50896
50907
  "name": "RadioGroup",
50897
- "id": "component-RadioGroup-af9bff4caca39904899cb79cd82da6509fd36b4cfa0844178c850fa8f6c4783b6523bbc07faf850c6090a6fdbfae4f7fdbbcdc9a393c535b63284f8a824249c1",
50908
+ "id": "component-RadioGroup-92514bdc3aa775d3809e06446501d9657c9db475411b6b0fcaa3bb9d65834e99f5d85390904ce04db7a3bbe711fdc8ab8be4170b6359aade0105f30dbeea32cb",
50898
50909
  "file": "src/radio/radio-group.component.ts",
50899
50910
  "encapsulation": [],
50900
50911
  "entryComponents": [],
@@ -50919,7 +50930,7 @@
50919
50930
  "deprecationMessage": "",
50920
50931
  "rawdescription": "\n\nUsed to set the `aria-label` attribute on the radio group element.\n",
50921
50932
  "description": "<p>Used to set the <code>aria-label</code> attribute on the radio group element.</p>\n",
50922
- "line": 222,
50933
+ "line": 224,
50923
50934
  "type": "string",
50924
50935
  "decorators": []
50925
50936
  },
@@ -50929,7 +50940,7 @@
50929
50940
  "deprecationMessage": "",
50930
50941
  "rawdescription": "\n\nUsed to set the `aria-labelledby` attribute on the radio group element.\n",
50931
50942
  "description": "<p>Used to set the <code>aria-labelledby</code> attribute on the radio group element.</p>\n",
50932
- "line": 227,
50943
+ "line": 229,
50933
50944
  "type": "string",
50934
50945
  "decorators": []
50935
50946
  },
@@ -50939,7 +50950,7 @@
50939
50950
  "deprecationMessage": "",
50940
50951
  "rawdescription": "\n\n**Experimental**: Optional decorator (e.g. AI label).\n",
50941
50952
  "description": "<p><strong>Experimental</strong>: Optional decorator (e.g. AI label).</p>\n",
50942
- "line": 217,
50953
+ "line": 219,
50943
50954
  "type": "TemplateRef<any>",
50944
50955
  "decorators": []
50945
50956
  },
@@ -50949,7 +50960,7 @@
50949
50960
  "deprecationMessage": "",
50950
50961
  "rawdescription": "\n\nSet to true to disable the whole radio group\n",
50951
50962
  "description": "<p>Set to true to disable the whole radio group</p>\n",
50952
- "line": 177,
50963
+ "line": 179,
50953
50964
  "type": "boolean",
50954
50965
  "decorators": []
50955
50966
  },
@@ -50959,7 +50970,7 @@
50959
50970
  "deprecationMessage": "",
50960
50971
  "rawdescription": "\n\nSets the optional helper text.\n",
50961
50972
  "description": "<p>Sets the optional helper text.</p>\n",
50962
- "line": 232,
50973
+ "line": 234,
50963
50974
  "type": "string | TemplateRef<any>",
50964
50975
  "decorators": []
50965
50976
  },
@@ -50970,7 +50981,7 @@
50970
50981
  "deprecationMessage": "",
50971
50982
  "rawdescription": "\n\nSet to `true` to show the invalid state.\n",
50972
50983
  "description": "<p>Set to <code>true</code> to show the invalid state.</p>\n",
50973
- "line": 237,
50984
+ "line": 239,
50974
50985
  "type": "boolean",
50975
50986
  "decorators": []
50976
50987
  },
@@ -50980,7 +50991,7 @@
50980
50991
  "deprecationMessage": "",
50981
50992
  "rawdescription": "\n\nValue displayed if combobox is in an invalid state.\n",
50982
50993
  "description": "<p>Value displayed if combobox is in an invalid state.</p>\n",
50983
- "line": 242,
50994
+ "line": 244,
50984
50995
  "type": "string | TemplateRef<any>",
50985
50996
  "decorators": []
50986
50997
  },
@@ -50989,7 +51000,7 @@
50989
51000
  "defaultValue": "\"right\"",
50990
51001
  "deprecated": false,
50991
51002
  "deprecationMessage": "",
50992
- "line": 210,
51003
+ "line": 212,
50993
51004
  "type": "\"right\" | \"left\"",
50994
51005
  "decorators": []
50995
51006
  },
@@ -50997,7 +51008,7 @@
50997
51008
  "name": "legend",
50998
51009
  "deprecated": false,
50999
51010
  "deprecationMessage": "",
51000
- "line": 212,
51011
+ "line": 214,
51001
51012
  "type": "string | TemplateRef<any>",
51002
51013
  "decorators": []
51003
51014
  },
@@ -51007,7 +51018,7 @@
51007
51018
  "deprecationMessage": "",
51008
51019
  "rawdescription": "\n\nReplaces the name associated with the `RadioGroup` with the provided parameter.\n",
51009
51020
  "description": "<p>Replaces the name associated with the <code>RadioGroup</code> with the provided parameter.</p>\n",
51010
- "line": 162,
51021
+ "line": 164,
51011
51022
  "type": "string",
51012
51023
  "decorators": []
51013
51024
  },
@@ -51016,7 +51027,7 @@
51016
51027
  "defaultValue": "\"horizontal\"",
51017
51028
  "deprecated": false,
51018
51029
  "deprecationMessage": "",
51019
- "line": 208,
51030
+ "line": 210,
51020
51031
  "type": "\"horizontal\" | \"vertical\"",
51021
51032
  "decorators": []
51022
51033
  },
@@ -51026,7 +51037,7 @@
51026
51037
  "deprecationMessage": "",
51027
51038
  "rawdescription": "\n\nSets the passed in `Radio` item as the selected input within the `RadioGroup`.\n",
51028
51039
  "description": "<p>Sets the passed in <code>Radio</code> item as the selected input within the <code>RadioGroup</code>.</p>\n",
51029
- "line": 116,
51040
+ "line": 118,
51030
51041
  "type": "Radio | null",
51031
51042
  "decorators": []
51032
51043
  },
@@ -51036,7 +51047,7 @@
51036
51047
  "deprecationMessage": "",
51037
51048
  "rawdescription": "\n\nReturns the skeleton value in the `RadioGroup` if there is one.\n",
51038
51049
  "description": "<p>Returns the skeleton value in the <code>RadioGroup</code> if there is one.</p>\n",
51039
- "line": 192,
51050
+ "line": 194,
51040
51051
  "type": "any",
51041
51052
  "decorators": []
51042
51053
  },
@@ -51046,7 +51057,7 @@
51046
51057
  "deprecationMessage": "",
51047
51058
  "rawdescription": "\n\nSets the value/state of the selected `Radio` within the `RadioGroup` to the passed in value.\n",
51048
51059
  "description": "<p>Sets the value/state of the selected <code>Radio</code> within the <code>RadioGroup</code> to the passed in value.</p>\n",
51049
- "line": 142,
51060
+ "line": 144,
51050
51061
  "type": "any",
51051
51062
  "decorators": []
51052
51063
  },
@@ -51057,7 +51068,7 @@
51057
51068
  "deprecationMessage": "",
51058
51069
  "rawdescription": "\n\nSet to `true` to show a warning (contents set by warnText)\n",
51059
51070
  "description": "<p>Set to <code>true</code> to show a warning (contents set by warnText)</p>\n",
51060
- "line": 247,
51071
+ "line": 249,
51061
51072
  "type": "boolean",
51062
51073
  "decorators": []
51063
51074
  },
@@ -51067,7 +51078,7 @@
51067
51078
  "deprecationMessage": "",
51068
51079
  "rawdescription": "\n\nSets the warning text\n",
51069
51080
  "description": "<p>Sets the warning text</p>\n",
51070
- "line": 252,
51081
+ "line": 254,
51071
51082
  "type": "string | TemplateRef<any>",
51072
51083
  "decorators": []
51073
51084
  }
@@ -51080,7 +51091,7 @@
51080
51091
  "deprecationMessage": "",
51081
51092
  "rawdescription": "\n\nEmits event notifying other classes of a change using a `RadioChange` class.\n",
51082
51093
  "description": "<p>Emits event notifying other classes of a change using a <code>RadioChange</code> class.</p>\n",
51083
- "line": 257,
51094
+ "line": 259,
51084
51095
  "type": "EventEmitter<RadioChange>"
51085
51096
  }
51086
51097
  ],
@@ -51093,7 +51104,7 @@
51093
51104
  "type": "function",
51094
51105
  "optional": false,
51095
51106
  "description": "<p>Needed to properly implement ControlValueAccessor.</p>\n",
51096
- "line": 410,
51107
+ "line": 428,
51097
51108
  "rawdescription": "\n\nNeeded to properly implement ControlValueAccessor.\n"
51098
51109
  },
51099
51110
  {
@@ -51104,7 +51115,7 @@
51104
51115
  "type": "",
51105
51116
  "optional": false,
51106
51117
  "description": "<p>Method set in registerOnChange to propagate changes back to the form.</p>\n",
51107
- "line": 415,
51118
+ "line": 433,
51108
51119
  "rawdescription": "\n\nMethod set in registerOnChange to propagate changes back to the form.\n"
51109
51120
  },
51110
51121
  {
@@ -51115,7 +51126,7 @@
51115
51126
  "type": "",
51116
51127
  "optional": false,
51117
51128
  "description": "<p>Binds &#39;cds--form-item&#39; value to the class for <code>RadioGroup</code>.</p>\n",
51118
- "line": 268,
51129
+ "line": 270,
51119
51130
  "rawdescription": "\n\nBinds 'cds--form-item' value to the class for `RadioGroup`.\n",
51120
51131
  "decorators": [
51121
51132
  {
@@ -51135,7 +51146,7 @@
51135
51146
  "type": "number",
51136
51147
  "optional": false,
51137
51148
  "description": "<p>Used for creating the <code>RadioGroup</code> &#39;name&#39; property dynamically.</p>\n",
51138
- "line": 206,
51149
+ "line": 208,
51139
51150
  "rawdescription": "\n\nUsed for creating the `RadioGroup` 'name' property dynamically.\n",
51140
51151
  "modifierKind": [
51141
51152
  126
@@ -51148,7 +51159,7 @@
51148
51159
  "type": "QueryList<Radio>",
51149
51160
  "optional": false,
51150
51161
  "description": "<p>The <code>Radio</code> input items in the <code>RadioGroup</code>.</p>\n",
51151
- "line": 263,
51162
+ "line": 265,
51152
51163
  "rawdescription": "\n\nThe `Radio` input items in the `RadioGroup`.\n",
51153
51164
  "decorators": [
51154
51165
  {
@@ -51168,7 +51179,7 @@
51168
51179
  "optional": false,
51169
51180
  "returnType": "void",
51170
51181
  "typeParameters": [],
51171
- "line": 298,
51182
+ "line": 302,
51172
51183
  "deprecated": false,
51173
51184
  "deprecationMessage": "",
51174
51185
  "rawdescription": "\n\nUpdates the selected `Radio` to be checked (selected).\n",
@@ -51187,7 +51198,7 @@
51187
51198
  "optional": false,
51188
51199
  "returnType": "void",
51189
51200
  "typeParameters": [],
51190
- "line": 339,
51201
+ "line": 343,
51191
51202
  "deprecated": false,
51192
51203
  "deprecationMessage": "",
51193
51204
  "rawdescription": "\n\nCreates a class of `RadioChange` to emit the change in the `RadioGroup`.\n",
@@ -51210,7 +51221,7 @@
51210
51221
  "optional": false,
51211
51222
  "returnType": "void",
51212
51223
  "typeParameters": [],
51213
- "line": 403,
51224
+ "line": 421,
51214
51225
  "deprecated": false,
51215
51226
  "deprecationMessage": "",
51216
51227
  "decorators": [
@@ -51236,7 +51247,7 @@
51236
51247
  "optional": false,
51237
51248
  "returnType": "boolean",
51238
51249
  "typeParameters": [],
51239
- "line": 417,
51250
+ "line": 435,
51240
51251
  "deprecated": false,
51241
51252
  "deprecationMessage": "",
51242
51253
  "modifierKind": [
@@ -51267,7 +51278,7 @@
51267
51278
  "optional": false,
51268
51279
  "returnType": "void",
51269
51280
  "typeParameters": [],
51270
- "line": 390,
51281
+ "line": 408,
51271
51282
  "deprecated": false,
51272
51283
  "deprecationMessage": "",
51273
51284
  "rawdescription": "\n\nUsed to set method to propagate changes back to the form.\n",
@@ -51300,7 +51311,7 @@
51300
51311
  "optional": false,
51301
51312
  "returnType": "void",
51302
51313
  "typeParameters": [],
51303
- "line": 398,
51314
+ "line": 416,
51304
51315
  "deprecated": false,
51305
51316
  "deprecationMessage": "",
51306
51317
  "rawdescription": "\n\nRegisters a callback to be triggered when the control has been touched.\n",
@@ -51311,8 +51322,8 @@
51311
51322
  "jsdoctags": [
51312
51323
  {
51313
51324
  "name": {
51314
- "pos": 9761,
51315
- "end": 9763,
51325
+ "pos": 10139,
51326
+ "end": 10141,
51316
51327
  "flags": 16842752,
51317
51328
  "modifierFlagsCache": 0,
51318
51329
  "transformFlags": 0,
@@ -51323,8 +51334,8 @@
51323
51334
  "deprecated": false,
51324
51335
  "deprecationMessage": "",
51325
51336
  "tagName": {
51326
- "pos": 9755,
51327
- "end": 9760,
51337
+ "pos": 10133,
51338
+ "end": 10138,
51328
51339
  "flags": 16842752,
51329
51340
  "modifierFlagsCache": 0,
51330
51341
  "transformFlags": 0,
@@ -51348,7 +51359,7 @@
51348
51359
  "optional": false,
51349
51360
  "returnType": "void",
51350
51361
  "typeParameters": [],
51351
- "line": 332,
51362
+ "line": 336,
51352
51363
  "deprecated": false,
51353
51364
  "deprecationMessage": "",
51354
51365
  "rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the `RadioGroup`.\n\nex: `this.formGroup.get(\"myRadioGroup\").disable();`\n\n",
@@ -51356,8 +51367,8 @@
51356
51367
  "jsdoctags": [
51357
51368
  {
51358
51369
  "name": {
51359
- "pos": 8392,
51360
- "end": 8402,
51370
+ "pos": 8519,
51371
+ "end": 8529,
51361
51372
  "flags": 16842752,
51362
51373
  "modifierFlagsCache": 0,
51363
51374
  "transformFlags": 0,
@@ -51368,8 +51379,8 @@
51368
51379
  "deprecated": false,
51369
51380
  "deprecationMessage": "",
51370
51381
  "tagName": {
51371
- "pos": 8386,
51372
- "end": 8391,
51382
+ "pos": 8513,
51383
+ "end": 8518,
51373
51384
  "flags": 16842752,
51374
51385
  "modifierFlagsCache": 0,
51375
51386
  "transformFlags": 0,
@@ -51386,7 +51397,7 @@
51386
51397
  "optional": false,
51387
51398
  "returnType": "void",
51388
51399
  "typeParameters": [],
51389
- "line": 348,
51400
+ "line": 352,
51390
51401
  "deprecated": false,
51391
51402
  "deprecationMessage": "",
51392
51403
  "rawdescription": "\n\nSynchronizes radio properties.\n",
@@ -51398,7 +51409,7 @@
51398
51409
  "optional": false,
51399
51410
  "returnType": "void",
51400
51411
  "typeParameters": [],
51401
- "line": 307,
51412
+ "line": 311,
51402
51413
  "deprecated": false,
51403
51414
  "deprecationMessage": "",
51404
51415
  "rawdescription": "\n\nUse the value of the `RadioGroup` to update the selected radio to the right state (selected state).\n",
@@ -51417,7 +51428,7 @@
51417
51428
  "optional": false,
51418
51429
  "returnType": "void",
51419
51430
  "typeParameters": [],
51420
- "line": 365,
51431
+ "line": 369,
51421
51432
  "deprecated": false,
51422
51433
  "deprecationMessage": "",
51423
51434
  "rawdescription": "\n\nUpdates the value of the `RadioGroup` using the provided parameter.\n",
@@ -51445,7 +51456,7 @@
51445
51456
  "deprecationMessage": "",
51446
51457
  "rawdescription": "\n\nBinds 'cds--form-item' value to the class for `RadioGroup`.\n",
51447
51458
  "description": "<p>Binds &#39;cds--form-item&#39; value to the class for <code>RadioGroup</code>.</p>\n",
51448
- "line": 268,
51459
+ "line": 270,
51449
51460
  "type": "boolean",
51450
51461
  "decorators": []
51451
51462
  }
@@ -51457,7 +51468,7 @@
51457
51468
  "argsDecorator": [],
51458
51469
  "deprecated": false,
51459
51470
  "deprecationMessage": "",
51460
- "line": 403
51471
+ "line": 421
51461
51472
  }
51462
51473
  ],
51463
51474
  "standalone": false,
@@ -51465,7 +51476,7 @@
51465
51476
  "description": "<p>Get started with importing the module:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { RadioModule } from &#39;carbon-components-angular&#39;;</code></pre></div><p>Ex:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\">&lt;cds-radio-group [(ngModel)]=&quot;radio&quot;&gt;\n &lt;cds-radio *ngFor=&quot;let one of manyRadios&quot; [value]=&quot;one&quot;&gt;\n Radio {{one}}\n &lt;/cds-radio&gt;\n&lt;/cds-radio-group&gt;\n\nRadio selected: {{radio}}</code></pre></div><b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-ts\"> const manyRadios = [&quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;, &quot;five&quot;, &quot;six&quot;];</code></pre></div><p><a href=\"../../?path=/story/components-radio--basic\">See demo</a></p>\n",
51466
51477
  "rawdescription": "\n\nGet started with importing the module:\n\n```typescript\nimport { RadioModule } from 'carbon-components-angular';\n```\n\nEx:\n\n```html\n<cds-radio-group [(ngModel)]=\"radio\">\n\t<cds-radio *ngFor=\"let one of manyRadios\" [value]=\"one\">\n\t\tRadio {{one}}\n\t</cds-radio>\n</cds-radio-group>\n\nRadio selected: {{radio}}\n```\n\n```ts\n\tconst manyRadios = [\"one\", \"two\", \"three\", \"four\", \"five\", \"six\"];\n```\n\n[See demo](../../?path=/story/components-radio--basic)\n",
51467
51478
  "type": "component",
51468
- "sourceCode": "import {\n\tAfterContentInit,\n\tContentChildren,\n\tComponent,\n\tEventEmitter,\n\tforwardRef,\n\tInput,\n\tOutput,\n\tQueryList,\n\tHostBinding,\n\tAfterViewInit,\n\tHostListener,\n\tTemplateRef\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from \"@angular/forms\";\nimport { Radio } from \"./radio.component\";\nimport { RadioChange } from \"./radio-change.class\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { RadioModule } from 'carbon-components-angular';\n * ```\n *\n * Ex:\n *\n * ```html\n * <cds-radio-group [(ngModel)]=\"radio\">\n * \t<cds-radio *ngFor=\"let one of manyRadios\" [value]=\"one\">\n *\t\tRadio {{one}}\n * \t</cds-radio>\n * </cds-radio-group>\n *\n * Radio selected: {{radio}}\n * ```\n *\n * ```ts\n *\tconst manyRadios = [\"one\", \"two\", \"three\", \"four\", \"five\", \"six\"];\n * ```\n *\n * [See demo](../../?path=/story/components-radio--basic)\n */\n@Component({\n\tselector: \"cds-radio-group, ibm-radio-group\",\n\ttemplate: `\n\t\t<fieldset\n\t\t\tclass=\"cds--radio-button-group\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--radio-button-group--vertical': orientation === 'vertical',\n\t\t\t\t'cds--radio-button-group--label-left': labelPlacement === 'left',\n\t\t\t\t'cds--radio-button-group--invalid': invalid,\n\t\t\t\t'cds--radio-button-group--warning': !invalid && warn,\n\t\t\t\t'cds--radio-button-group--decorator': !!decorator\n\t\t\t}\"\n\t\t\t[attr.data-invalid]=\"invalid ? true : null\">\n\t\t\t<legend *ngIf=\"legend\" class=\"cds--label\">\n\t\t\t\t<ng-template *ngIf=\"isTemplate(legend); else legendLabel;\" [ngTemplateOutlet]=\"legend\"></ng-template>\n\t\t\t\t<ng-template #legendLabel>{{legend}}</ng-template>\n\t\t\t\t<ng-container *ngIf=\"decorator\">\n\t\t\t\t\t<div class=\"cds--radio-button-group-inner--decorator\">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]=\"decorator\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t</legend>\n\t\t\t<ng-content></ng-content>\n\t\t</fieldset>\n\t\t<div class=\"cds--radio-button__validation-msg\">\n\t\t\t<ng-container *ngIf=\"invalid\">\n\t\t\t\t<svg\n\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--radio-button__invalid-icon\">\n\t\t\t\t</svg>\n\t\t\t\t<div class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t\t<ng-container *ngIf=\"!invalid && warn\">\n\t\t\t\t<svg\n\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\tclass=\"cds--radio-button__invalid-icon cds--radio-button__invalid-icon--warning\"\n\t\t\t\t\tsize=\"16\">\n\t\t\t\t</svg>\n\t\t\t\t<div class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</div>\n\t\t<div\n\t\t\t*ngIf=\"helperText && !invalid && !warn\"\n\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: RadioGroup,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class RadioGroup implements AfterContentInit, AfterViewInit, ControlValueAccessor {\n\n\t/**\n\t * Sets the passed in `Radio` item as the selected input within the `RadioGroup`.\n\t */\n\t@Input()\n\tset selected(selected: Radio | null) {\n\t\tconst alreadySelected = (this._selected && this._selected.value) === (selected && selected.value);\n\t\tif (alreadySelected) {\n\t\t\t// no need to redo\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._selected) {\n\t\t\tthis._selected.checked = false;\n\t\t}\n\t\tthis._selected = selected;\n\t\tthis.value = selected ? selected.value : null;\n\t\tthis.checkSelectedRadio();\n\t}\n\n\t/**\n\t * Returns the `Radio` that is selected within the `RadioGroup`.\n\t */\n\tget selected() {\n\t\treturn this._selected;\n\t}\n\n\t/**\n\t * Sets the value/state of the selected `Radio` within the `RadioGroup` to the passed in value.\n\t */\n\t@Input()\n\tset value(newValue: any) {\n\t\tif (this._value !== newValue) {\n\t\t\tthis._value = newValue;\n\n\t\t\tthis.updateSelectedRadioFromValue();\n\t\t\tthis.checkSelectedRadio();\n\t\t}\n\t}\n\n\t/**\n\t * Returns the value/state of the selected `Radio` within the `RadioGroup`.\n\t */\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Replaces the name associated with the `RadioGroup` with the provided parameter.\n\t */\n\t@Input()\n\tset name(name: string) {\n\t\tthis._name = name;\n\t\tthis.updateRadios();\n\t}\n\t/**\n\t * Returns the associated name of the `RadioGroup`.\n\t */\n\tget name() {\n\t\treturn this._name;\n\t}\n\n\t/**\n\t * Set to true to disable the whole radio group\n\t */\n\t@Input()\n\tset disabled(disabled: boolean) {\n\t\tthis._disabled = disabled;\n\t\tthis.updateRadios();\n\t}\n\t/**\n\t * Returns the disabled value for the `RadioGroup`.\n\t */\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\n\t/**\n\t * Returns the skeleton value in the `RadioGroup` if there is one.\n\t */\n\t@Input()\n\tget skeleton(): any {\n\t\treturn this._skeleton;\n\t}\n\n\t/**\n\t * Sets the skeleton value for all `Radio` to the skeleton value of `RadioGroup`.\n\t */\n\tset skeleton(value: any) {\n\t\tthis._skeleton = value;\n\t\tthis.updateChildren();\n\t}\n\t/**\n\t * Used for creating the `RadioGroup` 'name' property dynamically.\n\t */\n\tstatic radioGroupCount = 0;\n\n\t@Input() orientation: \"horizontal\" | \"vertical\" = \"horizontal\";\n\n\t@Input() labelPlacement: \"right\" | \"left\" = \"right\";\n\n\t@Input() legend: string | TemplateRef<any>;\n\n\t/**\n\t * **Experimental**: Optional decorator (e.g. AI label).\n\t */\n\t@Input() decorator: TemplateRef<any>;\n\n\t/**\n\t * Used to set the `aria-label` attribute on the radio group element.\n\t */\n\t@Input() ariaLabel: string;\n\n\t/**\n\t * Used to set the `aria-labelledby` attribute on the radio group element.\n\t */\n\t@Input() ariaLabelledby: string;\n\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\n\t/**\n\t * Set to `true` to show the invalid state.\n\t */\n\t@Input() invalid = false;\n\n\t/**\n\t * Value displayed if combobox is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\n\t/**\n\t* Set to `true` to show a warning (contents set by warnText)\n\t*/\n\t@Input() warn = false;\n\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\n\t/**\n\t * Emits event notifying other classes of a change using a `RadioChange` class.\n\t */\n\t@Output() change: EventEmitter<RadioChange> = new EventEmitter<RadioChange>();\n\n\t/**\n\t * The `Radio` input items in the `RadioGroup`.\n\t */\n\t// tslint:disable-next-line:no-forward-ref\n\t@ContentChildren(forwardRef(() => Radio)) radios: QueryList<Radio>;\n\n\t/**\n\t * Binds 'cds--form-item' value to the class for `RadioGroup`.\n\t */\n\t@HostBinding(\"class.cds--form-item\") radioButtonGroupClass = true;\n\n\t/**\n\t * To track whether the `RadioGroup` has been initialized.\n\t */\n\tprotected isInitialized = false;\n\t/**\n\t * Reflects whether or not the input is disabled and cannot be selected.\n\t */\n\tprotected _disabled = false;\n\t/**\n\t * Reflects whether or not the dropdown is loading.\n\t */\n\tprotected _skeleton = false;\n\t/**\n\t * The value of the selected option within the `RadioGroup`.\n\t */\n\tprotected _value: any = null;\n\t/**\n\t * The `Radio` within the `RadioGroup` that is selected.\n\t */\n\tprotected _selected: Radio = null;\n\t/**\n\t * The name attribute associated with the `RadioGroup`.\n\t */\n\tprotected _name = `radio-group-${RadioGroup.radioGroupCount++}`;\n\n\t/**\n\t * Updates the selected `Radio` to be checked (selected).\n\t */\n\tcheckSelectedRadio() {\n\t\tif (this.selected && !this._selected.checked) {\n\t\t\tthis.selected.checked = true;\n\t\t}\n\t}\n\n\t/**\n\t * Use the value of the `RadioGroup` to update the selected radio to the right state (selected state).\n\t */\n\tupdateSelectedRadioFromValue() {\n\t\tlet alreadySelected = this._selected != null && this._selected.value === this._value;\n\t\tif (this.radios && !alreadySelected) {\n\t\t\tif (this.selected && this.value) {\n\t\t\t\tthis.selected.checked = false;\n\t\t\t}\n\t\t\tthis._selected = null;\n\t\t\tthis.radios.forEach(radio => {\n\t\t\t\tif (radio.checked || radio.value === this._value) {\n\t\t\t\t\tthis._selected = radio;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (this.selected && !this.value) {\n\t\t\t\tthis._value = this.selected.value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the `RadioGroup`.\n\t *\n\t * ex: `this.formGroup.get(\"myRadioGroup\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the inputs\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Creates a class of `RadioChange` to emit the change in the `RadioGroup`.\n\t */\n\temitChangeEvent(event: RadioChange) {\n\t\tthis.change.emit(event);\n\t\tthis.propagateChange(event.value);\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Synchronizes radio properties.\n\t */\n\tupdateRadios() {\n\t\tif (this.radios) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.radios.forEach(radio => {\n\t\t\t\t\tradio.name = this.name;\n\t\t\t\t\tradio.setDisabledFromGroup(this.disabled);\n\t\t\t\t\tif (this.labelPlacement === \"left\") {\n\t\t\t\t\t\tradio.labelPlacement = \"left\";\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Updates the value of the `RadioGroup` using the provided parameter.\n\t */\n\twriteValue(value: any) {\n\t\tthis.value = value;\n\t\tsetTimeout(() => {\n\t\t\tthis.updateSelectedRadioFromValue();\n\t\t\tthis.checkSelectedRadio();\n\t\t});\n\t}\n\n\tngAfterContentInit() {\n\t\tthis.radios.changes.subscribe(() => {\n\t\t\tthis.updateRadios();\n\t\t\tthis.updateRadioChangeHandler();\n\t\t});\n\n\t\tthis.updateChildren();\n\t\tthis.updateRadioChangeHandler();\n\t}\n\n\tngAfterViewInit() {\n\t\tthis.updateRadios();\n\t}\n\n\t/**\n\t * Used to set method to propagate changes back to the form.\n\t */\n\tpublic registerOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\t/**\n\t * Registers a callback to be triggered when the control has been touched.\n\t * @param fn Callback to be triggered when the checkbox is touched.\n\t */\n\tpublic registerOnTouched(fn: any) {\n\t\tthis.onTouched = fn;\n\t}\n\n\t@HostListener(\"focusout\")\n\tfocusOut() {\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Needed to properly implement ControlValueAccessor.\n\t */\n\tonTouched: () => any = () => {};\n\n\t/**\n\t * Method set in registerOnChange to propagate changes back to the form.\n\t */\n\tpropagateChange = (_: any) => {};\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tprotected updateChildren() {\n\t\tif (this.radios) {\n\t\t\tthis.radios.forEach(child => child.skeleton = this.skeleton);\n\t\t}\n\t}\n\n\tprotected updateRadioChangeHandler() {\n\t\tthis.radios.forEach(radio => {\n\t\t\tradio.registerRadioChangeHandler((event: RadioChange) => {\n\t\t\t\tif ((this.selected && this.selected.value) === event.value) {\n\t\t\t\t\t// no need to redo\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// deselect previous radio\n\t\t\t\tif (this.selected) {\n\t\t\t\t\tthis.selected.checked = false;\n\t\t\t\t}\n\t\t\t\t// update selected and value from the event\n\t\t\t\tthis._selected = event.source;\n\t\t\t\tthis._value = event.value;\n\t\t\t\t// bubble the event\n\t\t\t\tthis.emitChangeEvent(event);\n\t\t\t});\n\t\t});\n\t}\n}\n",
51479
+ "sourceCode": "import {\n\tAfterContentInit,\n\tContentChildren,\n\tComponent,\n\tEventEmitter,\n\tforwardRef,\n\tInput,\n\tOutput,\n\tQueryList,\n\tHostBinding,\n\tAfterViewInit,\n\tHostListener,\n\tTemplateRef,\n\tOnDestroy\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from \"@angular/forms\";\nimport { Radio } from \"./radio.component\";\nimport { RadioChange } from \"./radio-change.class\";\nimport { Subscription } from \"rxjs/internal/Subscription\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { RadioModule } from 'carbon-components-angular';\n * ```\n *\n * Ex:\n *\n * ```html\n * <cds-radio-group [(ngModel)]=\"radio\">\n * \t<cds-radio *ngFor=\"let one of manyRadios\" [value]=\"one\">\n *\t\tRadio {{one}}\n * \t</cds-radio>\n * </cds-radio-group>\n *\n * Radio selected: {{radio}}\n * ```\n *\n * ```ts\n *\tconst manyRadios = [\"one\", \"two\", \"three\", \"four\", \"five\", \"six\"];\n * ```\n *\n * [See demo](../../?path=/story/components-radio--basic)\n */\n@Component({\n\tselector: \"cds-radio-group, ibm-radio-group\",\n\ttemplate: `\n\t\t<fieldset\n\t\t\tclass=\"cds--radio-button-group\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--radio-button-group--vertical': orientation === 'vertical',\n\t\t\t\t'cds--radio-button-group--label-left': labelPlacement === 'left',\n\t\t\t\t'cds--radio-button-group--invalid': invalid,\n\t\t\t\t'cds--radio-button-group--warning': !invalid && warn,\n\t\t\t\t'cds--radio-button-group--decorator': !!decorator\n\t\t\t}\"\n\t\t\t[attr.data-invalid]=\"invalid ? true : null\">\n\t\t\t<legend *ngIf=\"legend\" class=\"cds--label\">\n\t\t\t\t<ng-template *ngIf=\"isTemplate(legend); else legendLabel;\" [ngTemplateOutlet]=\"legend\"></ng-template>\n\t\t\t\t<ng-template #legendLabel>{{legend}}</ng-template>\n\t\t\t\t<ng-container *ngIf=\"decorator\">\n\t\t\t\t\t<div class=\"cds--radio-button-group-inner--decorator\">\n\t\t\t\t\t\t<ng-template [ngTemplateOutlet]=\"decorator\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t</legend>\n\t\t\t<ng-content></ng-content>\n\t\t</fieldset>\n\t\t<div class=\"cds--radio-button__validation-msg\">\n\t\t\t<ng-container *ngIf=\"invalid\">\n\t\t\t\t<svg\n\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--radio-button__invalid-icon\">\n\t\t\t\t</svg>\n\t\t\t\t<div class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t\t<ng-container *ngIf=\"!invalid && warn\">\n\t\t\t\t<svg\n\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\tclass=\"cds--radio-button__invalid-icon cds--radio-button__invalid-icon--warning\"\n\t\t\t\t\tsize=\"16\">\n\t\t\t\t</svg>\n\t\t\t\t<div class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</div>\n\t\t<div\n\t\t\t*ngIf=\"helperText && !invalid && !warn\"\n\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: RadioGroup,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class RadioGroup implements AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {\n\n\t/**\n\t * Sets the passed in `Radio` item as the selected input within the `RadioGroup`.\n\t */\n\t@Input()\n\tset selected(selected: Radio | null) {\n\t\tconst alreadySelected = (this._selected && this._selected.value) === (selected && selected.value);\n\t\tif (alreadySelected) {\n\t\t\t// no need to redo\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._selected) {\n\t\t\tthis._selected.checked = false;\n\t\t}\n\t\tthis._selected = selected;\n\t\tthis.value = selected ? selected.value : null;\n\t\tthis.checkSelectedRadio();\n\t}\n\n\t/**\n\t * Returns the `Radio` that is selected within the `RadioGroup`.\n\t */\n\tget selected() {\n\t\treturn this._selected;\n\t}\n\n\t/**\n\t * Sets the value/state of the selected `Radio` within the `RadioGroup` to the passed in value.\n\t */\n\t@Input()\n\tset value(newValue: any) {\n\t\tif (this._value !== newValue) {\n\t\t\tthis._value = newValue;\n\n\t\t\tthis.updateSelectedRadioFromValue();\n\t\t\tthis.checkSelectedRadio();\n\t\t}\n\t}\n\n\t/**\n\t * Returns the value/state of the selected `Radio` within the `RadioGroup`.\n\t */\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Replaces the name associated with the `RadioGroup` with the provided parameter.\n\t */\n\t@Input()\n\tset name(name: string) {\n\t\tthis._name = name;\n\t\tthis.updateRadios();\n\t}\n\t/**\n\t * Returns the associated name of the `RadioGroup`.\n\t */\n\tget name() {\n\t\treturn this._name;\n\t}\n\n\t/**\n\t * Set to true to disable the whole radio group\n\t */\n\t@Input()\n\tset disabled(disabled: boolean) {\n\t\tthis._disabled = disabled;\n\t\tthis.updateRadios();\n\t}\n\t/**\n\t * Returns the disabled value for the `RadioGroup`.\n\t */\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\n\t/**\n\t * Returns the skeleton value in the `RadioGroup` if there is one.\n\t */\n\t@Input()\n\tget skeleton(): any {\n\t\treturn this._skeleton;\n\t}\n\n\t/**\n\t * Sets the skeleton value for all `Radio` to the skeleton value of `RadioGroup`.\n\t */\n\tset skeleton(value: any) {\n\t\tthis._skeleton = value;\n\t\tthis.updateChildren();\n\t}\n\t/**\n\t * Used for creating the `RadioGroup` 'name' property dynamically.\n\t */\n\tstatic radioGroupCount = 0;\n\n\t@Input() orientation: \"horizontal\" | \"vertical\" = \"horizontal\";\n\n\t@Input() labelPlacement: \"right\" | \"left\" = \"right\";\n\n\t@Input() legend: string | TemplateRef<any>;\n\n\t/**\n\t * **Experimental**: Optional decorator (e.g. AI label).\n\t */\n\t@Input() decorator: TemplateRef<any>;\n\n\t/**\n\t * Used to set the `aria-label` attribute on the radio group element.\n\t */\n\t@Input() ariaLabel: string;\n\n\t/**\n\t * Used to set the `aria-labelledby` attribute on the radio group element.\n\t */\n\t@Input() ariaLabelledby: string;\n\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\n\t/**\n\t * Set to `true` to show the invalid state.\n\t */\n\t@Input() invalid = false;\n\n\t/**\n\t * Value displayed if combobox is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\n\t/**\n\t* Set to `true` to show a warning (contents set by warnText)\n\t*/\n\t@Input() warn = false;\n\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\n\t/**\n\t * Emits event notifying other classes of a change using a `RadioChange` class.\n\t */\n\t@Output() change: EventEmitter<RadioChange> = new EventEmitter<RadioChange>();\n\n\t/**\n\t * The `Radio` input items in the `RadioGroup`.\n\t */\n\t// tslint:disable-next-line:no-forward-ref\n\t@ContentChildren(forwardRef(() => Radio)) radios: QueryList<Radio>;\n\n\t/**\n\t * Binds 'cds--form-item' value to the class for `RadioGroup`.\n\t */\n\t@HostBinding(\"class.cds--form-item\") radioButtonGroupClass = true;\n\n\t/**\n\t * To track whether the `RadioGroup` has been initialized.\n\t */\n\tprotected isInitialized = false;\n\t/**\n\t * Reflects whether or not the input is disabled and cannot be selected.\n\t */\n\tprotected _disabled = false;\n\t/**\n\t * Reflects whether or not the dropdown is loading.\n\t */\n\tprotected _skeleton = false;\n\t/**\n\t * The value of the selected option within the `RadioGroup`.\n\t */\n\tprotected _value: any = null;\n\t/**\n\t * The `Radio` within the `RadioGroup` that is selected.\n\t */\n\tprotected _selected: Radio = null;\n\t/**\n\t * The name attribute associated with the `RadioGroup`.\n\t */\n\tprotected _name = `radio-group-${RadioGroup.radioGroupCount++}`;\n\n\tprivate subscription = new Subscription();\n\n\t/**\n\t * Updates the selected `Radio` to be checked (selected).\n\t */\n\tcheckSelectedRadio() {\n\t\tif (this.selected && !this._selected.checked) {\n\t\t\tthis.selected.checked = true;\n\t\t}\n\t}\n\n\t/**\n\t * Use the value of the `RadioGroup` to update the selected radio to the right state (selected state).\n\t */\n\tupdateSelectedRadioFromValue() {\n\t\tlet alreadySelected = this._selected != null && this._selected.value === this._value;\n\t\tif (this.radios && !alreadySelected) {\n\t\t\tif (this.selected && this.value) {\n\t\t\t\tthis.selected.checked = false;\n\t\t\t}\n\t\t\tthis._selected = null;\n\t\t\tthis.radios.forEach(radio => {\n\t\t\t\tif (radio.checked || radio.value === this._value) {\n\t\t\t\t\tthis._selected = radio;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (this.selected && !this.value) {\n\t\t\t\tthis._value = this.selected.value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the `RadioGroup`.\n\t *\n\t * ex: `this.formGroup.get(\"myRadioGroup\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the inputs\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Creates a class of `RadioChange` to emit the change in the `RadioGroup`.\n\t */\n\temitChangeEvent(event: RadioChange) {\n\t\tthis.change.emit(event);\n\t\tthis.propagateChange(event.value);\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Synchronizes radio properties.\n\t */\n\tupdateRadios() {\n\t\tif (this.radios) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.radios.forEach(radio => {\n\t\t\t\t\tradio.name = this.name;\n\t\t\t\t\tradio.setDisabledFromGroup(this.disabled);\n\t\t\t\t\tif (this.labelPlacement === \"left\") {\n\t\t\t\t\t\tradio.labelPlacement = \"left\";\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Updates the value of the `RadioGroup` using the provided parameter.\n\t */\n\twriteValue(value: any) {\n\t\tthis.value = value;\n\t}\n\n\tngAfterContentInit() {\n\t\tthis.subscription.add(\n\t\t\tthis.radios.changes.subscribe(() => {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tif (this.selected) {\n\t\t\t\t\t\tthis._selected = null;\n\t\t\t\t\t}\n\t\t\t\t\tthis.updateSelectedRadioFromValue();\n\t\t\t\t\tthis.checkSelectedRadio();\n\t\t\t\t}\n\t\t\t\tthis.updateRadios();\n\t\t\t\tthis.updateRadioChangeHandler();\n\t\t\t})\n\t\t);\n\n\t\tif (this.value) {\n\t\t\tthis.updateSelectedRadioFromValue();\n\t\t\tthis.checkSelectedRadio();\n\t\t}\n\n\t\tthis.updateChildren();\n\t\tthis.updateRadioChangeHandler();\n\t}\n\n\tngAfterViewInit() {\n\t\tthis.updateRadios();\n\t}\n\n\tngOnDestroy() {\n\t\tthis.subscription.unsubscribe();\n\t}\n\n\t/**\n\t * Used to set method to propagate changes back to the form.\n\t */\n\tpublic registerOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\t/**\n\t * Registers a callback to be triggered when the control has been touched.\n\t * @param fn Callback to be triggered when the checkbox is touched.\n\t */\n\tpublic registerOnTouched(fn: any) {\n\t\tthis.onTouched = fn;\n\t}\n\n\t@HostListener(\"focusout\")\n\tfocusOut() {\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Needed to properly implement ControlValueAccessor.\n\t */\n\tonTouched: () => any = () => {};\n\n\t/**\n\t * Method set in registerOnChange to propagate changes back to the form.\n\t */\n\tpropagateChange = (_: any) => {};\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tprotected updateChildren() {\n\t\tif (this.radios) {\n\t\t\tthis.radios.forEach(child => child.skeleton = this.skeleton);\n\t\t}\n\t}\n\n\tprotected updateRadioChangeHandler() {\n\t\tthis.radios.forEach(radio => {\n\t\t\tradio.registerRadioChangeHandler((event: RadioChange) => {\n\t\t\t\tif ((this.selected && this.selected.value) === event.value) {\n\t\t\t\t\t// no need to redo\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// deselect previous radio\n\t\t\t\tif (this.selected) {\n\t\t\t\t\tthis.selected.checked = false;\n\t\t\t\t}\n\t\t\t\t// update selected and value from the event\n\t\t\t\tthis._selected = event.source;\n\t\t\t\tthis._value = event.value;\n\t\t\t\t// bubble the event\n\t\t\t\tthis.emitChangeEvent(event);\n\t\t\t});\n\t\t});\n\t}\n}\n",
51469
51480
  "assetsDirs": [],
51470
51481
  "styleUrlsData": "",
51471
51482
  "stylesData": "",
@@ -51473,6 +51484,7 @@
51473
51484
  "implements": [
51474
51485
  "AfterContentInit",
51475
51486
  "AfterViewInit",
51487
+ "OnDestroy",
51476
51488
  "ControlValueAccessor"
51477
51489
  ],
51478
51490
  "accessors": {
@@ -51492,7 +51504,7 @@
51492
51504
  }
51493
51505
  ],
51494
51506
  "returnType": "void",
51495
- "line": 116,
51507
+ "line": 118,
51496
51508
  "rawdescription": "\n\nSets the passed in `Radio` item as the selected input within the `RadioGroup`.\n",
51497
51509
  "description": "<p>Sets the passed in <code>Radio</code> item as the selected input within the <code>RadioGroup</code>.</p>\n",
51498
51510
  "jsdoctags": [
@@ -51511,7 +51523,7 @@
51511
51523
  "name": "selected",
51512
51524
  "type": "",
51513
51525
  "returnType": "",
51514
- "line": 134,
51526
+ "line": 136,
51515
51527
  "rawdescription": "\n\nReturns the `Radio` that is selected within the `RadioGroup`.\n",
51516
51528
  "description": "<p>Returns the <code>Radio</code> that is selected within the <code>RadioGroup</code>.</p>\n"
51517
51529
  }
@@ -51532,7 +51544,7 @@
51532
51544
  }
51533
51545
  ],
51534
51546
  "returnType": "void",
51535
- "line": 142,
51547
+ "line": 144,
51536
51548
  "rawdescription": "\n\nSets the value/state of the selected `Radio` within the `RadioGroup` to the passed in value.\n",
51537
51549
  "description": "<p>Sets the value/state of the selected <code>Radio</code> within the <code>RadioGroup</code> to the passed in value.</p>\n",
51538
51550
  "jsdoctags": [
@@ -51551,7 +51563,7 @@
51551
51563
  "name": "value",
51552
51564
  "type": "",
51553
51565
  "returnType": "",
51554
- "line": 154,
51566
+ "line": 156,
51555
51567
  "rawdescription": "\n\nReturns the value/state of the selected `Radio` within the `RadioGroup`.\n",
51556
51568
  "description": "<p>Returns the value/state of the selected <code>Radio</code> within the <code>RadioGroup</code>.</p>\n"
51557
51569
  }
@@ -51572,7 +51584,7 @@
51572
51584
  }
51573
51585
  ],
51574
51586
  "returnType": "void",
51575
- "line": 162,
51587
+ "line": 164,
51576
51588
  "rawdescription": "\n\nReplaces the name associated with the `RadioGroup` with the provided parameter.\n",
51577
51589
  "description": "<p>Replaces the name associated with the <code>RadioGroup</code> with the provided parameter.</p>\n",
51578
51590
  "jsdoctags": [
@@ -51591,7 +51603,7 @@
51591
51603
  "name": "name",
51592
51604
  "type": "",
51593
51605
  "returnType": "",
51594
- "line": 169,
51606
+ "line": 171,
51595
51607
  "rawdescription": "\n\nReturns the associated name of the `RadioGroup`.\n",
51596
51608
  "description": "<p>Returns the associated name of the <code>RadioGroup</code>.</p>\n"
51597
51609
  }
@@ -51612,7 +51624,7 @@
51612
51624
  }
51613
51625
  ],
51614
51626
  "returnType": "void",
51615
- "line": 177,
51627
+ "line": 179,
51616
51628
  "rawdescription": "\n\nSet to true to disable the whole radio group\n",
51617
51629
  "description": "<p>Set to true to disable the whole radio group</p>\n",
51618
51630
  "jsdoctags": [
@@ -51631,7 +51643,7 @@
51631
51643
  "name": "disabled",
51632
51644
  "type": "boolean",
51633
51645
  "returnType": "boolean",
51634
- "line": 184,
51646
+ "line": 186,
51635
51647
  "rawdescription": "\n\nReturns the disabled value for the `RadioGroup`.\n",
51636
51648
  "description": "<p>Returns the disabled value for the <code>RadioGroup</code>.</p>\n"
51637
51649
  }
@@ -51652,7 +51664,7 @@
51652
51664
  }
51653
51665
  ],
51654
51666
  "returnType": "void",
51655
- "line": 199,
51667
+ "line": 201,
51656
51668
  "rawdescription": "\n\nSets the skeleton value for all `Radio` to the skeleton value of `RadioGroup`.\n",
51657
51669
  "description": "<p>Sets the skeleton value for all <code>Radio</code> to the skeleton value of <code>RadioGroup</code>.</p>\n",
51658
51670
  "jsdoctags": [
@@ -51671,7 +51683,7 @@
51671
51683
  "name": "skeleton",
51672
51684
  "type": "any",
51673
51685
  "returnType": "any",
51674
- "line": 192,
51686
+ "line": 194,
51675
51687
  "rawdescription": "\n\nReturns the skeleton value in the `RadioGroup` if there is one.\n",
51676
51688
  "description": "<p>Returns the skeleton value in the <code>RadioGroup</code> if there is one.</p>\n"
51677
51689
  }
@@ -51680,7 +51692,7 @@
51680
51692
  },
51681
51693
  {
51682
51694
  "name": "ReactiveFormsCombobox",
51683
- "id": "component-ReactiveFormsCombobox-4707cb203b232e01f8888d577882e2cc434d72e1d44ed65178140c63d4fa286e3f244f8d233a15c2270953dc8cbc1aac5e15973a43e3a1b6a0ff7a6486307b8c",
51695
+ "id": "component-ReactiveFormsCombobox-9f2cbdf9b54c8033cabf6aa1f6ddd138e0797c6146ab99c0334d15f4cdf9539f5795e50bdb5fbf2bb4815c6aae3d0b82135d120f91b5f9db40313d0cae3aa73e",
51684
51696
  "file": "src/combobox/stories/app-reactive-combobox.component.ts",
51685
51697
  "encapsulation": [],
51686
51698
  "entryComponents": [],
@@ -51690,7 +51702,7 @@
51690
51702
  "selector": "app-reactive-combobox",
51691
51703
  "styleUrls": [],
51692
51704
  "styles": [],
51693
- "template": "<form [formGroup]=\"sampleForm\" (ngSubmit)=\"onSubmit(sampleForm)\">\n\t<cds-combo-box\n\t\tformControlName=\"combobox\"\n\t\t[size]=\"size\"\n\t\t[label]=\"label\"\n\t\t[helperText]=\"helperText\"\n\t\titemValueKey=\"content\"\n\t\t[theme]=\"theme\"\n\t\t[invalid]=\"invalid\"\n\t\t[invalidText]=\"invalidText\"\n\t\t[warn]=\"warn\"\n\t\t[warnText]=\"warnText\"\n\t\t[items]=\"_items\">\n\t\t<cds-dropdown-list></cds-dropdown-list>\n\t</cds-combo-box>\n\tselected: {{ sampleForm.get(\"combobox\").value | json }}\n\t<cds-combo-box\n\t\tstyle=\"margin-top: 40px\"\n\t\tformControlName=\"multibox\"\n\t\t[label]=\"label\"\n\t\t[size]=\"size\"\n\t\titemValueKey=\"content\"\n\t\t[helperText]=\"helperText\"\n\t\ttype=\"multi\"\n\t\t[invalid]=\"invalid\"\n\t\t[invalidText]=\"invalidText\"\n\t\t[warn]=\"warn\"\n\t\t[warnText]=\"warnText\"\n\t\t[items]=\"_items\">\n\t\t<cds-dropdown-list></cds-dropdown-list>\n\t</cds-combo-box>\n\tselected: {{ sampleForm.get(\"multibox\").value | json }}\n</form>\n\t",
51705
+ "template": "<form [formGroup]=\"sampleForm\" (ngSubmit)=\"onSubmit(sampleForm)\">\n\t<cds-combo-box\n\t\tformControlName=\"combobox\"\n\t\t[size]=\"size\"\n\t\t[label]=\"label\"\n\t\t[helperText]=\"helperText\"\n\t\t[itemValueKey]=\"itemValueKey\"\n\t\t[theme]=\"theme\"\n\t\t[invalid]=\"invalid\"\n\t\t[invalidText]=\"invalidText\"\n\t\t[warn]=\"warn\"\n\t\t[warnText]=\"warnText\"\n\t\t[items]=\"_items\">\n\t\t<cds-dropdown-list></cds-dropdown-list>\n\t</cds-combo-box>\n\tselected: {{ sampleForm.get(\"combobox\").value | json }}\n\t<cds-combo-box\n\t\tstyle=\"margin-top: 40px\"\n\t\tformControlName=\"multibox\"\n\t\t[label]=\"label\"\n\t\t[size]=\"size\"\n\t\t[itemValueKey]=\"itemValueKey\"\n\t\t[helperText]=\"helperText\"\n\t\ttype=\"multi\"\n\t\t[invalid]=\"invalid\"\n\t\t[invalidText]=\"invalidText\"\n\t\t[warn]=\"warn\"\n\t\t[warnText]=\"warnText\"\n\t\t[items]=\"_items\">\n\t\t<cds-dropdown-list></cds-dropdown-list>\n\t</cds-combo-box>\n\tselected: {{ sampleForm.get(\"multibox\").value | json }}\n</form>\n\t",
51694
51706
  "templateUrl": [],
51695
51707
  "viewProviders": [],
51696
51708
  "hostDirectives": [],
@@ -51699,7 +51711,7 @@
51699
51711
  "name": "disabled",
51700
51712
  "deprecated": false,
51701
51713
  "deprecationMessage": "",
51702
- "line": 69,
51714
+ "line": 70,
51703
51715
  "type": "boolean",
51704
51716
  "decorators": []
51705
51717
  },
@@ -51734,10 +51746,19 @@
51734
51746
  "name": "items",
51735
51747
  "deprecated": false,
51736
51748
  "deprecationMessage": "",
51737
- "line": 61,
51749
+ "line": 62,
51738
51750
  "type": "Array<any>",
51739
51751
  "decorators": []
51740
51752
  },
51753
+ {
51754
+ "name": "itemValueKey",
51755
+ "defaultValue": "\"\"",
51756
+ "deprecated": false,
51757
+ "deprecationMessage": "",
51758
+ "line": 61,
51759
+ "type": "string",
51760
+ "decorators": []
51761
+ },
51741
51762
  {
51742
51763
  "name": "label",
51743
51764
  "defaultValue": "\"\"",
@@ -51794,7 +51815,7 @@
51794
51815
  "type": "any[]",
51795
51816
  "optional": false,
51796
51817
  "description": "",
51797
- "line": 79
51818
+ "line": 80
51798
51819
  },
51799
51820
  {
51800
51821
  "name": "sampleForm",
@@ -51819,7 +51840,7 @@
51819
51840
  "description": "",
51820
51841
  "rawdescription": "\n",
51821
51842
  "type": "component",
51822
- "sourceCode": "import {\n\tFormGroup,\n\tFormBuilder,\n\tFormControl\n} from \"@angular/forms\";\nimport {\n\tComponent,\n\tOnInit,\n\tInput\n} from \"@angular/core\";\nimport isEqual from \"lodash-es/isEqual\";\n\n@Component({\n\tselector: \"app-reactive-combobox\",\n\ttemplate: `\n\t\t<form [formGroup]=\"sampleForm\" (ngSubmit)=\"onSubmit(sampleForm)\">\n\t\t\t<cds-combo-box\n\t\t\t\tformControlName=\"combobox\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\titemValueKey=\"content\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[items]=\"_items\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t\tselected: {{ sampleForm.get(\"combobox\").value | json }}\n\t\t\t<cds-combo-box\n\t\t\t\tstyle=\"margin-top: 40px\"\n\t\t\t\tformControlName=\"multibox\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\titemValueKey=\"content\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\ttype=\"multi\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[items]=\"_items\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t\tselected: {{ sampleForm.get(\"multibox\").value | json }}\n\t\t</form>\n\t`\n})\nexport class ReactiveFormsCombobox implements OnInit {\n\tpublic sampleForm: FormGroup;\n\t@Input() invalid = false;\n\t@Input() invalidText = \"\";\n\t@Input() warn = false;\n\t@Input() warnText = \"\";\n\t@Input() label = \"\";\n\t@Input() helperText = \"\";\n\t@Input() size = \"md\";\n\t@Input() theme = \"dark\";\n\t@Input() set items(newItems: Array<any>) {\n\t\tif (!newItems.length) {\n\t\t\tnewItems = [];\n\t\t}\n\t\tif (!isEqual(this._items, newItems)) {\n\t\t\tthis._items = newItems;\n\t\t}\n\t}\n\t@Input() set disabled(isDisabled: boolean) {\n\t\tif (this.sampleForm) {\n\t\t\tif (isDisabled) {\n\t\t\t\tthis.sampleForm.disable();\n\t\t\t} else {\n\t\t\t\tthis.sampleForm.enable();\n\t\t\t}\n\t\t}\n\t}\n\n\t_items: any[] = [];\n\n\tconstructor(private fb: FormBuilder) {}\n\n\tngOnInit() {\n\t\tthis.sampleForm = this.fb.group({\n\t\t\tcombobox: new FormControl,\n\t\t\tmultibox: new FormControl\n\t\t});\n\n\t\tthis.sampleForm.get(\"combobox\")?.setValue(\"four\");\n\t\tthis.sampleForm.get(\"multibox\")?.setValue([\"four\", \"two\"]);\n\t}\n}\n",
51843
+ "sourceCode": "import {\n\tFormGroup,\n\tFormBuilder,\n\tFormControl\n} from \"@angular/forms\";\nimport {\n\tComponent,\n\tOnInit,\n\tInput\n} from \"@angular/core\";\nimport isEqual from \"lodash-es/isEqual\";\n\n@Component({\n\tselector: \"app-reactive-combobox\",\n\ttemplate: `\n\t\t<form [formGroup]=\"sampleForm\" (ngSubmit)=\"onSubmit(sampleForm)\">\n\t\t\t<cds-combo-box\n\t\t\t\tformControlName=\"combobox\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[items]=\"_items\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t\tselected: {{ sampleForm.get(\"combobox\").value | json }}\n\t\t\t<cds-combo-box\n\t\t\t\tstyle=\"margin-top: 40px\"\n\t\t\t\tformControlName=\"multibox\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\ttype=\"multi\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[items]=\"_items\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t\tselected: {{ sampleForm.get(\"multibox\").value | json }}\n\t\t</form>\n\t`\n})\nexport class ReactiveFormsCombobox implements OnInit {\n\tpublic sampleForm: FormGroup;\n\t@Input() invalid = false;\n\t@Input() invalidText = \"\";\n\t@Input() warn = false;\n\t@Input() warnText = \"\";\n\t@Input() label = \"\";\n\t@Input() helperText = \"\";\n\t@Input() size = \"md\";\n\t@Input() theme = \"dark\";\n\t@Input() itemValueKey = \"\";\n\t@Input() set items(newItems: Array<any>) {\n\t\tif (!newItems.length) {\n\t\t\tnewItems = [];\n\t\t}\n\t\tif (!isEqual(this._items, newItems)) {\n\t\t\tthis._items = newItems;\n\t\t}\n\t}\n\t@Input() set disabled(isDisabled: boolean) {\n\t\tif (this.sampleForm) {\n\t\t\tif (isDisabled) {\n\t\t\t\tthis.sampleForm.disable();\n\t\t\t} else {\n\t\t\t\tthis.sampleForm.enable();\n\t\t\t}\n\t\t}\n\t}\n\n\t_items: any[] = [];\n\n\tconstructor(private fb: FormBuilder) {}\n\n\tngOnInit() {\n\t\tthis.sampleForm = this.fb.group({\n\t\t\tcombobox: new FormControl,\n\t\t\tmultibox: new FormControl\n\t\t});\n\n\t\tthis.sampleForm.get(\"combobox\")?.setValue(\"four\");\n\t\tthis.sampleForm.get(\"multibox\")?.setValue([\"four\", \"two\"]);\n\t}\n}\n",
51823
51844
  "assetsDirs": [],
51824
51845
  "styleUrlsData": "",
51825
51846
  "stylesData": "",
@@ -51836,7 +51857,7 @@
51836
51857
  "deprecationMessage": ""
51837
51858
  }
51838
51859
  ],
51839
- "line": 79,
51860
+ "line": 80,
51840
51861
  "jsdoctags": [
51841
51862
  {
51842
51863
  "name": "fb",
@@ -51870,7 +51891,7 @@
51870
51891
  }
51871
51892
  ],
51872
51893
  "returnType": "void",
51873
- "line": 61,
51894
+ "line": 62,
51874
51895
  "jsdoctags": [
51875
51896
  {
51876
51897
  "name": "newItems",
@@ -51900,7 +51921,7 @@
51900
51921
  }
51901
51922
  ],
51902
51923
  "returnType": "void",
51903
- "line": 69,
51924
+ "line": 70,
51904
51925
  "jsdoctags": [
51905
51926
  {
51906
51927
  "name": "isDisabled",
@@ -52104,7 +52125,7 @@
52104
52125
  },
52105
52126
  {
52106
52127
  "name": "ReactiveFormsStory",
52107
- "id": "component-ReactiveFormsStory-516ea8fd5fbee2d4130b458ede7f527fd525433ff8d5d7ca7ab154882a8f9abbe09c126c6e5cbe548f3f964b822bae8240904b22982fabe2f98ffc01eeb1fd04-1",
52128
+ "id": "component-ReactiveFormsStory-22fea6f676798dd7aad8e8be5239ab157a6fa134f2a45d66b63a6bc1084e1a6be9e4f085c4c4b5c638c4ce42d9bea1f7f8c03d93809bc2818358d2ffeda37f6b-1",
52108
52129
  "file": "src/dropdown/stories/app-reactive-forms.component.ts",
52109
52130
  "encapsulation": [],
52110
52131
  "entryComponents": [],
@@ -52114,7 +52135,7 @@
52114
52135
  "selector": "app-reactive-forms",
52115
52136
  "styleUrls": [],
52116
52137
  "styles": [],
52117
- "template": "<form [formGroup]=\"formGroup\">\n\t<div style=\"width: 300px\">\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\tplaceholder=\"Multi-select\"\n\t\t\tvalue=\"oid\"\n\t\t\t(selected)=\"selected.emit($event)\"\n\t\t\t(onClose)=\"onClose.emit($event)\"\n\t\t\tformControlName=\"roles\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t</div>\n</form>\n<br>\n<code>{{ formGroup.get(\"roles\").value | json }}</code>\n\t",
52138
+ "template": "<form [formGroup]=\"formGroup\">\n\t<div style=\"width: 300px\">\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\tplaceholder=\"Multi-select\"\n\t\t\tvalue=\"oid\"\n\t\t\t(selected)=\"selected.emit($event)\"\n\t\t\t(onClose)=\"onClose.emit($event)\"\n\t\t\tformControlName=\"roles\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t</div>\n</form>\n<br>\n<code>{{ formGroup.get(\"roles\").value | json }}</code>\n\t",
52118
52139
  "templateUrl": [],
52119
52140
  "viewProviders": [],
52120
52141
  "hostDirectives": [],
@@ -52123,7 +52144,7 @@
52123
52144
  "name": "disabled",
52124
52145
  "deprecated": false,
52125
52146
  "deprecationMessage": "",
52126
- "line": 50,
52147
+ "line": 52,
52127
52148
  "type": "boolean",
52128
52149
  "decorators": []
52129
52150
  },
@@ -52132,7 +52153,7 @@
52132
52153
  "defaultValue": "\"\"",
52133
52154
  "deprecated": false,
52134
52155
  "deprecationMessage": "",
52135
- "line": 46,
52156
+ "line": 47,
52136
52157
  "type": "string",
52137
52158
  "decorators": []
52138
52159
  },
@@ -52141,7 +52162,7 @@
52141
52162
  "defaultValue": "false",
52142
52163
  "deprecated": false,
52143
52164
  "deprecationMessage": "",
52144
- "line": 45,
52165
+ "line": 46,
52145
52166
  "type": "boolean",
52146
52167
  "decorators": []
52147
52168
  },
@@ -52150,7 +52171,7 @@
52150
52171
  "defaultValue": "false",
52151
52172
  "deprecated": false,
52152
52173
  "deprecationMessage": "",
52153
- "line": 47,
52174
+ "line": 48,
52154
52175
  "type": "boolean",
52155
52176
  "decorators": []
52156
52177
  },
@@ -52159,7 +52180,7 @@
52159
52180
  "defaultValue": "\"\"",
52160
52181
  "deprecated": false,
52161
52182
  "deprecationMessage": "",
52162
- "line": 48,
52183
+ "line": 49,
52163
52184
  "type": "string",
52164
52185
  "decorators": []
52165
52186
  },
@@ -52168,16 +52189,25 @@
52168
52189
  "defaultValue": "[]",
52169
52190
  "deprecated": false,
52170
52191
  "deprecationMessage": "",
52171
- "line": 43,
52192
+ "line": 44,
52172
52193
  "type": "{}",
52173
52194
  "decorators": []
52174
52195
  },
52196
+ {
52197
+ "name": "itemValueKey",
52198
+ "defaultValue": "\"\"",
52199
+ "deprecated": false,
52200
+ "deprecationMessage": "",
52201
+ "line": 51,
52202
+ "type": "string",
52203
+ "decorators": []
52204
+ },
52175
52205
  {
52176
52206
  "name": "label",
52177
52207
  "defaultValue": "\"\"",
52178
52208
  "deprecated": false,
52179
52209
  "deprecationMessage": "",
52180
- "line": 44,
52210
+ "line": 45,
52181
52211
  "type": "string",
52182
52212
  "decorators": []
52183
52213
  },
@@ -52186,7 +52216,7 @@
52186
52216
  "defaultValue": "\"top-after-reopen\"",
52187
52217
  "deprecated": false,
52188
52218
  "deprecationMessage": "",
52189
- "line": 49,
52219
+ "line": 50,
52190
52220
  "type": "string",
52191
52221
  "decorators": []
52192
52222
  }
@@ -52197,7 +52227,7 @@
52197
52227
  "defaultValue": "new EventEmitter()",
52198
52228
  "deprecated": false,
52199
52229
  "deprecationMessage": "",
52200
- "line": 59,
52230
+ "line": 61,
52201
52231
  "type": "EventEmitter"
52202
52232
  },
52203
52233
  {
@@ -52205,7 +52235,7 @@
52205
52235
  "defaultValue": "new EventEmitter()",
52206
52236
  "deprecated": false,
52207
52237
  "deprecationMessage": "",
52208
- "line": 58,
52238
+ "line": 60,
52209
52239
  "type": "EventEmitter"
52210
52240
  }
52211
52241
  ],
@@ -52217,7 +52247,7 @@
52217
52247
  "type": "FormGroup",
52218
52248
  "optional": false,
52219
52249
  "description": "",
52220
- "line": 41,
52250
+ "line": 42,
52221
52251
  "modifierKind": [
52222
52252
  125
52223
52253
  ]
@@ -52233,7 +52263,7 @@
52233
52263
  "description": "",
52234
52264
  "rawdescription": "\n",
52235
52265
  "type": "component",
52236
- "sourceCode": "import {\n\tComponent,\n\tOnInit,\n\tInput,\n\tOutput,\n\tEventEmitter\n} from \"@angular/core\";\nimport {\n\tFormBuilder,\n\tFormGroup,\n\tFormControl\n} from \"@angular/forms\";\n\n@Component({\n\tselector: \"app-reactive-forms\",\n\ttemplate: `\n\t\t<form [formGroup]=\"formGroup\">\n\t\t\t<div style=\"width: 300px\">\n\t\t\t\t<cds-dropdown\n\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t\t\tplaceholder=\"Multi-select\"\n\t\t\t\t\tvalue=\"oid\"\n\t\t\t\t\t(selected)=\"selected.emit($event)\"\n\t\t\t\t\t(onClose)=\"onClose.emit($event)\"\n\t\t\t\t\tformControlName=\"roles\">\n\t\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t\t</cds-dropdown>\n\t\t\t</div>\n\t\t</form>\n\t\t<br>\n\t\t<code>{{ formGroup.get(\"roles\").value | json }}</code>\n\t`\n})\nexport class ReactiveFormsStory implements OnInit {\n\tpublic formGroup: FormGroup;\n\n\t@Input() items = [];\n\t@Input() label = \"\";\n\t@Input() hideLabel = false;\n\t@Input() helperText = \"\";\n\t@Input() invalid = false;\n\t@Input() invalidText = \"\";\n\t@Input() selectionFeedback = \"top-after-reopen\";\n\t@Input() set disabled(value: boolean) {\n\t\tif (!this.formGroup) { return; }\n\t\tif (value) {\n\t\t\tthis.formGroup.get(\"roles\")?.disable();\n\t\t} else {\n\t\t\tthis.formGroup.get(\"roles\")?.enable();\n\t\t}\n\t}\n\t@Output() selected = new EventEmitter();\n\t@Output() onClose = new EventEmitter();\n\n\tconstructor(protected formBuilder: FormBuilder) { }\n\n\tngOnInit() {\n\t\tthis.formGroup = this.formBuilder.group({\n\t\t\troles: new FormControl()\n\t\t});\n\t\tthis.selectRoles();\n\t}\n\n\tprivate selectRoles() {\n\t\tthis.formGroup.get(\"roles\")?.setValue(1);\n\t}\n}\n",
52266
+ "sourceCode": "import {\n\tComponent,\n\tOnInit,\n\tInput,\n\tOutput,\n\tEventEmitter\n} from \"@angular/core\";\nimport {\n\tFormBuilder,\n\tFormGroup,\n\tFormControl\n} from \"@angular/forms\";\n\n@Component({\n\tselector: \"app-reactive-forms\",\n\ttemplate: `\n\t\t<form [formGroup]=\"formGroup\">\n\t\t\t<div style=\"width: 300px\">\n\t\t\t\t<cds-dropdown\n\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t\tplaceholder=\"Multi-select\"\n\t\t\t\t\tvalue=\"oid\"\n\t\t\t\t\t(selected)=\"selected.emit($event)\"\n\t\t\t\t\t(onClose)=\"onClose.emit($event)\"\n\t\t\t\t\tformControlName=\"roles\">\n\t\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t\t</cds-dropdown>\n\t\t\t</div>\n\t\t</form>\n\t\t<br>\n\t\t<code>{{ formGroup.get(\"roles\").value | json }}</code>\n\t`\n})\nexport class ReactiveFormsStory implements OnInit {\n\tpublic formGroup: FormGroup;\n\n\t@Input() items = [];\n\t@Input() label = \"\";\n\t@Input() hideLabel = false;\n\t@Input() helperText = \"\";\n\t@Input() invalid = false;\n\t@Input() invalidText = \"\";\n\t@Input() selectionFeedback = \"top-after-reopen\";\n\t@Input() itemValueKey = \"\";\n\t@Input() set disabled(value: boolean) {\n\t\tif (!this.formGroup) { return; }\n\t\tif (value) {\n\t\t\tthis.formGroup.get(\"roles\")?.disable();\n\t\t} else {\n\t\t\tthis.formGroup.get(\"roles\")?.enable();\n\t\t}\n\t}\n\t@Output() selected = new EventEmitter();\n\t@Output() onClose = new EventEmitter();\n\n\tconstructor(protected formBuilder: FormBuilder) { }\n\n\tngOnInit() {\n\t\tthis.formGroup = this.formBuilder.group({\n\t\t\troles: new FormControl()\n\t\t});\n\t\tthis.selectRoles();\n\t}\n\n\tprivate selectRoles() {\n\t\tthis.formGroup.get(\"roles\")?.setValue(\"one\");\n\t}\n}\n",
52237
52267
  "assetsDirs": [],
52238
52268
  "styleUrlsData": "",
52239
52269
  "stylesData": "",
@@ -52250,7 +52280,7 @@
52250
52280
  "deprecationMessage": ""
52251
52281
  }
52252
52282
  ],
52253
- "line": 59,
52283
+ "line": 61,
52254
52284
  "jsdoctags": [
52255
52285
  {
52256
52286
  "name": "formBuilder",
@@ -52284,7 +52314,7 @@
52284
52314
  }
52285
52315
  ],
52286
52316
  "returnType": "void",
52287
- "line": 50,
52317
+ "line": 52,
52288
52318
  "jsdoctags": [
52289
52319
  {
52290
52320
  "name": "value",
@@ -87359,7 +87389,7 @@
87359
87389
  "deprecated": false,
87360
87390
  "deprecationMessage": "",
87361
87391
  "type": "",
87362
- "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\ttype=\"multi\"\n\t\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
87392
+ "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\ttype=\"multi\"\n\t\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
87363
87393
  },
87364
87394
  {
87365
87395
  "name": "MultiStep",
@@ -87389,7 +87419,7 @@
87389
87419
  "deprecated": false,
87390
87420
  "deprecationMessage": "",
87391
87421
  "type": "",
87392
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
87422
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
87393
87423
  },
87394
87424
  {
87395
87425
  "name": "MultiTemplate",
@@ -87399,7 +87429,7 @@
87399
87429
  "deprecated": false,
87400
87430
  "deprecationMessage": "",
87401
87431
  "type": "",
87402
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\ttype=\"multi\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
87432
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\ttype=\"multi\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
87403
87433
  },
87404
87434
  {
87405
87435
  "name": "MultiTemplate",
@@ -87499,7 +87529,7 @@
87499
87529
  "deprecated": false,
87500
87530
  "deprecationMessage": "",
87501
87531
  "type": "",
87502
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[displayValue]=\"dropdownRenderer\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\" [listTpl]=\"dropdownRenderer\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<ng-template #dropdownRenderer let-item=\"item\">\n\t\t\t<div *ngIf=\"item && item.content\" style=\"font-size: 14px;\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" style=\"will-change: transform;\">\n\t\t\t\t\t<path d=\"M9.3 3.7l3.8 3.8H1v1h12.1l-3.8 3.8.7.7 5-5-5-5z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t&nbsp;{{item.content}}\n\t\t\t</div>\n\t\t</ng-template>\n\t`\n})"
87532
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[displayValue]=\"dropdownRenderer\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\" [listTpl]=\"dropdownRenderer\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<ng-template #dropdownRenderer let-item=\"item\">\n\t\t\t<div *ngIf=\"item && item.content\" style=\"font-size: 14px;\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" style=\"will-change: transform;\">\n\t\t\t\t\t<path d=\"M9.3 3.7l3.8 3.8H1v1h12.1l-3.8 3.8.7.7 5-5-5-5z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t&nbsp;{{item.content}}\n\t\t\t</div>\n\t\t</ng-template>\n\t`\n})"
87503
87533
  },
87504
87534
  {
87505
87535
  "name": "NoDataTemplate",
@@ -87799,7 +87829,7 @@
87799
87829
  "deprecated": false,
87800
87830
  "deprecationMessage": "",
87801
87831
  "type": "",
87802
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-reactive-combobox.component.ts\n\t\t-->\n\t\t<app-reactive-combobox\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\">\n\t\t</app-reactive-combobox>\n\t`\n})"
87832
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-reactive-combobox.component.ts\n\t\t-->\n\t\t<app-reactive-combobox\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[itemValueKey]=\"itemValueKey\">\n\t\t</app-reactive-combobox>\n\t`\n})"
87803
87833
  },
87804
87834
  {
87805
87835
  "name": "ReactiveTemplate",
@@ -87809,7 +87839,7 @@
87809
87839
  "deprecated": false,
87810
87840
  "deprecationMessage": "",
87811
87841
  "type": "",
87812
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/dropdown/stories/app-reactive-forms.component.ts\n\t\t-->\n\t\t<app-reactive-forms\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[items]=\"items\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t</app-reactive-forms>\n\t`\n})"
87842
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/dropdown/stories/app-reactive-forms.component.ts\n\t\t-->\n\t\t<app-reactive-forms\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[items]=\"items\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t</app-reactive-forms>\n\t`\n})"
87813
87843
  },
87814
87844
  {
87815
87845
  "name": "ReactiveTemplate",
@@ -88604,7 +88634,7 @@
88604
88634
  "deprecated": false,
88605
88635
  "deprecationMessage": "",
88606
88636
  "type": "",
88607
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
88637
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
88608
88638
  },
88609
88639
  {
88610
88640
  "name": "Template",
@@ -88644,7 +88674,7 @@
88644
88674
  "deprecated": false,
88645
88675
  "deprecationMessage": "",
88646
88676
  "type": "",
88647
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t`\n})"
88677
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t`\n})"
88648
88678
  },
88649
88679
  {
88650
88680
  "name": "Template",
@@ -89516,7 +89546,7 @@
89516
89546
  "deprecated": false,
89517
89547
  "deprecationMessage": "",
89518
89548
  "type": "",
89519
- "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-combo-box\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(submit)=\"submit($event)\"\n\t\t\t\t(search)=\"search($event)\"\n\t\t\t\t(clear)=\"clear($event)\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
89549
+ "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-combo-box\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(submit)=\"submit($event)\"\n\t\t\t\t(search)=\"search($event)\"\n\t\t\t\t(clear)=\"clear($event)\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
89520
89550
  },
89521
89551
  {
89522
89552
  "name": "withAILabelTemplate",
@@ -89536,7 +89566,7 @@
89536
89566
  "deprecated": false,
89537
89567
  "deprecationMessage": "",
89538
89568
  "type": "",
89539
- "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
89569
+ "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
89540
89570
  },
89541
89571
  {
89542
89572
  "name": "withAILabelTemplate",
@@ -93645,7 +93675,7 @@
93645
93675
  "deprecated": false,
93646
93676
  "deprecationMessage": "",
93647
93677
  "type": "",
93648
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
93678
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
93649
93679
  },
93650
93680
  {
93651
93681
  "name": "ReactiveForms",
@@ -93665,7 +93695,7 @@
93665
93695
  "deprecated": false,
93666
93696
  "deprecationMessage": "",
93667
93697
  "type": "",
93668
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-reactive-combobox.component.ts\n\t\t-->\n\t\t<app-reactive-combobox\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\">\n\t\t</app-reactive-combobox>\n\t`\n})"
93698
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-reactive-combobox.component.ts\n\t\t-->\n\t\t<app-reactive-combobox\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[itemValueKey]=\"itemValueKey\">\n\t\t</app-reactive-combobox>\n\t`\n})"
93669
93699
  },
93670
93700
  {
93671
93701
  "name": "Template",
@@ -93675,7 +93705,7 @@
93675
93705
  "deprecated": false,
93676
93706
  "deprecationMessage": "",
93677
93707
  "type": "",
93678
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
93708
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
93679
93709
  },
93680
93710
  {
93681
93711
  "name": "withAILabel",
@@ -93695,7 +93725,7 @@
93695
93725
  "deprecated": false,
93696
93726
  "deprecationMessage": "",
93697
93727
  "type": "",
93698
- "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-combo-box\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(submit)=\"submit($event)\"\n\t\t\t\t(search)=\"search($event)\"\n\t\t\t\t(clear)=\"clear($event)\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
93728
+ "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-combo-box\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(submit)=\"submit($event)\"\n\t\t\t\t(search)=\"search($event)\"\n\t\t\t\t(clear)=\"clear($event)\">\n\t\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t\t</cds-combo-box>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
93699
93729
  }
93700
93730
  ],
93701
93731
  "src/content-switcher/content-switcher.stories.ts": [
@@ -93893,7 +93923,7 @@
93893
93923
  "deprecated": false,
93894
93924
  "deprecationMessage": "",
93895
93925
  "type": "",
93896
- "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\ttype=\"multi\"\n\t\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
93926
+ "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\ttype=\"multi\"\n\t\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[dropUp]=\"dropUp\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[warn]=\"warn\"\n\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[fluid]=\"fluid\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
93897
93927
  },
93898
93928
  {
93899
93929
  "name": "MultiTemplate",
@@ -93903,7 +93933,7 @@
93903
93933
  "deprecated": false,
93904
93934
  "deprecationMessage": "",
93905
93935
  "type": "",
93906
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\ttype=\"multi\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
93936
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\ttype=\"multi\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
93907
93937
  },
93908
93938
  {
93909
93939
  "name": "NgTemplate",
@@ -93913,7 +93943,7 @@
93913
93943
  "deprecated": false,
93914
93944
  "deprecationMessage": "",
93915
93945
  "type": "",
93916
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[displayValue]=\"dropdownRenderer\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\" [listTpl]=\"dropdownRenderer\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<ng-template #dropdownRenderer let-item=\"item\">\n\t\t\t<div *ngIf=\"item && item.content\" style=\"font-size: 14px;\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" style=\"will-change: transform;\">\n\t\t\t\t\t<path d=\"M9.3 3.7l3.8 3.8H1v1h12.1l-3.8 3.8.7.7 5-5-5-5z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t&nbsp;{{item.content}}\n\t\t\t</div>\n\t\t</ng-template>\n\t`\n})"
93946
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[displayValue]=\"dropdownRenderer\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\" [listTpl]=\"dropdownRenderer\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<ng-template #dropdownRenderer let-item=\"item\">\n\t\t\t<div *ngIf=\"item && item.content\" style=\"font-size: 14px;\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" style=\"will-change: transform;\">\n\t\t\t\t\t<path d=\"M9.3 3.7l3.8 3.8H1v1h12.1l-3.8 3.8.7.7 5-5-5-5z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t&nbsp;{{item.content}}\n\t\t\t</div>\n\t\t</ng-template>\n\t`\n})"
93917
93947
  },
93918
93948
  {
93919
93949
  "name": "ReactiveForms",
@@ -93933,7 +93963,7 @@
93933
93963
  "deprecated": false,
93934
93964
  "deprecationMessage": "",
93935
93965
  "type": "",
93936
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/dropdown/stories/app-reactive-forms.component.ts\n\t\t-->\n\t\t<app-reactive-forms\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[items]=\"items\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t</app-reactive-forms>\n\t`\n})"
93966
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/dropdown/stories/app-reactive-forms.component.ts\n\t\t-->\n\t\t<app-reactive-forms\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[items]=\"items\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t</app-reactive-forms>\n\t`\n})"
93937
93967
  },
93938
93968
  {
93939
93969
  "name": "Template",
@@ -93943,7 +93973,7 @@
93943
93973
  "deprecated": false,
93944
93974
  "deprecationMessage": "",
93945
93975
  "type": "",
93946
- "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t`\n})"
93976
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t`\n})"
93947
93977
  },
93948
93978
  {
93949
93979
  "name": "withAILabel",
@@ -93963,7 +93993,7 @@
93963
93993
  "deprecated": false,
93964
93994
  "deprecationMessage": "",
93965
93995
  "type": "",
93966
- "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
93996
+ "defaultValue": "(args) => ({\n\tprops: args,\n\tstyles: AI_LABEL_STORY_STYLES,\n\ttemplate: `\n\t\t<div style=\"width: 400px\">\n\t\t\t<cds-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readonly]=\"readonly\"\n\t\t\t\t[dropUp]=\"false\"\n\t\t\t\t[decorator]=\"decoratorTpl\"\n\t\t\t\t[itemValueKey]=\"itemValueKey\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t\t</cds-dropdown>\n\t\t</div>\n\t\t<ng-template #decoratorTpl>\n\t\t\t<cds-ai-label\n\t\t\t\tclass=\"ai-label-container\"\n\t\t\t\tkind=\"default\"\n\t\t\t\tsize=\"mini\"\n\t\t\t\t[autoAlign]=\"true\"\n\t\t\t\taiText=\"AI\"\n\t\t\t\tariaLabel=\"Show information\">\n\t\t\t\t` + AI_LABEL_INNER + `\n\t\t\t</cds-ai-label>\n\t\t</ng-template>\n\t`\n})"
93967
93997
  },
93968
93998
  {
93969
93999
  "name": "WithTemplate",
@@ -100143,7 +100173,7 @@
100143
100173
  "linktype": "component",
100144
100174
  "name": "ReactiveFormsCombobox",
100145
100175
  "coveragePercent": 0,
100146
- "coverageCount": "0/14",
100176
+ "coverageCount": "0/15",
100147
100177
  "status": "low"
100148
100178
  },
100149
100179
  {
@@ -100928,7 +100958,7 @@
100928
100958
  "linktype": "component",
100929
100959
  "name": "Dropdown",
100930
100960
  "coveragePercent": 67,
100931
- "coverageCount": "52/77",
100961
+ "coverageCount": "53/78",
100932
100962
  "status": "good"
100933
100963
  },
100934
100964
  {
@@ -101142,7 +101172,7 @@
101142
101172
  "linktype": "component",
101143
101173
  "name": "ReactiveFormsStory",
101144
101174
  "coveragePercent": 0,
101145
- "coverageCount": "0/13",
101175
+ "coverageCount": "0/14",
101146
101176
  "status": "low"
101147
101177
  },
101148
101178
  {