@skyux/popovers 5.9.1 → 5.9.4

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 (41) hide show
  1. package/bundles/skyux-popovers-testing.umd.js +12 -6
  2. package/bundles/skyux-popovers.umd.js +397 -69
  3. package/documentation.json +422 -334
  4. package/esm2015/index.js +1 -0
  5. package/esm2015/index.js.map +1 -1
  6. package/esm2015/lib/modules/dropdown/dropdown-item.component.js.map +1 -1
  7. package/esm2015/lib/modules/dropdown/dropdown-menu.component.js +1 -4
  8. package/esm2015/lib/modules/dropdown/dropdown-menu.component.js.map +1 -1
  9. package/esm2015/lib/modules/dropdown/dropdown.component.js +10 -7
  10. package/esm2015/lib/modules/dropdown/dropdown.component.js.map +1 -1
  11. package/esm2015/lib/modules/popover/popover-content.component.js +19 -42
  12. package/esm2015/lib/modules/popover/popover-content.component.js.map +1 -1
  13. package/esm2015/lib/modules/popover/popover-context.js.map +1 -1
  14. package/esm2015/lib/modules/popover/popover.component.js +13 -6
  15. package/esm2015/lib/modules/popover/popover.component.js.map +1 -1
  16. package/esm2015/lib/modules/popover/popover.directive.js +29 -10
  17. package/esm2015/lib/modules/popover/popover.directive.js.map +1 -1
  18. package/esm2015/lib/modules/popover/types/popover-type.js +2 -0
  19. package/esm2015/lib/modules/popover/types/popover-type.js.map +1 -0
  20. package/esm2015/testing/dropdown/dropdown-fixture.js +7 -1
  21. package/esm2015/testing/dropdown/dropdown-fixture.js.map +1 -1
  22. package/esm2015/testing/dropdown/popovers-fixture-dropdown.js.map +1 -1
  23. package/esm2015/testing/popover/popover-fixture.js +8 -8
  24. package/esm2015/testing/popover/popover-fixture.js.map +1 -1
  25. package/fesm2015/skyux-popovers-testing.js +15 -9
  26. package/fesm2015/skyux-popovers-testing.js.map +1 -1
  27. package/fesm2015/skyux-popovers.js +71 -69
  28. package/fesm2015/skyux-popovers.js.map +1 -1
  29. package/index.d.ts +1 -0
  30. package/lib/modules/dropdown/dropdown-item.component.d.ts +1 -1
  31. package/lib/modules/dropdown/dropdown-menu.component.d.ts +3 -3
  32. package/lib/modules/dropdown/dropdown.component.d.ts +12 -12
  33. package/lib/modules/popover/popover-content.component.d.ts +13 -12
  34. package/lib/modules/popover/popover-context.d.ts +2 -2
  35. package/lib/modules/popover/popover.component.d.ts +9 -9
  36. package/lib/modules/popover/popover.directive.d.ts +10 -9
  37. package/lib/modules/popover/types/popover-type.d.ts +4 -0
  38. package/package.json +6 -6
  39. package/testing/dropdown/dropdown-fixture.d.ts +7 -7
  40. package/testing/dropdown/popovers-fixture-dropdown.d.ts +2 -2
  41. package/testing/popover/popover-fixture.d.ts +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"skyux-popovers-testing.js","sources":["../../../../../libs/components/popovers/testing/src/dropdown/dropdown-testing.module.ts","../../../../../libs/components/popovers/testing/src/dropdown/dropdown-fixture.ts","../../../../../libs/components/popovers/testing/src/popover/popover-testing.module.ts","../../../../../libs/components/popovers/testing/src/popover/popover-fixture.ts","../../../../../libs/components/popovers/testing/src/skyux-popovers-testing.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { SkyDropdownModule } from '@skyux/popovers';\n\n@NgModule({\n exports: [SkyDropdownModule],\n})\nexport class SkyDropdownTestingModule {}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\nimport { SkyPopoversFixtureDropdown } from './popovers-fixture-dropdown';\nimport { SkyPopoversFixtureDropdownItem } from './popovers-fixture-dropdown-item';\nimport { SkyPopoversFixtureDropdownMenu } from './popovers-fixture-dropdown-menu';\n\n/**\n * Provides information for and interaction with a SKY UX dropdown component.\n * By using the fixture API, a test insulates itself against updates to the internals\n * of a component, such as changing its DOM structure.\n */\nexport class SkyDropdownFixture {\n /**\n * Returns information about the dropdown component.\n */\n public get dropdown(): SkyPopoversFixtureDropdown {\n const button = this.buttonDebugElement;\n\n if (!button) {\n return;\n }\n\n return {\n buttonStyle: this.getButtonStyle(button.classes),\n buttonType: this.getButtonType(button.classes),\n disabled: button.nativeElement.disabled,\n label: button.nativeElement.getAttribute('aria-label'),\n title: button.nativeElement.getAttribute('title'),\n };\n }\n\n /**\n * Returns the dropdown button's text.\n */\n public get dropdownButtonText(): string {\n return SkyAppTestUtility.getText(this.buttonDebugElement.nativeElement);\n }\n\n /**\n * Returns information about the dropdown menu component.\n */\n public get dropdownMenu(): SkyPopoversFixtureDropdownMenu {\n const menu = this.getDropdownMenuContent();\n if (!menu) {\n return;\n }\n\n return {\n ariaLabelledBy: menu.getAttribute('aria-labelledby'),\n ariaRole: menu.getAttribute('role'),\n };\n }\n\n /**\n * Indicates if the dropdown menu is open and visible.\n */\n public get dropdownMenuIsVisible(): boolean {\n return this.getDropdownMenuContent() !== undefined;\n }\n\n private get buttonDebugElement(): DebugElement {\n return this.debugEl.query(By.css('.sky-dropdown-button'));\n }\n\n private debugEl: DebugElement;\n\n constructor(private fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-dropdown'\n );\n }\n\n /**\n * Click the dropdown button to open or close the dropdown menu.\n */\n public async clickDropdownButton(): Promise<any> {\n this.buttonDebugElement.nativeElement.click();\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Click the dropdown item at the provided index.\n */\n public async clickDropdownItem(index: number): Promise<any> {\n const itemEls = this.getDropdownItemEls();\n if (index >= itemEls.length) {\n throw new Error(`There is no dropdown item at index ${index}.`);\n }\n\n itemEls[index].querySelector('button,a').click();\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Returns information about the dropdown item at the provided index.\n */\n public getDropdownItem(index: number): SkyPopoversFixtureDropdownItem {\n const itemEls = this.getDropdownItemEls();\n if (index >= itemEls.length) {\n throw new Error(`There is no dropdown item at index ${index}.`);\n }\n\n const item = itemEls[index];\n if (!item) {\n return;\n }\n\n return {\n ariaRole: item.getAttribute('role'),\n };\n }\n\n /**\n * Returns the contents of the dropdown menu.\n */\n public getDropdownMenuContent(): any {\n const overlay = this.getOverlay();\n if (!overlay) {\n return;\n }\n\n return overlay.querySelector('.sky-dropdown-menu');\n }\n\n private getDropdownItemEls(): NodeListOf<any> {\n const overlay = this.getOverlay();\n\n if (!overlay) {\n return;\n }\n\n return overlay.querySelectorAll('.sky-dropdown-item');\n }\n\n private getOverlay(): HTMLElement {\n return document.querySelector('sky-overlay');\n }\n\n private getButtonStyle(classNames: { [key: string]: boolean }): string {\n if (classNames['sky-btn-primary']) {\n return 'primary';\n }\n if (classNames['sky-btn-default']) {\n return 'default';\n }\n }\n\n private getButtonType(classNames: { [key: string]: boolean }): string {\n const prefix = 'sky-dropdown-button-type-';\n\n for (let i in classNames) {\n if (classNames[i]) {\n if (i.indexOf(prefix) > -1) {\n return i.replace(prefix, '');\n }\n }\n }\n\n return undefined;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyPopoverModule } from '@skyux/popovers';\nimport { SkyThemeModule } from '@skyux/theme';\n\n@NgModule({\n exports: [\n SkyPopoverModule,\n\n // The noop animations module needs to be loaded last to avoid\n // subsequent modules adding animations and overriding this.\n NoopAnimationsModule,\n ],\n imports: [SkyThemeModule],\n})\nexport class SkyPopoverTestingModule {}\n","import { ComponentFixture } from '@angular/core/testing';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Provides information for and interaction with a SKY UX popover component.\n * By using the fixture API, a test insulates itself against updates to the internals\n * of a component, such as changing its DOM structure.\n */\nexport class SkyPopoverFixture {\n /**\n * Returns the popover alignment if the popover is open, otherwise undefined.\n */\n public get alignment(): string {\n return this.getClassSuffixByClassPrefix(\n this.containerElement,\n 'sky-popover-alignment-'\n );\n }\n\n /**\n * Returns the popover body element if the popover is open, otherwise undefined.\n */\n public get body(): HTMLElement {\n return this.bodyElement;\n }\n\n /**\n * Returns the popover position if the popover is open, otherwise undefined.\n */\n public get placement(): string {\n return this.getClassSuffixByClassPrefix(\n this.containerElement,\n 'sky-popover-placement-'\n );\n }\n\n /**\n * Returns the popover title text if the popover is open, otherwise undefined.\n */\n public get popoverTitle(): string {\n return SkyAppTestUtility.getText(this.titleElement);\n }\n\n /**\n * Indicates if the popover is open and visible.\n */\n public get popoverIsVisible(): boolean {\n return this.contentElement !== undefined;\n }\n\n constructor(private fixture: ComponentFixture<any>) {}\n\n /**\n * Triggers the blur event for the popover.\n */\n public blur(): Promise<any> {\n // close the popover by changing focus to the body element\n SkyAppTestUtility.fireDomEvent(window.document.body, 'click');\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n //#region helpers\n private get contentElement(): HTMLElement {\n return this.queryOverlay('sky-popover-content');\n }\n\n private get containerElement(): HTMLElement {\n return this.queryOverlay('.sky-popover-container');\n }\n\n private get titleElement(): HTMLElement {\n return this.queryOverlay('.sky-popover-title');\n }\n\n private get bodyElement(): HTMLElement {\n return this.queryOverlay('.sky-popover-body');\n }\n\n private getOverlay(): HTMLElement {\n return document.querySelector('sky-overlay');\n }\n\n private queryOverlay(query: string): HTMLElement {\n const overlay = this.getOverlay();\n\n return !overlay ? undefined : overlay.querySelector(query);\n }\n\n /**\n * Searches the element's class names for a class which matches a given prefix.\n * If a match is found, the prefix is trimmed from the class name and the suffix is returned.\n * If no class matching the prefix is found, undefined is returned.\n *\n * Example:\n * For a class 'sky-popover-placement-right', passing the prefix 'sky-popover-placement-'\n * should return the value 'right'.\n * @param prefix\n */\n private getClassSuffixByClassPrefix(\n element: HTMLElement,\n prefix: string\n ): string {\n let containerClasses = element?.className.split(' ');\n let prefixedClass = containerClasses?.find((x) => x.startsWith(prefix));\n\n return !prefixedClass ? undefined : prefixedClass.slice(prefix.length);\n }\n //#endregion\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;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AAC,UAAU,EAAE,CAAC;QAElC,OAAO,CAAC,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAC5D;;;;;;;;;;;IAYO,2BAA2B,CACjC,OAAoB,EACpB,MAAc;QAEd,IAAI,gBAAgB,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrD,IAAI,aAAa,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAExE,OAAO,CAAC,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KACxE;;;AC5GH;;;;;;"}
1
+ {"version":3,"file":"skyux-popovers-testing.js","sources":["../../../../../libs/components/popovers/testing/src/dropdown/dropdown-testing.module.ts","../../../../../libs/components/popovers/testing/src/dropdown/dropdown-fixture.ts","../../../../../libs/components/popovers/testing/src/popover/popover-testing.module.ts","../../../../../libs/components/popovers/testing/src/popover/popover-fixture.ts","../../../../../libs/components/popovers/testing/src/skyux-popovers-testing.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { SkyDropdownModule } from '@skyux/popovers';\n\n@NgModule({\n exports: [SkyDropdownModule],\n})\nexport class SkyDropdownTestingModule {}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\nimport { SkyPopoversFixtureDropdown } from './popovers-fixture-dropdown';\nimport { SkyPopoversFixtureDropdownItem } from './popovers-fixture-dropdown-item';\nimport { SkyPopoversFixtureDropdownMenu } from './popovers-fixture-dropdown-menu';\n\n/**\n * Provides information for and interaction with a SKY UX dropdown component.\n * By using the fixture API, a test insulates itself against updates to the internals\n * of a component, such as changing its DOM structure.\n */\nexport class SkyDropdownFixture {\n /**\n * Returns information about the dropdown component.\n */\n public get dropdown(): SkyPopoversFixtureDropdown | undefined {\n const button = this.buttonDebugElement;\n\n if (!button) {\n return;\n }\n\n return {\n buttonStyle: this.getButtonStyle(button.classes),\n buttonType: this.getButtonType(button.classes),\n disabled: button.nativeElement.disabled,\n label: button.nativeElement.getAttribute('aria-label'),\n title: button.nativeElement.getAttribute('title'),\n };\n }\n\n /**\n * Returns the dropdown button's text.\n */\n public get dropdownButtonText(): string | undefined {\n return SkyAppTestUtility.getText(this.buttonDebugElement.nativeElement);\n }\n\n /**\n * Returns information about the dropdown menu component.\n */\n public get dropdownMenu(): SkyPopoversFixtureDropdownMenu | undefined {\n const menu = this.getDropdownMenuContent();\n if (!menu) {\n return;\n }\n\n return {\n ariaLabelledBy: menu.getAttribute('aria-labelledby'),\n ariaRole: menu.getAttribute('role'),\n };\n }\n\n /**\n * Indicates if the dropdown menu is open and visible.\n */\n public get dropdownMenuIsVisible(): boolean {\n return this.getDropdownMenuContent() !== undefined;\n }\n\n private get buttonDebugElement(): DebugElement {\n return this.debugEl.query(By.css('.sky-dropdown-button'));\n }\n\n private debugEl: DebugElement;\n\n constructor(private fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-dropdown'\n );\n }\n\n /**\n * Click the dropdown button to open or close the dropdown menu.\n */\n public async clickDropdownButton(): Promise<unknown> {\n this.buttonDebugElement.nativeElement.click();\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Click the dropdown item at the provided index.\n */\n public async clickDropdownItem(index: number): Promise<unknown> {\n const itemEls = this.getDropdownItemEls();\n\n if (!itemEls) {\n return;\n }\n\n if (index >= itemEls.length) {\n throw new Error(`There is no dropdown item at index ${index}.`);\n }\n\n itemEls[index].querySelector('button,a').click();\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n /**\n * Returns information about the dropdown item at the provided index.\n */\n public getDropdownItem(\n index: number\n ): SkyPopoversFixtureDropdownItem | undefined {\n const itemEls = this.getDropdownItemEls();\n\n if (!itemEls) {\n return;\n }\n\n if (index >= itemEls.length) {\n throw new Error(`There is no dropdown item at index ${index}.`);\n }\n\n const item = itemEls[index];\n if (!item) {\n return;\n }\n\n return {\n ariaRole: item.getAttribute('role'),\n };\n }\n\n /**\n * Returns the contents of the dropdown menu.\n */\n public getDropdownMenuContent(): any {\n const overlay = this.getOverlay();\n if (!overlay) {\n return;\n }\n\n return overlay.querySelector('.sky-dropdown-menu');\n }\n\n private getDropdownItemEls(): NodeListOf<any> | undefined {\n const overlay = this.getOverlay();\n\n if (!overlay) {\n return;\n }\n\n return overlay.querySelectorAll('.sky-dropdown-item');\n }\n\n private getOverlay(): HTMLElement | null {\n return document.querySelector('sky-overlay');\n }\n\n private getButtonStyle(classNames: {\n [key: string]: boolean;\n }): string | undefined {\n if (classNames['sky-btn-primary']) {\n return 'primary';\n }\n if (classNames['sky-btn-default']) {\n return 'default';\n }\n }\n\n private getButtonType(classNames: {\n [key: string]: boolean;\n }): string | undefined {\n const prefix = 'sky-dropdown-button-type-';\n\n for (const i in classNames) {\n if (classNames[i]) {\n if (i.indexOf(prefix) > -1) {\n return i.replace(prefix, '');\n }\n }\n }\n\n return undefined;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkyPopoverModule } from '@skyux/popovers';\nimport { SkyThemeModule } from '@skyux/theme';\n\n@NgModule({\n exports: [\n SkyPopoverModule,\n\n // The noop animations module needs to be loaded last to avoid\n // subsequent modules adding animations and overriding this.\n NoopAnimationsModule,\n ],\n imports: [SkyThemeModule],\n})\nexport class SkyPopoverTestingModule {}\n","import { ComponentFixture } from '@angular/core/testing';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Provides information for and interaction with a SKY UX popover component.\n * By using the fixture API, a test insulates itself against updates to the internals\n * of a component, such as changing its DOM structure.\n */\nexport class SkyPopoverFixture {\n /**\n * Returns the popover alignment if the popover is open, otherwise undefined.\n */\n public get alignment(): string | undefined {\n return this.getClassSuffixByClassPrefix(\n this.containerElement,\n 'sky-popover-alignment-'\n );\n }\n\n /**\n * Returns the popover body element if the popover is open, otherwise undefined.\n */\n public get body(): HTMLElement | undefined {\n return this.bodyElement;\n }\n\n /**\n * Returns the popover position if the popover is open, otherwise undefined.\n */\n public get placement(): string | undefined {\n return this.getClassSuffixByClassPrefix(\n this.containerElement,\n 'sky-popover-placement-'\n );\n }\n\n /**\n * Returns the popover title text if the popover is open, otherwise undefined.\n */\n public get popoverTitle(): string | undefined {\n return SkyAppTestUtility.getText(this.titleElement);\n }\n\n /**\n * Indicates if the popover is open and visible.\n */\n public get popoverIsVisible(): boolean {\n return this.contentElement !== undefined;\n }\n\n constructor(private fixture: ComponentFixture<unknown>) {}\n\n /**\n * Triggers the blur event for the popover.\n */\n public blur(): Promise<unknown> {\n // close the popover by changing focus to the body element\n SkyAppTestUtility.fireDomEvent(window.document.body, 'click');\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n\n //#region helpers\n private get contentElement(): HTMLElement | undefined {\n return this.queryOverlay('sky-popover-content') || undefined;\n }\n\n private get containerElement(): HTMLElement | undefined {\n return this.queryOverlay('.sky-popover-container') || undefined;\n }\n\n private get titleElement(): HTMLElement | undefined {\n return this.queryOverlay('.sky-popover-title') || undefined;\n }\n\n private get bodyElement(): HTMLElement | undefined {\n return this.queryOverlay('.sky-popover-body') || undefined;\n }\n\n private getOverlay(): Element | undefined {\n return document.querySelector('sky-overlay') || undefined;\n }\n\n private queryOverlay(query: string): HTMLElement | null {\n const overlay = this.getOverlay();\n\n return !overlay ? null : overlay.querySelector(query);\n }\n\n /**\n * Searches the element's class names for a class which matches a given prefix.\n * If a match is found, the prefix is trimmed from the class name and the suffix is returned.\n * If no class matching the prefix is found, undefined is returned.\n *\n * Example:\n * For a class 'sky-popover-placement-right', passing the prefix 'sky-popover-placement-'\n * should return the value 'right'.\n * @param prefix\n */\n private getClassSuffixByClassPrefix(\n element: HTMLElement | undefined,\n prefix: string\n ): string | undefined {\n const containerClasses = element?.className.split(' ');\n const prefixedClass = containerClasses?.find((x) => x.startsWith(prefix));\n\n return !prefixedClass ? undefined : prefixedClass.slice(prefix.length);\n }\n //#endregion\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAMa,wBAAwB;;sHAAxB,wBAAwB;uHAAxB,wBAAwB,YAFzB,iBAAiB;uHAEhB,wBAAwB,YAFzB,iBAAiB;4FAEhB,wBAAwB;kBAHpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC7B;;;ACID;;;;;MAKa,kBAAkB;IAuD7B,YAAoB,OAAkC,EAAE,SAAiB;QAArD,YAAO,GAAP,OAAO,CAA2B;QACpD,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,cAAc,CACf,CAAC;KACH;;;;IAzDD,IAAW,QAAQ;QACjB,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAEvC,IAAI,CAAC,MAAM,EAAE;YACX,OAAO;SACR;QAED,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC;YAChD,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC;YAC9C,QAAQ,EAAE,MAAM,CAAC,aAAa,CAAC,QAAQ;YACvC,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,YAAY,CAAC;YACtD,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC;SAClD,CAAC;KACH;;;;IAKD,IAAW,kBAAkB;QAC3B,OAAO,iBAAiB,CAAC,OAAO,CAAC,IAAI,CA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AqB,CAAC,IAAI,SAAS,CAAC;KAC9D;IAED,IAAY,gBAAgB;QAC1B,OAAO,IAAI,CAAC,YAAY,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC;KACjE;IAED,IAAY,YAAY;QACtB,OAAO,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,IAAI,SAAS,CAAC;KAC7D;IAED,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,IAAI,SAAS,CAAC;KAC5D;IAEO,UAAU;QAChB,OAAO,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;KAC3D;IAEO,YAAY,CAAC,KAAa;QAChC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAElC,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KACvD;;;;;;;;;;;IAYO,2BAA2B,CACjC,OAAgC,EAChC,MAAc;QAEd,MAAM,gBAAgB,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvD,MAAM,aAAa,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAE1E,OAAO,CAAC,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KACxE;;;AC5GH;;;;;;"}
@@ -12,6 +12,7 @@ import * as i5 from '@skyux/i18n';
12
12
  import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
13
13
  import { Subject, fromEvent } from 'rxjs';
14
14
  import { takeUntil } from 'rxjs/operators';
15
+ import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
15
16
  import { trigger, state, style, transition, animate } from '@angular/animations';
16
17
 
17
18
  /**
@@ -199,6 +200,7 @@ function parseAffixHorizontalAlignment$1(alignment) {
199
200
  }
200
201
  }
201
202
 
203
+ var _SkyDropdownComponent_positionTimeout;
202
204
  /**
203
205
  * Creates a dropdown menu that displays menu items that users may select.
204
206
  */
@@ -217,6 +219,7 @@ class SkyDropdownComponent {
217
219
  this.isVisible = false;
218
220
  this.ngUnsubscribe = new Subject();
219
221
  this._isOpen = false;
222
+ _SkyDropdownComponent_positionTimeout.set(this, void 0);
220
223
  }
221
224
  /**
222
225
  * Specifies a background color for the dropdown button. Available values are `default` and
@@ -304,7 +307,7 @@ class SkyDropdownComponent {
304
307
  if (value) {
305
308
  this._menuContainerElementRef = value;
306
309
  this.destroyAffixer();
307
- this.createAffixer();
310
+ this.createAffixer(value);
308
311
  this.changeDetector.markForCheck();
309
312
  }
310
313
  }
@@ -327,10 +330,9 @@ class SkyDropdownComponent {
327
330
  ngOnDestroy() {
328
331
  this.destroyAffixer();
329
332
  this.destroyOverlay();
330
- clearTimeout(this._positionTimeout);
333
+ clearTimeout(__classPrivateFieldGet(this, _SkyDropdownComponent_positionTimeout, "f"));
331
334
  this.ngUnsubscribe.next();
332
335
  this.ngUnsubscribe.complete();
333
- this.ngUnsubscribe = undefined;
334
336
  }
335
337
  addEventListeners() {
336
338
  const buttonElement = this.triggerButton.nativeElement;
@@ -443,8 +445,8 @@ class SkyDropdownComponent {
443
445
  this.overlay = undefined;
444
446
  }
445
447
  }
446
- createAffixer() {
447
- const affixer = this.affixService.createAffixer(this.menuContainerElementRef);
448
+ createAffixer(menuContainerElementRef) {
449
+ const affixer = this.affixService.createAffixer(menuContainerElementRef);
448
450
  affixer.placementChange
449
451
  .pipe(takeUntil(this.ngUnsubscribe))
450
452
  .subscribe((change) => {
@@ -487,7 +489,7 @@ class SkyDropdownComponent {
487
489
  this.changeDetector.markForCheck();
488
490
  // Explicitly declare the `setTimeout` from the `window` object in order to use the DOM typings
489
491
  // during a unit test (instead of confusing this with Node's `setTimeout`).
490
- this._positionTimeout = window.setTimeout(() => {
492
+ __classPrivateFieldSet(this, _SkyDropdownComponent_positionTimeout, window.setTimeout(() => {
491
493
  this.affixer.affixTo(this.triggerButton.nativeElement, {
492
494
  autoFitContext: SkyAffixAutoFitContext.Viewport,
493
495
  enableAutoFit: true,
@@ -497,9 +499,10 @@ class SkyDropdownComponent {
497
499
  });
498
500
  this.isVisible = true;
499
501
  this.changeDetector.markForCheck();
500
- });
502
+ }), "f");
501
503
  }
502
504
  }
505
+ _SkyDropdownComponent_positionTimeout = new WeakMap();
503
506
  SkyDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDropdownComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SkyAffixService }, { token: i1.SkyOverlayService }, { token: i2.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
504
507
  SkyDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyDropdownComponent, selector: "sky-dropdown", inputs: { buttonStyle: "buttonStyle", buttonType: "buttonType", disabled: "disabled", dismissOnBlur: "dismissOnBlur", label: "label", horizontalAlignment: "horizontalAlignment", messageStream: "messageStream", title: "title", trigger: "trigger" }, viewQueries: [{ propertyName: "menuContainerElementRef", first: true, predicate: ["menuContainerElementRef"], descendants: true, read: ElementRef }, { propertyName: "menuContainerTemplateRef", first: true, predicate: ["menuContainerTemplateRef"], descendants: true, read: TemplateRef, static: true }, { propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"sky-dropdown\">\n <button\n class=\"sky-btn sky-dropdown-button\"\n type=\"button\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-controls]=\"isOpen ? menuId : null\"\n [attr.aria-haspopup]=\"menuAriaRole\"\n [attr.aria-label]=\"\n label || ('skyux_dropdown_context_menu_default_label' | skyLibResources)\n \"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [ngClass]=\"[\n 'sky-dropdown-button-type-' + buttonType,\n 'sky-btn-' + buttonStyle\n ]\"\n #triggerButton\n >\n <ng-container [ngSwitch]=\"buttonType\">\n <ng-template ngSwitchCase=\"context-menu\">\n <sky-icon *skyThemeIf=\"'default'\" icon=\"ellipsis-h\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"ellipsis\"\n iconType=\"skyux\"\n ></sky-icon>\n </ng-template>\n\n <ng-template ngSwitchDefault>\n <div\n *ngIf=\"buttonType === 'select' || buttonType === 'tab' || !buttonType\"\n class=\"sky-dropdown-button-container\"\n >\n <div class=\"sky-dropdown-button-content-container\">\n <ng-content select=\"sky-dropdown-button\"> </ng-content>\n </div>\n <div class=\"sky-dropdown-button-icon-container\">\n <sky-icon\n *skyThemeIf=\"'default'\"\n class=\"sky-dropdown-caret\"\n icon=\"caret-down\"\n >\n </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n class=\"sky-dropdown-caret\"\n icon=\"chevron-down\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </div>\n </div>\n <div\n *ngIf=\"buttonType !== 'select' && buttonType !== 'tab' && buttonType\"\n >\n <sky-icon [icon]=\"buttonType\" size=\"lg\"></sky-icon>\n </div>\n </ng-template>\n </ng-container>\n </button>\n</div>\n\n<ng-template #menuContainerTemplateRef>\n <div\n class=\"sky-dropdown-menu-container\"\n [class.hidden]=\"!isVisible\"\n #menuContainerElementRef\n >\n <ng-content select=\"sky-dropdown-menu\"></ng-content>\n </div>\n</ng-template>\n", styles: [".sky-dropdown-button-type-tab{background-color:transparent;border:none;border-radius:4px 4px 0 0;color:#686c73;cursor:pointer;display:inline-block;font-weight:600;line-height:1.8;padding:8px 16px;background-color:#0974a1;color:#fff;max-width:100%;text-align:left}.sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:#eeeeef;color:#212327;text-decoration:none}.sky-dropdown-button-type-tab.sky-btn-tab-disabled{background-color:#cdcfd2;cursor:default;outline:none;text-decoration:none}.sky-dropdown-button-type-tab.sky-btn-tab-disabled:hover{color:#686c73;cursor:default;text-decoration:none}.sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:#0974a1;color:#fff}.sky-dropdown-button-type-context-menu{border-radius:50%;padding:3px 8px}.sky-dropdown-caret{margin-left:10px}.sky-dropdown-button-container{display:flex}.sky-dropdown-button-content-container{flex-shrink:1;overflow:hidden;text-overflow:ellipsis}.sky-dropdown-button-icon-container{flex-grow:1}.sky-dropdown-menu-container{position:fixed}.hidden{visibility:hidden}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab{border:none;border-radius:0;font-weight:400;padding:10px 15px;transition:box-shadow .15s;background-color:transparent;color:#212327}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled):not(.sky-btn-tab-selected):not(.sky-dropdown-button-type-tab):not(:focus){background-color:transparent;border-bottom:solid 1px #00b4f1;padding-bottom:9px}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:focus{background-color:transparent;outline:none}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:focus:not(:active){outline:solid 2px #1870B8;outline-offset:-2px;box-shadow:0 1px 8px #0000004d}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:active{border-bottom:solid 3px #00b4f1;padding-bottom:7px}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:not(:active){border-bottom:solid 3px #1870B8;padding-bottom:7px}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:transparent;color:#212327}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab .sky-btn-tab-close,:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab .sky-tab-header-count{color:#686c73}:host-context(.sky-theme-modern) .sky-dropdown-caret{margin-left:10px}.sky-theme-modern .sky-dropdown-button-type-tab{border:none;border-radius:0;font-weight:400;padding:10px 15px;transition:box-shadow .15s;background-color:transparent;color:#212327}.sky-theme-modern .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled):not(.sky-btn-tab-selected):not(.sky-dropdown-button-type-tab):not(:focus){background-color:transparent;border-bottom:solid 1px #00b4f1;padding-bottom:9px}.sky-theme-modern .sky-dropdown-button-type-tab:focus{background-color:transparent;outline:none}.sky-theme-modern .sky-dropdown-button-type-tab:focus:not(:active){outline:solid 2px #1870B8;outline-offset:-2px;box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-dropdown-button-type-tab:active{border-bottom:solid 3px #00b4f1;padding-bottom:7px}.sky-theme-modern .sky-dropdown-button-type-tab:not(:active){border-bottom:solid 3px #1870B8;padding-bottom:7px}.sky-theme-modern .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:transparent;color:#212327}.sky-theme-modern .sky-dropdown-button-type-tab .sky-btn-tab-close,.sky-theme-modern .sky-dropdown-button-type-tab .sky-tab-header-count{color:#686c73}.sky-theme-modern .sky-dropdown-caret{margin-left:10px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab{color:#fff}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab:hover{color:#fff}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab .sky-btn-tab-close,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab .sky-tab-header-count{color:#efefef}.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab{color:#fff}.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab:hover{color:#fff}.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab .sky-btn-tab-close,.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab .sky-tab-header-count{color:#efefef}\n"], components: [{ type: i3.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
505
508
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyDropdownComponent, decorators: [{
@@ -672,7 +675,6 @@ class SkyDropdownMenuComponent {
672
675
  ngOnDestroy() {
673
676
  this.ngUnsubscribe.next();
674
677
  this.ngUnsubscribe.complete();
675
- this.ngUnsubscribe = undefined;
676
678
  }
677
679
  focusFirstItem() {
678
680
  if (!this.hasFocusableItems) {
@@ -744,9 +746,7 @@ class SkyDropdownMenuComponent {
744
746
  });
745
747
  }
746
748
  getItemByIndex(index) {
747
- return this.menuItems.find((item, i) => {
748
- return i === index;
749
- });
749
+ return this.menuItems.find((_, i) => i === index);
750
750
  }
751
751
  selectItemByEventTarget(target) {
752
752
  const selectedItem = this.menuItems.find((item, i) => {
@@ -1045,7 +1045,7 @@ class SkyPopoverContentComponent {
1045
1045
  this.dismissOnBlur = true;
1046
1046
  this.enableAnimations = true;
1047
1047
  this.isOpen = false;
1048
- this.popoverType = 'info';
1048
+ this.placement = null;
1049
1049
  this.ngUnsubscribe = new Subject();
1050
1050
  this._closed = new Subject();
1051
1051
  this._isMouseEnter = new Subject();
@@ -1064,9 +1064,7 @@ class SkyPopoverContentComponent {
1064
1064
  return this._isMouseEnter.asObservable();
1065
1065
  }
1066
1066
  ngOnInit() {
1067
- var _a;
1068
- /*istanbul ignore next*/
1069
- this.contentTarget.createEmbeddedView((_a = this.context) === null || _a === void 0 ? void 0 : _a.contentTemplateRef);
1067
+ this.contentTarget.createEmbeddedView(this.context.contentTemplateRef);
1070
1068
  this.addEventListeners();
1071
1069
  /*istanbul ignore else*/
1072
1070
  if (this.themeSvc) {
@@ -1088,27 +1086,19 @@ class SkyPopoverContentComponent {
1088
1086
  /* istanbul ignore else */
1089
1087
  if (this.affixer) {
1090
1088
  this.affixer.destroy();
1089
+ this.affixer = undefined;
1091
1090
  }
1092
- this._closed =
1093
- this._isMouseEnter =
1094
- this._opened =
1095
- this.affixer =
1096
- this.ngUnsubscribe =
1097
- undefined;
1098
1091
  }
1099
1092
  onAnimationEvent(event) {
1100
- var _a, _b;
1101
1093
  if (event.fromState === 'void') {
1102
1094
  return;
1103
1095
  }
1104
1096
  if (event.phaseName === 'done') {
1105
1097
  if (event.toState === 'open') {
1106
- /*istanbul ignore next*/
1107
- (_a = this._opened) === null || _a === void 0 ? void 0 : _a.next();
1098
+ this._opened.next();
1108
1099
  }
1109
1100
  else {
1110
- /*istanbul ignore next*/
1111
- (_b = this._closed) === null || _b === void 0 ? void 0 : _b.next();
1101
+ this._closed.next();
1112
1102
  }
1113
1103
  }
1114
1104
  }
@@ -1119,9 +1109,7 @@ class SkyPopoverContentComponent {
1119
1109
  this.horizontalAlignment = config.horizontalAlignment;
1120
1110
  this.placement = config.placement;
1121
1111
  this.popoverTitle = config.popoverTitle;
1122
- if (config.popoverType) {
1123
- this.popoverType = config.popoverType;
1124
- }
1112
+ this.popoverType = config.popoverType;
1125
1113
  this.changeDetector.markForCheck();
1126
1114
  // Indicates if the popover should be displayed statically.
1127
1115
  // Please note: This feature is internal-only and used by the visual tests to capture multiple
@@ -1134,11 +1122,7 @@ class SkyPopoverContentComponent {
1134
1122
  }
1135
1123
  // Let the styles render before gauging the affix dimensions.
1136
1124
  setTimeout(() => {
1137
- var _a;
1138
- /*istanbul ignore next*/
1139
- if (!((_a = this.popoverRef) === null || _a === void 0 ? void 0 : _a.nativeElement) ||
1140
- !this.ngUnsubscribe ||
1141
- this.ngUnsubscribe.isStopped) {
1125
+ if (!this.popoverRef.nativeElement || this.ngUnsubscribe.isStopped) {
1142
1126
  return;
1143
1127
  }
1144
1128
  if (!this.affixer) {
@@ -1151,18 +1135,11 @@ class SkyPopoverContentComponent {
1151
1135
  isSticky: true,
1152
1136
  placement: parseAffixPlacement(this.placement),
1153
1137
  };
1154
- // Ensure that we are positioning the vertical alginment correctly. These
1155
- // are the default alignments for all popovers but ensure that we are future proof here.
1138
+ // Ensure vertical alignment is set according to the popover's placement value.
1156
1139
  if (affixOptions.placement === 'left' ||
1157
1140
  affixOptions.placement === 'right') {
1158
1141
  affixOptions.verticalAlignment = 'middle';
1159
1142
  }
1160
- else if (affixOptions.placement === 'above') {
1161
- affixOptions.verticalAlignment = 'bottom';
1162
- }
1163
- else {
1164
- affixOptions.verticalAlignment = 'top';
1165
- }
1166
1143
  this.affixer.affixTo(this.caller.nativeElement, affixOptions);
1167
1144
  this.updateArrowOffset();
1168
1145
  this.isOpen = true;
@@ -1197,13 +1174,15 @@ class SkyPopoverContentComponent {
1197
1174
  this.affixer = affixer;
1198
1175
  }
1199
1176
  updateArrowOffset() {
1200
- const { top, left } = this.adapterService.getArrowCoordinates({
1201
- caller: this.caller,
1202
- popover: this.popoverRef,
1203
- popoverArrow: this.arrowRef,
1204
- }, this.placement, this.themeName);
1205
- this.arrowTop = top;
1206
- this.arrowLeft = left;
1177
+ if (this.placement) {
1178
+ const { top, left } = this.adapterService.getArrowCoordinates({
1179
+ caller: this.caller,
1180
+ popover: this.popoverRef,
1181
+ popoverArrow: this.arrowRef,
1182
+ }, this.placement, this.themeName);
1183
+ this.arrowTop = top;
1184
+ this.arrowLeft = left;
1185
+ }
1207
1186
  }
1208
1187
  isFocusLeavingElement(event) {
1209
1188
  const focusableItems = this.coreAdapterService.getFocusableChildren(this.elementRef.nativeElement);
@@ -1251,7 +1230,7 @@ class SkyPopoverContentComponent {
1251
1230
  });
1252
1231
  }
1253
1232
  }
1254
- SkyPopoverContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPopoverContentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyAffixService }, { token: i1.SkyCoreAdapterService }, { token: SkyPopoverAdapterService }, { token: SkyPopoverContext, optional: true }, { token: i2.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1233
+ SkyPopoverContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPopoverContentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyAffixService }, { token: i1.SkyCoreAdapterService }, { token: SkyPopoverAdapterService }, { token: SkyPopoverContext }, { token: i2.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1255
1234
  SkyPopoverContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyPopoverContentComponent, selector: "sky-popover-content", providers: [SkyPopoverAdapterService], viewQueries: [{ propertyName: "arrowRef", first: true, predicate: ["arrowRef"], descendants: true, read: ElementRef, static: true }, { propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true, read: ElementRef, static: true }, { propertyName: "contentTarget", first: true, predicate: ["contentTarget"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\n class=\"sky-popover-container sky-popover-max-height\"\n [@.disabled]=\"!enableAnimations\"\n [@skyPopoverAnimation]=\"animationState\"\n [class.sky-popover-hidden]=\"!placement\"\n [ngClass]=\"[\n 'sky-popover-alignment-' + horizontalAlignment,\n 'sky-popover-placement-' + placement,\n 'sky-popover-' + popoverType\n ]\"\n (@skyPopoverAnimation.done)=\"onAnimationEvent($event)\"\n (@skyPopoverAnimation.start)=\"onAnimationEvent($event)\"\n #popoverRef\n>\n <div\n class=\"sky-popover\"\n tabindex=\"-1\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners sky-shadow': 'default',\n 'sky-elevation-4': 'modern'\n }\"\n >\n <header\n *ngIf=\"popoverTitle\"\n class=\"sky-popover-header\"\n [skyThemeClass]=\"{\n 'sky-padding-even-default': 'default',\n 'sky-padding-even-lg sky-margin-stacked-lg': 'modern'\n }\"\n >\n <h1\n *ngIf=\"popoverTitle\"\n class=\"sky-popover-title\"\n [skyThemeClass]=\"{\n 'sky-emphasized': 'default',\n 'sky-font-emphasized': 'modern'\n }\"\n >\n {{ popoverTitle }}\n </h1>\n </header>\n <div\n class=\"sky-popover-body\"\n [skyThemeClass]=\"{\n 'sky-padding-even-default': 'default',\n 'sky-padding-even-lg': 'modern'\n }\"\n >\n <ng-container #contentTarget></ng-container>\n </div>\n <span\n aria-hidden=\"true\"\n class=\"sky-popover-arrow\"\n [style.left.px]=\"arrowLeft\"\n [style.top.px]=\"arrowTop\"\n #arrowRef\n ></span>\n </div>\n</div>\n", styles: [".sky-popover-container{position:fixed;min-width:276px;max-width:276px}.sky-popover-container.sky-popover-hidden{visibility:hidden;opacity:0;pointer-events:none!important}.sky-popover-container.sky-popover-hidden *{pointer-events:none!important}.sky-popover-container.sky-popover-static .sky-popover-arrow{position:absolute}.sky-popover-container:focus{outline:none}@media (max-width: 276px){.sky-popover-container{max-width:100%;min-width:auto}}.sky-popover{background-color:#fff}.sky-popover-header{padding-bottom:0}.sky-popover-header+.sky-popover-body{padding-top:2px}.sky-popover-title{margin:0}.sky-popover-arrow{width:0;height:0;position:fixed;border:10px solid transparent}.sky-popover-placement-above{padding-bottom:10px}.sky-popover-placement-above .sky-popover{border-bottom:10px solid #00b4f1}.sky-popover-placement-above .sky-popover-arrow{border-bottom:0;border-top-color:#00b4f1;bottom:0;left:50%;margin-left:-10px}.sky-popover-placement-above.sky-popover-danger .sky-popover{border-bottom-color:#ef4044}.sky-popover-placement-above.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044}.sky-popover-placement-below{padding-top:10px}.sky-popover-placement-below .sky-popover{border-top:10px solid #00b4f1}.sky-popover-placement-below .sky-popover-arrow{border-top:0;border-bottom-color:#00b4f1;top:0;left:50%;margin-left:-10px}.sky-popover-placement-below.sky-popover-danger .sky-popover{border-top-color:#ef4044}.sky-popover-placement-below.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044}.sky-popover-placement-right{padding-left:10px}.sky-popover-placement-right .sky-popover{border-left:10px solid #00b4f1}.sky-popover-placement-right .sky-popover-arrow{border-left:0;border-right-color:#00b4f1;left:0;top:50%;margin-top:-10px}.sky-popover-placement-right.sky-popover-danger .sky-popover{border-left-color:#ef4044}.sky-popover-placement-right.sky-popover-danger .sky-popover-arrow{border-right-color:#ef4044}.sky-popover-placement-left{padding-right:10px}.sky-popover-placement-left .sky-popover{border-right:10px solid #00b4f1}.sky-popover-placement-left .sky-popover-arrow{border-right:0;border-left-color:#00b4f1;right:0;top:50%;margin-top:-10px}.sky-popover-placement-left.sky-popover-danger .sky-popover{border-right-color:#ef4044}.sky-popover-placement-left.sky-popover-danger .sky-popover-arrow{border-left-color:#ef4044}.sky-popover-placement-above.sky-popover-alignment-left .sky-popover-arrow,.sky-popover-placement-below.sky-popover-alignment-left .sky-popover-arrow{left:40px;right:auto}.sky-popover-placement-above.sky-popover-alignment-right .sky-popover-arrow,.sky-popover-placement-below.sky-popover-alignment-right .sky-popover-arrow{left:auto;right:40px}.sky-popover-max-height .sky-popover{overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}:host-context(.sky-theme-modern) .sky-popover{border-radius:6px}:host-context(.sky-theme-modern) .sky-popover-arrow{transform:rotate(45deg);border-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-above{padding-bottom:10px}:host-context(.sky-theme-modern) .sky-popover-placement-above .sky-popover{border-bottom:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-above .sky-popover-arrow{bottom:1px;border-radius:0 0 3px;border-bottom:solid 10px #00b4f1;border-right:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-above.sky-popover-danger .sky-popover{border-bottom-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-above.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-right-color:#ef4044;border-top-color:transparent;border-left-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-below{padding-top:10px}:host-context(.sky-theme-modern) .sky-popover-placement-below .sky-popover{border-top:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-below .sky-popover-arrow{top:1px;border-radius:3px 0 0;border-top:solid 10px #00b4f1;border-left:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-below.sky-popover-danger .sky-popover{border-top-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-below.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-left-color:#ef4044;border-bottom-color:transparent;border-right-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-right{padding-left:10px}:host-context(.sky-theme-modern) .sky-popover-placement-right .sky-popover{border-left:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-right .sky-popover-arrow{left:1px;border-radius:0 0 0 3px;border-bottom:solid 10px #00b4f1;border-left:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-right.sky-popover-danger .sky-popover{border-left-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-right.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-left-color:#ef4044;border-top-color:transparent;border-right-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-left{padding-right:10px}:host-context(.sky-theme-modern) .sky-popover-placement-left .sky-popover{border-right:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-left .sky-popover-arrow{right:1px;border-radius:0 3px 0 0;border-top:solid 10px #00b4f1;border-right:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-left.sky-popover-danger .sky-popover{border-right-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-left.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-right-color:#ef4044;border-bottom-color:transparent;border-left-color:transparent}.sky-theme-modern .sky-popover{border-radius:6px}.sky-theme-modern .sky-popover-arrow{transform:rotate(45deg);border-color:transparent}.sky-theme-modern .sky-popover-placement-above{padding-bottom:10px}.sky-theme-modern .sky-popover-placement-above .sky-popover{border-bottom:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-above .sky-popover-arrow{bottom:1px;border-radius:0 0 3px;border-bottom:solid 10px #00b4f1;border-right:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-above.sky-popover-danger .sky-popover{border-bottom-color:#ef4044}.sky-theme-modern .sky-popover-placement-above.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-right-color:#ef4044;border-top-color:transparent;border-left-color:transparent}.sky-theme-modern .sky-popover-placement-below{padding-top:10px}.sky-theme-modern .sky-popover-placement-below .sky-popover{border-top:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-below .sky-popover-arrow{top:1px;border-radius:3px 0 0;border-top:solid 10px #00b4f1;border-left:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-below.sky-popover-danger .sky-popover{border-top-color:#ef4044}.sky-theme-modern .sky-popover-placement-below.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-left-color:#ef4044;border-bottom-color:transparent;border-right-color:transparent}.sky-theme-modern .sky-popover-placement-right{padding-left:10px}.sky-theme-modern .sky-popover-placement-right .sky-popover{border-left:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-right .sky-popover-arrow{left:1px;border-radius:0 0 0 3px;border-bottom:solid 10px #00b4f1;border-left:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-right.sky-popover-danger .sky-popover{border-left-color:#ef4044}.sky-theme-modern .sky-popover-placement-right.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-left-color:#ef4044;border-top-color:transparent;border-right-color:transparent}.sky-theme-modern .sky-popover-placement-left{padding-right:10px}.sky-theme-modern .sky-popover-placement-left .sky-popover{border-right:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-left .sky-popover-arrow{right:1px;border-radius:0 3px 0 0;border-top:solid 10px #00b4f1;border-right:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-left.sky-popover-danger .sky-popover{border-right-color:#ef4044}.sky-theme-modern .sky-popover-placement-left.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-right-color:#ef4044;border-bottom-color:transparent;border-left-color:transparent}\n"], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [skyPopoverAnimation] });
1256
1235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPopoverContentComponent, decorators: [{
1257
1236
  type: Component,
@@ -1262,9 +1241,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1262
1241
  animations: [skyPopoverAnimation],
1263
1242
  providers: [SkyPopoverAdapterService],
1264
1243
  }]
1265
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAffixService }, { type: i1.SkyCoreAdapterService }, { type: SkyPopoverAdapterService }, { type: SkyPopoverContext, decorators: [{
1266
- type: Optional
1267
- }] }, { type: i2.SkyThemeService, decorators: [{
1244
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.SkyAffixService }, { type: i1.SkyCoreAdapterService }, { type: SkyPopoverAdapterService }, { type: SkyPopoverContext }, { type: i2.SkyThemeService, decorators: [{
1268
1245
  type: Optional
1269
1246
  }] }]; }, propDecorators: { arrowRef: [{
1270
1247
  type: ViewChild,
@@ -1314,8 +1291,7 @@ class SkyPopoverComponent {
1314
1291
  }
1315
1292
  /**
1316
1293
  * Specifies the horizontal alignment of the popover in relation to the trigger element.
1317
- * The `skyPopoverAlignment` property on the popover directive overwrites this property.
1318
- * Options include:`"center"`, `"right"`, and `'"left"`.
1294
+ * The `skyPopoverAlignment` property on the popover directive takes precedence over this property when specified.
1319
1295
  * @default "center"
1320
1296
  */
1321
1297
  set alignment(value) {
@@ -1340,8 +1316,7 @@ class SkyPopoverComponent {
1340
1316
  }
1341
1317
  /**
1342
1318
  * Specifies the placement of the popover in relation to the trigger element.
1343
- * The `skyPopoverPlacement` property on the popover directive overwrites this property.
1344
- * Options include:`"above"`, `"below"`, `"right"`, and `"left"`.
1319
+ * The `skyPopoverPlacement` property on the popover directive takes precedence over this property when specified.
1345
1320
  * @default "above"
1346
1321
  */
1347
1322
  set placement(value) {
@@ -1350,10 +1325,19 @@ class SkyPopoverComponent {
1350
1325
  get placement() {
1351
1326
  return this._placement || 'above';
1352
1327
  }
1328
+ /**
1329
+ * Specifies the type of popover.
1330
+ * @default "info"
1331
+ */
1332
+ set popoverType(value) {
1333
+ this._popoverType = value;
1334
+ }
1335
+ get popoverType() {
1336
+ return this._popoverType || 'info';
1337
+ }
1353
1338
  ngOnDestroy() {
1354
1339
  this.ngUnsubscribe.next();
1355
1340
  this.ngUnsubscribe.complete();
1356
- this.ngUnsubscribe = undefined;
1357
1341
  if (this.overlay) {
1358
1342
  this.overlayService.close(this.overlay);
1359
1343
  this.overlay = undefined;
@@ -1431,7 +1415,7 @@ class SkyPopoverComponent {
1431
1415
  });
1432
1416
  contentRef.closed.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
1433
1417
  /*istanbul ignore else*/
1434
- if (this.isActive) {
1418
+ if (this.isActive && this.overlay) {
1435
1419
  this.overlayService.close(this.overlay);
1436
1420
  this.overlay = undefined;
1437
1421
  this.isActive = false;
@@ -1505,14 +1489,24 @@ var SkyPopoverMessageType;
1505
1489
  SkyPopoverMessageType[SkyPopoverMessageType["Focus"] = 3] = "Focus";
1506
1490
  })(SkyPopoverMessageType || (SkyPopoverMessageType = {}));
1507
1491
 
1492
+ var _SkyPopoverDirective_messageStreamSub;
1508
1493
  class SkyPopoverDirective {
1509
1494
  constructor(elementRef) {
1510
1495
  this.elementRef = elementRef;
1511
- /**
1512
- * Provides an observable to send commands to the popover that respect the `SkyPopoverMessage` type.
1513
- */
1514
- this.skyPopoverMessageStream = new Subject();
1496
+ this._skyPopoverMessageStream = new Subject();
1497
+ _SkyPopoverDirective_messageStreamSub.set(this, void 0);
1515
1498
  this.ngUnsubscribe = new Subject();
1499
+ this.subscribeMessageStream();
1500
+ }
1501
+ /**
1502
+ * Provides an RxJS `Subject` to send commands to the popover that respect the `SkyPopoverMessage` type.
1503
+ */
1504
+ set skyPopoverMessageStream(value) {
1505
+ this._skyPopoverMessageStream = value !== null && value !== void 0 ? value : new Subject();
1506
+ this.subscribeMessageStream();
1507
+ }
1508
+ get skyPopoverMessageStream() {
1509
+ return this._skyPopoverMessageStream;
1516
1510
  }
1517
1511
  /**
1518
1512
  * Specifies the user action that displays the popover.
@@ -1528,6 +1522,7 @@ class SkyPopoverDirective {
1528
1522
  }
1529
1523
  ngOnDestroy() {
1530
1524
  this.removeEventListeners();
1525
+ this.unsubscribeMessageStream();
1531
1526
  }
1532
1527
  togglePopover() {
1533
1528
  if (this.skyPopover.isActive) {
@@ -1552,11 +1547,6 @@ class SkyPopoverDirective {
1552
1547
  }
1553
1548
  addEventListeners() {
1554
1549
  const element = this.elementRef.nativeElement;
1555
- this.skyPopoverMessageStream
1556
- .pipe(takeUntil(this.ngUnsubscribe))
1557
- .subscribe((message) => {
1558
- this.handleIncomingMessages(message);
1559
- });
1560
1550
  fromEvent(element, 'keydown')
1561
1551
  .pipe(takeUntil(this.ngUnsubscribe))
1562
1552
  .subscribe((event) => {
@@ -1627,7 +1617,6 @@ class SkyPopoverDirective {
1627
1617
  removeEventListeners() {
1628
1618
  this.ngUnsubscribe.next();
1629
1619
  this.ngUnsubscribe.complete();
1630
- this.ngUnsubscribe = undefined;
1631
1620
  }
1632
1621
  handleIncomingMessages(message) {
1633
1622
  /* tslint:disable-next-line:switch-default */
@@ -1655,7 +1644,20 @@ class SkyPopoverDirective {
1655
1644
  sendMessage(messageType) {
1656
1645
  this.skyPopoverMessageStream.next({ type: messageType });
1657
1646
  }
1647
+ subscribeMessageStream() {
1648
+ this.unsubscribeMessageStream();
1649
+ __classPrivateFieldSet(this, _SkyPopoverDirective_messageStreamSub, this.skyPopoverMessageStream.subscribe((message) => {
1650
+ this.handleIncomingMessages(message);
1651
+ }), "f");
1652
+ }
1653
+ unsubscribeMessageStream() {
1654
+ if (__classPrivateFieldGet(this, _SkyPopoverDirective_messageStreamSub, "f")) {
1655
+ __classPrivateFieldGet(this, _SkyPopoverDirective_messageStreamSub, "f").unsubscribe();
1656
+ __classPrivateFieldSet(this, _SkyPopoverDirective_messageStreamSub, undefined, "f");
1657
+ }
1658
+ }
1658
1659
  }
1660
+ _SkyPopoverDirective_messageStreamSub = new WeakMap();
1659
1661
  SkyPopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPopoverDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1660
1662
  SkyPopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyPopoverDirective, selector: "[skyPopover]", inputs: { skyPopover: "skyPopover", skyPopoverAlignment: "skyPopoverAlignment", skyPopoverMessageStream: "skyPopoverMessageStream", skyPopoverPlacement: "skyPopoverPlacement", skyPopoverTrigger: "skyPopoverTrigger" }, ngImport: i0 });
1661
1663
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyPopoverDirective, decorators: [{