@fluid-topics/ft-search-selected-facets 1.1.9 → 1.1.10
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.
|
@@ -671,7 +671,7 @@ class Is extends ir{constructor(t){if(super(t),this.et=lt,t.type!==er)throw Erro
|
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
.ft-tooltip {
|
|
674
|
-
position:
|
|
674
|
+
position: fixed;
|
|
675
675
|
box-sizing: border-box;
|
|
676
676
|
overflow: hidden;
|
|
677
677
|
width: max-content;
|
|
@@ -689,7 +689,7 @@ class Is extends ir{constructor(t){if(super(t),this.et=lt,t.type!==er)throw Erro
|
|
|
689
689
|
position: relative;
|
|
690
690
|
word-break: break-word;
|
|
691
691
|
}
|
|
692
|
-
`,ia=["start","end"],ra=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+ia[0],e+"-"+ia[1])),[]),na=Math.min,sa=Math.max,aa=Math.round,la=t=>({x:t,y:t}),ca={left:"right",right:"left",bottom:"top",top:"bottom"},ha={start:"end",end:"start"};function fa(t,e,o){return sa(t,na(e,o))}function pa(t,e){return"function"==typeof t?t(e):t}function ua(t){return t.split("-")[0]}function da(t){return t.split("-")[1]}function ya(t){return"x"===t?"y":"x"}function ga(t){return"y"===t?"height":"width"}function ba(t){return["top","bottom"].includes(ua(t))?"y":"x"}function va(t){return ya(ba(t))}function ma(t){return t.replace(/left|right|bottom|top/g,(t=>ca[t]))}function xa(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Oa(t,e,o){let{reference:i,floating:r}=t;const n=ba(e),s=va(e),a=ga(s),l=ua(e),c="y"===n,h=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,p=i[a]/2-r[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-r.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:f};break;case"left":u={x:i.x-r.width,y:f};break;default:u={x:i.x,y:i.y}}switch(da(e)){case"start":u[s]-=p*(o&&c?-1:1);break;case"end":u[s]+=p*(o&&c?-1:1)}return u}async function wa(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:u=0}=pa(e,t),d=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),y=a[p?"floating"===f?"reference":"floating":f],g=xa(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(y)))||o?y:y.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),b="floating"===f?{...s.floating,x:i,y:r}:s.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),m=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},x=xa(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-x.top+d.top)/m.y,bottom:(x.bottom-g.bottom+d.bottom)/m.y,left:(g.left-x.left+d.left)/m.x,right:(x.right-g.right+d.right)/m.x}}function Sa(t,e,o){return(t?[...o.filter((e=>da(e)===t)),...o.filter((e=>da(e)!==t))]:o.filter((t=>ua(t)===t))).filter((o=>!t||(da(o)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>ha[t]))}(o)!==o)))}const Na=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,i,r;const{rects:n,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:h=!1,alignment:f,allowedPlacements:p=ra,autoAlignment:u=!0,...d}=pa(t,e),y=void 0!==f||p===ra?Sa(f||null,u,p):p,g=await wa(e,d),b=(null==(o=s.autoPlacement)?void 0:o.index)||0,v=y[b];if(null==v)return{};const m=function(t,e,o){void 0===o&&(o=!1);const i=da(t),r=va(t),n=ga(r);let s="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=ma(s)),[s,ma(s)]}(v,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(a!==v)return{reset:{placement:y[0]}};const x=[g[ua(v)],g[m[0]],g[m[1]]],O=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:v,overflows:x}],w=y[b+1];if(w)return{data:{index:b+1,overflows:O},reset:{placement:w}};const S=O.map((t=>{const e=da(t.placement);return[t.placement,e&&h?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),N=S.filter((t=>t[2].slice(0,da(t[0])?2:3).every((t=>t<=0)))),$=(null==(r=N[0])?void 0:r[0])||S[0][0];return $!==a?{data:{index:b+1,overflows:O},reset:{placement:$}}:{}}}};function $a(t){return ka(t)?(t.nodeName||"").toLowerCase():"#document"}function Ca(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Ea(t){var e;return null==(e=(ka(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function ka(t){return t instanceof Node||t instanceof Ca(t).Node}function Ra(t){return t instanceof Element||t instanceof Ca(t).Element}function Ia(t){return t instanceof HTMLElement||t instanceof Ca(t).HTMLElement}function Ua(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof Ca(t).ShadowRoot)}function La(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=za(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function Aa(t){return["table","td","th"].includes($a(t))}function Wa(t){const e=ja(),o=za(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function ja(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Fa(t){return["html","body","#document"].includes($a(t))}function za(t){return Ca(t).getComputedStyle(t)}function Da(t){return Ra(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ba(t){if("html"===$a(t))return t;const e=t.assignedSlot||t.parentNode||Ua(t)&&t.host||Ea(t);return Ua(e)?e.host:e}function Pa(t){const e=Ba(t);return Fa(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ia(e)&&La(e)?e:Pa(e)}function Ma(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=Pa(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),s=Ca(r);return n?e.concat(s,s.visualViewport||[],La(r)?r:[],s.frameElement&&o?Ma(s.frameElement):[]):e.concat(r,Ma(r,[],o))}function Ta(t){const e=za(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Ia(t),n=r?t.offsetWidth:o,s=r?t.offsetHeight:i,a=aa(o)!==n||aa(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function Ka(t){return Ra(t)?t:t.contextElement}function Za(t){const e=Ka(t);if(!Ia(e))return la(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=Ta(e);let s=(n?aa(o.width):o.width)/i,a=(n?aa(o.height):o.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const _a=la(0);function Ha(t){const e=Ca(t);return ja()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:_a}function Ga(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=Ka(t);let s=la(1);e&&(i?Ra(i)&&(s=Za(i)):s=Za(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==Ca(t))&&e}(n,o,i)?Ha(n):la(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,h=r.width/s.x,f=r.height/s.y;if(n){const t=Ca(n),e=i&&Ra(i)?Ca(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Za(o),e=o.getBoundingClientRect(),i=za(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,f*=t.y,l+=r,c+=n,o=Ca(o).frameElement}}return xa({width:h,height:f,x:l,y:c})}function Va(t){return Ga(Ea(t)).left+Da(t).scrollLeft}function qa(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=Ca(t),i=Ea(t),r=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=ja();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=Ea(t),o=Da(t),i=t.ownerDocument.body,r=sa(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=sa(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Va(t);const a=-o.scrollTop;return"rtl"===za(i).direction&&(s+=sa(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:s,y:a}}(Ea(t));else if(Ra(e))i=function(t,e){const o=Ga(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=Ia(t)?Za(t):la(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}(e,o);else{const o=Ha(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return xa(i)}function Ya(t,e){const o=Ba(t);return!(o===e||!Ra(o)||Fa(o))&&("fixed"===za(o).position||Ya(o,e))}function Xa(t,e,o){const i=Ia(e),r=Ea(e),n="fixed"===o,s=Ga(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=la(0);if(i||!i&&!n)if(("body"!==$a(e)||La(r))&&(a=Da(e)),i){const t=Ga(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Va(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ja(t,e){return Ia(t)&&"fixed"!==za(t).position?e?e(t):t.offsetParent:null}function Qa(t,e){const o=Ca(t);if(!Ia(t))return o;let i=Ja(t,e);for(;i&&Aa(i)&&"static"===za(i).position;)i=Ja(i,e);return i&&("html"===$a(i)||"body"===$a(i)&&"static"===za(i).position&&!Wa(i))?o:i||function(t){let e=Ba(t);for(;Ia(e)&&!Fa(e);){if(Wa(e))return e;e=Ba(e)}return null}(t)||o}const tl={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=Ia(o),n=Ea(o);if(o===n)return e;let s={scrollLeft:0,scrollTop:0},a=la(1);const l=la(0);if((r||!r&&"fixed"!==i)&&(("body"!==$a(o)||La(n))&&(s=Da(o)),Ia(o))){const t=Ga(o);a=Za(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:Ea,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n="clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Ma(t,[],!1).filter((t=>Ra(t)&&"body"!==$a(t))),r=null;const n="fixed"===za(t).position;let s=n?Ba(t):t;for(;Ra(s)&&!Fa(s);){const e=za(s),o=Wa(s);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||La(s)&&!o&&Ya(t,s))?i=i.filter((t=>t!==s)):r=e,s=Ba(s)}return e.set(t,i),i}(e,this._c):[].concat(o),s=[...n,i],a=s[0],l=s.reduce(((t,o)=>{const i=qa(e,o,r);return t.top=sa(i.top,t.top),t.right=na(i.right,t.right),t.bottom=na(i.bottom,t.bottom),t.left=sa(i.left,t.left),t}),qa(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Qa,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||Qa,n=this.getDimensions;return{reference:Xa(e,await r(o),i),floating:{x:0,y:0,...await n(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Ta(t)},getScale:Za,isElement:Ra,isRTL:function(t){return"rtl"===za(t).direction}},el=(t,e,o)=>{const i=new Map,r={platform:tl,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:f}=Oa(c,i,l),p=i,u={},d=0;for(let o=0;o<a.length;o++){const{name:n,fn:y}=a[o],{x:g,y:b,data:v,reset:m}=await y({x:h,y:f,initialPlacement:i,placement:p,strategy:r,middlewareData:u,rects:c,platform:s,elements:{reference:t,floating:e}});h=null!=g?g:h,f=null!=b?b:f,u={...u,[n]:{...u[n],...v}},m&&d<=50&&(d++,"object"==typeof m&&(m.placement&&(p=m.placement),m.rects&&(c=!0===m.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):m.rects),({x:h,y:f}=Oa(c,p,l))),o=-1)}return{x:h,y:f,placement:p,strategy:r,middlewareData:u}})(t,e,{...r,platform:n})};var ol=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class il extends _e{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new W,this.revealDebouncer=new W}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return pe`
|
|
692
|
+
`,ia=["start","end"],ra=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+ia[0],e+"-"+ia[1])),[]),na=Math.min,sa=Math.max,aa=Math.round,la=t=>({x:t,y:t}),ca={left:"right",right:"left",bottom:"top",top:"bottom"},ha={start:"end",end:"start"};function fa(t,e,o){return sa(t,na(e,o))}function pa(t,e){return"function"==typeof t?t(e):t}function ua(t){return t.split("-")[0]}function da(t){return t.split("-")[1]}function ya(t){return"x"===t?"y":"x"}function ga(t){return"y"===t?"height":"width"}function ba(t){return["top","bottom"].includes(ua(t))?"y":"x"}function va(t){return ya(ba(t))}function ma(t){return t.replace(/left|right|bottom|top/g,(t=>ca[t]))}function xa(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Oa(t,e,o){let{reference:i,floating:r}=t;const n=ba(e),s=va(e),a=ga(s),l=ua(e),c="y"===n,h=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,p=i[a]/2-r[a]/2;let u;switch(l){case"top":u={x:h,y:i.y-r.height};break;case"bottom":u={x:h,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:f};break;case"left":u={x:i.x-r.width,y:f};break;default:u={x:i.x,y:i.y}}switch(da(e)){case"start":u[s]-=p*(o&&c?-1:1);break;case"end":u[s]+=p*(o&&c?-1:1)}return u}async function wa(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:u=0}=pa(e,t),d=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),y=a[p?"floating"===f?"reference":"floating":f],g=xa(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(y)))||o?y:y.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),b="floating"===f?{...s.floating,x:i,y:r}:s.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(a.floating)),m=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},x=xa(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-x.top+d.top)/m.y,bottom:(x.bottom-g.bottom+d.bottom)/m.y,left:(g.left-x.left+d.left)/m.x,right:(x.right-g.right+d.right)/m.x}}function Sa(t,e,o){return(t?[...o.filter((e=>da(e)===t)),...o.filter((e=>da(e)!==t))]:o.filter((t=>ua(t)===t))).filter((o=>!t||(da(o)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>ha[t]))}(o)!==o)))}const Na=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,i,r;const{rects:n,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:h=!1,alignment:f,allowedPlacements:p=ra,autoAlignment:u=!0,...d}=pa(t,e),y=void 0!==f||p===ra?Sa(f||null,u,p):p,g=await wa(e,d),b=(null==(o=s.autoPlacement)?void 0:o.index)||0,v=y[b];if(null==v)return{};const m=function(t,e,o){void 0===o&&(o=!1);const i=da(t),r=va(t),n=ga(r);let s="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=ma(s)),[s,ma(s)]}(v,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(a!==v)return{reset:{placement:y[0]}};const x=[g[ua(v)],g[m[0]],g[m[1]]],O=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:v,overflows:x}],w=y[b+1];if(w)return{data:{index:b+1,overflows:O},reset:{placement:w}};const S=O.map((t=>{const e=da(t.placement);return[t.placement,e&&h?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),N=S.filter((t=>t[2].slice(0,da(t[0])?2:3).every((t=>t<=0)))),$=(null==(r=N[0])?void 0:r[0])||S[0][0];return $!==a?{data:{index:b+1,overflows:O},reset:{placement:$}}:{}}}};function $a(t){return ka(t)?(t.nodeName||"").toLowerCase():"#document"}function Ca(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Ea(t){var e;return null==(e=(ka(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function ka(t){return t instanceof Node||t instanceof Ca(t).Node}function Ra(t){return t instanceof Element||t instanceof Ca(t).Element}function Ia(t){return t instanceof HTMLElement||t instanceof Ca(t).HTMLElement}function Ua(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof Ca(t).ShadowRoot)}function La(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=za(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function Aa(t){return["table","td","th"].includes($a(t))}function Wa(t){const e=ja(),o=za(t);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!e&&!!o.backdropFilter&&"none"!==o.backdropFilter||!e&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((t=>(o.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(o.contain||"").includes(t)))}function ja(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Fa(t){return["html","body","#document"].includes($a(t))}function za(t){return Ca(t).getComputedStyle(t)}function Da(t){return Ra(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ba(t){if("html"===$a(t))return t;const e=t.assignedSlot||t.parentNode||Ua(t)&&t.host||Ea(t);return Ua(e)?e.host:e}function Pa(t){const e=Ba(t);return Fa(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ia(e)&&La(e)?e:Pa(e)}function Ma(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=Pa(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),s=Ca(r);return n?e.concat(s,s.visualViewport||[],La(r)?r:[],s.frameElement&&o?Ma(s.frameElement):[]):e.concat(r,Ma(r,[],o))}function Ta(t){const e=za(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Ia(t),n=r?t.offsetWidth:o,s=r?t.offsetHeight:i,a=aa(o)!==n||aa(i)!==s;return a&&(o=n,i=s),{width:o,height:i,$:a}}function Ka(t){return Ra(t)?t:t.contextElement}function Za(t){const e=Ka(t);if(!Ia(e))return la(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=Ta(e);let s=(n?aa(o.width):o.width)/i,a=(n?aa(o.height):o.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const _a=la(0);function Ha(t){const e=Ca(t);return ja()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:_a}function Ga(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=Ka(t);let s=la(1);e&&(i?Ra(i)&&(s=Za(i)):s=Za(t));const a=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==Ca(t))&&e}(n,o,i)?Ha(n):la(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,h=r.width/s.x,f=r.height/s.y;if(n){const t=Ca(n),e=i&&Ra(i)?Ca(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Za(o),e=o.getBoundingClientRect(),i=za(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,n=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,f*=t.y,l+=r,c+=n,o=Ca(o).frameElement}}return xa({width:h,height:f,x:l,y:c})}function Va(t){return Ga(Ea(t)).left+Da(t).scrollLeft}function qa(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=Ca(t),i=Ea(t),r=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){n=r.width,s=r.height;const t=ja();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:n,height:s,x:a,y:l}}(t,o);else if("document"===e)i=function(t){const e=Ea(t),o=Da(t),i=t.ownerDocument.body,r=sa(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=sa(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Va(t);const a=-o.scrollTop;return"rtl"===za(i).direction&&(s+=sa(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:s,y:a}}(Ea(t));else if(Ra(e))i=function(t,e){const o=Ga(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=Ia(t)?Za(t):la(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:i*n.y}}(e,o);else{const o=Ha(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return xa(i)}function Ya(t,e){const o=Ba(t);return!(o===e||!Ra(o)||Fa(o))&&("fixed"===za(o).position||Ya(o,e))}function Xa(t,e,o){const i=Ia(e),r=Ea(e),n="fixed"===o,s=Ga(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=la(0);if(i||!i&&!n)if(("body"!==$a(e)||La(r))&&(a=Da(e)),i){const t=Ga(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Va(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ja(t,e){return Ia(t)&&"fixed"!==za(t).position?e?e(t):t.offsetParent:null}function Qa(t,e){const o=Ca(t);if(!Ia(t))return o;let i=Ja(t,e);for(;i&&Aa(i)&&"static"===za(i).position;)i=Ja(i,e);return i&&("html"===$a(i)||"body"===$a(i)&&"static"===za(i).position&&!Wa(i))?o:i||function(t){let e=Ba(t);for(;Ia(e)&&!Fa(e);){if(Wa(e))return e;e=Ba(e)}return null}(t)||o}const tl={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=Ia(o),n=Ea(o);if(o===n)return e;let s={scrollLeft:0,scrollTop:0},a=la(1);const l=la(0);if((r||!r&&"fixed"!==i)&&(("body"!==$a(o)||La(n))&&(s=Da(o)),Ia(o))){const t=Ga(o);a=Za(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}},getDocumentElement:Ea,getClippingRect:function(t){let{element:e,boundary:o,rootBoundary:i,strategy:r}=t;const n="clippingAncestors"===o?function(t,e){const o=e.get(t);if(o)return o;let i=Ma(t,[],!1).filter((t=>Ra(t)&&"body"!==$a(t))),r=null;const n="fixed"===za(t).position;let s=n?Ba(t):t;for(;Ra(s)&&!Fa(s);){const e=za(s),o=Wa(s);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||La(s)&&!o&&Ya(t,s))?i=i.filter((t=>t!==s)):r=e,s=Ba(s)}return e.set(t,i),i}(e,this._c):[].concat(o),s=[...n,i],a=s[0],l=s.reduce(((t,o)=>{const i=qa(e,o,r);return t.top=sa(i.top,t.top),t.right=na(i.right,t.right),t.bottom=na(i.bottom,t.bottom),t.left=sa(i.left,t.left),t}),qa(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Qa,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||Qa,n=this.getDimensions;return{reference:Xa(e,await r(o),i),floating:{x:0,y:0,...await n(o)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Ta(t)},getScale:Za,isElement:Ra,isRTL:function(t){return"rtl"===za(t).direction}},el=(t,e,o)=>{const i=new Map,r={platform:tl,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:f}=Oa(c,i,l),p=i,u={},d=0;for(let o=0;o<a.length;o++){const{name:n,fn:y}=a[o],{x:g,y:b,data:v,reset:m}=await y({x:h,y:f,initialPlacement:i,placement:p,strategy:r,middlewareData:u,rects:c,platform:s,elements:{reference:t,floating:e}});h=null!=g?g:h,f=null!=b?b:f,u={...u,[n]:{...u[n],...v}},m&&d<=50&&(d++,"object"==typeof m&&(m.placement&&(p=m.placement),m.rects&&(c=!0===m.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):m.rects),({x:h,y:f}=Oa(c,p,l))),o=-1)}return{x:h,y:f,placement:p,strategy:r,middlewareData:u}})(t,e,{...r,platform:n})};function ol(t){return function(t){for(let e=t;e;e=il(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=il(t);e;e=il(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return e;if("BODY"===e.tagName)return e}}return null}(t)}function il(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var rl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class nl extends _e{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new W,this.revealDebouncer=new W}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return pe`
|
|
693
693
|
<div part="container"
|
|
694
694
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
695
695
|
@mouseenter=${this.onHover}
|
|
@@ -697,7 +697,7 @@ class Is extends ir{constructor(t){if(super(t),this.et=lt,t.type!==er)throw Erro
|
|
|
697
697
|
@focusin=${this.onHover}
|
|
698
698
|
@focusout=${this.onOut}
|
|
699
699
|
@touchstart=${this.onTouch}>
|
|
700
|
-
<slot></slot>
|
|
700
|
+
<slot part="slot"></slot>
|
|
701
701
|
<div part="tooltip" role="tooltip" inert
|
|
702
702
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
703
703
|
?hidden=${!this.visible}>
|
|
@@ -707,20 +707,20 @@ class Is extends ir{constructor(t){if(super(t),this.et=lt,t.type!==er)throw Erro
|
|
|
707
707
|
</div>
|
|
708
708
|
</div>
|
|
709
709
|
</div>
|
|
710
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",el(this.slottedElement,this.tooltip,{middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=pa(t,e),c={x:o,y:i},h=await wa(e,l),f=ba(ua(r)),p=ya(f);let u=c[p],d=c[f];if(n){const t="y"===p?"bottom":"right";u=fa(u+h["y"===p?"top":"left"],u,u-h[t])}if(s){const t="y"===f?"bottom":"right";d=fa(d+h["y"===f?"top":"left"],d,d-h[t])}const y=a.fn({...e,[p]:u,[f]:d});return{...y,data:{x:y.x-o,y:y.y-i}}}}),Na({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}
|
|
710
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",el(this.slottedElement,this.tooltip,{platform:{...tl,getOffsetParent:t=>tl.getOffsetParent(t,ol)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=pa(t,e),c={x:o,y:i},h=await wa(e,l),f=ba(ua(r)),p=ya(f);let u=c[p],d=c[f];if(n){const t="y"===p?"bottom":"right";u=fa(u+h["y"===p?"top":"left"],u,u-h[t])}if(s){const t="y"===f?"bottom":"right";d=fa(d+h["y"===f?"top":"left"],d,d-h[t])}const y=a.fn({...e,[p]:u,[f]:d});return{...y,data:{x:y.x-o,y:y.y-i}}}}),Na({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}nl.elementDefinitions={"ft-typography":Rs},nl.styles=oa,rl([k()],nl.prototype,"text",void 0),rl([k({type:Boolean})],nl.prototype,"manual",void 0),rl([k({type:Boolean})],nl.prototype,"inline",void 0),rl([k({type:Number})],nl.prototype,"delay",void 0),rl([k()],nl.prototype,"position",void 0),rl([
|
|
711
711
|
/**
|
|
712
712
|
* @license
|
|
713
713
|
* Copyright 2017 Google LLC
|
|
714
714
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
715
715
|
*/
|
|
716
|
-
function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return U(0,0,{get(){const e=this.renderRoot?.querySelector(r);return e?.assignedNodes(t)??[]}})}}()],
|
|
716
|
+
function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return U(0,0,{get(){const e=this.renderRoot?.querySelector(r);return e?.assignedNodes(t)??[]}})}}()],nl.prototype,"slotNodes",void 0),rl([L(".ft-tooltip--container")],nl.prototype,"container",void 0),rl([L(".ft-tooltip")],nl.prototype,"tooltip",void 0),rl([L(".ft-tooltip--content")],nl.prototype,"tooltipContent",void 0),rl([R()],nl.prototype,"visible",void 0),rl([I({passive:!0})],nl.prototype,"onTouch",null),rl([I({passive:!0})],nl.prototype,"onHover",null),rl([I({passive:!0})],nl.prototype,"onOut",null),D("ft-tooltip")(nl);class sl extends _e{render(){return pe`
|
|
717
717
|
<div class="ft-loader">
|
|
718
718
|
<div></div>
|
|
719
719
|
<div></div>
|
|
720
720
|
<div></div>
|
|
721
721
|
<div></div>
|
|
722
722
|
</div>
|
|
723
|
-
`}}
|
|
723
|
+
`}}sl.styles=Ps,D("ft-loader")(sl);var al=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class ll extends(function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[qi].form}constructor(...t){super(t),this[qi]=this.attachInternals(),this[qi].role=e}setFormValue(t){this[qi].setFormValue(t)}}}(_e,"button")){constructor(){super(...arguments),this.role="button",this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{var e;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit())}}render(){return this.addTooltipIfNeeded(pe`
|
|
724
724
|
<button part="button"
|
|
725
725
|
class="${Jr(this.buttonClasses)}"
|
|
726
726
|
aria-label="${this.getLabel()}"
|
|
@@ -743,7 +743,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
743
743
|
</ft-tooltip>
|
|
744
744
|
`:t}resolveIcon(){return this.loading?pe`
|
|
745
745
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?pe`
|
|
746
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:de}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}}
|
|
746
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:de}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}}ll.elementDefinitions={"ft-ripple":hn,"ft-tooltip":nl,"ft-typography":Rs,"ft-icon":Ds,"ft-loader":sl},al([k({type:String,reflect:!0})],ll.prototype,"role",void 0),al([k()],ll.prototype,"type",void 0),al([k({type:Boolean})],ll.prototype,"disabled",void 0),al([k()],ll.prototype,"label",void 0),al([k()],ll.prototype,"icon",void 0),al([k()],ll.prototype,"iconVariant",void 0),al([k({type:Boolean})],ll.prototype,"trailingIcon",void 0),al([k({type:Boolean})],ll.prototype,"loading",void 0),al([k()],ll.prototype,"tooltipPosition",void 0),al([k({type:Boolean})],ll.prototype,"hideTooltip",void 0),al([k({type:Boolean})],ll.prototype,"forceTooltip",void 0),al([L(".ft-button")],ll.prototype,"button",void 0),al([L(".ft-button--label slot")],ll.prototype,"slottedContent",void 0);var cl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class hl extends ll{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}hl.styles=[Ve,qs],cl([k({type:Boolean})],hl.prototype,"primary",void 0),cl([k({type:Boolean})],hl.prototype,"outlined",void 0),cl([k({type:Boolean})],hl.prototype,"dense",void 0),cl([k({type:Boolean})],hl.prototype,"round",void 0);const fl=[It`
|
|
747
747
|
:host {
|
|
748
748
|
display: inline-block;
|
|
749
749
|
max-width: 100%;
|
|
@@ -961,7 +961,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
961
961
|
width: ${je.smallIconOnlyWidth};
|
|
962
962
|
padding: unset;
|
|
963
963
|
}
|
|
964
|
-
`,Ge];var
|
|
964
|
+
`,Ge];var pl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class ul extends ll{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?gn.caption1medium:gn.body2medium}}ul.styles=[Ve,fl],pl([k({type:Boolean})],ul.prototype,"primary",void 0),pl([k({type:Boolean})],ul.prototype,"secondary",void 0),pl([k({type:Boolean})],ul.prototype,"tertiary",void 0),pl([k({type:Boolean})],ul.prototype,"neutral",void 0),pl([k({type:Boolean})],ul.prototype,"small",void 0),D("ft-button")(hl),D("ftds-button")(ul);const dl=Ie.extend("--ft-chip-color","",Fe.colorOnSurface),yl={backgroundColor:Ie.extend("--ft-chip-background-color","",Fe.colorSurface),color:dl,fontSize:Ie.extend("--ft-chip-font-size","",Yn.fontSize),iconSize:Ie.create("--ft-chip-icon-size","","SIZE","18px"),rippleColor:Ie.extend("--ft-chip-ripple-color","",dl),horizontalPadding:Ie.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:Ie.create("--ft-chip-vertical-padding","","SIZE","6px"),colorOutline:Ie.external(Fe.colorOutline,"Design system"),opacityDisabled:Ie.external(Fe.colorOpacityDisabled,"Design system")},gl=Ie.extend("--ft-chip-highlighted-color","",Ie.extend("--ft-chip-color","",Fe.colorOnPrimary)),bl={backgroundColor:Ie.extend("--ft-chip-highlighted-background-color","",Ie.extend("--ft-chip-background-color","",Fe.colorPrimary)),color:gl,rippleColor:Ie.extend("--ft-chip-highlighted-ripple-color","",gl)},vl=Ie.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),ml=Ie.create("--ft-chip-dense-vertical-padding","","SIZE","4px"),xl=[Ge,It`
|
|
965
965
|
:host {
|
|
966
966
|
display: inline-block;
|
|
967
967
|
max-width: 100%;
|
|
@@ -977,20 +977,20 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
977
977
|
box-sizing: border-box;
|
|
978
978
|
pointer-events: auto;
|
|
979
979
|
|
|
980
|
-
--ft-chip-internal-font-size: ${
|
|
980
|
+
--ft-chip-internal-font-size: ${yl.fontSize};
|
|
981
981
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
982
|
-
${Ue(Ws.size,
|
|
983
|
-
--ft-chip-internal-vertical-padding: ${
|
|
984
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
982
|
+
${Ue(Ws.size,yl.iconSize)};
|
|
983
|
+
--ft-chip-internal-vertical-padding: ${yl.verticalPadding};
|
|
984
|
+
--ft-chip-internal-horizontal-padding: ${yl.horizontalPadding};
|
|
985
985
|
--ft-chip-internal-icon-padding: 3px;
|
|
986
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
986
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${yl.iconSize});
|
|
987
987
|
|
|
988
|
-
border: 1px solid ${
|
|
989
|
-
color: ${
|
|
990
|
-
${Ue(tn.color,
|
|
988
|
+
border: 1px solid ${yl.colorOutline};
|
|
989
|
+
color: ${yl.color};
|
|
990
|
+
${Ue(tn.color,yl.rippleColor)};
|
|
991
991
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
992
992
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
993
|
-
background-color: ${
|
|
993
|
+
background-color: ${yl.backgroundColor};
|
|
994
994
|
line-height: var(--ft-chip-internal-content-height);
|
|
995
995
|
}
|
|
996
996
|
|
|
@@ -1000,8 +1000,8 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1000
1000
|
|
|
1001
1001
|
.ft-chip--dense {
|
|
1002
1002
|
--ft-chip-internal-icon-padding: 3px;
|
|
1003
|
-
--ft-chip-internal-vertical-padding: ${
|
|
1004
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
1003
|
+
--ft-chip-internal-vertical-padding: ${ml};
|
|
1004
|
+
--ft-chip-internal-horizontal-padding: ${vl};
|
|
1005
1005
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
@@ -1013,15 +1013,15 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1013
1013
|
cursor: default;
|
|
1014
1014
|
pointer-events: none;
|
|
1015
1015
|
filter: grayscale(1);
|
|
1016
|
-
opacity: ${
|
|
1016
|
+
opacity: ${yl.opacityDisabled};
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
.ft-chip--highlighted {
|
|
1020
1020
|
border: none;
|
|
1021
1021
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
1022
|
-
background-color: ${
|
|
1023
|
-
${Ue(tn.color,
|
|
1024
|
-
color: ${
|
|
1022
|
+
background-color: ${bl.backgroundColor};
|
|
1023
|
+
${Ue(tn.color,bl.rippleColor)};
|
|
1024
|
+
color: ${bl.color};
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
1027
|
.ft-chip--clickable {
|
|
@@ -1051,7 +1051,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
1053
|
.ft-chip--icon-button {
|
|
1054
|
-
${Ue(Ts.iconSize,
|
|
1054
|
+
${Ue(Ts.iconSize,yl.iconSize)};
|
|
1055
1055
|
${Ue(Ts.horizontalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
1056
1056
|
${Ue(Ts.verticalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
1057
1057
|
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
@@ -1098,7 +1098,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1098
1098
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
|
|
1099
1099
|
order: -1;
|
|
1100
1100
|
}
|
|
1101
|
-
`];var
|
|
1101
|
+
`];var Ol=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class wl extends CustomEvent{constructor(){super("icon-click")}}class Sl extends _e{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.iconLabel="",this.icon=void 0,this.trailingIcon=!1}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":Qi};return pe`
|
|
1102
1102
|
<div class="${Jr(t)}"
|
|
1103
1103
|
aria-label="${this.getLabel()}"
|
|
1104
1104
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -1121,23 +1121,23 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1121
1121
|
<div class="ft-chip--icon-container ft-no-text-select">
|
|
1122
1122
|
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}"></ft-icon>
|
|
1123
1123
|
</div>
|
|
1124
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1125
|
-
`;var
|
|
1124
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new wl))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new wl))}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?"close":void 0)}}Sl.elementDefinitions={"ft-ripple":hn,"ft-typography":Rs,"ft-icon":Ds,"ft-button":hl},Sl.styles=xl,Ol([k({type:Boolean})],Sl.prototype,"highlighted",void 0),Ol([k({type:Boolean})],Sl.prototype,"removable",void 0),Ol([k({type:Boolean})],Sl.prototype,"disabled",void 0),Ol([k({type:Boolean})],Sl.prototype,"clickable",void 0),Ol([k({type:Boolean})],Sl.prototype,"iconClickable",void 0),Ol([k({type:Boolean})],Sl.prototype,"dense",void 0),Ol([k({type:Boolean})],Sl.prototype,"multiLine",void 0),Ol([k()],Sl.prototype,"label",void 0),Ol([k()],Sl.prototype,"iconLabel",void 0),Ol([k()],Sl.prototype,"icon",void 0),Ol([k()],Sl.prototype,"iconVariant",void 0),Ol([k({type:Boolean})],Sl.prototype,"trailingIcon",void 0),Ol([L("ft-typography slot")],Sl.prototype,"slottedContent",void 0),D("ft-chip")(Sl);const Nl=It`
|
|
1125
|
+
`;var $l=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};const Cl=Symbol("i18nProperties"),El=Symbol("i18nUnsubs");function kl(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Fr:jr}i18n(t,e,...o){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[Cl])||void 0===e||e.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[Cl])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Cl]&&new Set([...this[Cl].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[El].has(t)||this[El].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[El].forEach((t=>t())),this[El].clear()}}return e=El,$l([k({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Rl extends(kl(_e)){}class Il extends(kl(no)){}var Ul=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Ll extends Il{constructor(){super(),this.editorMode=!1,this.addStore(Ir)}render(){return this.key&&this.context?pe`
|
|
1126
1126
|
<span class="ft-i18n">
|
|
1127
1127
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1128
1128
|
</span>
|
|
1129
|
-
`:this.editorMode?"Select a context and a label key.":de}update(t){var e;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}
|
|
1130
|
-
`;var
|
|
1129
|
+
`:this.editorMode?"Select a context and a label key.":de}update(t){var e;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}Ll.elementDefinitions={},Ll.styles=Nl,Ul([Ye()],Ll.prototype,"editorMode",void 0),Ul([k()],Ll.prototype,"context",void 0),Ul([k()],Ll.prototype,"key",void 0),Ul([B([])],Ll.prototype,"args",void 0),Ul([k()],Ll.prototype,"defaultMessage",void 0);class Al{static build(t){return new Al(t)}static fromGwt(t){return new Al(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>jr.resolveMessage(this.name,e,...t)})}}D("ft-i18n")(Ll);const Wl=It`
|
|
1130
|
+
`;var jl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Fl extends CustomEvent{constructor(t){super("ft-search-load-error",{detail:t})}}class zl extends CustomEvent{constructor(t){super("ft-search-request-change",{detail:t})}}class Dl extends CustomEvent{constructor(t,e,o){super("ft-search-results-change",{detail:{request:t,paging:e,spellcheck:o}})}}class Bl extends no{get stateManager(){return null==this._stateManager&&(this._stateManager=Gr.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"search")),this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.filters=[],this.sort=[],this.addStore(Ir)}render(){return pe`
|
|
1131
1131
|
<slot @register-ft-search-component=${this.registerComponent}></slot>
|
|
1132
|
-
`}update(t){super.update(t),t.has("query")&&void 0!==this.query&&this.stateManager.setQuery(this.query),t.has("contentLocale")&&void 0!==this.contentLocale&&this.stateManager.setContentLocale(this.contentLocale),t.has("session")&&this.session&&this.stateManager.initService(),t.has("filters")&&void 0!==this.filters&&this.stateManager.setFilters(this.filters),t.has("sort")&&void 0!==this.sort&&this.stateManager.setSort(this.sort),t.has("pageSize")&&void 0!==this.pageSize&&this.stateManager.setPageSize(this.pageSize),t.has("searchInDocumentTitlesOnly")&&void 0!==this.searchInDocumentTitlesOnly&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),t.has("scope")&&void 0!==this.scope&&this.stateManager.setScope(this.scope),t.has("ignoreEmptyQuery")&&void 0!==this.ignoreEmptyQuery&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery)}connectedCallback(){super.connectedCallback(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("request")&&this.request&&this.dispatchEvent(new
|
|
1133
|
-
`,
|
|
1132
|
+
`}update(t){super.update(t),t.has("query")&&void 0!==this.query&&this.stateManager.setQuery(this.query),t.has("contentLocale")&&void 0!==this.contentLocale&&this.stateManager.setContentLocale(this.contentLocale),t.has("session")&&this.session&&this.stateManager.initService(),t.has("filters")&&void 0!==this.filters&&this.stateManager.setFilters(this.filters),t.has("sort")&&void 0!==this.sort&&this.stateManager.setSort(this.sort),t.has("pageSize")&&void 0!==this.pageSize&&this.stateManager.setPageSize(this.pageSize),t.has("searchInDocumentTitlesOnly")&&void 0!==this.searchInDocumentTitlesOnly&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),t.has("scope")&&void 0!==this.scope&&this.stateManager.setScope(this.scope),t.has("ignoreEmptyQuery")&&void 0!==this.ignoreEmptyQuery&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery)}connectedCallback(){super.connectedCallback(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("request")&&this.request&&this.dispatchEvent(new zl(this.request)),t.has("paging")&&void 0!==this.paging&&this.dispatchEvent(new Dl(this.request,this.paging,this.autocorrect))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setSearchStateManager(this.stateManager)}handleLoadError(t){this.dispatchEvent(new Fl(t))}reloadSavedSearches(){Kr.clearMySearches()}clear(){this.stateManager.clear()}}Bl.elementDefinitions={},Bl.styles=Wl,jl([k()],Bl.prototype,"query",void 0),jl([k()],Bl.prototype,"contentLocale",void 0),jl([k({type:Number})],Bl.prototype,"pageSize",void 0),jl([k({type:Boolean})],Bl.prototype,"searchInDocumentTitlesOnly",void 0),jl([k()],Bl.prototype,"scope",void 0),jl([k({type:Boolean})],Bl.prototype,"ignoreEmptyQuery",void 0),jl([B([])],Bl.prototype,"filters",void 0),jl([B([])],Bl.prototype,"sort",void 0),jl([Ye({store:"search"})],Bl.prototype,"request",void 0),jl([Ye({store:"search"})],Bl.prototype,"paging",void 0),jl([Ye({store:"search",selector:t=>t.spellcheck})],Bl.prototype,"autocorrect",void 0),jl([Ye({store:Ir.name})],Bl.prototype,"session",void 0),D("ft-search-context")(Bl);const Pl=It`
|
|
1133
|
+
`,Ml=Ie.extend("--ft-checkbox-text-color","",Fe.colorOnSurfaceHigh),Tl=Ie.external(Fe.colorPrimary,"Design system"),Kl=Ie.external(Fe.colorOnPrimary,"Design system"),Zl=Ie.extend("--ft-checkbox-border-color","",Fe.colorOnSurfaceMedium),_l=Ie.external(Fe.colorOnSurfaceDisabled,"Design system"),Hl=It`
|
|
1134
1134
|
* {
|
|
1135
1135
|
box-sizing: border-box;
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
1138
|
.ft-checkbox {
|
|
1139
1139
|
box-sizing: border-box;
|
|
1140
|
-
color: ${
|
|
1140
|
+
color: ${Ml};
|
|
1141
1141
|
|
|
1142
1142
|
display: inline-flex;
|
|
1143
1143
|
align-items: center;
|
|
@@ -1145,7 +1145,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
1147
|
.ft-checkbox--disabled {
|
|
1148
|
-
color: ${
|
|
1148
|
+
color: ${_l};
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
1151
|
input {
|
|
@@ -1169,26 +1169,26 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1169
1169
|
|
|
1170
1170
|
.ft-checkbox--box {
|
|
1171
1171
|
display: flex;
|
|
1172
|
-
border: 2px solid ${
|
|
1172
|
+
border: 2px solid ${Zl};
|
|
1173
1173
|
border-radius: 2px;
|
|
1174
1174
|
|
|
1175
1175
|
width: 18px;
|
|
1176
1176
|
height: 18px;
|
|
1177
1177
|
|
|
1178
|
-
color: ${
|
|
1178
|
+
color: ${Kl};
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
1181
|
|
|
1182
1182
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
1183
1183
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
1184
|
-
border-color: ${
|
|
1185
|
-
background-color: ${
|
|
1184
|
+
border-color: ${Tl};
|
|
1185
|
+
background-color: ${Tl};
|
|
1186
1186
|
}
|
|
1187
1187
|
|
|
1188
1188
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
1189
|
-
border-color: ${
|
|
1189
|
+
border-color: ${_l};
|
|
1190
1190
|
background-color: transparent;
|
|
1191
|
-
color: ${
|
|
1191
|
+
color: ${_l};
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
.ft-checkbox--checkmark {
|
|
@@ -1207,7 +1207,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1207
1207
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
1208
1208
|
opacity: 1;
|
|
1209
1209
|
}
|
|
1210
|
-
`;var
|
|
1210
|
+
`;var Gl=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Vl extends _e{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 pe`
|
|
1211
1211
|
<label class="${Jr(t)}" for="checkbox-input">
|
|
1212
1212
|
<div class="ft-checkbox--box-container">
|
|
1213
1213
|
<ft-ripple
|
|
@@ -1233,14 +1233,14 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1233
1233
|
<slot></slot>
|
|
1234
1234
|
</ft-typography>
|
|
1235
1235
|
</label>
|
|
1236
|
-
`}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)}}
|
|
1236
|
+
`}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)}}Vl.elementDefinitions={"ft-ripple":hn,"ft-typography":Rs},Vl.styles=Hl,Gl([k()],Vl.prototype,"name",void 0),Gl([k({type:Boolean,reflect:!0})],Vl.prototype,"checked",void 0),Gl([k({type:Boolean})],Vl.prototype,"indeterminate",void 0),Gl([k({type:Boolean})],Vl.prototype,"disabled",void 0),Gl([L(".ft-checkbox")],Vl.prototype,"container",void 0),Gl([L("ft-ripple")],Vl.prototype,"ripple",void 0),D("ft-checkbox")(Vl);const ql=Ie.extend("--ft-radio-text-color","",Fe.colorOnSurfaceHigh),Yl=Ie.external(Fe.colorPrimary,"Design system"),Xl=(Ie.external(Fe.colorOnPrimary,"Design system"),Ie.extend("--ft-radio-border-color","",Fe.colorOnSurfaceMedium)),Jl=Ie.external(Fe.colorOnSurfaceDisabled,"Design system"),Ql=It`
|
|
1237
1237
|
* {
|
|
1238
1238
|
box-sizing: border-box;
|
|
1239
1239
|
}
|
|
1240
1240
|
|
|
1241
1241
|
.ft-radio {
|
|
1242
1242
|
box-sizing: border-box;
|
|
1243
|
-
color: ${
|
|
1243
|
+
color: ${ql};
|
|
1244
1244
|
|
|
1245
1245
|
display: inline-flex;
|
|
1246
1246
|
align-items: center;
|
|
@@ -1248,7 +1248,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
1250
|
.ft-radio--disabled {
|
|
1251
|
-
color: ${
|
|
1251
|
+
color: ${Jl};
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
1254
|
input {
|
|
@@ -1271,7 +1271,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
1273
|
.ft-radio--box {
|
|
1274
|
-
border: 2px solid ${
|
|
1274
|
+
border: 2px solid ${Xl};
|
|
1275
1275
|
border-radius: 50%;
|
|
1276
1276
|
|
|
1277
1277
|
display: flex;
|
|
@@ -1284,7 +1284,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1284
1284
|
|
|
1285
1285
|
.ft-radio--box:after {
|
|
1286
1286
|
content: " ";
|
|
1287
|
-
background-color: ${
|
|
1287
|
+
background-color: ${Yl};
|
|
1288
1288
|
|
|
1289
1289
|
border-radius: 50%;
|
|
1290
1290
|
|
|
@@ -1296,7 +1296,7 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1296
1296
|
}
|
|
1297
1297
|
|
|
1298
1298
|
.ft-radio--checked .ft-radio--box {
|
|
1299
|
-
border-color: ${
|
|
1299
|
+
border-color: ${Yl};
|
|
1300
1300
|
}
|
|
1301
1301
|
|
|
1302
1302
|
|
|
@@ -1305,14 +1305,14 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1305
1305
|
}
|
|
1306
1306
|
|
|
1307
1307
|
.ft-radio--disabled .ft-radio--box {
|
|
1308
|
-
border-color: ${
|
|
1308
|
+
border-color: ${Jl};
|
|
1309
1309
|
background-color: transparent;
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
1312
|
.ft-radio--disabled .ft-radio--box:after {
|
|
1313
|
-
background-color: ${
|
|
1313
|
+
background-color: ${Jl};
|
|
1314
1314
|
}
|
|
1315
|
-
`;var
|
|
1315
|
+
`;var tc=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class ec extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class oc extends _e{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 pe`
|
|
1316
1316
|
<div class="${Jr(t)}">
|
|
1317
1317
|
<div class="ft-radio--box-container">
|
|
1318
1318
|
<ft-ripple
|
|
@@ -1337,22 +1337,22 @@ function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([n
|
|
|
1337
1337
|
</ft-typography>
|
|
1338
1338
|
</label>
|
|
1339
1339
|
</div>
|
|
1340
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
1340
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new ec(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new ec(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}oc.elementDefinitions={"ft-ripple":hn,"ft-typography":Rs},oc.styles=Ql,tc([k()],oc.prototype,"value",void 0),tc([k()],oc.prototype,"name",void 0),tc([k({type:Boolean,reflect:!0})],oc.prototype,"checked",void 0),tc([k({type:Boolean})],oc.prototype,"disabled",void 0),tc([L(".ft-radio")],oc.prototype,"container",void 0),tc([L("ft-ripple")],oc.prototype,"ripple",void 0),tc([L("input")],oc.prototype,"input",void 0);const ic=It`
|
|
1341
1341
|
:host {
|
|
1342
1342
|
display: contents;
|
|
1343
1343
|
}
|
|
1344
|
-
`;var
|
|
1344
|
+
`;var rc=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class nc extends _e{constructor(){super(...arguments),this.name=""}render(){return pe`
|
|
1345
1345
|
<slot @slotchange=${this.onSlotChange}
|
|
1346
1346
|
@change=${this.onChange}
|
|
1347
1347
|
@keydown=${this.onKeyDown}
|
|
1348
1348
|
></slot>
|
|
1349
|
-
`}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),o=this.radioButtons.indexOf(e)-1;this.radioButtons[o<0?this.radioButtons.length-1:o].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)}}
|
|
1349
|
+
`}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),o=this.radioButtons.indexOf(e)-1;this.radioButtons[o<0?this.radioButtons.length-1:o].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)}}nc.elementDefinitions={},nc.styles=ic,rc([k()],nc.prototype,"name",void 0),rc([
|
|
1350
1350
|
/**
|
|
1351
1351
|
* @license
|
|
1352
1352
|
* Copyright 2021 Google LLC
|
|
1353
1353
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1354
1354
|
*/
|
|
1355
|
-
function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return U(0,0,{get(){const e=this.renderRoot?.querySelector(n),o=e?.assignedElements(t)??[];return void 0===r?o:o.filter((t=>t.matches(r)))}})}}()],
|
|
1355
|
+
function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return U(0,0,{get(){const e=this.renderRoot?.querySelector(n),o=e?.assignedElements(t)??[];return void 0===r?o:o.filter((t=>t.matches(r)))}})}}()],nc.prototype,"radioButtons",void 0),D("ft-radio")(oc),D("ft-radio-group")(nc);const sc={borderRadiusM:Ie.external(Fe.borderRadiusM,"Design system"),colorOutline:Ie.external(Fe.colorOutline,"Design system"),colorOnSurface:Ie.external(Fe.colorOnSurface,"Design system"),colorOnSurfaceMedium:Ie.external(Fe.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:Ie.external(Fe.colorOnSurfaceDisabled,"Design system"),colorPrimary:Ie.external(Fe.colorPrimary,"Design system"),colorOnPrimary:Ie.external(Fe.colorOnPrimary,"Design system"),fontFamily:Ie.external(Yn.fontFamily,"Body2 typography"),fontSize:Ie.external(Yn.fontSize,"Body2 typography"),fontWeight:Ie.external(Yn.fontWeight,"Body2 typography"),letterSpacing:Ie.external(Yn.letterSpacing,"Body2 typography"),lineHeight:Ie.external(Yn.lineHeight,"Body2 typography"),textTransform:Ie.external(Yn.textTransform,"Body2 typography")},ac=It`
|
|
1356
1356
|
.ft-filter-level--container {
|
|
1357
1357
|
display: flex;
|
|
1358
1358
|
flex-direction: column;
|
|
@@ -1366,14 +1366,14 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1366
1366
|
flex-shrink: 0;
|
|
1367
1367
|
text-decoration: none;
|
|
1368
1368
|
position: relative;
|
|
1369
|
-
border-radius: ${
|
|
1369
|
+
border-radius: ${sc.borderRadiusM};
|
|
1370
1370
|
overflow: hidden;
|
|
1371
1371
|
display: flex;
|
|
1372
1372
|
align-items: center;
|
|
1373
1373
|
padding: 4px 4px;
|
|
1374
1374
|
gap: 4px;
|
|
1375
1375
|
cursor: pointer;
|
|
1376
|
-
color: ${
|
|
1376
|
+
color: ${sc.colorOnSurface};
|
|
1377
1377
|
}
|
|
1378
1378
|
|
|
1379
1379
|
.ft-filter-level--go-back:focus {
|
|
@@ -1402,7 +1402,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
1404
|
ft-button {
|
|
1405
|
-
${Ue(Ts.color,
|
|
1405
|
+
${Ue(Ts.color,sc.colorOnSurface)};
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
1408
|
ft-radio, ft-checkbox {
|
|
@@ -1416,9 +1416,9 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1416
1416
|
|
|
1417
1417
|
.ft-filter-level--no-values {
|
|
1418
1418
|
margin: 10px 0;
|
|
1419
|
-
color: ${
|
|
1419
|
+
color: ${sc.colorOnSurfaceMedium};
|
|
1420
1420
|
}
|
|
1421
|
-
`;var
|
|
1421
|
+
`;var lc=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class cc extends _e{constructor(){super(...arguments),this.filterId="",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 pe`
|
|
1422
1422
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
1423
1423
|
${null==this.parent?null:pe`
|
|
1424
1424
|
<div tabindex="0"
|
|
@@ -1482,7 +1482,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1482
1482
|
@change=${t=>t.stopPropagation()}>
|
|
1483
1483
|
${t.renderOption?t.renderOption:t.label}
|
|
1484
1484
|
</ft-radio>
|
|
1485
|
-
`}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}))}}
|
|
1485
|
+
`}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}))}}cc.elementDefinitions={"ft-button":hl,"ft-ripple":hn,"ft-typography":Rs,"ft-checkbox":Vl,"ft-icon":Ds,"ft-radio":oc},cc.styles=ac,lc([k({type:String})],cc.prototype,"filterId",void 0),lc([k({type:Object})],cc.prototype,"parent",void 0),lc([k({type:Array})],cc.prototype,"options",void 0),lc([k({type:Boolean})],cc.prototype,"multivalued",void 0),lc([k({type:Boolean})],cc.prototype,"disabled",void 0),lc([k({type:Boolean})],cc.prototype,"hideSelectedOptions",void 0),lc([k({type:Boolean})],cc.prototype,"preventNavigation",void 0),lc([k({type:String})],cc.prototype,"filter",void 0),lc([k({type:String})],cc.prototype,"moreValuesButtonLabel",void 0),lc([k({type:String})],cc.prototype,"noValuesLabel",void 0),lc([k({type:Number})],cc.prototype,"displayedValuesLimit",void 0),lc([L(".ft-filter-level--container")],cc.prototype,"container",void 0),lc([R()],cc.prototype,"displayedPages",void 0);const hc={buttonsColor:Ie.extend("--ft-snap-scroll-buttons-color","",Fe.colorPrimary),buttonsZIndex:Ie.create("--ft-snap-scroll-buttons-z-index","","COLOR","1"),gap:Ie.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:Ie.external(Fe.colorSurface,"Design system")},fc=It`
|
|
1486
1486
|
.ft-snap-scroll {
|
|
1487
1487
|
box-sizing: border-box;
|
|
1488
1488
|
position: relative;
|
|
@@ -1517,7 +1517,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1517
1517
|
flex-wrap: nowrap;
|
|
1518
1518
|
align-items: flex-start;
|
|
1519
1519
|
justify-content: flex-start;
|
|
1520
|
-
gap: ${
|
|
1520
|
+
gap: ${hc.gap};
|
|
1521
1521
|
}
|
|
1522
1522
|
|
|
1523
1523
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1560,11 +1560,11 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1560
1560
|
.ft-snap-scroll--next {
|
|
1561
1561
|
position: absolute;
|
|
1562
1562
|
display: flex;
|
|
1563
|
-
z-index: ${
|
|
1563
|
+
z-index: ${hc.buttonsZIndex};
|
|
1564
1564
|
opacity: 1;
|
|
1565
1565
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1566
1566
|
${Ue(Ts.backgroundColor,"transparent")};
|
|
1567
|
-
${Ue(Ts.color,
|
|
1567
|
+
${Ue(Ts.color,hc.buttonsColor)};
|
|
1568
1568
|
}
|
|
1569
1569
|
|
|
1570
1570
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1577,37 +1577,37 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1577
1577
|
top: 0;
|
|
1578
1578
|
left: -1px;
|
|
1579
1579
|
bottom: 0;
|
|
1580
|
-
background: linear-gradient(to right, ${
|
|
1580
|
+
background: linear-gradient(to right, ${hc.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1581
1581
|
}
|
|
1582
1582
|
|
|
1583
1583
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1584
1584
|
top: -1px;
|
|
1585
1585
|
left: 0;
|
|
1586
1586
|
right: 0;
|
|
1587
|
-
background: linear-gradient(to bottom, ${
|
|
1587
|
+
background: linear-gradient(to bottom, ${hc.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1588
1588
|
}
|
|
1589
1589
|
|
|
1590
1590
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1591
1591
|
top: 0;
|
|
1592
1592
|
right: -1px;
|
|
1593
1593
|
bottom: 0;
|
|
1594
|
-
background: linear-gradient(to left, ${
|
|
1594
|
+
background: linear-gradient(to left, ${hc.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1595
1595
|
}
|
|
1596
1596
|
|
|
1597
1597
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1598
1598
|
left: 0;
|
|
1599
1599
|
right: 0;
|
|
1600
1600
|
bottom: -1px;
|
|
1601
|
-
background: linear-gradient(to top, ${
|
|
1601
|
+
background: linear-gradient(to top, ${hc.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1602
1602
|
}
|
|
1603
1603
|
|
|
1604
1604
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1605
1605
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1606
1606
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1607
1607
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1608
|
-
background-color: ${
|
|
1608
|
+
background-color: ${hc.colorSurface};
|
|
1609
1609
|
}
|
|
1610
|
-
`;var
|
|
1610
|
+
`;var pc=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class uc extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class dc extends _e{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 W(200),this.updateScrollDebouncer=new W(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,o=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<o||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=Jr({"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":Qi}),e=this.controls&&this.withScroll;return pe`
|
|
1611
1611
|
<div part="container" class="${t}">
|
|
1612
1612
|
<ft-button
|
|
1613
1613
|
class="ft-snap-scroll--previous"
|
|
@@ -1631,7 +1631,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1631
1631
|
@click=${this.next}
|
|
1632
1632
|
></ft-button>
|
|
1633
1633
|
</div>
|
|
1634
|
-
`}update(t){super.update(t),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1634
|
+
`}update(t){super.update(t),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new uc(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}dc.elementDefinitions={"ft-button":hl},dc.styles=fc,pc([k({type:Boolean})],dc.prototype,"horizontal",void 0),pc([k({type:Boolean})],dc.prototype,"hideScrollbar",void 0),pc([k({type:Boolean})],dc.prototype,"controls",void 0),pc([k({type:Boolean})],dc.prototype,"limitSize",void 0),pc([R()],dc.prototype,"elements",void 0),pc([R()],dc.prototype,"currentElement",void 0),pc([R()],dc.prototype,"withScroll",void 0),pc([R()],dc.prototype,"startReached",void 0),pc([R()],dc.prototype,"endReached",void 0),pc([L(".ft-snap-scroll--content")],dc.prototype,"contentSlot",void 0),D("ft-snap-scroll")(dc);const yc=Ie.external(Fe.colorOutline,"Design system"),gc=Ie.external(Fe.colorOnSurface,"Design system"),bc=Ie.external(Fe.colorOnSurfaceMedium,"Design system"),vc=Ie.external(Fe.colorPrimary,"Design system"),mc=Ie.external(Fe.colorSurface,"Design system"),xc=Ie.external(Fe.transitionDuration,"Design system"),Oc=Ie.external(Fe.transitionTimingFunction,"Design system"),wc=[ws,It`
|
|
1635
1635
|
:host {
|
|
1636
1636
|
display: flex;
|
|
1637
1637
|
max-height: 100%;
|
|
@@ -1644,7 +1644,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1644
1644
|
flex-direction: column;
|
|
1645
1645
|
max-height: 100%;
|
|
1646
1646
|
max-width: 100%;
|
|
1647
|
-
color: ${
|
|
1647
|
+
color: ${gc};
|
|
1648
1648
|
}
|
|
1649
1649
|
|
|
1650
1650
|
.ft-filter--header {
|
|
@@ -1680,8 +1680,8 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1680
1680
|
padding: 0 10px;
|
|
1681
1681
|
overflow: hidden;
|
|
1682
1682
|
height: 32px;
|
|
1683
|
-
transition: height ${
|
|
1684
|
-
margin ${
|
|
1683
|
+
transition: height ${xc} ${Oc},
|
|
1684
|
+
margin ${xc} ${Oc};
|
|
1685
1685
|
transition-delay: 500ms;
|
|
1686
1686
|
}
|
|
1687
1687
|
|
|
@@ -1694,15 +1694,15 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1694
1694
|
display: block;
|
|
1695
1695
|
width: 100%;
|
|
1696
1696
|
border-radius: 4px;
|
|
1697
|
-
border: 1px solid ${
|
|
1697
|
+
border: 1px solid ${yc};
|
|
1698
1698
|
padding: 4px;
|
|
1699
|
-
background-color: ${
|
|
1700
|
-
color: ${
|
|
1701
|
-
outline-color: ${
|
|
1699
|
+
background-color: ${mc};
|
|
1700
|
+
color: ${gc};
|
|
1701
|
+
outline-color: ${vc};
|
|
1702
1702
|
}
|
|
1703
1703
|
|
|
1704
1704
|
input::placeholder {
|
|
1705
|
-
color: ${
|
|
1705
|
+
color: ${bc};
|
|
1706
1706
|
}
|
|
1707
1707
|
|
|
1708
1708
|
input:placeholder-shown {
|
|
@@ -1718,7 +1718,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1718
1718
|
}
|
|
1719
1719
|
|
|
1720
1720
|
.ft-filter--separator {
|
|
1721
|
-
border-top: 1px solid ${
|
|
1721
|
+
border-top: 1px solid ${yc};
|
|
1722
1722
|
margin: 4px 10px;
|
|
1723
1723
|
}
|
|
1724
1724
|
|
|
@@ -1743,7 +1743,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1743
1743
|
slot:not([name]) {
|
|
1744
1744
|
display: none;
|
|
1745
1745
|
}
|
|
1746
|
-
`];var
|
|
1746
|
+
`];var Sc=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Nc extends CustomEvent{constructor(t){super("change",{detail:t})}}class $c extends _e{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.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new W(300),this.changeDebouncer=new W(10),this.lastDispatchedValues=[]}get flatOptions(){return F(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get childrenFilteredFlatOptions(){return F(this.options,(t=>{var e;return t.selected?[]:null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.childrenFilteredFlatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),e=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,o=this.filterPlaceHolder.replace("{0}",this.label);return pe`
|
|
1747
1747
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1748
1748
|
part="container">
|
|
1749
1749
|
${this.label||t?pe`
|
|
@@ -1815,18 +1815,18 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1815
1815
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1816
1816
|
noValuesLabel="${this.noValuesLabel}"
|
|
1817
1817
|
></ft-filter-level>
|
|
1818
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const o=this.flatOptions.find((e=>e.value===t.detail.value));o.selected=!o.selected;const i=t=>{var e;t!==o&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(i)};this.multivalued?null===(e=o.subOptions)||void 0===e||e.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;z(this.lastDispatchedValues,t)||(this.dispatchEvent(new
|
|
1818
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const o=this.flatOptions.find((e=>e.value===t.detail.value));o.selected=!o.selected;const i=t=>{var e;t!==o&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(i)};this.multivalued?null===(e=o.subOptions)||void 0===e||e.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;z(this.lastDispatchedValues,t)||(this.dispatchEvent(new Nc(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}$c.elementDefinitions={"ft-button":hl,"ft-filter-level":cc,"ft-snap-scroll":dc,"ft-typography":Rs},$c.styles=wc,Sc([k({type:String})],$c.prototype,"id",void 0),Sc([k({type:String})],$c.prototype,"label",void 0),Sc([k({type:String})],$c.prototype,"filterPlaceHolder",void 0),Sc([k({type:String})],$c.prototype,"clearButtonLabel",void 0),Sc([k({type:String})],$c.prototype,"moreValuesButtonLabel",void 0),Sc([k({type:String})],$c.prototype,"noValuesLabel",void 0),Sc([B([])],$c.prototype,"options",void 0),Sc([k({type:Boolean})],$c.prototype,"multivalued",void 0),Sc([k({type:Boolean})],$c.prototype,"disabled",void 0),Sc([k({type:Boolean})],$c.prototype,"raiseSelectedOptions",void 0),Sc([k({type:Number})],$c.prototype,"displayedValuesLimit",void 0),Sc([k({type:Boolean})],$c.prototype,"hideClearButton",void 0),Sc([L(".ft-filter--slot")],$c.prototype,"slotElement",void 0),Sc([L(".ft-filter--container")],$c.prototype,"container",void 0),Sc([L(".ft-filter--values")],$c.prototype,"valuesContainer",void 0),Sc([L(".ft-filter--levels")],$c.prototype,"levelsContainer",void 0),Sc([R()],$c.prototype,"lastLevelHasHiddenvalues",void 0),Sc([L(".ft-filter--filter input")],$c.prototype,"filterInput",void 0),Sc([function(t){return(e,o)=>U(0,0,{get(){return(this.renderRoot??(A??=document.createDocumentFragment())).querySelectorAll(t)}})}(".ft-filter--levels ft-filter-level")],$c.prototype,"levels",void 0),Sc([R()],$c.prototype,"withScroll",void 0),Sc([R()],$c.prototype,"filter",void 0),Sc([R()],$c.prototype,"slideIn",void 0),Sc([R()],$c.prototype,"slideOut",void 0);var Cc=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Ec extends _e{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return pe`
|
|
1819
1819
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1820
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1820
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ec.elementDefinitions={},Cc([k({type:String})],Ec.prototype,"label",void 0),Cc([k({type:Object,converter:t=>t})],Ec.prototype,"value",void 0),Cc([k({type:Boolean,reflect:!0})],Ec.prototype,"selected",void 0),Cc([k({type:Object})],Ec.prototype,"subOptions",void 0),Cc([B({})],Ec.prototype,"renderOption",void 0),Cc([L(".ft-filter-option--slot")],Ec.prototype,"slotElement",void 0),D("ft-filter")($c),D("ft-filter-option")(Ec);const kc=Al.build("designedSearchType"),Rc={label:"Search scope",documentTitlesOnly:"Search in document titles only"};var Ic=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Uc extends(kl(Xr)){constructor(){super(),this.addI18nContext(kc,Rc)}render(){return pe`
|
|
1821
1821
|
<ft-filter
|
|
1822
|
-
label=${
|
|
1823
|
-
.options=${[{label:
|
|
1822
|
+
label=${kc.messages.label()}
|
|
1823
|
+
.options=${[{label:kc.messages.documentTitlesOnly(),value:t=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setSearchInDocumentTitlesOnly(t)},selected:this.searchInDocumentTitlesOnly}]}
|
|
1824
1824
|
part="filter"
|
|
1825
1825
|
.exportpartsPrefixes=${["filter"]}
|
|
1826
1826
|
multivalued
|
|
1827
1827
|
@change=${this.onSelected}
|
|
1828
1828
|
></ft-filter>
|
|
1829
|
-
`}onSelected(t){var e;null===(e=this.filter)||void 0===e||e.options.forEach((t=>t.value(t.selected)))}}
|
|
1829
|
+
`}onSelected(t){var e;null===(e=this.filter)||void 0===e||e.options.forEach((t=>t.value(t.selected)))}}Uc.elementDefinitions={"ft-filter":$c},Uc.styles=Pl,Ic([Ye({selector:_r})],Uc.prototype,"searchInDocumentTitlesOnly",void 0),Ic([L("ft-filter")],Uc.prototype,"filter",void 0),D("ft-search-type")(Uc);var Lc=function(t,e,o,i){for(var r,n=arguments.length,s=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,o,s):r(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s};class Ac extends(kl(Xr)){constructor(){super(),this.editorMode=!1,this.addStore(Ir),this.addI18nContext(kc,Rc)}render(){return this.editorMode?this.renderDummyFacet():null!=this.facets&&0!==this.facets.length||this.searchInDocumentTitlesOnly?pe`
|
|
1830
1830
|
|
|
1831
1831
|
<div class="ft-search-selected-facets--container">
|
|
1832
1832
|
${fr(this.facets||[],(t=>t.key),(t=>{const e=this.getSelectedValues(t);return fr(e,(e=>t.key+"-"+e),(o=>this.renderFacet(t.key,t.label,e,o)))}))}
|
|
@@ -1850,13 +1850,13 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1850
1850
|
</ft-chip>
|
|
1851
1851
|
</ft-tooltip>
|
|
1852
1852
|
`}getSelectedValues(t){return F(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}getLabelFromValue(t){return this.unquote(t).split("|").pop()}getBreadcrumbFromValue(t){return this.unquote(t).split("|").join(" > ")}quote(t){return`"${t}"`}unquote(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}renderSearchInDocumentTitlesOnly(){return this.searchInDocumentTitlesOnly?pe`
|
|
1853
|
-
<ft-tooltip inline text="${
|
|
1853
|
+
<ft-tooltip inline text="${kc.messages.documentTitlesOnly()}"
|
|
1854
1854
|
part="tooltips tooltip-search-in-document-titles-only">
|
|
1855
1855
|
<ft-chip
|
|
1856
1856
|
part="ft-search-selected-facets ft-search-selected-facet-search-in-document-titles-only"
|
|
1857
1857
|
removable
|
|
1858
1858
|
@icon-click=${()=>{var t;return null===(t=this.stateManager)||void 0===t?void 0:t.setSearchInDocumentTitlesOnly(!1)}}>
|
|
1859
|
-
${
|
|
1859
|
+
${kc.messages.documentTitlesOnly()}
|
|
1860
1860
|
</ft-chip>
|
|
1861
1861
|
</ft-tooltip>
|
|
1862
|
-
`:de}}
|
|
1862
|
+
`:de}}Ac.elementDefinitions={"ft-chip":Sl,"ft-tooltip":nl},Ac.styles=ur,Lc([Ye({store:"search"})],Ac.prototype,"facets",void 0),Lc([Ye({store:"search",selector:_r})],Ac.prototype,"searchInDocumentTitlesOnly",void 0),Lc([Ye({store:Ir.name})],Ac.prototype,"editorMode",void 0),D("ft-search-selected-facets")(Ac),t.FtSearchSelectedFacets=Ac,t.FtSearchSelectedFacetsCssVariables=pr,t.styles=ur}({});
|