@vidispine/vdt-mui 23.3.0-pre.5 → 23.3.0

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 s=require("react/jsx-runtime"),q=require("@mui/material/CardHeader"),d=require("@mui/material/styles"),H=require("../../EntityAvatar/index.js"),T=require("../../../general/AvatarMenu/index.js"),o=require("../../_utils/getEntityText.js"),k=require("../../_utils/getEntityProp.js"),W=d.styled(q)(({avatar:t,action:r})=>{const i=t?56:0,n=r?40+16:0;return{display:"inline-block",padding:16,width:"inherit","& .MuiCardHeader-avatar":{float:"left"},"& .MuiCardHeader-content":{float:"left",width:`calc(100% - ${i}px - ${n}px)`},"& .MuiCardHeader-action":{marginTop:0,float:"right"},float:"none"}}),j=d.styled(H)(({theme:t})=>({backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.54)":"#fff"})),A=d.styled(T)(({theme:t})=>({marginLeft:16,"& .MuiAvatar-root":{color:t.palette.mode==="light"?"rgba(0, 0, 0, 0.54)":"#fff",backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.08)"}}})),g=({itemType:t,collectionType:r,title:i,subheader:n,menuOptions:a,onOptionClick:h,entityAvatar:y,avatarMenu:e,...u})=>{var c,l,p;const x=o.getEntityText(i,{itemType:t,collectionType:r}),f=o.getEntityText(n,{itemType:t,collectionType:r}),m=(l=(c=o.getEntityText("mimeType",{itemType:t}))==null?void 0:c.split("/"))==null?void 0:l[0],b=o.getEntityText("mediaType",{itemType:t})||m,C=(E,P)=>{h(E,{option:P,...k.getEntityProp({itemType:t,collectionType:r})})};return s.jsx(W,{title:x,subheader:f,titleTypographyProps:{noWrap:!0},subheaderTypographyProps:{noWrap:!0},avatar:s.jsx(j,{entityType:t&&"item"||r&&"collection"||"library",mediaType:b,...y??{}}),action:a&&s.jsx(A,{minWidth:"unset",options:a,onOptionClick:C,componentsProps:{menu:{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},...((p=e==null?void 0:e.componentsProps)==null?void 0:p.menu)||{}},...(e==null?void 0:e.componentsProps)||{}},...e??{}}),...u})};g.defaultProps={};const O=g;module.exports=O;
1
+ "use strict";const s=require("react/jsx-runtime"),q=require("@mui/material/CardHeader"),d=require("@mui/material/styles"),H=require("../../EntityAvatar/index.js"),k=require("../../../general/AvatarMenu/index.js"),o=require("../../_utils/getEntityText.js"),W=require("../../_utils/getEntityProp.js"),j=d.styled(q)(({avatar:t,action:r})=>{const i=t?56:0,n=r?40+16:0;return{display:"inline-block",padding:16,width:"inherit","& .MuiCardHeader-avatar":{float:"left"},"& .MuiCardHeader-content":{float:"left",width:`calc(100% - ${i}px - ${n}px)`},"& .MuiCardHeader-action":{marginTop:0,float:"right"},float:"none"}}),A=d.styled(H)(({theme:t})=>({backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.54)":"#fff"})),O=d.styled(k)(({theme:t})=>({marginLeft:16,"& .MuiAvatar-root":{color:t.palette.mode==="light"?"rgba(0, 0, 0, 0.54)":"#fff",backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.08)"}}})),y=({itemType:t,collectionType:r,title:i,subheader:n,menuOptions:a,onOptionClick:h,entityAvatar:u,avatarMenu:e,...f})=>{var l,p,g;const m=o.getEntityText(i,{itemType:t,collectionType:r}),x=o.getEntityText(n,{itemType:t,collectionType:r}),c=o.getEntityText("mimeType",{itemType:t}),b=(p=(l=typeof c=="string"?c:void 0)==null?void 0:l.split("/"))==null?void 0:p[0],C=o.getEntityText("mediaType",{itemType:t})||b,E=(P,T)=>{h(P,{option:T,...W.getEntityProp({itemType:t,collectionType:r})})};return s.jsx(j,{title:m,subheader:x,titleTypographyProps:{noWrap:!0},subheaderTypographyProps:{noWrap:!0},avatar:s.jsx(A,{entityType:t&&"item"||r&&"collection"||"library",mediaType:C,...u??{}}),action:a&&s.jsx(O,{minWidth:"unset",options:a,onOptionClick:E,componentsProps:{menu:{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},...((g=e==null?void 0:e.componentsProps)==null?void 0:g.menu)||{}},...(e==null?void 0:e.componentsProps)||{}},...e??{}}),...f})};y.defaultProps={};const S=y;module.exports=S;
@@ -1 +1 @@
1
- "use strict";const n=require("react/jsx-runtime"),k=require("react"),v=require("react-hook-form"),S=require("@mui/material/Box"),x=require("@mui/material/Button"),ot=require("@mui/material/ButtonGroup"),G=require("@mui/material/styles"),nt=G.styled(ot)(({theme:o})=>({marginTop:o.spacing(2),marginBottom:o.spacing(2),display:"flex",justifyContent:"center"})),ut=G.styled(S)(({theme:o})=>({"&:not(:first-of-type)":{paddingTop:o.spacing(2)}})),rt={Root:S,InputContainer:ut,Controller:v.Controller,ButtonGroup:nt,ClearButton:x,ResetButton:x,SubmitButton:x},M=({inputs:o,inputProps:T,formProps:E,formReturn:B,size:C,variant:F,clearText:D,resetText:I,submitText:w,onClear:l,onReset:c,onChange:d,onSubmit:f,onError:h,components:H,componentsProps:u})=>{const{Root:O,InputContainer:W,Controller:_,ButtonGroup:$,ClearButton:z,ResetButton:A,SubmitButton:J}=H,y=k.useRef(),b=({multiple:t,range:e})=>t||e?[]:null,K=o.reduce((t,{name:e,defaultValue:i,...s})=>({...t,[e]:i||b(s)}),{}),g=v.useForm({defaultValues:K,...E||{}});B&&B(g);const{handleSubmit:L,control:N,reset:j,watch:R,formState:a}=g,{defaultValues:q}=a,Q=Object.keys((a==null?void 0:a.errors)||{}).length>0,U=t=>{const e=o.reduce((i,{name:s,defaultValue:Z,...p})=>({...i,[s]:b(p)}),{});l&&l(t,e),j(e,{keepDefaultValues:!0})},X=t=>{c&&c(t,q),j(q,{keepDefaultValues:!0})};k.useEffect(()=>{const t=d?R(e=>d(y.current,e)):void 0;return()=>t==null?void 0:t.unsubscribe()},[d,R]);const Y=t=>typeof(t==null?void 0:t.required)=="string"||(t==null?void 0:t.required)===!0;return n.jsxs(O,{component:"form",onSubmit:L((t,e)=>typeof f=="function"&&f(e,t),(t,e)=>typeof h=="function"&&h(e,t)),...u.root,children:[o==null?void 0:o.map(({Component:t,name:e,rules:i,label:s,defaultValue:Z,...p})=>n.jsx(W,{...u.inputContainer,children:n.jsx(_,{control:N,name:e,rules:i,render:({field:{onChange:P,...tt},formState:{errors:m}})=>{var V;return n.jsx(t,{onChange:(et,r)=>{y.current=et,P((r==null?void 0:r.value)!==void 0?r==null?void 0:r.value:r)},error:(V=m==null?void 0:m[e])==null?void 0:V.message,size:C,variant:F,label:Y(i)?`${s} *`:s,...tt,...T||{},...p})},...u.controller})},e)),n.jsxs($,{variant:"text",size:C,fullWidth:!0,...u.buttonGroup,children:[l&&n.jsx(z,{onClick:U,...u.clearButton,children:D}),c&&n.jsx(A,{onClick:X,...u.resetButton,children:I}),f&&n.jsx(J,{type:"submit",disabled:Q,...u.submitButton,children:w})]})]})};M.defaultProps={inputs:[],inputProps:void 0,formProps:void 0,formReturn:void 0,variant:"standard",size:"medium",clearText:"Clear",resetText:"Reset",submitText:"Submit",onClear:void 0,onReset:void 0,onChange:void 0,onSubmit:void 0,onError:void 0,components:rt,componentsProps:void 0};const it=M;module.exports=it;
1
+ "use strict";const n=require("react/jsx-runtime"),k=require("react"),v=require("react-hook-form"),S=require("@mui/material/Box"),x=require("@mui/material/Button"),ot=require("@mui/material/ButtonGroup"),G=require("@mui/material/styles"),nt=G.styled(ot)(({theme:o})=>({marginTop:o.spacing(2),marginBottom:o.spacing(2),display:"flex",justifyContent:"center"})),ut=G.styled(S)(({theme:o})=>({"&:not(:first-of-type)":{paddingTop:o.spacing(2)}})),rt={Root:S,InputContainer:ut,Controller:v.Controller,ButtonGroup:nt,ClearButton:x,ResetButton:x,SubmitButton:x},M=({inputs:o,inputProps:T,formProps:E,formReturnRef:B,size:C,variant:F,clearText:D,resetText:I,submitText:w,onClear:c,onReset:l,onChange:d,onSubmit:f,onError:h,components:H,componentsProps:u})=>{const{Root:O,InputContainer:W,Controller:_,ButtonGroup:$,ClearButton:z,ResetButton:A,SubmitButton:J}=H,y=k.useRef(),b=({multiple:t,range:e})=>t||e?[]:null,K=o.reduce((t,{name:e,defaultValue:i,...s})=>({...t,[e]:i||b(s)}),{}),g=v.useForm({defaultValues:K,...E||{}});B&&(B.current=g);const{handleSubmit:L,control:N,reset:j,watch:q,formState:a}=g,{defaultValues:R}=a,Q=Object.keys((a==null?void 0:a.errors)||{}).length>0,U=t=>{const e=o.reduce((i,{name:s,defaultValue:Z,...p})=>({...i,[s]:b(p)}),{});c&&c(t,e),j(e,{keepDefaultValues:!0})},X=t=>{l&&l(t,R),j(R,{keepDefaultValues:!0})};k.useEffect(()=>{const t=d?q(e=>d(y.current,e)):void 0;return()=>t==null?void 0:t.unsubscribe()},[d,q]);const Y=t=>typeof(t==null?void 0:t.required)=="string"||(t==null?void 0:t.required)===!0;return n.jsxs(O,{component:"form",onSubmit:L((t,e)=>typeof f=="function"&&f(e,t),(t,e)=>typeof h=="function"&&h(e,t)),...u.root,children:[o==null?void 0:o.map(({Component:t,name:e,rules:i,label:s,defaultValue:Z,...p})=>n.jsx(W,{...u.inputContainer,children:n.jsx(_,{control:N,name:e,rules:i,render:({field:{onChange:P,...tt},formState:{errors:m}})=>{var V;return n.jsx(t,{onChange:(et,r)=>{y.current=et,P((r==null?void 0:r.value)!==void 0?r==null?void 0:r.value:r)},error:(V=m==null?void 0:m[e])==null?void 0:V.message,size:C,variant:F,label:Y(i)?`${s} *`:s,...tt,...T||{},...p})},...u.controller})},e)),n.jsxs($,{variant:"text",size:C,fullWidth:!0,...u.buttonGroup,children:[c&&n.jsx(z,{onClick:U,...u.clearButton,children:D}),l&&n.jsx(A,{onClick:X,...u.resetButton,children:I}),f&&n.jsx(J,{type:"submit",disabled:Q,...u.submitButton,children:w})]})]})};M.defaultProps={inputs:[],inputProps:void 0,formProps:void 0,formReturn:void 0,variant:"standard",size:"medium",clearText:"Clear",resetText:"Reset",submitText:"Submit",onClear:void 0,onReset:void 0,onChange:void 0,onSubmit:void 0,onError:void 0,components:rt,componentsProps:void 0};const it=M;module.exports=it;
@@ -19,3 +19,4 @@ export type ComponentsProps<TComponents> = {
19
19
  [Key in Extract<keyof TComponents, string> as Uncapitalize<Key>]?: Partial<PropsFrom<TComponents[Key]>>;
20
20
  };
21
21
  export type StyledComponent<TComponent extends (props?: any) => any, TAdditionalProps extends any = unknown> = (props?: Partial<PropsFrom<TComponent>> & TAdditionalProps) => ReturnType<TComponent>;
22
+ export type ArrayElement<ArrayType> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
@@ -1,8 +1,7 @@
1
- import { ComponentType, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
2
1
  interface OverridesProps {
3
2
  className: string;
4
3
  components: any;
5
4
  componentsProps: any;
6
5
  }
7
- export declare const withOverrides: (name: string) => <P extends Partial<OverridesProps> = {}>(Component: ComponentType<P>) => ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<any>>;
6
+ export declare const withOverrides: (name: string) => <P extends Partial<OverridesProps> = {}>(Component: import("react").ComponentType<P>) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P> & import("react").RefAttributes<any>>;
8
7
  export {};
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { CardHeaderProps as MuiCardHeaderProps } from '@mui/material';
3
3
  import type { CollectionType, ItemType } from '@vidispine/types';
4
+ import { ArrayElement } from '../../../_types';
4
5
  import { EntityAvatarProps } from '../../EntityAvatar/EntityAvatar';
5
6
  import type { AvatarMenuProps } from '../../../general/AvatarMenu/AvatarMenu';
6
7
  export interface EntityCardHeaderProps extends Omit<MuiCardHeaderProps, 'itemType' | 'title' | 'subheader'> {
@@ -16,7 +17,7 @@ export interface EntityCardHeaderProps extends Omit<MuiCardHeaderProps, 'itemTyp
16
17
  }) => string);
17
18
  menuOptions?: AvatarMenuProps['options'];
18
19
  onOptionClick?: (event: React.MouseEvent<HTMLLIElement, MouseEvent>, payload: {
19
- option: AvatarMenuProps['options'][number];
20
+ option: ArrayElement<AvatarMenuProps['options']>;
20
21
  } & ({
21
22
  itemType?: ItemType;
22
23
  } | {
@@ -1,11 +1,11 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import k from "@mui/material/CardHeader";
2
+ import A from "@mui/material/CardHeader";
3
3
  import { styled as d } from "@mui/material/styles";
4
- import A from "../../EntityAvatar/index.js";
5
- import E from "../../../general/AvatarMenu/index.js";
4
+ import E from "../../EntityAvatar/index.js";
5
+ import W from "../../../general/AvatarMenu/index.js";
6
6
  import { getEntityText as i } from "../../_utils/getEntityText.js";
7
- import { getEntityProp as W } from "../../_utils/getEntityProp.js";
8
- const O = d(k)(({
7
+ import { getEntityProp as T } from "../../_utils/getEntityProp.js";
8
+ const O = d(A)(({
9
9
  avatar: t,
10
10
  action: r
11
11
  }) => {
@@ -27,11 +27,11 @@ const O = d(k)(({
27
27
  },
28
28
  float: "none"
29
29
  };
30
- }), S = d(A)(({
30
+ }), S = d(E)(({
31
31
  theme: t
32
32
  }) => ({
33
33
  backgroundColor: t.palette.mode === "light" ? "rgba(0, 0, 0, 0.54)" : "#fff"
34
- })), T = d(E)(({
34
+ })), v = d(W)(({
35
35
  theme: t
36
36
  }) => ({
37
37
  marginLeft: 16,
@@ -42,42 +42,42 @@ const O = d(k)(({
42
42
  backgroundColor: "rgba(255, 255, 255, 0.08)"
43
43
  }
44
44
  }
45
- })), m = ({
45
+ })), f = ({
46
46
  itemType: t,
47
47
  collectionType: r,
48
48
  title: e,
49
49
  subheader: n,
50
50
  menuOptions: p,
51
- onOptionClick: f,
51
+ onOptionClick: g,
52
52
  entityAvatar: h,
53
53
  avatarMenu: o,
54
- ...g
54
+ ...y
55
55
  }) => {
56
- var l, s, c;
57
- const y = i(e, {
56
+ var l, m, c;
57
+ const b = i(e, {
58
58
  itemType: t,
59
59
  collectionType: r
60
- }), b = i(n, {
60
+ }), C = i(n, {
61
61
  itemType: t,
62
62
  collectionType: r
63
- }), C = (s = (l = i("mimeType", {
63
+ }), s = i("mimeType", {
64
64
  itemType: t
65
- })) == null ? void 0 : l.split("/")) == null ? void 0 : s[0], u = i("mediaType", {
65
+ }), u = (m = (l = typeof s == "string" ? s : void 0) == null ? void 0 : l.split("/")) == null ? void 0 : m[0], x = i("mediaType", {
66
66
  itemType: t
67
- }) || C, x = (H, P) => {
68
- f(H, {
69
- option: P,
70
- ...W({
67
+ }) || u, H = (P, k) => {
68
+ g(P, {
69
+ option: k,
70
+ ...T({
71
71
  itemType: t,
72
72
  collectionType: r
73
73
  })
74
74
  });
75
75
  };
76
- return /* @__PURE__ */ a(O, { title: y, subheader: b, titleTypographyProps: {
76
+ return /* @__PURE__ */ a(O, { title: b, subheader: C, titleTypographyProps: {
77
77
  noWrap: !0
78
78
  }, subheaderTypographyProps: {
79
79
  noWrap: !0
80
- }, avatar: /* @__PURE__ */ a(S, { entityType: t && "item" || r && "collection" || "library", mediaType: u, ...h ?? {} }), action: p && /* @__PURE__ */ a(T, { minWidth: "unset", options: p, onOptionClick: x, componentsProps: {
80
+ }, avatar: /* @__PURE__ */ a(S, { entityType: t && "item" || r && "collection" || "library", mediaType: x, ...h ?? {} }), action: p && /* @__PURE__ */ a(v, { minWidth: "unset", options: p, onOptionClick: H, componentsProps: {
81
81
  menu: {
82
82
  anchorOrigin: {
83
83
  vertical: "bottom",
@@ -90,10 +90,10 @@ const O = d(k)(({
90
90
  ...((c = o == null ? void 0 : o.componentsProps) == null ? void 0 : c.menu) || {}
91
91
  },
92
92
  ...(o == null ? void 0 : o.componentsProps) || {}
93
- }, ...o ?? {} }), ...g });
93
+ }, ...o ?? {} }), ...y });
94
94
  };
95
- m.defaultProps = {};
96
- const q = m;
95
+ f.defaultProps = {};
96
+ const B = f;
97
97
  export {
98
- q as default
98
+ B as default
99
99
  };
@@ -1,2 +1,3 @@
1
- declare const StyledComponent: any;
1
+ import Component from './EventList';
2
+ declare const StyledComponent: typeof Component;
2
3
  export default StyledComponent;
@@ -1,2 +1,3 @@
1
- declare const StyledComponent: any;
1
+ import Component from './EventListItem';
2
+ declare const StyledComponent: typeof Component;
2
3
  export default StyledComponent;
@@ -1,4 +1,3 @@
1
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
1
  /// <reference types="react" />
3
2
  import { Dayjs } from 'dayjs';
4
3
  import { PickersDayProps } from '@mui/x-date-pickers';
@@ -11,5 +10,5 @@ export interface VdtPickersDayProps extends CustomPickerDayProps {
11
10
  } | string | number;
12
11
  locale?: string;
13
12
  }
14
- declare const VdtPickersDay: ForwardRefExoticComponent<Pick<VdtPickersDayProps, keyof VdtPickersDayProps> & RefAttributes<any>>;
13
+ declare const VdtPickersDay: import("react").ForwardRefExoticComponent<Pick<VdtPickersDayProps, keyof VdtPickersDayProps> & import("react").RefAttributes<any>>;
15
14
  export default VdtPickersDay;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { Controller as ReactHookFormController, FieldErrorsImpl, UseFormReturn } from 'react-hook-form';
2
+ import { Controller as ReactHookFormController, FieldErrorsImpl, UseFormReturn } from '../../../../../node_modules/react-hook-form/dist/index.d.ts';
3
3
  import { Box as MuiBox, Button as MuiButton, ButtonGroup as MuiButtonGroup } from '@mui/material';
4
4
  import type { WithOverrideProps } from '../../_types';
5
- import type { UseControllerProps, UseFormProps } from 'react-hook-form';
5
+ import type { UseControllerProps, UseFormProps } from '../../../../../node_modules/react-hook-form/dist/index.d.ts';
6
6
  declare const StyledMuiButtonGroup: typeof MuiButtonGroup;
7
7
  declare const StyledMuiBoxInputContainer: typeof MuiBox;
8
8
  declare const defaultComponents: {
@@ -78,11 +78,9 @@ export interface FormProps extends WithOverrideProps<typeof defaultComponents> {
78
78
  */
79
79
  formProps?: UseFormProps;
80
80
  /**
81
- * Retrieve what's returned from useForm as function props
82
- *
83
- * _e.g. store in a "ref" to interact with the form_
81
+ * Store what's returned from useForm in a ref
84
82
  */
85
- formReturn?: (props: UseFormReturn) => void;
83
+ formReturnRef?: React.MutableRefObject<UseFormReturn>;
86
84
  /**
87
85
  * Set variant of filter inputs
88
86
  */
@@ -1,11 +1,11 @@
1
1
  import { jsxs as k, jsx as a } from "react/jsx-runtime";
2
2
  import { useRef as et, useEffect as ot } from "react";
3
- import { useForm as nt, Controller as ut } from "react-hook-form";
3
+ import { useForm as nt, Controller as rt } from "react-hook-form";
4
4
  import G from "@mui/material/Box";
5
5
  import B from "@mui/material/Button";
6
- import rt from "@mui/material/ButtonGroup";
6
+ import ut from "@mui/material/ButtonGroup";
7
7
  import { styled as M } from "@mui/material/styles";
8
- const it = M(rt)(({
8
+ const it = M(ut)(({
9
9
  theme: o
10
10
  }) => ({
11
11
  marginTop: o.spacing(2),
@@ -21,7 +21,7 @@ const it = M(rt)(({
21
21
  })), lt = {
22
22
  Root: G,
23
23
  InputContainer: at,
24
- Controller: ut,
24
+ Controller: rt,
25
25
  ButtonGroup: it,
26
26
  ClearButton: B,
27
27
  ResetButton: B,
@@ -30,7 +30,7 @@ const it = M(rt)(({
30
30
  inputs: o,
31
31
  inputProps: j,
32
32
  formProps: E,
33
- formReturn: C,
33
+ formReturnRef: C,
34
34
  size: h,
35
35
  variant: q,
36
36
  clearText: D,
@@ -57,16 +57,16 @@ const it = M(rt)(({
57
57
  range: e
58
58
  }) => t || e ? [] : null, J = o.reduce((t, {
59
59
  name: e,
60
- defaultValue: r,
60
+ defaultValue: u,
61
61
  ...i
62
62
  }) => ({
63
63
  ...t,
64
- [e]: r || g(i)
64
+ [e]: u || g(i)
65
65
  }), {}), x = nt({
66
66
  defaultValues: J,
67
67
  ...E || {}
68
68
  });
69
- C && C(x);
69
+ C && (C.current = x);
70
70
  const {
71
71
  handleSubmit: K,
72
72
  control: L,
@@ -76,12 +76,12 @@ const it = M(rt)(({
76
76
  } = x, {
77
77
  defaultValues: v
78
78
  } = l, N = Object.keys((l == null ? void 0 : l.errors) || {}).length > 0, Q = (t) => {
79
- const e = o.reduce((r, {
79
+ const e = o.reduce((u, {
80
80
  name: i,
81
81
  defaultValue: Y,
82
82
  ...m
83
83
  }) => ({
84
- ...r,
84
+ ...u,
85
85
  [i]: g(m)
86
86
  }), {});
87
87
  d && d(t, e), R(e, {
@@ -101,11 +101,11 @@ const it = M(rt)(({
101
101
  o == null ? void 0 : o.map(({
102
102
  Component: t,
103
103
  name: e,
104
- rules: r,
104
+ rules: u,
105
105
  label: i,
106
106
  defaultValue: Y,
107
107
  ...m
108
- }) => /* @__PURE__ */ a(W, { ...n.inputContainer, children: /* @__PURE__ */ a(_, { control: L, name: e, rules: r, render: ({
108
+ }) => /* @__PURE__ */ a(W, { ...n.inputContainer, children: /* @__PURE__ */ a(_, { control: L, name: e, rules: u, render: ({
109
109
  field: {
110
110
  onChange: Z,
111
111
  ...P
@@ -115,9 +115,9 @@ const it = M(rt)(({
115
115
  }
116
116
  }) => {
117
117
  var S;
118
- return /* @__PURE__ */ a(t, { onChange: (tt, u) => {
119
- b.current = tt, Z((u == null ? void 0 : u.value) !== void 0 ? u == null ? void 0 : u.value : u);
120
- }, error: (S = p == null ? void 0 : p[e]) == null ? void 0 : S.message, size: h, variant: q, label: X(r) ? `${i} *` : i, ...P, ...j || {}, ...m });
118
+ return /* @__PURE__ */ a(t, { onChange: (tt, r) => {
119
+ b.current = tt, Z((r == null ? void 0 : r.value) !== void 0 ? r == null ? void 0 : r.value : r);
120
+ }, error: (S = p == null ? void 0 : p[e]) == null ? void 0 : S.message, size: h, variant: q, label: X(u) ? `${i} *` : i, ...P, ...j || {}, ...m });
121
121
  }, ...n.controller }) }, e)),
122
122
  /* @__PURE__ */ k($, { variant: "text", size: h, fullWidth: !0, ...n.buttonGroup, children: [
123
123
  d && /* @__PURE__ */ a(z, { onClick: Q, ...n.clearButton, children: D }),
@@ -1,16 +1,19 @@
1
1
  /// <reference types="react" />
2
+ import { Audiotrack as MuiAudioTrackIcon, Image as MuiImageIcon, InsertDriveFile as MuiInsertDriveFileIcon, Movie as MuiMovieIcon, NoteAdd as MuiNoteAddIcon, Article as MuiArticleIcon, DataThresholding as MuiDataThresholdingIcon, PictureAsPdf as MuiPictureAsPdfIcon, QuestionMark as MuiQuestionMarkIcon } from '@mui/icons-material';
3
+ import { Box as MuiBox } from '@mui/material';
2
4
  import type { WithOverrideProps } from '../../_types';
5
+ declare const StyledMuiBox: typeof MuiBox;
3
6
  declare const defaultComponents: {
4
- Root: any;
5
- PlaceholderIcon: any;
6
- AudioIcon: any;
7
- ImageIcon: any;
8
- VideoIcon: any;
9
- DocumentIcon: any;
10
- DataIcon: any;
11
- PdfIcon: any;
12
- NoneIcon: any;
13
- FileIcon: any;
7
+ Root: typeof StyledMuiBox;
8
+ PlaceholderIcon: typeof MuiNoteAddIcon;
9
+ AudioIcon: typeof MuiAudioTrackIcon;
10
+ ImageIcon: typeof MuiImageIcon;
11
+ VideoIcon: typeof MuiMovieIcon;
12
+ DocumentIcon: typeof MuiArticleIcon;
13
+ DataIcon: typeof MuiDataThresholdingIcon;
14
+ PdfIcon: typeof MuiPictureAsPdfIcon;
15
+ NoneIcon: typeof MuiQuestionMarkIcon;
16
+ FileIcon: typeof MuiInsertDriveFileIcon;
14
17
  };
15
18
  export interface MediaIconProps extends WithOverrideProps<typeof defaultComponents> {
16
19
  /**
@@ -1,5 +1,3 @@
1
- import { SortMenuItemProps } from './components/MenuItem';
2
- import { FC } from 'react';
3
1
  /// <reference types="react" />
4
2
  import VdtButtonBase from './components/ButtonBase';
5
3
  import type { StyledComponent, WithOverrideProps } from '../../_types';
@@ -13,7 +11,7 @@ type StyledVdtButtonBaseType = StyledComponent<typeof VdtButtonBase, {
13
11
  declare const defaultComponents: {
14
12
  Root: any;
15
13
  Menu: any;
16
- MenuItem: FC<SortMenuItemProps>;
14
+ MenuItem: import("react").FC<import("./components/MenuItem").SortMenuItemProps>;
17
15
  ButtonBase: StyledVdtButtonBaseType;
18
16
  };
19
17
  export interface SortProps extends WithOverrideProps<typeof defaultComponents> {
@@ -1,4 +1,3 @@
1
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
1
  /// <reference types="react" />
3
2
  import type { FormGroupProps as MuiFormGroupProps, FormControlLabelProps as MuiFormControlLabelProps, CheckboxProps as MuiCheckboxProps } from '@mui/material';
4
3
  export interface CheckboxGroupProps extends Omit<MuiFormGroupProps, 'onChange'> {
@@ -38,5 +37,5 @@ export interface CheckboxGroupProps extends Omit<MuiFormGroupProps, 'onChange'>
38
37
  rows: boolean;
39
38
  type: string;
40
39
  }
41
- declare const CheckboxGroup: ForwardRefExoticComponent<Pick<CheckboxGroupProps, keyof CheckboxGroupProps> & RefAttributes<unknown>>;
40
+ declare const CheckboxGroup: import("react").ForwardRefExoticComponent<Pick<CheckboxGroupProps, keyof CheckboxGroupProps> & import("react").RefAttributes<unknown>>;
42
41
  export default CheckboxGroup;
@@ -1,4 +1,3 @@
1
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
1
  /// <reference types="react" />
3
2
  import { IMaskInput } from 'react-imask';
4
3
  import { PropsFrom } from '../../../_types';
@@ -9,8 +8,8 @@ export type MaskedInputProps = PropsFrom<typeof IMaskInput> & {
9
8
  definitions?: IMaskDefinitions;
10
9
  lazy?: IMaskLazy;
11
10
  };
12
- declare const MaskedInput: ForwardRefExoticComponent<{
11
+ declare const MaskedInput: import("react").ForwardRefExoticComponent<{
13
12
  definitions?: any;
14
13
  lazy?: any;
15
- } & RefAttributes<unknown>>;
14
+ } & import("react").RefAttributes<unknown>>;
16
15
  export default MaskedInput;
@@ -1,4 +1,3 @@
1
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
1
  /// <reference types="react" />
3
2
  import type { RadioGroupProps as MuiRadioGroupProps, FormControlLabelProps as MuiFormControlLabelProps, RadioProps as MuiRadioProps } from '@mui/material';
4
3
  export interface RadioGroupProps extends Omit<MuiRadioGroupProps, 'onChange'> {
@@ -38,5 +37,5 @@ export interface RadioGroupProps extends Omit<MuiRadioGroupProps, 'onChange'> {
38
37
  rows: boolean;
39
38
  type: string;
40
39
  }
41
- declare const RadioGroup: ForwardRefExoticComponent<Pick<RadioGroupProps, keyof RadioGroupProps> & RefAttributes<unknown>>;
40
+ declare const RadioGroup: import("react").ForwardRefExoticComponent<Pick<RadioGroupProps, keyof RadioGroupProps> & import("react").RefAttributes<unknown>>;
42
41
  export default RadioGroup;
@@ -1,4 +1,3 @@
1
- import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
1
  /// <reference types="react" />
3
2
  import type { SliderProps as MuiSliderProps } from '@mui/material';
4
3
  export interface SliderProps extends Omit<MuiSliderProps, 'onChange'> {
@@ -26,5 +25,5 @@ export interface SliderProps extends Omit<MuiSliderProps, 'onChange'> {
26
25
  rows?: boolean;
27
26
  type?: string;
28
27
  }
29
- declare const Slider: ForwardRefExoticComponent<Pick<SliderProps, keyof SliderProps> & RefAttributes<HTMLSpanElement>>;
28
+ declare const Slider: import("react").ForwardRefExoticComponent<Pick<SliderProps, keyof SliderProps> & import("react").RefAttributes<HTMLSpanElement>>;
30
29
  export default Slider;
@@ -1,2 +1,3 @@
1
- declare const StyledComponent: any;
1
+ import Component from './MetadataGroupTreeView';
2
+ declare const StyledComponent: typeof Component;
2
3
  export default StyledComponent;
@@ -1,4 +1,3 @@
1
- import { FC, SyntheticEvent } from 'react';
2
1
  import type { FacetType, MetadataFieldType } from '@vidispine/types';
3
2
  declare const useSearchFilterFormInputs: ({ fieldList, facetList, includeFacetsAsOptions, dataToPropsMap, errorMessages, inputsProps, }: {
4
3
  fieldList?: MetadataFieldType[];
@@ -12,7 +11,7 @@ declare const useSearchFilterFormInputs: ({ fieldList, facetList, includeFacetsA
12
11
  };
13
12
  inputsProps?: object;
14
13
  }) => ({
15
- Component: FC<{
14
+ Component: import("react").FC<{
16
15
  name?: string;
17
16
  label?: string;
18
17
  value?: any;
@@ -21,15 +20,15 @@ declare const useSearchFilterFormInputs: ({ fieldList, facetList, includeFacetsA
21
20
  helperText?: string;
22
21
  required?: boolean;
23
22
  disabled?: boolean;
24
- onChange?: (event: SyntheticEvent<Element, Event>, payload: {
23
+ onChange?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
25
24
  [key: string]: any;
26
25
  value: any;
27
26
  }) => void;
28
- onBlur?: (event: SyntheticEvent<Element, Event>, payload: {
27
+ onBlur?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
29
28
  [key: string]: any;
30
29
  value: any;
31
30
  }) => void;
32
- onFocus?: (event: SyntheticEvent<Element, Event>, payload: {
31
+ onFocus?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
33
32
  [key: string]: any;
34
33
  value: any;
35
34
  }) => void;
@@ -48,7 +47,7 @@ declare const useSearchFilterFormInputs: ({ fieldList, facetList, includeFacetsA
48
47
  locale?: string;
49
48
  justifyContent?: string;
50
49
  submitOnChange?: boolean;
51
- onSubmit?: (event: SyntheticEvent<Element, Event>, payload: {
50
+ onSubmit?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
52
51
  [key: string]: any;
53
52
  value: any;
54
53
  }) => void;
@@ -63,15 +62,15 @@ declare const useSearchFilterFormInputs: ({ fieldList, facetList, includeFacetsA
63
62
  helperText?: string;
64
63
  required?: boolean;
65
64
  disabled?: boolean;
66
- onChange?: (event: SyntheticEvent<Element, Event>, payload: {
65
+ onChange?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
67
66
  [key: string]: any;
68
67
  value: any;
69
68
  }) => void;
70
- onBlur?: (event: SyntheticEvent<Element, Event>, payload: {
69
+ onBlur?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
71
70
  [key: string]: any;
72
71
  value: any;
73
72
  }) => void;
74
- onFocus?: (event: SyntheticEvent<Element, Event>, payload: {
73
+ onFocus?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
75
74
  [key: string]: any;
76
75
  value: any;
77
76
  }) => void;
@@ -90,7 +89,7 @@ declare const useSearchFilterFormInputs: ({ fieldList, facetList, includeFacetsA
90
89
  locale?: string;
91
90
  justifyContent?: string;
92
91
  submitOnChange?: boolean;
93
- onSubmit?: (event: SyntheticEvent<Element, Event>, payload: {
92
+ onSubmit?: (event: import("react").SyntheticEvent<Element, Event>, payload: {
94
93
  [key: string]: any;
95
94
  value: any;
96
95
  }) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-mui",
3
- "version": "23.3.0-pre.5",
3
+ "version": "23.3.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -39,18 +39,18 @@
39
39
  "new:component": "hygen new component"
40
40
  },
41
41
  "dependencies": {
42
- "@mui/icons-material": "^5.11.9",
42
+ "@mui/icons-material": "^5.14.8",
43
43
  "@mui/lab": "^5.0.0-alpha.120",
44
- "@mui/material": "^5.11.10",
45
- "@vidispine/proptypes": "23.3.0-pre.5",
46
- "@vidispine/types": "23.3.0-pre.5",
47
- "@vidispine/vdt-api": "23.3.0-pre.5",
48
- "@vidispine/vdt-js": "23.3.0-pre.5",
44
+ "@mui/material": "^5.14.8",
45
+ "@vidispine/proptypes": "23.3.0",
46
+ "@vidispine/types": "23.3.0",
47
+ "@vidispine/vdt-api": "23.3.0",
48
+ "@vidispine/vdt-js": "23.3.0",
49
49
  "clsx": "^1.2.1"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@mui/x-date-pickers": "^5.0.0",
53
- "@tanstack/react-virtual": "*",
53
+ "@tanstack/react-virtual": "3.0.0-beta.30",
54
54
  "dayjs": "^1.0.0",
55
55
  "react": "^17.0.0",
56
56
  "react-dom": "^17.0.0",
@@ -58,21 +58,21 @@
58
58
  "react-imask": "^6.4.3"
59
59
  },
60
60
  "devDependencies": {
61
- "@vidispine/eslint-config-mdx": "23.3.0-pre.5",
62
- "@vidispine/eslint-config-react": "23.3.0-pre.5",
63
- "@vidispine/eslint-config-storybook": "23.3.0-pre.5",
64
- "@vidispine/eslint-config-typescript": "23.3.0-pre.5",
65
- "@vidispine/prettier-config": "23.3.0-pre.5",
66
- "@vidispine/proptypes": "23.3.0-pre.5",
67
- "@vidispine/tests": "23.3.0-pre.5",
61
+ "@vidispine/eslint-config-mdx": "23.3.0",
62
+ "@vidispine/eslint-config-react": "23.3.0",
63
+ "@vidispine/eslint-config-storybook": "23.3.0",
64
+ "@vidispine/eslint-config-typescript": "23.3.0",
65
+ "@vidispine/prettier-config": "23.3.0",
66
+ "@vidispine/proptypes": "23.3.0",
67
+ "@vidispine/tests": "23.3.0",
68
68
  "@vitejs/plugin-react": "3.1.0",
69
69
  "babel-plugin-transform-import": "1.5.4",
70
- "eslint": "8.34.0",
70
+ "eslint": "8.48.0",
71
71
  "hygen": "6.2.11",
72
- "prettier": "2.8.4",
72
+ "prettier": "2.8.8",
73
73
  "rimraf": "3.0.2",
74
- "vite": "4.3.9",
75
- "vite-plugin-dts": "3.0.2"
74
+ "vite": "4.4.9",
75
+ "vite-plugin-dts": "3.5.3"
76
76
  },
77
77
  "eslintConfig": {
78
78
  "extends": [