q2-tecton-elements 1.43.3 → 1.43.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 (27) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +6 -1
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/q2-dropdown.cjs.entry.js +4 -3
  4. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  5. package/dist/collection/components/q2-dropdown/q2-dropdown.js +5 -4
  6. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  7. package/dist/collection/components/q2-popover/q2-popover.js +6 -1
  8. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  9. package/dist/components/q2-dropdown.js +5 -4
  10. package/dist/components/q2-dropdown.js.map +1 -1
  11. package/dist/components/q2-popover2.js +6 -1
  12. package/dist/components/q2-popover2.js.map +1 -1
  13. package/dist/esm/click-elsewhere_2.entry.js +6 -1
  14. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  15. package/dist/esm/q2-dropdown.entry.js +5 -4
  16. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  17. package/dist/q2-tecton-elements/{p-b0541d38.entry.js → p-0b715d39.entry.js} +2 -2
  18. package/dist/q2-tecton-elements/p-0b715d39.entry.js.map +1 -0
  19. package/dist/q2-tecton-elements/p-560794fa.entry.js +2 -0
  20. package/dist/q2-tecton-elements/p-560794fa.entry.js.map +1 -0
  21. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  22. package/dist/test/elements/q2-popover-test.e2e.js +2 -0
  23. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  24. package/package.json +3 -3
  25. package/dist/q2-tecton-elements/p-15ee9779.entry.js +0 -2
  26. package/dist/q2-tecton-elements/p-15ee9779.entry.js.map +0 -1
  27. package/dist/q2-tecton-elements/p-b0541d38.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":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AG,EAAE,GAAG,QAAQ,IAEtC,YAAM,IAAI,EAAC,wBAAwB,GAAG,CACpC,KAEN,EAAC,QAAQ,QACJ,IAAI,CAAC,IAAI,GAAG,eAAS,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,GAAG,GAAG,EAC9C,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,KAC1B,YAAM,KAAK,EAAC,sBAAsB,IAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAQ,CAC9D,CACM,CACd,CACI,EACT,mEACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAChC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAChC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,IAEjB,4DACI,OAAO,EAAE,IAAI,CAAC,mBAAmB,EACjC,SAAS,EAAE,IAAI,CAAC,qBAAqB,IAErC,8DAAQ,EACP,IAAI,CAAC,IAAI,KACN,+DACI,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,IAAI,CAAC,aAAa,GAC7B,CACL,CACC,CACG,CACC,EACpB;KACL;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-dropdown/q2-dropdown.scss?tag=q2-dropdown&encapsulation=shadow","src/components/q2-dropdown/q2-dropdown.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-flex;\n}\n\n:host([block]) {\n display: block;\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n\nq2-popover {\n --tct-popover-min-width: #{var-list(var-prefixer(dropdown-width))};\n}\n","import { Component, ComponentInterface, Prop, Element, Watch, h, Fragment, Listen } from '@stencil/core';\nimport { IDict } from 'src/util';\nimport { handleAriaLabel, handleRenamedProp, isEventFromElement, loc, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-dropdown', shadow: true, styleUrl: 'q2-dropdown.scss' })\nexport class Q2Dropdown implements ComponentInterface {\n @Prop({ reflect: true }) additionalContext: string;\n\n /** If `true`, component expands to fill the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /**\n * Tells the outlet what the type of object being passed in as contextValue.\n * This will allow for the hierarchy resolution logic to work to determine if an option should or should not be shown.\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) context: string;\n\n /**\n * Passes important information to the outlet (e.g., pass an account id that your platform can use to look up what module to show for that account type).\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) contextValue: string;\n\n /** Indicates the menu cannot be focused or interacted with. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /** The icon that will render within the toggle button. You may use any of the `q2-icon` types. */\n @Prop({ reflect: true }) icon: string;\n\n /**\n * The text that appears within the button.\n * @warning\n * This property should not be used if the `type` is `icon`.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /**\n * Identifies this menu as an outlet. Used in conjunction with context and, optionally, `contextValue`.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) name: string;\n\n /** Determine whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /**\n * Force the direction of the popover dropdown when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ mutable: true }) popoverDirection: 'up' | 'down';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true }) popoverAlignment: 'left' | 'right' = 'left'; // being used in dropdown.scss\n\n /** @deprecated */\n @Prop() popoverMinHeight: number = 150;\n\n /**\n * Use with `context` to tell the outlet where it appears. It will be matched with the appropriately configured module for that context.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) resolvedType: string;\n\n /** The type of button used as the menu toggle. */\n @Prop({ reflect: true }) type: 'icon' | 'fab' | 'custom' | 'primary' | 'secondary' | 'neutral' = 'icon';\n\n /** @deprecated */\n @Prop({ reflect: true }) alignment: 'left' | 'right';\n\n /** @deprecated */\n @Prop({ reflect: true }) popDirection: 'up' | 'down';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n privatePopDirection: 'down' | 'up';\n controlElement?: HTMLQ2BtnElement;\n popoverElement?: HTMLQ2PopoverElement;\n dropdownItemSelector: string = 'q2-dropdown-item:not([disabled]):not([separator])';\n\n resolveMenu() {\n return (\n this.name &&\n window.TectonElements &&\n window.TectonElements.resolveMenu(this.name, this.contextValue, this.resolvedType, this.additionalContext)\n );\n }\n\n orchestrateResolvedMenuItems() {\n if (!this.name || !this.context) {\n // this is only for contextual menu outlets\n this.removeResolvedElements();\n return;\n }\n\n this.resolveMenuItemElements()\n .then(data => {\n this.removeResolvedElements();\n data.forEach(element => {\n this.hostElement.appendChild(element);\n });\n })\n .catch(err => {\n this.removeResolvedElements();\n throw err;\n });\n }\n\n removeResolvedElements() {\n const resolvedElements = this.hostElement.querySelectorAll('q2-dropdown-item.resolved-menu-item');\n resolvedElements.forEach(element => this.hostElement.removeChild(element));\n }\n\n resolveMenuItemElements() {\n return this.resolveMenu().then(datas => {\n return datas.map(menuItemData => {\n let onClickFn;\n let queryParams;\n if (menuItemData['tct-ctxid']) {\n queryParams = {};\n queryParams[menuItemData.contextIdParamName] = menuItemData['tct-ctxid'];\n }\n\n switch (menuItemData.action) {\n case 'navigateTo':\n onClickFn = () =>\n this.navigateTo(menuItemData.featureName, menuItemData.moduleName, queryParams);\n break;\n case 'showOverpanel':\n onClickFn = () =>\n this.showOverpanel(`${menuItemData.featureName}.${menuItemData.moduleName}`, queryParams);\n break;\n }\n\n const newDropdownItem = document.createElement('q2-dropdown-item');\n newDropdownItem.setAttribute('value', menuItemData.itemLabel);\n newDropdownItem.classList.add('resolved-menu-item');\n newDropdownItem.innerHTML = menuItemData.itemLabel;\n newDropdownItem.onclick = onClickFn;\n\n return newDropdownItem;\n });\n });\n }\n\n navigateTo(featureName: string, moduleName?: string, queryParams?: IDict<string>) {\n return window.TectonElements?.navigateTo?.(featureName, moduleName, queryParams);\n }\n\n showOverpanel(overpanelPath: string, params: IDict<string>) {\n return window.TectonElements?.showOverpanel?.(overpanelPath, params, undefined, true);\n }\n\n get hasCustomButton() {\n return !!this.hostElement.querySelector('[slot=custom-dropdown-button]');\n }\n\n get determineDropdownItemCount() {\n return this.hostElement.querySelectorAll(this.dropdownItemSelector).length;\n }\n\n get toggleButtonProps() {\n const allowedIntents = ['primary', 'secondary', 'neutral'];\n const allowedTypes = ['icon', 'fab', 'custom', ...allowedIntents];\n const type = allowedTypes.includes(this.type) ? this.type : '';\n const icon = type === 'icon';\n const fab = type === 'fab';\n const custom = type === 'custom';\n let intent;\n if (allowedIntents.includes(type)) {\n intent = type === 'neutral' ? type : `workflow-${type}`;\n }\n const active = this.open;\n const disabled = !!this.disabled;\n const ariaExpanded = this.open;\n const className = !icon && !fab && !intent ? 'unstyled' : '';\n\n return {\n icon,\n fab,\n intent,\n active,\n disabled,\n ariaExpanded,\n className,\n custom,\n };\n }\n\n //////// Observers //////////\n @Watch('popDirection')\n popDirectionHandler() {\n handleRenamedProp(this, 'popDirection', 'popoverDirection');\n }\n\n @Watch('alignment')\n alignmentHandler() {\n handleRenamedProp(this, 'alignment', 'popoverAlignment');\n }\n\n @Watch('ariaLabel')\n ariaLabelHandler() {\n handleAriaLabel(this);\n }\n\n @Watch('name')\n nameHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('context')\n contextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('contextValue')\n contextValueHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('resolvedType')\n resolvedTypeHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('additionalContext')\n additionalContextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.focusToggle();\n }\n\n @Listen('popoverStateChanged')\n popoverStateHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n this.popoverElement?.scrollContainerTo({ top: 0 });\n }\n\n ///// Lifecycle Hooks ////////\n componentWillLoad() {\n this.popDirectionHandler();\n this.alignmentHandler();\n this.ariaLabelHandler();\n }\n\n componentDidLoad() {\n this.orchestrateResolvedMenuItems();\n overrideFocus(this.hostElement);\n }\n\n ///// Actions ////////\n focusToggle = () => {\n this.controlElement.shadowRoot.querySelector<HTMLButtonElement>('button').focus();\n };\n\n openDropdown = () => {\n if (this.open) return;\n this.open = true;\n };\n\n closeDropdown = () => {\n if (!this.open) return;\n this.open = false;\n };\n\n onClickElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLClickElsewhereElement;\n if (target.localName === 'click-elsewhere') {\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n }\n };\n\n onToggleClick = () => {\n if (this.open) {\n this.closeDropdown();\n } else {\n this.openDropdown();\n }\n };\n\n onToggleKeydown = (event: KeyboardEvent) => {\n if (['ArrowUp', 'Up'].includes(event.key)) {\n event.preventDefault();\n this.openDropdown();\n this.focusLastItem();\n return;\n }\n\n if (['ArrowDown', 'Down'].includes(event.key)) {\n event.preventDefault();\n this.openDropdown();\n this.focusFirstItem();\n return;\n }\n\n if (['Escape', 'Esc'].includes(event.key)) {\n event.preventDefault();\n this.focusToggle();\n this.closeDropdown();\n return;\n }\n };\n\n onDropdownMenuClick = (event: MouseEvent | CustomEvent) => {\n if ((event.target as HTMLElement).localName !== 'q2-dropdown-item') {\n return;\n }\n const item = event.target as HTMLQ2DropdownItemElement;\n if (!item.disabled && !item.separator) {\n this.focusToggle();\n this.closeDropdown();\n }\n };\n\n focusFirstItem() {\n const firstItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:first-child`\n );\n\n firstItem?.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusLastItem() {\n const lastItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:last-child`\n );\n lastItem?.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusAdjacentItem(activeItem: HTMLQ2DropdownItemElement, direction: 'next' | 'prev') {\n const dropdownItems: HTMLQ2DropdownItemElement[] = Array.from(\n this.hostElement.querySelectorAll(this.dropdownItemSelector)\n );\n\n const activeIndex = dropdownItems.indexOf(activeItem);\n\n if (activeIndex === -1) {\n return;\n }\n\n let targetIndex: number = 0;\n if (direction === 'next') {\n targetIndex = activeIndex < dropdownItems.length - 1 ? activeIndex + 1 : 0;\n } else if (direction === 'prev') {\n if (activeIndex > 0) {\n targetIndex = activeIndex - 1;\n } else {\n targetIndex = dropdownItems.length - 1;\n }\n }\n const targetItem = dropdownItems[targetIndex];\n targetItem && targetItem.dispatchEvent(new Event('focus'));\n }\n\n onDropdownMenuKeydown = (event: KeyboardEvent) => {\n if (['Escape', 'Esc'].includes(event.key)) {\n this.closeDropdown();\n this.focusToggle();\n return;\n }\n\n if ((event.target as HTMLElement).localName !== 'q2-dropdown-item') {\n return;\n }\n\n const item = event.target as HTMLQ2DropdownItemElement;\n if (['ArrowUp', 'Up'].includes(event.key)) {\n event.preventDefault();\n this.focusAdjacentItem(item, 'prev');\n return;\n }\n\n if (['ArrowDown', 'Down'].includes(event.key)) {\n event.preventDefault();\n this.focusAdjacentItem(item, 'next');\n return;\n }\n if (event.key === 'Tab') {\n event.preventDefault();\n }\n };\n\n /// DOM ///\n\n render() {\n const btnProps = this.toggleButtonProps;\n\n return (\n <click-elsewhere\n class={this.open ? 'dropdown-open' : ''}\n onChange={this.onClickElsewhere}\n test-id=\"dropdownContainer\"\n >\n <q2-btn\n ref={el => (this.controlElement = el)}\n class={btnProps.className}\n onClick={this.onToggleClick}\n onKeyDown={this.onToggleKeydown}\n fab={btnProps.fab}\n intent={btnProps.intent}\n active={btnProps.active}\n disabled={btnProps.disabled}\n ariaExpanded={`${!!btnProps.ariaExpanded}`}\n label={this.hideLabel && this.label ? loc(this.label) : undefined}\n hideLabel={this.hideLabel}\n ariaHasPopup=\"menu\"\n test-id=\"dropdownButton\"\n block={this.block}\n description={loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount])}\n >\n {this.hasCustomButton ? (\n <div\n test-id=\"dropdownCustom\"\n class={btnProps.custom ? '' : 'hidden'}\n >\n <slot name=\"custom-dropdown-button\" />\n </div>\n ) : (\n <Fragment>\n {this.icon ? <q2-icon type={this.icon} /> : ' '}\n {this.label && !this.hideLabel && (\n <span class=\"dropdown-button-text\">{loc(this.label)}</span>\n )}\n </Fragment>\n )}\n </q2-btn>\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.controlElement}\n open={this.open}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n block={this.block}\n >\n <div\n onClick={this.onDropdownMenuClick}\n onKeyDown={this.onDropdownMenuKeydown}\n >\n <slot />\n {this.open && (\n <q2-btn\n class=\"sr close-dropdown\"\n onFocus={this.closeDropdown}\n />\n )}\n </div>\n </q2-popover>\n </click-elsewhere>\n );\n }\n}\n"],"version":3}
1
+ {"file":"q2-dropdown.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,s1BAAs1B,CAAC;AAC72B,yBAAe,aAAa;;MCWf,UAAU;;;QAyFnB,yBAAoB,GAAW,mDAAmD,CAAC;;QAiLnF,gBAAW,GAAG;YACV,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,aAAa,CAAoB,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;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,SAAS,KAC1B,YAAM,KAAK,EAAC,sBAAsB,IAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAQ,CAC9D,CACM,CACd,CACI,EACT,mEACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAChC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAChC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,IAEjB,4DACI,OAAO,EAAE,IAAI,CAAC,mBAAmB,EACjC,SAAS,EAAE,IAAI,CAAC,qBAAqB,IAErC,8DAAQ,EACP,IAAI,CAAC,IAAI,KACN,+DACI,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,IAAI,CAAC,aAAa,GAC7B,CACL,CACC,CACG,CACC,EACpB;KACL;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-dropdown/q2-dropdown.scss?tag=q2-dropdown&encapsulation=shadow","src/components/q2-dropdown/q2-dropdown.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-flex;\n}\n\n:host([block]) {\n display: block;\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n\nq2-popover {\n --tct-popover-min-width: #{var-list(var-prefixer(dropdown-width))};\n}\n","import { Component, ComponentInterface, Prop, Element, Watch, h, Fragment, Listen } from '@stencil/core';\nimport { IDict } from 'src/util';\nimport {\n handleAriaLabel,\n handleRenamedProp,\n isEventFromElement,\n loc,\n overrideFocus,\n waitForNextPaint,\n} from 'src/utils';\n\n@Component({ tag: 'q2-dropdown', shadow: true, styleUrl: 'q2-dropdown.scss' })\nexport class Q2Dropdown implements ComponentInterface {\n @Prop({ reflect: true }) additionalContext: string;\n\n /** If `true`, component expands to fill the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /**\n * Tells the outlet what the type of object being passed in as contextValue.\n * This will allow for the hierarchy resolution logic to work to determine if an option should or should not be shown.\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) context: string;\n\n /**\n * Passes important information to the outlet (e.g., pass an account id that your platform can use to look up what module to show for that account type).\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) contextValue: string;\n\n /** Indicates the menu cannot be focused or interacted with. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /** The icon that will render within the toggle button. You may use any of the `q2-icon` types. */\n @Prop({ reflect: true }) icon: string;\n\n /**\n * The text that appears within the button.\n * @warning\n * This property should not be used if the `type` is `icon`.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /**\n * Identifies this menu as an outlet. Used in conjunction with context and, optionally, `contextValue`.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) name: string;\n\n /** Determine whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /**\n * Force the direction of the popover dropdown when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ mutable: true }) popoverDirection: 'up' | 'down';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true }) popoverAlignment: 'left' | 'right' = 'left'; // being used in dropdown.scss\n\n /** @deprecated */\n @Prop() popoverMinHeight: number = 150;\n\n /**\n * Use with `context` to tell the outlet where it appears. It will be matched with the appropriately configured module for that context.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) resolvedType: string;\n\n /** The type of button used as the menu toggle. */\n @Prop({ reflect: true }) type: 'icon' | 'fab' | 'custom' | 'primary' | 'secondary' | 'neutral' = 'icon';\n\n /** @deprecated */\n @Prop({ reflect: true }) alignment: 'left' | 'right';\n\n /** @deprecated */\n @Prop({ reflect: true }) popDirection: 'up' | 'down';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n privatePopDirection: 'down' | 'up';\n controlElement?: HTMLQ2BtnElement;\n popoverElement?: HTMLQ2PopoverElement;\n dropdownItemSelector: string = 'q2-dropdown-item:not([disabled]):not([separator])';\n\n resolveMenu() {\n return (\n this.name &&\n window.TectonElements &&\n window.TectonElements.resolveMenu(this.name, this.contextValue, this.resolvedType, this.additionalContext)\n );\n }\n\n orchestrateResolvedMenuItems() {\n if (!this.name || !this.context) {\n // this is only for contextual menu outlets\n this.removeResolvedElements();\n return;\n }\n\n this.resolveMenuItemElements()\n .then(data => {\n this.removeResolvedElements();\n data.forEach(element => {\n this.hostElement.appendChild(element);\n });\n })\n .catch(err => {\n this.removeResolvedElements();\n throw err;\n });\n }\n\n removeResolvedElements() {\n const resolvedElements = this.hostElement.querySelectorAll('q2-dropdown-item.resolved-menu-item');\n resolvedElements.forEach(element => this.hostElement.removeChild(element));\n }\n\n resolveMenuItemElements() {\n return this.resolveMenu().then(datas => {\n return datas.map(menuItemData => {\n let onClickFn;\n let queryParams;\n if (menuItemData['tct-ctxid']) {\n queryParams = {};\n queryParams[menuItemData.contextIdParamName] = menuItemData['tct-ctxid'];\n }\n\n switch (menuItemData.action) {\n case 'navigateTo':\n onClickFn = () =>\n this.navigateTo(menuItemData.featureName, menuItemData.moduleName, queryParams);\n break;\n case 'showOverpanel':\n onClickFn = () =>\n this.showOverpanel(`${menuItemData.featureName}.${menuItemData.moduleName}`, queryParams);\n break;\n }\n\n const newDropdownItem = document.createElement('q2-dropdown-item');\n newDropdownItem.setAttribute('value', menuItemData.itemLabel);\n newDropdownItem.classList.add('resolved-menu-item');\n newDropdownItem.innerHTML = menuItemData.itemLabel;\n newDropdownItem.onclick = onClickFn;\n\n return newDropdownItem;\n });\n });\n }\n\n navigateTo(featureName: string, moduleName?: string, queryParams?: IDict<string>) {\n return window.TectonElements?.navigateTo?.(featureName, moduleName, queryParams);\n }\n\n showOverpanel(overpanelPath: string, params: IDict<string>) {\n return window.TectonElements?.showOverpanel?.(overpanelPath, params, undefined, true);\n }\n\n get hasCustomButton() {\n return !!this.hostElement.querySelector('[slot=custom-dropdown-button]');\n }\n\n get determineDropdownItemCount() {\n return this.hostElement.querySelectorAll(this.dropdownItemSelector).length;\n }\n\n get toggleButtonProps() {\n const allowedIntents = ['primary', 'secondary', 'neutral'];\n const allowedTypes = ['icon', 'fab', 'custom', ...allowedIntents];\n const type = allowedTypes.includes(this.type) ? this.type : '';\n const icon = type === 'icon';\n const fab = type === 'fab';\n const custom = type === 'custom';\n let intent;\n if (allowedIntents.includes(type)) {\n intent = type === 'neutral' ? type : `workflow-${type}`;\n }\n const active = this.open;\n const disabled = !!this.disabled;\n const ariaExpanded = this.open;\n const className = !icon && !fab && !intent ? 'unstyled' : '';\n\n return {\n icon,\n fab,\n intent,\n active,\n disabled,\n ariaExpanded,\n className,\n custom,\n };\n }\n\n //////// Observers //////////\n @Watch('popDirection')\n popDirectionHandler() {\n handleRenamedProp(this, 'popDirection', 'popoverDirection');\n }\n\n @Watch('alignment')\n alignmentHandler() {\n handleRenamedProp(this, 'alignment', 'popoverAlignment');\n }\n\n @Watch('ariaLabel')\n ariaLabelHandler() {\n handleAriaLabel(this);\n }\n\n @Watch('name')\n nameHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('context')\n contextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('contextValue')\n contextValueHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('resolvedType')\n resolvedTypeHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('additionalContext')\n additionalContextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.focusToggle();\n }\n\n @Listen('popoverStateChanged')\n popoverStateHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n this.popoverElement?.scrollContainerTo({ top: 0 });\n }\n\n ///// Lifecycle Hooks ////////\n componentWillLoad() {\n this.popDirectionHandler();\n this.alignmentHandler();\n this.ariaLabelHandler();\n }\n\n componentDidLoad() {\n this.orchestrateResolvedMenuItems();\n overrideFocus(this.hostElement);\n }\n\n ///// Actions ////////\n focusToggle = () => {\n this.controlElement.shadowRoot.querySelector<HTMLButtonElement>('button').focus();\n };\n\n openDropdown = () => {\n if (this.open) return;\n this.open = true;\n };\n\n closeDropdown = () => {\n if (!this.open) return;\n this.open = false;\n };\n\n onClickElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLClickElsewhereElement;\n if (target.localName === 'click-elsewhere') {\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n }\n };\n\n onToggleClick = () => {\n if (this.open) {\n this.closeDropdown();\n } else {\n this.openDropdown();\n }\n };\n\n onToggleKeydown = (event: KeyboardEvent) => {\n if (['ArrowUp', 'Up'].includes(event.key)) {\n event.preventDefault();\n this.openDropdown();\n this.focusLastItem();\n return;\n }\n\n if (['ArrowDown', 'Down'].includes(event.key)) {\n event.preventDefault();\n this.openDropdown();\n this.focusFirstItem();\n return;\n }\n\n if (['Escape', 'Esc'].includes(event.key)) {\n event.preventDefault();\n this.focusToggle();\n this.closeDropdown();\n return;\n }\n };\n\n onDropdownMenuClick = async (event: MouseEvent | CustomEvent) => {\n if ((event.target as HTMLElement).localName !== 'q2-dropdown-item') {\n return;\n }\n const item = event.target as HTMLQ2DropdownItemElement;\n if (!item.disabled && !item.separator) {\n this.closeDropdown();\n await waitForNextPaint();\n this.focusToggle();\n }\n };\n\n focusFirstItem() {\n const firstItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:first-child`\n );\n\n firstItem?.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusLastItem() {\n const lastItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:last-child`\n );\n lastItem?.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusAdjacentItem(activeItem: HTMLQ2DropdownItemElement, direction: 'next' | 'prev') {\n const dropdownItems: HTMLQ2DropdownItemElement[] = Array.from(\n this.hostElement.querySelectorAll(this.dropdownItemSelector)\n );\n\n const activeIndex = dropdownItems.indexOf(activeItem);\n\n if (activeIndex === -1) {\n return;\n }\n\n let targetIndex: number = 0;\n if (direction === 'next') {\n targetIndex = activeIndex < dropdownItems.length - 1 ? activeIndex + 1 : 0;\n } else if (direction === 'prev') {\n if (activeIndex > 0) {\n targetIndex = activeIndex - 1;\n } else {\n targetIndex = dropdownItems.length - 1;\n }\n }\n const targetItem = dropdownItems[targetIndex];\n targetItem && targetItem.dispatchEvent(new Event('focus'));\n }\n\n onDropdownMenuKeydown = (event: KeyboardEvent) => {\n if (['Escape', 'Esc'].includes(event.key)) {\n this.closeDropdown();\n this.focusToggle();\n return;\n }\n\n if ((event.target as HTMLElement).localName !== 'q2-dropdown-item') {\n return;\n }\n\n const item = event.target as HTMLQ2DropdownItemElement;\n if (['ArrowUp', 'Up'].includes(event.key)) {\n event.preventDefault();\n this.focusAdjacentItem(item, 'prev');\n return;\n }\n\n if (['ArrowDown', 'Down'].includes(event.key)) {\n event.preventDefault();\n this.focusAdjacentItem(item, 'next');\n return;\n }\n if (event.key === 'Tab') {\n event.preventDefault();\n }\n };\n\n /// DOM ///\n\n render() {\n const btnProps = this.toggleButtonProps;\n\n return (\n <click-elsewhere\n class={this.open ? 'dropdown-open' : ''}\n onChange={this.onClickElsewhere}\n test-id=\"dropdownContainer\"\n >\n <q2-btn\n ref={el => (this.controlElement = el)}\n class={btnProps.className}\n onClick={this.onToggleClick}\n onKeyDown={this.onToggleKeydown}\n fab={btnProps.fab}\n intent={btnProps.intent}\n active={btnProps.active}\n disabled={btnProps.disabled}\n ariaExpanded={`${!!btnProps.ariaExpanded}`}\n label={this.hideLabel && this.label ? loc(this.label) : undefined}\n hideLabel={this.hideLabel}\n ariaHasPopup=\"menu\"\n test-id=\"dropdownButton\"\n block={this.block}\n description={loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount])}\n >\n {this.hasCustomButton ? (\n <div\n test-id=\"dropdownCustom\"\n class={btnProps.custom ? '' : 'hidden'}\n >\n <slot name=\"custom-dropdown-button\" />\n </div>\n ) : (\n <Fragment>\n {this.icon ? <q2-icon type={this.icon} /> : ' '}\n {this.label && !this.hideLabel && (\n <span class=\"dropdown-button-text\">{loc(this.label)}</span>\n )}\n </Fragment>\n )}\n </q2-btn>\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.controlElement}\n open={this.open}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n block={this.block}\n >\n <div\n onClick={this.onDropdownMenuClick}\n onKeyDown={this.onDropdownMenuKeydown}\n >\n <slot />\n {this.open && (\n <q2-btn\n class=\"sr close-dropdown\"\n onFocus={this.closeDropdown}\n />\n )}\n </div>\n </q2-popover>\n </click-elsewhere>\n );\n }\n}\n"],"version":3}
@@ -1,2 +1,2 @@
1
- import{r as t,c as o,g as i,h as e}from"./p-8013d83b.js";import{q as r,w as s}from"./p-38dda948.js";const n=class{constructor(i){t(this,i);this.change=o(this,"change",7);this.mouseEventList=["mousedown","dragstart","touchstart"];this.isCurrentlyFocused=false;this.mouseHandler=t=>{const o=this.shadowContains(this.findActiveElement());const i=this.shadowContains(this.shadowEventTarget(t))||this.originatesInSlots(t.target);if(!i&&(this.isCurrentlyFocused||o)){this.isCurrentlyFocused=false;this.change.emit();return}this.isCurrentlyFocused=i||o};this.windowBlurHandler=()=>{const t=this.findActiveElement();if(t===document.body&&this.isCurrentlyFocused||t!==document.body&&(t===null||t===void 0?void 0:t.tagName)==="IFRAME"){this.isCurrentlyFocused=false;this.change.emit();return}}}componentWillLoad(){}connectedCallback(){this.mouseEventList.forEach((t=>{document.addEventListener(t,this.mouseHandler)}));window.addEventListener("blur",this.windowBlurHandler)}disconnectedCallback(){this.mouseEventList.forEach((t=>{document.removeEventListener(t,this.mouseHandler)}));window.removeEventListener("blur",this.windowBlurHandler)}findActiveElement(){let t=document.activeElement;while(true){if(!t||!t.shadowRoot){return t}t=t.shadowRoot.activeElement}}shadowEventTarget(t){return t.composedPath()[0]||t.target}shadowContains(t){while(true){if(t===this.hostElement){return true}if(!t){return false}t=t.parentNode||t.host}}originatesInSlots(t){const o=this.hostElement.querySelectorAll("slot");for(const i of Array.from(o)){const o=i&&i.assignedNodes&&i.assignedNodes()||this.hostElement.childNodes;for(const i of Array.from(o)){if(i.contains(t)){return true}}}return false}get hostElement(){return i(this)}};const a="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{display:none}.show{display:block;position:fixed;z-index:var(--tct-popover-z-index, 50);margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:host([block]) .show{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:host([align=left]) .show{left:var(--comp-pop-left);right:unset}:host([align=right]) .show{right:var(--comp-pop-right);left:unset}.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}.show.up{top:unset;bottom:var(--comp-pop-bottom)}.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";const c=a;const h=class{constructor(i){t(this,i);this.popoverStateChanged=o(this,"popoverStateChanged",7);this.displayBuffer=10;this.orientationChanged=false;this.handleMinHeight=()=>{if(this.minHeight){r(this,"minHeight","prop")}};this.viewPortChanged=()=>{if(!this.open)return;this.determinePopDirection()};this.viewPortOrientationChanged=()=>{this.orientationChanged=true;this.viewPortChanged()};this.setCSSProperties=async()=>{var t;const{controlElement:o,containerElement:i,currentDirection:e}=this;const{top:r,bottom:n,left:a,right:c}=(t=o===null||o===void 0?void 0:o.getBoundingClientRect())!==null&&t!==void 0?t:{top:0,bottom:0,left:0,right:0};const h=a;const p=window.visualViewport.width-c;if(this.block)i.style.setProperty("--comp-pop-width",`${o.offsetWidth}px`);i.style.setProperty("--comp-pop-left",`${h}px`);i.style.setProperty("--comp-pop-right",`${p}px`);if(e==="up"){i.style.setProperty("--comp-pop-bottom",`${window.visualViewport.height-r}px`)}if(e==="down"){i.style.setProperty("--comp-pop-top",`${n}px`)}await s();i.style.setProperty("--comp-pop-opacity","1")};this.direction=undefined;this.align=undefined;this.open=undefined;this.block=undefined;this.controlElement=undefined;this.minHeight=undefined;this.currentDirection=undefined;this.show=false}componentDidLoad(){this.handleMinHeight();if(this.open)this.determinePopDirection()}disconnectedCallback(){this.removeViewportListeners()}async toggle(){this.open=!this.open}async scrollContainerTo(t){this.containerElement.scrollTo(t)}async openChanged(t){this.popoverStateChanged.emit({open:t});if(t){this.addViewportListeners();this.determinePopDirection()}else{this.removeViewportListeners();this.currentDirection=undefined;this.show=false;await s();this.clearCSSProperties()}}minHeightProvided(){this.handleMinHeight()}popoverStateHandler(t){const{detail:{open:o}}=t;if(o===this.open)return;this.open=o;t.stopPropagation()}addViewportListeners(){var t;window.visualViewport.addEventListener("resize",this.viewPortChanged);window.addEventListener("scroll",this.viewPortChanged,{passive:true,capture:true});(t=screen===null||screen===void 0?void 0:screen.orientation)===null||t===void 0?void 0:t.addEventListener("change",this.viewPortOrientationChanged);window.addEventListener("orientationchange",this.viewPortOrientationChanged)}removeViewportListeners(){var t;window.visualViewport.removeEventListener("resize",this.viewPortChanged);window.removeEventListener("scroll",this.viewPortChanged);(t=screen===null||screen===void 0?void 0:screen.orientation)===null||t===void 0?void 0:t.removeEventListener("orientationchange",this.viewPortOrientationChanged);window.removeEventListener("orientationchange",this.viewPortOrientationChanged)}clearCSSProperties(){this.containerElement.style.removeProperty("--comp-pop-max-height");this.containerElement.style.removeProperty("--comp-pop-top");this.containerElement.style.removeProperty("--comp-pop-bottom");this.containerElement.style.removeProperty("--comp-pop-left");this.containerElement.style.removeProperty("--comp-pop-right");this.containerElement.style.removeProperty("--comp-pop-width");this.containerElement.style.removeProperty("--comp-pop-opacity")}setDirectionAndShow(t){this.currentDirection=t;this.show=true;this.setCSSProperties()}get isModule(){var t,o;const i=window!==window.top;const e=Object.keys((o=(t=window.Tecton)===null||t===void 0?void 0:t.platformDimensions)!==null&&o!==void 0?o:{}).length>0;return i&&e}async determinePopDirection(){var t,o;const{containerElement:i,controlElement:e,direction:r,displayBuffer:n}=this;if(i)i.style.maxHeight=null;await s();const{isModule:a}=this;const{top:c,bottom:h}=(t=e===null||e===void 0?void 0:e.getBoundingClientRect())!==null&&t!==void 0?t:{top:0,bottom:0};let p;let d;let l;if(a){const t=(o=window.Tecton)===null||o===void 0?void 0:o.platformDimensions;const i=window.visualViewport.height-h;const e=t.innerHeight-(t.outletOffset+h);const r=i<e;p=t.innerHeight;d=(t.outletOffset>0?c:c+t.outletOffset)-n;l=r?i-n:e-n}else{p=window.visualViewport.height;d=c-n;l=p-h-n}const u=d>l?"up":"down";const b=!i.style.getPropertyValue("--comp-pop-max-height")||this.orientationChanged;this.orientationChanged=false;const f=this.currentDirection||r||u;switch(f){case"up":if(b){i.style.setProperty("--comp-pop-max-height",`${d}px`)}this.setDirectionAndShow("up");break;case"down":if(b){i.style.setProperty("--comp-pop-max-height",`${l}px`)}this.setDirectionAndShow("down");break}}render(){const t=["container",this.currentDirection];if(this.show)t.push("show");return e("div",{key:"179a87663bfec9e6b0ef2c4fe52ff5ff630afdef",ref:t=>this.containerElement=t,class:t.join(" "),"test-id":"outerContainer"},e("div",{key:"e1996c9d159bcbb1f94c7beeb82b7f6b0ec9ac80",ref:t=>this.contentElement=t,class:"content"},e("slot",{key:"255dfed2e0bee4d46676c2bdb5e590faf8535e51"})))}get hostElement(){return i(this)}static get watchers(){return{open:["openChanged"],minHeight:["minHeightProvided"]}}};h.style=c;export{n as click_elsewhere,h as q2_popover};
2
- //# sourceMappingURL=p-b0541d38.entry.js.map
1
+ import{r as t,c as o,g as i,h as r}from"./p-8013d83b.js";import{q as e,w as s}from"./p-38dda948.js";const n=class{constructor(i){t(this,i);this.change=o(this,"change",7);this.mouseEventList=["mousedown","dragstart","touchstart"];this.isCurrentlyFocused=false;this.mouseHandler=t=>{const o=this.shadowContains(this.findActiveElement());const i=this.shadowContains(this.shadowEventTarget(t))||this.originatesInSlots(t.target);if(!i&&(this.isCurrentlyFocused||o)){this.isCurrentlyFocused=false;this.change.emit();return}this.isCurrentlyFocused=i||o};this.windowBlurHandler=()=>{const t=this.findActiveElement();if(t===document.body&&this.isCurrentlyFocused||t!==document.body&&(t===null||t===void 0?void 0:t.tagName)==="IFRAME"){this.isCurrentlyFocused=false;this.change.emit();return}}}componentWillLoad(){}connectedCallback(){this.mouseEventList.forEach((t=>{document.addEventListener(t,this.mouseHandler)}));window.addEventListener("blur",this.windowBlurHandler)}disconnectedCallback(){this.mouseEventList.forEach((t=>{document.removeEventListener(t,this.mouseHandler)}));window.removeEventListener("blur",this.windowBlurHandler)}findActiveElement(){let t=document.activeElement;while(true){if(!t||!t.shadowRoot){return t}t=t.shadowRoot.activeElement}}shadowEventTarget(t){return t.composedPath()[0]||t.target}shadowContains(t){while(true){if(t===this.hostElement){return true}if(!t){return false}t=t.parentNode||t.host}}originatesInSlots(t){const o=this.hostElement.querySelectorAll("slot");for(const i of Array.from(o)){const o=i&&i.assignedNodes&&i.assignedNodes()||this.hostElement.childNodes;for(const i of Array.from(o)){if(i.contains(t)){return true}}}return false}get hostElement(){return i(this)}};const a="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{display:none}.show{display:block;position:fixed;z-index:var(--tct-popover-z-index, 50);margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:host([block]) .show{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:host([align=left]) .show{left:var(--comp-pop-left);right:unset}:host([align=right]) .show{right:var(--comp-pop-right);left:unset}.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}.show.up{top:unset;bottom:var(--comp-pop-bottom)}.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";const c=a;const h=class{constructor(i){t(this,i);this.popoverStateChanged=o(this,"popoverStateChanged",7);this.displayBuffer=10;this.orientationChanged=false;this.handleMinHeight=()=>{if(this.minHeight){e(this,"minHeight","prop")}};this.viewPortChanged=()=>{if(!this.open)return;this.determinePopDirection()};this.viewPortOrientationChanged=()=>{this.orientationChanged=true;this.viewPortChanged()};this.setCSSProperties=async()=>{var t;const{controlElement:o,containerElement:i,currentDirection:r}=this;const{top:e,bottom:n,left:a,right:c}=(t=o===null||o===void 0?void 0:o.getBoundingClientRect())!==null&&t!==void 0?t:{top:0,bottom:0,left:0,right:0};const h=a;const p=window.visualViewport.width-c;if(this.block)i.style.setProperty("--comp-pop-width",`${o.offsetWidth}px`);i.style.setProperty("--comp-pop-left",`${h}px`);i.style.setProperty("--comp-pop-right",`${p}px`);if(r==="up"){i.style.setProperty("--comp-pop-bottom",`${window.visualViewport.height-e}px`)}if(r==="down"){i.style.setProperty("--comp-pop-top",`${n}px`)}await s();i.style.setProperty("--comp-pop-opacity","1")};this.direction=undefined;this.align=undefined;this.open=undefined;this.block=undefined;this.controlElement=undefined;this.minHeight=undefined;this.currentDirection=undefined;this.show=false}componentDidLoad(){this.handleMinHeight();if(this.open)this.determinePopDirection()}disconnectedCallback(){this.removeViewportListeners()}async toggle(){this.open=!this.open}async scrollContainerTo(t){this.containerElement.scrollTo(t)}async openChanged(t){this.popoverStateChanged.emit({open:t});if(t){this.addViewportListeners();this.determinePopDirection()}else{this.removeViewportListeners();this.currentDirection=undefined;this.show=false;await s();this.clearCSSProperties()}}minHeightProvided(){this.handleMinHeight()}popoverStateHandler(t){const{detail:{open:o}}=t;if(o===this.open)return;this.open=o;t.stopPropagation()}addViewportListeners(){var t;window.visualViewport.addEventListener("resize",this.viewPortChanged);window.addEventListener("scroll",this.viewPortChanged,{passive:true,capture:true});(t=screen===null||screen===void 0?void 0:screen.orientation)===null||t===void 0?void 0:t.addEventListener("change",this.viewPortOrientationChanged);window.addEventListener("orientationchange",this.viewPortOrientationChanged)}removeViewportListeners(){var t;window.visualViewport.removeEventListener("resize",this.viewPortChanged);window.removeEventListener("scroll",this.viewPortChanged);(t=screen===null||screen===void 0?void 0:screen.orientation)===null||t===void 0?void 0:t.removeEventListener("orientationchange",this.viewPortOrientationChanged);window.removeEventListener("orientationchange",this.viewPortOrientationChanged)}clearCSSProperties(){this.containerElement.style.removeProperty("--comp-pop-max-height");this.containerElement.style.removeProperty("--comp-pop-top");this.containerElement.style.removeProperty("--comp-pop-bottom");this.containerElement.style.removeProperty("--comp-pop-left");this.containerElement.style.removeProperty("--comp-pop-right");this.containerElement.style.removeProperty("--comp-pop-width");this.containerElement.style.removeProperty("--comp-pop-opacity")}setDirectionAndShow(t){const o=this.open;if(!o)return;this.currentDirection=t;this.show=true;this.setCSSProperties()}get isModule(){var t,o;const i=window!==window.top;const r=Object.keys((o=(t=window.Tecton)===null||t===void 0?void 0:t.platformDimensions)!==null&&o!==void 0?o:{}).length>0;return i&&r}async determinePopDirection(){var t,o;const{containerElement:i,controlElement:r,direction:e,displayBuffer:n}=this;if(i)i.style.maxHeight=null;await s();const{isModule:a}=this;const{top:c,bottom:h}=(t=r===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&t!==void 0?t:{top:0,bottom:0};let p;let d;let l;if(a){const t=(o=window.Tecton)===null||o===void 0?void 0:o.platformDimensions;const i=window.visualViewport.height-h;const r=t.innerHeight-(t.outletOffset+h);const e=i<r;p=t.innerHeight;d=(t.outletOffset>0?c:c+t.outletOffset)-n;l=e?i-n:r-n}else{p=window.visualViewport.height;d=c-n;l=p-h-n}const u=d>l?"up":"down";const v=!i.style.getPropertyValue("--comp-pop-max-height")||this.orientationChanged;this.orientationChanged=false;const w=this.currentDirection||e||u;switch(w){case"up":if(v){i.style.setProperty("--comp-pop-max-height",`${d}px`)}this.setDirectionAndShow("up");break;case"down":if(v){i.style.setProperty("--comp-pop-max-height",`${l}px`)}this.setDirectionAndShow("down");break}}render(){const t=["container",this.currentDirection];if(this.show)t.push("show");return r("div",{key:"f166b27ef0f22dd06cdec5cf62b4a86a5c2dbcdf",ref:t=>this.containerElement=t,class:t.join(" "),"test-id":"outerContainer"},r("div",{key:"6c6d0fae093241aaad13d440ddc6cbc68d8a360b",ref:t=>this.contentElement=t,class:"content"},r("slot",{key:"c9654350c545ea9a4d8691f265c95961915b2fbd"})))}get hostElement(){return i(this)}static get watchers(){return{open:["openChanged"],minHeight:["minHeightProvided"]}}};h.style=c;export{n as click_elsewhere,h as q2_popover};
2
+ //# sourceMappingURL=p-0b715d39.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ClickElsewhere","constructor","hostRef","this","mouseEventList","isCurrentlyFocused","mouseHandler","event","shadowContains","findActiveElement","aboutToBeFocused","shadowEventTarget","originatesInSlots","target","change","emit","windowBlurHandler","activeElement","document","body","tagName","componentWillLoad","connectedCallback","forEach","eventName","addEventListener","window","disconnectedCallback","removeEventListener","workingElement","shadowRoot","composedPath","child","hostElement","parentNode","host","slots","querySelectorAll","currentSlot","Array","from","lightNodes","assignedNodes","childNodes","currentNode","contains","q2PopoverCss","Q2PopoverStyle0","Q2Popover","displayBuffer","orientationChanged","handleMinHeight","minHeight","handleDeprecationWarning","viewPortChanged","open","determinePopDirection","viewPortOrientationChanged","setCSSProperties","async","controlElement","containerElement","currentDirection","top","controlTop","bottom","controlBottom","left","controlLeft","right","controlRight","_a","getBoundingClientRect","popoverLeft","popoverRight","visualViewport","width","block","style","setProperty","offsetWidth","height","waitForNextPaint","undefined","componentDidLoad","removeViewportListeners","toggle","scrollContainerTo","options","scrollTo","openChanged","popoverStateChanged","addViewportListeners","show","clearCSSProperties","minHeightProvided","popoverStateHandler","detail","stopPropagation","passive","capture","screen","orientation","removeProperty","setDirectionAndShow","direction","isOpen","isModule","isIframe","hasPlatformDimensions","Object","keys","_b","Tecton","platformDimensions","length","maxHeight","windowHeight","maxSpaceAbove","maxSpaceBelow","distanceToIframeBottom","viewableSpaceBelow","innerHeight","outletOffset","isIframeShorterThanWindow","directionWithMostSpace","shouldUpdateMaxHeight","getPropertyValue","currentOrDetermineDirection","render","containerClasses","push","h","key","ref","el","class","join","contentElement"],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n isCurrentlyFocused: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event() change: EventEmitter;\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n\n child = child.parentNode || child.host;\n }\n }\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n windowBlurHandler = (): void => {\n const activeElement = this.findActiveElement();\n if (\n (activeElement === document.body && this.isCurrentlyFocused) || // clicked parent frame\n (activeElement !== document.body && activeElement?.tagName === 'IFRAME') // clicked child frame\n ) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n };\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote('0 2px 4px rgba(0, 0, 0, 0.3)'));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true }) direction: 'up' | 'down';\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true }) align: 'left' | 'right';\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop() controlElement: HTMLElement;\n\n /** @deprecated */\n @Prop() minHeight: number;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event() popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n @State() currentDirection: 'down' | 'up' = undefined;\n // remove `show` when Popover API is supported in iOS\n @State() show: boolean = false;\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n\n /// Lifecycle hooks ///\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n /// Methods ///\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n /// Watchers ///\n @Watch('open')\n async openChanged(open: boolean) {\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n /// Listeners ///\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n /// Helpers ///\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n addViewportListeners() {\n window.visualViewport.addEventListener('resize', this.viewPortChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n // #endregion\n }\n\n removeViewportListeners() {\n window.visualViewport.removeEventListener('resize', this.viewPortChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n // #endregion\n }\n\n setCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window.visualViewport.width - controlRight;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight}px`);\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.visualViewport.height - controlTop}px`);\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n setDirectionAndShow(direction: 'up' | 'down') {\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n this.setCSSProperties();\n }\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, direction, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const platformDimensions = window.Tecton?.platformDimensions;\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow =\n platformDimensions.innerHeight - (platformDimensions.outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = platformDimensions.innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove =\n (platformDimensions.outletOffset > 0 ? controlTop : controlTop + platformDimensions.outletOffset) -\n displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || direction || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// DOM ///\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"mappings":"0GAMaA,EAAc,MAJ3B,WAAAC,CAAAC,G,yCAQIC,KAAAC,eAA2B,CAAC,YAAa,YAAa,cACtDD,KAAAE,mBAA8B,MA6E9BF,KAAAG,aAAgBC,IACZ,MAAMF,EAAqBF,KAAKK,eAAeL,KAAKM,qBACpD,MAAMC,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as a}from"./p-38dda948.js";const l="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-flex}:host([block]){display:block}click-elsewhere{position:relative;display:block}q2-popover{--tct-popover-min-width:var(--tct-dropdown-width, var(--t-dropdown-width))}";const c=l;const u=class{constructor(e){t(this,e);this.dropdownItemSelector="q2-dropdown-item:not([disabled]):not([separator])";this.focusToggle=()=>{this.controlElement.shadowRoot.querySelector("button").focus()};this.openDropdown=()=>{if(this.open)return;this.open=true};this.closeDropdown=()=>{if(!this.open)return;this.open=false};this.onClickElsewhere=t=>{const e=t.target;if(e.localName==="click-elsewhere"){t.stopPropagation();const{popoverElement:e}=this;if(!e)return;e.open=false}};this.onToggleClick=()=>{if(this.open){this.closeDropdown()}else{this.openDropdown()}};this.onToggleKeydown=t=>{if(["ArrowUp","Up"].includes(t.key)){t.preventDefault();this.openDropdown();this.focusLastItem();return}if(["ArrowDown","Down"].includes(t.key)){t.preventDefault();this.openDropdown();this.focusFirstItem();return}if(["Escape","Esc"].includes(t.key)){t.preventDefault();this.focusToggle();this.closeDropdown();return}};this.onDropdownMenuClick=async t=>{if(t.target.localName!=="q2-dropdown-item"){return}const e=t.target;if(!e.disabled&&!e.separator){this.closeDropdown();await s();this.focusToggle()}};this.onDropdownMenuKeydown=t=>{if(["Escape","Esc"].includes(t.key)){this.closeDropdown();this.focusToggle();return}if(t.target.localName!=="q2-dropdown-item"){return}const e=t.target;if(["ArrowUp","Up"].includes(t.key)){t.preventDefault();this.focusAdjacentItem(e,"prev");return}if(["ArrowDown","Down"].includes(t.key)){t.preventDefault();this.focusAdjacentItem(e,"next");return}if(t.key==="Tab"){t.preventDefault()}};this.additionalContext=undefined;this.block=undefined;this.context=undefined;this.contextValue=undefined;this.disabled=undefined;this.hideLabel=undefined;this.icon=undefined;this.label=undefined;this.name=undefined;this.open=undefined;this.popoverDirection=undefined;this.popoverAlignment="left";this.popoverMinHeight=150;this.resolvedType=undefined;this.type="icon";this.alignment=undefined;this.popDirection=undefined;this.ariaLabel=undefined}resolveMenu(){return this.name&&window.TectonElements&&window.TectonElements.resolveMenu(this.name,this.contextValue,this.resolvedType,this.additionalContext)}orchestrateResolvedMenuItems(){if(!this.name||!this.context){this.removeResolvedElements();return}this.resolveMenuItemElements().then((t=>{this.removeResolvedElements();t.forEach((t=>{this.hostElement.appendChild(t)}))})).catch((t=>{this.removeResolvedElements();throw t}))}removeResolvedElements(){const t=this.hostElement.querySelectorAll("q2-dropdown-item.resolved-menu-item");t.forEach((t=>this.hostElement.removeChild(t)))}resolveMenuItemElements(){return this.resolveMenu().then((t=>t.map((t=>{let e;let i;if(t["tct-ctxid"]){i={};i[t.contextIdParamName]=t["tct-ctxid"]}switch(t.action){case"navigateTo":e=()=>this.navigateTo(t.featureName,t.moduleName,i);break;case"showOverpanel":e=()=>this.showOverpanel(`${t.featureName}.${t.moduleName}`,i);break}const n=document.createElement("q2-dropdown-item");n.setAttribute("value",t.itemLabel);n.classList.add("resolved-menu-item");n.innerHTML=t.itemLabel;n.onclick=e;return n}))))}navigateTo(t,e,i){var n,s;return(s=(n=window.TectonElements)===null||n===void 0?void 0:n.navigateTo)===null||s===void 0?void 0:s.call(n,t,e,i)}showOverpanel(t,e){var i,n;return(n=(i=window.TectonElements)===null||i===void 0?void 0:i.showOverpanel)===null||n===void 0?void 0:n.call(i,t,e,undefined,true)}get hasCustomButton(){return!!this.hostElement.querySelector("[slot=custom-dropdown-button]")}get determineDropdownItemCount(){return this.hostElement.querySelectorAll(this.dropdownItemSelector).length}get toggleButtonProps(){const t=["primary","secondary","neutral"];const e=["icon","fab","custom",...t];const i=e.includes(this.type)?this.type:"";const n=i==="icon";const s=i==="fab";const o=i==="custom";let r;if(t.includes(i)){r=i==="neutral"?i:`workflow-${i}`}const d=this.open;const h=!!this.disabled;const a=this.open;const l=!n&&!s&&!r?"unstyled":"";return{icon:n,fab:s,intent:r,active:d,disabled:h,ariaExpanded:a,className:l,custom:o}}popDirectionHandler(){o(this,"popDirection","popoverDirection")}alignmentHandler(){o(this,"alignment","popoverAlignment")}ariaLabelHandler(){r(this)}nameHandler(){this.orchestrateResolvedMenuItems()}contextHandler(){this.orchestrateResolvedMenuItems()}contextValueHandler(){this.orchestrateResolvedMenuItems()}resolvedTypeHandler(){this.orchestrateResolvedMenuItems()}additionalContextHandler(){this.orchestrateResolvedMenuItems()}delegateFocus(t){if(!d(t,this.hostElement))return;this.focusToggle()}popoverStateHandler({detail:{open:t}}){var e;if(this.open!==t)this.open=t;(e=this.popoverElement)===null||e===void 0?void 0:e.scrollContainerTo({top:0})}componentWillLoad(){this.popDirectionHandler();this.alignmentHandler();this.ariaLabelHandler()}componentDidLoad(){this.orchestrateResolvedMenuItems();h(this.hostElement)}focusFirstItem(){const t=this.hostElement.querySelector(`${this.dropdownItemSelector}:first-child`);t===null||t===void 0?void 0:t.dispatchEvent(new FocusEvent("focus"))}focusLastItem(){const t=this.hostElement.querySelector(`${this.dropdownItemSelector}:last-child`);t===null||t===void 0?void 0:t.dispatchEvent(new FocusEvent("focus"))}focusAdjacentItem(t,e){const i=Array.from(this.hostElement.querySelectorAll(this.dropdownItemSelector));const n=i.indexOf(t);if(n===-1){return}let s=0;if(e==="next"){s=n<i.length-1?n+1:0}else if(e==="prev"){if(n>0){s=n-1}else{s=i.length-1}}const o=i[s];o&&o.dispatchEvent(new Event("focus"))}render(){const t=this.toggleButtonProps;return e("click-elsewhere",{key:"0c11f21a4a10e67045909c02074b1bdf647f82e4",class:this.open?"dropdown-open":"",onChange:this.onClickElsewhere,"test-id":"dropdownContainer"},e("q2-btn",{key:"2849dbdeb3d50ad1f76a16134c0528f27591ff2a",ref:t=>this.controlElement=t,class:t.className,onClick:this.onToggleClick,onKeyDown:this.onToggleKeydown,fab:t.fab,intent:t.intent,active:t.active,disabled:t.disabled,ariaExpanded:`${!!t.ariaExpanded}`,label:this.hideLabel&&this.label?a(this.label):undefined,hideLabel:this.hideLabel,ariaHasPopup:"menu","test-id":"dropdownButton",block:this.block,description:a("tecton.element.dropdown.itemCount",[this.determineDropdownItemCount])},this.hasCustomButton?e("div",{"test-id":"dropdownCustom",class:t.custom?"":"hidden"},e("slot",{name:"custom-dropdown-button"})):e(i,null,this.icon?e("q2-icon",{type:this.icon}):" ",this.label&&!this.hideLabel&&e("span",{class:"dropdown-button-text"},a(this.label)))),e("q2-popover",{key:"445eb5a0221757d40b28cd33ff365d07462c2fcd",ref:t=>this.popoverElement=t,controlElement:this.controlElement,open:this.open,minHeight:this.popoverMinHeight,direction:this.popoverDirection,align:this.popoverAlignment,block:this.block},e("div",{key:"129f4938bdbe29fc6165fb79e6d419b82c8bc388",onClick:this.onDropdownMenuClick,onKeyDown:this.onDropdownMenuKeydown},e("slot",{key:"d39e2a0ee1f3f1c9cfc1d36f4473bbf0be153834"}),this.open&&e("q2-btn",{key:"0fd75e7ff87fc18b802a1fd406625b16221e25e1",class:"sr close-dropdown",onFocus:this.closeDropdown}))))}get hostElement(){return n(this)}static get watchers(){return{popDirection:["popDirectionHandler"],alignment:["alignmentHandler"],ariaLabel:["ariaLabelHandler"],name:["nameHandler"],context:["contextHandler"],contextValue:["contextValueHandler"],resolvedType:["resolvedTypeHandler"],additionalContext:["additionalContextHandler"]}}};u.style=c;export{u as q2_dropdown};
2
+ //# sourceMappingURL=p-560794fa.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["q2DropdownCss","Q2DropdownStyle0","Q2Dropdown","this","dropdownItemSelector","focusToggle","controlElement","shadowRoot","querySelector","focus","openDropdown","open","closeDropdown","onClickElsewhere","event","target","localName","stopPropagation","popoverElement","onToggleClick","onToggleKeydown","includes","key","preventDefault","focusLastItem","focusFirstItem","onDropdownMenuClick","async","item","disabled","separator","waitForNextPaint","onDropdownMenuKeydown","focusAdjacentItem","resolveMenu","name","window","TectonElements","contextValue","resolvedType","additionalContext","orchestrateResolvedMenuItems","context","removeResolvedElements","resolveMenuItemElements","then","data","forEach","element","hostElement","appendChild","catch","err","resolvedElements","querySelectorAll","removeChild","datas","map","menuItemData","onClickFn","queryParams","contextIdParamName","action","navigateTo","featureName","moduleName","showOverpanel","newDropdownItem","document","createElement","setAttribute","itemLabel","classList","add","innerHTML","onclick","_b","_a","call","overpanelPath","params","undefined","hasCustomButton","determineDropdownItemCount","length","toggleButtonProps","allowedIntents","allowedTypes","type","icon","fab","custom","intent","active","ariaExpanded","className","popDirectionHandler","handleRenamedProp","alignmentHandler","ariaLabelHandler","handleAriaLabel","nameHandler","contextHandler","contextValueHandler","resolvedTypeHandler","additionalContextHandler","delegateFocus","isEventFromElement","popoverStateHandler","detail","scrollContainerTo","top","componentWillLoad","componentDidLoad","overrideFocus","firstItem","dispatchEvent","FocusEvent","lastItem","activeItem","direction","dropdownItems","Array","from","activeIndex","indexOf","targetIndex","targetItem","Event","render","btnProps","h","class","onChange","ref","el","onClick","onKeyDown","label","hideLabel","loc","ariaHasPopup","block","description","Fragment","minHeight","popoverMinHeight","popoverDirection","align","popoverAlignment","onFocus"],"sources":["src/components/q2-dropdown/q2-dropdown.scss?tag=q2-dropdown&encapsulation=shadow","src/components/q2-dropdown/q2-dropdown.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-flex;\n}\n\n:host([block]) {\n display: block;\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n\nq2-popover {\n --tct-popover-min-width: #{var-list(var-prefixer(dropdown-width))};\n}\n","import { Component, ComponentInterface, Prop, Element, Watch, h, Fragment, Listen } from '@stencil/core';\nimport { IDict } from 'src/util';\nimport {\n handleAriaLabel,\n handleRenamedProp,\n isEventFromElement,\n loc,\n overrideFocus,\n waitForNextPaint,\n} from 'src/utils';\n\n@Component({ tag: 'q2-dropdown', shadow: true, styleUrl: 'q2-dropdown.scss' })\nexport class Q2Dropdown implements ComponentInterface {\n @Prop({ reflect: true }) additionalContext: string;\n\n /** If `true`, component expands to fill the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /**\n * Tells the outlet what the type of object being passed in as contextValue.\n * This will allow for the hierarchy resolution logic to work to determine if an option should or should not be shown.\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) context: string;\n\n /**\n * Passes important information to the outlet (e.g., pass an account id that your platform can use to look up what module to show for that account type).\n *\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) contextValue: string;\n\n /** Indicates the menu cannot be focused or interacted with. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /** The icon that will render within the toggle button. You may use any of the `q2-icon` types. */\n @Prop({ reflect: true }) icon: string;\n\n /**\n * The text that appears within the button.\n * @warning\n * This property should not be used if the `type` is `icon`.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /**\n * Identifies this menu as an outlet. Used in conjunction with context and, optionally, `contextValue`.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) name: string;\n\n /** Determine whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /**\n * Force the direction of the popover dropdown when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ mutable: true }) popoverDirection: 'up' | 'down';\n\n /** Aligns the popover dropdown to the left or right side of the input field. */\n @Prop({ mutable: true }) popoverAlignment: 'left' | 'right' = 'left'; // being used in dropdown.scss\n\n /** @deprecated */\n @Prop() popoverMinHeight: number = 150;\n\n /**\n * Use with `context` to tell the outlet where it appears. It will be matched with the appropriately configured module for that context.\n * @info\n * Only applicable when using `<q2-dropdown>` for outlets.\n */\n @Prop({ reflect: true }) resolvedType: string;\n\n /** The type of button used as the menu toggle. */\n @Prop({ reflect: true }) type: 'icon' | 'fab' | 'custom' | 'primary' | 'secondary' | 'neutral' = 'icon';\n\n /** @deprecated */\n @Prop({ reflect: true }) alignment: 'left' | 'right';\n\n /** @deprecated */\n @Prop({ reflect: true }) popDirection: 'up' | 'down';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n privatePopDirection: 'down' | 'up';\n controlElement?: HTMLQ2BtnElement;\n popoverElement?: HTMLQ2PopoverElement;\n dropdownItemSelector: string = 'q2-dropdown-item:not([disabled]):not([separator])';\n\n resolveMenu() {\n return (\n this.name &&\n window.TectonElements &&\n window.TectonElements.resolveMenu(this.name, this.contextValue, this.resolvedType, this.additionalContext)\n );\n }\n\n orchestrateResolvedMenuItems() {\n if (!this.name || !this.context) {\n // this is only for contextual menu outlets\n this.removeResolvedElements();\n return;\n }\n\n this.resolveMenuItemElements()\n .then(data => {\n this.removeResolvedElements();\n data.forEach(element => {\n this.hostElement.appendChild(element);\n });\n })\n .catch(err => {\n this.removeResolvedElements();\n throw err;\n });\n }\n\n removeResolvedElements() {\n const resolvedElements = this.hostElement.querySelectorAll('q2-dropdown-item.resolved-menu-item');\n resolvedElements.forEach(element => this.hostElement.removeChild(element));\n }\n\n resolveMenuItemElements() {\n return this.resolveMenu().then(datas => {\n return datas.map(menuItemData => {\n let onClickFn;\n let queryParams;\n if (menuItemData['tct-ctxid']) {\n queryParams = {};\n queryParams[menuItemData.contextIdParamName] = menuItemData['tct-ctxid'];\n }\n\n switch (menuItemData.action) {\n case 'navigateTo':\n onClickFn = () =>\n this.navigateTo(menuItemData.featureName, menuItemData.moduleName, queryParams);\n break;\n case 'showOverpanel':\n onClickFn = () =>\n this.showOverpanel(`${menuItemData.featureName}.${menuItemData.moduleName}`, queryParams);\n break;\n }\n\n const newDropdownItem = document.createElement('q2-dropdown-item');\n newDropdownItem.setAttribute('value', menuItemData.itemLabel);\n newDropdownItem.classList.add('resolved-menu-item');\n newDropdownItem.innerHTML = menuItemData.itemLabel;\n newDropdownItem.onclick = onClickFn;\n\n return newDropdownItem;\n });\n });\n }\n\n navigateTo(featureName: string, moduleName?: string, queryParams?: IDict<string>) {\n return window.TectonElements?.navigateTo?.(featureName, moduleName, queryParams);\n }\n\n showOverpanel(overpanelPath: string, params: IDict<string>) {\n return window.TectonElements?.showOverpanel?.(overpanelPath, params, undefined, true);\n }\n\n get hasCustomButton() {\n return !!this.hostElement.querySelector('[slot=custom-dropdown-button]');\n }\n\n get determineDropdownItemCount() {\n return this.hostElement.querySelectorAll(this.dropdownItemSelector).length;\n }\n\n get toggleButtonProps() {\n const allowedIntents = ['primary', 'secondary', 'neutral'];\n const allowedTypes = ['icon', 'fab', 'custom', ...allowedIntents];\n const type = allowedTypes.includes(this.type) ? this.type : '';\n const icon = type === 'icon';\n const fab = type === 'fab';\n const custom = type === 'custom';\n let intent;\n if (allowedIntents.includes(type)) {\n intent = type === 'neutral' ? type : `workflow-${type}`;\n }\n const active = this.open;\n const disabled = !!this.disabled;\n const ariaExpanded = this.open;\n const className = !icon && !fab && !intent ? 'unstyled' : '';\n\n return {\n icon,\n fab,\n intent,\n active,\n disabled,\n ariaExpanded,\n className,\n custom,\n };\n }\n\n //////// Observers //////////\n @Watch('popDirection')\n popDirectionHandler() {\n handleRenamedProp(this, 'popDirection', 'popoverDirection');\n }\n\n @Watch('alignment')\n alignmentHandler() {\n handleRenamedProp(this, 'alignment', 'popoverAlignment');\n }\n\n @Watch('ariaLabel')\n ariaLabelHandler() {\n handleAriaLabel(this);\n }\n\n @Watch('name')\n nameHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('context')\n contextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('contextValue')\n contextValueHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('resolvedType')\n resolvedTypeHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Watch('additionalContext')\n additionalContextHandler() {\n this.orchestrateResolvedMenuItems();\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.focusToggle();\n }\n\n @Listen('popoverStateChanged')\n popoverStateHandler({ detail: { open } }: CustomEvent<{ open: boolean }>) {\n if (this.open !== open) this.open = open;\n this.popoverElement?.scrollContainerTo({ top: 0 });\n }\n\n ///// Lifecycle Hooks ////////\n componentWillLoad() {\n this.popDirectionHandler();\n this.alignmentHandler();\n this.ariaLabelHandler();\n }\n\n componentDidLoad() {\n this.orchestrateResolvedMenuItems();\n overrideFocus(this.hostElement);\n }\n\n ///// Actions ////////\n focusToggle = () => {\n this.controlElement.shadowRoot.querySelector<HTMLButtonElement>('button').focus();\n };\n\n openDropdown = () => {\n if (this.open) return;\n this.open = true;\n };\n\n closeDropdown = () => {\n if (!this.open) return;\n this.open = false;\n };\n\n onClickElsewhere = (event: CustomEvent) => {\n const target = event.target as HTMLClickElsewhereElement;\n if (target.localName === 'click-elsewhere') {\n event.stopPropagation();\n const { popoverElement } = this;\n if (!popoverElement) return;\n popoverElement.open = false;\n }\n };\n\n onToggleClick = () => {\n if (this.open) {\n this.closeDropdown();\n } else {\n this.openDropdown();\n }\n };\n\n onToggleKeydown = (event: KeyboardEvent) => {\n if (['ArrowUp', 'Up'].includes(event.key)) {\n event.preventDefault();\n this.openDropdown();\n this.focusLastItem();\n return;\n }\n\n if (['ArrowDown', 'Down'].includes(event.key)) {\n event.preventDefault();\n this.openDropdown();\n this.focusFirstItem();\n return;\n }\n\n if (['Escape', 'Esc'].includes(event.key)) {\n event.preventDefault();\n this.focusToggle();\n this.closeDropdown();\n return;\n }\n };\n\n onDropdownMenuClick = async (event: MouseEvent | CustomEvent) => {\n if ((event.target as HTMLElement).localName !== 'q2-dropdown-item') {\n return;\n }\n const item = event.target as HTMLQ2DropdownItemElement;\n if (!item.disabled && !item.separator) {\n this.closeDropdown();\n await waitForNextPaint();\n this.focusToggle();\n }\n };\n\n focusFirstItem() {\n const firstItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:first-child`\n );\n\n firstItem?.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusLastItem() {\n const lastItem = this.hostElement.querySelector<HTMLQ2DropdownItemElement>(\n `${this.dropdownItemSelector}:last-child`\n );\n lastItem?.dispatchEvent(new FocusEvent('focus'));\n }\n\n focusAdjacentItem(activeItem: HTMLQ2DropdownItemElement, direction: 'next' | 'prev') {\n const dropdownItems: HTMLQ2DropdownItemElement[] = Array.from(\n this.hostElement.querySelectorAll(this.dropdownItemSelector)\n );\n\n const activeIndex = dropdownItems.indexOf(activeItem);\n\n if (activeIndex === -1) {\n return;\n }\n\n let targetIndex: number = 0;\n if (direction === 'next') {\n targetIndex = activeIndex < dropdownItems.length - 1 ? activeIndex + 1 : 0;\n } else if (direction === 'prev') {\n if (activeIndex > 0) {\n targetIndex = activeIndex - 1;\n } else {\n targetIndex = dropdownItems.length - 1;\n }\n }\n const targetItem = dropdownItems[targetIndex];\n targetItem && targetItem.dispatchEvent(new Event('focus'));\n }\n\n onDropdownMenuKeydown = (event: KeyboardEvent) => {\n if (['Escape', 'Esc'].includes(event.key)) {\n this.closeDropdown();\n this.focusToggle();\n return;\n }\n\n if ((event.target as HTMLElement).localName !== 'q2-dropdown-item') {\n return;\n }\n\n const item = event.target as HTMLQ2DropdownItemElement;\n if (['ArrowUp', 'Up'].includes(event.key)) {\n event.preventDefault();\n this.focusAdjacentItem(item, 'prev');\n return;\n }\n\n if (['ArrowDown', 'Down'].includes(event.key)) {\n event.preventDefault();\n this.focusAdjacentItem(item, 'next');\n return;\n }\n if (event.key === 'Tab') {\n event.preventDefault();\n }\n };\n\n /// DOM ///\n\n render() {\n const btnProps = this.toggleButtonProps;\n\n return (\n <click-elsewhere\n class={this.open ? 'dropdown-open' : ''}\n onChange={this.onClickElsewhere}\n test-id=\"dropdownContainer\"\n >\n <q2-btn\n ref={el => (this.controlElement = el)}\n class={btnProps.className}\n onClick={this.onToggleClick}\n onKeyDown={this.onToggleKeydown}\n fab={btnProps.fab}\n intent={btnProps.intent}\n active={btnProps.active}\n disabled={btnProps.disabled}\n ariaExpanded={`${!!btnProps.ariaExpanded}`}\n label={this.hideLabel && this.label ? loc(this.label) : undefined}\n hideLabel={this.hideLabel}\n ariaHasPopup=\"menu\"\n test-id=\"dropdownButton\"\n block={this.block}\n description={loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount])}\n >\n {this.hasCustomButton ? (\n <div\n test-id=\"dropdownCustom\"\n class={btnProps.custom ? '' : 'hidden'}\n >\n <slot name=\"custom-dropdown-button\" />\n </div>\n ) : (\n <Fragment>\n {this.icon ? <q2-icon type={this.icon} /> : ' '}\n {this.label && !this.hideLabel && (\n <span class=\"dropdown-button-text\">{loc(this.label)}</span>\n )}\n </Fragment>\n )}\n </q2-btn>\n <q2-popover\n ref={el => (this.popoverElement = el)}\n controlElement={this.controlElement}\n open={this.open}\n minHeight={this.popoverMinHeight}\n direction={this.popoverDirection}\n align={this.popoverAlignment}\n block={this.block}\n >\n <div\n onClick={this.onDropdownMenuClick}\n onKeyDown={this.onDropdownMenuKeydown}\n >\n <slot />\n {this.open && (\n <q2-btn\n class=\"sr close-dropdown\"\n onFocus={this.closeDropdown}\n />\n )}\n </div>\n </q2-popover>\n </click-elsewhere>\n );\n }\n}\n"],"mappings":"gIAAA,MAAMA,EAAgB,u1BACtB,MAAAC,EAAeD,E,MCWFE,EAAU,M,yBAyFnBC,KAAAC,qBAA+B,oDAiL/BD,KAAAE,YAAc,KACVF,KAAKG,eAAeC,WAAWC,cAAi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ACIkH,QAASrI,KAAKuB,oBACd+G,UAAWtI,KAAK6B,uBAEhBmG,EAAA,QAAA7G,IAAA,6CACCnB,KAAKQ,MACFwH,EAAA,UAAA7G,IAAA,2CACI8G,MAAM,oBACNkB,QAASnJ,KAAKS,kB"}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-8013d83b.js";export{s as setNonce}from"./p-8013d83b.js";import{g as t}from"./p-e1255160.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-6e562633",[[1,"q2-calendar",{"assume":[513],"calendarLabel":[513,"calendar-label"],"clearable":[516],"cutoffTime":[513,"cutoff-time"],"daysOfWeekChecksum":[514,"days-of-week-checksum"],"disabled":[516],"disabledMsg":[513,"disabled-msg"],"disclaimer":[513],"displayFormat":[513,"display-format"],"endDate":[513,"end-date"],"errors":[1040],"hideLabel":[1540,"hide-label"],"hints":[1040],"invalid":[1540],"invalidDates":[16],"label":[1537],"open":[1540],"optional":[516],"placeholder":[513],"popoverAlignment":[1,"popover-alignment"],"popoverDirection":[1025,"popover-direction"],"popoverMinHeight":[2,"popover-min-height"],"readonly":[516],"startDate":[513,"start-date"],"typeable":[516],"validDates":[16],"value":[1537],"popDirection":[513,"pop-direction"],"onsuccess":[16],"buttonLabel":[513,"button-label"],"ariaLabel":[1537,"aria-label"],"keyboardSelection":[32],"typedValue":[32],"dateList":[32],"hintMessage":[32],"hintMessageType":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"typeValue":[64]},[[0,"change","defaultChangeHandler"],[0,"error","defaultErrorHandler"],[0,"success","defaultSuccessHandler"],[0,"focus","delegateFocus"],[0,"clear","handleClear"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"ariaLabel":["ariaLabelObserver"],"typeable":["typeableChanged"],"value":["valueObserver"],"daysOfWeekChecksum":["daysOfWeekChecksumObserver"],"validDates":["validDatesObserver"],"invalidDates":["invalidDatesObserver"],"startDate":["startDateObserver"],"endDate":["endDateObserver"],"cutoffTime":["cutoffTimeObserver"]}]]],["p-292535d1",[[1,"q2-select",{"disabled":[516],"errors":[16],"hideLabel":[1540,"hide-label"],"hoist":[4],"invalid":[516],"label":[1537],"listLabel":[1,"list-label"],"minRows":[2,"min-rows"],"multilineOptions":[516,"multiline-options"],"multiple":[516],"optional":[516],"placeholder":[513],"popDirection":[513,"pop-direction"],"readonly":[516],"searchable":[516],"selectedOptions":[1040],"value":[1025],"ariaLabel":[1537,"aria-label"],"open":[32],"showSelected":[32],"searchText":[32],"hasCustomDisplay":[32],"hasPopoverTop":[32],"hasPopoverBottom":[32],"inputFocused":[32],"statusMessage":[32],"prioritizeSearch":[32],"structuredSelectedOptions":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"searchOptions":[64]},[[0,"keydown","keydownHandler"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"],[0,"focus","delegateFocus"],[0,"focusout","handleFocusout"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["buildStructuredSelectedOptions","valueUpdated"],"selectedOptions":["buildStructuredSelectedOptions"],"ariaLabel":["ariaLabelObserver"],"multilineOptions":["handleMultilineOptionsUpdate"],"open":["openChanged"]}]]],["p-c1eef9d9",[[1,"q2-action-sheet",{"data":[1040],"title":[1],"hideClose":[4,"hide-close"],"isScrollable":[32],"renderStatus":[32],"hide":[64],"show":[64]}]]],["p-15ee9779",[[1,"q2-dropdown",{"additionalContext":[513,"additional-context"],"block":[516],"context":[513],"contextValue":[513,"context-value"],"disabled":[516],"hideLabel":[1540,"hide-label"],"icon":[513],"label":[1537],"name":[513],"open":[1540],"popoverDirection":[1025,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"resolvedType":[513,"resolved-type"],"type":[513],"alignment":[513],"popDirection":[513,"pop-direction"],"ariaLabel":[1537,"aria-label"]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"alignment":["alignmentHandler"],"ariaLabel":["ariaLabelHandler"],"name":["nameHandler"],"context":["contextHandler"],"contextValue":["contextValueHandler"],"resolvedType":["resolvedTypeHandler"],"additionalContext":["additionalContextHandler"]}]]],["p-c72747dd",[[1,"q2-data-table",{"bordered":[1540],"clickable":[1540],"caption":[1025],"density":[1537],"headers":[1040],"hideCaption":[1540,"hide-caption"],"hideClickable":[1028,"hide-clickable"],"loading":[1540],"rows":[1040],"selectable":[1540],"selectMode":[1025,"select-mode"],"shadowed":[1540],"serializedHeaders":[32],"serializedRows":[32],"hasExpandableRows":[32],"hasDropdowns":[32],"allRowsSelected":[32],"someRowsSelected":[32],"checkSlotCount":[32]},[[0,"click","onClickListener"],[0,"selectAllRows","onSelectAllRows"]],{"headers":["headersHandler"],"rows":["rowsHandler"],"selectable":["selectableHandler"]}]]],["p-1c2cdfa0",[[1,"q2-editable-field",{"block":[516],"disabled":[516],"editing":[1540],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hints":[16],"label":[1537],"maxlength":[514],"persistentLabel":[516,"persistent-label"],"truncated":[516],"type":[513],"value":[1537],"ariaLabel":[1537,"aria-label"],"formattedValue":[32],"clickEdit":[64],"clickCancel":[64],"clickSave":[64],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"]],{"errors":["errorsObserver"],"ariaLabel":["ariaLabelObserver"],"editing":["observesEditing"]}]]],["p-5f97da6c",[[1,"q2-pagination",{"autoSize":[1540,"auto-size"],"total":[514],"page":[1538],"pages":[1538],"pagesOnly":[1540,"pages-only"],"perPage":[2,"per-page"],"recordsOnly":[1540,"records-only"],"recordType":[1,"record-type"],"isSmall":[32]},[[0,"focus","onHostElementFocus"]],{"recordsOnly":["manageResizeObserver"],"pagesOnly":["manageResizeObserver"],"autoSize":["manageResizeObserver"]}]]],["p-83c5c885",[[1,"q2-pill",{"active":[1540],"disabled":[516],"hoist":[4],"label":[513],"maxLength":[514,"max-length"],"multiple":[516],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"selectedOptions":[1040],"theme":[513],"value":[1537],"optionCount":[32],"selectedOptionElements":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["valueChanged"],"selectedOptions":["selectedOptionsChanged"]}]]],["p-fc728a2d",[[1,"q2-tab-container",{"color":[513],"name":[513],"noPrint":[516,"no-print"],"type":[513],"value":[1537],"hasLeft":[32],"hasRight":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32],"tabs":[32]},[[0,"change","defaultChangeHandler"],[9,"resize","onResize"],[0,"focus","onFocus"],[0,"badge","onBadge"]],{"value":["valueObserver"],"name":["nameObserver"]}]]],["p-32b4930a",[[1,"q2-tag",{"hoist":[4],"label":[513],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"theme":[513],"optionCount":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]]]]],["p-88ee6e1e",[[4,"q2-carousel",{"autoPlay":[516,"auto-play"],"fullWidthPanes":[516,"full-width-panes"],"hidePagination":[516,"hide-pagination"],"label":[513],"showNavigationArrows":[516,"show-navigation-arrows"],"index":[1538],"ariaLabel":[513,"aria-label"],"universalCarouselOptions":[32],"fullWidthDisplayOptions":[32],"activePaneIndex":[32],"applyFocus":[32],"applyPaginationFocus":[32],"autoPlayInProgress":[32],"compactMode":[32],"carouselWrapperWidth":[32],"ariaLiveValue":[32],"currentPaneCount":[32]},[[0,"change","onHostElementChange"],[0,"clickCarouselPane","carouselPaneClicked"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"carouselWrapperWidth":["carouselWrapperWidthChanged"],"index":["indexChanged"],"fullWidthPanes":["revampCarousel"],"compactMode":["revampCarousel"],"autoPlay":["revampCarousel"]}]]],["p-ce453e6f",[[1,"q2-month-picker",{"year":[1538],"disabledMonths":[16],"today":[1],"selectedIndex":[32],"focusedIndex":[32],"showYearLayer":[32]}]]],["p-13642096",[[1,"q2-section",{"collapsible":[516],"expanded":[1540],"label":[513],"noCollapseIcon":[516,"no-collapse-icon"],"contentHeight":[32],"hideContent":[32],"hasYieldedHeader":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"expanded":["expandedObserver"],"collapsible":["collapsibleObserver"]}]]],["p-cd5d3a66",[[1,"q2-stepper",{"currentStep":[1538,"current-step"],"stepCount":[1026,"step-count"],"lastEnabledStep":[1026,"last-enabled-step"],"contentChangeTriggerCount":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"],[0,"contentChange","contentChangeHandler"]],{"currentStep":["currentStepChanged"]}]]],["p-f6ecac88",[[1,"q2-card",{"avatarIcon":[513,"avatar-icon"],"avatarInitials":[513,"avatar-initials"],"avatarName":[513,"avatar-name"],"avatarSrc":[513,"avatar-src"],"bar":[513],"description":[513],"isSmall":[516,"is-small"],"isStatic":[516,"is-static"],"isTouch":[516,"is-touch"],"target":[513],"title":[513],"type":[513],"url":[513],"isAutoTouch":[32],"isAutoSmall":[32]},[[0,"focus","onHostElementFocus"]]]]],["p-4f389d8b",[[1,"q2-chart-donut",{"data":[16],"chartName":[513,"chart-name"],"format":[513],"hoverScaleSize":[2,"hover-scale-size"],"isClickable":[516,"is-clickable"],"innerRadius":[1025,"inner-radius"],"minSliceSize":[1,"min-slice-size"],"outerRadius":[1025,"outer-radius"],"selectedId":[1025,"selected-id"],"selectedOffset":[2,"selected-offset"],"summaryIcon":[513,"summary-icon"],"summaryName":[513,"summary-name"],"hoveredId":[32],"selectById":[64],"selectByIndex":[64],"clearSelection":[64],"getChartOptions":[64]},[[0,"focus","delegateFocus"]],{"chartName":["propsUpdates"],"innerRadius":["propsUpdates","innerRadiusUpdated"],"outerRadius":["propsUpdates","outerRadiusUpdated"],"minSliceSize":["propsUpdates"],"hoverScaleSize":["propsUpdates"],"selectedOffset":["propsUpdates"],"data":["propsUpdates","dataUpdated"],"selectedId":["checkSelectedId"]}]]],["p-56ff02fb",[[1,"q2-checkbox-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"optional":[516],"readonly":[516],"value":[1040],"setValue":[64]},[[0,"change","onHostElementChange"]],{"value":["valueObserver"],"disabled":["disabledObserver"],"readonly":["readonlyObserver"]}]]],["p-23b685f5",[[1,"q2-radio-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"name":[513],"optional":[516],"readonly":[516],"tileAlignment":[513,"tile-alignment"],"tileLayout":[1540,"tile-layout"],"value":[1025],"tilelayout":[1540],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"],[0,"keydown","keydownHandler"]],{"value":["valueUpdated"],"name":["nameUpdated"],"disabled":["disabledUpdated"],"readonly":["readonlyUpdated"],"tilelayout":["handleDeprecatedTilelayout"],"tileLayout":["tileLayoutUpdated"]}]]],["p-a43c372f",[[1,"q2-stepper-vertical",{"currentStepId":[1537,"current-step-id"],"structuredPanes":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"]],{"currentStepId":["currentStepChanged"]}]]],["p-177106de",[[1,"q2-textarea",{"cols":[514],"disabled":[516],"errors":[16],"hints":[16],"hideLabel":[516,"hide-label"],"hideMessages":[516,"hide-messages"],"label":[513],"maxlength":[1538],"optional":[516],"placeholder":[513],"readonly":[516],"resize":[513],"rows":[514],"spellcheck":[516],"value":[1025],"hasFocus":[32],"downParams":[32],"setValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"]],{"value":["valueObserver"],"rows":["rowsObserver"],"cols":["colsObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-8c9d0966",[[4,"q2-carousel-pane",{"index":[2],"siblingCount":[2,"sibling-count"],"isActivePane":[516,"is-active-pane"],"label":[513]},null,{"isActivePane":["determineDisabledContent"]}]]],["p-e796e5a8",[[1,"q2-chart-area",{"data":[16],"alignChartName":[513,"align-chart-name"],"areaColor":[513,"area-color"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"gridLines":[513,"grid-lines"],"hideNameAxisLabels":[516,"hide-name-axis-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"lineColor":[513,"line-color"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"pointerLineColor":[513,"pointer-line-color"],"pointerLineStyle":[513,"pointer-line-style"],"showChartName":[516,"show-chart-name"],"showDatapointLabels":[516,"show-datapoint-labels"],"showGradient":[516,"show-gradient"]},null,{"data":["propsUpdates"],"alignChartName":["propsUpdates"],"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"lineColor":["propsUpdates"],"pointerLineColor":["propsUpdates"],"pointerLineStyle":["propsUpdates"],"areaColor":["propsUpdates"],"dataNamesOverflow":["propsUpdates"],"dataNamesWidth":["propsUpdates"],"format":["propsUpdates"],"formatModifier":["propsUpdates"],"hideNameAxisLabels":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"offsetDataNames":["propsUpdates"],"offsetDataValues":["propsUpdates"],"showChartName":["propsUpdates"],"showDatapointLabels":["propsUpdates"],"showGradient":["propsUpdates"],"gridLines":["propsUpdates"]}]]],["p-871d387c",[[1,"q2-chart-bar",{"data":[16],"alignChartName":[513,"align-chart-name"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"color":[513],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"hideBarLabels":[516,"hide-bar-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"orientation":[513],"showChartName":[516,"show-chart-name"],"sort":[516]},null,{"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"color":["propsUpdates"],"hideBarLabels":["propsUpdates"],"showChartName":["propsUpdates"],"alignChartName":["propsUpdates"],"orientation":["propsUpdates"],"format":["propsUpdates"],"sort":["propsUpdates"],"data":["propsUpdates"],"offsetDataNames":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"formatModifier":["propsUpdates"],"dataNamesOverflow":["propsUpdates"]}]]],["p-56f1c39b",[[0,"q2-loading-element",{"shape":[513],"width":[513],"height":[513],"borderRadius":[513,"border-radius"]}]]],["p-ce7868a2",[[1,"q2-loc",{"substitutions":[16],"value":[513]}]]],["p-5e53dd08",[[1,"q2-radio",{"checked":[1540],"disabled":[516],"hideLabel":[1540,"hide-label"],"label":[1537],"readonly":[516],"value":[513],"tabIndex":[2,"tab-index"],"name":[513],"groupDisabled":[4,"group-disabled"],"groupReadonly":[4,"group-readonly"],"groupTileLayout":[4,"group-tile-layout"],"ariaLabel":[1537,"aria-label"]},[[0,"click","onHostClick"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"checked":["checkedObserver"]}]]],["p-1c004d79",[[1,"q2-relative-time",{"baseDate":[513,"base-date"],"locale":[513],"messageFormat":[513,"message-format"],"numericOnly":[516,"numeric-only"],"sync":[1540],"date":[513],"unit":[513],"displayedMessage":[32],"displayedMessageValue":[64]},null,{"sync":["syncUpdated"],"messageFormat":["updateMessage"],"locale":["updateMessage"],"date":["updateMessage"],"baseDate":["updateMessage"],"numericOnly":["updateMessage"],"unit":["updateMessage"]}]]],["p-95edb04b",[[1,"q2-stepper-pane",{"description":[513],"isActive":[516,"is-active"],"label":[513],"showWithChildren":[516,"show-with-children"],"status":[513],"isChildActive":[32]},[[0,"activeChange","checkForActiveChildren"]],{"label":["labelOrDescriptionChanged"],"description":["labelOrDescriptionChanged"],"status":["statusChanged"],"isActive":["isActiveChanged"],"showWithChildren":["checkForActiveChildren"]}]]],["p-db29fd63",[[1,"q2-tab-pane",{"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeStatus":[513,"badge-status"],"badgeTheme":[513,"badge-theme"],"label":[513],"value":[513],"name":[513],"selected":[516],"index":[2],"guid":[2]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"]}]]],["p-a2c34e90",[[1,"q2-tooltip",{"block":[516],"focusable":[516],"immediate":[516],"label":[513],"multiline":[516],"persistent":[516],"position":[513],"focusClass":[32]},[[0,"keyup","keyUpHandler"],[2,"focus","focusCaptureHandler"],[0,"focus","focusHandler"],[0,"focusout","focusOutHandler"]]]]],["p-e11fe671",[[1,"tecton-tab-pane",{"value":[513],"label":[513],"name":[513],"selected":[516],"index":[2],"guid":[2],"provided":[516],"url":[513],"moduleId":[513,"module-id"],"minHeight":[513,"min-height"],"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeTheme":[513,"badge-theme"],"badgeStatus":[513,"badge-status"],"authPayload":[16],"showForm":[4,"show-form"],"_showForm":[32]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"],"selected":["selectedObserver"]}]]],["p-cc2901ae",[[1,"q2-icon",{"inline":[516],"label":[513],"type":[513]},null,{"type":["customIconHandler"]}]]],["p-b159ec91",[[1,"q2-dropdown-item",{"disabled":[516],"label":[1537],"removable":[516],"separator":[516],"value":[513],"ariaLabel":[1537,"aria-label"]},[[0,"focus","onHostElementFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-c929f062",[[1,"q2-avatar",{"icon":[1],"initials":[513],"name":[513],"src":[513],"badSrc":[32],"isLoaded":[32]},null,{"src":["srcDidUpdate"]}]]],["p-7990796e",[[1,"q2-checkbox",{"alignment":[513],"checked":[1540],"description":[513],"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"indeterminate":[516],"label":[1537],"name":[513],"readonly":[516],"type":[513],"value":[513],"groupDisabled":[516,"group-disabled"],"ariaLabel":[1537,"aria-label"]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-53265e50",[[1,"q2-option",{"role":[513],"disabled":[516],"display":[1025],"value":[513],"disabledGroup":[516,"disabled-group"],"selected":[516],"multiline":[516],"active":[516],"_multiSelectHidden":[516,"_multiselecthidden"]}],[1,"q2-optgroup",{"disabled":[516],"label":[513],"hidden":[32]},null,{"disabled":["disabledWatcher"]}]]],["p-08981e14",[[1,"q2-message",{"appearance":[513],"description":[516],"type":[513],"presentToggle":[32],"present":[64]},[[0,"focus","delegateFocus"]]]]],["p-72112c28",[[1,"q2-input",{"autocapitalize":[513],"autocomplete":[513],"autocorrect":[513],"autofocus":[516],"badgeTheme":[513,"badge-theme"],"badgeValue":[513,"badge-value"],"clearable":[516],"current":[1],"disabled":[516],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hideMessages":[516,"hide-messages"],"hints":[16],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"label":[1537],"max":[514],"maxlength":[1538],"min":[514],"optional":[516],"placeholder":[513],"pseudo":[516],"readonly":[516],"role":[1],"showCount":[516,"show-count"],"showVisibilityToggle":[516,"show-visibility-toggle"],"step":[514],"textHidden":[1540,"text-hidden"],"type":[513],"value":[1025],"ariaControls":[1,"aria-controls"],"ariaOwns":[1,"aria-owns"],"ariaHaspopup":[1,"aria-haspopup"],"ariaExpanded":[1,"aria-expanded"],"ariaActivedescendant":[1,"aria-activedescendant"],"ariaLabel":[1537,"aria-label"],"formattedValueObject":[32],"hasFocus":[32],"isSmall":[32],"checkSlotCount":[32],"setValue":[64],"clearValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]],{"clearable":["manageClearableResizeObserver"],"ariaLabel":["ariaLabelObserver"],"value":["valueObserver"],"formattedValueObject":["formattedValueObjectObserver"],"type":["typeObserver"],"formatModifier":["formatModifierObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-324946ce",[[1,"q2-option-list",{"align":[513],"customSearch":[516,"custom-search"],"disabled":[516],"label":[1],"multiple":[516],"noSelect":[516,"no-select"],"selectedOptions":[1040],"showSelected":[1540,"show-selected"],"type":[1],"hasOptions":[32],"setDefaultActiveElement":[64],"setActiveElement":[64],"handleExternalKeydown":[64],"getContents":[64],"getOptions":[64]},[[0,"focus","delegateFocus"],[0,"click","handleClick"]],{"showSelected":["showSelectedUpdated"],"selectedOptions":["selectedOptionsUpdated"]}]]],["p-e6022136",[[1,"q2-badge",{"maxLength":[514,"max-length"],"size":[513],"status":[513],"theme":[513],"value":[514]}]]],["p-b0541d38",[[1,"q2-popover",{"direction":[513],"align":[513],"open":[1540],"block":[516],"controlElement":[16],"minHeight":[2,"min-height"],"currentDirection":[32],"show":[32],"toggle":[64],"scrollContainerTo":[64]},[[0,"popoverState","popoverStateHandler"]],{"open":["openChanged"],"minHeight":["minHeightProvided"]}],[0,"click-elsewhere"]]],["p-f10593d8",[[1,"q2-btn",{"ariaExpanded":[1,"aria-expanded"],"ariaHasPopup":[1,"aria-has-popup"],"ariaControls":[1,"aria-controls"],"ariaSelected":[1,"aria-selected"],"ariaPressed":[1,"aria-pressed"],"description":[1],"tabIndex":[2,"tab-index"],"active":[516],"badge":[516],"block":[516],"disabled":[516],"hideLabel":[1540,"hide-label"],"intent":[1537],"label":[1537],"loading":[516],"type":[513],"size":[513],"color":[1537],"fab":[516],"ariaLabel":[1537,"aria-label"],"iconPosition":[32]},[[2,"click","disable"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"size":["sizeObserver"]}],[1,"q2-loading",{"counts":[513],"inline":[516],"label":[1537],"modifiers":[513],"shape":[513],"type":[513],"ariaLabel":[1537,"aria-label"]},null,{"ariaLabel":["ariaLabelObserver"]}]]]]'),e)}));
1
+ import{p as e,b as a}from"./p-8013d83b.js";export{s as setNonce}from"./p-8013d83b.js";import{g as t}from"./p-e1255160.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-6e562633",[[1,"q2-calendar",{"assume":[513],"calendarLabel":[513,"calendar-label"],"clearable":[516],"cutoffTime":[513,"cutoff-time"],"daysOfWeekChecksum":[514,"days-of-week-checksum"],"disabled":[516],"disabledMsg":[513,"disabled-msg"],"disclaimer":[513],"displayFormat":[513,"display-format"],"endDate":[513,"end-date"],"errors":[1040],"hideLabel":[1540,"hide-label"],"hints":[1040],"invalid":[1540],"invalidDates":[16],"label":[1537],"open":[1540],"optional":[516],"placeholder":[513],"popoverAlignment":[1,"popover-alignment"],"popoverDirection":[1025,"popover-direction"],"popoverMinHeight":[2,"popover-min-height"],"readonly":[516],"startDate":[513,"start-date"],"typeable":[516],"validDates":[16],"value":[1537],"popDirection":[513,"pop-direction"],"onsuccess":[16],"buttonLabel":[513,"button-label"],"ariaLabel":[1537,"aria-label"],"keyboardSelection":[32],"typedValue":[32],"dateList":[32],"hintMessage":[32],"hintMessageType":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"typeValue":[64]},[[0,"change","defaultChangeHandler"],[0,"error","defaultErrorHandler"],[0,"success","defaultSuccessHandler"],[0,"focus","delegateFocus"],[0,"clear","handleClear"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"ariaLabel":["ariaLabelObserver"],"typeable":["typeableChanged"],"value":["valueObserver"],"daysOfWeekChecksum":["daysOfWeekChecksumObserver"],"validDates":["validDatesObserver"],"invalidDates":["invalidDatesObserver"],"startDate":["startDateObserver"],"endDate":["endDateObserver"],"cutoffTime":["cutoffTimeObserver"]}]]],["p-292535d1",[[1,"q2-select",{"disabled":[516],"errors":[16],"hideLabel":[1540,"hide-label"],"hoist":[4],"invalid":[516],"label":[1537],"listLabel":[1,"list-label"],"minRows":[2,"min-rows"],"multilineOptions":[516,"multiline-options"],"multiple":[516],"optional":[516],"placeholder":[513],"popDirection":[513,"pop-direction"],"readonly":[516],"searchable":[516],"selectedOptions":[1040],"value":[1025],"ariaLabel":[1537,"aria-label"],"open":[32],"showSelected":[32],"searchText":[32],"hasCustomDisplay":[32],"hasPopoverTop":[32],"hasPopoverBottom":[32],"inputFocused":[32],"statusMessage":[32],"prioritizeSearch":[32],"structuredSelectedOptions":[32],"openPopover":[64],"closePopover":[64],"setValue":[64],"searchOptions":[64]},[[0,"keydown","keydownHandler"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"],[0,"focus","delegateFocus"],[0,"focusout","handleFocusout"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["buildStructuredSelectedOptions","valueUpdated"],"selectedOptions":["buildStructuredSelectedOptions"],"ariaLabel":["ariaLabelObserver"],"multilineOptions":["handleMultilineOptionsUpdate"],"open":["openChanged"]}]]],["p-c1eef9d9",[[1,"q2-action-sheet",{"data":[1040],"title":[1],"hideClose":[4,"hide-close"],"isScrollable":[32],"renderStatus":[32],"hide":[64],"show":[64]}]]],["p-560794fa",[[1,"q2-dropdown",{"additionalContext":[513,"additional-context"],"block":[516],"context":[513],"contextValue":[513,"context-value"],"disabled":[516],"hideLabel":[1540,"hide-label"],"icon":[513],"label":[1537],"name":[513],"open":[1540],"popoverDirection":[1025,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"resolvedType":[513,"resolved-type"],"type":[513],"alignment":[513],"popDirection":[513,"pop-direction"],"ariaLabel":[1537,"aria-label"]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]],{"popDirection":["popDirectionHandler"],"alignment":["alignmentHandler"],"ariaLabel":["ariaLabelHandler"],"name":["nameHandler"],"context":["contextHandler"],"contextValue":["contextValueHandler"],"resolvedType":["resolvedTypeHandler"],"additionalContext":["additionalContextHandler"]}]]],["p-c72747dd",[[1,"q2-data-table",{"bordered":[1540],"clickable":[1540],"caption":[1025],"density":[1537],"headers":[1040],"hideCaption":[1540,"hide-caption"],"hideClickable":[1028,"hide-clickable"],"loading":[1540],"rows":[1040],"selectable":[1540],"selectMode":[1025,"select-mode"],"shadowed":[1540],"serializedHeaders":[32],"serializedRows":[32],"hasExpandableRows":[32],"hasDropdowns":[32],"allRowsSelected":[32],"someRowsSelected":[32],"checkSlotCount":[32]},[[0,"click","onClickListener"],[0,"selectAllRows","onSelectAllRows"]],{"headers":["headersHandler"],"rows":["rowsHandler"],"selectable":["selectableHandler"]}]]],["p-1c2cdfa0",[[1,"q2-editable-field",{"block":[516],"disabled":[516],"editing":[1540],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hints":[16],"label":[1537],"maxlength":[514],"persistentLabel":[516,"persistent-label"],"truncated":[516],"type":[513],"value":[1537],"ariaLabel":[1537,"aria-label"],"formattedValue":[32],"clickEdit":[64],"clickCancel":[64],"clickSave":[64],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"]],{"errors":["errorsObserver"],"ariaLabel":["ariaLabelObserver"],"editing":["observesEditing"]}]]],["p-5f97da6c",[[1,"q2-pagination",{"autoSize":[1540,"auto-size"],"total":[514],"page":[1538],"pages":[1538],"pagesOnly":[1540,"pages-only"],"perPage":[2,"per-page"],"recordsOnly":[1540,"records-only"],"recordType":[1,"record-type"],"isSmall":[32]},[[0,"focus","onHostElementFocus"]],{"recordsOnly":["manageResizeObserver"],"pagesOnly":["manageResizeObserver"],"autoSize":["manageResizeObserver"]}]]],["p-83c5c885",[[1,"q2-pill",{"active":[1540],"disabled":[516],"hoist":[4],"label":[513],"maxLength":[514,"max-length"],"multiple":[516],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"selectedOptions":[1040],"theme":[513],"value":[1537],"optionCount":[32],"selectedOptionElements":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"],[0,"displayChanged","handleSelectedDisplay"]],{"value":["valueChanged"],"selectedOptions":["selectedOptionsChanged"]}]]],["p-fc728a2d",[[1,"q2-tab-container",{"color":[513],"name":[513],"noPrint":[516,"no-print"],"type":[513],"value":[1537],"hasLeft":[32],"hasRight":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32],"tabs":[32]},[[0,"change","defaultChangeHandler"],[9,"resize","onResize"],[0,"focus","onFocus"],[0,"badge","onBadge"]],{"value":["valueObserver"],"name":["nameObserver"]}]]],["p-32b4930a",[[1,"q2-tag",{"hoist":[4],"label":[513],"open":[1540],"optionListLabel":[1,"option-list-label"],"popoverDirection":[1,"popover-direction"],"popoverAlignment":[1025,"popover-alignment"],"popoverMinHeight":[2,"popover-min-height"],"theme":[513],"optionCount":[32]},[[0,"focus","delegateFocus"],[0,"popoverStateChanged","popoverStateHandler"]]]]],["p-88ee6e1e",[[4,"q2-carousel",{"autoPlay":[516,"auto-play"],"fullWidthPanes":[516,"full-width-panes"],"hidePagination":[516,"hide-pagination"],"label":[513],"showNavigationArrows":[516,"show-navigation-arrows"],"index":[1538],"ariaLabel":[513,"aria-label"],"universalCarouselOptions":[32],"fullWidthDisplayOptions":[32],"activePaneIndex":[32],"applyFocus":[32],"applyPaginationFocus":[32],"autoPlayInProgress":[32],"compactMode":[32],"carouselWrapperWidth":[32],"ariaLiveValue":[32],"currentPaneCount":[32]},[[0,"change","onHostElementChange"],[0,"clickCarouselPane","carouselPaneClicked"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"carouselWrapperWidth":["carouselWrapperWidthChanged"],"index":["indexChanged"],"fullWidthPanes":["revampCarousel"],"compactMode":["revampCarousel"],"autoPlay":["revampCarousel"]}]]],["p-ce453e6f",[[1,"q2-month-picker",{"year":[1538],"disabledMonths":[16],"today":[1],"selectedIndex":[32],"focusedIndex":[32],"showYearLayer":[32]}]]],["p-13642096",[[1,"q2-section",{"collapsible":[516],"expanded":[1540],"label":[513],"noCollapseIcon":[516,"no-collapse-icon"],"contentHeight":[32],"hideContent":[32],"hasYieldedHeader":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"expanded":["expandedObserver"],"collapsible":["collapsibleObserver"]}]]],["p-cd5d3a66",[[1,"q2-stepper",{"currentStep":[1538,"current-step"],"stepCount":[1026,"step-count"],"lastEnabledStep":[1026,"last-enabled-step"],"contentChangeTriggerCount":[32],"scrollEnabled":[32],"showScrollLeft":[32],"showScrollRight":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"],[0,"contentChange","contentChangeHandler"]],{"currentStep":["currentStepChanged"]}]]],["p-f6ecac88",[[1,"q2-card",{"avatarIcon":[513,"avatar-icon"],"avatarInitials":[513,"avatar-initials"],"avatarName":[513,"avatar-name"],"avatarSrc":[513,"avatar-src"],"bar":[513],"description":[513],"isSmall":[516,"is-small"],"isStatic":[516,"is-static"],"isTouch":[516,"is-touch"],"target":[513],"title":[513],"type":[513],"url":[513],"isAutoTouch":[32],"isAutoSmall":[32]},[[0,"focus","onHostElementFocus"]]]]],["p-4f389d8b",[[1,"q2-chart-donut",{"data":[16],"chartName":[513,"chart-name"],"format":[513],"hoverScaleSize":[2,"hover-scale-size"],"isClickable":[516,"is-clickable"],"innerRadius":[1025,"inner-radius"],"minSliceSize":[1,"min-slice-size"],"outerRadius":[1025,"outer-radius"],"selectedId":[1025,"selected-id"],"selectedOffset":[2,"selected-offset"],"summaryIcon":[513,"summary-icon"],"summaryName":[513,"summary-name"],"hoveredId":[32],"selectById":[64],"selectByIndex":[64],"clearSelection":[64],"getChartOptions":[64]},[[0,"focus","delegateFocus"]],{"chartName":["propsUpdates"],"innerRadius":["propsUpdates","innerRadiusUpdated"],"outerRadius":["propsUpdates","outerRadiusUpdated"],"minSliceSize":["propsUpdates"],"hoverScaleSize":["propsUpdates"],"selectedOffset":["propsUpdates"],"data":["propsUpdates","dataUpdated"],"selectedId":["checkSelectedId"]}]]],["p-56ff02fb",[[1,"q2-checkbox-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"optional":[516],"readonly":[516],"value":[1040],"setValue":[64]},[[0,"change","onHostElementChange"]],{"value":["valueObserver"],"disabled":["disabledObserver"],"readonly":["readonlyObserver"]}]]],["p-23b685f5",[[1,"q2-radio-group",{"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"label":[513],"name":[513],"optional":[516],"readonly":[516],"tileAlignment":[513,"tile-alignment"],"tileLayout":[1540,"tile-layout"],"value":[1025],"tilelayout":[1540],"setValue":[64]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"],[0,"keydown","keydownHandler"]],{"value":["valueUpdated"],"name":["nameUpdated"],"disabled":["disabledUpdated"],"readonly":["readonlyUpdated"],"tilelayout":["handleDeprecatedTilelayout"],"tileLayout":["tileLayoutUpdated"]}]]],["p-a43c372f",[[1,"q2-stepper-vertical",{"currentStepId":[1537,"current-step-id"],"structuredPanes":[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"],[0,"statusChange","statusChangeHandler"]],{"currentStepId":["currentStepChanged"]}]]],["p-177106de",[[1,"q2-textarea",{"cols":[514],"disabled":[516],"errors":[16],"hints":[16],"hideLabel":[516,"hide-label"],"hideMessages":[516,"hide-messages"],"label":[513],"maxlength":[1538],"optional":[516],"placeholder":[513],"readonly":[516],"resize":[513],"rows":[514],"spellcheck":[516],"value":[1025],"hasFocus":[32],"downParams":[32],"setValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"],[0,"input","onHostElementInput"]],{"value":["valueObserver"],"rows":["rowsObserver"],"cols":["colsObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-8c9d0966",[[4,"q2-carousel-pane",{"index":[2],"siblingCount":[2,"sibling-count"],"isActivePane":[516,"is-active-pane"],"label":[513]},null,{"isActivePane":["determineDisabledContent"]}]]],["p-e796e5a8",[[1,"q2-chart-area",{"data":[16],"alignChartName":[513,"align-chart-name"],"areaColor":[513,"area-color"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"gridLines":[513,"grid-lines"],"hideNameAxisLabels":[516,"hide-name-axis-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"lineColor":[513,"line-color"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"pointerLineColor":[513,"pointer-line-color"],"pointerLineStyle":[513,"pointer-line-style"],"showChartName":[516,"show-chart-name"],"showDatapointLabels":[516,"show-datapoint-labels"],"showGradient":[516,"show-gradient"]},null,{"data":["propsUpdates"],"alignChartName":["propsUpdates"],"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"lineColor":["propsUpdates"],"pointerLineColor":["propsUpdates"],"pointerLineStyle":["propsUpdates"],"areaColor":["propsUpdates"],"dataNamesOverflow":["propsUpdates"],"dataNamesWidth":["propsUpdates"],"format":["propsUpdates"],"formatModifier":["propsUpdates"],"hideNameAxisLabels":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"offsetDataNames":["propsUpdates"],"offsetDataValues":["propsUpdates"],"showChartName":["propsUpdates"],"showDatapointLabels":["propsUpdates"],"showGradient":["propsUpdates"],"gridLines":["propsUpdates"]}]]],["p-871d387c",[[1,"q2-chart-bar",{"data":[16],"alignChartName":[513,"align-chart-name"],"chartName":[513,"chart-name"],"chartSubTitle":[513,"chart-sub-title"],"color":[513],"dataNamesOverflow":[513,"data-names-overflow"],"dataNamesWidth":[514,"data-names-width"],"format":[513],"formatModifier":[513,"format-modifier"],"hideBarLabels":[516,"hide-bar-labels"],"hideValueAxisLabels":[516,"hide-value-axis-labels"],"offsetDataNames":[516,"offset-data-names"],"offsetDataValues":[516,"offset-data-values"],"orientation":[513],"showChartName":[516,"show-chart-name"],"sort":[516]},null,{"chartName":["propsUpdates"],"chartSubTitle":["propsUpdates"],"color":["propsUpdates"],"hideBarLabels":["propsUpdates"],"showChartName":["propsUpdates"],"alignChartName":["propsUpdates"],"orientation":["propsUpdates"],"format":["propsUpdates"],"sort":["propsUpdates"],"data":["propsUpdates"],"offsetDataNames":["propsUpdates"],"hideValueAxisLabels":["propsUpdates"],"formatModifier":["propsUpdates"],"dataNamesOverflow":["propsUpdates"]}]]],["p-56f1c39b",[[0,"q2-loading-element",{"shape":[513],"width":[513],"height":[513],"borderRadius":[513,"border-radius"]}]]],["p-ce7868a2",[[1,"q2-loc",{"substitutions":[16],"value":[513]}]]],["p-5e53dd08",[[1,"q2-radio",{"checked":[1540],"disabled":[516],"hideLabel":[1540,"hide-label"],"label":[1537],"readonly":[516],"value":[513],"tabIndex":[2,"tab-index"],"name":[513],"groupDisabled":[4,"group-disabled"],"groupReadonly":[4,"group-readonly"],"groupTileLayout":[4,"group-tile-layout"],"ariaLabel":[1537,"aria-label"]},[[0,"click","onHostClick"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"checked":["checkedObserver"]}]]],["p-1c004d79",[[1,"q2-relative-time",{"baseDate":[513,"base-date"],"locale":[513],"messageFormat":[513,"message-format"],"numericOnly":[516,"numeric-only"],"sync":[1540],"date":[513],"unit":[513],"displayedMessage":[32],"displayedMessageValue":[64]},null,{"sync":["syncUpdated"],"messageFormat":["updateMessage"],"locale":["updateMessage"],"date":["updateMessage"],"baseDate":["updateMessage"],"numericOnly":["updateMessage"],"unit":["updateMessage"]}]]],["p-95edb04b",[[1,"q2-stepper-pane",{"description":[513],"isActive":[516,"is-active"],"label":[513],"showWithChildren":[516,"show-with-children"],"status":[513],"isChildActive":[32]},[[0,"activeChange","checkForActiveChildren"]],{"label":["labelOrDescriptionChanged"],"description":["labelOrDescriptionChanged"],"status":["statusChanged"],"isActive":["isActiveChanged"],"showWithChildren":["checkForActiveChildren"]}]]],["p-db29fd63",[[1,"q2-tab-pane",{"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeStatus":[513,"badge-status"],"badgeTheme":[513,"badge-theme"],"label":[513],"value":[513],"name":[513],"selected":[516],"index":[2],"guid":[2]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"]}]]],["p-a2c34e90",[[1,"q2-tooltip",{"block":[516],"focusable":[516],"immediate":[516],"label":[513],"multiline":[516],"persistent":[516],"position":[513],"focusClass":[32]},[[0,"keyup","keyUpHandler"],[2,"focus","focusCaptureHandler"],[0,"focus","focusHandler"],[0,"focusout","focusOutHandler"]]]]],["p-e11fe671",[[1,"tecton-tab-pane",{"value":[513],"label":[513],"name":[513],"selected":[516],"index":[2],"guid":[2],"provided":[516],"url":[513],"moduleId":[513,"module-id"],"minHeight":[513,"min-height"],"badgeCount":[514,"badge-count"],"badgeDescription":[513,"badge-description"],"badgeTheme":[513,"badge-theme"],"badgeStatus":[513,"badge-status"],"authPayload":[16],"showForm":[4,"show-form"],"_showForm":[32]},null,{"badgeCount":["badgeObserver"],"badgeDescription":["badgeObserver"],"badgeTheme":["badgeObserver"],"badgeStatus":["badgeObserver"],"selected":["selectedObserver"]}]]],["p-cc2901ae",[[1,"q2-icon",{"inline":[516],"label":[513],"type":[513]},null,{"type":["customIconHandler"]}]]],["p-b159ec91",[[1,"q2-dropdown-item",{"disabled":[516],"label":[1537],"removable":[516],"separator":[516],"value":[513],"ariaLabel":[1537,"aria-label"]},[[0,"focus","onHostElementFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-c929f062",[[1,"q2-avatar",{"icon":[1],"initials":[513],"name":[513],"src":[513],"badSrc":[32],"isLoaded":[32]},null,{"src":["srcDidUpdate"]}]]],["p-7990796e",[[1,"q2-checkbox",{"alignment":[513],"checked":[1540],"description":[513],"disabled":[516],"hasError":[516,"has-error"],"hideLabel":[1540,"hide-label"],"indeterminate":[516],"label":[1537],"name":[513],"readonly":[516],"type":[513],"value":[513],"groupDisabled":[516,"group-disabled"],"ariaLabel":[1537,"aria-label"]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"]}]]],["p-53265e50",[[1,"q2-option",{"role":[513],"disabled":[516],"display":[1025],"value":[513],"disabledGroup":[516,"disabled-group"],"selected":[516],"multiline":[516],"active":[516],"_multiSelectHidden":[516,"_multiselecthidden"]}],[1,"q2-optgroup",{"disabled":[516],"label":[513],"hidden":[32]},null,{"disabled":["disabledWatcher"]}]]],["p-08981e14",[[1,"q2-message",{"appearance":[513],"description":[516],"type":[513],"presentToggle":[32],"present":[64]},[[0,"focus","delegateFocus"]]]]],["p-72112c28",[[1,"q2-input",{"autocapitalize":[513],"autocomplete":[513],"autocorrect":[513],"autofocus":[516],"badgeTheme":[513,"badge-theme"],"badgeValue":[513,"badge-value"],"clearable":[516],"current":[1],"disabled":[516],"errors":[16],"formatModifier":[513,"format-modifier"],"hideLabel":[1540,"hide-label"],"hideMessages":[516,"hide-messages"],"hints":[16],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"label":[1537],"max":[514],"maxlength":[1538],"min":[514],"optional":[516],"placeholder":[513],"pseudo":[516],"readonly":[516],"role":[1],"showCount":[516,"show-count"],"showVisibilityToggle":[516,"show-visibility-toggle"],"step":[514],"textHidden":[1540,"text-hidden"],"type":[513],"value":[1025],"ariaControls":[1,"aria-controls"],"ariaOwns":[1,"aria-owns"],"ariaHaspopup":[1,"aria-haspopup"],"ariaExpanded":[1,"aria-expanded"],"ariaActivedescendant":[1,"aria-activedescendant"],"ariaLabel":[1537,"aria-label"],"formattedValueObject":[32],"hasFocus":[32],"isSmall":[32],"checkSlotCount":[32],"setValue":[64],"clearValue":[64]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]],{"clearable":["manageClearableResizeObserver"],"ariaLabel":["ariaLabelObserver"],"value":["valueObserver"],"formattedValueObject":["formattedValueObjectObserver"],"type":["typeObserver"],"formatModifier":["formatModifierObserver"],"hints":["hintsObserver"],"errors":["errorsObserver"]}]]],["p-324946ce",[[1,"q2-option-list",{"align":[513],"customSearch":[516,"custom-search"],"disabled":[516],"label":[1],"multiple":[516],"noSelect":[516,"no-select"],"selectedOptions":[1040],"showSelected":[1540,"show-selected"],"type":[1],"hasOptions":[32],"setDefaultActiveElement":[64],"setActiveElement":[64],"handleExternalKeydown":[64],"getContents":[64],"getOptions":[64]},[[0,"focus","delegateFocus"],[0,"click","handleClick"]],{"showSelected":["showSelectedUpdated"],"selectedOptions":["selectedOptionsUpdated"]}]]],["p-e6022136",[[1,"q2-badge",{"maxLength":[514,"max-length"],"size":[513],"status":[513],"theme":[513],"value":[514]}]]],["p-0b715d39",[[1,"q2-popover",{"direction":[513],"align":[513],"open":[1540],"block":[516],"controlElement":[16],"minHeight":[2,"min-height"],"currentDirection":[32],"show":[32],"toggle":[64],"scrollContainerTo":[64]},[[0,"popoverState","popoverStateHandler"]],{"open":["openChanged"],"minHeight":["minHeightProvided"]}],[0,"click-elsewhere"]]],["p-f10593d8",[[1,"q2-btn",{"ariaExpanded":[1,"aria-expanded"],"ariaHasPopup":[1,"aria-has-popup"],"ariaControls":[1,"aria-controls"],"ariaSelected":[1,"aria-selected"],"ariaPressed":[1,"aria-pressed"],"description":[1],"tabIndex":[2,"tab-index"],"active":[516],"badge":[516],"block":[516],"disabled":[516],"hideLabel":[1540,"hide-label"],"intent":[1537],"label":[1537],"loading":[516],"type":[513],"size":[513],"color":[1537],"fab":[516],"ariaLabel":[1537,"aria-label"],"iconPosition":[32]},[[2,"click","disable"],[0,"focus","delegateFocus"]],{"ariaLabel":["ariaLabelObserver"],"size":["sizeObserver"]}],[1,"q2-loading",{"counts":[513],"inline":[516],"label":[1537],"modifiers":[513],"shape":[513],"type":[513],"ariaLabel":[1537,"aria-label"]},null,{"ariaLabel":["ariaLabelObserver"]}]]]]'),e)}));
2
2
  //# sourceMappingURL=q2-tecton-elements.esm.js.map
@@ -421,6 +421,7 @@ describe('popover', () => {
421
421
  });
422
422
  describe("when the module is taller than the window's viewport", () => {
423
423
  beforeEach(() => {
424
+ specPopover.open = true;
424
425
  window.visualViewport = { height: 1200 };
425
426
  });
426
427
  it('sets the direction to down when control element has more space below it', async () => {
@@ -471,6 +472,7 @@ describe('popover', () => {
471
472
  });
472
473
  describe("when the module is shorter than the window's viewport", () => {
473
474
  beforeEach(() => {
475
+ specPopover.open = true;
474
476
  window.visualViewport = { height: 600 };
475
477
  });
476
478
  it('sets the direction to down when control element has more space below it', async () => {