@bikdotai/bik-component-library 0.0.584-beta-tasks-3 → 0.0.584-beta-tasks-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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("../shimmer/ShimmerComponent/ShimmerStyled.js"),n=require("../../utils/DateUtils.js"),r=require("../../constants/Theme.js"),s=require("../../assets/icons/arrow_down.svg.js"),l=require("../../assets/icons/arrow_up.svg.js"),a=require("../../assets/icons/info.svg.js"),o=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js"),d=require("../TypographyStyle.js"),g=require("./chart/utils/calcPercentage.js"),u=require("./CommonStyles.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=h(t);const m=i=>{let{percent:a,direction:o,timeline:c,customRange:u,trendRaw:h,prefixSymbol:y,trendIconStyle:m}=i;const p="negative"===o?s.default:l.default,j="negative"===o?r.COLORS.background.negative.vibrant:"positive"===o?r.COLORS.background.positive.vibrant:r.COLORS.content.placeholder,x=t.useRef("today"===c?"vs yesterday":"yesterday"===c?"vs 1 day before":"7 days"===c?"vs last 7 days":"30 days"===c?"vs last 30 days":"custom"===c&&u?n.default.getAnalyticsCustomDateTimelineText(u):""),b=t.useRef((()=>{const e=((null!=h?h:0)>0?"+":"")+(null!=y?y:"");return void 0===h?"--":`${null!=e?e:""}${g.truncateValueTo10K(h)}`})());return e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"}},{children:["number"==typeof a&&e.jsx(p,{color:j,height:16,width:16,style:Object.assign({marginRight:2},null!=m?m:{})}),"number"==typeof a&&o&&e.jsxs(d.Caption,Object.assign({style:{color:j}},{children:["neutral"===o?0:a<1e3?a:">999","%"]})),!!h&&e.jsx(d.Caption,Object.assign({style:{marginLeft:4,color:r.COLORS.content.placeholder}},{children:`(${b.current})`})),c&&e.jsx(d.Caption,Object.assign({style:{marginLeft:4,color:r.COLORS.content.placeholder}},{children:x.current}))]}))};exports.AnalyticsTrend=t=>{let{title:n,value:s,trendPercent:l,type:h="horizontal",timeline:p,customRange:j,tooltip:x,card:b=!0,rightSeparator:f=!1,size:O="big",share:v=!1,formatVal:S,prefixSymbol:T,trailingIcon:C,onTrailIconClick:R,iconTooltipBody:w,funnelPercent:$,isLoading:L,trendRaw:q,suffixText:I,trendStyle:D,trendContainerStyle:M,trendIconStyle:k,containerStyle:P,prevTrendDiff:z,relativePercentageDiff:F}=t;const _="big"===O?d.TitleLarge:d.TitleMedium,A=void 0!==l?l<0?"negative":0===l?"neutral":"positive":void 0,N=void 0!==l?v?Math.round(l):Math.abs(Math.round(l)):void 0;return e.jsx(u.AnalyticsTrendContainer,Object.assign({card:b,style:Object.assign({},P)},{children:e.jsxs("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:4,borderRightWidth:f?1:0,borderRightColor:r.COLORS.stroke.primary,borderRightStyle:"solid",paddingLeft:b?0:24,paddingRight:b?0:24,height:"100%",justifyContent:"space-between",alignItems:"center"},null!=M?M:{})},{children:[e.jsxs("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=D?D:{})},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e.jsx(d.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:n})),x&&e.jsx(c.Tooltip,Object.assign({body:x,placement:"right",width:300},{children:e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e.jsx(a.default,{color:r.COLORS.content.primary,height:16,width:16})}))}))]})),e.jsxs("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},v?{justifyContent:"space-between"}:{})},{children:[L&&e.jsx(i.ShimmerComponentStyled,{width:108,height:26}),!L&&e.jsx(_,Object.assign({style:{color:r.COLORS.content.primary}},{children:void 0===s?"--":"number"==typeof s&&S?s>9999?`${null!=T?T:""}${g.truncateValueTo10K(s)} ${null!=I?I:""}`:`${null!=T?T:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(s)} ${null!=I?I:""}`:`${null!=T?T:""}${s} ${null!=I?I:""}`})),F&&e.jsx(o.Tag,{tagText:`${F}%`,theme:"light",type:"neutral"}),"horizontal"===h&&!L&&!v&&e.jsx(m,{timeline:p,customRange:j,percent:N,direction:A,trendRaw:q,prefixSymbol:T,trendIconStyle:k}),L&&!v&&"horizontal"===h&&e.jsx(i.ShimmerComponentStyled,{height:20,width:141,marginTop:6}),"vertical"===h&&!L&&void 0!==$&&e.jsx(o.Tag,{tagText:`${$} %`,theme:"light",type:"neutral"}),v&&!L&&void 0!==N&&e.jsx(o.Tag,{tagText:`${N} %`,theme:"light",type:"neutral"}),v||L||!z||0==z?e.jsx(e.Fragment,{}):e.jsx(o.Tag,{tagText:(e=>{const t=Math.abs(e);return t%1!=0?`${t.toFixed(1)} %`:`${t} %`})(z),theme:"light",type:"neutral"})]})),"vertical"===h&&!L&&!v&&e.jsx("div",Object.assign({style:{marginTop:10}},{children:e.jsx(m,{timeline:p,customRange:j,percent:N,direction:A,trendRaw:q,prefixSymbol:T,trendIconStyle:k})})),L&&"vertical"===h&&e.jsx(i.ShimmerComponentStyled,{height:20,width:141,marginTop:6})]})),w&&!L&&e.jsx(c.Tooltip,Object.assign({body:w,placement:"right"},{children:C&&e.jsx("div",Object.assign({className:"icon--holder",onClick:R},{children:y.default.createElement(C,{height:20,width:20,color:r.COLORS.content.secondary})}))}))]}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("../shimmer/ShimmerComponent/ShimmerStyled.js"),n=require("../../utils/DateUtils.js"),r=require("../../constants/Theme.js"),s=require("../../assets/icons/arrow_down.svg.js"),l=require("../../assets/icons/arrow_up.svg.js"),a=require("../../assets/icons/info.svg.js"),o=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js"),d=require("../TypographyStyle.js"),g=require("./chart/utils/calcPercentage.js"),u=require("./CommonStyles.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=h(t);const m=i=>{let{percent:a,direction:o,timeline:c,customRange:u,trendRaw:h,prefixSymbol:y,trendIconStyle:m}=i;const p="negative"===o?s.default:l.default,j="negative"===o?r.COLORS.background.negative.vibrant:"positive"===o?r.COLORS.background.positive.vibrant:r.COLORS.content.placeholder,x=t.useRef("today"===c?"vs yesterday":"yesterday"===c?"vs 1 day before":"7 days"===c?"vs last 7 days":"30 days"===c?"vs last 30 days":"custom"===c&&u?n.default.getAnalyticsCustomDateTimelineText(u):""),b=t.useRef((()=>{const e=((null!=h?h:0)>0?"+":"")+(null!=y?y:"");return void 0===h?"--":`${null!=e?e:""}${g.truncateValueTo10K(h)}`})());return e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"}},{children:["number"==typeof a&&e.jsx(p,{color:j,height:16,width:16,style:Object.assign({marginRight:2},null!=m?m:{})}),"number"==typeof a&&o&&e.jsxs(d.Caption,Object.assign({style:{color:j}},{children:["neutral"===o?0:a<1e3?a:">999","%"]})),!!h&&e.jsx(d.Caption,Object.assign({style:{marginLeft:4,color:r.COLORS.content.placeholder}},{children:`(${b.current})`})),c&&e.jsx(d.Caption,Object.assign({style:{marginLeft:4,color:r.COLORS.content.placeholder}},{children:x.current}))]}))};exports.AnalyticsTrend=t=>{let{title:n,value:s,trendPercent:l,type:h="horizontal",timeline:p,customRange:j,tooltip:x,card:b=!0,rightSeparator:f=!1,size:O="big",share:v=!1,formatVal:S,prefixSymbol:T,trailingIcon:C,onTrailIconClick:R,iconTooltipBody:w,funnelPercent:$,isLoading:L,trendRaw:q,suffixText:I,trendStyle:D,trendContainerStyle:M,trendIconStyle:k,containerStyle:P,prevTrendDiff:z,relativePercentageDiff:F}=t;const _="big"===O?d.TitleLarge:d.TitleMedium,A=void 0!==l?l<0?"negative":0===l?"neutral":"positive":void 0,N=void 0!==l?v?Math.round(l):Math.abs(Math.round(l)):void 0;return e.jsx(u.AnalyticsTrendContainer,Object.assign({card:b,style:Object.assign({},P)},{children:e.jsxs("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:4,borderRightWidth:f?1:0,borderRightColor:r.COLORS.stroke.primary,borderRightStyle:"solid",paddingLeft:b?0:24,paddingRight:b?0:24,height:"100%",justifyContent:"space-between",alignItems:"center"},null!=M?M:{})},{children:[e.jsxs("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=D?D:{})},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e.jsx(d.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:n})),x&&e.jsx(c.Tooltip,Object.assign({body:x,placement:"right",width:300},{children:e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e.jsx(a.default,{color:r.COLORS.content.primary,height:16,width:16})}))}))]})),e.jsxs("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},v?{justifyContent:"space-between"}:{})},{children:[L&&e.jsx(i.ShimmerComponentStyled,{width:108,height:26}),!L&&e.jsx(_,Object.assign({style:{color:r.COLORS.content.primary}},{children:void 0===s?"--":"number"==typeof s&&S?s>9999?`${null!=T?T:""}${g.truncateValueTo10K(s)} ${null!=I?I:""}`:`${null!=T?T:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(s)} ${null!=I?I:""}`:`${null!=T?T:""}${s} ${null!=I?I:""}`})),"number"==typeof F&&e.jsx(o.Tag,{tagText:`${F}%`,theme:"light",type:"neutral"}),"horizontal"===h&&!L&&!v&&e.jsx(m,{timeline:p,customRange:j,percent:N,direction:A,trendRaw:q,prefixSymbol:T,trendIconStyle:k}),L&&!v&&"horizontal"===h&&e.jsx(i.ShimmerComponentStyled,{height:20,width:141,marginTop:6}),"vertical"===h&&!L&&void 0!==$&&e.jsx(o.Tag,{tagText:`${$} %`,theme:"light",type:"neutral"}),v&&!L&&void 0!==N&&e.jsx(o.Tag,{tagText:`${N} %`,theme:"light",type:"neutral"}),v||L||!z||0==z?e.jsx(e.Fragment,{}):e.jsx(o.Tag,{tagText:(e=>{const t=Math.abs(e);return t%1!=0?`${t.toFixed(1)} %`:`${t} %`})(z),theme:"light",type:"neutral"})]})),"vertical"===h&&!L&&!v&&e.jsx("div",Object.assign({style:{marginTop:10}},{children:e.jsx(m,{timeline:p,customRange:j,percent:N,direction:A,trendRaw:q,prefixSymbol:T,trendIconStyle:k})})),L&&"vertical"===h&&e.jsx(i.ShimmerComponentStyled,{height:20,width:141,marginTop:6})]})),w&&!L&&e.jsx(c.Tooltip,Object.assign({body:w,placement:"right"},{children:C&&e.jsx("div",Object.assign({className:"icon--holder",onClick:R},{children:y.default.createElement(C,{height:20,width:20,color:r.COLORS.content.secondary})}))}))]}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import n,{useRef as r}from"react";import{ShimmerComponentStyled as o}from"../shimmer/ShimmerComponent/ShimmerStyled.js";import l from"../../utils/DateUtils.js";import{COLORS as s}from"../../constants/Theme.js";import a from"../../assets/icons/arrow_down.svg.js";import c from"../../assets/icons/arrow_up.svg.js";import d from"../../assets/icons/info.svg.js";import{Tag as g}from"../tag/Tag.js";import{Tooltip as m}from"../tooltips/Tooltip.js";import{BodyCaption as h,Caption as p,TitleLarge as y,TitleMedium as u}from"../TypographyStyle.js";import{truncateValueTo10K as f}from"./chart/utils/calcPercentage.js";import{AnalyticsTrendContainer as b}from"./CommonStyles.js";const v=r=>{let{title:l,value:a,trendPercent:c,type:p="horizontal",timeline:v,customRange:x,tooltip:w,card:O=!0,rightSeparator:S=!1,size:T="big",share:$=!1,formatVal:I,prefixSymbol:R,trailingIcon:D,onTrailIconClick:C,iconTooltipBody:k,funnelPercent:z,isLoading:L,trendRaw:M,suffixText:P,trendStyle:F,trendContainerStyle:N,trendIconStyle:W,containerStyle:_,prevTrendDiff:A,relativePercentageDiff:B}=r;const E="big"===T?y:u,U=void 0!==c?c<0?"negative":0===c?"neutral":"positive":void 0,V=void 0!==c?$?Math.round(c):Math.abs(Math.round(c)):void 0;return e(b,Object.assign({card:O,style:Object.assign({},_)},{children:t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:4,borderRightWidth:S?1:0,borderRightColor:s.stroke.primary,borderRightStyle:"solid",paddingLeft:O?0:24,paddingRight:O?0:24,height:"100%",justifyContent:"space-between",alignItems:"center"},null!=N?N:{})},{children:[t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=F?F:{})},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e(h,Object.assign({style:{color:s.content.secondary}},{children:l})),w&&e(m,Object.assign({body:w,placement:"right",width:300},{children:e("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e(d,{color:s.content.primary,height:16,width:16})}))}))]})),t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},$?{justifyContent:"space-between"}:{})},{children:[L&&e(o,{width:108,height:26}),!L&&e(E,Object.assign({style:{color:s.content.primary}},{children:void 0===a?"--":"number"==typeof a&&I?a>9999?`${null!=R?R:""}${f(a)} ${null!=P?P:""}`:`${null!=R?R:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(a)} ${null!=P?P:""}`:`${null!=R?R:""}${a} ${null!=P?P:""}`})),B&&e(g,{tagText:`${B}%`,theme:"light",type:"neutral"}),"horizontal"===p&&!L&&!$&&e(j,{timeline:v,customRange:x,percent:V,direction:U,trendRaw:M,prefixSymbol:R,trendIconStyle:W}),L&&!$&&"horizontal"===p&&e(o,{height:20,width:141,marginTop:6}),"vertical"===p&&!L&&void 0!==z&&e(g,{tagText:`${z} %`,theme:"light",type:"neutral"}),$&&!L&&void 0!==V&&e(g,{tagText:`${V} %`,theme:"light",type:"neutral"}),$||L||!A||0==A?e(i,{}):e(g,{tagText:(e=>{const t=Math.abs(e);return t%1!=0?`${t.toFixed(1)} %`:`${t} %`})(A),theme:"light",type:"neutral"})]})),"vertical"===p&&!L&&!$&&e("div",Object.assign({style:{marginTop:10}},{children:e(j,{timeline:v,customRange:x,percent:V,direction:U,trendRaw:M,prefixSymbol:R,trendIconStyle:W})})),L&&"vertical"===p&&e(o,{height:20,width:141,marginTop:6})]})),k&&!L&&e(m,Object.assign({body:k,placement:"right"},{children:D&&e("div",Object.assign({className:"icon--holder",onClick:C},{children:n.createElement(D,{height:20,width:20,color:s.content.secondary})}))}))]}))}))},j=i=>{let{percent:n,direction:o,timeline:d,customRange:g,trendRaw:m,prefixSymbol:h,trendIconStyle:y}=i;const u="negative"===o?a:c,b="negative"===o?s.background.negative.vibrant:"positive"===o?s.background.positive.vibrant:s.content.placeholder,v=r("today"===d?"vs yesterday":"yesterday"===d?"vs 1 day before":"7 days"===d?"vs last 7 days":"30 days"===d?"vs last 30 days":"custom"===d&&g?l.getAnalyticsCustomDateTimelineText(g):""),j=r((()=>{const e=((null!=m?m:0)>0?"+":"")+(null!=h?h:"");return void 0===m?"--":`${null!=e?e:""}${f(m)}`})());return t("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"}},{children:["number"==typeof n&&e(u,{color:b,height:16,width:16,style:Object.assign({marginRight:2},null!=y?y:{})}),"number"==typeof n&&o&&t(p,Object.assign({style:{color:b}},{children:["neutral"===o?0:n<1e3?n:">999","%"]})),!!m&&e(p,Object.assign({style:{marginLeft:4,color:s.content.placeholder}},{children:`(${j.current})`})),d&&e(p,Object.assign({style:{marginLeft:4,color:s.content.placeholder}},{children:v.current}))]}))};export{v as AnalyticsTrend};
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import n,{useRef as r}from"react";import{ShimmerComponentStyled as o}from"../shimmer/ShimmerComponent/ShimmerStyled.js";import l from"../../utils/DateUtils.js";import{COLORS as s}from"../../constants/Theme.js";import a from"../../assets/icons/arrow_down.svg.js";import c from"../../assets/icons/arrow_up.svg.js";import d from"../../assets/icons/info.svg.js";import{Tag as g}from"../tag/Tag.js";import{Tooltip as m}from"../tooltips/Tooltip.js";import{BodyCaption as h,Caption as p,TitleLarge as y,TitleMedium as u}from"../TypographyStyle.js";import{truncateValueTo10K as f}from"./chart/utils/calcPercentage.js";import{AnalyticsTrendContainer as b}from"./CommonStyles.js";const v=r=>{let{title:l,value:a,trendPercent:c,type:p="horizontal",timeline:v,customRange:x,tooltip:w,card:O=!0,rightSeparator:S=!1,size:T="big",share:$=!1,formatVal:I,prefixSymbol:R,trailingIcon:D,onTrailIconClick:C,iconTooltipBody:k,funnelPercent:z,isLoading:L,trendRaw:M,suffixText:P,trendStyle:F,trendContainerStyle:N,trendIconStyle:W,containerStyle:_,prevTrendDiff:A,relativePercentageDiff:B}=r;const E="big"===T?y:u,U=void 0!==c?c<0?"negative":0===c?"neutral":"positive":void 0,V=void 0!==c?$?Math.round(c):Math.abs(Math.round(c)):void 0;return e(b,Object.assign({card:O,style:Object.assign({},_)},{children:t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:4,borderRightWidth:S?1:0,borderRightColor:s.stroke.primary,borderRightStyle:"solid",paddingLeft:O?0:24,paddingRight:O?0:24,height:"100%",justifyContent:"space-between",alignItems:"center"},null!=N?N:{})},{children:[t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"column",gap:4,height:"100%"},null!=F?F:{})},{children:[t("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"}},{children:[e(h,Object.assign({style:{color:s.content.secondary}},{children:l})),w&&e(m,Object.assign({body:w,placement:"right",width:300},{children:e("div",Object.assign({style:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:e(d,{color:s.content.primary,height:16,width:16})}))}))]})),t("div",Object.assign({style:Object.assign({display:"flex",flexDirection:"row",gap:12,alignItems:"center"},$?{justifyContent:"space-between"}:{})},{children:[L&&e(o,{width:108,height:26}),!L&&e(E,Object.assign({style:{color:s.content.primary}},{children:void 0===a?"--":"number"==typeof a&&I?a>9999?`${null!=R?R:""}${f(a)} ${null!=P?P:""}`:`${null!=R?R:""}${new Intl.NumberFormat("en-IN",{maximumFractionDigits:2}).format(a)} ${null!=P?P:""}`:`${null!=R?R:""}${a} ${null!=P?P:""}`})),"number"==typeof B&&e(g,{tagText:`${B}%`,theme:"light",type:"neutral"}),"horizontal"===p&&!L&&!$&&e(j,{timeline:v,customRange:x,percent:V,direction:U,trendRaw:M,prefixSymbol:R,trendIconStyle:W}),L&&!$&&"horizontal"===p&&e(o,{height:20,width:141,marginTop:6}),"vertical"===p&&!L&&void 0!==z&&e(g,{tagText:`${z} %`,theme:"light",type:"neutral"}),$&&!L&&void 0!==V&&e(g,{tagText:`${V} %`,theme:"light",type:"neutral"}),$||L||!A||0==A?e(i,{}):e(g,{tagText:(e=>{const t=Math.abs(e);return t%1!=0?`${t.toFixed(1)} %`:`${t} %`})(A),theme:"light",type:"neutral"})]})),"vertical"===p&&!L&&!$&&e("div",Object.assign({style:{marginTop:10}},{children:e(j,{timeline:v,customRange:x,percent:V,direction:U,trendRaw:M,prefixSymbol:R,trendIconStyle:W})})),L&&"vertical"===p&&e(o,{height:20,width:141,marginTop:6})]})),k&&!L&&e(m,Object.assign({body:k,placement:"right"},{children:D&&e("div",Object.assign({className:"icon--holder",onClick:C},{children:n.createElement(D,{height:20,width:20,color:s.content.secondary})}))}))]}))}))},j=i=>{let{percent:n,direction:o,timeline:d,customRange:g,trendRaw:m,prefixSymbol:h,trendIconStyle:y}=i;const u="negative"===o?a:c,b="negative"===o?s.background.negative.vibrant:"positive"===o?s.background.positive.vibrant:s.content.placeholder,v=r("today"===d?"vs yesterday":"yesterday"===d?"vs 1 day before":"7 days"===d?"vs last 7 days":"30 days"===d?"vs last 30 days":"custom"===d&&g?l.getAnalyticsCustomDateTimelineText(g):""),j=r((()=>{const e=((null!=m?m:0)>0?"+":"")+(null!=h?h:"");return void 0===m?"--":`${null!=e?e:""}${f(m)}`})());return t("div",Object.assign({style:{display:"flex",alignItems:"center",flexDirection:"row",flexWrap:"wrap"}},{children:["number"==typeof n&&e(u,{color:b,height:16,width:16,style:Object.assign({marginRight:2},null!=y?y:{})}),"number"==typeof n&&o&&t(p,Object.assign({style:{color:b}},{children:["neutral"===o?0:n<1e3?n:">999","%"]})),!!m&&e(p,Object.assign({style:{marginLeft:4,color:s.content.placeholder}},{children:`(${j.current})`})),d&&e(p,Object.assign({style:{marginLeft:4,color:s.content.placeholder}},{children:v.current}))]}))};export{v as AnalyticsTrend};
|