@fluid-topics/ft-reader-topic-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.
|
@@ -181,7 +181,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
181
181
|
</div>
|
|
182
182
|
</div>
|
|
183
183
|
</div>
|
|
184
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
184
|
+
`}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 o,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(o=this.tooltip)===null||o===void 0||o.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(o=>t.has(o))&&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,o){let n=this.manual;this.manual=!0;let a=this.text;this.text={message:t},await this.show(o),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(o=>o.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&&Ws(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${o}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Ue.designSystemVariables.transitionDuration}, left ${Ue.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,Ue.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};ne.elementDefinitions={"ft-typography":Re};ne.styles=hs;Qe([D1()],ne.prototype,"text",void 0);Qe([(0,He.property)({type:Boolean})],ne.prototype,"manual",void 0);Qe([(0,He.property)({type:Boolean})],ne.prototype,"inline",void 0);Qe([(0,Ue.numberProperty)()],ne.prototype,"delay",void 0);Qe([(0,He.property)()],ne.prototype,"position",void 0);Qe([(0,Ue.jsonProperty)([])],ne.prototype,"ignoreMatchingElements",void 0);Qe([(0,He.queryAssignedNodes)()],ne.prototype,"slotNodes",void 0);Qe([(0,He.query)(".ft-tooltip--container")],ne.prototype,"container",void 0);Qe([(0,He.query)(".ft-tooltip")],ne.prototype,"tooltip",void 0);Qe([(0,He.query)(".ft-tooltip--content")],ne.prototype,"tooltipContent",void 0);Qe([(0,He.state)()],ne.prototype,"visible",void 0);var $1=C(B());(0,$1.customElement)("ft-tooltip")(ne);var $n=C(j()),be=C(re()),F4=C(Ir()),Gr=C(B());var X1=C(j()),ge=C(re()),Q1=C(Ir()),lo=C(B());var Y1=C(j()),se=C(B()),F1=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorContent),R={color:F1,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",F1),opacityContentOnSurfacePressed:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:se.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},j1=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorPrimary),V1={color:j1,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",j1)},K1=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorSecondary),Z1={color:K1,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",K1)},q1=Y1.css`
|
|
185
185
|
:host {
|
|
186
186
|
display: contents;
|
|
187
187
|
}
|
|
@@ -261,7 +261,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
261
261
|
</div>
|
|
262
262
|
</div>
|
|
263
263
|
</div>
|
|
264
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
264
|
+
`}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,o;t.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(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 o=this.manual;this.manual=!0;let a=this.text;this.text={message:t},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 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&&Ri(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 ${Z.transitionDuration}, left ${Z.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||za(t,this.ignoreMatchingElements,this.eventsTarget)}};ue.elementDefinitions={"ft-typography":Ie};ue.styles=W2;nt([rd()],ue.prototype,"text",void 0);nt([E({type:Boolean})],ue.prototype,"manual",void 0);nt([E({type:Boolean})],ue.prototype,"inline",void 0);nt([yn()],ue.prototype,"delay",void 0);nt([E()],ue.prototype,"position",void 0);nt([$e([])],ue.prototype,"ignoreMatchingElements",void 0);nt([wa()],ue.prototype,"slotNodes",void 0);nt([ye(".ft-tooltip--container")],ue.prototype,"container",void 0);nt([ye(".ft-tooltip")],ue.prototype,"tooltip",void 0);nt([ye(".ft-tooltip--content")],ue.prototype,"tooltipContent",void 0);nt([X()],ue.prototype,"visible",void 0);oe("ft-tooltip")(ue);var nd=n.extend("--ft-ripple-color","",Z.colorContent),P={color:nd,backgroundColor:n.extend("--ft-ripple-background-color","",nd),opacityContentOnSurfacePressed:n.external(Z.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:n.external(Z.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:n.external(Z.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:n.external(Z.opacityContentOnSurfaceSelected,"Design system"),borderRadius:n.create("--ft-ripple-border-radius","","SIZE","0px")},ad=n.extend("--ft-ripple-color","",Z.colorPrimary),id={color:ad,backgroundColor:n.extend("--ft-ripple-background-color","",ad)},sd=n.extend("--ft-ripple-color","",Z.colorSecondary),cd={color:sd,backgroundColor:n.extend("--ft-ripple-background-color","",sd)},ld=D`
|
|
265
265
|
:host {
|
|
266
266
|
display: contents;
|
|
267
267
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-topic-metadata",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Metadata of a topic in integrated reader.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "2.0.4",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@fluid-topics/ft-wc-test-utils": "2.0.
|
|
26
|
+
"@fluid-topics/ft-wc-test-utils": "2.0.4"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "bc275bc44bc77b2e5802f2da9e92a0aca4479155"
|
|
29
29
|
}
|