@momentum-ui/web-components 2.24.3 → 2.25.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/1572.js +1 -1
- package/dist/2555.js +1 -1
- package/dist/573.js +1 -1
- package/dist/8004.js +1 -1
- package/dist/9130.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.js +1 -1
- package/dist/comp/md-popover-entry.js +1 -1
- package/dist/index-entry.js +82 -82
- package/dist/types/components/popover/Popover.d.ts +4 -0
- package/dist/types/components/popover/Popover.utils.d.ts +4 -0
- package/dist/types/components/skeleton/Skeleton.d.ts +20 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -50,7 +50,7 @@
|
|
|
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=r},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)){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.animationFrame=p.zY.ANIMATION_FRAME,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.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||d.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=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):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=()=>{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.visible||(this.previousActiveElement=(0,s.dw)()),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.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.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,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("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),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()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}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.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),c.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),d.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&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,c.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}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;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);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)),this.cleanupAutoUpdate=(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)}),{animationFrame:this.animationFrame})}render(){return l.html`
|
|
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=r},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)){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.animationFrame=p.zY.ANIMATION_FRAME,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.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||d.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=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):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=()=>{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.visible||(this.previousActiveElement=(0,s.dw)()),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.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.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,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("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),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()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}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.utils.handleAppendTo(!0),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),c.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),d.S.removeItem(this),this.utils.handleAppendTo(!1),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&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,c.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}setFocusableElements(){var e;null===(e=super.setFocusableElements)||void 0===e||e.call(this);const t=this.triggerElement;this.appendTo&&this.activeFocusTrap&&t&&this.focusableElements&&(this.focusableElements.includes(t)||this.focusableElements.push(t))}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;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);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)),this.cleanupAutoUpdate=(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)}),{animationFrame:this.animationFrame})}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"
|
|
@@ -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/class-map"),require("lit-html/directives/style-map"),require("lit-html"),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/class-map","lit-html/directives/style-map","lit-html","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/class-map"),require("lit-html/directives/style-map"),require("lit-html"),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/class-map"],e["lit-html/directives/style-map"],e["lit-html"],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=i},23968:e=>{e.exports=t},32022:e=>{e.exports=s},40333:e=>{e.exports=r},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),m=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},g=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.animationFrame=a.zY.ANIMATION_FRAME,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.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||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=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):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.visible||(this.previousActiveElement=(0,s.dw)()),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.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.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=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(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("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),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()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}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,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(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),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&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(l=this.setFocusOnDeepestNestedElement)||void 0===l||l.call(this,this.triggerElement)),this.previousActiveElement=null,d.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}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;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);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)),this.cleanupAutoUpdate=(0,l.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,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)}),{animationFrame:this.animationFrame})}render(){return n.html`
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),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/class-map","lit-html/directives/style-map","lit-html","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/class-map"),require("lit-html/directives/style-map"),require("lit-html"),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/class-map"],e["lit-html/directives/style-map"],e["lit-html"],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=i},23968:e=>{e.exports=t},32022:e=>{e.exports=s},40333:e=>{e.exports=r},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),m=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},g=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.animationFrame=a.zY.ANIMATION_FRAME,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.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||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=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):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.visible||(this.previousActiveElement=(0,s.dw)()),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.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.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=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(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("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),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()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}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,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.utils.handleAppendTo(!0),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(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),c.S.removeItem(this),this.utils.handleAppendTo(!1),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&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(l=this.setFocusOnDeepestNestedElement)||void 0===l||l.call(this,this.triggerElement)),this.previousActiveElement=null,d.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}setFocusableElements(){var e;null===(e=super.setFocusableElements)||void 0===e||e.call(this);const t=this.triggerElement;this.appendTo&&this.activeFocusTrap&&t&&this.focusableElements&&(this.focusableElements.includes(t)||this.focusableElements.push(t))}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;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);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)),this.cleanupAutoUpdate=(0,l.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,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)}),{animationFrame:this.animationFrame})}render(){return n.html`
|
|
2
2
|
<div class="popover-hover-bridge"></div>
|
|
3
3
|
${this.closeButton?n.html` <md-button
|
|
4
4
|
class="popover-close"
|
package/dist/index-entry.js
CHANGED
|
@@ -13,7 +13,85 @@
|
|
|
13
13
|
<div class="md-composite-avatar ${(0,a.classMap)(this.avatarClassMap)}">
|
|
14
14
|
<slot></slot>
|
|
15
15
|
</div>
|
|
16
|
-
`}};d([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=d([(0,r.w)("md-composite-avatar")],e),t.ELEMENT=e}(o||(o={}))},
|
|
16
|
+
`}};d([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=d([(0,r.w)("md-composite-avatar")],e),t.ELEMENT=e}(o||(o={}))},2864:(t,e,i)=>{i.r(e),i.d(e,{Accordion:()=>o.Accordion,AccordionItem:()=>s.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:()=>S.Breadcrumb,Button:()=>$.Button,ButtonGroup:()=>E.ButtonGroup,Card:()=>k.Card,CardAi:()=>T.CardAi,CardV2:()=>A.CardV2,ChatMessage:()=>I.ChatMessage,Checkbox:()=>L.Checkbox,CheckboxGroup:()=>O.CheckboxGroup,Chip:()=>M.Chip,Coachmark:()=>P.Coachmark,CoachmarkPopover:()=>D.CoachmarkPopover,CodeEditor:()=>F,ComboBox:()=>N.ComboBox,CompositeAvatar:()=>c.CompositeAvatar,CountryCodePicker:()=>j.CountryCodePicker,DatePicker:()=>H.DatePicker,DatePickerCalendar:()=>W.DatePickerCalendar,DatePickerDay:()=>K.DatePickerDay,DatePickerMonth:()=>G.DatePickerMonth,DatePickerWeek:()=>Y.DatePickerWeek,DateRangePicker:()=>U.DateRangePicker,DateTimePicker:()=>q.DateTimePicker,Draggable:()=>X.Draggable,DraggableItem:()=>Z.DraggableItem,Dropdown:()=>Q.Dropdown,EditableTextfield:()=>J.EditableTextfield,Favorite:()=>tt.Favorite,FloatingButtonBar:()=>nt,FloatingMinimizedModal:()=>at.FloatingMinimizedModal,FloatingModal:()=>lt.FloatingModal,Form:()=>mt.Form,FormArray:()=>ct,FormControl:()=>ht,FormGroup:()=>pt,Grabber:()=>yt.Grabber,HelpText:()=>bt.HelpText,Icon:()=>g.Icon,Input:()=>gt.Input,InputFile:()=>vt.InputFile,Label:()=>ft.Label,Link:()=>wt.Link,List:()=>Ct.List,ListItem:()=>xt.ListItem,Loading:()=>St.Loading,MeetingAlert:()=>Et.MeetingAlert,Menu:()=>Tt.Menu,MenuItem:()=>At.MenuItem,MenuOverlay:()=>$t.MenuOverlay,Modal:()=>kt.Modal,NotificationBadge:()=>x,Pagination:()=>It.Pagination,PhoneInput:()=>Lt.PhoneInput,Popover:()=>Ot.Popover,PopoverController:()=>Ot.PopoverController,Presence:()=>Mt.Presence,ProgressBar:()=>Dt.ProgressBar,Radio:()=>Pt.Radio,RadioGroup:()=>Rt.RadioGroup,Skeleton:()=>Bt,Slider:()=>Ft.Slider,Spinner:()=>Vt.Spinner,Tab:()=>Ut.Tab,TabPanel:()=>qt.TabPanel,Table:()=>jt.Table,TableAdvanced:()=>Nt.TableAdvanced,Tabs:()=>Ht.Tabs,TaskItem:()=>Wt.TaskItem,Theme:()=>Kt.Theme,ThemeManager:()=>Zt.ThemeManager,TimePicker:()=>Gt.TimePicker,ToggleSwitch:()=>Yt.ToggleSwitch,Tooltip:()=>et.Tooltip,Validators:()=>ut,iconUrlManager:()=>Xt.O,registerThemeManagerGlobally:()=>Zt.registerThemeManagerGlobally,themeManager:()=>Zt.themeManager});var o=i(33328),s=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(3001),y=i(41488),b=i(17518),v=i(73679),g=i(61200),f=i(15427);const w=y.css`:host{color:var(--badge-notification-primary-foreground-color);font-size:var(--font-size-body-small,.75rem);font-weight:var(--brand-font-weight-medium,500);line-height:var(--font-lineheight-body-small,1rem);font-family:var(--brand-font-medium);box-sizing:border-box;align-items:center;display:flex;height:fit-content;justify-content:center;width:fit-content}.md-notification-badge-overlay{outline:.0625rem solid var(--badge-notification-overlay-border-color)}.md-notification-badge-text{box-sizing:border-box;padding:0 .25rem;border-radius:6.25rem;min-width:1rem;display:flex;justify-content:center;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-icon{padding:2px;size:1rem;border-radius:50%;box-sizing:border-box}.md-notification-badge-icon__primary{background-color:var(--badge-notification-primary-background-color);color:var(--badge-notification-primary-foreground-color)}.md-notification-badge-icon__success{background-color:var(--badge-notification-success-background-color);color:var(--badge-notification-success-foreground-color)}.md-notification-badge-icon__warning{background-color:var(--badge-notification-warning-background-color);color:var(--badge-notification-warning-foreground-color)}.md-notification-badge-icon__error{background-color:var(--badge-notification-error-background-color);color:var(--badge-notification-error-foreground-color)}.md-notification-badge-icon__secondary{background-color:var(--badge-notification-secondary-background-color);color:var(--badge-notification-secondary-foreground-color)}@media(forced-colors:active){.md-notification-badge-dot,.md-notification-badge-icon,.md-notification-badge-text{outline:.125rem solid}}`;var C=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let x=class extends y.LitElement{constructor(){super(...arguments),this.variant=f.zY.VARIANT,this.maxCounter=f.zY.MAX_COUNTER,this.overlay=!1,this.ariaLabel=null}static get styles(){return[w]}getCounterText(t,e){return void 0===e||"number"!=typeof e||0===t?"":e>t?`${t}+`:t>f.zY.MAX_COUNTER_LIMIT||e>f.zY.MAX_COUNTER_LIMIT?`${f.zY.MAX_COUNTER_LIMIT}+`:e.toString()}getBadgeIcon(t,e){return y.html`
|
|
17
|
+
<md-icon
|
|
18
|
+
class="md-notification-badge-icon ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
|
|
19
|
+
iconSet="momentumDesign"
|
|
20
|
+
name="${(0,v.ifDefined)(t)}"
|
|
21
|
+
size="${f.zY.ICON_SIZE}"
|
|
22
|
+
></md-icon>
|
|
23
|
+
`}getBadgeDot(){return y.html`<div
|
|
24
|
+
class="md-notification-badge-dot ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay})}"
|
|
25
|
+
></div>`}getBadgeCounterText(){return y.html`
|
|
26
|
+
<div class="md-notification-badge-text ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay})}">
|
|
27
|
+
${this.getCounterText(this.maxCounter,this.counter)}
|
|
28
|
+
</div>
|
|
29
|
+
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(f.M_).includes(this.variant)&&(this.variant=f.zY.VARIANT);const{iconName:t,type:e,variant:i}=this;switch(e){case f.ZE.ICON:return this.getBadgeIcon(t||"",i);case f.ZE.COUNTER:return this.getBadgeCounterText();case f.ZE.SUCCESS:return this.getBadgeIcon(f.UZ.SUCCESS_ICON_NAME,f.su.SUCCESS);case f.ZE.WARNING:return this.getBadgeIcon(f.UZ.WARNING_ICON_NAME,f.su.WARNING);case f.ZE.ERROR:return this.getBadgeIcon(f.UZ.ERROR_ICON_NAME,f.su.ERROR);case f.ZE.DOT:default:return this.type=f.ZE.DOT,this.getBadgeDot()}}update(t){super.update(t),t.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};C([(0,y.property)({type:String,reflect:!0})],x.prototype,"type",void 0),C([(0,y.property)({type:String,reflect:!0})],x.prototype,"variant",void 0),C([(0,y.property)({type:Number})],x.prototype,"counter",void 0),C([(0,y.property)({type:Number,attribute:"max-counter",reflect:!0})],x.prototype,"maxCounter",void 0),C([(0,y.property)({type:Boolean})],x.prototype,"overlay",void 0),C([(0,y.property)({type:String,attribute:"icon-name"})],x.prototype,"iconName",void 0),C([(0,y.property)({type:String,attribute:"aria-label"})],x.prototype,"ariaLabel",void 0),x=C([(0,m.wW)("md-notification-badge")],x);var S=i(92992),E=i(45629),$=i(96798),T=i(64311),A=i(90827),k=i(10654),I=i(95281),L=i(3664),O=i(55294),M=i(60046),D=i(29895),P=i(46312),R=i(26272),_=i(45001),B=i.n(_);const z=y.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 F,V=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.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[R.A,z]}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),B().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,o=void 0,r=function*(){try{const{default:e}=yield i(29599)(`./${t}`);B().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},new((s=void 0)||(s=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 s?i:new s(function(t){t(i)})).then(n,a)}l((r=r.apply(e,o||[])).next())});var e,o,s,r}getAllAcceptTypes(){const t=B().listLanguages();return t.length?t.map(t=>B().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 y.html`
|
|
30
|
+
<div class="md-code-editor" part="code-editor">
|
|
31
|
+
<div class="md-code-editor-header">
|
|
32
|
+
<div class="md-code-editor-name">
|
|
33
|
+
<md-badge color="blue">
|
|
34
|
+
<slot name="method" method=${this.method}></slot>
|
|
35
|
+
</md-badge>
|
|
36
|
+
<span class="md-code-editor-url">
|
|
37
|
+
<slot name="code-url" @slotchange=${this.handleUrlSlotChange}>${this.url}</slot>
|
|
38
|
+
</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="md-code-editor-copy">
|
|
41
|
+
<span>${this.copied?this.copiedLocalization.trim():this.copyLocalization.trim()}</span>
|
|
42
|
+
<md-button
|
|
43
|
+
circle
|
|
44
|
+
size="20"
|
|
45
|
+
?disabled=${this.disableCopyButton}
|
|
46
|
+
@click=${this.copyClipboard}
|
|
47
|
+
class="md-code-editor-copy-btn"
|
|
48
|
+
>
|
|
49
|
+
<md-icon slot="icon" name="icon-copy_16"></md-icon>
|
|
50
|
+
</md-button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="md-code-editor-content">
|
|
54
|
+
<pre class="md-code-editor-code-block">
|
|
55
|
+
<slot name="code-block" @slotchange=${this.handleSlotChange}>
|
|
56
|
+
<code class=${this.acceptLanguage}>
|
|
57
|
+
</code>
|
|
58
|
+
</slot>
|
|
59
|
+
</pre>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
`}};V([(0,y.property)({type:String})],e.prototype,"copyLocalization",void 0),V([(0,y.property)({type:String})],e.prototype,"copiedLocalization",void 0),V([(0,y.property)({type:String})],e.prototype,"method",void 0),V([(0,y.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),V([(0,y.property)({type:String})],e.prototype,"url",void 0),V([(0,y.query)("input[type='file']")],e.prototype,"input",void 0),V([(0,y.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),V([(0,y.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),V([(0,y.internalProperty)()],e.prototype,"disableCopyButton",void 0),V([(0,y.internalProperty)()],e.prototype,"acceptTypes",void 0),V([(0,y.internalProperty)()],e.prototype,"copied",void 0),V([(0,y.queryAssignedNodes)("code-block")],e.prototype,"slotNodes",void 0),V([(0,y.queryAssignedNodes)("code-url")],e.prototype,"slotUrl",void 0),e=V([(0,m.wW)("md-code-editor")],e),t.ELEMENT=e}(F||(F={}));var N=i(4928),j=i(18224),U=i(69494),q=i(85416),H=i(38654),W=i(63208),K=i(16754),G=i(17814),Y=i(10984),X=i(80072),Z=i(24627),Q=i(23184),J=i(50565),tt=i(99850),et=i(83192),it=i(40333),ot=i(97822);const st=y.css`:host{display:inline-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}.button{display:inline-flex;align-items:center;justify-content:center}.button.pill::part(button){font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.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);padding-right:4px}.separator{width:1px;height:.75rem;background-color:var(--floating-button-bar-secondary-color)}md-tooltip::part(tooltip_reference){display:flex;align-items:center}`;var rt=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let nt=class extends y.LitElement{constructor(){super(...arguments),this.leadingLabel="",this.closeButtonAriaLabel="",this.showCloseButton=!0,this.actions=[]}static get styles(){return[st]}onCancelButttonAction(){this.dispatchEvent(new CustomEvent("cancel-button-action",{composed:!0,bubbles:!0}))}get closeButtonTemplate(){return y.html`
|
|
63
|
+
<md-tooltip
|
|
64
|
+
message="${(0,ot.ifDefined)(this.closeButtonAriaLabel)}"
|
|
65
|
+
?disabled=${!this.closeButtonAriaLabel}
|
|
66
|
+
placement="top"
|
|
67
|
+
>
|
|
68
|
+
<md-button
|
|
69
|
+
class="button cancel"
|
|
70
|
+
circle
|
|
71
|
+
size="20"
|
|
72
|
+
variant="ghostInheritTextColor"
|
|
73
|
+
ariaLabel=${(0,ot.ifDefined)(this.closeButtonAriaLabel)}
|
|
74
|
+
@button-click=${()=>this.onCancelButttonAction()}
|
|
75
|
+
>
|
|
76
|
+
<md-icon slot="icon" iconSet="momentumDesign" name="cancel-bold" size="16"></md-icon>
|
|
77
|
+
</md-button>
|
|
78
|
+
</md-tooltip>
|
|
79
|
+
`}getPrimaryLabelTemplate(t){return y.html` <span class="label primary">${t}</span> `}getSecondaryLabelTemplate(t){return y.html` <span class="label secondary">${t}</span> `}get separatorTemplate(){return y.html` <div class="separator"></div> `}getIconTemplate(t){return y.html`${t.icon?y.html`<md-icon slot="icon" iconSet="momentumDesign" name=${t.icon} size="16"></md-icon>`:it.nothing}`}getPillButtonTemplate(t){return y.html`
|
|
80
|
+
<md-button class="button pill" size="24" variant="inverted-ghost" @button-click=${()=>t.action()}>
|
|
81
|
+
${this.getIconTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}
|
|
82
|
+
</md-button>
|
|
83
|
+
`}getCircleButtonTemplate(t){return y.html`
|
|
84
|
+
<md-button class="button" circle size="24" variant="inverted-secondary" @button-click=${()=>t.action()}>
|
|
85
|
+
${this.getIconTemplate(t)}
|
|
86
|
+
</md-button>
|
|
87
|
+
`}getTooltipCircleButtonTemplate(t){return y.html`
|
|
88
|
+
<md-tooltip message="${t.label}" placement="top"> ${this.getCircleButtonTemplate(t)} </md-tooltip>
|
|
89
|
+
`}getActionAndLabelTemplate(t){var e;const i=null!==(e=t.iconAlign)&&void 0!==e?e:"right";return y.html`
|
|
90
|
+
${"left"===i?y.html`${this.getCircleButtonTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}`:y.html`${this.getPrimaryLabelTemplate(t.label)} ${this.getCircleButtonTemplate(t)}`}
|
|
91
|
+
`}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return y.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return y.html`
|
|
92
|
+
${this.showCloseButton?this.closeButtonTemplate:it.nothing} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
|
|
93
|
+
${this.actions.map(t=>this.getActionGroupTemplate(t))}
|
|
94
|
+
`}};rt([(0,y.property)({type:String})],nt.prototype,"leadingLabel",void 0),rt([(0,y.property)({type:String})],nt.prototype,"closeButtonAriaLabel",void 0),rt([(0,y.property)({type:Boolean})],nt.prototype,"showCloseButton",void 0),rt([(0,y.property)({type:Array})],nt.prototype,"actions",void 0),nt=rt([(0,y.customElement)("md-floating-button-bar")],nt);var at=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ct extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),bt=i(20109),vt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),Ct=i(68490),xt=i(66245),St=i(69788),Et=i(61997),$t=i(11323),Tt=i(84032),At=i(48171),kt=i(32252),It=i(23026),Lt=i(84205),Ot=i(71128),Mt=i(15300),Dt=i(58287),Pt=i(81144),Rt=i(32217);const _t=y.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var Bt,zt=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,y.html`<slot></slot>`}static get styles(){return[_t]}};zt([(0,y.property)({type:String})],e.prototype,"width",void 0),zt([(0,y.property)({type:String})],e.prototype,"height",void 0),zt([(0,y.property)({reflect:!0})],e.prototype,"variant",void 0),zt([(0,y.property)({reflect:!0})],e.prototype,"animation",void 0),e=zt([(0,y.customElement)("md-skeleton")],e),t.ELEMENT=e}(Bt||(Bt={}));var Ft=i(25428),Vt=i(12176),Nt=i(77935),jt=i(40428),Ut=i(16643),qt=i(97737),Ht=i(50226),Wt=i(86610),Kt=i(1072),Gt=i(49256),Yt=i(20331),Xt=i(81786),Zt=i(37719)},3001:(t,e,i)=>{i.d(e,{Io:()=>n.I,TS:()=>a.T,UM:()=>r.U,dY:()=>s.d,wW:()=>l.w,yC:()=>o.y}),i(18889);var o=i(32972),s=i(28373),r=i(70300),n=i(84624),a=i(68387),l=i(31890)},3288:t=>{t.exports=L},3527:t=>{t.exports=M},3664:(t,e,i)=>{i.d(e,{Checkbox:()=>o}),i(61200);var o,s=i(90195),r=i(3001),n=i(31890),a=i(26272),l=i(41488),d=i(40333),h=i(18841),p=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,r.yC)(l.LitElement)){constructor(){super(...arguments),this.autofocus=!1,this._checked=!1,this._indeterminate=!1,this._disabled=!1,this.label="",this.tabIndex=0}get checked(){return this._checked}set checked(t){const e=this._checked;this._checked=t,this.indeterminate||this.setAttribute("aria-checked",`${t}`),this.requestUpdate("checked",e)}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=this._indeterminate;this._indeterminate=t,this.setAttribute("aria-checked","mixed"),this.requestUpdate("indeterminate",e)}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.setAttribute("aria-disabled",`${t}`),this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}static get styles(){return[a.A,h.A]}toggleCheckbox(){this.checked=!this.checked}isCheckboxActive(){return this.disabled||this.indeterminate}handleClick(t){this.isCheckboxActive()?t.stopPropagation():(this.toggleCheckbox(),this.handleChange(t))}handleKeyDown(t){const{code:e}=t;e!==s.Uz.Space&&e!==s.Uz.Enter||(t.preventDefault(),this.isCheckboxActive()?t.stopPropagation():(this.toggleCheckbox(),this.handleChange(t)))}handleChange(t){this.dispatchEvent(new CustomEvent("checkbox-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,checked:this.checked}}))}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","checkbox"),this.label&&this.setAttribute("aria-label",this.label)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}update(t){super.update(t),t.has("indeterminate")&&(this.checked=!1)}updated(t){super.updated(t),t.has("indeterminate")&&(this.input.indeterminate=this.indeterminate)}get checkboxIconName(){return this.checked?"check-bold":this.indeterminate?"minus-bold":null}checkboxIconTemplate(){const t=this.checkboxIconName;return t?l.html`<md-icon name="${t}" iconSet="momentumDesign" size="16"></md-icon>`:d.nothing}checkboxBoxTemplate(){return l.html` <div part="checkbox-box" class="checkbox-box">${this.checkboxIconTemplate()}</div> `}render(){return l.html`
|
|
17
95
|
<input
|
|
18
96
|
class="checkbox-input"
|
|
19
97
|
type="checkbox"
|
|
@@ -1476,85 +1554,7 @@
|
|
|
1476
1554
|
${l().sanitize(this.content)}
|
|
1477
1555
|
</div>
|
|
1478
1556
|
${this.messagesTemplate()}
|
|
1479
|
-
`}};m([(0,d.property)({type:String})],e.prototype,"alignment",void 0),m([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,d.property)({type:Boolean})],e.prototype,"isEditing",void 0),m([(0,d.property)({type:String,attribute:"max-lines",reflect:!0})],e.prototype,"maxLines",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"content",void 0),m([(0,d.property)({type:Object})],e.prototype,"message",void 0),m([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"alert",void 0),m([(0,d.property)({type:Boolean})],e.prototype,"hideMessage",void 0),m([(0,d.property)({type:String})],e.prototype,"pattern",void 0),m([(0,d.property)({type:String})],e.prototype,"type",void 0),m([(0,d.property)({type:String})],e.prototype,"ariaLabel",void 0),m([(0,d.property)({type:String,attribute:"aria-described-by"})],e.prototype,"ariaDescribedBy",void 0),m([(0,d.query)(".md-editable-textfield")],e.prototype,"editableField",void 0),e=m([(0,s.w)("md-editable-field")],e),t.ELEMENT=e}(o||(o={}))},
|
|
1480
|
-
<md-icon
|
|
1481
|
-
class="md-notification-badge-icon ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
|
|
1482
|
-
iconSet="momentumDesign"
|
|
1483
|
-
name="${(0,v.ifDefined)(t)}"
|
|
1484
|
-
size="${f.zY.ICON_SIZE}"
|
|
1485
|
-
></md-icon>
|
|
1486
|
-
`}getBadgeDot(){return y.html`<div
|
|
1487
|
-
class="md-notification-badge-dot ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay})}"
|
|
1488
|
-
></div>`}getBadgeCounterText(){return y.html`
|
|
1489
|
-
<div class="md-notification-badge-text ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay})}">
|
|
1490
|
-
${this.getCounterText(this.maxCounter,this.counter)}
|
|
1491
|
-
</div>
|
|
1492
|
-
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(f.M_).includes(this.variant)&&(this.variant=f.zY.VARIANT);const{iconName:t,type:e,variant:i}=this;switch(e){case f.ZE.ICON:return this.getBadgeIcon(t||"",i);case f.ZE.COUNTER:return this.getBadgeCounterText();case f.ZE.SUCCESS:return this.getBadgeIcon(f.UZ.SUCCESS_ICON_NAME,f.su.SUCCESS);case f.ZE.WARNING:return this.getBadgeIcon(f.UZ.WARNING_ICON_NAME,f.su.WARNING);case f.ZE.ERROR:return this.getBadgeIcon(f.UZ.ERROR_ICON_NAME,f.su.ERROR);case f.ZE.DOT:default:return this.type=f.ZE.DOT,this.getBadgeDot()}}update(t){super.update(t),t.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};C([(0,y.property)({type:String,reflect:!0})],x.prototype,"type",void 0),C([(0,y.property)({type:String,reflect:!0})],x.prototype,"variant",void 0),C([(0,y.property)({type:Number})],x.prototype,"counter",void 0),C([(0,y.property)({type:Number,attribute:"max-counter",reflect:!0})],x.prototype,"maxCounter",void 0),C([(0,y.property)({type:Boolean})],x.prototype,"overlay",void 0),C([(0,y.property)({type:String,attribute:"icon-name"})],x.prototype,"iconName",void 0),C([(0,y.property)({type:String,attribute:"aria-label"})],x.prototype,"ariaLabel",void 0),x=C([(0,m.wW)("md-notification-badge")],x);var S=i(92992),E=i(45629),$=i(96798),T=i(64311),A=i(90827),k=i(10654),I=i(95281),L=i(3664),O=i(55294),M=i(60046),D=i(29895),P=i(46312),R=i(26272),_=i(45001),B=i.n(_);const z=y.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 F,V=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.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[R.A,z]}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),B().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,o=void 0,r=function*(){try{const{default:e}=yield i(29599)(`./${t}`);B().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},new((s=void 0)||(s=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 s?i:new s(function(t){t(i)})).then(n,a)}l((r=r.apply(e,o||[])).next())});var e,o,s,r}getAllAcceptTypes(){const t=B().listLanguages();return t.length?t.map(t=>B().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 y.html`
|
|
1493
|
-
<div class="md-code-editor" part="code-editor">
|
|
1494
|
-
<div class="md-code-editor-header">
|
|
1495
|
-
<div class="md-code-editor-name">
|
|
1496
|
-
<md-badge color="blue">
|
|
1497
|
-
<slot name="method" method=${this.method}></slot>
|
|
1498
|
-
</md-badge>
|
|
1499
|
-
<span class="md-code-editor-url">
|
|
1500
|
-
<slot name="code-url" @slotchange=${this.handleUrlSlotChange}>${this.url}</slot>
|
|
1501
|
-
</span>
|
|
1502
|
-
</div>
|
|
1503
|
-
<div class="md-code-editor-copy">
|
|
1504
|
-
<span>${this.copied?this.copiedLocalization.trim():this.copyLocalization.trim()}</span>
|
|
1505
|
-
<md-button
|
|
1506
|
-
circle
|
|
1507
|
-
size="20"
|
|
1508
|
-
?disabled=${this.disableCopyButton}
|
|
1509
|
-
@click=${this.copyClipboard}
|
|
1510
|
-
class="md-code-editor-copy-btn"
|
|
1511
|
-
>
|
|
1512
|
-
<md-icon slot="icon" name="icon-copy_16"></md-icon>
|
|
1513
|
-
</md-button>
|
|
1514
|
-
</div>
|
|
1515
|
-
</div>
|
|
1516
|
-
<div class="md-code-editor-content">
|
|
1517
|
-
<pre class="md-code-editor-code-block">
|
|
1518
|
-
<slot name="code-block" @slotchange=${this.handleSlotChange}>
|
|
1519
|
-
<code class=${this.acceptLanguage}>
|
|
1520
|
-
</code>
|
|
1521
|
-
</slot>
|
|
1522
|
-
</pre>
|
|
1523
|
-
</div>
|
|
1524
|
-
</div>
|
|
1525
|
-
`}};V([(0,y.property)({type:String})],e.prototype,"copyLocalization",void 0),V([(0,y.property)({type:String})],e.prototype,"copiedLocalization",void 0),V([(0,y.property)({type:String})],e.prototype,"method",void 0),V([(0,y.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),V([(0,y.property)({type:String})],e.prototype,"url",void 0),V([(0,y.query)("input[type='file']")],e.prototype,"input",void 0),V([(0,y.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),V([(0,y.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),V([(0,y.internalProperty)()],e.prototype,"disableCopyButton",void 0),V([(0,y.internalProperty)()],e.prototype,"acceptTypes",void 0),V([(0,y.internalProperty)()],e.prototype,"copied",void 0),V([(0,y.queryAssignedNodes)("code-block")],e.prototype,"slotNodes",void 0),V([(0,y.queryAssignedNodes)("code-url")],e.prototype,"slotUrl",void 0),e=V([(0,m.wW)("md-code-editor")],e),t.ELEMENT=e}(F||(F={}));var N=i(4928),j=i(18224),U=i(69494),q=i(85416),H=i(38654),W=i(63208),K=i(16754),G=i(17814),Y=i(10984),X=i(80072),Z=i(24627),Q=i(23184),J=i(50565),tt=i(99850),et=i(83192),it=i(40333),ot=i(97822);const st=y.css`:host{display:inline-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}.button{display:inline-flex;align-items:center;justify-content:center}.button.pill::part(button){font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.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);padding-right:4px}.separator{width:1px;height:.75rem;background-color:var(--floating-button-bar-secondary-color)}md-tooltip::part(tooltip_reference){display:flex;align-items:center}`;var rt=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let nt=class extends y.LitElement{constructor(){super(...arguments),this.leadingLabel="",this.closeButtonAriaLabel="",this.showCloseButton=!0,this.actions=[]}static get styles(){return[st]}onCancelButttonAction(){this.dispatchEvent(new CustomEvent("cancel-button-action",{composed:!0,bubbles:!0}))}get closeButtonTemplate(){return y.html`
|
|
1526
|
-
<md-tooltip
|
|
1527
|
-
message="${(0,ot.ifDefined)(this.closeButtonAriaLabel)}"
|
|
1528
|
-
?disabled=${!this.closeButtonAriaLabel}
|
|
1529
|
-
placement="top"
|
|
1530
|
-
>
|
|
1531
|
-
<md-button
|
|
1532
|
-
class="button cancel"
|
|
1533
|
-
circle
|
|
1534
|
-
size="20"
|
|
1535
|
-
variant="ghostInheritTextColor"
|
|
1536
|
-
ariaLabel=${(0,ot.ifDefined)(this.closeButtonAriaLabel)}
|
|
1537
|
-
@button-click=${()=>this.onCancelButttonAction()}
|
|
1538
|
-
>
|
|
1539
|
-
<md-icon slot="icon" iconSet="momentumDesign" name="cancel-bold" size="16"></md-icon>
|
|
1540
|
-
</md-button>
|
|
1541
|
-
</md-tooltip>
|
|
1542
|
-
`}getPrimaryLabelTemplate(t){return y.html` <span class="label primary">${t}</span> `}getSecondaryLabelTemplate(t){return y.html` <span class="label secondary">${t}</span> `}get separatorTemplate(){return y.html` <div class="separator"></div> `}getIconTemplate(t){return y.html`${t.icon?y.html`<md-icon slot="icon" iconSet="momentumDesign" name=${t.icon} size="16"></md-icon>`:it.nothing}`}getPillButtonTemplate(t){return y.html`
|
|
1543
|
-
<md-button class="button pill" size="24" variant="inverted-ghost" @button-click=${()=>t.action()}>
|
|
1544
|
-
${this.getIconTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}
|
|
1545
|
-
</md-button>
|
|
1546
|
-
`}getCircleButtonTemplate(t){return y.html`
|
|
1547
|
-
<md-button class="button" circle size="24" variant="inverted-secondary" @button-click=${()=>t.action()}>
|
|
1548
|
-
${this.getIconTemplate(t)}
|
|
1549
|
-
</md-button>
|
|
1550
|
-
`}getTooltipCircleButtonTemplate(t){return y.html`
|
|
1551
|
-
<md-tooltip message="${t.label}" placement="top"> ${this.getCircleButtonTemplate(t)} </md-tooltip>
|
|
1552
|
-
`}getActionAndLabelTemplate(t){var e;const i=null!==(e=t.iconAlign)&&void 0!==e?e:"right";return y.html`
|
|
1553
|
-
${"left"===i?y.html`${this.getCircleButtonTemplate(t)} ${this.getPrimaryLabelTemplate(t.label)}`:y.html`${this.getPrimaryLabelTemplate(t.label)} ${this.getCircleButtonTemplate(t)}`}
|
|
1554
|
-
`}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return y.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return y.html`
|
|
1555
|
-
${this.showCloseButton?this.closeButtonTemplate:it.nothing} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
|
|
1556
|
-
${this.actions.map(t=>this.getActionGroupTemplate(t))}
|
|
1557
|
-
`}};rt([(0,y.property)({type:String})],nt.prototype,"leadingLabel",void 0),rt([(0,y.property)({type:String})],nt.prototype,"closeButtonAriaLabel",void 0),rt([(0,y.property)({type:Boolean})],nt.prototype,"showCloseButton",void 0),rt([(0,y.property)({type:Array})],nt.prototype,"actions",void 0),nt=rt([(0,y.customElement)("md-floating-button-bar")],nt);var at=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ct extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),bt=i(20109),vt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),Ct=i(68490),xt=i(66245),St=i(69788),Et=i(61997),$t=i(11323),Tt=i(84032),At=i(48171),kt=i(32252),It=i(23026),Lt=i(84205),Ot=i(71128),Mt=i(15300),Dt=i(58287),Pt=i(81144),Rt=i(32217),_t=i(25428),Bt=i(12176),zt=i(77935),Ft=i(40428),Vt=i(16643),Nt=i(97737),jt=i(50226),Ut=i(86610),qt=i(1072),Ht=i(49256),Wt=i(20331),Kt=i(81786),Gt=i(37719)},52619:(t,e,i)=>{i.d(e,{InputFile:()=>o}),i(96798);var o,s=i(3001),r=i(26272),n=i(45001),a=i.n(n),l=i(41488),d=i(40333),h=i(97822),p=i(45213),c=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},u=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function n(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,a)}l((o=o.apply(t,e||[])).next())})};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.acceptLanguage="javascript",this.getLocalization="Input File",this.acceptTypes="",this.fileName=""}static get styles(){return[r.A,p.A]}triggerFileLoad(t){t.preventDefault(),this.input.click()}handleFile(t){return u(this,void 0,void 0,function*(){t.preventDefault();const e=this.input.files;if(e&&0!==e.length)for(const t of e){this.fileName=t.name;try{yield this.readFile(t)}catch(t){console.error("Error reading file",t)}}})}readFile(t){return new Promise((e,i)=>{const o=new FileReader;o.onload=t=>{e(t.target.result)},o.onerror=t=>i(t),o.readAsText(t)})}importLanguage(t){return u(this,void 0,void 0,function*(){try{const{default:e}=yield i(29599)(`./${t}`);a().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}})}getAllAcceptTypes(){const t=a().listLanguages();return t.length?t.map(t=>a().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)}render(){return l.html`
|
|
1557
|
+
`}};m([(0,d.property)({type:String})],e.prototype,"alignment",void 0),m([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,d.property)({type:Boolean})],e.prototype,"isEditing",void 0),m([(0,d.property)({type:String,attribute:"max-lines",reflect:!0})],e.prototype,"maxLines",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"content",void 0),m([(0,d.property)({type:Object})],e.prototype,"message",void 0),m([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"alert",void 0),m([(0,d.property)({type:Boolean})],e.prototype,"hideMessage",void 0),m([(0,d.property)({type:String})],e.prototype,"pattern",void 0),m([(0,d.property)({type:String})],e.prototype,"type",void 0),m([(0,d.property)({type:String})],e.prototype,"ariaLabel",void 0),m([(0,d.property)({type:String,attribute:"aria-described-by"})],e.prototype,"ariaDescribedBy",void 0),m([(0,d.query)(".md-editable-textfield")],e.prototype,"editableField",void 0),e=m([(0,s.w)("md-editable-field")],e),t.ELEMENT=e}(o||(o={}))},52619:(t,e,i)=>{i.d(e,{InputFile:()=>o}),i(96798);var o,s=i(3001),r=i(26272),n=i(45001),a=i.n(n),l=i(41488),d=i(40333),h=i(97822),p=i(45213),c=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},u=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function n(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,a)}l((o=o.apply(t,e||[])).next())})};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.acceptLanguage="javascript",this.getLocalization="Input File",this.acceptTypes="",this.fileName=""}static get styles(){return[r.A,p.A]}triggerFileLoad(t){t.preventDefault(),this.input.click()}handleFile(t){return u(this,void 0,void 0,function*(){t.preventDefault();const e=this.input.files;if(e&&0!==e.length)for(const t of e){this.fileName=t.name;try{yield this.readFile(t)}catch(t){console.error("Error reading file",t)}}})}readFile(t){return new Promise((e,i)=>{const o=new FileReader;o.onload=t=>{e(t.target.result)},o.onerror=t=>i(t),o.readAsText(t)})}importLanguage(t){return u(this,void 0,void 0,function*(){try{const{default:e}=yield i(29599)(`./${t}`);a().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}})}getAllAcceptTypes(){const t=a().listLanguages();return t.length?t.map(t=>a().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)}render(){return l.html`
|
|
1558
1558
|
<div class="md-input-file">
|
|
1559
1559
|
<label for="file-input">
|
|
1560
1560
|
<md-button color="blue" class="md-input-file-btn" @click=${this.triggerFileLoad}>
|
|
@@ -1953,7 +1953,7 @@
|
|
|
1953
1953
|
<span class=${(0,a.classMap)(this.loadingIconClassMap)}></span>
|
|
1954
1954
|
<span class=${(0,a.classMap)(this.loadingIconClassMap)}></span>
|
|
1955
1955
|
</div>
|
|
1956
|
-
`}};d([(0,n.property)({type:String})],e.prototype,"size",void 0),e=d([(0,s.w)("md-loading")],e),t.ELEMENT=e}(o||(o={}))},71128:(t,e,i)=>{i.d(e,{Popover:()=>g,PopoverController:()=>v}),i(96798),i(61200);var o=i(31890),s=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,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},b=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function n(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,a)}l((o=o.apply(t,e||[])).next())})};class v{show(t){}hide(){}toggle(){}isVisible(){return!1}}let g=class extends((0,s.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.animationFrame=h.zY.ANIMATION_FRAME,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.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=t=>{const e=t.composedPath();this.triggerElement&&e.includes(this.triggerElement)||e.includes(this)||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=>{const e=t.relatedTarget;!e||this.isElementInPopover(e)?e||setTimeout(()=>{const t=(0,r.dw)();this.isElementInPopover(t)||this.hidePopover()},0):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.visible||(this.previousActiveElement=(0,r.dw)()),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.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.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=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("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),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()})}isElementInPopover(t){return!!t&&(!!this.contains(t)||(0,r.QZ)("md-popover",t)===this)}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 o,s,r,n;if(t!==e&&this.triggerElement)if(e)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(o=this.activateFocusTrap)||void 0===o||o.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(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),c.S.removeItem(this),this.backdropElement&&(null===(s=this.backdropElement)||void 0===s||s.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&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,p.T.onHidePopover(this)}})}isRectOverTrigger(t,e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return!1}isMouseOverTrigger(t){const{clientX:e,clientY:i}=t instanceof MouseEvent?t:{clientX:0,clientY:0};return this.isRectOverTrigger(e,i)}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;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);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)),this.cleanupAutoUpdate=(0,n.autoUpdate)(this.triggerElement,this,()=>b(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:o,placement:s}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),o.arrow&&this.arrowElement&&this.utils.updateArrowStyle(o.arrow,s),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(s)}),{animationFrame:this.animationFrame})}render(){return a.html`
|
|
1956
|
+
`}};d([(0,n.property)({type:String})],e.prototype,"size",void 0),e=d([(0,s.w)("md-loading")],e),t.ELEMENT=e}(o||(o={}))},71128:(t,e,i)=>{i.d(e,{Popover:()=>g,PopoverController:()=>v}),i(96798),i(61200);var o=i(31890),s=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,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},b=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function n(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,a)}l((o=o.apply(t,e||[])).next())})};class v{show(t){}hide(){}toggle(){}isVisible(){return!1}}let g=class extends((0,s.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.animationFrame=h.zY.ANIMATION_FRAME,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.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=t=>{const e=t.composedPath();this.triggerElement&&e.includes(this.triggerElement)||e.includes(this)||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=>{const e=t.relatedTarget;!e||this.isElementInPopover(e)?e||setTimeout(()=>{const t=(0,r.dw)();this.isElementInPopover(t)||this.hidePopover()},0):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.visible||(this.previousActiveElement=(0,r.dw)()),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.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.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=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("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),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()})}isElementInPopover(t){return!!t&&(!!this.contains(t)||(0,r.QZ)("md-popover",t)===this)}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 o,s,r,n;if(t!==e&&this.triggerElement)if(e)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(o=this.activateFocusTrap)||void 0===o||o.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.utils.handleAppendTo(!0),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(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),c.S.removeItem(this),this.utils.handleAppendTo(!1),this.backdropElement&&(null===(s=this.backdropElement)||void 0===s||s.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&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,p.T.onHidePopover(this)}})}isRectOverTrigger(t,e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return!1}isMouseOverTrigger(t){const{clientX:e,clientY:i}=t instanceof MouseEvent?t:{clientX:0,clientY:0};return this.isRectOverTrigger(e,i)}setFocusableElements(){var t;null===(t=super.setFocusableElements)||void 0===t||t.call(this);const e=this.triggerElement;this.appendTo&&this.activeFocusTrap&&e&&this.focusableElements&&(this.focusableElements.includes(e)||this.focusableElements.push(e))}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;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);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)),this.cleanupAutoUpdate=(0,n.autoUpdate)(this.triggerElement,this,()=>b(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:o,placement:s}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),o.arrow&&this.arrowElement&&this.utils.updateArrowStyle(o.arrow,s),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(s)}),{animationFrame:this.animationFrame})}render(){return a.html`
|
|
1957
1957
|
<div class="popover-hover-bridge"></div>
|
|
1958
1958
|
${this.closeButton?a.html` <md-button
|
|
1959
1959
|
class="popover-close"
|
|
@@ -2859,4 +2859,4 @@
|
|
|
2859
2859
|
size="16"
|
|
2860
2860
|
></md-icon>
|
|
2861
2861
|
</label>
|
|
2862
|
-
`}};c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"checked",void 0),c([(0,l.property)({type:String})],e.prototype,"value",void 0),c([(0,l.property)({type:String})],e.prototype,"id",void 0),c([(0,l.property)({type:String})],e.prototype,"label",void 0),c([(0,l.internalProperty)()],e.prototype,"customId",void 0),e=c([(0,n.w)("md-favorite")],e),t.ELEMENT=e}(o||(o={}))}},j={};function U(t){var e=j[t];if(void 0!==e)return e.exports;var i=j[t]={exports:{}};return N[t].call(i.exports,i,i.exports,U),i.exports}U.m=N,_=[],U.O=(t,e,i,o)=>{if(!e){var s=1/0;for(l=0;l<_.length;l++){for(var[e,i,o]=_[l],r=!0,n=0;n<e.length;n++)(!1&o||s>=o)&&Object.keys(U.O).every(t=>U.O[t](e[n]))?e.splice(n--,1):(r=!1,o<s&&(s=o));if(r){_.splice(l--,1);var a=i();void 0!==a&&(t=a)}}return t}o=o||0;for(var l=_.length;l>0&&_[l-1][2]>o;l--)_[l]=_[l-1];_[l]=[e,i,o]},U.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return U.d(e,{a:e}),e},z=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,U.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);U.r(i);var o={};B=B||[null,z({}),z([]),z(z)];for(var s=2&e&&t;("object"==typeof s||"function"==typeof s)&&!~B.indexOf(s);s=z(s))Object.getOwnPropertyNames(s).forEach(e=>o[e]=()=>t[e]);return o.default=()=>t,U.d(i,o),i},U.d=(t,e)=>{for(var i in e)U.o(e,i)&&!U.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},U.f={},U.e=t=>Promise.all(Object.keys(U.f).reduce((e,i)=>(U.f[i](t,e),e),[])),U.u=t=>"chunks/md-"+t+".js",U.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),U.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),F={},V="@momentum-ui/web-components:",U.l=(t,e,i,o)=>{if(F[t])F[t].push(e);else{var s,r;if(void 0!==i)for(var n=document.getElementsByTagName("script"),a=0;a<n.length;a++){var l=n[a];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==V+i){s=l;break}}s||(r=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,U.nc&&s.setAttribute("nonce",U.nc),s.setAttribute("data-webpack",V+i),s.src=t),F[t]=[e];var d=(e,i)=>{s.onerror=s.onload=null,clearTimeout(h);var o=F[t];if(delete F[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(t=>t(i)),e)return e(i)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),r&&document.head.appendChild(s)}},U.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},U.p="/",(()=>{var t={109:0,144:0,195:0,445:0,502:0,555:0,671:0,762:0,984:0,1037:0,1200:0,1266:0,1323:0,1439:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,2105:0,2139:0,2169:0,2176:0,2330:0,2434:0,2547:0,2555:0,2576:0,2779:0,2781:0,2909:0,3001:0,3079:0,3192:0,3413:0,3477:0,3539:0,3747:0,3820:0,3938:0,3943:0,4131:0,4139:0,4259:0,4545:0,4908:0,4928:0,4971:0,5156:0,5310:0,5369:0,5382:0,5427:0,5433:0,5517:0,6029:0,6060:0,6085:0,6132:0,6220:0,6396:0,6408:0,6433:0,6494:0,6587:0,6677:0,6724:0,6753:0,6754:0,6798:0,6834:0,6920:0,7119:0,7145:0,7219:0,7455:0,7684:0,7711:0,7719:0,7763:0,7814:0,7927:0,8028:0,8111:0,8115:0,8220:0,8334:0,8339:0,8442:0,8510:0,8654:0,8894:0,9058:0,9237:0};U.f.j=(e,i)=>{var o=U.o(t,e)?t[e]:void 0;if(0!==o)if(o)i.push(o[2]);else{var s=new Promise((i,s)=>o=t[e]=[i,s]);i.push(o[2]=s);var r=U.p+U.u(e),n=new Error;U.l(r,i=>{if(U.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var s=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;n.message="Loading chunk "+e+" failed.\n("+s+": "+r+")",n.name="ChunkLoadError",n.type=s,n.request=r,o[1](n)}},"chunk-"+e,e)}},U.O.j=e=>0===t[e];var e=(e,i)=>{var o,s,[r,n,a]=i,l=0;if(r.some(e=>0!==t[e])){for(o in n)U.o(n,o)&&(U.m[o]=n[o]);if(a)var d=a(U)}for(e&&e(i);l<r.length;l++)s=r[l],U.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return U.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var q=U.O(void 0,[6633,7103,1890,6272,6325,6283,9217,5830,8889,8210,4977,3135,1598,1572,6366,7251,4974,2243,7919,3553,6877,6700,8004,6795,8923,4548,76,1392,9164,2019,1625,6067,3625,8841,3112,3866,1107,6953,7330,7092,9719,6979,9130,6273,9618,8612,8521,4400,779,573,5801,2043,8171,2798,5467,2984,1869,2215,7997,4392,630,3604,8728,8227,1250,1705,7833,7875,6400,587,6441,6015,3663],()=>U(
|
|
2862
|
+
`}};c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"checked",void 0),c([(0,l.property)({type:String})],e.prototype,"value",void 0),c([(0,l.property)({type:String})],e.prototype,"id",void 0),c([(0,l.property)({type:String})],e.prototype,"label",void 0),c([(0,l.internalProperty)()],e.prototype,"customId",void 0),e=c([(0,n.w)("md-favorite")],e),t.ELEMENT=e}(o||(o={}))}},j={};function U(t){var e=j[t];if(void 0!==e)return e.exports;var i=j[t]={exports:{}};return N[t].call(i.exports,i,i.exports,U),i.exports}U.m=N,_=[],U.O=(t,e,i,o)=>{if(!e){var s=1/0;for(l=0;l<_.length;l++){for(var[e,i,o]=_[l],r=!0,n=0;n<e.length;n++)(!1&o||s>=o)&&Object.keys(U.O).every(t=>U.O[t](e[n]))?e.splice(n--,1):(r=!1,o<s&&(s=o));if(r){_.splice(l--,1);var a=i();void 0!==a&&(t=a)}}return t}o=o||0;for(var l=_.length;l>0&&_[l-1][2]>o;l--)_[l]=_[l-1];_[l]=[e,i,o]},U.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return U.d(e,{a:e}),e},z=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,U.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);U.r(i);var o={};B=B||[null,z({}),z([]),z(z)];for(var s=2&e&&t;("object"==typeof s||"function"==typeof s)&&!~B.indexOf(s);s=z(s))Object.getOwnPropertyNames(s).forEach(e=>o[e]=()=>t[e]);return o.default=()=>t,U.d(i,o),i},U.d=(t,e)=>{for(var i in e)U.o(e,i)&&!U.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},U.f={},U.e=t=>Promise.all(Object.keys(U.f).reduce((e,i)=>(U.f[i](t,e),e),[])),U.u=t=>"chunks/md-"+t+".js",U.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),U.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),F={},V="@momentum-ui/web-components:",U.l=(t,e,i,o)=>{if(F[t])F[t].push(e);else{var s,r;if(void 0!==i)for(var n=document.getElementsByTagName("script"),a=0;a<n.length;a++){var l=n[a];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==V+i){s=l;break}}s||(r=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,U.nc&&s.setAttribute("nonce",U.nc),s.setAttribute("data-webpack",V+i),s.src=t),F[t]=[e];var d=(e,i)=>{s.onerror=s.onload=null,clearTimeout(h);var o=F[t];if(delete F[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(t=>t(i)),e)return e(i)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),r&&document.head.appendChild(s)}},U.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},U.p="/",(()=>{var t={109:0,144:0,195:0,445:0,502:0,555:0,671:0,762:0,984:0,1037:0,1200:0,1266:0,1323:0,1439:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,2105:0,2139:0,2169:0,2176:0,2330:0,2434:0,2547:0,2555:0,2576:0,2779:0,2781:0,2909:0,3001:0,3079:0,3192:0,3413:0,3477:0,3539:0,3747:0,3820:0,3938:0,3943:0,4131:0,4139:0,4259:0,4545:0,4908:0,4928:0,4971:0,5156:0,5310:0,5369:0,5382:0,5427:0,5433:0,5517:0,6029:0,6060:0,6085:0,6132:0,6220:0,6396:0,6408:0,6433:0,6494:0,6587:0,6677:0,6724:0,6753:0,6754:0,6798:0,6834:0,6920:0,7119:0,7145:0,7219:0,7455:0,7684:0,7711:0,7719:0,7763:0,7814:0,7927:0,8028:0,8111:0,8115:0,8220:0,8334:0,8339:0,8442:0,8510:0,8654:0,8894:0,9058:0,9237:0};U.f.j=(e,i)=>{var o=U.o(t,e)?t[e]:void 0;if(0!==o)if(o)i.push(o[2]);else{var s=new Promise((i,s)=>o=t[e]=[i,s]);i.push(o[2]=s);var r=U.p+U.u(e),n=new Error;U.l(r,i=>{if(U.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var s=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;n.message="Loading chunk "+e+" failed.\n("+s+": "+r+")",n.name="ChunkLoadError",n.type=s,n.request=r,o[1](n)}},"chunk-"+e,e)}},U.O.j=e=>0===t[e];var e=(e,i)=>{var o,s,[r,n,a]=i,l=0;if(r.some(e=>0!==t[e])){for(o in n)U.o(n,o)&&(U.m[o]=n[o]);if(a)var d=a(U)}for(e&&e(i);l<r.length;l++)s=r[l],U.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return U.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var q=U.O(void 0,[6633,7103,1890,6272,6325,6283,9217,5830,8889,8210,4977,3135,1598,1572,6366,7251,4974,2243,7919,3553,6877,6700,8004,6795,8923,4548,76,1392,9164,2019,1625,6067,3625,8841,3112,3866,1107,6953,7330,7092,9719,6979,9130,6273,9618,8612,8521,4400,779,573,5801,2043,8171,2798,5467,2984,1869,2215,7997,4392,630,3604,8728,8227,1250,1705,7833,7875,6400,587,6441,6015,3663],()=>U(2864));return U.O(q)})());
|
|
@@ -326,6 +326,10 @@ export declare class Popover extends Popover_base {
|
|
|
326
326
|
private readonly onTriggerClick;
|
|
327
327
|
private isRectOverTrigger;
|
|
328
328
|
private isMouseOverTrigger;
|
|
329
|
+
/**
|
|
330
|
+
* Override setFocusableElements to include trigger element when using appendTo.
|
|
331
|
+
*/
|
|
332
|
+
setFocusableElements(): void;
|
|
329
333
|
/**
|
|
330
334
|
* Sets the focusable elements inside the popover.
|
|
331
335
|
*/
|
|
@@ -30,6 +30,10 @@ export declare class PopoverUtils {
|
|
|
30
30
|
* @param isOpen Whether the popover is being opened (true) or closed (false)
|
|
31
31
|
*/
|
|
32
32
|
handleAppendTo(isOpen: boolean): void;
|
|
33
|
+
/**
|
|
34
|
+
* Re-attaches focus/blur event listeners for any components with FocusMixin after DOM move.
|
|
35
|
+
*/
|
|
36
|
+
private reattachFocusListeners;
|
|
33
37
|
/**
|
|
34
38
|
* Sets up the accessibility attributes for the popover.
|
|
35
39
|
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from "lit-element";
|
|
2
|
+
export declare const skeletonAnimationTypes: readonly ["none", "pulse"];
|
|
3
|
+
export declare const skeletonVariants: readonly ["circle", "rectangular", "rounded"];
|
|
4
|
+
export declare namespace Skeleton {
|
|
5
|
+
type AnimationType = (typeof skeletonAnimationTypes)[number];
|
|
6
|
+
type Variant = (typeof skeletonVariants)[number];
|
|
7
|
+
class ELEMENT extends LitElement {
|
|
8
|
+
width?: string;
|
|
9
|
+
height?: string;
|
|
10
|
+
variant?: Variant;
|
|
11
|
+
animation?: AnimationType;
|
|
12
|
+
render(): import("lit-element").TemplateResult;
|
|
13
|
+
static get styles(): import("lit-element").CSSResult[];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
"md-skeleton": Skeleton.ELEMENT;
|
|
19
|
+
}
|
|
20
|
+
}
|