@fluid-topics/ft-search-bar 0.2.18 → 0.2.21
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-bar.css.js +0 -6
- package/build/ft-search-bar.d.ts +3 -2
- package/build/ft-search-bar.js +53 -29
- package/build/ft-search-bar.light.js +129 -132
- package/build/ft-search-bar.min.js +136 -139
- package/package.json +14 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e,i,o,s,n
|
|
1
|
+
!function(t,e,i,o,s,r,n){var l,a,c=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(l||(l={}));class h extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class p extends e.FtLitElement{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=l.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e.Debouncer}render(){return i.html`
|
|
2
2
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
3
3
|
<div class="ft-size-watcher--watcher"></div>
|
|
4
4
|
</div>
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
22
22
|
width: 100%;
|
|
23
23
|
}
|
|
24
|
-
`,c([o.property({type:Number})],p.prototype,"debounceTimeout",void 0),c([o.property({type:Boolean})],p.prototype,"local",void 0),c([o.property({type:Number,reflect:!0})],p.prototype,"size",void 0),c([o.property({type:String,reflect:!0})],p.prototype,"category",void 0),c([o.query(".ft-size-watcher--watcher")],p.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(p);const f=globalThis.trustedTypes,d=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,u=`lit$${(Math.random()+"").slice(9)}$`,b="?"+u,v=`<${b}>`,g=document,x=(t="")=>g.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,m=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,S=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,z=/'/g,O=/"/g,C=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),E=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),L=new WeakMap,D=g.createTreeWalker(g,129,null,!1),F=(t,e)=>{const i=t.length-1,o=[];let s,
|
|
24
|
+
`,c([o.property({type:Number})],p.prototype,"debounceTimeout",void 0),c([o.property({type:Boolean})],p.prototype,"local",void 0),c([o.property({type:Number,reflect:!0})],p.prototype,"size",void 0),c([o.property({type:String,reflect:!0})],p.prototype,"category",void 0),c([o.query(".ft-size-watcher--watcher")],p.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(p);const f=globalThis.trustedTypes,d=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,u=`lit$${(Math.random()+"").slice(9)}$`,b="?"+u,v=`<${b}>`,g=document,x=(t="")=>g.createComment(t),y=t=>null===t||"object"!=typeof t&&"function"!=typeof t,m=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,S=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,z=/'/g,O=/"/g,C=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),E=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),L=new WeakMap,D=g.createTreeWalker(g,129,null,!1),F=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=$;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===$?"!--"===a[1]?n=w:void 0!==a[1]?n=k:void 0!==a[2]?(C.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=S):void 0!==a[3]&&(n=S):n===S?">"===a[0]?(n=null!=s?s:$,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?S:'"'===a[3]?O:z):n===O||n===z?n=S:n===w||n===k?n=$:(n=S,s=void 0);const p=n===S&&t[e+1].startsWith("/>")?" ":"";r+=n===$?i+v:c>=0?(o.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+u+p):i+u+(-2===c?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==d?d.createHTML(l):l,o]};class j{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,c]=F(t,e);if(this.el=j.createElement(a,i),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=D.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(u)){const i=c[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(u),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?N:"?"===e[1]?Z:"@"===e[1]?U:T})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(C.test(o.tagName)){const t=o.textContent.split(u),e=t.length-1;if(e>0){o.textContent=f?f.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],x()),D.nextNode(),l.push({type:2,index:++s});o.append(t[e],x())}}}else if(8===o.nodeType)if(o.data===b)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(u,t+1));)l.push({type:7,index:s}),t+=u.length-1}s++}}static createElement(t,e){const i=g.createElement("template");return i.innerHTML=t,i}}function M(t,e,i=t,o){var s,r,n,l;if(e===E)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const c=y(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Cl)&&void 0!==n?n:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=M(t,a._$AS(t,e.values),a,o)),e}class P{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:g).importNode(i,!0);D.currentNode=s;let r=D.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new A(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new _(r,this,t)),this.v.push(e),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=D.nextNode(),n++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class A{constructor(t,e,i,o){var s;this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),y(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==E&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var e;return m(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==I&&y(this._$AH)?this._$AA.nextSibling.data=t:this.k(g.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=j.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new P(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new j(t)),e}S(t){m(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new A(this.M(x()),this.M(x()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class T{constructor(t,e,i,o,s){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=I}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=M(this,t,e,0),r=!y(t)||t!==this._$AH&&t!==E,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=M(this,o[i+n],e,n),l===E&&(l=this._$AH[n]),r||(r=!y(l)||l!==this._$AH[n]),l===I?t=I:t!==I&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.C(t)}C(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class N extends T{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===I?void 0:t}}const R=f?f.emptyScript:"";class Z extends T{constructor(){super(...arguments),this.type=4}C(t){t&&t!==I?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class U extends T{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=M(this,t,e,0))&&void 0!==i?i:I)===E)return;const o=this._$AH,s=t===I&&o!==I||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==I&&(o===I||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class _{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const H=window.litHtmlPolyfillSupport;null==H||H(j,A),(null!==(a=globalThis.litHtmlVersions)&&void 0!==a?a:globalThis.litHtmlVersions=[]).push("2.2.4");
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
29
|
*/
|
|
30
|
-
const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===V)return null===(i=t)||void 0===i?void 0:i._$litStatic$},q=t=>({_$litStatic$:t,r:V}),W=new Map,G=(t=>(e,...i)=>{const o=i.length;let s,
|
|
30
|
+
const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===V)return null===(i=t)||void 0===i?void 0:i._$litStatic$},q=t=>({_$litStatic$:t,r:V}),W=new Map,G=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(r=i[c],s=K(r));)a+=s+e[++c],h=!0;l.push(r),n.push(a),c++}if(c===o&&n.push(e[o]),h){const t=n.join("$$lit$$");void 0===(e=W.get(t))&&(n.raw=n,W.set(t,e=n)),i=l}return t(e,...i)})(B);var X,Y=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){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"}(X||(X={}));const J=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Q=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},et=e.FtCssVariable.extend("--ft-typography-title-font-family",J),it=e.FtCssVariable.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=e.FtCssVariable.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),st=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),rt=e.FtCssVariable.extend("--ft-typography-title-line-height",tt.lineHeight,"1.2"),nt=e.FtCssVariable.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",J),at=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ct=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),ht=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),pt=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"1.7"),ft=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",Q),ut=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),bt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",tt.fontWeight,"600"),vt=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",tt.letterSpacing,"0.144px"),gt=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",tt.lineHeight,"1.5"),xt=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",tt.textTransform,"inherit"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",Q),mt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",tt.fontSize,"14px"),$t=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",tt.fontWeight,"normal"),wt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",tt.letterSpacing,"0.098px"),kt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",tt.lineHeight,"1.7"),St=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",tt.textTransform,"inherit"),zt={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",tt.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",tt.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",tt.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",tt.lineHeight,"1.5"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",tt.textTransform,"inherit")},Ot={fontFamily:e.FtCssVariable.extend("--ft-typography-body2-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-body2-font-size",tt.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body2-font-weight",tt.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",tt.letterSpacing,"0.252px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body2-line-height",tt.lineHeight,"1.4"),textTransform:e.FtCssVariable.extend("--ft-typography-body2-text-transform",tt.textTransform,"inherit")},Ct={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",tt.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",tt.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",tt.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",tt.lineHeight,"1.33"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",tt.textTransform,"inherit")},Bt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",Q),Et=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",tt.fontSize,"10px"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",tt.fontWeight,"normal"),Lt=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",tt.letterSpacing,"0.33px"),Dt=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",tt.lineHeight,"1.6"),Ft=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",tt.textTransform,"inherit"),jt=e.FtCssVariable.extend("--ft-typography-overline-font-family",Q),Mt=e.FtCssVariable.extend("--ft-typography-overline-font-size",tt.fontSize,"10px"),Pt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",tt.fontWeight,"normal"),At=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",tt.letterSpacing,"1.5px"),Tt=e.FtCssVariable.extend("--ft-typography-overline-line-height",tt.lineHeight,"1.6"),Nt=e.FtCssVariable.extend("--ft-typography-overline-text-transform",tt.textTransform,"uppercase"),Rt={fontFamily:e.FtCssVariable.extend("--ft-typography-button-font-family",Q),fontSize:e.FtCssVariable.extend("--ft-typography-button-font-size",tt.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-button-font-weight",tt.fontWeight,"600"),letterSpacing:e.FtCssVariable.extend("--ft-typography-button-letter-spacing",tt.letterSpacing,"1.246px"),lineHeight:e.FtCssVariable.extend("--ft-typography-button-line-height",tt.lineHeight,"1.15"),textTransform:e.FtCssVariable.extend("--ft-typography-button-text-transform",tt.textTransform,"uppercase")},Zt=i.css`
|
|
31
31
|
.ft-typography--title {
|
|
32
32
|
font-family: ${et};
|
|
33
33
|
font-size: ${it};
|
|
34
34
|
font-weight: ${ot};
|
|
35
35
|
letter-spacing: ${st};
|
|
36
|
-
line-height: ${
|
|
37
|
-
text-transform: ${
|
|
36
|
+
line-height: ${rt};
|
|
37
|
+
text-transform: ${nt};
|
|
38
38
|
}
|
|
39
39
|
`,Ut=i.css`
|
|
40
40
|
.ft-typography--title-dense {
|
|
@@ -106,8 +106,8 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
106
106
|
font-size: ${Mt};
|
|
107
107
|
font-weight: ${Pt};
|
|
108
108
|
letter-spacing: ${At};
|
|
109
|
-
line-height: ${
|
|
110
|
-
text-transform: ${
|
|
109
|
+
line-height: ${Tt};
|
|
110
|
+
text-transform: ${Nt};
|
|
111
111
|
}
|
|
112
112
|
`,Xt=i.css`
|
|
113
113
|
.ft-typography--button {
|
|
@@ -129,7 +129,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
129
129
|
.ft-typography {
|
|
130
130
|
vertical-align: inherit;
|
|
131
131
|
}
|
|
132
|
-
`],Y([o.property()],Yt.prototype,"element",void 0),Y([o.property()],Yt.prototype,"variant",void 0),e.customElement("ft-typography")(Yt);var ie=function(t,e,i,o){for(var s,
|
|
132
|
+
`],Y([o.property()],Yt.prototype,"element",void 0),Y([o.property()],Yt.prototype,"variant",void 0),e.customElement("ft-typography")(Yt);var ie=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const oe=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),se={color:oe,backgroundColor:e.FtCssVariable.extend("--ft-ripple-background-color",oe),opacityContentOnSurfacePressed:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},re=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),ne=re,le=e.FtCssVariable.extend("--ft-ripple-background-color",re),ae=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ce=ae,he=e.FtCssVariable.extend("--ft-ripple-background-color",ae);class pe extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return i.html`
|
|
133
133
|
<style>
|
|
134
134
|
.ft-ripple .ft-ripple--effect,
|
|
135
135
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -142,7 +142,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
142
142
|
top: ${this.originY}px;
|
|
143
143
|
}
|
|
144
144
|
</style>
|
|
145
|
-
<div class="${
|
|
145
|
+
<div class="${r.classMap(t)}">
|
|
146
146
|
<div class="ft-ripple--background"></div>
|
|
147
147
|
<div class="ft-ripple--effect"></div>
|
|
148
148
|
</div>
|
|
@@ -188,7 +188,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
191
|
-
background-color: ${
|
|
191
|
+
background-color: ${ne};
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
.ft-ripple .ft-ripple--background {
|
|
@@ -235,7 +235,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
235
235
|
opacity: ${se.opacityContentOnSurfacePressed};
|
|
236
236
|
transform: translate(-50%, -50%) scale(1);
|
|
237
237
|
}
|
|
238
|
-
`,ie([o.property({type:Boolean})],pe.prototype,"primary",void 0),ie([o.property({type:Boolean})],pe.prototype,"secondary",void 0),ie([o.property({type:Boolean})],pe.prototype,"unbounded",void 0),ie([o.property({type:Boolean})],pe.prototype,"activated",void 0),ie([o.property({type:Boolean})],pe.prototype,"selected",void 0),ie([o.property({type:Boolean})],pe.prototype,"disabled",void 0),ie([o.state()],pe.prototype,"hovered",void 0),ie([o.state()],pe.prototype,"focused",void 0),ie([o.state()],pe.prototype,"pressed",void 0),ie([o.state()],pe.prototype,"rippling",void 0),ie([o.state()],pe.prototype,"rippleSize",void 0),ie([o.state()],pe.prototype,"originX",void 0),ie([o.state()],pe.prototype,"originY",void 0),ie([o.query(".ft-ripple")],pe.prototype,"ripple",void 0),ie([o.query(".ft-ripple--effect")],pe.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(pe);var fe=function(t,e,i,o){for(var s,
|
|
238
|
+
`,ie([o.property({type:Boolean})],pe.prototype,"primary",void 0),ie([o.property({type:Boolean})],pe.prototype,"secondary",void 0),ie([o.property({type:Boolean})],pe.prototype,"unbounded",void 0),ie([o.property({type:Boolean})],pe.prototype,"activated",void 0),ie([o.property({type:Boolean})],pe.prototype,"selected",void 0),ie([o.property({type:Boolean})],pe.prototype,"disabled",void 0),ie([o.state()],pe.prototype,"hovered",void 0),ie([o.state()],pe.prototype,"focused",void 0),ie([o.state()],pe.prototype,"pressed",void 0),ie([o.state()],pe.prototype,"rippling",void 0),ie([o.state()],pe.prototype,"rippleSize",void 0),ie([o.state()],pe.prototype,"originX",void 0),ie([o.state()],pe.prototype,"originY",void 0),ie([o.query(".ft-ripple")],pe.prototype,"ripple",void 0),ie([o.query(".ft-ripple--effect")],pe.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(pe);var fe=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const de={distance:e.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),color:e.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:e.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:e.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system")};class ue extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}render(){return i.html`
|
|
239
239
|
<div part="container"
|
|
240
240
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
241
241
|
@mouseenter=${this.onHover}
|
|
@@ -358,9 +358,9 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
358
358
|
<div></div>
|
|
359
359
|
<div></div>
|
|
360
360
|
</div>
|
|
361
|
-
`}}var ge,xe;e.customElement("ft-loader")(ve),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ge||(ge={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(xe||(xe={}));const ye=new Map([...["abw"].map((t=>[t,xe.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,xe.AUDIO])),...["avi"].map((t=>[t,xe.AVI])),...["chm","xhs"].map((t=>[t,xe.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,xe.CODE])),...["csv"].map((t=>[t,xe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xe.DITA])),...["epub"].map((t=>[t,xe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xe.EXCEL])),...["flac"].map((t=>[t,xe.FLAC])),...["gif"].map((t=>[t,xe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xe.GZIP])),...["html","htm","xhtml"].map((t=>[t,xe.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,xe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xe.JPEG])),...["json"].map((t=>[t,xe.JSON])),...["m4a","m4p"].map((t=>[t,xe.M4A])),...["mov","qt"].map((t=>[t,xe.MOV])),...["mp3"].map((t=>[t,xe.MP3])),...["mp4","m4v"].map((t=>[t,xe.MP4])),...["ogg","oga"].map((t=>[t,xe.OGG])),...["pdf","ps"].map((t=>[t,xe.PDF])),...["png"].map((t=>[t,xe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xe.POWERPOINT])),...["rar"].map((t=>[t,xe.RAR])),...["stp"].map((t=>[t,xe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xe.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,xe.VIDEO])),...["wav"].map((t=>[t,xe.WAV])),...["wma"].map((t=>[t,xe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xe.WORD])),...["xml","xsl","rdf"].map((t=>[t,xe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xe.YAML])),...["zip"].map((t=>[t,xe.ZIP]))]),me=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var $e,we=function(t,e,i,o){for(var s,
|
|
361
|
+
`}}var ge,xe;e.customElement("ft-loader")(ve),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ge||(ge={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(xe||(xe={}));const ye=new Map([...["abw"].map((t=>[t,xe.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,xe.AUDIO])),...["avi"].map((t=>[t,xe.AVI])),...["chm","xhs"].map((t=>[t,xe.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,xe.CODE])),...["csv"].map((t=>[t,xe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xe.DITA])),...["epub"].map((t=>[t,xe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xe.EXCEL])),...["flac"].map((t=>[t,xe.FLAC])),...["gif"].map((t=>[t,xe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xe.GZIP])),...["html","htm","xhtml"].map((t=>[t,xe.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,xe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xe.JPEG])),...["json"].map((t=>[t,xe.JSON])),...["m4a","m4p"].map((t=>[t,xe.M4A])),...["mov","qt"].map((t=>[t,xe.MOV])),...["mp3"].map((t=>[t,xe.MP3])),...["mp4","m4v"].map((t=>[t,xe.MP4])),...["ogg","oga"].map((t=>[t,xe.OGG])),...["pdf","ps"].map((t=>[t,xe.PDF])),...["png"].map((t=>[t,xe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xe.POWERPOINT])),...["rar"].map((t=>[t,xe.RAR])),...["stp"].map((t=>[t,xe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xe.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,xe.VIDEO])),...["wav"].map((t=>[t,xe.WAV])),...["wma"].map((t=>[t,xe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xe.WORD])),...["xml","xsl","rdf"].map((t=>[t,xe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xe.YAML])),...["zip"].map((t=>[t,xe.ZIP]))]),me=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var $e,we=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}($e||($e={}));const ke={size:e.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariable.extend("--ft-icon-file-format-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariable.extend("--ft-icon-material-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class Se extends e.FtLitElement{constructor(){super(...arguments),this.variant=$e.fluid_topics}render(){return i.html`
|
|
362
362
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
363
|
-
${
|
|
363
|
+
${n.unsafeHTML(this.getIcon())}
|
|
364
364
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
365
365
|
</i>
|
|
366
366
|
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let o=this.textContent;return this.variant===$e.file_format?null!==(t=xe[o.toUpperCase()])&&void 0!==t?t:o:this.variant===$e.fluid_topics?null!==(e=ge[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}Se.elementDefinitions={},Se.styles=i.css`
|
|
@@ -398,7 +398,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
398
398
|
.ft-icon--material {
|
|
399
399
|
font-family: ${ke.materialFontFamily}, "Material Icons", sans-serif;
|
|
400
400
|
}
|
|
401
|
-
`,we([o.property()],Se.prototype,"variant",void 0),we([o.query("slot")],Se.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Se);var ze=function(t,e,i,o){for(var s,
|
|
401
|
+
`,we([o.property()],Se.prototype,"variant",void 0),we([o.query("slot")],Se.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Se);var ze=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Oe=e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorPrimary),Ce={backgroundColor:e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorSurface),borderRadius:e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusL),color:Oe,fontSize:e.FtCssVariable.extend("--ft-button-font-size",Rt.fontSize),iconSize:e.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:e.FtCssVariable.extend("--ft-button-ripple-color",Oe),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Be=e.FtCssVariable.extend("--ft-button-primary-color",e.FtCssVariable.extend("--ft-button-color",e.designSystemVariables.colorOnPrimary)),Ee={backgroundColor:e.FtCssVariable.extend("--ft-button-primary-background-color",e.FtCssVariable.extend("--ft-button-background-color",e.designSystemVariables.colorPrimary)),color:Be,rippleColor:e.FtCssVariable.extend("--ft-button-primary-ripple-color",Be)},Ie=e.FtCssVariable.extend("--ft-button-dense-border-radius",e.FtCssVariable.extend("--ft-button-border-radius",e.designSystemVariables.borderRadiusM));class Le extends e.FtLitElement{constructor(){super(...arguments),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.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[e.noTextSelect,i.css`
|
|
402
402
|
:host {
|
|
403
403
|
display: inline-block;
|
|
404
404
|
max-width: 100%;
|
|
@@ -534,7 +534,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
534
534
|
}
|
|
535
535
|
`]}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-button--safari-fix":e.isSafari,"ft-no-text-select":!0};return this.addTooltip(i.html`
|
|
536
536
|
<button part="button"
|
|
537
|
-
class="${
|
|
537
|
+
class="${r.classMap(t)}"
|
|
538
538
|
aria-label="${this.getLabel()}"
|
|
539
539
|
?disabled=${this.isDisabled()}>
|
|
540
540
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -554,15 +554,9 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
554
554
|
</ft-tooltip>
|
|
555
555
|
`}resolveIcon(){return this.loading?i.html`
|
|
556
556
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
557
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:i.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}}Le.elementDefinitions={"ft-ripple":pe,"ft-tooltip":ue,"ft-typography":Yt,"ft-icon":Se,"ft-loader":ve},ze([o.property({type:Boolean})],Le.prototype,"primary",void 0),ze([o.property({type:Boolean})],Le.prototype,"outlined",void 0),ze([o.property({type:Boolean})],Le.prototype,"disabled",void 0),ze([o.property({type:Boolean})],Le.prototype,"dense",void 0),ze([o.property({type:Boolean})],Le.prototype,"round",void 0),ze([o.property({type:String})],Le.prototype,"label",void 0),ze([o.property({type:String})],Le.prototype,"icon",void 0),ze([o.property({type:Boolean})],Le.prototype,"trailingIcon",void 0),ze([o.property({type:Boolean})],Le.prototype,"loading",void 0),ze([o.property({type:String})],Le.prototype,"tooltipPosition",void 0),ze([o.query(".ft-button")],Le.prototype,"button",void 0),ze([o.query(".ft-button--label slot")],Le.prototype,"slottedContent",void 0),e.customElement("ft-button")(Le);var De=function(t,e,i,o){for(var s,
|
|
558
|
-
<label class="${
|
|
557
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:i.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}}Le.elementDefinitions={"ft-ripple":pe,"ft-tooltip":ue,"ft-typography":Yt,"ft-icon":Se,"ft-loader":ve},ze([o.property({type:Boolean})],Le.prototype,"primary",void 0),ze([o.property({type:Boolean})],Le.prototype,"outlined",void 0),ze([o.property({type:Boolean})],Le.prototype,"disabled",void 0),ze([o.property({type:Boolean})],Le.prototype,"dense",void 0),ze([o.property({type:Boolean})],Le.prototype,"round",void 0),ze([o.property({type:String})],Le.prototype,"label",void 0),ze([o.property({type:String})],Le.prototype,"icon",void 0),ze([o.property({type:Boolean})],Le.prototype,"trailingIcon",void 0),ze([o.property({type:Boolean})],Le.prototype,"loading",void 0),ze([o.property({type:String})],Le.prototype,"tooltipPosition",void 0),ze([o.query(".ft-button")],Le.prototype,"button",void 0),ze([o.query(".ft-button--label slot")],Le.prototype,"slottedContent",void 0),e.customElement("ft-button")(Le);var De=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Fe=e.FtCssVariable.extend("--ft-checkbox-text-color",e.designSystemVariables.colorOnSurfaceHigh),je=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),Me=e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),Pe=e.FtCssVariable.extend("--ft-checkbox-border-color",e.designSystemVariables.colorOnSurfaceMedium),Ae=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system");class Te extends e.FtLitElement{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return i.html`
|
|
558
|
+
<label class="${r.classMap(t)}" for="checkbox-input">
|
|
559
559
|
<div class="ft-checkbox--box-container">
|
|
560
|
-
<input type="checkbox"
|
|
561
|
-
name=${this.name}
|
|
562
|
-
.checked=${this.checked}
|
|
563
|
-
.disabled=${this.disabled}
|
|
564
|
-
@change=${this.onChange}
|
|
565
|
-
>
|
|
566
560
|
<ft-ripple
|
|
567
561
|
?disabled=${this.disabled}
|
|
568
562
|
?primary=${this.checked||this.indeterminate}
|
|
@@ -574,12 +568,19 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
574
568
|
d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
|
|
575
569
|
</svg>
|
|
576
570
|
</div>
|
|
571
|
+
<input type="checkbox"
|
|
572
|
+
id="checkbox-input"
|
|
573
|
+
name="${this.name}"
|
|
574
|
+
.checked=${this.checked}
|
|
575
|
+
.disabled=${this.disabled}
|
|
576
|
+
@change=${this.onChange}
|
|
577
|
+
>
|
|
577
578
|
</div>
|
|
578
579
|
<ft-typography variant="body2">
|
|
579
580
|
<slot></slot>
|
|
580
581
|
</ft-typography>
|
|
581
582
|
</label>
|
|
582
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
583
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Te.elementDefinitions={"ft-ripple":pe,"ft-typography":Yt},Te.styles=i.css`
|
|
583
584
|
* {
|
|
584
585
|
box-sizing: border-box;
|
|
585
586
|
}
|
|
@@ -656,9 +657,16 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
656
657
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
657
658
|
opacity: 1;
|
|
658
659
|
}
|
|
659
|
-
`,De([o.property()],
|
|
660
|
-
<div class="${
|
|
660
|
+
`,De([o.property()],Te.prototype,"name",void 0),De([o.property({type:Boolean,reflect:!0})],Te.prototype,"checked",void 0),De([o.property({type:Boolean})],Te.prototype,"indeterminate",void 0),De([o.property({type:Boolean})],Te.prototype,"disabled",void 0),De([o.query(".ft-checkbox")],Te.prototype,"container",void 0),De([o.query("ft-ripple")],Te.prototype,"ripple",void 0),e.customElement("ft-checkbox")(Te);var Ne=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Re=e.FtCssVariable.extend("--ft-radio-text-color",e.designSystemVariables.colorOnSurfaceHigh),Ze=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),Ue=(e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),e.FtCssVariable.extend("--ft-radio-border-color",e.designSystemVariables.colorOnSurfaceMedium)),_e=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system");class He extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Ve extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return i.html`
|
|
661
|
+
<div class="${r.classMap(t)}">
|
|
661
662
|
<div class="ft-radio--box-container">
|
|
663
|
+
<ft-ripple
|
|
664
|
+
?disabled=${this.disabled}
|
|
665
|
+
?primary=${this.checked}
|
|
666
|
+
unbounded>
|
|
667
|
+
</ft-ripple>
|
|
668
|
+
<div class="ft-radio--box">
|
|
669
|
+
</div>
|
|
662
670
|
<input id="radio-button"
|
|
663
671
|
type="radio"
|
|
664
672
|
name="${this.name}"
|
|
@@ -667,13 +675,6 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
667
675
|
.disabled=${this.disabled}
|
|
668
676
|
@change=${this.onChange}
|
|
669
677
|
>
|
|
670
|
-
<ft-ripple
|
|
671
|
-
?disabled=${this.disabled}
|
|
672
|
-
?primary=${this.checked}
|
|
673
|
-
unbounded>
|
|
674
|
-
</ft-ripple>
|
|
675
|
-
<div class="ft-radio--box">
|
|
676
|
-
</div>
|
|
677
678
|
</div>
|
|
678
679
|
<label for="radio-button" @click=${t=>t.stopPropagation()}>
|
|
679
680
|
<ft-typography variant="body2">
|
|
@@ -760,17 +761,17 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
760
761
|
.ft-radio--disabled .ft-radio--box:after {
|
|
761
762
|
background-color: ${_e};
|
|
762
763
|
}
|
|
763
|
-
`,
|
|
764
|
+
`,Ne([o.property()],Ve.prototype,"value",void 0),Ne([o.property()],Ve.prototype,"name",void 0),Ne([o.property({type:Boolean,reflect:!0})],Ve.prototype,"checked",void 0),Ne([o.property({type:Boolean})],Ve.prototype,"disabled",void 0),Ne([o.query(".ft-radio")],Ve.prototype,"container",void 0),Ne([o.query("ft-ripple")],Ve.prototype,"ripple",void 0),Ne([o.query("input")],Ve.prototype,"input",void 0);var Ke=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class qe extends e.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return i.html`
|
|
764
765
|
<slot @slotchange=${this.onSlotChange}
|
|
765
766
|
@change=${this.onChange}
|
|
766
767
|
@keydown=${this.onKeyDown}
|
|
767
|
-
@focusin=${this.
|
|
768
|
+
@focusin=${this.focusCurrentValue}
|
|
768
769
|
></slot>
|
|
769
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value}))}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}
|
|
770
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}qe.elementDefinitions={},qe.styles=i.css`
|
|
770
771
|
:host {
|
|
771
772
|
display: contents;
|
|
772
773
|
}
|
|
773
|
-
`,Ke([o.property()],qe.prototype,"name",void 0),Ke([o.queryAssignedElements()],qe.prototype,"radioButtons",void 0),e.customElement("ft-radio")(Ve),e.customElement("ft-radio-group")(qe);var We=function(t,e,i,o){for(var s,
|
|
774
|
+
`,Ke([o.property()],qe.prototype,"name",void 0),Ke([o.queryAssignedElements()],qe.prototype,"radioButtons",void 0),e.customElement("ft-radio")(Ve),e.customElement("ft-radio-group")(qe);var We=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Ge={borderRadiusM:e.FtCssVariable.external(e.designSystemVariables.borderRadiusM,"Design system"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:e.FtCssVariable.external(e.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:e.FtCssVariable.external(Ot.fontFamily,"Body2 typography"),fontSize:e.FtCssVariable.external(Ot.fontSize,"Body2 typography"),fontWeight:e.FtCssVariable.external(Ot.fontWeight,"Body2 typography"),letterSpacing:e.FtCssVariable.external(Ot.letterSpacing,"Body2 typography"),lineHeight:e.FtCssVariable.external(Ot.lineHeight,"Body2 typography"),textTransform:e.FtCssVariable.external(Ot.textTransform,"Body2 typography")};class Xe extends e.FtLitElement{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return i.html`
|
|
774
775
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
775
776
|
${null==this.parent?null:i.html`
|
|
776
777
|
<div tabindex="0"
|
|
@@ -816,6 +817,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
816
817
|
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return i.html`
|
|
817
818
|
<ft-checkbox name="${this.id}"
|
|
818
819
|
part="multivalued-option"
|
|
820
|
+
data-value="${t.value}"
|
|
819
821
|
.checked=${t.selected}
|
|
820
822
|
.disabled=${this.disabled}
|
|
821
823
|
.indeterminate=${Jt(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
@@ -825,15 +827,15 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
825
827
|
`}buildMonoValuedOption(t){return i.html`
|
|
826
828
|
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
827
829
|
part="monovalued-option"
|
|
830
|
+
data-value="${t.value}"
|
|
828
831
|
.checked=${t.selected}
|
|
829
|
-
|
|
832
|
+
.disabled=${this.disabled}
|
|
830
833
|
@click=${e=>this.optionsChanged(e,t)}
|
|
831
834
|
@keyup=${e=>this.onRadioKeyUp(e,t)}
|
|
832
835
|
@change=${t=>t.stopPropagation()}>
|
|
833
|
-
|
|
834
836
|
${t.label}
|
|
835
837
|
</ft-radio>
|
|
836
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Xe.elementDefinitions={"ft-button":Le,"ft-ripple":pe,"ft-typography":Yt,"ft-checkbox":
|
|
838
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Xe.elementDefinitions={"ft-button":Le,"ft-ripple":pe,"ft-typography":Yt,"ft-checkbox":Te,"ft-icon":Se,"ft-radio":Ve},Xe.styles=[i.css`
|
|
837
839
|
.ft-filter-level--container {
|
|
838
840
|
display: flex;
|
|
839
841
|
flex-direction: column;
|
|
@@ -889,17 +891,17 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
889
891
|
ft-radio, ft-checkbox {
|
|
890
892
|
flex-shrink: 1;
|
|
891
893
|
flex-grow: 1;
|
|
892
|
-
display:
|
|
894
|
+
display: flex;
|
|
893
895
|
max-width: calc(100% + 10px);
|
|
894
896
|
margin-left: -10px;
|
|
895
897
|
word-break: break-word;
|
|
896
898
|
}
|
|
897
|
-
|
|
898
|
-
.ft-filter-level--no-values {
|
|
899
|
+
|
|
900
|
+
.ft-filter-level--no-values {
|
|
899
901
|
margin: 10px 0;
|
|
900
902
|
color: ${Ge.colorOnSurfaceMedium};
|
|
901
903
|
}
|
|
902
|
-
`],We([o.property({type:String})],Xe.prototype,"id",void 0),We([o.property({type:Object})],Xe.prototype,"parent",void 0),We([o.property({type:Array})],Xe.prototype,"options",void 0),We([o.property({type:Boolean})],Xe.prototype,"multivalued",void 0),We([o.property({type:Boolean})],Xe.prototype,"disabled",void 0),We([o.property({type:Boolean})],Xe.prototype,"hideSelectedOptions",void 0),We([o.property({type:Boolean})],Xe.prototype,"preventNavigation",void 0),We([o.property({type:String})],Xe.prototype,"filter",void 0),We([o.property({type:String})],Xe.prototype,"moreValuesButtonLabel",void 0),We([o.property({type:String})],Xe.prototype,"noValuesLabel",void 0),We([o.property({type:Number})],Xe.prototype,"displayedValuesLimit",void 0),We([o.query(".ft-filter-level--container")],Xe.prototype,"container",void 0),We([o.state()],Xe.prototype,"displayedPages",void 0);var Ye=function(t,e,i,o){for(var s,
|
|
904
|
+
`],We([o.property({type:String})],Xe.prototype,"id",void 0),We([o.property({type:Object})],Xe.prototype,"parent",void 0),We([o.property({type:Array})],Xe.prototype,"options",void 0),We([o.property({type:Boolean})],Xe.prototype,"multivalued",void 0),We([o.property({type:Boolean})],Xe.prototype,"disabled",void 0),We([o.property({type:Boolean})],Xe.prototype,"hideSelectedOptions",void 0),We([o.property({type:Boolean})],Xe.prototype,"preventNavigation",void 0),We([o.property({type:String})],Xe.prototype,"filter",void 0),We([o.property({type:String})],Xe.prototype,"moreValuesButtonLabel",void 0),We([o.property({type:String})],Xe.prototype,"noValuesLabel",void 0),We([o.property({type:Number})],Xe.prototype,"displayedValuesLimit",void 0),We([o.query(".ft-filter-level--container")],Xe.prototype,"container",void 0),We([o.state()],Xe.prototype,"displayedPages",void 0);var Ye=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Je={buttonsColor:e.FtCssVariable.extend("--ft-snap-scroll-buttons-color",e.designSystemVariables.colorPrimary),buttonsZIndex:e.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:e.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system")};class Qe extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class ti extends e.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e.Debouncer(200),this.updateScrollDebouncer=new e.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=r.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":e.isSafari}),o=this.controls&&this.withScroll;return i.html`
|
|
903
905
|
<div part="container" class="${t}">
|
|
904
906
|
<ft-button
|
|
905
907
|
class="ft-snap-scroll--previous"
|
|
@@ -1048,7 +1050,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1048
1050
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1049
1051
|
background-color: ${Je.colorSurface};
|
|
1050
1052
|
}
|
|
1051
|
-
`,Ye([o.property({type:Boolean})],ti.prototype,"horizontal",void 0),Ye([o.property({type:Boolean})],ti.prototype,"hideScrollbar",void 0),Ye([o.property({type:Boolean})],ti.prototype,"controls",void 0),Ye([o.property({type:Boolean})],ti.prototype,"limitSize",void 0),Ye([o.state()],ti.prototype,"elements",void 0),Ye([o.state()],ti.prototype,"currentElement",void 0),Ye([o.state()],ti.prototype,"withScroll",void 0),Ye([o.state()],ti.prototype,"startReached",void 0),Ye([o.state()],ti.prototype,"endReached",void 0),Ye([o.query(".ft-snap-scroll--content")],ti.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(ti);var ei=function(t,e,i,o){for(var s,
|
|
1053
|
+
`,Ye([o.property({type:Boolean})],ti.prototype,"horizontal",void 0),Ye([o.property({type:Boolean})],ti.prototype,"hideScrollbar",void 0),Ye([o.property({type:Boolean})],ti.prototype,"controls",void 0),Ye([o.property({type:Boolean})],ti.prototype,"limitSize",void 0),Ye([o.state()],ti.prototype,"elements",void 0),Ye([o.state()],ti.prototype,"currentElement",void 0),Ye([o.state()],ti.prototype,"withScroll",void 0),Ye([o.state()],ti.prototype,"startReached",void 0),Ye([o.state()],ti.prototype,"endReached",void 0),Ye([o.query(".ft-snap-scroll--content")],ti.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(ti);var ei=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const ii=e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),oi=e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),si=e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),ri=e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),ni=e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),li=e.FtCssVariable.external(e.designSystemVariables.transitionDuration,"Design system"),ai=e.FtCssVariable.external(e.designSystemVariables.transitionTimingFunction,"Design system");class ci extends CustomEvent{constructor(t){super("change",{detail:t})}}class hi extends e.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e.Debouncer(300),this.changeDebouncer=new e.Debouncer(10)}get flatOptions(){return Jt(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const o=this.flatOptions.some((t=>t.selected));let s=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return i.html`
|
|
1052
1054
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1053
1055
|
part="container">
|
|
1054
1056
|
${this.label||o?i.html`
|
|
@@ -1182,9 +1184,9 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1182
1184
|
border-radius: 4px;
|
|
1183
1185
|
border: 1px solid ${ii};
|
|
1184
1186
|
padding: 4px;
|
|
1185
|
-
background-color: ${
|
|
1187
|
+
background-color: ${ni};
|
|
1186
1188
|
color: ${oi};
|
|
1187
|
-
outline-color: ${
|
|
1189
|
+
outline-color: ${ri};
|
|
1188
1190
|
}
|
|
1189
1191
|
|
|
1190
1192
|
input::placeholder {
|
|
@@ -1225,9 +1227,9 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1225
1227
|
slot {
|
|
1226
1228
|
display: none;
|
|
1227
1229
|
}
|
|
1228
|
-
`],ei([o.property({type:String})],hi.prototype,"id",void 0),ei([o.property({type:String})],hi.prototype,"label",void 0),ei([o.property({type:String})],hi.prototype,"filterPlaceHolder",void 0),ei([o.property({type:String})],hi.prototype,"clearButtonLabel",void 0),ei([o.property({type:String})],hi.prototype,"moreValuesButtonLabel",void 0),ei([o.property({type:String})],hi.prototype,"noValuesLabel",void 0),ei([e.jsonProperty([])],hi.prototype,"options",void 0),ei([o.property({type:Boolean})],hi.prototype,"multivalued",void 0),ei([o.property({type:Boolean})],hi.prototype,"disabled",void 0),ei([o.property({type:Boolean})],hi.prototype,"raiseSelectedOptions",void 0),ei([o.property({type:Number})],hi.prototype,"displayedValuesLimit",void 0),ei([o.query(".ft-filter--slot")],hi.prototype,"slotElement",void 0),ei([o.query(".ft-filter--container")],hi.prototype,"container",void 0),ei([o.query(".ft-filter--values")],hi.prototype,"valuesContainer",void 0),ei([o.query(".ft-filter--levels")],hi.prototype,"levelsContainer",void 0),ei([o.query(".ft-filter--levels ft-filter-level:last-child")],hi.prototype,"lastLevel",void 0),ei([o.query(".ft-filter--filter input")],hi.prototype,"filterInput",void 0),ei([o.queryAll(".ft-filter--levels ft-filter-level")],hi.prototype,"levels",void 0),ei([o.state()],hi.prototype,"withScroll",void 0),ei([o.state()],hi.prototype,"filter",void 0),ei([o.state()],hi.prototype,"slideIn",void 0),ei([o.state()],hi.prototype,"slideOut",void 0);var pi=function(t,e,i,o){for(var s,
|
|
1230
|
+
`],ei([o.property({type:String})],hi.prototype,"id",void 0),ei([o.property({type:String})],hi.prototype,"label",void 0),ei([o.property({type:String})],hi.prototype,"filterPlaceHolder",void 0),ei([o.property({type:String})],hi.prototype,"clearButtonLabel",void 0),ei([o.property({type:String})],hi.prototype,"moreValuesButtonLabel",void 0),ei([o.property({type:String})],hi.prototype,"noValuesLabel",void 0),ei([e.jsonProperty([])],hi.prototype,"options",void 0),ei([o.property({type:Boolean})],hi.prototype,"multivalued",void 0),ei([o.property({type:Boolean})],hi.prototype,"disabled",void 0),ei([o.property({type:Boolean})],hi.prototype,"raiseSelectedOptions",void 0),ei([o.property({type:Number})],hi.prototype,"displayedValuesLimit",void 0),ei([o.query(".ft-filter--slot")],hi.prototype,"slotElement",void 0),ei([o.query(".ft-filter--container")],hi.prototype,"container",void 0),ei([o.query(".ft-filter--values")],hi.prototype,"valuesContainer",void 0),ei([o.query(".ft-filter--levels")],hi.prototype,"levelsContainer",void 0),ei([o.query(".ft-filter--levels ft-filter-level:last-child")],hi.prototype,"lastLevel",void 0),ei([o.query(".ft-filter--filter input")],hi.prototype,"filterInput",void 0),ei([o.queryAll(".ft-filter--levels ft-filter-level")],hi.prototype,"levels",void 0),ei([o.state()],hi.prototype,"withScroll",void 0),ei([o.state()],hi.prototype,"filter",void 0),ei([o.state()],hi.prototype,"slideIn",void 0),ei([o.state()],hi.prototype,"slideOut",void 0);var pi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class fi extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return i.html`
|
|
1229
1231
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1230
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}fi.elementDefinitions={},pi([o.property({type:String})],fi.prototype,"label",void 0),pi([o.property({type:Object,converter:t=>t})],fi.prototype,"value",void 0),pi([o.property({type:Boolean,reflect:!0})],fi.prototype,"selected",void 0),pi([o.property({type:Object})],fi.prototype,"subOptions",void 0),pi([o.query(".ft-filter-option--slot")],fi.prototype,"slotElement",void 0),e.customElement("ft-filter")(hi),e.customElement("ft-filter-option")(fi);var di=function(t,e,i,o){for(var s,
|
|
1232
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}fi.elementDefinitions={},pi([o.property({type:String})],fi.prototype,"label",void 0),pi([o.property({type:Object,converter:t=>t})],fi.prototype,"value",void 0),pi([o.property({type:Boolean,reflect:!0})],fi.prototype,"selected",void 0),pi([o.property({type:Object})],fi.prototype,"subOptions",void 0),pi([o.query(".ft-filter-option--slot")],fi.prototype,"slotElement",void 0),e.customElement("ft-filter")(hi),e.customElement("ft-filter-option")(fi);var di=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ui extends e.FtLitElement{constructor(){super(...arguments),this.multi=!1}render(){return i.html`
|
|
1231
1233
|
<div class="ft-accordion">
|
|
1232
1234
|
<slot @activated=${this.onChange}></slot>
|
|
1233
1235
|
</div>
|
|
@@ -1235,7 +1237,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1235
1237
|
.ft-accordion {
|
|
1236
1238
|
box-sizing: border-box;
|
|
1237
1239
|
}
|
|
1238
|
-
`,di([o.property({type:Boolean})],ui.prototype,"multi",void 0),di([o.query("slot")],ui.prototype,"content",void 0);var bi=function(t,e,i,o){for(var s,
|
|
1240
|
+
`,di([o.property({type:Boolean})],ui.prototype,"multi",void 0),di([o.query("slot")],ui.prototype,"content",void 0);var bi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const vi=e.FtCssVariable.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),gi=e.FtCssVariable.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),xi=e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system");class yi extends e.FtLitElement{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return i.html`
|
|
1239
1241
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
1240
1242
|
<div class="ft-accordion-item--toggle"
|
|
1241
1243
|
part="toggle"
|
|
@@ -1304,7 +1306,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1304
1306
|
.ft-accordion-item--separator {
|
|
1305
1307
|
border-bottom: 1px solid ${xi};
|
|
1306
1308
|
}
|
|
1307
|
-
`,bi([o.property({type:String})],yi.prototype,"icon",void 0),bi([o.property({type:String})],yi.prototype,"label",void 0),bi([o.property({type:Boolean,reflect:!0})],yi.prototype,"active",void 0),e.customElement("ft-accordion")(ui),e.customElement("ft-accordion-item")(yi);var mi=function(t,e,i,o){for(var s,
|
|
1309
|
+
`,bi([o.property({type:String})],yi.prototype,"icon",void 0),bi([o.property({type:String})],yi.prototype,"label",void 0),bi([o.property({type:Boolean,reflect:!0})],yi.prototype,"active",void 0),e.customElement("ft-accordion")(ui),e.customElement("ft-accordion-item")(yi);var mi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const $i=e.FtCssVariable.extend("--ft-chip-color",e.designSystemVariables.colorOnSurface),wi={backgroundColor:e.FtCssVariable.extend("--ft-chip-background-color",e.designSystemVariables.colorSurface),color:$i,fontSize:e.FtCssVariable.extend("--ft-chip-font-size",Ot.fontSize),iconSize:e.FtCssVariable.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:e.FtCssVariable.extend("--ft-chip-ripple-color",$i),horizontalPadding:e.FtCssVariable.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:e.FtCssVariable.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),opacityDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},ki=e.FtCssVariable.extend("--ft-chip-highlighted-color",e.FtCssVariable.extend("--ft-chip-color",e.designSystemVariables.colorOnPrimary)),Si={backgroundColor:e.FtCssVariable.extend("--ft-chip-highlighted-background-color",e.FtCssVariable.extend("--ft-chip-background-color",e.designSystemVariables.colorPrimary)),color:ki,rippleColor:e.FtCssVariable.extend("--ft-chip-highlighted-ripple-color",ki)},zi=e.FtCssVariable.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Oi=e.FtCssVariable.create("--ft-chip-dense-vertical-padding","SIZE","4px");class Ci extends CustomEvent{constructor(){super("icon-click")}}class Bi extends e.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}static get styles(){return[e.noTextSelect,i.css`
|
|
1308
1310
|
:host {
|
|
1309
1311
|
display: inline-block;
|
|
1310
1312
|
max-width: 100%;
|
|
@@ -1435,7 +1437,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1435
1437
|
order: -1;
|
|
1436
1438
|
}
|
|
1437
1439
|
`]}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":e.isSafari};return i.html`
|
|
1438
|
-
<div class="${
|
|
1440
|
+
<div class="${r.classMap(t)}"
|
|
1439
1441
|
aria-label="${this.getLabel()}"
|
|
1440
1442
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1441
1443
|
@keyup=${this.onKeyUp}>
|
|
@@ -1453,8 +1455,8 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1453
1455
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
1454
1456
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
1455
1457
|
</div>
|
|
1456
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Ci))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Ci))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}Bi.elementDefinitions={"ft-ripple":pe,"ft-typography":Yt,"ft-icon":Se},mi([o.property({type:Boolean})],Bi.prototype,"highlighted",void 0),mi([o.property({type:Boolean})],Bi.prototype,"removable",void 0),mi([o.property({type:Boolean})],Bi.prototype,"disabled",void 0),mi([o.property({type:Boolean})],Bi.prototype,"clickable",void 0),mi([o.property({type:Boolean})],Bi.prototype,"iconClickable",void 0),mi([o.property({type:Boolean})],Bi.prototype,"dense",void 0),mi([o.property({type:Boolean})],Bi.prototype,"multiLine",void 0),mi([o.property({type:String})],Bi.prototype,"label",void 0),mi([o.property({type:String})],Bi.prototype,"icon",void 0),mi([o.property({type:Boolean})],Bi.prototype,"trailingIcon",void 0),mi([o.query("ft-typography slot")],Bi.prototype,"slottedContent",void 0),e.customElement("ft-chip")(Bi);var Ei=function(t,e,i,o){for(var s,
|
|
1457
|
-
<div class="${
|
|
1458
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Ci))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Ci))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}Bi.elementDefinitions={"ft-ripple":pe,"ft-typography":Yt,"ft-icon":Se},mi([o.property({type:Boolean})],Bi.prototype,"highlighted",void 0),mi([o.property({type:Boolean})],Bi.prototype,"removable",void 0),mi([o.property({type:Boolean})],Bi.prototype,"disabled",void 0),mi([o.property({type:Boolean})],Bi.prototype,"clickable",void 0),mi([o.property({type:Boolean})],Bi.prototype,"iconClickable",void 0),mi([o.property({type:Boolean})],Bi.prototype,"dense",void 0),mi([o.property({type:Boolean})],Bi.prototype,"multiLine",void 0),mi([o.property({type:String})],Bi.prototype,"label",void 0),mi([o.property({type:String})],Bi.prototype,"icon",void 0),mi([o.property({type:Boolean})],Bi.prototype,"trailingIcon",void 0),mi([o.query("ft-typography slot")],Bi.prototype,"slottedContent",void 0),e.customElement("ft-chip")(Bi);var Ei=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Ii={fontSize:e.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariable.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariable.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariable.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class Li extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return i.html`
|
|
1459
|
+
<div class="${r.classMap(t)}">
|
|
1458
1460
|
${this.text?i.html`
|
|
1459
1461
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1460
1462
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -1532,7 +1534,6 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1532
1534
|
position: absolute;
|
|
1533
1535
|
top: calc(50% - var(--ft-typography-caption-line-height) / 2);
|
|
1534
1536
|
transition: top 250ms;
|
|
1535
|
-
width: calc(100% - 8px);
|
|
1536
1537
|
overflow: hidden;
|
|
1537
1538
|
white-space: nowrap;
|
|
1538
1539
|
text-overflow: ellipsis;
|
|
@@ -1579,8 +1580,8 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1579
1580
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1580
1581
|
border-top: none;
|
|
1581
1582
|
}
|
|
1582
|
-
`],Ei([o.property({type:String})],Li.prototype,"text",void 0),Ei([o.property({type:Boolean})],Li.prototype,"raised",void 0),Ei([o.property({type:Boolean})],Li.prototype,"outlined",void 0),Ei([o.property({type:Boolean})],Li.prototype,"disabled",void 0),Ei([o.property({type:Boolean})],Li.prototype,"error",void 0),e.customElement("ft-input-label")(Li);var Di=function(t,e,i,o){for(var s,
|
|
1583
|
-
<div class="${
|
|
1583
|
+
`],Ei([o.property({type:String})],Li.prototype,"text",void 0),Ei([o.property({type:Boolean})],Li.prototype,"raised",void 0),Ei([o.property({type:Boolean})],Li.prototype,"outlined",void 0),Ei([o.property({type:Boolean})],Li.prototype,"disabled",void 0),Ei([o.property({type:Boolean})],Li.prototype,"error",void 0),e.customElement("ft-input-label")(Li);var Di=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Fi extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Fi.elementDefinitions={},Di([o.property({type:String})],Fi.prototype,"label",void 0),Di([o.property({type:Object,converter:t=>t})],Fi.prototype,"value",void 0),Di([o.property({type:Boolean,reflect:!0})],Fi.prototype,"selected",void 0);const ji={labelSize:e.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:e.FtCssVariable.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariable.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariable.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariable.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariable.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class Mi extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,n,l;let a=this.hasOptionsMenuOpen,c=this.disabled||!this.hasOptions;const h=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,p={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":c,"ft-select--options-displayed":a,"ft-select--has-option-selected":h,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
1584
|
+
<div class="${r.classMap(p)}" part="container">
|
|
1584
1585
|
<div class="ft-select--main-panel" part="main-panel">
|
|
1585
1586
|
<ft-input-label text="${this.label}"
|
|
1586
1587
|
part="label"
|
|
@@ -1599,7 +1600,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1599
1600
|
aria-expanded="${a}">
|
|
1600
1601
|
<ft-ripple ?disabled=${c} ?activated=${!this.outlined}></ft-ripple>
|
|
1601
1602
|
<ft-typography variant="body1" class="ft-select--selected-option">
|
|
1602
|
-
${null!==(l=null===(
|
|
1603
|
+
${null!==(l=null===(n=this.selectedOption)||void 0===n?void 0:n.label)&&void 0!==l?l:""}
|
|
1603
1604
|
</ft-typography>
|
|
1604
1605
|
<ft-icon variant="material">${a?"expand_less":"expand_more"}</ft-icon>
|
|
1605
1606
|
</div>
|
|
@@ -1618,7 +1619,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1618
1619
|
@option-change=${this.updateOptionsFromSlot}
|
|
1619
1620
|
></slot>
|
|
1620
1621
|
`}renderOption(t){let e=this.selectedOption===t;const o={"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0};return i.html`
|
|
1621
|
-
<div class="${
|
|
1622
|
+
<div class="${r.classMap(o)}"
|
|
1622
1623
|
part="option"
|
|
1623
1624
|
tabindex="0"
|
|
1624
1625
|
data-value="${t.value}"
|
|
@@ -1627,7 +1628,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1627
1628
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1628
1629
|
${t.label}
|
|
1629
1630
|
</div>
|
|
1630
|
-
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,
|
|
1631
|
+
`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value}))),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,r;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Mi.elementDefinitions={"ft-input-label":Li,"ft-typography":Yt,"ft-ripple":pe,"ft-icon":Se},Mi.styles=[Kt,qt,i.css`
|
|
1631
1632
|
*:focus {
|
|
1632
1633
|
outline: none;
|
|
1633
1634
|
}
|
|
@@ -1797,7 +1798,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1797
1798
|
background-position: calc(100vw + ${Pi.glareWidth}) 0, calc(${Pi.glareWidth} * -1) 0;
|
|
1798
1799
|
}
|
|
1799
1800
|
}
|
|
1800
|
-
`,e.customElement("ft-skeleton")(Ai);const
|
|
1801
|
+
`,e.customElement("ft-skeleton")(Ai);const Ti={height:e.FtCssVariable.create("--ft-search-bar-height","SIZE","38px"),borderRadius:e.FtCssVariable.extend("--ft-search-bar-border-radius",e.designSystemVariables.borderRadiusS),mobileOpenPosition:e.FtCssVariable.create("--ft-search-bar-mobile-open-position","POSITION","fixed"),mobileOpenTop:e.FtCssVariable.create("--ft-search-bar-mobile-open-top","SIZE","0"),mobileOpenBottom:e.FtCssVariable.create("--ft-search-bar-mobile-open-bottom","SIZE","0"),mobileOpenLeft:e.FtCssVariable.create("--ft-search-bar-mobile-open-left","SIZE","0"),mobileOpenRight:e.FtCssVariable.create("--ft-search-bar-mobile-open-right","SIZE","0"),desktopFiltersHeight:e.FtCssVariable.create("--ft-search-bar-desktop-filters-height","SIZE","350px"),floatingZIndex:e.FtCssVariable.create("--ft-search-bar-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurface:e.FtCssVariable.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system"),buttonColor:e.FtCssVariable.external(Ce.color,"Button"),buttonRippleColor:e.FtCssVariable.external(Ce.rippleColor,"Button")},Ni=i.css`
|
|
1801
1802
|
* {
|
|
1802
1803
|
box-sizing: border-box;
|
|
1803
1804
|
}
|
|
@@ -1806,7 +1807,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1806
1807
|
display: flex;
|
|
1807
1808
|
flex-direction: column;
|
|
1808
1809
|
gap: 8px;
|
|
1809
|
-
color: ${
|
|
1810
|
+
color: ${Ti.colorOnSurface};
|
|
1810
1811
|
outline: none;
|
|
1811
1812
|
}
|
|
1812
1813
|
|
|
@@ -1815,21 +1816,21 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1815
1816
|
}
|
|
1816
1817
|
|
|
1817
1818
|
.ft-search-bar--mobile-menu-open {
|
|
1818
|
-
position: ${
|
|
1819
|
-
top: ${
|
|
1820
|
-
bottom: ${
|
|
1821
|
-
left: ${
|
|
1822
|
-
right: ${
|
|
1823
|
-
z-index: ${
|
|
1819
|
+
position: ${Ti.mobileOpenPosition};
|
|
1820
|
+
top: ${Ti.mobileOpenTop};
|
|
1821
|
+
bottom: ${Ti.mobileOpenBottom};
|
|
1822
|
+
left: ${Ti.mobileOpenLeft};
|
|
1823
|
+
right: ${Ti.mobileOpenRight};
|
|
1824
|
+
z-index: ${Ti.floatingZIndex};
|
|
1824
1825
|
padding: 16px;
|
|
1825
1826
|
}
|
|
1826
1827
|
|
|
1827
1828
|
.ft-search-bar--mobile-menu-open:not(.ft-search-bar--forced-open) {
|
|
1828
|
-
background: ${
|
|
1829
|
+
background: ${Ti.colorSurface};
|
|
1829
1830
|
}
|
|
1830
1831
|
|
|
1831
1832
|
.ft-search-bar--mobile-menu-open.ft-search-bar--forced-open {
|
|
1832
|
-
position: ${
|
|
1833
|
+
position: ${Ti.mobileOpenPosition.get("static")};
|
|
1833
1834
|
}
|
|
1834
1835
|
|
|
1835
1836
|
.ft-search-bar {
|
|
@@ -1837,20 +1838,20 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1837
1838
|
display: flex;
|
|
1838
1839
|
flex-direction: row;
|
|
1839
1840
|
align-items: center;
|
|
1840
|
-
height: ${
|
|
1841
|
+
height: ${Ti.height};
|
|
1841
1842
|
|
|
1842
|
-
background: ${
|
|
1843
|
-
border: 1px solid ${
|
|
1844
|
-
border-radius: ${
|
|
1843
|
+
background: ${Ti.colorSurface};
|
|
1844
|
+
border: 1px solid ${Ti.colorOutline};
|
|
1845
|
+
border-radius: ${Ti.borderRadius};
|
|
1845
1846
|
}
|
|
1846
1847
|
|
|
1847
1848
|
.ft-search-bar--skeleton {
|
|
1848
|
-
${e.setVariable(Pi.height,
|
|
1849
|
-
${e.setVariable(Pi.borderRadiusM,
|
|
1849
|
+
${e.setVariable(Pi.height,Ti.height)};
|
|
1850
|
+
${e.setVariable(Pi.borderRadiusM,Ti.borderRadius)};
|
|
1850
1851
|
}
|
|
1851
1852
|
|
|
1852
1853
|
.ft-search-bar--floating-panel-open .ft-search-bar {
|
|
1853
|
-
border-radius: ${
|
|
1854
|
+
border-radius: ${Ti.borderRadius} ${Ti.borderRadius} 0 0;
|
|
1854
1855
|
}
|
|
1855
1856
|
|
|
1856
1857
|
.ft-search-bar--input-container {
|
|
@@ -1868,7 +1869,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1868
1869
|
align-self: stretch;
|
|
1869
1870
|
display: grid;
|
|
1870
1871
|
padding: 0 8px;
|
|
1871
|
-
border-radius: ${
|
|
1872
|
+
border-radius: ${Ti.borderRadius};
|
|
1872
1873
|
}
|
|
1873
1874
|
|
|
1874
1875
|
.ft-search-bar--dense .ft-search-bar--input-outline {
|
|
@@ -1877,7 +1878,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1877
1878
|
}
|
|
1878
1879
|
|
|
1879
1880
|
.ft-search-bar--input-container:focus-within .ft-search-bar--input-outline {
|
|
1880
|
-
outline: 2px solid ${
|
|
1881
|
+
outline: 2px solid ${Ti.colorPrimary};
|
|
1881
1882
|
}
|
|
1882
1883
|
|
|
1883
1884
|
.ft-search-bar--input {
|
|
@@ -1885,12 +1886,12 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1885
1886
|
flex-grow: 1;
|
|
1886
1887
|
border: none;
|
|
1887
1888
|
background-color: transparent;
|
|
1888
|
-
color: ${
|
|
1889
|
+
color: ${Ti.colorOnSurface};
|
|
1889
1890
|
outline: none;
|
|
1890
1891
|
}
|
|
1891
1892
|
|
|
1892
1893
|
.ft-search-bar--input::placeholder {
|
|
1893
|
-
color: ${
|
|
1894
|
+
color: ${Ti.colorOnSurfaceMedium};
|
|
1894
1895
|
}
|
|
1895
1896
|
|
|
1896
1897
|
.ft-search-bar--actions {
|
|
@@ -1900,7 +1901,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1900
1901
|
align-items: center;
|
|
1901
1902
|
height: 100%;
|
|
1902
1903
|
|
|
1903
|
-
${e.setVariable(de.zIndex,`calc(${
|
|
1904
|
+
${e.setVariable(de.zIndex,`calc(${Ti.floatingZIndex} + 1)`)};
|
|
1904
1905
|
}
|
|
1905
1906
|
|
|
1906
1907
|
.ft-search-bar > ft-button,
|
|
@@ -1909,8 +1910,8 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1909
1910
|
}
|
|
1910
1911
|
|
|
1911
1912
|
.ft-search-bar--left-action {
|
|
1912
|
-
${e.setVariable(Ce.borderRadius,i.css`calc(${
|
|
1913
|
-
border-right: 1px solid ${
|
|
1913
|
+
${e.setVariable(Ce.borderRadius,i.css`calc(${Ti.borderRadius} - 1px) 0 0 calc(${Ti.borderRadius} - 1px)`)};
|
|
1914
|
+
border-right: 1px solid ${Ti.colorOutline};
|
|
1914
1915
|
height: 100%;
|
|
1915
1916
|
}
|
|
1916
1917
|
|
|
@@ -1919,7 +1920,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1919
1920
|
}
|
|
1920
1921
|
|
|
1921
1922
|
.ft-search-bar--floating-panel-open .ft-search-bar--left-action {
|
|
1922
|
-
${e.setVariable(Ce.borderRadius,i.css`calc(${
|
|
1923
|
+
${e.setVariable(Ce.borderRadius,i.css`calc(${Ti.borderRadius} - 1px) 0 0 0`)};
|
|
1923
1924
|
}
|
|
1924
1925
|
|
|
1925
1926
|
.ft-search-bar .ft-search-bar--launch-search,
|
|
@@ -1929,13 +1930,13 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1929
1930
|
|
|
1930
1931
|
.ft-search-bar--separator {
|
|
1931
1932
|
height: 20px;
|
|
1932
|
-
border-right: 1px solid ${
|
|
1933
|
+
border-right: 1px solid ${Ti.colorOutline};
|
|
1933
1934
|
}
|
|
1934
1935
|
|
|
1935
1936
|
.ft-search-bar--left-action.ft-search-bar--content-locale {
|
|
1936
1937
|
${e.setVariable(Ii.borderColor,"transparent")};
|
|
1937
|
-
${e.setVariable(Ii.borderRadiusS,i.css`calc(${
|
|
1938
|
-
${e.setVariable(ji.selectedOptionColor,
|
|
1938
|
+
${e.setVariable(Ii.borderRadiusS,i.css`calc(${Ti.borderRadius} - 1px)`)};
|
|
1939
|
+
${e.setVariable(ji.selectedOptionColor,Ti.buttonColor)};
|
|
1939
1940
|
}
|
|
1940
1941
|
|
|
1941
1942
|
.ft-search-bar--left-action.ft-search-bar--content-locale,
|
|
@@ -1952,7 +1953,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
1952
1953
|
}
|
|
1953
1954
|
|
|
1954
1955
|
.ft-search-bar--left-action.ft-search-bar--content-locale::part(selected-value) {
|
|
1955
|
-
border-radius: calc(${
|
|
1956
|
+
border-radius: calc(${Ti.borderRadius} - 1px) 0 0 calc(${Ti.borderRadius} - 1px);
|
|
1956
1957
|
}
|
|
1957
1958
|
|
|
1958
1959
|
`,Ri=i.css`
|
|
@@ -2014,7 +2015,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2014
2015
|
|
|
2015
2016
|
.ft-search-bar--desktop-menu .ft-search-bar--filters-container {
|
|
2016
2017
|
display: block;
|
|
2017
|
-
height: ${
|
|
2018
|
+
height: ${Ti.desktopFiltersHeight};
|
|
2018
2019
|
--ft-snap-scroll-gap: 16px;
|
|
2019
2020
|
}
|
|
2020
2021
|
|
|
@@ -2065,7 +2066,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2065
2066
|
|
|
2066
2067
|
.ft-search-bar--filter-label > :last-child {
|
|
2067
2068
|
flex-shrink: 1;
|
|
2068
|
-
color: ${
|
|
2069
|
+
color: ${Ti.colorOnSurfaceMedium};
|
|
2069
2070
|
}
|
|
2070
2071
|
|
|
2071
2072
|
ft-accordion-item::part(toggle) {
|
|
@@ -2124,7 +2125,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2124
2125
|
}
|
|
2125
2126
|
|
|
2126
2127
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
2127
|
-
border-top: 1px solid ${
|
|
2128
|
+
border-top: 1px solid ${Ti.colorOutline};
|
|
2128
2129
|
}
|
|
2129
2130
|
|
|
2130
2131
|
.ft-search-bar--mobile-menu-open .ft-search-bar--suggestions {
|
|
@@ -2134,15 +2135,15 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2134
2135
|
.ft-search-bar--floating-panel,
|
|
2135
2136
|
.ft-search-bar--desktop .ft-search-bar--suggestions {
|
|
2136
2137
|
position: absolute;
|
|
2137
|
-
z-index: ${
|
|
2138
|
+
z-index: ${Ti.floatingZIndex};
|
|
2138
2139
|
top: 100%;
|
|
2139
2140
|
left: -1px;
|
|
2140
2141
|
right: -1px;
|
|
2141
2142
|
display: none;
|
|
2142
|
-
background: ${
|
|
2143
|
-
border: 1px solid ${
|
|
2144
|
-
border-radius: 0 0 ${
|
|
2145
|
-
box-shadow: ${
|
|
2143
|
+
background: ${Ti.colorSurface};
|
|
2144
|
+
border: 1px solid ${Ti.colorOutline};
|
|
2145
|
+
border-radius: 0 0 ${Ti.borderRadius} ${Ti.borderRadius};
|
|
2146
|
+
box-shadow: ${Ti.elevation02};
|
|
2146
2147
|
outline: none;
|
|
2147
2148
|
}
|
|
2148
2149
|
|
|
@@ -2154,12 +2155,6 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2154
2155
|
display: block;
|
|
2155
2156
|
}
|
|
2156
2157
|
|
|
2157
|
-
.ft-search-bar--no-suggestions {
|
|
2158
|
-
text-align: center;
|
|
2159
|
-
padding: 8px;
|
|
2160
|
-
color: ${Ni.colorOnSurface};
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
2158
|
.ft-search-bar--suggestion {
|
|
2164
2159
|
text-decoration: none;
|
|
2165
2160
|
position: relative;
|
|
@@ -2168,7 +2163,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2168
2163
|
padding: 8px;
|
|
2169
2164
|
gap: 8px;
|
|
2170
2165
|
cursor: pointer;
|
|
2171
|
-
color: ${
|
|
2166
|
+
color: ${Ti.colorOnSurface};
|
|
2172
2167
|
min-height: 52px;
|
|
2173
2168
|
}
|
|
2174
2169
|
|
|
@@ -2185,7 +2180,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2185
2180
|
}
|
|
2186
2181
|
|
|
2187
2182
|
.ft-search-bar--recent-search + .ft-search-bar--suggestion:not(.ft-search-bar--recent-search) {
|
|
2188
|
-
border-top: 1px solid ${
|
|
2183
|
+
border-top: 1px solid ${Ti.colorOutline};
|
|
2189
2184
|
}
|
|
2190
2185
|
|
|
2191
2186
|
.ft-search-bar--suggestion ft-typography {
|
|
@@ -2193,15 +2188,16 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2193
2188
|
flex-grow: 1;
|
|
2194
2189
|
flex-shrink: 1;
|
|
2195
2190
|
}
|
|
2196
|
-
`;var _i=function(t,e,i,o){for(var s,
|
|
2191
|
+
`;var _i=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const Hi={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Preset",removeRecentSearch:"Remove",back:"Back"};class Vi extends CustomEvent{constructor(t){super("launch-search",{detail:t,bubbles:!0,composed:!0})}}class Ki extends CustomEvent{constructor(t){super("change",{detail:t})}}const qi=()=>{};class Wi extends e.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new e.ParametrizedLabelResolver(Hi,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=t=>function(t,e){var i;const o=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");o.append("filters",t)}return new URL(`${t}/search/all?${o.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=l.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new e.Debouncer(500),this.suggestDebouncer=new e.Debouncer(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.isMobile||(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))},this.compareFilters=(t,e)=>t.key===e.key&&t.negative==e.negative&&t.values.length===e.values.length&&t.values.every((t=>e.values.includes(t))),this.compareRequests=(t,e)=>(null==t.contentLocale||null==e.contentLocale||t.contentLocale===e.contentLocale)&&t.filters.length===e.filters.length&&t.filters.every((t=>e.filters.some((e=>this.compareFilters(t,e)))))}get isMobileMenuOpen(){return this.isMobile&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){const t=this.searchFilters.filter((t=>t.values.length>0&&!this.displayedFilters.includes(t.key))).map((t=>({id:t.key})));return[...this.displayedFilters.map((t=>({id:t}))),...t]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===l.S}}get hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return null!=this.presets&&this.presets.length>0}get hasPriors(){return null!=this.priors&&this.priors.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}focusInput(){this.input?this.input.focus():setTimeout((()=>this.focusInput()),50)}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return i.html`
|
|
2197
2192
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
2198
2193
|
${this.renderSearchBar()}
|
|
2199
2194
|
`}renderSearchBar(){const t={"ft-search-bar--container":!0,"ft-search-bar--dense":!this.isMobile&&this.dense,"ft-search-bar--mobile":this.isMobile,"ft-search-bar--desktop":!this.isMobile,"ft-search-bar--floating-panel-open":!this.isMobile&&this.displayFacets&&!this.forceMenuOpen,"ft-search-bar--mobile-menu-open":this.isMobileMenuOpen,"ft-search-bar--forced-open":this.forceMenuOpen||this.forceMobileMenuOpen};return this.facetsInitialized&&this.availableContentLocalesInitialized?i.html`
|
|
2200
|
-
<div class="${
|
|
2195
|
+
<div class="${r.classMap(t)}" part="container" tabindex="-1">
|
|
2201
2196
|
${this.isMobile?this.renderMobileSearchBar():this.renderDesktopSearchBar()}
|
|
2202
2197
|
</div>
|
|
2203
2198
|
`:i.html`
|
|
2204
|
-
<ft-skeleton class="ft-search-bar--skeleton" part="loader"
|
|
2199
|
+
<ft-skeleton class="ft-search-bar--container ft-search-bar--skeleton" part="loader"
|
|
2200
|
+
tabindex="-1"></ft-skeleton>
|
|
2205
2201
|
`}renderMobileSearchBar(){return i.html`
|
|
2206
2202
|
<div class="ft-search-bar">
|
|
2207
2203
|
<div class="ft-search-bar--input-container" part="input-container">
|
|
@@ -2264,6 +2260,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2264
2260
|
</ft-typography>
|
|
2265
2261
|
</div>
|
|
2266
2262
|
<ft-filter
|
|
2263
|
+
id="ft:locale"
|
|
2267
2264
|
part="filters filter-ft-locale"
|
|
2268
2265
|
.exportpartsPrefixes=${["filter","filter-ft-locale"]}
|
|
2269
2266
|
class="ft-search-bar--content-locale"
|
|
@@ -2301,7 +2298,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2301
2298
|
`}contentLocalesAsFilterOptions(){return this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale})))}renderDesktopSearchBar(){return i.html`
|
|
2302
2299
|
<div class="ft-search-bar" part="search-bar">
|
|
2303
2300
|
${this.renderSearchBarLeftAction()}
|
|
2304
|
-
<div class="ft-search-bar--input-container" part="input-container">
|
|
2301
|
+
<div class="ft-search-bar--input-container" part="input-container" tabindex="-1">
|
|
2305
2302
|
<div class="ft-search-bar--input-outline" part="input-outline">
|
|
2306
2303
|
${this.dense?this.renderSelectedFacets():i.nothing}
|
|
2307
2304
|
<input class="ft-search-bar--input ft-typography--body2"
|
|
@@ -2411,13 +2408,15 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2411
2408
|
part="filters-container"
|
|
2412
2409
|
exportpartsPrefix="filters-container">
|
|
2413
2410
|
${this.hasLocaleSelector?i.html`
|
|
2414
|
-
<ft-filter
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2411
|
+
<ft-filter
|
|
2412
|
+
id="ft:locale"
|
|
2413
|
+
class="ft-search-bar--content-locale"
|
|
2414
|
+
part="filters filter-ft-locale"
|
|
2415
|
+
.exportpartsPrefixes=${["filter","filter-ft-locale"]}
|
|
2416
|
+
label="${this.labelResolver.resolve("contentLocaleSelector")}"
|
|
2417
|
+
filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}"
|
|
2418
|
+
.options=${this.contentLocalesAsFilterOptions()}
|
|
2419
|
+
@change=${t=>this.contentLocale=t.detail[0]}
|
|
2421
2420
|
></ft-filter>
|
|
2422
2421
|
`:i.nothing}
|
|
2423
2422
|
${s.repeat(this.facets,(t=>t.key),(t=>{const e=ee(t),o=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0})),s=t.key.replace(":","-");return i.html`
|
|
@@ -2444,25 +2443,29 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2444
2443
|
<ft-chip part="selected-filters selected-filter-ft-locale"
|
|
2445
2444
|
?dense=${this.dense&&!this.isMobile}
|
|
2446
2445
|
?clickable=${this.isMobile}
|
|
2447
|
-
@click=${()=>this.openMobileFilters("ft:contentLocale")}
|
|
2446
|
+
@click=${()=>this.openMobileFilters("ft:contentLocale")}
|
|
2447
|
+
data-key="ft:locale"
|
|
2448
|
+
data-value="${this.contentLocale}">
|
|
2448
2449
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2449
2450
|
</ft-chip>
|
|
2450
2451
|
`:null}
|
|
2451
|
-
${s.repeat(this.facets,(t=>t.key),(e=>{const o=function(t){return Jt(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return s.repeat(o,(s=>{let
|
|
2452
|
+
${s.repeat(this.facets,(t=>t.key),(e=>{const o=function(t){return Jt(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(e);return s.repeat(o,(s=>{let r=e.label+": "+function(t){return Qt(t).split("|").join(" > ")}(s);const n=e.key.replace(":","-"),l=i.html`
|
|
2452
2453
|
<ft-chip
|
|
2453
|
-
part="selected-filters selected-filter-${
|
|
2454
|
+
part="selected-filters selected-filter-${n}"
|
|
2454
2455
|
?dense=${this.dense&&!this.isMobile}
|
|
2455
2456
|
?clickable=${this.isMobile}
|
|
2456
2457
|
?removable=${!this.isMobile}
|
|
2457
2458
|
icon=${this.isMobile?i.nothing:"close"}
|
|
2458
|
-
label="${
|
|
2459
|
-
title=${t?
|
|
2459
|
+
label="${r}"
|
|
2460
|
+
title=${t?r:i.nothing}
|
|
2460
2461
|
@click=${()=>this.openMobileFilters(e.key)}
|
|
2461
|
-
@icon-click=${()=>this.setFilter(e.key,o.filter((t=>t!==s)))}
|
|
2462
|
+
@icon-click=${()=>this.setFilter(e.key,o.filter((t=>t!==s)))}
|
|
2463
|
+
data-key="${e.key}"
|
|
2464
|
+
data-value="${s}">
|
|
2462
2465
|
${function(t){return Qt(t).split("|").pop()}(s)}
|
|
2463
2466
|
</ft-chip>
|
|
2464
2467
|
`;return t?l:i.html`
|
|
2465
|
-
<ft-tooltip inline text="${
|
|
2468
|
+
<ft-tooltip inline text="${r}">
|
|
2466
2469
|
${l}
|
|
2467
2470
|
</ft-tooltip>
|
|
2468
2471
|
`}))}))}
|
|
@@ -2485,7 +2488,7 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2485
2488
|
<div class="ft-search-bar--selected-filters" part="selected-filters-container">
|
|
2486
2489
|
${e}
|
|
2487
2490
|
</div>
|
|
2488
|
-
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.
|
|
2491
|
+
`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.suggestions.length>0||t.length>0;return i.html`
|
|
2489
2492
|
<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}"
|
|
2490
2493
|
part="suggestions-container"
|
|
2491
2494
|
@keydown=${this.onSuggestKeyDown}>
|
|
@@ -2518,15 +2521,9 @@ const V=Symbol.for(""),K=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
2518
2521
|
<ft-typography variant="body1">${t.value}</ft-typography>
|
|
2519
2522
|
</a>
|
|
2520
2523
|
`))}
|
|
2521
|
-
${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?i.html`
|
|
2522
|
-
<ft-typography class="ft-search-bar--no-suggestions" element="p"
|
|
2523
|
-
variant="body2">
|
|
2524
|
-
${this.labelResolver.resolve("noSuggestions")}
|
|
2525
|
-
</ft-typography>
|
|
2526
|
-
`:null}
|
|
2527
2524
|
</div>
|
|
2528
|
-
`}getIcon(t){const e="DOCUMENT"===t.type?$e.file_format:$e.fluid_topics;let o;switch(t.type){case"MAP":o="BOOK"===t.editorialType?ge.BOOK:ge.ARTICLE;break;case"DOCUMENT":o=function(t,e){var i,o,s,
|
|
2525
|
+
`}getIcon(t){const e="DOCUMENT"===t.type?$e.file_format:$e.fluid_topics;let o;switch(t.type){case"MAP":o="BOOK"===t.editorialType?ge.BOOK:ge.ARTICLE;break;case"DOCUMENT":o=function(t,e){var i,o,s,r;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[n,l]=((null!==(i=me.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(r=null!==(s=null!==(o=ye.get(l))&&void 0!==o?o:ye.get(e))&&void 0!==s?s:ye.get(n))&&void 0!==r?r:xe.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":o=ge.TOPICS}return i.html`
|
|
2529
2526
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
2530
2527
|
${o}
|
|
2531
2528
|
</ft-icon>
|
|
2532
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){super.firstUpdated(t),this.initApi()}update(t){var i,o,s,n,r,l;if(t.has("labels")&&(this.labelResolver=new e.ParametrizedLabelResolver(Hi,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const e=t=>this.availableContentLocales.some((e=>e.lang===t));e(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&e(t.get("contentLocale"))?t.get("contentLocale"):null===(i=this.availableContentLocales[0])||void 0===i?void 0:i.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(o=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==o?o:"[]")),t.has("presets")&&(null!==(s=this.presets)&&void 0!==s?s:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>Qt(t))))))),t.has("selectedPreset")){const t=(null!==(n=this.presets)&&void 0!==n?n:[]).find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}t.has("contentLocale")&&null!=this.contentLocale&&(this.knownFacetLabels=new Map),["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(l=(null!==(r=this.presets)&&void 0!==r?r:[]).find((t=>this.compareRequests(t,this.request))))||void 0===l?void 0:l.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi(),this.availableContentLocalesInitialized=!1,this.facetsInitialized=!1),t.has("api")&&this.updateAvailableContentLocales(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Ki(this.request))}async updateAvailableContentLocales(){this.api&&(this.availableContentLocales=await this.api.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[])),this.availableContentLocalesInitialized=!0)}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout((()=>this.initApi()),100))}updateFacets(){this.api&&(this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t;const e=new Map;await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets.forEach((t=>{this.knownFacetLabels.set(t.key,t.label),e.set(t.key,t)})))).catch(qi)),this.facets=[];for(let t of this.facetsRequest)e.has(t.id)?this.facets.push(e.get(t.id)):this.knownFacetLabels.has(t.id)&&this.facets.push({key:t.id,label:this.knownFacetLabels.get(t.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1});this.facetsLoaded=!0,this.facetsInitialized=!0}))):(this.facets=[],this.facetsInitialized=!0))}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new Vi(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Jt(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>Jt(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,s,n;t.preventDefault(),t.stopPropagation();const r=null!==(n=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.input;null==r||r.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}}Wi.elementDefinitions={"ft-accordion":ui,"ft-accordion-item":yi,"ft-button":Le,"ft-chip":Bi,"ft-filter":hi,"ft-filter-option":fi,"ft-icon":Se,"ft-ripple":pe,"ft-select":Mi,"ft-select-option":Fi,"ft-size-watcher":p,"ft-skeleton":Ai,"ft-snap-scroll":ti,"ft-tooltip":ue,"ft-typography":Yt},Wi.styles=[Kt,Ti,Ri,Zi,Ui],_i([o.property({type:Boolean})],Wi.prototype,"dense",void 0),_i([o.property()],Wi.prototype,"mode",void 0),_i([o.property({type:Boolean})],Wi.prototype,"forceMobileMenuOpen",void 0),_i([o.property({type:Boolean})],Wi.prototype,"forceMenuOpen",void 0),_i([o.property()],Wi.prototype,"baseUrl",void 0),_i([o.property()],Wi.prototype,"apiIntegrationIdentifier",void 0),_i([o.property()],Wi.prototype,"contentLocale",void 0),_i([o.state()],Wi.prototype,"availableContentLocales",void 0),_i([o.state()],Wi.prototype,"availableContentLocalesInitialized",void 0),_i([o.property()],Wi.prototype,"uiLocale",void 0),_i([e.jsonProperty({})],Wi.prototype,"labels",void 0),_i([e.jsonProperty([])],Wi.prototype,"displayedFilters",void 0),_i([e.jsonProperty([])],Wi.prototype,"presets",void 0),_i([o.property({type:String,reflect:!0})],Wi.prototype,"selectedPreset",void 0),_i([e.jsonProperty([])],Wi.prototype,"priors",void 0),_i([o.property()],Wi.prototype,"searchRequestSerializer",void 0),_i([o.state()],Wi.prototype,"searchFilters",void 0),_i([o.state()],Wi.prototype,"sizeCategory",void 0),_i([o.state()],Wi.prototype,"displayFacets",void 0),_i([o.state()],Wi.prototype,"mobileMenuOpen",void 0),_i([o.state()],Wi.prototype,"facets",void 0),_i([o.state()],Wi.prototype,"facetsInitialized",void 0),_i([o.query(".ft-search-bar--container")],Wi.prototype,"container",void 0),_i([o.query(".ft-search-bar--filters-opener")],Wi.prototype,"filtersOpener",void 0),_i([o.query(".ft-search-bar--floating-panel")],Wi.prototype,"floatingContainer",void 0),_i([o.query("ft-snap-scroll.ft-search-bar--filters-container")],Wi.prototype,"scrollingFiltersContainer",void 0),_i([o.query(".ft-search-bar--input")],Wi.prototype,"input",void 0),_i([o.state()],Wi.prototype,"query",void 0),_i([o.state()],Wi.prototype,"suggestions",void 0),_i([o.state()],Wi.prototype,"suggestionsLoaded",void 0),_i([o.state()],Wi.prototype,"recentSearches",void 0),_i([o.state()],Wi.prototype,"scrollToFacet",void 0),_i([o.query(".ft-search-bar--suggestion:first-child")],Wi.prototype,"firstSuggestion",void 0),_i([o.query(".ft-search-bar--suggestion:focus-within")],Wi.prototype,"focusedSuggestion",void 0),_i([o.query(".ft-search-bar--suggestion:last-child")],Wi.prototype,"lastSuggestion",void 0),_i([o.state()],Wi.prototype,"api",void 0),e.customElement("ft-search-bar")(Wi),t.DEFAULT_LABELS=Hi,t.FtSearchBar=Wi,t.FtSearchBarCssVariables=Ni,t.LaunchSearchEvent=Vi,t.SearchStateChangeEvent=Ki,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
|
2529
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){super.firstUpdated(t),this.initApi(),window.addEventListener("storage",(t=>{t.key===this.recentSearchesStorageKey&&this.initRecentSearches()}))}update(t){var i,o,s,r,n;if(t.has("labels")&&(this.labelResolver=new e.ParametrizedLabelResolver(Hi,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const e=t=>this.availableContentLocales.some((e=>e.lang===t));e(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&e(t.get("contentLocale"))?t.get("contentLocale"):null===(i=this.availableContentLocales[0])||void 0===i?void 0:i.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),t.has("presets")&&(null!==(o=this.presets)&&void 0!==o?o:[]).forEach((t=>t.filters.forEach((t=>t.values=t.values.map((t=>Qt(t))))))),t.has("selectedPreset")){const t=(null!==(s=this.presets)&&void 0!==s?s:[]).find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}t.has("contentLocale")&&null!=this.contentLocale&&(this.knownFacetLabels=new Map),["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(n=(null!==(r=this.presets)&&void 0!==r?r:[]).find((t=>this.compareRequests(t,this.request))))||void 0===n?void 0:n.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&(this.api=void 0,this.initApi(),this.availableContentLocalesInitialized=!1,this.facetsInitialized=!1),t.has("api")&&this.updateAvailableContentLocales(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Ki(this.request))}async updateAvailableContentLocales(){this.api&&(this.availableContentLocales=await this.api.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[])),this.availableContentLocalesInitialized=!0)}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout((()=>this.initApi()),100))}updateFacets(){this.api&&(this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t;const e=new Map;await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets.forEach((t=>{this.knownFacetLabels.set(t.key,t.label),e.set(t.key,t)})))).catch(qi)),this.facets=[];for(let t of this.facetsRequest)e.has(t.id)?this.facets.push(e.get(t.id)):this.knownFacetLabels.has(t.id)&&this.facets.push({key:t.id,label:this.knownFacetLabels.get(t.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1});this.facetsLoaded=!0,this.facetsInitialized=!0}))):(this.facets=[],this.facetsInitialized=!0))}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new Vi(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var t;this.recentSearches=JSON.parse(null!==(t=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==t?t:"[]")}saveRecentSearches(){const t=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,t),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:t,storageArea:window.localStorage,url:window.location.href}))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Jt(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>Jt(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,s,r;t.preventDefault(),t.stopPropagation();const n=null!==(r=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.input;null==n||n.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,s,r,n;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(r=null===(s=this.focusedSuggestion)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.firstSuggestion)||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}}Wi.elementDefinitions={"ft-accordion":ui,"ft-accordion-item":yi,"ft-button":Le,"ft-chip":Bi,"ft-filter":hi,"ft-filter-option":fi,"ft-icon":Se,"ft-ripple":pe,"ft-select":Mi,"ft-select-option":Fi,"ft-size-watcher":p,"ft-skeleton":Ai,"ft-snap-scroll":ti,"ft-tooltip":ue,"ft-typography":Yt},Wi.styles=[Kt,Ni,Ri,Zi,Ui],_i([o.property({type:Boolean})],Wi.prototype,"dense",void 0),_i([o.property()],Wi.prototype,"mode",void 0),_i([o.property({type:Boolean})],Wi.prototype,"forceMobileMenuOpen",void 0),_i([o.property({type:Boolean})],Wi.prototype,"forceMenuOpen",void 0),_i([o.property()],Wi.prototype,"baseUrl",void 0),_i([o.property()],Wi.prototype,"apiIntegrationIdentifier",void 0),_i([o.property()],Wi.prototype,"contentLocale",void 0),_i([o.state()],Wi.prototype,"availableContentLocales",void 0),_i([o.state()],Wi.prototype,"availableContentLocalesInitialized",void 0),_i([o.property()],Wi.prototype,"uiLocale",void 0),_i([e.jsonProperty({})],Wi.prototype,"labels",void 0),_i([e.jsonProperty([])],Wi.prototype,"displayedFilters",void 0),_i([e.jsonProperty([])],Wi.prototype,"presets",void 0),_i([o.property({type:String,reflect:!0})],Wi.prototype,"selectedPreset",void 0),_i([e.jsonProperty([])],Wi.prototype,"priors",void 0),_i([o.property()],Wi.prototype,"searchRequestSerializer",void 0),_i([o.state()],Wi.prototype,"searchFilters",void 0),_i([o.state()],Wi.prototype,"sizeCategory",void 0),_i([o.state()],Wi.prototype,"displayFacets",void 0),_i([o.state()],Wi.prototype,"mobileMenuOpen",void 0),_i([o.state()],Wi.prototype,"facets",void 0),_i([o.state()],Wi.prototype,"facetsInitialized",void 0),_i([o.query(".ft-search-bar--container")],Wi.prototype,"container",void 0),_i([o.query(".ft-search-bar--filters-opener")],Wi.prototype,"filtersOpener",void 0),_i([o.query(".ft-search-bar--floating-panel")],Wi.prototype,"floatingContainer",void 0),_i([o.query("ft-snap-scroll.ft-search-bar--filters-container")],Wi.prototype,"scrollingFiltersContainer",void 0),_i([o.query(".ft-search-bar--input")],Wi.prototype,"input",void 0),_i([o.state()],Wi.prototype,"query",void 0),_i([o.state()],Wi.prototype,"suggestions",void 0),_i([o.state()],Wi.prototype,"suggestionsLoaded",void 0),_i([o.state()],Wi.prototype,"recentSearches",void 0),_i([o.state()],Wi.prototype,"scrollToFacet",void 0),_i([o.query(".ft-search-bar--suggestion:first-child")],Wi.prototype,"firstSuggestion",void 0),_i([o.query(".ft-search-bar--suggestion:focus-within")],Wi.prototype,"focusedSuggestion",void 0),_i([o.query(".ft-search-bar--suggestion:last-child")],Wi.prototype,"lastSuggestion",void 0),_i([o.state()],Wi.prototype,"api",void 0),e.customElement("ft-search-bar")(Wi),t.DEFAULT_LABELS=Hi,t.FtSearchBar=Wi,t.FtSearchBarCssVariables=Ti,t.LaunchSearchEvent=Vi,t.SearchStateChangeEvent=Ki,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|