@fluid-topics/ft-search-result-metadata 2.0.3 → 2.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.
|
@@ -189,7 +189,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
189
189
|
</div>
|
|
190
190
|
</div>
|
|
191
191
|
</div>
|
|
192
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
192
|
+
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let n=this.manual;this.manual=!0;let a=this.text;this.text={message:t},await this.show(r),this.text=a,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let 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";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Xn(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Xe.designSystemVariables.transitionDuration}, left ${Xe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,Xe.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};se.elementDefinitions={"ft-typography":Se};se.styles=G1;st([b2()],se.prototype,"text",void 0);st([(0,Qe.property)({type:Boolean})],se.prototype,"manual",void 0);st([(0,Qe.property)({type:Boolean})],se.prototype,"inline",void 0);st([(0,Xe.numberProperty)()],se.prototype,"delay",void 0);st([(0,Qe.property)()],se.prototype,"position",void 0);st([(0,Xe.jsonProperty)([])],se.prototype,"ignoreMatchingElements",void 0);st([(0,Qe.queryAssignedNodes)()],se.prototype,"slotNodes",void 0);st([(0,Qe.query)(".ft-tooltip--container")],se.prototype,"container",void 0);st([(0,Qe.query)(".ft-tooltip")],se.prototype,"tooltip",void 0);st([(0,Qe.query)(".ft-tooltip--content")],se.prototype,"tooltipContent",void 0);st([(0,Qe.state)()],se.prototype,"visible",void 0);var v2=v(k());(0,v2.customElement)("ft-tooltip")(se);var ga=v(W()),Le=v(J()),C4=v(pr()),Jr=v(k());var _2=v(W()),Ce=v(J()),N2=v(pr()),Ao=v(k());var R2=v(W()),fe=v(k()),C2=fe.FtCssVariableFactory.extend("--ft-ripple-color","",fe.designSystemVariables.colorContent),R={color:C2,backgroundColor:fe.FtCssVariableFactory.extend("--ft-ripple-background-color","",C2),opacityContentOnSurfacePressed:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:fe.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},L2=fe.FtCssVariableFactory.extend("--ft-ripple-color","",fe.designSystemVariables.colorPrimary),E2={color:L2,backgroundColor:fe.FtCssVariableFactory.extend("--ft-ripple-background-color","",L2)},A2=fe.FtCssVariableFactory.extend("--ft-ripple-color","",fe.designSystemVariables.colorSecondary),O2={color:A2,backgroundColor:fe.FtCssVariableFactory.extend("--ft-ripple-background-color","",A2)},w2=R2.css`
|
|
193
193
|
:host {
|
|
194
194
|
display: contents;
|
|
195
195
|
}
|
|
@@ -269,7 +269,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
269
269
|
</div>
|
|
270
270
|
</div>
|
|
271
271
|
</div>
|
|
272
|
-
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("
|
|
272
|
+
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let a=this.text;this.text={message:e},await this.show(r),this.text=a,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Bo(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${V.transitionDuration}, left ${V.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||Mo(e,this.ignoreMatchingElements,this.eventsTarget)}};me.elementDefinitions={"ft-typography":Oe};me.styles=Ad;lt([Ld()],me.prototype,"text",void 0);lt([C({type:Boolean})],me.prototype,"manual",void 0);lt([C({type:Boolean})],me.prototype,"inline",void 0);lt([Rt()],me.prototype,"delay",void 0);lt([C()],me.prototype,"position",void 0);lt([Me([])],me.prototype,"ignoreMatchingElements",void 0);lt([ni()],me.prototype,"slotNodes",void 0);lt([ue(".ft-tooltip--container")],me.prototype,"container",void 0);lt([ue(".ft-tooltip")],me.prototype,"tooltip",void 0);lt([ue(".ft-tooltip--content")],me.prototype,"tooltipContent",void 0);lt([Z()],me.prototype,"visible",void 0);ee("ft-tooltip")(me);var Rd=n.extend("--ft-ripple-color","",V.colorContent),P={color:Rd,backgroundColor:n.extend("--ft-ripple-background-color","",Rd),opacityContentOnSurfacePressed:n.external(V.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:n.external(V.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:n.external(V.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:n.external(V.opacityContentOnSurfaceSelected,"Design system"),borderRadius:n.create("--ft-ripple-border-radius","","SIZE","0px")},wd=n.extend("--ft-ripple-color","",V.colorPrimary),_d={color:wd,backgroundColor:n.extend("--ft-ripple-background-color","",wd)},Td=n.extend("--ft-ripple-color","",V.colorSecondary),Nd={color:Td,backgroundColor:n.extend("--ft-ripple-background-color","",Td)},Md=z`
|
|
273
273
|
:host {
|
|
274
274
|
display: contents;
|
|
275
275
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-metadata",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Search result metadata for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "2.0.
|
|
23
|
-
"@fluid-topics/ft-floating-menu": "2.0.
|
|
24
|
-
"@fluid-topics/ft-search-result-context": "2.0.
|
|
25
|
-
"@fluid-topics/ft-tooltip": "2.0.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-chip": "2.0.4",
|
|
23
|
+
"@fluid-topics/ft-floating-menu": "2.0.4",
|
|
24
|
+
"@fluid-topics/ft-search-result-context": "2.0.4",
|
|
25
|
+
"@fluid-topics/ft-tooltip": "2.0.4",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "2.0.4",
|
|
27
27
|
"lit": "3.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@fluid-topics/ft-wc-test-utils": "2.0.
|
|
30
|
+
"@fluid-topics/ft-wc-test-utils": "2.0.4",
|
|
31
31
|
"@fluid-topics/public-api": "1.0.114"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "bc275bc44bc77b2e5802f2da9e92a0aca4479155"
|
|
34
34
|
}
|