@fluid-topics/ft-search-selected-facets 1.1.4 → 1.1.5

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.
@@ -130,7 +130,7 @@
130
130
  <div class="ft-ripple--background"></div>
131
131
  <div class="ft-ripple--effect"></div>
132
132
  </div>
133
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",o),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",o),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}it.elementDefinitions={},it.styles=et,ot([r.property({type:Boolean})],it.prototype,"primary",void 0),ot([r.property({type:Boolean})],it.prototype,"secondary",void 0),ot([r.property({type:Boolean})],it.prototype,"unbounded",void 0),ot([r.property({type:Boolean})],it.prototype,"activated",void 0),ot([r.property({type:Boolean})],it.prototype,"selected",void 0),ot([r.property({type:Boolean})],it.prototype,"disabled",void 0),ot([r.state()],it.prototype,"hovered",void 0),ot([r.state()],it.prototype,"focused",void 0),ot([r.state()],it.prototype,"pressed",void 0),ot([r.state()],it.prototype,"rippling",void 0),ot([r.state()],it.prototype,"originX",void 0),ot([r.state()],it.prototype,"originY",void 0),ot([r.query(".ft-ripple")],it.prototype,"ripple",void 0),ot([r.query(".ft-ripple--effect")],it.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(it);
133
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",o,n),t.addEventListener("touchstart",i,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",o,n),t.removeEventListener("touchstart",i,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}it.elementDefinitions={},it.styles=et,ot([r.property({type:Boolean})],it.prototype,"primary",void 0),ot([r.property({type:Boolean})],it.prototype,"secondary",void 0),ot([r.property({type:Boolean})],it.prototype,"unbounded",void 0),ot([r.property({type:Boolean})],it.prototype,"activated",void 0),ot([r.property({type:Boolean})],it.prototype,"selected",void 0),ot([r.property({type:Boolean})],it.prototype,"disabled",void 0),ot([r.state()],it.prototype,"hovered",void 0),ot([r.state()],it.prototype,"focused",void 0),ot([r.state()],it.prototype,"pressed",void 0),ot([r.state()],it.prototype,"rippling",void 0),ot([r.state()],it.prototype,"originX",void 0),ot([r.state()],it.prototype,"originY",void 0),ot([r.query(".ft-ripple")],it.prototype,"ripple",void 0),ot([r.query(".ft-ripple--effect")],it.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(it);
134
134
  /**
135
135
  * @license
136
136
  * Copyright 2017 Google LLC
@@ -559,7 +559,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
559
559
  </div>
560
560
  </div>
561
561
  </div>
562
- `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Bi(this.slottedElement,this.tooltip,{middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=_o(t,e),c={x:o,y:i},h=await oi(e,l),f=Qo(Go(r)),p=qo(f);let d=c[p],u=c[f];if(n){const t="y"===p?"bottom":"right";d=Mo(d+h["y"===p?"top":"left"],d,d-h[t])}if(a){const t="y"===f?"bottom":"right";u=Mo(u+h["y"===f?"top":"left"],u,u-h[t])}const g=s.fn({...e,[p]:d,[f]:u});return{...g,data:{x:g.x-o,y:g.y-i}}}}),ri({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Di.elementDefinitions={"ft-typography":po},Di.styles=Ao,Ai([r.property()],Di.prototype,"text",void 0),Ai([r.property({type:Boolean})],Di.prototype,"manual",void 0),Ai([r.property({type:Boolean})],Di.prototype,"inline",void 0),Ai([r.property({type:Number})],Di.prototype,"delay",void 0),Ai([r.property()],Di.prototype,"position",void 0),Ai([r.queryAssignedNodes()],Di.prototype,"slotNodes",void 0),Ai([r.query(".ft-tooltip--container")],Di.prototype,"container",void 0),Ai([r.query(".ft-tooltip")],Di.prototype,"tooltip",void 0),Ai([r.query(".ft-tooltip--content")],Di.prototype,"tooltipContent",void 0),Ai([r.state()],Di.prototype,"visible",void 0),e.customElement("ft-tooltip")(Di);class Ki extends e.FtLitElement{render(){return o.html`
562
+ `}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Bi(this.slottedElement,this.tooltip,{middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=_o(t,e),c={x:o,y:i},h=await oi(e,l),f=Qo(Go(r)),p=qo(f);let d=c[p],u=c[f];if(n){const t="y"===p?"bottom":"right";d=Mo(d+h["y"===p?"top":"left"],d,d-h[t])}if(a){const t="y"===f?"bottom":"right";u=Mo(u+h["y"===f?"top":"left"],u,u-h[t])}const g=s.fn({...e,[p]:d,[f]:u});return{...g,data:{x:g.x-o,y:g.y-i}}}}),ri({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Di.elementDefinitions={"ft-typography":po},Di.styles=Ao,Ai([r.property()],Di.prototype,"text",void 0),Ai([r.property({type:Boolean})],Di.prototype,"manual",void 0),Ai([r.property({type:Boolean})],Di.prototype,"inline",void 0),Ai([r.property({type:Number})],Di.prototype,"delay",void 0),Ai([r.property()],Di.prototype,"position",void 0),Ai([r.queryAssignedNodes()],Di.prototype,"slotNodes",void 0),Ai([r.query(".ft-tooltip--container")],Di.prototype,"container",void 0),Ai([r.query(".ft-tooltip")],Di.prototype,"tooltip",void 0),Ai([r.query(".ft-tooltip--content")],Di.prototype,"tooltipContent",void 0),Ai([r.state()],Di.prototype,"visible",void 0),Ai([r.eventOptions({passive:!0})],Di.prototype,"onTouch",null),Ai([r.eventOptions({passive:!0})],Di.prototype,"onHover",null),Ai([r.eventOptions({passive:!0})],Di.prototype,"onOut",null),e.customElement("ft-tooltip")(Di);class Ki extends e.FtLitElement{render(){return o.html`
563
563
  <div class="ft-loader">
564
564
  <div></div>
565
565
  <div></div>