carbon-components-angular 5.54.0 → 5.55.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/README.md +1 -1
- package/combobox/combobox.component.d.ts +7 -2
- package/docs/documentation/components/ComboBox.html +294 -211
- package/docs/documentation/components/TextInputLabelComponent.html +76 -30
- package/docs/documentation/coverage.html +6 -6
- package/docs/documentation/index.html +1 -1
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/CodeSnippetModule/dependencies.svg +4 -4
- package/docs/documentation/modules/CodeSnippetModule.html +4 -4
- package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ComboBoxModule.html +4 -4
- package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +4 -4
- package/docs/documentation/modules/DatePickerInputModule.html +4 -4
- package/docs/documentation/modules/DatePickerModule/dependencies.svg +4 -4
- package/docs/documentation/modules/DatePickerModule.html +4 -4
- package/docs/documentation/modules/FileUploaderModule/dependencies.svg +34 -34
- package/docs/documentation/modules/FileUploaderModule.html +34 -34
- package/docs/documentation/modules/NFormsModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NFormsModule.html +4 -4
- package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NumberModule.html +4 -4
- package/docs/documentation/modules/RadioModule/dependencies.svg +57 -61
- package/docs/documentation/modules/RadioModule.html +57 -61
- package/docs/documentation/modules/SearchModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SearchModule.html +4 -4
- package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SliderModule.html +4 -4
- package/docs/documentation/modules/StructuredListModule/dependencies.svg +66 -66
- package/docs/documentation/modules/StructuredListModule.html +66 -66
- package/docs/documentation/modules/TagModule/dependencies.svg +37 -37
- package/docs/documentation/modules/TagModule.html +37 -37
- package/docs/documentation/modules/ThemeModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ThemeModule.html +4 -4
- package/docs/documentation/modules/TilesModule/dependencies.svg +91 -91
- package/docs/documentation/modules/TilesModule.html +91 -91
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TimePickerModule.html +4 -4
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +42 -46
- package/docs/documentation/modules/TimePickerSelectModule.html +42 -46
- package/docs/documentation/modules/ToggleModule/dependencies.svg +42 -46
- package/docs/documentation/modules/ToggleModule.html +42 -46
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +39 -39
- package/docs/documentation/modules/ToggletipModule.html +39 -39
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +28 -28
- package/docs/documentation/modules/TreeviewModule.html +28 -28
- package/docs/documentation.json +196 -154
- package/docs/storybook/{1345.4ae7e616.iframe.bundle.js → 1345.d1a47622.iframe.bundle.js} +1 -1
- package/docs/storybook/combobox-combobox-stories.6da5780e.iframe.bundle.js +1 -0
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/index.json +1 -1
- package/docs/storybook/main.css +886 -187
- package/docs/storybook/main.fd9128ab.iframe.bundle.js +1 -0
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.5af8858a.iframe.bundle.js → runtime~main.d4ace00c.iframe.bundle.js} +1 -1
- package/docs/storybook/stories.json +1 -1
- package/esm2020/combobox/combobox.component.mjs +38 -14
- package/esm2020/input/text-input-label.component.mjs +4 -1
- package/fesm2015/carbon-components-angular-combobox.mjs +37 -13
- package/fesm2015/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-input.mjs +3 -0
- package/fesm2015/carbon-components-angular-input.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-input.mjs +3 -0
- package/fesm2020/carbon-components-angular-input.mjs.map +1 -1
- package/input/text-input-label.component.d.ts +3 -2
- package/package.json +1 -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.4ed7d347.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
|
}
|
|
@@ -62754,7 +62765,7 @@
|
|
|
62754
62765
|
},
|
|
62755
62766
|
{
|
|
62756
62767
|
"name": "TextInputLabelComponent",
|
|
62757
|
-
"id": "component-TextInputLabelComponent-
|
|
62768
|
+
"id": "component-TextInputLabelComponent-85c449c6e838da15776375a01fe857a981d585c39dad57825ec5a9c8adf2ccfc4959b452d9c0a1d8fb0d5e6954baa2865b2fd30545e13219070b8217db715e09",
|
|
62758
62769
|
"file": "src/input/text-input-label.component.ts",
|
|
62759
62770
|
"encapsulation": [],
|
|
62760
62771
|
"entryComponents": [],
|
|
@@ -62775,7 +62786,7 @@
|
|
|
62775
62786
|
"deprecationMessage": "",
|
|
62776
62787
|
"rawdescription": "\n\nSet the arialabel for label\n",
|
|
62777
62788
|
"description": "<p>Set the arialabel for label</p>\n",
|
|
62778
|
-
"line":
|
|
62789
|
+
"line": 155,
|
|
62779
62790
|
"type": "string",
|
|
62780
62791
|
"decorators": []
|
|
62781
62792
|
},
|
|
@@ -62786,7 +62797,7 @@
|
|
|
62786
62797
|
"deprecationMessage": "",
|
|
62787
62798
|
"rawdescription": "\n\nSet to `true` for a disabled label.\n",
|
|
62788
62799
|
"description": "<p>Set to <code>true</code> for a disabled label.</p>\n",
|
|
62789
|
-
"line":
|
|
62800
|
+
"line": 120,
|
|
62790
62801
|
"type": "boolean",
|
|
62791
62802
|
"decorators": []
|
|
62792
62803
|
},
|
|
@@ -62797,7 +62808,7 @@
|
|
|
62797
62808
|
"deprecationMessage": "",
|
|
62798
62809
|
"rawdescription": "\n\nExperimental: enable fluid state\n",
|
|
62799
62810
|
"description": "<p>Experimental: enable fluid state</p>\n",
|
|
62800
|
-
"line":
|
|
62811
|
+
"line": 160,
|
|
62801
62812
|
"type": "boolean",
|
|
62802
62813
|
"decorators": []
|
|
62803
62814
|
},
|
|
@@ -62807,7 +62818,7 @@
|
|
|
62807
62818
|
"deprecationMessage": "",
|
|
62808
62819
|
"rawdescription": "\n\nOptional helper text that appears under the label.\n",
|
|
62809
62820
|
"description": "<p>Optional helper text that appears under the label.</p>\n",
|
|
62810
|
-
"line":
|
|
62821
|
+
"line": 135,
|
|
62811
62822
|
"type": "string | TemplateRef<any>",
|
|
62812
62823
|
"decorators": []
|
|
62813
62824
|
},
|
|
@@ -62818,7 +62829,7 @@
|
|
|
62818
62829
|
"deprecationMessage": "",
|
|
62819
62830
|
"rawdescription": "\n\nSet to `true` for an invalid label component.\n",
|
|
62820
62831
|
"description": "<p>Set to <code>true</code> for an invalid label component.</p>\n",
|
|
62821
|
-
"line":
|
|
62832
|
+
"line": 143,
|
|
62822
62833
|
"type": "boolean",
|
|
62823
62834
|
"decorators": []
|
|
62824
62835
|
},
|
|
@@ -62828,7 +62839,7 @@
|
|
|
62828
62839
|
"deprecationMessage": "",
|
|
62829
62840
|
"rawdescription": "\n\nSets the invalid text.\n",
|
|
62830
62841
|
"description": "<p>Sets the invalid text.</p>\n",
|
|
62831
|
-
"line":
|
|
62842
|
+
"line": 139,
|
|
62832
62843
|
"type": "string | TemplateRef<any>",
|
|
62833
62844
|
"decorators": []
|
|
62834
62845
|
},
|
|
@@ -62839,7 +62850,7 @@
|
|
|
62839
62850
|
"deprecationMessage": "",
|
|
62840
62851
|
"rawdescription": "\n\nThe id of the input item associated with the `Label`. This value is also used to associate the `Label` with\nits input counterpart through the 'for' attribute.\n",
|
|
62841
62852
|
"description": "<p>The id of the input item associated with the <code>Label</code>. This value is also used to associate the <code>Label</code> with\nits input counterpart through the 'for' attribute.</p>\n",
|
|
62842
|
-
"line":
|
|
62853
|
+
"line": 115,
|
|
62843
62854
|
"type": "string",
|
|
62844
62855
|
"decorators": []
|
|
62845
62856
|
},
|
|
@@ -62849,7 +62860,7 @@
|
|
|
62849
62860
|
"deprecationMessage": "",
|
|
62850
62861
|
"rawdescription": "\n\nHelper input property for ease of migration\nSince we cannot pass ng-content down easily from label component, we will accept the templates\n",
|
|
62851
62862
|
"description": "<p>Helper input property for ease of migration\nSince we cannot pass ng-content down easily from label component, we will accept the templates</p>\n",
|
|
62852
|
-
"line":
|
|
62863
|
+
"line": 130,
|
|
62853
62864
|
"type": "TemplateRef<any>",
|
|
62854
62865
|
"decorators": []
|
|
62855
62866
|
},
|
|
@@ -62860,7 +62871,7 @@
|
|
|
62860
62871
|
"deprecationMessage": "",
|
|
62861
62872
|
"rawdescription": "\n\nSet to `true` for a loading label.\n",
|
|
62862
62873
|
"description": "<p>Set to <code>true</code> for a loading label.</p>\n",
|
|
62863
|
-
"line":
|
|
62874
|
+
"line": 124,
|
|
62864
62875
|
"type": "boolean",
|
|
62865
62876
|
"decorators": []
|
|
62866
62877
|
},
|
|
@@ -62868,7 +62879,7 @@
|
|
|
62868
62879
|
"name": "textInputTemplate",
|
|
62869
62880
|
"deprecated": false,
|
|
62870
62881
|
"deprecationMessage": "",
|
|
62871
|
-
"line":
|
|
62882
|
+
"line": 131,
|
|
62872
62883
|
"type": "TemplateRef<any>",
|
|
62873
62884
|
"decorators": []
|
|
62874
62885
|
},
|
|
@@ -62879,7 +62890,7 @@
|
|
|
62879
62890
|
"deprecationMessage": "",
|
|
62880
62891
|
"rawdescription": "\n\nSet to `true` to show a warning (contents set by warningText)\n",
|
|
62881
62892
|
"description": "<p>Set to <code>true</code> to show a warning (contents set by warningText)</p>\n",
|
|
62882
|
-
"line":
|
|
62893
|
+
"line": 147,
|
|
62883
62894
|
"type": "boolean",
|
|
62884
62895
|
"decorators": []
|
|
62885
62896
|
},
|
|
@@ -62889,7 +62900,7 @@
|
|
|
62889
62900
|
"deprecationMessage": "",
|
|
62890
62901
|
"rawdescription": "\n\nSets the warning text\n",
|
|
62891
62902
|
"description": "<p>Sets the warning text</p>\n",
|
|
62892
|
-
"line":
|
|
62903
|
+
"line": 151,
|
|
62893
62904
|
"type": "string | TemplateRef<any>",
|
|
62894
62905
|
"decorators": []
|
|
62895
62906
|
}
|
|
@@ -62904,7 +62915,7 @@
|
|
|
62904
62915
|
"type": "",
|
|
62905
62916
|
"optional": false,
|
|
62906
62917
|
"description": "",
|
|
62907
|
-
"line":
|
|
62918
|
+
"line": 165,
|
|
62908
62919
|
"decorators": [
|
|
62909
62920
|
{
|
|
62910
62921
|
"name": "HostBinding",
|
|
@@ -62923,7 +62934,7 @@
|
|
|
62923
62934
|
"type": "number",
|
|
62924
62935
|
"optional": false,
|
|
62925
62936
|
"description": "<p>Used to build the id of the input item associated with the <code>Label</code>.</p>\n",
|
|
62926
|
-
"line":
|
|
62937
|
+
"line": 110,
|
|
62927
62938
|
"rawdescription": "\n\nUsed to build the id of the input item associated with the `Label`.\n",
|
|
62928
62939
|
"modifierKind": [
|
|
62929
62940
|
126
|
|
@@ -62937,7 +62948,7 @@
|
|
|
62937
62948
|
"type": "",
|
|
62938
62949
|
"optional": false,
|
|
62939
62950
|
"description": "",
|
|
62940
|
-
"line":
|
|
62951
|
+
"line": 167,
|
|
62941
62952
|
"decorators": [
|
|
62942
62953
|
{
|
|
62943
62954
|
"name": "HostBinding",
|
|
@@ -62955,7 +62966,7 @@
|
|
|
62955
62966
|
"type": "ElementRef<HTMLDivElement>",
|
|
62956
62967
|
"optional": false,
|
|
62957
62968
|
"description": "",
|
|
62958
|
-
"line":
|
|
62969
|
+
"line": 163,
|
|
62959
62970
|
"decorators": [
|
|
62960
62971
|
{
|
|
62961
62972
|
"name": "ViewChild",
|
|
@@ -62981,7 +62992,7 @@
|
|
|
62981
62992
|
"optional": false,
|
|
62982
62993
|
"returnType": "boolean",
|
|
62983
62994
|
"typeParameters": [],
|
|
62984
|
-
"line":
|
|
62995
|
+
"line": 218,
|
|
62985
62996
|
"deprecated": false,
|
|
62986
62997
|
"deprecationMessage": "",
|
|
62987
62998
|
"modifierKind": [
|
|
@@ -63008,7 +63019,7 @@
|
|
|
63008
63019
|
"defaultValue": "true",
|
|
63009
63020
|
"deprecated": false,
|
|
63010
63021
|
"deprecationMessage": "",
|
|
63011
|
-
"line":
|
|
63022
|
+
"line": 165,
|
|
63012
63023
|
"type": "boolean",
|
|
63013
63024
|
"decorators": []
|
|
63014
63025
|
},
|
|
@@ -63016,7 +63027,7 @@
|
|
|
63016
63027
|
"name": "class.cds--text-input--fluid",
|
|
63017
63028
|
"deprecated": false,
|
|
63018
63029
|
"deprecationMessage": "",
|
|
63019
|
-
"line":
|
|
63030
|
+
"line": 173,
|
|
63020
63031
|
"type": "boolean",
|
|
63021
63032
|
"decorators": []
|
|
63022
63033
|
},
|
|
@@ -63024,7 +63035,7 @@
|
|
|
63024
63035
|
"name": "class.cds--text-input--fluid__skeleton",
|
|
63025
63036
|
"deprecated": false,
|
|
63026
63037
|
"deprecationMessage": "",
|
|
63027
|
-
"line":
|
|
63038
|
+
"line": 177,
|
|
63028
63039
|
"type": "boolean",
|
|
63029
63040
|
"decorators": []
|
|
63030
63041
|
},
|
|
@@ -63033,7 +63044,7 @@
|
|
|
63033
63044
|
"defaultValue": "true",
|
|
63034
63045
|
"deprecated": false,
|
|
63035
63046
|
"deprecationMessage": "",
|
|
63036
|
-
"line":
|
|
63047
|
+
"line": 167,
|
|
63037
63048
|
"type": "boolean",
|
|
63038
63049
|
"decorators": []
|
|
63039
63050
|
},
|
|
@@ -63041,7 +63052,7 @@
|
|
|
63041
63052
|
"name": "class.cds--text-input-wrapper--readonly",
|
|
63042
63053
|
"deprecated": false,
|
|
63043
63054
|
"deprecationMessage": "",
|
|
63044
|
-
"line":
|
|
63055
|
+
"line": 169,
|
|
63045
63056
|
"type": "any",
|
|
63046
63057
|
"decorators": []
|
|
63047
63058
|
}
|
|
@@ -63052,7 +63063,7 @@
|
|
|
63052
63063
|
"description": "<p>Get started with importing the module:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { InputModule } from 'carbon-components-angular';</code></pre></div><b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><cds-text-label>\n Label\n <input cdsText type="text" class="input-field">\n</cds-text-label></code></pre></div><p><a href=\"../../?path=/story/components-input--basic\">See demo</a></p>\n",
|
|
63053
63064
|
"rawdescription": "\n\nGet started with importing the module:\n\n```typescript\nimport { InputModule } from 'carbon-components-angular';\n```\n\n```html\n<cds-text-label>\n\tLabel\n\t<input cdsText type=\"text\" class=\"input-field\">\n</cds-text-label>\n```\n\n[See demo](../../?path=/story/components-input--basic)\n",
|
|
63054
63065
|
"type": "component",
|
|
63055
|
-
"sourceCode": "import {\n\tAfterViewInit,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tInput,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { InputModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n * <cds-text-label>\n * \tLabel\n * \t<input cdsText type=\"text\" class=\"input-field\">\n * </cds-text-label>\n * ```\n *\n * [See demo](../../?path=/story/components-input--basic)\n */\n@Component({\n\tselector: \"cds-text-label, ibm-text-label\",\n\ttemplate: `\n\t\t<ng-container *ngIf=\"skeleton\">\n\t\t\t<span class=\"cds--label cds--skeleton\"></span>\n\t\t\t<div class=\"cds--text-input cds--skeleton\"></div>\n\t\t</ng-container>\n\t\t<label\n\t\t\t*ngIf=\"!skeleton\"\n\t\t\t[for]=\"labelInputID\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\tclass=\"cds--label\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--label--disabled': disabled\n\t\t\t}\">\n\t\t\t<ng-template *ngIf=\"labelTemplate; else labelContent\" [ngTemplateOutlet]=\"labelTemplate\"></ng-template>\n\t\t\t<ng-template #labelContent>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-template>\n\t\t</label>\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--text-input__field-outer-wrapper\">\n\t\t\t<div\n\t\t\t\tclass=\"cds--text-input__field-wrapper\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--text-input__field-wrapper--warning': warn\n\t\t\t\t}\"\n\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\"\n\t\t\t\t#wrapper>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"invalid && !warn\"\n\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--text-input__invalid-icon\">\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--text-input__invalid-icon cds--text-input__invalid-icon--warning\">\n\t\t\t\t</svg>\n\t\t\t\t<ng-template *ngIf=\"textInputTemplate; else textInputContent\" [ngTemplateOutlet]=\"textInputTemplate\"></ng-template>\n\t\t\t\t<ng-template #textInputContent>\n\t\t\t\t\t<ng-content select=\"[cdsText],[ibmText],input[type=text],div\"></ng-content>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<ng-container *ngIf=\"fluid\">\n\t\t\t\t\t<hr class=\"cds--text-input__divider\" />\n\t\t\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t\t\t<ng-container *ngIf=\"!fluid\">\n\t\t\t\t<div\n\t\t\t\t\t*ngIf=\"helperText && !invalid && !warn\"\n\t\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</div>\n\t`\n})\nexport class TextInputLabelComponent implements AfterViewInit {\n\t/**\n\t * Used to build the id of the input item associated with the `Label`.\n\t */\n\tstatic labelCounter = 0;\n\t/**\n\t * The id of the input item associated with the `Label`. This value is also used to associate the `Label` with\n\t * its input counterpart through the 'for' attribute.\n\t*/\n\t@Input() labelInputID = \"ibm-text-input-\" + TextInputLabelComponent.labelCounter++;\n\n\t/**\n\t * Set to `true` for a disabled label.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for a loading label.\n\t */\n\t@Input() skeleton = false;\n\n\t/**\n\t * Helper input property for ease of migration\n\t * Since we cannot pass ng-content down easily from label component, we will accept the templates\n\t */\n\t@Input() labelTemplate: TemplateRef<any>;\n\t@Input() textInputTemplate: TemplateRef<any>;\n\t/**\n\t * Optional helper text that appears under the label.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * Sets the invalid text.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` for an invalid label component.\n\t */\n\t@Input() invalid = false;\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 the arialabel for label\n\t */\n\t@Input() ariaLabel: string;\n\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@Input() fluid = false;\n\n\t// @ts-ignore\n\t@ViewChild(\"wrapper\", { static: false }) wrapper: ElementRef<HTMLDivElement>;\n\n\t@HostBinding(\"class.cds--form-item\") labelClass = true;\n\n\t@HostBinding(\"class.cds--text-input-wrapper\") textInputWrapper = true;\n\n\t@HostBinding(\"class.cds--text-input-wrapper--readonly\") get isReadonly() {\n\t\treturn this.wrapper?.nativeElement.querySelector(\"input\")?.readOnly ?? false;\n\t}\n\n\t@HostBinding(\"class.cds--text-input--fluid\") get fluidClass() {\n\t\treturn this.fluid && !this.skeleton;\n\t}\n\n\t@HostBinding(\"class.cds--text-input--fluid__skeleton\") get fluidSkeletonClass() {\n\t\treturn this.fluid && this.skeleton;\n\t}\n\n\t/**\n\t * Creates an instance of Label.\n\t */\n\tconstructor(protected changeDetectorRef: ChangeDetectorRef) {}\n\n\t/**\n\t * Sets the id on the input item associated with the `Label`.\n\t */\n\tngAfterViewInit() {\n\t\tif (this.wrapper) {\n\t\t\t// Prioritize setting id to `input` over div\n\t\t\tconst inputElement = this.wrapper.nativeElement.querySelector(\"input\");\n\t\t\tif (inputElement) {\n\t\t\t\t// avoid overriding ids already set by the user reuse it instead\n\t\t\t\tif (inputElement.id) {\n\t\t\t\t\tthis.labelInputID = inputElement.id;\n\t\t\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t\t\t}\n\t\t\t\tinputElement.setAttribute(\"id\", this.labelInputID);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst divElement = this.wrapper.nativeElement.querySelector(\"div\");\n\t\t\tif (divElement) {\n\t\t\t\tif (divElement.id) {\n\t\t\t\t\tthis.labelInputID = divElement.id;\n\t\t\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t\t\t}\n\t\t\t\tdivElement.setAttribute(\"id\", this.labelInputID);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n",
|
|
63066
|
+
"sourceCode": "import {\n\tAfterContentInit,\n\tAfterViewInit,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tInput,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { InputModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n * <cds-text-label>\n * \tLabel\n * \t<input cdsText type=\"text\" class=\"input-field\">\n * </cds-text-label>\n * ```\n *\n * [See demo](../../?path=/story/components-input--basic)\n */\n@Component({\n\tselector: \"cds-text-label, ibm-text-label\",\n\ttemplate: `\n\t\t<ng-container *ngIf=\"skeleton\">\n\t\t\t<span class=\"cds--label cds--skeleton\"></span>\n\t\t\t<div class=\"cds--text-input cds--skeleton\"></div>\n\t\t</ng-container>\n\t\t<label\n\t\t\t*ngIf=\"!skeleton\"\n\t\t\t[for]=\"labelInputID\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\tclass=\"cds--label\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--label--disabled': disabled\n\t\t\t}\">\n\t\t\t<ng-template *ngIf=\"labelTemplate; else labelContent\" [ngTemplateOutlet]=\"labelTemplate\"></ng-template>\n\t\t\t<ng-template #labelContent>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-template>\n\t\t</label>\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--text-input__field-outer-wrapper\">\n\t\t\t<div\n\t\t\t\tclass=\"cds--text-input__field-wrapper\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--text-input__field-wrapper--warning': warn\n\t\t\t\t}\"\n\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\"\n\t\t\t\t#wrapper>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"invalid && !warn\"\n\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--text-input__invalid-icon\">\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--text-input__invalid-icon cds--text-input__invalid-icon--warning\">\n\t\t\t\t</svg>\n\t\t\t\t<ng-template *ngIf=\"textInputTemplate; else textInputContent\" [ngTemplateOutlet]=\"textInputTemplate\"></ng-template>\n\t\t\t\t<ng-template #textInputContent>\n\t\t\t\t\t<ng-content select=\"[cdsText],[ibmText],input[type=text],div\"></ng-content>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<ng-container *ngIf=\"fluid\">\n\t\t\t\t\t<hr class=\"cds--text-input__divider\" />\n\t\t\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t\t\t<ng-container *ngIf=\"!fluid\">\n\t\t\t\t<div\n\t\t\t\t\t*ngIf=\"helperText && !invalid && !warn\"\n\t\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t\t[ngClass]=\"{'cds--form__helper-text--disabled': disabled}\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"invalid\" class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</div>\n\t`\n})\nexport class TextInputLabelComponent implements AfterViewInit, AfterContentInit {\n\t/**\n\t * Used to build the id of the input item associated with the `Label`.\n\t */\n\tstatic labelCounter = 0;\n\t/**\n\t * The id of the input item associated with the `Label`. This value is also used to associate the `Label` with\n\t * its input counterpart through the 'for' attribute.\n\t*/\n\t@Input() labelInputID = \"ibm-text-input-\" + TextInputLabelComponent.labelCounter++;\n\n\t/**\n\t * Set to `true` for a disabled label.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for a loading label.\n\t */\n\t@Input() skeleton = false;\n\n\t/**\n\t * Helper input property for ease of migration\n\t * Since we cannot pass ng-content down easily from label component, we will accept the templates\n\t */\n\t@Input() labelTemplate: TemplateRef<any>;\n\t@Input() textInputTemplate: TemplateRef<any>;\n\t/**\n\t * Optional helper text that appears under the label.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * Sets the invalid text.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` for an invalid label component.\n\t */\n\t@Input() invalid = false;\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 the arialabel for label\n\t */\n\t@Input() ariaLabel: string;\n\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@Input() fluid = false;\n\n\t// @ts-ignore\n\t@ViewChild(\"wrapper\", { static: false }) wrapper: ElementRef<HTMLDivElement>;\n\n\t@HostBinding(\"class.cds--form-item\") labelClass = true;\n\n\t@HostBinding(\"class.cds--text-input-wrapper\") textInputWrapper = true;\n\n\t@HostBinding(\"class.cds--text-input-wrapper--readonly\") get isReadonly() {\n\t\treturn this.wrapper?.nativeElement.querySelector(\"input\")?.readOnly ?? false;\n\t}\n\n\t@HostBinding(\"class.cds--text-input--fluid\") get fluidClass() {\n\t\treturn this.fluid && !this.skeleton;\n\t}\n\n\t@HostBinding(\"class.cds--text-input--fluid__skeleton\") get fluidSkeletonClass() {\n\t\treturn this.fluid && this.skeleton;\n\t}\n\n\t/**\n\t * Creates an instance of Label.\n\t */\n\tconstructor(protected changeDetectorRef: ChangeDetectorRef) {}\n\n\t/**\n\t * Sets the id on the input item associated with the `Label`.\n\t */\n\tngAfterViewInit() {\n\t\tif (this.wrapper) {\n\t\t\t// Prioritize setting id to `input` over div\n\t\t\tconst inputElement = this.wrapper.nativeElement.querySelector(\"input\");\n\t\t\tif (inputElement) {\n\t\t\t\t// avoid overriding ids already set by the user reuse it instead\n\t\t\t\tif (inputElement.id) {\n\t\t\t\t\tthis.labelInputID = inputElement.id;\n\t\t\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t\t\t}\n\t\t\t\tinputElement.setAttribute(\"id\", this.labelInputID);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst divElement = this.wrapper.nativeElement.querySelector(\"div\");\n\t\t\tif (divElement) {\n\t\t\t\tif (divElement.id) {\n\t\t\t\t\tthis.labelInputID = divElement.id;\n\t\t\t\t\tthis.changeDetectorRef.detectChanges();\n\t\t\t\t}\n\t\t\t\tdivElement.setAttribute(\"id\", this.labelInputID);\n\t\t\t}\n\t\t}\n\t}\n\n\tngAfterContentInit() {\n\t\tthis.changeDetectorRef.detectChanges();\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n",
|
|
63056
63067
|
"assetsDirs": [],
|
|
63057
63068
|
"styleUrlsData": "",
|
|
63058
63069
|
"stylesData": "",
|
|
@@ -63069,7 +63080,7 @@
|
|
|
63069
63080
|
"deprecationMessage": ""
|
|
63070
63081
|
}
|
|
63071
63082
|
],
|
|
63072
|
-
"line":
|
|
63083
|
+
"line": 179,
|
|
63073
63084
|
"rawdescription": "\n\nCreates an instance of Label.\n",
|
|
63074
63085
|
"jsdoctags": [
|
|
63075
63086
|
{
|
|
@@ -63085,7 +63096,8 @@
|
|
|
63085
63096
|
},
|
|
63086
63097
|
"extends": [],
|
|
63087
63098
|
"implements": [
|
|
63088
|
-
"AfterViewInit"
|
|
63099
|
+
"AfterViewInit",
|
|
63100
|
+
"AfterContentInit"
|
|
63089
63101
|
],
|
|
63090
63102
|
"accessors": {
|
|
63091
63103
|
"isReadonly": {
|
|
@@ -63094,7 +63106,7 @@
|
|
|
63094
63106
|
"name": "isReadonly",
|
|
63095
63107
|
"type": "",
|
|
63096
63108
|
"returnType": "",
|
|
63097
|
-
"line":
|
|
63109
|
+
"line": 169
|
|
63098
63110
|
}
|
|
63099
63111
|
},
|
|
63100
63112
|
"fluidClass": {
|
|
@@ -63103,7 +63115,7 @@
|
|
|
63103
63115
|
"name": "fluidClass",
|
|
63104
63116
|
"type": "",
|
|
63105
63117
|
"returnType": "",
|
|
63106
|
-
"line":
|
|
63118
|
+
"line": 173
|
|
63107
63119
|
}
|
|
63108
63120
|
},
|
|
63109
63121
|
"fluidSkeletonClass": {
|
|
@@ -63112,7 +63124,7 @@
|
|
|
63112
63124
|
"name": "fluidSkeletonClass",
|
|
63113
63125
|
"type": "",
|
|
63114
63126
|
"returnType": "",
|
|
63115
|
-
"line":
|
|
63127
|
+
"line": 177
|
|
63116
63128
|
}
|
|
63117
63129
|
}
|
|
63118
63130
|
}
|
|
@@ -74500,6 +74512,16 @@
|
|
|
74500
74512
|
"type": "",
|
|
74501
74513
|
"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})"
|
|
74502
74514
|
},
|
|
74515
|
+
{
|
|
74516
|
+
"name": "Fluid",
|
|
74517
|
+
"ctype": "miscellaneous",
|
|
74518
|
+
"subtype": "variable",
|
|
74519
|
+
"file": "src/combobox/combobox.stories.ts",
|
|
74520
|
+
"deprecated": false,
|
|
74521
|
+
"deprecationMessage": "",
|
|
74522
|
+
"type": "",
|
|
74523
|
+
"defaultValue": "Template.bind({})"
|
|
74524
|
+
},
|
|
74503
74525
|
{
|
|
74504
74526
|
"name": "Fluid",
|
|
74505
74527
|
"ctype": "miscellaneous",
|
|
@@ -75184,7 +75206,7 @@
|
|
|
75184
75206
|
"deprecated": false,
|
|
75185
75207
|
"deprecationMessage": "",
|
|
75186
75208
|
"type": "",
|
|
75187
|
-
"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})"
|
|
75209
|
+
"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})"
|
|
75188
75210
|
},
|
|
75189
75211
|
{
|
|
75190
75212
|
"name": "MultiTemplate",
|
|
@@ -76349,7 +76371,7 @@
|
|
|
76349
76371
|
"deprecated": false,
|
|
76350
76372
|
"deprecationMessage": "",
|
|
76351
76373
|
"type": "",
|
|
76352
|
-
"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})"
|
|
76374
|
+
"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})"
|
|
76353
76375
|
},
|
|
76354
76376
|
{
|
|
76355
76377
|
"name": "Template",
|
|
@@ -80485,6 +80507,16 @@
|
|
|
80485
80507
|
"type": "",
|
|
80486
80508
|
"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})"
|
|
80487
80509
|
},
|
|
80510
|
+
{
|
|
80511
|
+
"name": "Fluid",
|
|
80512
|
+
"ctype": "miscellaneous",
|
|
80513
|
+
"subtype": "variable",
|
|
80514
|
+
"file": "src/combobox/combobox.stories.ts",
|
|
80515
|
+
"deprecated": false,
|
|
80516
|
+
"deprecationMessage": "",
|
|
80517
|
+
"type": "",
|
|
80518
|
+
"defaultValue": "Template.bind({})"
|
|
80519
|
+
},
|
|
80488
80520
|
{
|
|
80489
80521
|
"name": "MockQuerySearch",
|
|
80490
80522
|
"ctype": "miscellaneous",
|
|
@@ -80523,7 +80555,7 @@
|
|
|
80523
80555
|
"deprecated": false,
|
|
80524
80556
|
"deprecationMessage": "",
|
|
80525
80557
|
"type": "",
|
|
80526
|
-
"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})"
|
|
80558
|
+
"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})"
|
|
80527
80559
|
},
|
|
80528
80560
|
{
|
|
80529
80561
|
"name": "ReactiveForms",
|
|
@@ -80553,7 +80585,7 @@
|
|
|
80553
80585
|
"deprecated": false,
|
|
80554
80586
|
"deprecationMessage": "",
|
|
80555
80587
|
"type": "",
|
|
80556
|
-
"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})"
|
|
80588
|
+
"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})"
|
|
80557
80589
|
}
|
|
80558
80590
|
],
|
|
80559
80591
|
"src/content-switcher/content-switcher.stories.ts": [
|
|
@@ -85770,8 +85802,8 @@
|
|
|
85770
85802
|
"type": "component",
|
|
85771
85803
|
"linktype": "component",
|
|
85772
85804
|
"name": "ComboBox",
|
|
85773
|
-
"coveragePercent":
|
|
85774
|
-
"coverageCount": "
|
|
85805
|
+
"coveragePercent": 69,
|
|
85806
|
+
"coverageCount": "51/73",
|
|
85775
85807
|
"status": "good"
|
|
85776
85808
|
},
|
|
85777
85809
|
{
|
|
@@ -85824,6 +85856,16 @@
|
|
|
85824
85856
|
"coverageCount": "0/1",
|
|
85825
85857
|
"status": "low"
|
|
85826
85858
|
},
|
|
85859
|
+
{
|
|
85860
|
+
"filePath": "src/combobox/combobox.stories.ts",
|
|
85861
|
+
"type": "variable",
|
|
85862
|
+
"linktype": "miscellaneous",
|
|
85863
|
+
"linksubtype": "variable",
|
|
85864
|
+
"name": "Fluid",
|
|
85865
|
+
"coveragePercent": 0,
|
|
85866
|
+
"coverageCount": "0/1",
|
|
85867
|
+
"status": "low"
|
|
85868
|
+
},
|
|
85827
85869
|
{
|
|
85828
85870
|
"filePath": "src/combobox/combobox.stories.ts",
|
|
85829
85871
|
"type": "variable",
|