@fluid-topics/ft-search-bar 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-bar.light.js +22 -20
- package/build/ft-search-bar.min.js +65 -63
- package/package.json +14 -14
|
@@ -236,7 +236,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
236
236
|
<div class="ft-ripple--background"></div>
|
|
237
237
|
<div class="ft-ripple--effect"></div>
|
|
238
238
|
</div>
|
|
239
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const
|
|
239
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}ge.elementDefinitions={},ge.styles=be,ve([o.property({type:Boolean})],ge.prototype,"primary",void 0),ve([o.property({type:Boolean})],ge.prototype,"secondary",void 0),ve([o.property({type:Boolean})],ge.prototype,"unbounded",void 0),ve([o.property({type:Boolean})],ge.prototype,"activated",void 0),ve([o.property({type:Boolean})],ge.prototype,"selected",void 0),ve([o.property({type:Boolean})],ge.prototype,"disabled",void 0),ve([o.state()],ge.prototype,"hovered",void 0),ve([o.state()],ge.prototype,"focused",void 0),ve([o.state()],ge.prototype,"pressed",void 0),ve([o.state()],ge.prototype,"rippling",void 0),ve([o.state()],ge.prototype,"rippleSize",void 0),ve([o.state()],ge.prototype,"originX",void 0),ve([o.state()],ge.prototype,"originY",void 0),ve([o.query(".ft-ripple")],ge.prototype,"ripple",void 0),ve([o.query(".ft-ripple--effect")],ge.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ge);const xe={distance:e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),color:e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),maxWidth:e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px")},ye=i.css`
|
|
240
240
|
.ft-tooltip--container {
|
|
241
241
|
display: block;
|
|
242
242
|
position: relative;
|
|
@@ -286,7 +286,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
286
286
|
</div>
|
|
287
287
|
</div>
|
|
288
288
|
</div>
|
|
289
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${xe.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}$e.elementDefinitions={"ft-typography":ie},$e.styles=ye,me([o.property()],$e.prototype,"text",void 0),me([o.property({type:Boolean})],$e.prototype,"manual",void 0),me([o.property({type:Boolean})],$e.prototype,"inline",void 0),me([o.property({type:Number})],$e.prototype,"delay",void 0),me([o.property()],$e.prototype,"position",void 0),me([o.queryAssignedNodes("",!0)],$e.prototype,"slotNodes",void 0),me([o.query(".ft-tooltip--container")],$e.prototype,"container",void 0),me([o.query("slot")],$e.prototype,"target",void 0),me([o.query(".ft-tooltip")],$e.prototype,"tooltip",void 0),me([o.query(".ft-tooltip--content")],$e.prototype,"tooltipContent",void 0),me([o.state()],$e.prototype,"visible",void 0),e.customElement("ft-tooltip")($e);const we={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},ke=i.css`
|
|
289
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${xe.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}$e.elementDefinitions={"ft-typography":ie},$e.styles=ye,me([o.property()],$e.prototype,"text",void 0),me([o.property({type:Boolean})],$e.prototype,"manual",void 0),me([o.property({type:Boolean})],$e.prototype,"inline",void 0),me([o.property({type:Number})],$e.prototype,"delay",void 0),me([o.property()],$e.prototype,"position",void 0),me([o.queryAssignedNodes("",!0)],$e.prototype,"slotNodes",void 0),me([o.query(".ft-tooltip--container")],$e.prototype,"container",void 0),me([o.query("slot")],$e.prototype,"target",void 0),me([o.query(".ft-tooltip")],$e.prototype,"tooltip",void 0),me([o.query(".ft-tooltip--content")],$e.prototype,"tooltipContent",void 0),me([o.state()],$e.prototype,"visible",void 0),e.customElement("ft-tooltip")($e);const we={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},ke=i.css`
|
|
290
290
|
:host {
|
|
291
291
|
line-height: 0;
|
|
292
292
|
}
|
|
@@ -858,7 +858,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
858
858
|
margin: 10px 0;
|
|
859
859
|
color: ${hi.colorOnSurfaceMedium};
|
|
860
860
|
}
|
|
861
|
-
`;var fi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class di extends e.FtLitElement{constructor(){super(...arguments),this.
|
|
861
|
+
`;var fi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class di 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 i.html`
|
|
862
862
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
863
863
|
${null==this.parent?null:i.html`
|
|
864
864
|
<div tabindex="0"
|
|
@@ -902,7 +902,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
902
902
|
`:i.nothing}
|
|
903
903
|
</div>
|
|
904
904
|
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return i.html`
|
|
905
|
-
<ft-checkbox name="${this.
|
|
905
|
+
<ft-checkbox name="${this.filterId}"
|
|
906
906
|
part="multivalued-option"
|
|
907
907
|
data-value="${t.value}"
|
|
908
908
|
.checked=${t.selected}
|
|
@@ -912,7 +912,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
912
912
|
${t.renderOption?t.renderOption:t.label}
|
|
913
913
|
</ft-checkbox>
|
|
914
914
|
`}buildMonoValuedOption(t){return i.html`
|
|
915
|
-
<ft-radio name="${this.
|
|
915
|
+
<ft-radio name="${this.filterId+Math.round(1e6*Math.random())}"
|
|
916
916
|
part="monovalued-option"
|
|
917
917
|
data-value="${t.value}"
|
|
918
918
|
.checked=${t.selected}
|
|
@@ -922,7 +922,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
922
922
|
@change=${t=>t.stopPropagation()}>
|
|
923
923
|
${t.renderOption?t.renderOption:t.label}
|
|
924
924
|
</ft-radio>
|
|
925
|
-
`}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}))}}di.elementDefinitions={"ft-button":He,"ft-ripple":ge,"ft-typography":ie,"ft-checkbox":Je,"ft-icon":Le,"ft-radio":ri},di.styles=pi,fi([o.property({type:String})],di.prototype,"
|
|
925
|
+
`}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}))}}di.elementDefinitions={"ft-button":He,"ft-ripple":ge,"ft-typography":ie,"ft-checkbox":Je,"ft-icon":Le,"ft-radio":ri},di.styles=pi,fi([o.property({type:String})],di.prototype,"filterId",void 0),fi([o.property({type:Object})],di.prototype,"parent",void 0),fi([o.property({type:Array})],di.prototype,"options",void 0),fi([o.property({type:Boolean})],di.prototype,"multivalued",void 0),fi([o.property({type:Boolean})],di.prototype,"disabled",void 0),fi([o.property({type:Boolean})],di.prototype,"hideSelectedOptions",void 0),fi([o.property({type:Boolean})],di.prototype,"preventNavigation",void 0),fi([o.property({type:String})],di.prototype,"filter",void 0),fi([o.property({type:String})],di.prototype,"moreValuesButtonLabel",void 0),fi([o.property({type:String})],di.prototype,"noValuesLabel",void 0),fi([o.property({type:Number})],di.prototype,"displayedValuesLimit",void 0),fi([o.query(".ft-filter-level--container")],di.prototype,"container",void 0),fi([o.state()],di.prototype,"displayedPages",void 0);const ui={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")},bi=i.css`
|
|
926
926
|
.ft-snap-scroll {
|
|
927
927
|
box-sizing: border-box;
|
|
928
928
|
position: relative;
|
|
@@ -1180,30 +1180,32 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1180
1180
|
height: 0;
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
|
-
slot {
|
|
1183
|
+
slot:not([name]) {
|
|
1184
1184
|
display: none;
|
|
1185
1185
|
}
|
|
1186
|
-
`];var Bi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ei extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ci 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.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e.Debouncer(300),this.changeDebouncer=new e.Debouncer(10)}get flatOptions(){return oe(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){
|
|
1186
|
+
`];var Bi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ei extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ci 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 oe(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),e=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,o=this.filterPlaceHolder.replace("{0}",this.label);return i.html`
|
|
1187
1187
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1188
1188
|
part="container">
|
|
1189
|
-
${this.label||
|
|
1189
|
+
${this.label||t?i.html`
|
|
1190
1190
|
<div class="ft-filter--header" part="header">
|
|
1191
|
-
<ft-typography class="ft-filter--label" variant="overline" part="label"
|
|
1191
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">
|
|
1192
|
+
${this.label}
|
|
1192
1193
|
</ft-typography>
|
|
1193
|
-
|
|
1194
|
+
<slot name="label"></slot>
|
|
1195
|
+
${t&&!this.hideClearButton?i.html`
|
|
1194
1196
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1195
1197
|
${this.clearButtonLabel}
|
|
1196
1198
|
</ft-button>
|
|
1197
1199
|
`:null}
|
|
1198
1200
|
</div>
|
|
1199
1201
|
`:null}
|
|
1200
|
-
<div class="ft-filter--filter" ?hidden=${!
|
|
1202
|
+
<div class="ft-filter--filter" ?hidden=${!e}>
|
|
1201
1203
|
<input type="search"
|
|
1202
1204
|
part="input"
|
|
1203
1205
|
class="ft-typography--caption"
|
|
1204
|
-
?disabled=${!
|
|
1205
|
-
placeholder="${
|
|
1206
|
-
size="${
|
|
1206
|
+
?disabled=${!e}
|
|
1207
|
+
placeholder="${o}"
|
|
1208
|
+
size="${e?o.length:0}"
|
|
1207
1209
|
@search=${this.onFilterChange}
|
|
1208
1210
|
@keyup=${this.onFilterChange}>
|
|
1209
1211
|
</div>
|
|
@@ -1214,10 +1216,10 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1214
1216
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1215
1217
|
@option-change=${this.optionsChanged}></slot>
|
|
1216
1218
|
</div>
|
|
1217
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,s=o<0?"ft-filter--level-center":"ft-filter--level-left";return i.html`
|
|
1219
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i,o,s,n;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300)),this.lastLevelHasHiddenvalues=null!==(n=null===(s=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(".ft-filter--levels ft-filter-level:last-child"))||void 0===s?void 0:s.hasHiddenValues)&&void 0!==n&&n}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,s=o<0?"ft-filter--level-center":"ft-filter--level-left";return i.html`
|
|
1218
1220
|
${this.raiseSelectedOptions&&e.length>0?i.html`
|
|
1219
1221
|
<ft-filter-level
|
|
1220
|
-
|
|
1222
|
+
filterId="${this.id}"
|
|
1221
1223
|
?multivalued=${this.multivalued}
|
|
1222
1224
|
?disabled=${this.disabled}
|
|
1223
1225
|
preventNavigation
|
|
@@ -1237,7 +1239,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1237
1239
|
`}renderLevel(t,e,o){return i.html`
|
|
1238
1240
|
<ft-filter-level
|
|
1239
1241
|
class="${t}"
|
|
1240
|
-
|
|
1242
|
+
filterId="${this.id}"
|
|
1241
1243
|
.filter="${this.filter}"
|
|
1242
1244
|
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1243
1245
|
?multivalued=${this.multivalued}
|
|
@@ -1253,7 +1255,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1253
1255
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1254
1256
|
noValuesLabel="${this.noValuesLabel}"
|
|
1255
1257
|
></ft-filter-level>
|
|
1256
|
-
`}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 i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.
|
|
1258
|
+
`}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 i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),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 Ei(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)}}Ci.elementDefinitions={"ft-button":He,"ft-filter-level":di,"ft-snap-scroll":xi,"ft-typography":ie},Ci.styles=Oi,Bi([o.property({type:String})],Ci.prototype,"id",void 0),Bi([o.property({type:String})],Ci.prototype,"label",void 0),Bi([o.property({type:String})],Ci.prototype,"filterPlaceHolder",void 0),Bi([o.property({type:String})],Ci.prototype,"clearButtonLabel",void 0),Bi([o.property({type:String})],Ci.prototype,"moreValuesButtonLabel",void 0),Bi([o.property({type:String})],Ci.prototype,"noValuesLabel",void 0),Bi([e.jsonProperty([])],Ci.prototype,"options",void 0),Bi([o.property({type:Boolean})],Ci.prototype,"multivalued",void 0),Bi([o.property({type:Boolean})],Ci.prototype,"disabled",void 0),Bi([o.property({type:Boolean})],Ci.prototype,"raiseSelectedOptions",void 0),Bi([o.property({type:Number})],Ci.prototype,"displayedValuesLimit",void 0),Bi([o.property({type:Boolean})],Ci.prototype,"hideClearButton",void 0),Bi([o.query(".ft-filter--slot")],Ci.prototype,"slotElement",void 0),Bi([o.query(".ft-filter--container")],Ci.prototype,"container",void 0),Bi([o.query(".ft-filter--values")],Ci.prototype,"valuesContainer",void 0),Bi([o.query(".ft-filter--levels")],Ci.prototype,"levelsContainer",void 0),Bi([o.state()],Ci.prototype,"lastLevelHasHiddenvalues",void 0),Bi([o.query(".ft-filter--filter input")],Ci.prototype,"filterInput",void 0),Bi([o.queryAll(".ft-filter--levels ft-filter-level")],Ci.prototype,"levels",void 0),Bi([o.state()],Ci.prototype,"withScroll",void 0),Bi([o.state()],Ci.prototype,"filter",void 0),Bi([o.state()],Ci.prototype,"slideIn",void 0),Bi([o.state()],Ci.prototype,"slideOut",void 0);var Ii=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Fi extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return i.html`
|
|
1257
1259
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1258
1260
|
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Fi.elementDefinitions={},Ii([o.property({type:String})],Fi.prototype,"label",void 0),Ii([o.property({type:Object,converter:t=>t})],Fi.prototype,"value",void 0),Ii([o.property({type:Boolean,reflect:!0})],Fi.prototype,"selected",void 0),Ii([o.property({type:Object})],Fi.prototype,"subOptions",void 0),Ii([e.jsonProperty({})],Fi.prototype,"renderOption",void 0),Ii([o.query(".ft-filter-option--slot")],Fi.prototype,"slotElement",void 0),e.customElement("ft-filter")(Ci),e.customElement("ft-filter-option")(Fi);const Di=i.css`
|
|
1259
1261
|
.ft-accordion {
|
|
@@ -1826,7 +1828,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
1826
1828
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1827
1829
|
<span>${t.label}</span>
|
|
1828
1830
|
</div>
|
|
1829
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}no.elementDefinitions={"ft-input-label":to,"ft-typography":ie,"ft-ripple":ge,"ft-icon":Le},no.styles=[Gt,Xt,io],oo([o.property({type:String})],no.prototype,"label",void 0),oo([o.property({type:String})],no.prototype,"helper",void 0),oo([o.property({type:Boolean})],no.prototype,"outlined",void 0),oo([o.property({type:Boolean})],no.prototype,"disabled",void 0),oo([o.property({type:Boolean})],no.prototype,"error",void 0),oo([o.property({type:Boolean})],no.prototype,"fixedMenuPosition",void 0),oo([o.property({type:Array})],no.prototype,"options",void 0),oo([o.state()],no.prototype,"selectedOption",void 0),oo([o.state()],no.prototype,"optionsDisplayed",void 0),oo([o.state()],no.prototype,"focusOptions",void 0),oo([o.query(".ft-select")],no.prototype,"container",void 0),oo([o.query(".ft-select--options")],no.prototype,"optionsMenu",void 0),oo([o.query(".ft-select--input-panel")],no.prototype,"mainPanel",void 0),oo([o.query(".ft-select--option:first-child")],no.prototype,"firstOption",void 0),oo([o.query(".ft-select--option:focus")],no.prototype,"focusedOption",void 0),oo([o.query(".ft-select--option.ft-select--option-selected")],no.prototype,"selectedOptionElement",void 0),oo([o.query(".ft-select--option:last-child")],no.prototype,"lastOption",void 0),oo([o.query("slot")],no.prototype,"optionsSlot",void 0),e.customElement("ft-select")(no),e.customElement("ft-select-option")(so);const ro={display:e.FtCssVariableFactory.create("--ft-skeleton--display","DISPLAY","block"),width:e.FtCssVariableFactory.create("--ft-skeleton--width","SIZE","100%"),height:e.FtCssVariableFactory.create("--ft-skeleton--height","SIZE","20px"),backgroundColor:e.FtCssVariableFactory.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),glareWidth:e.FtCssVariableFactory.create("--ft-skeleton--glare-width","SIZE","200px"),glareColor:e.FtCssVariableFactory.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),animationDuration:e.FtCssVariableFactory.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),borderRadiusM:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusM,"Design system")},lo=i.css`
|
|
1831
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}no.elementDefinitions={"ft-input-label":to,"ft-typography":ie,"ft-ripple":ge,"ft-icon":Le},no.styles=[Gt,Xt,io],oo([o.property({type:String})],no.prototype,"label",void 0),oo([o.property({type:String})],no.prototype,"helper",void 0),oo([o.property({type:Boolean})],no.prototype,"outlined",void 0),oo([o.property({type:Boolean})],no.prototype,"disabled",void 0),oo([o.property({type:Boolean})],no.prototype,"error",void 0),oo([o.property({type:Boolean})],no.prototype,"fixedMenuPosition",void 0),oo([o.property({type:Array})],no.prototype,"options",void 0),oo([o.state()],no.prototype,"selectedOption",void 0),oo([o.state()],no.prototype,"optionsDisplayed",void 0),oo([o.state()],no.prototype,"focusOptions",void 0),oo([o.query(".ft-select")],no.prototype,"container",void 0),oo([o.query(".ft-select--options")],no.prototype,"optionsMenu",void 0),oo([o.query(".ft-select--input-panel")],no.prototype,"mainPanel",void 0),oo([o.query(".ft-select--option:first-child")],no.prototype,"firstOption",void 0),oo([o.query(".ft-select--option:focus")],no.prototype,"focusedOption",void 0),oo([o.query(".ft-select--option.ft-select--option-selected")],no.prototype,"selectedOptionElement",void 0),oo([o.query(".ft-select--option:last-child")],no.prototype,"lastOption",void 0),oo([o.query("slot")],no.prototype,"optionsSlot",void 0),e.customElement("ft-select")(no),e.customElement("ft-select-option")(so);const ro={display:e.FtCssVariableFactory.create("--ft-skeleton--display","DISPLAY","block"),width:e.FtCssVariableFactory.create("--ft-skeleton--width","SIZE","100%"),height:e.FtCssVariableFactory.create("--ft-skeleton--height","SIZE","20px"),backgroundColor:e.FtCssVariableFactory.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),glareWidth:e.FtCssVariableFactory.create("--ft-skeleton--glare-width","SIZE","200px"),glareColor:e.FtCssVariableFactory.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),animationDuration:e.FtCssVariableFactory.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),borderRadiusM:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusM,"Design system")},lo=i.css`
|
|
1830
1832
|
:host {
|
|
1831
1833
|
width: ${ro.width};
|
|
1832
1834
|
height: ${ro.height};
|
|
@@ -66,7 +66,7 @@ var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prot
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var N;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:R}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.6.1");const M=window,F=M.trustedTypes,
|
|
69
|
+
var N;R.finalized=!0,R.elementProperties=new Map,R.elementStyles=[],R.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:R}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.6.1");const M=window,F=M.trustedTypes,I=F?F.createPolicy("lit-html",{createHTML:t=>t}):void 0,L="$lit$",D=`lit$${(Math.random()+"").slice(9)}$`,j="?"+D,P=`<${j}>`,U=document,A=()=>U.createComment(""),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,_=t=>H(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),Z="[ \t\n\f\r]",W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,K=/>/g,q=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,X=/"/g,Y=/^(?:script|style|textarea|title)$/i,Q=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),G=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),et=new WeakMap,it=U.createTreeWalker(U,129,null,!1),ot=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=W;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===W?"!--"===a[1]?n=V:void 0!==a[1]?n=K:void 0!==a[2]?(Y.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=q):void 0!==a[3]&&(n=q):n===q?">"===a[0]?(n=null!=s?s:W,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?q:'"'===a[3]?X:J):n===X||n===J?n=q:n===V||n===K?n=W:(n=q,s=void 0);const p=n===q&&t[e+1].startsWith("/>")?" ":"";r+=n===W?i+P:c>=0?(o.push(l),i.slice(0,c)+L+i.slice(c)+D+p):i+D+(-2===c?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==I?I.createHTML(l):l,o]};class st{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,c]=ot(t,e);if(this.el=st.createElement(a,i),it.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=it.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(L)||e.startsWith(D)){const i=c[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+L).split(D),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ct:"?"===e[1]?pt:"@"===e[1]?dt:at})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Y.test(o.tagName)){const t=o.textContent.split(D),e=t.length-1;if(e>0){o.textContent=F?F.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],A()),it.nextNode(),l.push({type:2,index:++s});o.append(t[e],A())}}}else if(8===o.nodeType)if(o.data===j)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(D,t+1));)l.push({type:7,index:s}),t+=D.length-1}s++}}static createElement(t,e){const i=U.createElement("template");return i.innerHTML=t,i}}function rt(t,e,i=t,o){var s,r,n,l;if(e===G)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const c=T(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=rt(t,a._$AS(t,e.values),a,o)),e}class nt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:U).importNode(i,!0);it.currentNode=s;let r=it.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new lt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new ft(r,this,t)),this._$AV.push(e),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=it.nextNode(),n++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class lt{constructor(t,e,i,o){var s;this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=rt(this,t,e),T(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==G&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):_(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==tt&&T(this._$AH)?this._$AA.nextSibling.data=t:this.$(U.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=st.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new nt(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=et.get(t.strings);return void 0===e&&et.set(t.strings,e=new st(t)),e}T(t){H(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new lt(this.k(A()),this.k(A()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class at{constructor(t,e,i,o,s){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=tt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=rt(this,t,e,0),r=!T(t)||t!==this._$AH&&t!==G,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=rt(this,o[i+n],e,n),l===G&&(l=this._$AH[n]),r||(r=!T(l)||l!==this._$AH[n]),l===tt?t=tt:t!==tt&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ct extends at{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tt?void 0:t}}const ht=F?F.emptyScript:"";class pt extends at{constructor(){super(...arguments),this.type=4}j(t){t&&t!==tt?this.element.setAttribute(this.name,ht):this.element.removeAttribute(this.name)}}class dt extends at{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=rt(this,t,e,0))&&void 0!==i?i:tt)===G)return;const o=this._$AH,s=t===tt&&o!==tt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==tt&&(o===tt||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class ft{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){rt(this,t)}}const ut={O:L,P:D,A:j,C:1,M:ot,L:nt,D:_,R:rt,I:lt,V:at,H:pt,N:dt,U:ct,F:ft},bt=M.litHtmlPolyfillSupport;null==bt||bt(st,lt),(null!==(N=M.litHtmlVersions)&&void 0!==N?N:M.litHtmlVersions=[]).push("2.7.3");
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
@@ -104,7 +104,7 @@ var vt,gt;let xt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
104
104
|
display: inline-block;
|
|
105
105
|
width: 0;
|
|
106
106
|
}
|
|
107
|
-
`;class Ft{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let s=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>s=s.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),s}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}var Lt,
|
|
107
|
+
`;class Ft{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let s=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>s=s.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),s}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}var It,Lt,Dt;const jt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Dt=null===(Lt=null===(It=window.safari)||void 0===It?void 0:It.pushNotification)||void 0===Lt?void 0:Lt.toString())&&void 0!==Dt?Dt:""),Pt=1,Ut=2,At=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2017 Google LLC
|
|
@@ -114,7 +114,7 @@ var vt,gt;let xt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
114
114
|
* @license
|
|
115
115
|
* Copyright 2020 Google LLC
|
|
116
116
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
117
|
-
*/const{I:
|
|
117
|
+
*/const{I:Ht}=ut,_t=()=>document.createComment(""),Zt=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(_t(),r),o=s.insertBefore(_t(),r);i=new Ht(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,l=n!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},Wt=(t,e,i=t)=>(t._$AI(e,i),t),Vt={},Kt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},qt=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Jt=At(class extends Tt{constructor(t){if(super(t),t.type!==Ut)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:l}=this.dt(e,i,o);if(!Array.isArray(r))return this.ht=l,n;const a=null!==(s=this.ht)&&void 0!==s?s:this.ht=[],c=[];let h,p,d=0,f=r.length-1,u=0,b=n.length-1;for(;d<=f&&u<=b;)if(null===r[d])d++;else if(null===r[f])f--;else if(a[d]===l[u])c[u]=Wt(r[d],n[u]),d++,u++;else if(a[f]===l[b])c[b]=Wt(r[f],n[b]),f--,b--;else if(a[d]===l[b])c[b]=Wt(r[d],n[b]),Zt(t,c[b+1],r[d]),d++,b--;else if(a[f]===l[u])c[u]=Wt(r[f],n[u]),Zt(t,r[d],r[f]),f--,u++;else if(void 0===h&&(h=qt(l,u,b),p=qt(a,d,f)),h.has(a[d]))if(h.has(a[f])){const e=p.get(l[u]),i=void 0!==e?r[e]:null;if(null===i){const e=Zt(t,r[d]);Wt(e,n[u]),c[u]=e}else c[u]=Wt(i,n[u]),Zt(t,r[d],i),r[e]=null;u++}else Kt(r[f]),f--;else Kt(r[d]),d++;for(;u<=b;){const e=Zt(t,c[b+1]);Wt(e,n[u]),c[u++]=e}for(;d<=f;){const t=r[d++];null!==t&&Kt(t)}return this.ht=l,((t,e=Vt)=>{t._$AH=e})(t,c),G}});
|
|
118
118
|
/**
|
|
119
119
|
* @license
|
|
120
120
|
* Copyright 2017 Google LLC
|
|
@@ -148,7 +148,7 @@ var vt,gt;let xt=class extends R{constructor(){super(...arguments),this.renderOp
|
|
|
148
148
|
* Copyright 2020 Google LLC
|
|
149
149
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
150
|
*/
|
|
151
|
-
const ee=Symbol.for(""),ie=t=>{if((null==t?void 0:t.r)===ee)return null==t?void 0:t._$litStatic$},oe=t=>({_$litStatic$:t,r:ee}),se=new Map,re=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(r=i[c],s=ie(r));)a+=s+e[++c],h=!0;c!==o&&l.push(r),n.push(a),c++}if(c===o&&n.push(e[o]),h){const t=n.join("$$lit$$");void 0===(e=se.get(t))&&(n.raw=n,se.set(t,e=n)),i=l}return t(e,...i)})(Q);var ne;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ne||(ne={}));const le=mt.extend("--ft-typography-font-family",wt.titleFont),ae=mt.extend("--ft-typography-font-family",wt.contentFont),ce={fontFamily:ae,fontSize:mt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:mt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:mt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:mt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:mt.create("--ft-typography-text-transform","UNKNOWN","inherit")},he=mt.extend("--ft-typography-title-font-family",le),pe=mt.extend("--ft-typography-title-font-size",ce.fontSize,"20px"),de=mt.extend("--ft-typography-title-font-weight",ce.fontWeight,"normal"),fe=mt.extend("--ft-typography-title-letter-spacing",ce.letterSpacing,"0.15px"),ue=mt.extend("--ft-typography-title-line-height",ce.lineHeight,"1.2"),be=mt.extend("--ft-typography-title-text-transform",ce.textTransform,"inherit"),ve=mt.extend("--ft-typography-title-dense-font-family",le),ge=mt.extend("--ft-typography-title-dense-font-size",ce.fontSize,"14px"),xe=mt.extend("--ft-typography-title-dense-font-weight",ce.fontWeight,"normal"),ye=mt.extend("--ft-typography-title-dense-letter-spacing",ce.letterSpacing,"0.105px"),me=mt.extend("--ft-typography-title-dense-line-height",ce.lineHeight,"1.7"),$e=mt.extend("--ft-typography-title-dense-text-transform",ce.textTransform,"inherit"),we=mt.extend("--ft-typography-subtitle1-font-family",ae),ke=mt.extend("--ft-typography-subtitle1-font-size",ce.fontSize,"16px"),Se=mt.extend("--ft-typography-subtitle1-font-weight",ce.fontWeight,"600"),Oe=mt.extend("--ft-typography-subtitle1-letter-spacing",ce.letterSpacing,"0.144px"),Ee=mt.extend("--ft-typography-subtitle1-line-height",ce.lineHeight,"1.5"),Ce=mt.extend("--ft-typography-subtitle1-text-transform",ce.textTransform,"inherit"),ze=mt.extend("--ft-typography-subtitle2-font-family",ae),Be=mt.extend("--ft-typography-subtitle2-font-size",ce.fontSize,"14px"),Re=mt.extend("--ft-typography-subtitle2-font-weight",ce.fontWeight,"normal"),Ne=mt.extend("--ft-typography-subtitle2-letter-spacing",ce.letterSpacing,"0.098px"),Me=mt.extend("--ft-typography-subtitle2-line-height",ce.lineHeight,"1.7"),Fe=mt.extend("--ft-typography-subtitle2-text-transform",ce.textTransform,"inherit"),
|
|
151
|
+
const ee=Symbol.for(""),ie=t=>{if((null==t?void 0:t.r)===ee)return null==t?void 0:t._$litStatic$},oe=t=>({_$litStatic$:t,r:ee}),se=new Map,re=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,c=0,h=!1;for(;c<o;){for(a=e[c];c<o&&void 0!==(r=i[c],s=ie(r));)a+=s+e[++c],h=!0;c!==o&&l.push(r),n.push(a),c++}if(c===o&&n.push(e[o]),h){const t=n.join("$$lit$$");void 0===(e=se.get(t))&&(n.raw=n,se.set(t,e=n)),i=l}return t(e,...i)})(Q);var ne;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ne||(ne={}));const le=mt.extend("--ft-typography-font-family",wt.titleFont),ae=mt.extend("--ft-typography-font-family",wt.contentFont),ce={fontFamily:ae,fontSize:mt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:mt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:mt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:mt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:mt.create("--ft-typography-text-transform","UNKNOWN","inherit")},he=mt.extend("--ft-typography-title-font-family",le),pe=mt.extend("--ft-typography-title-font-size",ce.fontSize,"20px"),de=mt.extend("--ft-typography-title-font-weight",ce.fontWeight,"normal"),fe=mt.extend("--ft-typography-title-letter-spacing",ce.letterSpacing,"0.15px"),ue=mt.extend("--ft-typography-title-line-height",ce.lineHeight,"1.2"),be=mt.extend("--ft-typography-title-text-transform",ce.textTransform,"inherit"),ve=mt.extend("--ft-typography-title-dense-font-family",le),ge=mt.extend("--ft-typography-title-dense-font-size",ce.fontSize,"14px"),xe=mt.extend("--ft-typography-title-dense-font-weight",ce.fontWeight,"normal"),ye=mt.extend("--ft-typography-title-dense-letter-spacing",ce.letterSpacing,"0.105px"),me=mt.extend("--ft-typography-title-dense-line-height",ce.lineHeight,"1.7"),$e=mt.extend("--ft-typography-title-dense-text-transform",ce.textTransform,"inherit"),we=mt.extend("--ft-typography-subtitle1-font-family",ae),ke=mt.extend("--ft-typography-subtitle1-font-size",ce.fontSize,"16px"),Se=mt.extend("--ft-typography-subtitle1-font-weight",ce.fontWeight,"600"),Oe=mt.extend("--ft-typography-subtitle1-letter-spacing",ce.letterSpacing,"0.144px"),Ee=mt.extend("--ft-typography-subtitle1-line-height",ce.lineHeight,"1.5"),Ce=mt.extend("--ft-typography-subtitle1-text-transform",ce.textTransform,"inherit"),ze=mt.extend("--ft-typography-subtitle2-font-family",ae),Be=mt.extend("--ft-typography-subtitle2-font-size",ce.fontSize,"14px"),Re=mt.extend("--ft-typography-subtitle2-font-weight",ce.fontWeight,"normal"),Ne=mt.extend("--ft-typography-subtitle2-letter-spacing",ce.letterSpacing,"0.098px"),Me=mt.extend("--ft-typography-subtitle2-line-height",ce.lineHeight,"1.7"),Fe=mt.extend("--ft-typography-subtitle2-text-transform",ce.textTransform,"inherit"),Ie={fontFamily:mt.extend("--ft-typography-body1-font-family",ae),fontSize:mt.extend("--ft-typography-body1-font-size",ce.fontSize,"16px"),fontWeight:mt.extend("--ft-typography-body1-font-weight",ce.fontWeight,"normal"),letterSpacing:mt.extend("--ft-typography-body1-letter-spacing",ce.letterSpacing,"0.496px"),lineHeight:mt.extend("--ft-typography-body1-line-height",ce.lineHeight,"1.5"),textTransform:mt.extend("--ft-typography-body1-text-transform",ce.textTransform,"inherit")},Le={fontFamily:mt.extend("--ft-typography-body2-font-family",ae),fontSize:mt.extend("--ft-typography-body2-font-size",ce.fontSize,"14px"),fontWeight:mt.extend("--ft-typography-body2-font-weight",ce.fontWeight,"normal"),letterSpacing:mt.extend("--ft-typography-body2-letter-spacing",ce.letterSpacing,"0.252px"),lineHeight:mt.extend("--ft-typography-body2-line-height",ce.lineHeight,"1.4"),textTransform:mt.extend("--ft-typography-body2-text-transform",ce.textTransform,"inherit")},De={fontFamily:mt.extend("--ft-typography-caption-font-family",ae),fontSize:mt.extend("--ft-typography-caption-font-size",ce.fontSize,"12px"),fontWeight:mt.extend("--ft-typography-caption-font-weight",ce.fontWeight,"normal"),letterSpacing:mt.extend("--ft-typography-caption-letter-spacing",ce.letterSpacing,"0.396px"),lineHeight:mt.extend("--ft-typography-caption-line-height",ce.lineHeight,"1.33"),textTransform:mt.extend("--ft-typography-caption-text-transform",ce.textTransform,"inherit")},je=mt.extend("--ft-typography-breadcrumb-font-family",ae),Pe=mt.extend("--ft-typography-breadcrumb-font-size",ce.fontSize,"10px"),Ue=mt.extend("--ft-typography-breadcrumb-font-weight",ce.fontWeight,"normal"),Ae=mt.extend("--ft-typography-breadcrumb-letter-spacing",ce.letterSpacing,"0.33px"),Te=mt.extend("--ft-typography-breadcrumb-line-height",ce.lineHeight,"1.6"),He=mt.extend("--ft-typography-breadcrumb-text-transform",ce.textTransform,"inherit"),_e=mt.extend("--ft-typography-overline-font-family",ae),Ze=mt.extend("--ft-typography-overline-font-size",ce.fontSize,"10px"),We=mt.extend("--ft-typography-overline-font-weight",ce.fontWeight,"normal"),Ve=mt.extend("--ft-typography-overline-letter-spacing",ce.letterSpacing,"1.5px"),Ke=mt.extend("--ft-typography-overline-line-height",ce.lineHeight,"1.6"),qe=mt.extend("--ft-typography-overline-text-transform",ce.textTransform,"uppercase"),Je={fontFamily:mt.extend("--ft-typography-button-font-family",ae),fontSize:mt.extend("--ft-typography-button-font-size",ce.fontSize,"14px"),fontWeight:mt.extend("--ft-typography-button-font-weight",ce.fontWeight,"600"),letterSpacing:mt.extend("--ft-typography-button-letter-spacing",ce.letterSpacing,"1.246px"),lineHeight:mt.extend("--ft-typography-button-line-height",ce.lineHeight,"1.15"),textTransform:mt.extend("--ft-typography-button-text-transform",ce.textTransform,"uppercase")},Xe=y`
|
|
152
152
|
.ft-typography--title {
|
|
153
153
|
font-family: ${he};
|
|
154
154
|
font-size: ${pe};
|
|
@@ -187,15 +187,6 @@ const ee=Symbol.for(""),ie=t=>{if((null==t?void 0:t.r)===ee)return null==t?void
|
|
|
187
187
|
|
|
188
188
|
`,ti=y`
|
|
189
189
|
.ft-typography--body1 {
|
|
190
|
-
font-family: ${Le.fontFamily};
|
|
191
|
-
font-size: ${Le.fontSize};
|
|
192
|
-
font-weight: ${Le.fontWeight};
|
|
193
|
-
letter-spacing: ${Le.letterSpacing};
|
|
194
|
-
line-height: ${Le.lineHeight};
|
|
195
|
-
text-transform: ${Le.textTransform};
|
|
196
|
-
}
|
|
197
|
-
`,ei=y`
|
|
198
|
-
.ft-typography--body2 {
|
|
199
190
|
font-family: ${Ie.fontFamily};
|
|
200
191
|
font-size: ${Ie.fontSize};
|
|
201
192
|
font-weight: ${Ie.fontWeight};
|
|
@@ -203,6 +194,15 @@ const ee=Symbol.for(""),ie=t=>{if((null==t?void 0:t.r)===ee)return null==t?void
|
|
|
203
194
|
line-height: ${Ie.lineHeight};
|
|
204
195
|
text-transform: ${Ie.textTransform};
|
|
205
196
|
}
|
|
197
|
+
`,ei=y`
|
|
198
|
+
.ft-typography--body2 {
|
|
199
|
+
font-family: ${Le.fontFamily};
|
|
200
|
+
font-size: ${Le.fontSize};
|
|
201
|
+
font-weight: ${Le.fontWeight};
|
|
202
|
+
letter-spacing: ${Le.letterSpacing};
|
|
203
|
+
line-height: ${Le.lineHeight};
|
|
204
|
+
text-transform: ${Le.textTransform};
|
|
205
|
+
}
|
|
206
206
|
`,ii=y`
|
|
207
207
|
.ft-typography--caption {
|
|
208
208
|
font-family: ${De.fontFamily};
|
|
@@ -219,15 +219,15 @@ const ee=Symbol.for(""),ie=t=>{if((null==t?void 0:t.r)===ee)return null==t?void
|
|
|
219
219
|
font-weight: ${Ue};
|
|
220
220
|
letter-spacing: ${Ae};
|
|
221
221
|
line-height: ${Te};
|
|
222
|
-
text-transform: ${
|
|
222
|
+
text-transform: ${He};
|
|
223
223
|
}
|
|
224
224
|
`,si=y`
|
|
225
225
|
.ft-typography--overline {
|
|
226
|
-
font-family: ${
|
|
226
|
+
font-family: ${_e};
|
|
227
227
|
font-size: ${Ze};
|
|
228
228
|
font-weight: ${We};
|
|
229
|
-
letter-spacing: ${
|
|
230
|
-
line-height: ${
|
|
229
|
+
letter-spacing: ${Ve};
|
|
230
|
+
line-height: ${Ke};
|
|
231
231
|
text-transform: ${qe};
|
|
232
232
|
}
|
|
233
233
|
`,ri=y`
|
|
@@ -363,7 +363,7 @@ const fi=At(class extends Tt{constructor(t){var e;if(super(t),t.type!==Pt||"clas
|
|
|
363
363
|
<div class="ft-ripple--background"></div>
|
|
364
364
|
<div class="ft-ripple--effect"></div>
|
|
365
365
|
</div>
|
|
366
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const
|
|
366
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Si.elementDefinitions={},Si.styles=wi,ki([o({type:Boolean})],Si.prototype,"primary",void 0),ki([o({type:Boolean})],Si.prototype,"secondary",void 0),ki([o({type:Boolean})],Si.prototype,"unbounded",void 0),ki([o({type:Boolean})],Si.prototype,"activated",void 0),ki([o({type:Boolean})],Si.prototype,"selected",void 0),ki([o({type:Boolean})],Si.prototype,"disabled",void 0),ki([s()],Si.prototype,"hovered",void 0),ki([s()],Si.prototype,"focused",void 0),ki([s()],Si.prototype,"pressed",void 0),ki([s()],Si.prototype,"rippling",void 0),ki([s()],Si.prototype,"rippleSize",void 0),ki([s()],Si.prototype,"originX",void 0),ki([s()],Si.prototype,"originY",void 0),ki([n(".ft-ripple")],Si.prototype,"ripple",void 0),ki([n(".ft-ripple--effect")],Si.prototype,"rippleEffect",void 0),p("ft-ripple")(Si);const Oi={distance:mt.create("--ft-tooltip-distance","SIZE","4px"),color:mt.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:mt.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:mt.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:mt.external(wt.borderRadiusS,"Design system"),maxWidth:mt.create("--ft-tooltip-max-width","SIZE","150px")},Ei=y`
|
|
367
367
|
.ft-tooltip--container {
|
|
368
368
|
display: block;
|
|
369
369
|
position: relative;
|
|
@@ -413,7 +413,7 @@ const fi=At(class extends Tt{constructor(t){var e;if(super(t),t.type!==Pt||"clas
|
|
|
413
413
|
</div>
|
|
414
414
|
</div>
|
|
415
415
|
</div>
|
|
416
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${Oi.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}zi.elementDefinitions={"ft-typography":ai},zi.styles=Ei,Ci([o()],zi.prototype,"text",void 0),Ci([o({type:Boolean})],zi.prototype,"manual",void 0),Ci([o({type:Boolean})],zi.prototype,"inline",void 0),Ci([o({type:Number})],zi.prototype,"delay",void 0),Ci([o()],zi.prototype,"position",void 0),Ci([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],zi.prototype,"slotNodes",void 0),Ci([n(".ft-tooltip--container")],zi.prototype,"container",void 0),Ci([n("slot")],zi.prototype,"target",void 0),Ci([n(".ft-tooltip")],zi.prototype,"tooltip",void 0),Ci([n(".ft-tooltip--content")],zi.prototype,"tooltipContent",void 0),Ci([s()],zi.prototype,"visible",void 0),p("ft-tooltip")(zi);const Bi={color:mt.extend("--ft-loader-color",wt.colorPrimary),size:mt.create("--ft-loader-size","SIZE","80px")},Ri=y`
|
|
416
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${Oi.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}zi.elementDefinitions={"ft-typography":ai},zi.styles=Ei,Ci([o()],zi.prototype,"text",void 0),Ci([o({type:Boolean})],zi.prototype,"manual",void 0),Ci([o({type:Boolean})],zi.prototype,"inline",void 0),Ci([o({type:Number})],zi.prototype,"delay",void 0),Ci([o()],zi.prototype,"position",void 0),Ci([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],zi.prototype,"slotNodes",void 0),Ci([n(".ft-tooltip--container")],zi.prototype,"container",void 0),Ci([n("slot")],zi.prototype,"target",void 0),Ci([n(".ft-tooltip")],zi.prototype,"tooltip",void 0),Ci([n(".ft-tooltip--content")],zi.prototype,"tooltipContent",void 0),Ci([s()],zi.prototype,"visible",void 0),p("ft-tooltip")(zi);const Bi={color:mt.extend("--ft-loader-color",wt.colorPrimary),size:mt.create("--ft-loader-size","SIZE","80px")},Ri=y`
|
|
417
417
|
:host {
|
|
418
418
|
line-height: 0;
|
|
419
419
|
}
|
|
@@ -495,7 +495,7 @@ const fi=At(class extends Tt{constructor(t){var e;if(super(t),t.type!==Pt||"clas
|
|
|
495
495
|
* Copyright 2017 Google LLC
|
|
496
496
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
497
497
|
*/
|
|
498
|
-
class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===tt||null==t)return this.ft=void 0,this.et=t;if(t===G)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Mi.directiveName="unsafeHTML",Mi.resultType=1;const Fi=At(Mi);var Li
|
|
498
|
+
class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===tt||null==t)return this.ft=void 0,this.et=t;if(t===G)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Mi.directiveName="unsafeHTML",Mi.resultType=1;const Fi=At(Mi);var Ii,Li;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Ii||(Ii={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Li||(Li={}));const Di=new Map([...["abw"].map((t=>[t,Li.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Li.AUDIO])),...["avi"].map((t=>[t,Li.AVI])),...["chm","xhs"].map((t=>[t,Li.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Li.CODE])),...["csv"].map((t=>[t,Li.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Li.DITA])),...["epub"].map((t=>[t,Li.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Li.EXCEL])),...["flac"].map((t=>[t,Li.FLAC])),...["gif"].map((t=>[t,Li.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Li.GZIP])),...["html","htm","xhtml"].map((t=>[t,Li.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Li.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Li.JPEG])),...["json"].map((t=>[t,Li.JSON])),...["m4a","m4p"].map((t=>[t,Li.M4A])),...["mov","qt"].map((t=>[t,Li.MOV])),...["mp3"].map((t=>[t,Li.MP3])),...["mp4","m4v"].map((t=>[t,Li.MP4])),...["ogg","oga"].map((t=>[t,Li.OGG])),...["pdf","ps"].map((t=>[t,Li.PDF])),...["png"].map((t=>[t,Li.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Li.POWERPOINT])),...["rar"].map((t=>[t,Li.RAR])),...["stp"].map((t=>[t,Li.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Li.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Li.VIDEO])),...["wav"].map((t=>[t,Li.WAV])),...["wma"].map((t=>[t,Li.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Li.WORD])),...["xml","xsl","rdf"].map((t=>[t,Li.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Li.YAML])),...["zip"].map((t=>[t,Li.ZIP]))]),ji=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);const Pi={size:mt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:mt.extend("--ft-icon-fluid-topics-font-family",mt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:mt.extend("--ft-icon-file-format-font-family",mt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:mt.extend("--ft-icon-material-font-family",mt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:mt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ui=y`
|
|
499
499
|
:host, i.ft-icon {
|
|
500
500
|
display: inline-flex;
|
|
501
501
|
align-items: center;
|
|
@@ -543,12 +543,12 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
543
543
|
.ft-icon--material {
|
|
544
544
|
font-family: ${Pi.materialFontFamily}, "Material Icons", sans-serif;
|
|
545
545
|
}
|
|
546
|
-
`;var Ai;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ai||(Ai={}));var Ti=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class
|
|
546
|
+
`;var Ai;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ai||(Ai={}));var Ti=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Hi extends Bt{constructor(){super(...arguments),this.resolvedIcon=tt}render(){const t=this.variant&&Object.values(Ai).includes(this.variant)?this.variant:Ai.fluid_topics,e=t!==Ai.material||!!this.value;return Q`
|
|
547
547
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
548
548
|
${Fi(this.resolvedIcon)}
|
|
549
549
|
<slot ?hidden=${e}></slot>
|
|
550
550
|
</i>
|
|
551
|
-
`}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:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Ai.file_format:this.resolvedIcon=null!==(t=
|
|
551
|
+
`}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:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Ai.file_format:this.resolvedIcon=null!==(t=Li[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Ai.material:this.resolvedIcon=this.value||tt;break;default:this.resolvedIcon=null!==(e=Ii[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Hi.elementDefinitions={},Hi.styles=Ui,Ti([o()],Hi.prototype,"variant",void 0),Ti([o()],Hi.prototype,"value",void 0),Ti([s()],Hi.prototype,"resolvedIcon",void 0),Ti([n("slot")],Hi.prototype,"slottedContent",void 0),p("ft-icon")(Hi);const _i=mt.extend("--ft-button-color",wt.colorPrimary),Zi={backgroundColor:mt.extend("--ft-button-background-color",wt.colorSurface),borderRadius:mt.extend("--ft-button-border-radius",wt.borderRadiusL),color:_i,fontSize:mt.extend("--ft-button-font-size",Je.fontSize),iconSize:mt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:mt.extend("--ft-button-ripple-color",_i),verticalPadding:mt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:mt.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:mt.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:mt.external(wt.colorOpacityDisabled,"Design system")},Wi=mt.extend("--ft-button-primary-color",mt.extend("--ft-button-color",wt.colorOnPrimary)),Vi={backgroundColor:mt.extend("--ft-button-primary-background-color",mt.extend("--ft-button-background-color",wt.colorPrimary)),color:Wi,rippleColor:mt.extend("--ft-button-primary-ripple-color",Wi)},Ki=mt.extend("--ft-button-dense-border-radius",mt.extend("--ft-button-border-radius",wt.borderRadiusM)),qi=mt.create("--ft-button-dense-vertical-padding","SIZE","2px"),Ji=mt.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Xi=mt.create("--ft-button-dense-icon-padding","SIZE","4px"),Yi=[y`
|
|
552
552
|
:host {
|
|
553
553
|
display: inline-block;
|
|
554
554
|
max-width: 100%;
|
|
@@ -607,7 +607,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
607
607
|
|
|
608
608
|
.ft-button.ft-button--dense {
|
|
609
609
|
padding: ${qi} ${Ji};
|
|
610
|
-
border-radius: ${
|
|
610
|
+
border-radius: ${Ki};
|
|
611
611
|
gap: ${Xi};
|
|
612
612
|
}
|
|
613
613
|
|
|
@@ -633,9 +633,9 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
.ft-button.ft-button--primary {
|
|
636
|
-
background-color: ${
|
|
637
|
-
--ft-button-internal-color: ${
|
|
638
|
-
${$t(bi.color,
|
|
636
|
+
background-color: ${Vi.backgroundColor};
|
|
637
|
+
--ft-button-internal-color: ${Vi.color};
|
|
638
|
+
${$t(bi.color,Vi.rippleColor)};
|
|
639
639
|
}
|
|
640
640
|
|
|
641
641
|
.ft-button:focus {
|
|
@@ -708,7 +708,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
708
708
|
</ft-tooltip>
|
|
709
709
|
`:t}resolveIcon(){return this.loading?Q`
|
|
710
710
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?Q`
|
|
711
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:tt}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}}Gi.elementDefinitions={"ft-ripple":Si,"ft-tooltip":zi,"ft-typography":ai,"ft-icon":
|
|
711
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:tt}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}}Gi.elementDefinitions={"ft-ripple":Si,"ft-tooltip":zi,"ft-typography":ai,"ft-icon":Hi,"ft-loader":Ni},Gi.styles=[Mt,Yi],Qi([o({type:String,reflect:!0})],Gi.prototype,"role",void 0),Qi([o({type:Boolean})],Gi.prototype,"primary",void 0),Qi([o({type:Boolean})],Gi.prototype,"outlined",void 0),Qi([o({type:Boolean})],Gi.prototype,"disabled",void 0),Qi([o({type:Boolean})],Gi.prototype,"dense",void 0),Qi([o({type:Boolean})],Gi.prototype,"round",void 0),Qi([o()],Gi.prototype,"label",void 0),Qi([o()],Gi.prototype,"icon",void 0),Qi([o()],Gi.prototype,"iconVariant",void 0),Qi([o({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Qi([o({type:Boolean})],Gi.prototype,"loading",void 0),Qi([o()],Gi.prototype,"tooltipPosition",void 0),Qi([o({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Qi([o({type:Boolean})],Gi.prototype,"forceTooltip",void 0),Qi([n(".ft-button")],Gi.prototype,"button",void 0),Qi([n(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),p("ft-button")(Gi);const to=mt.extend("--ft-checkbox-text-color",wt.colorOnSurfaceHigh),eo=mt.external(wt.colorPrimary,"Design system"),io=mt.external(wt.colorOnPrimary,"Design system"),oo=mt.extend("--ft-checkbox-border-color",wt.colorOnSurfaceMedium),so=mt.external(wt.colorOnSurfaceDisabled,"Design system"),ro=y`
|
|
712
712
|
* {
|
|
713
713
|
box-sizing: border-box;
|
|
714
714
|
}
|
|
@@ -925,7 +925,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
925
925
|
@keydown=${this.onKeyDown}
|
|
926
926
|
@focusin=${this.focusCurrentValue}
|
|
927
927
|
></slot>
|
|
928
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}yo.elementDefinitions={},yo.styles=go,xo([o()],yo.prototype,"name",void 0),xo([c()],yo.prototype,"radioButtons",void 0),p("ft-radio")(vo),p("ft-radio-group")(yo);const mo={borderRadiusM:mt.external(wt.borderRadiusM,"Design system"),colorOutline:mt.external(wt.colorOutline,"Design system"),colorOnSurface:mt.external(wt.colorOnSurface,"Design system"),colorOnSurfaceMedium:mt.external(wt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:mt.external(wt.colorOnSurfaceDisabled,"Design system"),colorPrimary:mt.external(wt.colorPrimary,"Design system"),colorOnPrimary:mt.external(wt.colorOnPrimary,"Design system"),fontFamily:mt.external(
|
|
928
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}yo.elementDefinitions={},yo.styles=go,xo([o()],yo.prototype,"name",void 0),xo([c()],yo.prototype,"radioButtons",void 0),p("ft-radio")(vo),p("ft-radio-group")(yo);const mo={borderRadiusM:mt.external(wt.borderRadiusM,"Design system"),colorOutline:mt.external(wt.colorOutline,"Design system"),colorOnSurface:mt.external(wt.colorOnSurface,"Design system"),colorOnSurfaceMedium:mt.external(wt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:mt.external(wt.colorOnSurfaceDisabled,"Design system"),colorPrimary:mt.external(wt.colorPrimary,"Design system"),colorOnPrimary:mt.external(wt.colorOnPrimary,"Design system"),fontFamily:mt.external(Le.fontFamily,"Body2 typography"),fontSize:mt.external(Le.fontSize,"Body2 typography"),fontWeight:mt.external(Le.fontWeight,"Body2 typography"),letterSpacing:mt.external(Le.letterSpacing,"Body2 typography"),lineHeight:mt.external(Le.lineHeight,"Body2 typography"),textTransform:mt.external(Le.textTransform,"Body2 typography")},$o=y`
|
|
929
929
|
.ft-filter-level--container {
|
|
930
930
|
display: flex;
|
|
931
931
|
flex-direction: column;
|
|
@@ -991,7 +991,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
991
991
|
margin: 10px 0;
|
|
992
992
|
color: ${mo.colorOnSurfaceMedium};
|
|
993
993
|
}
|
|
994
|
-
`;var wo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ko extends Bt{constructor(){super(...arguments),this.
|
|
994
|
+
`;var wo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ko extends Bt{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 Q`
|
|
995
995
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
996
996
|
${null==this.parent?null:Q`
|
|
997
997
|
<div tabindex="0"
|
|
@@ -1035,7 +1035,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1035
1035
|
`:tt}
|
|
1036
1036
|
</div>
|
|
1037
1037
|
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return Q`
|
|
1038
|
-
<ft-checkbox name="${this.
|
|
1038
|
+
<ft-checkbox name="${this.filterId}"
|
|
1039
1039
|
part="multivalued-option"
|
|
1040
1040
|
data-value="${t.value}"
|
|
1041
1041
|
.checked=${t.selected}
|
|
@@ -1045,7 +1045,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1045
1045
|
${t.renderOption?t.renderOption:t.label}
|
|
1046
1046
|
</ft-checkbox>
|
|
1047
1047
|
`}buildMonoValuedOption(t){return Q`
|
|
1048
|
-
<ft-radio name="${this.
|
|
1048
|
+
<ft-radio name="${this.filterId+Math.round(1e6*Math.random())}"
|
|
1049
1049
|
part="monovalued-option"
|
|
1050
1050
|
data-value="${t.value}"
|
|
1051
1051
|
.checked=${t.selected}
|
|
@@ -1055,7 +1055,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1055
1055
|
@change=${t=>t.stopPropagation()}>
|
|
1056
1056
|
${t.renderOption?t.renderOption:t.label}
|
|
1057
1057
|
</ft-radio>
|
|
1058
|
-
`}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}))}}ko.elementDefinitions={"ft-button":Gi,"ft-ripple":Si,"ft-typography":ai,"ft-checkbox":lo,"ft-icon":
|
|
1058
|
+
`}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}))}}ko.elementDefinitions={"ft-button":Gi,"ft-ripple":Si,"ft-typography":ai,"ft-checkbox":lo,"ft-icon":Hi,"ft-radio":vo},ko.styles=$o,wo([o({type:String})],ko.prototype,"filterId",void 0),wo([o({type:Object})],ko.prototype,"parent",void 0),wo([o({type:Array})],ko.prototype,"options",void 0),wo([o({type:Boolean})],ko.prototype,"multivalued",void 0),wo([o({type:Boolean})],ko.prototype,"disabled",void 0),wo([o({type:Boolean})],ko.prototype,"hideSelectedOptions",void 0),wo([o({type:Boolean})],ko.prototype,"preventNavigation",void 0),wo([o({type:String})],ko.prototype,"filter",void 0),wo([o({type:String})],ko.prototype,"moreValuesButtonLabel",void 0),wo([o({type:String})],ko.prototype,"noValuesLabel",void 0),wo([o({type:Number})],ko.prototype,"displayedValuesLimit",void 0),wo([n(".ft-filter-level--container")],ko.prototype,"container",void 0),wo([s()],ko.prototype,"displayedPages",void 0);const So={buttonsColor:mt.extend("--ft-snap-scroll-buttons-color",wt.colorPrimary),buttonsZIndex:mt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:mt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:mt.external(wt.colorSurface,"Design system")},Oo=y`
|
|
1059
1059
|
.ft-snap-scroll {
|
|
1060
1060
|
box-sizing: border-box;
|
|
1061
1061
|
position: relative;
|
|
@@ -1204,7 +1204,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1204
1204
|
@click=${this.next}
|
|
1205
1205
|
></ft-button>
|
|
1206
1206
|
</div>
|
|
1207
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==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))),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 Co(this.currentElement,this.elements[this.currentElement]))}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,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.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)}}zo.elementDefinitions={"ft-button":Gi},zo.styles=Oo,Eo([o({type:Boolean})],zo.prototype,"horizontal",void 0),Eo([o({type:Boolean})],zo.prototype,"hideScrollbar",void 0),Eo([o({type:Boolean})],zo.prototype,"controls",void 0),Eo([o({type:Boolean})],zo.prototype,"limitSize",void 0),Eo([s()],zo.prototype,"elements",void 0),Eo([s()],zo.prototype,"currentElement",void 0),Eo([s()],zo.prototype,"withScroll",void 0),Eo([s()],zo.prototype,"startReached",void 0),Eo([s()],zo.prototype,"endReached",void 0),Eo([n(".ft-snap-scroll--content")],zo.prototype,"contentSlot",void 0),p("ft-snap-scroll")(zo);const Bo=mt.external(wt.colorOutline,"Design system"),Ro=mt.external(wt.colorOnSurface,"Design system"),No=mt.external(wt.colorOnSurfaceMedium,"Design system"),Mo=mt.external(wt.colorPrimary,"Design system"),Fo=mt.external(wt.colorSurface,"Design system"),
|
|
1207
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==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))),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 Co(this.currentElement,this.elements[this.currentElement]))}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,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.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)}}zo.elementDefinitions={"ft-button":Gi},zo.styles=Oo,Eo([o({type:Boolean})],zo.prototype,"horizontal",void 0),Eo([o({type:Boolean})],zo.prototype,"hideScrollbar",void 0),Eo([o({type:Boolean})],zo.prototype,"controls",void 0),Eo([o({type:Boolean})],zo.prototype,"limitSize",void 0),Eo([s()],zo.prototype,"elements",void 0),Eo([s()],zo.prototype,"currentElement",void 0),Eo([s()],zo.prototype,"withScroll",void 0),Eo([s()],zo.prototype,"startReached",void 0),Eo([s()],zo.prototype,"endReached",void 0),Eo([n(".ft-snap-scroll--content")],zo.prototype,"contentSlot",void 0),p("ft-snap-scroll")(zo);const Bo=mt.external(wt.colorOutline,"Design system"),Ro=mt.external(wt.colorOnSurface,"Design system"),No=mt.external(wt.colorOnSurfaceMedium,"Design system"),Mo=mt.external(wt.colorPrimary,"Design system"),Fo=mt.external(wt.colorSurface,"Design system"),Io=mt.external(wt.transitionDuration,"Design system"),Lo=mt.external(wt.transitionTimingFunction,"Design system"),Do=[ii,y`
|
|
1208
1208
|
:host {
|
|
1209
1209
|
display: flex;
|
|
1210
1210
|
max-height: 100%;
|
|
@@ -1253,8 +1253,8 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1253
1253
|
padding: 0 10px;
|
|
1254
1254
|
overflow: hidden;
|
|
1255
1255
|
height: 32px;
|
|
1256
|
-
transition: height ${
|
|
1257
|
-
margin ${
|
|
1256
|
+
transition: height ${Io} ${Lo},
|
|
1257
|
+
margin ${Io} ${Lo};
|
|
1258
1258
|
transition-delay: 500ms;
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
@@ -1313,30 +1313,32 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1313
1313
|
height: 0;
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
|
-
slot {
|
|
1316
|
+
slot:not([name]) {
|
|
1317
1317
|
display: none;
|
|
1318
1318
|
}
|
|
1319
|
-
`];var jo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Po extends CustomEvent{constructor(t){super("change",{detail:t})}}class Uo extends Bt{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.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return ci(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){
|
|
1319
|
+
`];var jo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Po extends CustomEvent{constructor(t){super("change",{detail:t})}}class Uo extends Bt{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(300),this.changeDebouncer=new e(10),this.lastDispatchedValues=[]}get flatOptions(){return ci(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.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 Q`
|
|
1320
1320
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1321
1321
|
part="container">
|
|
1322
|
-
${this.label||
|
|
1322
|
+
${this.label||t?Q`
|
|
1323
1323
|
<div class="ft-filter--header" part="header">
|
|
1324
|
-
<ft-typography class="ft-filter--label" variant="overline" part="label"
|
|
1324
|
+
<ft-typography class="ft-filter--label" variant="overline" part="label">
|
|
1325
|
+
${this.label}
|
|
1325
1326
|
</ft-typography>
|
|
1326
|
-
|
|
1327
|
+
<slot name="label"></slot>
|
|
1328
|
+
${t&&!this.hideClearButton?Q`
|
|
1327
1329
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1328
1330
|
${this.clearButtonLabel}
|
|
1329
1331
|
</ft-button>
|
|
1330
1332
|
`:null}
|
|
1331
1333
|
</div>
|
|
1332
1334
|
`:null}
|
|
1333
|
-
<div class="ft-filter--filter" ?hidden=${!
|
|
1335
|
+
<div class="ft-filter--filter" ?hidden=${!e}>
|
|
1334
1336
|
<input type="search"
|
|
1335
1337
|
part="input"
|
|
1336
1338
|
class="ft-typography--caption"
|
|
1337
|
-
?disabled=${!
|
|
1338
|
-
placeholder="${
|
|
1339
|
-
size="${
|
|
1339
|
+
?disabled=${!e}
|
|
1340
|
+
placeholder="${i}"
|
|
1341
|
+
size="${e?i.length:0}"
|
|
1340
1342
|
@search=${this.onFilterChange}
|
|
1341
1343
|
@keyup=${this.onFilterChange}>
|
|
1342
1344
|
</div>
|
|
@@ -1347,10 +1349,10 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1347
1349
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1348
1350
|
@option-change=${this.optionsChanged}></slot>
|
|
1349
1351
|
</div>
|
|
1350
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return Q`
|
|
1352
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i,o,s,r;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300)),this.lastLevelHasHiddenvalues=null!==(r=null===(s=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(".ft-filter--levels ft-filter-level:last-child"))||void 0===s?void 0:s.hasHiddenValues)&&void 0!==r&&r}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return Q`
|
|
1351
1353
|
${this.raiseSelectedOptions&&e.length>0?Q`
|
|
1352
1354
|
<ft-filter-level
|
|
1353
|
-
|
|
1355
|
+
filterId="${this.id}"
|
|
1354
1356
|
?multivalued=${this.multivalued}
|
|
1355
1357
|
?disabled=${this.disabled}
|
|
1356
1358
|
preventNavigation
|
|
@@ -1370,7 +1372,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1370
1372
|
`}renderLevel(t,e,i){return Q`
|
|
1371
1373
|
<ft-filter-level
|
|
1372
1374
|
class="${t}"
|
|
1373
|
-
|
|
1375
|
+
filterId="${this.id}"
|
|
1374
1376
|
.filter="${this.filter}"
|
|
1375
1377
|
moreValuesButtonLabel="${this.moreValuesButtonLabel}"
|
|
1376
1378
|
?multivalued=${this.multivalued}
|
|
@@ -1386,17 +1388,17 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1386
1388
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1387
1389
|
noValuesLabel="${this.noValuesLabel}"
|
|
1388
1390
|
></ft-filter-level>
|
|
1389
|
-
`}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 i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.
|
|
1391
|
+
`}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 i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),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;h(this.lastDispatchedValues,t)||(this.dispatchEvent(new Po(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)}}Uo.elementDefinitions={"ft-button":Gi,"ft-filter-level":ko,"ft-snap-scroll":zo,"ft-typography":ai},Uo.styles=Do,jo([o({type:String})],Uo.prototype,"id",void 0),jo([o({type:String})],Uo.prototype,"label",void 0),jo([o({type:String})],Uo.prototype,"filterPlaceHolder",void 0),jo([o({type:String})],Uo.prototype,"clearButtonLabel",void 0),jo([o({type:String})],Uo.prototype,"moreValuesButtonLabel",void 0),jo([o({type:String})],Uo.prototype,"noValuesLabel",void 0),jo([d([])],Uo.prototype,"options",void 0),jo([o({type:Boolean})],Uo.prototype,"multivalued",void 0),jo([o({type:Boolean})],Uo.prototype,"disabled",void 0),jo([o({type:Boolean})],Uo.prototype,"raiseSelectedOptions",void 0),jo([o({type:Number})],Uo.prototype,"displayedValuesLimit",void 0),jo([o({type:Boolean})],Uo.prototype,"hideClearButton",void 0),jo([n(".ft-filter--slot")],Uo.prototype,"slotElement",void 0),jo([n(".ft-filter--container")],Uo.prototype,"container",void 0),jo([n(".ft-filter--values")],Uo.prototype,"valuesContainer",void 0),jo([n(".ft-filter--levels")],Uo.prototype,"levelsContainer",void 0),jo([s()],Uo.prototype,"lastLevelHasHiddenvalues",void 0),jo([n(".ft-filter--filter input")],Uo.prototype,"filterInput",void 0),jo([function(t){return r({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],Uo.prototype,"levels",void 0),jo([s()],Uo.prototype,"withScroll",void 0),jo([s()],Uo.prototype,"filter",void 0),jo([s()],Uo.prototype,"slideIn",void 0),jo([s()],Uo.prototype,"slideOut",void 0);var Ao=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class To extends Bt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return Q`
|
|
1390
1392
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1391
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}To.elementDefinitions={},Ao([o({type:String})],To.prototype,"label",void 0),Ao([o({type:Object,converter:t=>t})],To.prototype,"value",void 0),Ao([o({type:Boolean,reflect:!0})],To.prototype,"selected",void 0),Ao([o({type:Object})],To.prototype,"subOptions",void 0),Ao([d({})],To.prototype,"renderOption",void 0),Ao([n(".ft-filter-option--slot")],To.prototype,"slotElement",void 0),p("ft-filter")(Uo),p("ft-filter-option")(To);const
|
|
1393
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}To.elementDefinitions={},Ao([o({type:String})],To.prototype,"label",void 0),Ao([o({type:Object,converter:t=>t})],To.prototype,"value",void 0),Ao([o({type:Boolean,reflect:!0})],To.prototype,"selected",void 0),Ao([o({type:Object})],To.prototype,"subOptions",void 0),Ao([d({})],To.prototype,"renderOption",void 0),Ao([n(".ft-filter-option--slot")],To.prototype,"slotElement",void 0),p("ft-filter")(Uo),p("ft-filter-option")(To);const Ho=y`
|
|
1392
1394
|
.ft-accordion {
|
|
1393
1395
|
box-sizing: border-box;
|
|
1394
1396
|
}
|
|
1395
|
-
`;var
|
|
1397
|
+
`;var _o=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Zo extends Bt{constructor(){super(...arguments),this.multi=!1}render(){return Q`
|
|
1396
1398
|
<div class="ft-accordion">
|
|
1397
1399
|
<slot @activated=${this.onChange}></slot>
|
|
1398
1400
|
</div>
|
|
1399
|
-
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}Zo.elementDefinitions={},Zo.styles=_o
|
|
1401
|
+
`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}}Zo.elementDefinitions={},Zo.styles=Ho,_o([o({type:Boolean})],Zo.prototype,"multi",void 0),_o([n("slot")],Zo.prototype,"content",void 0);const Wo=mt.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),Vo=mt.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),Ko=mt.external(wt.colorOutline,"Design system"),qo=y`
|
|
1400
1402
|
.ft-accordion-item {
|
|
1401
1403
|
display: flex;
|
|
1402
1404
|
flex-direction: column;
|
|
@@ -1409,7 +1411,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1409
1411
|
display: flex;
|
|
1410
1412
|
align-items: center;
|
|
1411
1413
|
cursor: pointer;
|
|
1412
|
-
padding: ${
|
|
1414
|
+
padding: ${Vo} ${Wo};
|
|
1413
1415
|
gap: calc(${Wo} / 2);
|
|
1414
1416
|
outline: none;
|
|
1415
1417
|
}
|
|
@@ -1435,11 +1437,11 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1435
1437
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
1436
1438
|
height: initial;
|
|
1437
1439
|
overflow: visible;
|
|
1438
|
-
padding: ${
|
|
1440
|
+
padding: ${Vo} ${Wo};
|
|
1439
1441
|
}
|
|
1440
1442
|
|
|
1441
1443
|
.ft-accordion-item--separator {
|
|
1442
|
-
border-bottom: 1px solid ${
|
|
1444
|
+
border-bottom: 1px solid ${Ko};
|
|
1443
1445
|
}
|
|
1444
1446
|
`;var Jo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Xo extends Bt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return Q`
|
|
1445
1447
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
@@ -1471,7 +1473,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1471
1473
|
</div>
|
|
1472
1474
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
1473
1475
|
</div>
|
|
1474
|
-
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}Xo.elementDefinitions={"ft-ripple":Si,"ft-typography":ai,"ft-icon":
|
|
1476
|
+
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}Xo.elementDefinitions={"ft-ripple":Si,"ft-typography":ai,"ft-icon":Hi},Xo.styles=qo,Jo([o()],Xo.prototype,"icon",void 0),Jo([o()],Xo.prototype,"iconVariant",void 0),Jo([o()],Xo.prototype,"label",void 0),Jo([o({type:Boolean,reflect:!0})],Xo.prototype,"active",void 0),p("ft-accordion")(Zo),p("ft-accordion-item")(Xo);const Yo=mt.extend("--ft-chip-color",wt.colorOnSurface),Qo={backgroundColor:mt.extend("--ft-chip-background-color",wt.colorSurface),color:Yo,fontSize:mt.extend("--ft-chip-font-size",Le.fontSize),iconSize:mt.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:mt.extend("--ft-chip-ripple-color",Yo),horizontalPadding:mt.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:mt.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:mt.external(wt.colorOutline,"Design system"),opacityDisabled:mt.external(wt.colorOpacityDisabled,"Design system")},Go=mt.extend("--ft-chip-highlighted-color",mt.extend("--ft-chip-color",wt.colorOnPrimary)),ts={backgroundColor:mt.extend("--ft-chip-highlighted-background-color",mt.extend("--ft-chip-background-color",wt.colorPrimary)),color:Go,rippleColor:mt.extend("--ft-chip-highlighted-ripple-color",Go)},es=mt.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),is=mt.create("--ft-chip-dense-vertical-padding","SIZE","4px"),os=[Rt,y`
|
|
1475
1477
|
:host {
|
|
1476
1478
|
display: inline-block;
|
|
1477
1479
|
max-width: 100%;
|
|
@@ -1571,8 +1573,8 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1571
1573
|
vertical-align: bottom;
|
|
1572
1574
|
display: block;
|
|
1573
1575
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
1574
|
-
${$t(
|
|
1575
|
-
${$t(
|
|
1576
|
+
${$t(Le.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
1577
|
+
${$t(Le.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
1576
1578
|
}
|
|
1577
1579
|
|
|
1578
1580
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1631,7 +1633,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1631
1633
|
<div class="ft-chip--icon-container ft-no-text-select">
|
|
1632
1634
|
<ft-icon .variant=${this.iconVariant} .value="${this.internalIcon}"></ft-icon>
|
|
1633
1635
|
</div>
|
|
1634
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new rs))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new rs))}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)}}ns.elementDefinitions={"ft-ripple":Si,"ft-typography":ai,"ft-icon":
|
|
1636
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new rs))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new rs))}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)}}ns.elementDefinitions={"ft-ripple":Si,"ft-typography":ai,"ft-icon":Hi,"ft-button":Gi},ns.styles=os,ss([o({type:Boolean})],ns.prototype,"highlighted",void 0),ss([o({type:Boolean})],ns.prototype,"removable",void 0),ss([o({type:Boolean})],ns.prototype,"disabled",void 0),ss([o({type:Boolean})],ns.prototype,"clickable",void 0),ss([o({type:Boolean})],ns.prototype,"iconClickable",void 0),ss([o({type:Boolean})],ns.prototype,"dense",void 0),ss([o({type:Boolean})],ns.prototype,"multiLine",void 0),ss([o()],ns.prototype,"label",void 0),ss([o()],ns.prototype,"iconLabel",void 0),ss([o()],ns.prototype,"icon",void 0),ss([o()],ns.prototype,"iconVariant",void 0),ss([o({type:Boolean})],ns.prototype,"trailingIcon",void 0),ss([n("ft-typography slot")],ns.prototype,"slottedContent",void 0),p("ft-chip")(ns);const ls={fontSize:mt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:mt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:mt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:mt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:mt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:mt.create("--ft-input-label-max-width","SIZE","100%"),borderColor:mt.extend("--ft-input-label-border-color",wt.colorOutline),textColor:mt.extend("--ft-input-label-text-color",wt.colorOnSurfaceMedium),disabledTextColor:mt.extend("--ft-input-label-disabled-text-color",wt.colorOnSurfaceDisabled),colorSurface:mt.external(wt.colorSurface,"Design system"),borderRadiusS:mt.external(wt.borderRadiusS,"Design system"),colorError:mt.external(wt.colorError,"Design system")},as=y`
|
|
1635
1637
|
.ft-input-label {
|
|
1636
1638
|
position: absolute;
|
|
1637
1639
|
inset: 0;
|
|
@@ -1837,8 +1839,8 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1837
1839
|
overflow: hidden;
|
|
1838
1840
|
white-space: nowrap;
|
|
1839
1841
|
text-overflow: ellipsis;
|
|
1840
|
-
${$t(
|
|
1841
|
-
${$t(
|
|
1842
|
+
${$t(Ie.fontSize,ps.selectedOptionSize)};
|
|
1843
|
+
${$t(Ie.lineHeight,ps.selectedOptionSize)};
|
|
1842
1844
|
}
|
|
1843
1845
|
|
|
1844
1846
|
.ft-select--in-error .ft-select--selected-option {
|
|
@@ -1959,7 +1961,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
1959
1961
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
1960
1962
|
<span>${t.label}</span>
|
|
1961
1963
|
</div>
|
|
1962
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,r;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var e,i;if(!h(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(i=this.selectedOption)||void 0===i?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}bs.elementDefinitions={"ft-input-label":hs,"ft-typography":ai,"ft-ripple":Si,"ft-icon":
|
|
1964
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,r;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var e,i;if(!h(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(i=this.selectedOption)||void 0===i?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}bs.elementDefinitions={"ft-input-label":hs,"ft-typography":ai,"ft-ripple":Si,"ft-icon":Hi},bs.styles=[ei,ii,ds],fs([o({type:String})],bs.prototype,"label",void 0),fs([o({type:String})],bs.prototype,"helper",void 0),fs([o({type:Boolean})],bs.prototype,"outlined",void 0),fs([o({type:Boolean})],bs.prototype,"disabled",void 0),fs([o({type:Boolean})],bs.prototype,"error",void 0),fs([o({type:Boolean})],bs.prototype,"fixedMenuPosition",void 0),fs([o({type:Array})],bs.prototype,"options",void 0),fs([s()],bs.prototype,"selectedOption",void 0),fs([s()],bs.prototype,"optionsDisplayed",void 0),fs([s()],bs.prototype,"focusOptions",void 0),fs([n(".ft-select")],bs.prototype,"container",void 0),fs([n(".ft-select--options")],bs.prototype,"optionsMenu",void 0),fs([n(".ft-select--input-panel")],bs.prototype,"mainPanel",void 0),fs([n(".ft-select--option:first-child")],bs.prototype,"firstOption",void 0),fs([n(".ft-select--option:focus")],bs.prototype,"focusedOption",void 0),fs([n(".ft-select--option.ft-select--option-selected")],bs.prototype,"selectedOptionElement",void 0),fs([n(".ft-select--option:last-child")],bs.prototype,"lastOption",void 0),fs([n("slot")],bs.prototype,"optionsSlot",void 0),p("ft-select")(bs),p("ft-select-option")(us);const vs={display:mt.create("--ft-skeleton--display","DISPLAY","block"),width:mt.create("--ft-skeleton--width","SIZE","100%"),height:mt.create("--ft-skeleton--height","SIZE","20px"),backgroundColor:mt.create("--ft-skeleton--background-color","COLOR","#f1f1f1"),glareWidth:mt.create("--ft-skeleton--glare-width","SIZE","200px"),glareColor:mt.create("--ft-skeleton--glare-color","COLOR","rgba(255, 255, 255, .6)"),animationDuration:mt.create("--ft-skeleton--animation-duration","UNKNOWN","2s"),borderRadiusM:mt.external(wt.borderRadiusM,"Design system")},gs=y`
|
|
1963
1965
|
:host {
|
|
1964
1966
|
width: ${vs.width};
|
|
1965
1967
|
height: ${vs.height};
|
|
@@ -2341,7 +2343,7 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
2341
2343
|
</a>
|
|
2342
2344
|
`))}
|
|
2343
2345
|
</div>
|
|
2344
|
-
`}update(){return new Promise(((t,e)=>{this.updateDebouncer.run((async()=>{this.searchBar.suggestions=this.searchBar.api&&this.searchBar.query.length>2?await this.searchBar.api.getSuggestions(this.searchBar.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],t()}))}))}onSuggestKeyDown(t){var e,i,o,s,r,n;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(r=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.searchBar.setQuery(e),this.searchBar.launchSearch()}removeRecentSearch(t,e){var i,o;t.preventDefault(),t.stopPropagation();let s=t.target.closest(".ft-search-bar--suggestion");const r=null!==(o=null!==(i=null==s?void 0:s.previousElementSibling)&&void 0!==i?i:null==s?void 0:s.nextElementSibling)&&void 0!==o?o:this.searchBar.input;null==r||r.focus(),this.searchBar.recentSearches=this.searchBar.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.searchBar.saveRecentSearches()}getIcon(t){const e="DOCUMENT"===t.type?Ai.file_format:Ai.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?
|
|
2346
|
+
`}update(){return new Promise(((t,e)=>{this.updateDebouncer.run((async()=>{this.searchBar.suggestions=this.searchBar.api&&this.searchBar.query.length>2?await this.searchBar.api.getSuggestions(this.searchBar.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],t()}))}))}onSuggestKeyDown(t){var e,i,o,s,r,n;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(r=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.searchBar.setQuery(e),this.searchBar.launchSearch()}removeRecentSearch(t,e){var i,o;t.preventDefault(),t.stopPropagation();let s=t.target.closest(".ft-search-bar--suggestion");const r=null!==(o=null!==(i=null==s?void 0:s.previousElementSibling)&&void 0!==i?i:null==s?void 0:s.nextElementSibling)&&void 0!==o?o:this.searchBar.input;null==r||r.focus(),this.searchBar.recentSearches=this.searchBar.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.searchBar.saveRecentSearches()}getIcon(t){const e="DOCUMENT"===t.type?Ai.file_format:Ai.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?Ii.BOOK:Ii.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,o,s,r;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[n,l]=((null!==(i=ji.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(r=null!==(s=null!==(o=Di.get(l))&&void 0!==o?o:Di.get(e))&&void 0!==s?s:Di.get(n))&&void 0!==r?r:Li.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=Ii.TOPICS}return Q`
|
|
2345
2347
|
<ft-icon .variant="${e}" .value="${i}" part="suggestion-icon"></ft-icon>
|
|
2346
2348
|
`}getFocusedSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion:focus-within")}getLastSuggestionElement(){let t=this.searchBar.querySelectorAll(".ft-search-bar--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.searchBar.querySelector(".ft-search-bar--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}}ws.styles=[Nt,y`
|
|
2347
2349
|
.ft-search-bar--mobile .ft-search-bar--suggestions {
|
|
@@ -2755,4 +2757,4 @@ class Mi extends Tt{constructor(t){if(super(t),this.et=tt,t.type!==Ut)throw Erro
|
|
|
2755
2757
|
part="floating-panel"
|
|
2756
2758
|
tabindex="-1">
|
|
2757
2759
|
${this.renderDesktopMenu()}
|
|
2758
|
-
</div>`}}Ns.elementDefinitions={"ft-accordion":Zo,"ft-accordion-item":Xo,"ft-button":Gi,"ft-chip":ns,"ft-filter":Uo,"ft-filter-option":To,"ft-icon":
|
|
2760
|
+
</div>`}}Ns.elementDefinitions={"ft-accordion":Zo,"ft-accordion-item":Xo,"ft-button":Gi,"ft-chip":ns,"ft-filter":Uo,"ft-filter-option":To,"ft-icon":Hi,"ft-ripple":Si,"ft-select":bs,"ft-select-option":us,"ft-size-watcher":te,"ft-skeleton":$s,"ft-snap-scroll":zo,"ft-tooltip":zi,"ft-typography":ai},Ns.styles=[ei,ys,ms,ks.styles,ws.styles],Es([o({type:Boolean})],Ns.prototype,"dense",void 0),Es([o()],Ns.prototype,"mode",void 0),Es([o({type:Boolean})],Ns.prototype,"forceMobileMenuOpen",void 0),Es([o({type:Boolean})],Ns.prototype,"forceMenuOpen",void 0),Es([o()],Ns.prototype,"baseUrl",void 0),Es([o()],Ns.prototype,"apiIntegrationIdentifier",void 0),Es([o()],Ns.prototype,"contentLocale",void 0),Es([s()],Ns.prototype,"availableContentLocales",void 0),Es([s()],Ns.prototype,"availableContentLocalesInitialized",void 0),Es([o()],Ns.prototype,"uiLocale",void 0),Es([d({})],Ns.prototype,"labels",void 0),Es([d([])],Ns.prototype,"displayedFilters",void 0),Es([d([])],Ns.prototype,"presets",void 0),Es([o({type:String,reflect:!0})],Ns.prototype,"selectedPreset",void 0),Es([d([])],Ns.prototype,"priors",void 0),Es([o()],Ns.prototype,"searchRequestSerializer",void 0),Es([s()],Ns.prototype,"searchFilters",void 0),Es([s()],Ns.prototype,"sizeCategory",void 0),Es([s()],Ns.prototype,"displayFacets",void 0),Es([s()],Ns.prototype,"mobileMenuOpen",void 0),Es([s()],Ns.prototype,"facets",void 0),Es([s()],Ns.prototype,"facetsInitialized",void 0),Es([n(".ft-search-bar--container")],Ns.prototype,"container",void 0),Es([n(".ft-search-bar--filters-opener")],Ns.prototype,"filtersOpener",void 0),Es([n(".ft-search-bar--floating-panel")],Ns.prototype,"floatingContainer",void 0),Es([n("ft-snap-scroll.ft-search-bar--filters-container")],Ns.prototype,"scrollingFiltersContainer",void 0),Es([n(".ft-search-bar--input")],Ns.prototype,"input",void 0),Es([s()],Ns.prototype,"query",void 0),Es([s()],Ns.prototype,"suggestions",void 0),Es([s()],Ns.prototype,"recentSearches",void 0),Es([s()],Ns.prototype,"scrollToFacet",void 0),Es([s()],Ns.prototype,"api",void 0),Es([s()],Ns.prototype,"facetsLoaded",void 0),p("ft-search-bar")(Ns),t.DEFAULT_LABELS=Cs,t.FtSearchBar=Ns,t.FtSearchBarCssVariables=xs,t.LaunchSearchEvent=zs,t.SearchStateChangeEvent=Bs,t.facetsCss=ms,t.searchBarCss=ys}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-bar",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Search bar component using Fluid Topics public API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-accordion": "1.0.
|
|
23
|
-
"@fluid-topics/ft-button": "1.0.
|
|
24
|
-
"@fluid-topics/ft-chip": "1.0.
|
|
25
|
-
"@fluid-topics/ft-filter": "1.0.
|
|
26
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
27
|
-
"@fluid-topics/ft-select": "1.0.
|
|
28
|
-
"@fluid-topics/ft-size-watcher": "1.0.
|
|
29
|
-
"@fluid-topics/ft-skeleton": "1.0.
|
|
30
|
-
"@fluid-topics/ft-snap-scroll": "1.0.
|
|
31
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
32
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
33
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-accordion": "1.0.4",
|
|
23
|
+
"@fluid-topics/ft-button": "1.0.4",
|
|
24
|
+
"@fluid-topics/ft-chip": "1.0.4",
|
|
25
|
+
"@fluid-topics/ft-filter": "1.0.4",
|
|
26
|
+
"@fluid-topics/ft-icon": "1.0.4",
|
|
27
|
+
"@fluid-topics/ft-select": "1.0.4",
|
|
28
|
+
"@fluid-topics/ft-size-watcher": "1.0.4",
|
|
29
|
+
"@fluid-topics/ft-skeleton": "1.0.4",
|
|
30
|
+
"@fluid-topics/ft-snap-scroll": "1.0.4",
|
|
31
|
+
"@fluid-topics/ft-tooltip": "1.0.4",
|
|
32
|
+
"@fluid-topics/ft-typography": "1.0.4",
|
|
33
|
+
"@fluid-topics/ft-wc-utils": "1.0.4",
|
|
34
34
|
"lit": "2.7.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@fluid-topics/public-api": "1.0.33"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "73efa63448237c9b05c59823cd70ee3bc019995e"
|
|
43
43
|
}
|