@fluid-topics/ft-search-selected-facets 2.1.14 → 2.1.15

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.
@@ -328,7 +328,7 @@
328
328
  <span class="ft-i18n">
329
329
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
330
330
  </span>
331
- `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Ye.elementDefinitions={};Ye.styles=kc;mi([(0,yn.redux)()],Ye.prototype,"editorMode",void 0);mi([(0,gn.property)()],Ye.prototype,"context",void 0);mi([(0,gn.property)()],Ye.prototype,"key",void 0);mi([(0,yn.jsonProperty)([])],Ye.prototype,"args",void 0);mi([(0,gn.property)()],Ye.prototype,"defaultMessage",void 0);var Dc=f(b());var Pc={"ft-i18n":Ye};(0,Dc.customElements)(Pc);var Xe=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},q=class extends hn{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Ve.Debouncer,this.revealDebouncer=new Ve.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)||this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return Nc.html`
331
+ `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Ye.elementDefinitions={};Ye.styles=kc;mi([(0,yn.redux)()],Ye.prototype,"editorMode",void 0);mi([(0,gn.property)()],Ye.prototype,"context",void 0);mi([(0,gn.property)()],Ye.prototype,"key",void 0);mi([(0,yn.jsonProperty)([])],Ye.prototype,"args",void 0);mi([(0,gn.property)()],Ye.prototype,"defaultMessage",void 0);var Dc=f(b());var Pc={"ft-i18n":Ye};(0,Dc.customElements)(Pc);var Xe=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},q=class extends hn{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Ve.Debouncer,this.revealDebouncer=new Ve.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return Nc.html`
332
332
  <div part="container"
333
333
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
334
334
  <slot part="slot"></slot>
@@ -343,7 +343,7 @@
343
343
  </div>
344
344
  </div>
345
345
  </div>
346
- `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Cc(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Ve.designSystemVariables.transitionDuration}, left ${Ve.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||(0,Ve.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}};q.elementDefinitions={"ft-typography":H};q.styles=Gl;Xe([_c()],q.prototype,"text",void 0);Xe([(0,ze.property)({type:Boolean})],q.prototype,"manual",void 0);Xe([(0,ze.property)({type:Boolean})],q.prototype,"inline",void 0);Xe([(0,Ve.numberProperty)()],q.prototype,"delay",void 0);Xe([(0,ze.property)()],q.prototype,"position",void 0);Xe([(0,Ve.jsonProperty)([])],q.prototype,"ignoreMatchingElements",void 0);Xe([(0,ze.queryAssignedNodes)()],q.prototype,"slotNodes",void 0);Xe([(0,ze.query)(".ft-tooltip--container")],q.prototype,"container",void 0);Xe([(0,ze.query)(".ft-tooltip")],q.prototype,"tooltip",void 0);Xe([(0,ze.query)(".ft-tooltip--content")],q.prototype,"tooltipContent",void 0);Xe([(0,ze.state)()],q.prototype,"visible",void 0);var Mc=f(b());var Ic={"ft-tooltip":q};(0,Mc.customElements)(Ic);var $c=f(_()),vi=f(b()),sr={color:vi.FtCssVariableFactory.extend("--ft-loader-color","",vi.designSystemVariables.colorPrimary),size:vi.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},Uc=$c.css`
346
+ `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Cc(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Ve.designSystemVariables.transitionDuration}, left ${Ve.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Ve.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};q.elementDefinitions={"ft-typography":H};q.styles=Gl;Xe([_c()],q.prototype,"text",void 0);Xe([(0,ze.property)({type:Boolean})],q.prototype,"manual",void 0);Xe([(0,ze.property)({type:Boolean})],q.prototype,"inline",void 0);Xe([(0,Ve.numberProperty)()],q.prototype,"delay",void 0);Xe([(0,ze.property)()],q.prototype,"position",void 0);Xe([(0,Ve.jsonProperty)([])],q.prototype,"ignoreMatchingElements",void 0);Xe([(0,ze.queryAssignedNodes)()],q.prototype,"slotNodes",void 0);Xe([(0,ze.query)(".ft-tooltip--container")],q.prototype,"container",void 0);Xe([(0,ze.query)(".ft-tooltip")],q.prototype,"tooltip",void 0);Xe([(0,ze.query)(".ft-tooltip--content")],q.prototype,"tooltipContent",void 0);Xe([(0,ze.state)()],q.prototype,"visible",void 0);var Mc=f(b());var Ic={"ft-tooltip":q};(0,Mc.customElements)(Ic);var $c=f(_()),vi=f(b()),sr={color:vi.FtCssVariableFactory.extend("--ft-loader-color","",vi.designSystemVariables.colorPrimary),size:vi.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},Uc=$c.css`
347
347
  :host {
348
348
  line-height: 0;
349
349
  }