carbon-components-angular 5.33.0 → 5.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/docs/documentation/components/Dropdown.html +157 -110
  2. package/docs/documentation/coverage.html +3 -3
  3. package/docs/documentation/js/search/search_index.js +2 -2
  4. package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
  5. package/docs/documentation/modules/ComboBoxModule.html +4 -4
  6. package/docs/documentation/modules/ContentSwitcherModule/dependencies.svg +4 -4
  7. package/docs/documentation/modules/ContentSwitcherModule.html +4 -4
  8. package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +41 -37
  9. package/docs/documentation/modules/DatePickerInputModule.html +41 -37
  10. package/docs/documentation/modules/DatePickerModule/dependencies.svg +38 -38
  11. package/docs/documentation/modules/DatePickerModule.html +38 -38
  12. package/docs/documentation/modules/GridModule/dependencies.svg +60 -60
  13. package/docs/documentation/modules/GridModule.html +60 -60
  14. package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
  15. package/docs/documentation/modules/LoadingModule.html +4 -4
  16. package/docs/documentation/modules/NFormsModule/dependencies.svg +4 -4
  17. package/docs/documentation/modules/NFormsModule.html +4 -4
  18. package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
  19. package/docs/documentation/modules/NumberModule.html +4 -4
  20. package/docs/documentation/modules/ProgressIndicatorModule/dependencies.svg +4 -4
  21. package/docs/documentation/modules/ProgressIndicatorModule.html +4 -4
  22. package/docs/documentation/modules/RadioModule/dependencies.svg +4 -4
  23. package/docs/documentation/modules/RadioModule.html +4 -4
  24. package/docs/documentation/modules/SelectModule/dependencies.svg +58 -58
  25. package/docs/documentation/modules/SelectModule.html +58 -58
  26. package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
  27. package/docs/documentation/modules/SliderModule.html +4 -4
  28. package/docs/documentation/modules/TableModule/dependencies.svg +216 -216
  29. package/docs/documentation/modules/TableModule.html +216 -216
  30. package/docs/documentation/modules/TabsModule/dependencies.svg +69 -69
  31. package/docs/documentation/modules/TabsModule.html +69 -69
  32. package/docs/documentation/modules/TilesModule/dependencies.svg +4 -4
  33. package/docs/documentation/modules/TilesModule.html +4 -4
  34. package/docs/documentation/modules/TimePickerModule/dependencies.svg +41 -37
  35. package/docs/documentation/modules/TimePickerModule.html +41 -37
  36. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +4 -4
  37. package/docs/documentation/modules/TimePickerSelectModule.html +4 -4
  38. package/docs/documentation/modules/ToggleModule/dependencies.svg +45 -41
  39. package/docs/documentation/modules/ToggleModule.html +45 -41
  40. package/docs/documentation/modules/ToggletipModule/dependencies.svg +4 -4
  41. package/docs/documentation/modules/ToggletipModule.html +4 -4
  42. package/docs/documentation/modules/TooltipModule/dependencies.svg +28 -28
  43. package/docs/documentation/modules/TooltipModule.html +28 -28
  44. package/docs/documentation/modules/TreeviewModule/dependencies.svg +31 -31
  45. package/docs/documentation/modules/TreeviewModule.html +31 -31
  46. package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
  47. package/docs/documentation/modules/UIShellModule.html +4 -4
  48. package/docs/documentation.json +96 -85
  49. package/docs/storybook/3224.c0834124.iframe.bundle.js +1 -0
  50. package/docs/storybook/{dropdown-dropdown-stories.eb5b6694.iframe.bundle.js → dropdown-dropdown-stories.c20a8aa6.iframe.bundle.js} +1 -1
  51. package/docs/storybook/iframe.html +2 -2
  52. package/docs/storybook/{main.f6f7b65b.iframe.bundle.js → main.c7fa1279.iframe.bundle.js} +1 -1
  53. package/docs/storybook/project.json +1 -1
  54. package/docs/storybook/{runtime~main.b455b6c9.iframe.bundle.js → runtime~main.c0aac812.iframe.bundle.js} +1 -1
  55. package/dropdown/dropdown.component.d.ts +5 -1
  56. package/esm2020/dropdown/dropdown.component.mjs +17 -4
  57. package/fesm2015/carbon-components-angular-dropdown.mjs +16 -3
  58. package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
  59. package/fesm2020/carbon-components-angular-dropdown.mjs +16 -3
  60. package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
  61. package/package.json +1 -1
  62. package/docs/storybook/3224.2942835b.iframe.bundle.js +0 -1
@@ -28047,7 +28047,7 @@
28047
28047
  },
28048
28048
  {
28049
28049
  "name": "Dropdown",
28050
- "id": "component-Dropdown-be4d90855f91c2da8319f2a72709dd9710981fbaca564d287573b23feb2bcaa6c40dffb99d5ef997f4ff5038fbd5d8e67cf5e3e7a2b3696ef96111f0c1800d7b",
28050
+ "id": "component-Dropdown-23f103a26f3fdff24547bceb83988aa41dd9e1b6ddc589276bab46b4c9c6e1eadc419aaa69e882dc8eb42f061795b58a7f1ab5b69f1bbf8d01766894e4b4d94f",
28051
28051
  "file": "src/dropdown/dropdown.component.ts",
28052
28052
  "encapsulation": [],
28053
28053
  "entryComponents": [],
@@ -28061,7 +28061,7 @@
28061
28061
  "selector": "cds-dropdown, ibm-dropdown",
28062
28062
  "styleUrls": [],
28063
28063
  "styles": [],
28064
- "template": "<label\n\t*ngIf=\"label && !skeleton\"\n\t[for]=\"id\"\n\tclass=\"cds--label\"\n\t[ngClass]=\"{\n\t\t'cds--label--disabled': disabled,\n\t\t'cds--visually-hidden': hideLabel\n\t}\">\n\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n</label>\n<div\n\tclass=\"cds--list-box\"\n\t[ngClass]=\"{\n\t\t'cds--dropdown': type !== 'multi',\n\t\t'cds--multiselect': type === 'multi',\n\t\t'cds--multi-select--selected': type === 'multi' && getSelectedCount() > 0,\n\t\t'cds--dropdown--light': theme === 'light',\n\t\t'cds--list-box--light': theme === 'light',\n\t\t'cds--list-box--inline': inline,\n\t\t'cds--skeleton': skeleton,\n\t\t'cds--dropdown--disabled cds--list-box--disabled': disabled,\n\t\t'cds--dropdown--invalid': invalid,\n\t\t'cds--dropdown--warning cds--list-box--warning': warn,\n\t\t'cds--dropdown--sm cds--list-box--sm': size === 'sm',\n\t\t'cds--dropdown--md cds--list-box--md': size === 'md',\n\t\t'cds--dropdown--lg cds--list-box--lg': size === 'lg',\n\t\t'cds--list-box--expanded': !menuIsClosed\n\t}\">\n\t<button\n\t\t#dropdownButton\n\t\t[id]=\"id\"\n\t\ttype=\"button\"\n\t\tclass=\"cds--list-box__field\"\n\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t[attr.aria-disabled]=\"disabled\"\n\t\taria-haspopup=\"listbox\"\n\t\t(click)=\"disabled ? $event.stopPropagation() : toggleMenu()\"\n\t\t(blur)=\"onBlur()\"\n\t\t[attr.disabled]=\"disabled ? true : null\">\n\t\t<div\n\t\t\t(click)=\"clearSelected()\"\n\t\t\t(keydown.enter)=\"clearSelected()\"\n\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\tclass=\"cds--list-box__selection cds--tag--filter cds--list-box__selection--multi\"\n\t\t\ttabindex=\"0\"\n\t\t\t[title]=\"clearText\">\n\t\t\t{{getSelectedCount()}}\n\t\t\t<svg\n\t\t\t\tfocusable=\"false\"\n\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\trole=\"img\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\twidth=\"16\"\n\t\t\t\theight=\"16\"\n\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\taria-hidden=\"true\">\n\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</svg>\n\t\t</div>\n\t\t<span *ngIf=\"isRenderString()\" class=\"cds--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t<ng-template\n\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t</ng-template>\n\t\t<svg\n\t\t\t*ngIf=\"invalid\"\n\t\t\tclass=\"cds--dropdown__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<span class=\"cds--list-box__menu-icon\">\n\t\t\t<svg\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\tsize=\"16\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</svg>\n\t\t</span>\n\t</button>\n\t<div\n\t\t#dropdownMenu\n\t\t[ngClass]=\"{\n\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t}\">\n\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t</div>\n</div>\n<div\n\t*ngIf=\"helperText && !invalid && !warn && !skeleton\"\n\tclass=\"cds--form__helper-text\"\n\t[ngClass]=\"{\n\t\t'cds--form__helper-text--disabled': disabled\n\t}\">\n\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n</div>\n<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n</div>\n<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n</div>\n",
28064
+ "template": "<label\n\t*ngIf=\"label && !skeleton\"\n\t[for]=\"id\"\n\tclass=\"cds--label\"\n\t[ngClass]=\"{\n\t\t'cds--label--disabled': disabled,\n\t\t'cds--visually-hidden': hideLabel\n\t}\">\n\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n</label>\n<div\n\tclass=\"cds--list-box\"\n\t[ngClass]=\"{\n\t\t'cds--dropdown': type !== 'multi',\n\t\t'cds--multiselect': type === 'multi',\n\t\t'cds--multi-select--selected': type === 'multi' && getSelectedCount() > 0,\n\t\t'cds--dropdown--light': theme === 'light',\n\t\t'cds--list-box--light': theme === 'light',\n\t\t'cds--list-box--inline': inline,\n\t\t'cds--skeleton': skeleton,\n\t\t'cds--dropdown--disabled cds--list-box--disabled': disabled,\n\t\t'cds--dropdown--readonly': readonly,\n\t\t'cds--dropdown--invalid': invalid,\n\t\t'cds--dropdown--warning cds--list-box--warning': warn,\n\t\t'cds--dropdown--sm cds--list-box--sm': size === 'sm',\n\t\t'cds--dropdown--md cds--list-box--md': size === 'md',\n\t\t'cds--dropdown--lg cds--list-box--lg': size === 'lg',\n\t\t'cds--list-box--expanded': !menuIsClosed\n\t}\">\n\t<button\n\t\t#dropdownButton\n\t\t[id]=\"id\"\n\t\ttype=\"button\"\n\t\tclass=\"cds--list-box__field\"\n\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t[attr.aria-disabled]=\"disabled\"\n\t\t[attr.aria-readonly]=\"readonly\"\n\t\taria-haspopup=\"listbox\"\n\t\t(click)=\"disabled || readonly ? $event.stopPropagation() : toggleMenu()\"\n\t\t(blur)=\"onBlur()\"\n\t\t[attr.disabled]=\"disabled ? true : null\">\n\t\t<div\n\t\t\t(click)=\"clearSelected()\"\n\t\t\t(keydown.enter)=\"clearSelected()\"\n\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\tclass=\"cds--list-box__selection cds--tag--filter cds--list-box__selection--multi\"\n\t\t\ttabindex=\"0\"\n\t\t\t[title]=\"clearText\">\n\t\t\t{{getSelectedCount()}}\n\t\t\t<svg\n\t\t\t\tfocusable=\"false\"\n\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\trole=\"img\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\twidth=\"16\"\n\t\t\t\theight=\"16\"\n\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\taria-hidden=\"true\">\n\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</svg>\n\t\t</div>\n\t\t<span *ngIf=\"isRenderString()\" class=\"cds--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t<ng-template\n\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t</ng-template>\n\t\t<svg\n\t\t\t*ngIf=\"invalid\"\n\t\t\tclass=\"cds--dropdown__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<span class=\"cds--list-box__menu-icon\">\n\t\t\t<svg\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\tsize=\"16\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</svg>\n\t\t</span>\n\t</button>\n\t<div\n\t\t#dropdownMenu\n\t\t[ngClass]=\"{\n\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t}\">\n\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t</div>\n</div>\n<div\n\t*ngIf=\"helperText && !invalid && !warn && !skeleton\"\n\tclass=\"cds--form__helper-text\"\n\t[ngClass]=\"{\n\t\t'cds--form__helper-text--disabled': disabled\n\t}\">\n\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n</div>\n<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n</div>\n<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n</div>\n",
28065
28065
  "templateUrl": [],
28066
28066
  "viewProviders": [],
28067
28067
  "hostDirectives": [],
@@ -28073,7 +28073,7 @@
28073
28073
  "deprecationMessage": "",
28074
28074
  "rawdescription": "\n\nset to `true` to place the dropdown view inline with the component\n",
28075
28075
  "description": "<p>set to <code>true</code> to place the dropdown view inline with the component</p>\n",
28076
- "line": 258,
28076
+ "line": 264,
28077
28077
  "type": "boolean",
28078
28078
  "decorators": []
28079
28079
  },
@@ -28084,7 +28084,7 @@
28084
28084
  "deprecationMessage": "",
28085
28085
  "rawdescription": "\n\nSets the optional clear button tooltip text.\n",
28086
28086
  "description": "<p>Sets the optional clear button tooltip text.</p>\n",
28087
- "line": 208,
28087
+ "line": 210,
28088
28088
  "type": "string",
28089
28089
  "decorators": []
28090
28090
  },
@@ -28095,7 +28095,7 @@
28095
28095
  "deprecationMessage": "",
28096
28096
  "rawdescription": "\n\nSet to `true` for a dropdown without arrow key activation.\n",
28097
28097
  "description": "<p>Set to <code>true</code> for a dropdown without arrow key activation.</p>\n",
28098
- "line": 238,
28098
+ "line": 244,
28099
28099
  "type": "boolean",
28100
28100
  "decorators": []
28101
28101
  },
@@ -28106,7 +28106,7 @@
28106
28106
  "deprecationMessage": "",
28107
28107
  "rawdescription": "\n\nSet to `true` to disable the dropdown.\n",
28108
28108
  "description": "<p>Set to <code>true</code> to disable the dropdown.</p>\n",
28109
- "line": 226,
28109
+ "line": 228,
28110
28110
  "type": "boolean",
28111
28111
  "decorators": []
28112
28112
  },
@@ -28117,7 +28117,7 @@
28117
28117
  "deprecationMessage": "",
28118
28118
  "rawdescription": "\n\nThe selected value from the `Dropdown`. Can be a string or template.\n",
28119
28119
  "description": "<p>The selected value from the <code>Dropdown</code>. Can be a string or template.</p>\n",
28120
- "line": 204,
28120
+ "line": 206,
28121
28121
  "type": "string | TemplateRef<any>",
28122
28122
  "decorators": []
28123
28123
  },
@@ -28127,7 +28127,7 @@
28127
28127
  "deprecationMessage": "",
28128
28128
  "rawdescription": "\n\nOverrides the automatic dropUp.\n",
28129
28129
  "description": "<p>Overrides the automatic dropUp.</p>\n",
28130
- "line": 288,
28130
+ "line": 294,
28131
28131
  "type": "boolean",
28132
28132
  "decorators": []
28133
28133
  },
@@ -28137,7 +28137,7 @@
28137
28137
  "deprecationMessage": "",
28138
28138
  "rawdescription": "\n\nSets the optional helper text.\n",
28139
28139
  "description": "<p>Sets the optional helper text.</p>\n",
28140
- "line": 196,
28140
+ "line": 198,
28141
28141
  "type": "string | TemplateRef<any>",
28142
28142
  "decorators": []
28143
28143
  },
@@ -28148,7 +28148,7 @@
28148
28148
  "deprecationMessage": "",
28149
28149
  "rawdescription": "\n\nHide label while keeping it accessible for screen readers\n",
28150
28150
  "description": "<p>Hide label while keeping it accessible for screen readers</p>\n",
28151
- "line": 192,
28151
+ "line": 194,
28152
28152
  "type": "boolean",
28153
28153
  "decorators": []
28154
28154
  },
@@ -28157,7 +28157,7 @@
28157
28157
  "defaultValue": "`dropdown-${Dropdown.dropdownCount++}`",
28158
28158
  "deprecated": false,
28159
28159
  "deprecationMessage": "",
28160
- "line": 184,
28160
+ "line": 186,
28161
28161
  "type": "string",
28162
28162
  "decorators": []
28163
28163
  },
@@ -28168,7 +28168,7 @@
28168
28168
  "deprecationMessage": "",
28169
28169
  "rawdescription": "\n\nSet to `true` for an inline dropdown.\n",
28170
28170
  "description": "<p>Set to <code>true</code> for an inline dropdown.</p>\n",
28171
- "line": 234,
28171
+ "line": 240,
28172
28172
  "type": "boolean",
28173
28173
  "decorators": []
28174
28174
  },
@@ -28179,7 +28179,7 @@
28179
28179
  "deprecationMessage": "",
28180
28180
  "rawdescription": "\n\nSet to `true` for invalid state.\n",
28181
28181
  "description": "<p>Set to <code>true</code> for invalid state.</p>\n",
28182
- "line": 242,
28182
+ "line": 248,
28183
28183
  "type": "boolean",
28184
28184
  "decorators": []
28185
28185
  },
@@ -28189,7 +28189,7 @@
28189
28189
  "deprecationMessage": "",
28190
28190
  "rawdescription": "\n\nValue displayed if dropdown is in invalid state.\n",
28191
28191
  "description": "<p>Value displayed if dropdown is in invalid state.</p>\n",
28192
- "line": 246,
28192
+ "line": 252,
28193
28193
  "type": "string | TemplateRef<any>",
28194
28194
  "decorators": []
28195
28195
  },
@@ -28199,7 +28199,7 @@
28199
28199
  "deprecationMessage": "",
28200
28200
  "rawdescription": "\n\nSpecifies the property to be used as the return value to `ngModel`\n",
28201
28201
  "description": "<p>Specifies the property to be used as the return value to <code>ngModel</code></p>\n",
28202
- "line": 267,
28202
+ "line": 273,
28203
28203
  "type": "string",
28204
28204
  "decorators": []
28205
28205
  },
@@ -28209,7 +28209,7 @@
28209
28209
  "deprecationMessage": "",
28210
28210
  "rawdescription": "\n\nLabel for the dropdown.\n",
28211
28211
  "description": "<p>Label for the dropdown.</p>\n",
28212
- "line": 188,
28212
+ "line": 190,
28213
28213
  "type": "string | TemplateRef<any>",
28214
28214
  "decorators": []
28215
28215
  },
@@ -28220,7 +28220,7 @@
28220
28220
  "deprecationMessage": "",
28221
28221
  "rawdescription": "\n\nAccessible label for the button that opens the dropdown list.\nDefaults to the `DROPDOWN.OPEN` value from the i18n service.\n",
28222
28222
  "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",
28223
- "line": 279,
28223
+ "line": 285,
28224
28224
  "type": "any",
28225
28225
  "decorators": []
28226
28226
  },
@@ -28231,17 +28231,28 @@
28231
28231
  "deprecationMessage": "",
28232
28232
  "rawdescription": "\n\nValue displayed if no item is selected.\n",
28233
28233
  "description": "<p>Value displayed if no item is selected.</p>\n",
28234
- "line": 200,
28234
+ "line": 202,
28235
28235
  "type": "string",
28236
28236
  "decorators": []
28237
28237
  },
28238
+ {
28239
+ "name": "readonly",
28240
+ "defaultValue": "false",
28241
+ "deprecated": false,
28242
+ "deprecationMessage": "",
28243
+ "rawdescription": "\n\nSet to `true` for a readonly state.\n",
28244
+ "description": "<p>Set to <code>true</code> for a readonly state.</p>\n",
28245
+ "line": 232,
28246
+ "type": "boolean",
28247
+ "decorators": []
28248
+ },
28238
28249
  {
28239
28250
  "name": "scrollableContainer",
28240
28251
  "deprecated": false,
28241
28252
  "deprecationMessage": "",
28242
28253
  "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",
28243
28254
  "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",
28244
- "line": 263,
28255
+ "line": 269,
28245
28256
  "type": "string",
28246
28257
  "decorators": []
28247
28258
  },
@@ -28252,7 +28263,7 @@
28252
28263
  "deprecationMessage": "",
28253
28264
  "rawdescription": "\n\nProvides the label for the \"# selected\" text.\nDefaults to the `DROPDOWN.SELECTED` value from the i18n service.\n",
28254
28265
  "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",
28255
- "line": 284,
28266
+ "line": 290,
28256
28267
  "type": "any",
28257
28268
  "decorators": []
28258
28269
  },
@@ -28263,7 +28274,7 @@
28263
28274
  "deprecationMessage": "",
28264
28275
  "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",
28265
28276
  "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",
28266
- "line": 274,
28277
+ "line": 280,
28267
28278
  "type": "\"top\" | \"fixed\" | \"top-after-reopen\"",
28268
28279
  "decorators": []
28269
28280
  },
@@ -28274,7 +28285,7 @@
28274
28285
  "deprecationMessage": "",
28275
28286
  "rawdescription": "\n\nSize to render the dropdown field.\n",
28276
28287
  "description": "<p>Size to render the dropdown field.</p>\n",
28277
- "line": 212,
28288
+ "line": 214,
28278
28289
  "type": "\"sm\" | \"md\" | \"lg\"",
28279
28290
  "decorators": []
28280
28291
  },
@@ -28285,7 +28296,7 @@
28285
28296
  "deprecationMessage": "",
28286
28297
  "rawdescription": "\n\nSet to `true` for a loading dropdown.\n",
28287
28298
  "description": "<p>Set to <code>true</code> for a loading dropdown.</p>\n",
28288
- "line": 230,
28299
+ "line": 236,
28289
28300
  "type": "boolean",
28290
28301
  "decorators": []
28291
28302
  },
@@ -28296,15 +28307,15 @@
28296
28307
  "deprecationMessage": "since v5 - Use `cdsLayer` directive instead\n`light` or `dark` dropdown theme",
28297
28308
  "jsdoctags": [
28298
28309
  {
28299
- "pos": 6904,
28300
- "end": 6999,
28310
+ "pos": 6991,
28311
+ "end": 7086,
28301
28312
  "flags": 16842752,
28302
28313
  "modifierFlagsCache": 0,
28303
28314
  "transformFlags": 0,
28304
28315
  "kind": 338,
28305
28316
  "tagName": {
28306
- "pos": 6905,
28307
- "end": 6915,
28317
+ "pos": 6992,
28318
+ "end": 7002,
28308
28319
  "flags": 16842752,
28309
28320
  "modifierFlagsCache": 0,
28310
28321
  "transformFlags": 0,
@@ -28314,7 +28325,7 @@
28314
28325
  "comment": "<p>since v5 - Use <code>cdsLayer</code> directive instead\n<code>light</code> or <code>dark</code> dropdown theme</p>\n"
28315
28326
  }
28316
28327
  ],
28317
- "line": 222,
28328
+ "line": 224,
28318
28329
  "type": "\"light\" | \"dark\"",
28319
28330
  "decorators": []
28320
28331
  },
@@ -28325,7 +28336,7 @@
28325
28336
  "deprecationMessage": "",
28326
28337
  "rawdescription": "\n\nDefines whether or not the `Dropdown` supports selecting multiple items as opposed to single\nitem selection.\n",
28327
28338
  "description": "<p>Defines whether or not the <code>Dropdown</code> supports selecting multiple items as opposed to single\nitem selection.</p>\n",
28328
- "line": 217,
28339
+ "line": 219,
28329
28340
  "type": "\"single\" | \"multi\"",
28330
28341
  "decorators": []
28331
28342
  },
@@ -28336,7 +28347,7 @@
28336
28347
  "deprecationMessage": "",
28337
28348
  "rawdescription": "\n\nSet to `true` to show a warning (contents set by warningText)\n",
28338
28349
  "description": "<p>Set to <code>true</code> to show a warning (contents set by warningText)</p>\n",
28339
- "line": 250,
28350
+ "line": 256,
28340
28351
  "type": "boolean",
28341
28352
  "decorators": []
28342
28353
  },
@@ -28346,7 +28357,7 @@
28346
28357
  "deprecationMessage": "",
28347
28358
  "rawdescription": "\n\nSets the warning text\n",
28348
28359
  "description": "<p>Sets the warning text</p>\n",
28349
- "line": 254,
28360
+ "line": 260,
28350
28361
  "type": "string | TemplateRef<any>",
28351
28362
  "decorators": []
28352
28363
  }
@@ -28359,7 +28370,7 @@
28359
28370
  "deprecationMessage": "",
28360
28371
  "rawdescription": "\n\nEmits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n",
28361
28372
  "description": "<p>Emits event notifying to other classes that the <code>Dropdown</code> has been closed (collapsed).</p>\n",
28362
- "line": 300,
28373
+ "line": 306,
28363
28374
  "type": "EventEmitter<any>"
28364
28375
  },
28365
28376
  {
@@ -28369,7 +28380,7 @@
28369
28380
  "deprecationMessage": "",
28370
28381
  "rawdescription": "\n\nEmits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n",
28371
28382
  "description": "<p>Emits event notifying to other classes that the <code>Dropdown</code> has been closed (collapsed).</p>\n",
28372
- "line": 296,
28383
+ "line": 302,
28373
28384
  "type": "EventEmitter<any>"
28374
28385
  },
28375
28386
  {
@@ -28379,7 +28390,7 @@
28379
28390
  "deprecationMessage": "",
28380
28391
  "rawdescription": "\n\nEmits selection events.\n",
28381
28392
  "description": "<p>Emits selection events.</p>\n",
28382
- "line": 292,
28393
+ "line": 298,
28383
28394
  "type": "EventEmitter<Object>"
28384
28395
  }
28385
28396
  ],
@@ -28392,7 +28403,7 @@
28392
28403
  "type": "",
28393
28404
  "optional": false,
28394
28405
  "description": "<p>controls whether the <code>drop-up</code> class is applied</p>\n",
28395
- "line": 324,
28406
+ "line": 330,
28396
28407
  "rawdescription": "\n\ncontrols whether the `drop-up` class is applied\n"
28397
28408
  },
28398
28409
  {
@@ -28402,7 +28413,7 @@
28402
28413
  "type": "",
28403
28414
  "optional": false,
28404
28415
  "description": "<p>Maintains a reference to the view DOM element of the <code>Dropdown</code> button.</p>\n",
28405
- "line": 309,
28416
+ "line": 315,
28406
28417
  "rawdescription": "\n\nMaintains a reference to the view DOM element of the `Dropdown` button.\n",
28407
28418
  "decorators": [
28408
28419
  {
@@ -28422,7 +28433,7 @@
28422
28433
  "type": "number",
28423
28434
  "optional": false,
28424
28435
  "description": "",
28425
- "line": 183,
28436
+ "line": 185,
28426
28437
  "modifierKind": [
28427
28438
  126
28428
28439
  ]
@@ -28434,7 +28445,7 @@
28434
28445
  "type": "",
28435
28446
  "optional": false,
28436
28447
  "description": "<p>ViewChid of the dropdown view.</p>\n",
28437
- "line": 313,
28448
+ "line": 319,
28438
28449
  "rawdescription": "\n\nViewChid of the dropdown view.\n",
28439
28450
  "decorators": [
28440
28451
  {
@@ -28454,7 +28465,7 @@
28454
28465
  "type": "",
28455
28466
  "optional": false,
28456
28467
  "description": "",
28457
- "line": 315,
28468
+ "line": 321,
28458
28469
  "decorators": [
28459
28470
  {
28460
28471
  "name": "HostBinding",
@@ -28473,7 +28484,7 @@
28473
28484
  "type": "",
28474
28485
  "optional": false,
28475
28486
  "description": "",
28476
- "line": 331
28487
+ "line": 337
28477
28488
  },
28478
28489
  {
28479
28490
  "name": "menuIsClosed",
@@ -28483,7 +28494,7 @@
28483
28494
  "type": "",
28484
28495
  "optional": false,
28485
28496
  "description": "<p>Set to <code>true</code> if the dropdown is closed (not expanded).</p>\n",
28486
- "line": 319,
28497
+ "line": 325,
28487
28498
  "rawdescription": "\n\nSet to `true` if the dropdown is closed (not expanded).\n"
28488
28499
  },
28489
28500
  {
@@ -28494,7 +28505,7 @@
28494
28505
  "type": "",
28495
28506
  "optional": false,
28496
28507
  "description": "",
28497
- "line": 328
28508
+ "line": 334
28498
28509
  },
28499
28510
  {
28500
28511
  "name": "outsideClick",
@@ -28504,7 +28515,7 @@
28504
28515
  "type": "",
28505
28516
  "optional": false,
28506
28517
  "description": "",
28507
- "line": 329
28518
+ "line": 335
28508
28519
  },
28509
28520
  {
28510
28521
  "name": "outsideKey",
@@ -28514,7 +28525,7 @@
28514
28525
  "type": "",
28515
28526
  "optional": false,
28516
28527
  "description": "",
28517
- "line": 330
28528
+ "line": 336
28518
28529
  },
28519
28530
  {
28520
28531
  "name": "propagateChange",
@@ -28524,7 +28535,7 @@
28524
28535
  "type": "",
28525
28536
  "optional": false,
28526
28537
  "description": "<p>function passed in by <code>registerOnChange</code></p>\n",
28527
- "line": 499,
28538
+ "line": 505,
28528
28539
  "rawdescription": "\n\nfunction passed in by `registerOnChange`\n"
28529
28540
  },
28530
28541
  {
@@ -28534,7 +28545,7 @@
28534
28545
  "type": "AbstractDropdownView",
28535
28546
  "optional": false,
28536
28547
  "description": "<p>Maintains a reference to the <code>AbstractDropdownView</code> object within the content DOM.</p>\n",
28537
- "line": 305,
28548
+ "line": 311,
28538
28549
  "rawdescription": "\n\nMaintains a reference to the `AbstractDropdownView` object within the content DOM.\n",
28539
28550
  "decorators": [
28540
28551
  {
@@ -28554,7 +28565,7 @@
28554
28565
  "optional": false,
28555
28566
  "returnType": "void",
28556
28567
  "typeParameters": [],
28557
- "line": 674,
28568
+ "line": 684,
28558
28569
  "deprecated": false,
28559
28570
  "deprecationMessage": "",
28560
28571
  "rawdescription": "\n\nCreates the `Dropdown` list as an element that is appended to the DOM body.\n",
@@ -28566,7 +28577,7 @@
28566
28577
  "optional": false,
28567
28578
  "returnType": "void",
28568
28579
  "typeParameters": [],
28569
- "line": 666,
28580
+ "line": 676,
28570
28581
  "deprecated": false,
28571
28582
  "deprecationMessage": "",
28572
28583
  "rawdescription": "\n\nCreates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n",
@@ -28585,7 +28596,7 @@
28585
28596
  "optional": false,
28586
28597
  "returnType": "void",
28587
28598
  "typeParameters": [],
28588
- "line": 646,
28599
+ "line": 656,
28589
28600
  "deprecated": false,
28590
28601
  "deprecationMessage": "",
28591
28602
  "rawdescription": "\n\nHandles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n",
@@ -28608,7 +28619,7 @@
28608
28619
  "optional": false,
28609
28620
  "returnType": "void",
28610
28621
  "typeParameters": [],
28611
- "line": 626,
28622
+ "line": 636,
28612
28623
  "deprecated": false,
28613
28624
  "deprecationMessage": ""
28614
28625
  },
@@ -28625,7 +28636,7 @@
28625
28636
  "optional": false,
28626
28637
  "returnType": "void",
28627
28638
  "typeParameters": [],
28628
- "line": 630,
28639
+ "line": 640,
28629
28640
  "deprecated": false,
28630
28641
  "deprecationMessage": "",
28631
28642
  "rawdescription": "\n\nHandles clicks outside of the `Dropdown`.\n",
@@ -28655,7 +28666,7 @@
28655
28666
  "optional": false,
28656
28667
  "returnType": "void",
28657
28668
  "typeParameters": [],
28658
- "line": 638,
28669
+ "line": 648,
28659
28670
  "deprecated": false,
28660
28671
  "deprecationMessage": "",
28661
28672
  "jsdoctags": [
@@ -28676,7 +28687,7 @@
28676
28687
  "optional": false,
28677
28688
  "returnType": "any",
28678
28689
  "typeParameters": [],
28679
- "line": 688,
28690
+ "line": 698,
28680
28691
  "deprecated": false,
28681
28692
  "deprecationMessage": "",
28682
28693
  "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",
@@ -28688,7 +28699,7 @@
28688
28699
  "optional": false,
28689
28700
  "returnType": "void",
28690
28701
  "typeParameters": [],
28691
- "line": 607,
28702
+ "line": 617,
28692
28703
  "deprecated": false,
28693
28704
  "deprecationMessage": ""
28694
28705
  },
@@ -28705,7 +28716,7 @@
28705
28716
  "optional": false,
28706
28717
  "returnType": "void",
28707
28718
  "typeParameters": [],
28708
- "line": 547,
28719
+ "line": 557,
28709
28720
  "deprecated": false,
28710
28721
  "deprecationMessage": "",
28711
28722
  "jsdoctags": [
@@ -28726,7 +28737,7 @@
28726
28737
  "optional": false,
28727
28738
  "returnType": "void",
28728
28739
  "typeParameters": [],
28729
- "line": 752,
28740
+ "line": 762,
28730
28741
  "deprecated": false,
28731
28742
  "deprecationMessage": "",
28732
28743
  "rawdescription": "\n\nCollapsing the dropdown menu and removing unnecessary `EventListeners`.\n",
@@ -28738,7 +28749,7 @@
28738
28749
  "optional": false,
28739
28750
  "returnType": "Observable<string>",
28740
28751
  "typeParameters": [],
28741
- "line": 566,
28752
+ "line": 576,
28742
28753
  "deprecated": false,
28743
28754
  "deprecationMessage": "",
28744
28755
  "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",
@@ -28750,7 +28761,7 @@
28750
28761
  "optional": false,
28751
28762
  "returnType": "{ items: any; item?: undefined; } | { item: any; items?: undefined; } | { items?: undefined; item?: undefined; }",
28752
28763
  "typeParameters": [],
28753
- "line": 587,
28764
+ "line": 597,
28754
28765
  "deprecated": false,
28755
28766
  "deprecationMessage": ""
28756
28767
  },
@@ -28760,7 +28771,7 @@
28760
28771
  "optional": false,
28761
28772
  "returnType": "number",
28762
28773
  "typeParameters": [],
28763
- "line": 601,
28774
+ "line": 611,
28764
28775
  "deprecated": false,
28765
28776
  "deprecationMessage": ""
28766
28777
  },
@@ -28770,7 +28781,7 @@
28770
28781
  "optional": false,
28771
28782
  "returnType": "boolean",
28772
28783
  "typeParameters": [],
28773
- "line": 583,
28784
+ "line": 593,
28774
28785
  "deprecated": false,
28775
28786
  "deprecationMessage": ""
28776
28787
  },
@@ -28787,7 +28798,7 @@
28787
28798
  "optional": false,
28788
28799
  "returnType": "boolean",
28789
28800
  "typeParameters": [],
28790
- "line": 790,
28801
+ "line": 800,
28791
28802
  "deprecated": false,
28792
28803
  "deprecationMessage": "",
28793
28804
  "modifierKind": [
@@ -28811,7 +28822,7 @@
28811
28822
  "optional": false,
28812
28823
  "returnType": "void",
28813
28824
  "typeParameters": [],
28814
- "line": 481,
28825
+ "line": 487,
28815
28826
  "deprecated": false,
28816
28827
  "deprecationMessage": ""
28817
28828
  },
@@ -28828,7 +28839,7 @@
28828
28839
  "optional": false,
28829
28840
  "returnType": "void",
28830
28841
  "typeParameters": [],
28831
- "line": 516,
28842
+ "line": 522,
28832
28843
  "deprecated": false,
28833
28844
  "deprecationMessage": "",
28834
28845
  "rawdescription": "\n\nAdds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n",
@@ -28860,7 +28871,7 @@
28860
28871
  "optional": false,
28861
28872
  "returnType": "void",
28862
28873
  "typeParameters": [],
28863
- "line": 708,
28874
+ "line": 718,
28864
28875
  "deprecated": false,
28865
28876
  "deprecationMessage": "",
28866
28877
  "rawdescription": "\n\nExpands the dropdown menu in the view.\n",
@@ -28879,7 +28890,7 @@
28879
28890
  "optional": false,
28880
28891
  "returnType": "void",
28881
28892
  "typeParameters": [],
28882
- "line": 485,
28893
+ "line": 491,
28883
28894
  "deprecated": false,
28884
28895
  "deprecationMessage": "",
28885
28896
  "jsdoctags": [
@@ -28907,7 +28918,7 @@
28907
28918
  "optional": false,
28908
28919
  "returnType": "void",
28909
28920
  "typeParameters": [],
28910
- "line": 492,
28921
+ "line": 498,
28911
28922
  "deprecated": false,
28912
28923
  "deprecationMessage": "",
28913
28924
  "rawdescription": "\n\nRegistering the function injected to control the touch use of the `Dropdown`.\n",
@@ -28937,7 +28948,7 @@
28937
28948
  "optional": false,
28938
28949
  "returnType": "void",
28939
28950
  "typeParameters": [],
28940
- "line": 508,
28951
+ "line": 514,
28941
28952
  "deprecated": false,
28942
28953
  "deprecationMessage": "",
28943
28954
  "rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the dropdown.\n\nex: `this.formGroup.get(\"myDropdown\").disable();`\n\n",
@@ -28945,8 +28956,8 @@
28945
28956
  "jsdoctags": [
28946
28957
  {
28947
28958
  "name": {
28948
- "pos": 15409,
28949
- "end": 15419,
28959
+ "pos": 15574,
28960
+ "end": 15584,
28950
28961
  "flags": 16842752,
28951
28962
  "modifierFlagsCache": 0,
28952
28963
  "transformFlags": 0,
@@ -28957,8 +28968,8 @@
28957
28968
  "deprecated": false,
28958
28969
  "deprecationMessage": "",
28959
28970
  "tagName": {
28960
- "pos": 15403,
28961
- "end": 15408,
28971
+ "pos": 15568,
28972
+ "end": 15573,
28962
28973
  "flags": 16842752,
28963
28974
  "modifierFlagsCache": 0,
28964
28975
  "transformFlags": 0,
@@ -28975,7 +28986,7 @@
28975
28986
  "optional": false,
28976
28987
  "returnType": "void",
28977
28988
  "typeParameters": [],
28978
- "line": 782,
28989
+ "line": 792,
28979
28990
  "deprecated": false,
28980
28991
  "deprecationMessage": "",
28981
28992
  "rawdescription": "\n\nControls toggling menu states between open/expanded and closed/collapsed.\n",
@@ -28987,7 +28998,7 @@
28987
28998
  "optional": false,
28988
28999
  "returnType": "boolean",
28989
29000
  "typeParameters": [],
28990
- "line": 621,
29001
+ "line": 631,
28991
29002
  "deprecated": false,
28992
29003
  "deprecationMessage": "",
28993
29004
  "rawdescription": "\n\nReturns `true` if there is a value selected.\n",
@@ -29006,7 +29017,7 @@
29006
29017
  "optional": false,
29007
29018
  "returnType": "void",
29008
29019
  "typeParameters": [],
29009
- "line": 442,
29020
+ "line": 448,
29010
29021
  "deprecated": false,
29011
29022
  "deprecationMessage": "",
29012
29023
  "rawdescription": "\n\nPropagates the injected `value`.\n",
@@ -29032,7 +29043,7 @@
29032
29043
  "defaultValue": "true",
29033
29044
  "deprecated": false,
29034
29045
  "deprecationMessage": "",
29035
- "line": 315,
29046
+ "line": 321,
29036
29047
  "type": "boolean",
29037
29048
  "decorators": []
29038
29049
  }
@@ -29055,7 +29066,7 @@
29055
29066
  "deprecationMessage": "",
29056
29067
  "rawdescription": "\n\nAdds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n",
29057
29068
  "description": "<p>Adds keyboard functionality for navigation, selection and closing of the <code>Dropdown</code>.</p>\n",
29058
- "line": 516
29069
+ "line": 522
29059
29070
  }
29060
29071
  ],
29061
29072
  "standalone": false,
@@ -29063,7 +29074,7 @@
29063
29074
  "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",
29064
29075
  "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",
29065
29076
  "type": "component",
29066
- "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',\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--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}\">\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 ? $event.stopPropagation() : toggleMenu()\"\n\t\t\t(blur)=\"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<svg\n\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\tclass=\"cds--dropdown__invalid-icon\"\n\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\tsize=\"16\">\n\t\t\t</svg>\n\t\t\t<svg\n\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\tsize=\"16\"\n\t\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t\t</svg>\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<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<div\n\t\t*ngIf=\"helperText && !invalid && !warn && !skeleton\"\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@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 * 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 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\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\t// primarily used to capture and propagate input to `writeValue` before the content is available\n\tprivate _writtenValue: any = [];\n\tprotected get writtenValue() {\n\t\treturn this._writtenValue;\n\t}\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/**\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 ((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\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",
29077
+ "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',\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}\">\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\t[attr.aria-readonly]=\"readonly\"\n\t\t\taria-haspopup=\"listbox\"\n\t\t\t(click)=\"disabled || readonly ? $event.stopPropagation() : toggleMenu()\"\n\t\t\t(blur)=\"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<svg\n\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\tclass=\"cds--dropdown__invalid-icon\"\n\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\tsize=\"16\">\n\t\t\t</svg>\n\t\t\t<svg\n\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\tsize=\"16\"\n\t\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t\t</svg>\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<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<div\n\t\t*ngIf=\"helperText && !invalid && !warn && !skeleton\"\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@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 * 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\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\t// primarily used to capture and propagate input to `writeValue` before the content is available\n\tprivate _writtenValue: any = [];\n\tprotected get writtenValue() {\n\t\treturn this._writtenValue;\n\t}\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/**\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\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",
29067
29078
  "assetsDirs": [],
29068
29079
  "styleUrlsData": "",
29069
29080
  "stylesData": "",
@@ -29098,7 +29109,7 @@
29098
29109
  "deprecationMessage": ""
29099
29110
  }
29100
29111
  ],
29101
- "line": 347,
29112
+ "line": 353,
29102
29113
  "rawdescription": "\n\nCreates an instance of Dropdown.\n",
29103
29114
  "jsdoctags": [
29104
29115
  {
@@ -72830,7 +72841,7 @@
72830
72841
  "deprecated": false,
72831
72842
  "deprecationMessage": "",
72832
72843
  "type": "",
72833
- "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(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})"
72844
+ "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(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})"
72834
72845
  },
72835
72846
  {
72836
72847
  "name": "MultiTemplate",
@@ -72930,7 +72941,7 @@
72930
72941
  "deprecated": false,
72931
72942
  "deprecationMessage": "",
72932
72943
  "type": "",
72933
- "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(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})"
72944
+ "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})"
72934
72945
  },
72935
72946
  {
72936
72947
  "name": "NoDataTemplate",
@@ -73985,7 +73996,7 @@
73985
73996
  "deprecated": false,
73986
73997
  "deprecationMessage": "",
73987
73998
  "type": "",
73988
- "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(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})"
73999
+ "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(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})"
73989
74000
  },
73990
74001
  {
73991
74002
  "name": "Template",
@@ -78297,7 +78308,7 @@
78297
78308
  "deprecated": false,
78298
78309
  "deprecationMessage": "",
78299
78310
  "type": "",
78300
- "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(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})"
78311
+ "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(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})"
78301
78312
  },
78302
78313
  {
78303
78314
  "name": "NgTemplate",
@@ -78307,7 +78318,7 @@
78307
78318
  "deprecated": false,
78308
78319
  "deprecationMessage": "",
78309
78320
  "type": "",
78310
- "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(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})"
78321
+ "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})"
78311
78322
  },
78312
78323
  {
78313
78324
  "name": "ReactiveForms",
@@ -78337,7 +78348,7 @@
78337
78348
  "deprecated": false,
78338
78349
  "deprecationMessage": "",
78339
78350
  "type": "",
78340
- "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(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})"
78351
+ "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(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})"
78341
78352
  },
78342
78353
  {
78343
78354
  "name": "WithTemplate",
@@ -84140,7 +84151,7 @@
84140
84151
  "linktype": "component",
84141
84152
  "name": "Dropdown",
84142
84153
  "coveragePercent": 72,
84143
- "coverageCount": "49/68",
84154
+ "coverageCount": "50/69",
84144
84155
  "status": "good"
84145
84156
  },
84146
84157
  {