@momentum-ui/web-components 2.23.1 → 2.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1439.js +1 -1
- package/dist/8004.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.js +6 -6
- package/dist/comp/md-popover-entry.js +4 -4
- package/dist/index-entry.js +5 -5
- package/dist/types/components/combobox/ComboBox.d.ts +1 -1
- package/dist/types/components/popover/Popover.constants.d.ts +1 -0
- package/dist/types/components/popover/Popover.d.ts +28 -1
- package/dist/types/components/popover/Popover.stack.d.ts +10 -0
- package/dist/types/components/popover/Popover.types.d.ts +7 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/1439.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1439,3820,6677,9058],{66677:(o,t
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1439,3820,6677,9058],{66677:(o,n,t)=>{function e(o,n=document){var t;const r=n instanceof ShadowRoot||n instanceof Document?n.querySelector(o):null===(t=n.shadowRoot)||void 0===t?void 0:t.querySelector(o);if(r)return r;const l=Array.from(n.querySelectorAll("*")).map((o=>{var n;return null!==(n=o.shadowRoot)&&void 0!==n?n:null})).filter((o=>null!==o));for(const n of l){const t=e(o,n);if(t)return t}return null}function r(o,n=document){if(n instanceof ShadowRoot||n instanceof Document){const t=n.getElementById(o);if(t)return t}const t=Array.from(n.querySelectorAll("*")).map((o=>{var n;return null!==(n=o.shadowRoot)&&void 0!==n?n:null})).filter((o=>null!==o));for(const n of t){const t=r(o,n);if(t)return t}return null}t.d(n,{XI:()=>r,qi:()=>e})}}]);
|
package/dist/8004.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8004],{3998:(e,o,t)=>{t.d(o,{S:()=>r});const r=new class{constructor(){this.stack=[]}push(e){this.stack.push(e)}pop(){return this.stack.pop()}peek(){return this.stack[this.stack.length-1]}remove(e){this.stack=this.stack.filter((o=>o!==e))}clear(){this.stack=[]}}},33759:(e,o,t)=>{t.d(o,{h:()=>i});var r=t(66677);class i{constructor(e){this.arrowPixelChange=!1,this.originalParent=null,this.originalNextSibling=null,this.popover=e}setupDelay(){try{const[e,o]=this.popover.delay.split(",").map((e=>{const o=parseInt(e,10);if(Number.isNaN(o)||o<0)throw new Error(`Invalid delay value: ${e}`);return o}));return[e,o]}catch(e){return this.popover.delay="0,0",[0,0]}}setupHoverBridge(e){const o=this.popover.renderRoot.querySelector(".popover-hover-bridge");Object.assign(o.style,{top:"",left:"",right:"",bottom:""});const t=`calc(${this.popover.showArrow?"0.75rem + ":""}${this.popover.offset}px)`,r=this.popover.offsetHeight||0,i=this.popover.offsetWidth||0,p=!!this.popover.appendTo&&this.originalParent;if(o){const s=e.split("-")[0];switch(p&&this.popover.trigger.includes("mouseenter")&&o.addEventListener("mouseenter",this.popover.cancelCloseDelay),s){case"top":o.style.height=t,o.style.bottom=`calc(-1 * (${t}))`,o.style.left="50%",o.style.width=`${i}px`;break;case"left":o.style.height=`${r}px`,o.style.width=t,o.style.right=`calc(-1.5 * (${t}))`;break;case"right":o.style.height=`${r}px`,o.style.width=t,o.style.left=`calc(-0.5 * (${t}))`;break;default:o.style.height=t,o.style.top=`calc(-1 * (${t}))`,o.style.left="50%",o.style.width=`${i}px`}}}handleAppendTo(e){if(this.popover.appendTo)if(e){this.originalParent=this.popover.parentNode,this.originalNextSibling=this.popover.nextSibling;const e=(0,r.XI)(this.popover.appendTo,document);if(e&&(this.popover.removeEventListeners(),e.appendChild(this.popover),this.popover.setupTriggerListener(),this.popover.trigger.includes("mouseenter"))){const e=this.popover.renderRoot.querySelector(".popover-hover-bridge");e&&e.addEventListener("mouseenter",this.popover.cancelCloseDelay)}}else this.originalParent&&(this.popover.removeEventListeners(),this.originalNextSibling?this.originalParent.insertBefore(this.popover,this.originalNextSibling):this.originalParent.appendChild(this.popover),this.popover.setupTriggerListener())}setupAccessibility(){var e,o,t;"dialog"!==this.popover.role&&"alertdialog"!==this.popover.role||this.popover.toggleAttribute("aria-modal",this.popover.interactive),this.popover.interactive?(this.popover.setAttribute("aria-modal","true"),this.popover.ariaLabel||(this.popover.ariaLabel=(null===(e=this.popover.triggerElement)||void 0===e?void 0:e.ariaLabel)||(null===(o=this.popover.triggerElement)||void 0===o?void 0:o.textContent)||""),this.popover.ariaLabelledby||(this.popover.ariaLabelledby=(null===(t=this.popover.triggerElement)||void 0===t?void 0:t.id)||"")):this.popover.removeAttribute("aria-modal")}updateAriaHasPopupAttribute(){var e,o,t;this.popover.interactive?null===(e=this.popover.triggerElement)||void 0===e||e.setAttribute("aria-haspopup",(null===(o=this.popover.triggerElement)||void 0===o?void 0:o.getAttribute("aria-haspopup"))||"dialog"):null===(t=this.popover.triggerElement)||void 0===t||t.removeAttribute("aria-haspopup")}updateAriaExpandedAttribute(){var e,o;this.popover.disableAriaExpanded?null===(e=this.popover.triggerElement)||void 0===e||e.removeAttribute("aria-expanded"):null===(o=this.popover.triggerElement)||void 0===o||o.setAttribute("aria-expanded",`${this.popover.visible}`)}updateArrowStyle(e,o){var t;if(!this.popover.arrowElement)return;const r=o.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[r],{x:p,y:s}=e,a=this.popover.arrowElement.getBoundingClientRect(),n=null===(t=this.popover.arrowElement.offsetParent)||void 0===t?void 0:t.getBoundingClientRect();if(!this.arrowPixelChange){const e=(null==n?void 0:n[i])?12-Math.abs(a[i]-n[i]):0;1===Math.round(e)?this.arrowPixelChange=!0:this.arrowPixelChange=!1}const
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8004],{3998:(e,o,t)=>{t.d(o,{S:()=>r});const r=new class{constructor(){this.stack=[]}push(e){this.stack.push(e)}pop(){return this.stack.pop()}removeItem(e){this.stack=this.stack.filter((o=>o!==e))}peek(){return this.stack[this.stack.length-1]}remove(e){this.stack=this.stack.filter((o=>o!==e))}clear(){this.stack=[]}shouldDeferToTopForOutsideClick(e){const o=this.peek();return!(!o||o===e||!(o.triggerElement&&e.contains(o.triggerElement)||e.triggerElement&&o.contains(e.triggerElement)))}}},33759:(e,o,t)=>{t.d(o,{h:()=>i});var r=t(66677);class i{constructor(e){this.arrowPixelChange=!1,this.originalParent=null,this.originalNextSibling=null,this.popover=e}setupDelay(){try{const[e,o]=this.popover.delay.split(",").map((e=>{const o=parseInt(e,10);if(Number.isNaN(o)||o<0)throw new Error(`Invalid delay value: ${e}`);return o}));return[e,o]}catch(e){return this.popover.delay="0,0",[0,0]}}setupHoverBridge(e){const o=this.popover.renderRoot.querySelector(".popover-hover-bridge");Object.assign(o.style,{top:"",left:"",right:"",bottom:""});const t=`calc(${this.popover.showArrow?"0.75rem + ":""}${this.popover.offset}px)`,r=this.popover.offsetHeight||0,i=this.popover.offsetWidth||0,p=!!this.popover.appendTo&&this.originalParent;if(o){const s=e.split("-")[0];switch(p&&this.popover.trigger.includes("mouseenter")&&o.addEventListener("mouseenter",this.popover.cancelCloseDelay),s){case"top":o.style.height=t,o.style.bottom=`calc(-1 * (${t}))`,o.style.left="50%",o.style.width=`${i}px`;break;case"left":o.style.height=`${r}px`,o.style.width=t,o.style.right=`calc(-1.5 * (${t}))`;break;case"right":o.style.height=`${r}px`,o.style.width=t,o.style.left=`calc(-0.5 * (${t}))`;break;default:o.style.height=t,o.style.top=`calc(-1 * (${t}))`,o.style.left="50%",o.style.width=`${i}px`}}}handleAppendTo(e){if(this.popover.appendTo)if(e){this.originalParent=this.popover.parentNode,this.originalNextSibling=this.popover.nextSibling;const e=(0,r.XI)(this.popover.appendTo,document);if(e&&(this.popover.removeEventListeners(),e.appendChild(this.popover),this.popover.setupTriggerListener(),this.popover.trigger.includes("mouseenter"))){const e=this.popover.renderRoot.querySelector(".popover-hover-bridge");e&&e.addEventListener("mouseenter",this.popover.cancelCloseDelay)}}else this.originalParent&&(this.popover.removeEventListeners(),this.originalNextSibling?this.originalParent.insertBefore(this.popover,this.originalNextSibling):this.originalParent.appendChild(this.popover),this.popover.setupTriggerListener())}setupAccessibility(){var e,o,t;"dialog"!==this.popover.role&&"alertdialog"!==this.popover.role||this.popover.toggleAttribute("aria-modal",this.popover.interactive),this.popover.interactive?(this.popover.setAttribute("aria-modal","true"),this.popover.ariaLabel||(this.popover.ariaLabel=(null===(e=this.popover.triggerElement)||void 0===e?void 0:e.ariaLabel)||(null===(o=this.popover.triggerElement)||void 0===o?void 0:o.textContent)||""),this.popover.ariaLabelledby||(this.popover.ariaLabelledby=(null===(t=this.popover.triggerElement)||void 0===t?void 0:t.id)||"")):this.popover.removeAttribute("aria-modal")}updateAriaHasPopupAttribute(){var e,o,t;this.popover.interactive?null===(e=this.popover.triggerElement)||void 0===e||e.setAttribute("aria-haspopup",(null===(o=this.popover.triggerElement)||void 0===o?void 0:o.getAttribute("aria-haspopup"))||"dialog"):null===(t=this.popover.triggerElement)||void 0===t||t.removeAttribute("aria-haspopup")}updateAriaExpandedAttribute(){var e,o;this.popover.disableAriaExpanded?null===(e=this.popover.triggerElement)||void 0===e||e.removeAttribute("aria-expanded"):null===(o=this.popover.triggerElement)||void 0===o||o.setAttribute("aria-expanded",`${this.popover.visible}`)}updateArrowStyle(e,o){var t;if(!this.popover.arrowElement)return;const r=o.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[r],{x:p,y:s}=e,a=this.popover.arrowElement.getBoundingClientRect(),n=null===(t=this.popover.arrowElement.offsetParent)||void 0===t?void 0:t.getBoundingClientRect();if(!this.arrowPixelChange){const e=(null==n?void 0:n[i])?12-Math.abs(a[i]-n[i]):0;1===Math.round(e)?this.arrowPixelChange=!0:this.arrowPixelChange=!1}const l=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",r),Object.assign(this.popover.arrowElement.style,{left:null!=p?`${p}px`:"",top:null!=s?`${s}px`:"",[i]:-this.popover.arrowElement.offsetHeight/2-l+"px"})}updatePopoverStyle(e,o){Object.assign(this.popover.style,{left:`${e}px`,top:`${o}px`})}createBackdrop(){var e;if(!this.popover.backdropElement){const o=document.createElement("div");o.classList.add("popover-backdrop"),null===(e=this.popover.parentElement)||void 0===e||e.appendChild(o);const t=document.createElement("style");t.textContent=`\n .popover-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n z-index: ${this.popover.zIndex-1};\n }\n `,o.appendChild(t),this.popover.backdropElement=o}}}},36365:(e,o,t)=>{t.d(o,{T:()=>r});class r{static dispatchPopoverEvent(e,o){o.dispatchEvent(new CustomEvent(e,{detail:{show:o.visible},composed:!0,bubbles:!0}))}static onShowPopover(e){this.dispatchPopoverEvent("shown",e)}static onHidePopover(e){this.dispatchPopoverEvent("hidden",e)}static onCreatedPopover(e){this.dispatchPopoverEvent("created",e)}static onDestroyedPopover(e){this.dispatchPopoverEvent("destroyed",e)}}},50325:(e,o,t)=>{t.d(o,{A:()=>r});const r=t(41488).css`:host{--md-popover-arrow-border-radius:0.1875rem;--md-popover-arrow-border:0.0625rem solid var(--popover-border-color);--md-popover-elevation-3:var(--md-elevation-3);--md-popover-max-width:max-content;--md-popover-max-height:auto;--md-popover-position:absolute;display:none;position:var(--md-popover-position);top:0;left:0;box-sizing:content-box;background-color:var(--popover-bg-color);border-radius:.5rem;border:.0625rem solid var(--popover-border-color);filter:var(--md-popover-elevation-3);width:var(--md-popover-max-width)}:host([strategy=fixed]){--md-popover-position:fixed}:host([visible]){display:block}:host([color=contrast]){background-color:var(--popover-inverted-bg-color);border-color:var(--popover-inverted-border-color);color:var(--popover-inverted-text-color)}:host([color=contrast]) .popover-arrow{background-color:var(--popover-inverted-bg-color);border-color:var(--popover-inverted-border-color)}:host([color=contrast]) .popover-close{color:var(--popover-inverted-text-color)}:host::part(popover-content){position:relative;padding:.75rem;min-width:max-content;z-index:9998;max-height:var(--md-popover-max-height)}.popover-hover-bridge{position:absolute;transform:translateX(-50%);background:rgba(0,0,0,0);pointer-events:auto}.popover-arrow{position:absolute;width:1rem;height:1rem;background-color:var(--popover-bg-color);transform:rotate(45deg);pointer-events:none;border:var(--md-popover-arrow-border)}.popover-close{position:absolute;right:.75rem;top:.75rem;cursor:pointer;z-index:9999;padding-left:.5rem;width:1.25rem;height:1.25rem}.popover-arrow[data-side=top]{border-top:none;border-left:none;border-bottom-right-radius:var(--md-popover-arrow-border-radius);border-top-left-radius:100%}.popover-arrow[data-side=bottom]{border-bottom:none;border-right:none;border-top-left-radius:var(--md-popover-arrow-border-radius);border-bottom-right-radius:100%}.popover-arrow[data-side=right]{border-top:none;border-right:none;border-bottom-left-radius:var(--md-popover-arrow-border-radius);border-top-right-radius:100%}.popover-arrow[data-side=left]{border-bottom:none;border-left:none;border-top-right-radius:var(--md-popover-arrow-border-radius);border-bottom-left-radius:100%}`},68419:(e,o,t)=>{t.d(o,{ME:()=>r,o$:()=>p,tr:()=>i,zY:()=>s});const r={LEFT_START:"left-start",LEFT:"left",LEFT_END:"left-end",RIGHT_START:"right-start",RIGHT:"right",RIGHT_END:"right-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end",BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end"},i={CLICK:"click",MOUSEENTER:"mouseenter",FOCUSIN:"focusin",MANUAL:"manual"},p={TONAL:"tonal",CONTRAST:"contrast"},s={PLACEMENT:r.BOTTOM,STRATEGY:"absolute",TRIGGER:i.CLICK,COLOR:p.TONAL,OFFSET:4,VISIBLE:!1,ARROW:!1,CLOSE_BUTTON:!1,FOCUS_TRAP:!1,INTERACTIVE:!1,PREVENT_SCROLL:!1,HIDE_ON_ESCAPE:!1,HIDE_ON_BLUR:!1,HIDE_ON_WINDOW_BLUR:!1,HIDE_ON_CLICK_OUTSIDE:!1,FOCUS_BACK:!1,BACKDROP:!1,FLIP:!0,SIZE:!1,DELAY:"0,0",ROLE:"dialog",Z_INDEX:1e3,DISABLE_ARIA_EXPANDED:!1}}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@floating-ui/dom","lit-html/directives/if-defined.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["@floating-ui/dom"],e["lit-html/directives/if-defined.js"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,o,s,n,l,a
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@floating-ui/dom","lit-html/directives/if-defined.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["@floating-ui/dom"],e["lit-html/directives/if-defined.js"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,o,s,n,l,h,a)=>(()=>{"use strict";var p,d={5784:e=>{e.exports=h},8229:e=>{e.exports=t},23968:e=>{e.exports=r},29895:(e,t,i)=>{i.r(t),i.d(t,{CoachmarkPopover:()=>r}),i(96798),i(61200),i(71128);var r,o=i(31890),s=i(26272),n=i(41488),l=i(23968),h=i(40587),a=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.placement="bottom",this.triggerID="",this.headerIconName=void 0,this.header=void 0,this.message=void 0,this.show=!1,this.hideCloseButton=!1,this.href="",this.slotContent=null}static get styles(){return[s.A,h.A]}connectedCallback(){super.connectedCallback()}notifyCustomEvent(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:{placement:this.placement,triggerComponent:this.triggerComponent,popper:this.popper}}))}notifyCoachCreate(){this.notifyCustomEvent("coach-create")}notifyPrimaryButtonAction(){this.notifyCustomEvent("primary-button-action")}notifySecondaryButtonAction(){this.notifyCustomEvent("secondary-button-action")}notifyLinkAction(){this.notifyCustomEvent("link-action")}notifyCoachClose(){this.notifyCustomEvent("coachmark-close")}handleSlotChange(e){const t=e.target;if(t){const e=t.assignedElements({flatten:!0});e.length&&(this.slotContent=e)}}updated(e){super.updated(e),e.has("show")&&(this.show?this.notifyCoachCreate():this.notifyCoachClose())}coachmarkContentTemplate(){return n.html`
|
|
2
2
|
<div class="md-coachmark__content">
|
|
3
3
|
${this.message?this.message:n.html` <slot name="coachmark-content" @slotchange=${this.handleSlotChange}></slot> `}
|
|
4
4
|
</div>
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
${this.renderHeader()} ${this.renderBody()} ${this.renderFooter()}
|
|
51
51
|
</div>
|
|
52
52
|
</md-popover>
|
|
53
|
-
`}};h([(0,n.property)({type:String})],t.prototype,"placement",void 0),h([(0,n.property)({type:String,reflect:!0})],t.prototype,"triggerID",void 0),h([(0,n.property)({type:String})],t.prototype,"headerIconName",void 0),h([(0,n.property)({type:String})],t.prototype,"header",void 0),h([(0,n.property)({type:String})],t.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],t.prototype,"show",void 0),h([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],t.prototype,"hideCloseButton",void 0),h([(0,n.property)({type:String})],t.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],t.prototype,"secondaryButton",void 0),h([(0,n.property)({type:String})],t.prototype,"linkText",void 0),h([(0,n.property)({type:String})],t.prototype,"href",void 0),h([(0,n.query)(".md-coachmark__trigger-component")],t.prototype,"triggerComponent",void 0),h([(0,n.query)(".md-coachmark__popper")],t.prototype,"popper",void 0),t=h([(0,o.w)("md-coachmark-popover")],t),e.ELEMENT=t}(r||(r={}))},32022:e=>{e.exports=s},40333:e=>{e.exports=i},41488:t=>{t.exports=e},60554:e=>{e.exports=n},71128:(e,t,i)=>{i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),n=i(5784),l=i(41488),a=i(40333),h=i(73679),p=i(68419),c=i(36365),d=i(3998),u=i(33759),m=i(50325),v=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},g=function(e,t,i,r){return new(i||(i=Promise))((function(o,s){function n(e){try{a(r.next(e))}catch(e){s(e)}}function l(e){try{a(r.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,l)}a((r=r.apply(e,t||[])).next())}))};let y=class extends((0,o.d)(l.LitElement)){constructor(){super(),this.id="",this.triggerID="",this.trigger=p.zY.TRIGGER,this.placement=p.zY.PLACEMENT,this.strategy=p.zY.STRATEGY,this.color=p.zY.COLOR,this.visible=p.zY.VISIBLE,this.offset=p.zY.OFFSET,this.focusTrap=p.zY.FOCUS_TRAP,this.preventScroll=p.zY.PREVENT_SCROLL,this.showArrow=p.zY.ARROW,this.closeButton=p.zY.CLOSE_BUTTON,this.interactive=p.zY.INTERACTIVE,this.delay=p.zY.DELAY,this.hideOnEscape=p.zY.HIDE_ON_ESCAPE,this.hideOnBlur=p.zY.HIDE_ON_BLUR,this.hideOnOutsideClick=p.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=p.zY.FOCUS_BACK,this.backdrop=p.zY.BACKDROP,this.flip=p.zY.FLIP,this.size=p.zY.SIZE,this.zIndex=p.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=p.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=p.zY.DISABLE_ARIA_EXPANDED,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.onOutsidePopoverClick=e=>{if(d.S.peek()!==this)return;const t=e.composedPath(),i=t.includes(this)||this.triggerElement&&t.includes(this.triggerElement),r=!!this.backdropElement&&t.includes(this.backdropElement);i&&!r||this.hidePopover()},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{this.contains(e.relatedTarget)||this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout((()=>{this.visible=!1}),this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout((()=>{this.utils.handleAppendTo(!0),this.visible=!0}),this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{d.S.peek()===this&&setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&this.showPopover(!0)},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return g(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,c.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())}))}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return g(this,void 0,void 0,(function*(){e.disconnectedCallback.call(this),this.removeEventListeners(),c.T.onDestroyedPopover(this),d.S.remove(this)}))}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return g(this,void 0,void 0,(function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(p.ME).includes(this.placement)?this.placement:p.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter((e=>Object.values(p.tr).includes(e)));this.setAttribute("trigger",e.length>0?this.trigger:p.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(p.o$).includes(this.color)?this.color:p.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()}))}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return g(this,void 0,void 0,(function*(){var r,o,s,n;if(e!==t&&this.triggerElement)if(t)d.S.peek()!==this&&d.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),c.T.onShowPopover(this);else{if(d.S.pop(),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(null===(n=this.setFocusOnTrigger)||void 0===n||n.call(this,this.triggerElement)),c.T.onHidePopover(this)}}))}isMouseOverTrigger(e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const t=this.triggerElement.getBoundingClientRect(),{clientX:i,clientY:r}=e instanceof MouseEvent?e:{clientX:0,clientY:0};if(i>=t.left&&i<=t.right&&r>=t.top&&r<=t.bottom)return!0}return!1}handleCreatePopoverFirstUpdate(){return g(this,void 0,void 0,(function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))}))}positionPopover(){if(!this.triggerElement)return;const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),(0,n.autoUpdate)(this.triggerElement,this,(()=>g(this,void 0,void 0,(function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}))))}render(){return l.html`
|
|
53
|
+
`}};a([(0,n.property)({type:String})],t.prototype,"placement",void 0),a([(0,n.property)({type:String,reflect:!0})],t.prototype,"triggerID",void 0),a([(0,n.property)({type:String})],t.prototype,"headerIconName",void 0),a([(0,n.property)({type:String})],t.prototype,"header",void 0),a([(0,n.property)({type:String})],t.prototype,"message",void 0),a([(0,n.property)({type:Boolean})],t.prototype,"show",void 0),a([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],t.prototype,"hideCloseButton",void 0),a([(0,n.property)({type:String})],t.prototype,"primaryButton",void 0),a([(0,n.property)({type:String})],t.prototype,"secondaryButton",void 0),a([(0,n.property)({type:String})],t.prototype,"linkText",void 0),a([(0,n.property)({type:String})],t.prototype,"href",void 0),a([(0,n.query)(".md-coachmark__trigger-component")],t.prototype,"triggerComponent",void 0),a([(0,n.query)(".md-coachmark__popper")],t.prototype,"popper",void 0),t=a([(0,o.w)("md-coachmark-popover")],t),e.ELEMENT=t}(r||(r={}))},32022:e=>{e.exports=s},40333:e=>{e.exports=i},41488:t=>{t.exports=e},60554:e=>{e.exports=n},71128:(e,t,i)=>{i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),n=i(5784),l=i(41488),h=i(40333),a=i(73679),p=i(68419),d=i(36365),c=i(3998),u=i(33759),m=i(50325),v=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},g=function(e,t,i,r){return new(i||(i=Promise))((function(o,s){function n(e){try{h(r.next(e))}catch(e){s(e)}}function l(e){try{h(r.throw(e))}catch(e){s(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,l)}h((r=r.apply(e,t||[])).next())}))};let y=class extends((0,o.d)(l.LitElement)){set controller(e){e?(e.show=(e=!1)=>this.showPopover(e),e.hide=()=>this.hidePopover(),e.toggle=()=>this.togglePopoverVisible(),e.isVisible=()=>this.visible,this._controller=e):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=p.zY.TRIGGER,this.placement=p.zY.PLACEMENT,this.strategy=p.zY.STRATEGY,this.color=p.zY.COLOR,this.visible=p.zY.VISIBLE,this.offset=p.zY.OFFSET,this.focusTrap=p.zY.FOCUS_TRAP,this.preventScroll=p.zY.PREVENT_SCROLL,this.showArrow=p.zY.ARROW,this.closeButton=p.zY.CLOSE_BUTTON,this.interactive=p.zY.INTERACTIVE,this.delay=p.zY.DELAY,this.hideOnEscape=p.zY.HIDE_ON_ESCAPE,this.hideOnBlur=p.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=p.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=p.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=p.zY.FOCUS_BACK,this.backdrop=p.zY.BACKDROP,this.flip=p.zY.FLIP,this.size=p.zY.SIZE,this.zIndex=p.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=p.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=p.zY.DISABLE_ARIA_EXPANDED,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.onOutsidePopoverClick=e=>{const t=e.composedPath();t.includes(this)||this.triggerElement&&t.includes(this.triggerElement)||c.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{this.contains(e.relatedTarget)||this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout((()=>{this.visible=!1}),this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout((()=>{this.utils.handleAppendTo(!0),this.visible=!0}),this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&this.showPopover(!0)},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return g(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,d.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())}))}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return g(this,void 0,void 0,(function*(){e.disconnectedCallback.call(this),this._controller=null,this.removeEventListeners(),d.T.onDestroyedPopover(this),c.S.remove(this)}))}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return g(this,void 0,void 0,(function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(p.ME).includes(this.placement)?this.placement:p.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter((e=>Object.values(p.tr).includes(e)));this.setAttribute("trigger",e.length>0?this.trigger:p.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(p.o$).includes(this.color)?this.color:p.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()}))}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return g(this,void 0,void 0,(function*(){var r,o,s,n;if(e!==t&&this.triggerElement)if(t)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),d.T.onShowPopover(this);else{if(c.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(null===(n=this.setFocusOnTrigger)||void 0===n||n.call(this,this.triggerElement)),d.T.onHidePopover(this)}}))}isMouseOverTrigger(e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const t=this.triggerElement.getBoundingClientRect(),{clientX:i,clientY:r}=e instanceof MouseEvent?e:{clientX:0,clientY:0};if(i>=t.left&&i<=t.right&&r>=t.top&&r<=t.bottom)return!0}return!1}handleCreatePopoverFirstUpdate(){return g(this,void 0,void 0,(function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))}))}positionPopover(){if(!this.triggerElement)return;const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),(0,n.autoUpdate)(this.triggerElement,this,(()=>g(this,void 0,void 0,(function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}))))}render(){return l.html`
|
|
54
54
|
<div class="popover-hover-bridge"></div>
|
|
55
55
|
${this.closeButton?l.html` <md-button
|
|
56
56
|
class="popover-close"
|
|
57
57
|
hasRemoveStyle
|
|
58
58
|
size="20"
|
|
59
59
|
circle
|
|
60
|
-
ariaLabel=${(0,
|
|
60
|
+
ariaLabel=${(0,a.ifDefined)(this.closeButtonAriaLabel)||""}
|
|
61
61
|
@button-click="${this.hidePopover}"
|
|
62
62
|
>
|
|
63
63
|
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
64
|
-
</md-button>`:
|
|
65
|
-
${this.showArrow?l.html`<div class="popover-arrow"></div>`:
|
|
64
|
+
</md-button>`:h.nothing}
|
|
65
|
+
${this.showArrow?l.html`<div class="popover-arrow"></div>`:h.nothing}
|
|
66
66
|
<div part="popover-content">
|
|
67
67
|
<slot></slot>
|
|
68
68
|
</div>
|
|
69
|
-
`}static get styles(){return[m.A]}};v([(0,l.property)({type:String,reflect:!0})],y.prototype,"id",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"triggerID",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"trigger",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"placement",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"strategy",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"color",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"visible",void 0),v([(0,l.property)({type:Number,reflect:!0})],y.prototype,"offset",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],y.prototype,"focusTrap",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],y.prototype,"preventScroll",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],y.prototype,"showArrow",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"close-button"})],y.prototype,"closeButton",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"interactive",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"delay",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],y.prototype,"hideOnEscape",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],y.prototype,"hideOnBlur",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],y.prototype,"hideOnOutsideClick",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],y.prototype,"focusBackToTrigger",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"backdrop",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"flip",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"size",void 0),v([(0,l.property)({type:Number,reflect:!0,attribute:"z-index"})],y.prototype,"zIndex",void 0),v([(0,l.property)({type:String,reflect:!0,attribute:"append-to"})],y.prototype,"appendTo",void 0),v([(0,l.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],y.prototype,"closeButtonAriaLabel",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"role",void 0),v([(0,l.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],y.prototype,"ariaLabelledby",void 0),v([(0,l.property)({type:String,reflect:!0,attribute:"aria-describedby"})],y.prototype,"ariaDescribedby",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],y.prototype,"disableAriaExpanded",void 0),y=v([(0,r.w)("md-popover")],y)},73679:e=>{e.exports=
|
|
69
|
+
`}static get styles(){return[m.A]}};v([(0,l.property)({type:String,reflect:!0})],y.prototype,"id",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"triggerID",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"trigger",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"placement",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"strategy",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"color",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"visible",void 0),v([(0,l.property)({type:Number,reflect:!0})],y.prototype,"offset",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],y.prototype,"focusTrap",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],y.prototype,"preventScroll",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],y.prototype,"showArrow",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"close-button"})],y.prototype,"closeButton",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"interactive",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"delay",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],y.prototype,"hideOnEscape",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],y.prototype,"hideOnBlur",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],y.prototype,"hideOnWindowBlur",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],y.prototype,"hideOnOutsideClick",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],y.prototype,"focusBackToTrigger",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"backdrop",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"flip",void 0),v([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,"size",void 0),v([(0,l.property)({type:Number,reflect:!0,attribute:"z-index"})],y.prototype,"zIndex",void 0),v([(0,l.property)({type:String,reflect:!0,attribute:"append-to"})],y.prototype,"appendTo",void 0),v([(0,l.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],y.prototype,"closeButtonAriaLabel",void 0),v([(0,l.property)({type:String,reflect:!0})],y.prototype,"role",void 0),v([(0,l.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],y.prototype,"ariaLabelledby",void 0),v([(0,l.property)({type:String,reflect:!0,attribute:"aria-describedby"})],y.prototype,"ariaDescribedby",void 0),v([(0,l.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],y.prototype,"disableAriaExpanded",void 0),v([(0,l.property)({type:Object,attribute:!1})],y.prototype,"controller",null),y=v([(0,r.w)("md-popover")],y)},73679:e=>{e.exports=a},85314:e=>{e.exports=l},97822:e=>{e.exports=o}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={exports:{}};return d[e](i,i.exports,u),i.exports}u.m=d,p=[],u.O=(e,t,i,r)=>{if(!t){var o=1/0;for(h=0;h<p.length;h++){for(var[t,i,r]=p[h],s=!0,n=0;n<t.length;n++)(!1&r||o>=r)&&Object.keys(u.O).every((e=>u.O[e](t[n])))?t.splice(n--,1):(s=!1,r<o&&(o=r));if(s){p.splice(h--,1);var l=i();void 0!==l&&(e=l)}}return e}r=r||0;for(var h=p.length;h>0&&p[h-1][2]>r;h--)p[h]=p[h-1];p[h]=[t,i,r]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={3413:0,4131:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var r,o,[s,n,l]=i,h=0;if(s.some((t=>0!==e[t]))){for(r in n)u.o(n,r)&&(u.m[r]=n[r]);if(l)var a=l(u)}for(t&&t(i);h<s.length;h++)o=s[h],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(a)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var m=u.O(void 0,[7678,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,8210,1270,3135,8004,1439,587],(()=>u(29895)));return u.O(m)})()));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@floating-ui/dom","lit-html/directives/if-defined.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["@floating-ui/dom"],e["lit-html/directives/if-defined.js"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,o,s,n,l,h,p)=>(()=>{"use strict";var a,d={5784:e=>{e.exports=h},8229:e=>{e.exports=t},23968:e=>{e.exports=r},32022:e=>{e.exports=s},40333:e=>{e.exports=i},41488:t=>{t.exports=e},60554:e=>{e.exports=n},71128:(e,t,i)=>{i.r(t),i.d(t,{Popover:()=>y}),i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),n=i(5784),l=i(41488),h=i(40333),p=i(73679),a=i(68419),d=i(36365),c=i(3998),u=i(33759),v=i(50325),g=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},m=function(e,t,i,r){return new(i||(i=Promise))((function(o,s){function n(e){try{h(r.next(e))}catch(e){s(e)}}function l(e){try{h(r.throw(e))}catch(e){s(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,l)}h((r=r.apply(e,t||[])).next())}))};let y=class extends((0,o.d)(l.LitElement)){constructor(){super(),this.id="",this.triggerID="",this.trigger=a.zY.TRIGGER,this.placement=a.zY.PLACEMENT,this.strategy=a.zY.STRATEGY,this.color=a.zY.COLOR,this.visible=a.zY.VISIBLE,this.offset=a.zY.OFFSET,this.focusTrap=a.zY.FOCUS_TRAP,this.preventScroll=a.zY.PREVENT_SCROLL,this.showArrow=a.zY.ARROW,this.closeButton=a.zY.CLOSE_BUTTON,this.interactive=a.zY.INTERACTIVE,this.delay=a.zY.DELAY,this.hideOnEscape=a.zY.HIDE_ON_ESCAPE,this.hideOnBlur=a.zY.HIDE_ON_BLUR,this.hideOnOutsideClick=a.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=a.zY.FOCUS_BACK,this.backdrop=a.zY.BACKDROP,this.flip=a.zY.FLIP,this.size=a.zY.SIZE,this.zIndex=a.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=a.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=a.zY.DISABLE_ARIA_EXPANDED,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.onOutsidePopoverClick=e=>{if(c.S.peek()!==this)return;const t=e.composedPath(),i=t.includes(this)||this.triggerElement&&t.includes(this.triggerElement),r=!!this.backdropElement&&t.includes(this.backdropElement);i&&!r||this.hidePopover()},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{this.contains(e.relatedTarget)||this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout((()=>{this.visible=!1}),this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout((()=>{this.utils.handleAppendTo(!0),this.visible=!0}),this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&this.showPopover(!0)},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return m(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,d.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())}))}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return m(this,void 0,void 0,(function*(){e.disconnectedCallback.call(this),this.removeEventListeners(),d.T.onDestroyedPopover(this),c.S.remove(this)}))}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return m(this,void 0,void 0,(function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(a.ME).includes(this.placement)?this.placement:a.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter((e=>Object.values(a.tr).includes(e)));this.setAttribute("trigger",e.length>0?this.trigger:a.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(a.o$).includes(this.color)?this.color:a.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()}))}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return m(this,void 0,void 0,(function*(){var r,o,s,n;if(e!==t&&this.triggerElement)if(t)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),d.T.onShowPopover(this);else{if(c.S.pop(),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(null===(n=this.setFocusOnTrigger)||void 0===n||n.call(this,this.triggerElement)),d.T.onHidePopover(this)}}))}isMouseOverTrigger(e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const t=this.triggerElement.getBoundingClientRect(),{clientX:i,clientY:r}=e instanceof MouseEvent?e:{clientX:0,clientY:0};if(i>=t.left&&i<=t.right&&r>=t.top&&r<=t.bottom)return!0}return!1}handleCreatePopoverFirstUpdate(){return m(this,void 0,void 0,(function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))}))}positionPopover(){if(!this.triggerElement)return;const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),(0,n.autoUpdate)(this.triggerElement,this,(()=>m(this,void 0,void 0,(function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}))))}render(){return l.html`
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@floating-ui/dom","lit-html/directives/if-defined.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@floating-ui/dom"),require("lit-html/directives/if-defined.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["@floating-ui/dom"],e["lit-html/directives/if-defined.js"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,o,s,l,n,h,p)=>(()=>{"use strict";var a,d={5784:e=>{e.exports=h},8229:e=>{e.exports=t},23968:e=>{e.exports=r},32022:e=>{e.exports=s},40333:e=>{e.exports=i},41488:t=>{t.exports=e},60554:e=>{e.exports=l},71128:(e,t,i)=>{i.r(t),i.d(t,{Popover:()=>f,PopoverController:()=>y}),i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),l=i(5784),n=i(41488),h=i(40333),p=i(73679),a=i(68419),d=i(36365),c=i(3998),u=i(33759),v=i(50325),g=function(e,t,i,r){var o,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(l=(s<3?o(l):s>3?o(t,i,l):o(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},m=function(e,t,i,r){return new(i||(i=Promise))((function(o,s){function l(e){try{h(r.next(e))}catch(e){s(e)}}function n(e){try{h(r.throw(e))}catch(e){s(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(l,n)}h((r=r.apply(e,t||[])).next())}))};class y{show(e){}hide(){}toggle(){}isVisible(){return!1}}let f=class extends((0,o.d)(n.LitElement)){set controller(e){e?(e.show=(e=!1)=>this.showPopover(e),e.hide=()=>this.hidePopover(),e.toggle=()=>this.togglePopoverVisible(),e.isVisible=()=>this.visible,this._controller=e):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=a.zY.TRIGGER,this.placement=a.zY.PLACEMENT,this.strategy=a.zY.STRATEGY,this.color=a.zY.COLOR,this.visible=a.zY.VISIBLE,this.offset=a.zY.OFFSET,this.focusTrap=a.zY.FOCUS_TRAP,this.preventScroll=a.zY.PREVENT_SCROLL,this.showArrow=a.zY.ARROW,this.closeButton=a.zY.CLOSE_BUTTON,this.interactive=a.zY.INTERACTIVE,this.delay=a.zY.DELAY,this.hideOnEscape=a.zY.HIDE_ON_ESCAPE,this.hideOnBlur=a.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=a.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=a.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=a.zY.FOCUS_BACK,this.backdrop=a.zY.BACKDROP,this.flip=a.zY.FLIP,this.size=a.zY.SIZE,this.zIndex=a.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=a.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=a.zY.DISABLE_ARIA_EXPANDED,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.onOutsidePopoverClick=e=>{const t=e.composedPath();t.includes(this)||this.triggerElement&&t.includes(this.triggerElement)||c.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{this.contains(e.relatedTarget)||this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout((()=>{this.visible=!1}),this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout((()=>{this.utils.handleAppendTo(!0),this.visible=!0}),this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&this.showPopover(!0)},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return m(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,d.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())}))}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return m(this,void 0,void 0,(function*(){e.disconnectedCallback.call(this),this._controller=null,this.removeEventListeners(),d.T.onDestroyedPopover(this),c.S.remove(this)}))}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return m(this,void 0,void 0,(function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(a.ME).includes(this.placement)?this.placement:a.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter((e=>Object.values(a.tr).includes(e)));this.setAttribute("trigger",e.length>0?this.trigger:a.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(a.o$).includes(this.color)?this.color:a.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()}))}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return m(this,void 0,void 0,(function*(){var r,o,s,l;if(e!==t&&this.triggerElement)if(t)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),d.T.onShowPopover(this);else{if(c.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(null===(l=this.setFocusOnTrigger)||void 0===l||l.call(this,this.triggerElement)),d.T.onHidePopover(this)}}))}isMouseOverTrigger(e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const t=this.triggerElement.getBoundingClientRect(),{clientX:i,clientY:r}=e instanceof MouseEvent?e:{clientX:0,clientY:0};if(i>=t.left&&i<=t.right&&r>=t.top&&r<=t.bottom)return!0}return!1}handleCreatePopoverFirstUpdate(){return m(this,void 0,void 0,(function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))}))}positionPopover(){if(!this.triggerElement)return;const e=[(0,l.shift)()];let t=this.offset;if(this.flip&&e.push((0,l.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,l.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,l.arrow)({element:this.arrowElement,padding:12}))}e.push((0,l.offset)(t)),(0,l.autoUpdate)(this.triggerElement,this,(()=>m(this,void 0,void 0,(function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,l.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}))))}render(){return n.html`
|
|
2
2
|
<div class="popover-hover-bridge"></div>
|
|
3
|
-
${this.closeButton?
|
|
3
|
+
${this.closeButton?n.html` <md-button
|
|
4
4
|
class="popover-close"
|
|
5
5
|
hasRemoveStyle
|
|
6
6
|
size="20"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
>
|
|
11
11
|
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
12
12
|
</md-button>`:h.nothing}
|
|
13
|
-
${this.showArrow?
|
|
13
|
+
${this.showArrow?n.html`<div class="popover-arrow"></div>`:h.nothing}
|
|
14
14
|
<div part="popover-content">
|
|
15
15
|
<slot></slot>
|
|
16
16
|
</div>
|
|
17
|
-
`}static get styles(){return[v.A]}};g([(0,
|
|
17
|
+
`}static get styles(){return[v.A]}};g([(0,n.property)({type:String,reflect:!0})],f.prototype,"id",void 0),g([(0,n.property)({type:String,reflect:!0})],f.prototype,"triggerID",void 0),g([(0,n.property)({type:String,reflect:!0})],f.prototype,"trigger",void 0),g([(0,n.property)({type:String,reflect:!0})],f.prototype,"placement",void 0),g([(0,n.property)({type:String,reflect:!0})],f.prototype,"strategy",void 0),g([(0,n.property)({type:String,reflect:!0})],f.prototype,"color",void 0),g([(0,n.property)({type:Boolean,reflect:!0})],f.prototype,"visible",void 0),g([(0,n.property)({type:Number,reflect:!0})],f.prototype,"offset",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],f.prototype,"focusTrap",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],f.prototype,"preventScroll",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],f.prototype,"showArrow",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"close-button"})],f.prototype,"closeButton",void 0),g([(0,n.property)({type:Boolean,reflect:!0})],f.prototype,"interactive",void 0),g([(0,n.property)({type:String,reflect:!0})],f.prototype,"delay",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],f.prototype,"hideOnEscape",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],f.prototype,"hideOnBlur",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],f.prototype,"hideOnWindowBlur",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],f.prototype,"hideOnOutsideClick",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],f.prototype,"focusBackToTrigger",void 0),g([(0,n.property)({type:Boolean,reflect:!0})],f.prototype,"backdrop",void 0),g([(0,n.property)({type:Boolean,reflect:!0})],f.prototype,"flip",void 0),g([(0,n.property)({type:Boolean,reflect:!0})],f.prototype,"size",void 0),g([(0,n.property)({type:Number,reflect:!0,attribute:"z-index"})],f.prototype,"zIndex",void 0),g([(0,n.property)({type:String,reflect:!0,attribute:"append-to"})],f.prototype,"appendTo",void 0),g([(0,n.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],f.prototype,"closeButtonAriaLabel",void 0),g([(0,n.property)({type:String,reflect:!0})],f.prototype,"role",void 0),g([(0,n.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],f.prototype,"ariaLabelledby",void 0),g([(0,n.property)({type:String,reflect:!0,attribute:"aria-describedby"})],f.prototype,"ariaDescribedby",void 0),g([(0,n.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],f.prototype,"disableAriaExpanded",void 0),g([(0,n.property)({type:Object,attribute:!1})],f.prototype,"controller",null),f=g([(0,r.w)("md-popover")],f)},73679:e=>{e.exports=p},85314:e=>{e.exports=n},97822:e=>{e.exports=o}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={exports:{}};return d[e](i,i.exports,u),i.exports}u.m=d,a=[],u.O=(e,t,i,r)=>{if(!t){var o=1/0;for(h=0;h<a.length;h++){for(var[t,i,r]=a[h],s=!0,l=0;l<t.length;l++)(!1&r||o>=r)&&Object.keys(u.O).every((e=>u.O[e](t[l])))?t.splice(l--,1):(s=!1,r<o&&(o=r));if(s){a.splice(h--,1);var n=i();void 0!==n&&(e=n)}}return e}r=r||0;for(var h=a.length;h>0&&a[h-1][2]>r;h--)a[h]=a[h-1];a[h]=[t,i,r]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={3413:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var r,o,[s,l,n]=i,h=0;if(s.some((t=>0!==e[t]))){for(r in l)u.o(l,r)&&(u.m[r]=l[r]);if(n)var p=n(u)}for(t&&t(i);h<s.length;h++)o=s[h],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(p)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var v=u.O(void 0,[7678,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,8210,1270,3135,8004,1439],(()=>u(71128)));return u.O(v)})()));
|
package/dist/index-entry.js
CHANGED
|
@@ -971,7 +971,7 @@
|
|
|
971
971
|
></span>
|
|
972
972
|
${this.step?this.ticksTemplate():d.nothing} ${this.hideValue?d.nothing:this.displayValueTemplate()}
|
|
973
973
|
</div>
|
|
974
|
-
`}};m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"min",void 0),m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"max",void 0),m([(0,l.property)({type:Boolean,attribute:"hide-value"})],e.prototype,"hideValue",void 0),m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"now",null),m([(0,l.property)({type:Number})],e.prototype,"text",void 0),m([(0,l.property)({type:String})],e.prototype,"label",void 0),m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"step",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),m([(0,l.internalProperty)()],e.prototype,"dragging",void 0),e=m([(0,n.w)("md-slider")],e),t.ELEMENT=e}(s||(s={}))},26991:(t,e,i)=>{i.r(e),i.d(e,{Accordion:()=>s.Accordion,AccordionItem:()=>o.AccordionItem,ActivityButton:()=>r.ActivityButton,AdvanceList:()=>n.AdvanceList,Alert:()=>l.Alert,AlertBanner:()=>a.AlertBanner,AudioPlayer:()=>d.AudioPlayer,Avatar:()=>h.Avatar,AvatarType:()=>p,Badge:()=>u.Badge,Breadcrumb:()=>m.Breadcrumb,Button:()=>b.Button,ButtonGroup:()=>y.ButtonGroup,Card:()=>f.Card,CardAi:()=>v.CardAi,CardV2:()=>g.CardV2,ChatMessage:()=>w.ChatMessage,Checkbox:()=>C.Checkbox,CheckboxGroup:()=>x.CheckboxGroup,Chip:()=>S.Chip,Coachmark:()=>E.Coachmark,CoachmarkPopover:()=>$.CoachmarkPopover,CodeEditor:()=>M,ComboBox:()=>D.ComboBox,CompositeAvatar:()=>c.CompositeAvatar,CountryCodePicker:()=>R.CountryCodePicker,DatePicker:()=>z.DatePicker,DatePickerCalendar:()=>F.DatePickerCalendar,DatePickerDay:()=>V.DatePickerDay,DatePickerMonth:()=>j.DatePickerMonth,DatePickerWeek:()=>N.DatePickerWeek,DateRangePicker:()=>_.DateRangePicker,DateTimePicker:()=>B.DateTimePicker,Draggable:()=>U.Draggable,DraggableItem:()=>q.DraggableItem,Dropdown:()=>H.Dropdown,EditableTextfield:()=>
|
|
974
|
+
`}};m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"min",void 0),m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"max",void 0),m([(0,l.property)({type:Boolean,attribute:"hide-value"})],e.prototype,"hideValue",void 0),m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"now",null),m([(0,l.property)({type:Number})],e.prototype,"text",void 0),m([(0,l.property)({type:String})],e.prototype,"label",void 0),m([(0,l.property)({type:Number,reflect:!0})],e.prototype,"step",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),m([(0,l.internalProperty)()],e.prototype,"dragging",void 0),e=m([(0,n.w)("md-slider")],e),t.ELEMENT=e}(s||(s={}))},26991:(t,e,i)=>{i.r(e),i.d(e,{Accordion:()=>s.Accordion,AccordionItem:()=>o.AccordionItem,ActivityButton:()=>r.ActivityButton,AdvanceList:()=>n.AdvanceList,Alert:()=>l.Alert,AlertBanner:()=>a.AlertBanner,AudioPlayer:()=>d.AudioPlayer,Avatar:()=>h.Avatar,AvatarType:()=>p,Badge:()=>u.Badge,Breadcrumb:()=>m.Breadcrumb,Button:()=>b.Button,ButtonGroup:()=>y.ButtonGroup,Card:()=>f.Card,CardAi:()=>v.CardAi,CardV2:()=>g.CardV2,ChatMessage:()=>w.ChatMessage,Checkbox:()=>C.Checkbox,CheckboxGroup:()=>x.CheckboxGroup,Chip:()=>S.Chip,Coachmark:()=>E.Coachmark,CoachmarkPopover:()=>$.CoachmarkPopover,CodeEditor:()=>M,ComboBox:()=>D.ComboBox,CompositeAvatar:()=>c.CompositeAvatar,CountryCodePicker:()=>R.CountryCodePicker,DatePicker:()=>z.DatePicker,DatePickerCalendar:()=>F.DatePickerCalendar,DatePickerDay:()=>V.DatePickerDay,DatePickerMonth:()=>j.DatePickerMonth,DatePickerWeek:()=>N.DatePickerWeek,DateRangePicker:()=>_.DateRangePicker,DateTimePicker:()=>B.DateTimePicker,Draggable:()=>U.Draggable,DraggableItem:()=>q.DraggableItem,Dropdown:()=>H.Dropdown,EditableTextfield:()=>W.EditableTextfield,Favorite:()=>K.Favorite,FloatingButtonBar:()=>Z,FloatingMinimizedModal:()=>J.FloatingMinimizedModal,FloatingModal:()=>tt.FloatingModal,Form:()=>et.Form,Grabber:()=>it.Grabber,HelpText:()=>st.HelpText,Icon:()=>G.Icon,Input:()=>rt.Input,InputFile:()=>ot.InputFile,Label:()=>nt.Label,Link:()=>at.Link,List:()=>lt.List,ListItem:()=>dt.ListItem,Loading:()=>ht.Loading,MeetingAlert:()=>pt.MeetingAlert,Menu:()=>ut.Menu,MenuItem:()=>mt.MenuItem,MenuOverlay:()=>ct.MenuOverlay,Modal:()=>yt.Modal,Pagination:()=>bt.Pagination,PhoneInput:()=>vt.PhoneInput,Popover:()=>gt.Popover,PopoverController:()=>gt.PopoverController,ProgressBar:()=>ft.ProgressBar,Radio:()=>wt.Radio,RadioGroup:()=>Ct.RadioGroup,Slider:()=>xt.Slider,Spinner:()=>St.Spinner,Tab:()=>Tt.Tab,TabPanel:()=>kt.TabPanel,Table:()=>Et.Table,TableAdvanced:()=>$t.TableAdvanced,Tabs:()=>At.Tabs,TaskItem:()=>It.TaskItem,Theme:()=>Lt.Theme,ThemeManager:()=>Rt.ThemeManager,TimePicker:()=>Ot.TimePicker,ToggleSwitch:()=>Mt.ToggleSwitch,Tooltip:()=>Pt.Tooltip,iconUrlManager:()=>Dt.O,themeManager:()=>Rt.themeManager});var s=i(33328),o=i(6779),r=i(94891),n=i(28307),a=i(19479),l=i(74896),d=i(23779),h=i(38028);const p=["bot","group","self","typing",""];var c=i(2207),u=i(63704),m=i(92992),y=i(45629),b=i(96798),v=i(64311),g=i(90827),f=i(10654),w=i(95281),C=i(3664),x=i(55294),S=i(60046),$=i(29895),E=i(46312),T=i(3001),k=i(26272),A=i(45001),I=i.n(A),L=i(41488);const O=L.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:rgba(0,0,0,0);color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (forced-colors:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}@media(forced-colors:active){:host(md-code-editor) .md-code-editor{outline:1px solid CanvasText}:host(md-code-editor) .md-code-editor-header{outline:1px solid CanvasText}}`;var M,P=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends L.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[k.A,O]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const t=this.slotNodes.find((t=>"CODE"===t.tagName));if(t){const e=t.textContent;e&&this.highlightBlock(e)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const t=this.slotUrl.find((t=>t));if(t){const e=t.textContent;e&&this.copyUrl(e)}}}highlightBlock(t){t&&(this.codeBlock.innerText=t),I().highlightElement(this.codeBlock)}copyUrl(t){this.codeUrl.innerText=t,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||this.selectTarget(this.codeUrl)}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(t){console.warn("Copy text failed"),this.copied=!1}}select(t){const e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e&&(e.removeAllRanges(),e.addRange(i))}selectTarget(t){this.select(t),this.copyText()}importLanguage(t){return e=this,s=void 0,r=function*(){try{const{default:e}=yield i(29599)(`./${t}`);I().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},new((o=void 0)||(o=Promise))((function(t,i){function n(t){try{l(r.next(t))}catch(t){i(t)}}function a(t){try{l(r.throw(t))}catch(t){i(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o((function(t){t(i)}))).then(n,a)}l((r=r.apply(e,s||[])).next())}));var e,s,o,r}getAllAcceptTypes(){const t=I().listLanguages();return t.length?t.map((t=>I().getLanguage(`${t}`).aliases)).map((t=>t.map((t=>`.${t}`)))).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(t){super.updated(t),t.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),t.has("acceptTypes")&&this.highlightBlock()}render(){return L.html`
|
|
975
975
|
<div class="md-code-editor" part="code-editor">
|
|
976
976
|
<div class="md-code-editor-header">
|
|
977
977
|
<div class="md-code-editor-name">
|
|
@@ -1004,7 +1004,7 @@
|
|
|
1004
1004
|
</pre>
|
|
1005
1005
|
</div>
|
|
1006
1006
|
</div>
|
|
1007
|
-
`}};P([(0,L.property)({type:String})],e.prototype,"copyLocalization",void 0),P([(0,L.property)({type:String})],e.prototype,"copiedLocalization",void 0),P([(0,L.property)({type:String})],e.prototype,"method",void 0),P([(0,L.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),P([(0,L.property)({type:String})],e.prototype,"url",void 0),P([(0,L.query)("input[type='file']")],e.prototype,"input",void 0),P([(0,L.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),P([(0,L.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),P([(0,L.internalProperty)()],e.prototype,"disableCopyButton",void 0),P([(0,L.internalProperty)()],e.prototype,"acceptTypes",void 0),P([(0,L.internalProperty)()],e.prototype,"copied",void 0),P([(0,L.queryAssignedNodes)("code-block")],e.prototype,"slotNodes",void 0),P([(0,L.queryAssignedNodes)("code-url")],e.prototype,"slotUrl",void 0),e=P([(0,T.wW)("md-code-editor")],e),t.ELEMENT=e}(M||(M={}));var D=i(4928),R=i(18224),_=i(69494),B=i(85416),z=i(38654),F=i(63208),V=i(16754),j=i(17814),N=i(10984),U=i(80072),q=i(24627),H=i(23184),
|
|
1007
|
+
`}};P([(0,L.property)({type:String})],e.prototype,"copyLocalization",void 0),P([(0,L.property)({type:String})],e.prototype,"copiedLocalization",void 0),P([(0,L.property)({type:String})],e.prototype,"method",void 0),P([(0,L.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),P([(0,L.property)({type:String})],e.prototype,"url",void 0),P([(0,L.query)("input[type='file']")],e.prototype,"input",void 0),P([(0,L.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),P([(0,L.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),P([(0,L.internalProperty)()],e.prototype,"disableCopyButton",void 0),P([(0,L.internalProperty)()],e.prototype,"acceptTypes",void 0),P([(0,L.internalProperty)()],e.prototype,"copied",void 0),P([(0,L.queryAssignedNodes)("code-block")],e.prototype,"slotNodes",void 0),P([(0,L.queryAssignedNodes)("code-url")],e.prototype,"slotUrl",void 0),e=P([(0,T.wW)("md-code-editor")],e),t.ELEMENT=e}(M||(M={}));var D=i(4928),R=i(18224),_=i(69494),B=i(85416),z=i(38654),F=i(63208),V=i(16754),j=i(17814),N=i(10984),U=i(80072),q=i(24627),H=i(23184),W=i(50565),K=i(99850),G=i(61200),Y=i(40333);const X=L.css`:host{display:flex;align-items:center;height:1.75rem;border-radius:1.5625rem;background-color:var(--floating-button-bar-bg-color);box-shadow:var(--md-elevation-1);padding:.25rem .5rem;gap:.5rem;flex:1}.button{display:inline-flex;align-items:center;justify-content:center}.cancel{color:var(--floating-button-bar-secondary-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}.label.primary{font-family:var(--brand-font-medium);color:var(--floating-button-bar-primary-color);flex:1;min-width:0;justify-content:center}.label.secondary{color:var(--floating-button-bar-secondary-color);flex:1}.separator{width:1px;height:.75rem;background-color:var(--floating-button-bar-secondary-color)}`;var Q=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let Z=class extends L.LitElement{constructor(){super(...arguments),this.leadingLabel="",this.closeButtonAriaLabel="",this.showCloseButton=!0,this.actions=[]}static get styles(){return[X]}onCancelButttonAction(){this.dispatchEvent(new CustomEvent("cancel-button-action",{composed:!0,bubbles:!0}))}get closeButtonTemplate(){return L.html`
|
|
1008
1008
|
<md-button
|
|
1009
1009
|
class="button cancel"
|
|
1010
1010
|
circle
|
|
@@ -1889,7 +1889,7 @@
|
|
|
1889
1889
|
<li class="md-list-item ${(0,l.classMap)(this.listItemTemplateClassMap)}" part="list-item">
|
|
1890
1890
|
<slot></slot>
|
|
1891
1891
|
</li>
|
|
1892
|
-
`}};h([(0,a.property)({type:String,reflect:!0})],e.prototype,"role",void 0),h([(0,a.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),h([(0,a.property)({type:String,reflect:!0})],e.prototype,"shape",void 0),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),e=h([(0,r.w)("md-list-item")],e),t.ELEMENT=e}(s||(s={}))},66677:(t,e,i)=>{i.d(e,{QZ:()=>r,Qx:()=>n,XI:()=>l,qi:()=>a,sg:()=>o,ws:()=>s});const s=(t,e)=>{const i=[];[e].forEach((e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const s=[],o=t.toLowerCase(),r=e.toLowerCase();let n=0,a=o.indexOf(r,n);for(;a>-1;)n=a+i,s.push([a,n]),a=o.indexOf(r,a+1);return s})(t,e))}));const s=(([...t])=>{if(!t.length)return[];t.sort(((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]));const e=[];let i=t[0][0],s=t[0][1];return t.shift(),t.forEach((([t,o])=>{t>=s?(e.push([i,s]),i=t,s=o):o>s&&(s=o)})),e.push([i,s]),e})(i),o=[];let r=0;return s.forEach((([e,i])=>{r!==e&&o.push({range:[e,i],matching:!1,text:t.slice(r,e)}),o.push({range:[e,i],matching:!0,text:t.slice(e,i)}),r=i})),r!==t.length&&o.push({range:[r],matching:!1,text:t.slice(r)}),o};function o(t,e,i){let s;return function(...o){const r=this,n=i&&!s;clearTimeout(s),s=setTimeout((function(){s=null,i||t.apply(r,o)}),e),n&&t.apply(r,o)}}function r(t,e){return function e(i){if(!i||i===document||i===window)return null;const s=i.closest(t);return null!=s?s:e(i.getRootNode().host)}(e)}function n(t,e){return e>=0&&e<t.length?t[e]:void 0}function a(t,e=document){var i;const s=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(s)return s;const o=Array.from(e.querySelectorAll("*")).map((t=>t.shadowRoot?
|
|
1892
|
+
`}};h([(0,a.property)({type:String,reflect:!0})],e.prototype,"role",void 0),h([(0,a.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),h([(0,a.property)({type:String,reflect:!0})],e.prototype,"shape",void 0),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),e=h([(0,r.w)("md-list-item")],e),t.ELEMENT=e}(s||(s={}))},66677:(t,e,i)=>{i.d(e,{QZ:()=>r,Qx:()=>n,XI:()=>l,qi:()=>a,sg:()=>o,ws:()=>s});const s=(t,e)=>{const i=[];[e].forEach((e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const s=[],o=t.toLowerCase(),r=e.toLowerCase();let n=0,a=o.indexOf(r,n);for(;a>-1;)n=a+i,s.push([a,n]),a=o.indexOf(r,a+1);return s})(t,e))}));const s=(([...t])=>{if(!t.length)return[];t.sort(((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]));const e=[];let i=t[0][0],s=t[0][1];return t.shift(),t.forEach((([t,o])=>{t>=s?(e.push([i,s]),i=t,s=o):o>s&&(s=o)})),e.push([i,s]),e})(i),o=[];let r=0;return s.forEach((([e,i])=>{r!==e&&o.push({range:[e,i],matching:!1,text:t.slice(r,e)}),o.push({range:[e,i],matching:!0,text:t.slice(e,i)}),r=i})),r!==t.length&&o.push({range:[r],matching:!1,text:t.slice(r)}),o};function o(t,e,i){let s;return function(...o){const r=this,n=i&&!s;clearTimeout(s),s=setTimeout((function(){s=null,i||t.apply(r,o)}),e),n&&t.apply(r,o)}}function r(t,e){return function e(i){if(!i||i===document||i===window)return null;const s=i.closest(t);return null!=s?s:e(i.getRootNode().host)}(e)}function n(t,e){return e>=0&&e<t.length?t[e]:void 0}function a(t,e=document){var i;const s=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(s)return s;const o=Array.from(e.querySelectorAll("*")).map((t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null})).filter((t=>null!==t));for(const e of o){const i=a(t,e);if(i)return i}return null}function l(t,e=document){if(e instanceof ShadowRoot||e instanceof Document){const i=e.getElementById(t);if(i)return i}const i=Array.from(e.querySelectorAll("*")).map((t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null})).filter((t=>null!==t));for(const e of i){const i=l(t,e);if(i)return i}return null}},68250:t=>{t.exports=m},68490:(t,e,i)=>{i.d(e,{List:()=>s});var s,o=i(90195),r=i(3001),n=i(31890),a=i(26272),l=i(41488),d=i(97822),h=i(21392),p=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,r.Io)(l.LitElement)){constructor(){super(...arguments),this.alignment="vertical",this.label="option",this.activated=-1,this._role="listbox"}firstUpdated(t){super.firstUpdated(t),this.setAttribute("aria-label",this.label)}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selected},bubbles:!0,composed:!0}))}isFocusable(t){return!t.hasAttribute("hidden")}connectedCallback(){super.connectedCallback(),this._role=this.getAttribute("role")||"listbox",this.removeAttribute("role"),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}findListItemIndex(t){const e=t.composedPath();return this.slotted.findIndex((t=>e.includes(t)))}switchListItemOnArrowPress(t,e=1){const i=super.getAvailableSelectedIndex(t,e);-1!==i&&(this.selected=i)}setActivated(t){-1!==t&&(this.activated=t,this.selected=t,this.setSelected(t))}findSelectedListItemIndex(){return this.slotted.findIndex((t=>t.selected))}setSelected(t){const e=this.findSelectedListItemIndex();-1!==e&&e!==t&&(this.slotted[e].selected=!1),this.slotted[t]&&(this.slotted[t].selected=!0)}updated(t){super.updated(t),t.has("slotted")&&this.setActivated(this.activated),t.has("activated")&&this.setActivated(this.activated),t.has("label")&&this.setAttribute("aria-label",this.label)}isListItemDisabled(t){var e;const i=this.slotted[t];return null===(e=null==i?void 0:i.disabled)||void 0===e||e}handleClick(t){const e=this.findListItemIndex(t);-1!==e&&(this.isListItemDisabled(e)||(this.setActivated(e),this.notifySelectedChange()))}shouldElementHandleKey(t,e){if(t.hasAttribute("data-handles-keys")||t.closest("[data-handles-keys]"))return!0;const i=t.tagName.toLowerCase(),s=t.nodeName.toLowerCase(),r="input"===s||"textarea"===s||"select"===s,n=t.getAttribute("role"),a=t.hasAttribute("contenteditable")||"false"===t.getAttribute("aria-readonly"),l=[o.Uz.ArrowUp,o.Uz.ArrowDown,o.Uz.ArrowLeft,o.Uz.ArrowRight],d=[o.Uz.Enter,o.Uz.Space];return l.includes(e)?r||a||"textbox"===n||"combobox"===n||"listbox"===n||"menu"===n||"slider"===n||"scrollbar"===n||"tablist"===n||i.startsWith("md-")&&("md-input"===i||"md-select"===i||"md-combobox"===i):d.includes(e)?"button"===n||"link"===n||"checkbox"===n||"radio"===n||"button"===i||"a"===i||"md-button"===i||"md-checkbox"===i||"md-radio"===i||r:(e===o.Uz.Home||e===o.Uz.End)&&(r||a||"textbox"===n||"md-input"===i)}handleKeyDown(t){const e=t.composedPath()[0];if(this.shouldElementHandleKey(e,t.code))return;const{code:i}=t;switch(i){case o.Uz.End:this.switchListItemOnArrowPress(this.slotted.length-1);break;case o.Uz.Home:this.switchListItemOnArrowPress(0);break;case o.Uz.ArrowUp:case o.Uz.ArrowLeft:t.preventDefault(),0===this.selected?this.switchListItemOnArrowPress(this.slotted.length-1,-1):this.switchListItemOnArrowPress(this.selected-1,-1);break;case o.Uz.ArrowDown:case o.Uz.ArrowRight:t.preventDefault(),this.selected===this.slotted.length-1?this.switchListItemOnArrowPress(0):this.switchListItemOnArrowPress(this.selected+1);break;case o.Uz.Enter:case o.Uz.Space:this.isListItemDisabled(this.selected)||(this.setActivated(this.selected),this.notifySelectedChange())}}get slotElement(){return this.listItemSlot}static get styles(){return[a.A,h.A]}render(){return l.html`
|
|
1893
1893
|
<ul role=${(0,d.ifDefined)("list"!==this._role?this._role:void 0)} class="md-list" part="list">
|
|
1894
1894
|
<slot name="list-item"></slot>
|
|
1895
1895
|
</ul>
|
|
@@ -1920,7 +1920,7 @@
|
|
|
1920
1920
|
<span class=${(0,a.classMap)(this.loadingIconClassMap)}></span>
|
|
1921
1921
|
<span class=${(0,a.classMap)(this.loadingIconClassMap)}></span>
|
|
1922
1922
|
</div>
|
|
1923
|
-
`}};d([(0,n.property)({type:String})],e.prototype,"size",void 0),e=d([(0,o.w)("md-loading")],e),t.ELEMENT=e}(s||(s={}))},71128:(t,e,i)=>{i.d(e,{Popover:()=>v}),i(96798),i(61200);var s=i(31890),o=i(28373),r=i(66677),n=i(5784),a=i(41488),l=i(40333),d=i(73679),h=i(68419),p=i(36365),c=i(3998),u=i(33759),m=i(50325),y=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},b=function(t,e,i,s){return new(i||(i=Promise))((function(o,r){function n(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,a)}l((s=s.apply(t,e||[])).next())}))};let v=class extends((0,o.d)(a.LitElement)){constructor(){super(),this.id="",this.triggerID="",this.trigger=h.zY.TRIGGER,this.placement=h.zY.PLACEMENT,this.strategy=h.zY.STRATEGY,this.color=h.zY.COLOR,this.visible=h.zY.VISIBLE,this.offset=h.zY.OFFSET,this.focusTrap=h.zY.FOCUS_TRAP,this.preventScroll=h.zY.PREVENT_SCROLL,this.showArrow=h.zY.ARROW,this.closeButton=h.zY.CLOSE_BUTTON,this.interactive=h.zY.INTERACTIVE,this.delay=h.zY.DELAY,this.hideOnEscape=h.zY.HIDE_ON_ESCAPE,this.hideOnBlur=h.zY.HIDE_ON_BLUR,this.hideOnOutsideClick=h.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=h.zY.FOCUS_BACK,this.backdrop=h.zY.BACKDROP,this.flip=h.zY.FLIP,this.size=h.zY.SIZE,this.zIndex=h.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=h.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=h.zY.DISABLE_ARIA_EXPANDED,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.onOutsidePopoverClick=t=>{if(c.S.peek()!==this)return;const e=t.composedPath(),i=e.includes(this)||this.triggerElement&&e.includes(this.triggerElement),s=!!this.backdropElement&&e.includes(this.backdropElement);i&&!s||this.hidePopover()},this.onEscapeKeydown=t=>{this.visible&&"Escape"===t.code&&(t.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout((()=>{this.visible=!1}),this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(t=!1)=>{this.cancelCloseDelay(),t&&this.openDelay>0?setTimeout((()=>{this.utils.handleAppendTo(!0),this.visible=!0}),this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&this.showPopover(!0)},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=t=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(t)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return b(this,void 0,void 0,(function*(){e.firstUpdated.call(this,t),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,p.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())}))}disconnectedCallback(){const t=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return b(this,void 0,void 0,(function*(){t.disconnectedCallback.call(this),this.removeEventListeners(),p.T.onDestroyedPopover(this),c.S.remove(this)}))}setupTriggerListener(){if(!this.triggerID)return;const t=this.getRootNode();if(this.triggerElement=(0,r.qi)(`[id="${this.triggerID}"]`,t),!this.triggerElement){const e=null==t?void 0:t.host;if(e){const t=e.querySelector("[slot]");(null==t?void 0:t.id)===this.triggerID&&(this.triggerElement=t)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==t||t.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==t||t.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(t){const e=Object.create(null,{updated:{get:()=>super.updated}});return b(this,void 0,void 0,(function*(){if(e.updated.call(this,t),t.has("visible")){const e=t.get("visible")||!1;yield this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}if(t.has("placement")&&this.setAttribute("placement",Object.values(h.ME).includes(this.placement)?this.placement:h.zY.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("trigger")){const t=this.trigger.split(" ").filter((t=>Object.values(h.tr).includes(t)));this.setAttribute("trigger",t.length>0?this.trigger:h.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}t.has("color")&&this.setAttribute("color",Object.values(h.o$).includes(this.color)?this.color:h.zY.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.setupAccessibility(),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("interactive")&&this.utils.updateAriaHasPopupAttribute()}))}isOpenUpdated(t,e){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:t=>super.preventScroll=t}});return b(this,void 0,void 0,(function*(){var s,o,r,n;if(t!==e&&this.triggerElement)if(e)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(s=this.activateFocusTrap)||void 0===s||s.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),p.T.onShowPopover(this);else{if(c.S.pop(),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(r=this.deactivateFocusTrap)||void 0===r||r.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const t=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==t&&"alertdialog"!==t||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(null===(n=this.setFocusOnTrigger)||void 0===n||n.call(this,this.triggerElement)),p.T.onHidePopover(this)}}))}isMouseOverTrigger(t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const e=this.triggerElement.getBoundingClientRect(),{clientX:i,clientY:s}=t instanceof MouseEvent?t:{clientX:0,clientY:0};if(i>=e.left&&i<=e.right&&s>=e.top&&s<=e.bottom)return!0}return!1}handleCreatePopoverFirstUpdate(){return b(this,void 0,void 0,(function*(){var t,e;this.visible&&this.interactive&&(null===(t=this.setFocusableElements)||void 0===t||t.call(this),yield this.updateComplete,null===(e=this.setInitialFocus)||void 0===e||e.call(this))}))}positionPopover(){if(!this.triggerElement)return;const t=[(0,n.shift)()];let e=this.offset;if(this.flip&&t.push((0,n.flip)()),this.size){const e=this.renderRoot.querySelector('[part="popover-content"]');t.push((0,n.size)({apply({availableHeight:t}){e&&Object.assign(e.style,{maxHeight:`${t}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;e=Math.sqrt(2*i**2)/2+this.offset,t.push((0,n.arrow)({element:this.arrowElement,padding:12}))}t.push((0,n.offset)(e)),(0,n.autoUpdate)(this.triggerElement,this,(()=>b(this,void 0,void 0,(function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:s,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),s.arrow&&this.arrowElement&&this.utils.updateArrowStyle(s.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}))))}render(){return a.html`
|
|
1923
|
+
`}};d([(0,n.property)({type:String})],e.prototype,"size",void 0),e=d([(0,o.w)("md-loading")],e),t.ELEMENT=e}(s||(s={}))},71128:(t,e,i)=>{i.d(e,{Popover:()=>g,PopoverController:()=>v}),i(96798),i(61200);var s=i(31890),o=i(28373),r=i(66677),n=i(5784),a=i(41488),l=i(40333),d=i(73679),h=i(68419),p=i(36365),c=i(3998),u=i(33759),m=i(50325),y=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},b=function(t,e,i,s){return new(i||(i=Promise))((function(o,r){function n(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,a)}l((s=s.apply(t,e||[])).next())}))};class v{show(t){}hide(){}toggle(){}isVisible(){return!1}}let g=class extends((0,o.d)(a.LitElement)){set controller(t){t?(t.show=(t=!1)=>this.showPopover(t),t.hide=()=>this.hidePopover(),t.toggle=()=>this.togglePopoverVisible(),t.isVisible=()=>this.visible,this._controller=t):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=h.zY.TRIGGER,this.placement=h.zY.PLACEMENT,this.strategy=h.zY.STRATEGY,this.color=h.zY.COLOR,this.visible=h.zY.VISIBLE,this.offset=h.zY.OFFSET,this.focusTrap=h.zY.FOCUS_TRAP,this.preventScroll=h.zY.PREVENT_SCROLL,this.showArrow=h.zY.ARROW,this.closeButton=h.zY.CLOSE_BUTTON,this.interactive=h.zY.INTERACTIVE,this.delay=h.zY.DELAY,this.hideOnEscape=h.zY.HIDE_ON_ESCAPE,this.hideOnBlur=h.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=h.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=h.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=h.zY.FOCUS_BACK,this.backdrop=h.zY.BACKDROP,this.flip=h.zY.FLIP,this.size=h.zY.SIZE,this.zIndex=h.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=h.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=h.zY.DISABLE_ARIA_EXPANDED,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.onOutsidePopoverClick=t=>{const e=t.composedPath();e.includes(this)||this.triggerElement&&e.includes(this.triggerElement)||c.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.onEscapeKeydown=t=>{this.visible&&"Escape"===t.code&&(t.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=t=>{this.contains(t.relatedTarget)||this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout((()=>{this.visible=!1}),this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(t=!1)=>{this.cancelCloseDelay(),t&&this.openDelay>0?setTimeout((()=>{this.utils.handleAppendTo(!0),this.visible=!0}),this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout((()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)}),this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&this.showPopover(!0)},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=t=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(t)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return b(this,void 0,void 0,(function*(){e.firstUpdated.call(this,t),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,p.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())}))}disconnectedCallback(){const t=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return b(this,void 0,void 0,(function*(){t.disconnectedCallback.call(this),this._controller=null,this.removeEventListeners(),p.T.onDestroyedPopover(this),c.S.remove(this)}))}setupTriggerListener(){if(!this.triggerID)return;const t=this.getRootNode();if(this.triggerElement=(0,r.qi)(`[id="${this.triggerID}"]`,t),!this.triggerElement){const e=null==t?void 0:t.host;if(e){const t=e.querySelector("[slot]");(null==t?void 0:t.id)===this.triggerID&&(this.triggerElement=t)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==t||t.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==t||t.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(t){const e=Object.create(null,{updated:{get:()=>super.updated}});return b(this,void 0,void 0,(function*(){if(e.updated.call(this,t),t.has("visible")){const e=t.get("visible")||!1;yield this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}if(t.has("placement")&&this.setAttribute("placement",Object.values(h.ME).includes(this.placement)?this.placement:h.zY.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("trigger")){const t=this.trigger.split(" ").filter((t=>Object.values(h.tr).includes(t)));this.setAttribute("trigger",t.length>0?this.trigger:h.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}t.has("color")&&this.setAttribute("color",Object.values(h.o$).includes(this.color)?this.color:h.zY.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.setupAccessibility(),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("interactive")&&this.utils.updateAriaHasPopupAttribute()}))}isOpenUpdated(t,e){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:t=>super.preventScroll=t}});return b(this,void 0,void 0,(function*(){var s,o,r,n;if(t!==e&&this.triggerElement)if(e)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(s=this.activateFocusTrap)||void 0===s||s.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),p.T.onShowPopover(this);else{if(c.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(r=this.deactivateFocusTrap)||void 0===r||r.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const t=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==t&&"alertdialog"!==t||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(null===(n=this.setFocusOnTrigger)||void 0===n||n.call(this,this.triggerElement)),p.T.onHidePopover(this)}}))}isMouseOverTrigger(t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const e=this.triggerElement.getBoundingClientRect(),{clientX:i,clientY:s}=t instanceof MouseEvent?t:{clientX:0,clientY:0};if(i>=e.left&&i<=e.right&&s>=e.top&&s<=e.bottom)return!0}return!1}handleCreatePopoverFirstUpdate(){return b(this,void 0,void 0,(function*(){var t,e;this.visible&&this.interactive&&(null===(t=this.setFocusableElements)||void 0===t||t.call(this),yield this.updateComplete,null===(e=this.setInitialFocus)||void 0===e||e.call(this))}))}positionPopover(){if(!this.triggerElement)return;const t=[(0,n.shift)()];let e=this.offset;if(this.flip&&t.push((0,n.flip)()),this.size){const e=this.renderRoot.querySelector('[part="popover-content"]');t.push((0,n.size)({apply({availableHeight:t}){e&&Object.assign(e.style,{maxHeight:`${t}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;e=Math.sqrt(2*i**2)/2+this.offset,t.push((0,n.arrow)({element:this.arrowElement,padding:12}))}t.push((0,n.offset)(e)),(0,n.autoUpdate)(this.triggerElement,this,(()=>b(this,void 0,void 0,(function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:s,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),s.arrow&&this.arrowElement&&this.utils.updateArrowStyle(s.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}))))}render(){return a.html`
|
|
1924
1924
|
<div class="popover-hover-bridge"></div>
|
|
1925
1925
|
${this.closeButton?a.html` <md-button
|
|
1926
1926
|
class="popover-close"
|
|
@@ -1936,7 +1936,7 @@
|
|
|
1936
1936
|
<div part="popover-content">
|
|
1937
1937
|
<slot></slot>
|
|
1938
1938
|
</div>
|
|
1939
|
-
`}static get styles(){return[m.A]}};y([(0,a.property)({type:String,reflect:!0})],
|
|
1939
|
+
`}static get styles(){return[m.A]}};y([(0,a.property)({type:String,reflect:!0})],g.prototype,"id",void 0),y([(0,a.property)({type:String,reflect:!0})],g.prototype,"triggerID",void 0),y([(0,a.property)({type:String,reflect:!0})],g.prototype,"trigger",void 0),y([(0,a.property)({type:String,reflect:!0})],g.prototype,"placement",void 0),y([(0,a.property)({type:String,reflect:!0})],g.prototype,"strategy",void 0),y([(0,a.property)({type:String,reflect:!0})],g.prototype,"color",void 0),y([(0,a.property)({type:Boolean,reflect:!0})],g.prototype,"visible",void 0),y([(0,a.property)({type:Number,reflect:!0})],g.prototype,"offset",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],g.prototype,"focusTrap",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],g.prototype,"preventScroll",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],g.prototype,"showArrow",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"close-button"})],g.prototype,"closeButton",void 0),y([(0,a.property)({type:Boolean,reflect:!0})],g.prototype,"interactive",void 0),y([(0,a.property)({type:String,reflect:!0})],g.prototype,"delay",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],g.prototype,"hideOnEscape",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],g.prototype,"hideOnBlur",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],g.prototype,"hideOnWindowBlur",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],g.prototype,"hideOnOutsideClick",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],g.prototype,"focusBackToTrigger",void 0),y([(0,a.property)({type:Boolean,reflect:!0})],g.prototype,"backdrop",void 0),y([(0,a.property)({type:Boolean,reflect:!0})],g.prototype,"flip",void 0),y([(0,a.property)({type:Boolean,reflect:!0})],g.prototype,"size",void 0),y([(0,a.property)({type:Number,reflect:!0,attribute:"z-index"})],g.prototype,"zIndex",void 0),y([(0,a.property)({type:String,reflect:!0,attribute:"append-to"})],g.prototype,"appendTo",void 0),y([(0,a.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],g.prototype,"closeButtonAriaLabel",void 0),y([(0,a.property)({type:String,reflect:!0})],g.prototype,"role",void 0),y([(0,a.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],g.prototype,"ariaLabelledby",void 0),y([(0,a.property)({type:String,reflect:!0,attribute:"aria-describedby"})],g.prototype,"ariaDescribedby",void 0),y([(0,a.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],g.prototype,"disableAriaExpanded",void 0),y([(0,a.property)({type:Object,attribute:!1})],g.prototype,"controller",null),g=y([(0,s.w)("md-popover")],g)},73093:(t,e,i)=>{i.d(e,{FloatingModal:()=>s}),i(96798),i(61200);var s,o=i(3001),r=i(31890),n=i(26272),a=(i(58088),i(57346),i(69e3),i(20727)),l=i.n(a),d=(i(3288),i(41488)),h=i(40333),p=i(97822),c=(i(58871),i(67330)),u=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,o.yC)((0,o.TS)(d.LitElement))){constructor(){super(...arguments),this.heading="",this.label="",this.show=!1,this.aspectRatio=!1,this.centered=!1,this.fixed=!1,this.full=!1,this.closeAriaLabel="Close Modal",this.resizeAriaLabel="Resize Modal",this.maximizeScreenLabel="Maximize Modal",this.minimizeAriaLabel="Minimize Modal",this.maximizable=!0,this.resizable=!0,this.minimize=!1,this.minimizable=!1,this.containerRect=null,this.dragOccured=!1,this.containerTransform="",this.applyInitialPosition=!0,this.resizeMoveListener=t=>{const{target:e}=t;let i=parseFloat(e.getAttribute("data-x"))||0,s=parseFloat(e.getAttribute("data-y"))||0;e.style.setProperty("width",`${t.rect.width}px`,"important"),e.style.setProperty("height",`${t.rect.height}px`,"important");const{initialX:o,initialY:r}=this.getInitialPosition();i+=t.deltaRect.left+o,s+=t.deltaRect.top+r,this.setTargetPosition(e,i,s),this.applyInitialPosition=!1},this.resizeEndListener=()=>{this.setContainerRect()},this.getInitialPosition=()=>{var t,e;return this.applyInitialPosition&&this.position?{initialX:Number(null===(t=this.position)||void 0===t?void 0:t.x),initialY:Number(null===(e=this.position)||void 0===e?void 0:e.y)}:{initialX:0,initialY:0}},this.dragMoveListener=t=>{const{target:e}=t,{x:i,y:s}=this.getTransformValues(t);this.setTargetPosition(e,i,s),this.applyInitialPosition=!1},this.dragEndListener=()=>{this.dragOccured=!0,this.setContainerRect()}}static get styles(){return[n.A,c.A]}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance()):(this.cleanContainerStyles(),this.destroyInteractInstance())),this.container&&t.has("position")&&!t.has("show")&&this.setInitialTargetPosition()}isNewPositionNotSame(){var t,e,i,s;if(this.container)return Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-x"))!==(null===(e=this.position)||void 0===e?void 0:e.x)||Number(null===(i=this.container)||void 0===i?void 0:i.getAttribute("data-y"))!==(null===(s=this.position)||void 0===s?void 0:s.y)}setInitialTargetPosition(){var t,e;this.container&&this.isNewPositionNotSame()&&this.setTargetPosition(this.container,Number(null===(t=this.position)||void 0===t?void 0:t.x),Number(null===(e=this.position)||void 0===e?void 0:e.y))}cleanContainerStyles(){this.containerTransform=""}getContainerTransform(){const t=this.container.getAttribute("data-x"),e=this.container.getAttribute("data-y");return t&&e?(this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:t,y:e}}})),`translate(${t}px, ${e}px)`):this.container.style.transform}setContainerRect(){requestAnimationFrame((()=>{return t=this,e=void 0,s=function*(){yield this.updateComplete,this.containerRect=this.container.getBoundingClientRect(),this.dispatchEvent(new CustomEvent("floating-modal-resize",{composed:!0,bubbles:!0,detail:{size:this.containerRect}})),this.containerTransform=this.getContainerTransform()},new((i=void 0)||(i=Promise))((function(o,r){function n(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,a)}l((s=s.apply(t,e||[])).next())}));var t,e,i,s}))}setInteractInstance(){requestAnimationFrame((()=>{this.container&&(l()(this.container).draggable({autoScroll:!0,allowFrom:this.header,ignoreFrom:this.body,listeners:{move:this.dragMoveListener,end:this.dragEndListener}}),this.resizable&&l()(this.container).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{end:this.resizeEndListener,move:this.resizeMoveListener},modifiers:this.aspectRatio?[l().modifiers.aspectRatio({ratio:"preserve",equalDelta:!0,modifiers:[l().modifiers.restrictSize({max:"parent"})]})]:void 0}))}))}handleClose(t){this.show=!1,this.full=!1,this.dispatchEvent(new CustomEvent("floating-modal-close",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleMinimize(){this.minimizable&&(this.dragOccured||(this.minimize=!this.minimize,this.dispatchEvent(new CustomEvent("floating-modal-minimize",{composed:!0,bubbles:!0,detail:{minimize:this.minimize}}))),this.dragOccured=!1)}handleToggleExpandCollapse(){this.full=!this.full}getTransformValues(t){const{target:e,dx:i,dy:s}=t,{initialX:o,initialY:r}=this.getInitialPosition();return{x:(parseFloat(e.getAttribute("data-x"))||0)+i+o,y:(parseFloat(e.getAttribute("data-y"))||0)+s+r}}setTargetPosition(t,e,i){t.style.transform=`translate(${e}px, ${i}px)`,t.setAttribute("data-x",`${e}`),t.setAttribute("data-y",`${i}`)}destroyInteractInstance(){this.container&&l().isSet(this.container)&&l()(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance()}renderedCallback(){this.containerTransform=this.position?`translate(${this.position.x}px, ${this.position.y}px)`:""}render(){return d.html`
|
|
1940
1940
|
${this.show?d.html`
|
|
1941
1941
|
<div
|
|
1942
1942
|
class="md-floating ${this.fixed?"fixed":""} ${this.minimize?"hide":""}"
|
|
@@ -204,7 +204,7 @@ export declare namespace ComboBox {
|
|
|
204
204
|
checkForVirtualScroll(): boolean;
|
|
205
205
|
rangeChanged(): void;
|
|
206
206
|
getCustomErrorContent(): DocumentFragment;
|
|
207
|
-
getCustomContent(option: string | OptionMember):
|
|
207
|
+
getCustomContent(option: string | OptionMember): TemplateResult | DocumentFragment;
|
|
208
208
|
renderGroupLabelHeader(option: OptionMember, optionIndex: number): TemplateResult;
|
|
209
209
|
renderWithoutVirtualScroll(): import("lit-html").DirectiveFn;
|
|
210
210
|
highlightingSearchedText(option: OptionMember | string): TemplateResult[];
|
|
@@ -40,6 +40,7 @@ declare const DEFAULTS: {
|
|
|
40
40
|
readonly PREVENT_SCROLL: false;
|
|
41
41
|
readonly HIDE_ON_ESCAPE: false;
|
|
42
42
|
readonly HIDE_ON_BLUR: false;
|
|
43
|
+
readonly HIDE_ON_WINDOW_BLUR: false;
|
|
43
44
|
readonly HIDE_ON_CLICK_OUTSIDE: false;
|
|
44
45
|
readonly FOCUS_BACK: false;
|
|
45
46
|
readonly BACKDROP: false;
|
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
import "@/components/button/Button";
|
|
9
9
|
import "@/components/icon/Icon";
|
|
10
10
|
import { LitElement, PropertyValues } from "lit-element";
|
|
11
|
-
import { PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from "./Popover.types";
|
|
11
|
+
import { IPopoverController, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from "./Popover.types";
|
|
12
|
+
export declare class PopoverController implements IPopoverController {
|
|
13
|
+
show(_useDelay?: boolean): void;
|
|
14
|
+
hide(): void;
|
|
15
|
+
toggle(): void;
|
|
16
|
+
isVisible(): boolean;
|
|
17
|
+
}
|
|
12
18
|
declare const Popover_base: typeof LitElement & import("@/mixins/FocusTrapMixin").AnyConstructor<import("@/mixins/FocusTrapMixin").FocusTrapClass & import("@/mixins/FocusTrapMixin").FocusTrapInterface & import("../../mixins/FocusMixin").FocusClass>;
|
|
13
19
|
/**
|
|
14
20
|
* Popover component is a lightweight floating UI element that displays additional content when triggered.
|
|
@@ -144,6 +150,11 @@ export declare class Popover extends Popover_base {
|
|
|
144
150
|
* @default false
|
|
145
151
|
*/
|
|
146
152
|
hideOnBlur: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Hide popover on window blur.
|
|
155
|
+
* @default false
|
|
156
|
+
*/
|
|
157
|
+
hideOnWindowBlur: boolean;
|
|
147
158
|
/**
|
|
148
159
|
* Hide on outside click of the popover.
|
|
149
160
|
* @default false
|
|
@@ -205,6 +216,20 @@ export declare class Popover extends Popover_base {
|
|
|
205
216
|
* @default false
|
|
206
217
|
*/
|
|
207
218
|
disableAriaExpanded: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Controller object that provides methods to programmatically control the popover.
|
|
221
|
+
* This is especially useful when the popover is appended to another part of the DOM.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```js
|
|
225
|
+
* const controller = {};
|
|
226
|
+
* popover.controller = controller;
|
|
227
|
+
* // Now you can use controller.show(), controller.hide(), controller.toggle()
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
set controller(value: PopoverController | null | undefined);
|
|
231
|
+
get controller(): PopoverController | null;
|
|
232
|
+
private _controller;
|
|
208
233
|
arrowElement: HTMLElement | null;
|
|
209
234
|
triggerElement: HTMLElement | null;
|
|
210
235
|
/** @internal */
|
|
@@ -239,6 +264,7 @@ export declare class Popover extends Popover_base {
|
|
|
239
264
|
* @param event - The mouse event.
|
|
240
265
|
*/
|
|
241
266
|
private readonly onOutsidePopoverClick;
|
|
267
|
+
private readonly hideThisPopover;
|
|
242
268
|
/**
|
|
243
269
|
* Handles the escape keydown event to close the popover.
|
|
244
270
|
*
|
|
@@ -251,6 +277,7 @@ export declare class Popover extends Popover_base {
|
|
|
251
277
|
* @param event - The focus event.
|
|
252
278
|
*/
|
|
253
279
|
private readonly onPopoverFocusOut;
|
|
280
|
+
private readonly handleWindowBlurEvent;
|
|
254
281
|
/**
|
|
255
282
|
* Handles the popover visibility change and position the popover.
|
|
256
283
|
* Handles the exit event to close the popover.
|
|
@@ -23,6 +23,7 @@ declare class PopoverStack {
|
|
|
23
23
|
* @returns The last popover in the stack
|
|
24
24
|
*/
|
|
25
25
|
pop(): Popover | undefined;
|
|
26
|
+
removeItem(popover: Popover): void;
|
|
26
27
|
/**
|
|
27
28
|
* Returns the last popover in the stack
|
|
28
29
|
* without removing it
|
|
@@ -40,6 +41,15 @@ declare class PopoverStack {
|
|
|
40
41
|
* Clears the stack
|
|
41
42
|
*/
|
|
42
43
|
clear(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Determines if the currentPopover should defer closing to the topmost popover
|
|
46
|
+
* in the case of an outside click, based on nesting.
|
|
47
|
+
*
|
|
48
|
+
* @param currentPopover - The popover instance being checked.
|
|
49
|
+
* @returns True if the currentPopover is nested with the top popover and is not the top itself,
|
|
50
|
+
* meaning it should defer closing. False otherwise.
|
|
51
|
+
*/
|
|
52
|
+
shouldDeferToTopForOutsideClick(currentPopover: Popover): boolean;
|
|
43
53
|
}
|
|
44
54
|
export declare const popoverStack: PopoverStack;
|
|
45
55
|
export {};
|
|
@@ -11,10 +11,16 @@ interface Events {
|
|
|
11
11
|
onCreatedEvent: Event;
|
|
12
12
|
onDestroyedEvent: Event;
|
|
13
13
|
}
|
|
14
|
+
interface IPopoverController {
|
|
15
|
+
show: (useDelay?: boolean) => void;
|
|
16
|
+
hide: () => void;
|
|
17
|
+
toggle: () => void;
|
|
18
|
+
isVisible: () => boolean;
|
|
19
|
+
}
|
|
14
20
|
export declare const Strategy: readonly ["fixed", "absolute"];
|
|
15
21
|
export declare const PopoverRole: readonly ["dialog", "menu", "tooltip"];
|
|
16
22
|
export declare const Triggers: readonly ["click", "mouseenter", "manual"];
|
|
17
23
|
export type PlacementType = (typeof Placement)[number];
|
|
18
24
|
export type StrategyType = (typeof Strategy)[number];
|
|
19
25
|
export type PopoverRoleType = (typeof PopoverRole)[number];
|
|
20
|
-
export type { Events, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger };
|
|
26
|
+
export type { Events, IPopoverController, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export { MenuItem } from "./components/menu/MenuItem";
|
|
|
64
64
|
export { Modal } from "./components/modal/Modal";
|
|
65
65
|
export { Pagination } from "./components/pagination/Pagination";
|
|
66
66
|
export { PhoneInput } from "./components/phone-input/PhoneInput";
|
|
67
|
-
export { Popover } from "./components/popover/Popover";
|
|
67
|
+
export { Popover, PopoverController } from "./components/popover/Popover";
|
|
68
68
|
export { ProgressBar } from "./components/progress-bar/ProgressBar";
|
|
69
69
|
export { Radio } from "./components/radio/Radio";
|
|
70
70
|
export { RadioGroup } from "./components/radio/RadioGroup";
|
|
@@ -82,4 +82,4 @@ export { ToggleSwitch } from "./components/toggle-switch/ToggleSwitch";
|
|
|
82
82
|
export { Tooltip } from "./components/tooltip/Tooltip";
|
|
83
83
|
export { iconUrlManager } from "./managers/IconUrlManager";
|
|
84
84
|
export { ThemeManager, themeManager } from "./managers/ThemeManager";
|
|
85
|
-
export type { Events, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from "./components/popover/Popover.types";
|
|
85
|
+
export type { Events, IPopoverController, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from "./components/popover/Popover.types";
|