q2-tecton-elements 1.43.2 → 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 (30) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +20 -18
  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.css +1 -1
  8. package/dist/collection/components/q2-popover/q2-popover.js +19 -21
  9. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  10. package/dist/components/q2-dropdown.js +5 -4
  11. package/dist/components/q2-dropdown.js.map +1 -1
  12. package/dist/components/q2-popover2.js +20 -18
  13. package/dist/components/q2-popover2.js.map +1 -1
  14. package/dist/esm/click-elsewhere_2.entry.js +20 -18
  15. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  16. package/dist/esm/q2-dropdown.entry.js +5 -4
  17. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  18. package/dist/q2-tecton-elements/p-0b715d39.entry.js +2 -0
  19. package/dist/q2-tecton-elements/p-0b715d39.entry.js.map +1 -0
  20. package/dist/q2-tecton-elements/p-560794fa.entry.js +2 -0
  21. package/dist/q2-tecton-elements/p-560794fa.entry.js.map +1 -0
  22. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  23. package/dist/test/elements/q2-popover-test.e2e.js +2 -0
  24. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  25. package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
  26. package/package.json +3 -3
  27. package/dist/q2-tecton-elements/p-15ee9779.entry.js +0 -2
  28. package/dist/q2-tecton-elements/p-15ee9779.entry.js.map +0 -1
  29. package/dist/q2-tecton-elements/p-295d9418.entry.js +0 -2
  30. package/dist/q2-tecton-elements/p-295d9418.entry.js.map +0 -1
@@ -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-295d9418",[[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 () => {
@@ -1 +1 @@
1
- {"version":3,"file":"q2-popover-test.e2e.js","sourceRoot":"","sources":["../../../test/elements/q2-popover-test.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAEvE,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACrB,IAAI,IAAa,CAAC;IAClB,IAAI,OAAmB,CAAC;IACxB,IAAI,gBAA4B,CAAC;IAEjC,MAAM,wBAAwB,GAAG;QAC7B,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,GAAG;QAChB,UAAU,EAAE,GAAG;QACf,YAAY,EAAE,EAAE;KACnB,CAAC;IAEF,MAAM,kBAAkB,GAAG;QACvB,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,EAAE;QACf,kBAAkB,EAAE,wBAAwB;KAC/C,CAAC;IAEF,MAAM,oBAAoB,GAAG,KAAK,EAAE,KAAwB,EAAE,EAAE;QAC5D,MAAM,IAAI,CAAC,KAAK,CACZ,YAAY,EACZ,CAAC,EAAE,EAAE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AG,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC,CAAC;gBAC1D,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBACxC,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;gBAC1C,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;gBAC1C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;gBAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC,SAAS,EAAE,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EElement, E2EPage } from '@stencil/core/testing';\nimport { getNestedElementProperty, setup } from '../helpers';\nimport { Q2Popover } from '../../src/components/q2-popover/q2-popover';\n\ndescribe('popover', () => {\n let page: E2EPage;\n let popover: E2EElement;\n let popoverContainer: E2EElement;\n\n const samplePlatformDimensions = {\n scrollY: 0,\n innerHeight: 800,\n innerWidth: 600,\n outletOffset: 20,\n };\n\n const sampleTectonWindow = {\n inMobileApp: false,\n noStrings: false,\n platformUrl: '',\n platformDimensions: samplePlatformDimensions,\n };\n\n const dispatchPopoverState = async (state: { open: boolean }) => {\n await page.$eval(\n 'q2-popover',\n (el, { open }) => el.dispatchEvent(new CustomEvent('popoverState', { detail: { open } })),\n state\n );\n };\n\n const getPopMaxHeight = async () => {\n return page.$eval('q2-popover', el =>\n el.shadowRoot.querySelector<HTMLDivElement>('.container').style.getPropertyValue('--comp-pop-max-height')\n );\n };\n\n const getPopWidth = async () => {\n return page.$eval('q2-popover', el =>\n el.shadowRoot.querySelector<HTMLDivElement>('.container').style.getPropertyValue('--comp-pop-width')\n );\n };\n\n describe('Props', () => {\n describe('open', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <q2-popover>\n <div style=\"height: 400px; width: 200px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n\n it('opens the popover when the open property is changed to true', async () => {\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('none');\n expect(popover).not.toHaveAttribute('open');\n\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect((await popoverContainer.getComputedStyle()).display).toEqual('block');\n expect(stateSpy).toHaveReceivedEventDetail({ open: true });\n });\n\n it('closes the popover when the open property is changed to false', async () => {\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('block');\n expect(popover).toHaveAttribute('open');\n\n popover.setProperty('open', false);\n await page.waitForChanges();\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('none');\n expect(popover).not.toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: false });\n });\n\n it('adds and removes the currentDirection and --comp-pop-max-height property', async () => {\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect(popoverContainer).toHaveClass('down');\n expect(popover).toHaveAttribute('open');\n expect(await getPopMaxHeight()).toBe('390px');\n\n popover.setProperty('open', false);\n await page.waitForChanges();\n\n expect(popover).not.toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: false });\n expect(popoverContainer).not.toHaveClass('down');\n expect(await getPopMaxHeight()).toBe('');\n });\n });\n\n describe('direction', () => {\n describe('when provided', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <q2-popover direction=\"up\" id=\"control\">\n <div style=\"height: 400px; width: 200px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n it('sets currentDirection to provided value', async () => {\n expect((await popoverContainer.getComputedStyle()).display).toEqual('none');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('block');\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).toHaveClass('up');\n });\n });\n });\n });\n\n describe('Events', () => {\n describe('popoverState', () => {\n it('opens the popover when open is passed as true', async () => {\n page = await setup({\n html: `<q2-popover></q2-popover>`,\n });\n\n // await setBodyHeight();\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: true });\n });\n\n it('closes the popover when open is passed as false', async () => {\n page = await setup({\n html: `<q2-popover open></q2-popover>`,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n expect(popover).toHaveAttribute('open');\n\n await dispatchPopoverState({ open: false });\n await page.waitForChanges();\n\n expect(popover).not.toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: false });\n });\n });\n });\n\n describe('Methods', () => {\n describe('toggle', () => {\n it('toggles the value of open', async () => {\n const popover = new Q2Popover();\n expect(popover.open).toBeUndefined();\n popover.toggle();\n expect(popover.open).toBe(true);\n popover.toggle();\n expect(popover.open).toBe(false);\n });\n });\n\n describe('scrollContainerTo', () => {\n it('scrolls the container to the given position', async () => {\n page = await setup({\n html: `\n <q2-popover>\n <div style=\"height: 2000px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n\n await popover.callMethod('scrollContainerTo', { top: 1000 });\n await page.waitForChanges();\n\n expect(await getNestedElementProperty(page, ['q2-popover', '.container'], 'scrollTop')).toBe(1000);\n\n await popover.callMethod('scrollContainerTo', { top: 0 });\n await page.waitForChanges();\n\n expect(await getNestedElementProperty(page, ['q2-popover', '.container'], 'scrollTop')).toBe(0);\n });\n });\n });\n\n describe('Getters', () => {\n let specPopover: Q2Popover;\n beforeEach(() => {\n specPopover = new Q2Popover();\n });\n\n describe('isModule', () => {\n it('returns false when window top matches window and platformDimensions is not defined', async () => {\n expect(window.top).toBe(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns false when window top does not match window and platformDimensions is not defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n expect(window.top).not.toEqual(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n windowSpy.mockRestore();\n });\n\n it('returns false when window top matches window and platformDimensions is defined', async () => {\n window.Tecton = sampleTectonWindow;\n expect(window.top).toBe(window);\n expect(window.Tecton.platformDimensions).toBeTruthy();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns true when window top does not match window and platformDimensions is defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n windowSpy.mockRestore();\n });\n });\n });\n\n describe('determinePopDirection', () => {\n describe('when control element has more space below it', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 44px; width: 400px; background: black; position: fixed; top: 10px;\" id=\"control\"></div>\n <q2-popover>\n <div style=\"height: 500px\"></div>\n </q2-popover>\n `,\n });\n // await setBodyHeight();\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n it('auto-determines the direction to be down', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('up');\n expect(popoverContainer).toHaveClass('down');\n });\n it('sets currentDirection state variable to down', async () => {\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('up');\n expect(popoverContainer).toHaveClass('down');\n });\n it('displays popover content within viewport', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n const containerStyle = await popoverContainer.getComputedStyle();\n const maxHeight = parseInt(await getPopMaxHeight());\n expect(parseInt(containerStyle.height)).toBeLessThan(400);\n expect(maxHeight).toBeLessThan(400);\n });\n });\n\n describe('when control element has more space above it', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 44px; width: 400px; background: black; position: fixed; top: 350px\" id=\"control\"></div>\n <q2-popover>\n <div style=\"height: 500px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n it('auto-determines the direction to be up', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('down');\n expect(popoverContainer).toHaveClass('up');\n });\n it('sets currentDirection state variable to up', async () => {\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('down');\n expect(popoverContainer).toHaveClass('up');\n });\n it('displays popover content within viewport', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n const containerStyle = await popoverContainer.getComputedStyle();\n const maxHeight = parseInt(await getPopMaxHeight());\n expect(parseInt(containerStyle.height)).toBeLessThan(400);\n expect(maxHeight).toBeLessThan(400);\n });\n });\n\n describe('when page is resized', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 50px; \" id=\"control\"></div>\n <q2-popover block>\n <div style=\"height: 800px\"></div>\n <q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 800 });\n await page.waitForChanges();\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n\n it('recalculates the width when block is true', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n\n let width = await getPopWidth();\n expect(parseInt(width)).toBeLessThan(800);\n\n await page.setViewport({ width: 200, height: 600 });\n await page.waitForChanges();\n\n width = await getPopWidth();\n expect(parseInt(width)).toBeLessThan(200);\n });\n\n it('recalculates the max-height when page orientation changes', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n\n let maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).toBeLessThan(800);\n\n await page.setViewport({ width: 800, height: 600, isLandscape: true });\n await page.waitForChanges();\n\n maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).toBeLessThan(600);\n });\n\n it('does not recalculate the max-height when the viewport is resized', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n\n let maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).toBeLessThan(800);\n\n await page.setViewport({ width: 800, height: 600 });\n await page.waitForChanges();\n\n maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).not.toBeLessThan(600);\n });\n });\n\n describe('when page is scrolled', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 300px\"></div>\n <div style=\"height: 50px; width: 200px; background: black;\" id=\"control\"></div>\n <q2-popover>\n <div style=\"height: 800px\"></div>\n </q2-popover>\n <div> style=\"height: 500px\"</div>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n\n it('maintains its current direction until closed', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).toHaveClass('up');\n // Scroll down 300px\n await page.$eval('#control', () => {\n window.scrollBy(0, 300);\n window.visualViewport.dispatchEvent(new Event('scroll'));\n });\n await page.waitForChanges();\n expect(popoverContainer).toHaveClass('up');\n });\n });\n\n describe('when in a module', () => {\n let specPopover: Q2Popover;\n let windowSpy: jest.SpyInstance;\n let controlElement: HTMLDivElement;\n let containerElement: HTMLDivElement;\n\n beforeEach(async () => {\n specPopover = new Q2Popover();\n windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n\n controlElement = document.createElement('div');\n specPopover.controlElement = controlElement;\n\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n });\n\n afterEach(() => {\n windowSpy.mockRestore();\n });\n\n describe(\"when the module is taller than the window's viewport\", () => {\n beforeEach(() => {\n window.visualViewport = { height: 1200 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('700px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('590px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n\n describe('when the outletOffset is less than 0', () => {\n beforeEach(() => {\n window.Tecton = {\n ...sampleTectonWindow,\n platformDimensions: { ...samplePlatformDimensions, outletOffset: -50 },\n };\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('770px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('540px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n\n describe(\"when the module is shorter than the window's viewport\", () => {\n beforeEach(() => {\n window.visualViewport = { height: 600 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('520px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 500,\n bottom: 550,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('490px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n });\n\n describe('Accessibility', () => {\n it('does not hide q2-option elements from a screen reader (TCT-2080)', async () => {\n page = await setup({\n html: `\n <q2-popover open>\n <q2-option-list>\n <q2-option value=\"1\">Account 1</q2-option>\n <q2-option value=\"2\">Account 2</q2-option>\n <q2-option value=\"3\">Account 3</q2-option>\n </q2-option-list>\n <q2-popover>\n `,\n });\n\n const snapshot = await page.accessibility.snapshot({\n root: await page.$('q2-option'),\n });\n\n expect(snapshot.name).toEqual('Account 1');\n });\n });\n describe('Deprecations', () => {\n describe('calls console.warn for deprecated `minHeight` prop', () => {\n it('by using handleDeprecationWarning if set on popover element', async () => {\n const warnMock = jest.spyOn(console, 'warn');\n page = await setup({ html: `<q2-popover min-height=\"100\"></q2-popover>` });\n await page.waitForChanges();\n expect(warnMock).toHaveBeenCalledTimes(1);\n warnMock.mockReset();\n });\n it('by using handleDeprecationWarning if set after componentDidLoad', async () => {\n const warnMock = jest.spyOn(console, 'warn');\n page = await setup({ html: `<q2-popover></q2-popover>` });\n popover = await page.find('q2-popover');\n expect(warnMock).toHaveBeenCalledTimes(0);\n popover.setAttribute('min-height', '100');\n await page.waitForChanges();\n expect(warnMock).toHaveBeenCalledTimes(1);\n warnMock.mockReset();\n });\n });\n });\n});\n"]}
1
+ {"version":3,"file":"q2-popover-test.e2e.js","sourceRoot":"","sources":["../../../test/elements/q2-popover-test.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAEvE,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACrB,IAAI,IAAa,CAAC;IAClB,IAAI,OAAmB,CAAC;IACxB,IAAI,gBAA4B,CAAC;IAEjC,MAAM,wBAAwB,GAAG;QAC7B,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,GAAG;QAChB,UAAU,EAAE,GAAG;QACf,YAAY,EAAE,EAAE;KACnB,CAAC;IAEF,MAAM,kBAAkB,GAAG;QACvB,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,EAAE;QACf,kBAAkB,EAAE,wBAAwB;KAC/C,CAAC;IAEF,MAAM,oBAAoB,GAAG,KAAK,EAAE,KAAwB,EAAE,EAAE;QAC5D,MAAM,IAAI,CAAC,KAAK,CACZ,YAAY,EACZ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EACzF,KAAK,CACR,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AAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBACxC,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;gBAC1C,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;gBAC1C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;gBAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;gBAC1C,QAAQ,CAAC,SAAS,EAAE,CAAC;YACzB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EElement, E2EPage } from '@stencil/core/testing';\nimport { getNestedElementProperty, setup } from '../helpers';\nimport { Q2Popover } from '../../src/components/q2-popover/q2-popover';\n\ndescribe('popover', () => {\n let page: E2EPage;\n let popover: E2EElement;\n let popoverContainer: E2EElement;\n\n const samplePlatformDimensions = {\n scrollY: 0,\n innerHeight: 800,\n innerWidth: 600,\n outletOffset: 20,\n };\n\n const sampleTectonWindow = {\n inMobileApp: false,\n noStrings: false,\n platformUrl: '',\n platformDimensions: samplePlatformDimensions,\n };\n\n const dispatchPopoverState = async (state: { open: boolean }) => {\n await page.$eval(\n 'q2-popover',\n (el, { open }) => el.dispatchEvent(new CustomEvent('popoverState', { detail: { open } })),\n state\n );\n };\n\n const getPopMaxHeight = async () => {\n return page.$eval('q2-popover', el =>\n el.shadowRoot.querySelector<HTMLDivElement>('.container').style.getPropertyValue('--comp-pop-max-height')\n );\n };\n\n const getPopWidth = async () => {\n return page.$eval('q2-popover', el =>\n el.shadowRoot.querySelector<HTMLDivElement>('.container').style.getPropertyValue('--comp-pop-width')\n );\n };\n\n describe('Props', () => {\n describe('open', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <q2-popover>\n <div style=\"height: 400px; width: 200px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n\n it('opens the popover when the open property is changed to true', async () => {\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('none');\n expect(popover).not.toHaveAttribute('open');\n\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect((await popoverContainer.getComputedStyle()).display).toEqual('block');\n expect(stateSpy).toHaveReceivedEventDetail({ open: true });\n });\n\n it('closes the popover when the open property is changed to false', async () => {\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('block');\n expect(popover).toHaveAttribute('open');\n\n popover.setProperty('open', false);\n await page.waitForChanges();\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('none');\n expect(popover).not.toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: false });\n });\n\n it('adds and removes the currentDirection and --comp-pop-max-height property', async () => {\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect(popoverContainer).toHaveClass('down');\n expect(popover).toHaveAttribute('open');\n expect(await getPopMaxHeight()).toBe('390px');\n\n popover.setProperty('open', false);\n await page.waitForChanges();\n\n expect(popover).not.toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: false });\n expect(popoverContainer).not.toHaveClass('down');\n expect(await getPopMaxHeight()).toBe('');\n });\n });\n\n describe('direction', () => {\n describe('when provided', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <q2-popover direction=\"up\" id=\"control\">\n <div style=\"height: 400px; width: 200px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n it('sets currentDirection to provided value', async () => {\n expect((await popoverContainer.getComputedStyle()).display).toEqual('none');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect((await popoverContainer.getComputedStyle()).display).toEqual('block');\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).toHaveClass('up');\n });\n });\n });\n });\n\n describe('Events', () => {\n describe('popoverState', () => {\n it('opens the popover when open is passed as true', async () => {\n page = await setup({\n html: `<q2-popover></q2-popover>`,\n });\n\n // await setBodyHeight();\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: true });\n });\n\n it('closes the popover when open is passed as false', async () => {\n page = await setup({\n html: `<q2-popover open></q2-popover>`,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n const stateSpy = await popover.spyOnEvent('popoverStateChanged');\n\n expect(popover).toHaveAttribute('open');\n\n await dispatchPopoverState({ open: false });\n await page.waitForChanges();\n\n expect(popover).not.toHaveAttribute('open');\n expect(stateSpy).toHaveReceivedEventDetail({ open: false });\n });\n });\n });\n\n describe('Methods', () => {\n describe('toggle', () => {\n it('toggles the value of open', async () => {\n const popover = new Q2Popover();\n expect(popover.open).toBeUndefined();\n popover.toggle();\n expect(popover.open).toBe(true);\n popover.toggle();\n expect(popover.open).toBe(false);\n });\n });\n\n describe('scrollContainerTo', () => {\n it('scrolls the container to the given position', async () => {\n page = await setup({\n html: `\n <q2-popover>\n <div style=\"height: 2000px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n\n popover.setProperty('open', true);\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n\n await popover.callMethod('scrollContainerTo', { top: 1000 });\n await page.waitForChanges();\n\n expect(await getNestedElementProperty(page, ['q2-popover', '.container'], 'scrollTop')).toBe(1000);\n\n await popover.callMethod('scrollContainerTo', { top: 0 });\n await page.waitForChanges();\n\n expect(await getNestedElementProperty(page, ['q2-popover', '.container'], 'scrollTop')).toBe(0);\n });\n });\n });\n\n describe('Getters', () => {\n let specPopover: Q2Popover;\n beforeEach(() => {\n specPopover = new Q2Popover();\n });\n\n describe('isModule', () => {\n it('returns false when window top matches window and platformDimensions is not defined', async () => {\n expect(window.top).toBe(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns false when window top does not match window and platformDimensions is not defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n expect(window.top).not.toEqual(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n windowSpy.mockRestore();\n });\n\n it('returns false when window top matches window and platformDimensions is defined', async () => {\n window.Tecton = sampleTectonWindow;\n expect(window.top).toBe(window);\n expect(window.Tecton.platformDimensions).toBeTruthy();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns true when window top does not match window and platformDimensions is defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n windowSpy.mockRestore();\n });\n });\n });\n\n describe('determinePopDirection', () => {\n describe('when control element has more space below it', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 44px; width: 400px; background: black; position: fixed; top: 10px;\" id=\"control\"></div>\n <q2-popover>\n <div style=\"height: 500px\"></div>\n </q2-popover>\n `,\n });\n // await setBodyHeight();\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n it('auto-determines the direction to be down', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('up');\n expect(popoverContainer).toHaveClass('down');\n });\n it('sets currentDirection state variable to down', async () => {\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('up');\n expect(popoverContainer).toHaveClass('down');\n });\n it('displays popover content within viewport', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n const containerStyle = await popoverContainer.getComputedStyle();\n const maxHeight = parseInt(await getPopMaxHeight());\n expect(parseInt(containerStyle.height)).toBeLessThan(400);\n expect(maxHeight).toBeLessThan(400);\n });\n });\n\n describe('when control element has more space above it', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 44px; width: 400px; background: black; position: fixed; top: 350px\" id=\"control\"></div>\n <q2-popover>\n <div style=\"height: 500px\"></div>\n </q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n it('auto-determines the direction to be up', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('down');\n expect(popoverContainer).toHaveClass('up');\n });\n it('sets currentDirection state variable to up', async () => {\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).not.toHaveClass('down');\n expect(popoverContainer).toHaveClass('up');\n });\n it('displays popover content within viewport', async () => {\n expect(popover).not.toHaveAttribute('direction');\n expect(popover).not.toHaveAttribute('open');\n\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n\n const containerStyle = await popoverContainer.getComputedStyle();\n const maxHeight = parseInt(await getPopMaxHeight());\n expect(parseInt(containerStyle.height)).toBeLessThan(400);\n expect(maxHeight).toBeLessThan(400);\n });\n });\n\n describe('when page is resized', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 50px; \" id=\"control\"></div>\n <q2-popover block>\n <div style=\"height: 800px\"></div>\n <q2-popover>\n `,\n });\n await page.setViewport({ width: 800, height: 800 });\n await page.waitForChanges();\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n\n it('recalculates the width when block is true', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n\n let width = await getPopWidth();\n expect(parseInt(width)).toBeLessThan(800);\n\n await page.setViewport({ width: 200, height: 600 });\n await page.waitForChanges();\n\n width = await getPopWidth();\n expect(parseInt(width)).toBeLessThan(200);\n });\n\n it('recalculates the max-height when page orientation changes', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n\n let maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).toBeLessThan(800);\n\n await page.setViewport({ width: 800, height: 600, isLandscape: true });\n await page.waitForChanges();\n\n maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).toBeLessThan(600);\n });\n\n it('does not recalculate the max-height when the viewport is resized', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n\n let maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).toBeLessThan(800);\n\n await page.setViewport({ width: 800, height: 600 });\n await page.waitForChanges();\n\n maxHeight = await getPopMaxHeight();\n expect(parseInt(maxHeight)).not.toBeLessThan(600);\n });\n });\n\n describe('when page is scrolled', () => {\n beforeEach(async () => {\n page = await setup({\n html: `\n <div style=\"height: 300px\"></div>\n <div style=\"height: 50px; width: 200px; background: black;\" id=\"control\"></div>\n <q2-popover>\n <div style=\"height: 800px\"></div>\n </q2-popover>\n <div> style=\"height: 500px\"</div>\n `,\n });\n await page.setViewport({ width: 800, height: 400 });\n await page.waitForChanges();\n\n popover = await page.find('q2-popover');\n popoverContainer = await page.find('q2-popover >>> .container');\n await page.$eval('q2-popover', (el: HTMLQ2PopoverElement) => {\n const controlElement = document.querySelector<HTMLElement>('#control');\n el.controlElement = controlElement;\n });\n });\n\n it('maintains its current direction until closed', async () => {\n expect(popover).not.toHaveAttribute('open');\n await dispatchPopoverState({ open: true });\n await page.waitForChanges();\n expect(popover).toHaveAttribute('open');\n expect(popoverContainer).toHaveClass('up');\n // Scroll down 300px\n await page.$eval('#control', () => {\n window.scrollBy(0, 300);\n window.visualViewport.dispatchEvent(new Event('scroll'));\n });\n await page.waitForChanges();\n expect(popoverContainer).toHaveClass('up');\n });\n });\n\n describe('when in a module', () => {\n let specPopover: Q2Popover;\n let windowSpy: jest.SpyInstance;\n let controlElement: HTMLDivElement;\n let containerElement: HTMLDivElement;\n\n beforeEach(async () => {\n specPopover = new Q2Popover();\n windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n\n controlElement = document.createElement('div');\n specPopover.controlElement = controlElement;\n\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n });\n\n afterEach(() => {\n windowSpy.mockRestore();\n });\n\n describe(\"when the module is taller than the window's viewport\", () => {\n beforeEach(() => {\n specPopover.open = true;\n window.visualViewport = { height: 1200 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('700px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('590px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n\n describe('when the outletOffset is less than 0', () => {\n beforeEach(() => {\n window.Tecton = {\n ...sampleTectonWindow,\n platformDimensions: { ...samplePlatformDimensions, outletOffset: -50 },\n };\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('770px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('540px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n\n describe(\"when the module is shorter than the window's viewport\", () => {\n beforeEach(() => {\n specPopover.open = true;\n window.visualViewport = { height: 600 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('520px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 500,\n bottom: 550,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('490px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n });\n\n describe('Accessibility', () => {\n it('does not hide q2-option elements from a screen reader (TCT-2080)', async () => {\n page = await setup({\n html: `\n <q2-popover open>\n <q2-option-list>\n <q2-option value=\"1\">Account 1</q2-option>\n <q2-option value=\"2\">Account 2</q2-option>\n <q2-option value=\"3\">Account 3</q2-option>\n </q2-option-list>\n <q2-popover>\n `,\n });\n\n const snapshot = await page.accessibility.snapshot({\n root: await page.$('q2-option'),\n });\n\n expect(snapshot.name).toEqual('Account 1');\n });\n });\n describe('Deprecations', () => {\n describe('calls console.warn for deprecated `minHeight` prop', () => {\n it('by using handleDeprecationWarning if set on popover element', async () => {\n const warnMock = jest.spyOn(console, 'warn');\n page = await setup({ html: `<q2-popover min-height=\"100\"></q2-popover>` });\n await page.waitForChanges();\n expect(warnMock).toHaveBeenCalledTimes(1);\n warnMock.mockReset();\n });\n it('by using handleDeprecationWarning if set after componentDidLoad', async () => {\n const warnMock = jest.spyOn(console, 'warn');\n page = await setup({ html: `<q2-popover></q2-popover>` });\n popover = await page.find('q2-popover');\n expect(warnMock).toHaveBeenCalledTimes(0);\n popover.setAttribute('min-height', '100');\n await page.waitForChanges();\n expect(warnMock).toHaveBeenCalledTimes(1);\n warnMock.mockReset();\n });\n });\n });\n});\n"]}
@@ -43,6 +43,7 @@ export declare class Q2Popover implements ComponentInterface {
43
43
  }>): void;
44
44
  handleMinHeight: () => void;
45
45
  viewPortChanged: () => void;
46
+ viewPortOrientationChanged: () => void;
46
47
  addViewportListeners(): void;
47
48
  removeViewportListeners(): void;
48
49
  setCSSProperties: () => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q2-tecton-elements",
3
- "version": "1.43.2",
3
+ "version": "1.43.4",
4
4
  "description": "Q2 Tecton Custom Elements",
5
5
  "license": "MIT",
6
6
  "author": "Q2 Tecton Team",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@stencil/core": "4.18.0",
36
- "q2-tecton-common": "1.43.2",
36
+ "q2-tecton-common": "1.43.4",
37
37
  "swiper": "8.4.4"
38
38
  },
39
39
  "devDependencies": {
@@ -54,5 +54,5 @@
54
54
  "typescript": "5.4.5",
55
55
  "typescript-eslint": "^7.11.0"
56
56
  },
57
- "gitHead": "72f4390ddb07ad5601896fdf46dc1eacb80a4107"
57
+ "gitHead": "d13c09601235d9649ffea3398313ecf5c2eff362"
58
58
  }
@@ -1,2 +0,0 @@
1
- import{r as t,h as e,F as i,g as n}from"./p-8013d83b.js";import{a as s,h as o,i as r,o as d,l as h}from"./p-38dda948.js";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}: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 l=a;const c=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=t=>{if(t.target.localName!=="q2-dropdown-item"){return}const e=t.target;if(!e.disabled&&!e.separator){this.focusToggle();this.closeDropdown()}};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(){s(this,"popDirection","popoverDirection")}alignmentHandler(){s(this,"alignment","popoverAlignment")}ariaLabelHandler(){o(this)}nameHandler(){this.orchestrateResolvedMenuItems()}contextHandler(){this.orchestrateResolvedMenuItems()}contextValueHandler(){this.orchestrateResolvedMenuItems()}resolvedTypeHandler(){this.orchestrateResolvedMenuItems()}additionalContextHandler(){this.orchestrateResolvedMenuItems()}delegateFocus(t){if(!r(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();d(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:"1f10766056c715e8ec3f6873dbaffa6072089bb2",class:this.open?"dropdown-open":"",onChange:this.onClickElsewhere,"test-id":"dropdownContainer"},e("q2-btn",{key:"8b5f50c20803982b7dc4a3f7824f9c8dfb0f2d63",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?h(this.label):undefined,hideLabel:this.hideLabel,ariaHasPopup:"menu","test-id":"dropdownButton",block:this.block,description:h("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"},h(this.label)))),e("q2-popover",{key:"f637ee3ce875d337dda602fb69a0bec184cd27f2",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:"a1b429c87342a7d0579970d7ddbbaf70ecfb1c88",onClick:this.onDropdownMenuClick,onKeyDown:this.onDropdownMenuKeydown},e("slot",{key:"903161306b08411bc16b55c3eadb254e7b443e65"}),this.open&&e("q2-btn",{key:"8144e4b5e22b0fd3cdb55feb19c12195178c6fa6",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"]}}};c.style=l;export{c as q2_dropdown};
2
- //# sourceMappingURL=p-15ee9779.entry.js.map
@@ -1 +0,0 @@
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","item","disabled","separator","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 { 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"],"mappings":"yHAAA,MAAMA,EAAgB,u1BACtB,MAAAC,EAAeD,E,MCIFE,EAAU,M,yBAyFnBC,KAAAC,qBAA+B,oDAiL/BD,KAAAE,YAAc,KACVF,KAAKG,eAAeC,WAAWC,cAAiC,UAAUC,OAAO,EAGrFN,KAAAO,aAAe,KACX,GAAIP,KAAKQ,KAAM,OACfR,KAAKQ,KAAO,IAAI,EAGpBR,KAAAS,cAAgB,KACZ,IAAKT,KAAKQ,KAAM,OAChBR,KAAKQ,KAAO,KAAK,EAGrBR,KAAAU,iBAAoBC,IAChB,MAAM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83b.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:2147483647;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.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+window.scrollX;const p=window.visualViewport.width-c-window.scrollX;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});(t=screen===null||screen===void 0?void 0:screen.orientation)===null||t===void 0?void 0:t.addEventListener("change",(()=>{this.orientationChanged=true}));window.addEventListener("orientationchange",(()=>{this.orientationChanged=true}))}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.orientationChanged=false}));window.removeEventListener("orientationchange",(()=>{this.orientationChanged=false}))}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;switch(r!==null&&r!==void 0?r:u){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:"b19c04be242e3f6c3334da2090f525bb84b18eca",ref:t=>this.containerElement=t,class:t.join(" "),"test-id":"outerContainer"},e("div",{key:"f648516815e4b228b26bcf2bc2994756160a409f",ref:t=>this.contentElement=t,class:"content"},e("slot",{key:"ad73fe4bb2fee5bf5c2e8a0be4ff34602eacbfa0"})))}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-295d9418.entry.js.map