@vidispine/vdt-mui 23.4.0-pre.2 → 23.4.0-pre.3

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";const n=require("react/jsx-runtime"),B=require("react"),T=require("@mui/icons-material/esm/Launch"),E=require("@mui/icons-material/esm/FolderOutlined"),$=require("@mui/icons-material/esm/TextSnippetOutlined"),c=require("@mui/material/Box"),A=require("@mui/material/IconButton"),C=require("@mui/material/Tooltip"),F=require("@mui/material/Popover"),i=require("@mui/material/styles"),N=require("@vidispine/vdt-js"),V=require("../../metadata/MetadataGroupTreeView/index.js"),W=i.styled(c,{shouldForwardProp:o=>!["image","cover"].includes(o)})(({theme:o,image:e,cover:s,onClick:a})=>({position:"relative",display:"flex",flexDirection:"column",justifyContent:"space-between",padding:o.spacing(.25),margin:o.spacing(1),height:"95px",width:"168px",zIndex:5,transition:"all .3s ease-in-out",backgroundColor:"rgba(0, 0, 0, 0.8)",backgroundImage:e?`url(${e})`:"none",backgroundPosition:"center",backgroundRepeat:"no-repeat",borderRadius:"4px",cursor:a?"pointer":"initial",...s?{backgroundSize:"cover"}:{backgroundSize:"contain"},"&:hover":{"& .VdtEventListItemActions":{opacity:1}}})),D=i.styled("div",{shouldForwardProp:o=>!["infoOpen"].includes(o)})(({theme:o,infoOpen:e})=>({display:"flex",justifyContent:"flex-end",opacity:e?1:0,transition:"opacity .15s ease-in-out",gap:o.spacing(.25)})),v=i.styled(A)(({theme:o})=>({padding:o.spacing(.25),borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.5)",color:o.palette.common.white,"&:hover":{backgroundColor:"rgba(0,0,0,0.7)"},"&.MuiIconButton-root":{"& .MuiTouchRipple-child":{borderRadius:"4px"}}})),J=i.styled("div")(()=>({display:"flex",justifyContent:"space-between"})),G=i.styled("div")(()=>({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"rgba(255,255,255,0.6)","& .MuiSvgIcon-root":{height:"1.75em",width:"1.75em"}})),y=i.styled("div")(({theme:o})=>({backgroundColor:"rgba(0,0,0,0.6)",paddingLeft:o.spacing(.5),paddingRight:o.spacing(.5),paddingTop:o.spacing(.25),paddingBottom:o.spacing(.25),borderRadius:"3px",display:"flex",alignItems:"center","& span":{fontSize:"0.75rem",fontWeight:700,color:o.palette.common.white}})),d=i.styled("span")(()=>({fontWeight:600,fontSize:".75rem"})),I=i.styled("span")(()=>({fontSize:".75rem"})),H={Root:W},S=({listItem:o,entry:e,baseUrl:s,cover:a,onClick:k,onOpenClick:l,components:R,componentsProps:q})=>{const{Root:L}=R,{thumbnail:r,group:O,start:p,end:u}=o||{},{entityType:g}=e||o,h=t=>t==="-INF"?"Start":t==="+INF"?"End":N.formatTimeCodeText(t).toSmpte(),x=h(p),m=h(u),[f,j]=B.useState(null),b=!!f,P=t=>{k(t,{...o,...e||{}})},w=t=>{t.stopPropagation(),j(t.currentTarget)},z=t=>{t.stopPropagation(),l(t,{...o,...e||{}})},M=()=>{j(null)};return n.jsxs(L,{onClick:P,cover:a,image:s&&r?`${s}/APInoauth/thumbnail/${r}`:r,...q.root,children:[!r&&n.jsx(G,{children:n.jsx(E,{})}),n.jsxs(D,{className:"VdtEventListItemActions",infoOpen:b,children:[l&&n.jsx(C,{title:g==="Item"&&"Open Item"||g==="Collection"&&"Open Collection"||"Open",children:n.jsx(v,{size:"small",onClick:z,children:n.jsx(T,{})})}),n.jsx(C,{title:"Show event info",children:n.jsx(v,{size:"small",onClick:w,children:n.jsx($,{})})})]}),n.jsxs(J,{children:[n.jsx(y,{children:n.jsx("span",{children:x})}),n.jsx(y,{children:n.jsx("span",{children:m})})]}),n.jsxs(F,{onClick:t=>t.stopPropagation(),open:b,anchorEl:f,onClose:M,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{width:400,maxWidth:400,padding:1}}},children:[n.jsxs(c,{sx:{paddingLeft:1,paddingRight:1},children:[n.jsx(d,{children:"Start timecode: "}),n.jsx(I,{children:`${x} (${p})`})]}),n.jsxs(c,{sx:{paddingLeft:1,paddingRight:1},children:[n.jsx(d,{children:"End timecode: "}),n.jsx(I,{children:`${m} (${u})`})]}),n.jsx(c,{sx:{paddingLeft:1,paddingRight:1},children:n.jsx(d,{children:"Metadata group: "})}),n.jsx(V,{group:O})]})]})};S.defaultProps={listItem:void 0,baseUrl:void 0,entry:void 0,cover:!1,onClick:void 0,onOpenClick:void 0,components:H,componentsProps:void 0};const K=S;module.exports=K;
1
+ "use strict";const n=require("react/jsx-runtime"),B=require("react"),T=require("@mui/icons-material/esm/Launch"),E=require("@mui/icons-material/esm/FolderOutlined"),$=require("@mui/icons-material/esm/TextSnippetOutlined"),c=require("@mui/material/Box"),A=require("@mui/material/IconButton"),v=require("@mui/material/Tooltip"),F=require("@mui/material/Popover"),i=require("@mui/material/styles"),N=require("@vidispine/vdt-js"),V=require("../../metadata/MetadataGroupTreeView/index.js"),W=i.styled(c,{shouldForwardProp:o=>!["image","cover"].includes(o)})(({theme:o,image:e,cover:s,onClick:a})=>({position:"relative",display:"flex",flexDirection:"column",justifyContent:"space-between",padding:o.spacing(.25),margin:o.spacing(1),height:"95px",width:"168px",zIndex:5,transition:"all .3s ease-in-out",backgroundColor:"rgba(0, 0, 0, 0.8)",backgroundImage:e?`url(${e})`:"none",backgroundPosition:"center",backgroundRepeat:"no-repeat",borderRadius:"4px",cursor:a?"pointer":"initial",...s?{backgroundSize:"cover"}:{backgroundSize:"contain"},"&:hover":{"& .VdtEventListItemActions":{opacity:1}}})),D=i.styled("div",{shouldForwardProp:o=>!["infoOpen"].includes(o)})(({theme:o,infoOpen:e})=>({display:"flex",justifyContent:"flex-end",opacity:e?1:0,transition:"opacity .15s ease-in-out",gap:o.spacing(.25)})),y=i.styled(A)(({theme:o})=>({padding:o.spacing(.25),borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.5)",color:o.palette.common.white,"&:hover":{backgroundColor:"rgba(0,0,0,0.7)"},"&.MuiIconButton-root":{"& .MuiTouchRipple-child":{borderRadius:"4px"}}})),J=i.styled("div")(()=>({display:"flex",justifyContent:"space-between"})),G=i.styled("div")(()=>({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"rgba(255,255,255,0.6)","& .MuiSvgIcon-root":{height:"1.75em",width:"1.75em"}})),I=i.styled("div")(({theme:o})=>({backgroundColor:"rgba(0,0,0,0.6)",paddingLeft:o.spacing(.5),paddingRight:o.spacing(.5),paddingTop:o.spacing(.25),paddingBottom:o.spacing(.25),borderRadius:"3px",display:"flex",alignItems:"center","& span":{fontSize:"0.75rem",fontWeight:700,color:o.palette.common.white}})),d=i.styled("span")(()=>({fontWeight:600,fontSize:".75rem"})),S=i.styled("span")(()=>({fontSize:".75rem"})),H={Root:W},k=({listItem:o,entry:e,baseUrl:s,cover:a,onClick:l,onOpenClick:p,components:R,componentsProps:q})=>{const{Root:L}=R,{thumbnail:r,group:O,start:u,end:g}=o||{},{entityType:h}=e||o,x=t=>t==="-INF"?"Start":t==="+INF"?"End":N.formatTimeCodeText(t).toSmpte(),f=x(u),m=x(g),[j,b]=B.useState(null),C=!!j,P=t=>{l&&l(t,{...o,...e||{}})},w=t=>{t.stopPropagation(),b(t.currentTarget)},z=t=>{t.stopPropagation(),p(t,{...o,...e||{}})},M=()=>{b(null)};return n.jsxs(L,{onClick:P,cover:a,image:s&&r?`${s}/APInoauth/thumbnail/${r}`:r,...q.root,children:[!r&&n.jsx(G,{children:n.jsx(E,{})}),n.jsxs(D,{className:"VdtEventListItemActions",infoOpen:C,children:[p&&n.jsx(v,{title:h==="Item"&&"Open Item"||h==="Collection"&&"Open Collection"||"Open",children:n.jsx(y,{size:"small",onClick:z,children:n.jsx(T,{})})}),n.jsx(v,{title:"Show event info",children:n.jsx(y,{size:"small",onClick:w,children:n.jsx($,{})})})]}),n.jsxs(J,{children:[n.jsx(I,{children:n.jsx("span",{children:f})}),n.jsx(I,{children:n.jsx("span",{children:m})})]}),n.jsxs(F,{onClick:t=>t.stopPropagation(),open:C,anchorEl:j,onClose:M,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{width:400,maxWidth:400,padding:1}}},children:[n.jsxs(c,{sx:{paddingLeft:1,paddingRight:1},children:[n.jsx(d,{children:"Start timecode: "}),n.jsx(S,{children:`${f} (${u})`})]}),n.jsxs(c,{sx:{paddingLeft:1,paddingRight:1},children:[n.jsx(d,{children:"End timecode: "}),n.jsx(S,{children:`${m} (${g})`})]}),n.jsx(c,{sx:{paddingLeft:1,paddingRight:1},children:n.jsx(d,{children:"Metadata group: "})}),n.jsx(V,{group:O})]})]})};k.defaultProps={listItem:void 0,baseUrl:void 0,entry:void 0,cover:!1,onClick:void 0,onOpenClick:void 0,components:H,componentsProps:void 0};const K=k;module.exports=K;
@@ -1 +1 @@
1
- "use strict";const g=require("react/jsx-runtime"),f=require("react"),T=require("@mui/material/Box"),L=require("@mui/material/Menu"),s=require("@mui/material/styles"),z=require("./components/ButtonBase.js"),E=require("./components/MenuItem.js"),r={descending:"descending",ascending:"ascending"},W=s.styled(T)(({theme:t})=>{var e;return{color:(e=t.palette)==null?void 0:e.secondary.main,paddingLeft:9,paddingRight:9,borderRadius:4}}),A=s.styled(L)(()=>({minWidth:150,marginTop:4})),D=s.styled(E)(({theme:t})=>{var e,i,n,l;return{"&$selected":{backgroundColor:t.palette&&s.alpha((i=(e=t.palette)==null?void 0:e.secondary)==null?void 0:i.main,.16),color:(l=(n=t.palette)==null?void 0:n.secondary)==null?void 0:l.main}}}),F=s.styled(z,{shouldForwardProp:t=>t!=="descending"})(({theme:t,descending:e})=>{var i,n;return{"& .MuiBox-root":{marginRight:"-2px",marginLeft:"4px",color:(n=(i=t.palette)==null?void 0:i.secondary)==null?void 0:n.main,transition:"transform .2s ease-out",transform:"rotate(180deg)",...e&&{transform:"rotate(0deg)"}}}}),V={Root:W,Menu:A,MenuItem:D,ButtonBase:F},b=({caption:t,options:e,initialSort:i,onChange:n,components:l,componentsProps:a})=>{var p,y;const{Root:B,Menu:S,MenuItem:x,ButtonBase:C}=l,[m,v]=f.useState(null),q=o=>{v(o.currentTarget)},h=()=>{v(null)},[d,R]=f.useState(i||{option:{value:void 0,label:void 0},direction:r.descending}),I=(o,M)=>{let{option:c,direction:u}=d;M!==c.value?c=e.find(k=>k.value===M):u=u===r.descending?r.ascending:r.descending,R({option:c,direction:u}),n&&n(o,{value:c.value,direction:u}),h()},O=e===void 0||e.length===0,j=d.direction!==r.ascending;return g.jsxs(B,{...a.root,children:[g.jsx(C,{onClick:q,disabled:O,label:t,optionLabel:d.option.label||"",descending:j,...a.buttonBase}),g.jsx(S,{anchorEl:m,keepMounted:!0,open:!!m,onClose:h,elevation:1,marginThreshold:0,PaperProps:{style:{minWidth:150,marginTop:4}},...a.menu,anchorOrigin:{vertical:"bottom",horizontal:"left",...((p=a.menu)==null?void 0:p.anchorOrigin)||{}},transformOrigin:{vertical:"top",horizontal:"left",...((y=a.menu)==null?void 0:y.transformOrigin)||{}},children:e.map(o=>g.jsx(x,{value:o.value,label:o.label,onClick:I,selected:o.value===d.option.value,...a.menuItem},o.value))})]})};b.defaultProps={caption:"Sort by",onChange:void 0,initialSort:void 0,options:[],components:V,componentsProps:void 0};const $=b;module.exports=$;
1
+ "use strict";const g=require("react/jsx-runtime"),b=require("react"),T=require("@mui/material/Box"),L=require("@mui/material/Menu"),l=require("@mui/material/styles"),z=require("./components/ButtonBase.js"),E=require("./components/MenuItem.js"),r={descending:"descending",ascending:"ascending"},W=l.styled(T)(({theme:t})=>{var e;return{color:(e=t.palette)==null?void 0:e.secondary.main,paddingLeft:9,paddingRight:9,borderRadius:4}}),A=l.styled(L)(()=>({minWidth:150,marginTop:4})),D=l.styled(E)(({theme:t})=>{var e,i,n,s;return{"&$selected":{backgroundColor:t.palette&&l.alpha((i=(e=t.palette)==null?void 0:e.secondary)==null?void 0:i.main,.16),color:(s=(n=t.palette)==null?void 0:n.secondary)==null?void 0:s.main}}}),F=l.styled(z,{shouldForwardProp:t=>t!=="descending"})(({theme:t,descending:e})=>{var i,n;return{"& .MuiBox-root":{marginRight:"-2px",marginLeft:"4px",color:(n=(i=t.palette)==null?void 0:i.secondary)==null?void 0:n.main,transition:"transform .2s ease-out",transform:"rotate(180deg)",...e&&{transform:"rotate(0deg)"}}}}),V={Root:W,Menu:A,MenuItem:D,ButtonBase:F},f=({caption:t,options:e,initialSort:i,onChange:n,components:s,componentsProps:a})=>{var p,y;const{Root:B,Menu:S,MenuItem:x,ButtonBase:C}=s,[m,v]=b.useState(null),q=o=>{v(o.currentTarget)},h=()=>{v(null)},[d,R]=b.useState(i||{option:{value:void 0,label:void 0},direction:r.descending}),I=(o,M)=>{let{option:c,direction:u}=d;M!==c.value?c=e.find(k=>k.value===M):u=u===r.descending?r.ascending:r.descending,R({option:c,direction:u}),n&&n(o,{value:c.value,direction:u}),h()},O=e===void 0||e.length===0,j=d.direction!==r.ascending;return g.jsxs(B,{...a.root,children:[g.jsx(C,{onClick:q,disabled:O,label:t,optionLabel:d.option.label||"",descending:j,role:"button",...a.buttonBase}),g.jsx(S,{anchorEl:m,keepMounted:!0,open:!!m,onClose:h,elevation:1,marginThreshold:0,PaperProps:{style:{minWidth:150,marginTop:4}},...a.menu,anchorOrigin:{vertical:"bottom",horizontal:"left",...((p=a.menu)==null?void 0:p.anchorOrigin)||{}},transformOrigin:{vertical:"top",horizontal:"left",...((y=a.menu)==null?void 0:y.transformOrigin)||{}},children:e.map(o=>g.jsx(x,{value:o.value,label:o.label,onClick:I,selected:o.value===d.option.value,...a.menuItem},o.value))})]})};f.defaultProps={caption:"Sort by",onChange:void 0,initialSort:void 0,options:[],components:V,componentsProps:void 0};const $=f;module.exports=$;
@@ -1 +1 @@
1
- "use strict";const l=require("react/jsx-runtime"),A=require("@mui/material/FormControl"),z=require("@mui/material/FormControlLabel"),B=require("@mui/material/FormHelperText"),I=require("@mui/material/Switch"),E=require("@mui/material/Checkbox"),p=require("@mui/material/styles"),P=p.styled(z,{shouldForwardProp:o=>o!=="size"})(({theme:o,size:e,labelPlacement:t})=>({"& .MuiTypography-root":{...e==="small"&&{fontSize:"0.8rem"}},"&.Mui-error":{color:o.palette.error.main},...t==="end"?{marginRight:0}:{},...t==="start"?{marginLeft:0}:{},...["bottom","top"].includes(t)?{marginRight:0,marginLeft:0}:{}})),V=p.styled(B,{shouldForwardProp:o=>!["fullWidth","textAlign"].includes(o)})(({fullWidth:o,textAlign:e})=>o?{textAlign:e}:{}),W={Root:A,FormControlLabel:P,FormHelperText:V,Switch:I,Checkbox:E},C=({name:o,label:e,value:t,defaultValue:g,helperText:c,error:s,required:d,disabled:b,labelPlacement:a,size:u,fullWidth:m,type:f,onChange:F,onBlur:v,onFocus:k,components:y,componentsProps:r})=>{const{Root:T,FormControlLabel:L,FormHelperText:q,Switch:w,Checkbox:M}=y,S={end:"left",start:"right",top:"center",bottom:"center"},j=n=>{var x;F(n,{value:(x=n==null?void 0:n.target)==null?void 0:x.checked})},i=!!s,h=(s||"").trim(),[H,R]=f==="switch"?[w,r.switch]:[M,r.checkbox];return l.jsxs(T,{error:i,required:d,disabled:b,fullWidth:m,...r.root,children:[l.jsx(L,{label:d?`${e} *`:e,labelPlacement:e?a:"end",size:u,control:l.jsx(H,{id:o,name:o,checked:t,size:u,type:"checkbox",defaultChecked:g,...i?{color:"error"}:{},onChange:j,onBlur:v,onFocus:k,...R}),...r.formControlLabel}),(h||c)&&l.jsx(q,{fullWidth:m,textAlign:S[a],...r.formHelperText,children:i?h:c})]})};C.defaultProps={name:void 0,label:void 0,value:void 0,defaultValue:void 0,helperText:void 0,error:void 0,required:!1,disabled:!1,fullWidth:!1,labelPlacement:"end",size:"medium",type:"checkbox",onChange:()=>null,onBlur:void 0,onFocus:void 0,components:W,componentsProps:void 0};const $=C;module.exports=$;
1
+ "use strict";const l=require("react/jsx-runtime"),B=require("@mui/material/FormControl"),I=require("@mui/material/FormControlLabel"),D=require("@mui/material/FormHelperText"),E=require("@mui/material/Switch"),P=require("@mui/material/Checkbox"),C=require("@mui/material/styles"),V=C.styled(I,{shouldForwardProp:e=>e!=="size"})(({theme:e,size:o,labelPlacement:t})=>({"& .MuiTypography-root":{...o==="small"&&{fontSize:"0.8rem"}},"&.Mui-error":{color:e.palette.error.main},...t==="end"?{marginRight:0}:{},...t==="start"?{marginLeft:0}:{},...["bottom","top"].includes(t)?{marginRight:0,marginLeft:0}:{}})),W=C.styled(D,{shouldForwardProp:e=>!["fullWidth","textAlign"].includes(e)})(({fullWidth:e,textAlign:o})=>e?{textAlign:o}:{}),$={Root:B,FormControlLabel:V,FormHelperText:W,Switch:E,Checkbox:P},b=({name:e,label:o,value:t,defaultValue:i,helperText:d,error:u,required:m,disabled:F,labelPlacement:h,size:x,fullWidth:p,type:y,onChange:k,onBlur:v,onFocus:T,components:L,componentsProps:r})=>{const{Root:q,FormControlLabel:w,FormHelperText:M,Switch:S,Checkbox:j}=L,H={end:"left",start:"right",top:"center",bottom:"center"};let s,c;typeof i=="string"?s=i==="true":s=i,typeof t=="string"?c=t==="true":c=t;const R=n=>{var g;k(n,{value:(g=n==null?void 0:n.target)==null?void 0:g.checked})},a=!!u,f=(u||"").trim(),[A,z]=y==="switch"?[S,r.switch]:[j,r.checkbox];return l.jsxs(q,{error:a,required:m,disabled:F,fullWidth:p,...r.root,children:[l.jsx(w,{label:m?`${o} *`:o,labelPlacement:o?h:"end",size:x,control:l.jsx(A,{id:e,name:e,checked:c,size:x,type:"checkbox",defaultChecked:s,...a?{color:"error"}:{},onChange:R,onBlur:v,onFocus:T,...z}),...r.formControlLabel}),(f||d)&&l.jsx(M,{fullWidth:p,textAlign:H[h],...r.formHelperText,children:a?f:d})]})};b.defaultProps={name:void 0,label:void 0,value:void 0,defaultValue:void 0,helperText:void 0,error:void 0,required:!1,disabled:!1,fullWidth:!1,labelPlacement:"end",size:"medium",type:"checkbox",onChange:()=>null,onBlur:void 0,onFocus:void 0,components:$,componentsProps:void 0};const G=b;module.exports=G;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface OverridesProps {
2
3
  className: string;
3
4
  components: any;
@@ -5,7 +5,7 @@ import A from "@mui/icons-material/esm/FolderOutlined";
5
5
  import F from "@mui/icons-material/esm/TextSnippetOutlined";
6
6
  import d from "@mui/material/Box";
7
7
  import V from "@mui/material/IconButton";
8
- import I from "@mui/material/Tooltip";
8
+ import S from "@mui/material/Tooltip";
9
9
  import N from "@mui/material/Popover";
10
10
  import { styled as e } from "@mui/material/styles";
11
11
  import { formatTimeCodeText as W } from "@vidispine/vdt-js";
@@ -55,7 +55,7 @@ const G = e(d, {
55
55
  opacity: i ? 1 : 0,
56
56
  transition: "opacity .15s ease-in-out",
57
57
  gap: o.spacing(0.25)
58
- })), S = e(V)(({
58
+ })), k = e(V)(({
59
59
  theme: o
60
60
  }) => ({
61
61
  padding: o.spacing(0.25),
@@ -83,7 +83,7 @@ const G = e(d, {
83
83
  height: "1.75em",
84
84
  width: "1.75em"
85
85
  }
86
- })), k = e("div")(({
86
+ })), y = e("div")(({
87
87
  theme: o
88
88
  }) => ({
89
89
  backgroundColor: "rgba(0,0,0,0.6)",
@@ -102,17 +102,17 @@ const G = e(d, {
102
102
  })), s = e("span")(() => ({
103
103
  fontWeight: 600,
104
104
  fontSize: ".75rem"
105
- })), y = e("span")(() => ({
105
+ })), R = e("span")(() => ({
106
106
  fontSize: ".75rem"
107
107
  })), K = {
108
108
  Root: G
109
- }, R = ({
109
+ }, w = ({
110
110
  listItem: o,
111
111
  entry: i,
112
112
  baseUrl: a,
113
113
  cover: l,
114
- onClick: w,
115
- onOpenClick: p,
114
+ onClick: p,
115
+ onOpenClick: g,
116
116
  components: L,
117
117
  componentsProps: O
118
118
  }) => {
@@ -121,36 +121,36 @@ const G = e(d, {
121
121
  } = L, {
122
122
  thumbnail: c,
123
123
  group: z,
124
- start: g,
125
- end: u
124
+ start: u,
125
+ end: m
126
126
  } = o || {}, {
127
- entityType: m
128
- } = i || o, h = (t) => t === "-INF" ? "Start" : t === "+INF" ? "End" : W(t).toSmpte(), f = h(g), b = h(u), [x, C] = $(null), v = !!x, M = (t) => {
129
- w(t, {
127
+ entityType: h
128
+ } = i || o, f = (t) => t === "-INF" ? "Start" : t === "+INF" ? "End" : W(t).toSmpte(), b = f(u), x = f(m), [C, v] = $(null), I = !!C, M = (t) => {
129
+ p && p(t, {
130
130
  ...o,
131
131
  ...i || {}
132
132
  });
133
133
  }, T = (t) => {
134
- t.stopPropagation(), C(t.currentTarget);
134
+ t.stopPropagation(), v(t.currentTarget);
135
135
  }, B = (t) => {
136
- t.stopPropagation(), p(t, {
136
+ t.stopPropagation(), g(t, {
137
137
  ...o,
138
138
  ...i || {}
139
139
  });
140
140
  }, E = () => {
141
- C(null);
141
+ v(null);
142
142
  };
143
143
  return /* @__PURE__ */ r(P, { onClick: M, cover: l, image: a && c ? `${a}/APInoauth/thumbnail/${c}` : c, ...O.root, children: [
144
144
  !c && /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(A, {}) }),
145
- /* @__PURE__ */ r(q, { className: "VdtEventListItemActions", infoOpen: v, children: [
146
- p && /* @__PURE__ */ n(I, { title: m === "Item" && "Open Item" || m === "Collection" && "Open Collection" || "Open", children: /* @__PURE__ */ n(S, { size: "small", onClick: B, children: /* @__PURE__ */ n(j, {}) }) }),
147
- /* @__PURE__ */ n(I, { title: "Show event info", children: /* @__PURE__ */ n(S, { size: "small", onClick: T, children: /* @__PURE__ */ n(F, {}) }) })
145
+ /* @__PURE__ */ r(q, { className: "VdtEventListItemActions", infoOpen: I, children: [
146
+ g && /* @__PURE__ */ n(S, { title: h === "Item" && "Open Item" || h === "Collection" && "Open Collection" || "Open", children: /* @__PURE__ */ n(k, { size: "small", onClick: B, children: /* @__PURE__ */ n(j, {}) }) }),
147
+ /* @__PURE__ */ n(S, { title: "Show event info", children: /* @__PURE__ */ n(k, { size: "small", onClick: T, children: /* @__PURE__ */ n(F, {}) }) })
148
148
  ] }),
149
149
  /* @__PURE__ */ r(H, { children: [
150
- /* @__PURE__ */ n(k, { children: /* @__PURE__ */ n("span", { children: f }) }),
151
- /* @__PURE__ */ n(k, { children: /* @__PURE__ */ n("span", { children: b }) })
150
+ /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n("span", { children: b }) }),
151
+ /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n("span", { children: x }) })
152
152
  ] }),
153
- /* @__PURE__ */ r(N, { onClick: (t) => t.stopPropagation(), open: v, anchorEl: x, onClose: E, anchorOrigin: {
153
+ /* @__PURE__ */ r(N, { onClick: (t) => t.stopPropagation(), open: I, anchorEl: C, onClose: E, anchorOrigin: {
154
154
  vertical: "bottom",
155
155
  horizontal: "right"
156
156
  }, transformOrigin: {
@@ -170,14 +170,14 @@ const G = e(d, {
170
170
  paddingRight: 1
171
171
  }, children: [
172
172
  /* @__PURE__ */ n(s, { children: "Start timecode: " }),
173
- /* @__PURE__ */ n(y, { children: `${f} (${g})` })
173
+ /* @__PURE__ */ n(R, { children: `${b} (${u})` })
174
174
  ] }),
175
175
  /* @__PURE__ */ r(d, { sx: {
176
176
  paddingLeft: 1,
177
177
  paddingRight: 1
178
178
  }, children: [
179
179
  /* @__PURE__ */ n(s, { children: "End timecode: " }),
180
- /* @__PURE__ */ n(y, { children: `${b} (${u})` })
180
+ /* @__PURE__ */ n(R, { children: `${x} (${m})` })
181
181
  ] }),
182
182
  /* @__PURE__ */ n(d, { sx: {
183
183
  paddingLeft: 1,
@@ -187,7 +187,7 @@ const G = e(d, {
187
187
  ] })
188
188
  ] });
189
189
  };
190
- R.defaultProps = {
190
+ w.defaultProps = {
191
191
  listItem: void 0,
192
192
  baseUrl: void 0,
193
193
  entry: void 0,
@@ -197,7 +197,7 @@ R.defaultProps = {
197
197
  components: K,
198
198
  componentsProps: void 0
199
199
  };
200
- const ao = R;
200
+ const ao = w;
201
201
  export {
202
202
  ao as default
203
203
  };
@@ -10,5 +10,5 @@ export interface VdtPickersDayProps extends CustomPickerDayProps {
10
10
  } | string | number;
11
11
  locale?: string;
12
12
  }
13
- declare const VdtPickersDay: import("react").ForwardRefExoticComponent<Pick<VdtPickersDayProps, keyof VdtPickersDayProps> & import("react").RefAttributes<any>>;
13
+ declare const VdtPickersDay: import("react").ForwardRefExoticComponent<Omit<VdtPickersDayProps, "ref"> & import("react").RefAttributes<any>>;
14
14
  export default VdtPickersDay;
@@ -93,7 +93,7 @@ const r = {
93
93
  }), f();
94
94
  }, k = e === void 0 || e.length === 0, T = d.direction !== r.ascending;
95
95
  return /* @__PURE__ */ V(S, { ...i.root, children: [
96
- /* @__PURE__ */ m(C, { onClick: I, disabled: k, label: t, optionLabel: d.option.label || "", descending: T, ...i.buttonBase }),
96
+ /* @__PURE__ */ m(C, { onClick: I, disabled: k, label: t, optionLabel: d.option.label || "", descending: T, role: "button", ...i.buttonBase }),
97
97
  /* @__PURE__ */ m(y, { anchorEl: g, keepMounted: !0, open: !!g, onClose: f, elevation: 1, marginThreshold: 0, PaperProps: {
98
98
  style: {
99
99
  minWidth: 150,
@@ -24,7 +24,7 @@ export interface ThemeProviderProps<TLightKey extends string = 'light', TDarkKey
24
24
  children?: ReactNode;
25
25
  }
26
26
  declare const ThemeProvider: {
27
- ({ themes, muiLocale, defaultPaletteKey, lightPaletteKey, darkPaletteKey, systemPaletteKey, localStoragePaletteKey, MuiThemeProviderProps, CssBaselineProps, children, ...props }: PropsWithChildren<ThemeProviderProps>): JSX.Element;
27
+ ({ themes, muiLocale, defaultPaletteKey, lightPaletteKey, darkPaletteKey, systemPaletteKey, localStoragePaletteKey, MuiThemeProviderProps, CssBaselineProps, children, ...props }: PropsWithChildren<ThemeProviderProps>): import("react/jsx-runtime").JSX.Element;
28
28
  defaultProps: ThemeProviderProps<"light", "dark">;
29
29
  };
30
30
  declare const useThemeContext: () => ThemeContextValue<"light", "dark">;
@@ -13,4 +13,4 @@ export { default as ScrubLine } from './ScrubLine';
13
13
  export { default as Sort } from './Sort';
14
14
  export { default as TablePagination } from './TablePagination';
15
15
  export { default as Form } from './Form';
16
- export { ThemeProvider, useThemeContext } from './ThemeContext';
16
+ export * from './ThemeContext';
@@ -25,11 +25,11 @@ export interface BooleanInputProps extends WithOverrideProps<typeof defaultCompo
25
25
  /**
26
26
  * Value of input
27
27
  */
28
- value?: boolean;
28
+ value?: boolean | '' | 'true' | 'false';
29
29
  /**
30
30
  * Default value of input (use for uncontrolled)
31
31
  */
32
- defaultValue?: boolean;
32
+ defaultValue?: boolean | '' | 'true' | 'false';
33
33
  /**
34
34
  * Label to use
35
35
  */
@@ -1,92 +1,95 @@
1
- import { jsxs as z, jsx as i } from "react/jsx-runtime";
2
- import B from "@mui/material/FormControl";
3
- import I from "@mui/material/FormControlLabel";
4
- import E from "@mui/material/FormHelperText";
5
- import P from "@mui/material/Switch";
6
- import V from "@mui/material/Checkbox";
7
- import { styled as f } from "@mui/material/styles";
8
- const W = f(I, {
1
+ import { jsxs as I, jsx as c } from "react/jsx-runtime";
2
+ import D from "@mui/material/FormControl";
3
+ import E from "@mui/material/FormControlLabel";
4
+ import P from "@mui/material/FormHelperText";
5
+ import V from "@mui/material/Switch";
6
+ import W from "@mui/material/Checkbox";
7
+ import { styled as C } from "@mui/material/styles";
8
+ const $ = C(E, {
9
9
  shouldForwardProp: (o) => o !== "size"
10
10
  })(({
11
11
  theme: o,
12
- size: t,
13
- labelPlacement: e
12
+ size: e,
13
+ labelPlacement: t
14
14
  }) => ({
15
15
  "& .MuiTypography-root": {
16
- ...t === "small" && {
16
+ ...e === "small" && {
17
17
  fontSize: "0.8rem"
18
18
  }
19
19
  },
20
20
  "&.Mui-error": {
21
21
  color: o.palette.error.main
22
22
  },
23
- ...e === "end" ? {
23
+ ...t === "end" ? {
24
24
  marginRight: 0
25
25
  } : {},
26
- ...e === "start" ? {
26
+ ...t === "start" ? {
27
27
  marginLeft: 0
28
28
  } : {},
29
- ...["bottom", "top"].includes(e) ? {
29
+ ...["bottom", "top"].includes(t) ? {
30
30
  marginRight: 0,
31
31
  marginLeft: 0
32
32
  } : {}
33
- })), $ = f(E, {
33
+ })), q = C(P, {
34
34
  shouldForwardProp: (o) => !["fullWidth", "textAlign"].includes(o)
35
35
  })(({
36
36
  fullWidth: o,
37
- textAlign: t
37
+ textAlign: e
38
38
  }) => o ? {
39
- textAlign: t
40
- } : {}), q = {
41
- Root: B,
42
- FormControlLabel: W,
43
- FormHelperText: $,
44
- Switch: P,
45
- Checkbox: V
46
- }, x = ({
39
+ textAlign: e
40
+ } : {}), G = {
41
+ Root: D,
42
+ FormControlLabel: $,
43
+ FormHelperText: q,
44
+ Switch: V,
45
+ Checkbox: W
46
+ }, b = ({
47
47
  name: o,
48
- label: t,
49
- value: e,
50
- defaultValue: C,
51
- helperText: m,
52
- error: a,
53
- required: c,
54
- disabled: g,
55
- labelPlacement: d,
56
- size: s,
57
- fullWidth: h,
58
- type: b,
59
- onChange: F,
60
- onBlur: v,
61
- onFocus: k,
62
- components: T,
48
+ label: e,
49
+ value: t,
50
+ defaultValue: l,
51
+ helperText: d,
52
+ error: s,
53
+ required: h,
54
+ disabled: F,
55
+ labelPlacement: p,
56
+ size: u,
57
+ fullWidth: f,
58
+ type: k,
59
+ onChange: v,
60
+ onBlur: y,
61
+ onFocus: T,
62
+ components: L,
63
63
  componentsProps: r
64
64
  }) => {
65
65
  const {
66
- Root: L,
67
- FormControlLabel: w,
68
- FormHelperText: y,
69
- Switch: M,
70
- Checkbox: S
71
- } = T, H = {
66
+ Root: w,
67
+ FormControlLabel: M,
68
+ FormHelperText: S,
69
+ Switch: H,
70
+ Checkbox: R
71
+ } = L, A = {
72
72
  end: "left",
73
73
  start: "right",
74
74
  top: "center",
75
75
  bottom: "center"
76
- }, R = (n) => {
77
- var p;
78
- F(n, {
79
- value: (p = n == null ? void 0 : n.target) == null ? void 0 : p.checked
76
+ };
77
+ let i, m;
78
+ typeof l == "string" ? i = l === "true" : i = l, typeof t == "string" ? m = t === "true" : m = t;
79
+ const j = (n) => {
80
+ var g;
81
+ v(n, {
82
+ value: (g = n == null ? void 0 : n.target) == null ? void 0 : g.checked
80
83
  });
81
- }, l = !!a, u = (a || "").trim(), [A, j] = b === "switch" ? [M, r.switch] : [S, r.checkbox];
82
- return /* @__PURE__ */ z(L, { error: l, required: c, disabled: g, fullWidth: h, ...r.root, children: [
83
- /* @__PURE__ */ i(w, { label: c ? `${t} *` : t, labelPlacement: t ? d : "end", size: s, control: /* @__PURE__ */ i(A, { id: o, name: o, checked: e, size: s, type: "checkbox", defaultChecked: C, ...l ? {
84
+ }, a = !!s, x = (s || "").trim(), [z, B] = k === "switch" ? [H, r.switch] : [R, r.checkbox];
85
+ return /* @__PURE__ */ I(w, { error: a, required: h, disabled: F, fullWidth: f, ...r.root, children: [
86
+ /* @__PURE__ */ c(M, { label: h ? `${e} *` : e, labelPlacement: e ? p : "end", size: u, control: /* @__PURE__ */ c(z, { id: o, name: o, checked: m, size: u, type: "checkbox", defaultChecked: i, ...a ? {
84
87
  color: "error"
85
- } : {}, onChange: R, onBlur: v, onFocus: k, ...j }), ...r.formControlLabel }),
86
- (u || m) && /* @__PURE__ */ i(y, { fullWidth: h, textAlign: H[d], ...r.formHelperText, children: l ? u : m })
88
+ } : {}, onChange: j, onBlur: y, onFocus: T, ...B }), ...r.formControlLabel }),
89
+ (x || d) && /* @__PURE__ */ c(S, { fullWidth: f, textAlign: A[p], ...r.formHelperText, children: a ? x : d })
87
90
  ] });
88
91
  };
89
- x.defaultProps = {
92
+ b.defaultProps = {
90
93
  name: void 0,
91
94
  label: void 0,
92
95
  value: void 0,
@@ -102,10 +105,10 @@ x.defaultProps = {
102
105
  onChange: () => null,
103
106
  onBlur: void 0,
104
107
  onFocus: void 0,
105
- components: q,
108
+ components: G,
106
109
  componentsProps: void 0
107
110
  };
108
- const X = x;
111
+ const Z = b;
109
112
  export {
110
- X as default
113
+ Z as default
111
114
  };
@@ -37,5 +37,5 @@ export interface CheckboxGroupProps extends Omit<MuiFormGroupProps, 'onChange'>
37
37
  rows: boolean;
38
38
  type: string;
39
39
  }
40
- declare const CheckboxGroup: import("react").ForwardRefExoticComponent<Pick<CheckboxGroupProps, keyof CheckboxGroupProps> & import("react").RefAttributes<unknown>>;
40
+ declare const CheckboxGroup: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
41
41
  export default CheckboxGroup;
@@ -37,5 +37,5 @@ export interface RadioGroupProps extends Omit<MuiRadioGroupProps, 'onChange'> {
37
37
  rows: boolean;
38
38
  type: string;
39
39
  }
40
- declare const RadioGroup: import("react").ForwardRefExoticComponent<Pick<RadioGroupProps, keyof RadioGroupProps> & import("react").RefAttributes<unknown>>;
40
+ declare const RadioGroup: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
41
41
  export default RadioGroup;
@@ -25,5 +25,5 @@ export interface SliderProps extends Omit<MuiSliderProps, 'onChange'> {
25
25
  rows?: boolean;
26
26
  type?: string;
27
27
  }
28
- declare const Slider: import("react").ForwardRefExoticComponent<Pick<SliderProps, keyof SliderProps> & import("react").RefAttributes<HTMLSpanElement>>;
28
+ declare const Slider: import("react").ForwardRefExoticComponent<Omit<SliderProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
29
29
  export default Slider;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { MetadataType, MetadataFieldType } from '@vidispine/types';
2
3
  declare const useMetadataFormInputs: ({ fieldList, metadata, dataToPropsMap, errorMessages, inputsProps, }: {
3
4
  fieldList?: MetadataFieldType[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { FacetType, MetadataFieldType } from '@vidispine/types';
2
3
  declare const useSearchFilterFormInputs: ({ fieldList, facetList, includeFacetsAsOptions, dataToPropsMap, errorMessages, inputsProps, }: {
3
4
  fieldList?: MetadataFieldType[];
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-mui",
3
- "version": "23.4.0-pre.2",
3
+ "version": "23.4.0-pre.3",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
- "access": "public"
6
+ "access": "public",
7
+ "registry": "https://registry.npmjs.org"
7
8
  },
8
9
  "description": "Mui (v5) library for VidiCore",
9
10
  "homepage": "https://vidispine.github.io/vdt/?path=/docs/vdt-mui",
@@ -39,40 +40,41 @@
39
40
  "new:component": "hygen new component"
40
41
  },
41
42
  "dependencies": {
42
- "@mui/icons-material": "^5.14.8",
43
- "@mui/lab": "^5.0.0-alpha.120",
44
- "@mui/material": "^5.14.8",
45
- "@vidispine/proptypes": "23.4.0-pre.2",
46
- "@vidispine/types": "23.4.0-pre.2",
47
- "@vidispine/vdt-api": "23.4.0-pre.2",
48
- "@vidispine/vdt-js": "23.4.0-pre.2",
43
+ "@mui/icons-material": "^5.14.19",
44
+ "@mui/lab": "^5.0.0-alpha.155",
45
+ "@mui/material": "^5.14.20",
46
+ "@vidispine/types": "23.4.0-pre.3",
47
+ "@vidispine/vdt-api": "23.4.0-pre.3",
48
+ "@vidispine/vdt-js": "23.4.0-pre.3",
49
49
  "clsx": "^1.2.1"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@mui/x-date-pickers": "^5.0.0",
53
53
  "@tanstack/react-virtual": "3.0.0-beta.30",
54
54
  "dayjs": "^1.0.0",
55
- "react": "^17.0.0",
56
- "react-dom": "^17.0.0",
55
+ "react": "^17.0.0 || ^18.0.0",
56
+ "react-dom": "^17.0.0 || ^18.0.0",
57
57
  "react-hook-form": "^7.0.0",
58
58
  "react-imask": "^6.4.3"
59
59
  },
60
60
  "devDependencies": {
61
- "@vidispine/eslint-config-mdx": "23.4.0-pre.2",
62
- "@vidispine/eslint-config-react": "23.4.0-pre.2",
63
- "@vidispine/eslint-config-storybook": "23.4.0-pre.2",
64
- "@vidispine/eslint-config-typescript": "23.4.0-pre.2",
65
- "@vidispine/prettier-config": "23.4.0-pre.2",
66
- "@vidispine/proptypes": "23.4.0-pre.2",
67
- "@vidispine/tests": "23.4.0-pre.2",
68
- "@vitejs/plugin-react": "3.1.0",
61
+ "@emotion/react": "^11.11.1",
62
+ "@emotion/styled": "^11.11.0",
63
+ "@vidispine/eslint-config-mdx": "23.4.0-pre.3",
64
+ "@vidispine/eslint-config-react": "23.4.0-pre.3",
65
+ "@vidispine/eslint-config-storybook": "23.4.0-pre.3",
66
+ "@vidispine/prettier-config": "23.4.0-pre.3",
67
+ "@vidispine/proptypes": "23.4.0-pre.3",
68
+ "@vidispine/tests": "23.4.0-pre.3",
69
+ "@vitejs/plugin-react": "4.2.1",
69
70
  "babel-plugin-transform-import": "1.5.4",
70
- "eslint": "8.48.0",
71
+ "eslint": "8.55.0",
71
72
  "hygen": "6.2.11",
72
- "prettier": "2.8.8",
73
- "rimraf": "3.0.2",
74
- "vite": "4.4.9",
75
- "vite-plugin-dts": "3.5.3"
73
+ "prettier": "3.1.0",
74
+ "rimraf": "5.0.5",
75
+ "typescript": "5.0.4",
76
+ "vite": "4.5.1",
77
+ "vite-plugin-dts": "3.6.4"
76
78
  },
77
79
  "eslintConfig": {
78
80
  "extends": [