@foodpilot/foods 2.20.3 → 2.21.1
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/dist/components/Button/TertiaryToggleButtonNodeTitle.js +3 -3
- package/dist/components/CMS/ArticleBlock/Article.js +10 -10
- package/dist/components/CMS/ArticleBlock/ArticlesBox.d.ts +1 -1
- package/dist/components/CMS/ArticleBlock/ArticlesBox.js +2 -4
- package/dist/components/Chart/DoughnutChart/DoughnutChart.js +7 -6
- package/dist/components/Chart/Legend/Legend.d.ts +1 -0
- package/dist/components/Chart/Legend/Legend.js +1 -1
- package/dist/components/Chart/Legend/LegendBottom.d.ts +1 -0
- package/dist/components/Chart/Legend/LegendBottom.js +10 -10
- package/dist/components/Chart/Legend/LegendRight.d.ts +1 -0
- package/dist/components/Chart/Legend/LegendRight.js +16 -16
- package/dist/components/Chart/Legend/LegendRow.d.ts +3 -2
- package/dist/components/Chart/Legend/LegendRow.js +7 -7
- package/dist/components/Chart/TrajectoryChart/TrajectoryChart.js +3 -3
- package/dist/components/Chart/TrajectoryChart/TrajectoryChartCore.js +6 -6
- package/dist/components/Chart/WaterfallChart/WaterfallChart.d.ts +2 -0
- package/dist/components/Chart/WaterfallChart/WaterfallChart.js +3 -3
- package/dist/components/Chart/WaterfallChart/WaterfallChartCore.js +7 -7
- package/dist/components/Chart/WaterfallChart/WaterfallChartTick.js +2 -2
- package/dist/components/Chart/WaterfallChart/WaterfallDataLegend.d.ts +9 -0
- package/dist/components/Chart/WaterfallChart/WaterfallDataLegend.js +2 -0
- package/dist/components/Chart/WaterfallChart/labelGeometry.d.ts +2 -0
- package/dist/components/Chart/WaterfallChart/labelGeometry.js +1 -0
- package/dist/components/Chart/WaterfallChart/utils.d.ts +1 -0
- package/dist/components/Chart/WaterfallChart/utils.js +1 -1
- package/dist/components/Dialog/UnsavedChangesDialog.d.ts +14 -0
- package/dist/components/Dialog/UnsavedChangesDialog.js +7 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Dialog/index.js +1 -0
- package/dist/main.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{useState as e,createElement as o}from"react";import{styled as t,ToggleButton as i,Typography as d}from"@mui/material";import{greyTheme as l}from"../../themes/common/colors.js";const
|
|
2
|
-
return r("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"1rem"},children:i.map((e,t)=>/* @__PURE__ */o(
|
|
3
|
-
/* @__PURE__ */r(d,{variant:"big-bold",color:"inherit",children:e})))})};export{
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{useState as e,createElement as o}from"react";import{styled as t,ToggleButton as i,Typography as d}from"@mui/material";import{greyTheme as l}from"../../themes/common/colors.js";const n=t(i)(r=>({textTransform:"none",border:`1px solid ${l[500]}`,background:l.gradientLight,color:l[2800],borderRadius:"8px","&.Mui-selected":{border:`2px solid ${r.theme.palette.primary[600]}`,background:l.gradientLight,"&:hover":{border:`2px solid ${r.theme.palette.primary[600]}`,background:l.gradientLight}},"&:disabled":{border:`1px solid ${l[100]}`,background:l[500]},"&:hover":{border:`1px solid ${l[500]}`,background:l[400]}})),a=t=>{const{choices:i,onClick:l,currentIndexSelected:a,...c}=t,[m,p]=e(a??null);/* @__PURE__ */
|
|
2
|
+
return r("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"1rem"},children:i.map((e,t)=>/* @__PURE__ */o(n,{...c,key:`${t}-button-toggle`,value:t,onClick:()=>{return r=t,l?.(r),void p(r!==m?r:null);var r},selected:t===m},
|
|
3
|
+
/* @__PURE__ */r(d,{variant:"big-bold",color:"inherit",children:e})))})};export{n as CustomToggleButtonNodeTitle,a as TertiaryToggleButtonNodeTitle};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{jsxs as i,Fragment as e,jsx as
|
|
1
|
+
import{jsxs as i,Fragment as e,jsx as t}from"react/jsx-runtime";import{styled as o}from"@mui/material/styles";import{Box as n,Typography as r,Stack as s,Link as a,Button as l}from"@mui/material";import{greyTheme as m}from"../../../themes/common/colors.js";import{FoodsIcon as c}from"../../Icons/FoodsIcon.js";import{useState as d}from"react";import{ArticleContent as h}from"./ArticleContent.js";const p=[3,5,9,3],g=i=>{const{isMain:e,isRightColumn:t}=i;return e?"0 0 50%":t?"0 0 35%":"0 0 auto"},u=(i,e)=>{const{isMain:t,isRightColumn:o}=i;return t?"auto":o?"100%":e},b=o(s,{shouldForwardProp:i=>"isRightColumn"!==i&&"isMain"!==i})(({isRightColumn:i,isMain:e,theme:t})=>({border:`1px solid ${m[500]}`,borderRadius:t.spacing(1),overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",flexDirection:e||i?"row":"column",[t.breakpoints.down("md")]:{flexDirection:"column"},boxShadow:t.custom.shadows.grey})),f=o(n,{shouldForwardProp:i=>"isRightColumn"!==i&&"isMain"!==i})(({isRightColumn:i,isMain:e,theme:t})=>({flex:g({isMain:e,isRightColumn:i}),lineHeight:0,position:"relative",width:"100%",height:u({isMain:e,isRightColumn:i},t.spacing(47.5)),...e&&{minHeight:t.spacing(47.5)},backgroundColor:t.palette.grey[400],overflow:"hidden","& img":{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center",display:"block",...e&&{position:"absolute",inset:0}},[t.breakpoints.down("md")]:{height:t.spacing(25),minHeight:0,flex:"0 0 auto"}})),w=o(s)(({theme:i})=>({minWidth:0,overflowWrap:"anywhere",flex:"1 1 0",backgroundColor:i.palette.background.paper,padding:i.spacing(3,3,2,3),justifyContent:"space-between",gap:i.spacing(1),[i.breakpoints.down("md")]:{padding:i.spacing(2,2,1.5,2)},[i.breakpoints.down("md")]:{flex:"1 1 0"}})),C=o(a)({display:"block",width:"100%",height:"100%",cursor:"pointer"}),k=o(l)(({theme:i})=>({display:"inline-flex",alignSelf:"flex-start",fontWeight:700,gap:i.spacing(1)})),x=o(r,{shouldForwardProp:i=>"isFirst"!==i})(({isFirst:i,articlesNumber:e,theme:t})=>({display:"-webkit-box",WebkitLineClamp:i?5:p[e-1]||3,marginTop:t.spacing(2),WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",[t.breakpoints.down("md")]:{WebkitLineClamp:i?3:2,marginTop:t.spacing(1)}})),M=o=>{const{title:s,description:a,imageSrc:l,content:m,onClick:p,isMain:g=!1,isFirst:u=!1,articlesNumber:M=1,isRightColumn:R=!1,readMoreText:v="Lire l'article"}=o,[y,F]=d(!1),j=()=>{p?p():F(!0)};/* @__PURE__ */
|
|
2
2
|
return i(e,{children:[
|
|
3
|
-
/* @__PURE__ */i(
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */i(
|
|
6
|
-
/* @__PURE__ */i(
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */i(
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
3
|
+
/* @__PURE__ */i(b,{isRightColumn:R,isMain:g,children:[
|
|
4
|
+
/* @__PURE__ */t(f,{isRightColumn:R,isMain:g,children:/* @__PURE__ */t(C,{onClick:j,children:/* @__PURE__ */t("img",{src:l,alt:s})})}),
|
|
5
|
+
/* @__PURE__ */i(w,{children:[
|
|
6
|
+
/* @__PURE__ */i(n,{children:[
|
|
7
|
+
/* @__PURE__ */t(r,{variant:"h3",mb:"0.2rem",children:s}),
|
|
8
|
+
/* @__PURE__ */t(x,{variant:"body",mb:"1rem",isFirst:u,articlesNumber:M,dangerouslySetInnerHTML:{__html:a}})]}),
|
|
9
|
+
/* @__PURE__ */i(k,{variant:"text",onClick:j,children:[
|
|
10
|
+
/* @__PURE__ */t(r,{fontWeight:700,fontSize:"0.875rem",children:v}),
|
|
11
|
+
/* @__PURE__ */t(c,{size:2,icon:"arrowRight"})]})]})]}),!p&&/* @__PURE__ */t(h,{isOpen:y,onClose:()=>F(!1),article:{title:s,description:a,imageSrc:l,content:m||a}})]})};export{M as Article};
|
|
@@ -4,5 +4,5 @@ type ArticlesBoxProps = {
|
|
|
4
4
|
articles: ArticleProps[];
|
|
5
5
|
sxProps?: SxProps;
|
|
6
6
|
};
|
|
7
|
-
export declare const ArticlesBox: (props: ArticlesBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ArticlesBox: (props: ArticlesBoxProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
8
|
export {};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import{jsxs as i,jsx as
|
|
2
|
-
|
|
3
|
-
/* @__PURE__ */e(t,{item:!0,xs:1,children:/* @__PURE__ */e(m,{...a,isFirst:!0,articlesNumber:n.length})}),
|
|
4
|
-
/* @__PURE__ */e(t,{item:!0,xs:1,children:/* @__PURE__ */e(r,{gap:3,display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%",sx:{"@media (max-width: 1068px)":{gap:2,marginTop:0}},children:h.map((i,t)=>/* @__PURE__ */e(r,{height:"100%",children:/* @__PURE__ */e(m,{...i,isRightColumn:n.length>=3,articlesNumber:n.length})},`article-${t}`))})})]})};export{s as ArticlesBox};
|
|
1
|
+
import{jsxs as i,jsx as r}from"react/jsx-runtime";import{Grid2 as s}from"@mui/material";import{Article as t}from"./Article.js";const n=n=>{const{articles:e=[],sxProps:m={}}=n,[l,...c]=e,o=2===e.length;return l?/* @__PURE__ */i(s,{container:!0,columns:12,sx:{...m,minWidth:0},spacing:4,children:[
|
|
2
|
+
/* @__PURE__ */r(s,{size:{xs:12,md:o?6:12},sx:{minWidth:0},children:/* @__PURE__ */r(t,{...l,isMain:!o,isFirst:!0,isRightColumn:!1,articlesNumber:e.length})}),c.map((i,n)=>/* @__PURE__ */r(s,{size:{xs:12,md:6,lg:o?6:4},sx:{minWidth:0},children:/* @__PURE__ */r(t,{...i,isMain:!1,isFirst:!1,isRightColumn:!1,articlesNumber:e.length})},`${n}-secondary-article-card`))]}):null};export{n as ArticlesBox};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{useTheme as t,useMediaQuery as a,Stack as
|
|
2
|
-
return e(
|
|
3
|
-
/* @__PURE__ */o(
|
|
4
|
-
/* @__PURE__ */o(g,{data:
|
|
5
|
-
/* @__PURE__ */o(
|
|
6
|
-
/* @__PURE__ */o(
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{useTheme as t,useMediaQuery as a,Stack as i,Box as n,Typography as l}from"@mui/material";import{extractPaletteFromTheme as s,createPalette as d}from"../Legend/utils.js";import{prepareChartData as m,calculateSumValues as c,formatDisplayValue as h}from"./utils.js";import{useDoughnutChartInteractions as u}from"./useDoughnutChartInteractions.js";import{DoughnutChartContent as p}from"./DoughnutChartContent.js";import f from"i18next";import{PolymorphicDoughnutChart as g}from"../PolymorphicChart/charts/PolymorphicDoughnutChart.js";import{Legend as v}from"../Legend/Legend.js";const x=2,b=0,w=2,y="900px",L="0.2s",C=C=>{const $=t(),{values:j,labels:F,colors:T,legend:W,children:D,valuesUnit:E,className:I,valuesFormatterFn:O=$.numbers.valueFormatterFn,createPalette:P=!0,isLoading:H=!1,displayTotal:M=!0,fullWidthLegend:N=!1,displayTotalVariant:k="number-big",spacing:U=x,borderWidth:V=b,borderColor:A,hoverOffset:R=w,icons:S,showTooltip:q=!0,width:z=y}=C,B=r(null),G=r(null),J=f.language,K=a($.breakpoints.down("md")),Q=s($,100,700),X=W?.position??"bottom",Y=P?d(T&&T.length?T:Q,j??[]):T??Q,Z=m(j,F,Y),_=c(j,M),ee=h(D,M,_,O),{HoveredChartElementIndex:oe,tooltipPos:re,handleLegendHover:te,handleMouseEnter:ae,handleMouseOut:ie}=u(Z,B);/* @__PURE__ */
|
|
2
|
+
return e(i,{direction:"bottom"===X||K?"column":"row",gap:$.spacing(6),className:`doughnut-chart ${I}`,ref:G,sx:{maxWidth:z,width:"100%"},children:[
|
|
3
|
+
/* @__PURE__ */o(i,{sx:{flex:1},children:/* @__PURE__ */e(n,{position:"relative",margin:"28px auto",sx:{"& :focus-visible":{outline:`2px solid ${$.palette.primary.main}`,outlineOffset:2},".cell-hovered":{animation:`cell-hovered ${L} ease-in-out forwards`,transformOrigin:"center"},".cell-idle":{transform:"scale(1)",transformOrigin:"center",animation:`cell-idle ${L} ease-in-out forwards`},"@keyframes cell-hovered":{"0%":{transform:"scale(1)"},"100%":{transform:`scale(${1+R/100})`},"@keyframes cell-idle":{"0%":{transform:`scale(${1+R/100})`},"100%":{transform:"scale(1)"}}},width:"100%"},className:"doughnut-chart-wrapper",id:"doughnut-chart-wrapper",ref:B,children:[
|
|
4
|
+
/* @__PURE__ */o(g,{data:Z,HoveredChartElementIndex:oe,spacing:U,borderWidth:V,borderColor:A,showTooltip:q,tooltipPos:re,isLoading:H,valuesFormatterFn:O,language:J,valuesUnit:E,icons:S,onMouseEnter:ae,onMouseLeave:ie,onLegendAction:e=>{W?.actions?.[e]&&W.actions[e]?.()}}),
|
|
5
|
+
/* @__PURE__ */o(p,{isLoading:H,displayValue:ee,displayTotalVariant:k,valuesUnit:E,displayTotal:M,isEmpty:0===Z.length})]})}),
|
|
6
|
+
/* @__PURE__ */o(n,{display:"flex",width:N?"100%":"inherit",sx:{width:N?"100%":"inherit",flex:1},children:W&&/* @__PURE__ */o(v,{labels:F,isLoading:K&&H,renderItemDetails:K?e=>{const r=j?.[e],t="number"==typeof r&&Number.isFinite(r);/* @__PURE__ */
|
|
7
|
+
return o(l,{variant:"body-medium",sx:{maxWidth:"100%",overflowWrap:"anywhere",whiteSpace:"normal"},children:t?`${O(r)}${E?` ${E}`:""}`:"—"})}:void 0,hoveredDatasetIndex:oe,onLegendHover:te,values:j,colors:Y,legend:W,icons:S,chartRef:B})})]})};export{C as DoughnutChart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{LegendBottom as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{LegendBottom as r}from"./LegendBottom.js";import{LegendRight as t}from"./LegendRight.js";const o=o=>{const{labels:n,renderItemDetails:a,colors:s,icons:l=[],legend:i,hoveredDatasetIndex:d,onLegendHover:m,values:c,hidePercentage:g=!1,chartRef:h,isLoading:u=!1,maxScore:v,separator:p="/",threshold:f=1,valuesFormatterFn:x}=o;if(!n||!n.length)return null;const L=c?.reduce((e,r)=>e+(Number.isFinite(r)&&r>0?r:0),0)??0;return"raw"!==i?.mode&&c&&c.length>0&&L<=0&&!a?null:/* @__PURE__ */e("bottom"===i?.position?r:t,{labels:n,renderItemDetails:a,values:c,colors:s,legend:i,hoveredDatasetIndex:d,onLegendHover:m,icons:l,hidePercentage:g,chartRef:h,isLoading:u,maxScore:v,separator:p,threshold:f,valuesFormatterFn:x})};export{o as Legend};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as r}from"react/jsx-runtime";import{useTheme as o,Stack as t,Box as i}from"@mui/material";import{createDistribution as a,formatPercentage as s}from"./utils.js";import{LegendSeeMore as c}from"./LegendSeeMore.js";import{useLegendHoverHandlers as d}from"./useLegendHoverHandlers.js";import{LegendRow as l}from"./LegendRow.js";import{LegendValueBadge as h}from"./LegendValueBadge.js";import{LegendBottomSkeleton as m}from"./LegendBottomSkeleton.js";const g=g=>{const{values:p,labels:u,colors:
|
|
2
|
-
return e(m,{count:n,hidePercentage:
|
|
3
|
-
return e(t,"raw"===
|
|
4
|
-
return e(l,{index:a,label:o,
|
|
5
|
-
/* @__PURE__ */e(h,{children:s?/* @__PURE__ */n(r,{children:[
|
|
6
|
-
/* @__PURE__ */e(i,{component:"span",children:b}),
|
|
7
|
-
/* @__PURE__ */e(c,{action:
|
|
8
|
-
/* @__PURE__ */e(i,{component:"span",children:b}),
|
|
9
|
-
return e(l,{index:o,label:r,
|
|
10
|
-
/* @__PURE__ */e(c,{action:
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as r}from"react/jsx-runtime";import{useTheme as o,Stack as t,Box as i}from"@mui/material";import{createDistribution as a,formatPercentage as s}from"./utils.js";import{LegendSeeMore as c}from"./LegendSeeMore.js";import{useLegendHoverHandlers as d}from"./useLegendHoverHandlers.js";import{LegendRow as l}from"./LegendRow.js";import{LegendValueBadge as h}from"./LegendValueBadge.js";import{LegendBottomSkeleton as m}from"./LegendBottomSkeleton.js";const g=g=>{const{values:p,labels:u,renderItemDetails:v,colors:f=[],legend:M,onLegendHover:x,icons:L=[],chartRef:w,hidePercentage:j=!1,isLoading:y=!1,maxScore:I,separator:b="/",threshold:S=1,valuesFormatterFn:F,hoveredDatasetIndex:k}=g,H=o(),C=a(p??[]),{handleMouseEnter:E,handleMouseLeave:N}=d({onLegendHover:x,chartRef:w,move:{xFactor:.6,yFactor:.5}});if(y){const n=Math.max(6,Math.min(8,u?.length??p?.length??6));/* @__PURE__ */
|
|
2
|
+
return e(m,{count:n,hidePercentage:j,legend:M})}/* @__PURE__ */
|
|
3
|
+
return e(t,"raw"===M?.mode?{alignItems:"center",justifyContent:"center",sx:{width:"100%",alignItems:"flex-start"},className:"chart-legend-wrapper",children:/* @__PURE__ */e(t,{width:"100%",children:u?.map((o,a)=>{const s=!!p&&void 0!==p[a],d=s?Number(p[a]):0,m=Array.isArray(I)?I?.[a]:I,g="number"==typeof m&&isFinite(m)&&m>0,u=M?.actions&&M?.seeMore&&M?.actions[a]&&M,x=F?F(d):String(d),w=g?F?F(m):String(m):void 0;/* @__PURE__ */
|
|
4
|
+
return e(l,{index:a,label:o,details:v?.(a),colors:f,icons:L,values:p||[],hovered:k===a,onMouseEnter:e=>E(a,s,e),onMouseLeave:N,showMarker:!1,onClick:u?()=>M?.actions?.[a]?.():void 0,children:u?/* @__PURE__ */n(t,{direction:"row",alignItems:"center",spacing:1,children:[
|
|
5
|
+
/* @__PURE__ */e(h,{children:s?/* @__PURE__ */n(r,{children:[x,void 0!==w&&/* @__PURE__ */n(r,{children:[
|
|
6
|
+
/* @__PURE__ */e(i,{component:"span",children:b}),w]})]}):"—"}),
|
|
7
|
+
/* @__PURE__ */e(c,{action:M.actions[a],seeMore:M.seeMore})]}):/* @__PURE__ */e(h,{children:s?/* @__PURE__ */n(r,{children:[x,void 0!==w&&/* @__PURE__ */n(r,{children:[
|
|
8
|
+
/* @__PURE__ */e(i,{component:"span",children:b}),w]})]}):"—"})},a)})})}:{width:"100%",alignItems:"left",className:"chart-legend-wrapper",children:/* @__PURE__ */e(t,{display:"inline-flex",justifyContent:"center",children:u?.map((r,o)=>{const i=void 0!==p&&o<(p?.length??0)&&void 0!==p[o],a=M?.actions&&M?.seeMore&&M?.actions[o]&&M;/* @__PURE__ */
|
|
9
|
+
return e(l,{index:o,label:r,details:v?.(o),colors:f,icons:L,values:p||[],hovered:!1,onMouseEnter:e=>E(o,i,e),onMouseLeave:N,containerSx:{"&:hover":{background:H.custom.grey[500]},padding:H.spacing(1,.5)},children:a?/* @__PURE__ */n(t,{direction:"row",alignItems:"center",spacing:1,children:[!j&&/* @__PURE__ */e(h,{children:i?s(C[o],S):"--%"}),
|
|
10
|
+
/* @__PURE__ */e(c,{action:M.actions[o],seeMore:M.seeMore})]}):!j&&/* @__PURE__ */e(h,{children:i?s(C[o],S):"--%"})},o)})})})};export{g as LegendBottom};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as r}from"react/jsx-runtime";import{useTheme as
|
|
2
|
-
return e(m,{count:r,hidePercentage:
|
|
3
|
-
return e(m,{count:r,hidePercentage:
|
|
4
|
-
return e(i,{alignItems:"center",justifyContent:"center",sx:{width:"100%",alignItems:"flex-start"},className:"chart-legend-wrapper",children:/* @__PURE__ */e(s,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:u.spacing(3),width:"100%"},children:[c,l].map((o
|
|
5
|
-
return e(d,{index:
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as r}from"react/jsx-runtime";import{useTheme as t,useMediaQuery as o,Stack as i,Box as s}from"@mui/material";import{LegendSeeMore as a}from"./LegendSeeMore.js";import{createDistribution as c,formatPercentage as l}from"./utils.js";import{LegendRow as d}from"./LegendRow.js";import{LegendValueBadge as h}from"./LegendValueBadge.js";import{LegendRightSkeleton as m}from"./LegendRightSkeleton.js";import{useLegendHoverHandlers as g}from"./useLegendHoverHandlers.js";const p=p=>{const u=t(),v=o(u.breakpoints.up("md")),{values:f,labels:M,renderItemDetails:x,colors:w=[],icons:y=[],legend:L,hoveredDatasetIndex:I,onLegendHover:j,chartRef:C,hidePercentage:b=!1,isLoading:k=!1,maxScore:S,separator:A="/",threshold:F=1,valuesFormatterFn:N}=p,E=c(f??[]),{handleMouseEnter:H,handleMouseLeave:R}=g({onLegendHover:j,chartRef:C,move:{xFactor:.6,yFactor:.3}});if(k){const n=M?.length??f?.length??6,r=Math.max(6,Math.min(8,n));if("raw"===L?.mode){const n=v&&(M?.length??0)>=6,t=Math.ceil(r/2),o=Math.max(0,r-t);/* @__PURE__ */
|
|
2
|
+
return e(m,{count:r,hidePercentage:b,twoColumns:n,leftCount:t,rightCount:o})}/* @__PURE__ */
|
|
3
|
+
return e(m,{count:r,hidePercentage:b})}if("raw"===L?.mode){const t=M?.length??0;if(v&&t>=6){const o=Math.ceil(t/2),c=Array.from({length:o},(e,n)=>n),l=Array.from({length:t-o},(e,n)=>n+o);/* @__PURE__ */
|
|
4
|
+
return e(i,{alignItems:"center",justifyContent:"center",sx:{width:"100%",alignItems:"flex-start"},className:"chart-legend-wrapper",children:/* @__PURE__ */e(s,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:u.spacing(3),width:"100%"},children:[c,l].map((t,o)=>/* @__PURE__ */e(i,{width:"100%",children:t.map(t=>{const o=M[t],c=!!f&&void 0!==f[t],l=c?Number(f[t]):0,m=Array.isArray(S)?S?.[t]:S,g="number"==typeof m&&isFinite(m)&&m>0,p=L?.actions&&L?.seeMore&&L?.actions[t]&&L,v=N?N(l):String(l),j=g?N?N(m):String(m):void 0;/* @__PURE__ */
|
|
5
|
+
return e(d,{index:t,label:o,details:x?.(t),colors:w,icons:y,values:f||[],hovered:I===t,onMouseEnter:e=>H(t,c,e),onMouseLeave:R,showMarker:!1,onClick:p?()=>L?.actions?.[t]?.():void 0,children:p?/* @__PURE__ */n(i,{direction:"row",alignItems:"center",spacing:1,children:[
|
|
6
6
|
/* @__PURE__ */e(h,{children:c?/* @__PURE__ */n(r,{children:[v,void 0!==j&&/* @__PURE__ */n(r,{children:[
|
|
7
|
-
/* @__PURE__ */e(s,{component:"span",sx:{mx:.25,color:u.palette.text.secondary},children:
|
|
8
|
-
/* @__PURE__ */e(a,{action:
|
|
9
|
-
/* @__PURE__ */e(s,{component:"span",sx:{mx:.25,color:u.palette.text.secondary},children:
|
|
10
|
-
return e(i,{alignItems:"center",justifyContent:"center",sx:{width:"100%",alignItems:"flex-start"},className:"chart-legend-wrapper",children:/* @__PURE__ */e(i,{width:"100%",children:M?.map((o
|
|
11
|
-
return e(d,{index:
|
|
7
|
+
/* @__PURE__ */e(s,{component:"span",sx:{mx:.25,color:u.palette.text.secondary},children:A}),j]})]}):"—"}),
|
|
8
|
+
/* @__PURE__ */e(a,{action:L.actions[t],seeMore:L.seeMore})]}):/* @__PURE__ */e(h,{children:c?/* @__PURE__ */n(r,{children:[v,void 0!==j&&/* @__PURE__ */n(r,{children:[
|
|
9
|
+
/* @__PURE__ */e(s,{component:"span",sx:{mx:.25,color:u.palette.text.secondary},children:A}),j]})]}):"—"})},t)})},`col-${o}`))})})}/* @__PURE__ */
|
|
10
|
+
return e(i,{alignItems:"center",justifyContent:"center",sx:{width:"100%",alignItems:"flex-start"},className:"chart-legend-wrapper",children:/* @__PURE__ */e(i,{width:"100%",children:M?.map((t,o)=>{const c=!!f&&void 0!==f[o],l=c?Number(f[o]):0,m=Array.isArray(S)?S?.[o]:S,g="number"==typeof m&&isFinite(m)&&m>0,p=L?.actions&&L?.seeMore&&L?.actions[o]&&L,u=N?N(l):String(l),v=g?N?N(m):String(m):void 0;/* @__PURE__ */
|
|
11
|
+
return e(d,{index:o,label:t,details:x?.(o),colors:w,icons:y,values:f||[],hovered:I===o,onMouseEnter:e=>H(o,c,e),onMouseLeave:R,showMarker:!1,onClick:p?()=>L?.actions?.[o]?.():void 0,children:p?/* @__PURE__ */n(i,{direction:"row",alignItems:"center",spacing:1,children:[
|
|
12
12
|
/* @__PURE__ */e(h,{children:c?/* @__PURE__ */n(r,{children:[u,void 0!==v&&/* @__PURE__ */n(r,{children:[
|
|
13
|
-
/* @__PURE__ */e(s,{component:"span",children:
|
|
14
|
-
/* @__PURE__ */e(a,{action:
|
|
15
|
-
/* @__PURE__ */e(s,{component:"span",children:
|
|
16
|
-
return e(i,{alignItems:"center",justifyContent:"center",sx:{width:"100%",alignItems:"flex-start"},className:"chart-legend-wrapper",children:/* @__PURE__ */e(i,{width:"100%",children:M?.map((r,
|
|
17
|
-
return e(d,{index:
|
|
18
|
-
/* @__PURE__ */e(a,{action:
|
|
13
|
+
/* @__PURE__ */e(s,{component:"span",children:A}),v]})]}):"—"}),
|
|
14
|
+
/* @__PURE__ */e(a,{action:L.actions[o],seeMore:L.seeMore})]}):/* @__PURE__ */e(h,{children:c?/* @__PURE__ */n(r,{children:[u,void 0!==v&&/* @__PURE__ */n(r,{children:[
|
|
15
|
+
/* @__PURE__ */e(s,{component:"span",children:A}),v]})]}):"—"})},o)})})})}/* @__PURE__ */
|
|
16
|
+
return e(i,{alignItems:"center",justifyContent:"center",sx:{width:"100%",alignItems:"flex-start"},className:"chart-legend-wrapper",children:/* @__PURE__ */e(i,{width:"100%",children:M?.map((r,t)=>{const o=!!f&&void 0!==f[t],s=L?.actions&&L?.seeMore&&L?.actions[t]&&L;/* @__PURE__ */
|
|
17
|
+
return e(d,{index:t,label:r,details:x?.(t),colors:w,icons:y,values:f||[],hovered:I===t,onMouseEnter:e=>H(t,o,e),onMouseLeave:R,onClick:s?()=>L?.actions?.[t]?.():void 0,children:s?/* @__PURE__ */n(i,{direction:"row",alignItems:"center",spacing:1,children:[!b&&/* @__PURE__ */e(h,{children:o?l(E[t],F):"--%"}),
|
|
18
|
+
/* @__PURE__ */e(a,{action:L.actions[t],seeMore:L.seeMore})]}):!b&&/* @__PURE__ */e(h,{children:o?l(E[t],F):"--%"})},t)})})})};export{p as LegendRight};
|
|
@@ -5,12 +5,13 @@ import { Property } from 'csstype';
|
|
|
5
5
|
export type LegendRowProps = {
|
|
6
6
|
index: number;
|
|
7
7
|
label: string;
|
|
8
|
+
details?: ReactNode;
|
|
8
9
|
colors: Property.Color[];
|
|
9
10
|
icons: ReactNode[];
|
|
10
11
|
values: number[];
|
|
11
12
|
hovered: boolean;
|
|
12
|
-
onMouseEnter
|
|
13
|
-
onMouseLeave
|
|
13
|
+
onMouseEnter?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
14
|
+
onMouseLeave?: () => void;
|
|
14
15
|
onClick?: () => void;
|
|
15
16
|
children?: ReactNode;
|
|
16
17
|
labelVariant?: TypographyProps["variant"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useTheme as t,useMediaQuery as
|
|
2
|
-
return e(
|
|
3
|
-
/* @__PURE__ */n(
|
|
4
|
-
/* @__PURE__ */e(
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */n(
|
|
7
|
-
/* @__PURE__ */e(
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useTheme as t,useMediaQuery as i,Stack as r,Typography as a}from"@mui/material";import{RenderItemMarker as o}from"./RenderItemMarker.js";const s=s=>{const{index:l,label:c,details:d,colors:m,icons:p,values:g,hovered:h,onMouseEnter:x,onMouseLeave:u,onClick:b,children:f,labelVariant:v="h5",labelSx:w,containerSx:k,showMarker:I=!0}=s,M=t(),y=i(M.breakpoints.up("md"));/* @__PURE__ */
|
|
2
|
+
return e(r,y||!f&&!d?{direction:"row",alignItems:"center",gap:"12px",onMouseEnter:x,onMouseLeave:u,onClick:b,sx:{borderBottom:`1px solid ${M.palette.divider}`,"&:last-of-type":{borderBottom:"none"}},children:/* @__PURE__ */n(r,{direction:"row",gap:"8px",sx:{width:"100%",padding:".4rem",alignItems:"center",justifyContent:"space-between",backgroundColor:h?M.custom.grey[500]:"unset",...k},className:"chart-legend-item",children:[
|
|
3
|
+
/* @__PURE__ */n(r,{direction:"row",alignItems:"center",gap:M.spacing(1),sx:{my:M.spacing(.5)},children:[I&&/* @__PURE__ */e(o,{index:l,palette:m,icons:p,values:g||[]}),
|
|
4
|
+
/* @__PURE__ */e(a,{variant:v,sx:{marginLeft:"4px",...w},className:"chart-legend-item-label",children:c})]}),d,f]})}:{direction:"row",alignItems:"stretch",gap:"12px",onMouseEnter:x,onMouseLeave:u,onClick:b,sx:{borderBottom:`1px solid ${M.palette.divider}`,"&:last-of-type":{borderBottom:"none"}},children:/* @__PURE__ */n(r,{direction:"row",gap:M.spacing(1),sx:{width:"100%",minWidth:0,alignItems:"flex-start",padding:".4rem",paddingBlock:M.spacing(1.5),backgroundColor:h?M.custom.grey[500]:"unset",...k},className:"chart-legend-item",children:[
|
|
5
|
+
/* @__PURE__ */n(r,{gap:M.spacing(.5),sx:{flex:1,minWidth:0},children:[
|
|
6
|
+
/* @__PURE__ */n(r,{direction:"row",alignItems:"center",gap:M.spacing(1),children:[I&&/* @__PURE__ */e(o,{index:l,palette:m,icons:p,values:g||[]}),
|
|
7
|
+
/* @__PURE__ */e(a,{variant:v,sx:{marginLeft:"4px",minWidth:0,overflowWrap:"anywhere",...w},className:"chart-legend-item-label",children:c})]}),d]}),f&&/* @__PURE__ */e(r,{gap:M.spacing(1),alignItems:"flex-end",sx:{minWidth:0,maxWidth:"45%"},children:f})]})})};export{s as LegendRow};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useTheme as a,Stack as
|
|
2
|
-
return t(
|
|
3
|
-
/* @__PURE__ */e(
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useTheme as a,Stack as i,Box as r}from"@mui/material";import{useRef as o,useMemo as s}from"react";import{useBars as n}from"./useBars.js";import{TrajectoryChartCore as l}from"./TrajectoryChartCore.js";import{TrajectoryLegend as c}from"./TrajectoryLegend/TrajectoryLegend.js";const d="100%",m="100%",p=0,u=u=>{const h=a(),{unit:g,width:f=d,height:x=m,showLegend:j=!0,improvement:b="decrease",urlEditTrajectories:y,valueFormatterFn:v=h.numbers.valueFormatterFn,precision:w=p,textOptions:F,forceGoalLegend:T,sx:D,...L}=u,C=n(L),E=o(null),W=o({}),k=s(()=>{const t=[];return C.labels.forEach((e,a)=>{const i={name:e};let r=0,o=!1;C.datasets.forEach(t=>{if("goal"===t.scope&&t.isGoalNull)return;const e=t.data[a]??null,s="number"==typeof e?e:null;null!==s&&(o=!0,"goal"===t.scope?i.goal=s:"initial"===t.scope?i.initial=s:"trajectory"===t.scope&&(r++,1===r?i.withoutActionPlan=s:2===r&&(i.withActionPlan=s)))}),o&&t.push(i)}),t},[C.datasets,C.labels]),G=s(()=>C.datasets.filter(t=>!("goal"===t.scope&&t.isGoalNull&&!T)&&("trajectory"!==t.scope||t.data.some(t=>null!==t))),[C.datasets,T]),H=s(()=>G.find(t=>"initial"===t.scope),[G]),O=s(()=>G.filter(t=>"trajectory"===t.scope),[G]),A=s(()=>G.find(t=>"goal"===t.scope),[G]);/* @__PURE__ */
|
|
2
|
+
return t(i,{direction:"column",position:"relative",width:f,height:{xs:"auto",md:x},minWidth:0,maxWidth:"100%",minHeight:h.spacing(50),justifyContent:"stretch",sx:{"& :focus-visible":{outline:`2px solid ${h.palette.primary.main}`,outlineOffset:2}},children:[
|
|
3
|
+
/* @__PURE__ */e(r,{sx:{border:`1px solid ${h.palette.divider}`,backgroundColor:h.palette.background.paper,borderRadius:h.spacing(1),height:{xs:x,md:"100%"},minHeight:{xs:h.spacing(40),md:0},flexShrink:{xs:0,md:1},width:"100%",minWidth:0,overflowX:"auto",padding:h.spacing(3),...D},ref:E,children:/* @__PURE__ */e(r,{sx:{height:"100%",minHeight:{xs:h.spacing(34),md:0},minWidth:{xs:h.spacing(6*k.length+10),md:0}},children:/* @__PURE__ */e(l,{transformedData:k,initialDataset:H,trajectoryDatasets:O,goalDataset:A,chartData:C,unit:g,valueFormatterFn:v,precision:w,barTopsRef:W})})}),j&&/* @__PURE__ */e(c,{datasets:C.datasets,datasetsLabels:C.labels,improvement:b,urlEditTrajectories:y,textOptions:F})]})};export{u as TrajectoryChart};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{useTheme as r}from"@mui/material";import{useEffect as
|
|
1
|
+
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{useTheme as r}from"@mui/material";import{useEffect as e,useMemo as i}from"react";import{ResponsiveContainer as n,ComposedChart as o,CartesianGrid as l,XAxis as s,YAxis as m,Label as p,Tooltip as c,Bar as g,Line as u}from"recharts";import{createWithoutActionPlanBarShape as d,createScoreBarShape as f,createActionPlanBarShape as b}from"./TrajectoryChartBarShapes.js";import{TrajectoryTooltip as y}from"./TrajectoryTooltip.js";import{getColorString as h}from"./types.js";import k from"i18next";const v=v=>{const F=r(),{transformedData:C,initialDataset:D,trajectoryDatasets:S,goalDataset:T,chartData:w,unit:B,valueFormatterFn:j=F.numbers.valueFormatterFn,precision:P=0,barTopsRef:x}=v,A=k.language,N=(t,a)=>{if("string"==typeof t&&"number"==typeof a){const r=x.current[t];x.current[t]="number"==typeof r?Math.min(r,a):a}};e(()=>{x.current={}},[C,x]);const K=d({registerBarTopY:N,marginFactor:.3}),L=f({registerBarTopY:N,marginFactor:.3}),Y=b({registerBarTopY:N,marginFactor:.3}),M=i(()=>{const t=S[0]?.backgroundColor;return"string"==typeof t?t:"transparent"},[S]),$=i(()=>{const t=D?.backgroundColor;return"string"==typeof t?t:"transparent"},[D]),z=i(()=>{const t=S[1]?.backgroundColor;return"string"==typeof t?t:"transparent"},[S]),G=i(()=>D?.label?String(D.label):"Initial",[D]),W=i(()=>T?.label?String(T.label):"Goal",[T]),E=i(()=>S[0]?.label?String(S[0]?.label):"Without action plan",[S]),I=i(()=>S[1]?.label?String(S[1]?.label):"With action plan",[S]),R=[4,4,0,0];/* @__PURE__ */
|
|
2
2
|
return t(n,{width:"100%",height:"100%",children:/* @__PURE__ */a(o,{data:C,margin:{left:10,right:0,top:50,bottom:10},barCategoryGap:"10%",barGap:2,children:[
|
|
3
3
|
/* @__PURE__ */t(l,{strokeDasharray:"4 4",stroke:F.palette.divider,vertical:!1}),
|
|
4
|
-
/* @__PURE__ */t(s,{dataKey:"name",tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateY(${F.spacing(2)})`}},axisLine:{stroke:F.palette.divider},tickLine:!1,interval:"
|
|
5
|
-
/* @__PURE__ */t(m,{width:"auto",tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateX(-${F.spacing(1)})`}},axisLine:{stroke:F.palette.divider},tickLine:!1,tickFormatter:t=>
|
|
6
|
-
/* @__PURE__ */t(c,{cursor:!1,content:a=>{const r=!a||"string"!=typeof a.label&&"number"!=typeof a.label?void 0:String(a.label),
|
|
7
|
-
return t(y,{tooltipProps:a,unit:B,goalName:W,initialName:G,withoutActionPlanName:
|
|
8
|
-
/* @__PURE__ */t(g,{animationBegin:100,animationDuration:200,dataKey:"withoutActionPlan",name:
|
|
4
|
+
/* @__PURE__ */t(s,{dataKey:"name",tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateY(${F.spacing(2)})`}},axisLine:{stroke:F.palette.divider},tickLine:!1,interval:"preserveStartEnd",padding:{left:0,right:0}}),
|
|
5
|
+
/* @__PURE__ */t(m,{width:"auto",tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateX(-${F.spacing(1)})`}},axisLine:{stroke:F.palette.divider},tickLine:!1,tickFormatter:t=>j(Number(t)),children:/* @__PURE__ */t(p,{value:B,position:"insideTopLeft",style:{fontFamily:"Montserrat",fontSize:"14px",transform:`translate(-${F.spacing(1.75)}, -${F.spacing(6)})`}})}),
|
|
6
|
+
/* @__PURE__ */t(c,{cursor:!1,content:a=>{const r=!a||"string"!=typeof a.label&&"number"!=typeof a.label?void 0:String(a.label),e=r?x.current[r]:void 0,i=T?h(T.borderColor??T.backgroundColor,F.palette.primary.main):void 0;/* @__PURE__ */
|
|
7
|
+
return t(y,{tooltipProps:a,unit:B,goalName:W,initialName:G,withoutActionPlanName:E,withActionPlanName:I,valueFormatterFn:j,language:A,precision:P,barTopY:e,goalData:T?.data,labels:w.labels,goalColor:i})}}),
|
|
8
|
+
/* @__PURE__ */t(g,{animationBegin:100,animationDuration:200,dataKey:"withoutActionPlan",name:E,fill:M,radius:R,shape:K},"withoutActionPlan"),
|
|
9
9
|
/* @__PURE__ */t(g,{animationBegin:0,animationDuration:200,dataKey:"initial",name:G,fill:$,radius:R,shape:L},"initial"),
|
|
10
10
|
/* @__PURE__ */t(g,{animationBegin:150,animationDuration:200,dataKey:"withActionPlan",name:I,fill:z,radius:R,shape:Y},"withActionPlan"),T?/* @__PURE__ */t(u,{animationBegin:400,animationDuration:200,type:"linear",dataKey:"goal",name:W,stroke:h(T.borderColor??T.backgroundColor,F.palette.primary.main),strokeWidth:2,dot:{fill:h(T.borderColor??T.backgroundColor,F.palette.primary.main),r:4},connectNulls:!0,strokeDasharray:"0"},"goal"):null]})})};export{v as TrajectoryChartCore};
|
|
@@ -37,6 +37,8 @@ export type WaterfallChartProps = {
|
|
|
37
37
|
valueFormatterFn?: (value: number, precision?: number) => string;
|
|
38
38
|
precision?: number;
|
|
39
39
|
sx?: SxProps<Theme>;
|
|
40
|
+
/** Show category names and values using the shared chart legend. Hidden by default. */
|
|
41
|
+
showDataLegend?: boolean;
|
|
40
42
|
CoreOverride?: {
|
|
41
43
|
XAxisHeight?: number;
|
|
42
44
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
2
|
-
return e(a,{direction:"column",position:"relative",width:
|
|
3
|
-
/* @__PURE__ */
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useTheme as r,Stack as a,Box as i}from"@mui/material";import{useMemo as l}from"react";import{transformWaterfallData as o}from"./utils.js";import{WaterfallDataLegend as n}from"./WaterfallDataLegend.js";import{WaterfallChartCore as s}from"./WaterfallChartCore.js";import{WaterfallLegend as u}from"./WaterfallLegend/WaterfallLegend.js";const m=m=>{const d=r(),{reference:p,start:c,values:v,colors:g,target:f,goal:h,forcedPrecision:x=0,unit:F,width:b="100%",height:W="100%",improvement:j="decrease",textOptions:w,showLegend:C=!0,valueFormatterFn:L=d.numbers.valueFormatterFn,sx:O,CoreOverride:k,showDataLegend:y=!1}=m,D=l(()=>v?.length?v.map(e=>e.value).filter(e=>null!==e):null,[v]),P=l(()=>D?D.reduce((e,t)=>e+t,0):null,[D]),V=f?.value?f:{label:c?.label??p?.label??"",value:f?.value??(c?.value??p?.value??0)+(P??0)},$=l(()=>o(p,c,v,g,f,h,j,f?.value??(c?.value??p?.value??0)+(P??0),d),[p,c,v,g,f,h,j,P,d]);/* @__PURE__ */
|
|
2
|
+
return e(a,{direction:"column",position:"relative",width:b,minWidth:0,maxWidth:"100%",minHeight:d.spacing(50),justifyContent:"stretch",sx:{"& :focus-visible":{outline:`2px solid ${d.palette.primary.main}`,outlineOffset:2}},children:[
|
|
3
|
+
/* @__PURE__ */t(i,{sx:{border:`1px solid ${d.palette.divider}`,backgroundColor:d.palette.background.paper,borderRadius:d.spacing(1),width:"100%",height:W,minWidth:0,overflowX:{xs:"auto",sm:"visible"},padding:d.spacing(3),...O},children:/* @__PURE__ */t(s,{reference:p,start:c,values:v,target:f,goal:h,colors:g,forcedPrecision:x,unit:F,improvement:j,targetValueFinal:f?.value??(c?.value??p?.value??0)+(P??0),valueFormatterFn:L,precision:x,CoreOverride:k})}),y&&/* @__PURE__ */t(n,{data:$,unit:F,precision:x,valueFormatterFn:L}),C&&/* @__PURE__ */t(u,{textOptions:w,target:V,improvement:j,goal:h,valueFormatterFn:L,actionsTotalValue:P,unit:F,precision:x})]})};export{m as WaterfallChart};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useRef as r,useState as i,useEffect as a,useMemo as o}from"react";import{ResponsiveContainer as n,ComposedChart as s,CartesianGrid as
|
|
2
|
-
return t(
|
|
3
|
-
/* @__PURE__ */t(
|
|
4
|
-
/* @__PURE__ */t(
|
|
5
|
-
/* @__PURE__ */t(d,{width:"auto",domain:([t,e])=>[t<0?t-.2*Math.abs(t):t,e],strokeWidth:0,tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateX(-${
|
|
6
|
-
/* @__PURE__ */t(h,{y:0,stroke:
|
|
7
|
-
/* @__PURE__ */t(
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useRef as r,useState as i,useEffect as a,useMemo as o}from"react";import{ResponsiveContainer as n,ComposedChart as s,CartesianGrid as m,XAxis as l,YAxis as d,Label as c,ReferenceLine as h}from"recharts";import{useTheme as f,useMediaQuery as p,Box as g}from"@mui/material";import{transformWaterfallData as u,calculateLabelSettings as k,wrapWaterfallLabel as v}from"./utils.js";import{WaterfallChartTick as x}from"./WaterfallChartTick.js";import{WaterfallChartBars as y}from"./WaterfallChartBars.js";import{TICK_VERTICAL_OFFSET as F,LINE_HEIGHT_PIXELS as w}from"./labelGeometry.js";const b=b=>{const W=f(),L=p(W.breakpoints.down("sm")),{reference:j,start:z,values:C,colors:M,target:D,goal:X,forcedPrecision:$,unit:A,improvement:B,targetValueFinal:E,valueFormatterFn:H=W.numbers.valueFormatterFn,precision:P,CoreOverride:S}=b,T=r(null),[G,K]=i(800);a(()=>{const t=()=>{if(T.current){const t=T.current.getBoundingClientRect().width;t>0&&K(t-60)}};t();const e=()=>t();return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const N=o(()=>u(j,z,C,M,D,X,B,E,W),[j,z,C,M,D,X,B,E,W]),O=o(()=>k(N,G),[N,G]),R=Math.max(S?.XAxisHeight??40,...N.map(t=>F+v(t.label,80).length*w));/* @__PURE__ */
|
|
2
|
+
return t(g,{ref:T,sx:{width:"100%",height:"100%",minWidth:{xs:96*N.length+100,sm:0}},children:/* @__PURE__ */t(n,{width:"100%",height:"100%",children:/* @__PURE__ */e(s,{data:N,margin:{top:45,right:0,left:30,bottom:35},children:[
|
|
3
|
+
/* @__PURE__ */t(m,{strokeDasharray:"4 4",stroke:W.palette.divider}),
|
|
4
|
+
/* @__PURE__ */t(l,{dataKey:"label",strokeWidth:0,strokeDasharray:"4 4",tick:e=>/* @__PURE__ */t(x,{...e,maxWidth:L?80:O.maxWidth}),axisLine:{stroke:W.palette.divider},interval:L?0:O.interval,tickLine:!1,padding:{left:0,right:0},height:L?R:S?.XAxisHeight??40}),
|
|
5
|
+
/* @__PURE__ */t(d,{width:"auto",domain:([t,e])=>[t<0?t-.2*Math.abs(t):t,e],strokeWidth:0,tick:{fontFamily:"Montserrat",fontSize:14,style:{transform:`translateX(-${W.spacing(2)})`}},axisLine:{stroke:W.palette.divider},tickLine:!1,tickFormatter:t=>H(Number(t),P),children:/* @__PURE__ */t(c,{value:A,position:"insideTopLeft",style:{fontFamily:"Montserrat",fontSize:"14px",transform:`translate(-${W.spacing(2.75)}, -${W.spacing(6)})`}})}),
|
|
6
|
+
/* @__PURE__ */t(h,{y:0,stroke:W.custom.grey[600],strokeWidth:2}),
|
|
7
|
+
/* @__PURE__ */t(y,{transformedData:N,valueFormatterFn:H,forcedPrecision:$,precision:P})]})})})};export{b as WaterfallChartCore};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useTheme as r}from"@mui/material";const
|
|
2
|
-
return t("g",{transform:`translate(${
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useTheme as r}from"@mui/material";import{wrapWaterfallLabel as e}from"./utils.js";import{LINE_HEIGHT_PIXELS as o,TICK_VERTICAL_OFFSET as m}from"./labelGeometry.js";const a=a=>{const{x:i,y:l,payload:n,maxWidth:p}=a,s=r(),f=n.value,x=e(f,p),c="number"==typeof l?l:parseFloat(String(l));/* @__PURE__ */
|
|
2
|
+
return t("g",{transform:`translate(${i},${c+m})`,children:/* @__PURE__ */t("g",{children:x.map((r,e)=>/* @__PURE__ */t("text",{x:0,y:e*o,textAnchor:"middle",fill:s.palette.text.primary,fontSize:"12",fontFamily:"Montserrat",children:r},e))})})};export{a as WaterfallChartTick};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WaterfallTransformedItem } from './utils';
|
|
2
|
+
type WaterfallDataLegendProps = {
|
|
3
|
+
data: WaterfallTransformedItem[];
|
|
4
|
+
unit?: string;
|
|
5
|
+
precision?: number;
|
|
6
|
+
valueFormatterFn: (value: number, precision?: number) => string;
|
|
7
|
+
};
|
|
8
|
+
export declare const WaterfallDataLegend: (props: WaterfallDataLegendProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Stack as a}from"@mui/material";import{LegendRow as n}from"../Legend/LegendRow.js";import{LegendValueBadge as t}from"../Legend/LegendValueBadge.js";const i=i=>{const{data:o,unit:l,precision:m,valueFormatterFn:d}=i;if(0===o.length)return null;const c=o.map(e=>e.color),p=o.map(e=>e.diff);/* @__PURE__ */
|
|
2
|
+
return e(a,{sx:{mt:2,minWidth:0},className:"chart-legend-wrapper",children:o.map((a,i)=>/* @__PURE__ */e(n,{index:i,label:a.label,colors:c,icons:[],values:p,hovered:!1,labelSx:{overflowWrap:"anywhere",minWidth:0},containerSx:{minWidth:0},children:/* @__PURE__ */r(t,{sx:{whiteSpace:"normal",overflowWrap:"anywhere",minWidth:0},children:[d(a.diff,m),l?` ${l}`:""]})},`${a.type}-${i}-waterfall-data-legend`))})};export{i as WaterfallDataLegend};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=16,t=22;export{o as LINE_HEIGHT_PIXELS,t as TICK_VERTICAL_OFFSET};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{calculateWaterfall as
|
|
1
|
+
import{calculateWaterfall as e}from"../../../innerComponents/chartUtils.js";const a=(a,t,l,o,r,i,s,n,c)=>{const u=(l??[]).filter(e=>null!==e.value),h=u.map(e=>e.value),f=t?.value??a?.value??0,m=e({startingValue:f,differences:h}),v=[];if(a?.label&&v.push({label:a.label,low:0,high:a.value??0,diff:(a.value??0)-0,type:"reference",color:o?.reference??c.custom.dataviz.colors[2].main}),t?.label&&v.push({label:t.label,low:0,high:t.value??0,diff:(t.value??0)-0,type:"start",color:o?.start??c.custom.dataviz.colors[4].main}),u.forEach((e,a)=>{const t=m[a];if(!t)return;const[l,o]=t,r=o-l,i=r<=0,n="decrease"===s?c.custom.dataviz.colors[6].main:c.custom.dataviz.extra[14].main,u="decrease"===s?c.custom.dataviz.extra[14].main:c.custom.dataviz.colors[6].main;v.push({label:e.label,low:l,high:o,diff:r,type:"value",color:i?u:n})}),r?.label){const e=n??f+(h.length>0?h.reduce((e,a)=>e+a,0):0);v.push({label:r.label,low:0,high:e,diff:e-0,type:"target",color:o?.target??c.custom.dataviz.colors[4].main})}if(i?.label){const e=i.value??n??0;v.push({label:i.label,low:0,high:e,diff:e-0,type:"goal",color:o?.goal??c.custom.dataviz.extra[12].main})}return v},t=(e,a)=>{const t=e.length;if(0===t)return{interval:0,maxWidth:80};const l=a/t;let o=0;return l<85&&(o="preserveStartEnd"),{interval:o,maxWidth:Math.min(l,80)}},l=(e,a)=>{const t=e.split(" "),l=[];let o="";for(const r of t){const e=o?`${o} ${r}`:r;6*e.length>a&&o?(l.push(o),o=r):o=e}return o&&l.push(o),l};export{t as calculateLabelSettings,a as transformWaterfallData,l as wrapWaterfallLabel};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type UnsavedChangesDialogProps = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
saveLabel: string;
|
|
6
|
+
discardLabel: string;
|
|
7
|
+
keepEditingLabel: string;
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
saveDisabled?: boolean;
|
|
10
|
+
onSave: () => void;
|
|
11
|
+
onDiscard: () => void;
|
|
12
|
+
onKeepEditing: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const UnsavedChangesDialog: (props: UnsavedChangesDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{jsxs as i,jsx as a}from"react/jsx-runtime";import{useId as e,useRef as r}from"react";import n from"@mui/material/Dialog";import o from"@mui/material/DialogActions";import t from"@mui/material/DialogContent";import l from"@mui/material/DialogTitle";import{Typography as d,Button as s}from"@mui/material";const c=c=>{const{open:p,title:m,description:u,saveLabel:g,discardLabel:h,keepEditingLabel:f,busy:b=!1,saveDisabled:y=!1,onSave:v,onDiscard:x,onKeepEditing:D}=c,w=e(),W=e(),k=r(null),C=()=>{b||D()};/* @__PURE__ */
|
|
2
|
+
return i(n,{open:p,onClose:C,disableEscapeKeyDown:b,fullWidth:!0,maxWidth:"xs","aria-labelledby":w,"aria-describedby":u?W:void 0,slotProps:{paper:{"aria-busy":b},transition:{onEntered:()=>k.current?.focus()}},children:[
|
|
3
|
+
/* @__PURE__ */a(l,{id:w,variant:"h3",sx:i=>({padding:i.spacing(3,3,2),overflowWrap:"anywhere"}),children:m}),u&&/* @__PURE__ */a(t,{sx:i=>({padding:i.spacing(0,3,2)}),children:/* @__PURE__ */a(d,{id:W,component:"p",variant:"body-regular",sx:{overflowWrap:"anywhere"},children:u})}),
|
|
4
|
+
/* @__PURE__ */i(o,{disableSpacing:!0,sx:i=>({flexDirection:"column",gap:i.spacing(1.5),padding:i.spacing(1,3,3),"& .MuiButton-root":{height:"auto",minHeight:i.spacing(5),padding:i.spacing(1,2),whiteSpace:"normal",overflowWrap:"anywhere","&.Mui-focusVisible":{outline:`${i.spacing(.25)} ${i.custom.strokes.containerDivider.style} ${i.palette.primary[700]}`,outlineOffset:i.spacing(.25)}}}),children:[
|
|
5
|
+
/* @__PURE__ */a(s,{variant:"primary",fullWidth:!0,disabled:b||y,loading:b,onClick:()=>{b||y||v()},children:g}),
|
|
6
|
+
/* @__PURE__ */a(s,{variant:"secondary",fullWidth:!0,disabled:b,onClick:()=>{b||x()},children:h}),
|
|
7
|
+
/* @__PURE__ */a(s,{ref:k,variant:"secondary",fullWidth:!0,disabled:b,onClick:C,children:f})]})]})};export{c as UnsavedChangesDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PrimaryDialog as o}from"./PrimaryDialog.js";import{BottomSheetDialog as r}from"./BottomSheetDialog.js";import{UnsavedChangesDialog as m}from"./UnsavedChangesDialog.js";export{r as BottomSheetDialog,o as PrimaryDialog,m as UnsavedChangesDialog};
|
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getThemeLogo as o,isTheme as r,themeLogos as t,themeOptions as m,themes as s}from"./themes/index.js";import{Button as n,Typography as e}from"@mui/material";import{AccordionProduct as i}from"./components/Accordion/ProductAccordion.js";import{AdditionalContentBox as p}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as c,HeadlessPopover as a,ThemedPopover as f}from"./components/Popover/AnchoredPopover.js";import{Article as j}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as l}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as d}from"./components/Badge/Badge.js";import{Banner as B}from"./components/Banner/Banner.js";import{BigPopoverLayout as C}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as u}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as h}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as g}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as F}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as T,SecondaryTabs as k}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as S}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as x}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as P}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as v}from"./components/Tabs/ButtonTabs.js";import{CardImage as I}from"./components/CardImage.js";import{CategoryBox as y}from"./components/Box/CategoryBox.js";import{CheckboxBlock as L}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as b,CollectiveThemeOptions as N}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as A}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as H}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as D}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as G}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as R}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as w}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as U}from"./components/Popover/CoordinatePopover.js";import{CountTabs as M}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as W}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as E,TertiaryToggleButton as V}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as O,TertiaryToggleButtonNodeTitle as z}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as Q}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as q}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as J}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as K}from"./components/Box/DottedBox.js";import{DoughnutCard as X}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as Y}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as Z}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as $}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as _}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as oo}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as ro}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as to}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as mo}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as so,FoodpilotThemeOptions as no}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as eo}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as io}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as po}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as co}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as ao}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as fo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as jo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as lo}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as Bo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as Co}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as uo}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as ho}from"./components/Search/FoodsSearch.js";import{FoodsSelect as go,FoodsSelectServerPagination as Fo}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as To,SpecialTabs as ko}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as So}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as xo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Po,FoodsThemeProvider as vo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Io}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as yo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as Lo}from"./components/Treeview/Treeview.js";import{FoodsUserTags as bo}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as No}from"./components/Accordion/FormAccordion.js";import{FormBase as Ao}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Ho,useFormBaseContext as Do}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as Go}from"./components/Form/FormBox.js";import{FormPropertyBox as Ro}from"./components/Form/FormPropertyBox.js";import{FormTopBar as wo}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Uo}from"./components/Form/FormUnit.js";import{GenericAccordion as Mo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Wo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Eo,NavBarLink as Vo,Navbar as Oo,SubMenu as zo,UserNav as Qo}from"./components/Navigation/Navbar.js";import{HelperBox as qo}from"./components/Box/HelperBox.js";import{HeroBlock as Jo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Ko}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Xo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as Yo}from"./components/Navigation/IconThread.js";import{IndicatorBlock as Zo}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as $o}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as _o}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as or}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as rr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as tr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as mr}from"./components/Box/LineGroupBox.js";import{LinearProgress as sr}from"./components/LinearProgress.js";import{LinkAction as nr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as er}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as ir}from"./components/Grid/MRTGrid.js";import{MRT_GRID_HUB_LAYOUT as pr}from"./components/Grid/mrtGridLayout.js";import{MultiValueFilter as cr}from"./components/Filter/MultiValueFilter.js";import{NumberField as ar}from"./components/Field/NumberField.js";import{NumberWithUnit as fr}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as jr}from"./components/Popover/OptionsPopover.js";import{PageItem as lr}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as dr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as Br}from"./components/Input/Pills/Pills.js";import{PointsCell as Cr}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as ur}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as hr}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as gr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as Fr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Tr}from"./components/Progress/Progress.js";import{ProgressCard as kr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as Sr}from"./components/Box/QuoteBox.js";import{RadioBlock as xr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as Pr}from"./components/Radio/RadioBoolean.js";import{RadioList as vr}from"./components/Radio/RadioList.js";import{RichTextEditor as Ir}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as yr}from"./components/Input/RoundInput.js";import{RoundNumberInput as Lr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as br}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as Nr}from"./components/Number/Score.js";import{ScoreCard as Ar}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Hr}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Dr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as Gr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Rr}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as wr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Ur}from"./components/Number/ScoreValue.js";import{SearchBox as Mr}from"./components/Input/SearchBox.js";import{SectionBox as Wr}from"./components/Box/SectionBox.js";import{SectionTabs as Er}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as Vr}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Or}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as zr}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as Qr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as qr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as Jr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Kr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Xr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as Yr}from"./components/Text/TextArrowList.js";import{TextField as Zr}from"./components/Field/TextField.js";import{TextTitle as $r}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as _r}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as ot}from"./components/Textarea/Textarea.js";import{ToggleSwitch as rt}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as tt}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as mt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as st}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as nt}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPopover as et}from"./components/Form/UnitConverterPopover.js";import{ValueDisplay as it}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as pt}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as ct}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as at}from"./components/Box/WarningBox.js";import{WaterfallChart as ft}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as jt}from"./components/Box/WhiteBox.js";import{WhiteGrid as lt}from"./components/Box/WhiteGrid.js";import{WhitePopover as dt}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as Bt}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as Ct,WinepilotThemeOptions as ut}from"./themes/themes/WinePilotTheme.js";import{allColors as ht,allMainColors as gt,blueTheme as Ft,coralTheme as Tt,dataVisualizationColors as kt,extraColors as St,greenTheme as xt,greyTheme as Pt,orangeTheme as vt,redTheme as It,shadows as yt,yellowTheme as Lt}from"./themes/common/colors.js";import{allTypographyVariants as bt,deprecatedVariants as Nt,typographyConfig as At}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as Ht,checkboxToAny as Dt}from"./components/Checkbox/helperFunctions.js";import{barChart as Gt,breadcrumb as Rt,countTabs as wt,custom as Ut,deleteButton as Mt,doughnutCard as Wt,formField as Et,ingredientCard as Vt,mediaUpload as Ot,numberWithUnit as zt,numbers as Qt,scoreCard as qt,scoreDetail as Jt,scoreOverviewCard as Kt,scoreValue as Xt,status as Yt,strokes as Zt,tabs as $t,tags as _t,toggleSwitch as om,tooltip as rm}from"./themes/common/custom.js";import{components as tm}from"./themes/common/components.js";import{computeSize as mm,iconMapping as sm}from"./components/Icons/iconConfig.js";import{illustationsMapping as nm}from"./components/Icons/illustrationsConfig.js";import{spacing as em}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as im}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as pm}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as AdditionalContentBox,c as AnchoredPopover,j as Article,l as ArticlesBox,d as Badge,B as Banner,C as BigPopoverLayout,u as BlockItemContainer,h as BlockItemInner,g as BlockListContainer,F as BottomSheetDialog,T as BoxStyled,S as BreadcrumbItem,x as Breadcrumbs,P as BreakdownTable,n as Button,v as ButtonTabs,I as CardImage,y as CategoryBox,L as CheckboxBlock,b as CollectiveTheme,N as CollectiveThemeOptions,A as ComingSoonBadge,H as ComparisonArrow,D as ComparisonBlock,G as ComparisonLabel,R as ConfirmDialog,w as ContextualContentBox,U as CoordinatePopover,M as CountTabs,W as CustomRender,E as CustomToggleButton,O as CustomToggleButtonNodeTitle,Q as CustomTypography,q as CustomizedAxisTick,J as DefaultUserAction,K as DottedBox,X as DoughnutCard,Y as DoughnutChart,Z as DrawerAction,$ as EcoScoreCell,_ as EditHeader,oo as EllipsisItem,ro as EmptyForm,to as EvolutionChart,mo as FixedMultiValueFilter,so as FoodPilotTheme,no as FoodpilotThemeOptions,eo as FoodsBadge,io as FoodsCheckbox,po as FoodsDeleteButton,co as FoodsFormBase,ao as FoodsIcon,fo as FoodsIconButton,jo as FoodsIllustrations,lo as FoodsNavbar,Bo as FoodsPagination,Co as FoodsPaginationItem,uo as FoodsRadioList,ho as FoodsSearch,go as FoodsSelect,Fo as FoodsSelectServerPagination,To as FoodsTabs,So as FoodsTags,xo as FoodsTextInput,Po as FoodsThemeOptionsProvider,vo as FoodsThemeProvider,Io as FoodsToggleButton,yo as FoodsTooltip,Lo as FoodsTreeview,bo as FoodsUserTags,No as FormAccordion,Ao as FormBase,Ho as FormBaseContextProvider,Go as FormBox,Ro as FormPropertyBox,wo as FormTopBar,Uo as FormUnit,Mo as GenericAccordion,Wo as GreyTextCell,Eo as HeaderNav,a as HeadlessPopover,qo as HelperBox,Jo as HeroBlock,Ko as HistogramComparisonChart,Xo as HorizontalGaugeChart,Yo as IconThread,Zo as IndicatorBlock,$o as InfoBox,_o as InfoHeaderWithIllustration,or as InitHeader,rr as LeftComparisonPart,tr as LightIndicatorBlock,mr as LineGroupBox,sr as LinearProgress,nr as LinkAction,er as ListHeader,ir as MRTGrid,pr as MRT_GRID_HUB_LAYOUT,cr as MultiValueFilter,Vo as NavBarLink,Oo as Navbar,ar as NumberField,fr as NumberWithUnit,jr as OptionsPopover,lr as PageItem,dr as PageUpAndDownItem,Br as Pills,Cr as PointsCell,ur as PolymorphicChart,hr as PolymorphicChartRenderer,gr as PrimaryCheckbox,Fr as PrimaryDialog,Tr as Progress,kr as ProgressCard,Sr as QuoteBox,xr as RadioBlock,Pr as RadioBoolean,vr as RadioList,Ir as RichTextEditor,yr as RoundInput,Lr as RoundNumberInput,br as ScatterPlot,Nr as Score,Ar as ScoreCard,Hr as ScoreCardHeader,Dr as ScoreContainer,Gr as ScoreDistribution,Rr as ScoreOverviewCard,wr as ScoreSelect,Ur as ScoreValue,Mr as SearchBox,k as SecondaryTabs,Wr as SectionBox,Er as SectionTabs,Vr as SeeMoreCard,Or as SelectBlock,zr as SelectionCard,Qr as SelectionCardGroup,qr as Separator,Jr as SolidGreyBox,Kr as SpecialTab,ko as SpecialTabs,zo as SubMenu,Xr as SuggestionBlock,V as TertiaryToggleButton,z as TertiaryToggleButtonNodeTitle,Yr as TextArrowList,Zr as TextField,$r as TextTitle,_r as TextTitleGreyIcon,ot as Textarea,f as ThemedPopover,rt as ToggleSwitch,tt as TopLinkAction,mt as TrajectoryCards,st as TrajectoryChart,e as Typography,nt as TypographyList,et as UnitConverterPopover,Qo as UserNav,it as ValueDisplay,pt as ValueLabel,ct as ValueSwitcher,at as WarningBox,ft as WaterfallChart,jt as WhiteBox,lt as WhiteGrid,dt as WhitePopover,Bt as WhitePopoverOnIcon,Ct as WinePilotTheme,ut as WinepilotThemeOptions,ht as allColors,gt as allMainColors,bt as allTypographyVariants,Ht as anyToCheckbox,Gt as barChart,Ft as blueTheme,Rt as breadcrumb,Dt as checkboxToAny,tm as components,mm as computeSize,Tt as coralTheme,wt as countTabs,Ut as custom,kt as dataVisualizationColors,Mt as deleteButton,Nt as deprecatedVariants,Wt as doughnutCard,St as extraColors,Et as formField,o as getThemeLogo,xt as greenTheme,Pt as greyTheme,sm as iconMapping,nm as illustationsMapping,Vt as ingredientCard,r as isTheme,Ot as mediaUpload,zt as numberWithUnit,Qt as numbers,vt as orangeTheme,It as redTheme,qt as scoreCard,Jt as scoreDetail,Kt as scoreOverviewCard,Xt as scoreValue,yt as shadows,em as spacing,Yt as status,Zt as strokes,$t as tabs,_t as tags,t as themeLogos,m as themeOptions,s as themes,om as toggleSwitch,rm as tooltip,At as typographyConfig,Do as useFormBaseContext,im as useResponsiveBreakpoints,pm as useResponsivePadding,Lt as yellowTheme};
|
|
1
|
+
import{getThemeLogo as o,isTheme as r,themeLogos as t,themeOptions as m,themes as s}from"./themes/index.js";import{Button as n,Typography as e}from"@mui/material";import{AccordionProduct as i}from"./components/Accordion/ProductAccordion.js";import{AdditionalContentBox as p}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as c,HeadlessPopover as a,ThemedPopover as f}from"./components/Popover/AnchoredPopover.js";import{Article as j}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as l}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as d}from"./components/Badge/Badge.js";import{Banner as B}from"./components/Banner/Banner.js";import{BigPopoverLayout as C}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as u}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as h}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as g}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as F}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as T,SecondaryTabs as k}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as S}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as x}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as P}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as v}from"./components/Tabs/ButtonTabs.js";import{CardImage as I}from"./components/CardImage.js";import{CategoryBox as y}from"./components/Box/CategoryBox.js";import{CheckboxBlock as L}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as b,CollectiveThemeOptions as N}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as A}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as H}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as D}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as G}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as R}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as w}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as U}from"./components/Popover/CoordinatePopover.js";import{CountTabs as M}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as W}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as E,TertiaryToggleButton as V}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as O,TertiaryToggleButtonNodeTitle as z}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as Q}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as q}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as J}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as K}from"./components/Box/DottedBox.js";import{DoughnutCard as X}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as Y}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as Z}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as $}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as _}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as oo}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as ro}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as to}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as mo}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as so,FoodpilotThemeOptions as no}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as eo}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as io}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as po}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as co}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as ao}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as fo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as jo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as lo}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as Bo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as Co}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as uo}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as ho}from"./components/Search/FoodsSearch.js";import{FoodsSelect as go,FoodsSelectServerPagination as Fo}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as To,SpecialTabs as ko}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as So}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as xo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Po,FoodsThemeProvider as vo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Io}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as yo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as Lo}from"./components/Treeview/Treeview.js";import{FoodsUserTags as bo}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as No}from"./components/Accordion/FormAccordion.js";import{FormBase as Ao}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Ho,useFormBaseContext as Do}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as Go}from"./components/Form/FormBox.js";import{FormPropertyBox as Ro}from"./components/Form/FormPropertyBox.js";import{FormTopBar as wo}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Uo}from"./components/Form/FormUnit.js";import{GenericAccordion as Mo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Wo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Eo,NavBarLink as Vo,Navbar as Oo,SubMenu as zo,UserNav as Qo}from"./components/Navigation/Navbar.js";import{HelperBox as qo}from"./components/Box/HelperBox.js";import{HeroBlock as Jo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Ko}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Xo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as Yo}from"./components/Navigation/IconThread.js";import{IndicatorBlock as Zo}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as $o}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as _o}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as or}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as rr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as tr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as mr}from"./components/Box/LineGroupBox.js";import{LinearProgress as sr}from"./components/LinearProgress.js";import{LinkAction as nr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as er}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as ir}from"./components/Grid/MRTGrid.js";import{MRT_GRID_HUB_LAYOUT as pr}from"./components/Grid/mrtGridLayout.js";import{MultiValueFilter as cr}from"./components/Filter/MultiValueFilter.js";import{NumberField as ar}from"./components/Field/NumberField.js";import{NumberWithUnit as fr}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as jr}from"./components/Popover/OptionsPopover.js";import{PageItem as lr}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as dr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as Br}from"./components/Input/Pills/Pills.js";import{PointsCell as Cr}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as ur}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as hr}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as gr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as Fr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Tr}from"./components/Progress/Progress.js";import{ProgressCard as kr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as Sr}from"./components/Box/QuoteBox.js";import{RadioBlock as xr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as Pr}from"./components/Radio/RadioBoolean.js";import{RadioList as vr}from"./components/Radio/RadioList.js";import{RichTextEditor as Ir}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as yr}from"./components/Input/RoundInput.js";import{RoundNumberInput as Lr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as br}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as Nr}from"./components/Number/Score.js";import{ScoreCard as Ar}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Hr}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Dr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as Gr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Rr}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as wr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Ur}from"./components/Number/ScoreValue.js";import{SearchBox as Mr}from"./components/Input/SearchBox.js";import{SectionBox as Wr}from"./components/Box/SectionBox.js";import{SectionTabs as Er}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as Vr}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Or}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as zr}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as Qr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as qr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as Jr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Kr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Xr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as Yr}from"./components/Text/TextArrowList.js";import{TextField as Zr}from"./components/Field/TextField.js";import{TextTitle as $r}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as _r}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as ot}from"./components/Textarea/Textarea.js";import{ToggleSwitch as rt}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as tt}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as mt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as st}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as nt}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPopover as et}from"./components/Form/UnitConverterPopover.js";import{UnsavedChangesDialog as it}from"./components/Dialog/UnsavedChangesDialog.js";import{ValueDisplay as pt}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as ct}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as at}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as ft}from"./components/Box/WarningBox.js";import{WaterfallChart as jt}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as lt}from"./components/Box/WhiteBox.js";import{WhiteGrid as dt}from"./components/Box/WhiteGrid.js";import{WhitePopover as Bt}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as Ct}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as ut,WinepilotThemeOptions as ht}from"./themes/themes/WinePilotTheme.js";import{allColors as gt,allMainColors as Ft,blueTheme as Tt,coralTheme as kt,dataVisualizationColors as St,extraColors as xt,greenTheme as Pt,greyTheme as vt,orangeTheme as It,redTheme as yt,shadows as Lt,yellowTheme as bt}from"./themes/common/colors.js";import{allTypographyVariants as Nt,deprecatedVariants as At,typographyConfig as Ht}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as Dt,checkboxToAny as Gt}from"./components/Checkbox/helperFunctions.js";import{barChart as Rt,breadcrumb as wt,countTabs as Ut,custom as Mt,deleteButton as Wt,doughnutCard as Et,formField as Vt,ingredientCard as Ot,mediaUpload as zt,numberWithUnit as Qt,numbers as qt,scoreCard as Jt,scoreDetail as Kt,scoreOverviewCard as Xt,scoreValue as Yt,status as Zt,strokes as $t,tabs as _t,tags as om,toggleSwitch as rm,tooltip as tm}from"./themes/common/custom.js";import{components as mm}from"./themes/common/components.js";import{computeSize as sm,iconMapping as nm}from"./components/Icons/iconConfig.js";import{illustationsMapping as em}from"./components/Icons/illustrationsConfig.js";import{spacing as im}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as pm}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as cm}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as AdditionalContentBox,c as AnchoredPopover,j as Article,l as ArticlesBox,d as Badge,B as Banner,C as BigPopoverLayout,u as BlockItemContainer,h as BlockItemInner,g as BlockListContainer,F as BottomSheetDialog,T as BoxStyled,S as BreadcrumbItem,x as Breadcrumbs,P as BreakdownTable,n as Button,v as ButtonTabs,I as CardImage,y as CategoryBox,L as CheckboxBlock,b as CollectiveTheme,N as CollectiveThemeOptions,A as ComingSoonBadge,H as ComparisonArrow,D as ComparisonBlock,G as ComparisonLabel,R as ConfirmDialog,w as ContextualContentBox,U as CoordinatePopover,M as CountTabs,W as CustomRender,E as CustomToggleButton,O as CustomToggleButtonNodeTitle,Q as CustomTypography,q as CustomizedAxisTick,J as DefaultUserAction,K as DottedBox,X as DoughnutCard,Y as DoughnutChart,Z as DrawerAction,$ as EcoScoreCell,_ as EditHeader,oo as EllipsisItem,ro as EmptyForm,to as EvolutionChart,mo as FixedMultiValueFilter,so as FoodPilotTheme,no as FoodpilotThemeOptions,eo as FoodsBadge,io as FoodsCheckbox,po as FoodsDeleteButton,co as FoodsFormBase,ao as FoodsIcon,fo as FoodsIconButton,jo as FoodsIllustrations,lo as FoodsNavbar,Bo as FoodsPagination,Co as FoodsPaginationItem,uo as FoodsRadioList,ho as FoodsSearch,go as FoodsSelect,Fo as FoodsSelectServerPagination,To as FoodsTabs,So as FoodsTags,xo as FoodsTextInput,Po as FoodsThemeOptionsProvider,vo as FoodsThemeProvider,Io as FoodsToggleButton,yo as FoodsTooltip,Lo as FoodsTreeview,bo as FoodsUserTags,No as FormAccordion,Ao as FormBase,Ho as FormBaseContextProvider,Go as FormBox,Ro as FormPropertyBox,wo as FormTopBar,Uo as FormUnit,Mo as GenericAccordion,Wo as GreyTextCell,Eo as HeaderNav,a as HeadlessPopover,qo as HelperBox,Jo as HeroBlock,Ko as HistogramComparisonChart,Xo as HorizontalGaugeChart,Yo as IconThread,Zo as IndicatorBlock,$o as InfoBox,_o as InfoHeaderWithIllustration,or as InitHeader,rr as LeftComparisonPart,tr as LightIndicatorBlock,mr as LineGroupBox,sr as LinearProgress,nr as LinkAction,er as ListHeader,ir as MRTGrid,pr as MRT_GRID_HUB_LAYOUT,cr as MultiValueFilter,Vo as NavBarLink,Oo as Navbar,ar as NumberField,fr as NumberWithUnit,jr as OptionsPopover,lr as PageItem,dr as PageUpAndDownItem,Br as Pills,Cr as PointsCell,ur as PolymorphicChart,hr as PolymorphicChartRenderer,gr as PrimaryCheckbox,Fr as PrimaryDialog,Tr as Progress,kr as ProgressCard,Sr as QuoteBox,xr as RadioBlock,Pr as RadioBoolean,vr as RadioList,Ir as RichTextEditor,yr as RoundInput,Lr as RoundNumberInput,br as ScatterPlot,Nr as Score,Ar as ScoreCard,Hr as ScoreCardHeader,Dr as ScoreContainer,Gr as ScoreDistribution,Rr as ScoreOverviewCard,wr as ScoreSelect,Ur as ScoreValue,Mr as SearchBox,k as SecondaryTabs,Wr as SectionBox,Er as SectionTabs,Vr as SeeMoreCard,Or as SelectBlock,zr as SelectionCard,Qr as SelectionCardGroup,qr as Separator,Jr as SolidGreyBox,Kr as SpecialTab,ko as SpecialTabs,zo as SubMenu,Xr as SuggestionBlock,V as TertiaryToggleButton,z as TertiaryToggleButtonNodeTitle,Yr as TextArrowList,Zr as TextField,$r as TextTitle,_r as TextTitleGreyIcon,ot as Textarea,f as ThemedPopover,rt as ToggleSwitch,tt as TopLinkAction,mt as TrajectoryCards,st as TrajectoryChart,e as Typography,nt as TypographyList,et as UnitConverterPopover,it as UnsavedChangesDialog,Qo as UserNav,pt as ValueDisplay,ct as ValueLabel,at as ValueSwitcher,ft as WarningBox,jt as WaterfallChart,lt as WhiteBox,dt as WhiteGrid,Bt as WhitePopover,Ct as WhitePopoverOnIcon,ut as WinePilotTheme,ht as WinepilotThemeOptions,gt as allColors,Ft as allMainColors,Nt as allTypographyVariants,Dt as anyToCheckbox,Rt as barChart,Tt as blueTheme,wt as breadcrumb,Gt as checkboxToAny,mm as components,sm as computeSize,kt as coralTheme,Ut as countTabs,Mt as custom,St as dataVisualizationColors,Wt as deleteButton,At as deprecatedVariants,Et as doughnutCard,xt as extraColors,Vt as formField,o as getThemeLogo,Pt as greenTheme,vt as greyTheme,nm as iconMapping,em as illustationsMapping,Ot as ingredientCard,r as isTheme,zt as mediaUpload,Qt as numberWithUnit,qt as numbers,It as orangeTheme,yt as redTheme,Jt as scoreCard,Kt as scoreDetail,Xt as scoreOverviewCard,Yt as scoreValue,Lt as shadows,im as spacing,Zt as status,$t as strokes,_t as tabs,om as tags,t as themeLogos,m as themeOptions,s as themes,rm as toggleSwitch,tm as tooltip,Ht as typographyConfig,Do as useFormBaseContext,pm as useResponsiveBreakpoints,cm as useResponsivePadding,bt as yellowTheme};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foodpilot/foods",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.21.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"module": "./dist/main.js",
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
"vite-bundle-visualizer": "^1.2.1",
|
|
301
301
|
"vite-plugin-dts": "^4.5.0",
|
|
302
302
|
"vite-plugin-svgr": "^4.5.0",
|
|
303
|
-
"vitest": "^4.1.
|
|
303
|
+
"vitest": "^4.1.11"
|
|
304
304
|
},
|
|
305
305
|
"dependencies": {
|
|
306
306
|
"@lexical/react": "^0.41.0",
|