carbon-components-angular 5.54.1 → 5.56.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.
- package/combobox/combobox.component.d.ts +7 -2
- package/docs/documentation/components/ComboBox.html +294 -211
- package/docs/documentation/components/Dropdown.html +504 -152
- package/docs/documentation/coverage.html +6 -6
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/TilesModule/dependencies.svg +91 -91
- package/docs/documentation/modules/TilesModule.html +91 -91
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TimePickerSelectModule.html +4 -4
- package/docs/documentation/modules/ToggleModule/dependencies.svg +19 -19
- package/docs/documentation/modules/ToggleModule.html +19 -19
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
- package/docs/documentation/modules/ToggletipModule.html +37 -37
- package/docs/documentation/modules/TooltipModule/dependencies.svg +28 -28
- package/docs/documentation/modules/TooltipModule.html +28 -28
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +7 -7
- package/docs/documentation/modules/TreeviewModule.html +7 -7
- package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
- package/docs/documentation/modules/UIShellModule.html +4 -4
- package/docs/documentation.json +454 -280
- package/docs/storybook/3224.9896492c.iframe.bundle.js +1 -0
- package/docs/storybook/combobox-combobox-stories.6da5780e.iframe.bundle.js +1 -0
- package/docs/storybook/{dropdown-dropdown-stories.03c37214.iframe.bundle.js → dropdown-dropdown-stories.0a8f052e.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/index.json +1 -1
- package/docs/storybook/main.848bbb16.iframe.bundle.js +1 -0
- package/docs/storybook/main.css +886 -187
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.ba940694.iframe.bundle.js → runtime~main.e82ba84b.iframe.bundle.js} +1 -1
- package/docs/storybook/stories.json +1 -1
- package/dropdown/dropdown.component.d.ts +12 -3
- package/esm2020/combobox/combobox.component.mjs +38 -14
- package/esm2020/dropdown/dropdown.component.mjs +79 -37
- package/fesm2015/carbon-components-angular-combobox.mjs +37 -13
- package/fesm2015/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-dropdown.mjs +79 -37
- package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-combobox.mjs +37 -13
- package/fesm2020/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-dropdown.mjs +79 -37
- package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
- package/package.json +1 -1
- package/docs/storybook/3224.c0834124.iframe.bundle.js +0 -1
- package/docs/storybook/IBMPlexMono-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/combobox-combobox-stories.632a96c1.iframe.bundle.js +0 -1
- package/docs/storybook/main.41f2a733.iframe.bundle.js +0 -1
package/docs/documentation.json
CHANGED
|
@@ -23130,7 +23130,7 @@
|
|
|
23130
23130
|
},
|
|
23131
23131
|
{
|
|
23132
23132
|
"name": "ComboBox",
|
|
23133
|
-
"id": "component-ComboBox-
|
|
23133
|
+
"id": "component-ComboBox-4bd11617318e0f3c7c865c6fe820c21ccb91ad2a7a301bb900f1657eee7ec3a783213aa68d8a8e86ca19eda085678f0a3f205e7f925d842b0003e79cfaee54e5",
|
|
23134
23134
|
"file": "src/combobox/combobox.component.ts",
|
|
23135
23135
|
"encapsulation": [],
|
|
23136
23136
|
"entryComponents": [],
|
|
@@ -23144,7 +23144,7 @@
|
|
|
23144
23144
|
"selector": "cds-combo-box, ibm-combo-box",
|
|
23145
23145
|
"styleUrls": [],
|
|
23146
23146
|
"styles": [],
|
|
23147
|
-
"template": "<div
|
|
23147
|
+
"template": "<div\n\tclass=\"cds--list-box__wrapper\"\n\t[ngClass]=\"{\n\t\t'cds--list-box__wrapper--fluid': fluid,\n\t\t'cds--list-box__wrapper--fluid--invalid': fluid && invalid,\n\t\t'cds--list-box__wrapper--fluid--focus': fluid && _isFocused\n\t}\">\n\t<label\n\t\t*ngIf=\"label\"\n\t\t[for]=\"id\"\n\t\t[id]=\"labelId\"\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\t#listbox\n\t\t[ngClass]=\"{\n\t\t\t'cds--multi-select cds--multi-select--filterable': type === 'multi',\n\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t'cds--list-box--expanded': open,\n\t\t\t'cds--list-box--sm': size === 'sm',\n\t\t\t'cds--list-box--md': size === 'md',\n\t\t\t'cds--list-box--lg': size === 'lg',\n\t\t\t'cds--list-box--disabled': disabled,\n\t\t\t'cds--combo-box--readonly': readonly,\n\t\t\t'cds--combo-box--warning cds--list-box--warning': warn,\n\t\t\t'cds--list-box--invalid': invalid\n\t\t}\"\n\t\tclass=\"cds--list-box cds--combo-box\"\n\t\t[attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t<div\n\t\t\tclass=\"cds--list-box__field\"\n\t\t\t(click)=\"toggleDropdown()\"\n\t\t\t(blur)=\"onBlur()\">\n\t\t\t<div\n\t\t\t\t*ngIf=\"type === 'multi' && pills.length > 0\"\n\t\t\t\tclass=\"cds--tag cds--tag--filter cds--tag--high-contrast\"\n\t\t\t\t[ngClass]=\"{'cds--tag--disabled': disabled || readonly}\">\n\t\t\t\t<span class=\"cds--tag__label\">{{ pills.length }}</span>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t(click)=\"clearSelected($event)\"\n\t\t\t\t\t(blur)=\"onBlur()\"\n\t\t\t\t\t(keydown.enter)=\"clearSelected($event)\"\n\t\t\t\t\tclass=\"cds--tag__close-icon\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[title]=\"clearSelectionsTitle\"\n\t\t\t\t\t[disabled]=\"disabled || readonly\"\n\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\">\n\t\t\t\t\t<svg\n\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\ttype=\"text\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\trole=\"combobox\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[readOnly]=\"readonly\"\n\t\t\t\t(input)=\"onSearch($event.target.value)\"\n\t\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t\t(blur)=\"fluid ? handleFocus($event) : onBlur()\"\n\t\t\t\t(keydown.enter)=\"onSubmit($event)\"\n\t\t\t\t[value]=\"selectedValue\"\n\t\t\t\tclass=\"cds--text-input\"\n\t\t\t\t[ngClass]=\"{'cds--text-input--empty': !showClearButton}\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[id]=\"id\"\n\t\t\t\t[attr.aria-labelledby]=\"labelId\"\n\t\t\t\t[attr.aria-expanded]=\"open\"\n\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t[attr.maxlength]=\"maxLength\"\n\t\t\t\t[attr.aria-controls]=\"open ? view?.listId : null\"\n\t\t\t\t[attr.aria-autocomplete]=\"autocomplete\"\n\t\t\t\t[placeholder]=\"placeholder\"/>\n\t\t\t<svg\n\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\tsize=\"16\"\n\t\t\t\tclass=\"cds--list-box__invalid-icon\">\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<div\n\t\t\t\t*ngIf=\"showClearButton\"\n\t\t\t\trole=\"button\"\n\t\t\t\tclass=\"cds--list-box__selection\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[attr.aria-label]=\"clearSelectionAria\"\n\t\t\t\t[title]=\"clearSelectionTitle\"\n\t\t\t\t(keyup.enter)=\"clearInput($event)\"\n\t\t\t\t(click)=\"clearInput($event)\"\n\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t<svg cdsIcon=\"close\" size=\"16\"></svg>\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\trole=\"button\"\n\t\t\t\tclass=\"cds--list-box__menu-icon\"\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\t[title]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t[attr.aria-label]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': open}\">\n\t\t\t\t<svg cdsIcon=\"chevron--down\" size=\"16\"></svg>\n\t\t\t</button>\n\t\t</div>\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=\"open\"></ng-content>\n\t\t</div>\n\t</div>\n\t<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n\t<div\n\t\t*ngIf=\"helperText && !invalid && !warn && !fluid\"\n\t\tclass=\"cds--form__helper-text\"\n\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\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</div>\n\t",
|
|
23148
23148
|
"templateUrl": [],
|
|
23149
23149
|
"viewProviders": [],
|
|
23150
23150
|
"hostDirectives": [],
|
|
@@ -23156,7 +23156,7 @@
|
|
|
23156
23156
|
"deprecationMessage": "",
|
|
23157
23157
|
"rawdescription": "\n\nset to `true` to place the dropdown view inline with the component\n",
|
|
23158
23158
|
"description": "<p>set to <code>true</code> to place the dropdown view inline with the component</p>\n",
|
|
23159
|
-
"line":
|
|
23159
|
+
"line": 331,
|
|
23160
23160
|
"type": "boolean",
|
|
23161
23161
|
"decorators": []
|
|
23162
23162
|
},
|
|
@@ -23167,7 +23167,7 @@
|
|
|
23167
23167
|
"deprecationMessage": "",
|
|
23168
23168
|
"rawdescription": "\n\nSpecify aria-autocomplete attribute of text input.\n\"list\", is the expected value for a combobox that invokes a drop-down list\n",
|
|
23169
23169
|
"description": "<p>Specify aria-autocomplete attribute of text input.\n"list", is the expected value for a combobox that invokes a drop-down list</p>\n",
|
|
23170
|
-
"line":
|
|
23170
|
+
"line": 367,
|
|
23171
23171
|
"type": "string",
|
|
23172
23172
|
"decorators": []
|
|
23173
23173
|
},
|
|
@@ -23177,7 +23177,7 @@
|
|
|
23177
23177
|
"deprecationMessage": "",
|
|
23178
23178
|
"rawdescription": "\n\nValue to display for accessibility purposes on the clear the selected item icon, when single is selected\n",
|
|
23179
23179
|
"description": "<p>Value to display for accessibility purposes on the clear the selected item icon, when single is selected</p>\n",
|
|
23180
|
-
"line":
|
|
23180
|
+
"line": 267,
|
|
23181
23181
|
"type": "string | Observable",
|
|
23182
23182
|
"decorators": []
|
|
23183
23183
|
},
|
|
@@ -23187,7 +23187,7 @@
|
|
|
23187
23187
|
"deprecationMessage": "",
|
|
23188
23188
|
"rawdescription": "\n\nValue to display for accessibility purposes to clear selections, when multi is selected\n",
|
|
23189
23189
|
"description": "<p>Value to display for accessibility purposes to clear selections, when multi is selected</p>\n",
|
|
23190
|
-
"line":
|
|
23190
|
+
"line": 247,
|
|
23191
23191
|
"type": "string | Observable",
|
|
23192
23192
|
"decorators": []
|
|
23193
23193
|
},
|
|
@@ -23197,7 +23197,7 @@
|
|
|
23197
23197
|
"deprecationMessage": "",
|
|
23198
23198
|
"rawdescription": "\n\nValue to display on the clear selections icon, when multi is selected\n",
|
|
23199
23199
|
"description": "<p>Value to display on the clear selections icon, when multi is selected</p>\n",
|
|
23200
|
-
"line":
|
|
23200
|
+
"line": 237,
|
|
23201
23201
|
"type": "string | Observable",
|
|
23202
23202
|
"decorators": []
|
|
23203
23203
|
},
|
|
@@ -23207,7 +23207,7 @@
|
|
|
23207
23207
|
"deprecationMessage": "",
|
|
23208
23208
|
"rawdescription": "\n\nValue to display on the clear the selected item icon, when single is selected\n",
|
|
23209
23209
|
"description": "<p>Value to display on the clear the selected item icon, when single is selected</p>\n",
|
|
23210
|
-
"line":
|
|
23210
|
+
"line": 257,
|
|
23211
23211
|
"type": "string | Observable",
|
|
23212
23212
|
"decorators": []
|
|
23213
23213
|
},
|
|
@@ -23217,7 +23217,7 @@
|
|
|
23217
23217
|
"deprecationMessage": "",
|
|
23218
23218
|
"rawdescription": "\n\nValue to display for accessibility purposes on the combobox control menu when opened\n",
|
|
23219
23219
|
"description": "<p>Value to display for accessibility purposes on the combobox control menu when opened</p>\n",
|
|
23220
|
-
"line":
|
|
23220
|
+
"line": 227,
|
|
23221
23221
|
"type": "string | Observable",
|
|
23222
23222
|
"decorators": []
|
|
23223
23223
|
},
|
|
@@ -23228,7 +23228,7 @@
|
|
|
23228
23228
|
"deprecationMessage": "",
|
|
23229
23229
|
"rawdescription": "\n\nSet to `true` to disable combobox.\n",
|
|
23230
23230
|
"description": "<p>Set to <code>true</code> to disable combobox.</p>\n",
|
|
23231
|
-
"line":
|
|
23231
|
+
"line": 375,
|
|
23232
23232
|
"type": "boolean",
|
|
23233
23233
|
"decorators": []
|
|
23234
23234
|
},
|
|
@@ -23238,7 +23238,18 @@
|
|
|
23238
23238
|
"deprecationMessage": "",
|
|
23239
23239
|
"rawdescription": "\n\nOverrides the automatic dropUp.\n",
|
|
23240
23240
|
"description": "<p>Overrides the automatic dropUp.</p>\n",
|
|
23241
|
-
"line":
|
|
23241
|
+
"line": 371,
|
|
23242
|
+
"type": "boolean",
|
|
23243
|
+
"decorators": []
|
|
23244
|
+
},
|
|
23245
|
+
{
|
|
23246
|
+
"name": "fluid",
|
|
23247
|
+
"defaultValue": "false",
|
|
23248
|
+
"deprecated": false,
|
|
23249
|
+
"deprecationMessage": "",
|
|
23250
|
+
"rawdescription": "\n\nExperimental: enable fluid state\n",
|
|
23251
|
+
"description": "<p>Experimental: enable fluid state</p>\n",
|
|
23252
|
+
"line": 383,
|
|
23242
23253
|
"type": "boolean",
|
|
23243
23254
|
"decorators": []
|
|
23244
23255
|
},
|
|
@@ -23248,7 +23259,7 @@
|
|
|
23248
23259
|
"deprecationMessage": "",
|
|
23249
23260
|
"rawdescription": "\n\nSets the optional helper text.\n",
|
|
23250
23261
|
"description": "<p>Sets the optional helper text.</p>\n",
|
|
23251
|
-
"line":
|
|
23262
|
+
"line": 327,
|
|
23252
23263
|
"type": "string | TemplateRef<any>",
|
|
23253
23264
|
"decorators": []
|
|
23254
23265
|
},
|
|
@@ -23259,7 +23270,7 @@
|
|
|
23259
23270
|
"deprecationMessage": "",
|
|
23260
23271
|
"rawdescription": "\n\nHide label while keeping it accessible for screen readers\n",
|
|
23261
23272
|
"description": "<p>Hide label while keeping it accessible for screen readers</p>\n",
|
|
23262
|
-
"line":
|
|
23273
|
+
"line": 323,
|
|
23263
23274
|
"type": "boolean",
|
|
23264
23275
|
"decorators": []
|
|
23265
23276
|
},
|
|
@@ -23268,7 +23279,7 @@
|
|
|
23268
23279
|
"defaultValue": "`combobox-${ComboBox.comboBoxCount++}`",
|
|
23269
23280
|
"deprecated": false,
|
|
23270
23281
|
"deprecationMessage": "",
|
|
23271
|
-
"line":
|
|
23282
|
+
"line": 275,
|
|
23272
23283
|
"type": "string",
|
|
23273
23284
|
"decorators": []
|
|
23274
23285
|
},
|
|
@@ -23279,7 +23290,7 @@
|
|
|
23279
23290
|
"deprecationMessage": "",
|
|
23280
23291
|
"rawdescription": "\n\nSet to `true` to show the invalid state.\n",
|
|
23281
23292
|
"description": "<p>Set to <code>true</code> to show the invalid state.</p>\n",
|
|
23282
|
-
"line":
|
|
23293
|
+
"line": 335,
|
|
23283
23294
|
"type": "boolean",
|
|
23284
23295
|
"decorators": []
|
|
23285
23296
|
},
|
|
@@ -23289,7 +23300,7 @@
|
|
|
23289
23300
|
"deprecationMessage": "",
|
|
23290
23301
|
"rawdescription": "\n\nValue displayed if combobox is in an invalid state.\n",
|
|
23291
23302
|
"description": "<p>Value displayed if combobox is in an invalid state.</p>\n",
|
|
23292
|
-
"line":
|
|
23303
|
+
"line": 339,
|
|
23293
23304
|
"type": "string | TemplateRef<any>",
|
|
23294
23305
|
"decorators": []
|
|
23295
23306
|
},
|
|
@@ -23300,7 +23311,7 @@
|
|
|
23300
23311
|
"deprecationMessage": "",
|
|
23301
23312
|
"rawdescription": "\n\nList of items to fill the content with.\n\n**Example:**\n```javascript\nitems = [\n\t\t{\n\t\t\tcontent: \"Abacus\",\n\t\t\tselected: false\n\t\t},\n\t\t{\n\t\t\tcontent: \"Byte\",\n\t\t\tselected: false,\n\t\t},\n\t\t{\n\t\t\tcontent: \"Computer\",\n\t\t\tselected: false\n\t\t},\n\t\t{\n\t\t\tcontent: \"Digital\",\n\t\t\tselected: false\n\t\t}\n];\n```\n\n",
|
|
23302
23313
|
"description": "<p>List of items to fill the content with.</p>\n<p><strong>Example:</strong></p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-javascript\">items = [\n {\n content: "Abacus",\n selected: false\n },\n {\n content: "Byte",\n selected: false,\n },\n {\n content: "Computer",\n selected: false\n },\n {\n content: "Digital",\n selected: false\n }\n];</code></pre></div>",
|
|
23303
|
-
"line":
|
|
23314
|
+
"line": 303,
|
|
23304
23315
|
"type": "Array<ListItem>",
|
|
23305
23316
|
"decorators": []
|
|
23306
23317
|
},
|
|
@@ -23310,7 +23321,7 @@
|
|
|
23310
23321
|
"deprecationMessage": "",
|
|
23311
23322
|
"rawdescription": "\n\nSpecifies the property to be used as the return value to `ngModel`\n",
|
|
23312
23323
|
"description": "<p>Specifies the property to be used as the return value to <code>ngModel</code></p>\n",
|
|
23313
|
-
"line":
|
|
23324
|
+
"line": 315,
|
|
23314
23325
|
"type": "string",
|
|
23315
23326
|
"decorators": []
|
|
23316
23327
|
},
|
|
@@ -23320,7 +23331,7 @@
|
|
|
23320
23331
|
"deprecationMessage": "",
|
|
23321
23332
|
"rawdescription": "\n\nLabel for the combobox.\n",
|
|
23322
23333
|
"description": "<p>Label for the combobox.</p>\n",
|
|
23323
|
-
"line":
|
|
23334
|
+
"line": 319,
|
|
23324
23335
|
"type": "string | TemplateRef<any>",
|
|
23325
23336
|
"decorators": []
|
|
23326
23337
|
},
|
|
@@ -23329,7 +23340,7 @@
|
|
|
23329
23340
|
"defaultValue": "`combobox-label-${ComboBox.comboBoxCount++}`",
|
|
23330
23341
|
"deprecated": false,
|
|
23331
23342
|
"deprecationMessage": "",
|
|
23332
|
-
"line":
|
|
23343
|
+
"line": 276,
|
|
23333
23344
|
"type": "string",
|
|
23334
23345
|
"decorators": []
|
|
23335
23346
|
},
|
|
@@ -23340,7 +23351,7 @@
|
|
|
23340
23351
|
"deprecationMessage": "",
|
|
23341
23352
|
"rawdescription": "\n\nMax length value to limit input characters\n",
|
|
23342
23353
|
"description": "<p>Max length value to limit input characters</p>\n",
|
|
23343
|
-
"line":
|
|
23354
|
+
"line": 351,
|
|
23344
23355
|
"type": "number",
|
|
23345
23356
|
"decorators": []
|
|
23346
23357
|
},
|
|
@@ -23350,7 +23361,7 @@
|
|
|
23350
23361
|
"deprecationMessage": "",
|
|
23351
23362
|
"rawdescription": "\n\nValue to display for accessibility purposes on the combobox control menu when closed\n",
|
|
23352
23363
|
"description": "<p>Value to display for accessibility purposes on the combobox control menu when closed</p>\n",
|
|
23353
|
-
"line":
|
|
23364
|
+
"line": 217,
|
|
23354
23365
|
"type": "string | Observable",
|
|
23355
23366
|
"decorators": []
|
|
23356
23367
|
},
|
|
@@ -23360,7 +23371,7 @@
|
|
|
23360
23371
|
"deprecationMessage": "",
|
|
23361
23372
|
"rawdescription": "\n\nText to show when nothing is selected.\n",
|
|
23362
23373
|
"description": "<p>Text to show when nothing is selected.</p>\n",
|
|
23363
|
-
"line":
|
|
23374
|
+
"line": 207,
|
|
23364
23375
|
"type": "string | Observable",
|
|
23365
23376
|
"decorators": []
|
|
23366
23377
|
},
|
|
@@ -23371,7 +23382,7 @@
|
|
|
23371
23382
|
"deprecationMessage": "",
|
|
23372
23383
|
"rawdescription": "\n\nSet to `true` for readonly state.\n",
|
|
23373
23384
|
"description": "<p>Set to <code>true</code> for readonly state.</p>\n",
|
|
23374
|
-
"line":
|
|
23385
|
+
"line": 379,
|
|
23375
23386
|
"type": "boolean",
|
|
23376
23387
|
"decorators": []
|
|
23377
23388
|
},
|
|
@@ -23382,7 +23393,7 @@
|
|
|
23382
23393
|
"deprecationMessage": "",
|
|
23383
23394
|
"rawdescription": "\n\nSpecify feedback (mode) of the selection.\n`top`: selected item jumps to top\n`fixed`: selected item stays at its position\n`top-after-reopen`: selected item jump to top after reopen dropdown\n",
|
|
23384
23395
|
"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 its position\n<code>top-after-reopen</code>: selected item jump to top after reopen dropdown</p>\n",
|
|
23385
|
-
"line":
|
|
23396
|
+
"line": 362,
|
|
23386
23397
|
"type": "\"top\" | \"fixed\" | \"top-after-reopen\"",
|
|
23387
23398
|
"decorators": []
|
|
23388
23399
|
},
|
|
@@ -23393,7 +23404,7 @@
|
|
|
23393
23404
|
"deprecationMessage": "",
|
|
23394
23405
|
"rawdescription": "\n\nCombo box render size.\n",
|
|
23395
23406
|
"description": "<p>Combo box render size.</p>\n",
|
|
23396
|
-
"line":
|
|
23407
|
+
"line": 311,
|
|
23397
23408
|
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
23398
23409
|
"decorators": []
|
|
23399
23410
|
},
|
|
@@ -23404,15 +23415,15 @@
|
|
|
23404
23415
|
"deprecationMessage": "since v5 - Use `cdsLayer` directive instead",
|
|
23405
23416
|
"jsdoctags": [
|
|
23406
23417
|
{
|
|
23407
|
-
"pos":
|
|
23408
|
-
"end":
|
|
23418
|
+
"pos": 10251,
|
|
23419
|
+
"end": 10309,
|
|
23409
23420
|
"flags": 16842752,
|
|
23410
23421
|
"modifierFlagsCache": 0,
|
|
23411
23422
|
"transformFlags": 0,
|
|
23412
23423
|
"kind": 338,
|
|
23413
23424
|
"tagName": {
|
|
23414
|
-
"pos":
|
|
23415
|
-
"end":
|
|
23425
|
+
"pos": 10252,
|
|
23426
|
+
"end": 10262,
|
|
23416
23427
|
"flags": 16842752,
|
|
23417
23428
|
"modifierFlagsCache": 0,
|
|
23418
23429
|
"transformFlags": 0,
|
|
@@ -23422,7 +23433,7 @@
|
|
|
23422
23433
|
"comment": "<p>since v5 - Use <code>cdsLayer</code> directive instead</p>\n"
|
|
23423
23434
|
}
|
|
23424
23435
|
],
|
|
23425
|
-
"line":
|
|
23436
|
+
"line": 355,
|
|
23426
23437
|
"type": "\"light\" | \"dark\"",
|
|
23427
23438
|
"decorators": []
|
|
23428
23439
|
},
|
|
@@ -23433,7 +23444,7 @@
|
|
|
23433
23444
|
"deprecationMessage": "",
|
|
23434
23445
|
"rawdescription": "\n\nCombo box type (supporting single or multi selection of items).\n",
|
|
23435
23446
|
"description": "<p>Combo box type (supporting single or multi selection of items).</p>\n",
|
|
23436
|
-
"line":
|
|
23447
|
+
"line": 307,
|
|
23437
23448
|
"type": "\"single\" | \"multi\"",
|
|
23438
23449
|
"decorators": []
|
|
23439
23450
|
},
|
|
@@ -23444,7 +23455,7 @@
|
|
|
23444
23455
|
"deprecationMessage": "",
|
|
23445
23456
|
"rawdescription": "\n\nSet to `true` to show a warning (contents set by warnText)\n",
|
|
23446
23457
|
"description": "<p>Set to <code>true</code> to show a warning (contents set by warnText)</p>\n",
|
|
23447
|
-
"line":
|
|
23458
|
+
"line": 343,
|
|
23448
23459
|
"type": "boolean",
|
|
23449
23460
|
"decorators": []
|
|
23450
23461
|
},
|
|
@@ -23454,7 +23465,7 @@
|
|
|
23454
23465
|
"deprecationMessage": "",
|
|
23455
23466
|
"rawdescription": "\n\nSets the warning text\n",
|
|
23456
23467
|
"description": "<p>Sets the warning text</p>\n",
|
|
23457
|
-
"line":
|
|
23468
|
+
"line": 347,
|
|
23458
23469
|
"type": "string | TemplateRef<any>",
|
|
23459
23470
|
"decorators": []
|
|
23460
23471
|
}
|
|
@@ -23467,7 +23478,7 @@
|
|
|
23467
23478
|
"deprecationMessage": "",
|
|
23468
23479
|
"rawdescription": "\nEmits an event when the clear button is clicked.",
|
|
23469
23480
|
"description": "<p>Emits an event when the clear button is clicked.</p>\n",
|
|
23470
|
-
"line":
|
|
23481
|
+
"line": 435,
|
|
23471
23482
|
"type": "EventEmitter"
|
|
23472
23483
|
},
|
|
23473
23484
|
{
|
|
@@ -23477,7 +23488,7 @@
|
|
|
23477
23488
|
"deprecationMessage": "",
|
|
23478
23489
|
"rawdescription": "\nEmits an empty event when the menu is closed",
|
|
23479
23490
|
"description": "<p>Emits an empty event when the menu is closed</p>\n",
|
|
23480
|
-
"line":
|
|
23491
|
+
"line": 431,
|
|
23481
23492
|
"type": "EventEmitter"
|
|
23482
23493
|
},
|
|
23483
23494
|
{
|
|
@@ -23487,7 +23498,7 @@
|
|
|
23487
23498
|
"deprecationMessage": "",
|
|
23488
23499
|
"rawdescription": "\nEmits the search string from the input",
|
|
23489
23500
|
"description": "<p>Emits the search string from the input</p>\n",
|
|
23490
|
-
"line":
|
|
23501
|
+
"line": 433,
|
|
23491
23502
|
"type": "EventEmitter"
|
|
23492
23503
|
},
|
|
23493
23504
|
{
|
|
@@ -23497,7 +23508,7 @@
|
|
|
23497
23508
|
"deprecationMessage": "",
|
|
23498
23509
|
"rawdescription": "\n\nEmits a ListItem\n\nExample:\n```javascript\n{\n\t\tcontent: \"one\",\n\t\tselected: true\n}\n```\n",
|
|
23499
23510
|
"description": "<p>Emits a ListItem</p>\n<p>Example:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-javascript\">{\n content: "one",\n selected: true\n}</code></pre></div>",
|
|
23500
|
-
"line":
|
|
23511
|
+
"line": 395,
|
|
23501
23512
|
"type": "EventEmitter"
|
|
23502
23513
|
},
|
|
23503
23514
|
{
|
|
@@ -23507,7 +23518,7 @@
|
|
|
23507
23518
|
"deprecationMessage": "",
|
|
23508
23519
|
"rawdescription": "\n\nIntended to be used to add items to the list.\n\nEmits an event that includes the current item list, the suggested index for the new item, and a simple ListItem\n\nExample:\n```javascript\n\t{\n\t\titems: [{content: \"one\", selected: true}, {content: \"two\", selected: true}],\n\t\tindex: 1,\n\t\tvalue: {\n\t\t\tcontent: \"some user string\",\n\t\t\tselected: false\n\t\t}\n\t}\n```\n\n\nExample:\n```javascript\n{\n\tafter: 1,\n\tvalue: \"some user string\"\n}\n```\n",
|
|
23509
23520
|
"description": "<p>Intended to be used to add items to the list.</p>\n<p>Emits an event that includes the current item list, the suggested index for the new item, and a simple ListItem</p>\n<p>Example:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-javascript\"> {\n items: [{content: "one", selected: true}, {content: "two", selected: true}],\n index: 1,\n value: {\n content: "some user string",\n selected: false\n }\n }</code></pre></div><p>Example:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-javascript\">{\n after: 1,\n value: "some user string"\n}</code></pre></div>",
|
|
23510
|
-
"line":
|
|
23521
|
+
"line": 422,
|
|
23511
23522
|
"type": "EventEmitter"
|
|
23512
23523
|
}
|
|
23513
23524
|
],
|
|
@@ -23520,7 +23531,7 @@
|
|
|
23520
23531
|
"type": "",
|
|
23521
23532
|
"optional": false,
|
|
23522
23533
|
"description": "<p>controls whether the <code>drop-up</code> class is applied</p>\n",
|
|
23523
|
-
"line":
|
|
23534
|
+
"line": 457,
|
|
23524
23535
|
"rawdescription": "\n\ncontrols whether the `drop-up` class is applied\n"
|
|
23525
23536
|
},
|
|
23526
23537
|
{
|
|
@@ -23531,30 +23542,11 @@
|
|
|
23531
23542
|
"type": "number",
|
|
23532
23543
|
"optional": false,
|
|
23533
23544
|
"description": "",
|
|
23534
|
-
"line":
|
|
23545
|
+
"line": 274,
|
|
23535
23546
|
"modifierKind": [
|
|
23536
23547
|
126
|
|
23537
23548
|
]
|
|
23538
23549
|
},
|
|
23539
|
-
{
|
|
23540
|
-
"name": "display",
|
|
23541
|
-
"defaultValue": "\"block\"",
|
|
23542
|
-
"deprecated": false,
|
|
23543
|
-
"deprecationMessage": "",
|
|
23544
|
-
"type": "string",
|
|
23545
|
-
"optional": false,
|
|
23546
|
-
"description": "",
|
|
23547
|
-
"line": 429,
|
|
23548
|
-
"decorators": [
|
|
23549
|
-
{
|
|
23550
|
-
"name": "HostBinding",
|
|
23551
|
-
"stringifiedArguments": "'style.display'"
|
|
23552
|
-
}
|
|
23553
|
-
],
|
|
23554
|
-
"modifierKind": [
|
|
23555
|
-
170
|
|
23556
|
-
]
|
|
23557
|
-
},
|
|
23558
23550
|
{
|
|
23559
23551
|
"name": "dropdownMenu",
|
|
23560
23552
|
"deprecated": false,
|
|
@@ -23562,7 +23554,7 @@
|
|
|
23562
23554
|
"type": "",
|
|
23563
23555
|
"optional": false,
|
|
23564
23556
|
"description": "",
|
|
23565
|
-
"line":
|
|
23557
|
+
"line": 438,
|
|
23566
23558
|
"decorators": [
|
|
23567
23559
|
{
|
|
23568
23560
|
"name": "ViewChild",
|
|
@@ -23581,7 +23573,7 @@
|
|
|
23581
23573
|
"type": "",
|
|
23582
23574
|
"optional": false,
|
|
23583
23575
|
"description": "",
|
|
23584
|
-
"line":
|
|
23576
|
+
"line": 441,
|
|
23585
23577
|
"decorators": [
|
|
23586
23578
|
{
|
|
23587
23579
|
"name": "HostBinding",
|
|
@@ -23599,7 +23591,7 @@
|
|
|
23599
23591
|
"type": "ElementRef",
|
|
23600
23592
|
"optional": false,
|
|
23601
23593
|
"description": "",
|
|
23602
|
-
"line":
|
|
23594
|
+
"line": 439,
|
|
23603
23595
|
"decorators": [
|
|
23604
23596
|
{
|
|
23605
23597
|
"name": "ViewChild",
|
|
@@ -23618,7 +23610,7 @@
|
|
|
23618
23610
|
"type": "",
|
|
23619
23611
|
"optional": false,
|
|
23620
23612
|
"description": "",
|
|
23621
|
-
"line":
|
|
23613
|
+
"line": 453
|
|
23622
23614
|
},
|
|
23623
23615
|
{
|
|
23624
23616
|
"name": "listbox",
|
|
@@ -23627,7 +23619,7 @@
|
|
|
23627
23619
|
"type": "ElementRef",
|
|
23628
23620
|
"optional": false,
|
|
23629
23621
|
"description": "",
|
|
23630
|
-
"line":
|
|
23622
|
+
"line": 440,
|
|
23631
23623
|
"decorators": [
|
|
23632
23624
|
{
|
|
23633
23625
|
"name": "ViewChild",
|
|
@@ -23646,7 +23638,7 @@
|
|
|
23646
23638
|
"type": "",
|
|
23647
23639
|
"optional": false,
|
|
23648
23640
|
"description": "",
|
|
23649
|
-
"line":
|
|
23641
|
+
"line": 443,
|
|
23650
23642
|
"modifierKind": [
|
|
23651
23643
|
125
|
|
23652
23644
|
]
|
|
@@ -23659,7 +23651,7 @@
|
|
|
23659
23651
|
"type": "",
|
|
23660
23652
|
"optional": false,
|
|
23661
23653
|
"description": "",
|
|
23662
|
-
"line":
|
|
23654
|
+
"line": 452
|
|
23663
23655
|
},
|
|
23664
23656
|
{
|
|
23665
23657
|
"name": "pills",
|
|
@@ -23669,7 +23661,7 @@
|
|
|
23669
23661
|
"type": "[]",
|
|
23670
23662
|
"optional": false,
|
|
23671
23663
|
"description": "<p>Selected items for multi-select combo-boxes.</p>\n",
|
|
23672
|
-
"line":
|
|
23664
|
+
"line": 448,
|
|
23673
23665
|
"rawdescription": "\nSelected items for multi-select combo-boxes.",
|
|
23674
23666
|
"modifierKind": [
|
|
23675
23667
|
125
|
|
@@ -23683,7 +23675,7 @@
|
|
|
23683
23675
|
"type": "string",
|
|
23684
23676
|
"optional": false,
|
|
23685
23677
|
"description": "<p>used to update the displayValue</p>\n",
|
|
23686
|
-
"line":
|
|
23678
|
+
"line": 450,
|
|
23687
23679
|
"rawdescription": "\nused to update the displayValue",
|
|
23688
23680
|
"modifierKind": [
|
|
23689
23681
|
125
|
|
@@ -23697,7 +23689,7 @@
|
|
|
23697
23689
|
"type": "",
|
|
23698
23690
|
"optional": false,
|
|
23699
23691
|
"description": "",
|
|
23700
|
-
"line":
|
|
23692
|
+
"line": 445,
|
|
23701
23693
|
"modifierKind": [
|
|
23702
23694
|
125
|
|
23703
23695
|
]
|
|
@@ -23709,7 +23701,7 @@
|
|
|
23709
23701
|
"type": "AbstractDropdownView",
|
|
23710
23702
|
"optional": false,
|
|
23711
23703
|
"description": "<p>ContentChild reference to the instantiated dropdown list</p>\n",
|
|
23712
|
-
"line":
|
|
23704
|
+
"line": 437,
|
|
23713
23705
|
"rawdescription": "\nContentChild reference to the instantiated dropdown list",
|
|
23714
23706
|
"decorators": [
|
|
23715
23707
|
{
|
|
@@ -23729,7 +23721,7 @@
|
|
|
23729
23721
|
"optional": false,
|
|
23730
23722
|
"returnType": "void",
|
|
23731
23723
|
"typeParameters": [],
|
|
23732
|
-
"line":
|
|
23724
|
+
"line": 845,
|
|
23733
23725
|
"deprecated": false,
|
|
23734
23726
|
"deprecationMessage": "",
|
|
23735
23727
|
"rawdescription": "\n\nCreates the `Dropdown` list as an element that is appended to the DOM body.\n",
|
|
@@ -23741,7 +23733,7 @@
|
|
|
23741
23733
|
"optional": false,
|
|
23742
23734
|
"returnType": "void",
|
|
23743
23735
|
"typeParameters": [],
|
|
23744
|
-
"line":
|
|
23736
|
+
"line": 856,
|
|
23745
23737
|
"deprecated": false,
|
|
23746
23738
|
"deprecationMessage": "",
|
|
23747
23739
|
"rawdescription": "\n\nCreates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n",
|
|
@@ -23760,7 +23752,7 @@
|
|
|
23760
23752
|
"optional": false,
|
|
23761
23753
|
"returnType": "void",
|
|
23762
23754
|
"typeParameters": [],
|
|
23763
|
-
"line":
|
|
23755
|
+
"line": 825,
|
|
23764
23756
|
"deprecated": false,
|
|
23765
23757
|
"deprecationMessage": "",
|
|
23766
23758
|
"rawdescription": "\n\nHandles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n",
|
|
@@ -23783,7 +23775,7 @@
|
|
|
23783
23775
|
"optional": false,
|
|
23784
23776
|
"returnType": "void",
|
|
23785
23777
|
"typeParameters": [],
|
|
23786
|
-
"line":
|
|
23778
|
+
"line": 619,
|
|
23787
23779
|
"deprecated": false,
|
|
23788
23780
|
"deprecationMessage": ""
|
|
23789
23781
|
},
|
|
@@ -23800,7 +23792,7 @@
|
|
|
23800
23792
|
"optional": false,
|
|
23801
23793
|
"returnType": "void",
|
|
23802
23794
|
"typeParameters": [],
|
|
23803
|
-
"line":
|
|
23795
|
+
"line": 885,
|
|
23804
23796
|
"deprecated": false,
|
|
23805
23797
|
"deprecationMessage": "",
|
|
23806
23798
|
"rawdescription": "\n\nHandles clicks outside of the `Dropdown` list.\n",
|
|
@@ -23823,7 +23815,7 @@
|
|
|
23823
23815
|
"optional": false,
|
|
23824
23816
|
"returnType": "any",
|
|
23825
23817
|
"typeParameters": [],
|
|
23826
|
-
"line":
|
|
23818
|
+
"line": 865,
|
|
23827
23819
|
"deprecated": false,
|
|
23828
23820
|
"deprecationMessage": "",
|
|
23829
23821
|
"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",
|
|
@@ -23842,7 +23834,7 @@
|
|
|
23842
23834
|
"optional": false,
|
|
23843
23835
|
"returnType": "void",
|
|
23844
23836
|
"typeParameters": [],
|
|
23845
|
-
"line":
|
|
23837
|
+
"line": 797,
|
|
23846
23838
|
"deprecated": false,
|
|
23847
23839
|
"deprecationMessage": "",
|
|
23848
23840
|
"jsdoctags": [
|
|
@@ -23870,7 +23862,7 @@
|
|
|
23870
23862
|
"optional": false,
|
|
23871
23863
|
"returnType": "void",
|
|
23872
23864
|
"typeParameters": [],
|
|
23873
|
-
"line":
|
|
23865
|
+
"line": 685,
|
|
23874
23866
|
"deprecated": false,
|
|
23875
23867
|
"deprecationMessage": "",
|
|
23876
23868
|
"modifierKind": [
|
|
@@ -23894,7 +23886,7 @@
|
|
|
23894
23886
|
"optional": false,
|
|
23895
23887
|
"returnType": "void",
|
|
23896
23888
|
"typeParameters": [],
|
|
23897
|
-
"line":
|
|
23889
|
+
"line": 705,
|
|
23898
23890
|
"deprecated": false,
|
|
23899
23891
|
"deprecationMessage": "",
|
|
23900
23892
|
"rawdescription": "\n\nCloses the dropdown and emits the close event.\n",
|
|
@@ -23903,6 +23895,34 @@
|
|
|
23903
23895
|
125
|
|
23904
23896
|
]
|
|
23905
23897
|
},
|
|
23898
|
+
{
|
|
23899
|
+
"name": "handleFocus",
|
|
23900
|
+
"args": [
|
|
23901
|
+
{
|
|
23902
|
+
"name": "event",
|
|
23903
|
+
"type": "FocusEvent",
|
|
23904
|
+
"deprecated": false,
|
|
23905
|
+
"deprecationMessage": ""
|
|
23906
|
+
}
|
|
23907
|
+
],
|
|
23908
|
+
"optional": false,
|
|
23909
|
+
"returnType": "void",
|
|
23910
|
+
"typeParameters": [],
|
|
23911
|
+
"line": 894,
|
|
23912
|
+
"deprecated": false,
|
|
23913
|
+
"deprecationMessage": "",
|
|
23914
|
+
"jsdoctags": [
|
|
23915
|
+
{
|
|
23916
|
+
"name": "event",
|
|
23917
|
+
"type": "FocusEvent",
|
|
23918
|
+
"deprecated": false,
|
|
23919
|
+
"deprecationMessage": "",
|
|
23920
|
+
"tagName": {
|
|
23921
|
+
"text": "param"
|
|
23922
|
+
}
|
|
23923
|
+
}
|
|
23924
|
+
]
|
|
23925
|
+
},
|
|
23906
23926
|
{
|
|
23907
23927
|
"name": "hostkeys",
|
|
23908
23928
|
"args": [
|
|
@@ -23916,7 +23936,7 @@
|
|
|
23916
23936
|
"optional": false,
|
|
23917
23937
|
"returnType": "void",
|
|
23918
23938
|
"typeParameters": [],
|
|
23919
|
-
"line":
|
|
23939
|
+
"line": 594,
|
|
23920
23940
|
"deprecated": false,
|
|
23921
23941
|
"deprecationMessage": "",
|
|
23922
23942
|
"rawdescription": "\n\nHandles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n",
|
|
@@ -23955,7 +23975,7 @@
|
|
|
23955
23975
|
"optional": false,
|
|
23956
23976
|
"returnType": "boolean",
|
|
23957
23977
|
"typeParameters": [],
|
|
23958
|
-
"line":
|
|
23978
|
+
"line": 818,
|
|
23959
23979
|
"deprecated": false,
|
|
23960
23980
|
"deprecationMessage": "",
|
|
23961
23981
|
"modifierKind": [
|
|
@@ -23979,7 +23999,7 @@
|
|
|
23979
23999
|
"optional": false,
|
|
23980
24000
|
"returnType": "void",
|
|
23981
24001
|
"typeParameters": [],
|
|
23982
|
-
"line":
|
|
24002
|
+
"line": 656,
|
|
23983
24003
|
"deprecated": false,
|
|
23984
24004
|
"deprecationMessage": ""
|
|
23985
24005
|
},
|
|
@@ -24003,7 +24023,7 @@
|
|
|
24003
24023
|
"optional": false,
|
|
24004
24024
|
"returnType": "void",
|
|
24005
24025
|
"typeParameters": [],
|
|
24006
|
-
"line":
|
|
24026
|
+
"line": 753,
|
|
24007
24027
|
"deprecated": false,
|
|
24008
24028
|
"deprecationMessage": "",
|
|
24009
24029
|
"rawdescription": "\n\nSets the list group filter, and manages single select item selection.\n",
|
|
@@ -24046,7 +24066,7 @@
|
|
|
24046
24066
|
"optional": false,
|
|
24047
24067
|
"returnType": "void",
|
|
24048
24068
|
"typeParameters": [],
|
|
24049
|
-
"line":
|
|
24069
|
+
"line": 786,
|
|
24050
24070
|
"deprecated": false,
|
|
24051
24071
|
"deprecationMessage": "",
|
|
24052
24072
|
"rawdescription": "\n\nIntended to be used to add items to the list.\n",
|
|
@@ -24072,7 +24092,7 @@
|
|
|
24072
24092
|
"optional": false,
|
|
24073
24093
|
"returnType": "void",
|
|
24074
24094
|
"typeParameters": [],
|
|
24075
|
-
"line":
|
|
24095
|
+
"line": 719,
|
|
24076
24096
|
"deprecated": false,
|
|
24077
24097
|
"deprecationMessage": "",
|
|
24078
24098
|
"rawdescription": "\n\nOpens the dropdown.\n",
|
|
@@ -24094,7 +24114,7 @@
|
|
|
24094
24114
|
"optional": false,
|
|
24095
24115
|
"returnType": "void",
|
|
24096
24116
|
"typeParameters": [],
|
|
24097
|
-
"line":
|
|
24117
|
+
"line": 660,
|
|
24098
24118
|
"deprecated": false,
|
|
24099
24119
|
"deprecationMessage": "",
|
|
24100
24120
|
"jsdoctags": [
|
|
@@ -24122,7 +24142,7 @@
|
|
|
24122
24142
|
"optional": false,
|
|
24123
24143
|
"returnType": "void",
|
|
24124
24144
|
"typeParameters": [],
|
|
24125
|
-
"line":
|
|
24145
|
+
"line": 664,
|
|
24126
24146
|
"deprecated": false,
|
|
24127
24147
|
"deprecationMessage": "",
|
|
24128
24148
|
"jsdoctags": [
|
|
@@ -24150,7 +24170,7 @@
|
|
|
24150
24170
|
"optional": false,
|
|
24151
24171
|
"returnType": "void",
|
|
24152
24172
|
"typeParameters": [],
|
|
24153
|
-
"line":
|
|
24173
|
+
"line": 673,
|
|
24154
24174
|
"deprecated": false,
|
|
24155
24175
|
"deprecationMessage": "",
|
|
24156
24176
|
"rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the combobox.\n\nex: `this.formGroup.get(\"myCoolCombobox\").disable();`\n",
|
|
@@ -24173,7 +24193,7 @@
|
|
|
24173
24193
|
"optional": false,
|
|
24174
24194
|
"returnType": "void",
|
|
24175
24195
|
"typeParameters": [],
|
|
24176
|
-
"line":
|
|
24196
|
+
"line": 742,
|
|
24177
24197
|
"deprecated": false,
|
|
24178
24198
|
"deprecationMessage": "",
|
|
24179
24199
|
"rawdescription": "\n\nToggles the dropdown.\n",
|
|
@@ -24188,7 +24208,7 @@
|
|
|
24188
24208
|
"optional": false,
|
|
24189
24209
|
"returnType": "void",
|
|
24190
24210
|
"typeParameters": [],
|
|
24191
|
-
"line":
|
|
24211
|
+
"line": 680,
|
|
24192
24212
|
"deprecated": false,
|
|
24193
24213
|
"deprecationMessage": "",
|
|
24194
24214
|
"rawdescription": "\n\nCalled by `n-pill-input` when the selected pills have changed.\n",
|
|
@@ -24210,7 +24230,7 @@
|
|
|
24210
24230
|
"optional": false,
|
|
24211
24231
|
"returnType": "void",
|
|
24212
24232
|
"typeParameters": [],
|
|
24213
|
-
"line":
|
|
24233
|
+
"line": 624,
|
|
24214
24234
|
"deprecated": false,
|
|
24215
24235
|
"deprecationMessage": "",
|
|
24216
24236
|
"jsdoctags": [
|
|
@@ -24234,18 +24254,9 @@
|
|
|
24234
24254
|
"defaultValue": "true",
|
|
24235
24255
|
"deprecated": false,
|
|
24236
24256
|
"deprecationMessage": "",
|
|
24237
|
-
"line":
|
|
24257
|
+
"line": 441,
|
|
24238
24258
|
"type": "boolean",
|
|
24239
24259
|
"decorators": []
|
|
24240
|
-
},
|
|
24241
|
-
{
|
|
24242
|
-
"name": "style.display",
|
|
24243
|
-
"defaultValue": "\"block\"",
|
|
24244
|
-
"deprecated": false,
|
|
24245
|
-
"deprecationMessage": "",
|
|
24246
|
-
"line": 429,
|
|
24247
|
-
"type": "string",
|
|
24248
|
-
"decorators": []
|
|
24249
24260
|
}
|
|
24250
24261
|
],
|
|
24251
24262
|
"hostListeners": [
|
|
@@ -24266,7 +24277,7 @@
|
|
|
24266
24277
|
"deprecationMessage": "",
|
|
24267
24278
|
"rawdescription": "\n\nHandles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n",
|
|
24268
24279
|
"description": "<p>Handles <code>Escape/Tab</code> key closing the dropdown, and arrow up/down focus to/from the dropdown list.</p>\n",
|
|
24269
|
-
"line":
|
|
24280
|
+
"line": 594
|
|
24270
24281
|
}
|
|
24271
24282
|
],
|
|
24272
24283
|
"standalone": false,
|
|
@@ -24274,7 +24285,7 @@
|
|
|
24274
24285
|
"description": "<p>Get started with importing the module:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { ComboBoxModule } from 'carbon-components-angular';</code></pre></div><p>ComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\nMulti-select comboboxes also provide "pills" of selected items.</p>\n<p><a href=\"../../?path=/story/components-combobox--basic\">See demo</a></p>\n",
|
|
24275
24286
|
"rawdescription": "\n\nGet started with importing the module:\n\n```typescript\nimport { ComboBoxModule } from 'carbon-components-angular';\n```\n\nComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\nMulti-select comboboxes also provide \"pills\" of selected items.\n\n[See demo](../../?path=/story/components-combobox--basic)\n",
|
|
24276
24287
|
"type": "component",
|
|
24277
|
-
"sourceCode": "import {\n\tComponent,\n\tOnChanges,\n\tContentChild,\n\tInput,\n\tOutput,\n\tHostListener,\n\tElementRef,\n\tViewChild,\n\tEventEmitter,\n\tAfterViewInit,\n\tAfterContentInit,\n\tHostBinding,\n\tTemplateRef,\n\tOnDestroy\n} from \"@angular/core\";\nimport { AbstractDropdownView, DropdownService } from \"carbon-components-angular/dropdown\";\nimport { ListItem } from \"carbon-components-angular/dropdown\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { filter } from \"rxjs/operators\";\nimport {\n\tgetScrollableParents,\n\thasScrollableParents\n} from \"carbon-components-angular/utils\";\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { ComboBoxModule } from 'carbon-components-angular';\n * ```\n *\n * ComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\n * Multi-select comboboxes also provide \"pills\" of selected items.\n *\n * [See demo](../../?path=/story/components-combobox--basic)\n */\n@Component({\n\tselector: \"cds-combo-box, ibm-combo-box\",\n\ttemplate: `\n\t\t<div class=\"cds--list-box__wrapper\">\n\t\t\t<label\n\t\t\t\t*ngIf=\"label\"\n\t\t\t\t[for]=\"id\"\n\t\t\t\t[id]=\"labelId\"\n\t\t\t\tclass=\"cds--label\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--label--disabled': disabled,\n\t\t\t\t\t'cds--visually-hidden': hideLabel\n\t\t\t\t}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t</label>\n\t\t\t<div\n\t\t\t\t#listbox\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--multi-select cds--multi-select--filterable': type === 'multi',\n\t\t\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t\t\t'cds--list-box--expanded': open,\n\t\t\t\t\t'cds--list-box--sm': size === 'sm',\n\t\t\t\t\t'cds--list-box--md': size === 'md',\n\t\t\t\t\t'cds--list-box--lg': size === 'lg',\n\t\t\t\t\t'cds--list-box--disabled': disabled,\n\t\t\t\t\t'cds--combo-box--readonly': readonly,\n\t\t\t\t\t'cds--combo-box--warning cds--list-box--warning': warn\n\t\t\t\t}\"\n\t\t\t\tclass=\"cds--list-box cds--combo-box\"\n\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--list-box__field\"\n\t\t\t\t\t(click)=\"toggleDropdown()\"\n\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"type === 'multi' && pills.length > 0\"\n\t\t\t\t\t\tclass=\"cds--tag cds--tag--filter cds--tag--high-contrast\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--tag--disabled': disabled || readonly}\">\n\t\t\t\t\t\t<span class=\"cds--tag__label\">{{ pills.length }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t(click)=\"clearSelected($event)\"\n\t\t\t\t\t\t\t(blur)=\"onBlur()\"\n\t\t\t\t\t\t\t(keydown.enter)=\"clearSelected($event)\"\n\t\t\t\t\t\t\tclass=\"cds--tag__close-icon\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\t[title]=\"clearSelectionsTitle\"\n\t\t\t\t\t\t\t[disabled]=\"disabled || readonly\"\n\t\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[readOnly]=\"readonly\"\n\t\t\t\t\t\t(input)=\"onSearch($event.target.value)\"\n\t\t\t\t\t\t(blur)=\"onBlur()\"\n\t\t\t\t\t\t(keydown.enter)=\"onSubmit($event)\"\n\t\t\t\t\t\t[value]=\"selectedValue\"\n\t\t\t\t\t\tclass=\"cds--text-input\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--text-input--empty': !showClearButton}\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[id]=\"id\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"labelId\"\n\t\t\t\t\t\t[attr.aria-expanded]=\"open\"\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\t[attr.maxlength]=\"maxLength\"\n\t\t\t\t\t\t[attr.aria-controls]=\"open ? view?.listId : null\"\n\t\t\t\t\t\t[attr.aria-autocomplete]=\"autocomplete\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"/>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"showClearButton\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__selection\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\"\n\t\t\t\t\t\t[title]=\"clearSelectionTitle\"\n\t\t\t\t\t\t(keyup.enter)=\"clearInput($event)\"\n\t\t\t\t\t\t(click)=\"clearInput($event)\"\n\t\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t\t<svg cdsIcon=\"close\" size=\"16\"></svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__menu-icon\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t[title]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[attr.aria-label]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': open}\">\n\t\t\t\t\t\t<svg cdsIcon=\"chevron--down\" size=\"16\"></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\t#dropdownMenu\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t\t\t}\">\n\t\t\t\t\t<ng-content *ngIf=\"open\"></ng-content>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t*ngIf=\"helperText && !invalid && !warn\"\n\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboBox,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnDestroy {\n\t/**\n\t * Text to show when nothing is selected.\n\t */\n\t@Input() set placeholder(value: string | Observable<string>) {\n\t\tthis._placeholder.override(value);\n\t}\n\n\tget placeholder() {\n\t\treturn this._placeholder.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when closed\n\t */\n\t@Input() set openMenuAria(value: string | Observable<string>) {\n\t\tthis._openMenuAria.override(value);\n\t}\n\n\tget openMenuAria() {\n\t\treturn this._openMenuAria.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when opened\n\t */\n\t@Input() set closeMenuAria(value: string | Observable<string>) {\n\t\tthis._closeMenuAria.override(value);\n\t}\n\n\tget closeMenuAria() {\n\t\treturn this._closeMenuAria.value;\n\t}\n\t/**\n\t * Value to display on the clear selections icon, when multi is selected\n\t */\n\t@Input() set clearSelectionsTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionsTitle.override(value);\n\t}\n\n\tget clearSelectionsTitle() {\n\t\treturn this._clearSelectionsTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes to clear selections, when multi is selected\n\t */\n\t@Input() set clearSelectionsAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionsAria.override(value);\n\t}\n\n\tget clearSelectionsAria() {\n\t\treturn this._clearSelectionsAria.value;\n\t}\n\t/**\n\t * Value to display on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionTitle.override(value);\n\t}\n\n\tget clearSelectionTitle() {\n\t\treturn this._clearSelectionTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionAria.override(value);\n\t}\n\n\tget clearSelectionAria() {\n\t\treturn this._clearSelectionAria.value;\n\t}\n\tstatic comboBoxCount = 0;\n\t@Input() id = `combobox-${ComboBox.comboBoxCount++}`;\n\t@Input() labelId = `combobox-label-${ComboBox.comboBoxCount++}`;\n\t/**\n\t * List of items to fill the content with.\n\t *\n\t * **Example:**\n\t * ```javascript\n\t * items = [\n\t *\t\t{\n\t *\t\t\tcontent: \"Abacus\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Byte\",\n\t *\t\t\tselected: false,\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Computer\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Digital\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t * ];\n\t * ```\n\t *\n\t */\n\t@Input() items: Array<ListItem> = [];\n\t/**\n\t * Combo box type (supporting single or multi selection of items).\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * Combo box render size.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() itemValueKey: string;\n\t/**\n\t * Label for the combobox.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Hide label while keeping it accessible for screen readers\n\t */\n\t@Input() hideLabel = false;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline: boolean = null;\n\t/**\n\t * Set to `true` to show the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if combobox is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t* Set to `true` to show a warning (contents set by warnText)\n\t*/\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\t/**\n\t * Max length value to limit input characters\n\t */\n\t@Input() maxLength: number = null;\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Specify feedback (mode) of the selection.\n\t * `top`: selected item jumps to top\n\t * `fixed`: selected item stays at its position\n\t * `top-after-reopen`: selected item jump to top after reopen dropdown\n\t */\n\t@Input() selectionFeedback: \"top\" | \"fixed\" | \"top-after-reopen\" = \"top-after-reopen\";\n\t/**\n\t * Specify aria-autocomplete attribute of text input.\n\t * \"list\", is the expected value for a combobox that invokes a drop-down list\n\t */\n\t@Input() autocomplete = \"list\";\n\t/**\n\t * Overrides the automatic dropUp.\n\t */\n\t@Input() dropUp: boolean;\n\t/**\n\t * Set to `true` to disable combobox.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for readonly state.\n\t */\n\t@Input() readonly = false;\n\t/**\n\t * Emits a ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t * \t\tcontent: \"one\",\n\t * \t\tselected: true\n\t * }\n\t * ```\n\t */\n\t@Output() selected = new EventEmitter<ListItem | ListItem[]>();\n\t/**\n\t * Intended to be used to add items to the list.\n\t *\n\t * Emits an event that includes the current item list, the suggested index for the new item, and a simple ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t *\t{\n\t *\t\titems: [{content: \"one\", selected: true}, {content: \"two\", selected: true}],\n\t *\t\tindex: 1,\n\t *\t\tvalue: {\n\t *\t\t\tcontent: \"some user string\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t *\t}\n\t * ```\n\t *\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t *\tafter: 1,\n\t *\tvalue: \"some user string\"\n\t * }\n\t * ```\n\t */\n\t@Output() submit = new EventEmitter<{\n\t\titems: ListItem[],\n\t\tindex: number,\n\t\tvalue: {\n\t\t\tcontent: string,\n\t\t\tselected: boolean\n\t\t}\n\t}>();\n\t/** Emits an empty event when the menu is closed */\n\t@Output() close = new EventEmitter<void>();\n\t/** Emits the search string from the input */\n\t@Output() search = new EventEmitter<string>();\n\t/** Emits an event when the clear button is clicked. */\n\t@Output() clear = new EventEmitter<Event>();\n\t/** ContentChild reference to the instantiated dropdown list */\n\t@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;\n\t@ViewChild(\"dropdownMenu\") dropdownMenu;\n\t@ViewChild(\"input\", { static: true }) input: ElementRef;\n\t@ViewChild(\"listbox\", { static: true }) listbox: ElementRef;\n\t@HostBinding(\"class.cds--list-box__wrapper\") hostClass = true;\n\t@HostBinding(\"style.display\") display = \"block\";\n\n\tpublic open = false;\n\n\tpublic showClearButton = false;\n\n\t/** Selected items for multi-select combo-boxes. */\n\tpublic pills = [];\n\t/** used to update the displayValue */\n\tpublic selectedValue = \"\";\n\n\toutsideClick = this._outsideClick.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\t/**\n\t * controls whether the `drop-up` class is applied\n\t */\n\t_dropUp = false;\n\n\tprotected noop = this._noop.bind(this);\n\tprotected onTouchedCallback: () => void = this._noop;\n\tprotected propagateChangeCallback: (_: any) => void = this._noop;\n\n\tprotected _placeholder = this.i18n.getOverridable(\"COMBOBOX.PLACEHOLDER\");\n\tprotected _closeMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLOSE_MENU\");\n\tprotected _openMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.OPEN_MENU\");\n\tprotected _clearSelectionsTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionsAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTED\");\n\tprotected _clearSelectionAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTED\");\n\n\t/**\n\t * Creates an instance of ComboBox.\n\t */\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected dropdownService: DropdownService,\n\t\tprotected i18n: I18n\n\t) {}\n\n\t/**\n\t * Lifecycle hook.\n\t * Updates pills if necessary.\n\t *\n\t */\n\tngOnChanges(changes) {\n\t\tif (changes.items) {\n\t\t\tthis.view.items = changes.items.currentValue;\n\t\t\tthis.updateSelected();\n\t\t\t// If new items are added into the combobox while there is search input,\n\t\t\t// repeat the search. Search should only trigger for type 'single' when there is no value selected.\n\t\t\tif (this.type === \"multi\" || (this.type === \"single\" && !this.selectedValue)) {\n\t\t\t\tthis.onSearch(this.input.nativeElement.value, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets initial state that depends on child components\n\t * Subscribes to select events and handles focus/filtering/initial list updates\n\t */\n\tngAfterContentInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\n\t\t\t// function to check if the event is organic (isUpdate === false) or programmatic\n\t\t\tconst isUpdate = event => event && event.isUpdate;\n\n\t\t\tthis.view.select.subscribe(event => {\n\t\t\t\tif (Array.isArray(event)) {\n\t\t\t\t\tthis.updatePills();\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tif (this.itemValueKey && this.view.getSelected()) {\n\t\t\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.itemValueKey]);\n\t\t\t\t\t\t\tthis.propagateChangeCallback(values);\n\t\t\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.propagateChangeCallback(this.view.getSelected());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.selected.emit(event);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If type is single, dropdown list will emit an object\n\t\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\t\tthis.showClearButton = true;\n\t\t\t\t\t\tthis.selectedValue = event.item.content;\n\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t\t\t\tthis.propagateChangeCallback(event.item[this.itemValueKey]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.propagateChangeCallback(event.item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.selectedValue = \"\";\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tthis.propagateChangeCallback(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// not guarding these since the nativeElement has to be loaded\n\t\t\t\t\t// for select to even fire\n\t\t\t\t\t// only focus for \"organic\" selections\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tthis.elementRef.nativeElement.querySelector(\"input\").focus();\n\t\t\t\t\t\tthis.view.filterBy(\"\");\n\t\t\t\t\t\tthis.selected.emit(event.item);\n\t\t\t\t\t}\n\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t}\n\t\t\t});\n\t\t\t// update the rest of combobox with any pre-selected items\n\t\t\t// setTimeout just defers the call to the next check cycle\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.updateSelected();\n\t\t\t});\n\n\t\t\tthis.view.blurIntent.pipe(filter(v => v === \"top\")).subscribe(() => {\n\t\t\t\tthis.elementRef.nativeElement.querySelector(\".cds--text-input\").focus();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Binds event handlers against the rendered view\n\t */\n\tngAfterViewInit() {\n\t\t// if appendInline is default valued (null) we should:\n\t\t// 1. if there are scrollable parents (not including body) don't append inline\n\t\t// this should also cover the case where the dropdown is in a modal\n\t\t// (where we _do_ want to append to the placeholder)\n\t\tif (this.appendInline === null && hasScrollableParents(this.elementRef.nativeElement)) {\n\t\t\tthis.appendInline = false;\n\t\t// 2. otherwise we should append inline\n\t\t} else if (this.appendInline === null) {\n\t\t\tthis.appendInline = true;\n\t\t}\n\t}\n\n\t/**\n\t * Removing the `Dropdown` from the body if it is appended to the body.\n\t */\n\tngOnDestroy() {\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Handles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\thostkeys(ev: KeyboardEvent) {\n\t\tif (ev.key === \"Escape\") {\n\t\t\tthis.closeDropdown();\n\t\t} else if ((ev.key === \"ArrowDown\")\n\t\t\t&& (!this.dropdownMenu || !this.dropdownMenu.nativeElement.contains(ev.target))) {\n\t\t\tev.preventDefault();\n\t\t\tthis.openDropdown();\n\t\t\tsetTimeout(() => { this.view.initFocus(); }, 0);\n\t\t}\n\n\t\tif (\n\t\t\tthis.open && ev.key === \"Tab\" &&\n\t\t\t(this.dropdownMenu.nativeElement.contains(ev.target as Node) || ev.target === this.input.nativeElement)\n\t\t) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tif (this.open && ev.key === \"Tab\" && ev.shiftKey) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/*\n\t * no-op method for null event listeners, and other no op calls\n\t */\n\t_noop() {}\n\n\t/*\n\t * propagates the value provided from ngModel\n\t */\n\twriteValue(value: any) {\n\t\tif (this.type === \"single\") {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the specified item and update its state\n\t\t\t\tconst newValue = Object.assign({}, this.view.getListItems().find(item => item[this.itemValueKey] === value));\n\t\t\t\tnewValue.selected = true;\n\t\t\t\tthis.view.propagateSelected([newValue]);\n\t\t\t} else {\n\t\t\t\t// all items in propagateSelected must be iterable\n\t\t\t\tthis.view.propagateSelected([value || \"\"]);\n\t\t\t}\n\t\t\tthis.showClearButton = !!(value && this.view.getSelected().length);\n\t\t} else {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the items and update their state based on the received value array\n\t\t\t\t// this way we don't lose any additional metadata that may be passed in via the `items` Input\n\t\t\t\tlet newValues = [];\n\t\t\t\tfor (const v of value) {\n\t\t\t\t\tfor (const item of this.view.getListItems()) {\n\t\t\t\t\t\tif (item[this.itemValueKey] === v) {\n\t\t\t\t\t\t\tnewValues.push(Object.assign({}, item, { selected: true }));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.view.propagateSelected(newValues);\n\t\t\t} else {\n\t\t\t\tthis.view.propagateSelected(value ? value : [\"\"]);\n\t\t\t}\n\t\t}\n\t\tthis.updateSelected();\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChangeCallback = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the combobox.\n\t *\n\t * ex: `this.formGroup.get(\"myCoolCombobox\").disable();`\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Called by `n-pill-input` when the selected pills have changed.\n\t */\n\tpublic updatePills() {\n\t\tthis.pills = this.view.getSelected() || [];\n\t\tthis.checkForReorder();\n\t}\n\n\tpublic clearSelected(event) {\n\t\tthis.items = this.items.map(item => {\n\t\t\tif (!item.disabled) {\n\t\t\t\titem.selected = false;\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t\tthis.view.items = this.items;\n\t\tthis.updatePills();\n\t\t// clearSelected can only fire on type=multi\n\t\t// so we just emit getSelected() (just in case there's any disabled but selected items)\n\t\tconst selected = this.view.getSelected();\n\t\tthis.propagateChangeCallback(selected);\n\t\tthis.selected.emit(selected as any);\n\t\tthis.clear.emit(event);\n\t}\n\n\t/**\n\t * Closes the dropdown and emits the close event.\n\t */\n\tpublic closeDropdown() {\n\t\tthis.open = false;\n\t\tthis.checkForReorder();\n\t\tthis.close.emit();\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t}\n\n\t/**\n\t * Opens the dropdown.\n\t */\n\tpublic openDropdown() {\n\t\tif (this.disabled || this.readonly) { return; }\n\t\tthis.open = true;\n\t\tthis._dropUp = false;\n\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\n\t\t// set the dropdown menu to drop up if it is near the bottom of the screen\n\t\t// setTimeout lets us do the calculations after it is visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tif (this.dropUp === null || this.dropUp === undefined) {\n\t\t\t\tthis._dropUp = this._shouldDropUp();\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\t/**\n\t * Toggles the dropdown.\n\t */\n\tpublic toggleDropdown() {\n\t\tif (this.open) {\n\t\t\tthis.closeDropdown();\n\t\t} else {\n\t\t\tthis.openDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the list group filter, and manages single select item selection.\n\t */\n\tpublic onSearch(searchString, shouldEmitSearch = true) {\n\t\tif (shouldEmitSearch) {\n\t\t\tthis.search.emit(searchString);\n\t\t}\n\t\tthis.showClearButton = !!searchString;\n\t\tthis.view.filterBy(searchString);\n\t\tif (searchString !== \"\") {\n\t\t\tif (!this.open) {\n\t\t\t\tthis.openDropdown();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.selectedValue = \"\";\n\t\t\tif (this.type === \"multi\" &&\n\t\t\t\t(this.selectionFeedback === \"top\" || this.selectionFeedback === \"top-after-reopen\")) {\n\t\t\t\tthis.view.reorderSelected();\n\t\t\t}\n\t\t}\n\t\tif (this.type === \"single\") {\n\t\t\t// deselect if the input doesn't match the content\n\t\t\t// of any given item\n\t\t\tconst matches = this.view.getListItems().some(item => item.content.toLowerCase().includes(searchString.toLowerCase()));\n\t\t\tif (!matches) {\n\t\t\t\tconst selected = this.view.getSelected();\n\t\t\t\tif (!selected || !selected[0]) {\n\t\t\t\t\tthis.view.filterBy(searchString);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Intended to be used to add items to the list.\n\t */\n\tpublic onSubmit(event: KeyboardEvent) {\n\t\tthis.submit.emit({\n\t\t\titems: this.view.getListItems(),\n\t\t\tindex: 0,\n\t\t\tvalue: {\n\t\t\t\tcontent: (event.target as HTMLInputElement).value,\n\t\t\t\tselected: false\n\t\t\t}\n\t\t});\n\t}\n\n\tclearInput(event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\n\t\tif (this.disabled || this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === \"single\") { // don't want to clear selected or close if multi\n\t\t\tthis.clearSelected(event);\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tthis.selectedValue = \"\";\n\t\tthis.input.nativeElement.value = \"\";\n\n\t\tthis.showClearButton = false;\n\t\tthis.input.nativeElement.focus();\n\t\tthis.onSearch(this.input.nativeElement.value);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\tif ((event.key === \"Escape\") && this.open) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeDropdown();\n\t\t\tthis.input.nativeElement.focus();\n\t\t} else if (this.open && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.input.nativeElement.focus();\n\t\t\tthis.input.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", { bubbles: true, cancelable: true, key: \"Tab\" }));\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.listbox.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\t`${this.elementRef.nativeElement.className}${this.open ? \" cds--list-box--expanded\" : \"\"}`);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Detects whether or not the `Dropdown` list is visible within all scrollable parents.\n\t * This can be overridden by passing in a value to the `dropUp` input.\n\t */\n\t_shouldDropUp() {\n\t\t// check if dropdownMenu exists first.\n\t\tconst menu = this.dropdownMenu && this.dropdownMenu.nativeElement.querySelector(\".cds--list-box__menu\");\n\t\t// check if menu exists first.\n\t\tconst menuRect = menu && menu.getBoundingClientRect();\n\t\tif (menu && menuRect) {\n\t\t\tconst scrollableParents = getScrollableParents(menu);\n\t\t\treturn scrollableParents.reduce((shouldDropUp: boolean, parent: HTMLElement) => {\n\t\t\t\tconst parentRect = parent.getBoundingClientRect();\n\t\t\t\tconst isBelowParent = !(menuRect.bottom <= parentRect.bottom);\n\t\t\t\treturn shouldDropUp || isBelowParent;\n\t\t\t}, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Handles clicks outside of the `Dropdown` list.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\tprotected updateSelected() {\n\t\tconst selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\tthis.updatePills();\n\t\t} else if (selected) {\n\t\t\tconst value = selected[0] ? selected[0].content : \"\";\n\t\t\tconst changeCallbackValue = selected[0] ? selected[0] : \"\";\n\t\t\tthis.selectedValue = value;\n\t\t\tthis.showClearButton = !!value;\n\t\t}\n\t}\n\n\tprotected checkForReorder() {\n\t\tconst topAfterReopen = !this.open && this.selectionFeedback === \"top-after-reopen\";\n\t\tif ((this.type === \"multi\") && (topAfterReopen || this.selectionFeedback === \"top\")) {\n\t\t\tthis.view.reorderSelected(true);\n\t\t}\n\t}\n}\n",
|
|
24288
|
+
"sourceCode": "import {\n\tComponent,\n\tOnChanges,\n\tContentChild,\n\tInput,\n\tOutput,\n\tHostListener,\n\tElementRef,\n\tViewChild,\n\tEventEmitter,\n\tAfterViewInit,\n\tAfterContentInit,\n\tHostBinding,\n\tTemplateRef,\n\tOnDestroy\n} from \"@angular/core\";\nimport { AbstractDropdownView, DropdownService } from \"carbon-components-angular/dropdown\";\nimport { ListItem } from \"carbon-components-angular/dropdown\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { filter } from \"rxjs/operators\";\nimport {\n\tgetScrollableParents,\n\thasScrollableParents\n} from \"carbon-components-angular/utils\";\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { ComboBoxModule } from 'carbon-components-angular';\n * ```\n *\n * ComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.\n * Multi-select comboboxes also provide \"pills\" of selected items.\n *\n * [See demo](../../?path=/story/components-combobox--basic)\n */\n@Component({\n\tselector: \"cds-combo-box, ibm-combo-box\",\n\ttemplate: `\n\t\t<div\n\t\t\tclass=\"cds--list-box__wrapper\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--list-box__wrapper--fluid': fluid,\n\t\t\t\t'cds--list-box__wrapper--fluid--invalid': fluid && invalid,\n\t\t\t\t'cds--list-box__wrapper--fluid--focus': fluid && _isFocused\n\t\t\t}\">\n\t\t\t<label\n\t\t\t\t*ngIf=\"label\"\n\t\t\t\t[for]=\"id\"\n\t\t\t\t[id]=\"labelId\"\n\t\t\t\tclass=\"cds--label\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--label--disabled': disabled,\n\t\t\t\t\t'cds--visually-hidden': hideLabel\n\t\t\t\t}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t</label>\n\t\t\t<div\n\t\t\t\t#listbox\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--multi-select cds--multi-select--filterable': type === 'multi',\n\t\t\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t\t\t'cds--list-box--expanded': open,\n\t\t\t\t\t'cds--list-box--sm': size === 'sm',\n\t\t\t\t\t'cds--list-box--md': size === 'md',\n\t\t\t\t\t'cds--list-box--lg': size === 'lg',\n\t\t\t\t\t'cds--list-box--disabled': disabled,\n\t\t\t\t\t'cds--combo-box--readonly': readonly,\n\t\t\t\t\t'cds--combo-box--warning cds--list-box--warning': warn,\n\t\t\t\t\t'cds--list-box--invalid': invalid\n\t\t\t\t}\"\n\t\t\t\tclass=\"cds--list-box cds--combo-box\"\n\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--list-box__field\"\n\t\t\t\t\t(click)=\"toggleDropdown()\"\n\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"type === 'multi' && pills.length > 0\"\n\t\t\t\t\t\tclass=\"cds--tag cds--tag--filter cds--tag--high-contrast\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--tag--disabled': disabled || readonly}\">\n\t\t\t\t\t\t<span class=\"cds--tag__label\">{{ pills.length }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t(click)=\"clearSelected($event)\"\n\t\t\t\t\t\t\t(blur)=\"onBlur()\"\n\t\t\t\t\t\t\t(keydown.enter)=\"clearSelected($event)\"\n\t\t\t\t\t\t\tclass=\"cds--tag__close-icon\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\t[title]=\"clearSelectionsTitle\"\n\t\t\t\t\t\t\t[disabled]=\"disabled || readonly\"\n\t\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\">\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[readOnly]=\"readonly\"\n\t\t\t\t\t\t(input)=\"onSearch($event.target.value)\"\n\t\t\t\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t\t\t\t(blur)=\"fluid ? handleFocus($event) : onBlur()\"\n\t\t\t\t\t\t(keydown.enter)=\"onSubmit($event)\"\n\t\t\t\t\t\t[value]=\"selectedValue\"\n\t\t\t\t\t\tclass=\"cds--text-input\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--text-input--empty': !showClearButton}\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[id]=\"id\"\n\t\t\t\t\t\t[attr.aria-labelledby]=\"labelId\"\n\t\t\t\t\t\t[attr.aria-expanded]=\"open\"\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\t[attr.maxlength]=\"maxLength\"\n\t\t\t\t\t\t[attr.aria-controls]=\"open ? view?.listId : null\"\n\t\t\t\t\t\t[attr.aria-autocomplete]=\"autocomplete\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"/>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t\t\t\t</svg>\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"showClearButton\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__selection\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[attr.aria-label]=\"clearSelectionAria\"\n\t\t\t\t\t\t[title]=\"clearSelectionTitle\"\n\t\t\t\t\t\t(keyup.enter)=\"clearInput($event)\"\n\t\t\t\t\t\t(click)=\"clearInput($event)\"\n\t\t\t\t\t\t(blur)=\"onBlur()\">\n\t\t\t\t\t\t<svg cdsIcon=\"close\" size=\"16\"></svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tclass=\"cds--list-box__menu-icon\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t[title]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[attr.aria-label]=\"open ? closeMenuAria : openMenuAria\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': open}\">\n\t\t\t\t\t\t<svg cdsIcon=\"chevron--down\" size=\"16\"></svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\t#dropdownMenu\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t\t\t}\">\n\t\t\t\t\t<ng-content *ngIf=\"open\"></ng-content>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n\t\t\t<div\n\t\t\t\t*ngIf=\"helperText && !invalid && !warn && !fluid\"\n\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: ComboBox,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnDestroy {\n\t/**\n\t * Text to show when nothing is selected.\n\t */\n\t@Input() set placeholder(value: string | Observable<string>) {\n\t\tthis._placeholder.override(value);\n\t}\n\n\tget placeholder() {\n\t\treturn this._placeholder.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when closed\n\t */\n\t@Input() set openMenuAria(value: string | Observable<string>) {\n\t\tthis._openMenuAria.override(value);\n\t}\n\n\tget openMenuAria() {\n\t\treturn this._openMenuAria.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the combobox control menu when opened\n\t */\n\t@Input() set closeMenuAria(value: string | Observable<string>) {\n\t\tthis._closeMenuAria.override(value);\n\t}\n\n\tget closeMenuAria() {\n\t\treturn this._closeMenuAria.value;\n\t}\n\t/**\n\t * Value to display on the clear selections icon, when multi is selected\n\t */\n\t@Input() set clearSelectionsTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionsTitle.override(value);\n\t}\n\n\tget clearSelectionsTitle() {\n\t\treturn this._clearSelectionsTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes to clear selections, when multi is selected\n\t */\n\t@Input() set clearSelectionsAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionsAria.override(value);\n\t}\n\n\tget clearSelectionsAria() {\n\t\treturn this._clearSelectionsAria.value;\n\t}\n\t/**\n\t * Value to display on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionTitle(value: string | Observable<string>) {\n\t\tthis._clearSelectionTitle.override(value);\n\t}\n\n\tget clearSelectionTitle() {\n\t\treturn this._clearSelectionTitle.value;\n\t}\n\t/**\n\t * Value to display for accessibility purposes on the clear the selected item icon, when single is selected\n\t */\n\t@Input() set clearSelectionAria(value: string | Observable<string>) {\n\t\tthis._clearSelectionAria.override(value);\n\t}\n\n\tget clearSelectionAria() {\n\t\treturn this._clearSelectionAria.value;\n\t}\n\tstatic comboBoxCount = 0;\n\t@Input() id = `combobox-${ComboBox.comboBoxCount++}`;\n\t@Input() labelId = `combobox-label-${ComboBox.comboBoxCount++}`;\n\t/**\n\t * List of items to fill the content with.\n\t *\n\t * **Example:**\n\t * ```javascript\n\t * items = [\n\t *\t\t{\n\t *\t\t\tcontent: \"Abacus\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Byte\",\n\t *\t\t\tselected: false,\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Computer\",\n\t *\t\t\tselected: false\n\t *\t\t},\n\t *\t\t{\n\t *\t\t\tcontent: \"Digital\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t * ];\n\t * ```\n\t *\n\t */\n\t@Input() items: Array<ListItem> = [];\n\t/**\n\t * Combo box type (supporting single or multi selection of items).\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * Combo box render size.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() itemValueKey: string;\n\t/**\n\t * Label for the combobox.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Hide label while keeping it accessible for screen readers\n\t */\n\t@Input() hideLabel = false;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline: boolean = null;\n\t/**\n\t * Set to `true` to show the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if combobox is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t* Set to `true` to show a warning (contents set by warnText)\n\t*/\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\t/**\n\t * Max length value to limit input characters\n\t */\n\t@Input() maxLength: number = null;\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Specify feedback (mode) of the selection.\n\t * `top`: selected item jumps to top\n\t * `fixed`: selected item stays at its position\n\t * `top-after-reopen`: selected item jump to top after reopen dropdown\n\t */\n\t@Input() selectionFeedback: \"top\" | \"fixed\" | \"top-after-reopen\" = \"top-after-reopen\";\n\t/**\n\t * Specify aria-autocomplete attribute of text input.\n\t * \"list\", is the expected value for a combobox that invokes a drop-down list\n\t */\n\t@Input() autocomplete = \"list\";\n\t/**\n\t * Overrides the automatic dropUp.\n\t */\n\t@Input() dropUp: boolean;\n\t/**\n\t * Set to `true` to disable combobox.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for readonly state.\n\t */\n\t@Input() readonly = false;\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@Input() fluid = false;\n\t/**\n\t * Emits a ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t * \t\tcontent: \"one\",\n\t * \t\tselected: true\n\t * }\n\t * ```\n\t */\n\t@Output() selected = new EventEmitter<ListItem | ListItem[]>();\n\t/**\n\t * Intended to be used to add items to the list.\n\t *\n\t * Emits an event that includes the current item list, the suggested index for the new item, and a simple ListItem\n\t *\n\t * Example:\n\t * ```javascript\n\t *\t{\n\t *\t\titems: [{content: \"one\", selected: true}, {content: \"two\", selected: true}],\n\t *\t\tindex: 1,\n\t *\t\tvalue: {\n\t *\t\t\tcontent: \"some user string\",\n\t *\t\t\tselected: false\n\t *\t\t}\n\t *\t}\n\t * ```\n\t *\n\t *\n\t * Example:\n\t * ```javascript\n\t * {\n\t *\tafter: 1,\n\t *\tvalue: \"some user string\"\n\t * }\n\t * ```\n\t */\n\t@Output() submit = new EventEmitter<{\n\t\titems: ListItem[],\n\t\tindex: number,\n\t\tvalue: {\n\t\t\tcontent: string,\n\t\t\tselected: boolean\n\t\t}\n\t}>();\n\t/** Emits an empty event when the menu is closed */\n\t@Output() close = new EventEmitter<void>();\n\t/** Emits the search string from the input */\n\t@Output() search = new EventEmitter<string>();\n\t/** Emits an event when the clear button is clicked. */\n\t@Output() clear = new EventEmitter<Event>();\n\t/** ContentChild reference to the instantiated dropdown list */\n\t@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;\n\t@ViewChild(\"dropdownMenu\") dropdownMenu;\n\t@ViewChild(\"input\", { static: true }) input: ElementRef;\n\t@ViewChild(\"listbox\", { static: true }) listbox: ElementRef;\n\t@HostBinding(\"class.cds--list-box__wrapper\") hostClass = true;\n\n\tpublic open = false;\n\n\tpublic showClearButton = false;\n\n\t/** Selected items for multi-select combo-boxes. */\n\tpublic pills = [];\n\t/** used to update the displayValue */\n\tpublic selectedValue = \"\";\n\n\toutsideClick = this._outsideClick.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\t/**\n\t * controls whether the `drop-up` class is applied\n\t */\n\t_dropUp = false;\n\n\tprotected noop = this._noop.bind(this);\n\tprotected onTouchedCallback: () => void = this._noop;\n\tprotected propagateChangeCallback: (_: any) => void = this._noop;\n\n\tprotected _placeholder = this.i18n.getOverridable(\"COMBOBOX.PLACEHOLDER\");\n\tprotected _closeMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLOSE_MENU\");\n\tprotected _openMenuAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.OPEN_MENU\");\n\tprotected _clearSelectionsTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionsAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTIONS\");\n\tprotected _clearSelectionTitle = this.i18n.getOverridable(\"COMBOBOX.CLEAR_SELECTED\");\n\tprotected _clearSelectionAria = this.i18n.getOverridable(\"COMBOBOX.A11Y.CLEAR_SELECTED\");\n\n\tprotected _isFocused = false;\n\n\t/**\n\t * Creates an instance of ComboBox.\n\t */\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected dropdownService: DropdownService,\n\t\tprotected i18n: I18n\n\t) {}\n\n\t/**\n\t * Lifecycle hook.\n\t * Updates pills if necessary.\n\t *\n\t */\n\tngOnChanges(changes) {\n\t\tif (changes.items) {\n\t\t\tthis.view.items = changes.items.currentValue;\n\t\t\tthis.updateSelected();\n\t\t\t// If new items are added into the combobox while there is search input,\n\t\t\t// repeat the search. Search should only trigger for type 'single' when there is no value selected.\n\t\t\tif (this.type === \"multi\" || (this.type === \"single\" && !this.selectedValue)) {\n\t\t\t\tthis.onSearch(this.input.nativeElement.value, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets initial state that depends on child components\n\t * Subscribes to select events and handles focus/filtering/initial list updates\n\t */\n\tngAfterContentInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\n\t\t\t// function to check if the event is organic (isUpdate === false) or programmatic\n\t\t\tconst isUpdate = event => event && event.isUpdate;\n\n\t\t\tthis.view.select.subscribe(event => {\n\t\t\t\tif (Array.isArray(event)) {\n\t\t\t\t\tthis.updatePills();\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tif (this.itemValueKey && this.view.getSelected()) {\n\t\t\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.itemValueKey]);\n\t\t\t\t\t\t\tthis.propagateChangeCallback(values);\n\t\t\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.propagateChangeCallback(this.view.getSelected());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.selected.emit(event);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If type is single, dropdown list will emit an object\n\t\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\t\tthis.showClearButton = true;\n\t\t\t\t\t\tthis.selectedValue = event.item.content;\n\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t\t\t\tthis.propagateChangeCallback(event.item[this.itemValueKey]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.propagateChangeCallback(event.item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.selectedValue = \"\";\n\t\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\t\tthis.propagateChangeCallback(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// not guarding these since the nativeElement has to be loaded\n\t\t\t\t\t// for select to even fire\n\t\t\t\t\t// only focus for \"organic\" selections\n\t\t\t\t\tif (!isUpdate(event)) {\n\t\t\t\t\t\tthis.elementRef.nativeElement.querySelector(\"input\").focus();\n\t\t\t\t\t\tthis.view.filterBy(\"\");\n\t\t\t\t\t\tthis.selected.emit(event.item);\n\t\t\t\t\t}\n\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t}\n\t\t\t});\n\t\t\t// update the rest of combobox with any pre-selected items\n\t\t\t// setTimeout just defers the call to the next check cycle\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.updateSelected();\n\t\t\t});\n\n\t\t\tthis.view.blurIntent.pipe(filter(v => v === \"top\")).subscribe(() => {\n\t\t\t\tthis.elementRef.nativeElement.querySelector(\".cds--text-input\").focus();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Binds event handlers against the rendered view\n\t */\n\tngAfterViewInit() {\n\t\t// if appendInline is default valued (null) we should:\n\t\t// 1. if there are scrollable parents (not including body) don't append inline\n\t\t// this should also cover the case where the dropdown is in a modal\n\t\t// (where we _do_ want to append to the placeholder)\n\t\tif (this.appendInline === null && hasScrollableParents(this.elementRef.nativeElement)) {\n\t\t\tthis.appendInline = false;\n\t\t// 2. otherwise we should append inline\n\t\t} else if (this.appendInline === null) {\n\t\t\tthis.appendInline = true;\n\t\t}\n\t}\n\n\t/**\n\t * Removing the `Dropdown` from the body if it is appended to the body.\n\t */\n\tngOnDestroy() {\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Handles `Escape/Tab` key closing the dropdown, and arrow up/down focus to/from the dropdown list.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\thostkeys(ev: KeyboardEvent) {\n\t\tif (ev.key === \"Escape\") {\n\t\t\tthis.closeDropdown();\n\t\t} else if ((ev.key === \"ArrowDown\")\n\t\t\t&& (!this.dropdownMenu || !this.dropdownMenu.nativeElement.contains(ev.target))) {\n\t\t\tev.preventDefault();\n\t\t\tthis.openDropdown();\n\t\t\tsetTimeout(() => { this.view.initFocus(); }, 0);\n\t\t}\n\n\t\tif (\n\t\t\tthis.open && ev.key === \"Tab\" &&\n\t\t\t(this.dropdownMenu.nativeElement.contains(ev.target as Node) || ev.target === this.input.nativeElement)\n\t\t) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tif (this.open && ev.key === \"Tab\" && ev.shiftKey) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/*\n\t * no-op method for null event listeners, and other no op calls\n\t */\n\t_noop() {}\n\n\t/*\n\t * propagates the value provided from ngModel\n\t */\n\twriteValue(value: any) {\n\t\tif (this.type === \"single\") {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the specified item and update its state\n\t\t\t\tconst newValue = Object.assign({}, this.view.getListItems().find(item => item[this.itemValueKey] === value));\n\t\t\t\tnewValue.selected = true;\n\t\t\t\tthis.view.propagateSelected([newValue]);\n\t\t\t} else {\n\t\t\t\t// all items in propagateSelected must be iterable\n\t\t\t\tthis.view.propagateSelected([value || \"\"]);\n\t\t\t}\n\t\t\tthis.showClearButton = !!(value && this.view.getSelected().length);\n\t\t} else {\n\t\t\tif (this.itemValueKey) {\n\t\t\t\t// clone the items and update their state based on the received value array\n\t\t\t\t// this way we don't lose any additional metadata that may be passed in via the `items` Input\n\t\t\t\tlet newValues = [];\n\t\t\t\tfor (const v of value) {\n\t\t\t\t\tfor (const item of this.view.getListItems()) {\n\t\t\t\t\t\tif (item[this.itemValueKey] === v) {\n\t\t\t\t\t\t\tnewValues.push(Object.assign({}, item, { selected: true }));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.view.propagateSelected(newValues);\n\t\t\t} else {\n\t\t\t\tthis.view.propagateSelected(value ? value : [\"\"]);\n\t\t\t}\n\t\t}\n\t\tthis.updateSelected();\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChangeCallback = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the combobox.\n\t *\n\t * ex: `this.formGroup.get(\"myCoolCombobox\").disable();`\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Called by `n-pill-input` when the selected pills have changed.\n\t */\n\tpublic updatePills() {\n\t\tthis.pills = this.view.getSelected() || [];\n\t\tthis.checkForReorder();\n\t}\n\n\tpublic clearSelected(event) {\n\t\tthis.items = this.items.map(item => {\n\t\t\tif (!item.disabled) {\n\t\t\t\titem.selected = false;\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t\tthis.view.items = this.items;\n\t\tthis.updatePills();\n\t\t// clearSelected can only fire on type=multi\n\t\t// so we just emit getSelected() (just in case there's any disabled but selected items)\n\t\tconst selected = this.view.getSelected();\n\t\tthis.propagateChangeCallback(selected);\n\t\tthis.selected.emit(selected as any);\n\t\tthis.clear.emit(event);\n\t}\n\n\t/**\n\t * Closes the dropdown and emits the close event.\n\t */\n\tpublic closeDropdown() {\n\t\tthis.open = false;\n\t\tthis.checkForReorder();\n\t\tthis.close.emit();\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t}\n\n\t/**\n\t * Opens the dropdown.\n\t */\n\tpublic openDropdown() {\n\t\tif (this.disabled || this.readonly) { return; }\n\t\tthis.open = true;\n\t\tthis._dropUp = false;\n\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\n\t\t// set the dropdown menu to drop up if it is near the bottom of the screen\n\t\t// setTimeout lets us do the calculations after it is visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tif (this.dropUp === null || this.dropUp === undefined) {\n\t\t\t\tthis._dropUp = this._shouldDropUp();\n\t\t\t}\n\t\t}, 0);\n\t}\n\n\t/**\n\t * Toggles the dropdown.\n\t */\n\tpublic toggleDropdown() {\n\t\tif (this.open) {\n\t\t\tthis.closeDropdown();\n\t\t} else {\n\t\t\tthis.openDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the list group filter, and manages single select item selection.\n\t */\n\tpublic onSearch(searchString, shouldEmitSearch = true) {\n\t\tif (shouldEmitSearch) {\n\t\t\tthis.search.emit(searchString);\n\t\t}\n\t\tthis.showClearButton = !!searchString;\n\t\tthis.view.filterBy(searchString);\n\t\tif (searchString !== \"\") {\n\t\t\tif (!this.open) {\n\t\t\t\tthis.openDropdown();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.selectedValue = \"\";\n\t\t\tif (this.type === \"multi\" &&\n\t\t\t\t(this.selectionFeedback === \"top\" || this.selectionFeedback === \"top-after-reopen\")) {\n\t\t\t\tthis.view.reorderSelected();\n\t\t\t}\n\t\t}\n\t\tif (this.type === \"single\") {\n\t\t\t// deselect if the input doesn't match the content\n\t\t\t// of any given item\n\t\t\tconst matches = this.view.getListItems().some(item => item.content.toLowerCase().includes(searchString.toLowerCase()));\n\t\t\tif (!matches) {\n\t\t\t\tconst selected = this.view.getSelected();\n\t\t\t\tif (!selected || !selected[0]) {\n\t\t\t\t\tthis.view.filterBy(searchString);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Intended to be used to add items to the list.\n\t */\n\tpublic onSubmit(event: KeyboardEvent) {\n\t\tthis.submit.emit({\n\t\t\titems: this.view.getListItems(),\n\t\t\tindex: 0,\n\t\t\tvalue: {\n\t\t\t\tcontent: (event.target as HTMLInputElement).value,\n\t\t\t\tselected: false\n\t\t\t}\n\t\t});\n\t}\n\n\tclearInput(event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\n\t\tif (this.disabled || this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.type === \"single\") { // don't want to clear selected or close if multi\n\t\t\tthis.clearSelected(event);\n\t\t\tthis.closeDropdown();\n\t\t}\n\n\t\tthis.selectedValue = \"\";\n\t\tthis.input.nativeElement.value = \"\";\n\n\t\tthis.showClearButton = false;\n\t\tthis.input.nativeElement.focus();\n\t\tthis.onSearch(this.input.nativeElement.value);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\tif ((event.key === \"Escape\") && this.open) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeDropdown();\n\t\t\tthis.input.nativeElement.focus();\n\t\t} else if (this.open && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.input.nativeElement.focus();\n\t\t\tthis.input.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", { bubbles: true, cancelable: true, key: \"Tab\" }));\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.listbox.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\t`${this.elementRef.nativeElement.className}${this.open ? \" cds--list-box--expanded\" : \"\"}`);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Detects whether or not the `Dropdown` list is visible within all scrollable parents.\n\t * This can be overridden by passing in a value to the `dropUp` input.\n\t */\n\t_shouldDropUp() {\n\t\t// check if dropdownMenu exists first.\n\t\tconst menu = this.dropdownMenu && this.dropdownMenu.nativeElement.querySelector(\".cds--list-box__menu\");\n\t\t// check if menu exists first.\n\t\tconst menuRect = menu && menu.getBoundingClientRect();\n\t\tif (menu && menuRect) {\n\t\t\tconst scrollableParents = getScrollableParents(menu);\n\t\t\treturn scrollableParents.reduce((shouldDropUp: boolean, parent: HTMLElement) => {\n\t\t\t\tconst parentRect = parent.getBoundingClientRect();\n\t\t\t\tconst isBelowParent = !(menuRect.bottom <= parentRect.bottom);\n\t\t\t\treturn shouldDropUp || isBelowParent;\n\t\t\t}, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Handles clicks outside of the `Dropdown` list.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeDropdown();\n\t\t}\n\t}\n\n\thandleFocus(event: FocusEvent) {\n\t\tthis._isFocused = event.type === \"focus\";\n\t}\n\n\tprotected updateSelected() {\n\t\tconst selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\tthis.updatePills();\n\t\t} else if (selected) {\n\t\t\tconst value = selected[0] ? selected[0].content : \"\";\n\t\t\tconst changeCallbackValue = selected[0] ? selected[0] : \"\";\n\t\t\tthis.selectedValue = value;\n\t\t\tthis.showClearButton = !!value;\n\t\t}\n\t}\n\n\tprotected checkForReorder() {\n\t\tconst topAfterReopen = !this.open && this.selectionFeedback === \"top-after-reopen\";\n\t\tif ((this.type === \"multi\") && (topAfterReopen || this.selectionFeedback === \"top\")) {\n\t\t\tthis.view.reorderSelected(true);\n\t\t}\n\t}\n}\n",
|
|
24278
24289
|
"assetsDirs": [],
|
|
24279
24290
|
"styleUrlsData": "",
|
|
24280
24291
|
"stylesData": "",
|
|
@@ -24303,7 +24314,7 @@
|
|
|
24303
24314
|
"deprecationMessage": ""
|
|
24304
24315
|
}
|
|
24305
24316
|
],
|
|
24306
|
-
"line":
|
|
24317
|
+
"line": 471,
|
|
24307
24318
|
"rawdescription": "\n\nCreates an instance of ComboBox.\n",
|
|
24308
24319
|
"jsdoctags": [
|
|
24309
24320
|
{
|
|
@@ -24359,7 +24370,7 @@
|
|
|
24359
24370
|
}
|
|
24360
24371
|
],
|
|
24361
24372
|
"returnType": "void",
|
|
24362
|
-
"line":
|
|
24373
|
+
"line": 207,
|
|
24363
24374
|
"rawdescription": "\n\nText to show when nothing is selected.\n",
|
|
24364
24375
|
"description": "<p>Text to show when nothing is selected.</p>\n",
|
|
24365
24376
|
"jsdoctags": [
|
|
@@ -24378,7 +24389,7 @@
|
|
|
24378
24389
|
"name": "placeholder",
|
|
24379
24390
|
"type": "",
|
|
24380
24391
|
"returnType": "",
|
|
24381
|
-
"line":
|
|
24392
|
+
"line": 211
|
|
24382
24393
|
}
|
|
24383
24394
|
},
|
|
24384
24395
|
"openMenuAria": {
|
|
@@ -24397,7 +24408,7 @@
|
|
|
24397
24408
|
}
|
|
24398
24409
|
],
|
|
24399
24410
|
"returnType": "void",
|
|
24400
|
-
"line":
|
|
24411
|
+
"line": 217,
|
|
24401
24412
|
"rawdescription": "\n\nValue to display for accessibility purposes on the combobox control menu when closed\n",
|
|
24402
24413
|
"description": "<p>Value to display for accessibility purposes on the combobox control menu when closed</p>\n",
|
|
24403
24414
|
"jsdoctags": [
|
|
@@ -24416,7 +24427,7 @@
|
|
|
24416
24427
|
"name": "openMenuAria",
|
|
24417
24428
|
"type": "",
|
|
24418
24429
|
"returnType": "",
|
|
24419
|
-
"line":
|
|
24430
|
+
"line": 221
|
|
24420
24431
|
}
|
|
24421
24432
|
},
|
|
24422
24433
|
"closeMenuAria": {
|
|
@@ -24435,7 +24446,7 @@
|
|
|
24435
24446
|
}
|
|
24436
24447
|
],
|
|
24437
24448
|
"returnType": "void",
|
|
24438
|
-
"line":
|
|
24449
|
+
"line": 227,
|
|
24439
24450
|
"rawdescription": "\n\nValue to display for accessibility purposes on the combobox control menu when opened\n",
|
|
24440
24451
|
"description": "<p>Value to display for accessibility purposes on the combobox control menu when opened</p>\n",
|
|
24441
24452
|
"jsdoctags": [
|
|
@@ -24454,7 +24465,7 @@
|
|
|
24454
24465
|
"name": "closeMenuAria",
|
|
24455
24466
|
"type": "",
|
|
24456
24467
|
"returnType": "",
|
|
24457
|
-
"line":
|
|
24468
|
+
"line": 231
|
|
24458
24469
|
}
|
|
24459
24470
|
},
|
|
24460
24471
|
"clearSelectionsTitle": {
|
|
@@ -24473,7 +24484,7 @@
|
|
|
24473
24484
|
}
|
|
24474
24485
|
],
|
|
24475
24486
|
"returnType": "void",
|
|
24476
|
-
"line":
|
|
24487
|
+
"line": 237,
|
|
24477
24488
|
"rawdescription": "\n\nValue to display on the clear selections icon, when multi is selected\n",
|
|
24478
24489
|
"description": "<p>Value to display on the clear selections icon, when multi is selected</p>\n",
|
|
24479
24490
|
"jsdoctags": [
|
|
@@ -24492,7 +24503,7 @@
|
|
|
24492
24503
|
"name": "clearSelectionsTitle",
|
|
24493
24504
|
"type": "",
|
|
24494
24505
|
"returnType": "",
|
|
24495
|
-
"line":
|
|
24506
|
+
"line": 241
|
|
24496
24507
|
}
|
|
24497
24508
|
},
|
|
24498
24509
|
"clearSelectionsAria": {
|
|
@@ -24511,7 +24522,7 @@
|
|
|
24511
24522
|
}
|
|
24512
24523
|
],
|
|
24513
24524
|
"returnType": "void",
|
|
24514
|
-
"line":
|
|
24525
|
+
"line": 247,
|
|
24515
24526
|
"rawdescription": "\n\nValue to display for accessibility purposes to clear selections, when multi is selected\n",
|
|
24516
24527
|
"description": "<p>Value to display for accessibility purposes to clear selections, when multi is selected</p>\n",
|
|
24517
24528
|
"jsdoctags": [
|
|
@@ -24530,7 +24541,7 @@
|
|
|
24530
24541
|
"name": "clearSelectionsAria",
|
|
24531
24542
|
"type": "",
|
|
24532
24543
|
"returnType": "",
|
|
24533
|
-
"line":
|
|
24544
|
+
"line": 251
|
|
24534
24545
|
}
|
|
24535
24546
|
},
|
|
24536
24547
|
"clearSelectionTitle": {
|
|
@@ -24549,7 +24560,7 @@
|
|
|
24549
24560
|
}
|
|
24550
24561
|
],
|
|
24551
24562
|
"returnType": "void",
|
|
24552
|
-
"line":
|
|
24563
|
+
"line": 257,
|
|
24553
24564
|
"rawdescription": "\n\nValue to display on the clear the selected item icon, when single is selected\n",
|
|
24554
24565
|
"description": "<p>Value to display on the clear the selected item icon, when single is selected</p>\n",
|
|
24555
24566
|
"jsdoctags": [
|
|
@@ -24568,7 +24579,7 @@
|
|
|
24568
24579
|
"name": "clearSelectionTitle",
|
|
24569
24580
|
"type": "",
|
|
24570
24581
|
"returnType": "",
|
|
24571
|
-
"line":
|
|
24582
|
+
"line": 261
|
|
24572
24583
|
}
|
|
24573
24584
|
},
|
|
24574
24585
|
"clearSelectionAria": {
|
|
@@ -24587,7 +24598,7 @@
|
|
|
24587
24598
|
}
|
|
24588
24599
|
],
|
|
24589
24600
|
"returnType": "void",
|
|
24590
|
-
"line":
|
|
24601
|
+
"line": 267,
|
|
24591
24602
|
"rawdescription": "\n\nValue to display for accessibility purposes on the clear the selected item icon, when single is selected\n",
|
|
24592
24603
|
"description": "<p>Value to display for accessibility purposes on the clear the selected item icon, when single is selected</p>\n",
|
|
24593
24604
|
"jsdoctags": [
|
|
@@ -24606,7 +24617,7 @@
|
|
|
24606
24617
|
"name": "clearSelectionAria",
|
|
24607
24618
|
"type": "",
|
|
24608
24619
|
"returnType": "",
|
|
24609
|
-
"line":
|
|
24620
|
+
"line": 271
|
|
24610
24621
|
}
|
|
24611
24622
|
}
|
|
24612
24623
|
}
|
|
@@ -28515,7 +28526,7 @@
|
|
|
28515
28526
|
},
|
|
28516
28527
|
{
|
|
28517
28528
|
"name": "Dropdown",
|
|
28518
|
-
"id": "component-Dropdown-
|
|
28529
|
+
"id": "component-Dropdown-be1a94d9a158990086693e978c1d4dfe355b056237ee57e0c730b3918066a689043bcc15576d135beacb8e26a037a7f78399005aa79b4b60f73aa668a3b36865",
|
|
28519
28530
|
"file": "src/dropdown/dropdown.component.ts",
|
|
28520
28531
|
"encapsulation": [],
|
|
28521
28532
|
"entryComponents": [],
|
|
@@ -28529,7 +28540,7 @@
|
|
|
28529
28540
|
"selector": "cds-dropdown, ibm-dropdown",
|
|
28530
28541
|
"styleUrls": [],
|
|
28531
28542
|
"styles": [],
|
|
28532
|
-
"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<
|
|
28543
|
+
"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' && !(skeleton && fluid),\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\t'cds--list-box--invalid': invalid\n\t}\"\n\t[attr.data-invalid]=\"invalid ? true : null\">\n\t<div *ngIf=\"skeleton && fluid\" class=\"cds--list-box__label\"></div>\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(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t(blur)=\"fluid ? handleFocus($event) : 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<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<svg\n\t\t*ngIf=\"invalid\"\n\t\tclass=\"cds--list-box__invalid-icon\"\n\t\tcdsIcon=\"warning--filled\"\n\t\tsize=\"16\">\n\t</svg>\n\t<svg\n\t\t*ngIf=\"!invalid && warn\"\n\t\tcdsIcon=\"warning--alt--filled\"\n\t\tsize=\"16\"\n\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t</svg>\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<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n<div\n\t*ngIf=\"helperText && !invalid && !warn && !skeleton && !fluid\"\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",
|
|
28533
28544
|
"templateUrl": [],
|
|
28534
28545
|
"viewProviders": [],
|
|
28535
28546
|
"hostDirectives": [],
|
|
@@ -28541,7 +28552,7 @@
|
|
|
28541
28552
|
"deprecationMessage": "",
|
|
28542
28553
|
"rawdescription": "\n\nset to `true` to place the dropdown view inline with the component\n",
|
|
28543
28554
|
"description": "<p>set to <code>true</code> to place the dropdown view inline with the component</p>\n",
|
|
28544
|
-
"line":
|
|
28555
|
+
"line": 288,
|
|
28545
28556
|
"type": "boolean",
|
|
28546
28557
|
"decorators": []
|
|
28547
28558
|
},
|
|
@@ -28552,7 +28563,7 @@
|
|
|
28552
28563
|
"deprecationMessage": "",
|
|
28553
28564
|
"rawdescription": "\n\nSets the optional clear button tooltip text.\n",
|
|
28554
28565
|
"description": "<p>Sets the optional clear button tooltip text.</p>\n",
|
|
28555
|
-
"line":
|
|
28566
|
+
"line": 234,
|
|
28556
28567
|
"type": "string",
|
|
28557
28568
|
"decorators": []
|
|
28558
28569
|
},
|
|
@@ -28563,7 +28574,7 @@
|
|
|
28563
28574
|
"deprecationMessage": "",
|
|
28564
28575
|
"rawdescription": "\n\nSet to `true` for a dropdown without arrow key activation.\n",
|
|
28565
28576
|
"description": "<p>Set to <code>true</code> for a dropdown without arrow key activation.</p>\n",
|
|
28566
|
-
"line":
|
|
28577
|
+
"line": 268,
|
|
28567
28578
|
"type": "boolean",
|
|
28568
28579
|
"decorators": []
|
|
28569
28580
|
},
|
|
@@ -28574,7 +28585,7 @@
|
|
|
28574
28585
|
"deprecationMessage": "",
|
|
28575
28586
|
"rawdescription": "\n\nSet to `true` to disable the dropdown.\n",
|
|
28576
28587
|
"description": "<p>Set to <code>true</code> to disable the dropdown.</p>\n",
|
|
28577
|
-
"line":
|
|
28588
|
+
"line": 252,
|
|
28578
28589
|
"type": "boolean",
|
|
28579
28590
|
"decorators": []
|
|
28580
28591
|
},
|
|
@@ -28585,7 +28596,7 @@
|
|
|
28585
28596
|
"deprecationMessage": "",
|
|
28586
28597
|
"rawdescription": "\n\nThe selected value from the `Dropdown`. Can be a string or template.\n",
|
|
28587
28598
|
"description": "<p>The selected value from the <code>Dropdown</code>. Can be a string or template.</p>\n",
|
|
28588
|
-
"line":
|
|
28599
|
+
"line": 230,
|
|
28589
28600
|
"type": "string | TemplateRef<any>",
|
|
28590
28601
|
"decorators": []
|
|
28591
28602
|
},
|
|
@@ -28595,7 +28606,18 @@
|
|
|
28595
28606
|
"deprecationMessage": "",
|
|
28596
28607
|
"rawdescription": "\n\nOverrides the automatic dropUp.\n",
|
|
28597
28608
|
"description": "<p>Overrides the automatic dropUp.</p>\n",
|
|
28598
|
-
"line":
|
|
28609
|
+
"line": 318,
|
|
28610
|
+
"type": "boolean",
|
|
28611
|
+
"decorators": []
|
|
28612
|
+
},
|
|
28613
|
+
{
|
|
28614
|
+
"name": "fluid",
|
|
28615
|
+
"defaultValue": "false",
|
|
28616
|
+
"deprecated": false,
|
|
28617
|
+
"deprecationMessage": "",
|
|
28618
|
+
"rawdescription": "\n\nExperimental: enable fluid state\n",
|
|
28619
|
+
"description": "<p>Experimental: enable fluid state</p>\n",
|
|
28620
|
+
"line": 351,
|
|
28599
28621
|
"type": "boolean",
|
|
28600
28622
|
"decorators": []
|
|
28601
28623
|
},
|
|
@@ -28605,7 +28627,7 @@
|
|
|
28605
28627
|
"deprecationMessage": "",
|
|
28606
28628
|
"rawdescription": "\n\nSets the optional helper text.\n",
|
|
28607
28629
|
"description": "<p>Sets the optional helper text.</p>\n",
|
|
28608
|
-
"line":
|
|
28630
|
+
"line": 222,
|
|
28609
28631
|
"type": "string | TemplateRef<any>",
|
|
28610
28632
|
"decorators": []
|
|
28611
28633
|
},
|
|
@@ -28616,7 +28638,7 @@
|
|
|
28616
28638
|
"deprecationMessage": "",
|
|
28617
28639
|
"rawdescription": "\n\nHide label while keeping it accessible for screen readers\n",
|
|
28618
28640
|
"description": "<p>Hide label while keeping it accessible for screen readers</p>\n",
|
|
28619
|
-
"line":
|
|
28641
|
+
"line": 218,
|
|
28620
28642
|
"type": "boolean",
|
|
28621
28643
|
"decorators": []
|
|
28622
28644
|
},
|
|
@@ -28625,7 +28647,7 @@
|
|
|
28625
28647
|
"defaultValue": "`dropdown-${Dropdown.dropdownCount++}`",
|
|
28626
28648
|
"deprecated": false,
|
|
28627
28649
|
"deprecationMessage": "",
|
|
28628
|
-
"line":
|
|
28650
|
+
"line": 210,
|
|
28629
28651
|
"type": "string",
|
|
28630
28652
|
"decorators": []
|
|
28631
28653
|
},
|
|
@@ -28636,7 +28658,7 @@
|
|
|
28636
28658
|
"deprecationMessage": "",
|
|
28637
28659
|
"rawdescription": "\n\nSet to `true` for an inline dropdown.\n",
|
|
28638
28660
|
"description": "<p>Set to <code>true</code> for an inline dropdown.</p>\n",
|
|
28639
|
-
"line":
|
|
28661
|
+
"line": 264,
|
|
28640
28662
|
"type": "boolean",
|
|
28641
28663
|
"decorators": []
|
|
28642
28664
|
},
|
|
@@ -28647,7 +28669,7 @@
|
|
|
28647
28669
|
"deprecationMessage": "",
|
|
28648
28670
|
"rawdescription": "\n\nSet to `true` for invalid state.\n",
|
|
28649
28671
|
"description": "<p>Set to <code>true</code> for invalid state.</p>\n",
|
|
28650
|
-
"line":
|
|
28672
|
+
"line": 272,
|
|
28651
28673
|
"type": "boolean",
|
|
28652
28674
|
"decorators": []
|
|
28653
28675
|
},
|
|
@@ -28657,7 +28679,7 @@
|
|
|
28657
28679
|
"deprecationMessage": "",
|
|
28658
28680
|
"rawdescription": "\n\nValue displayed if dropdown is in invalid state.\n",
|
|
28659
28681
|
"description": "<p>Value displayed if dropdown is in invalid state.</p>\n",
|
|
28660
|
-
"line":
|
|
28682
|
+
"line": 276,
|
|
28661
28683
|
"type": "string | TemplateRef<any>",
|
|
28662
28684
|
"decorators": []
|
|
28663
28685
|
},
|
|
@@ -28667,7 +28689,7 @@
|
|
|
28667
28689
|
"deprecationMessage": "",
|
|
28668
28690
|
"rawdescription": "\n\nSpecifies the property to be used as the return value to `ngModel`\n",
|
|
28669
28691
|
"description": "<p>Specifies the property to be used as the return value to <code>ngModel</code></p>\n",
|
|
28670
|
-
"line":
|
|
28692
|
+
"line": 297,
|
|
28671
28693
|
"type": "string",
|
|
28672
28694
|
"decorators": []
|
|
28673
28695
|
},
|
|
@@ -28677,7 +28699,7 @@
|
|
|
28677
28699
|
"deprecationMessage": "",
|
|
28678
28700
|
"rawdescription": "\n\nLabel for the dropdown.\n",
|
|
28679
28701
|
"description": "<p>Label for the dropdown.</p>\n",
|
|
28680
|
-
"line":
|
|
28702
|
+
"line": 214,
|
|
28681
28703
|
"type": "string | TemplateRef<any>",
|
|
28682
28704
|
"decorators": []
|
|
28683
28705
|
},
|
|
@@ -28688,7 +28710,7 @@
|
|
|
28688
28710
|
"deprecationMessage": "",
|
|
28689
28711
|
"rawdescription": "\n\nAccessible label for the button that opens the dropdown list.\nDefaults to the `DROPDOWN.OPEN` value from the i18n service.\n",
|
|
28690
28712
|
"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",
|
|
28691
|
-
"line":
|
|
28713
|
+
"line": 309,
|
|
28692
28714
|
"type": "any",
|
|
28693
28715
|
"decorators": []
|
|
28694
28716
|
},
|
|
@@ -28699,7 +28721,7 @@
|
|
|
28699
28721
|
"deprecationMessage": "",
|
|
28700
28722
|
"rawdescription": "\n\nValue displayed if no item is selected.\n",
|
|
28701
28723
|
"description": "<p>Value displayed if no item is selected.</p>\n",
|
|
28702
|
-
"line":
|
|
28724
|
+
"line": 226,
|
|
28703
28725
|
"type": "string",
|
|
28704
28726
|
"decorators": []
|
|
28705
28727
|
},
|
|
@@ -28710,7 +28732,7 @@
|
|
|
28710
28732
|
"deprecationMessage": "",
|
|
28711
28733
|
"rawdescription": "\n\nSet to `true` for a readonly state.\n",
|
|
28712
28734
|
"description": "<p>Set to <code>true</code> for a readonly state.</p>\n",
|
|
28713
|
-
"line":
|
|
28735
|
+
"line": 256,
|
|
28714
28736
|
"type": "boolean",
|
|
28715
28737
|
"decorators": []
|
|
28716
28738
|
},
|
|
@@ -28720,7 +28742,7 @@
|
|
|
28720
28742
|
"deprecationMessage": "",
|
|
28721
28743
|
"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",
|
|
28722
28744
|
"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",
|
|
28723
|
-
"line":
|
|
28745
|
+
"line": 293,
|
|
28724
28746
|
"type": "string",
|
|
28725
28747
|
"decorators": []
|
|
28726
28748
|
},
|
|
@@ -28731,7 +28753,7 @@
|
|
|
28731
28753
|
"deprecationMessage": "",
|
|
28732
28754
|
"rawdescription": "\n\nProvides the label for the \"# selected\" text.\nDefaults to the `DROPDOWN.SELECTED` value from the i18n service.\n",
|
|
28733
28755
|
"description": "<p>Provides the label for the "# selected" text.\nDefaults to the <code>DROPDOWN.SELECTED</code> value from the i18n service.</p>\n",
|
|
28734
|
-
"line":
|
|
28756
|
+
"line": 314,
|
|
28735
28757
|
"type": "any",
|
|
28736
28758
|
"decorators": []
|
|
28737
28759
|
},
|
|
@@ -28742,7 +28764,7 @@
|
|
|
28742
28764
|
"deprecationMessage": "",
|
|
28743
28765
|
"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",
|
|
28744
28766
|
"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's position\n<code>top-after-reopen</code>: selected item jump to top after reopen dropdown</p>\n",
|
|
28745
|
-
"line":
|
|
28767
|
+
"line": 304,
|
|
28746
28768
|
"type": "\"top\" | \"fixed\" | \"top-after-reopen\"",
|
|
28747
28769
|
"decorators": []
|
|
28748
28770
|
},
|
|
@@ -28753,7 +28775,7 @@
|
|
|
28753
28775
|
"deprecationMessage": "",
|
|
28754
28776
|
"rawdescription": "\n\nSize to render the dropdown field.\n",
|
|
28755
28777
|
"description": "<p>Size to render the dropdown field.</p>\n",
|
|
28756
|
-
"line":
|
|
28778
|
+
"line": 238,
|
|
28757
28779
|
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
28758
28780
|
"decorators": []
|
|
28759
28781
|
},
|
|
@@ -28764,7 +28786,7 @@
|
|
|
28764
28786
|
"deprecationMessage": "",
|
|
28765
28787
|
"rawdescription": "\n\nSet to `true` for a loading dropdown.\n",
|
|
28766
28788
|
"description": "<p>Set to <code>true</code> for a loading dropdown.</p>\n",
|
|
28767
|
-
"line":
|
|
28789
|
+
"line": 260,
|
|
28768
28790
|
"type": "boolean",
|
|
28769
28791
|
"decorators": []
|
|
28770
28792
|
},
|
|
@@ -28775,15 +28797,15 @@
|
|
|
28775
28797
|
"deprecationMessage": "since v5 - Use `cdsLayer` directive instead\n`light` or `dark` dropdown theme",
|
|
28776
28798
|
"jsdoctags": [
|
|
28777
28799
|
{
|
|
28778
|
-
"pos":
|
|
28779
|
-
"end":
|
|
28800
|
+
"pos": 7776,
|
|
28801
|
+
"end": 7871,
|
|
28780
28802
|
"flags": 16842752,
|
|
28781
28803
|
"modifierFlagsCache": 0,
|
|
28782
28804
|
"transformFlags": 0,
|
|
28783
28805
|
"kind": 338,
|
|
28784
28806
|
"tagName": {
|
|
28785
|
-
"pos":
|
|
28786
|
-
"end":
|
|
28807
|
+
"pos": 7777,
|
|
28808
|
+
"end": 7787,
|
|
28787
28809
|
"flags": 16842752,
|
|
28788
28810
|
"modifierFlagsCache": 0,
|
|
28789
28811
|
"transformFlags": 0,
|
|
@@ -28793,7 +28815,7 @@
|
|
|
28793
28815
|
"comment": "<p>since v5 - Use <code>cdsLayer</code> directive instead\n<code>light</code> or <code>dark</code> dropdown theme</p>\n"
|
|
28794
28816
|
}
|
|
28795
28817
|
],
|
|
28796
|
-
"line":
|
|
28818
|
+
"line": 248,
|
|
28797
28819
|
"type": "\"light\" | \"dark\"",
|
|
28798
28820
|
"decorators": []
|
|
28799
28821
|
},
|
|
@@ -28804,7 +28826,7 @@
|
|
|
28804
28826
|
"deprecationMessage": "",
|
|
28805
28827
|
"rawdescription": "\n\nDefines whether or not the `Dropdown` supports selecting multiple items as opposed to single\nitem selection.\n",
|
|
28806
28828
|
"description": "<p>Defines whether or not the <code>Dropdown</code> supports selecting multiple items as opposed to single\nitem selection.</p>\n",
|
|
28807
|
-
"line":
|
|
28829
|
+
"line": 243,
|
|
28808
28830
|
"type": "\"single\" | \"multi\"",
|
|
28809
28831
|
"decorators": []
|
|
28810
28832
|
},
|
|
@@ -28815,7 +28837,7 @@
|
|
|
28815
28837
|
"deprecationMessage": "",
|
|
28816
28838
|
"rawdescription": "\n\nSet to `true` to show a warning (contents set by warningText)\n",
|
|
28817
28839
|
"description": "<p>Set to <code>true</code> to show a warning (contents set by warningText)</p>\n",
|
|
28818
|
-
"line":
|
|
28840
|
+
"line": 280,
|
|
28819
28841
|
"type": "boolean",
|
|
28820
28842
|
"decorators": []
|
|
28821
28843
|
},
|
|
@@ -28825,7 +28847,7 @@
|
|
|
28825
28847
|
"deprecationMessage": "",
|
|
28826
28848
|
"rawdescription": "\n\nSets the warning text\n",
|
|
28827
28849
|
"description": "<p>Sets the warning text</p>\n",
|
|
28828
|
-
"line":
|
|
28850
|
+
"line": 284,
|
|
28829
28851
|
"type": "string | TemplateRef<any>",
|
|
28830
28852
|
"decorators": []
|
|
28831
28853
|
}
|
|
@@ -28838,7 +28860,7 @@
|
|
|
28838
28860
|
"deprecationMessage": "",
|
|
28839
28861
|
"rawdescription": "\n\nEmits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n",
|
|
28840
28862
|
"description": "<p>Emits event notifying to other classes that the <code>Dropdown</code> has been closed (collapsed).</p>\n",
|
|
28841
|
-
"line":
|
|
28863
|
+
"line": 330,
|
|
28842
28864
|
"type": "EventEmitter<any>"
|
|
28843
28865
|
},
|
|
28844
28866
|
{
|
|
@@ -28848,7 +28870,7 @@
|
|
|
28848
28870
|
"deprecationMessage": "",
|
|
28849
28871
|
"rawdescription": "\n\nEmits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n",
|
|
28850
28872
|
"description": "<p>Emits event notifying to other classes that the <code>Dropdown</code> has been closed (collapsed).</p>\n",
|
|
28851
|
-
"line":
|
|
28873
|
+
"line": 326,
|
|
28852
28874
|
"type": "EventEmitter<any>"
|
|
28853
28875
|
},
|
|
28854
28876
|
{
|
|
@@ -28858,7 +28880,7 @@
|
|
|
28858
28880
|
"deprecationMessage": "",
|
|
28859
28881
|
"rawdescription": "\n\nEmits selection events.\n",
|
|
28860
28882
|
"description": "<p>Emits selection events.</p>\n",
|
|
28861
|
-
"line":
|
|
28883
|
+
"line": 322,
|
|
28862
28884
|
"type": "EventEmitter<Object>"
|
|
28863
28885
|
}
|
|
28864
28886
|
],
|
|
@@ -28871,7 +28893,7 @@
|
|
|
28871
28893
|
"type": "",
|
|
28872
28894
|
"optional": false,
|
|
28873
28895
|
"description": "<p>controls whether the <code>drop-up</code> class is applied</p>\n",
|
|
28874
|
-
"line":
|
|
28896
|
+
"line": 361,
|
|
28875
28897
|
"rawdescription": "\n\ncontrols whether the `drop-up` class is applied\n"
|
|
28876
28898
|
},
|
|
28877
28899
|
{
|
|
@@ -28881,7 +28903,7 @@
|
|
|
28881
28903
|
"type": "",
|
|
28882
28904
|
"optional": false,
|
|
28883
28905
|
"description": "<p>Maintains a reference to the view DOM element of the <code>Dropdown</code> button.</p>\n",
|
|
28884
|
-
"line":
|
|
28906
|
+
"line": 339,
|
|
28885
28907
|
"rawdescription": "\n\nMaintains a reference to the view DOM element of the `Dropdown` button.\n",
|
|
28886
28908
|
"decorators": [
|
|
28887
28909
|
{
|
|
@@ -28901,7 +28923,7 @@
|
|
|
28901
28923
|
"type": "number",
|
|
28902
28924
|
"optional": false,
|
|
28903
28925
|
"description": "",
|
|
28904
|
-
"line":
|
|
28926
|
+
"line": 190,
|
|
28905
28927
|
"modifierKind": [
|
|
28906
28928
|
126
|
|
28907
28929
|
]
|
|
@@ -28913,7 +28935,7 @@
|
|
|
28913
28935
|
"type": "",
|
|
28914
28936
|
"optional": false,
|
|
28915
28937
|
"description": "<p>ViewChid of the dropdown view.</p>\n",
|
|
28916
|
-
"line":
|
|
28938
|
+
"line": 343,
|
|
28917
28939
|
"rawdescription": "\n\nViewChid of the dropdown view.\n",
|
|
28918
28940
|
"decorators": [
|
|
28919
28941
|
{
|
|
@@ -28933,7 +28955,7 @@
|
|
|
28933
28955
|
"type": "",
|
|
28934
28956
|
"optional": false,
|
|
28935
28957
|
"description": "",
|
|
28936
|
-
"line":
|
|
28958
|
+
"line": 345,
|
|
28937
28959
|
"decorators": [
|
|
28938
28960
|
{
|
|
28939
28961
|
"name": "HostBinding",
|
|
@@ -28944,6 +28966,25 @@
|
|
|
28944
28966
|
170
|
|
28945
28967
|
]
|
|
28946
28968
|
},
|
|
28969
|
+
{
|
|
28970
|
+
"name": "hostWrapperClass",
|
|
28971
|
+
"defaultValue": "true",
|
|
28972
|
+
"deprecated": false,
|
|
28973
|
+
"deprecationMessage": "",
|
|
28974
|
+
"type": "",
|
|
28975
|
+
"optional": false,
|
|
28976
|
+
"description": "",
|
|
28977
|
+
"line": 347,
|
|
28978
|
+
"decorators": [
|
|
28979
|
+
{
|
|
28980
|
+
"name": "HostBinding",
|
|
28981
|
+
"stringifiedArguments": "'class.cds--list-box__wrapper'"
|
|
28982
|
+
}
|
|
28983
|
+
],
|
|
28984
|
+
"modifierKind": [
|
|
28985
|
+
170
|
|
28986
|
+
]
|
|
28987
|
+
},
|
|
28947
28988
|
{
|
|
28948
28989
|
"name": "keyboardNav",
|
|
28949
28990
|
"defaultValue": "this._keyboardNav.bind(this)",
|
|
@@ -28952,7 +28993,7 @@
|
|
|
28952
28993
|
"type": "",
|
|
28953
28994
|
"optional": false,
|
|
28954
28995
|
"description": "",
|
|
28955
|
-
"line":
|
|
28996
|
+
"line": 368
|
|
28956
28997
|
},
|
|
28957
28998
|
{
|
|
28958
28999
|
"name": "menuIsClosed",
|
|
@@ -28962,7 +29003,7 @@
|
|
|
28962
29003
|
"type": "",
|
|
28963
29004
|
"optional": false,
|
|
28964
29005
|
"description": "<p>Set to <code>true</code> if the dropdown is closed (not expanded).</p>\n",
|
|
28965
|
-
"line":
|
|
29006
|
+
"line": 356,
|
|
28966
29007
|
"rawdescription": "\n\nSet to `true` if the dropdown is closed (not expanded).\n"
|
|
28967
29008
|
},
|
|
28968
29009
|
{
|
|
@@ -28973,7 +29014,7 @@
|
|
|
28973
29014
|
"type": "",
|
|
28974
29015
|
"optional": false,
|
|
28975
29016
|
"description": "",
|
|
28976
|
-
"line":
|
|
29017
|
+
"line": 365
|
|
28977
29018
|
},
|
|
28978
29019
|
{
|
|
28979
29020
|
"name": "outsideClick",
|
|
@@ -28983,7 +29024,7 @@
|
|
|
28983
29024
|
"type": "",
|
|
28984
29025
|
"optional": false,
|
|
28985
29026
|
"description": "",
|
|
28986
|
-
"line":
|
|
29027
|
+
"line": 366
|
|
28987
29028
|
},
|
|
28988
29029
|
{
|
|
28989
29030
|
"name": "outsideKey",
|
|
@@ -28993,7 +29034,7 @@
|
|
|
28993
29034
|
"type": "",
|
|
28994
29035
|
"optional": false,
|
|
28995
29036
|
"description": "",
|
|
28996
|
-
"line":
|
|
29037
|
+
"line": 367
|
|
28997
29038
|
},
|
|
28998
29039
|
{
|
|
28999
29040
|
"name": "propagateChange",
|
|
@@ -29003,7 +29044,7 @@
|
|
|
29003
29044
|
"type": "",
|
|
29004
29045
|
"optional": false,
|
|
29005
29046
|
"description": "<p>function passed in by <code>registerOnChange</code></p>\n",
|
|
29006
|
-
"line":
|
|
29047
|
+
"line": 529,
|
|
29007
29048
|
"rawdescription": "\n\nfunction passed in by `registerOnChange`\n"
|
|
29008
29049
|
},
|
|
29009
29050
|
{
|
|
@@ -29013,7 +29054,7 @@
|
|
|
29013
29054
|
"type": "AbstractDropdownView",
|
|
29014
29055
|
"optional": false,
|
|
29015
29056
|
"description": "<p>Maintains a reference to the <code>AbstractDropdownView</code> object within the content DOM.</p>\n",
|
|
29016
|
-
"line":
|
|
29057
|
+
"line": 335,
|
|
29017
29058
|
"rawdescription": "\n\nMaintains a reference to the `AbstractDropdownView` object within the content DOM.\n",
|
|
29018
29059
|
"decorators": [
|
|
29019
29060
|
{
|
|
@@ -29033,7 +29074,7 @@
|
|
|
29033
29074
|
"optional": false,
|
|
29034
29075
|
"returnType": "void",
|
|
29035
29076
|
"typeParameters": [],
|
|
29036
|
-
"line":
|
|
29077
|
+
"line": 708,
|
|
29037
29078
|
"deprecated": false,
|
|
29038
29079
|
"deprecationMessage": "",
|
|
29039
29080
|
"rawdescription": "\n\nCreates the `Dropdown` list as an element that is appended to the DOM body.\n",
|
|
@@ -29045,7 +29086,7 @@
|
|
|
29045
29086
|
"optional": false,
|
|
29046
29087
|
"returnType": "void",
|
|
29047
29088
|
"typeParameters": [],
|
|
29048
|
-
"line":
|
|
29089
|
+
"line": 700,
|
|
29049
29090
|
"deprecated": false,
|
|
29050
29091
|
"deprecationMessage": "",
|
|
29051
29092
|
"rawdescription": "\n\nCreates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n",
|
|
@@ -29064,7 +29105,7 @@
|
|
|
29064
29105
|
"optional": false,
|
|
29065
29106
|
"returnType": "void",
|
|
29066
29107
|
"typeParameters": [],
|
|
29067
|
-
"line":
|
|
29108
|
+
"line": 680,
|
|
29068
29109
|
"deprecated": false,
|
|
29069
29110
|
"deprecationMessage": "",
|
|
29070
29111
|
"rawdescription": "\n\nHandles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n",
|
|
@@ -29087,7 +29128,7 @@
|
|
|
29087
29128
|
"optional": false,
|
|
29088
29129
|
"returnType": "void",
|
|
29089
29130
|
"typeParameters": [],
|
|
29090
|
-
"line":
|
|
29131
|
+
"line": 660,
|
|
29091
29132
|
"deprecated": false,
|
|
29092
29133
|
"deprecationMessage": ""
|
|
29093
29134
|
},
|
|
@@ -29104,7 +29145,7 @@
|
|
|
29104
29145
|
"optional": false,
|
|
29105
29146
|
"returnType": "void",
|
|
29106
29147
|
"typeParameters": [],
|
|
29107
|
-
"line":
|
|
29148
|
+
"line": 664,
|
|
29108
29149
|
"deprecated": false,
|
|
29109
29150
|
"deprecationMessage": "",
|
|
29110
29151
|
"rawdescription": "\n\nHandles clicks outside of the `Dropdown`.\n",
|
|
@@ -29134,7 +29175,7 @@
|
|
|
29134
29175
|
"optional": false,
|
|
29135
29176
|
"returnType": "void",
|
|
29136
29177
|
"typeParameters": [],
|
|
29137
|
-
"line":
|
|
29178
|
+
"line": 672,
|
|
29138
29179
|
"deprecated": false,
|
|
29139
29180
|
"deprecationMessage": "",
|
|
29140
29181
|
"jsdoctags": [
|
|
@@ -29155,7 +29196,7 @@
|
|
|
29155
29196
|
"optional": false,
|
|
29156
29197
|
"returnType": "any",
|
|
29157
29198
|
"typeParameters": [],
|
|
29158
|
-
"line":
|
|
29199
|
+
"line": 722,
|
|
29159
29200
|
"deprecated": false,
|
|
29160
29201
|
"deprecationMessage": "",
|
|
29161
29202
|
"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",
|
|
@@ -29167,7 +29208,7 @@
|
|
|
29167
29208
|
"optional": false,
|
|
29168
29209
|
"returnType": "void",
|
|
29169
29210
|
"typeParameters": [],
|
|
29170
|
-
"line":
|
|
29211
|
+
"line": 641,
|
|
29171
29212
|
"deprecated": false,
|
|
29172
29213
|
"deprecationMessage": ""
|
|
29173
29214
|
},
|
|
@@ -29184,7 +29225,7 @@
|
|
|
29184
29225
|
"optional": false,
|
|
29185
29226
|
"returnType": "void",
|
|
29186
29227
|
"typeParameters": [],
|
|
29187
|
-
"line":
|
|
29228
|
+
"line": 581,
|
|
29188
29229
|
"deprecated": false,
|
|
29189
29230
|
"deprecationMessage": "",
|
|
29190
29231
|
"jsdoctags": [
|
|
@@ -29205,7 +29246,7 @@
|
|
|
29205
29246
|
"optional": false,
|
|
29206
29247
|
"returnType": "void",
|
|
29207
29248
|
"typeParameters": [],
|
|
29208
|
-
"line":
|
|
29249
|
+
"line": 786,
|
|
29209
29250
|
"deprecated": false,
|
|
29210
29251
|
"deprecationMessage": "",
|
|
29211
29252
|
"rawdescription": "\n\nCollapsing the dropdown menu and removing unnecessary `EventListeners`.\n",
|
|
@@ -29217,7 +29258,7 @@
|
|
|
29217
29258
|
"optional": false,
|
|
29218
29259
|
"returnType": "Observable<string>",
|
|
29219
29260
|
"typeParameters": [],
|
|
29220
|
-
"line":
|
|
29261
|
+
"line": 600,
|
|
29221
29262
|
"deprecated": false,
|
|
29222
29263
|
"deprecationMessage": "",
|
|
29223
29264
|
"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",
|
|
@@ -29229,7 +29270,7 @@
|
|
|
29229
29270
|
"optional": false,
|
|
29230
29271
|
"returnType": "{ items: any; item?: undefined; } | { item: any; items?: undefined; } | { items?: undefined; item?: undefined; }",
|
|
29231
29272
|
"typeParameters": [],
|
|
29232
|
-
"line":
|
|
29273
|
+
"line": 621,
|
|
29233
29274
|
"deprecated": false,
|
|
29234
29275
|
"deprecationMessage": ""
|
|
29235
29276
|
},
|
|
@@ -29239,17 +29280,45 @@
|
|
|
29239
29280
|
"optional": false,
|
|
29240
29281
|
"returnType": "number",
|
|
29241
29282
|
"typeParameters": [],
|
|
29242
|
-
"line":
|
|
29283
|
+
"line": 635,
|
|
29243
29284
|
"deprecated": false,
|
|
29244
29285
|
"deprecationMessage": ""
|
|
29245
29286
|
},
|
|
29287
|
+
{
|
|
29288
|
+
"name": "handleFocus",
|
|
29289
|
+
"args": [
|
|
29290
|
+
{
|
|
29291
|
+
"name": "event",
|
|
29292
|
+
"type": "FocusEvent",
|
|
29293
|
+
"deprecated": false,
|
|
29294
|
+
"deprecationMessage": ""
|
|
29295
|
+
}
|
|
29296
|
+
],
|
|
29297
|
+
"optional": false,
|
|
29298
|
+
"returnType": "void",
|
|
29299
|
+
"typeParameters": [],
|
|
29300
|
+
"line": 828,
|
|
29301
|
+
"deprecated": false,
|
|
29302
|
+
"deprecationMessage": "",
|
|
29303
|
+
"jsdoctags": [
|
|
29304
|
+
{
|
|
29305
|
+
"name": "event",
|
|
29306
|
+
"type": "FocusEvent",
|
|
29307
|
+
"deprecated": false,
|
|
29308
|
+
"deprecationMessage": "",
|
|
29309
|
+
"tagName": {
|
|
29310
|
+
"text": "param"
|
|
29311
|
+
}
|
|
29312
|
+
}
|
|
29313
|
+
]
|
|
29314
|
+
},
|
|
29246
29315
|
{
|
|
29247
29316
|
"name": "isRenderString",
|
|
29248
29317
|
"args": [],
|
|
29249
29318
|
"optional": false,
|
|
29250
29319
|
"returnType": "boolean",
|
|
29251
29320
|
"typeParameters": [],
|
|
29252
|
-
"line":
|
|
29321
|
+
"line": 617,
|
|
29253
29322
|
"deprecated": false,
|
|
29254
29323
|
"deprecationMessage": ""
|
|
29255
29324
|
},
|
|
@@ -29266,7 +29335,7 @@
|
|
|
29266
29335
|
"optional": false,
|
|
29267
29336
|
"returnType": "boolean",
|
|
29268
29337
|
"typeParameters": [],
|
|
29269
|
-
"line":
|
|
29338
|
+
"line": 824,
|
|
29270
29339
|
"deprecated": false,
|
|
29271
29340
|
"deprecationMessage": "",
|
|
29272
29341
|
"modifierKind": [
|
|
@@ -29290,7 +29359,7 @@
|
|
|
29290
29359
|
"optional": false,
|
|
29291
29360
|
"returnType": "void",
|
|
29292
29361
|
"typeParameters": [],
|
|
29293
|
-
"line":
|
|
29362
|
+
"line": 511,
|
|
29294
29363
|
"deprecated": false,
|
|
29295
29364
|
"deprecationMessage": ""
|
|
29296
29365
|
},
|
|
@@ -29307,7 +29376,7 @@
|
|
|
29307
29376
|
"optional": false,
|
|
29308
29377
|
"returnType": "void",
|
|
29309
29378
|
"typeParameters": [],
|
|
29310
|
-
"line":
|
|
29379
|
+
"line": 546,
|
|
29311
29380
|
"deprecated": false,
|
|
29312
29381
|
"deprecationMessage": "",
|
|
29313
29382
|
"rawdescription": "\n\nAdds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n",
|
|
@@ -29339,7 +29408,7 @@
|
|
|
29339
29408
|
"optional": false,
|
|
29340
29409
|
"returnType": "void",
|
|
29341
29410
|
"typeParameters": [],
|
|
29342
|
-
"line":
|
|
29411
|
+
"line": 742,
|
|
29343
29412
|
"deprecated": false,
|
|
29344
29413
|
"deprecationMessage": "",
|
|
29345
29414
|
"rawdescription": "\n\nExpands the dropdown menu in the view.\n",
|
|
@@ -29358,7 +29427,7 @@
|
|
|
29358
29427
|
"optional": false,
|
|
29359
29428
|
"returnType": "void",
|
|
29360
29429
|
"typeParameters": [],
|
|
29361
|
-
"line":
|
|
29430
|
+
"line": 515,
|
|
29362
29431
|
"deprecated": false,
|
|
29363
29432
|
"deprecationMessage": "",
|
|
29364
29433
|
"jsdoctags": [
|
|
@@ -29386,7 +29455,7 @@
|
|
|
29386
29455
|
"optional": false,
|
|
29387
29456
|
"returnType": "void",
|
|
29388
29457
|
"typeParameters": [],
|
|
29389
|
-
"line":
|
|
29458
|
+
"line": 522,
|
|
29390
29459
|
"deprecated": false,
|
|
29391
29460
|
"deprecationMessage": "",
|
|
29392
29461
|
"rawdescription": "\n\nRegistering the function injected to control the touch use of the `Dropdown`.\n",
|
|
@@ -29416,7 +29485,7 @@
|
|
|
29416
29485
|
"optional": false,
|
|
29417
29486
|
"returnType": "void",
|
|
29418
29487
|
"typeParameters": [],
|
|
29419
|
-
"line":
|
|
29488
|
+
"line": 538,
|
|
29420
29489
|
"deprecated": false,
|
|
29421
29490
|
"deprecationMessage": "",
|
|
29422
29491
|
"rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the dropdown.\n\nex: `this.formGroup.get(\"myDropdown\").disable();`\n\n",
|
|
@@ -29424,8 +29493,8 @@
|
|
|
29424
29493
|
"jsdoctags": [
|
|
29425
29494
|
{
|
|
29426
29495
|
"name": {
|
|
29427
|
-
"pos":
|
|
29428
|
-
"end":
|
|
29496
|
+
"pos": 16389,
|
|
29497
|
+
"end": 16399,
|
|
29429
29498
|
"flags": 16842752,
|
|
29430
29499
|
"modifierFlagsCache": 0,
|
|
29431
29500
|
"transformFlags": 0,
|
|
@@ -29436,8 +29505,8 @@
|
|
|
29436
29505
|
"deprecated": false,
|
|
29437
29506
|
"deprecationMessage": "",
|
|
29438
29507
|
"tagName": {
|
|
29439
|
-
"pos":
|
|
29440
|
-
"end":
|
|
29508
|
+
"pos": 16383,
|
|
29509
|
+
"end": 16388,
|
|
29441
29510
|
"flags": 16842752,
|
|
29442
29511
|
"modifierFlagsCache": 0,
|
|
29443
29512
|
"transformFlags": 0,
|
|
@@ -29454,7 +29523,7 @@
|
|
|
29454
29523
|
"optional": false,
|
|
29455
29524
|
"returnType": "void",
|
|
29456
29525
|
"typeParameters": [],
|
|
29457
|
-
"line":
|
|
29526
|
+
"line": 816,
|
|
29458
29527
|
"deprecated": false,
|
|
29459
29528
|
"deprecationMessage": "",
|
|
29460
29529
|
"rawdescription": "\n\nControls toggling menu states between open/expanded and closed/collapsed.\n",
|
|
@@ -29466,7 +29535,7 @@
|
|
|
29466
29535
|
"optional": false,
|
|
29467
29536
|
"returnType": "boolean",
|
|
29468
29537
|
"typeParameters": [],
|
|
29469
|
-
"line":
|
|
29538
|
+
"line": 655,
|
|
29470
29539
|
"deprecated": false,
|
|
29471
29540
|
"deprecationMessage": "",
|
|
29472
29541
|
"rawdescription": "\n\nReturns `true` if there is a value selected.\n",
|
|
@@ -29485,7 +29554,7 @@
|
|
|
29485
29554
|
"optional": false,
|
|
29486
29555
|
"returnType": "void",
|
|
29487
29556
|
"typeParameters": [],
|
|
29488
|
-
"line":
|
|
29557
|
+
"line": 472,
|
|
29489
29558
|
"deprecated": false,
|
|
29490
29559
|
"deprecationMessage": "",
|
|
29491
29560
|
"rawdescription": "\n\nPropagates the injected `value`.\n",
|
|
@@ -29511,7 +29580,32 @@
|
|
|
29511
29580
|
"defaultValue": "true",
|
|
29512
29581
|
"deprecated": false,
|
|
29513
29582
|
"deprecationMessage": "",
|
|
29514
|
-
"line":
|
|
29583
|
+
"line": 345,
|
|
29584
|
+
"type": "boolean",
|
|
29585
|
+
"decorators": []
|
|
29586
|
+
},
|
|
29587
|
+
{
|
|
29588
|
+
"name": "class.cds--list-box__wrapper",
|
|
29589
|
+
"defaultValue": "true",
|
|
29590
|
+
"deprecated": false,
|
|
29591
|
+
"deprecationMessage": "",
|
|
29592
|
+
"line": 347,
|
|
29593
|
+
"type": "boolean",
|
|
29594
|
+
"decorators": []
|
|
29595
|
+
},
|
|
29596
|
+
{
|
|
29597
|
+
"name": "class.cds--list-box__wrapper--fluid--focus",
|
|
29598
|
+
"deprecated": false,
|
|
29599
|
+
"deprecationMessage": "",
|
|
29600
|
+
"line": 195,
|
|
29601
|
+
"type": "boolean",
|
|
29602
|
+
"decorators": []
|
|
29603
|
+
},
|
|
29604
|
+
{
|
|
29605
|
+
"name": "class.cds--list-box__wrapper--fluid--invalid",
|
|
29606
|
+
"deprecated": false,
|
|
29607
|
+
"deprecationMessage": "",
|
|
29608
|
+
"line": 191,
|
|
29515
29609
|
"type": "boolean",
|
|
29516
29610
|
"decorators": []
|
|
29517
29611
|
}
|
|
@@ -29534,7 +29628,7 @@
|
|
|
29534
29628
|
"deprecationMessage": "",
|
|
29535
29629
|
"rawdescription": "\n\nAdds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n",
|
|
29536
29630
|
"description": "<p>Adds keyboard functionality for navigation, selection and closing of the <code>Dropdown</code>.</p>\n",
|
|
29537
|
-
"line":
|
|
29631
|
+
"line": 546
|
|
29538
29632
|
}
|
|
29539
29633
|
],
|
|
29540
29634
|
"standalone": false,
|
|
@@ -29542,7 +29636,7 @@
|
|
|
29542
29636
|
"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'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]="null"</code> is the default (auto detection)</li>\n<li><code>[appendInline]="false"</code> will always append to the body/<code>cds-placeholder</code></li>\n<li><code>[appendInline]="true"</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 'carbon-components-angular';</code></pre></div><p><a href=\"../../?path=/story/components-dropdown--basic\">See demo</a></p>\n",
|
|
29543
29637
|
"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",
|
|
29544
29638
|
"type": "component",
|
|
29545
|
-
"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",
|
|
29639
|
+
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tElementRef,\n\tContentChild,\n\tOnInit,\n\tViewChild,\n\tAfterContentInit,\n\tHostListener,\n\tOnDestroy,\n\tHostBinding,\n\tTemplateRef,\n\tAfterViewInit\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from \"@angular/forms\";\n\n// Observable import is required here so typescript can compile correctly\nimport {\n\tObservable,\n\tof,\n\tSubscription\n} from \"rxjs\";\n\nimport { AbstractDropdownView } from \"./abstract-dropdown-view.class\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { ListItem } from \"./list-item.interface\";\nimport { DropdownService } from \"./dropdown.service\";\nimport { ElementService, getScrollableParents } from \"carbon-components-angular/utils\";\nimport { hasScrollableParents } from \"carbon-components-angular/utils\";\n\n/**\n * Drop-down lists enable users to select one or more items from a list.\n *\n * #### Opening behavior/List DOM placement\n * By default the dropdown will try to figure out the best placement for the dropdown list.\n *\n * If it's not contained within any scrolling elements, it will open inline, if it _is_\n * contained within a scrolling container it will try to open in the body, or an `cds-placeholder`.\n *\n * To control this behavior you can use the `appendInline` input:\n * - `[appendInline]=\"null\"` is the default (auto detection)\n * - `[appendInline]=\"false\"` will always append to the body/`cds-placeholder`\n * - `[appendInline]=\"true\"` will always append inline (next to the dropdown button)\n *\n * Get started with importing the module:\n *\n * ```typescript\n * import { DropdownModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-dropdown--basic)\n */\n@Component({\n\tselector: \"cds-dropdown, ibm-dropdown\",\n\ttemplate: `\n\t<label\n\t\t*ngIf=\"label && !skeleton\"\n\t\t[for]=\"id\"\n\t\tclass=\"cds--label\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--label--disabled': disabled,\n\t\t\t'cds--visually-hidden': hideLabel\n\t\t}\">\n\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t</label>\n\t<div\n\t\tclass=\"cds--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--dropdown': type !== 'multi' && !(skeleton && fluid),\n\t\t\t'cds--multiselect': type === 'multi',\n\t\t\t'cds--multi-select--selected': type === 'multi' && getSelectedCount() > 0,\n\t\t\t'cds--dropdown--light': theme === 'light',\n\t\t\t'cds--list-box--light': theme === 'light',\n\t\t\t'cds--list-box--inline': inline,\n\t\t\t'cds--skeleton': skeleton,\n\t\t\t'cds--dropdown--disabled cds--list-box--disabled': disabled,\n\t\t\t'cds--dropdown--readonly': readonly,\n\t\t\t'cds--dropdown--invalid': invalid,\n\t\t\t'cds--dropdown--warning cds--list-box--warning': warn,\n\t\t\t'cds--dropdown--sm cds--list-box--sm': size === 'sm',\n\t\t\t'cds--dropdown--md cds--list-box--md': size === 'md',\n\t\t\t'cds--dropdown--lg cds--list-box--lg': size === 'lg',\n\t\t\t'cds--list-box--expanded': !menuIsClosed,\n\t\t\t'cds--list-box--invalid': invalid\n\t\t}\"\n\t\t[attr.data-invalid]=\"invalid ? true : null\">\n\t\t<div *ngIf=\"skeleton && fluid\" class=\"cds--list-box__label\"></div>\n\t\t<button\n\t\t\t#dropdownButton\n\t\t\t[id]=\"id\"\n\t\t\ttype=\"button\"\n\t\t\tclass=\"cds--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\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(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t(blur)=\"fluid ? handleFocus($event) : onBlur()\"\n\t\t\t[attr.disabled]=\"disabled ? true : null\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t(keydown.enter)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"cds--list-box__selection cds--tag--filter cds--list-box__selection--multi\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[title]=\"clearText\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"cds--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<span class=\"cds--list-box__menu-icon\">\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t\t[ngClass]=\"{'cds--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t</button>\n\t\t<svg\n\t\t\t*ngIf=\"invalid\"\n\t\t\tclass=\"cds--list-box__invalid-icon\"\n\t\t\tcdsIcon=\"warning--filled\"\n\t\t\tsize=\"16\">\n\t\t</svg>\n\t\t<svg\n\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\tsize=\"16\"\n\t\t\tclass=\"cds--list-box__invalid-icon cds--list-box__invalid-icon--warning\">\n\t\t</svg>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--list-box--up': this.dropUp !== null && this.dropUp !== undefined ? dropUp : _dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t<hr *ngIf=\"fluid\" class=\"cds--list-box__divider\" />\n\t<div\n\t\t*ngIf=\"helperText && !invalid && !warn && !skeleton && !fluid\"\n\t\tclass=\"cds--form__helper-text\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--form__helper-text--disabled': disabled\n\t\t}\">\n\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t</div>\n\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{ invalidText }}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t</div>\n\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Dropdown,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Dropdown implements OnInit, AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {\n\tstatic dropdownCount = 0;\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid--invalid\") get fluidInvalidClass() {\n\t\treturn this.invalid && this.fluid;\n\t}\n\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid--focus\") get fluidFocusClass() {\n\t\treturn this.fluid && this._isFocused && this.menuIsClosed;\n\t}\n\n\tprotected get writtenValue() {\n\t\treturn this._writtenValue;\n\t}\n\n\tprotected set writtenValue(val: any[]) {\n\t\tif (val && val.length === 0) {\n\t\t\tthis.clearSelected();\n\t\t}\n\t\tthis._writtenValue = val;\n\t}\n\n\t@Input() id = `dropdown-${Dropdown.dropdownCount++}`;\n\t/**\n\t * Label for the dropdown.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Hide label while keeping it accessible for screen readers\n\t */\n\t@Input() hideLabel = false;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * Value displayed if no item is selected.\n\t */\n\t@Input() placeholder = \"\";\n\t/**\n\t * The selected value from the `Dropdown`. Can be a string or template.\n\t */\n\t@Input() displayValue: string | TemplateRef<any> = \"\";\n\t/**\n\t * Sets the optional clear button tooltip text.\n\t */\n\t@Input() clearText: string = this.i18n.get().DROPDOWN.CLEAR;\n\t/**\n\t * Size to render the dropdown field.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Defines whether or not the `Dropdown` supports selecting multiple items as opposed to single\n\t * item selection.\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * `light` or `dark` dropdown theme\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Set to `true` to disable the dropdown.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for a readonly state.\n\t */\n\t@Input() readonly = false;\n\t/**\n\t * Set to `true` for a loading dropdown.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * Set to `true` for an inline dropdown.\n\t */\n\t@Input() inline = false;\n\t/**\n\t * Set to `true` for a dropdown without arrow key activation.\n\t */\n\t@Input() disableArrowKeys = false;\n\t/**\n\t * Set to `true` for invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if dropdown is in invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning (contents set by warningText)\n\t */\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline: boolean = null;\n\t/**\n\t * Query string for the element that contains the `Dropdown`.\n\t * Used to trigger closing the dropdown if it scrolls outside of the viewport of the `scrollableContainer`.\n\t */\n\t@Input() scrollableContainer: string;\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() itemValueKey: string;\n\t/**\n\t * Specify feedback (mode) of the selection.\n\t * `top`: selected item jumps to top\n\t * `fixed`: selected item stays at it's position\n\t * `top-after-reopen`: selected item jump to top after reopen dropdown\n\t */\n\t@Input() selectionFeedback: \"top\" | \"fixed\" | \"top-after-reopen\" = \"top-after-reopen\";\n\t/**\n\t * Accessible label for the button that opens the dropdown list.\n\t * Defaults to the `DROPDOWN.OPEN` value from the i18n service.\n\t */\n\t@Input() menuButtonLabel = this.i18n.get().DROPDOWN.OPEN;\n\t/**\n\t * Provides the label for the \"# selected\" text.\n\t * Defaults to the `DROPDOWN.SELECTED` value from the i18n service.\n\t */\n\t@Input() selectedLabel = this.i18n.get().DROPDOWN.SELECTED;\n\t/**\n\t * Overrides the automatic dropUp.\n\t */\n\t@Input() dropUp: boolean;\n\t/**\n\t * Emits selection events.\n\t */\n\t@Output() selected: EventEmitter<Object> = new EventEmitter<Object>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter<any>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() close: EventEmitter<any> = new EventEmitter<any>();\n\n\t/**\n\t * Maintains a reference to the `AbstractDropdownView` object within the content DOM.\n\t */\n\t@ContentChild(AbstractDropdownView, { static: true }) view: AbstractDropdownView;\n\t/**\n\t * Maintains a reference to the view DOM element of the `Dropdown` button.\n\t */\n\t@ViewChild(\"dropdownButton\", { static: true }) dropdownButton;\n\t/**\n\t * ViewChid of the dropdown view.\n\t */\n\t@ViewChild(\"dropdownMenu\", { static: true }) dropdownMenu;\n\n\t@HostBinding(\"class.cds--dropdown__wrapper\") hostClass = true;\n\n\t@HostBinding(\"class.cds--list-box__wrapper\") hostWrapperClass = true;\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@HostBinding(\"class.cds--list-box__wrapper--fluid\") @Input() fluid = false;\n\n\t/**\n\t * Set to `true` if the dropdown is closed (not expanded).\n\t */\n\tmenuIsClosed = true;\n\n\t/**\n\t * controls whether the `drop-up` class is applied\n\t */\n\t_dropUp = false;\n\n\t// .bind creates a new function, so we declare the methods below\n\t// but .bind them up here\n\tnoop = this._noop.bind(this);\n\toutsideClick = this._outsideClick.bind(this);\n\toutsideKey = this._outsideKey.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\n\tprotected visibilitySubscription = new Subscription();\n\n\tprotected onTouchedCallback: () => void = this._noop;\n\n\tprotected _isFocused = false;\n\n\t// primarily used to capture and propagate input to `writeValue` before the content is available\n\tprivate _writtenValue: any = [];\n\n\t/**\n\t * Creates an instance of Dropdown.\n\t */\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected i18n: I18n,\n\t\tprotected dropdownService: DropdownService,\n\t\tprotected elementService: ElementService) {}\n\n\t/**\n\t * Updates the `type` property in the `@ContentChild`.\n\t * The `type` property specifies whether the `Dropdown` allows single selection or multi selection.\n\t */\n\tngOnInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\t\t}\n\t}\n\n\t/**\n\t * Initializes classes and subscribes to events for single or multi selection.\n\t */\n\tngAfterContentInit() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tif ((this.writtenValue && this.writtenValue.length) || typeof this.writtenValue === \"number\") {\n\t\t\tthis.writeValue(this.writtenValue);\n\t\t}\n\t\tthis.view.type = this.type;\n\t\tthis.view.size = this.size;\n\n\t\t// function to check if the event is organic (isUpdate === false) or programmatic\n\t\tconst isUpdate = event => event && event.isUpdate;\n\n\t\tthis.view.select.subscribe(event => {\n\t\t\tif (this.type === \"single\" && !isUpdate(event) && !Array.isArray(event)) {\n\t\t\t\tthis.closeMenu();\n\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t\tthis.propagateChange(event.item[this.itemValueKey]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.propagateChange(event.item);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.type === \"multi\" && !isUpdate(event)) {\n\t\t\t\t// if we have a `value` selector and selected items map them appropriately\n\t\t\t\tif (this.itemValueKey && this.view.getSelected()) {\n\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.itemValueKey]);\n\t\t\t\t\tthis.propagateChange(values);\n\t\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(this.view.getSelected());\n\t\t\t\t}\n\t\t\t}\n\t\t\t// only emit selected for \"organic\" selections\n\t\t\tif (!isUpdate(event)) {\n\t\t\t\tthis.checkForReorder();\n\t\t\t\tthis.selected.emit(event);\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit() {\n\t\t// if appendInline is default valued (null) we should:\n\t\t// 1. if there are scrollable parents (not including body) don't append inline\n\t\t// this should also cover the case where the dropdown is in a modal\n\t\t// (where we _do_ want to append to the placeholder)\n\t\tif (this.appendInline === null && hasScrollableParents(this.elementRef.nativeElement)) {\n\t\t\tthis.appendInline = false;\n\t\t\t// 2. otherwise we should append inline\n\t\t} else if (this.appendInline === null) {\n\t\t\tthis.appendInline = true;\n\t\t}\n\t\tthis.checkForReorder();\n\t}\n\n\t/**\n\t * Removing the `Dropdown` from the body if it is appended to the body.\n\t */\n\tngOnDestroy() {\n\t\tif (!this.appendInline) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Propagates the injected `value`.\n\t */\n\twriteValue(value: any) {\n\t\t// cache the written value so we can use it in `AfterContentInit`\n\t\tthis.writtenValue = value;\n\t\tthis.view.onItemsReady(() => {\n\t\t\t// propagate null/falsey as an array (deselect everything)\n\t\t\tif (!value) {\n\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t} else if (this.type === \"single\") {\n\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t// clone the specified item and update its state\n\t\t\t\t\tconst newValue = Object.assign({}, this.view.getListItems().find(item => item[this.itemValueKey] === value));\n\t\t\t\t\tnewValue.selected = true;\n\t\t\t\t\tthis.view.propagateSelected([newValue]);\n\t\t\t\t} else {\n\t\t\t\t\t// pass the singular value as an array of ListItem\n\t\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this.itemValueKey) {\n\t\t\t\t\t// clone the items and update their state based on the received value array\n\t\t\t\t\t// this way we don't lose any additional metadata that may be passed in via the `items` Input\n\t\t\t\t\tlet newValues = [];\n\t\t\t\t\tfor (const v of value) {\n\t\t\t\t\t\tfor (const item of this.view.getListItems()) {\n\t\t\t\t\t\t\tif (item[this.itemValueKey] === v) {\n\t\t\t\t\t\t\t\tnewValues.push(Object.assign({}, item, { selected: true }));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.view.propagateSelected(newValues);\n\t\t\t\t} else {\n\t\t\t\t\t// we can safely assume we're passing an array of `ListItem`s\n\t\t\t\t\tthis.view.propagateSelected(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.checkForReorder();\n\t\t});\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\t/**\n\t * Registering the function injected to control the touch use of the `Dropdown`.\n\t */\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\t/**\n\t * function passed in by `registerOnChange`\n\t */\n\tpropagateChange = (_: any) => { };\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the dropdown.\n\t *\n\t * ex: `this.formGroup.get(\"myDropdown\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the input\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Adds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (this.readonly) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ((event.key === \"Escape\") && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close other widgets that listen for Escape\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (this.menuIsClosed && (event.key === \" \" || event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) {\n\t\t\tif (this.disableArrowKeys && (event.key === \"ArrowDown\" || event.key === \"ArrowUp\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tthis.openMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && event.shiftKey) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (this.type === \"multi\") { return; }\n\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.closedDropdownNavigation(event);\n\t\t}\n\t}\n\n\tclosedDropdownNavigation(event) {\n\t\tif (event.key === \"ArrowDown\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getNextItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t} else if (event.key === \"ArrowUp\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getPrevItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t}\n\t}\n\n\t/**\n\t * Returns the display value if there is a selection and displayValue is set,\n\t * if there is just a selection the ListItem content property will be returned,\n\t * otherwise the placeholder will be returned.\n\t */\n\tgetDisplayStringValue(): Observable<string> {\n\t\tif (!this.view || this.skeleton) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (selected.length && (!this.displayValue || !this.isRenderString())) {\n\t\t\tif (this.type === \"multi\") {\n\t\t\t\treturn of(this.placeholder);\n\t\t\t} else {\n\t\t\t\treturn of(selected[0].content);\n\t\t\t}\n\t\t} else if (selected.length && this.isRenderString()) {\n\t\t\treturn of(this.displayValue as string);\n\t\t}\n\t\treturn of(this.placeholder);\n\t}\n\n\tisRenderString(): boolean {\n\t\treturn typeof this.displayValue === \"string\";\n\t}\n\n\tgetRenderTemplateContext() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\treturn { items: selected };\n\t\t} else if (selected && selected.length > 0) {\n\t\t\treturn { item: selected[0] }; // this is to be compatible with the dropdown-list template\n\t\t} else {\n\t\t\treturn {};\n\t\t}\n\t}\n\n\tgetSelectedCount(): number {\n\t\tif (this.view.getSelected()) {\n\t\t\treturn this.view.getSelected().length;\n\t\t}\n\t}\n\n\tclearSelected() {\n\t\tif (this.disabled || this.getSelectedCount() === 0) {\n\t\t\treturn;\n\t\t}\n\t\tfor (const item of this.view.getListItems()) {\n\t\t\titem.selected = false;\n\t\t}\n\t\tthis.selected.emit([]);\n\t\tthis.propagateChange([]);\n\t}\n\n\t/**\n\t * Returns `true` if there is a value selected.\n\t */\n\tvalueSelected(): boolean {\n\t\tif (this.view.getSelected()) { return true; }\n\t\treturn false;\n\t}\n\n\t_noop() { }\n\t/**\n\t * Handles clicks outside of the `Dropdown`.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t_outsideKey(event) {\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\tif (event.key === \"Escape\" && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (!this.menuIsClosed && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t\tthis.dropdownButton.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", { bubbles: true, cancelable: true, key: \"Tab\" }));\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tconst lightClass = this.theme === \"light\" ? \" cds--list-box--light\" : \"\";\n\t\tconst expandedClass = !this.menuIsClosed ? \" cds--list-box--expanded\" : \"\";\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.dropdownButton.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\t`${this.elementRef.nativeElement.className}${lightClass}${expandedClass}`);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Detects whether or not the `Dropdown` list is visible within all scrollable parents.\n\t * This can be overridden by passing in a value to the `dropUp` input.\n\t */\n\t_shouldDropUp() {\n\t\t// check if dropdownMenu exists first.\n\t\tconst menu = this.dropdownMenu && this.dropdownMenu.nativeElement.querySelector(\".cds--list-box__menu\");\n\t\t// check if menu exists first.\n\t\tconst menuRect = menu && menu.getBoundingClientRect();\n\t\tif (menu && menuRect) {\n\t\t\tconst scrollableParents = getScrollableParents(menu);\n\t\t\treturn scrollableParents.reduce((shouldDropUp: boolean, parent: HTMLElement) => {\n\t\t\t\tconst parentRect = parent.getBoundingClientRect();\n\t\t\t\tconst isBelowParent = !(menuRect.bottom <= parentRect.bottom);\n\t\t\t\treturn shouldDropUp || isBelowParent;\n\t\t\t}, false);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Expands the dropdown menu in the view.\n\t */\n\topenMenu() {\n\t\t// prevents the dropdown from opening when list of items is empty\n\t\tif (this.view.getListItems().length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._dropUp = false;\n\t\tthis.menuIsClosed = false;\n\n\t\t// move the dropdown list to the body if we're not appending inline\n\t\t// and position it relative to the dropdown wrapper\n\t\tif (!this.appendInline) {\n\t\t\tconst target = this.dropdownButton.nativeElement;\n\t\t\tconst parent = this.elementRef.nativeElement;\n\t\t\tthis.visibilitySubscription = this.elementService\n\t\t\t\t.visibility(target, parent)\n\t\t\t\t.subscribe(value => {\n\t\t\t\t\tif (!value.visible) {\n\t\t\t\t\t\tthis.closeMenu();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\t// set the dropdown menu to drop up if it's near the bottom of the screen\n\t\t// setTimeout lets us measure after it's visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tif (this.dropUp === null || this.dropUp === undefined) {\n\t\t\t\tthis._dropUp = this._shouldDropUp();\n\t\t\t}\n\t\t}, 0);\n\n\t\t// we bind noop to document.body.firstElementChild to allow safari to fire events\n\t\t// from document. Then we unbind everything later to keep things light.\n\t\tdocument.body.firstElementChild.addEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.addEventListener(\"keydown\", this.noop, true);\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.addEventListener(\"keydown\", this.outsideKey, true);\n\t\tsetTimeout(() => this.view.initFocus(), 0);\n\t}\n\n\t/**\n\t * Collapsing the dropdown menu and removing unnecessary `EventListeners`.\n\t */\n\tcloseMenu() {\n\t\t// return early if the menu is already closed\n\t\tif (this.menuIsClosed) { return; }\n\t\tthis.menuIsClosed = true;\n\t\tthis.checkForReorder();\n\t\tthis.onClose.emit();\n\t\tthis.close.emit();\n\n\t\t// focus the trigger button when we close ...\n\t\tthis.dropdownButton.nativeElement.focus();\n\n\t\t// remove the conditional once this api is settled and part of abstract-dropdown-view.class\n\t\tif (this.view[\"disableScroll\"]) {\n\t\t\tthis.view[\"disableScroll\"]();\n\t\t}\n\n\t\t// move the list back in the component on close\n\t\tif (!this.appendInline) {\n\t\t\tthis.visibilitySubscription.unsubscribe();\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t\tdocument.body.firstElementChild.removeEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.removeEventListener(\"keydown\", this.noop, true);\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.removeEventListener(\"keydown\", this.outsideKey, true);\n\t}\n\n\t/**\n\t * Controls toggling menu states between open/expanded and closed/collapsed.\n\t */\n\ttoggleMenu() {\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.openMenu();\n\t\t} else {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\thandleFocus(event: FocusEvent) {\n\t\tthis._isFocused = event.type === \"focus\";\n\t\tif (event.type === \"blur\") {\n\t\t\tthis.onBlur();\n\t\t}\n\t}\n\n\t/**\n\t * Controls when it's needed to apply the selection feedback\n\t */\n\tprotected checkForReorder() {\n\t\tconst topAfterReopen = this.menuIsClosed && this.selectionFeedback === \"top-after-reopen\";\n\t\tif ((this.type === \"multi\") && (topAfterReopen || this.selectionFeedback === \"top\")) {\n\t\t\tthis.view.reorderSelected();\n\t\t}\n\t}\n}\n",
|
|
29546
29640
|
"assetsDirs": [],
|
|
29547
29641
|
"styleUrlsData": "",
|
|
29548
29642
|
"stylesData": "",
|
|
@@ -29577,7 +29671,7 @@
|
|
|
29577
29671
|
"deprecationMessage": ""
|
|
29578
29672
|
}
|
|
29579
29673
|
],
|
|
29580
|
-
"line":
|
|
29674
|
+
"line": 377,
|
|
29581
29675
|
"rawdescription": "\n\nCreates an instance of Dropdown.\n",
|
|
29582
29676
|
"jsdoctags": [
|
|
29583
29677
|
{
|
|
@@ -29625,7 +29719,27 @@
|
|
|
29625
29719
|
"AfterViewInit",
|
|
29626
29720
|
"OnDestroy",
|
|
29627
29721
|
"ControlValueAccessor"
|
|
29628
|
-
]
|
|
29722
|
+
],
|
|
29723
|
+
"accessors": {
|
|
29724
|
+
"fluidInvalidClass": {
|
|
29725
|
+
"name": "fluidInvalidClass",
|
|
29726
|
+
"getSignature": {
|
|
29727
|
+
"name": "fluidInvalidClass",
|
|
29728
|
+
"type": "",
|
|
29729
|
+
"returnType": "",
|
|
29730
|
+
"line": 191
|
|
29731
|
+
}
|
|
29732
|
+
},
|
|
29733
|
+
"fluidFocusClass": {
|
|
29734
|
+
"name": "fluidFocusClass",
|
|
29735
|
+
"getSignature": {
|
|
29736
|
+
"name": "fluidFocusClass",
|
|
29737
|
+
"type": "",
|
|
29738
|
+
"returnType": "",
|
|
29739
|
+
"line": 195
|
|
29740
|
+
}
|
|
29741
|
+
}
|
|
29742
|
+
}
|
|
29629
29743
|
},
|
|
29630
29744
|
{
|
|
29631
29745
|
"name": "DropdownList",
|
|
@@ -73464,7 +73578,7 @@
|
|
|
73464
73578
|
"name": "Basic",
|
|
73465
73579
|
"ctype": "miscellaneous",
|
|
73466
73580
|
"subtype": "variable",
|
|
73467
|
-
"file": "src/
|
|
73581
|
+
"file": "src/button/button-set.stories.ts",
|
|
73468
73582
|
"deprecated": false,
|
|
73469
73583
|
"deprecationMessage": "",
|
|
73470
73584
|
"type": "",
|
|
@@ -73474,7 +73588,7 @@
|
|
|
73474
73588
|
"name": "Basic",
|
|
73475
73589
|
"ctype": "miscellaneous",
|
|
73476
73590
|
"subtype": "variable",
|
|
73477
|
-
"file": "src/button/button
|
|
73591
|
+
"file": "src/button/button.stories.ts",
|
|
73478
73592
|
"deprecated": false,
|
|
73479
73593
|
"deprecationMessage": "",
|
|
73480
73594
|
"type": "",
|
|
@@ -73484,7 +73598,7 @@
|
|
|
73484
73598
|
"name": "Basic",
|
|
73485
73599
|
"ctype": "miscellaneous",
|
|
73486
73600
|
"subtype": "variable",
|
|
73487
|
-
"file": "src/button/button.stories.ts",
|
|
73601
|
+
"file": "src/button/icon-button.stories.ts",
|
|
73488
73602
|
"deprecated": false,
|
|
73489
73603
|
"deprecationMessage": "",
|
|
73490
73604
|
"type": "",
|
|
@@ -73494,7 +73608,7 @@
|
|
|
73494
73608
|
"name": "Basic",
|
|
73495
73609
|
"ctype": "miscellaneous",
|
|
73496
73610
|
"subtype": "variable",
|
|
73497
|
-
"file": "src/
|
|
73611
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
73498
73612
|
"deprecated": false,
|
|
73499
73613
|
"deprecationMessage": "",
|
|
73500
73614
|
"type": "",
|
|
@@ -74501,6 +74615,26 @@
|
|
|
74501
74615
|
"type": "",
|
|
74502
74616
|
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/table/stories/app-model-filter-table.component.ts\n\t\t-->\n\t\t<app-model-filter-table\n\t\t\t[stickyHeader]=\"stickyHeader\"\n\t\t\t[size]=\"size\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t[striped]=\"striped\"\n\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t</app-model-filter-table>\n\t`\n})"
|
|
74503
74617
|
},
|
|
74618
|
+
{
|
|
74619
|
+
"name": "Fluid",
|
|
74620
|
+
"ctype": "miscellaneous",
|
|
74621
|
+
"subtype": "variable",
|
|
74622
|
+
"file": "src/combobox/combobox.stories.ts",
|
|
74623
|
+
"deprecated": false,
|
|
74624
|
+
"deprecationMessage": "",
|
|
74625
|
+
"type": "",
|
|
74626
|
+
"defaultValue": "Template.bind({})"
|
|
74627
|
+
},
|
|
74628
|
+
{
|
|
74629
|
+
"name": "Fluid",
|
|
74630
|
+
"ctype": "miscellaneous",
|
|
74631
|
+
"subtype": "variable",
|
|
74632
|
+
"file": "src/dropdown/dropdown.stories.ts",
|
|
74633
|
+
"deprecated": false,
|
|
74634
|
+
"deprecationMessage": "",
|
|
74635
|
+
"type": "",
|
|
74636
|
+
"defaultValue": "Template.bind({})"
|
|
74637
|
+
},
|
|
74504
74638
|
{
|
|
74505
74639
|
"name": "Fluid",
|
|
74506
74640
|
"ctype": "miscellaneous",
|
|
@@ -75185,7 +75319,7 @@
|
|
|
75185
75319
|
"deprecated": false,
|
|
75186
75320
|
"deprecationMessage": "",
|
|
75187
75321
|
"type": "",
|
|
75188
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
|
|
75322
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
|
|
75189
75323
|
},
|
|
75190
75324
|
{
|
|
75191
75325
|
"name": "MultiTemplate",
|
|
@@ -75195,7 +75329,7 @@
|
|
|
75195
75329
|
"deprecated": false,
|
|
75196
75330
|
"deprecationMessage": "",
|
|
75197
75331
|
"type": "",
|
|
75198
|
-
"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})"
|
|
75332
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\ttype=\"multi\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
|
|
75199
75333
|
},
|
|
75200
75334
|
{
|
|
75201
75335
|
"name": "MultiTemplate",
|
|
@@ -76286,41 +76420,41 @@
|
|
|
76286
76420
|
"name": "Template",
|
|
76287
76421
|
"ctype": "miscellaneous",
|
|
76288
76422
|
"subtype": "variable",
|
|
76289
|
-
"file": "src/
|
|
76423
|
+
"file": "src/button/button-set.stories.ts",
|
|
76290
76424
|
"deprecated": false,
|
|
76291
76425
|
"deprecationMessage": "",
|
|
76292
76426
|
"type": "",
|
|
76293
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-
|
|
76427
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-button-set>\n\t\t\t<button cdsButton=\"secondary\" [size]=\"size\" [isExpressive]=\"isExpressive\">Button</button>\n\t\t\t<button cdsButton [size]=\"size\" [isExpressive]=\"isExpressive\">Button</button>\n\t\t</cds-button-set>\n\t`\n})"
|
|
76294
76428
|
},
|
|
76295
76429
|
{
|
|
76296
76430
|
"name": "Template",
|
|
76297
76431
|
"ctype": "miscellaneous",
|
|
76298
76432
|
"subtype": "variable",
|
|
76299
|
-
"file": "src/button/button
|
|
76433
|
+
"file": "src/button/button.stories.ts",
|
|
76300
76434
|
"deprecated": false,
|
|
76301
76435
|
"deprecationMessage": "",
|
|
76302
76436
|
"type": "",
|
|
76303
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<
|
|
76437
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<button\n\t\t\t[cdsButton]=\"kind\"\n\t\t\t[size]=\"size\"\n\t\t\t[isExpressive]=\"isExpressive\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(click)=\"onClick($event)\"\n\t\t\t(mouseenter)=\"onMouseEnter($event)\"\n\t\t\t(mouseleave)=\"onMouseLeave($event)\"\n\t\t\t(focus)=\"onFocus($event)\"\n\t\t\t(blur)=\"onBlur($event)\">\n\t\t\tButton\n\t\t</button>\n\t`\n})"
|
|
76304
76438
|
},
|
|
76305
76439
|
{
|
|
76306
76440
|
"name": "Template",
|
|
76307
76441
|
"ctype": "miscellaneous",
|
|
76308
76442
|
"subtype": "variable",
|
|
76309
|
-
"file": "src/button/button.stories.ts",
|
|
76443
|
+
"file": "src/button/icon-button.stories.ts",
|
|
76310
76444
|
"deprecated": false,
|
|
76311
76445
|
"deprecationMessage": "",
|
|
76312
76446
|
"type": "",
|
|
76313
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<button\n\t\t\t[
|
|
76447
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-icon-button\n\t\t\tbuttonId=\"icon-btn1\"\n\t\t\ttype=\"button\"\n\t\t\t[kind]=\"kind\"\n\t\t\t[size]=\"size\"\n\t\t\t[align]=\"align\"\n\t\t\t[buttonNgClass]=\"buttonNgClass\"\n\t\t\t[buttonAttributes]=\"buttonAttributes\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\tdescription=\"Icon Description\"\n\t\t\t(click)=\"onClick($event)\"\n\t\t\t(mouseenter)=\"onMouseEnter($event)\"\n\t\t\t(mouseleave)=\"onMouseLeave($event)\"\n\t\t\t(focus)=\"onFocus($event)\"\n\t\t\t(blur)=\"onBlur($event)\">\n\t\t\t<svg class=\"cds--btn__icon\" cdsIcon=\"copy\" size=\"16\"></svg>\n\t\t</cds-icon-button>\n\t`\n})"
|
|
76314
76448
|
},
|
|
76315
76449
|
{
|
|
76316
76450
|
"name": "Template",
|
|
76317
76451
|
"ctype": "miscellaneous",
|
|
76318
76452
|
"subtype": "variable",
|
|
76319
|
-
"file": "src/
|
|
76453
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
76320
76454
|
"deprecated": false,
|
|
76321
76455
|
"deprecationMessage": "",
|
|
76322
76456
|
"type": "",
|
|
76323
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-
|
|
76457
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-breadcrumb [noTrailingSlash]=\"noTrailingSlash\">\n\t\t\t<cds-breadcrumb-item href=\"#1\">\n\t\t\t\tBreadcrumb 1\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item href=\"#2\">\n\t\t\t\tBreadcrumb 2\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item href=\"#3\">\n\t\t\t\tBreadcrumb 3\n\t\t\t</cds-breadcrumb-item>\n\t\t</cds-breadcrumb>\n\t`\n})"
|
|
76324
76458
|
},
|
|
76325
76459
|
{
|
|
76326
76460
|
"name": "Template",
|
|
@@ -76350,7 +76484,7 @@
|
|
|
76350
76484
|
"deprecated": false,
|
|
76351
76485
|
"deprecationMessage": "",
|
|
76352
76486
|
"type": "",
|
|
76353
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
|
|
76487
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
|
|
76354
76488
|
},
|
|
76355
76489
|
{
|
|
76356
76490
|
"name": "Template",
|
|
@@ -76390,7 +76524,7 @@
|
|
|
76390
76524
|
"deprecated": false,
|
|
76391
76525
|
"deprecationMessage": "",
|
|
76392
76526
|
"type": "",
|
|
76393
|
-
"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})"
|
|
76527
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t`\n})"
|
|
76394
76528
|
},
|
|
76395
76529
|
{
|
|
76396
76530
|
"name": "Template",
|
|
@@ -80096,199 +80230,199 @@
|
|
|
80096
80230
|
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<div style=\"width: 500px\">\n\t\t\t<cds-accordion>\n\t\t\t\t<cds-accordion-item [title]=\"title\" (selected)=\"selected($event)\">\n\t\t\t\t\tLorem ipsum dolor sit amet, \\\n\t\t\t\t\tconsectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \\\n\t\t\t\t\tet dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\n\t\t\t\t\tullamco laboris nisi ut aliquip ex ea commodo consequat.\n\t\t\t\t</cds-accordion-item>\n\t\t\t\t<cds-accordion-item [title]=\"titleWithContext\" [context]=\"{ index: 2 }\" (selected)=\"selected($event)\">\n\t\t\t\t\tLorem ipsum dolor sit amet, \\\n\t\t\t\t\tconsectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore \\\n\t\t\t\t\tet dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \\\n\t\t\t\t\tullamco laboris nisi ut aliquip ex ea commodo consequat.\n\t\t\t\t</cds-accordion-item>\n\t\t\t</cds-accordion>\n\t\t</div>\n\t\t<ng-template #title>\n\t\t\t<p class=\"cds--accordion__title\">Section 1 title</p>\n\t\t</ng-template>\n\t\t<ng-template #titleWithContext let-index=\"index\">\n\t\t\t<p class=\"cds--accordion__title\">Section {{ index }} title</p>\n\t\t</ng-template>\n\t`\n})"
|
|
80097
80231
|
}
|
|
80098
80232
|
],
|
|
80099
|
-
"src/
|
|
80233
|
+
"src/button/button-set.stories.ts": [
|
|
80100
80234
|
{
|
|
80101
80235
|
"name": "Basic",
|
|
80102
80236
|
"ctype": "miscellaneous",
|
|
80103
80237
|
"subtype": "variable",
|
|
80104
|
-
"file": "src/
|
|
80238
|
+
"file": "src/button/button-set.stories.ts",
|
|
80105
80239
|
"deprecated": false,
|
|
80106
80240
|
"deprecationMessage": "",
|
|
80107
80241
|
"type": "",
|
|
80108
80242
|
"defaultValue": "Template.bind({})"
|
|
80109
80243
|
},
|
|
80110
80244
|
{
|
|
80111
|
-
"name": "
|
|
80245
|
+
"name": "Template",
|
|
80112
80246
|
"ctype": "miscellaneous",
|
|
80113
80247
|
"subtype": "variable",
|
|
80114
|
-
"file": "src/
|
|
80248
|
+
"file": "src/button/button-set.stories.ts",
|
|
80115
80249
|
"deprecated": false,
|
|
80116
80250
|
"deprecationMessage": "",
|
|
80117
|
-
"type": ""
|
|
80118
|
-
|
|
80251
|
+
"type": "",
|
|
80252
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-button-set>\n\t\t\t<button cdsButton=\"secondary\" [size]=\"size\" [isExpressive]=\"isExpressive\">Button</button>\n\t\t\t<button cdsButton [size]=\"size\" [isExpressive]=\"isExpressive\">Button</button>\n\t\t</cds-button-set>\n\t`\n})"
|
|
80253
|
+
}
|
|
80254
|
+
],
|
|
80255
|
+
"src/button/button.stories.ts": [
|
|
80119
80256
|
{
|
|
80120
|
-
"name": "
|
|
80257
|
+
"name": "Basic",
|
|
80121
80258
|
"ctype": "miscellaneous",
|
|
80122
80259
|
"subtype": "variable",
|
|
80123
|
-
"file": "src/
|
|
80260
|
+
"file": "src/button/button.stories.ts",
|
|
80124
80261
|
"deprecated": false,
|
|
80125
80262
|
"deprecationMessage": "",
|
|
80126
80263
|
"type": "",
|
|
80127
|
-
"defaultValue": "
|
|
80264
|
+
"defaultValue": "Template.bind({})"
|
|
80128
80265
|
},
|
|
80129
80266
|
{
|
|
80130
|
-
"name": "
|
|
80267
|
+
"name": "Template",
|
|
80131
80268
|
"ctype": "miscellaneous",
|
|
80132
80269
|
"subtype": "variable",
|
|
80133
|
-
"file": "src/
|
|
80270
|
+
"file": "src/button/button.stories.ts",
|
|
80134
80271
|
"deprecated": false,
|
|
80135
80272
|
"deprecationMessage": "",
|
|
80136
80273
|
"type": "",
|
|
80137
|
-
"defaultValue": "
|
|
80274
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<button\n\t\t\t[cdsButton]=\"kind\"\n\t\t\t[size]=\"size\"\n\t\t\t[isExpressive]=\"isExpressive\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(click)=\"onClick($event)\"\n\t\t\t(mouseenter)=\"onMouseEnter($event)\"\n\t\t\t(mouseleave)=\"onMouseLeave($event)\"\n\t\t\t(focus)=\"onFocus($event)\"\n\t\t\t(blur)=\"onBlur($event)\">\n\t\t\tButton\n\t\t</button>\n\t`\n})"
|
|
80138
80275
|
},
|
|
80139
80276
|
{
|
|
80140
|
-
"name": "
|
|
80277
|
+
"name": "WithIcon",
|
|
80141
80278
|
"ctype": "miscellaneous",
|
|
80142
80279
|
"subtype": "variable",
|
|
80143
|
-
"file": "src/
|
|
80280
|
+
"file": "src/button/button.stories.ts",
|
|
80144
80281
|
"deprecated": false,
|
|
80145
80282
|
"deprecationMessage": "",
|
|
80146
80283
|
"type": "",
|
|
80147
|
-
"defaultValue": "(
|
|
80284
|
+
"defaultValue": "WithIconTemplate.bind({})"
|
|
80148
80285
|
},
|
|
80149
80286
|
{
|
|
80150
|
-
"name": "
|
|
80287
|
+
"name": "WithIconTemplate",
|
|
80151
80288
|
"ctype": "miscellaneous",
|
|
80152
80289
|
"subtype": "variable",
|
|
80153
|
-
"file": "src/
|
|
80290
|
+
"file": "src/button/button.stories.ts",
|
|
80154
80291
|
"deprecated": false,
|
|
80155
80292
|
"deprecationMessage": "",
|
|
80156
80293
|
"type": "",
|
|
80157
|
-
"defaultValue": "
|
|
80158
|
-
}
|
|
80294
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<button\n\t\t\t[cdsButton]=\"kind\"\n\t\t\t[size]=\"size\"\n\t\t\t[isExpressive]=\"isExpressive\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(click)=\"onClick($event)\"\n\t\t\t(mouseenter)=\"onMouseEnter($event)\"\n\t\t\t(mouseleave)=\"onMouseleave($event)\"\n\t\t\t(focus)=\"onFocus($event)\"\n\t\t\t(blur)=\"onBlur($event)\">\n\t\t\tWith icon\n\t\t\t<svg class=\"cds--btn__icon\" cdsIcon=\"add\" size=\"16\"></svg>\n\t\t</button>\n\t`\n})"
|
|
80295
|
+
}
|
|
80296
|
+
],
|
|
80297
|
+
"src/breadcrumb/breadcrumb.stories.ts": [
|
|
80159
80298
|
{
|
|
80160
|
-
"name": "
|
|
80299
|
+
"name": "Basic",
|
|
80161
80300
|
"ctype": "miscellaneous",
|
|
80162
80301
|
"subtype": "variable",
|
|
80163
80302
|
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80164
80303
|
"deprecated": false,
|
|
80165
80304
|
"deprecationMessage": "",
|
|
80166
80305
|
"type": "",
|
|
80167
|
-
"defaultValue": "(
|
|
80306
|
+
"defaultValue": "Template.bind({})"
|
|
80168
80307
|
},
|
|
80169
80308
|
{
|
|
80170
|
-
"name": "
|
|
80309
|
+
"name": "breadcrumbItems",
|
|
80171
80310
|
"ctype": "miscellaneous",
|
|
80172
80311
|
"subtype": "variable",
|
|
80173
80312
|
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80174
80313
|
"deprecated": false,
|
|
80175
80314
|
"deprecationMessage": "",
|
|
80176
|
-
"type": ""
|
|
80177
|
-
"defaultValue": "ModelWTemplate.bind({})"
|
|
80315
|
+
"type": ""
|
|
80178
80316
|
},
|
|
80179
80317
|
{
|
|
80180
|
-
"name": "
|
|
80318
|
+
"name": "createBreadcrumbItems",
|
|
80181
80319
|
"ctype": "miscellaneous",
|
|
80182
80320
|
"subtype": "variable",
|
|
80183
80321
|
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80184
80322
|
"deprecated": false,
|
|
80185
80323
|
"deprecationMessage": "",
|
|
80186
80324
|
"type": "",
|
|
80187
|
-
"defaultValue": "(
|
|
80325
|
+
"defaultValue": "(count: number, content = \"Breadcrumb\"): Array<BreadcrumbItem> => {\n\tif (breadcrumbItems && count === breadcrumbItems.length) {\n\t\treturn breadcrumbItems;\n\t}\n\tbreadcrumbItems = Array(count).fill(0).map((x, i) => ({\n\t\tcontent: `${content} ${i + 1}`,\n\t\thref: \"#\" + (i + 1)\n\t}));\n\treturn breadcrumbItems;\n}"
|
|
80188
80326
|
},
|
|
80189
80327
|
{
|
|
80190
|
-
"name": "
|
|
80328
|
+
"name": "CurrentPage",
|
|
80191
80329
|
"ctype": "miscellaneous",
|
|
80192
80330
|
"subtype": "variable",
|
|
80193
80331
|
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80194
80332
|
"deprecated": false,
|
|
80195
80333
|
"deprecationMessage": "",
|
|
80196
80334
|
"type": "",
|
|
80197
|
-
"defaultValue": "
|
|
80335
|
+
"defaultValue": "CurrentPageTemplate.bind({})"
|
|
80198
80336
|
},
|
|
80199
80337
|
{
|
|
80200
|
-
"name": "
|
|
80338
|
+
"name": "CurrentPageTemplate",
|
|
80201
80339
|
"ctype": "miscellaneous",
|
|
80202
80340
|
"subtype": "variable",
|
|
80203
80341
|
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80204
80342
|
"deprecated": false,
|
|
80205
80343
|
"deprecationMessage": "",
|
|
80206
80344
|
"type": "",
|
|
80207
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-breadcrumb
|
|
80345
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-breadcrumb>\n\t\t\t<cds-breadcrumb-item href=\"#1\">\n\t\t\t\tBreadcrumb 1\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item href=\"#2\">\n\t\t\t\tBreadcrumb 2\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item current=\"true\" href=\"#3\">\n\t\t\t\tBreadcrumb 3\n\t\t\t</cds-breadcrumb-item>\n\t\t</cds-breadcrumb>\n\t`\n})"
|
|
80208
80346
|
},
|
|
80209
80347
|
{
|
|
80210
|
-
"name": "
|
|
80348
|
+
"name": "Model",
|
|
80211
80349
|
"ctype": "miscellaneous",
|
|
80212
80350
|
"subtype": "variable",
|
|
80213
80351
|
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80214
80352
|
"deprecated": false,
|
|
80215
80353
|
"deprecationMessage": "",
|
|
80216
80354
|
"type": "",
|
|
80217
|
-
"defaultValue": "(
|
|
80355
|
+
"defaultValue": "ModelTemplate.bind({})"
|
|
80218
80356
|
},
|
|
80219
80357
|
{
|
|
80220
|
-
"name": "
|
|
80358
|
+
"name": "ModelTemplate",
|
|
80221
80359
|
"ctype": "miscellaneous",
|
|
80222
80360
|
"subtype": "variable",
|
|
80223
80361
|
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80224
80362
|
"deprecated": false,
|
|
80225
80363
|
"deprecationMessage": "",
|
|
80226
80364
|
"type": "",
|
|
80227
|
-
"defaultValue": "(
|
|
80228
|
-
}
|
|
80229
|
-
],
|
|
80230
|
-
"src/button/button-set.stories.ts": [
|
|
80365
|
+
"defaultValue": "(args) => ({\n\tprops: {\n\t\t...args,\n\t\tcreateBreadcrumbItems\n\t},\n\ttemplate: `\n\t\t<cds-breadcrumb\n\t\t\t[noTrailingSlash]=\"noTrailingSlash\"\n\t\t\t[threshold]=\"threshold\"\n\t\t\t[items]=\"createBreadcrumbItems(itemCount, content)\">\n\t\t</cds-breadcrumb>\n\t`\n})"
|
|
80366
|
+
},
|
|
80231
80367
|
{
|
|
80232
|
-
"name": "
|
|
80368
|
+
"name": "ModelWithTemplate",
|
|
80233
80369
|
"ctype": "miscellaneous",
|
|
80234
80370
|
"subtype": "variable",
|
|
80235
|
-
"file": "src/
|
|
80371
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80236
80372
|
"deprecated": false,
|
|
80237
80373
|
"deprecationMessage": "",
|
|
80238
80374
|
"type": "",
|
|
80239
|
-
"defaultValue": "
|
|
80375
|
+
"defaultValue": "ModelWTemplate.bind({})"
|
|
80240
80376
|
},
|
|
80241
80377
|
{
|
|
80242
|
-
"name": "
|
|
80378
|
+
"name": "ModelWTemplate",
|
|
80243
80379
|
"ctype": "miscellaneous",
|
|
80244
80380
|
"subtype": "variable",
|
|
80245
|
-
"file": "src/
|
|
80381
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80246
80382
|
"deprecated": false,
|
|
80247
80383
|
"deprecationMessage": "",
|
|
80248
80384
|
"type": "",
|
|
80249
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<
|
|
80250
|
-
}
|
|
80251
|
-
],
|
|
80252
|
-
"src/button/button.stories.ts": [
|
|
80385
|
+
"defaultValue": "(args) => ({\n\tprops: {\n\t\t...args,\n\t\tcreateBreadcrumbItems,\n\t\twithTemplate\n\t},\n\ttemplate: `\n\t\t<ng-template #breadcrumbTemplate let-item>\n\t\t\t{{ templateContent }}{{ item.content }}\n\t\t</ng-template>\n\t\t<cds-breadcrumb\n\t\t\t[noTrailingSlash]=\"noTrailingSlash\"\n\t\t\t[threshold]=\"threshold\"\n\t\t\t[items]=\"withTemplate(breadcrumbTemplate, createBreadcrumbItems(itemCount, content))\">\n\t\t</cds-breadcrumb>\n\t`\n})"
|
|
80386
|
+
},
|
|
80253
80387
|
{
|
|
80254
|
-
"name": "
|
|
80388
|
+
"name": "Skeleton",
|
|
80255
80389
|
"ctype": "miscellaneous",
|
|
80256
80390
|
"subtype": "variable",
|
|
80257
|
-
"file": "src/
|
|
80391
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80258
80392
|
"deprecated": false,
|
|
80259
80393
|
"deprecationMessage": "",
|
|
80260
80394
|
"type": "",
|
|
80261
|
-
"defaultValue": "
|
|
80395
|
+
"defaultValue": "WithSkeleton.bind({})"
|
|
80262
80396
|
},
|
|
80263
80397
|
{
|
|
80264
80398
|
"name": "Template",
|
|
80265
80399
|
"ctype": "miscellaneous",
|
|
80266
80400
|
"subtype": "variable",
|
|
80267
|
-
"file": "src/
|
|
80401
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80268
80402
|
"deprecated": false,
|
|
80269
80403
|
"deprecationMessage": "",
|
|
80270
80404
|
"type": "",
|
|
80271
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<
|
|
80405
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-breadcrumb [noTrailingSlash]=\"noTrailingSlash\">\n\t\t\t<cds-breadcrumb-item href=\"#1\">\n\t\t\t\tBreadcrumb 1\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item href=\"#2\">\n\t\t\t\tBreadcrumb 2\n\t\t\t</cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item href=\"#3\">\n\t\t\t\tBreadcrumb 3\n\t\t\t</cds-breadcrumb-item>\n\t\t</cds-breadcrumb>\n\t`\n})"
|
|
80272
80406
|
},
|
|
80273
80407
|
{
|
|
80274
|
-
"name": "
|
|
80408
|
+
"name": "WithSkeleton",
|
|
80275
80409
|
"ctype": "miscellaneous",
|
|
80276
80410
|
"subtype": "variable",
|
|
80277
|
-
"file": "src/
|
|
80411
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80278
80412
|
"deprecated": false,
|
|
80279
80413
|
"deprecationMessage": "",
|
|
80280
80414
|
"type": "",
|
|
80281
|
-
"defaultValue": "
|
|
80415
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-breadcrumb skeleton=\"true\" [noTrailingSlash]=\"noTrailingSlash\">\n\t\t\t<cds-breadcrumb-item></cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item></cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item></cds-breadcrumb-item>\n\t\t\t<cds-breadcrumb-item></cds-breadcrumb-item>\n\t\t</cds-breadcrumb>\n\t`\n})"
|
|
80282
80416
|
},
|
|
80283
80417
|
{
|
|
80284
|
-
"name": "
|
|
80418
|
+
"name": "withTemplate",
|
|
80285
80419
|
"ctype": "miscellaneous",
|
|
80286
80420
|
"subtype": "variable",
|
|
80287
|
-
"file": "src/
|
|
80421
|
+
"file": "src/breadcrumb/breadcrumb.stories.ts",
|
|
80288
80422
|
"deprecated": false,
|
|
80289
80423
|
"deprecationMessage": "",
|
|
80290
80424
|
"type": "",
|
|
80291
|
-
"defaultValue": "(
|
|
80425
|
+
"defaultValue": "(templateRef, items) => items.map(item => Object.assign(item, { template: templateRef }))"
|
|
80292
80426
|
}
|
|
80293
80427
|
],
|
|
80294
80428
|
"src/checkbox/checkbox.stories.ts": [
|
|
@@ -80486,6 +80620,16 @@
|
|
|
80486
80620
|
"type": "",
|
|
80487
80621
|
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<!--\n\t\tapp-* components are for demo purposes only.\n\t\tYou can create your own implementation by using the component source found at:\n\t\thttps://github.com/IBM/carbon-components-angular/tree/master/src/combobox/stories/app-dynamic-list-combobox.component.ts\n\t\t-->\n\t\t<app-dynamic-list-combobox></app-dynamic-list-combobox>\n\t`\n})"
|
|
80488
80622
|
},
|
|
80623
|
+
{
|
|
80624
|
+
"name": "Fluid",
|
|
80625
|
+
"ctype": "miscellaneous",
|
|
80626
|
+
"subtype": "variable",
|
|
80627
|
+
"file": "src/combobox/combobox.stories.ts",
|
|
80628
|
+
"deprecated": false,
|
|
80629
|
+
"deprecationMessage": "",
|
|
80630
|
+
"type": "",
|
|
80631
|
+
"defaultValue": "Template.bind({})"
|
|
80632
|
+
},
|
|
80489
80633
|
{
|
|
80490
80634
|
"name": "MockQuerySearch",
|
|
80491
80635
|
"ctype": "miscellaneous",
|
|
@@ -80524,7 +80668,7 @@
|
|
|
80524
80668
|
"deprecated": false,
|
|
80525
80669
|
"deprecationMessage": "",
|
|
80526
80670
|
"type": "",
|
|
80527
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
|
|
80671
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[appendInline]=\"false\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\ttype=\"multi\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t`\n})"
|
|
80528
80672
|
},
|
|
80529
80673
|
{
|
|
80530
80674
|
"name": "ReactiveForms",
|
|
@@ -80554,7 +80698,7 @@
|
|
|
80554
80698
|
"deprecated": false,
|
|
80555
80699
|
"deprecationMessage": "",
|
|
80556
80700
|
"type": "",
|
|
80557
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
|
|
80701
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-combo-box\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[size]=\"size\"\n\t\t\t[appendInline]=\"appendInline\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[items]=\"items\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(submit)=\"submit($event)\"\n\t\t\t(search)=\"search($event)\"\n\t\t\t(clear)=\"clear($event)\">\n\t\t\t<cds-dropdown-list></cds-dropdown-list>\n\t\t</cds-combo-box>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
|
|
80558
80702
|
}
|
|
80559
80703
|
],
|
|
80560
80704
|
"src/content-switcher/content-switcher.stories.ts": [
|
|
@@ -80694,6 +80838,16 @@
|
|
|
80694
80838
|
"type": "",
|
|
80695
80839
|
"defaultValue": "Template.bind({})"
|
|
80696
80840
|
},
|
|
80841
|
+
{
|
|
80842
|
+
"name": "Fluid",
|
|
80843
|
+
"ctype": "miscellaneous",
|
|
80844
|
+
"subtype": "variable",
|
|
80845
|
+
"file": "src/dropdown/dropdown.stories.ts",
|
|
80846
|
+
"deprecated": false,
|
|
80847
|
+
"deprecationMessage": "",
|
|
80848
|
+
"type": "",
|
|
80849
|
+
"defaultValue": "Template.bind({})"
|
|
80850
|
+
},
|
|
80697
80851
|
{
|
|
80698
80852
|
"name": "Multiselect",
|
|
80699
80853
|
"ctype": "miscellaneous",
|
|
@@ -80712,7 +80866,7 @@
|
|
|
80712
80866
|
"deprecated": false,
|
|
80713
80867
|
"deprecationMessage": "",
|
|
80714
80868
|
"type": "",
|
|
80715
|
-
"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})"
|
|
80869
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\ttype=\"multi\"\n\t\t\t[selectionFeedback]=\"selectionFeedback\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t\t<span>{{model | json}}</span>\n\t`\n})"
|
|
80716
80870
|
},
|
|
80717
80871
|
{
|
|
80718
80872
|
"name": "NgTemplate",
|
|
@@ -80752,7 +80906,7 @@
|
|
|
80752
80906
|
"deprecated": false,
|
|
80753
80907
|
"deprecationMessage": "",
|
|
80754
80908
|
"type": "",
|
|
80755
|
-
"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})"
|
|
80909
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-dropdown\n\t\t\t[label]=\"label\"\n\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[size]=\"size\"\n\t\t\t[dropUp]=\"dropUp\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[theme]=\"theme\"\n\t\t\tplaceholder=\"Select\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t(selected)=\"selected($event)\"\n\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t<cds-dropdown-list [items]=\"items\"></cds-dropdown-list>\n\t\t</cds-dropdown>\n\t`\n})"
|
|
80756
80910
|
},
|
|
80757
80911
|
{
|
|
80758
80912
|
"name": "WithTemplate",
|
|
@@ -85771,8 +85925,8 @@
|
|
|
85771
85925
|
"type": "component",
|
|
85772
85926
|
"linktype": "component",
|
|
85773
85927
|
"name": "ComboBox",
|
|
85774
|
-
"coveragePercent":
|
|
85775
|
-
"coverageCount": "
|
|
85928
|
+
"coveragePercent": 69,
|
|
85929
|
+
"coverageCount": "51/73",
|
|
85776
85930
|
"status": "good"
|
|
85777
85931
|
},
|
|
85778
85932
|
{
|
|
@@ -85825,6 +85979,16 @@
|
|
|
85825
85979
|
"coverageCount": "0/1",
|
|
85826
85980
|
"status": "low"
|
|
85827
85981
|
},
|
|
85982
|
+
{
|
|
85983
|
+
"filePath": "src/combobox/combobox.stories.ts",
|
|
85984
|
+
"type": "variable",
|
|
85985
|
+
"linktype": "miscellaneous",
|
|
85986
|
+
"linksubtype": "variable",
|
|
85987
|
+
"name": "Fluid",
|
|
85988
|
+
"coveragePercent": 0,
|
|
85989
|
+
"coverageCount": "0/1",
|
|
85990
|
+
"status": "low"
|
|
85991
|
+
},
|
|
85828
85992
|
{
|
|
85829
85993
|
"filePath": "src/combobox/combobox.stories.ts",
|
|
85830
85994
|
"type": "variable",
|
|
@@ -86674,8 +86838,8 @@
|
|
|
86674
86838
|
"type": "component",
|
|
86675
86839
|
"linktype": "component",
|
|
86676
86840
|
"name": "Dropdown",
|
|
86677
|
-
"coveragePercent":
|
|
86678
|
-
"coverageCount": "
|
|
86841
|
+
"coveragePercent": 68,
|
|
86842
|
+
"coverageCount": "51/75",
|
|
86679
86843
|
"status": "good"
|
|
86680
86844
|
},
|
|
86681
86845
|
{
|
|
@@ -86707,6 +86871,16 @@
|
|
|
86707
86871
|
"coverageCount": "0/1",
|
|
86708
86872
|
"status": "low"
|
|
86709
86873
|
},
|
|
86874
|
+
{
|
|
86875
|
+
"filePath": "src/dropdown/dropdown.stories.ts",
|
|
86876
|
+
"type": "variable",
|
|
86877
|
+
"linktype": "miscellaneous",
|
|
86878
|
+
"linksubtype": "variable",
|
|
86879
|
+
"name": "Fluid",
|
|
86880
|
+
"coveragePercent": 0,
|
|
86881
|
+
"coverageCount": "0/1",
|
|
86882
|
+
"status": "low"
|
|
86883
|
+
},
|
|
86710
86884
|
{
|
|
86711
86885
|
"filePath": "src/dropdown/dropdown.stories.ts",
|
|
86712
86886
|
"type": "variable",
|