@fluid-topics/ft-search-input 1.0.43 → 1.0.45
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/build/ft-search-input.light.js +23 -23
- package/build/ft-search-input.min.js +11 -11
- package/package.json +9 -9
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
<div class="ft-ripple--background"></div>
|
|
106
106
|
<div class="ft-ripple--effect"></div>
|
|
107
107
|
</div>
|
|
108
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),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",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),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 i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}b.elementDefinitions={},b.styles=g,v([o.property({type:Boolean})],b.prototype,"primary",void 0),v([o.property({type:Boolean})],b.prototype,"secondary",void 0),v([o.property({type:Boolean})],b.prototype,"unbounded",void 0),v([o.property({type:Boolean})],b.prototype,"activated",void 0),v([o.property({type:Boolean})],b.prototype,"selected",void 0),v([o.property({type:Boolean})],b.prototype,"disabled",void 0),v([o.state()],b.prototype,"hovered",void 0),v([o.state()],b.prototype,"focused",void 0),v([o.state()],b.prototype,"pressed",void 0),v([o.state()],b.prototype,"rippling",void 0),v([o.state()],b.prototype,"rippleSize",void 0),v([o.state()],b.prototype,"originX",void 0),v([o.state()],b.prototype,"originY",void 0),v([o.query(".ft-ripple")],b.prototype,"ripple",void 0),v([o.query(".ft-ripple--effect")],b.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(b);const y=window,m=y.trustedTypes,$=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,S="?"+k,C=`<${S}>`,z=document,O=()=>z.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,j="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,M=/>/g,A=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,T=/"/g,F=/^(?:script|style|textarea|title)$/i,D=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),L=new WeakMap,P=z.createTreeWalker(z,129,null,!1),_=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=U;for(let i=0;i<e;i++){const e=t[i];let a,l,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,l=r.exec(e),null!==l);)h=r.lastIndex,r===U?"!--"===l[1]?r=N:void 0!==l[1]?r=M:void 0!==l[2]?(F.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=A):void 0!==l[3]&&(r=A):r===A?">"===l[0]?(r=null!=s?s:U,p=-1):void 0===l[1]?p=-2:(p=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?A:'"'===l[3]?T:B):r===T||r===B?r=A:r===N||r===M?r=U:(r=A,s=void 0);const c=r===A&&t[i+1].startsWith("/>")?" ":"";n+=r===U?e+C:p>=0?(o.push(a),e.slice(0,p)+w+e.slice(p)+k+c):e+k+(-2===p?(o.push(void 0),i):c)}const a=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,p]=_(t,i);if(this.el=K.createElement(l,e),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=P.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(w)||i.startsWith(k)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+w).split(k),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?V:"?"===i[1]?X:"@"===i[1]?Y:q})}else a.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(F.test(o.tagName)){const t=o.textContent.split(k),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],O()),P.nextNode(),a.push({type:2,index:++s});o.append(t[i],O())}}}else if(8===o.nodeType)if(o.data===S)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)a.push({type:7,index:s}),t+=k.length-1}s++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function W(t,i,e=t,o){var s,n,r,a;if(i===R)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=E(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=W(t,l._$AS(t,i.values),l,o)),i}class H{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);P.currentNode=s;let n=P.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new G(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new J(n,this,t)),this._$AV.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=P.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var s;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=W(this,t,i),E(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Z&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new H(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=L.get(t.strings);return void 0===i&&L.set(t.strings,i=new K(t)),i}T(t){I(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new G(this.k(O()),this.k(O()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class q{constructor(t,i,e,o,s){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=W(this,t,i,0),n=!E(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=W(this,o[e+r],i,r),a===R&&(a=this._$AH[r]),n||(n=!E(a)||a!==this._$AH[r]),a===Z?t=Z:t!==Z&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const Q=m?m.emptyScript:"";class X extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,Q):this.element.removeAttribute(this.name)}}class Y extends q{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=W(this,t,i,0))&&void 0!==e?e:Z)===R)return;const o=this._$AH,s=t===Z&&o!==Z||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Z&&(o===Z||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){W(this,t)}}const tt=y.litHtmlPolyfillSupport;null==tt||tt(K,G),(null!==(x=y.litHtmlVersions)&&void 0!==x?x:y.litHtmlVersions=[]).push("2.7.3");
|
|
108
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),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",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),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 i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}b.elementDefinitions={},b.styles=g,v([o.property({type:Boolean})],b.prototype,"primary",void 0),v([o.property({type:Boolean})],b.prototype,"secondary",void 0),v([o.property({type:Boolean})],b.prototype,"unbounded",void 0),v([o.property({type:Boolean})],b.prototype,"activated",void 0),v([o.property({type:Boolean})],b.prototype,"selected",void 0),v([o.property({type:Boolean})],b.prototype,"disabled",void 0),v([o.state()],b.prototype,"hovered",void 0),v([o.state()],b.prototype,"focused",void 0),v([o.state()],b.prototype,"pressed",void 0),v([o.state()],b.prototype,"rippling",void 0),v([o.state()],b.prototype,"rippleSize",void 0),v([o.state()],b.prototype,"originX",void 0),v([o.state()],b.prototype,"originY",void 0),v([o.query(".ft-ripple")],b.prototype,"ripple",void 0),v([o.query(".ft-ripple--effect")],b.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(b);const y=window,m=y.trustedTypes,$=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,w="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,S="?"+k,C=`<${S}>`,z=document,E=()=>z.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,j="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,M=/>/g,A=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,T=/"/g,F=/^(?:script|style|textarea|title)$/i,D=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),L=new WeakMap,P=z.createTreeWalker(z,129,null,!1),_=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=U;for(let i=0;i<e;i++){const e=t[i];let a,l,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,l=r.exec(e),null!==l);)h=r.lastIndex,r===U?"!--"===l[1]?r=N:void 0!==l[1]?r=M:void 0!==l[2]?(F.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=A):void 0!==l[3]&&(r=A):r===A?">"===l[0]?(r=null!=s?s:U,p=-1):void 0===l[1]?p=-2:(p=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?A:'"'===l[3]?T:B):r===T||r===B?r=A:r===N||r===M?r=U:(r=A,s=void 0);const c=r===A&&t[i+1].startsWith("/>")?" ":"";n+=r===U?e+C:p>=0?(o.push(a),e.slice(0,p)+w+e.slice(p)+k+c):e+k+(-2===p?(o.push(void 0),i):c)}const a=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,p]=_(t,i);if(this.el=K.createElement(l,e),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=P.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(w)||i.startsWith(k)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+w).split(k),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?V:"?"===i[1]?X:"@"===i[1]?Y:q})}else a.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(F.test(o.tagName)){const t=o.textContent.split(k),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],E()),P.nextNode(),a.push({type:2,index:++s});o.append(t[i],E())}}}else if(8===o.nodeType)if(o.data===S)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(k,t+1));)a.push({type:7,index:s}),t+=k.length-1}s++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function W(t,i,e=t,o){var s,n,r,a;if(i===R)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=O(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=W(t,l._$AS(t,i.values),l,o)),i}class H{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);P.currentNode=s;let n=P.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new G(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new J(n,this,t)),this._$AV.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=P.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class G{constructor(t,i,e,o){var s;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=W(this,t,i),O(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Z&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new H(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=L.get(t.strings);return void 0===i&&L.set(t.strings,i=new K(t)),i}T(t){I(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new G(this.k(E()),this.k(E()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class q{constructor(t,i,e,o,s){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=W(this,t,i,0),n=!O(t)||t!==this._$AH&&t!==R,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=W(this,o[e+r],i,r),a===R&&(a=this._$AH[r]),n||(n=!O(a)||a!==this._$AH[r]),a===Z?t=Z:t!==Z&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}const Q=m?m.emptyScript:"";class X extends q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,Q):this.element.removeAttribute(this.name)}}class Y extends q{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=W(this,t,i,0))&&void 0!==e?e:Z)===R)return;const o=this._$AH,s=t===Z&&o!==Z||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Z&&(o===Z||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){W(this,t)}}const tt=y.litHtmlPolyfillSupport;null==tt||tt(K,G),(null!==(x=y.litHtmlVersions)&&void 0!==x?x:y.litHtmlVersions=[]).push("2.7.3");
|
|
109
109
|
/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright 2020 Google LLC
|
|
112
112
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
113
113
|
*/
|
|
114
|
-
const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void 0:t._$litStatic$},ot=t=>({_$litStatic$:t,r:it}),st=new Map,nt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(n=e[p],s=et(n));)l+=s+i[++p],h=!0;p!==o&&a.push(n),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=st.get(t))&&(r.raw=r,st.set(t,i=r)),e=a}return t(i,...e)})(D);var rt;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(rt||(rt={}));const at=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),pt={fontFamily:lt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",at),ct=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",pt.fontSize,"20px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",pt.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",pt.letterSpacing,"0.15px"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",pt.lineHeight,"1.2"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",pt.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",at),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",pt.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",pt.fontWeight,"normal"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",pt.letterSpacing,"0.105px"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",pt.lineHeight,"1.7"),$t=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",pt.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",pt.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",pt.fontWeight,"600"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",pt.letterSpacing,"0.144px"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",pt.lineHeight,"1.5"),
|
|
114
|
+
const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void 0:t._$litStatic$},ot=t=>({_$litStatic$:t,r:it}),st=new Map,nt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(n=e[p],s=et(n));)l+=s+i[++p],h=!0;p!==o&&a.push(n),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=st.get(t))&&(r.raw=r,st.set(t,i=r)),e=a}return t(i,...e)})(D);var rt;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(rt||(rt={}));const at=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),lt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),pt={fontFamily:lt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",at),ct=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",pt.fontSize,"20px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",pt.fontWeight,"normal"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",pt.letterSpacing,"0.15px"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",pt.lineHeight,"1.2"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",pt.textTransform,"inherit"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",at),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",pt.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",pt.fontWeight,"normal"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",pt.letterSpacing,"0.105px"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",pt.lineHeight,"1.7"),$t=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",pt.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",lt),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",pt.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",pt.fontWeight,"600"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",pt.letterSpacing,"0.144px"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",pt.lineHeight,"1.5"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",pt.textTransform,"inherit"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",lt),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",pt.fontSize,"14px"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",pt.fontWeight,"normal"),Ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",pt.letterSpacing,"0.098px"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",pt.lineHeight,"1.7"),Mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",pt.textTransform,"inherit"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",lt),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",pt.fontSize,"16px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",pt.fontWeight,"normal"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",pt.letterSpacing,"0.496px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",pt.lineHeight,"1.5"),Rt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",pt.textTransform,"inherit"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",lt),Lt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",pt.fontSize,"14px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",pt.fontWeight,"normal"),_t=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",pt.letterSpacing,"0.252px"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",pt.lineHeight,"1.4"),Wt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",pt.textTransform,"inherit"),Ht=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",lt),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",pt.fontSize,"12px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",pt.fontWeight,"normal"),Vt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",pt.letterSpacing,"0.396px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",pt.lineHeight,"1.33"),Xt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",pt.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",lt),Jt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",pt.fontSize,"10px"),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",pt.fontWeight,"normal"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",pt.letterSpacing,"0.33px"),ei=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",pt.lineHeight,"1.6"),oi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",pt.textTransform,"inherit"),si=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",lt),ni=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",pt.fontSize,"10px"),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",pt.fontWeight,"normal"),ai=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",pt.letterSpacing,"1.5px"),li=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",pt.lineHeight,"1.6"),pi=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",pt.textTransform,"uppercase"),hi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",lt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",pt.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",pt.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",pt.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",pt.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",pt.textTransform,"uppercase")},ci=e.css`
|
|
115
115
|
.ft-typography--title {
|
|
116
116
|
font-family: ${ht};
|
|
117
117
|
font-size: ${ct};
|
|
@@ -136,11 +136,11 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
136
136
|
font-weight: ${St};
|
|
137
137
|
letter-spacing: ${Ct};
|
|
138
138
|
line-height: ${zt};
|
|
139
|
-
text-transform: ${
|
|
139
|
+
text-transform: ${Et};
|
|
140
140
|
}
|
|
141
141
|
`,ui=e.css`
|
|
142
142
|
.ft-typography--subtitle2 {
|
|
143
|
-
font-family: ${
|
|
143
|
+
font-family: ${Ot};
|
|
144
144
|
font-size: ${It};
|
|
145
145
|
font-weight: ${jt};
|
|
146
146
|
letter-spacing: ${Ut};
|
|
@@ -245,7 +245,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
245
245
|
position: relative;
|
|
246
246
|
word-break: break-word;
|
|
247
247
|
}
|
|
248
|
-
`;var zi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class
|
|
248
|
+
`;var zi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ei extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
249
249
|
<div part="container"
|
|
250
250
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
251
251
|
@mouseenter=${this.onHover}
|
|
@@ -263,7 +263,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
263
263
|
</div>
|
|
264
264
|
</div>
|
|
265
265
|
</div>
|
|
266
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=4-i.left);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${Si.maxWidth})`}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())}}
|
|
266
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=4-i.left);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${Si.maxWidth})`}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())}}Ei.elementDefinitions={"ft-typography":ki},Ei.styles=Ci,zi([o.property()],Ei.prototype,"text",void 0),zi([o.property({type:Boolean})],Ei.prototype,"manual",void 0),zi([o.property({type:Boolean})],Ei.prototype,"inline",void 0),zi([o.property({type:Number})],Ei.prototype,"delay",void 0),zi([o.property()],Ei.prototype,"position",void 0),zi([o.queryAssignedNodes("",!0)],Ei.prototype,"slotNodes",void 0),zi([o.query(".ft-tooltip--container")],Ei.prototype,"container",void 0),zi([o.query("slot")],Ei.prototype,"target",void 0),zi([o.query(".ft-tooltip")],Ei.prototype,"tooltip",void 0),zi([o.query(".ft-tooltip--content")],Ei.prototype,"tooltipContent",void 0),zi([o.state()],Ei.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ei);const Oi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ii=e.css`
|
|
267
267
|
:host {
|
|
268
268
|
line-height: 0;
|
|
269
269
|
}
|
|
@@ -272,8 +272,8 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
272
272
|
display: inline-block;
|
|
273
273
|
position: relative;
|
|
274
274
|
|
|
275
|
-
width: ${
|
|
276
|
-
height: ${
|
|
275
|
+
width: ${Oi.size};
|
|
276
|
+
height: ${Oi.size};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
.ft-loader div {
|
|
@@ -282,7 +282,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
282
282
|
width: 25%;
|
|
283
283
|
height: 25%;
|
|
284
284
|
border-radius: 50%;
|
|
285
|
-
background: ${
|
|
285
|
+
background: ${Oi.color};
|
|
286
286
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -329,7 +329,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
329
329
|
transform: translate(0, 0);
|
|
330
330
|
}
|
|
331
331
|
100% {
|
|
332
|
-
transform: translate(calc(0.35 * ${
|
|
332
|
+
transform: translate(calc(0.35 * ${Oi.size}), 0);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
`;class ji extends i.FtLitElement{render(){return e.html`
|
|
@@ -526,8 +526,8 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
ft-loader {
|
|
529
|
-
${i.setVariable(
|
|
530
|
-
${i.setVariable(
|
|
529
|
+
${i.setVariable(Oi.size,Li.iconSize)};
|
|
530
|
+
${i.setVariable(Oi.color,"var(--ft-button-internal-color)")};
|
|
531
531
|
}
|
|
532
532
|
`,i.noTextSelect];var Vi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Qi extends i.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
533
533
|
<button part="button"
|
|
@@ -552,7 +552,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
552
552
|
</ft-tooltip>
|
|
553
553
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
554
554
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
555
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Qi.elementDefinitions={"ft-ripple":b,"ft-tooltip":
|
|
555
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Qi.elementDefinitions={"ft-ripple":b,"ft-tooltip":Ei,"ft-typography":ki,"ft-icon":Ri,"ft-loader":ji},Qi.styles=[i.safariEllipsisFix,qi],Vi([o.property({type:String,reflect:!0})],Qi.prototype,"role",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"primary",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"outlined",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"disabled",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"dense",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"round",void 0),Vi([o.property()],Qi.prototype,"label",void 0),Vi([o.property()],Qi.prototype,"icon",void 0),Vi([o.property()],Qi.prototype,"iconVariant",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"trailingIcon",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"loading",void 0),Vi([o.property()],Qi.prototype,"tooltipPosition",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"hideTooltip",void 0),Vi([o.property({type:Boolean})],Qi.prototype,"forceTooltip",void 0),Vi([o.query(".ft-button")],Qi.prototype,"button",void 0),Vi([o.query(".ft-button--label slot")],Qi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Qi);const Xi={height:i.FtCssVariableFactory.create("--ft-search-input-height","SIZE","38px"),borderRadius:i.FtCssVariableFactory.extend("--ft-search-input-border-radius",i.designSystemVariables.borderRadiusS),desktopFiltersHeight:i.FtCssVariableFactory.create("--ft-search-input-desktop-filters-height","SIZE","350px"),floatingZIndex:i.FtCssVariableFactory.create("--ft-search-input-floating-components-z-index","NUMBER","3"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),elevation02:i.FtCssVariableFactory.external(i.designSystemVariables.elevation02,"Design system"),buttonColor:i.FtCssVariableFactory.external(Li.color,"Button"),buttonRippleColor:i.FtCssVariableFactory.external(Li.rippleColor,"Button")},Yi=e.css`
|
|
556
556
|
* {
|
|
557
557
|
box-sizing: border-box;
|
|
558
558
|
}
|
|
@@ -636,12 +636,12 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
636
636
|
`,Ji=e.css`
|
|
637
637
|
`,te=i.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,i)=>{t.baseUrl=i.payload},setApiIntegrationIdentifier:(t,i)=>{t.apiIntegrationIdentifier=i.payload},setUiLocale:(t,i)=>{t.uiLocale=i.payload},setAvailableUiLocales:(t,i)=>{t.availableUiLocales=i.payload},setEditorMode:(t,i)=>{t.editorMode=i.payload},setNoCustom:(t,i)=>{t.noCustom=i.payload},setNoCustomComponent:(t,i)=>{t.noCustomComponent=i.payload},setSession:(t,i)=>{t.session=i.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class ie{static build(t){const{baseUrl:i,apiIntegrationIdentifier:e}=te.getState(),o=null!=t?t:e;if(i&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,o,!0)}static get(t){var i;return null!=t?ie.build(t):null!==(i=ie.API)&&void 0!==i?i:ie.API=ie.build()}static await(t){return new Promise((i=>{let e=ie.get(t);if(e)i(e);else{const o=te.subscribe((()=>{e=ie.get(t),e&&(o(),i(e))}))}}))}}var ee;const oe=Symbol("clearAfterUnitTest");class se{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={},this.currentUiLocale="",this[ee]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},this.currentUiLocale=te.getState().uiLocale,te.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=te.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const s={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};i.deepEqual(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var s,n,r;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(n=null===(s=this.cache.getNow(t))||void 0===s?void 0:s.messages)&&void 0!==n?n:{};return new i.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},a).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,i){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(i),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>i.delay(0).then((()=>t())).catch((()=>null)))))}}ee=oe,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new se((async(t,i)=>(await ie.await()).getFluidTopicsMessageContext(t,i)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new se((async(t,i)=>(await ie.await()).getCustomMessageContext(t,i))));const ne=window.FluidTopicsI18nService,re=window.FluidTopicsCustomI18nService;var ae=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class le extends i.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>ie.get(),this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return e.html`
|
|
638
638
|
<slot></slot>
|
|
639
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&te.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&te.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&te.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&te.actions.setNoCustom(this.noCustom),t.has("editorMode")&&te.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&te.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&te.actions.setSession(this.session),t.has("availableUiLocales")&&te.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ne.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const i=await t.getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),i.idleTimeoutInMillis),i}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}le.elementDefinitions={},le.styles=Ji,ae([o.property()],le.prototype,"baseUrl",void 0),ae([o.property()],le.prototype,"apiIntegrationIdentifier",void 0),ae([o.property()],le.prototype,"uiLocale",void 0),ae([i.jsonProperty([])],le.prototype,"availableUiLocales",void 0),ae([o.property({type:Boolean})],le.prototype,"editorMode",void 0),ae([o.property({type:Boolean})],le.prototype,"noCustom",void 0),ae([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],le.prototype,"noCustomComponent",void 0),ae([o.property({type:Boolean})],le.prototype,"withManualResources",void 0),ae([i.jsonProperty([])],le.prototype,"messageContexts",void 0),ae([i.jsonProperty(void 0)],le.prototype,"session",void 0),ae([o.property({type:Object})],le.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(le);
|
|
640
|
-
`;var
|
|
639
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&te.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&te.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&te.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&te.actions.setNoCustom(this.noCustom),t.has("editorMode")&&te.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&te.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&te.actions.setSession(this.session),t.has("availableUiLocales")&&te.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ne.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const i=await t.getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),i.idleTimeoutInMillis),i}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}le.elementDefinitions={},le.styles=Ji,ae([o.property()],le.prototype,"baseUrl",void 0),ae([o.property()],le.prototype,"apiIntegrationIdentifier",void 0),ae([o.property()],le.prototype,"uiLocale",void 0),ae([i.jsonProperty([])],le.prototype,"availableUiLocales",void 0),ae([o.property({type:Boolean})],le.prototype,"editorMode",void 0),ae([o.property({type:Boolean})],le.prototype,"noCustom",void 0),ae([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],le.prototype,"noCustomComponent",void 0),ae([o.property({type:Boolean})],le.prototype,"withManualResources",void 0),ae([i.jsonProperty([])],le.prototype,"messageContexts",void 0),ae([i.jsonProperty(void 0)],le.prototype,"session",void 0),ae([o.property({type:Object})],le.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(le);class pe extends Event{constructor(){super(pe.eventName)}}pe.eventName="search-context-clear-all-filters";var he=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ce extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const fe=Symbol("registerInterval");class de extends(function(t){var i;class e extends t{constructor(){super(...arguments),this[i]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[fe]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[fe]):this.dispatchEvent(new ce)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i=fe,he([o.state()],e.prototype,"stateManager",void 0),e}(i.FtLitElementRedux)){}const ue=e.css`
|
|
640
|
+
`;var ge=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const xe=Symbol("i18nProperties"),ve=Symbol("i18nUnsubs");function be(t){var i;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[i]=new Map}get i18nService(){return this.useCustomMessageContexts?re:ne}i18n(t,i,...e){var o;if("string"==typeof t)return this.i18nService.resolveMessage(t,i,...e);const s=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...s)}onI18nUpdate(t){var i;null===(i=this[xe])||void 0===i||i.forEach(((i,e)=>{i.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(i))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var i;super.updated(t),null===(i=this[xe])||void 0===i||i.forEach(((t,i)=>{null!=t.argsProvider&&(this[i]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[xe]&&new Set([...this[xe].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,i){t=t.toLowerCase(),this[ve].has(t)||this[ve].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=i?i:{})}addI18nContext(t,i){this.addI18nMessages(t.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[ve].forEach((t=>t())),this[ve].clear()}}return i=ve,ge([o.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class ye extends(be(i.FtLitElement)){}class me extends(be(i.FtLitElementRedux)){}var $e=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class we extends me{constructor(){super(),this.editorMode=!1,this.addStore(te)}render(){return this.key&&this.context?e.html`
|
|
641
641
|
<span class="ft-i18n">
|
|
642
642
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
643
643
|
</span>
|
|
644
|
-
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}
|
|
644
|
+
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}we.elementDefinitions={},we.styles=ue,$e([i.redux()],we.prototype,"editorMode",void 0),$e([o.property()],we.prototype,"context",void 0),$e([o.property()],we.prototype,"key",void 0),$e([i.jsonProperty([])],we.prototype,"args",void 0),$e([o.property()],we.prototype,"defaultMessage",void 0);class ke{static build(t){return new ke(t)}static fromGwt(t){return new ke(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,i)=>{const e=i;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,i)=>(...t)=>ne.resolveMessage(this.name,i,...t)})}}i.customElement("ft-i18n")(we);const Se=ke.build("designedSearchInput"),Ce=e.css`
|
|
645
645
|
* {
|
|
646
646
|
box-sizing: border-box;
|
|
647
647
|
}
|
|
@@ -683,7 +683,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
683
683
|
flex-grow: 1;
|
|
684
684
|
flex-shrink: 1;
|
|
685
685
|
}
|
|
686
|
-
`;var
|
|
686
|
+
`;var ze=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ee extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t})}}let Oe=class extends de{render(){return e.html`
|
|
687
687
|
<div class="ft-search-input-suggestion ft-word-wrap"
|
|
688
688
|
part="container"
|
|
689
689
|
@keydown=${t=>this.onSuggestKeyDown(t)}>
|
|
@@ -699,16 +699,16 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
699
699
|
</a>
|
|
700
700
|
`))}
|
|
701
701
|
</div>
|
|
702
|
-
`}onSuggestKeyDown(t){var i,e,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(e=null===(i=this.getFocusedSuggestionElement())||void 0===i?void 0:i.previousElementSibling)&&void 0!==e?e:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.getFirstSuggestionElement())||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,i){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,i)}onSuggestSelected(t,i){t.preventDefault(),this.dispatchEvent(new
|
|
702
|
+
`}onSuggestKeyDown(t){var i,e,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(e=null===(i=this.getFocusedSuggestionElement())||void 0===i?void 0:i.previousElementSibling)&&void 0!==e?e:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.getFirstSuggestionElement())||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,i){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,i)}onSuggestSelected(t,i){t.preventDefault(),this.dispatchEvent(new Ee(i))}getIcon(t){const i="DOCUMENT"===t.type?Fi.file_format:Fi.fluid_topics;let o;switch(t.type){case"MAP":o="BOOK"===t.editorialType?Ui.BOOK:Ui.ARTICLE;break;case"DOCUMENT":o=function(t,i){var e,o,s,n;t=(null!=t?t:"").toLowerCase(),i=(null!=i?i:"").toLowerCase();const[r,a]=((null!==(e=Ai.get(t))&&void 0!==e?e:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=Mi.get(a))&&void 0!==o?o:Mi.get(i))&&void 0!==s?s:Mi.get(r))&&void 0!==n?n:Ni.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":o=Ui.TOPICS}return e.html`
|
|
703
703
|
<ft-icon .variant="${i}" .value="${o}" part="suggestion-icon"></ft-icon>
|
|
704
|
-
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};Oe.elementDefinitions={"ft-ripple":b,"ft-typography":ki,"ft-icon":Ri},Oe.styles=[i.wordWrap,
|
|
704
|
+
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};Oe.elementDefinitions={"ft-ripple":b,"ft-typography":ki,"ft-icon":Ri},Oe.styles=[i.wordWrap,Ce],ze([i.redux()],Oe.prototype,"suggestResults",void 0),Oe=ze([o.customElement("ft-search-input-suggestion")],Oe);var Ie=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class je extends(be(de)){constructor(){super(),this.liveQuery="",this.forceCloseSuggestion=!1,this.addI18nContext(Se)}render(){var t,i;let o={"ft-search-input":!0,"ft-search-input--with-suggestions":null!==(i=null===(t=this.suggestResults)||void 0===t?void 0:t.length)&&void 0!==i&&i,"ft-search-input--with-suggestions-closed":this.forceCloseSuggestion};return e.html`
|
|
705
705
|
<div class="${s.classMap(o)}" @focusout=${()=>this.forceCloseSuggestion=!1}>
|
|
706
706
|
<div class="ft-search-input--input-container" part="input-container" tabindex="-1">
|
|
707
707
|
<div class="ft-search-input--input-outline" part="input-outline">
|
|
708
708
|
<input class="ft-search-input--input ft-typography--body2"
|
|
709
709
|
part="input"
|
|
710
710
|
type="text"
|
|
711
|
-
placeholder="${
|
|
711
|
+
placeholder="${Se.messages.placeholder()}"
|
|
712
712
|
.value="${this.liveQuery}"
|
|
713
713
|
@keydown=${t=>this.onSearchBarKeyDown(t)}
|
|
714
714
|
@keyup=${t=>this.onSearchBarKeyUp(t)}>
|
|
@@ -724,7 +724,7 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
724
724
|
part="clear-query"
|
|
725
725
|
icon="close"
|
|
726
726
|
round dense
|
|
727
|
-
label="${
|
|
727
|
+
label="${Se.messages.clearButton()}"
|
|
728
728
|
@click=${()=>this.liveQuery=""}
|
|
729
729
|
></ft-button>
|
|
730
730
|
<div class="ft-search-input--separator"></div>
|
|
@@ -733,9 +733,9 @@ const it=Symbol.for(""),et=t=>{if((null==t?void 0:t.r)===it)return null==t?void
|
|
|
733
733
|
part="launch-search-in-input"
|
|
734
734
|
icon="search"
|
|
735
735
|
round dense
|
|
736
|
-
label="${
|
|
736
|
+
label="${Se.messages.searchButton()}"
|
|
737
737
|
@click=${()=>this.launchSearch()}
|
|
738
738
|
></ft-button>
|
|
739
739
|
</div>
|
|
740
740
|
</div>
|
|
741
|
-
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var i,e;"Enter"===t.key?(null===(i=this.stateManager)||void 0===i||i.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(e=this.stateManager)||void 0===e||e.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setQuery(t.detail),this.forceCloseSuggestion=!0}}
|
|
741
|
+
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var i,e;"Enter"===t.key?(null===(i=this.stateManager)||void 0===i||i.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(e=this.stateManager)||void 0===e||e.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setQuery(t.detail),this.forceCloseSuggestion=!0}}je.elementDefinitions={"ft-search-input-suggestion":Oe,"ft-button":Qi},je.styles=[xi,Yi],Ie([i.redux()],je.prototype,"request",void 0),Ie([i.redux()],je.prototype,"liveQuery",void 0),Ie([i.redux()],je.prototype,"suggestResults",void 0),Ie([o.state()],je.prototype,"forceCloseSuggestion",void 0),Ie([o.query(".ft-search-input--input")],je.prototype,"input",void 0),Ie([o.query("ft-search-input-suggestion")],je.prototype,"suggestion",void 0),i.customElement("ft-search-input")(je),t.FtSearchInput=je,t.FtSearchInputCssVariables=Xi,t.styles=Yi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML,ftGlobals.litRepeat);
|
|
@@ -758,12 +758,12 @@ class Mo extends Bi{constructor(t){if(super(t),this.et=it,t.type!==Ti)throw Erro
|
|
|
758
758
|
`,er=w`
|
|
759
759
|
`,ir=Ai.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class nr{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=ir.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?nr.build(t):null!==(e=nr.API)&&void 0!==e?e:nr.API=nr.build()}static await(t){return new Promise((e=>{let i=nr.get(t);if(i)e(i);else{const n=ir.subscribe((()=>{i=nr.get(t),i&&(n(),e(i))}))}}))}}var or;const rr=Symbol("clearAfterUnitTest");class sr{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new n,this.listeners={},this.currentUiLocale="",this[or]=()=>{this.defaultMessages={},this.cache=new n,this.listeners={}},this.currentUiLocale=ir.getState().uiLocale,ir.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=ir.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};h(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,o,r;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(o=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==o?o:{};return new Ft(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}or=rr,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new sr((async(t,e)=>(await nr.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new sr((async(t,e)=>(await nr.await()).getCustomMessageContext(t,e))));const ar=window.FluidTopicsI18nService,lr=window.FluidTopicsCustomI18nService;var cr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class ur extends Mt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>nr.get(),this.cache=new n,this.cleanSessionDebouncer=new o}render(){return tt`
|
|
760
760
|
<slot></slot>
|
|
761
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&ir.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&ir.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&ir.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&ir.actions.setNoCustom(this.noCustom),t.has("editorMode")&&ir.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&ir.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&ir.actions.setSession(this.session),t.has("availableUiLocales")&&ir.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ar.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}ur.elementDefinitions={},ur.styles=er,cr([s()],ur.prototype,"baseUrl",void 0),cr([s()],ur.prototype,"apiIntegrationIdentifier",void 0),cr([s()],ur.prototype,"uiLocale",void 0),cr([d([])],ur.prototype,"availableUiLocales",void 0),cr([s({type:Boolean})],ur.prototype,"editorMode",void 0),cr([s({type:Boolean})],ur.prototype,"noCustom",void 0),cr([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],ur.prototype,"noCustomComponent",void 0),cr([s({type:Boolean})],ur.prototype,"withManualResources",void 0),cr([d([])],ur.prototype,"messageContexts",void 0),cr([d(void 0)],ur.prototype,"session",void 0),cr([s({type:Object})],ur.prototype,"apiProvider",void 0),p("ft-app-context")(ur);
|
|
762
|
-
`;var
|
|
761
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&ir.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&ir.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&ir.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&ir.actions.setNoCustom(this.noCustom),t.has("editorMode")&&ir.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&ir.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&ir.actions.setSession(this.session),t.has("availableUiLocales")&&ir.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ar.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}ur.elementDefinitions={},ur.styles=er,cr([s()],ur.prototype,"baseUrl",void 0),cr([s()],ur.prototype,"apiIntegrationIdentifier",void 0),cr([s()],ur.prototype,"uiLocale",void 0),cr([d([])],ur.prototype,"availableUiLocales",void 0),cr([s({type:Boolean})],ur.prototype,"editorMode",void 0),cr([s({type:Boolean})],ur.prototype,"noCustom",void 0),cr([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],ur.prototype,"noCustomComponent",void 0),cr([s({type:Boolean})],ur.prototype,"withManualResources",void 0),cr([d([])],ur.prototype,"messageContexts",void 0),cr([d(void 0)],ur.prototype,"session",void 0),cr([s({type:Object})],ur.prototype,"apiProvider",void 0),p("ft-app-context")(ur);class fr extends Event{constructor(){super(fr.eventName)}}fr.eventName="search-context-clear-all-filters";var hr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class pr extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const dr=Symbol("registerInterval");class vr extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[dr]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[dr]):this.dispatchEvent(new pr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=dr,hr([a()],i.prototype,"stateManager",void 0),i}(Ri)){}const br=w`
|
|
762
|
+
`;var yr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const gr=Symbol("i18nProperties"),mr=Symbol("i18nUnsubs");function xr(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?lr:ar}i18n(t,e,...i){var n;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(n=t.args)&&void 0!==n?n:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[gr])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[gr])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[gr]&&new Set([...this[gr].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[mr].has(t)||this[mr].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[mr].forEach((t=>t())),this[mr].clear()}}return e=mr,yr([s({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class wr extends(xr(Mt)){}class $r extends(xr(Ri)){}var Or=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Sr extends $r{constructor(){super(),this.editorMode=!1,this.addStore(ir)}render(){return this.key&&this.context?tt`
|
|
763
763
|
<span class="ft-i18n">
|
|
764
764
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
765
765
|
</span>
|
|
766
|
-
`:this.editorMode?"Select a context and a label key.":it}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}
|
|
766
|
+
`:this.editorMode?"Select a context and a label key.":it}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Sr.elementDefinitions={},Sr.styles=br,Or([ki()],Sr.prototype,"editorMode",void 0),Or([s()],Sr.prototype,"context",void 0),Or([s()],Sr.prototype,"key",void 0),Or([d([])],Sr.prototype,"args",void 0),Or([s()],Sr.prototype,"defaultMessage",void 0);class Er{static build(t){return new Er(t)}static fromGwt(t){return new Er(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>ar.resolveMessage(this.name,e,...t)})}}p("ft-i18n")(Sr);const kr=Er.build("designedSearchInput"),jr=w`
|
|
767
767
|
* {
|
|
768
768
|
box-sizing: border-box;
|
|
769
769
|
}
|
|
@@ -810,11 +810,11 @@ class Mo extends Bi{constructor(t){if(super(t),this.et=it,t.type!==Ti)throw Erro
|
|
|
810
810
|
* @license
|
|
811
811
|
* Copyright 2020 Google LLC
|
|
812
812
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
813
|
-
*/,{I:
|
|
813
|
+
*/,{I:Cr}=bt,Nr=()=>document.createComment(""),Rr=(t,e,i)=>{var n;const o=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=o.insertBefore(Nr(),r),n=o.insertBefore(Nr(),r);i=new Cr(e,n,t,t.options)}else{const e=i._$AB.nextSibling,s=i._$AM,a=s!==t;if(a){let e;null===(n=i._$AQ)||void 0===n||n.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==s._$AU&&i._$AP(e)}if(e!==r||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,r),t=e}}}return i},Mr=(t,e,i=t)=>(t._$AI(e,i),t),Ar={},Ur=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const n=t._$AB.nextSibling;for(;i!==n;){const t=i.nextSibling;i.remove(),i=t}},Pr=(t,e,i)=>{const n=new Map;for(let o=e;o<=i;o++)n.set(t[o],o);return n},Fr=Li(class extends Bi{constructor(t){if(super(t),t.type!==Ti)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let n;void 0===i?i=e:void 0!==e&&(n=e);const o=[],r=[];let s=0;for(const e of t)o[s]=n?n(e,s):s,r[s]=i(e,s),s++;return{values:r,keys:o}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,n]){var o;const r=(t=>t._$AH)(t),{values:s,keys:a}=this.dt(e,i,n);if(!Array.isArray(r))return this.ht=a,s;const l=null!==(o=this.ht)&&void 0!==o?o:this.ht=[],c=[];let u,f,h=0,p=r.length-1,d=0,v=s.length-1;for(;h<=p&&d<=v;)if(null===r[h])h++;else if(null===r[p])p--;else if(l[h]===a[d])c[d]=Mr(r[h],s[d]),h++,d++;else if(l[p]===a[v])c[v]=Mr(r[p],s[v]),p--,v--;else if(l[h]===a[v])c[v]=Mr(r[h],s[v]),Rr(t,c[v+1],r[h]),h++,v--;else if(l[p]===a[d])c[d]=Mr(r[p],s[d]),Rr(t,r[h],r[p]),p--,d++;else if(void 0===u&&(u=Pr(a,d,v),f=Pr(l,h,p)),u.has(l[h]))if(u.has(l[p])){const e=f.get(a[d]),i=void 0!==e?r[e]:null;if(null===i){const e=Rr(t,r[h]);Mr(e,s[d]),c[d]=e}else c[d]=Mr(i,s[d]),Rr(t,r[h],i),r[e]=null;d++}else Ur(r[p]),p--;else Ur(r[h]),h++;for(;d<=v;){const e=Rr(t,c[v+1]);Mr(e,s[d]),c[d++]=e}for(;h<=p;){const t=r[h++];null!==t&&Ur(t)}return this.ht=a,((t,e=Ar)=>{t._$AH=e})(t,c),et}});var Ir=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class zr extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t})}}let Tr=class extends vr{render(){return tt`
|
|
814
814
|
<div class="ft-search-input-suggestion ft-word-wrap"
|
|
815
815
|
part="container"
|
|
816
816
|
@keydown=${t=>this.onSuggestKeyDown(t)}>
|
|
817
|
-
${
|
|
817
|
+
${Fr(this.suggestResults||[],(t=>t.value),(t=>tt`
|
|
818
818
|
<a href="#"
|
|
819
819
|
part="suggestion"
|
|
820
820
|
class="ft-search-input-suggestion--suggestion"
|
|
@@ -826,16 +826,16 @@ class Mo extends Bi{constructor(t){if(super(t),this.et=it,t.type!==Ti)throw Erro
|
|
|
826
826
|
</a>
|
|
827
827
|
`))}
|
|
828
828
|
</div>
|
|
829
|
-
`}onSuggestKeyDown(t){var e,i,n,o,r,s;switch(t.key){case"ArrowUp":null===(n=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(s=null!==(r=null===(o=this.getFocusedSuggestionElement())||void 0===o?void 0:o.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===s||s.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.dispatchEvent(new
|
|
829
|
+
`}onSuggestKeyDown(t){var e,i,n,o,r,s;switch(t.key){case"ArrowUp":null===(n=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(s=null!==(r=null===(o=this.getFocusedSuggestionElement())||void 0===o?void 0:o.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===s||s.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.dispatchEvent(new zr(e))}getIcon(t){const e="DOCUMENT"===t.type?Lo.file_format:Lo.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?Uo.BOOK:Uo.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,n,o,r;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[s,a]=((null!==(i=Io.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(r=null!==(o=null!==(n=Fo.get(a))&&void 0!==n?n:Fo.get(e))&&void 0!==o?o:Fo.get(s))&&void 0!==r?r:Po.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=Uo.TOPICS}return tt`
|
|
830
830
|
<ft-icon .variant="${e}" .value="${i}" part="suggestion-icon"></ft-icon>
|
|
831
|
-
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};
|
|
831
|
+
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};Tr.elementDefinitions={"ft-ripple":Qi,"ft-typography":Oo,"ft-icon":_o},Tr.styles=[Ut,jr],Ir([ki()],Tr.prototype,"suggestResults",void 0),Tr=Ir([(t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:n}=e;return{kind:i,elements:n,finisher(e){customElements.define(t,e)}}})(t,e))("ft-search-input-suggestion")],Tr);var Lr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Br extends(xr(vr)){constructor(){super(),this.liveQuery="",this.forceCloseSuggestion=!1,this.addI18nContext(kr)}render(){var t,e;let i={"ft-search-input":!0,"ft-search-input--with-suggestions":null!==(e=null===(t=this.suggestResults)||void 0===t?void 0:t.length)&&void 0!==e&&e,"ft-search-input--with-suggestions-closed":this.forceCloseSuggestion};return tt`
|
|
832
832
|
<div class="${_i(i)}" @focusout=${()=>this.forceCloseSuggestion=!1}>
|
|
833
833
|
<div class="ft-search-input--input-container" part="input-container" tabindex="-1">
|
|
834
834
|
<div class="ft-search-input--input-outline" part="input-outline">
|
|
835
835
|
<input class="ft-search-input--input ft-typography--body2"
|
|
836
836
|
part="input"
|
|
837
837
|
type="text"
|
|
838
|
-
placeholder="${
|
|
838
|
+
placeholder="${kr.messages.placeholder()}"
|
|
839
839
|
.value="${this.liveQuery}"
|
|
840
840
|
@keydown=${t=>this.onSearchBarKeyDown(t)}
|
|
841
841
|
@keyup=${t=>this.onSearchBarKeyUp(t)}>
|
|
@@ -851,7 +851,7 @@ class Mo extends Bi{constructor(t){if(super(t),this.et=it,t.type!==Ti)throw Erro
|
|
|
851
851
|
part="clear-query"
|
|
852
852
|
icon="close"
|
|
853
853
|
round dense
|
|
854
|
-
label="${
|
|
854
|
+
label="${kr.messages.clearButton()}"
|
|
855
855
|
@click=${()=>this.liveQuery=""}
|
|
856
856
|
></ft-button>
|
|
857
857
|
<div class="ft-search-input--separator"></div>
|
|
@@ -860,9 +860,9 @@ class Mo extends Bi{constructor(t){if(super(t),this.et=it,t.type!==Ti)throw Erro
|
|
|
860
860
|
part="launch-search-in-input"
|
|
861
861
|
icon="search"
|
|
862
862
|
round dense
|
|
863
|
-
label="${
|
|
863
|
+
label="${kr.messages.searchButton()}"
|
|
864
864
|
@click=${()=>this.launchSearch()}
|
|
865
865
|
></ft-button>
|
|
866
866
|
</div>
|
|
867
867
|
</div>
|
|
868
|
-
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var e,i;"Enter"===t.key?(null===(e=this.stateManager)||void 0===e||e.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(i=this.stateManager)||void 0===i||i.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var e;null===(e=this.stateManager)||void 0===e||e.setQuery(t.detail),this.forceCloseSuggestion=!0}}
|
|
868
|
+
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var e,i;"Enter"===t.key?(null===(e=this.stateManager)||void 0===e||e.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(i=this.stateManager)||void 0===i||i.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var e;null===(e=this.stateManager)||void 0===e||e.setQuery(t.detail),this.forceCloseSuggestion=!0}}Br.elementDefinitions={"ft-search-input-suggestion":Tr,"ft-button":Qo},Br.styles=[bo,tr],Lr([ki()],Br.prototype,"request",void 0),Lr([ki()],Br.prototype,"liveQuery",void 0),Lr([ki()],Br.prototype,"suggestResults",void 0),Lr([a()],Br.prototype,"forceCloseSuggestion",void 0),Lr([c(".ft-search-input--input")],Br.prototype,"input",void 0),Lr([c("ft-search-input-suggestion")],Br.prototype,"suggestion",void 0),p("ft-search-input")(Br),t.FtSearchInput=Br,t.FtSearchInputCssVariables=Yo,t.styles=tr}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-input",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "Search bar input for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "1.0.
|
|
23
|
-
"@fluid-topics/ft-i18n": "1.0.
|
|
24
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
25
|
-
"@fluid-topics/ft-ripple": "1.0.
|
|
26
|
-
"@fluid-topics/ft-search-context": "1.0.
|
|
27
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-button": "1.0.45",
|
|
23
|
+
"@fluid-topics/ft-i18n": "1.0.45",
|
|
24
|
+
"@fluid-topics/ft-icon": "1.0.45",
|
|
25
|
+
"@fluid-topics/ft-ripple": "1.0.45",
|
|
26
|
+
"@fluid-topics/ft-search-context": "1.0.45",
|
|
27
|
+
"@fluid-topics/ft-typography": "1.0.45",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "1.0.45",
|
|
29
29
|
"lit": "2.7.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@fluid-topics/public-api": "1.0.39"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "65789e7f65d22cc6e08cb431f8d24a036309321e"
|
|
35
35
|
}
|