@vidispine/vdt-materialui 26.2.0-pre.3 → 26.2.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";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),u=require("react"),W=require("clsx"),e=require("prop-types"),d=require("@vidispine/vdt-react"),$=require("../../search/Pagination.js"),D=require("../../search/SearchInput/index.js"),E=require("../CollectionTable/index.js");function V({PaginationComponent:n=$.default,...s}){const{collectionListType:{hits:a=0}}=s;return o.jsx(n,{count:a,...s})}function z(n){const{isLoading:s}=n;return o.jsx(D.default,{submitting:s,...n})}const A=()=>({root:{}});function l({className:n,classes:s,onChange:a,onCheck:h,CollectionTableComponent:P,CollectionTableProps:p,searchProps:b,idLabelText:f,titleLabelText:g,ownerLabelText:x,searchPlaceholder:C,SearchInputProps:m,PaginationProps:S,SearchCollectionProps:T}){const j=d.useSearch({queryParams:{field:["collectionId","title","__user"],content:"metadata"}}),{state:y,setSearchText:q,onChangeRowsPerPage:v,onChangePage:k}=b||j,{matrixParams:L,queryParams:O,itemSearchDocument:w,page:R,rowsPerPage:_}=y,[c,i]=u.useState([]),I=t=>{c.includes(t)?i(r=>r.filter(M=>M!==t)):i(r=>[...r,t])};u.useEffect(()=>a&&a(c),[c]);const N=({id:t})=>I(t);return o.jsx("div",{className:W(s.root,"VdtCollectionSearchPicker",n),children:o.jsxs(d.SearchCollection,{itemSearchDocument:w,matrixParams:L,queryParams:O,...T,children:[o.jsx(z,{onSubmit:t=>q(`*${t}*`),searchPlaceholder:C,...m}),o.jsx(P,{onRowClick:N,onCheck:h,selected:c,options:[{label:g,value:"title"},{label:f,value:"collectionId"},{label:x,value:"__user"}],...p}),o.jsx(V,{onChangePage:k,onChangeRowsPerPage:v,page:R,rowsPerPage:_,...S})]})})}l.propTypes={classes:e.objectOf(e.string),className:e.string,onChange:e.func,onCheck:e.func,CollectionTableComponent:e.elementType,CollectionTableProps:e.objectOf(e.any),searchProps:e.objectOf(e.any),idLabelText:e.string,titleLabelText:e.string,ownerLabelText:e.string,searchPlaceholder:e.string,SearchInputProps:e.objectOf(e.any),PaginationProps:e.objectOf(e.any),SearchCollectionProps:e.objectOf(e.any)};l.defaultProps={className:void 0,classes:{},onChange:void 0,onCheck:()=>{},CollectionTableComponent:E.default,CollectionTableProps:{},searchProps:void 0,idLabelText:"Id",titleLabelText:"Title",ownerLabelText:"Owner",searchPlaceholder:"Search collections",SearchInputProps:{},PaginationProps:{},SearchCollectionProps:{}};exports.default=l;exports.styles=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),d=require("react"),$=require("clsx"),e=require("prop-types"),h=require("@vidispine/vdt-react"),D=require("../../search/Pagination.js"),E=require("../../search/SearchInput/index.js"),V=require("../CollectionTable/index.js");function z({PaginationComponent:n=D.default,...a}){const{collectionListType:{hits:s=0}}=a;return o.jsx(n,{count:s,...a})}function A(n){const{isLoading:a}=n;return o.jsx(E.default,{submitting:a,...n})}const B=()=>({root:{}});function l({className:n,classes:a,onChange:s,onCheck:P,CollectionTableComponent:p,CollectionTableProps:b,searchProps:f,idLabelText:g,titleLabelText:x,ownerLabelText:C,searchPlaceholder:S,SearchInputProps:m,PaginationProps:T,SearchCollectionProps:j,enableSearch2:i}){const y=h.useSearch({queryParams:{field:["collectionId","title","__user"],content:"metadata"}},i),{state:q,setSearchText:v,onChangeRowsPerPage:k,onChangePage:L}=f||y,{matrixParams:O,queryParams:w,itemSearchDocument:R,page:_,rowsPerPage:I}=q,[c,u]=d.useState([]),N=t=>{c.includes(t)?u(r=>r.filter(W=>W!==t)):u(r=>[...r,t])};d.useEffect(()=>s&&s(c),[c]);const M=({id:t})=>N(t);return o.jsx("div",{className:$(a.root,"VdtCollectionSearchPicker",n),children:o.jsxs(h.SearchCollection,{itemSearchDocument:R,matrixParams:O,queryParams:w,enableSearch2:i,...j,children:[o.jsx(A,{onSubmit:t=>v(`*${t}*`),searchPlaceholder:S,...m}),o.jsx(p,{onRowClick:M,onCheck:P,selected:c,options:[{label:x,value:"title"},{label:g,value:"collectionId"},{label:C,value:"__user"}],...b}),o.jsx(z,{onChangePage:L,onChangeRowsPerPage:k,page:_,rowsPerPage:I,...T})]})})}l.propTypes={classes:e.objectOf(e.string),className:e.string,onChange:e.func,onCheck:e.func,CollectionTableComponent:e.elementType,CollectionTableProps:e.objectOf(e.any),searchProps:e.objectOf(e.any),idLabelText:e.string,titleLabelText:e.string,ownerLabelText:e.string,searchPlaceholder:e.string,SearchInputProps:e.objectOf(e.any),PaginationProps:e.objectOf(e.any),SearchCollectionProps:e.objectOf(e.any),enableSearch2:e.bool};l.defaultProps={className:void 0,classes:{},onChange:void 0,onCheck:()=>{},CollectionTableComponent:V.default,CollectionTableProps:{},searchProps:void 0,idLabelText:"Id",titleLabelText:"Title",ownerLabelText:"Owner",searchPlaceholder:"Search collections",SearchInputProps:{},PaginationProps:{},SearchCollectionProps:{},enableSearch2:!1};exports.default=l;exports.styles=B;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),d=require("react"),p=require("@material-ui/core"),E=require("@material-ui/lab"),P=require("@vidispine/vdt-api"),u={GROUP:"group",USER:"user"},D={ALL:"ALL",WRITE:"WRITE",READ:"READ",NONE:"NONE"},H=e=>({root:{},recipientRoot:{display:"flex",width:"100%"},recipientType:{flexGrow:1},actions:{display:"flex",alignItems:"center",padding:e.spacing(2),justifyContent:"flex-end",flex:"0 0 auto","& > :not(:first-child)":{marginLeft:e.spacing(2)}},actionsSubmit:{}}),M=(e,n)=>{switch(n.type){case"CHANGE_PERMISSION":return{...e,permission:n.value};case"CHANGE_RECIPIENT":return e[u.USER]!==void 0?{...e,[u.USER]:n.value}:e[u.GROUP]!==void 0?{...e,[u.GROUP]:n.value}:e;case"CHANGE_RECIPIENTTYPE":{const{[u.USER]:r,[u.GROUP]:s,...c}=e;return{...c,[n.value]:null}}default:throw new Error(`Unhandled action type: ${n.type}`)}},k=e=>{const[n,r]=d.useReducer(M,e),s=d.useCallback(o=>r({value:o,type:"CHANGE_PERMISSION"}),[]),c=d.useCallback(o=>r({value:o,type:"CHANGE_RECIPIENT"}),[]),i=d.useCallback(o=>r({value:o,type:"CHANGE_RECIPIENTTYPE"}),[]);return{accessControlDocument:n,onChangePermission:s,onChangeRecipient:c,onChangeRecipientType:i}};async function B({searchText:e,hideDefaultGroups:n}){const{data:{group:r=[]}}=await P.group.searchGroup({groupSearchDocument:{field:[{name:"groupname",value:e}]},queryParams:{number:100,role:!n}});return n?r.map(s=>({groupName:s.groupName})).filter(s=>!s.groupName.startsWith("_")):r.map(s=>({groupName:s.groupName}))}async function F({searchText:e,displayRealName:n=!0}){const{data:{user:r=[]}}=await P.user.searchUser({userSearchDocument:{operator:{field:[{name:"username",value:e},{name:"realname",value:e}],operation:"OR"}},queryParams:{number:100,ignoreCase:!0}});return r.map(s=>({userName:s.userName,...n&&{realName:s.realName}}))}function U({onSearch:e,onChange:n,displayRealName:r=!0,label:s,hideDefaultGroups:c}){const[i,o]=d.useState([]),[v,R]=d.useState(""),[x,C]=d.useState(null),g=d.useCallback(a=>{e({searchText:a,hideDefaultGroups:c,displayRealName:r}).then(o)},[e,c,r]),N=(a,l,m)=>{R(l),m==="input"&&g(l)},j=(a,l)=>{const{groupName:m,userName:y}=l||{};C(l),n(l?y||m:null)};d.useEffect(()=>{g("")},[g]);const S=E.createFilterOptions({stringify:a=>a.groupName?a.groupName:a.realName+a.userName});return t.jsx(E.Autocomplete,{value:x,inputValue:v,options:i,filterOptions:S,onChange:j,onInputChange:N,renderInput:a=>t.jsx(p.TextField,{...a,label:s,variant:"outlined"}),getOptionLabel:({realName:a,userName:l,groupName:m})=>r&&a||l||m})}function W({value:e,label:n,onChange:r,choices:s=D,selected:c}){return t.jsxs(p.FormControl,{margin:"normal",fullWidth:!0,children:[t.jsx(p.FormLabel,{children:n}),t.jsx(p.RadioGroup,{value:e,onChange:i=>r(i.target.value),children:Object.entries(s).map(([i,o])=>t.jsx(p.FormControlLabel,{value:i,control:t.jsx(p.Radio,{}),label:o,disabled:!c},i))})]})}function Y({onChange:e,value:n,userText:r,groupText:s}){const c=(i,o)=>{o!==null&&e(o)};return t.jsxs(E.ToggleButtonGroup,{value:n,exclusive:!0,onChange:c,children:[t.jsx(E.ToggleButton,{value:u.USER,children:r}),t.jsx(E.ToggleButton,{value:u.GROUP,children:s})]})}function V({classes:e,entityType:n,entityId:r,onSuccess:s=()=>{},onError:c=()=>{},onSubmit:i=P.access.createEntityAccess,onCancel:o,initialAccessControlDocument:v={user:null},UserPickerComponent:R=U,UserPickerProps:x={},GroupPickerComponent:C=U,GroupPickerProps:g={},PermissionPickerComponent:N=W,PermissionPickerProps:j,RecipientTypePickerComponent:S=Y,RecipientTypePickerProps:a,permissionText:l="Permission",grantAccessText:m="Grant Access",userText:y="User",groupText:A="Group",searchText:b="Search",cancelText:G="Cancel",hideDefaultGroups:T=!0}){const{accessControlDocument:h,onChangePermission:_,onChangeRecipient:I,onChangeRecipientType:L}=k(v),q=()=>Promise.resolve(i({entityType:n,entityId:r,accessControlDocument:h})).then(s).catch(c),{permission:O=""}=h,f=d.useMemo(()=>{if(h[u.USER]!==void 0)return u.USER;if(h[u.GROUP]!==void 0)return u.GROUP},[h]),[w]=Object.values(h);return t.jsxs("div",{className:e.root,children:[t.jsxs("div",{className:e.recipientRoot,children:[S?t.jsx(S,{value:f,onChange:L,userText:y,groupText:A,...a}):null,t.jsxs("div",{className:e.recipientType,children:[R&&f===u.USER?t.jsx(R,{onSearch:F,onChange:I,label:b,...x}):null,C&&f===u.GROUP?t.jsx(C,{onSearch:B,onChange:I,label:b,...g,hideDefaultGroups:T}):null]})]}),N?t.jsx(N,{value:O,onChange:_,selected:w,label:l,...j}):null,t.jsxs("div",{className:e.actions,children:[o?t.jsx(p.Button,{className:e.actionsCancel,onClick:o,children:G}):null,t.jsx(p.Button,{className:e.actionsSubmit,onClick:q,disabled:!h[f]||!O,variant:"outlined",color:"primary",children:m})]})]})}const $=p.withStyles(H,{name:"VdtEntityAccessEdit"})(V);exports.default=$;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),d=require("react"),p=require("@material-ui/core"),E=require("@material-ui/lab"),b=require("@vidispine/vdt-api"),c={GROUP:"group",USER:"user"},D={ALL:"ALL",WRITE:"WRITE",READ:"READ",NONE:"NONE"},H=e=>({root:{},recipientRoot:{display:"flex",width:"100%"},recipientType:{flexGrow:1},actions:{display:"flex",alignItems:"center",padding:e.spacing(2),justifyContent:"flex-end",flex:"0 0 auto","& > :not(:first-child)":{marginLeft:e.spacing(2)}},actionsSubmit:{}}),M=(e,n)=>{switch(n.type){case"CHANGE_PERMISSION":return{...e,permission:n.value};case"CHANGE_RECIPIENT":return e[c.USER]!==void 0?{...e,[c.USER]:n.value}:e[c.GROUP]!==void 0?{...e,[c.GROUP]:n.value}:e;case"CHANGE_RECIPIENTTYPE":{const{[c.USER]:r,[c.GROUP]:o,...s}=e;return{...s,[n.value]:null}}default:throw new Error(`Unhandled action type: ${n.type}`)}},k=e=>{const[n,r]=d.useReducer(M,e),o=d.useCallback(a=>r({value:a,type:"CHANGE_PERMISSION"}),[]),s=d.useCallback(a=>r({value:a,type:"CHANGE_RECIPIENT"}),[]),i=d.useCallback(a=>r({value:a,type:"CHANGE_RECIPIENTTYPE"}),[]);return{accessControlDocument:n,onChangePermission:o,onChangeRecipient:s,onChangeRecipientType:i}};async function B({searchText:e,hideDefaultGroups:n,searchOperator:r}){const{data:{group:o=[]}}=await b.group.searchGroup({groupSearchDocument:{field:[{name:"groupname",value:e}],...r?{operator:r}:{}},queryParams:{number:100,role:!n}});return n?o.map(s=>({groupName:s.groupName})).filter(s=>!s.groupName.startsWith("_")):o.map(s=>({groupName:s.groupName}))}async function F({searchText:e,displayRealName:n=!0}){const{data:{user:r=[]}}=await b.user.searchUser({userSearchDocument:{operator:{field:[{name:"username",value:e},{name:"realname",value:e}],operation:"OR"}},queryParams:{number:100,ignoreCase:!0}});return r.map(o=>({userName:o.userName,...n&&{realName:o.realName}}))}function A({onSearch:e,onChange:n,displayRealName:r=!0,label:o,hideDefaultGroups:s,searchOperator:i}){const[a,f]=d.useState([]),[R,v]=d.useState(""),[C,x]=d.useState(null),h=d.useCallback(u=>{e({searchText:u,hideDefaultGroups:s,displayRealName:r,searchOperator:i}).then(f)},[e,s,r,i]),j=(u,l,m)=>{v(l),m==="input"&&h(l)},N=(u,l)=>{const{groupName:m,userName:P}=l||{};x(l),n(l?P||m:null)};d.useEffect(()=>{h("")},[h]);const y=E.createFilterOptions({stringify:u=>u.groupName?u.groupName:u.realName+u.userName});return t.jsx(E.Autocomplete,{value:C,inputValue:R,options:a,filterOptions:y,onChange:N,onInputChange:j,renderInput:u=>t.jsx(p.TextField,{...u,label:o,variant:"outlined"}),getOptionLabel:({realName:u,userName:l,groupName:m})=>r&&u||l||m})}function W({value:e,label:n,onChange:r,choices:o=D,selected:s}){return t.jsxs(p.FormControl,{margin:"normal",fullWidth:!0,children:[t.jsx(p.FormLabel,{children:n}),t.jsx(p.RadioGroup,{value:e,onChange:i=>r(i.target.value),children:Object.entries(o).map(([i,a])=>t.jsx(p.FormControlLabel,{value:i,control:t.jsx(p.Radio,{}),label:a,disabled:!s},i))})]})}function Y({onChange:e,value:n,userText:r,groupText:o}){const s=(i,a)=>{a!==null&&e(a)};return t.jsxs(E.ToggleButtonGroup,{value:n,exclusive:!0,onChange:s,children:[t.jsx(E.ToggleButton,{value:c.USER,children:r}),t.jsx(E.ToggleButton,{value:c.GROUP,children:o})]})}function V({classes:e,entityType:n,entityId:r,onSuccess:o=()=>{},onError:s=()=>{},onSubmit:i=b.access.createEntityAccess,onCancel:a,initialAccessControlDocument:f={user:null},UserPickerComponent:R=A,UserPickerProps:v={},GroupPickerComponent:C=A,GroupPickerProps:x={},PermissionPickerComponent:h=W,PermissionPickerProps:j,RecipientTypePickerComponent:N=Y,RecipientTypePickerProps:y,permissionText:u="Permission",grantAccessText:l="Grant Access",userText:m="User",groupText:P="Group",searchText:I="Search",cancelText:G="Cancel",hideDefaultGroups:T=!0}){const{accessControlDocument:g,onChangePermission:_,onChangeRecipient:O,onChangeRecipientType:L}=k(f),q=()=>Promise.resolve(i({entityType:n,entityId:r,accessControlDocument:g})).then(o).catch(s),{permission:U=""}=g,S=d.useMemo(()=>{if(g[c.USER]!==void 0)return c.USER;if(g[c.GROUP]!==void 0)return c.GROUP},[g]),[w]=Object.values(g);return t.jsxs("div",{className:e.root,children:[t.jsxs("div",{className:e.recipientRoot,children:[N?t.jsx(N,{value:S,onChange:L,userText:m,groupText:P,...y}):null,t.jsxs("div",{className:e.recipientType,children:[R&&S===c.USER?t.jsx(R,{onSearch:F,onChange:O,label:I,...v}):null,C&&S===c.GROUP?t.jsx(C,{onSearch:B,onChange:O,label:I,...x,hideDefaultGroups:T}):null]})]}),h?t.jsx(h,{value:U,onChange:_,selected:w,label:u,...j}):null,t.jsxs("div",{className:e.actions,children:[a?t.jsx(p.Button,{className:e.actionsCancel,onClick:a,children:G}):null,t.jsx(p.Button,{className:e.actionsSubmit,onClick:q,disabled:!g[S]||!U,variant:"outlined",color:"primary",children:l})]})]})}const $=p.withStyles(H,{name:"VdtEntityAccessEdit"})(V);exports.default=$;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),b=require("clsx"),m=require("@material-ui/core"),w=require("@vidispine/vdt-react"),D=require("./SavedSearchList.js"),R=require("./SaveSearchForm.js"),V=e=>({root:{padding:e.spacing(2)}});function _({classes:e,className:c,markerField:o,markerValue:n,itemSearchDocument:S,onSelect:d,onSaveSuccess:i=()=>{},onSaveError:u=()=>{},SearchListComponent:a=D.default,SearchListProps:l={},SearchFormComponent:r=R.default,SearchFormProps:h={},accessTranslate:v,extraMenuItems:f,isLoading:g=!1}){const{onDeleteSearch:q,onUpdateSearchMetadata:j,onGetSavedSearchSettings:x,onSaveSearch:P,searchProps:p}=w.useSavedSearch({markerField:o,markerValue:n,initialSearchState:{rowsPerPage:5}}),y=({collectionId:s})=>x({collectionId:s}).then(M=>d(M,s));return t.jsxs("div",{className:b(e.root,"VdtSavedSearch-root",c),children:[r&&t.jsx(r,{itemSearchDocument:S,onSuccess:i,onError:u,onSaveSearch:P,...h}),a&&t.jsx(a,{onSelect:y,onDelete:q,onUpdateSearchMetadata:j,searchProps:p,accessTranslate:v,extraMenuItems:f,isLoading:g,...l})]})}const E=m.withStyles(V,{name:"VdtSavedSearchList"})(_);exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),D=require("clsx"),R=require("@material-ui/core"),V=require("@vidispine/vdt-react"),_=require("./SavedSearchList.js"),b=require("./SaveSearchForm.js"),E=e=>({root:{padding:e.spacing(2)}});function G({classes:e,className:o,markerField:n,markerValue:S,itemSearchDocument:d,onSelect:i,onSaveSuccess:u=()=>{},onSaveError:l=()=>{},SearchListComponent:a=_.default,SearchListProps:h={},SearchFormComponent:r=b.default,SearchFormProps:v={},accessTranslate:f,extraMenuItems:g,isLoading:q=!1,onDeleteError:j=()=>{},enableSearch2:s=!1}){const{onDeleteSearch:x,onUpdateSearchMetadata:P,onGetSavedSearchSettings:p,onSaveSearch:y,searchProps:M}=V.useSavedSearch({markerField:n,markerValue:S,initialSearchState:{rowsPerPage:5}},s),m=({collectionId:c})=>p({collectionId:c}).then(w=>i(w,c));return t.jsxs("div",{className:D(e.root,"VdtSavedSearch-root",o),children:[r&&t.jsx(r,{itemSearchDocument:d,onSuccess:u,onError:l,onSaveSearch:y,...v}),a&&t.jsx(a,{onSelect:m,onDelete:x,onUpdateSearchMetadata:P,searchProps:M,accessTranslate:f,extraMenuItems:g,isLoading:q,onDeleteError:j,enableSearch2:s,...h})]})}const L=R.withStyles(E,{name:"VdtSavedSearchList"})(G);exports.default=L;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),s=require("@material-ui/core"),j=require("../../collection/CollectionSearchPicker/index.js"),x=require("./SavedSearchRow.js"),f={};function g({searchProps:o,searchPlaceholderText:i="Find searches",onSelect:n,onDelete:d,onUpdateSearchMetadata:c,RowComponent:l=x.default,RowProps:u={},accessTranslate:S,extraMenuItems:h,isLoading:v,...P}){return r.jsx(j.default,{searchProps:o,searchPlaceholder:i,CollectionTableComponent:({collectionListType:t,onRefresh:a})=>r.jsx(s.List,{children:t&&t.collection&&t.collection.map(e=>r.jsx(l,{collectionType:e,onSelect:()=>n({collectionId:e.id}),onDelete:()=>Promise.resolve(d({collectionId:e.id}).then(a)),onUpdateSearchMetadata:m=>Promise.resolve(c({collectionId:e.id,metadataDocument:m}).then(a)),accessTranslate:S,extraMenuItems:h,isLoading:v,...u},e.id))}),PaginationProps:{rowsPerPageOptions:[5,10]},...P})}const q=s.withStyles(f,{name:"VdtSavedSearchList"})(g);exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),o=require("@material-ui/core"),x=require("../../collection/CollectionSearchPicker/index.js"),f=require("./SavedSearchRow.js"),g={};function q({searchProps:i,searchPlaceholderText:n="Find searches",onSelect:d,onDelete:c,onUpdateSearchMetadata:l,RowComponent:u=f.default,RowProps:S={},accessTranslate:h,extraMenuItems:v,isLoading:P,onDeleteError:m,...j}){return a.jsx(x.default,{searchProps:i,searchPlaceholder:n,CollectionTableComponent:({collectionListType:t,onRefresh:s})=>a.jsx(o.List,{children:t&&t.collection&&t.collection.map(e=>a.jsx(u,{collectionType:e,onSelect:()=>d({collectionId:e.id}),onDelete:()=>Promise.resolve(c({collectionId:e.id}).catch(r=>{m(r)}).then(s)),onUpdateSearchMetadata:r=>Promise.resolve(l({collectionId:e.id,metadataDocument:r}).then(s)),accessTranslate:h,extraMenuItems:v,isLoading:P,...S},e.id))}),PaginationProps:{rowsPerPageOptions:[5,10]},...j})}const b=o.withStyles(g,{name:"VdtSavedSearchList"})(q);exports.default=b;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),b=require("react"),Y=require("clsx"),$=require("@material-ui/core"),Z=require("@vidispine/vdt-js"),g=require("@vidispine/vdt-react"),P=require("../SavedSearch/SavedSearchRow.js"),C=require("./AddFolderRow.js"),U={markerValue:"savedSearch",markerField:"eidr_referentType"},ee={indentationWidth:20,indentationDepthStart:1,defaultRowIndentationOffset:15,defalutNewRowIndentation:10},te=()=>({root:{display:"flex",width:"100%",flexWrap:"wrap"},indentationContainer:{display:"flex",width:"100%"}}),ne=a=>({root:{display:"flex",width:"100%"},indentation:{height:25,borderLeft:`1px solid ${a.palette.primary.main}`,borderBottom:`1px solid ${a.palette.primary.main}`,marginRight:5}});function ae({className:a,classes:t,children:c,indentationWidth:u,hideWrapper:x,folderDepth:o,indentationDepthStart:h,isAddRow:d,rowIndentation:l,addNewRowIndentation:I}){const w=d?!0:o>=h,i=d?I:l;return x?null:n.jsxs("div",{className:Y(a,t.root),children:[w&&n.jsx("div",{className:t.indentation,style:{marginLeft:i,minWidth:u}}),c]})}const de=g.compose($.withStyles(ne,{name:"VdtFolderRowContentWrapper"}))(ae);function k({classes:a,id:t,queryParams:c,markerProps:u=U,childFolders:x=[],metadata:o={},itemSearchDocument:h={},folderDepth:d=0,type:l="folder",hideSubFolderSharing:I,onSelect:w,onRemoveItem:i,indentationValues:q={},indentationProps:s=ee,FolderRowContentComponent:y=P.default,FolderRowContentProps:R={},AddRowComponent:F=C.default,AddRowProps:M={},FolderRowContentWrapperComponent:S=de,FolderRowContentWrapperProps:f={},isLoading:v,...z}){const[j,_]=b.useState(),[V,N]=b.useState({id:null,type:null}),{createFolder:A,saveSearch:D,deleteFolder:E,removeItem:G,subFolders:m=[]}=g.useGetSavedSearchFolders({childFolders:x,expand:j,queryParams:c,markerProps:u}),{onDeleteSearch:B,onUpdateSearchMetadata:p,onGetSavedSearchSettings:J}=g.useSavedSearch({...U}),T=({collectionId:e})=>J({collectionId:e}).then(X=>w(X,e)),O=Z.parseMetadataType(o,{joinValue:"_",flat:!0}),W=b.useMemo(()=>{const{__child_collection_size:e=0}=O;return m.length>0||!j&&e>0},[m.length,j,O]),{defalutNewRowIndentation:H,defaultRowIndentationOffset:K,indentationWidth:L}=s,r={rowIndentation:q.rowIndentation||0,addNewRowIndentation:q.addNewRowIndentation||H},Q={rowIndentation:r.addNewRowIndentation,addNewRowIndentation:r.addNewRowIndentation+L+K};return n.jsxs("div",{className:a.root,children:[{folder:n.jsx(S,{folderDepth:d,...r,...s,...f,children:n.jsx(y,{isFolderRow:!0,hideSubFolderSharing:I,type:l,collectionType:{id:t,metadata:o},disableDeletion:W,onDelete:()=>Promise.resolve(E(t)).then(()=>{i&&i(t)}),onUpdateSearchMetadata:e=>p({collectionId:t,metadataDocument:e}),onExpand:()=>_(e=>!e),onAddRow:N,isLoading:v,...R})}),query:n.jsx(S,{folderDepth:d,...r,...s,...f,children:n.jsx(y,{isFolderRow:!0,type:l,collectionType:{id:t,metadata:o},onSelect:()=>T({collectionId:t}),onDelete:()=>Promise.resolve(B({collectionId:t})).then(()=>{i&&i(t)}),onUpdateSearchMetadata:e=>p({collectionId:t,metadataDocument:e}),onAddRow:N,isLoading:v,...R})})}[l],n.jsx(S,{isAddRow:!0,folderDepth:d,...r,...s,hideWrapper:!V.id,...f,children:n.jsx(F,{id:t,setExpand:_,saveSearch:D,onAddRow:N,createFolder:A,itemSearchDocument:h,newField:V,...M})}),m.map(e=>n.jsx(k,{classes:a,id:e.id,queryParams:c,markerProps:u,childFolders:e.subFolders,metadata:e.metadata,itemSearchDocument:h,folderDepth:d+1,type:e.type,hideSubFolderSharing:!0,handleSelect:T,onSelect:w,onRemoveItem:()=>G(e.id),indentationProps:s,FolderRowContentComponent:y,FolderRowContentProps:R,AddRowComponent:F,AddRowProps:M,FolderRowContentWrapperComponent:S,FolderRowContentWrapperProps:f,indentationValues:Q,isLoading:v,props:z},e.id))]})}const ie=$.withStyles(te,{name:"VdtFolderRow"})(k);exports.default=ie;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),b=require("react"),Z=require("clsx"),k=require("@material-ui/core"),P=require("@vidispine/vdt-js"),g=require("@vidispine/vdt-react"),C=require("../SavedSearch/SavedSearchRow.js"),ee=require("./AddFolderRow.js"),$={markerValue:"savedSearch",markerField:"eidr_referentType"},te={indentationWidth:20,indentationDepthStart:1,defaultRowIndentationOffset:15,defalutNewRowIndentation:10},ne=()=>({root:{display:"flex",width:"100%",flexWrap:"wrap"},indentationContainer:{display:"flex",width:"100%"}}),ae=a=>({root:{display:"flex",width:"100%"},indentation:{height:25,borderLeft:`1px solid ${a.palette.primary.main}`,borderBottom:`1px solid ${a.palette.primary.main}`,marginRight:5}});function de({className:a,classes:t,children:c,indentationWidth:u,hideWrapper:x,folderDepth:o,indentationDepthStart:h,isAddRow:d,rowIndentation:l,addNewRowIndentation:I}){const w=d?!0:o>=h,i=d?I:l;return x?null:n.jsxs("div",{className:Z(a,t.root),children:[w&&n.jsx("div",{className:t.indentation,style:{marginLeft:i,minWidth:u}}),c]})}const ie=g.compose(k.withStyles(ae,{name:"VdtFolderRowContentWrapper"}))(de);function z({classes:a,id:t,queryParams:c,markerProps:u=$,childFolders:x=[],metadata:o={},itemSearchDocument:h={},folderDepth:d=0,type:l="folder",hideSubFolderSharing:I,onSelect:w,onRemoveItem:i,indentationValues:q={},indentationProps:s=te,FolderRowContentComponent:y=C.default,FolderRowContentProps:R={},AddRowComponent:F=ee.default,AddRowProps:M={},FolderRowContentWrapperComponent:S=ie,FolderRowContentWrapperProps:f={},isLoading:v,onDeleteError:_,...A}){const[j,V]=b.useState(),[p,N]=b.useState({id:null,type:null}),{createFolder:G,saveSearch:B,deleteFolder:D,removeItem:E,subFolders:m=[]}=g.useGetSavedSearchFolders({childFolders:x,expand:j,queryParams:c,markerProps:u}),{onDeleteSearch:J,onUpdateSearchMetadata:T,onGetSavedSearchSettings:W}=g.useSavedSearch({...$}),O=({collectionId:e})=>W({collectionId:e}).then(Y=>w(Y,e)),U=P.parseMetadataType(o,{joinValue:"_",flat:!0}),H=b.useMemo(()=>{const{__child_collection_size:e=0}=U;return m.length>0||!j&&e>0},[m.length,j,U]),{defalutNewRowIndentation:K,defaultRowIndentationOffset:L,indentationWidth:Q}=s,r={rowIndentation:q.rowIndentation||0,addNewRowIndentation:q.addNewRowIndentation||K},X={rowIndentation:r.addNewRowIndentation,addNewRowIndentation:r.addNewRowIndentation+Q+L};return n.jsxs("div",{className:a.root,children:[{folder:n.jsx(S,{folderDepth:d,...r,...s,...f,children:n.jsx(y,{isFolderRow:!0,hideSubFolderSharing:I,type:l,collectionType:{id:t,metadata:o},disableDeletion:H,onDelete:()=>Promise.resolve(D(t)).then(()=>{i&&i(t)}),onUpdateSearchMetadata:e=>T({collectionId:t,metadataDocument:e}),onExpand:()=>V(e=>!e),onAddRow:N,isLoading:v,...R})}),query:n.jsx(S,{folderDepth:d,...r,...s,...f,children:n.jsx(y,{isFolderRow:!0,type:l,collectionType:{id:t,metadata:o},onSelect:()=>O({collectionId:t}),onDelete:()=>Promise.resolve(J({collectionId:t})).then(()=>{i&&i(t)}).catch(e=>{_(e)}),onUpdateSearchMetadata:e=>T({collectionId:t,metadataDocument:e}),onAddRow:N,isLoading:v,...R})})}[l],n.jsx(S,{isAddRow:!0,folderDepth:d,...r,...s,hideWrapper:!p.id,...f,children:n.jsx(F,{id:t,setExpand:V,saveSearch:B,onAddRow:N,createFolder:G,itemSearchDocument:h,newField:p,...M})}),m.map(e=>n.jsx(z,{classes:a,id:e.id,queryParams:c,markerProps:u,childFolders:e.subFolders,metadata:e.metadata,itemSearchDocument:h,folderDepth:d+1,type:e.type,hideSubFolderSharing:!0,handleSelect:O,onSelect:w,onRemoveItem:()=>E(e.id),indentationProps:s,FolderRowContentComponent:y,FolderRowContentProps:R,AddRowComponent:F,AddRowProps:M,FolderRowContentWrapperComponent:S,FolderRowContentWrapperProps:f,indentationValues:X,isLoading:v,onDeleteError:_,props:A},e.id))]})}const oe=k.withStyles(ne,{name:"VdtFolderRow"})(z);exports.default=oe;
@@ -1,95 +1,100 @@
1
- import { jsx as r, jsxs as q } from "react/jsx-runtime";
2
- import { useState as W, useEffect as $ } from "react";
3
- import D from "clsx";
1
+ import { jsx as n, jsxs as W } from "react/jsx-runtime";
2
+ import { useState as $, useEffect as D } from "react";
3
+ import E from "clsx";
4
4
  import e from "prop-types";
5
- import { useSearch as E, SearchCollection as V } from "@vidispine/vdt-react";
6
- import z from "../../search/Pagination.js";
7
- import A from "../../search/SearchInput/index.js";
8
- import B from "../CollectionTable/index.js";
9
- function F({ PaginationComponent: t = z, ...n }) {
5
+ import { useSearch as V, SearchCollection as z } from "@vidispine/vdt-react";
6
+ import A from "../../search/Pagination.js";
7
+ import B from "../../search/SearchInput/index.js";
8
+ import F from "../CollectionTable/index.js";
9
+ function G({ PaginationComponent: t = A, ...a }) {
10
10
  const {
11
- collectionListType: { hits: a = 0 }
12
- } = n;
13
- return /* @__PURE__ */ r(t, { count: a, ...n });
11
+ collectionListType: { hits: r = 0 }
12
+ } = a;
13
+ return /* @__PURE__ */ n(t, { count: r, ...a });
14
14
  }
15
- function G(t) {
16
- const { isLoading: n } = t;
17
- return /* @__PURE__ */ r(A, { submitting: n, ...t });
15
+ function H(t) {
16
+ const { isLoading: a } = t;
17
+ return /* @__PURE__ */ n(B, { submitting: a, ...t });
18
18
  }
19
- const Z = () => ({
19
+ const ee = () => ({
20
20
  root: {}
21
21
  });
22
- function i({
22
+ function p({
23
23
  className: t,
24
- classes: n,
25
- onChange: a,
26
- onCheck: p,
24
+ classes: a,
25
+ onChange: r,
26
+ onCheck: h,
27
27
  CollectionTableComponent: m,
28
- CollectionTableProps: h,
29
- searchProps: u,
30
- idLabelText: P,
31
- titleLabelText: f,
28
+ CollectionTableProps: u,
29
+ searchProps: P,
30
+ idLabelText: f,
31
+ titleLabelText: b,
32
32
  ownerLabelText: d,
33
- searchPlaceholder: b,
34
- SearchInputProps: C,
35
- PaginationProps: g,
36
- SearchCollectionProps: S
33
+ searchPlaceholder: C,
34
+ SearchInputProps: g,
35
+ PaginationProps: S,
36
+ SearchCollectionProps: T,
37
+ enableSearch2: s
37
38
  }) {
38
- const T = E({
39
- queryParams: {
40
- field: ["collectionId", "title", "__user"],
41
- content: "metadata"
42
- }
43
- }), { state: x, setSearchText: y, onChangeRowsPerPage: k, onChangePage: j } = u || T, { matrixParams: L, queryParams: v, itemSearchDocument: w, page: O, rowsPerPage: I } = x, [c, l] = W([]), _ = (o) => {
44
- c.includes(o) ? l((s) => s.filter((R) => R !== o)) : l((s) => [...s, o]);
39
+ const x = V(
40
+ {
41
+ queryParams: {
42
+ field: ["collectionId", "title", "__user"],
43
+ content: "metadata"
44
+ }
45
+ },
46
+ s
47
+ ), { state: y, setSearchText: k, onChangeRowsPerPage: j, onChangePage: L } = P || x, { matrixParams: v, queryParams: w, itemSearchDocument: O, page: I, rowsPerPage: _ } = y, [c, i] = $([]), N = (o) => {
48
+ c.includes(o) ? i((l) => l.filter((q) => q !== o)) : i((l) => [...l, o]);
45
49
  };
46
- $(() => a && a(c), [c]);
47
- const N = ({ id: o }) => _(o);
48
- return /* @__PURE__ */ r("div", { className: D(n.root, "VdtCollectionSearchPicker", t), children: /* @__PURE__ */ q(
49
- V,
50
+ D(() => r && r(c), [c]);
51
+ const R = ({ id: o }) => N(o);
52
+ return /* @__PURE__ */ n("div", { className: E(a.root, "VdtCollectionSearchPicker", t), children: /* @__PURE__ */ W(
53
+ z,
50
54
  {
51
- itemSearchDocument: w,
52
- matrixParams: L,
53
- queryParams: v,
54
- ...S,
55
+ itemSearchDocument: O,
56
+ matrixParams: v,
57
+ queryParams: w,
58
+ enableSearch2: s,
59
+ ...T,
55
60
  children: [
56
- /* @__PURE__ */ r(
57
- G,
61
+ /* @__PURE__ */ n(
62
+ H,
58
63
  {
59
- onSubmit: (o) => y(`*${o}*`),
60
- searchPlaceholder: b,
61
- ...C
64
+ onSubmit: (o) => k(`*${o}*`),
65
+ searchPlaceholder: C,
66
+ ...g
62
67
  }
63
68
  ),
64
- /* @__PURE__ */ r(
69
+ /* @__PURE__ */ n(
65
70
  m,
66
71
  {
67
- onRowClick: N,
68
- onCheck: p,
72
+ onRowClick: R,
73
+ onCheck: h,
69
74
  selected: c,
70
75
  options: [
71
- { label: f, value: "title" },
72
- { label: P, value: "collectionId" },
76
+ { label: b, value: "title" },
77
+ { label: f, value: "collectionId" },
73
78
  { label: d, value: "__user" }
74
79
  ],
75
- ...h
80
+ ...u
76
81
  }
77
82
  ),
78
- /* @__PURE__ */ r(
79
- F,
83
+ /* @__PURE__ */ n(
84
+ G,
80
85
  {
81
- onChangePage: j,
82
- onChangeRowsPerPage: k,
83
- page: O,
84
- rowsPerPage: I,
85
- ...g
86
+ onChangePage: L,
87
+ onChangeRowsPerPage: j,
88
+ page: I,
89
+ rowsPerPage: _,
90
+ ...S
86
91
  }
87
92
  )
88
93
  ]
89
94
  }
90
95
  ) });
91
96
  }
92
- i.propTypes = {
97
+ p.propTypes = {
93
98
  /**
94
99
  * Override or extend the styles applied to the component.
95
100
  */
@@ -109,15 +114,16 @@ i.propTypes = {
109
114
  searchPlaceholder: e.string,
110
115
  SearchInputProps: e.objectOf(e.any),
111
116
  PaginationProps: e.objectOf(e.any),
112
- SearchCollectionProps: e.objectOf(e.any)
117
+ SearchCollectionProps: e.objectOf(e.any),
118
+ enableSearch2: e.bool
113
119
  };
114
- i.defaultProps = {
120
+ p.defaultProps = {
115
121
  className: void 0,
116
122
  classes: {},
117
123
  onChange: void 0,
118
124
  onCheck: () => {
119
125
  },
120
- CollectionTableComponent: B,
126
+ CollectionTableComponent: F,
121
127
  CollectionTableProps: {},
122
128
  searchProps: void 0,
123
129
  idLabelText: "Id",
@@ -126,9 +132,10 @@ i.defaultProps = {
126
132
  searchPlaceholder: "Search collections",
127
133
  SearchInputProps: {},
128
134
  PaginationProps: {},
129
- SearchCollectionProps: {}
135
+ SearchCollectionProps: {},
136
+ enableSearch2: !1
130
137
  };
131
138
  export {
132
- i as default,
133
- Z as styles
139
+ p as default,
140
+ ee as styles
134
141
  };
@@ -1,7 +1,7 @@
1
- import { jsxs as d, jsx as i } from "react/jsx-runtime";
2
- import { useMemo as F, useReducer as M, useCallback as f, useState as I, useEffect as W } from "react";
3
- import { withStyles as $, Button as b, TextField as B, FormControl as Y, FormLabel as k, RadioGroup as q, FormControlLabel as V, Radio as z } from "@material-ui/core";
4
- import { createFilterOptions as J, Autocomplete as K, ToggleButtonGroup as Q, ToggleButton as A } from "@material-ui/lab";
1
+ import { jsxs as h, jsx as u } from "react/jsx-runtime";
2
+ import { useMemo as F, useReducer as M, useCallback as N, useState as U, useEffect as W } from "react";
3
+ import { withStyles as $, Button as A, TextField as B, FormControl as Y, FormLabel as k, RadioGroup as q, FormControlLabel as V, Radio as z } from "@material-ui/core";
4
+ import { createFilterOptions as J, Autocomplete as K, ToggleButtonGroup as Q, ToggleButton as T } from "@material-ui/lab";
5
5
  import { access as X, group as Z, user as ee } from "@vidispine/vdt-api";
6
6
  const c = {
7
7
  GROUP: "group",
@@ -11,7 +11,7 @@ const c = {
11
11
  WRITE: "WRITE",
12
12
  READ: "READ",
13
13
  NONE: "NONE"
14
- }, re = (e) => ({
14
+ }, te = (e) => ({
15
15
  root: {},
16
16
  recipientRoot: {
17
17
  display: "flex",
@@ -31,52 +31,53 @@ const c = {
31
31
  }
32
32
  },
33
33
  actionsSubmit: {}
34
- }), te = (e, n) => {
34
+ }), re = (e, n) => {
35
35
  switch (n.type) {
36
36
  case "CHANGE_PERMISSION":
37
37
  return { ...e, permission: n.value };
38
38
  case "CHANGE_RECIPIENT":
39
39
  return e[c.USER] !== void 0 ? { ...e, [c.USER]: n.value } : e[c.GROUP] !== void 0 ? { ...e, [c.GROUP]: n.value } : e;
40
40
  case "CHANGE_RECIPIENTTYPE": {
41
- const { [c.USER]: r, [c.GROUP]: t, ...u } = e;
42
- return { ...u, [n.value]: null };
41
+ const { [c.USER]: t, [c.GROUP]: o, ...r } = e;
42
+ return { ...r, [n.value]: null };
43
43
  }
44
44
  default:
45
45
  throw new Error(`Unhandled action type: ${n.type}`);
46
46
  }
47
47
  }, oe = (e) => {
48
- const [n, r] = M(te, e), t = f(
49
- (o) => r({ value: o, type: "CHANGE_PERMISSION" }),
48
+ const [n, t] = M(re, e), o = N(
49
+ (a) => t({ value: a, type: "CHANGE_PERMISSION" }),
50
50
  []
51
- ), u = f(
52
- (o) => r({ value: o, type: "CHANGE_RECIPIENT" }),
51
+ ), r = N(
52
+ (a) => t({ value: a, type: "CHANGE_RECIPIENT" }),
53
53
  []
54
- ), s = f(
55
- (o) => r({ value: o, type: "CHANGE_RECIPIENTTYPE" }),
54
+ ), s = N(
55
+ (a) => t({ value: a, type: "CHANGE_RECIPIENTTYPE" }),
56
56
  []
57
57
  );
58
58
  return {
59
59
  accessControlDocument: n,
60
- onChangePermission: t,
61
- onChangeRecipient: u,
60
+ onChangePermission: o,
61
+ onChangeRecipient: r,
62
62
  onChangeRecipientType: s
63
63
  };
64
64
  };
65
- async function ae({ searchText: e, hideDefaultGroups: n }) {
65
+ async function ae({ searchText: e, hideDefaultGroups: n, searchOperator: t }) {
66
66
  const {
67
- data: { group: r = [] }
67
+ data: { group: o = [] }
68
68
  } = await Z.searchGroup({
69
69
  groupSearchDocument: {
70
- field: [{ name: "groupname", value: e }]
70
+ field: [{ name: "groupname", value: e }],
71
+ ...t ? { operator: t } : {}
71
72
  },
72
73
  // Doesn't have ignoreCase param
73
74
  queryParams: { number: 100, role: !n }
74
75
  });
75
- return n ? r.map((t) => ({ groupName: t.groupName })).filter((t) => !t.groupName.startsWith("_")) : r.map((t) => ({ groupName: t.groupName }));
76
+ return n ? o.map((r) => ({ groupName: r.groupName })).filter((r) => !r.groupName.startsWith("_")) : o.map((r) => ({ groupName: r.groupName }));
76
77
  }
77
78
  async function ie({ searchText: e, displayRealName: n = !0 }) {
78
79
  const {
79
- data: { user: r = [] }
80
+ data: { user: t = [] }
80
81
  } = await ee.searchUser({
81
82
  userSearchDocument: {
82
83
  operator: {
@@ -95,172 +96,173 @@ async function ie({ searchText: e, displayRealName: n = !0 }) {
95
96
  },
96
97
  queryParams: { number: 100, ignoreCase: !0 }
97
98
  });
98
- return r.map((t) => ({
99
- userName: t.userName,
100
- ...n && { realName: t.realName }
99
+ return t.map((o) => ({
100
+ userName: o.userName,
101
+ ...n && { realName: o.realName }
101
102
  }));
102
103
  }
103
- function T({
104
+ function _({
104
105
  onSearch: e,
105
106
  onChange: n,
106
- displayRealName: r = !0,
107
- label: t,
108
- hideDefaultGroups: u
107
+ displayRealName: t = !0,
108
+ label: o,
109
+ hideDefaultGroups: r,
110
+ searchOperator: s
109
111
  }) {
110
- const [s, o] = I([]), [S, g] = I(""), [v, E] = I(null), h = f(
111
- (a) => {
112
- e({ searchText: a, hideDefaultGroups: u, displayRealName: r }).then(o);
112
+ const [a, f] = U([]), [g, S] = U(""), [E, v] = U(null), d = N(
113
+ (i) => {
114
+ e({ searchText: i, hideDefaultGroups: r, displayRealName: t, searchOperator: s }).then(f);
113
115
  },
114
- [e, u, r]
115
- ), R = (a, l, m) => {
116
- g(l), m === "input" && h(l);
117
- }, y = (a, l) => {
118
- const { groupName: m, userName: P } = l || {};
119
- E(l), n(l ? P || m : null);
116
+ [e, r, t, s]
117
+ ), y = (i, l, m) => {
118
+ S(l), m === "input" && d(l);
119
+ }, R = (i, l) => {
120
+ const { groupName: m, userName: I } = l || {};
121
+ v(l), n(l ? I || m : null);
120
122
  };
121
123
  W(() => {
122
- h("");
123
- }, [h]);
124
- const C = J({
125
- stringify: (a) => a.groupName ? a.groupName : a.realName + a.userName
124
+ d("");
125
+ }, [d]);
126
+ const P = J({
127
+ stringify: (i) => i.groupName ? i.groupName : i.realName + i.userName
126
128
  });
127
- return /* @__PURE__ */ i(
129
+ return /* @__PURE__ */ u(
128
130
  K,
129
131
  {
130
- value: v,
131
- inputValue: S,
132
- options: s,
133
- filterOptions: C,
134
- onChange: y,
135
- onInputChange: R,
136
- renderInput: (a) => /* @__PURE__ */ i(B, { ...a, label: t, variant: "outlined" }),
137
- getOptionLabel: ({ realName: a, userName: l, groupName: m }) => r && a || l || m
132
+ value: E,
133
+ inputValue: g,
134
+ options: a,
135
+ filterOptions: P,
136
+ onChange: R,
137
+ onInputChange: y,
138
+ renderInput: (i) => /* @__PURE__ */ u(B, { ...i, label: o, variant: "outlined" }),
139
+ getOptionLabel: ({ realName: i, userName: l, groupName: m }) => t && i || l || m
138
140
  }
139
141
  );
140
142
  }
141
- function ce({ value: e, label: n, onChange: r, choices: t = ne, selected: u }) {
142
- return /* @__PURE__ */ d(Y, { margin: "normal", fullWidth: !0, children: [
143
- /* @__PURE__ */ i(k, { children: n }),
144
- /* @__PURE__ */ i(q, { value: e, onChange: (s) => r(s.target.value), children: Object.entries(t).map(([s, o]) => /* @__PURE__ */ i(
143
+ function ue({ value: e, label: n, onChange: t, choices: o = ne, selected: r }) {
144
+ return /* @__PURE__ */ h(Y, { margin: "normal", fullWidth: !0, children: [
145
+ /* @__PURE__ */ u(k, { children: n }),
146
+ /* @__PURE__ */ u(q, { value: e, onChange: (s) => t(s.target.value), children: Object.entries(o).map(([s, a]) => /* @__PURE__ */ u(
145
147
  V,
146
148
  {
147
149
  value: s,
148
- control: /* @__PURE__ */ i(z, {}),
149
- label: o,
150
- disabled: !u
150
+ control: /* @__PURE__ */ u(z, {}),
151
+ label: a,
152
+ disabled: !r
151
153
  },
152
154
  s
153
155
  )) })
154
156
  ] });
155
157
  }
156
- function ue({ onChange: e, value: n, userText: r, groupText: t }) {
157
- return /* @__PURE__ */ d(Q, { value: n, exclusive: !0, onChange: (s, o) => {
158
- o !== null && e(o);
158
+ function ce({ onChange: e, value: n, userText: t, groupText: o }) {
159
+ return /* @__PURE__ */ h(Q, { value: n, exclusive: !0, onChange: (s, a) => {
160
+ a !== null && e(a);
159
161
  }, children: [
160
- /* @__PURE__ */ i(A, { value: c.USER, children: r }),
161
- /* @__PURE__ */ i(A, { value: c.GROUP, children: t })
162
+ /* @__PURE__ */ u(T, { value: c.USER, children: t }),
163
+ /* @__PURE__ */ u(T, { value: c.GROUP, children: o })
162
164
  ] });
163
165
  }
164
166
  function se({
165
167
  classes: e,
166
168
  entityType: n,
167
- entityId: r,
168
- onSuccess: t = () => {
169
+ entityId: t,
170
+ onSuccess: o = () => {
169
171
  },
170
- onError: u = () => {
172
+ onError: r = () => {
171
173
  },
172
174
  onSubmit: s = X.createEntityAccess,
173
- onCancel: o,
174
- initialAccessControlDocument: S = { user: null },
175
- UserPickerComponent: g = T,
176
- UserPickerProps: v = {},
177
- GroupPickerComponent: E = T,
178
- GroupPickerProps: h = {},
179
- PermissionPickerComponent: R = ce,
175
+ onCancel: a,
176
+ initialAccessControlDocument: f = { user: null },
177
+ UserPickerComponent: g = _,
178
+ UserPickerProps: S = {},
179
+ GroupPickerComponent: E = _,
180
+ GroupPickerProps: v = {},
181
+ PermissionPickerComponent: d = ue,
180
182
  PermissionPickerProps: y,
181
- RecipientTypePickerComponent: C = ue,
182
- RecipientTypePickerProps: a,
183
- permissionText: l = "Permission",
184
- grantAccessText: m = "Grant Access",
185
- userText: P = "User",
186
- groupText: _ = "Group",
187
- searchText: O = "Search",
183
+ RecipientTypePickerComponent: R = ce,
184
+ RecipientTypePickerProps: P,
185
+ permissionText: i = "Permission",
186
+ grantAccessText: l = "Grant Access",
187
+ userText: m = "User",
188
+ groupText: I = "Group",
189
+ searchText: G = "Search",
188
190
  cancelText: x = "Cancel",
189
191
  hideDefaultGroups: L = !0
190
192
  }) {
191
- const { accessControlDocument: p, onChangePermission: w, onChangeRecipient: U, onChangeRecipientType: D } = oe(S), H = () => Promise.resolve(
193
+ const { accessControlDocument: p, onChangePermission: w, onChangeRecipient: O, onChangeRecipientType: D } = oe(f), H = () => Promise.resolve(
192
194
  s({
193
195
  entityType: n,
194
- entityId: r,
196
+ entityId: t,
195
197
  accessControlDocument: p
196
198
  })
197
- ).then(t).catch(u), { permission: G = "" } = p, N = F(() => {
199
+ ).then(o).catch(r), { permission: b = "" } = p, C = F(() => {
198
200
  if (p[c.USER] !== void 0)
199
201
  return c.USER;
200
202
  if (p[c.GROUP] !== void 0)
201
203
  return c.GROUP;
202
204
  }, [p]), [j] = Object.values(p);
203
- return /* @__PURE__ */ d("div", { className: e.root, children: [
204
- /* @__PURE__ */ d("div", { className: e.recipientRoot, children: [
205
- C ? /* @__PURE__ */ i(
206
- C,
205
+ return /* @__PURE__ */ h("div", { className: e.root, children: [
206
+ /* @__PURE__ */ h("div", { className: e.recipientRoot, children: [
207
+ R ? /* @__PURE__ */ u(
208
+ R,
207
209
  {
208
- value: N,
210
+ value: C,
209
211
  onChange: D,
210
- userText: P,
211
- groupText: _,
212
- ...a
212
+ userText: m,
213
+ groupText: I,
214
+ ...P
213
215
  }
214
216
  ) : null,
215
- /* @__PURE__ */ d("div", { className: e.recipientType, children: [
216
- g && N === c.USER ? /* @__PURE__ */ i(
217
+ /* @__PURE__ */ h("div", { className: e.recipientType, children: [
218
+ g && C === c.USER ? /* @__PURE__ */ u(
217
219
  g,
218
220
  {
219
221
  onSearch: ie,
220
- onChange: U,
221
- label: O,
222
- ...v
222
+ onChange: O,
223
+ label: G,
224
+ ...S
223
225
  }
224
226
  ) : null,
225
- E && N === c.GROUP ? /* @__PURE__ */ i(
227
+ E && C === c.GROUP ? /* @__PURE__ */ u(
226
228
  E,
227
229
  {
228
230
  onSearch: ae,
229
- onChange: U,
230
- label: O,
231
- ...h,
231
+ onChange: O,
232
+ label: G,
233
+ ...v,
232
234
  hideDefaultGroups: L
233
235
  }
234
236
  ) : null
235
237
  ] })
236
238
  ] }),
237
- R ? /* @__PURE__ */ i(
238
- R,
239
+ d ? /* @__PURE__ */ u(
240
+ d,
239
241
  {
240
- value: G,
242
+ value: b,
241
243
  onChange: w,
242
244
  selected: j,
243
- label: l,
245
+ label: i,
244
246
  ...y
245
247
  }
246
248
  ) : null,
247
- /* @__PURE__ */ d("div", { className: e.actions, children: [
248
- o ? /* @__PURE__ */ i(b, { className: e.actionsCancel, onClick: o, children: x }) : null,
249
- /* @__PURE__ */ i(
250
- b,
249
+ /* @__PURE__ */ h("div", { className: e.actions, children: [
250
+ a ? /* @__PURE__ */ u(A, { className: e.actionsCancel, onClick: a, children: x }) : null,
251
+ /* @__PURE__ */ u(
252
+ A,
251
253
  {
252
254
  className: e.actionsSubmit,
253
255
  onClick: H,
254
- disabled: !p[N] || !G,
256
+ disabled: !p[C] || !b,
255
257
  variant: "outlined",
256
258
  color: "primary",
257
- children: m
259
+ children: l
258
260
  }
259
261
  )
260
262
  ] })
261
263
  ] });
262
264
  }
263
- const ge = $(re, { name: "VdtEntityAccessEdit" })(se);
265
+ const ge = $(te, { name: "VdtEntityAccessEdit" })(se);
264
266
  export {
265
267
  ge as default
266
268
  };
@@ -1,67 +1,75 @@
1
- import { jsxs as D, jsx as o } from "react/jsx-runtime";
2
- import V from "clsx";
3
- import { withStyles as E } from "@material-ui/core";
4
- import { useSavedSearch as G } from "@vidispine/vdt-react";
5
- import L from "./SavedSearchList.js";
6
- import M from "./SaveSearchForm.js";
7
- const N = (e) => ({
1
+ import { jsxs as E, jsx as s } from "react/jsx-runtime";
2
+ import G from "clsx";
3
+ import { withStyles as L } from "@material-ui/core";
4
+ import { useSavedSearch as M } from "@vidispine/vdt-react";
5
+ import N from "./SavedSearchList.js";
6
+ import U from "./SaveSearchForm.js";
7
+ const $ = (e) => ({
8
8
  root: {
9
9
  padding: e.spacing(2)
10
10
  }
11
11
  });
12
- function U({
12
+ function k({
13
13
  classes: e,
14
14
  className: S,
15
- markerField: s,
16
- markerValue: c,
17
- itemSearchDocument: n,
18
- onSelect: d,
19
- onSaveSuccess: i = () => {
15
+ markerField: c,
16
+ markerValue: n,
17
+ itemSearchDocument: d,
18
+ onSelect: i,
19
+ onSaveSuccess: h = () => {
20
20
  },
21
- onSaveError: h = () => {
21
+ onSaveError: m = () => {
22
22
  },
23
- SearchListComponent: a = L,
24
- SearchListProps: m = {},
25
- SearchFormComponent: r = M,
26
- SearchFormProps: l = {},
23
+ SearchListComponent: a = N,
24
+ SearchListProps: l = {},
25
+ SearchFormComponent: r = U,
26
+ SearchFormProps: f = {},
27
27
  accessTranslate: v,
28
- extraMenuItems: f,
29
- isLoading: p = !1
28
+ extraMenuItems: p,
29
+ isLoading: u = !1,
30
+ onDeleteError: g = () => {
31
+ },
32
+ enableSearch2: t = !1
30
33
  }) {
31
34
  const {
32
- onDeleteSearch: u,
33
- onUpdateSearchMetadata: g,
34
- onGetSavedSearchSettings: x,
35
- onSaveSearch: P,
36
- searchProps: j
37
- } = G({ markerField: s, markerValue: c, initialSearchState: { rowsPerPage: 5 } }), w = ({ collectionId: t }) => x({ collectionId: t }).then((y) => d(y, t));
38
- return /* @__PURE__ */ D("div", { className: V(e.root, "VdtSavedSearch-root", S), children: [
39
- r && /* @__PURE__ */ o(
35
+ onDeleteSearch: x,
36
+ onUpdateSearchMetadata: P,
37
+ onGetSavedSearchSettings: j,
38
+ onSaveSearch: w,
39
+ searchProps: y
40
+ } = M(
41
+ { markerField: c, markerValue: n, initialSearchState: { rowsPerPage: 5 } },
42
+ t
43
+ ), D = ({ collectionId: o }) => j({ collectionId: o }).then((V) => i(V, o));
44
+ return /* @__PURE__ */ E("div", { className: G(e.root, "VdtSavedSearch-root", S), children: [
45
+ r && /* @__PURE__ */ s(
40
46
  r,
41
47
  {
42
- itemSearchDocument: n,
43
- onSuccess: i,
44
- onError: h,
45
- onSaveSearch: P,
46
- ...l
48
+ itemSearchDocument: d,
49
+ onSuccess: h,
50
+ onError: m,
51
+ onSaveSearch: w,
52
+ ...f
47
53
  }
48
54
  ),
49
- a && /* @__PURE__ */ o(
55
+ a && /* @__PURE__ */ s(
50
56
  a,
51
57
  {
52
- onSelect: w,
53
- onDelete: u,
54
- onUpdateSearchMetadata: g,
55
- searchProps: j,
58
+ onSelect: D,
59
+ onDelete: x,
60
+ onUpdateSearchMetadata: P,
61
+ searchProps: y,
56
62
  accessTranslate: v,
57
- extraMenuItems: f,
58
- isLoading: p,
59
- ...m
63
+ extraMenuItems: p,
64
+ isLoading: u,
65
+ onDeleteError: g,
66
+ enableSearch2: t,
67
+ ...l
60
68
  }
61
69
  )
62
70
  ] });
63
71
  }
64
- const B = E(N, { name: "VdtSavedSearchList" })(U);
72
+ const J = L($, { name: "VdtSavedSearchList" })(k);
65
73
  export {
66
- B as default
74
+ J as default
67
75
  };
@@ -1,51 +1,56 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { withStyles as f, List as p } from "@material-ui/core";
3
- import u from "../../collection/CollectionSearchPicker/index.js";
4
- import w from "./SavedSearchRow.js";
5
- const C = {};
6
- function I({
7
- searchProps: a,
8
- searchPlaceholderText: i = "Find searches",
9
- onSelect: n,
10
- onDelete: d,
11
- onUpdateSearchMetadata: s,
12
- RowComponent: m = w,
13
- RowProps: c = {},
14
- accessTranslate: h,
15
- extraMenuItems: l,
16
- isLoading: S,
17
- ...P
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { withStyles as p, List as u } from "@material-ui/core";
3
+ import w from "../../collection/CollectionSearchPicker/index.js";
4
+ import C from "./SavedSearchRow.js";
5
+ const I = {};
6
+ function g({
7
+ searchProps: i,
8
+ searchPlaceholderText: n = "Find searches",
9
+ onSelect: d,
10
+ onDelete: s,
11
+ onUpdateSearchMetadata: c,
12
+ RowComponent: m = C,
13
+ RowProps: h = {},
14
+ accessTranslate: l,
15
+ extraMenuItems: S,
16
+ isLoading: P,
17
+ onDeleteError: v,
18
+ ...f
18
19
  }) {
19
- return /* @__PURE__ */ t(
20
- u,
20
+ return /* @__PURE__ */ r(
21
+ w,
21
22
  {
22
- searchProps: a,
23
- searchPlaceholder: i,
24
- CollectionTableComponent: ({ collectionListType: o, onRefresh: r }) => /* @__PURE__ */ t(p, { children: o && o.collection && o.collection.map((e) => /* @__PURE__ */ t(
23
+ searchProps: i,
24
+ searchPlaceholder: n,
25
+ CollectionTableComponent: ({ collectionListType: o, onRefresh: a }) => /* @__PURE__ */ r(u, { children: o && o.collection && o.collection.map((e) => /* @__PURE__ */ r(
25
26
  m,
26
27
  {
27
28
  collectionType: e,
28
- onSelect: () => n({ collectionId: e.id }),
29
- onDelete: () => Promise.resolve(d({ collectionId: e.id }).then(r)),
30
- onUpdateSearchMetadata: (v) => Promise.resolve(
31
- s({
29
+ onSelect: () => d({ collectionId: e.id }),
30
+ onDelete: () => Promise.resolve(
31
+ s({ collectionId: e.id }).catch((t) => {
32
+ v(t);
33
+ }).then(a)
34
+ ),
35
+ onUpdateSearchMetadata: (t) => Promise.resolve(
36
+ c({
32
37
  collectionId: e.id,
33
- metadataDocument: v
34
- }).then(r)
38
+ metadataDocument: t
39
+ }).then(a)
35
40
  ),
36
- accessTranslate: h,
37
- extraMenuItems: l,
38
- isLoading: S,
39
- ...c
41
+ accessTranslate: l,
42
+ extraMenuItems: S,
43
+ isLoading: P,
44
+ ...h
40
45
  },
41
46
  e.id
42
47
  )) }),
43
48
  PaginationProps: { rowsPerPageOptions: [5, 10] },
44
- ...P
49
+ ...f
45
50
  }
46
51
  );
47
52
  }
48
- const j = f(C, { name: "VdtSavedSearchList" })(I);
53
+ const D = p(I, { name: "VdtSavedSearchList" })(g);
49
54
  export {
50
- j as default
55
+ D as default
51
56
  };
@@ -1,20 +1,20 @@
1
- import { jsxs as k, jsx as n } from "react/jsx-runtime";
2
- import { useState as U, useMemo as Y } from "react";
3
- import Z from "clsx";
4
- import { withStyles as z } from "@material-ui/core";
5
- import { parseMetadataType as P } from "@vidispine/vdt-js";
6
- import { compose as C, useGetSavedSearchFolders as ee, useSavedSearch as te } from "@vidispine/vdt-react";
7
- import ne from "../SavedSearch/SavedSearchRow.js";
8
- import ae from "./AddFolderRow.js";
9
- const $ = {
1
+ import { jsxs as z, jsx as n } from "react/jsx-runtime";
2
+ import { useState as $, useMemo as Z } from "react";
3
+ import P from "clsx";
4
+ import { withStyles as A } from "@material-ui/core";
5
+ import { parseMetadataType as C } from "@vidispine/vdt-js";
6
+ import { compose as ee, useGetSavedSearchFolders as te, useSavedSearch as ne } from "@vidispine/vdt-react";
7
+ import ae from "../SavedSearch/SavedSearchRow.js";
8
+ import de from "./AddFolderRow.js";
9
+ const k = {
10
10
  markerValue: "savedSearch",
11
11
  markerField: "eidr_referentType"
12
- }, de = {
12
+ }, oe = {
13
13
  indentationWidth: 20,
14
14
  indentationDepthStart: 1,
15
15
  defaultRowIndentationOffset: 15,
16
16
  defalutNewRowIndentation: 10
17
- }, oe = () => ({
17
+ }, ie = () => ({
18
18
  root: {
19
19
  display: "flex",
20
20
  width: "100%",
@@ -24,7 +24,7 @@ const $ = {
24
24
  display: "flex",
25
25
  width: "100%"
26
26
  }
27
- }), ie = (a) => ({
27
+ }), le = (a) => ({
28
28
  root: {
29
29
  display: "flex",
30
30
  width: "100%"
@@ -36,7 +36,7 @@ const $ = {
36
36
  marginRight: 5
37
37
  }
38
38
  });
39
- function le({
39
+ function re({
40
40
  className: a,
41
41
  classes: t,
42
42
  children: s,
@@ -49,7 +49,7 @@ function le({
49
49
  addNewRowIndentation: I
50
50
  }) {
51
51
  const w = d ? !0 : i >= u, o = d ? I : l;
52
- return S ? null : /* @__PURE__ */ k("div", { className: Z(a, t.root), children: [
52
+ return S ? null : /* @__PURE__ */ z("div", { className: P(a, t.root), children: [
53
53
  w && /* @__PURE__ */ n(
54
54
  "div",
55
55
  {
@@ -63,14 +63,14 @@ function le({
63
63
  s
64
64
  ] });
65
65
  }
66
- const re = C(
67
- z(ie, { name: "VdtFolderRowContentWrapper" })
68
- )(le);
69
- function A({
66
+ const ce = ee(
67
+ A(le, { name: "VdtFolderRowContentWrapper" })
68
+ )(re);
69
+ function G({
70
70
  classes: a,
71
71
  id: t,
72
72
  queryParams: s,
73
- markerProps: h = $,
73
+ markerProps: h = k,
74
74
  childFolders: S = [],
75
75
  metadata: i = {},
76
76
  itemSearchDocument: u = {},
@@ -80,40 +80,41 @@ function A({
80
80
  onSelect: w,
81
81
  onRemoveItem: o,
82
82
  indentationValues: F = {},
83
- indentationProps: r = de,
84
- FolderRowContentComponent: y = ne,
83
+ indentationProps: r = oe,
84
+ FolderRowContentComponent: y = ae,
85
85
  FolderRowContentProps: p = {},
86
- AddRowComponent: b = ae,
86
+ AddRowComponent: b = de,
87
87
  AddRowProps: g = {},
88
- FolderRowContentWrapperComponent: f = re,
88
+ FolderRowContentWrapperComponent: f = ce,
89
89
  FolderRowContentWrapperProps: m = {},
90
90
  isLoading: x,
91
- ...D
91
+ onDeleteError: M,
92
+ ...O
92
93
  }) {
93
- const [R, M] = U(), [V, N] = U({ id: null, type: null }), {
94
- createFolder: E,
95
- saveSearch: G,
96
- deleteFolder: O,
97
- removeItem: B,
94
+ const [R, V] = $(), [_, N] = $({ id: null, type: null }), {
95
+ createFolder: B,
96
+ saveSearch: D,
97
+ deleteFolder: E,
98
+ removeItem: W,
98
99
  subFolders: v = []
99
- } = ee({
100
+ } = te({
100
101
  childFolders: S,
101
102
  expand: R,
102
103
  queryParams: s,
103
104
  markerProps: h
104
- }), { onDeleteSearch: W, onUpdateSearchMetadata: _, onGetSavedSearchSettings: q } = te({
105
- ...$
106
- }), T = ({ collectionId: e }) => q({ collectionId: e }).then((X) => w(X, e)), j = P(i, { joinValue: "_", flat: !0 }), H = Y(() => {
107
- const { __child_collection_size: e = 0 } = j;
105
+ }), { onDeleteSearch: q, onUpdateSearchMetadata: T, onGetSavedSearchSettings: H } = ne({
106
+ ...k
107
+ }), j = ({ collectionId: e }) => H({ collectionId: e }).then((Y) => w(Y, e)), U = C(i, { joinValue: "_", flat: !0 }), J = Z(() => {
108
+ const { __child_collection_size: e = 0 } = U;
108
109
  return v.length > 0 || !R && e > 0;
109
- }, [v.length, R, j]), { defalutNewRowIndentation: J, defaultRowIndentationOffset: K, indentationWidth: L } = r, c = {
110
+ }, [v.length, R, U]), { defalutNewRowIndentation: K, defaultRowIndentationOffset: L, indentationWidth: Q } = r, c = {
110
111
  rowIndentation: F.rowIndentation || 0,
111
- addNewRowIndentation: F.addNewRowIndentation || J
112
- }, Q = {
112
+ addNewRowIndentation: F.addNewRowIndentation || K
113
+ }, X = {
113
114
  rowIndentation: c.addNewRowIndentation,
114
- addNewRowIndentation: c.addNewRowIndentation + L + K
115
+ addNewRowIndentation: c.addNewRowIndentation + Q + L
115
116
  };
116
- return /* @__PURE__ */ k("div", { className: a.root, children: [
117
+ return /* @__PURE__ */ z("div", { className: a.root, children: [
117
118
  {
118
119
  folder: /* @__PURE__ */ n(
119
120
  f,
@@ -129,15 +130,15 @@ function A({
129
130
  hideSubFolderSharing: I,
130
131
  type: l,
131
132
  collectionType: { id: t, metadata: i },
132
- disableDeletion: H,
133
- onDelete: () => Promise.resolve(O(t)).then(() => {
133
+ disableDeletion: J,
134
+ onDelete: () => Promise.resolve(E(t)).then(() => {
134
135
  o && o(t);
135
136
  }),
136
- onUpdateSearchMetadata: (e) => _({
137
+ onUpdateSearchMetadata: (e) => T({
137
138
  collectionId: t,
138
139
  metadataDocument: e
139
140
  }),
140
- onExpand: () => M((e) => !e),
141
+ onExpand: () => V((e) => !e),
141
142
  onAddRow: N,
142
143
  isLoading: x,
143
144
  ...p
@@ -158,11 +159,13 @@ function A({
158
159
  isFolderRow: !0,
159
160
  type: l,
160
161
  collectionType: { id: t, metadata: i },
161
- onSelect: () => T({ collectionId: t }),
162
- onDelete: () => Promise.resolve(W({ collectionId: t })).then(() => {
162
+ onSelect: () => j({ collectionId: t }),
163
+ onDelete: () => Promise.resolve(q({ collectionId: t })).then(() => {
163
164
  o && o(t);
165
+ }).catch((e) => {
166
+ M(e);
164
167
  }),
165
- onUpdateSearchMetadata: (e) => _({
168
+ onUpdateSearchMetadata: (e) => T({
166
169
  collectionId: t,
167
170
  metadataDocument: e
168
171
  }),
@@ -181,25 +184,25 @@ function A({
181
184
  folderDepth: d,
182
185
  ...c,
183
186
  ...r,
184
- hideWrapper: !V.id,
187
+ hideWrapper: !_.id,
185
188
  ...m,
186
189
  children: /* @__PURE__ */ n(
187
190
  b,
188
191
  {
189
192
  id: t,
190
- setExpand: M,
191
- saveSearch: G,
193
+ setExpand: V,
194
+ saveSearch: D,
192
195
  onAddRow: N,
193
- createFolder: E,
196
+ createFolder: B,
194
197
  itemSearchDocument: u,
195
- newField: V,
198
+ newField: _,
196
199
  ...g
197
200
  }
198
201
  )
199
202
  }
200
203
  ),
201
204
  v.map((e) => /* @__PURE__ */ n(
202
- A,
205
+ G,
203
206
  {
204
207
  classes: a,
205
208
  id: e.id,
@@ -211,9 +214,9 @@ function A({
211
214
  folderDepth: d + 1,
212
215
  type: e.type,
213
216
  hideSubFolderSharing: !0,
214
- handleSelect: T,
217
+ handleSelect: j,
215
218
  onSelect: w,
216
- onRemoveItem: () => B(e.id),
219
+ onRemoveItem: () => W(e.id),
217
220
  indentationProps: r,
218
221
  FolderRowContentComponent: y,
219
222
  FolderRowContentProps: p,
@@ -221,15 +224,16 @@ function A({
221
224
  AddRowProps: g,
222
225
  FolderRowContentWrapperComponent: f,
223
226
  FolderRowContentWrapperProps: m,
224
- indentationValues: Q,
227
+ indentationValues: X,
225
228
  isLoading: x,
226
- props: D
229
+ onDeleteError: M,
230
+ props: O
227
231
  },
228
232
  e.id
229
233
  ))
230
234
  ] });
231
235
  }
232
- const Ie = z(oe, { name: "VdtFolderRow" })(A);
236
+ const ye = A(ie, { name: "VdtFolderRow" })(G);
233
237
  export {
234
- Ie as default
238
+ ye as default
235
239
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-materialui",
3
- "version": "26.2.0-pre.3",
3
+ "version": "26.2.3",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@babel/runtime": "7.26.10",
39
- "@vidispine/proptypes": "26.2.0-pre.3",
40
- "@vidispine/vdt-api": "26.2.0-pre.3",
41
- "@vidispine/vdt-js": "26.2.0-pre.3",
42
- "@vidispine/vdt-react": "26.2.0-pre.3",
43
- "@vidispine/vdt-videojs-react": "26.2.0-pre.3",
39
+ "@vidispine/proptypes": "26.2.3",
40
+ "@vidispine/vdt-api": "26.2.3",
41
+ "@vidispine/vdt-js": "26.2.3",
42
+ "@vidispine/vdt-react": "26.2.3",
43
+ "@vidispine/vdt-videojs-react": "26.2.3",
44
44
  "clsx": "1.2.1",
45
45
  "filesize": "10.1.0",
46
46
  "final-form": "4.20.10",
@@ -74,11 +74,11 @@
74
74
  "@material-ui/icons": "4.11.3",
75
75
  "@material-ui/lab": "4.0.0-alpha.61",
76
76
  "@types/jest": "29.5.11",
77
- "@vidispine/eslint-config-mdx": "26.2.0-pre.3",
78
- "@vidispine/eslint-config-react": "26.2.0-pre.3",
79
- "@vidispine/eslint-config-storybook": "26.2.0-pre.3",
80
- "@vidispine/prettier-config": "26.2.0-pre.3",
81
- "@vidispine/proptypes": "26.2.0-pre.3",
77
+ "@vidispine/eslint-config-mdx": "26.2.3",
78
+ "@vidispine/eslint-config-react": "26.2.3",
79
+ "@vidispine/eslint-config-storybook": "26.2.3",
80
+ "@vidispine/prettier-config": "26.2.3",
81
+ "@vidispine/proptypes": "26.2.3",
82
82
  "@vitejs/plugin-react": "4.2.1",
83
83
  "@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
84
84
  "axios": "1.13.5",