carbon-components-angular 3.15.2 → 3.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dialog/dialog.component.js +5 -29
  2. package/dialog/dialog.component.js.map +1 -1
  3. package/dialog/dialog.component.metadata.json +1 -1
  4. package/docs/documentation/components/Dialog.html +12 -41
  5. package/docs/documentation/components/Dropdown.html +82 -176
  6. package/docs/documentation/components/OverflowMenuPane.html +7 -7
  7. package/docs/documentation/components/Tooltip.html +7 -7
  8. package/docs/documentation/coverage.html +49 -1
  9. package/docs/documentation/images/coverage-badge-documentation.svg +1 -1
  10. package/docs/documentation/js/search/search_index.js +2 -2
  11. package/docs/documentation/miscellaneous/variables.html +144 -0
  12. package/docs/storybook/iframe.html +3 -3
  13. package/docs/storybook/{main.b7f84e1c05f635d7c347.bundle.js → main.d9349fe343a2c719f60b.bundle.js} +84 -54
  14. package/docs/storybook/main.d9349fe343a2c719f60b.bundle.js.map +1 -0
  15. package/docs/storybook/{runtime~main.b7f84e1c05f635d7c347.bundle.js → runtime~main.d9349fe343a2c719f60b.bundle.js} +1 -1
  16. package/docs/storybook/{runtime~main.b7f84e1c05f635d7c347.bundle.js.map → runtime~main.d9349fe343a2c719f60b.bundle.js.map} +1 -1
  17. package/docs/storybook/{vendors~main.b7f84e1c05f635d7c347.bundle.js → vendors~main.d9349fe343a2c719f60b.bundle.js} +1 -1
  18. package/docs/storybook/{vendors~main.b7f84e1c05f635d7c347.bundle.js.map → vendors~main.d9349fe343a2c719f60b.bundle.js.map} +1 -1
  19. package/dropdown/dropdown.component.d.ts +0 -4
  20. package/dropdown/dropdown.component.js +14 -25
  21. package/dropdown/dropdown.component.js.map +1 -1
  22. package/dropdown/dropdown.component.metadata.json +1 -1
  23. package/dropdown/dropdown.component.ngsummary.json +1 -1
  24. package/modal/modal.component.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/utils/scroll.d.ts +38 -0
  27. package/utils/scroll.js +66 -0
  28. package/utils/scroll.js.map +1 -0
  29. package/utils/scroll.metadata.json +1 -0
  30. package/utils/scroll.ngsummary.json +1 -0
  31. package/breadcrumb/breadcrumb.component.spec.d.ts +0 -21
  32. package/bundle/carbon-angular.umd.js +0 -216
  33. package/bundle/carbon-angular.umd.js.map +0 -1
  34. package/checkbox/checkbox.component.spec.d.ts +0 -21
  35. package/code-snippet/code-snippet.component.spec.d.ts +0 -21
  36. package/combobox/combobox.component.spec.d.ts +0 -21
  37. package/common/utils.spec.d.ts +0 -21
  38. package/dialog/tooltip/tooltip.directive.spec.d.ts +0 -21
  39. package/docs/storybook/main.b7f84e1c05f635d7c347.bundle.js.map +0 -1
  40. package/dropdown/dropdown.component.spec.d.ts +0 -21
  41. package/dropdown/list/dropdown-list.component.spec.d.ts +0 -21
  42. package/grid/grid.directive.spec.d.ts +0 -21
  43. package/i18n/i18n.spec.d.ts +0 -21
  44. package/inline-loading/inline-loading.spec.d.ts +0 -21
  45. package/input/label.component.spec.d.ts +0 -21
  46. package/link/link.spec.d.ts +0 -21
  47. package/loading/loading.component.spec.d.ts +0 -21
  48. package/modal/modal.component.spec.d.ts +0 -21
  49. package/notification/notification.component.spec.d.ts +0 -21
  50. package/number-input/number.component.spec.d.ts +0 -21
  51. package/radio/radio.component.spec.d.ts +0 -21
  52. package/sample/sample-base.class.d.ts +0 -35
  53. package/sample/sample.component.d.ts +0 -48
  54. package/sample/sample.component.spec.d.ts +0 -21
  55. package/sample/sample.interface.d.ts +0 -29
  56. package/sample/sample.module.d.ts +0 -26
  57. package/sample/subcomponent/sample-sub.component.d.ts +0 -38
  58. package/sample/subcomponent/sample-sub.component.spec.d.ts +0 -21
  59. package/search/search.component.spec.d.ts +0 -21
  60. package/table/table-model.class.spec.d.ts +0 -21
  61. package/table/table.component.spec.d.ts +0 -21
  62. package/tabs/tab-headers.component.spec.d.ts +0 -21
  63. package/tabs/tabs.component.spec.d.ts +0 -22
  64. package/tiles/clickable-tile.component.spec.d.ts +0 -22
  65. package/tiles/tile.component.spec.d.ts +0 -22
  66. package/toggle/toggle.component.spec.d.ts +0 -21
  67. package/ui-shell/header/header.component.spec.d.ts +0 -21
  68. package/utils/a11y.d.ts +0 -26
  69. package/utils/position.d.ts +0 -21
  70. package/utils/utils.d.ts +0 -21
@@ -252,9 +252,5 @@ export declare class Dropdown implements OnInit, AfterContentInit, OnDestroy {
252
252
  * Controls toggling menu states between open/expanded and closed/collapsed.
253
253
  */
254
254
  toggleMenu(): void;
255
- /**
256
- * Returns `true` if the `elem` is visible within the `container`.
257
- */
258
- isVisibleInContainer(elem: HTMLElement, container: HTMLElement): boolean;
259
255
  isTemplate(value: any): boolean;
260
256
  }
@@ -21,10 +21,11 @@
21
21
  import { Component, Input, Output, EventEmitter, ElementRef, ContentChild, ViewChild, HostListener, HostBinding, TemplateRef } from "@angular/core";
22
22
  import { NG_VALUE_ACCESSOR } from "@angular/forms";
23
23
  // Observable import is required here so typescript can compile correctly
24
- import { fromEvent, of } from "rxjs";
24
+ import { fromEvent, of, merge } from "rxjs";
25
25
  import { AbstractDropdownView } from "./abstract-dropdown-view.class";
26
26
  import { I18n } from "./../i18n/i18n.module";
27
27
  import { DropdownService } from "./dropdown.service";
28
+ import { scrollableParentsObservable, isVisibleInContainer } from "./../utils/scroll";
28
29
  /**
29
30
  * Drop-down lists enable users to select one or more items from a list.
30
31
  *
@@ -500,20 +501,21 @@ var Dropdown = /** @class */ (function () {
500
501
  */
501
502
  Dropdown.prototype.addScrollEventListener = function () {
502
503
  var _this = this;
504
+ var scrollObservable = scrollableParentsObservable(this.elementRef.nativeElement);
503
505
  if (this.scrollableContainer) {
504
- var container_1 = document.querySelector(this.scrollableContainer);
505
- if (container_1) {
506
- this.scroll = fromEvent(container_1, "scroll")
507
- .subscribe(function () {
508
- if (_this.isVisibleInContainer(_this.elementRef.nativeElement, container_1)) {
509
- _this.dropdownService.updatePosition(_this.dropdownButton.nativeElement);
510
- }
511
- else {
512
- _this.closeMenu();
513
- }
514
- });
506
+ var container = document.querySelector(this.scrollableContainer);
507
+ if (container) {
508
+ scrollObservable = merge(scrollObservable, fromEvent(container, "scroll"));
515
509
  }
516
510
  }
511
+ this.scroll = scrollObservable.subscribe(function (event) {
512
+ if (isVisibleInContainer(_this.elementRef.nativeElement, event.target)) {
513
+ _this.dropdownService.updatePosition(_this.dropdownButton.nativeElement);
514
+ }
515
+ else {
516
+ _this.closeMenu();
517
+ }
518
+ });
517
519
  };
518
520
  /**
519
521
  * Removes any `EventListeners` responsible for scroll functionality.
@@ -534,19 +536,6 @@ var Dropdown = /** @class */ (function () {
534
536
  this.closeMenu();
535
537
  }
536
538
  };
537
- /**
538
- * Returns `true` if the `elem` is visible within the `container`.
539
- */
540
- Dropdown.prototype.isVisibleInContainer = function (elem, container) {
541
- var containerTop = container.scrollTop;
542
- var containerBottom = containerTop + container.offsetHeight;
543
- var elemTop = elem.offsetTop + elem.offsetHeight;
544
- var elemBottom = elemTop;
545
- if ((elemBottom <= containerBottom) && (elemTop >= containerTop)) {
546
- return true;
547
- }
548
- return false;
549
- };
550
539
  Dropdown.prototype.isTemplate = function (value) {
551
540
  return value instanceof TemplateRef;
552
541
  };
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.component.js","sourceRoot":"","sources":["../src/dropdown/dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,YAAY,EAEZ,SAAS,EAET,YAAY,EAEZ,WAAW,EACX,WAAW,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,yEAAyE;AACzE,OAAO,EAAc,SAAS,EAAE,EAAE,EAAgB,MAAM,MAAM,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,eAA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C;SAziBY,QAAQ","sourcesContent":["import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tElementRef,\n\tContentChild,\n\tOnInit,\n\tViewChild,\n\tAfterContentInit,\n\tHostListener,\n\tOnDestroy,\n\tHostBinding,\n\tTemplateRef\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n// Observable import is required here so typescript can compile correctly\nimport { Observable, fromEvent, of, Subscription } from \"rxjs\";\n\nimport { AbstractDropdownView } from \"./abstract-dropdown-view.class\";\nimport { position } from \"@carbon/utils-position\";\nimport { I18n } from \"./../i18n/i18n.module\";\nimport { ListItem } from \"./list-item.interface\";\nimport { DropdownService } from \"./dropdown.service\";\n\n/**\n * Drop-down lists enable users to select one or more items from a list.\n *\n * [See demo](../../?path=/story/dropdown--basic)\n *\n * <example-url>../../iframe.html?id=dropdown--basic</example-url>\n *\n * @export\n * @class Dropdown\n * @implements {OnInit}\n * @implements {AfterContentInit}\n * @implements {OnDestroy}\n */\n@Component({\n\tselector: \"ibm-dropdown\",\n\ttemplate: `\n\t<label *ngIf=\"label\" [for]=\"id\" class=\"bx--label\">\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 *ngIf=\"helperText\" class=\"bx--form__helper-text\">\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\n\t\t[id]=\"id\"\n\t\tclass=\"bx--dropdown bx--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'bx--dropdown--light': theme === 'light',\n\t\t\t'bx--list-box--inline': inline,\n\t\t\t'bx--skeleton': skeleton,\n\t\t\t'bx--dropdown--disabled bx--list-box--disabled': disabled\n\t\t}\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\t#dropdownButton\n\t\t\tclass=\"bx--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\t(click)=\"toggleMenu()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t[disabled]=\"disabled\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"bx--list-box__selection--multi\"\n\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"bx--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</ibm-icon-chevron-down16>\n\t\t</button>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'drop-up': dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Dropdown,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Dropdown implements OnInit, AfterContentInit, OnDestroy {\n\tstatic dropdownCount = 0;\n\t@Input() id = `dropdown-${Dropdown.dropdownCount++}`;\n\t/**\n\t * Label for the dropdown.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * Value displayed if no item is selected.\n\t */\n\t@Input() placeholder = \"\";\n\t/**\n\t * The selected value from the `Dropdown`. Can be a string or template.\n\t */\n\t@Input() displayValue: string | TemplateRef<any> = \"\";\n\t/**\n\t * Size to render the dropdown field.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Defines whether or not the `Dropdown` supports selecting multiple items as opposed to single\n\t * item selection.\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * `light` or `dark` dropdown theme\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Set to `true` to disable the dropdown.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for a loading dropdown.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * Set to `true` for an inline dropdown.\n\t */\n\t@Input() inline = false;\n\t/**\n\t * Set to `true` for a dropdown without arrow key activation.\n\t */\n\t@Input() disableArrowKeys = false;\n\t/**\n\t * Deprecated. Dropdown now defaults to appending inline\n\t * Set to `true` if the `Dropdown` is to be appended to the DOM body.\n\t */\n\t@Input() set appendToBody (v) {\n\t\tconsole.log(\"`appendToBody` has been deprecated. Dropdowns now append to the body by default.\");\n\t\tconsole.log(\"Ensure you have an `ibm-placeholder` in your app.\");\n\t\tconsole.log(\"Use `appendInline` if you need to position your dropdowns within the normal page flow.\");\n\t\tthis.appendInline = !v;\n\t}\n\n\tget appendToBody() {\n\t\treturn !this.appendInline;\n\t}\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline = false;\n\t/**\n\t * Query string for the element that contains the `Dropdown`.\n\t * Used to trigger closing the dropdown if it scrolls outside of the viewport of the `scrollableContainer`.\n\t */\n\t@Input() scrollableContainer: string;\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() value: string;\n\t/**\n\t * Accessible label for the button that opens the dropdown list.\n\t * Defaults to the `DROPDOWN.OPEN` value from the i18n service.\n\t */\n\t@Input() menuButtonLabel = this.i18n.get().DROPDOWN.OPEN;\n\t/**\n\t * Provides the label for the \"# selected\" text.\n\t * Defaults to the `DROPDOWN.SELECTED` value from the i18n service.\n\t */\n\t@Input() selectedLabel = this.i18n.get().DROPDOWN.SELECTED;\n\t/**\n\t * Emits selection events.\n\t */\n\t@Output() selected: EventEmitter<Object> = new EventEmitter<Object>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter<any>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() close: EventEmitter<any> = new EventEmitter<any>();\n\n\t/**\n\t * Maintains a reference to the `AbstractDropdownView` object within the content DOM.\n\t */\n\t@ContentChild(AbstractDropdownView) view: AbstractDropdownView;\n\t/**\n\t * Maintains a reference to the view DOM element of the `Dropdown` button.\n\t */\n\t@ViewChild(\"dropdownButton\") dropdownButton;\n\t/**\n\t * ViewChid of the dropdown view.\n\t */\n\t@ViewChild(\"dropdownMenu\") dropdownMenu;\n\n\t@HostBinding(\"class.bx--dropdown__wrapper\") hostClass = true;\n\t/**\n\t * Set to `true` if the dropdown is closed (not expanded).\n\t */\n\tmenuIsClosed = true;\n\n\t/**\n\t * controls wether the `drop-up` class is applied\n\t */\n\tdropUp = false;\n\n\t// .bind creates a new function, so we declare the methods below\n\t// but .bind them up here\n\tnoop = this._noop.bind(this);\n\toutsideClick = this._outsideClick.bind(this);\n\toutsideKey = this._outsideKey.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\t/**\n\t * Maintians an Event Observable Subscription for tracking scrolling within the open `Dropdown` list.\n\t */\n\tscroll: Subscription;\n\n\tprotected onTouchedCallback: () => void = this._noop;\n\n\t/**\n\t * Creates an instance of Dropdown.\n\t */\n\tconstructor(protected elementRef: ElementRef, protected i18n: I18n, protected dropdownService: DropdownService) {}\n\n\t/**\n\t * Updates the `type` property in the `@ContentChild`.\n\t * The `type` property specifies whether the `Dropdown` allows single selection or multi selection.\n\t */\n\tngOnInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\t\t}\n\t}\n\n\t/**\n\t * Initializes classes and subscribes to events for single or multi selection.\n\t */\n\tngAfterContentInit() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tthis.view.type = this.type;\n\t\tthis.view.size = this.size;\n\t\tthis.view.select.subscribe(event => {\n\t\t\tif (this.type === \"multi\") {\n\t\t\t\t// if we have a `value` selector and selected items map them approperiatly\n\t\t\t\tif (this.value && this.view.getSelected()) {\n\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.value]);\n\t\t\t\t\tthis.propagateChange(values);\n\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(this.view.getSelected());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.closeMenu();\n\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\tif (this.value) {\n\t\t\t\t\t\tthis.propagateChange(event.item[this.value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.propagateChange(event.item);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(null);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// only emit selected for \"organic\" selections\n\t\t\tif (!event.isUpdate) {\n\t\t\t\tthis.selected.emit(event);\n\t\t\t}\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.appendToBody) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Propagates the injected `value`.\n\t */\n\twriteValue(value: any) {\n\t\t// propagate null/falsey as an array (deselect everything)\n\t\tif (!value) {\n\t\t\tthis.view.propagateSelected([value]);\n\t\t} else if (this.type === \"single\") {\n\t\t\tif (this.value) {\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.value] === 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// pass the singular value as an array of ListItem\n\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.value) {\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 view the `items` Input\n\t\t\t\tconst newValues = Array.from(this.view.getListItems(), item => Object.assign({}, item));\n\t\t\t\tfor (const v of value) {\n\t\t\t\t\tfor (const newValue of newValues) {\n\t\t\t\t\t\tif (newValue[this.value] === v) {\n\t\t\t\t\t\t\tnewValue.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\t// we can safely assume we're passing an array of `ListItem`s\n\t\t\t\tthis.view.propagateSelected(value);\n\t\t\t}\n\t\t}\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\t/**\n\t * Registering the function injected to control the touch use of the `Dropdown`.\n\t */\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\tpropagateChange = (_: any) => {};\n\n\t/**\n\t * Adds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\t// \"Esc\", \"Spacebar\", \"Down\", and \"Up\" are IE specific values\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif ((event.key === \"Escape\" || event.key === \"Esc\") && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close other widgets that listen for Escape\n\t\t}\n\t\tif (event.key === \"Escape\" || event.key === \"Esc\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (this.menuIsClosed && (event.key === \" \" || event.key === \"ArrowDown\" || event.key === \"ArrowUp\" ||\n\t\t\tevent.key === \"Spacebar\" || event.key === \"Down\" || event.key === \"Up\")) {\n\t\t\tif (this.disableArrowKeys && (event.key === \"ArrowDown\" || event.key === \"ArrowUp\" || event.key === \"Down\" || event.key === \"Up\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tthis.openMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && event.shiftKey) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (this.type === \"multi\") { return; }\n\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.closedDropdownNavigation(event);\n\t\t}\n\t}\n\n\tclosedDropdownNavigation(event) {\n\t\t// \"Down\", and \"Up\" are IE specific values\n\t\tif (event.key === \"ArrowDown\" || event.key === \"Down\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getNextItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t} else if (event.key === \"ArrowUp\" || event.key === \"Up\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getPrevItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t}\n\t}\n\n\t/**\n\t * Returns the display value if there is a selection and displayValue is set,\n\t * if there is just a selection the ListItem content property will be returned,\n\t * otherwise the placeholder will be returned.\n\t */\n\tgetDisplayStringValue(): Observable<string> {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (selected && (!this.displayValue || !this.isRenderString())) {\n\t\t\tif (this.type === \"multi\") {\n\t\t\t\treturn of(this.placeholder);\n\t\t\t} else {\n\t\t\t\treturn of(selected[0].content);\n\t\t\t}\n\t\t} else if (selected && this.isRenderString()) {\n\t\t\treturn of(this.displayValue as string);\n\t\t}\n\t\treturn of(this.placeholder);\n\t}\n\n\tisRenderString(): boolean {\n\t\treturn typeof this.displayValue === \"string\";\n\t}\n\n\tgetRenderTemplateContext() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\treturn {items: selected};\n\t\t} else if (selected && selected.length > 0) {\n\t\t\treturn {item: selected[0]}; // this is to be compatible with the dropdown-list template\n\t\t} else {\n\t\t\treturn {};\n\t\t}\n\t}\n\n\tgetSelectedCount(): number {\n\t\tif (this.view.getSelected()) {\n\t\t\treturn this.view.getSelected().length;\n\t\t}\n\t}\n\n\tclearSelected() {\n\t\tfor (const item of this.view.getListItems()) {\n\t\t\titem.selected = false;\n\t\t}\n\t\tthis.selected.emit([]);\n\t\tthis.propagateChange([]);\n\t}\n\n\t/**\n\t * Returns `true` if there is a value selected.\n\t */\n\tvalueSelected(): boolean {\n\t\tif (this.view.getSelected()) { return true; }\n\t\treturn false;\n\t}\n\n\t_noop() {}\n\t/**\n\t * Handles clicks outside of the `Dropdown`.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t_outsideKey(event) {\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\t// \"Esc\" is an IE specific value\n\t\tif ((event.key === \"Escape\" || event.key === \"Esc\") && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\" || event.key === \"Esc\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (!this.menuIsClosed && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t\tthis.dropdownButton.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", {bubbles: true, cancelable: true, key: \"Tab\"}));\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.dropdownButton.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\tthis.elementRef.nativeElement.className);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Expands the dropdown menu in the view.\n\t */\n\topenMenu() {\n\t\tthis.menuIsClosed = false;\n\n\t\t// move the dropdown list to the body if we're not appending inline\n\t\t// and position it relative to the dropdown wrapper\n\t\tif (!this.appendInline) {\n\t\t\tthis.addScrollEventListener();\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\t// set the dropdown menu to drop up if it's near the bottom of the screen\n\t\t// setTimeout lets us measure after it's visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tconst menu = this.dropdownMenu.nativeElement;\n\t\t\tconst boundingClientRect = menu.getBoundingClientRect();\n\n\t\t\tif (boundingClientRect.bottom > window.innerHeight) {\n\t\t\t\t// min height of 100px\n\t\t\t\tif (window.innerHeight - boundingClientRect.top > 100) {\n\t\t\t\t\t// remove the conditional once this api is settled and part of abstract-dropdown-view.class\n\t\t\t\t\tif (this.view[\"enableScroll\"]) {\n\t\t\t\t\t\tthis.view[\"enableScroll\"]();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.dropUp = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.dropUp = false;\n\t\t\t}\n\t\t}, 0);\n\n\t\t// we bind noop to document.body.firstElementChild to allow safari to fire events\n\t\t// from document. Then we unbind everything later to keep things light.\n\t\tdocument.body.firstElementChild.addEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.addEventListener(\"keydown\", this.noop, true);\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.addEventListener(\"keydown\", this.outsideKey, true);\n\t\tsetTimeout(() => this.view.initFocus(), 0);\n\t}\n\n\t/**\n\t * Collapsing the dropdown menu and removing unnecessary `EventListeners`.\n\t */\n\tcloseMenu() {\n\t\t// return early if the menu is already closed\n\t\tif (this.menuIsClosed) { return; }\n\t\tthis.menuIsClosed = true;\n\t\tthis.onClose.emit();\n\t\tthis.close.emit();\n\n\t\t// focus the trigger button when we close ...\n\t\tthis.dropdownButton.nativeElement.focus();\n\n\t\t// remove the conditional once this api is settled and part of abstract-dropdown-view.class\n\t\tif (this.view[\"disableScroll\"]) {\n\t\t\tthis.view[\"disableScroll\"]();\n\t\t}\n\n\t\t// move the list back in the component on close\n\t\tif (!this.appendInline) {\n\t\t\tthis.removeScrollEventListener();\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t\tdocument.body.firstElementChild.removeEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.removeEventListener(\"keydown\", this.noop, true);\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.removeEventListener(\"keydown\", this.outsideKey, true);\n\t}\n\n\t/**\n\t * Add scroll event listener if scrollableContainer is provided\n\t */\n\taddScrollEventListener() {\n\t\tif (this.scrollableContainer) {\n\t\t\tconst container: HTMLElement = document.querySelector(this.scrollableContainer);\n\n\t\t\tif (container) {\n\t\t\t\tthis.scroll = fromEvent(container, \"scroll\")\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tif (this.isVisibleInContainer(this.elementRef.nativeElement, container)) {\n\t\t\t\t\t\tthis.dropdownService.updatePosition(this.dropdownButton.nativeElement);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.closeMenu();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes any `EventListeners` responsible for scroll functionality.\n\t */\n\tremoveScrollEventListener() {\n\t\tif (this.scroll) {\n\t\t\tthis.scroll.unsubscribe();\n\t\t}\n\t}\n\n\t/**\n\t * Controls toggling menu states between open/expanded and closed/collapsed.\n\t */\n\ttoggleMenu() {\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.openMenu();\n\t\t} else {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the `elem` is visible within the `container`.\n\t */\n\tisVisibleInContainer(elem: HTMLElement, container: HTMLElement): boolean {\n\t\tconst containerTop = container.scrollTop;\n\t\tconst containerBottom = containerTop + container.offsetHeight;\n\t\tconst elemTop = elem.offsetTop + elem.offsetHeight;\n\t\tconst elemBottom = elemTop;\n\n\t\tif ((elemBottom <= containerBottom) && (elemTop >= containerTop)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n"]}
1
+ {"version":3,"file":"dropdown.component.js","sourceRoot":"","sources":["../src/dropdown/dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,YAAY,EAEZ,SAAS,EAET,YAAY,EAEZ,WAAW,EACX,WAAW,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,yEAAyE;AACzE,OAAO,EAEN,SAAS,EACT,EAAE,EAEF,KAAK,EACL,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEtF;;;;;;;;;;;;GAYG;AACH;IAsNC;;OAEG;IACH,kBAAsB,UAAsB,EAAY,IAAU,EAAY,eAAgC;QAAxF,eAAU,GAAV,UAAU,CAAY;QAAY,SAAI,GAAJ,IAAI,CAAM;QAAY,oBAAe,GAAf,eAAe,CAAiB;QAxIrG,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,GAAG,CAAC,CAAC;;gBAhFzB,SAAS,SAAC;oBACV,QAAQ,EAAE,cAAc;oBACxB,QAAQ,EAAE,++EAoET;oBACD,SAAS,EAAE;wBACV;4BACC,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,QAAQ;4BACrB,KAAK,EAAE,IAAI;yBACX;qBACD;iBACD;;;;gBAvHA,UAAU;gBAuBF,IAAI;gBAEJ,eAAe;;;qBAiGtB,KAAK;wBAIL,KAAK;6BAIL,KAAK;8BAIL,KAAK;+BAIL,KAAK;uBAIL,KAAK;uBAKL,KAAK;wBAIL,KAAK;2BAIL,KAAK;2BAIL,KAAK;yBAIL,KAAK;mCAIL,KAAK;+BAKL,KAAK;+BAaL,KAAK;sCAKL,KAAK;wBAIL,KAAK;kCAKL,KAAK;gCAKL,KAAK;2BAIL,MAAM;0BAIN,MAAM;wBAIN,MAAM;uBAKN,YAAY,SAAC,oBAAoB;iCAIjC,SAAS,SAAC,gBAAgB;+BAI1B,SAAS,SAAC,cAAc;4BAExB,WAAW,SAAC,6BAA6B;4BA+IzC,YAAY,SAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;IA4RpC,eAAC;CAAA,AAzmBD,IAymBC;SA1hBY,QAAQ","sourcesContent":["import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tElementRef,\n\tContentChild,\n\tOnInit,\n\tViewChild,\n\tAfterContentInit,\n\tHostListener,\n\tOnDestroy,\n\tHostBinding,\n\tTemplateRef\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n// Observable import is required here so typescript can compile correctly\nimport {\n\tObservable,\n\tfromEvent,\n\tof,\n\tSubscription,\n\tmerge\n} from \"rxjs\";\n\nimport { AbstractDropdownView } from \"./abstract-dropdown-view.class\";\nimport { position } from \"@carbon/utils-position\";\nimport { I18n } from \"./../i18n/i18n.module\";\nimport { ListItem } from \"./list-item.interface\";\nimport { DropdownService } from \"./dropdown.service\";\nimport { scrollableParentsObservable, isVisibleInContainer } from \"./../utils/scroll\";\n\n/**\n * Drop-down lists enable users to select one or more items from a list.\n *\n * [See demo](../../?path=/story/dropdown--basic)\n *\n * <example-url>../../iframe.html?id=dropdown--basic</example-url>\n *\n * @export\n * @class Dropdown\n * @implements {OnInit}\n * @implements {AfterContentInit}\n * @implements {OnDestroy}\n */\n@Component({\n\tselector: \"ibm-dropdown\",\n\ttemplate: `\n\t<label *ngIf=\"label\" [for]=\"id\" class=\"bx--label\">\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 *ngIf=\"helperText\" class=\"bx--form__helper-text\">\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\n\t\t[id]=\"id\"\n\t\tclass=\"bx--dropdown bx--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'bx--dropdown--light': theme === 'light',\n\t\t\t'bx--list-box--inline': inline,\n\t\t\t'bx--skeleton': skeleton,\n\t\t\t'bx--dropdown--disabled bx--list-box--disabled': disabled\n\t\t}\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\t#dropdownButton\n\t\t\tclass=\"bx--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\t(click)=\"toggleMenu()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t[disabled]=\"disabled\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"bx--list-box__selection--multi\"\n\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"bx--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</ibm-icon-chevron-down16>\n\t\t</button>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'drop-up': dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Dropdown,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Dropdown implements OnInit, AfterContentInit, OnDestroy {\n\tstatic dropdownCount = 0;\n\t@Input() id = `dropdown-${Dropdown.dropdownCount++}`;\n\t/**\n\t * Label for the dropdown.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Sets the optional helper text.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * Value displayed if no item is selected.\n\t */\n\t@Input() placeholder = \"\";\n\t/**\n\t * The selected value from the `Dropdown`. Can be a string or template.\n\t */\n\t@Input() displayValue: string | TemplateRef<any> = \"\";\n\t/**\n\t * Size to render the dropdown field.\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Defines whether or not the `Dropdown` supports selecting multiple items as opposed to single\n\t * item selection.\n\t */\n\t@Input() type: \"single\" | \"multi\" = \"single\";\n\t/**\n\t * `light` or `dark` dropdown theme\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t/**\n\t * Set to `true` to disable the dropdown.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` for a loading dropdown.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * Set to `true` for an inline dropdown.\n\t */\n\t@Input() inline = false;\n\t/**\n\t * Set to `true` for a dropdown without arrow key activation.\n\t */\n\t@Input() disableArrowKeys = false;\n\t/**\n\t * Deprecated. Dropdown now defaults to appending inline\n\t * Set to `true` if the `Dropdown` is to be appended to the DOM body.\n\t */\n\t@Input() set appendToBody (v) {\n\t\tconsole.log(\"`appendToBody` has been deprecated. Dropdowns now append to the body by default.\");\n\t\tconsole.log(\"Ensure you have an `ibm-placeholder` in your app.\");\n\t\tconsole.log(\"Use `appendInline` if you need to position your dropdowns within the normal page flow.\");\n\t\tthis.appendInline = !v;\n\t}\n\n\tget appendToBody() {\n\t\treturn !this.appendInline;\n\t}\n\t/**\n\t * set to `true` to place the dropdown view inline with the component\n\t */\n\t@Input() appendInline = false;\n\t/**\n\t * Query string for the element that contains the `Dropdown`.\n\t * Used to trigger closing the dropdown if it scrolls outside of the viewport of the `scrollableContainer`.\n\t */\n\t@Input() scrollableContainer: string;\n\t/**\n\t * Specifies the property to be used as the return value to `ngModel`\n\t */\n\t@Input() value: string;\n\t/**\n\t * Accessible label for the button that opens the dropdown list.\n\t * Defaults to the `DROPDOWN.OPEN` value from the i18n service.\n\t */\n\t@Input() menuButtonLabel = this.i18n.get().DROPDOWN.OPEN;\n\t/**\n\t * Provides the label for the \"# selected\" text.\n\t * Defaults to the `DROPDOWN.SELECTED` value from the i18n service.\n\t */\n\t@Input() selectedLabel = this.i18n.get().DROPDOWN.SELECTED;\n\t/**\n\t * Emits selection events.\n\t */\n\t@Output() selected: EventEmitter<Object> = new EventEmitter<Object>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter<any>();\n\t/**\n\t * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n\t */\n\t@Output() close: EventEmitter<any> = new EventEmitter<any>();\n\n\t/**\n\t * Maintains a reference to the `AbstractDropdownView` object within the content DOM.\n\t */\n\t@ContentChild(AbstractDropdownView) view: AbstractDropdownView;\n\t/**\n\t * Maintains a reference to the view DOM element of the `Dropdown` button.\n\t */\n\t@ViewChild(\"dropdownButton\") dropdownButton;\n\t/**\n\t * ViewChid of the dropdown view.\n\t */\n\t@ViewChild(\"dropdownMenu\") dropdownMenu;\n\n\t@HostBinding(\"class.bx--dropdown__wrapper\") hostClass = true;\n\t/**\n\t * Set to `true` if the dropdown is closed (not expanded).\n\t */\n\tmenuIsClosed = true;\n\n\t/**\n\t * controls wether the `drop-up` class is applied\n\t */\n\tdropUp = false;\n\n\t// .bind creates a new function, so we declare the methods below\n\t// but .bind them up here\n\tnoop = this._noop.bind(this);\n\toutsideClick = this._outsideClick.bind(this);\n\toutsideKey = this._outsideKey.bind(this);\n\tkeyboardNav = this._keyboardNav.bind(this);\n\t/**\n\t * Maintians an Event Observable Subscription for tracking scrolling within the open `Dropdown` list.\n\t */\n\tscroll: Subscription;\n\n\tprotected onTouchedCallback: () => void = this._noop;\n\n\t/**\n\t * Creates an instance of Dropdown.\n\t */\n\tconstructor(protected elementRef: ElementRef, protected i18n: I18n, protected dropdownService: DropdownService) {}\n\n\t/**\n\t * Updates the `type` property in the `@ContentChild`.\n\t * The `type` property specifies whether the `Dropdown` allows single selection or multi selection.\n\t */\n\tngOnInit() {\n\t\tif (this.view) {\n\t\t\tthis.view.type = this.type;\n\t\t}\n\t}\n\n\t/**\n\t * Initializes classes and subscribes to events for single or multi selection.\n\t */\n\tngAfterContentInit() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tthis.view.type = this.type;\n\t\tthis.view.size = this.size;\n\t\tthis.view.select.subscribe(event => {\n\t\t\tif (this.type === \"multi\") {\n\t\t\t\t// if we have a `value` selector and selected items map them approperiatly\n\t\t\t\tif (this.value && this.view.getSelected()) {\n\t\t\t\t\tconst values = this.view.getSelected().map(item => item[this.value]);\n\t\t\t\t\tthis.propagateChange(values);\n\t\t\t\t// otherwise just pass up the values from `getSelected`\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(this.view.getSelected());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.closeMenu();\n\t\t\t\tif (event.item && event.item.selected) {\n\t\t\t\t\tif (this.value) {\n\t\t\t\t\t\tthis.propagateChange(event.item[this.value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.propagateChange(event.item);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.propagateChange(null);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// only emit selected for \"organic\" selections\n\t\t\tif (!event.isUpdate) {\n\t\t\t\tthis.selected.emit(event);\n\t\t\t}\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.appendToBody) {\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t}\n\n\t/**\n\t * Propagates the injected `value`.\n\t */\n\twriteValue(value: any) {\n\t\t// propagate null/falsey as an array (deselect everything)\n\t\tif (!value) {\n\t\t\tthis.view.propagateSelected([value]);\n\t\t} else if (this.type === \"single\") {\n\t\t\tif (this.value) {\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.value] === 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// pass the singular value as an array of ListItem\n\t\t\t\tthis.view.propagateSelected([value]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.value) {\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 view the `items` Input\n\t\t\t\tconst newValues = Array.from(this.view.getListItems(), item => Object.assign({}, item));\n\t\t\t\tfor (const v of value) {\n\t\t\t\t\tfor (const newValue of newValues) {\n\t\t\t\t\t\tif (newValue[this.value] === v) {\n\t\t\t\t\t\t\tnewValue.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\t// we can safely assume we're passing an array of `ListItem`s\n\t\t\t\tthis.view.propagateSelected(value);\n\t\t\t}\n\t\t}\n\t}\n\n\tonBlur() {\n\t\tthis.onTouchedCallback();\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\t/**\n\t * Registering the function injected to control the touch use of the `Dropdown`.\n\t */\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedCallback = fn;\n\t}\n\n\tpropagateChange = (_: any) => {};\n\n\t/**\n\t * Adds keyboard functionality for navigation, selection and closing of the `Dropdown`.\n\t */\n\t@HostListener(\"keydown\", [\"$event\"])\n\t// \"Esc\", \"Spacebar\", \"Down\", and \"Up\" are IE specific values\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif ((event.key === \"Escape\" || event.key === \"Esc\") && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close other widgets that listen for Escape\n\t\t}\n\t\tif (event.key === \"Escape\" || event.key === \"Esc\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (this.menuIsClosed && (event.key === \" \" || event.key === \"ArrowDown\" || event.key === \"ArrowUp\" ||\n\t\t\tevent.key === \"Spacebar\" || event.key === \"Down\" || event.key === \"Up\")) {\n\t\t\tif (this.disableArrowKeys && (event.key === \"ArrowDown\" || event.key === \"ArrowUp\" || event.key === \"Down\" || event.key === \"Up\")) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tthis.openMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && event.shiftKey) {\n\t\t\tthis.closeMenu();\n\t\t}\n\n\t\tif (this.type === \"multi\") { return; }\n\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.closedDropdownNavigation(event);\n\t\t}\n\t}\n\n\tclosedDropdownNavigation(event) {\n\t\t// \"Down\", and \"Up\" are IE specific values\n\t\tif (event.key === \"ArrowDown\" || event.key === \"Down\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getNextItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t} else if (event.key === \"ArrowUp\" || event.key === \"Up\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.view.getCurrentItem().selected = false;\n\t\t\tlet item = this.view.getPrevItem();\n\t\t\tif (item) { item.selected = true; }\n\t\t}\n\t}\n\n\t/**\n\t * Returns the display value if there is a selection and displayValue is set,\n\t * if there is just a selection the ListItem content property will be returned,\n\t * otherwise the placeholder will be returned.\n\t */\n\tgetDisplayStringValue(): Observable<string> {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (selected && (!this.displayValue || !this.isRenderString())) {\n\t\t\tif (this.type === \"multi\") {\n\t\t\t\treturn of(this.placeholder);\n\t\t\t} else {\n\t\t\t\treturn of(selected[0].content);\n\t\t\t}\n\t\t} else if (selected && this.isRenderString()) {\n\t\t\treturn of(this.displayValue as string);\n\t\t}\n\t\treturn of(this.placeholder);\n\t}\n\n\tisRenderString(): boolean {\n\t\treturn typeof this.displayValue === \"string\";\n\t}\n\n\tgetRenderTemplateContext() {\n\t\tif (!this.view) {\n\t\t\treturn;\n\t\t}\n\t\tlet selected = this.view.getSelected();\n\t\tif (this.type === \"multi\") {\n\t\t\treturn {items: selected};\n\t\t} else if (selected && selected.length > 0) {\n\t\t\treturn {item: selected[0]}; // this is to be compatible with the dropdown-list template\n\t\t} else {\n\t\t\treturn {};\n\t\t}\n\t}\n\n\tgetSelectedCount(): number {\n\t\tif (this.view.getSelected()) {\n\t\t\treturn this.view.getSelected().length;\n\t\t}\n\t}\n\n\tclearSelected() {\n\t\tfor (const item of this.view.getListItems()) {\n\t\t\titem.selected = false;\n\t\t}\n\t\tthis.selected.emit([]);\n\t\tthis.propagateChange([]);\n\t}\n\n\t/**\n\t * Returns `true` if there is a value selected.\n\t */\n\tvalueSelected(): boolean {\n\t\tif (this.view.getSelected()) { return true; }\n\t\treturn false;\n\t}\n\n\t_noop() {}\n\t/**\n\t * Handles clicks outside of the `Dropdown`.\n\t */\n\t_outsideClick(event) {\n\t\tif (!this.elementRef.nativeElement.contains(event.target) &&\n\t\t\t// if we're appendToBody the list isn't within the _elementRef,\n\t\t\t// so we've got to check if our target is possibly in there too.\n\t\t\t!this.dropdownMenu.nativeElement.contains(event.target)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t_outsideKey(event) {\n\t\tif (!this.menuIsClosed && event.key === \"Tab\" && this.dropdownMenu.nativeElement.contains(event.target as Node)) {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\t/**\n\t * Handles keyboard events so users are controlling the `Dropdown` instead of unintentionally controlling outside elements.\n\t */\n\t_keyboardNav(event: KeyboardEvent) {\n\t\t// \"Esc\" is an IE specific value\n\t\tif ((event.key === \"Escape\" || event.key === \"Esc\") && !this.menuIsClosed) {\n\t\t\tevent.stopImmediatePropagation(); // don't unintentionally close modal if inside of it\n\t\t}\n\t\tif (event.key === \"Escape\" || event.key === \"Esc\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.closeMenu();\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t} else if (!this.menuIsClosed && event.key === \"Tab\") {\n\t\t\t// this way focus will start on the next focusable item from the dropdown\n\t\t\t// not the top of the body!\n\t\t\tthis.dropdownButton.nativeElement.focus();\n\t\t\tthis.dropdownButton.nativeElement.dispatchEvent(new KeyboardEvent(\"keydown\", {bubbles: true, cancelable: true, key: \"Tab\"}));\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list appending it to the dropdown parent object instead of the body.\n\t */\n\t_appendToDropdown() {\n\t\tthis.dropdownService.appendToDropdown(this.elementRef.nativeElement);\n\t\tthis.dropdownMenu.nativeElement.removeEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Creates the `Dropdown` list as an element that is appended to the DOM body.\n\t */\n\t_appendToBody() {\n\t\tthis.dropdownService.appendToBody(\n\t\t\tthis.dropdownButton.nativeElement,\n\t\t\tthis.dropdownMenu.nativeElement,\n\t\t\tthis.elementRef.nativeElement.className);\n\t\tthis.dropdownMenu.nativeElement.addEventListener(\"keydown\", this.keyboardNav, true);\n\t}\n\n\t/**\n\t * Expands the dropdown menu in the view.\n\t */\n\topenMenu() {\n\t\tthis.menuIsClosed = false;\n\n\t\t// move the dropdown list to the body if we're not appending inline\n\t\t// and position it relative to the dropdown wrapper\n\t\tif (!this.appendInline) {\n\t\t\tthis.addScrollEventListener();\n\t\t\tthis._appendToBody();\n\t\t}\n\n\t\t// set the dropdown menu to drop up if it's near the bottom of the screen\n\t\t// setTimeout lets us measure after it's visible in the DOM\n\t\tsetTimeout(() => {\n\t\t\tconst menu = this.dropdownMenu.nativeElement;\n\t\t\tconst boundingClientRect = menu.getBoundingClientRect();\n\n\t\t\tif (boundingClientRect.bottom > window.innerHeight) {\n\t\t\t\t// min height of 100px\n\t\t\t\tif (window.innerHeight - boundingClientRect.top > 100) {\n\t\t\t\t\t// remove the conditional once this api is settled and part of abstract-dropdown-view.class\n\t\t\t\t\tif (this.view[\"enableScroll\"]) {\n\t\t\t\t\t\tthis.view[\"enableScroll\"]();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.dropUp = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.dropUp = false;\n\t\t\t}\n\t\t}, 0);\n\n\t\t// we bind noop to document.body.firstElementChild to allow safari to fire events\n\t\t// from document. Then we unbind everything later to keep things light.\n\t\tdocument.body.firstElementChild.addEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.addEventListener(\"keydown\", this.noop, true);\n\t\tdocument.addEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.addEventListener(\"keydown\", this.outsideKey, true);\n\t\tsetTimeout(() => this.view.initFocus(), 0);\n\t}\n\n\t/**\n\t * Collapsing the dropdown menu and removing unnecessary `EventListeners`.\n\t */\n\tcloseMenu() {\n\t\t// return early if the menu is already closed\n\t\tif (this.menuIsClosed) { return; }\n\t\tthis.menuIsClosed = true;\n\t\tthis.onClose.emit();\n\t\tthis.close.emit();\n\n\t\t// focus the trigger button when we close ...\n\t\tthis.dropdownButton.nativeElement.focus();\n\n\t\t// remove the conditional once this api is settled and part of abstract-dropdown-view.class\n\t\tif (this.view[\"disableScroll\"]) {\n\t\t\tthis.view[\"disableScroll\"]();\n\t\t}\n\n\t\t// move the list back in the component on close\n\t\tif (!this.appendInline) {\n\t\t\tthis.removeScrollEventListener();\n\t\t\tthis._appendToDropdown();\n\t\t}\n\t\tdocument.body.firstElementChild.removeEventListener(\"click\", this.noop, true);\n\t\tdocument.body.firstElementChild.removeEventListener(\"keydown\", this.noop, true);\n\t\tdocument.removeEventListener(\"click\", this.outsideClick, true);\n\t\tdocument.removeEventListener(\"keydown\", this.outsideKey, true);\n\t}\n\n\t/**\n\t * Add scroll event listener if scrollableContainer is provided\n\t */\n\taddScrollEventListener() {\n\t\tlet scrollObservable = scrollableParentsObservable(this.elementRef.nativeElement);\n\t\tif (this.scrollableContainer) {\n\t\t\tconst container: HTMLElement = document.querySelector(this.scrollableContainer);\n\n\t\t\tif (container) {\n\t\t\t\tscrollObservable = merge(scrollObservable, fromEvent(container, \"scroll\"));\n\t\t\t}\n\t\t}\n\t\tthis.scroll = scrollObservable.subscribe(event => {\n\t\t\tif (isVisibleInContainer(this.elementRef.nativeElement, event.target as HTMLElement)) {\n\t\t\t\tthis.dropdownService.updatePosition(this.dropdownButton.nativeElement);\n\t\t\t} else {\n\t\t\t\tthis.closeMenu();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Removes any `EventListeners` responsible for scroll functionality.\n\t */\n\tremoveScrollEventListener() {\n\t\tif (this.scroll) {\n\t\t\tthis.scroll.unsubscribe();\n\t\t}\n\t}\n\n\t/**\n\t * Controls toggling menu states between open/expanded and closed/collapsed.\n\t */\n\ttoggleMenu() {\n\t\tif (this.menuIsClosed) {\n\t\t\tthis.openMenu();\n\t\t} else {\n\t\t\tthis.closeMenu();\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"Dropdown":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":39,"character":1},"arguments":[{"selector":"ibm-dropdown","template":"\n\t<label *ngIf=\"label\" [for]=\"id\" class=\"bx--label\">\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 *ngIf=\"helperText\" class=\"bx--form__helper-text\">\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\n\t\t[id]=\"id\"\n\t\tclass=\"bx--dropdown bx--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'bx--dropdown--light': theme === 'light',\n\t\t\t'bx--list-box--inline': inline,\n\t\t\t'bx--skeleton': skeleton,\n\t\t\t'bx--dropdown--disabled bx--list-box--disabled': disabled\n\t\t}\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\t#dropdownButton\n\t\t\tclass=\"bx--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\t(click)=\"toggleMenu()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t[disabled]=\"disabled\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"bx--list-box__selection--multi\"\n\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"bx--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</ibm-icon-chevron-down16>\n\t\t</button>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'drop-up': dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":112,"character":12},"useExisting":{"__symbolic":"reference","name":"Dropdown"},"multi":true}]}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":120,"character":2}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":124,"character":2}}]}],"helperText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":128,"character":2}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":2}}]}],"displayValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":136,"character":2}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":140,"character":2}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":145,"character":2}}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":149,"character":2}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":153,"character":2}}]}],"skeleton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":157,"character":2}}]}],"inline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":161,"character":2}}]}],"disableArrowKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":165,"character":2}}]}],"appendToBody":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":170,"character":2}}]}],"appendInline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":183,"character":2}}]}],"scrollableContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":188,"character":2}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":192,"character":2}}]}],"menuButtonLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":197,"character":2}}]}],"selectedLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":202,"character":2}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":206,"character":2}}]}],"onClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":210,"character":2}}]}],"close":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":214,"character":2}}]}],"view":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":219,"character":2},"arguments":[{"__symbolic":"reference","module":"./abstract-dropdown-view.class","name":"AbstractDropdownView","line":219,"character":15}]}]}],"dropdownButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":223,"character":2},"arguments":["dropdownButton"]}]}],"dropdownMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":227,"character":2},"arguments":["dropdownMenu"]}]}],"hostClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":229,"character":2},"arguments":["class.bx--dropdown__wrapper"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":256,"character":35},{"__symbolic":"reference","module":"./../i18n/i18n.module","name":"I18n","line":256,"character":63},{"__symbolic":"reference","module":"./dropdown.service","name":"DropdownService","line":256,"character":96}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"onBlur":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"onKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":372,"character":2},"arguments":["keydown",["$event"]]}]}],"closedDropdownNavigation":[{"__symbolic":"method"}],"getDisplayStringValue":[{"__symbolic":"method"}],"isRenderString":[{"__symbolic":"method"}],"getRenderTemplateContext":[{"__symbolic":"method"}],"getSelectedCount":[{"__symbolic":"method"}],"clearSelected":[{"__symbolic":"method"}],"valueSelected":[{"__symbolic":"method"}],"_noop":[{"__symbolic":"method"}],"_outsideClick":[{"__symbolic":"method"}],"_outsideKey":[{"__symbolic":"method"}],"_keyboardNav":[{"__symbolic":"method"}],"_appendToDropdown":[{"__symbolic":"method"}],"_appendToBody":[{"__symbolic":"method"}],"openMenu":[{"__symbolic":"method"}],"closeMenu":[{"__symbolic":"method"}],"addScrollEventListener":[{"__symbolic":"method"}],"removeScrollEventListener":[{"__symbolic":"method"}],"toggleMenu":[{"__symbolic":"method"}],"isVisibleInContainer":[{"__symbolic":"method"}],"isTemplate":[{"__symbolic":"method"}]},"statics":{"dropdownCount":0}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"Dropdown":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":46,"character":1},"arguments":[{"selector":"ibm-dropdown","template":"\n\t<label *ngIf=\"label\" [for]=\"id\" class=\"bx--label\">\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 *ngIf=\"helperText\" class=\"bx--form__helper-text\">\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\n\t\t[id]=\"id\"\n\t\tclass=\"bx--dropdown bx--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'bx--dropdown--light': theme === 'light',\n\t\t\t'bx--list-box--inline': inline,\n\t\t\t'bx--skeleton': skeleton,\n\t\t\t'bx--dropdown--disabled bx--list-box--disabled': disabled\n\t\t}\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\t#dropdownButton\n\t\t\tclass=\"bx--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\t(click)=\"toggleMenu()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t[disabled]=\"disabled\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"bx--list-box__selection--multi\"\n\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"bx--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</ibm-icon-chevron-down16>\n\t\t</button>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'drop-up': dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":119,"character":12},"useExisting":{"__symbolic":"reference","name":"Dropdown"},"multi":true}]}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":127,"character":2}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":131,"character":2}}]}],"helperText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":135,"character":2}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":139,"character":2}}]}],"displayValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":143,"character":2}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":147,"character":2}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":152,"character":2}}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":156,"character":2}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":160,"character":2}}]}],"skeleton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":164,"character":2}}]}],"inline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":168,"character":2}}]}],"disableArrowKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":172,"character":2}}]}],"appendToBody":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":177,"character":2}}]}],"appendInline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":190,"character":2}}]}],"scrollableContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":195,"character":2}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":199,"character":2}}]}],"menuButtonLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":204,"character":2}}]}],"selectedLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":209,"character":2}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":213,"character":2}}]}],"onClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":217,"character":2}}]}],"close":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":221,"character":2}}]}],"view":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":226,"character":2},"arguments":[{"__symbolic":"reference","module":"./abstract-dropdown-view.class","name":"AbstractDropdownView","line":226,"character":15}]}]}],"dropdownButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":230,"character":2},"arguments":["dropdownButton"]}]}],"dropdownMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":234,"character":2},"arguments":["dropdownMenu"]}]}],"hostClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":236,"character":2},"arguments":["class.bx--dropdown__wrapper"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":263,"character":35},{"__symbolic":"reference","module":"./../i18n/i18n.module","name":"I18n","line":263,"character":63},{"__symbolic":"reference","module":"./dropdown.service","name":"DropdownService","line":263,"character":96}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"onBlur":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"onKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":379,"character":2},"arguments":["keydown",["$event"]]}]}],"closedDropdownNavigation":[{"__symbolic":"method"}],"getDisplayStringValue":[{"__symbolic":"method"}],"isRenderString":[{"__symbolic":"method"}],"getRenderTemplateContext":[{"__symbolic":"method"}],"getSelectedCount":[{"__symbolic":"method"}],"clearSelected":[{"__symbolic":"method"}],"valueSelected":[{"__symbolic":"method"}],"_noop":[{"__symbolic":"method"}],"_outsideClick":[{"__symbolic":"method"}],"_outsideKey":[{"__symbolic":"method"}],"_keyboardNav":[{"__symbolic":"method"}],"_appendToDropdown":[{"__symbolic":"method"}],"_appendToBody":[{"__symbolic":"method"}],"openMenu":[{"__symbolic":"method"}],"closeMenu":[{"__symbolic":"method"}],"addScrollEventListener":[{"__symbolic":"method"}],"removeScrollEventListener":[{"__symbolic":"method"}],"toggleMenu":[{"__symbolic":"method"}],"isTemplate":[{"__symbolic":"method"}]},"statics":{"dropdownCount":0}}}}]
@@ -1 +1 @@
1
- {"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"helperText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"displayValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"skeleton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"inline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"disableArrowKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"appendToBody":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"appendInline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"scrollableContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"menuButtonLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selectedLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"onClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"close":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"view":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":3,"members":[]},"arguments":[{"__symbol":4,"members":[]}]}]}],"dropdownButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":5,"members":[]},"arguments":["dropdownButton"]}]}],"dropdownMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":5,"members":[]},"arguments":["dropdownMenu"]}]}],"hostClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":6,"members":[]},"arguments":["class.bx--dropdown__wrapper"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":7,"members":[]},{"__symbol":8,"members":[]},{"__symbol":9,"members":[]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"onBlur":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"onKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbol":10,"members":[]},"arguments":["keydown",["$event"]]}]}],"closedDropdownNavigation":[{"__symbolic":"method"}],"getDisplayStringValue":[{"__symbolic":"method"}],"isRenderString":[{"__symbolic":"method"}],"getRenderTemplateContext":[{"__symbolic":"method"}],"getSelectedCount":[{"__symbolic":"method"}],"clearSelected":[{"__symbolic":"method"}],"valueSelected":[{"__symbolic":"method"}],"_noop":[{"__symbolic":"method"}],"_outsideClick":[{"__symbolic":"method"}],"_outsideKey":[{"__symbolic":"method"}],"_keyboardNav":[{"__symbolic":"method"}],"_appendToDropdown":[{"__symbolic":"method"}],"_appendToBody":[{"__symbolic":"method"}],"openMenu":[{"__symbolic":"method"}],"closeMenu":[{"__symbolic":"method"}],"addScrollEventListener":[{"__symbolic":"method"}],"removeScrollEventListener":[{"__symbolic":"method"}],"toggleMenu":[{"__symbolic":"method"}],"isVisibleInContainer":[{"__symbolic":"method"}],"isTemplate":[{"__symbolic":"method"}]},"statics":{"dropdownCount":0}},"type":{"summaryKind":1,"type":{"reference":{"__symbol":0,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":7,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":11,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":9,"members":[]}}}}],"lifecycleHooks":[0,1,4]},"isComponent":true,"selector":"ibm-dropdown","exportAs":null,"inputs":{"id":"id","label":"label","helperText":"helperText","placeholder":"placeholder","displayValue":"displayValue","size":"size","type":"type","theme":"theme","disabled":"disabled","skeleton":"skeleton","inline":"inline","disableArrowKeys":"disableArrowKeys","appendToBody":"appendToBody","appendInline":"appendInline","scrollableContainer":"scrollableContainer","value":"value","menuButtonLabel":"menuButtonLabel","selectedLabel":"selectedLabel"},"outputs":{"selected":"selected","onClose":"onClose","close":"close"},"hostListeners":{"keydown":"onKeyDown($event)"},"hostProperties":{"class.bx--dropdown__wrapper":"hostClass"},"hostAttributes":{},"providers":[{"token":{"identifier":{"reference":{"__symbol":12,"members":[]}}},"useClass":null,"useFactory":null,"useExisting":{"identifier":{"reference":{"__symbol":0,"members":[]}}},"multi":true}],"viewProviders":[],"queries":[{"selectors":[{"identifier":{"reference":{"__symbol":4,"members":[]}}}],"first":true,"descendants":true,"propertyName":"view","read":null}],"guards":{},"viewQueries":[{"selectors":[{"value":"dropdownButton"}],"first":true,"descendants":true,"propertyName":"dropdownButton","read":null},{"selectors":[{"value":"dropdownMenu"}],"first":true,"descendants":true,"propertyName":"dropdownMenu","read":null}],"entryComponents":[],"changeDetection":1,"template":{"ngContentSelectors":["*"],"encapsulation":2},"componentViewType":{"__symbol":13,"members":[]},"rendererType":{"__symbol":14,"members":[]},"componentFactory":{"__symbol":15,"members":[]}}}],"symbols":[{"__symbol":0,"name":"Dropdown","filePath":"./dropdown.component"},{"__symbol":1,"name":"Input","filePath":"@angular/core"},{"__symbol":2,"name":"Output","filePath":"@angular/core"},{"__symbol":3,"name":"ContentChild","filePath":"@angular/core"},{"__symbol":4,"name":"AbstractDropdownView","filePath":"./abstract-dropdown-view.class"},{"__symbol":5,"name":"ViewChild","filePath":"@angular/core"},{"__symbol":6,"name":"HostBinding","filePath":"@angular/core"},{"__symbol":7,"name":"ElementRef","filePath":"@angular/core"},{"__symbol":8,"name":"I18n","filePath":"../i18n/i18n.module"},{"__symbol":9,"name":"DropdownService","filePath":"./dropdown.service"},{"__symbol":10,"name":"HostListener","filePath":"@angular/core"},{"__symbol":11,"name":"I18n","filePath":"../i18n/i18n.service"},{"__symbol":12,"name":"NG_VALUE_ACCESSOR","filePath":"@angular/forms"},{"__symbol":13,"name":"View_Dropdown_0","filePath":"./dropdown.component.ngfactory"},{"__symbol":14,"name":"RenderType_Dropdown","filePath":"./dropdown.component.ngfactory"},{"__symbol":15,"name":"DropdownNgFactory","filePath":"./dropdown.component.ngfactory"}]}
1
+ {"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"helperText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"displayValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"skeleton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"inline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"disableArrowKeys":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"appendToBody":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"appendInline":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"scrollableContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"menuButtonLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selectedLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"onClose":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"close":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"view":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":3,"members":[]},"arguments":[{"__symbol":4,"members":[]}]}]}],"dropdownButton":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":5,"members":[]},"arguments":["dropdownButton"]}]}],"dropdownMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":5,"members":[]},"arguments":["dropdownMenu"]}]}],"hostClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":6,"members":[]},"arguments":["class.bx--dropdown__wrapper"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":7,"members":[]},{"__symbol":8,"members":[]},{"__symbol":9,"members":[]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"onBlur":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"onKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbol":10,"members":[]},"arguments":["keydown",["$event"]]}]}],"closedDropdownNavigation":[{"__symbolic":"method"}],"getDisplayStringValue":[{"__symbolic":"method"}],"isRenderString":[{"__symbolic":"method"}],"getRenderTemplateContext":[{"__symbolic":"method"}],"getSelectedCount":[{"__symbolic":"method"}],"clearSelected":[{"__symbolic":"method"}],"valueSelected":[{"__symbolic":"method"}],"_noop":[{"__symbolic":"method"}],"_outsideClick":[{"__symbolic":"method"}],"_outsideKey":[{"__symbolic":"method"}],"_keyboardNav":[{"__symbolic":"method"}],"_appendToDropdown":[{"__symbolic":"method"}],"_appendToBody":[{"__symbolic":"method"}],"openMenu":[{"__symbolic":"method"}],"closeMenu":[{"__symbolic":"method"}],"addScrollEventListener":[{"__symbolic":"method"}],"removeScrollEventListener":[{"__symbolic":"method"}],"toggleMenu":[{"__symbolic":"method"}],"isTemplate":[{"__symbolic":"method"}]},"statics":{"dropdownCount":0}},"type":{"summaryKind":1,"type":{"reference":{"__symbol":0,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":7,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":11,"members":[]}}}},{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":9,"members":[]}}}}],"lifecycleHooks":[0,1,4]},"isComponent":true,"selector":"ibm-dropdown","exportAs":null,"inputs":{"id":"id","label":"label","helperText":"helperText","placeholder":"placeholder","displayValue":"displayValue","size":"size","type":"type","theme":"theme","disabled":"disabled","skeleton":"skeleton","inline":"inline","disableArrowKeys":"disableArrowKeys","appendToBody":"appendToBody","appendInline":"appendInline","scrollableContainer":"scrollableContainer","value":"value","menuButtonLabel":"menuButtonLabel","selectedLabel":"selectedLabel"},"outputs":{"selected":"selected","onClose":"onClose","close":"close"},"hostListeners":{"keydown":"onKeyDown($event)"},"hostProperties":{"class.bx--dropdown__wrapper":"hostClass"},"hostAttributes":{},"providers":[{"token":{"identifier":{"reference":{"__symbol":12,"members":[]}}},"useClass":null,"useFactory":null,"useExisting":{"identifier":{"reference":{"__symbol":0,"members":[]}}},"multi":true}],"viewProviders":[],"queries":[{"selectors":[{"identifier":{"reference":{"__symbol":4,"members":[]}}}],"first":true,"descendants":true,"propertyName":"view","read":null}],"guards":{},"viewQueries":[{"selectors":[{"value":"dropdownButton"}],"first":true,"descendants":true,"propertyName":"dropdownButton","read":null},{"selectors":[{"value":"dropdownMenu"}],"first":true,"descendants":true,"propertyName":"dropdownMenu","read":null}],"entryComponents":[],"changeDetection":1,"template":{"ngContentSelectors":["*"],"encapsulation":2},"componentViewType":{"__symbol":13,"members":[]},"rendererType":{"__symbol":14,"members":[]},"componentFactory":{"__symbol":15,"members":[]}}}],"symbols":[{"__symbol":0,"name":"Dropdown","filePath":"./dropdown.component"},{"__symbol":1,"name":"Input","filePath":"@angular/core"},{"__symbol":2,"name":"Output","filePath":"@angular/core"},{"__symbol":3,"name":"ContentChild","filePath":"@angular/core"},{"__symbol":4,"name":"AbstractDropdownView","filePath":"./abstract-dropdown-view.class"},{"__symbol":5,"name":"ViewChild","filePath":"@angular/core"},{"__symbol":6,"name":"HostBinding","filePath":"@angular/core"},{"__symbol":7,"name":"ElementRef","filePath":"@angular/core"},{"__symbol":8,"name":"I18n","filePath":"../i18n/i18n.module"},{"__symbol":9,"name":"DropdownService","filePath":"./dropdown.service"},{"__symbol":10,"name":"HostListener","filePath":"@angular/core"},{"__symbol":11,"name":"I18n","filePath":"../i18n/i18n.service"},{"__symbol":12,"name":"NG_VALUE_ACCESSOR","filePath":"@angular/forms"},{"__symbol":13,"name":"View_Dropdown_0","filePath":"./dropdown.component.ngfactory"},{"__symbol":14,"name":"RenderType_Dropdown","filePath":"./dropdown.component.ngfactory"},{"__symbol":15,"name":"DropdownNgFactory","filePath":"./dropdown.component.ngfactory"}]}
@@ -51,7 +51,7 @@ import { AfterViewInit, EventEmitter, OnDestroy, OnInit, ElementRef } from "@ang
51
51
  </section>
52
52
  <ibm-modal-footer><button ibmButton="primary" (click)="closeModal()">Close</button></ibm-modal-footer>
53
53
  </ibm-modal>`,
54
- styleUrls: ["./sample-modal.component.scss"]
54
+ styles: [``]
55
55
  })
56
56
  export class SampleModal extends BaseModal {
57
57
  modalText: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-components-angular",
3
- "version": "3.15.2",
3
+ "version": "3.15.3",
4
4
  "description": "Next generation components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,38 @@
1
+ /*!
2
+ *
3
+ * carbon-angular v0.0.0 | scroll.d.ts
4
+ *
5
+ * Copyright 2014, 2019 IBM
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+
20
+
21
+ /**
22
+ * Checks if a given element is scrollable.
23
+ * If the element has an overflow set as part of its computed style it can scroll.
24
+ * @param element the element to check scrollability
25
+ */
26
+ export declare const isScrollableElement: (element: HTMLElement) => boolean;
27
+ /**
28
+ * Checks if an element is visible within a container
29
+ * @param element the element to check
30
+ * @param container the container to check
31
+ */
32
+ export declare const isVisibleInContainer: (element: HTMLElement, container: HTMLElement) => boolean;
33
+ /**
34
+ * Returns an observable that emits whenever any scrollable parent element scrolls
35
+ *
36
+ * @param node root element to start finding scrolling parents from
37
+ */
38
+ export declare const scrollableParentsObservable: (node: HTMLElement) => import("rxjs/internal/Observable").Observable<Event>;
@@ -0,0 +1,66 @@
1
+ /*!
2
+ *
3
+ * carbon-angular v0.0.0 | scroll.js
4
+ *
5
+ * Copyright 2014, 2019 IBM
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+
20
+
21
+ import { map } from "rxjs/operators";
22
+ import { fromEvent, merge } from "rxjs";
23
+ /**
24
+ * Checks if a given element is scrollable.
25
+ * If the element has an overflow set as part of its computed style it can scroll.
26
+ * @param element the element to check scrollability
27
+ */
28
+ export var isScrollableElement = function (element) {
29
+ var computedStyle = getComputedStyle(element);
30
+ return (computedStyle.overflow === "auto" ||
31
+ computedStyle.overflow === "scroll" ||
32
+ computedStyle["overflow-y"] === "auto" ||
33
+ computedStyle["overflow-y"] === "scroll" ||
34
+ computedStyle["overflow-x"] === "auto" ||
35
+ computedStyle["overflow-x"] === "scroll");
36
+ };
37
+ /**
38
+ * Checks if an element is visible within a container
39
+ * @param element the element to check
40
+ * @param container the container to check
41
+ */
42
+ export var isVisibleInContainer = function (element, container) {
43
+ var elementRect = element.getBoundingClientRect();
44
+ var containerRect = container.getBoundingClientRect();
45
+ return elementRect.bottom <= containerRect.bottom && elementRect.top >= containerRect.top;
46
+ };
47
+ /**
48
+ * Returns an observable that emits whenever any scrollable parent element scrolls
49
+ *
50
+ * @param node root element to start finding scrolling parents from
51
+ */
52
+ export var scrollableParentsObservable = function (node) {
53
+ var windowScroll = fromEvent(window, "scroll").pipe(map(function (event) { return (
54
+ // update the event target to be something useful. In this case `body` is a sensible replacement
55
+ Object.assign({}, event, { target: document.body })); }));
56
+ var observables = [windowScroll];
57
+ // walk the parents and subscribe to all the scroll events we can
58
+ while (node.parentElement && node !== document.body) {
59
+ if (isScrollableElement(node)) {
60
+ observables.push(fromEvent(node, "scroll"));
61
+ }
62
+ node = node.parentElement;
63
+ }
64
+ return merge.apply(void 0, observables);
65
+ };
66
+ //# sourceMappingURL=scroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll.js","sourceRoot":"","sources":["../src/utils/scroll.ts"],"names":[],"mappings":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ACjC,iEAAiE;IACjE,OAAO,IAAI,CAAC,aAAa,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE;QACpD,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE;YAC9B,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC5C;QACD,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC;KAC1B;IAED,OAAO,KAAK,eAAI,WAAW,EAAE;AAC9B,CAAC,CAAC","sourcesContent":["import { map } from \"rxjs/operators\";\nimport { fromEvent, merge } from \"rxjs\";\n\n\n/**\n * Checks if a given element is scrollable.\n * If the element has an overflow set as part of its computed style it can scroll.\n * @param element the element to check scrollability\n */\nexport const isScrollableElement = (element: HTMLElement) => {\n\tconst computedStyle = getComputedStyle(element);\n\treturn (\n\t\tcomputedStyle.overflow === \"auto\" ||\n\t\tcomputedStyle.overflow === \"scroll\" ||\n\t\tcomputedStyle[\"overflow-y\"] === \"auto\" ||\n\t\tcomputedStyle[\"overflow-y\"] === \"scroll\" ||\n\t\tcomputedStyle[\"overflow-x\"] === \"auto\" ||\n\t\tcomputedStyle[\"overflow-x\"] === \"scroll\"\n\t);\n};\n\n/**\n * Checks if an element is visible within a container\n * @param element the element to check\n * @param container the container to check\n */\nexport const isVisibleInContainer = (element: HTMLElement, container: HTMLElement) => {\n\tconst elementRect = element.getBoundingClientRect();\n\tconst containerRect = container.getBoundingClientRect();\n\treturn elementRect.bottom <= containerRect.bottom && elementRect.top >= containerRect.top;\n};\n\n/**\n * Returns an observable that emits whenever any scrollable parent element scrolls\n *\n * @param node root element to start finding scrolling parents from\n */\nexport const scrollableParentsObservable = (node: HTMLElement) => {\n\tconst windowScroll = fromEvent(window, \"scroll\").pipe(map(event => (\n\t\t// update the event target to be something useful. In this case `body` is a sensible replacement\n\t\tObject.assign({}, event, { target: document.body }) as Event\n\t)));\n\tlet observables = [windowScroll];\n\t// walk the parents and subscribe to all the scroll events we can\n\twhile (node.parentElement && node !== document.body) {\n\t\tif (isScrollableElement(node)) {\n\t\t\tobservables.push(fromEvent(node, \"scroll\"));\n\t\t}\n\t\tnode = node.parentElement;\n\t}\n\n\treturn merge(...observables);\n};\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"isScrollableElement":{"__symbolic":"error","message":"Lambda not supported","line":9,"character":35},"isVisibleInContainer":{"__symbolic":"error","message":"Lambda not supported","line":26,"character":36},"scrollableParentsObservable":{"__symbolic":"error","message":"Lambda not supported","line":37,"character":43}}}]
@@ -0,0 +1 @@
1
+ {"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"dist/src/utils/scroll.ts"}},{"symbol":{"__symbol":1,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"dist/src/utils/scroll.ts"}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbolic":"error","message":"Lambda not supported","fileName":"dist/src/utils/scroll.ts"}}],"symbols":[{"__symbol":0,"name":"isScrollableElement","filePath":"./scroll"},{"__symbol":1,"name":"isVisibleInContainer","filePath":"./scroll"},{"__symbol":2,"name":"scrollableParentsObservable","filePath":"./scroll"}]}
@@ -1,21 +0,0 @@
1
- /*!
2
- *
3
- * carbon-angular v0.0.0 | breadcrumb.component.spec.d.ts
4
- *
5
- * Copyright 2014, 2019 IBM
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
-
20
-
21
- export {};