@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.
- package/dist/cjs/event/EventListItem/EventListItem.js +1 -1
- package/dist/cjs/general/Sort/Sort.js +1 -1
- package/dist/cjs/inputs/BooleanInput/BooleanInput.js +1 -1
- package/dist/es/_utils/withOverrides.d.ts +1 -0
- package/dist/es/event/EventListItem/EventListItem.js +25 -25
- package/dist/es/general/CalendarPicker/components/PickersDay.d.ts +1 -1
- package/dist/es/general/Sort/Sort.js +1 -1
- package/dist/es/general/ThemeContext/ThemeContext.d.ts +1 -1
- package/dist/es/general/index.d.ts +1 -1
- package/dist/es/inputs/BooleanInput/BooleanInput.d.ts +2 -2
- package/dist/es/inputs/BooleanInput/BooleanInput.js +61 -58
- package/dist/es/inputs/CheckboxGroupInput/components/CheckboxGroup.d.ts +1 -1
- package/dist/es/inputs/RadioGroupInput/components/RadioGroup.d.ts +1 -1
- package/dist/es/inputs/SliderInput/components/Slider.d.ts +1 -1
- package/dist/es/metadata/MetadataForm/hooks/UseMetadataFormInputs.d.ts +1 -0
- package/dist/es/search/SearchFilterForm/hooks/UseSearchFilterFormInputs.d.ts +1 -0
- package/package.json +26 -24
|
@@ -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"),
|
|
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"),
|
|
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"),
|
|
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;
|
|
@@ -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
|
|
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
|
-
})),
|
|
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
|
-
})),
|
|
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
|
-
})),
|
|
105
|
+
})), R = e("span")(() => ({
|
|
106
106
|
fontSize: ".75rem"
|
|
107
107
|
})), K = {
|
|
108
108
|
Root: G
|
|
109
|
-
},
|
|
109
|
+
}, w = ({
|
|
110
110
|
listItem: o,
|
|
111
111
|
entry: i,
|
|
112
112
|
baseUrl: a,
|
|
113
113
|
cover: l,
|
|
114
|
-
onClick:
|
|
115
|
-
onOpenClick:
|
|
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:
|
|
125
|
-
end:
|
|
124
|
+
start: u,
|
|
125
|
+
end: m
|
|
126
126
|
} = o || {}, {
|
|
127
|
-
entityType:
|
|
128
|
-
} = i || o,
|
|
129
|
-
|
|
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(),
|
|
134
|
+
t.stopPropagation(), v(t.currentTarget);
|
|
135
135
|
}, B = (t) => {
|
|
136
|
-
t.stopPropagation(),
|
|
136
|
+
t.stopPropagation(), g(t, {
|
|
137
137
|
...o,
|
|
138
138
|
...i || {}
|
|
139
139
|
});
|
|
140
140
|
}, E = () => {
|
|
141
|
-
|
|
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:
|
|
146
|
-
|
|
147
|
-
/* @__PURE__ */ n(
|
|
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(
|
|
151
|
-
/* @__PURE__ */ n(
|
|
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:
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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 =
|
|
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<
|
|
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
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { styled as
|
|
8
|
-
const
|
|
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:
|
|
13
|
-
labelPlacement:
|
|
12
|
+
size: e,
|
|
13
|
+
labelPlacement: t
|
|
14
14
|
}) => ({
|
|
15
15
|
"& .MuiTypography-root": {
|
|
16
|
-
...
|
|
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
|
-
...
|
|
23
|
+
...t === "end" ? {
|
|
24
24
|
marginRight: 0
|
|
25
25
|
} : {},
|
|
26
|
-
...
|
|
26
|
+
...t === "start" ? {
|
|
27
27
|
marginLeft: 0
|
|
28
28
|
} : {},
|
|
29
|
-
...["bottom", "top"].includes(
|
|
29
|
+
...["bottom", "top"].includes(t) ? {
|
|
30
30
|
marginRight: 0,
|
|
31
31
|
marginLeft: 0
|
|
32
32
|
} : {}
|
|
33
|
-
})),
|
|
33
|
+
})), q = C(P, {
|
|
34
34
|
shouldForwardProp: (o) => !["fullWidth", "textAlign"].includes(o)
|
|
35
35
|
})(({
|
|
36
36
|
fullWidth: o,
|
|
37
|
-
textAlign:
|
|
37
|
+
textAlign: e
|
|
38
38
|
}) => o ? {
|
|
39
|
-
textAlign:
|
|
40
|
-
} : {}),
|
|
41
|
-
Root:
|
|
42
|
-
FormControlLabel:
|
|
43
|
-
FormHelperText:
|
|
44
|
-
Switch:
|
|
45
|
-
Checkbox:
|
|
46
|
-
},
|
|
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:
|
|
49
|
-
value:
|
|
50
|
-
defaultValue:
|
|
51
|
-
helperText:
|
|
52
|
-
error:
|
|
53
|
-
required:
|
|
54
|
-
disabled:
|
|
55
|
-
labelPlacement:
|
|
56
|
-
size:
|
|
57
|
-
fullWidth:
|
|
58
|
-
type:
|
|
59
|
-
onChange:
|
|
60
|
-
onBlur:
|
|
61
|
-
onFocus:
|
|
62
|
-
components:
|
|
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:
|
|
67
|
-
FormControlLabel:
|
|
68
|
-
FormHelperText:
|
|
69
|
-
Switch:
|
|
70
|
-
Checkbox:
|
|
71
|
-
} =
|
|
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
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
},
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
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:
|
|
86
|
-
(
|
|
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
|
-
|
|
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:
|
|
108
|
+
components: G,
|
|
106
109
|
componentsProps: void 0
|
|
107
110
|
};
|
|
108
|
-
const
|
|
111
|
+
const Z = b;
|
|
109
112
|
export {
|
|
110
|
-
|
|
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<
|
|
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<
|
|
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<
|
|
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 { 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.
|
|
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.
|
|
43
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
44
|
-
"@mui/material": "^5.14.
|
|
45
|
-
"@vidispine/
|
|
46
|
-
"@vidispine/
|
|
47
|
-
"@vidispine/vdt-
|
|
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
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@vidispine/eslint-config-
|
|
64
|
-
"@vidispine/eslint-config-
|
|
65
|
-
"@vidispine/
|
|
66
|
-
"@vidispine/
|
|
67
|
-
"@vidispine/
|
|
68
|
-
"@
|
|
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.
|
|
71
|
+
"eslint": "8.55.0",
|
|
71
72
|
"hygen": "6.2.11",
|
|
72
|
-
"prettier": "
|
|
73
|
-
"rimraf": "
|
|
74
|
-
"
|
|
75
|
-
"vite
|
|
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": [
|