@fluid-topics/ft-search-selected-facets 1.1.8 → 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.
|
@@ -527,7 +527,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
.ft-tooltip {
|
|
530
|
-
position:
|
|
530
|
+
position: fixed;
|
|
531
531
|
box-sizing: border-box;
|
|
532
532
|
overflow: hidden;
|
|
533
533
|
width: max-content;
|
|
@@ -545,7 +545,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
545
545
|
position: relative;
|
|
546
546
|
word-break: break-word;
|
|
547
547
|
}
|
|
548
|
-
`,Do=["start","end"],Ko=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+Do[0],e+"-"+Do[1])),[]),Fo=Math.min,Zo=Math.max,To=Math.round,Po=t=>({x:t,y:t}),Ho={left:"right",right:"left",bottom:"top",top:"bottom"},jo={start:"end",end:"start"};function Mo(t,e,o){return Zo(t,Fo(e,o))}function _o(t,e){return"function"==typeof t?t(e):t}function Go(t){return t.split("-")[0]}function Vo(t){return t.split("-")[1]}function qo(t){return"x"===t?"y":"x"}function Yo(t){return"y"===t?"height":"width"}function Qo(t){return["top","bottom"].includes(Go(t))?"y":"x"}function Xo(t){return qo(Qo(t))}function Jo(t){return t.replace(/left|right|bottom|top/g,(t=>Ho[t]))}function ti(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function ei(t,e,o){let{reference:i,floating:r}=t;const n=Qo(e),a=Xo(e),s=Yo(a),l=Go(e),c="y"===n,h=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,p=i[s]/2-r[s]/2;let d;switch(l){case"top":d={x:h,y:i.y-r.height};break;case"bottom":d={x:h,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-r.width,y:f};break;default:d={x:i.x,y:i.y}}switch(Vo(e)){case"start":d[a]-=p*(o&&c?-1:1);break;case"end":d[a]+=p*(o&&c?-1:1)}return d}async function oi(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=_o(e,t),u=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}}(d),g=s[p?"floating"===f?"reference":"floating":f],y=ti(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(g)))||o?g:g.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:c,rootBoundary:h,strategy:l})),b="floating"===f?{...a.floating,x:i,y:r}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),v=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},x=ti(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:m,strategy:l}):b);return{top:(y.top-x.top+u.top)/v.y,bottom:(x.bottom-y.bottom+u.bottom)/v.y,left:(y.left-x.left+u.left)/v.x,right:(x.right-y.right+u.right)/v.x}}function ii(t,e,o){return(t?[...o.filter((e=>Vo(e)===t)),...o.filter((e=>Vo(e)!==t))]:o.filter((t=>Go(t)===t))).filter((o=>!t||(Vo(o)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>jo[t]))}(o)!==o)))}const ri=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,i,r;const{rects:n,middlewareData:a,placement:s,platform:l,elements:c}=e,{crossAxis:h=!1,alignment:f,allowedPlacements:p=Ko,autoAlignment:d=!0,...u}=_o(t,e),g=void 0!==f||p===Ko?ii(f||null,d,p):p,y=await oi(e,u),b=(null==(o=a.autoPlacement)?void 0:o.index)||0,m=g[b];if(null==m)return{};const v=function(t,e,o){void 0===o&&(o=!1);const i=Vo(t),r=Xo(t),n=Yo(r);let a="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=Jo(a)),[a,Jo(a)]}(m,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(s!==m)return{reset:{placement:g[0]}};const x=[y[Go(m)],y[v[0]],y[v[1]]],O=[...(null==(i=a.autoPlacement)?void 0:i.overflows)||[],{placement:m,overflows:x}],w=g[b+1];if(w)return{data:{index:b+1,overflows:O},reset:{placement:w}};const S=O.map((t=>{const e=Vo(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,Vo(t[0])?2:3).every((t=>t<=0)))),$=(null==(r=N[0])?void 0:r[0])||S[0][0];return $!==s?{data:{index:b+1,overflows:O},reset:{placement:$}}:{}}}};function ni(t){return li(t)?(t.nodeName||"").toLowerCase():"#document"}function ai(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function si(t){var e;return null==(e=(li(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function li(t){return t instanceof Node||t instanceof ai(t).Node}function ci(t){return t instanceof Element||t instanceof ai(t).Element}function hi(t){return t instanceof HTMLElement||t instanceof ai(t).HTMLElement}function fi(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof ai(t).ShadowRoot)}function pi(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=bi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function di(t){return["table","td","th"].includes(ni(t))}function ui(t){const e=gi(),o=bi(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 gi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function yi(t){return["html","body","#document"].includes(ni(t))}function bi(t){return ai(t).getComputedStyle(t)}function mi(t){return ci(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vi(t){if("html"===ni(t))return t;const e=t.assignedSlot||t.parentNode||fi(t)&&t.host||si(t);return fi(e)?e.host:e}function xi(t){const e=vi(t);return yi(e)?t.ownerDocument?t.ownerDocument.body:t.body:hi(e)&&pi(e)?e:xi(e)}function Oi(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=xi(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),a=ai(r);return n?e.concat(a,a.visualViewport||[],pi(r)?r:[],a.frameElement&&o?Oi(a.frameElement):[]):e.concat(r,Oi(r,[],o))}function wi(t){const e=bi(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=hi(t),n=r?t.offsetWidth:o,a=r?t.offsetHeight:i,s=To(o)!==n||To(i)!==a;return s&&(o=n,i=a),{width:o,height:i,$:s}}function Si(t){return ci(t)?t:t.contextElement}function Ni(t){const e=Si(t);if(!hi(e))return Po(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=wi(e);let a=(n?To(o.width):o.width)/i,s=(n?To(o.height):o.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const $i=Po(0);function Ci(t){const e=ai(t);return gi()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:$i}function ki(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=Si(t);let a=Po(1);e&&(i?ci(i)&&(a=Ni(i)):a=Ni(t));const s=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==ai(t))&&e}(n,o,i)?Ci(n):Po(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,h=r.width/a.x,f=r.height/a.y;if(n){const t=ai(n),e=i&&ci(i)?ai(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Ni(o),e=o.getBoundingClientRect(),i=bi(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=ai(o).frameElement}}return ti({width:h,height:f,x:l,y:c})}function Ii(t){return ki(si(t)).left+mi(t).scrollLeft}function Ei(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=ai(t),i=si(t),r=o.visualViewport;let n=i.clientWidth,a=i.clientHeight,s=0,l=0;if(r){n=r.width,a=r.height;const t=gi();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,o);else if("document"===e)i=function(t){const e=si(t),o=mi(t),i=t.ownerDocument.body,r=Zo(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=Zo(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+Ii(t);const s=-o.scrollTop;return"rtl"===bi(i).direction&&(a+=Zo(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:a,y:s}}(si(t));else if(ci(e))i=function(t,e){const o=ki(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=hi(t)?Ni(t):Po(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=Ci(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return ti(i)}function Ri(t,e){const o=vi(t);return!(o===e||!ci(o)||yi(o))&&("fixed"===bi(o).position||Ri(o,e))}function Ui(t,e,o){const i=hi(e),r=si(e),n="fixed"===o,a=ki(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=Po(0);if(i||!i&&!n)if(("body"!==ni(e)||pi(r))&&(s=mi(e)),i){const t=ki(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Ii(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Li(t,e){return hi(t)&&"fixed"!==bi(t).position?e?e(t):t.offsetParent:null}function Wi(t,e){const o=ai(t);if(!hi(t))return o;let i=Li(t,e);for(;i&&di(i)&&"static"===bi(i).position;)i=Li(i,e);return i&&("html"===ni(i)||"body"===ni(i)&&"static"===bi(i).position&&!ui(i))?o:i||function(t){let e=vi(t);for(;hi(e)&&!yi(e);){if(ui(e))return e;e=vi(e)}return null}(t)||o}const zi={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=hi(o),n=si(o);if(o===n)return e;let a={scrollLeft:0,scrollTop:0},s=Po(1);const l=Po(0);if((r||!r&&"fixed"!==i)&&(("body"!==ni(o)||pi(n))&&(a=mi(o)),hi(o))){const t=ki(o);s=Ni(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:si,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=Oi(t,[],!1).filter((t=>ci(t)&&"body"!==ni(t))),r=null;const n="fixed"===bi(t).position;let a=n?vi(t):t;for(;ci(a)&&!yi(a);){const e=bi(a),o=ui(a);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||pi(a)&&!o&&Ri(t,a))?i=i.filter((t=>t!==a)):r=e,a=vi(a)}return e.set(t,i),i}(e,this._c):[].concat(o),a=[...n,i],s=a[0],l=a.reduce(((t,o)=>{const i=Ei(e,o,r);return t.top=Zo(i.top,t.top),t.right=Fo(i.right,t.right),t.bottom=Fo(i.bottom,t.bottom),t.left=Zo(i.left,t.left),t}),Ei(e,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Wi,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||Wi,n=this.getDimensions;return{reference:Ui(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 wi(t)},getScale:Ni,isElement:ci,isRTL:function(t){return"rtl"===bi(t).direction}},Bi=(t,e,o)=>{const i=new Map,r={platform:zi,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:a}=o,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:f}=ei(c,i,l),p=i,d={},u=0;for(let o=0;o<s.length;o++){const{name:n,fn:g}=s[o],{x:y,y:b,data:m,reset:v}=await g({x:h,y:f,initialPlacement:i,placement:p,strategy:r,middlewareData:d,rects:c,platform:a,elements:{reference:t,floating:e}});h=null!=y?y:h,f=null!=b?b:f,d={...d,[n]:{...d[n],...m}},v&&u<=50&&(u++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):v.rects),({x:h,y:f}=ei(c,p,l))),o=-1)}return{x:h,y:f,placement:p,strategy:r,middlewareData:d}})(t,e,{...r,platform:n})};var Ai=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Di extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return o.html`
|
|
548
|
+
`,Do=["start","end"],Ko=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+Do[0],e+"-"+Do[1])),[]),Fo=Math.min,Zo=Math.max,To=Math.round,Po=t=>({x:t,y:t}),Ho={left:"right",right:"left",bottom:"top",top:"bottom"},jo={start:"end",end:"start"};function Mo(t,e,o){return Zo(t,Fo(e,o))}function _o(t,e){return"function"==typeof t?t(e):t}function Go(t){return t.split("-")[0]}function Vo(t){return t.split("-")[1]}function qo(t){return"x"===t?"y":"x"}function Yo(t){return"y"===t?"height":"width"}function Qo(t){return["top","bottom"].includes(Go(t))?"y":"x"}function Xo(t){return qo(Qo(t))}function Jo(t){return t.replace(/left|right|bottom|top/g,(t=>Ho[t]))}function ti(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function ei(t,e,o){let{reference:i,floating:r}=t;const n=Qo(e),a=Xo(e),s=Yo(a),l=Go(e),c="y"===n,h=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,p=i[s]/2-r[s]/2;let d;switch(l){case"top":d={x:h,y:i.y-r.height};break;case"bottom":d={x:h,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-r.width,y:f};break;default:d={x:i.x,y:i.y}}switch(Vo(e)){case"start":d[a]-=p*(o&&c?-1:1);break;case"end":d[a]+=p*(o&&c?-1:1)}return d}async function oi(t,e){var o;void 0===e&&(e={});const{x:i,y:r,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=_o(e,t),u=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}}(d),g=s[p?"floating"===f?"reference":"floating":f],y=ti(await n.getClippingRect({element:null==(o=await(null==n.isElement?void 0:n.isElement(g)))||o?g:g.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:c,rootBoundary:h,strategy:l})),b="floating"===f?{...a.floating,x:i,y:r}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),v=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},x=ti(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:m,strategy:l}):b);return{top:(y.top-x.top+u.top)/v.y,bottom:(x.bottom-y.bottom+u.bottom)/v.y,left:(y.left-x.left+u.left)/v.x,right:(x.right-y.right+u.right)/v.x}}function ii(t,e,o){return(t?[...o.filter((e=>Vo(e)===t)),...o.filter((e=>Vo(e)!==t))]:o.filter((t=>Go(t)===t))).filter((o=>!t||(Vo(o)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>jo[t]))}(o)!==o)))}const ri=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,i,r;const{rects:n,middlewareData:a,placement:s,platform:l,elements:c}=e,{crossAxis:h=!1,alignment:f,allowedPlacements:p=Ko,autoAlignment:d=!0,...u}=_o(t,e),g=void 0!==f||p===Ko?ii(f||null,d,p):p,y=await oi(e,u),b=(null==(o=a.autoPlacement)?void 0:o.index)||0,m=g[b];if(null==m)return{};const v=function(t,e,o){void 0===o&&(o=!1);const i=Vo(t),r=Xo(t),n=Yo(r);let a="x"===r?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=Jo(a)),[a,Jo(a)]}(m,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(s!==m)return{reset:{placement:g[0]}};const x=[y[Go(m)],y[v[0]],y[v[1]]],O=[...(null==(i=a.autoPlacement)?void 0:i.overflows)||[],{placement:m,overflows:x}],w=g[b+1];if(w)return{data:{index:b+1,overflows:O},reset:{placement:w}};const S=O.map((t=>{const e=Vo(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,Vo(t[0])?2:3).every((t=>t<=0)))),$=(null==(r=N[0])?void 0:r[0])||S[0][0];return $!==s?{data:{index:b+1,overflows:O},reset:{placement:$}}:{}}}};function ni(t){return li(t)?(t.nodeName||"").toLowerCase():"#document"}function ai(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function si(t){var e;return null==(e=(li(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function li(t){return t instanceof Node||t instanceof ai(t).Node}function ci(t){return t instanceof Element||t instanceof ai(t).Element}function hi(t){return t instanceof HTMLElement||t instanceof ai(t).HTMLElement}function fi(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof ai(t).ShadowRoot)}function pi(t){const{overflow:e,overflowX:o,overflowY:i,display:r}=bi(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+o)&&!["inline","contents"].includes(r)}function di(t){return["table","td","th"].includes(ni(t))}function ui(t){const e=gi(),o=bi(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 gi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function yi(t){return["html","body","#document"].includes(ni(t))}function bi(t){return ai(t).getComputedStyle(t)}function mi(t){return ci(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vi(t){if("html"===ni(t))return t;const e=t.assignedSlot||t.parentNode||fi(t)&&t.host||si(t);return fi(e)?e.host:e}function xi(t){const e=vi(t);return yi(e)?t.ownerDocument?t.ownerDocument.body:t.body:hi(e)&&pi(e)?e:xi(e)}function Oi(t,e,o){var i;void 0===e&&(e=[]),void 0===o&&(o=!0);const r=xi(t),n=r===(null==(i=t.ownerDocument)?void 0:i.body),a=ai(r);return n?e.concat(a,a.visualViewport||[],pi(r)?r:[],a.frameElement&&o?Oi(a.frameElement):[]):e.concat(r,Oi(r,[],o))}function wi(t){const e=bi(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=hi(t),n=r?t.offsetWidth:o,a=r?t.offsetHeight:i,s=To(o)!==n||To(i)!==a;return s&&(o=n,i=a),{width:o,height:i,$:s}}function Si(t){return ci(t)?t:t.contextElement}function Ni(t){const e=Si(t);if(!hi(e))return Po(1);const o=e.getBoundingClientRect(),{width:i,height:r,$:n}=wi(e);let a=(n?To(o.width):o.width)/i,s=(n?To(o.height):o.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const $i=Po(0);function Ci(t){const e=ai(t);return gi()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:$i}function ki(t,e,o,i){void 0===e&&(e=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),n=Si(t);let a=Po(1);e&&(i?ci(i)&&(a=Ni(i)):a=Ni(t));const s=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==ai(t))&&e}(n,o,i)?Ci(n):Po(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,h=r.width/a.x,f=r.height/a.y;if(n){const t=ai(n),e=i&&ci(i)?ai(i):i;let o=t.frameElement;for(;o&&i&&e!==t;){const t=Ni(o),e=o.getBoundingClientRect(),i=bi(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=ai(o).frameElement}}return ti({width:h,height:f,x:l,y:c})}function Ii(t){return ki(si(t)).left+mi(t).scrollLeft}function Ei(t,e,o){let i;if("viewport"===e)i=function(t,e){const o=ai(t),i=si(t),r=o.visualViewport;let n=i.clientWidth,a=i.clientHeight,s=0,l=0;if(r){n=r.width,a=r.height;const t=gi();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,o);else if("document"===e)i=function(t){const e=si(t),o=mi(t),i=t.ownerDocument.body,r=Zo(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),n=Zo(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-o.scrollLeft+Ii(t);const s=-o.scrollTop;return"rtl"===bi(i).direction&&(a+=Zo(e.clientWidth,i.clientWidth)-r),{width:r,height:n,x:a,y:s}}(si(t));else if(ci(e))i=function(t,e){const o=ki(t,!0,"fixed"===e),i=o.top+t.clientTop,r=o.left+t.clientLeft,n=hi(t)?Ni(t):Po(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=Ci(t);i={...e,x:e.x-o.x,y:e.y-o.y}}return ti(i)}function Ri(t,e){const o=vi(t);return!(o===e||!ci(o)||yi(o))&&("fixed"===bi(o).position||Ri(o,e))}function Ui(t,e,o){const i=hi(e),r=si(e),n="fixed"===o,a=ki(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=Po(0);if(i||!i&&!n)if(("body"!==ni(e)||pi(r))&&(s=mi(e)),i){const t=ki(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Ii(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Li(t,e){return hi(t)&&"fixed"!==bi(t).position?e?e(t):t.offsetParent:null}function Wi(t,e){const o=ai(t);if(!hi(t))return o;let i=Li(t,e);for(;i&&di(i)&&"static"===bi(i).position;)i=Li(i,e);return i&&("html"===ni(i)||"body"===ni(i)&&"static"===bi(i).position&&!ui(i))?o:i||function(t){let e=vi(t);for(;hi(e)&&!yi(e);){if(ui(e))return e;e=vi(e)}return null}(t)||o}const zi={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:o,strategy:i}=t;const r=hi(o),n=si(o);if(o===n)return e;let a={scrollLeft:0,scrollTop:0},s=Po(1);const l=Po(0);if((r||!r&&"fixed"!==i)&&(("body"!==ni(o)||pi(n))&&(a=mi(o)),hi(o))){const t=ki(o);s=Ni(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:si,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=Oi(t,[],!1).filter((t=>ci(t)&&"body"!==ni(t))),r=null;const n="fixed"===bi(t).position;let a=n?vi(t):t;for(;ci(a)&&!yi(a);){const e=bi(a),o=ui(a);o||"fixed"!==e.position||(r=null),(n?!o&&!r:!o&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||pi(a)&&!o&&Ri(t,a))?i=i.filter((t=>t!==a)):r=e,a=vi(a)}return e.set(t,i),i}(e,this._c):[].concat(o),a=[...n,i],s=a[0],l=a.reduce(((t,o)=>{const i=Ei(e,o,r);return t.top=Zo(i.top,t.top),t.right=Fo(i.right,t.right),t.bottom=Fo(i.bottom,t.bottom),t.left=Zo(i.left,t.left),t}),Ei(e,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Wi,getElementRects:async function(t){let{reference:e,floating:o,strategy:i}=t;const r=this.getOffsetParent||Wi,n=this.getDimensions;return{reference:Ui(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 wi(t)},getScale:Ni,isElement:ci,isRTL:function(t){return"rtl"===bi(t).direction}},Bi=(t,e,o)=>{const i=new Map,r={platform:zi,...o},n={...r.platform,_c:i};return(async(t,e,o)=>{const{placement:i="bottom",strategy:r="absolute",middleware:n=[],platform:a}=o,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:f}=ei(c,i,l),p=i,d={},u=0;for(let o=0;o<s.length;o++){const{name:n,fn:g}=s[o],{x:y,y:b,data:m,reset:v}=await g({x:h,y:f,initialPlacement:i,placement:p,strategy:r,middlewareData:d,rects:c,platform:a,elements:{reference:t,floating:e}});h=null!=y?y:h,f=null!=b?b:f,d={...d,[n]:{...d[n],...m}},v&&u<=50&&(u++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):v.rects),({x:h,y:f}=ei(c,p,l))),o=-1)}return{x:h,y:f,placement:p,strategy:r,middlewareData:d}})(t,e,{...r,platform:n})};function Ai(t){return function(t){for(let e=t;e;e=Di(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=Di(t);e;e=Di(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 Di(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var Ki=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Fi extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return o.html`
|
|
549
549
|
<div part="container"
|
|
550
550
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
551
551
|
@mouseenter=${this.onHover}
|
|
@@ -553,7 +553,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
553
553
|
@focusin=${this.onHover}
|
|
554
554
|
@focusout=${this.onOut}
|
|
555
555
|
@touchstart=${this.onTouch}>
|
|
556
|
-
<slot></slot>
|
|
556
|
+
<slot part="slot"></slot>
|
|
557
557
|
<div part="tooltip" role="tooltip" inert
|
|
558
558
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
559
559
|
?hidden=${!this.visible}>
|
|
@@ -563,14 +563,14 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
563
563
|
</div>
|
|
564
564
|
</div>
|
|
565
565
|
</div>
|
|
566
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Bi(this.slottedElement,this.tooltip,{middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=_o(t,e),c={x:o,y:i},h=await oi(e,l),f=Qo(Go(r)),p=qo(f);let d=c[p],u=c[f];if(n){const t="y"===p?"bottom":"right";d=Mo(d+h["y"===p?"top":"left"],d,d-h[t])}if(a){const t="y"===f?"bottom":"right";u=Mo(u+h["y"===f?"top":"left"],u,u-h[t])}const g=s.fn({...e,[p]:d,[f]:u});return{...g,data:{x:g.x-o,y:g.y-i}}}}),ri({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}
|
|
566
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Bi(this.slottedElement,this.tooltip,{platform:{...zi,getOffsetParent:t=>zi.getOffsetParent(t,Ai)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=_o(t,e),c={x:o,y:i},h=await oi(e,l),f=Qo(Go(r)),p=qo(f);let d=c[p],u=c[f];if(n){const t="y"===p?"bottom":"right";d=Mo(d+h["y"===p?"top":"left"],d,d-h[t])}if(a){const t="y"===f?"bottom":"right";u=Mo(u+h["y"===f?"top":"left"],u,u-h[t])}const g=s.fn({...e,[p]:d,[f]:u});return{...g,data:{x:g.x-o,y:g.y-i}}}}),ri({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Fi.elementDefinitions={"ft-typography":po},Fi.styles=Ao,Ki([r.property()],Fi.prototype,"text",void 0),Ki([r.property({type:Boolean})],Fi.prototype,"manual",void 0),Ki([r.property({type:Boolean})],Fi.prototype,"inline",void 0),Ki([r.property({type:Number})],Fi.prototype,"delay",void 0),Ki([r.property()],Fi.prototype,"position",void 0),Ki([r.queryAssignedNodes()],Fi.prototype,"slotNodes",void 0),Ki([r.query(".ft-tooltip--container")],Fi.prototype,"container",void 0),Ki([r.query(".ft-tooltip")],Fi.prototype,"tooltip",void 0),Ki([r.query(".ft-tooltip--content")],Fi.prototype,"tooltipContent",void 0),Ki([r.state()],Fi.prototype,"visible",void 0),Ki([r.eventOptions({passive:!0})],Fi.prototype,"onTouch",null),Ki([r.eventOptions({passive:!0})],Fi.prototype,"onHover",null),Ki([r.eventOptions({passive:!0})],Fi.prototype,"onOut",null),e.customElement("ft-tooltip")(Fi);class Zi extends e.FtLitElement{render(){return o.html`
|
|
567
567
|
<div class="ft-loader">
|
|
568
568
|
<div></div>
|
|
569
569
|
<div></div>
|
|
570
570
|
<div></div>
|
|
571
571
|
<div></div>
|
|
572
572
|
</div>
|
|
573
|
-
`}}
|
|
573
|
+
`}}Zi.styles=xo,e.customElement("ft-loader")(Zi);var Ti=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Pi extends(e.toFtFormComponent(e.FtLitElement,"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(o.html`
|
|
574
574
|
<button part="button"
|
|
575
575
|
class="${n.classMap(this.buttonClasses)}"
|
|
576
576
|
aria-label="${this.getLabel()}"
|
|
@@ -593,7 +593,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
593
593
|
</ft-tooltip>
|
|
594
594
|
`:t}resolveIcon(){return this.loading?o.html`
|
|
595
595
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?o.html`
|
|
596
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:o.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
596
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:o.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Pi.elementDefinitions={"ft-ripple":it,"ft-tooltip":Fi,"ft-typography":po,"ft-icon":mo,"ft-loader":Zi},Ti([r.property({type:String,reflect:!0})],Pi.prototype,"role",void 0),Ti([r.property()],Pi.prototype,"type",void 0),Ti([r.property({type:Boolean})],Pi.prototype,"disabled",void 0),Ti([r.property()],Pi.prototype,"label",void 0),Ti([r.property()],Pi.prototype,"icon",void 0),Ti([r.property()],Pi.prototype,"iconVariant",void 0),Ti([r.property({type:Boolean})],Pi.prototype,"trailingIcon",void 0),Ti([r.property({type:Boolean})],Pi.prototype,"loading",void 0),Ti([r.property()],Pi.prototype,"tooltipPosition",void 0),Ti([r.property({type:Boolean})],Pi.prototype,"hideTooltip",void 0),Ti([r.property({type:Boolean})],Pi.prototype,"forceTooltip",void 0),Ti([r.query(".ft-button")],Pi.prototype,"button",void 0),Ti([r.query(".ft-button--label slot")],Pi.prototype,"slottedContent",void 0);var Hi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ji extends Pi{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"}}ji.styles=[e.safariEllipsisFix,Eo],Hi([r.property({type:Boolean})],ji.prototype,"primary",void 0),Hi([r.property({type:Boolean})],ji.prototype,"outlined",void 0),Hi([r.property({type:Boolean})],ji.prototype,"dense",void 0),Hi([r.property({type:Boolean})],ji.prototype,"round",void 0);const Mi=[o.css`
|
|
597
597
|
:host {
|
|
598
598
|
display: inline-block;
|
|
599
599
|
max-width: 100%;
|
|
@@ -811,7 +811,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
811
811
|
width: ${Qt.smallIconOnlyWidth};
|
|
812
812
|
padding: unset;
|
|
813
813
|
}
|
|
814
|
-
`,e.noTextSelect];var
|
|
814
|
+
`,e.noTextSelect];var _i=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Gi extends Pi{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?Mt.caption1medium:Mt.body2medium}}Gi.styles=[e.safariEllipsisFix,Mi],_i([r.property({type:Boolean})],Gi.prototype,"primary",void 0),_i([r.property({type:Boolean})],Gi.prototype,"secondary",void 0),_i([r.property({type:Boolean})],Gi.prototype,"tertiary",void 0),_i([r.property({type:Boolean})],Gi.prototype,"neutral",void 0),_i([r.property({type:Boolean})],Gi.prototype,"small",void 0),e.customElement("ft-button")(ji),e.customElement("ftds-button")(Gi);const Vi=e.FtCssVariableFactory.extend("--ft-chip-color","",e.designSystemVariables.colorOnSurface),qi={backgroundColor:e.FtCssVariableFactory.extend("--ft-chip-background-color","",e.designSystemVariables.colorSurface),color:Vi,fontSize:e.FtCssVariableFactory.extend("--ft-chip-font-size","",Ue.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),rippleColor:e.FtCssVariableFactory.extend("--ft-chip-ripple-color","",Vi),horizontalPadding:e.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:e.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),opacityDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOpacityDisabled,"Design system")},Yi=e.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",e.FtCssVariableFactory.extend("--ft-chip-color","",e.designSystemVariables.colorOnPrimary)),Qi={backgroundColor:e.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",e.FtCssVariableFactory.extend("--ft-chip-background-color","",e.designSystemVariables.colorPrimary)),color:Yi,rippleColor:e.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",Yi)},Xi=e.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),Ji=e.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px"),tr=[e.noTextSelect,o.css`
|
|
815
815
|
:host {
|
|
816
816
|
display: inline-block;
|
|
817
817
|
max-width: 100%;
|
|
@@ -827,20 +827,20 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
827
827
|
box-sizing: border-box;
|
|
828
828
|
pointer-events: auto;
|
|
829
829
|
|
|
830
|
-
--ft-chip-internal-font-size: ${
|
|
830
|
+
--ft-chip-internal-font-size: ${qi.fontSize};
|
|
831
831
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
832
|
-
${e.setVariable(uo.size,
|
|
833
|
-
--ft-chip-internal-vertical-padding: ${
|
|
834
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
832
|
+
${e.setVariable(uo.size,qi.iconSize)};
|
|
833
|
+
--ft-chip-internal-vertical-padding: ${qi.verticalPadding};
|
|
834
|
+
--ft-chip-internal-horizontal-padding: ${qi.horizontalPadding};
|
|
835
835
|
--ft-chip-internal-icon-padding: 3px;
|
|
836
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
836
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${qi.iconSize});
|
|
837
837
|
|
|
838
|
-
border: 1px solid ${
|
|
839
|
-
color: ${
|
|
840
|
-
${e.setVariable(V.color,
|
|
838
|
+
border: 1px solid ${qi.colorOutline};
|
|
839
|
+
color: ${qi.color};
|
|
840
|
+
${e.setVariable(V.color,qi.rippleColor)};
|
|
841
841
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
842
842
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
843
|
-
background-color: ${
|
|
843
|
+
background-color: ${qi.backgroundColor};
|
|
844
844
|
line-height: var(--ft-chip-internal-content-height);
|
|
845
845
|
}
|
|
846
846
|
|
|
@@ -850,8 +850,8 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
850
850
|
|
|
851
851
|
.ft-chip--dense {
|
|
852
852
|
--ft-chip-internal-icon-padding: 3px;
|
|
853
|
-
--ft-chip-internal-vertical-padding: ${
|
|
854
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
853
|
+
--ft-chip-internal-vertical-padding: ${Ji};
|
|
854
|
+
--ft-chip-internal-horizontal-padding: ${Xi};
|
|
855
855
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
856
856
|
}
|
|
857
857
|
|
|
@@ -863,15 +863,15 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
863
863
|
cursor: default;
|
|
864
864
|
pointer-events: none;
|
|
865
865
|
filter: grayscale(1);
|
|
866
|
-
opacity: ${
|
|
866
|
+
opacity: ${qi.opacityDisabled};
|
|
867
867
|
}
|
|
868
868
|
|
|
869
869
|
.ft-chip--highlighted {
|
|
870
870
|
border: none;
|
|
871
871
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
872
|
-
background-color: ${
|
|
873
|
-
${e.setVariable(V.color,
|
|
874
|
-
color: ${
|
|
872
|
+
background-color: ${Qi.backgroundColor};
|
|
873
|
+
${e.setVariable(V.color,Qi.rippleColor)};
|
|
874
|
+
color: ${Qi.color};
|
|
875
875
|
}
|
|
876
876
|
|
|
877
877
|
.ft-chip--clickable {
|
|
@@ -901,7 +901,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
901
901
|
}
|
|
902
902
|
|
|
903
903
|
.ft-chip--icon-button {
|
|
904
|
-
${e.setVariable(wo.iconSize,
|
|
904
|
+
${e.setVariable(wo.iconSize,qi.iconSize)};
|
|
905
905
|
${e.setVariable(wo.horizontalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
906
906
|
${e.setVariable(wo.verticalPadding,"var(--ft-chip-internal-icon-padding)")};
|
|
907
907
|
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
@@ -948,7 +948,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
948
948
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
|
|
949
949
|
order: -1;
|
|
950
950
|
}
|
|
951
|
-
`];var
|
|
951
|
+
`];var er=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class or extends CustomEvent{constructor(){super("icon-click")}}class ir extends e.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.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":e.isSafari};return o.html`
|
|
952
952
|
<div class="${n.classMap(t)}"
|
|
953
953
|
aria-label="${this.getLabel()}"
|
|
954
954
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -971,23 +971,23 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
971
971
|
<div class="ft-chip--icon-container ft-no-text-select">
|
|
972
972
|
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}"></ft-icon>
|
|
973
973
|
</div>
|
|
974
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
975
|
-
`;var
|
|
974
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new or))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new or))}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)}}ir.elementDefinitions={"ft-ripple":it,"ft-typography":po,"ft-icon":mo,"ft-button":ji},ir.styles=tr,er([r.property({type:Boolean})],ir.prototype,"highlighted",void 0),er([r.property({type:Boolean})],ir.prototype,"removable",void 0),er([r.property({type:Boolean})],ir.prototype,"disabled",void 0),er([r.property({type:Boolean})],ir.prototype,"clickable",void 0),er([r.property({type:Boolean})],ir.prototype,"iconClickable",void 0),er([r.property({type:Boolean})],ir.prototype,"dense",void 0),er([r.property({type:Boolean})],ir.prototype,"multiLine",void 0),er([r.property()],ir.prototype,"label",void 0),er([r.property()],ir.prototype,"iconLabel",void 0),er([r.property()],ir.prototype,"icon",void 0),er([r.property()],ir.prototype,"iconVariant",void 0),er([r.property({type:Boolean})],ir.prototype,"trailingIcon",void 0),er([r.query("ft-typography slot")],ir.prototype,"slottedContent",void 0),e.customElement("ft-chip")(ir);const rr=o.css`
|
|
975
|
+
`;var nr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const ar=Symbol("i18nProperties"),sr=Symbol("i18nUnsubs");function lr(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?U:R}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[ar])||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[ar])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ar]&&new Set([...this[ar].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[sr].has(t)||this[sr].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[sr].forEach((t=>t())),this[sr].clear()}}return e=sr,nr([r.property({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class cr extends(lr(e.FtLitElement)){}class hr extends(lr(e.FtLitElementRedux)){}var fr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class pr extends hr{constructor(){super(),this.editorMode=!1,this.addStore($)}render(){return this.key&&this.context?o.html`
|
|
976
976
|
<span class="ft-i18n">
|
|
977
977
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
978
978
|
</span>
|
|
979
|
-
`:this.editorMode?"Select a context and a label key.":o.nothing}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:""})}}
|
|
980
|
-
`;var
|
|
979
|
+
`:this.editorMode?"Select a context and a label key.":o.nothing}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:""})}}pr.elementDefinitions={},pr.styles=rr,fr([e.redux()],pr.prototype,"editorMode",void 0),fr([r.property()],pr.prototype,"context",void 0),fr([r.property()],pr.prototype,"key",void 0),fr([e.jsonProperty([])],pr.prototype,"args",void 0),fr([r.property()],pr.prototype,"defaultMessage",void 0);class dr{static build(t){return new dr(t)}static fromGwt(t){return new dr(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)=>R.resolveMessage(this.name,e,...t)})}}e.customElement("ft-i18n")(pr);const ur=o.css`
|
|
980
|
+
`;var gr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class yr extends CustomEvent{constructor(t){super("ft-search-load-error",{detail:t})}}class br extends CustomEvent{constructor(t){super("ft-search-request-change",{detail:t})}}class mr extends CustomEvent{constructor(t,e,o){super("ft-search-results-change",{detail:{request:t,paging:e,spellcheck:o}})}}class vr extends e.FtLitElementRedux{get stateManager(){return null==this._stateManager&&(this._stateManager=P.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($)}render(){return o.html`
|
|
981
981
|
<slot @register-ft-search-component=${this.registerComponent}></slot>
|
|
982
|
-
`}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
|
|
983
|
-
`,
|
|
982
|
+
`}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 br(this.request)),t.has("paging")&&void 0!==this.paging&&this.dispatchEvent(new mr(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 yr(t))}reloadSavedSearches(){K.clearMySearches()}clear(){this.stateManager.clear()}}vr.elementDefinitions={},vr.styles=ur,gr([r.property()],vr.prototype,"query",void 0),gr([r.property()],vr.prototype,"contentLocale",void 0),gr([r.property({type:Number})],vr.prototype,"pageSize",void 0),gr([r.property({type:Boolean})],vr.prototype,"searchInDocumentTitlesOnly",void 0),gr([r.property()],vr.prototype,"scope",void 0),gr([r.property({type:Boolean})],vr.prototype,"ignoreEmptyQuery",void 0),gr([e.jsonProperty([])],vr.prototype,"filters",void 0),gr([e.jsonProperty([])],vr.prototype,"sort",void 0),gr([e.redux({store:"search"})],vr.prototype,"request",void 0),gr([e.redux({store:"search"})],vr.prototype,"paging",void 0),gr([e.redux({store:"search",selector:t=>t.spellcheck})],vr.prototype,"autocorrect",void 0),gr([e.redux({store:$.name})],vr.prototype,"session",void 0),e.customElement("ft-search-context")(vr);const xr=o.css`
|
|
983
|
+
`,Or=e.FtCssVariableFactory.extend("--ft-checkbox-text-color","",e.designSystemVariables.colorOnSurfaceHigh),wr=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Sr=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnPrimary,"Design system"),Nr=e.FtCssVariableFactory.extend("--ft-checkbox-border-color","",e.designSystemVariables.colorOnSurfaceMedium),$r=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Cr=o.css`
|
|
984
984
|
* {
|
|
985
985
|
box-sizing: border-box;
|
|
986
986
|
}
|
|
987
987
|
|
|
988
988
|
.ft-checkbox {
|
|
989
989
|
box-sizing: border-box;
|
|
990
|
-
color: ${
|
|
990
|
+
color: ${Or};
|
|
991
991
|
|
|
992
992
|
display: inline-flex;
|
|
993
993
|
align-items: center;
|
|
@@ -995,7 +995,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
.ft-checkbox--disabled {
|
|
998
|
-
color: ${
|
|
998
|
+
color: ${$r};
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
1001
|
input {
|
|
@@ -1019,26 +1019,26 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1019
1019
|
|
|
1020
1020
|
.ft-checkbox--box {
|
|
1021
1021
|
display: flex;
|
|
1022
|
-
border: 2px solid ${
|
|
1022
|
+
border: 2px solid ${Nr};
|
|
1023
1023
|
border-radius: 2px;
|
|
1024
1024
|
|
|
1025
1025
|
width: 18px;
|
|
1026
1026
|
height: 18px;
|
|
1027
1027
|
|
|
1028
|
-
color: ${
|
|
1028
|
+
color: ${Sr};
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
1031
|
|
|
1032
1032
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
1033
1033
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
1034
|
-
border-color: ${
|
|
1035
|
-
background-color: ${
|
|
1034
|
+
border-color: ${wr};
|
|
1035
|
+
background-color: ${wr};
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
1039
|
-
border-color: ${
|
|
1039
|
+
border-color: ${$r};
|
|
1040
1040
|
background-color: transparent;
|
|
1041
|
-
color: ${
|
|
1041
|
+
color: ${$r};
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
1044
|
.ft-checkbox--checkmark {
|
|
@@ -1057,7 +1057,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1057
1057
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
1058
1058
|
opacity: 1;
|
|
1059
1059
|
}
|
|
1060
|
-
`;var
|
|
1060
|
+
`;var kr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ir extends e.FtLitElement{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return o.html`
|
|
1061
1061
|
<label class="${n.classMap(t)}" for="checkbox-input">
|
|
1062
1062
|
<div class="ft-checkbox--box-container">
|
|
1063
1063
|
<ft-ripple
|
|
@@ -1083,14 +1083,14 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1083
1083
|
<slot></slot>
|
|
1084
1084
|
</ft-typography>
|
|
1085
1085
|
</label>
|
|
1086
|
-
`}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)}}
|
|
1086
|
+
`}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)}}Ir.elementDefinitions={"ft-ripple":it,"ft-typography":po},Ir.styles=Cr,kr([r.property()],Ir.prototype,"name",void 0),kr([r.property({type:Boolean,reflect:!0})],Ir.prototype,"checked",void 0),kr([r.property({type:Boolean})],Ir.prototype,"indeterminate",void 0),kr([r.property({type:Boolean})],Ir.prototype,"disabled",void 0),kr([r.query(".ft-checkbox")],Ir.prototype,"container",void 0),kr([r.query("ft-ripple")],Ir.prototype,"ripple",void 0),e.customElement("ft-checkbox")(Ir);const Er=e.FtCssVariableFactory.extend("--ft-radio-text-color","",e.designSystemVariables.colorOnSurfaceHigh),Rr=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Ur=(e.FtCssVariableFactory.external(e.designSystemVariables.colorOnPrimary,"Design system"),e.FtCssVariableFactory.extend("--ft-radio-border-color","",e.designSystemVariables.colorOnSurfaceMedium)),Lr=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Wr=o.css`
|
|
1087
1087
|
* {
|
|
1088
1088
|
box-sizing: border-box;
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
1091
|
.ft-radio {
|
|
1092
1092
|
box-sizing: border-box;
|
|
1093
|
-
color: ${
|
|
1093
|
+
color: ${Er};
|
|
1094
1094
|
|
|
1095
1095
|
display: inline-flex;
|
|
1096
1096
|
align-items: center;
|
|
@@ -1098,7 +1098,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
1100
|
.ft-radio--disabled {
|
|
1101
|
-
color: ${
|
|
1101
|
+
color: ${Lr};
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
1104
|
input {
|
|
@@ -1121,7 +1121,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1121
1121
|
}
|
|
1122
1122
|
|
|
1123
1123
|
.ft-radio--box {
|
|
1124
|
-
border: 2px solid ${
|
|
1124
|
+
border: 2px solid ${Ur};
|
|
1125
1125
|
border-radius: 50%;
|
|
1126
1126
|
|
|
1127
1127
|
display: flex;
|
|
@@ -1134,7 +1134,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1134
1134
|
|
|
1135
1135
|
.ft-radio--box:after {
|
|
1136
1136
|
content: " ";
|
|
1137
|
-
background-color: ${
|
|
1137
|
+
background-color: ${Rr};
|
|
1138
1138
|
|
|
1139
1139
|
border-radius: 50%;
|
|
1140
1140
|
|
|
@@ -1146,7 +1146,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
1148
|
.ft-radio--checked .ft-radio--box {
|
|
1149
|
-
border-color: ${
|
|
1149
|
+
border-color: ${Rr};
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
1152
|
|
|
@@ -1155,14 +1155,14 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
1157
|
.ft-radio--disabled .ft-radio--box {
|
|
1158
|
-
border-color: ${
|
|
1158
|
+
border-color: ${Lr};
|
|
1159
1159
|
background-color: transparent;
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
1162
|
.ft-radio--disabled .ft-radio--box:after {
|
|
1163
|
-
background-color: ${
|
|
1163
|
+
background-color: ${Lr};
|
|
1164
1164
|
}
|
|
1165
|
-
`;var
|
|
1165
|
+
`;var zr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Br extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Ar extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return o.html`
|
|
1166
1166
|
<div class="${n.classMap(t)}">
|
|
1167
1167
|
<div class="ft-radio--box-container">
|
|
1168
1168
|
<ft-ripple
|
|
@@ -1187,16 +1187,16 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1187
1187
|
</ft-typography>
|
|
1188
1188
|
</label>
|
|
1189
1189
|
</div>
|
|
1190
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
1190
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Br(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 Br(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Ar.elementDefinitions={"ft-ripple":it,"ft-typography":po},Ar.styles=Wr,zr([r.property()],Ar.prototype,"value",void 0),zr([r.property()],Ar.prototype,"name",void 0),zr([r.property({type:Boolean,reflect:!0})],Ar.prototype,"checked",void 0),zr([r.property({type:Boolean})],Ar.prototype,"disabled",void 0),zr([r.query(".ft-radio")],Ar.prototype,"container",void 0),zr([r.query("ft-ripple")],Ar.prototype,"ripple",void 0),zr([r.query("input")],Ar.prototype,"input",void 0);const Dr=o.css`
|
|
1191
1191
|
:host {
|
|
1192
1192
|
display: contents;
|
|
1193
1193
|
}
|
|
1194
|
-
`;var
|
|
1194
|
+
`;var Kr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Fr extends e.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return o.html`
|
|
1195
1195
|
<slot @slotchange=${this.onSlotChange}
|
|
1196
1196
|
@change=${this.onChange}
|
|
1197
1197
|
@keydown=${this.onKeyDown}
|
|
1198
1198
|
></slot>
|
|
1199
|
-
`}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)}}
|
|
1199
|
+
`}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)}}Fr.elementDefinitions={},Fr.styles=Dr,Kr([r.property()],Fr.prototype,"name",void 0),Kr([r.queryAssignedElements()],Fr.prototype,"radioButtons",void 0),e.customElement("ft-radio")(Ar),e.customElement("ft-radio-group")(Fr);const Zr={borderRadiusM:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusM,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:e.FtCssVariableFactory.external(Ue.fontFamily,"Body2 typography"),fontSize:e.FtCssVariableFactory.external(Ue.fontSize,"Body2 typography"),fontWeight:e.FtCssVariableFactory.external(Ue.fontWeight,"Body2 typography"),letterSpacing:e.FtCssVariableFactory.external(Ue.letterSpacing,"Body2 typography"),lineHeight:e.FtCssVariableFactory.external(Ue.lineHeight,"Body2 typography"),textTransform:e.FtCssVariableFactory.external(Ue.textTransform,"Body2 typography")},Tr=o.css`
|
|
1200
1200
|
.ft-filter-level--container {
|
|
1201
1201
|
display: flex;
|
|
1202
1202
|
flex-direction: column;
|
|
@@ -1210,14 +1210,14 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1210
1210
|
flex-shrink: 0;
|
|
1211
1211
|
text-decoration: none;
|
|
1212
1212
|
position: relative;
|
|
1213
|
-
border-radius: ${
|
|
1213
|
+
border-radius: ${Zr.borderRadiusM};
|
|
1214
1214
|
overflow: hidden;
|
|
1215
1215
|
display: flex;
|
|
1216
1216
|
align-items: center;
|
|
1217
1217
|
padding: 4px 4px;
|
|
1218
1218
|
gap: 4px;
|
|
1219
1219
|
cursor: pointer;
|
|
1220
|
-
color: ${
|
|
1220
|
+
color: ${Zr.colorOnSurface};
|
|
1221
1221
|
}
|
|
1222
1222
|
|
|
1223
1223
|
.ft-filter-level--go-back:focus {
|
|
@@ -1246,7 +1246,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1246
1246
|
}
|
|
1247
1247
|
|
|
1248
1248
|
ft-button {
|
|
1249
|
-
${e.setVariable(wo.color,
|
|
1249
|
+
${e.setVariable(wo.color,Zr.colorOnSurface)};
|
|
1250
1250
|
}
|
|
1251
1251
|
|
|
1252
1252
|
ft-radio, ft-checkbox {
|
|
@@ -1260,9 +1260,9 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1260
1260
|
|
|
1261
1261
|
.ft-filter-level--no-values {
|
|
1262
1262
|
margin: 10px 0;
|
|
1263
|
-
color: ${
|
|
1263
|
+
color: ${Zr.colorOnSurfaceMedium};
|
|
1264
1264
|
}
|
|
1265
|
-
`;var
|
|
1265
|
+
`;var Pr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Hr extends e.FtLitElement{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 o.html`
|
|
1266
1266
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
1267
1267
|
${null==this.parent?null:o.html`
|
|
1268
1268
|
<div tabindex="0"
|
|
@@ -1326,7 +1326,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1326
1326
|
@change=${t=>t.stopPropagation()}>
|
|
1327
1327
|
${t.renderOption?t.renderOption:t.label}
|
|
1328
1328
|
</ft-radio>
|
|
1329
|
-
`}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}))}}
|
|
1329
|
+
`}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}))}}Hr.elementDefinitions={"ft-button":ji,"ft-ripple":it,"ft-typography":po,"ft-checkbox":Ir,"ft-icon":mo,"ft-radio":Ar},Hr.styles=Tr,Pr([r.property({type:String})],Hr.prototype,"filterId",void 0),Pr([r.property({type:Object})],Hr.prototype,"parent",void 0),Pr([r.property({type:Array})],Hr.prototype,"options",void 0),Pr([r.property({type:Boolean})],Hr.prototype,"multivalued",void 0),Pr([r.property({type:Boolean})],Hr.prototype,"disabled",void 0),Pr([r.property({type:Boolean})],Hr.prototype,"hideSelectedOptions",void 0),Pr([r.property({type:Boolean})],Hr.prototype,"preventNavigation",void 0),Pr([r.property({type:String})],Hr.prototype,"filter",void 0),Pr([r.property({type:String})],Hr.prototype,"moreValuesButtonLabel",void 0),Pr([r.property({type:String})],Hr.prototype,"noValuesLabel",void 0),Pr([r.property({type:Number})],Hr.prototype,"displayedValuesLimit",void 0),Pr([r.query(".ft-filter-level--container")],Hr.prototype,"container",void 0),Pr([r.state()],Hr.prototype,"displayedPages",void 0);const jr={buttonsColor:e.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color","",e.designSystemVariables.colorPrimary),buttonsZIndex:e.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","","COLOR","1"),gap:e.FtCssVariableFactory.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system")},Mr=o.css`
|
|
1330
1330
|
.ft-snap-scroll {
|
|
1331
1331
|
box-sizing: border-box;
|
|
1332
1332
|
position: relative;
|
|
@@ -1361,7 +1361,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1361
1361
|
flex-wrap: nowrap;
|
|
1362
1362
|
align-items: flex-start;
|
|
1363
1363
|
justify-content: flex-start;
|
|
1364
|
-
gap: ${
|
|
1364
|
+
gap: ${jr.gap};
|
|
1365
1365
|
}
|
|
1366
1366
|
|
|
1367
1367
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1404,11 +1404,11 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1404
1404
|
.ft-snap-scroll--next {
|
|
1405
1405
|
position: absolute;
|
|
1406
1406
|
display: flex;
|
|
1407
|
-
z-index: ${
|
|
1407
|
+
z-index: ${jr.buttonsZIndex};
|
|
1408
1408
|
opacity: 1;
|
|
1409
1409
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1410
1410
|
${e.setVariable(wo.backgroundColor,"transparent")};
|
|
1411
|
-
${e.setVariable(wo.color,
|
|
1411
|
+
${e.setVariable(wo.color,jr.buttonsColor)};
|
|
1412
1412
|
}
|
|
1413
1413
|
|
|
1414
1414
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1421,37 +1421,37 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1421
1421
|
top: 0;
|
|
1422
1422
|
left: -1px;
|
|
1423
1423
|
bottom: 0;
|
|
1424
|
-
background: linear-gradient(to right, ${
|
|
1424
|
+
background: linear-gradient(to right, ${jr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1425
1425
|
}
|
|
1426
1426
|
|
|
1427
1427
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1428
1428
|
top: -1px;
|
|
1429
1429
|
left: 0;
|
|
1430
1430
|
right: 0;
|
|
1431
|
-
background: linear-gradient(to bottom, ${
|
|
1431
|
+
background: linear-gradient(to bottom, ${jr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1432
1432
|
}
|
|
1433
1433
|
|
|
1434
1434
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1435
1435
|
top: 0;
|
|
1436
1436
|
right: -1px;
|
|
1437
1437
|
bottom: 0;
|
|
1438
|
-
background: linear-gradient(to left, ${
|
|
1438
|
+
background: linear-gradient(to left, ${jr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
1441
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1442
1442
|
left: 0;
|
|
1443
1443
|
right: 0;
|
|
1444
1444
|
bottom: -1px;
|
|
1445
|
-
background: linear-gradient(to top, ${
|
|
1445
|
+
background: linear-gradient(to top, ${jr.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1446
1446
|
}
|
|
1447
1447
|
|
|
1448
1448
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1449
1449
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1450
1450
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1451
1451
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1452
|
-
background-color: ${
|
|
1452
|
+
background-color: ${jr.colorSurface};
|
|
1453
1453
|
}
|
|
1454
|
-
`;var
|
|
1454
|
+
`;var _r=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Gr extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class Vr extends e.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e.Debouncer(200),this.updateScrollDebouncer=new e.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,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=n.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":e.isSafari}),i=this.controls&&this.withScroll;return o.html`
|
|
1455
1455
|
<div part="container" class="${t}">
|
|
1456
1456
|
<ft-button
|
|
1457
1457
|
class="ft-snap-scroll--previous"
|
|
@@ -1475,7 +1475,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1475
1475
|
@click=${this.next}
|
|
1476
1476
|
></ft-button>
|
|
1477
1477
|
</div>
|
|
1478
|
-
`}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
|
|
1478
|
+
`}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 Gr(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)}}Vr.elementDefinitions={"ft-button":ji},Vr.styles=Mr,_r([r.property({type:Boolean})],Vr.prototype,"horizontal",void 0),_r([r.property({type:Boolean})],Vr.prototype,"hideScrollbar",void 0),_r([r.property({type:Boolean})],Vr.prototype,"controls",void 0),_r([r.property({type:Boolean})],Vr.prototype,"limitSize",void 0),_r([r.state()],Vr.prototype,"elements",void 0),_r([r.state()],Vr.prototype,"currentElement",void 0),_r([r.state()],Vr.prototype,"withScroll",void 0),_r([r.state()],Vr.prototype,"startReached",void 0),_r([r.state()],Vr.prototype,"endReached",void 0),_r([r.query(".ft-snap-scroll--content")],Vr.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(Vr);const qr=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Yr=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),Qr=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Xr=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Jr=e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),tn=e.FtCssVariableFactory.external(e.designSystemVariables.transitionDuration,"Design system"),en=e.FtCssVariableFactory.external(e.designSystemVariables.transitionTimingFunction,"Design system"),on=[io,o.css`
|
|
1479
1479
|
:host {
|
|
1480
1480
|
display: flex;
|
|
1481
1481
|
max-height: 100%;
|
|
@@ -1488,7 +1488,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1488
1488
|
flex-direction: column;
|
|
1489
1489
|
max-height: 100%;
|
|
1490
1490
|
max-width: 100%;
|
|
1491
|
-
color: ${
|
|
1491
|
+
color: ${Yr};
|
|
1492
1492
|
}
|
|
1493
1493
|
|
|
1494
1494
|
.ft-filter--header {
|
|
@@ -1524,8 +1524,8 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1524
1524
|
padding: 0 10px;
|
|
1525
1525
|
overflow: hidden;
|
|
1526
1526
|
height: 32px;
|
|
1527
|
-
transition: height ${
|
|
1528
|
-
margin ${
|
|
1527
|
+
transition: height ${tn} ${en},
|
|
1528
|
+
margin ${tn} ${en};
|
|
1529
1529
|
transition-delay: 500ms;
|
|
1530
1530
|
}
|
|
1531
1531
|
|
|
@@ -1538,15 +1538,15 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1538
1538
|
display: block;
|
|
1539
1539
|
width: 100%;
|
|
1540
1540
|
border-radius: 4px;
|
|
1541
|
-
border: 1px solid ${
|
|
1541
|
+
border: 1px solid ${qr};
|
|
1542
1542
|
padding: 4px;
|
|
1543
|
-
background-color: ${
|
|
1544
|
-
color: ${
|
|
1545
|
-
outline-color: ${
|
|
1543
|
+
background-color: ${Jr};
|
|
1544
|
+
color: ${Yr};
|
|
1545
|
+
outline-color: ${Xr};
|
|
1546
1546
|
}
|
|
1547
1547
|
|
|
1548
1548
|
input::placeholder {
|
|
1549
|
-
color: ${
|
|
1549
|
+
color: ${Qr};
|
|
1550
1550
|
}
|
|
1551
1551
|
|
|
1552
1552
|
input:placeholder-shown {
|
|
@@ -1562,7 +1562,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1562
1562
|
}
|
|
1563
1563
|
|
|
1564
1564
|
.ft-filter--separator {
|
|
1565
|
-
border-top: 1px solid ${
|
|
1565
|
+
border-top: 1px solid ${qr};
|
|
1566
1566
|
margin: 4px 10px;
|
|
1567
1567
|
}
|
|
1568
1568
|
|
|
@@ -1587,7 +1587,7 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1587
1587
|
slot:not([name]) {
|
|
1588
1588
|
display: none;
|
|
1589
1589
|
}
|
|
1590
|
-
`];var
|
|
1590
|
+
`];var rn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class nn extends CustomEvent{constructor(t){super("change",{detail:t})}}class an extends e.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e.Debouncer(300),this.changeDebouncer=new e.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return e.flatDeep(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get childrenFilteredFlatOptions(){return e.flatDeep(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,i=this.filterPlaceHolder.replace("{0}",this.label);return o.html`
|
|
1591
1591
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1592
1592
|
part="container">
|
|
1593
1593
|
${this.label||t?o.html`
|
|
@@ -1659,18 +1659,18 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1659
1659
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1660
1660
|
noValuesLabel="${this.noValuesLabel}"
|
|
1661
1661
|
></ft-filter-level>
|
|
1662
|
-
`}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;e.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new
|
|
1662
|
+
`}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;e.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new nn(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)}}an.elementDefinitions={"ft-button":ji,"ft-filter-level":Hr,"ft-snap-scroll":Vr,"ft-typography":po},an.styles=on,rn([r.property({type:String})],an.prototype,"id",void 0),rn([r.property({type:String})],an.prototype,"label",void 0),rn([r.property({type:String})],an.prototype,"filterPlaceHolder",void 0),rn([r.property({type:String})],an.prototype,"clearButtonLabel",void 0),rn([r.property({type:String})],an.prototype,"moreValuesButtonLabel",void 0),rn([r.property({type:String})],an.prototype,"noValuesLabel",void 0),rn([e.jsonProperty([])],an.prototype,"options",void 0),rn([r.property({type:Boolean})],an.prototype,"multivalued",void 0),rn([r.property({type:Boolean})],an.prototype,"disabled",void 0),rn([r.property({type:Boolean})],an.prototype,"raiseSelectedOptions",void 0),rn([r.property({type:Number})],an.prototype,"displayedValuesLimit",void 0),rn([r.property({type:Boolean})],an.prototype,"hideClearButton",void 0),rn([r.query(".ft-filter--slot")],an.prototype,"slotElement",void 0),rn([r.query(".ft-filter--container")],an.prototype,"container",void 0),rn([r.query(".ft-filter--values")],an.prototype,"valuesContainer",void 0),rn([r.query(".ft-filter--levels")],an.prototype,"levelsContainer",void 0),rn([r.state()],an.prototype,"lastLevelHasHiddenvalues",void 0),rn([r.query(".ft-filter--filter input")],an.prototype,"filterInput",void 0),rn([r.queryAll(".ft-filter--levels ft-filter-level")],an.prototype,"levels",void 0),rn([r.state()],an.prototype,"withScroll",void 0),rn([r.state()],an.prototype,"filter",void 0),rn([r.state()],an.prototype,"slideIn",void 0),rn([r.state()],an.prototype,"slideOut",void 0);var sn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ln extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return o.html`
|
|
1663
1663
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1664
|
-
`}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}))}}
|
|
1664
|
+
`}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}))}}ln.elementDefinitions={},sn([r.property({type:String})],ln.prototype,"label",void 0),sn([r.property({type:Object,converter:t=>t})],ln.prototype,"value",void 0),sn([r.property({type:Boolean,reflect:!0})],ln.prototype,"selected",void 0),sn([r.property({type:Object})],ln.prototype,"subOptions",void 0),sn([e.jsonProperty({})],ln.prototype,"renderOption",void 0),sn([r.query(".ft-filter-option--slot")],ln.prototype,"slotElement",void 0),e.customElement("ft-filter")(an),e.customElement("ft-filter-option")(ln);const cn=dr.build("designedSearchType"),hn={label:"Search scope",documentTitlesOnly:"Search in document titles only"};var fn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class pn extends(lr(_)){constructor(){super(),this.addI18nContext(cn,hn)}render(){return o.html`
|
|
1665
1665
|
<ft-filter
|
|
1666
|
-
label=${
|
|
1667
|
-
.options=${[{label:
|
|
1666
|
+
label=${cn.messages.label()}
|
|
1667
|
+
.options=${[{label:cn.messages.documentTitlesOnly(),value:t=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setSearchInDocumentTitlesOnly(t)},selected:this.searchInDocumentTitlesOnly}]}
|
|
1668
1668
|
part="filter"
|
|
1669
1669
|
.exportpartsPrefixes=${["filter"]}
|
|
1670
1670
|
multivalued
|
|
1671
1671
|
@change=${this.onSelected}
|
|
1672
1672
|
></ft-filter>
|
|
1673
|
-
`}onSelected(t){var e;null===(e=this.filter)||void 0===e||e.options.forEach((t=>t.value(t.selected)))}}
|
|
1673
|
+
`}onSelected(t){var e;null===(e=this.filter)||void 0===e||e.options.forEach((t=>t.value(t.selected)))}}pn.elementDefinitions={"ft-filter":an},pn.styles=xr,fn([e.redux({selector:Z})],pn.prototype,"searchInDocumentTitlesOnly",void 0),fn([r.query("ft-filter")],pn.prototype,"filter",void 0),e.customElement("ft-search-type")(pn);var dn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class un extends(lr(_)){constructor(){super(),this.editorMode=!1,this.addStore($),this.addI18nContext(cn,hn)}render(){return this.editorMode?this.renderDummyFacet():null!=this.facets&&0!==this.facets.length||this.searchInDocumentTitlesOnly?o.html`
|
|
1674
1674
|
|
|
1675
1675
|
<div class="ft-search-selected-facets--container">
|
|
1676
1676
|
${i.repeat(this.facets||[],(t=>t.key),(t=>{const e=this.getSelectedValues(t);return i.repeat(e,(e=>t.key+"-"+e),(o=>this.renderFacet(t.key,t.label,e,o)))}))}
|
|
@@ -1694,13 +1694,13 @@ const Zt=Symbol.for(""),Tt=t=>{if(t?.r===Zt)return t?._$litStatic$},Pt=t=>({_$li
|
|
|
1694
1694
|
</ft-chip>
|
|
1695
1695
|
</ft-tooltip>
|
|
1696
1696
|
`}getSelectedValues(t){return e.flatDeep(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?o.html`
|
|
1697
|
-
<ft-tooltip inline text="${
|
|
1697
|
+
<ft-tooltip inline text="${cn.messages.documentTitlesOnly()}"
|
|
1698
1698
|
part="tooltips tooltip-search-in-document-titles-only">
|
|
1699
1699
|
<ft-chip
|
|
1700
1700
|
part="ft-search-selected-facets ft-search-selected-facet-search-in-document-titles-only"
|
|
1701
1701
|
removable
|
|
1702
1702
|
@icon-click=${()=>{var t;return null===(t=this.stateManager)||void 0===t?void 0:t.setSearchInDocumentTitlesOnly(!1)}}>
|
|
1703
|
-
${
|
|
1703
|
+
${cn.messages.documentTitlesOnly()}
|
|
1704
1704
|
</ft-chip>
|
|
1705
1705
|
</ft-tooltip>
|
|
1706
|
-
`:o.nothing}}
|
|
1706
|
+
`:o.nothing}}un.elementDefinitions={"ft-chip":ir,"ft-tooltip":Fi},un.styles=l,dn([e.redux({store:"search"})],un.prototype,"facets",void 0),dn([e.redux({store:"search",selector:Z})],un.prototype,"searchInDocumentTitlesOnly",void 0),dn([e.redux({store:$.name})],un.prototype,"editorMode",void 0),e.customElement("ft-search-selected-facets")(un),t.FtSearchSelectedFacets=un,t.FtSearchSelectedFacetsCssVariables=s,t.styles=l}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|