@vidispine/vdt-materialui 23.3.0-pre.3 → 23.3.0-pre.5

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 d=require("react/jsx-runtime"),Q=require("react"),e=require("prop-types"),ue=require("@material-ui/core"),pe=require("@vidispine/proptypes"),p=require("@vidispine/vdt-js"),me=require("../Event/index.js"),he=require("../EventContainer/index.js"),ge=require("../EventMarker/index.js"),Te=require("../EventMarkerThumbnail/index.js"),ye=require("../EventMarkerTimeline/index.js"),Ee=g=>({timelineEventContent:{height:g.spacing(3),width:g.spacing(3)},event:{},eventContainer:{paddingTop:g.spacing(2),paddingBottom:g.spacing(2)},timeline:{},timelineEvent:{}});function F({className:g,classes:h,matchHighlights:I,itemType:u,eventFilter:M,noEventsText:U,EventContainerComponent:V,EventContainerProps:X,EventComponent:Y,EventProps:L,EventContentComponent:S,EventContentProps:P,EventMarkerThumbnailComponent:$,EventMarkerThumbnailProps:Z,EventMarkerTimelineComponent:K,EventMarkerTimelineProps:ee,EventMarkerComponent:te,EventMarkerProps:ne,EventListComponent:x,EventListProps:B,GroupedTimeline:q,GroupConfig:R,FieldLabelMap:ae,itemSearchDocument:O}){const{durationSeconds:se}=p.parseMetadataType(u.metadata,{flat:!0,arrayOnSingleValue:!1}),re=p.formatTimeCodeText(se).toSeconds(),{id:oe}=u,b=Q.useMemo(()=>{const{timespan:n=[],metadata:{timespan:s=[]}={}}=u;return I===!0?n.sort(({start:t},{start:l})=>p.formatTimeCodeText(t).samples-p.formatTimeCodeText(l).samples).filter(M):s.sort(({start:t},{start:l})=>p.formatTimeCodeText(t).toSeconds()-p.formatTimeCodeText(l).toSeconds()).filter(t=>n.some(({start:l,end:o})=>t.start===l&&t.end===o)).filter(M)},[u,M,I]),[w,ie]=Q.useState(null),_=[],T=[],le=()=>{var s,t;const n=[];return((s=O.text)==null?void 0:s.length)>0&&((t=O.text)==null||t.forEach(l=>{l.value.toLowerCase().replaceAll('"',"").split(" ").forEach(c=>n.push(c))})),n},ce=()=>{var s,t;const n=[];return((s=O.filter)==null?void 0:s.length)>0&&((t=O.filter)==null||t.forEach(l=>{l.field.forEach(o=>{o.value.forEach(c=>{const f=c.value.toLowerCase().replaceAll('"',"").split(" "),m=[];f.forEach(E=>m.push(E)),n.push({name:o.name,data:m})})})})),n},fe=le(),y=ce(),C=[],H=(n,s)=>s.every(t=>n.includes(t)),J=(n,s)=>{const t=[];return n.forEach(o=>{s.data.filter(c=>c.name===o.name&&o.data.every(f=>c.valueList.includes(f))).length>0&&t.push(o)}),n.length===t.length},de=n=>{let s=!1;const t=[];n.data.forEach(c=>{c.value.toLowerCase().split(/[\s,]+/).forEach(m=>t.push(m))});const o=(()=>{const c=[];return fe.forEach(f=>{C.length>0&&(C.includes(f)&&t.includes(f)&&f!==""&&c.push(f),!C.includes(f)&&f!==""&&c.push(f))}),c})();return o.length>0&&y.length>0&&(s=H(t,o)&&J(y,n)),o.length>0&&y.length<1&&(s=H(t,o)),o.length<1&&y.length>0&&(s=J(y,n)),s};if(q&&u.metadata.timespan.length>0){const n=u.metadata.timespan.find(t=>t.start==="-INF"&&t.end==="+INF"),s=p.parseTimespan(n,{joinValue:",",flat:!0});Object.keys(s).forEach(t=>{typeof s[t]=="string"&&t!=="user"&&t!=="created"&&t!=="duration"&&s[t].toLowerCase().split(/[\s,]+/).forEach(o=>{C.push(o)})}),u.metadata.timespan.forEach(t=>{const{start:l,end:o,field:c=[],group:f=[]}=t;if(o!=="+INF"&&l!=="-INF"){const m=[];c.length>0&&m.push("field"),f.length>0&&m.push("group");const E=p.parseTimespan(t,{joinValue:",",flat:!0}),W=r=>Object.keys(r).reduce((i,a)=>Array.isArray(r[a])?i:typeof r[a]=="object"&&r[a]!==null?[...i,...W(r[a])]:[...i,a],[]),z=W(E);let j=[];R.forEach(r=>{const i=Object.keys(E);r.name===i.toString()&&z.forEach(a=>{r.field.length>0&&r.field.includes(a)&&j.push(a)})});const D=[],N=r=>{let i=null;if(j.length<1&&(j=z),r instanceof Array)for(let a=0;a<r.length&&(i=N(r[a]),!i);a+=1);else for(const a in r)if(i===null){if(j.includes(a)){const A=ae.filter(v=>v.name===a),k=A.length>0?A[0].label:a;D.push({name:a,label:k,value:r[a],valueList:r[a].toLowerCase().replaceAll('"',"").split(" ")})}if((r[a]instanceof Object||r[a]instanceof Array)&&(i=N(r[a]),i))break}return i};N(E);const G={start:t.start,end:t.end,data:D};de(G)&&m.forEach(r=>{t[r].forEach(i=>{_.indexOf(i.name)===-1&&(_.push(i.name),T.push({key:i.name,data:[]}));const a=T.findIndex(v=>v.key===i.name);T[a].data.push(G);const k=R.filter(v=>v.name===i.name);k.length>0&&(T[a].label=k[0].label)})})}})}return d.jsxs("div",{className:g,children:[b.length>0?d.jsxs(d.Fragment,{children:[K&&d.jsx(K,{className:h.timeline,length:re,...ee,children:b.map((n,s)=>d.jsx(te,{className:h.timelineEvent,position:p.formatTimeCodeText(n.start).toSeconds(),onClick:()=>ie(s),...ne,children:$&&d.jsx($,{className:h.timelineEventContent,itemType:u,timespan:n,...Z})},n.start))}),!q&&x&&d.jsx(x,{classes:h,events:b,active:w,itemType:u,EventProps:L,EventContentComponent:S,EventContentProps:P,...B}),V&&d.jsx(V,{className:h.eventContainer,...X,children:b.map((n,s)=>d.jsx(Y,{className:h.event,isActive:s===w,timespan:n,itemType:u,EventContentComponent:S,EventContentProps:P,...L},[oe,n.start,n.end].join()))})]}):U,q&&x&&T.map(n=>d.jsxs("div",{children:[d.jsx(ue.Typography,{variant:"caption",style:{marginTop:40,marginBottom:10,display:"block"},noWrap:!0,children:n.label||n.key}),d.jsx(x,{classes:h,events:n.data,active:w,itemType:u,EventProps:L,EventContentComponent:S,EventContentProps:P,...B})]},n.key))]})}F.propTypes={classes:e.objectOf(e.string),className:e.string,itemType:pe.ItemType.isRequired,matchHighlights:e.bool,eventFilter:e.func,noEventsText:e.string,EventContainerComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventContainerProps:e.objectOf(e.any),EventComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventProps:e.objectOf(e.any),EventContentComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventContentProps:e.objectOf(e.any),EventMarkerThumbnailComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventMarkerThumbnailProps:e.objectOf(e.any),EventMarkerTimelineComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventMarkerTimelineProps:e.objectOf(e.any),EventMarkerComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventMarkerProps:e.objectOf(e.any),EventListComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventListProps:e.objectOf(e.any),GroupedTimeline:e.bool,GroupConfig:e.arrayOf(e.any),FieldLabelMap:e.arrayOf(e.any),itemSearchDocument:e.objectOf(e.any)};F.defaultProps={className:void 0,classes:{},matchHighlights:!0,eventFilter:()=>!0,noEventsText:null,EventContainerComponent:he.default,EventContainerProps:{},EventComponent:me.default,EventProps:{},EventContentComponent:null,EventContentProps:{},EventMarkerThumbnailComponent:Te.default,EventMarkerThumbnailProps:{},EventMarkerTimelineComponent:ye.default,EventMarkerTimelineProps:{},EventMarkerComponent:ge.default,EventMarkerProps:{},EventListComponent:!1,EventListProps:{},GroupedTimeline:!1,GroupConfig:[],FieldLabelMap:[],itemSearchDocument:{}};exports.default=F;exports.styles=Ee;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),Q=require("react"),e=require("prop-types"),ue=require("@material-ui/core"),pe=require("@vidispine/proptypes"),p=require("@vidispine/vdt-js"),me=require("../Event/index.js"),he=require("../EventContainer/index.js"),ge=require("../EventMarker/index.js"),Te=require("../EventMarkerThumbnail/index.js"),ye=require("../EventMarkerTimeline/index.js"),Ee=g=>({timelineEventContent:{height:g.spacing(3),width:g.spacing(3)},event:{},eventContainer:{paddingTop:g.spacing(2),paddingBottom:g.spacing(2)},timeline:{},timelineEvent:{}});function I({className:g,classes:h,matchHighlights:A,itemType:u,eventFilter:M,noEventsText:U,EventContainerComponent:V,EventContainerProps:X,EventComponent:Y,EventProps:L,EventContentComponent:S,EventContentProps:P,EventMarkerThumbnailComponent:$,EventMarkerThumbnailProps:Z,EventMarkerTimelineComponent:K,EventMarkerTimelineProps:ee,EventMarkerComponent:te,EventMarkerProps:ne,EventListComponent:x,EventListProps:B,GroupedTimeline:q,GroupConfig:R,FieldLabelMap:ae,itemSearchDocument:O}){const{durationSeconds:se}=p.parseMetadataType(u.metadata,{flat:!0,arrayOnSingleValue:!1}),re=p.formatTimeCodeText(se).toSeconds(),{id:oe}=u,b=Q.useMemo(()=>{const{timespan:n=[],metadata:{timespan:s=[]}={}}=u;return A===!0?n.sort(({start:t},{start:l})=>p.formatTimeCodeText(t).samples-p.formatTimeCodeText(l).samples).filter(M):s.sort(({start:t},{start:l})=>p.formatTimeCodeText(t).toSeconds()-p.formatTimeCodeText(l).toSeconds()).filter(t=>n.some(({start:l,end:o})=>t.start===l&&t.end===o)).filter(M)},[u,M,A]),[w,ie]=Q.useState(null),_=[],T=[],le=()=>{var s,t;const n=[];return((s=O.text)==null?void 0:s.length)>0&&((t=O.text)==null||t.forEach(l=>{l.value.toLowerCase().replace(/"/gm,"").split(" ").forEach(c=>n.push(c))})),n},ce=()=>{var s,t;const n=[];return((s=O.filter)==null?void 0:s.length)>0&&((t=O.filter)==null||t.forEach(l=>{l.field.forEach(o=>{o.value.forEach(c=>{const f=c.value.toLowerCase().replace(/"/gm,"").split(" "),m=[];f.forEach(E=>m.push(E)),n.push({name:o.name,data:m})})})})),n},fe=le(),y=ce(),C=[],H=(n,s)=>s.every(t=>n.includes(t)),J=(n,s)=>{const t=[];return n.forEach(o=>{s.data.filter(c=>c.name===o.name&&o.data.every(f=>c.valueList.includes(f))).length>0&&t.push(o)}),n.length===t.length},de=n=>{let s=!1;const t=[];n.data.forEach(c=>{c.value.toLowerCase().split(/[\s,]+/).forEach(m=>t.push(m))});const o=(()=>{const c=[];return fe.forEach(f=>{C.length>0&&(C.includes(f)&&t.includes(f)&&f!==""&&c.push(f),!C.includes(f)&&f!==""&&c.push(f))}),c})();return o.length>0&&y.length>0&&(s=H(t,o)&&J(y,n)),o.length>0&&y.length<1&&(s=H(t,o)),o.length<1&&y.length>0&&(s=J(y,n)),s};if(q&&u.metadata.timespan.length>0){const n=u.metadata.timespan.find(t=>t.start==="-INF"&&t.end==="+INF"),s=p.parseTimespan(n,{joinValue:",",flat:!0});Object.keys(s).forEach(t=>{typeof s[t]=="string"&&t!=="user"&&t!=="created"&&t!=="duration"&&s[t].toLowerCase().split(/[\s,]+/).forEach(o=>{C.push(o)})}),u.metadata.timespan.forEach(t=>{const{start:l,end:o,field:c=[],group:f=[]}=t;if(o!=="+INF"&&l!=="-INF"){const m=[];c.length>0&&m.push("field"),f.length>0&&m.push("group");const E=p.parseTimespan(t,{joinValue:",",flat:!0}),W=r=>Object.keys(r).reduce((i,a)=>Array.isArray(r[a])?i:typeof r[a]=="object"&&r[a]!==null?[...i,...W(r[a])]:[...i,a],[]),z=W(E);let j=[];R.forEach(r=>{const i=Object.keys(E);r.name===i.toString()&&z.forEach(a=>{r.field.length>0&&r.field.includes(a)&&j.push(a)})});const D=[],N=r=>{let i=null;if(j.length<1&&(j=z),r instanceof Array)for(let a=0;a<r.length&&(i=N(r[a]),!i);a+=1);else for(const a in r)if(i===null){if(j.includes(a)){const F=ae.filter(v=>v.name===a),k=F.length>0?F[0].label:a;D.push({name:a,label:k,value:r[a],valueList:r[a].toLowerCase().replace(/"/gm,"").split(" ")})}if((r[a]instanceof Object||r[a]instanceof Array)&&(i=N(r[a]),i))break}return i};N(E);const G={start:t.start,end:t.end,data:D};de(G)&&m.forEach(r=>{t[r].forEach(i=>{_.indexOf(i.name)===-1&&(_.push(i.name),T.push({key:i.name,data:[]}));const a=T.findIndex(v=>v.key===i.name);T[a].data.push(G);const k=R.filter(v=>v.name===i.name);k.length>0&&(T[a].label=k[0].label)})})}})}return d.jsxs("div",{className:g,children:[b.length>0?d.jsxs(d.Fragment,{children:[K&&d.jsx(K,{className:h.timeline,length:re,...ee,children:b.map((n,s)=>d.jsx(te,{className:h.timelineEvent,position:p.formatTimeCodeText(n.start).toSeconds(),onClick:()=>ie(s),...ne,children:$&&d.jsx($,{className:h.timelineEventContent,itemType:u,timespan:n,...Z})},n.start))}),!q&&x&&d.jsx(x,{classes:h,events:b,active:w,itemType:u,EventProps:L,EventContentComponent:S,EventContentProps:P,...B}),V&&d.jsx(V,{className:h.eventContainer,...X,children:b.map((n,s)=>d.jsx(Y,{className:h.event,isActive:s===w,timespan:n,itemType:u,EventContentComponent:S,EventContentProps:P,...L},[oe,n.start,n.end].join()))})]}):U,q&&x&&T.map(n=>d.jsxs("div",{children:[d.jsx(ue.Typography,{variant:"caption",style:{marginTop:40,marginBottom:10,display:"block"},noWrap:!0,children:n.label||n.key}),d.jsx(x,{classes:h,events:n.data,active:w,itemType:u,EventProps:L,EventContentComponent:S,EventContentProps:P,...B})]},n.key))]})}I.propTypes={classes:e.objectOf(e.string),className:e.string,itemType:pe.ItemType.isRequired,matchHighlights:e.bool,eventFilter:e.func,noEventsText:e.string,EventContainerComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventContainerProps:e.objectOf(e.any),EventComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventProps:e.objectOf(e.any),EventContentComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventContentProps:e.objectOf(e.any),EventMarkerThumbnailComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventMarkerThumbnailProps:e.objectOf(e.any),EventMarkerTimelineComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventMarkerTimelineProps:e.objectOf(e.any),EventMarkerComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventMarkerProps:e.objectOf(e.any),EventListComponent:e.oneOfType([e.elementType,e.oneOf([!1])]),EventListProps:e.objectOf(e.any),GroupedTimeline:e.bool,GroupConfig:e.arrayOf(e.any),FieldLabelMap:e.arrayOf(e.any),itemSearchDocument:e.objectOf(e.any)};I.defaultProps={className:void 0,classes:{},matchHighlights:!0,eventFilter:()=>!0,noEventsText:null,EventContainerComponent:he.default,EventContainerProps:{},EventComponent:me.default,EventProps:{},EventContentComponent:null,EventContentProps:{},EventMarkerThumbnailComponent:Te.default,EventMarkerThumbnailProps:{},EventMarkerTimelineComponent:ye.default,EventMarkerTimelineProps:{},EventMarkerComponent:ge.default,EventMarkerProps:{},EventListComponent:!1,EventListProps:{},GroupedTimeline:!1,GroupConfig:[],FieldLabelMap:[],itemSearchDocument:{}};exports.default=I;exports.styles=Ee;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),ge=require("clsx"),t=require("@material-ui/core"),r=require("@material-ui/icons"),B=require("@vidispine/vdt-js"),Ce=require("../../icons/FolderMultipleIcon.js"),fe=require("./SavedSearchAccessList.js"),ve=require("./ShareSearch.js"),z="SHARE_MENU",I="LISTACCESS_MENU",Me=i=>({root:{"&:hover $SubmitSearchIcon":{visibility:"visible"}},FolderIcon:{minWidth:32},SubmitSearchIcon:{visibility:"hidden"},inputDisabled:{cursor:"pointer"},disabled:{opacity:1},menuContext:{},menuExpand:{minWidth:i.breakpoints.values.sm/2},CancelEditIcon:{marginRight:i.spacing(.5),"&:hover":{color:"red"}},SubmitTitleIcon:{marginRight:i.spacing(.5),"&:hover":{color:"green"}},OptionsIcon:{marginRight:i.spacing(.5)}});function Ee({classes:i,collectionType:_,onSelect:U,onAddRow:V,onExpand:D,onDelete:W,onUpdateSearchMetadata:$,disableDeletion:p,type:u,accessTranslate:H,extraMenuItems:w=[],isFolderRow:G=!1,hideSubFolderSharing:J=!1,isLoading:K,allowDelete:S=()=>!0,allowShare:g=()=>!0,allowListAccess:x=()=>!0,allowEditTitle:C=()=>!0,ListAccessComponent:Y=fe.default,ListAccessProps:Q={},ShareComponent:X=ve.default,ShareProps:Z={},addFolderText:ee="Add folder",addSearchText:te="Add search",editTitleText:ne="Edit",shareText:ie="Share",listAccessText:se="Access",deleteText:f="Delete",backText:re="Back",FolderSingleIcon:oe=r.Folder,FolderMultiIcon:le=Ce.default,QueryIcon:ce=r.Search,CreateFolderIcon:v=r.CreateNewFolderOutlined,AddNewSearch:M=r.Search,SubmitSearchIcon:E=r.YoutubeSearchedFor,ListAccessIcon:b=r.Lock,SubmitTitleIcon:ae=r.Check,CancelEditIcon:de=r.Close,EditTitleIcon:y=r.Edit,ShareSearchIcon:L=r.Share,DeleteSearchIcon:k=r.Delete,OptionsIcon:ue=r.MoreVert}){const{metadata:T={}}=_,s=B.parseMetadataType(T,{joinValue:",",flat:!0}),N=d.useRef(),[h,l]=d.useState(null),[q,O]=d.useState(s.title||""),[m,c]=d.useState(null),[o,j]=d.useState(!1),xe=n=>{n.stopPropagation&&n.stopPropagation(),c(n.currentTarget)},a=(n=()=>null,Se="")=>A=>{A.stopPropagation&&A.stopPropagation(),c(null),n(Se)},R=()=>$(B.createMetadataType({title:q})).then(()=>j(!1)),he=a(()=>{j(!0),N.current.focus()}),me=()=>{O(s.title),j(!1)},je=a(W),F=a(U),Ie=a(D),P=n=>a(V,n),pe=n=>{n(T),c(null)};return e.jsxs(e.Fragment,{children:[e.jsxs(t.ListItem,{disableGutters:!0,dense:!0,className:i.root,button:!0,onClick:u==="query"?F:Ie,disabled:K,children:[G?{folder:e.jsx(t.ListItemIcon,{className:i.FolderIcon,children:p?e.jsx(le,{}):e.jsx(oe,{})}),query:e.jsx(t.ListItemIcon,{className:i.FolderIcon,children:e.jsx(ce,{})})}[u]:E&&e.jsx(t.ListItemIcon,{children:e.jsx(t.IconButton,{size:"small",onClick:F,children:e.jsx(E,{className:i.SubmitSearchIcon})})}),e.jsx(t.ListItemText,{primary:e.jsx(t.TextField,{fullWidth:!0,value:q,onChange:o?n=>O(n.target.value):void 0,onClick:o?n=>n.stopPropagation():void 0,onKeyPress:n=>{n.key==="Enter"&&(n.preventDefault(),R())},InputProps:{inputProps:{disabled:!o,ref:N,className:ge(i.input,{[i.inputDisabled]:!o})},disableUnderline:!o,endAdornment:e.jsx(t.InputAdornment,{position:"end",children:o?e.jsxs(e.Fragment,{children:[e.jsx(t.ButtonBase,{size:"small",onClick:me,children:e.jsx(de,{className:i.CancelEditIcon})}),e.jsx(t.ButtonBase,{size:"small",onClick:R,children:e.jsx(ae,{className:i.SubmitTitleIcon})})]}):[g,x,S,C].some(n=>n(s))&&e.jsx(t.ButtonBase,{size:"small",onClick:xe,children:e.jsx(ue,{className:i.OptionsIcon})})})}})})]}),e.jsx(t.Menu,{anchorEl:m,open:!!m&&h===null,keepMounted:!0,onClose:()=>c(null),getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:e.jsxs("div",{className:i.menuContext,children:[x(s)&&u==="folder"&&e.jsxs(t.MenuItem,{dense:!0,onClick:P({id:s.collectionId,type:"folder"}),children:[v?e.jsx(t.ListItemIcon,{children:e.jsx(v,{})}):null,e.jsx(t.ListItemText,{primary:ee})]},1),x(s)&&u==="folder"&&e.jsxs(t.MenuItem,{dense:!0,onClick:P({id:s.collectionId,type:"query"}),children:[M?e.jsx(t.ListItemIcon,{children:e.jsx(M,{})}):null,e.jsx(t.ListItemText,{primary:te})]},2),C(s)&&e.jsxs(t.MenuItem,{dense:!0,onClick:he,children:[y?e.jsx(t.ListItemIcon,{children:e.jsx(y,{})}):null,e.jsx(t.ListItemText,{primary:ne})]},3),x(s)&&e.jsxs(t.MenuItem,{dense:!0,onClick:()=>l(I),children:[b?e.jsx(t.ListItemIcon,{children:e.jsx(b,{})}):null,e.jsx(t.ListItemText,{primary:se})]},4),g(s)&&!J&&e.jsxs(t.MenuItem,{dense:!0,onClick:()=>l(z),children:[L?e.jsx(t.ListItemIcon,{children:e.jsx(L,{})}):null,e.jsx(t.ListItemText,{primary:ie})]},5),S(s)&&e.jsxs(t.MenuItem,{dense:!0,onClick:je,disabled:p,children:[k?e.jsx(t.ListItemIcon,{children:e.jsx(k,{})}):null,e.jsx(t.ListItemText,{primary:f})]},6),w.map(n=>e.jsxs(t.MenuItem,{dense:!0,onClick:()=>pe(n.function),children:[e.jsx(t.ListItemIcon,{children:e.jsx(n.icon,{})}),e.jsx(t.ListItemText,{primary:n.name})]},`extraMenu${n.id}`))]})}),e.jsx(t.Popover,{open:h!==null,anchorEl:m,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:()=>{l(null),c(null)},children:e.jsxs("div",{className:i.menuExpand,children:[e.jsxs(t.MenuItem,{onClick:()=>l(null),children:[e.jsx(t.ListItemIcon,{children:e.jsx(r.ChevronLeft,{})}),e.jsx(t.ListItemText,{primary:re})]}),e.jsx(t.Divider,{}),h===z&&e.jsx(X,{collectionId:s.collectionId,onSuccess:()=>l(I),...Z}),h===I&&e.jsx(Y,{entityAccessMenuText:f,collectionId:s.collectionId,accessTranslate:H,...Q})]})})]})}const be=t.withStyles(Me,{name:"VdtSavedSearchRow"})(Ee);exports.default=be;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react"),ge=require("clsx"),n=require("@material-ui/core"),s=require("@material-ui/icons"),z=require("@vidispine/vdt-js"),fe=require("../../icons/FolderMultipleIcon.js"),ve=require("./SavedSearchAccessList.js"),Me=require("./ShareSearch.js"),_="SHARE_MENU",p="LISTACCESS_MENU",be=i=>({root:{"&:hover $SubmitSearchIcon":{visibility:"visible"}},FolderIcon:{minWidth:32},SubmitSearchIcon:{visibility:"hidden"},inputDisabled:{cursor:"pointer"},disabled:{opacity:1},menuContext:{},menuExpand:{minWidth:i.breakpoints.values.sm/2},invisibleCursor:{caretColor:"transparent"},CancelEditIcon:{marginRight:i.spacing(.5),"&:hover":{color:"red"}},SubmitTitleIcon:{marginRight:i.spacing(.5),"&:hover":{color:"green"}},OptionsIcon:{marginRight:i.spacing(.5)}});function Ee({classes:i,collectionType:U,onSelect:V,onAddRow:D,onExpand:$,onDelete:W,onUpdateSearchMetadata:H,disableDeletion:S,type:l,accessTranslate:w,extraMenuItems:G=[],isFolderRow:J=!1,hideSubFolderSharing:K=!1,isLoading:Y,allowDelete:C=()=>!0,allowShare:g=()=>!0,allowListAccess:x=()=>!0,allowEditTitle:f=()=>!0,ListAccessComponent:Q=ve.default,ListAccessProps:X={},ShareComponent:Z=Me.default,ShareProps:ee={},addFolderText:ne="Add folder",addSearchText:te="Add search",editTitleText:ie="Edit",shareText:re="Share",listAccessText:se="Access",deleteText:v="Delete",backText:oe="Back",FolderSingleIcon:le=s.Folder,FolderMultiIcon:ce=fe.default,QueryIcon:ae=s.Search,CreateFolderIcon:M=s.CreateNewFolderOutlined,AddNewSearch:b=s.Search,SubmitSearchIcon:E=s.YoutubeSearchedFor,ListAccessIcon:L=s.Lock,SubmitTitleIcon:de=s.Check,CancelEditIcon:ue=s.Close,EditTitleIcon:k=s.Edit,ShareSearchIcon:y=s.Share,DeleteSearchIcon:T=s.Delete,OptionsIcon:xe=s.MoreVert}){const{metadata:N={}}=U,r=z.parseMetadataType(N,{joinValue:",",flat:!0}),O=u.useRef(),[h,c]=u.useState(null),[q,F]=u.useState(r.title||""),[m,a]=u.useState(null),[o,j]=u.useState(!1),he=t=>{t.stopPropagation&&t.stopPropagation(),a(t.currentTarget)},d=(t=()=>null,Ce="")=>B=>{B.stopPropagation&&B.stopPropagation(),a(null),t(Ce)},R=()=>H(z.createMetadataType({title:q})).then(()=>j(!1)),me=d(()=>{j(!0),O.current.focus()}),je=()=>{F(r.title),j(!1)},Ie=d(W),I=d(V),P=d($),A=t=>d(D,t),pe=t=>{t(N),a(null)},Se=l!=="folder"?I:P;return e.jsxs(e.Fragment,{children:[e.jsxs(n.ListItem,{disableGutters:!0,dense:!0,className:i.root,button:!0,onClick:l==="query"?I:P,disabled:Y,children:[J?{folder:e.jsx(n.ListItemIcon,{className:i.FolderIcon,children:S?e.jsx(ce,{}):e.jsx(le,{})}),query:e.jsx(n.ListItemIcon,{className:i.FolderIcon,children:e.jsx(ae,{})})}[l]:E&&e.jsx(n.ListItemIcon,{children:e.jsx(n.IconButton,{size:"small",onClick:I,children:e.jsx(E,{className:i.SubmitSearchIcon})})}),e.jsx(n.ListItemText,{primary:e.jsx(n.TextField,{fullWidth:!0,className:o?"":`${i.invisibleCursor}`,value:q,onChange:o?t=>F(t.target.value):void 0,onClick:o?t=>t.stopPropagation():Se,onKeyPress:t=>{t.key==="Enter"&&(t.preventDefault(),R())},InputProps:{inputProps:{ref:O,className:ge(i.input,{[i.inputDisabled]:!o})},disableUnderline:!o,endAdornment:e.jsx(n.InputAdornment,{position:"end",children:o?e.jsxs(e.Fragment,{children:[e.jsx(n.ButtonBase,{size:"small",onClick:je,children:e.jsx(ue,{className:i.CancelEditIcon})}),e.jsx(n.ButtonBase,{size:"small",onClick:R,children:e.jsx(de,{className:i.SubmitTitleIcon})})]}):[g,x,C,f].some(t=>t(r))&&e.jsx(n.ButtonBase,{size:"small",onClick:he,children:e.jsx(xe,{className:i.OptionsIcon})})})}})})]}),e.jsx(n.Menu,{anchorEl:m,open:!!m&&h===null,keepMounted:!0,onClose:()=>a(null),getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:e.jsxs("div",{className:i.menuContext,children:[x(r)&&l==="folder"&&e.jsxs(n.MenuItem,{dense:!0,onClick:A({id:r.collectionId,type:"folder"}),children:[M?e.jsx(n.ListItemIcon,{children:e.jsx(M,{})}):null,e.jsx(n.ListItemText,{primary:ne})]},1),x(r)&&l==="folder"&&e.jsxs(n.MenuItem,{dense:!0,onClick:A({id:r.collectionId,type:"query"}),children:[b?e.jsx(n.ListItemIcon,{children:e.jsx(b,{})}):null,e.jsx(n.ListItemText,{primary:te})]},2),f(r)&&e.jsxs(n.MenuItem,{dense:!0,onClick:me,children:[k?e.jsx(n.ListItemIcon,{children:e.jsx(k,{})}):null,e.jsx(n.ListItemText,{primary:ie})]},3),x(r)&&e.jsxs(n.MenuItem,{dense:!0,onClick:()=>c(p),children:[L?e.jsx(n.ListItemIcon,{children:e.jsx(L,{})}):null,e.jsx(n.ListItemText,{primary:se})]},4),g(r)&&!K&&e.jsxs(n.MenuItem,{dense:!0,onClick:()=>c(_),children:[y?e.jsx(n.ListItemIcon,{children:e.jsx(y,{})}):null,e.jsx(n.ListItemText,{primary:re})]},5),C(r)&&e.jsxs(n.MenuItem,{dense:!0,onClick:Ie,disabled:S,children:[T?e.jsx(n.ListItemIcon,{children:e.jsx(T,{})}):null,e.jsx(n.ListItemText,{primary:v})]},6),G.map(t=>e.jsxs(n.MenuItem,{dense:!0,onClick:()=>pe(t.function),children:[e.jsx(n.ListItemIcon,{children:e.jsx(t.icon,{})}),e.jsx(n.ListItemText,{primary:t.name})]},`extraMenu${t.id}`))]})}),e.jsx(n.Popover,{open:h!==null,anchorEl:m,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:()=>{c(null),a(null)},children:e.jsxs("div",{className:i.menuExpand,children:[e.jsxs(n.MenuItem,{onClick:()=>c(null),children:[e.jsx(n.ListItemIcon,{children:e.jsx(s.ChevronLeft,{})}),e.jsx(n.ListItemText,{primary:oe})]}),e.jsx(n.Divider,{}),h===_&&e.jsx(Z,{collectionId:r.collectionId,onSuccess:()=>c(p),...ee}),h===p&&e.jsx(Q,{entityAccessMenuText:v,collectionId:r.collectionId,accessTranslate:w,...X})]})})]})}const Le=n.withStyles(be,{name:"VdtSavedSearchRow"})(Ee);exports.default=Le;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("clsx"),v=require("lodash.get"),e=require("prop-types"),m=require("@vidispine/proptypes"),q=require("../QueryInput/index.js"),y=()=>({root:{}});function t({classes:o,className:u,field:n,onChange:l,InputComponent:a,...i}){const c=s=>({name:n.name,value:[{value:`*${s}*`}]}),p=v(n,"value.0.value","");return r.jsx("div",{className:d(o.root,u),children:r.jsx(a,{value:p.replaceAll("*",""),onChange:s=>l(c(s.target.value)),...i})})}t.propTypes={classes:e.objectOf(e.string),className:e.string,InputComponent:e.elementType,onChange:e.func.isRequired,field:m.SearchFieldType.isRequired};t.defaultProps={className:void 0,classes:{},InputComponent:q.default};exports.default=t;exports.styles=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),d=require("clsx"),m=require("lodash.get"),e=require("prop-types"),v=require("@vidispine/proptypes"),g=require("../QueryInput/index.js"),q=()=>({root:{}});function t({classes:o,className:u,field:n,onChange:a,InputComponent:l,...i}){const c=s=>({name:n.name,value:[{value:`*${s}*`}]}),p=m(n,"value.0.value","");return r.jsx("div",{className:d(o.root,u),children:r.jsx(l,{value:p.replace(/\*/gm,""),onChange:s=>a(c(s.target.value)),...i})})}t.propTypes={classes:e.objectOf(e.string),className:e.string,InputComponent:e.elementType,onChange:e.func.isRequired,field:v.SearchFieldType.isRequired};t.defaultProps={className:void 0,classes:{},InputComponent:g.default};exports.default=t;exports.styles=q;
@@ -1,4 +1,4 @@
1
- import { jsxs as I, Fragment as de, jsx as d } from "react/jsx-runtime";
1
+ import { jsxs as A, Fragment as de, jsx as d } from "react/jsx-runtime";
2
2
  import { useMemo as he, useState as ue } from "react";
3
3
  import e from "prop-types";
4
4
  import { Typography as ge } from "@material-ui/core";
@@ -9,7 +9,7 @@ import ve from "../EventContainer/index.js";
9
9
  import Oe from "../EventMarker/index.js";
10
10
  import be from "../EventMarkerThumbnail/index.js";
11
11
  import Ce from "../EventMarkerTimeline/index.js";
12
- const Ie = (u) => ({
12
+ const Ae = (u) => ({
13
13
  timelineEventContent: {
14
14
  height: u.spacing(3),
15
15
  width: u.spacing(3)
@@ -67,7 +67,7 @@ function X({
67
67
  var r, t;
68
68
  const n = [];
69
69
  return ((r = b.text) == null ? void 0 : r.length) > 0 && ((t = b.text) == null || t.forEach((l) => {
70
- l.value.toLowerCase().replaceAll('"', "").split(" ").forEach((f) => n.push(f));
70
+ l.value.toLowerCase().replace(/"/gm, "").split(" ").forEach((f) => n.push(f));
71
71
  })), n;
72
72
  }, ce = () => {
73
73
  var r, t;
@@ -75,7 +75,7 @@ function X({
75
75
  return ((r = b.filter) == null ? void 0 : r.length) > 0 && ((t = b.filter) == null || t.forEach((l) => {
76
76
  l.field.forEach((s) => {
77
77
  s.value.forEach((f) => {
78
- const c = f.value.toLowerCase().replaceAll('"', "").split(" "), m = [];
78
+ const c = f.value.toLowerCase().replace(/"/gm, "").split(" "), m = [];
79
79
  c.forEach((T) => m.push(T)), n.push({ name: s.name, data: m });
80
80
  });
81
81
  });
@@ -123,29 +123,29 @@ function X({
123
123
  o.field.length > 0 && o.field.includes(a) && M.push(a);
124
124
  });
125
125
  });
126
- const J = [], A = (o) => {
126
+ const J = [], F = (o) => {
127
127
  let i = null;
128
128
  if (M.length < 1 && (M = G), o instanceof Array)
129
- for (let a = 0; a < o.length && (i = A(o[a]), !i); a += 1)
129
+ for (let a = 0; a < o.length && (i = F(o[a]), !i); a += 1)
130
130
  ;
131
131
  else
132
132
  for (const a in o)
133
133
  if (i === null) {
134
134
  if (M.includes(a)) {
135
- const F = re.filter((v) => v.name === a), L = F.length > 0 ? F[0].label : a;
135
+ const I = re.filter((v) => v.name === a), L = I.length > 0 ? I[0].label : a;
136
136
  J.push({
137
137
  name: a,
138
138
  label: L,
139
139
  value: o[a],
140
- valueList: o[a].toLowerCase().replaceAll('"', "").split(" ")
140
+ valueList: o[a].toLowerCase().replace(/"/gm, "").split(" ")
141
141
  });
142
142
  }
143
- if ((o[a] instanceof Object || o[a] instanceof Array) && (i = A(o[a]), i))
143
+ if ((o[a] instanceof Object || o[a] instanceof Array) && (i = F(o[a]), i))
144
144
  break;
145
145
  }
146
146
  return i;
147
147
  };
148
- A(T);
148
+ F(T);
149
149
  const Q = {
150
150
  start: t.start,
151
151
  end: t.end,
@@ -163,8 +163,8 @@ function X({
163
163
  }
164
164
  });
165
165
  }
166
- return /* @__PURE__ */ I("div", { className: u, children: [
167
- C.length > 0 ? /* @__PURE__ */ I(de, { children: [
166
+ return /* @__PURE__ */ A("div", { className: u, children: [
167
+ C.length > 0 ? /* @__PURE__ */ A(de, { children: [
168
168
  B && /* @__PURE__ */ d(
169
169
  B,
170
170
  {
@@ -219,7 +219,7 @@ function X({
219
219
  [ie, n.start, n.end].join()
220
220
  )) })
221
221
  ] }) : Y,
222
- P && O && E.map((n) => /* @__PURE__ */ I("div", { children: [
222
+ P && O && E.map((n) => /* @__PURE__ */ A("div", { children: [
223
223
  /* @__PURE__ */ d(
224
224
  ge,
225
225
  {
@@ -361,5 +361,5 @@ X.defaultProps = {
361
361
  };
362
362
  export {
363
363
  X as default,
364
- Ie as styles
364
+ Ae as styles
365
365
  };
@@ -1,13 +1,13 @@
1
- import { jsxs as r, Fragment as _, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as i, Fragment as $, jsx as e } from "react/jsx-runtime";
2
2
  import { useRef as ye, useState as f } from "react";
3
- import be from "clsx";
4
- import { withStyles as Me, ListItem as xe, ListItemIcon as o, IconButton as Ne, ListItemText as l, TextField as Oe, InputAdornment as Re, ButtonBase as S, Menu as Te, MenuItem as c, Popover as Ae, Divider as Fe } from "@material-ui/core";
5
- import { ChevronLeft as Pe, Folder as ze, Search as j, CreateNewFolderOutlined as Be, YoutubeSearchedFor as Ue, Lock as Ve, Check as De, Close as Le, Edit as _e, Share as je, Delete as qe, MoreVert as We } from "@material-ui/icons";
6
- import { parseMetadataType as $e, createMetadataType as He } from "@vidispine/vdt-js";
7
- import we from "../../icons/FolderMultipleIcon.js";
8
- import Ge from "./SavedSearchAccessList.js";
9
- import Ke from "./ShareSearch.js";
10
- const q = "SHARE_MENU", v = "LISTACCESS_MENU", Ye = (t) => ({
3
+ import Me from "clsx";
4
+ import { withStyles as Ne, ListItem as xe, ListItemIcon as o, IconButton as Oe, ListItemText as l, TextField as Fe, InputAdornment as Re, ButtonBase as v, Menu as Te, MenuItem as c, Popover as Ae, Divider as Pe } from "@material-ui/core";
5
+ import { ChevronLeft as ze, Folder as Be, Search as j, CreateNewFolderOutlined as Ue, YoutubeSearchedFor as Ve, Lock as De, Check as Le, Close as _e, Edit as $e, Share as je, Delete as qe, MoreVert as We } from "@material-ui/icons";
6
+ import { parseMetadataType as He, createMetadataType as we } from "@vidispine/vdt-js";
7
+ import Ge from "../../icons/FolderMultipleIcon.js";
8
+ import Ke from "./SavedSearchAccessList.js";
9
+ import Ye from "./ShareSearch.js";
10
+ const q = "SHARE_MENU", I = "LISTACCESS_MENU", Je = (r) => ({
11
11
  root: {
12
12
  "&:hover $SubmitSearchIcon": {
13
13
  visibility: "visible"
@@ -27,120 +27,123 @@ const q = "SHARE_MENU", v = "LISTACCESS_MENU", Ye = (t) => ({
27
27
  },
28
28
  menuContext: {},
29
29
  menuExpand: {
30
- minWidth: t.breakpoints.values.sm / 2
30
+ minWidth: r.breakpoints.values.sm / 2
31
+ },
32
+ invisibleCursor: {
33
+ caretColor: "transparent"
31
34
  },
32
35
  CancelEditIcon: {
33
- marginRight: t.spacing(0.5),
36
+ marginRight: r.spacing(0.5),
34
37
  "&:hover": {
35
38
  color: "red"
36
39
  }
37
40
  },
38
41
  SubmitTitleIcon: {
39
- marginRight: t.spacing(0.5),
42
+ marginRight: r.spacing(0.5),
40
43
  "&:hover": {
41
44
  color: "green"
42
45
  }
43
46
  },
44
47
  OptionsIcon: {
45
- marginRight: t.spacing(0.5)
48
+ marginRight: r.spacing(0.5)
46
49
  }
47
50
  });
48
- function Je({
49
- classes: t,
51
+ function Qe({
52
+ classes: r,
50
53
  collectionType: W,
51
- onSelect: $,
52
- onAddRow: H,
53
- onExpand: w,
54
- onDelete: G,
55
- onUpdateSearchMetadata: K,
56
- disableDeletion: I,
57
- type: h,
58
- accessTranslate: Y,
59
- extraMenuItems: J = [],
60
- isFolderRow: Q = !1,
61
- hideSubFolderSharing: X = !1,
62
- isLoading: Z,
63
- allowDelete: E = () => !0,
54
+ onSelect: H,
55
+ onAddRow: w,
56
+ onExpand: G,
57
+ onDelete: K,
58
+ onUpdateSearchMetadata: Y,
59
+ disableDeletion: E,
60
+ type: d,
61
+ accessTranslate: J,
62
+ extraMenuItems: Q = [],
63
+ isFolderRow: X = !1,
64
+ hideSubFolderSharing: Z = !1,
65
+ isLoading: ee,
66
+ allowDelete: b = () => !0,
64
67
  allowShare: k = () => !0,
65
68
  allowListAccess: m = () => !0,
66
69
  allowEditTitle: y = () => !0,
67
- ListAccessComponent: ee = Ge,
68
- ListAccessProps: ne = {},
69
- ShareComponent: te = Ke,
70
+ ListAccessComponent: ne = Ke,
71
+ ListAccessProps: re = {},
72
+ ShareComponent: te = Ye,
70
73
  ShareProps: ie = {},
71
- addFolderText: re = "Add folder",
72
- addSearchText: oe = "Add search",
73
- editTitleText: le = "Edit",
74
- shareText: ce = "Share",
75
- listAccessText: ae = "Access",
76
- deleteText: b = "Delete",
77
- backText: de = "Back",
78
- FolderSingleIcon: se = ze,
79
- FolderMultiIcon: ue = we,
80
- QueryIcon: he = j,
81
- CreateFolderIcon: M = Be,
74
+ addFolderText: oe = "Add folder",
75
+ addSearchText: le = "Add search",
76
+ editTitleText: ce = "Edit",
77
+ shareText: ae = "Share",
78
+ listAccessText: de = "Access",
79
+ deleteText: M = "Delete",
80
+ backText: se = "Back",
81
+ FolderSingleIcon: ue = Be,
82
+ FolderMultiIcon: he = Ge,
83
+ QueryIcon: me = j,
84
+ CreateFolderIcon: N = Ue,
82
85
  AddNewSearch: x = j,
83
- SubmitSearchIcon: N = Ue,
84
- ListAccessIcon: O = Ve,
85
- SubmitTitleIcon: me = De,
86
- CancelEditIcon: pe = Le,
87
- EditTitleIcon: R = _e,
86
+ SubmitSearchIcon: O = Ve,
87
+ ListAccessIcon: F = De,
88
+ SubmitTitleIcon: pe = Le,
89
+ CancelEditIcon: fe = _e,
90
+ EditTitleIcon: R = $e,
88
91
  ShareSearchIcon: T = je,
89
92
  DeleteSearchIcon: A = qe,
90
- OptionsIcon: fe = We
93
+ OptionsIcon: Ce = We
91
94
  }) {
92
- const { metadata: F = {} } = W, i = $e(F, { joinValue: ",", flat: !0 }), P = ye(), [p, d] = f(null), [z, B] = f(i.title || ""), [C, s] = f(null), [a, g] = f(!1), Ce = (n) => {
93
- n.stopPropagation && n.stopPropagation(), s(n.currentTarget);
94
- }, u = (n = () => null, ke = "") => (L) => {
95
- L.stopPropagation && L.stopPropagation(), s(null), n(ke);
96
- }, U = () => K(He({ title: z })).then(() => g(!1)), ge = u(() => {
97
- g(!0), P.current.focus();
98
- }), Se = () => {
99
- B(i.title), g(!1);
100
- }, ve = u(G), V = u($), Ie = u(w), D = (n) => u(H, n), Ee = (n) => {
101
- n(F), s(null);
102
- };
103
- return /* @__PURE__ */ r(_, { children: [
104
- /* @__PURE__ */ r(
95
+ const { metadata: P = {} } = W, t = He(P, { joinValue: ",", flat: !0 }), z = ye(), [p, s] = f(null), [B, U] = f(t.title || ""), [C, u] = f(null), [a, g] = f(!1), ge = (n) => {
96
+ n.stopPropagation && n.stopPropagation(), u(n.currentTarget);
97
+ }, h = (n = () => null, ke = "") => (_) => {
98
+ _.stopPropagation && _.stopPropagation(), u(null), n(ke);
99
+ }, V = () => Y(we({ title: B })).then(() => g(!1)), Se = h(() => {
100
+ g(!0), z.current.focus();
101
+ }), ve = () => {
102
+ U(t.title), g(!1);
103
+ }, Ie = h(K), S = h(H), D = h(G), L = (n) => h(w, n), Ee = (n) => {
104
+ n(P), u(null);
105
+ }, be = d !== "folder" ? S : D;
106
+ return /* @__PURE__ */ i($, { children: [
107
+ /* @__PURE__ */ i(
105
108
  xe,
106
109
  {
107
110
  disableGutters: !0,
108
111
  dense: !0,
109
- className: t.root,
112
+ className: r.root,
110
113
  button: !0,
111
- onClick: h === "query" ? V : Ie,
112
- disabled: Z,
114
+ onClick: d === "query" ? S : D,
115
+ disabled: ee,
113
116
  children: [
114
- Q ? {
115
- folder: /* @__PURE__ */ e(o, { className: t.FolderIcon, children: I ? /* @__PURE__ */ e(ue, {}) : /* @__PURE__ */ e(se, {}) }),
116
- query: /* @__PURE__ */ e(o, { className: t.FolderIcon, children: /* @__PURE__ */ e(he, {}) })
117
- }[h] : N && /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(Ne, { size: "small", onClick: V, children: /* @__PURE__ */ e(N, { className: t.SubmitSearchIcon }) }) }),
117
+ X ? {
118
+ folder: /* @__PURE__ */ e(o, { className: r.FolderIcon, children: E ? /* @__PURE__ */ e(he, {}) : /* @__PURE__ */ e(ue, {}) }),
119
+ query: /* @__PURE__ */ e(o, { className: r.FolderIcon, children: /* @__PURE__ */ e(me, {}) })
120
+ }[d] : O && /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(Oe, { size: "small", onClick: S, children: /* @__PURE__ */ e(O, { className: r.SubmitSearchIcon }) }) }),
118
121
  /* @__PURE__ */ e(
119
122
  l,
120
123
  {
121
124
  primary: /* @__PURE__ */ e(
122
- Oe,
125
+ Fe,
123
126
  {
124
127
  fullWidth: !0,
125
- value: z,
126
- onChange: a ? (n) => B(n.target.value) : void 0,
127
- onClick: a ? (n) => n.stopPropagation() : void 0,
128
+ className: a ? "" : `${r.invisibleCursor}`,
129
+ value: B,
130
+ onChange: a ? (n) => U(n.target.value) : void 0,
131
+ onClick: a ? (n) => n.stopPropagation() : be,
128
132
  onKeyPress: (n) => {
129
- n.key === "Enter" && (n.preventDefault(), U());
133
+ n.key === "Enter" && (n.preventDefault(), V());
130
134
  },
131
135
  InputProps: {
132
136
  inputProps: {
133
- disabled: !a,
134
- ref: P,
135
- className: be(t.input, { [t.inputDisabled]: !a })
137
+ ref: z,
138
+ className: Me(r.input, { [r.inputDisabled]: !a })
136
139
  },
137
140
  disableUnderline: !a,
138
- endAdornment: /* @__PURE__ */ e(Re, { position: "end", children: a ? /* @__PURE__ */ r(_, { children: [
139
- /* @__PURE__ */ e(S, { size: "small", onClick: Se, children: /* @__PURE__ */ e(pe, { className: t.CancelEditIcon }) }),
140
- /* @__PURE__ */ e(S, { size: "small", onClick: U, children: /* @__PURE__ */ e(me, { className: t.SubmitTitleIcon }) })
141
- ] }) : [k, m, E, y].some(
142
- (n) => n(i)
143
- ) && /* @__PURE__ */ e(S, { size: "small", onClick: Ce, children: /* @__PURE__ */ e(fe, { className: t.OptionsIcon }) }) })
141
+ endAdornment: /* @__PURE__ */ e(Re, { position: "end", children: a ? /* @__PURE__ */ i($, { children: [
142
+ /* @__PURE__ */ e(v, { size: "small", onClick: ve, children: /* @__PURE__ */ e(fe, { className: r.CancelEditIcon }) }),
143
+ /* @__PURE__ */ e(v, { size: "small", onClick: V, children: /* @__PURE__ */ e(pe, { className: r.SubmitTitleIcon }) })
144
+ ] }) : [k, m, b, y].some(
145
+ (n) => n(t)
146
+ ) && /* @__PURE__ */ e(v, { size: "small", onClick: ge, children: /* @__PURE__ */ e(Ce, { className: r.OptionsIcon }) }) })
144
147
  }
145
148
  }
146
149
  )
@@ -155,7 +158,7 @@ function Je({
155
158
  anchorEl: C,
156
159
  open: !!C && p === null,
157
160
  keepMounted: !0,
158
- onClose: () => s(null),
161
+ onClose: () => u(null),
159
162
  getContentAnchorEl: null,
160
163
  anchorOrigin: {
161
164
  vertical: "bottom",
@@ -165,48 +168,48 @@ function Je({
165
168
  vertical: "top",
166
169
  horizontal: "right"
167
170
  },
168
- children: /* @__PURE__ */ r("div", { className: t.menuContext, children: [
169
- m(i) && h === "folder" && /* @__PURE__ */ r(
171
+ children: /* @__PURE__ */ i("div", { className: r.menuContext, children: [
172
+ m(t) && d === "folder" && /* @__PURE__ */ i(
170
173
  c,
171
174
  {
172
175
  dense: !0,
173
- onClick: D({ id: i.collectionId, type: "folder" }),
176
+ onClick: L({ id: t.collectionId, type: "folder" }),
174
177
  children: [
175
- M ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(M, {}) }) : null,
176
- /* @__PURE__ */ e(l, { primary: re })
178
+ N ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(N, {}) }) : null,
179
+ /* @__PURE__ */ e(l, { primary: oe })
177
180
  ]
178
181
  },
179
182
  1
180
183
  ),
181
- m(i) && h === "folder" && /* @__PURE__ */ r(
184
+ m(t) && d === "folder" && /* @__PURE__ */ i(
182
185
  c,
183
186
  {
184
187
  dense: !0,
185
- onClick: D({ id: i.collectionId, type: "query" }),
188
+ onClick: L({ id: t.collectionId, type: "query" }),
186
189
  children: [
187
190
  x ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(x, {}) }) : null,
188
- /* @__PURE__ */ e(l, { primary: oe })
191
+ /* @__PURE__ */ e(l, { primary: le })
189
192
  ]
190
193
  },
191
194
  2
192
195
  ),
193
- y(i) && /* @__PURE__ */ r(c, { dense: !0, onClick: ge, children: [
196
+ y(t) && /* @__PURE__ */ i(c, { dense: !0, onClick: Se, children: [
194
197
  R ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(R, {}) }) : null,
195
- /* @__PURE__ */ e(l, { primary: le })
198
+ /* @__PURE__ */ e(l, { primary: ce })
196
199
  ] }, 3),
197
- m(i) && /* @__PURE__ */ r(c, { dense: !0, onClick: () => d(v), children: [
198
- O ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(O, {}) }) : null,
199
- /* @__PURE__ */ e(l, { primary: ae })
200
+ m(t) && /* @__PURE__ */ i(c, { dense: !0, onClick: () => s(I), children: [
201
+ F ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(F, {}) }) : null,
202
+ /* @__PURE__ */ e(l, { primary: de })
200
203
  ] }, 4),
201
- k(i) && !X && /* @__PURE__ */ r(c, { dense: !0, onClick: () => d(q), children: [
204
+ k(t) && !Z && /* @__PURE__ */ i(c, { dense: !0, onClick: () => s(q), children: [
202
205
  T ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(T, {}) }) : null,
203
- /* @__PURE__ */ e(l, { primary: ce })
206
+ /* @__PURE__ */ e(l, { primary: ae })
204
207
  ] }, 5),
205
- E(i) && /* @__PURE__ */ r(c, { dense: !0, onClick: ve, disabled: I, children: [
208
+ b(t) && /* @__PURE__ */ i(c, { dense: !0, onClick: Ie, disabled: E, children: [
206
209
  A ? /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(A, {}) }) : null,
207
- /* @__PURE__ */ e(l, { primary: b })
210
+ /* @__PURE__ */ e(l, { primary: M })
208
211
  ] }, 6),
209
- J.map((n) => /* @__PURE__ */ r(
212
+ Q.map((n) => /* @__PURE__ */ i(
210
213
  c,
211
214
  {
212
215
  dense: !0,
@@ -235,29 +238,29 @@ function Je({
235
238
  horizontal: "right"
236
239
  },
237
240
  onClose: () => {
238
- d(null), s(null);
241
+ s(null), u(null);
239
242
  },
240
- children: /* @__PURE__ */ r("div", { className: t.menuExpand, children: [
241
- /* @__PURE__ */ r(c, { onClick: () => d(null), children: [
242
- /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(Pe, {}) }),
243
- /* @__PURE__ */ e(l, { primary: de })
243
+ children: /* @__PURE__ */ i("div", { className: r.menuExpand, children: [
244
+ /* @__PURE__ */ i(c, { onClick: () => s(null), children: [
245
+ /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(ze, {}) }),
246
+ /* @__PURE__ */ e(l, { primary: se })
244
247
  ] }),
245
- /* @__PURE__ */ e(Fe, {}),
248
+ /* @__PURE__ */ e(Pe, {}),
246
249
  p === q && /* @__PURE__ */ e(
247
250
  te,
248
251
  {
249
- collectionId: i.collectionId,
250
- onSuccess: () => d(v),
252
+ collectionId: t.collectionId,
253
+ onSuccess: () => s(I),
251
254
  ...ie
252
255
  }
253
256
  ),
254
- p === v && /* @__PURE__ */ e(
255
- ee,
257
+ p === I && /* @__PURE__ */ e(
258
+ ne,
256
259
  {
257
- entityAccessMenuText: b,
258
- collectionId: i.collectionId,
259
- accessTranslate: Y,
260
- ...ne
260
+ entityAccessMenuText: M,
261
+ collectionId: t.collectionId,
262
+ accessTranslate: J,
263
+ ...re
261
264
  }
262
265
  )
263
266
  ] })
@@ -265,7 +268,7 @@ function Je({
265
268
  )
266
269
  ] });
267
270
  }
268
- const cn = Me(Ye, { name: "VdtSavedSearchRow" })(Je);
271
+ const an = Ne(Je, { name: "VdtSavedSearchRow" })(Qe);
269
272
  export {
270
- cn as default
273
+ an as default
271
274
  };
@@ -11,20 +11,20 @@ function t({
11
11
  classes: a,
12
12
  className: n,
13
13
  field: r,
14
- onChange: l,
15
- InputComponent: p,
16
- ...i
14
+ onChange: p,
15
+ InputComponent: i,
16
+ ...l
17
17
  }) {
18
18
  const m = (o) => ({
19
19
  name: r.name,
20
20
  value: [{ value: `*${o}*` }]
21
21
  }), u = f(r, "value.0.value", "");
22
22
  return /* @__PURE__ */ s("div", { className: c(a.root, n), children: /* @__PURE__ */ s(
23
- p,
23
+ i,
24
24
  {
25
- value: u.replaceAll("*", ""),
26
- onChange: (o) => l(m(o.target.value)),
27
- ...i
25
+ value: u.replace(/\*/gm, ""),
26
+ onChange: (o) => p(m(o.target.value)),
27
+ ...l
28
28
  }
29
29
  ) });
30
30
  }