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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),o=require("@material-ui/core"),n=require("./bitmovin_24.svg.js");function r(e){return t.jsx(o.SvgIcon,{component:n.default,...e})}exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),i=require("./bitmovin_24.svg.js");function u(e){return t.jsx("img",{src:i.default,alt:"Bitmovin",...e})}exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),o=require("@material-ui/core"),r=require("./foldermultiple_24.svg.js");function u(e){return t.jsx(o.SvgIcon,{component:r.default,...e})}exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),l=require("./foldermultiple_24.svg.js");function u(e){return t.jsx("img",{src:l.default,alt:"Folder Multiple",...e})}exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),o=require("@material-ui/core"),r=require("./mediaconvert_24.svg.js");function n(e){return t.jsx(o.SvgIcon,{component:r.default,...e})}exports.default=n;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),r=require("./mediaconvert_24.svg.js");function u(e){return t.jsx("img",{src:r.default,alt:"Media Convert",...e})}exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),i=require("@material-ui/core"),n=require("./vidispine_24.svg.js");function o(e){return t.jsx(i.SvgIcon,{component:n.default,...e})}exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),t=require("./vidispine_24.svg.js");function u(e){return i.jsx("img",{src:t.default,alt:"Vidispine",...e})}exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),M=require("clsx"),b=require("@material-ui/core"),m=require("@vidispine/vdt-react"),w=require("./SavedSearchList.js"),D=require("./SaveSearchForm.js"),R=e=>({root:{padding:e.spacing(2)}});function V({classes:e,className:c,markerField:o,markerValue:n,itemSearchDocument:S,onSelect:d,onSaveSuccess:i=()=>{},onSaveError:u=()=>{},SearchListComponent:r=w.default,SearchListProps:l={},SearchFormComponent:a=D.default,SearchFormProps:h={},accessTranslate:v,extraMenuItems:g}){const{onDeleteSearch:q,onUpdateSearchMetadata:f,onGetSavedSearchSettings:j,onSaveSearch:x,searchProps:P}=m.useSavedSearch({markerField:o,markerValue:n,initialSearchState:{rowsPerPage:5}}),p=({collectionId:s})=>j({collectionId:s}).then(y=>d(y,s));return t.jsxs("div",{className:M(e.root,"VdtSavedSearch-root",c),children:[a&&t.jsx(a,{itemSearchDocument:S,onSuccess:i,onError:u,onSaveSearch:x,...h}),r&&t.jsx(r,{onSelect:p,onDelete:q,onUpdateSearchMetadata:f,searchProps:P,accessTranslate:v,extraMenuItems:g,...l})]})}const _=b.withStyles(R,{name:"VdtSavedSearchList"})(V);exports.default=_;
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 +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"),m=require("../../collection/CollectionSearchPicker/index.js"),j=require("./SavedSearchRow.js"),x={};function f({searchProps:o,searchPlaceholderText:i="Find searches",onSelect:n,onDelete:d,onUpdateSearchMetadata:c,RowComponent:l=j.default,RowProps:u={},accessTranslate:S,extraMenuItems:h,...v}){return r.jsx(m.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:P=>Promise.resolve(c({collectionId:e.id,metadataDocument:P}).then(a)),accessTranslate:S,extraMenuItems:h,...u},e.id))}),PaginationProps:{rowsPerPageOptions:[5,10]},...v})}const g=s.withStyles(x,{name:"VdtSavedSearchList"})(f);exports.default=g;
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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),g=require("react"),X=require("clsx"),U=require("@material-ui/core"),Y=require("@vidispine/vdt-js"),m=require("@vidispine/vdt-react"),Z=require("../SavedSearch/SavedSearchRow.js"),P=require("./AddFolderRow.js"),O={markerValue:"savedSearch",markerField:"eidr_referentType"},C={indentationWidth:20,indentationDepthStart:1,defaultRowIndentationOffset:15,defalutNewRowIndentation:10},ee=()=>({root:{display:"flex",width:"100%",flexWrap:"wrap"},indentationContainer:{display:"flex",width:"100%"}}),te=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 ne({className:a,classes:t,children:c,indentationWidth:u,hideWrapper:x,folderDepth:o,indentationDepthStart:h,isAddRow:d,rowIndentation:s,addNewRowIndentation:I}){const w=d?!0:o>=h,i=d?I:s;return x?null:n.jsxs("div",{className:X(a,t.root),children:[w&&n.jsx("div",{className:t.indentation,style:{marginLeft:i,minWidth:u}}),c]})}const ae=m.compose(U.withStyles(te,{name:"VdtFolderRowContentWrapper"}))(ne);function $({classes:a,id:t,queryParams:c,markerProps:u=O,childFolders:x=[],metadata:o={},itemSearchDocument:h={},folderDepth:d=0,type:s="folder",hideSubFolderSharing:I,onSelect:w,onRemoveItem:i,indentationValues:b={},indentationProps:l=C,FolderRowContentComponent:y=Z.default,FolderRowContentProps:v={},AddRowComponent:q=P.default,AddRowProps:F={},FolderRowContentWrapperComponent:S=ae,FolderRowContentWrapperProps:f={},...k}){const[R,M]=g.useState(),[_,j]=g.useState({id:null,type:null}),{createFolder:z,saveSearch:A,deleteFolder:D,removeItem:E,subFolders:N=[]}=m.useGetSavedSearchFolders({childFolders:x,expand:R,queryParams:c,markerProps:u}),{onDeleteSearch:G,onUpdateSearchMetadata:V,onGetSavedSearchSettings:L}=m.useSavedSearch({...O}),p=({collectionId:e})=>L({collectionId:e}).then(Q=>w(Q,e)),T=Y.parseMetadataType(o,{joinValue:"_",flat:!0}),B=g.useMemo(()=>{const{__child_collection_size:e=0}=T;return N.length>0||!R&&e>0},[N.length,R,T]),{defalutNewRowIndentation:J,defaultRowIndentationOffset:W,indentationWidth:H}=l,r={rowIndentation:b.rowIndentation||0,addNewRowIndentation:b.addNewRowIndentation||J},K={rowIndentation:r.addNewRowIndentation,addNewRowIndentation:r.addNewRowIndentation+H+W};return n.jsxs("div",{className:a.root,children:[{folder:n.jsx(S,{folderDepth:d,...r,...l,...f,children:n.jsx(y,{isFolderRow:!0,hideSubFolderSharing:I,type:s,collectionType:{id:t,metadata:o},disableDeletion:B,onDelete:()=>Promise.resolve(D(t)).then(()=>{i&&i(t)}),onUpdateSearchMetadata:e=>V({collectionId:t,metadataDocument:e}),onExpand:()=>M(e=>!e),onAddRow:j,...v})}),query:n.jsx(S,{folderDepth:d,...r,...l,...f,children:n.jsx(y,{isFolderRow:!0,type:s,collectionType:{id:t,metadata:o},onSelect:()=>p({collectionId:t}),onDelete:()=>Promise.resolve(G({collectionId:t})).then(()=>{i&&i(t)}),onUpdateSearchMetadata:e=>V({collectionId:t,metadataDocument:e}),onAddRow:j,...v})})}[s],n.jsx(S,{isAddRow:!0,folderDepth:d,...r,...l,hideWrapper:!_.id,...f,children:n.jsx(q,{id:t,setExpand:M,saveSearch:A,onAddRow:j,createFolder:z,itemSearchDocument:h,newField:_,...F})}),N.map(e=>n.jsx($,{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:p,onSelect:w,onRemoveItem:()=>E(e.id),indentationProps:l,FolderRowContentComponent:y,FolderRowContentProps:v,AddRowComponent:q,AddRowProps:F,FolderRowContentWrapperComponent:S,FolderRowContentWrapperProps:f,indentationValues:K,props:k},e.id))]})}const de=U.withStyles(ee,{name:"VdtFolderRow"})($);exports.default=de;
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:v={},AddRowComponent:F=C.default,AddRowProps:M={},FolderRowContentWrapperComponent:S=de,FolderRowContentWrapperProps:f={},isLoading:R,...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:R,...v})}),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:R,...v})})}[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:v,AddRowComponent:F,AddRowProps:M,FolderRowContentWrapperComponent:S,FolderRowContentWrapperProps:f,indentationValues:Q,isLoading:R,props:z},e.id))]})}const ie=$.withStyles(te,{name:"VdtFolderRow"})(k);exports.default=ie;
@@ -1,9 +1,8 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { SvgIcon as m } from "@material-ui/core";
3
- import n from "./bitmovin_24.svg.js";
4
- function p(o) {
5
- return /* @__PURE__ */ t(m, { component: n, ...o });
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import t from "./bitmovin_24.svg.js";
3
+ function n(i) {
4
+ return /* @__PURE__ */ o("img", { src: t, alt: "Bitmovin", ...i });
6
5
  }
7
6
  export {
8
- p as default
7
+ n as default
9
8
  };
@@ -1,9 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { SvgIcon as t } from "@material-ui/core";
3
- import e from "./foldermultiple_24.svg.js";
4
- function p(o) {
5
- return /* @__PURE__ */ r(t, { component: e, ...o });
2
+ import o from "./foldermultiple_24.svg.js";
3
+ function i(l) {
4
+ return /* @__PURE__ */ r("img", { src: o, alt: "Folder Multiple", ...l });
6
5
  }
7
6
  export {
8
- p as default
7
+ i as default
9
8
  };
@@ -1,9 +1,8 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { SvgIcon as t } from "@material-ui/core";
3
- import n from "./mediaconvert_24.svg.js";
4
- function f(o) {
5
- return /* @__PURE__ */ r(t, { component: n, ...o });
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import t from "./mediaconvert_24.svg.js";
3
+ function n(r) {
4
+ return /* @__PURE__ */ o("img", { src: t, alt: "Media Convert", ...r });
6
5
  }
7
6
  export {
8
- f as default
7
+ n as default
9
8
  };
@@ -1,8 +1,7 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { SvgIcon as n } from "@material-ui/core";
3
- import r from "./vidispine_24.svg.js";
4
- function e(o) {
5
- return /* @__PURE__ */ i(n, { component: r, ...o });
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import n from "./vidispine_24.svg.js";
3
+ function e(i) {
4
+ return /* @__PURE__ */ r("img", { src: n, alt: "Vidispine", ...i });
6
5
  }
7
6
  export {
8
7
  e as default
@@ -1,15 +1,15 @@
1
- import { jsxs as y, jsx as o } from "react/jsx-runtime";
2
- import D from "clsx";
3
- import { withStyles as V } from "@material-ui/core";
4
- import { useSavedSearch as E } from "@vidispine/vdt-react";
5
- import G from "./SavedSearchList.js";
6
- import L from "./SaveSearchForm.js";
7
- const M = (e) => ({
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) => ({
8
8
  root: {
9
9
  padding: e.spacing(2)
10
10
  }
11
11
  });
12
- function N({
12
+ function U({
13
13
  classes: e,
14
14
  className: S,
15
15
  markerField: s,
@@ -20,46 +20,48 @@ function N({
20
20
  },
21
21
  onSaveError: h = () => {
22
22
  },
23
- SearchListComponent: r = G,
23
+ SearchListComponent: a = L,
24
24
  SearchListProps: m = {},
25
- SearchFormComponent: a = L,
25
+ SearchFormComponent: r = M,
26
26
  SearchFormProps: l = {},
27
27
  accessTranslate: v,
28
- extraMenuItems: p
28
+ extraMenuItems: f,
29
+ isLoading: p = !1
29
30
  }) {
30
31
  const {
31
- onDeleteSearch: f,
32
- onUpdateSearchMetadata: u,
33
- onGetSavedSearchSettings: g,
34
- onSaveSearch: x,
35
- searchProps: P
36
- } = E({ markerField: s, markerValue: c, initialSearchState: { rowsPerPage: 5 } }), j = ({ collectionId: t }) => g({ collectionId: t }).then((w) => d(w, t));
37
- return /* @__PURE__ */ y("div", { className: D(e.root, "VdtSavedSearch-root", S), children: [
38
- a && /* @__PURE__ */ o(
39
- a,
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(
40
+ r,
40
41
  {
41
42
  itemSearchDocument: n,
42
43
  onSuccess: i,
43
44
  onError: h,
44
- onSaveSearch: x,
45
+ onSaveSearch: P,
45
46
  ...l
46
47
  }
47
48
  ),
48
- r && /* @__PURE__ */ o(
49
- r,
49
+ a && /* @__PURE__ */ o(
50
+ a,
50
51
  {
51
- onSelect: j,
52
- onDelete: f,
53
- onUpdateSearchMetadata: u,
54
- searchProps: P,
52
+ onSelect: w,
53
+ onDelete: u,
54
+ onUpdateSearchMetadata: g,
55
+ searchProps: j,
55
56
  accessTranslate: v,
56
- extraMenuItems: p,
57
+ extraMenuItems: f,
58
+ isLoading: p,
57
59
  ...m
58
60
  }
59
61
  )
60
62
  ] });
61
63
  }
62
- const A = V(M, { name: "VdtSavedSearchList" })(N);
64
+ const B = E(N, { name: "VdtSavedSearchList" })(U);
63
65
  export {
64
- A as default
66
+ B as default
65
67
  };
@@ -1,49 +1,51 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { withStyles as v, List as f } from "@material-ui/core";
3
- import p from "../../collection/CollectionSearchPicker/index.js";
4
- import u from "./SavedSearchRow.js";
5
- const w = {};
6
- function C({
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
7
  searchProps: a,
8
8
  searchPlaceholderText: i = "Find searches",
9
9
  onSelect: n,
10
10
  onDelete: d,
11
11
  onUpdateSearchMetadata: s,
12
- RowComponent: m = u,
12
+ RowComponent: m = w,
13
13
  RowProps: c = {},
14
14
  accessTranslate: h,
15
15
  extraMenuItems: l,
16
- ...S
16
+ isLoading: S,
17
+ ...P
17
18
  }) {
18
19
  return /* @__PURE__ */ t(
19
- p,
20
+ u,
20
21
  {
21
22
  searchProps: a,
22
23
  searchPlaceholder: i,
23
- CollectionTableComponent: ({ collectionListType: o, onRefresh: r }) => /* @__PURE__ */ t(f, { children: o && o.collection && o.collection.map((e) => /* @__PURE__ */ t(
24
+ CollectionTableComponent: ({ collectionListType: o, onRefresh: r }) => /* @__PURE__ */ t(p, { children: o && o.collection && o.collection.map((e) => /* @__PURE__ */ t(
24
25
  m,
25
26
  {
26
27
  collectionType: e,
27
28
  onSelect: () => n({ collectionId: e.id }),
28
29
  onDelete: () => Promise.resolve(d({ collectionId: e.id }).then(r)),
29
- onUpdateSearchMetadata: (P) => Promise.resolve(
30
+ onUpdateSearchMetadata: (v) => Promise.resolve(
30
31
  s({
31
32
  collectionId: e.id,
32
- metadataDocument: P
33
+ metadataDocument: v
33
34
  }).then(r)
34
35
  ),
35
36
  accessTranslate: h,
36
37
  extraMenuItems: l,
38
+ isLoading: S,
37
39
  ...c
38
40
  },
39
41
  e.id
40
42
  )) }),
41
43
  PaginationProps: { rowsPerPageOptions: [5, 10] },
42
- ...S
44
+ ...P
43
45
  }
44
46
  );
45
47
  }
46
- const b = v(w, { name: "VdtSavedSearchList" })(C);
48
+ const j = f(C, { name: "VdtSavedSearchList" })(I);
47
49
  export {
48
- b as default
50
+ j as default
49
51
  };
@@ -1,20 +1,20 @@
1
- import { jsxs as $, jsx as n } from "react/jsx-runtime";
2
- import { useState as j, useMemo as X } from "react";
3
- import Y from "clsx";
4
- import { withStyles as k } from "@material-ui/core";
5
- import { parseMetadataType as Z } from "@vidispine/vdt-js";
6
- import { compose as P, useGetSavedSearchFolders as C, useSavedSearch as ee } from "@vidispine/vdt-react";
7
- import te from "../SavedSearch/SavedSearchRow.js";
8
- import ne from "./AddFolderRow.js";
9
- const U = {
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 $ = {
10
10
  markerValue: "savedSearch",
11
11
  markerField: "eidr_referentType"
12
- }, ae = {
12
+ }, de = {
13
13
  indentationWidth: 20,
14
14
  indentationDepthStart: 1,
15
15
  defaultRowIndentationOffset: 15,
16
16
  defalutNewRowIndentation: 10
17
- }, de = () => ({
17
+ }, oe = () => ({
18
18
  root: {
19
19
  display: "flex",
20
20
  width: "100%",
@@ -24,7 +24,7 @@ const U = {
24
24
  display: "flex",
25
25
  width: "100%"
26
26
  }
27
- }), oe = (a) => ({
27
+ }), ie = (a) => ({
28
28
  root: {
29
29
  display: "flex",
30
30
  width: "100%"
@@ -36,10 +36,10 @@ const U = {
36
36
  marginRight: 5
37
37
  }
38
38
  });
39
- function ie({
39
+ function le({
40
40
  className: a,
41
41
  classes: t,
42
- children: c,
42
+ children: s,
43
43
  indentationWidth: h,
44
44
  hideWrapper: S,
45
45
  folderDepth: i,
@@ -49,7 +49,7 @@ function ie({
49
49
  addNewRowIndentation: I
50
50
  }) {
51
51
  const w = d ? !0 : i >= u, o = d ? I : l;
52
- return S ? null : /* @__PURE__ */ $("div", { className: Y(a, t.root), children: [
52
+ return S ? null : /* @__PURE__ */ k("div", { className: Z(a, t.root), children: [
53
53
  w && /* @__PURE__ */ n(
54
54
  "div",
55
55
  {
@@ -60,17 +60,17 @@ function ie({
60
60
  }
61
61
  }
62
62
  ),
63
- c
63
+ s
64
64
  ] });
65
65
  }
66
- const le = P(
67
- k(oe, { name: "VdtFolderRowContentWrapper" })
68
- )(ie);
69
- function z({
66
+ const re = C(
67
+ z(ie, { name: "VdtFolderRowContentWrapper" })
68
+ )(le);
69
+ function A({
70
70
  classes: a,
71
71
  id: t,
72
- queryParams: c,
73
- markerProps: h = U,
72
+ queryParams: s,
73
+ markerProps: h = $,
74
74
  childFolders: S = [],
75
75
  metadata: i = {},
76
76
  itemSearchDocument: u = {},
@@ -79,46 +79,47 @@ function z({
79
79
  hideSubFolderSharing: I,
80
80
  onSelect: w,
81
81
  onRemoveItem: o,
82
- indentationValues: v = {},
83
- indentationProps: r = ae,
84
- FolderRowContentComponent: y = te,
82
+ indentationValues: F = {},
83
+ indentationProps: r = de,
84
+ FolderRowContentComponent: y = ne,
85
85
  FolderRowContentProps: p = {},
86
- AddRowComponent: g = ne,
87
- AddRowProps: F = {},
88
- FolderRowContentWrapperComponent: f = le,
86
+ AddRowComponent: b = ae,
87
+ AddRowProps: g = {},
88
+ FolderRowContentWrapperComponent: f = re,
89
89
  FolderRowContentWrapperProps: m = {},
90
- ...A
90
+ isLoading: x,
91
+ ...D
91
92
  }) {
92
- const [x, b] = j(), [M, R] = j({ id: null, type: null }), {
93
- createFolder: D,
94
- saveSearch: E,
95
- deleteFolder: G,
96
- removeItem: L,
97
- subFolders: N = []
98
- } = C({
93
+ const [R, M] = U(), [V, N] = U({ id: null, type: null }), {
94
+ createFolder: E,
95
+ saveSearch: G,
96
+ deleteFolder: O,
97
+ removeItem: B,
98
+ subFolders: v = []
99
+ } = ee({
99
100
  childFolders: S,
100
- expand: x,
101
- queryParams: c,
101
+ expand: R,
102
+ queryParams: s,
102
103
  markerProps: h
103
- }), { onDeleteSearch: O, onUpdateSearchMetadata: V, onGetSavedSearchSettings: B } = ee({
104
- ...U
105
- }), _ = ({ collectionId: e }) => B({ collectionId: e }).then((Q) => w(Q, e)), T = Z(i, { joinValue: "_", flat: !0 }), W = X(() => {
106
- const { __child_collection_size: e = 0 } = T;
107
- return N.length > 0 || !x && e > 0;
108
- }, [N.length, x, T]), { defalutNewRowIndentation: q, defaultRowIndentationOffset: H, indentationWidth: J } = r, s = {
109
- rowIndentation: v.rowIndentation || 0,
110
- addNewRowIndentation: v.addNewRowIndentation || q
111
- }, K = {
112
- rowIndentation: s.addNewRowIndentation,
113
- addNewRowIndentation: s.addNewRowIndentation + J + 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;
108
+ return v.length > 0 || !R && e > 0;
109
+ }, [v.length, R, j]), { defalutNewRowIndentation: J, defaultRowIndentationOffset: K, indentationWidth: L } = r, c = {
110
+ rowIndentation: F.rowIndentation || 0,
111
+ addNewRowIndentation: F.addNewRowIndentation || J
112
+ }, Q = {
113
+ rowIndentation: c.addNewRowIndentation,
114
+ addNewRowIndentation: c.addNewRowIndentation + L + K
114
115
  };
115
- return /* @__PURE__ */ $("div", { className: a.root, children: [
116
+ return /* @__PURE__ */ k("div", { className: a.root, children: [
116
117
  {
117
118
  folder: /* @__PURE__ */ n(
118
119
  f,
119
120
  {
120
121
  folderDepth: d,
121
- ...s,
122
+ ...c,
122
123
  ...r,
123
124
  ...m,
124
125
  children: /* @__PURE__ */ n(
@@ -128,16 +129,17 @@ function z({
128
129
  hideSubFolderSharing: I,
129
130
  type: l,
130
131
  collectionType: { id: t, metadata: i },
131
- disableDeletion: W,
132
- onDelete: () => Promise.resolve(G(t)).then(() => {
132
+ disableDeletion: H,
133
+ onDelete: () => Promise.resolve(O(t)).then(() => {
133
134
  o && o(t);
134
135
  }),
135
- onUpdateSearchMetadata: (e) => V({
136
+ onUpdateSearchMetadata: (e) => _({
136
137
  collectionId: t,
137
138
  metadataDocument: e
138
139
  }),
139
- onExpand: () => b((e) => !e),
140
- onAddRow: R,
140
+ onExpand: () => M((e) => !e),
141
+ onAddRow: N,
142
+ isLoading: x,
141
143
  ...p
142
144
  }
143
145
  )
@@ -147,7 +149,7 @@ function z({
147
149
  f,
148
150
  {
149
151
  folderDepth: d,
150
- ...s,
152
+ ...c,
151
153
  ...r,
152
154
  ...m,
153
155
  children: /* @__PURE__ */ n(
@@ -156,15 +158,16 @@ function z({
156
158
  isFolderRow: !0,
157
159
  type: l,
158
160
  collectionType: { id: t, metadata: i },
159
- onSelect: () => _({ collectionId: t }),
160
- onDelete: () => Promise.resolve(O({ collectionId: t })).then(() => {
161
+ onSelect: () => T({ collectionId: t }),
162
+ onDelete: () => Promise.resolve(W({ collectionId: t })).then(() => {
161
163
  o && o(t);
162
164
  }),
163
- onUpdateSearchMetadata: (e) => V({
165
+ onUpdateSearchMetadata: (e) => _({
164
166
  collectionId: t,
165
167
  metadataDocument: e
166
168
  }),
167
- onAddRow: R,
169
+ onAddRow: N,
170
+ isLoading: x,
168
171
  ...p
169
172
  }
170
173
  )
@@ -176,31 +179,31 @@ function z({
176
179
  {
177
180
  isAddRow: !0,
178
181
  folderDepth: d,
179
- ...s,
182
+ ...c,
180
183
  ...r,
181
- hideWrapper: !M.id,
184
+ hideWrapper: !V.id,
182
185
  ...m,
183
186
  children: /* @__PURE__ */ n(
184
- g,
187
+ b,
185
188
  {
186
189
  id: t,
187
- setExpand: b,
188
- saveSearch: E,
189
- onAddRow: R,
190
- createFolder: D,
190
+ setExpand: M,
191
+ saveSearch: G,
192
+ onAddRow: N,
193
+ createFolder: E,
191
194
  itemSearchDocument: u,
192
- newField: M,
193
- ...F
195
+ newField: V,
196
+ ...g
194
197
  }
195
198
  )
196
199
  }
197
200
  ),
198
- N.map((e) => /* @__PURE__ */ n(
199
- z,
201
+ v.map((e) => /* @__PURE__ */ n(
202
+ A,
200
203
  {
201
204
  classes: a,
202
205
  id: e.id,
203
- queryParams: c,
206
+ queryParams: s,
204
207
  markerProps: h,
205
208
  childFolders: e.subFolders,
206
209
  metadata: e.metadata,
@@ -208,24 +211,25 @@ function z({
208
211
  folderDepth: d + 1,
209
212
  type: e.type,
210
213
  hideSubFolderSharing: !0,
211
- handleSelect: _,
214
+ handleSelect: T,
212
215
  onSelect: w,
213
- onRemoveItem: () => L(e.id),
216
+ onRemoveItem: () => B(e.id),
214
217
  indentationProps: r,
215
218
  FolderRowContentComponent: y,
216
219
  FolderRowContentProps: p,
217
- AddRowComponent: g,
218
- AddRowProps: F,
220
+ AddRowComponent: b,
221
+ AddRowProps: g,
219
222
  FolderRowContentWrapperComponent: f,
220
223
  FolderRowContentWrapperProps: m,
221
- indentationValues: K,
222
- props: A
224
+ indentationValues: Q,
225
+ isLoading: x,
226
+ props: D
223
227
  },
224
228
  e.id
225
229
  ))
226
230
  ] });
227
231
  }
228
- const Se = k(de, { name: "VdtFolderRow" })(z);
232
+ const Ie = z(oe, { name: "VdtFolderRow" })(A);
229
233
  export {
230
- Se as default
234
+ Ie as default
231
235
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-materialui",
3
- "version": "23.3.0-pre.1",
3
+ "version": "23.3.0-pre.3",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.21.0",
38
- "@vidispine/proptypes": "23.3.0-pre.1",
39
- "@vidispine/vdt-api": "23.3.0-pre.1",
40
- "@vidispine/vdt-js": "23.3.0-pre.1",
41
- "@vidispine/vdt-react": "23.3.0-pre.1",
42
- "@vidispine/vdt-videojs-react": "23.3.0-pre.1",
38
+ "@vidispine/proptypes": "23.3.0-pre.3",
39
+ "@vidispine/vdt-api": "23.3.0-pre.3",
40
+ "@vidispine/vdt-js": "23.3.0-pre.3",
41
+ "@vidispine/vdt-react": "23.3.0-pre.3",
42
+ "@vidispine/vdt-videojs-react": "23.3.0-pre.3",
43
43
  "clsx": "^1.2.1",
44
44
  "core-js": "^3.28.0",
45
45
  "filesize": "^10.0.6",
@@ -71,11 +71,11 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/jest": "28.1.8",
74
- "@vidispine/eslint-config-mdx": "23.3.0-pre.1",
75
- "@vidispine/eslint-config-react": "23.3.0-pre.1",
76
- "@vidispine/eslint-config-storybook": "23.3.0-pre.1",
77
- "@vidispine/prettier-config": "23.3.0-pre.1",
78
- "@vidispine/proptypes": "23.3.0-pre.1",
74
+ "@vidispine/eslint-config-mdx": "23.3.0-pre.3",
75
+ "@vidispine/eslint-config-react": "23.3.0-pre.3",
76
+ "@vidispine/eslint-config-storybook": "23.3.0-pre.3",
77
+ "@vidispine/prettier-config": "23.3.0-pre.3",
78
+ "@vidispine/proptypes": "23.3.0-pre.3",
79
79
  "@vitejs/plugin-react": "3.1.0",
80
80
  "@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
81
81
  "axios": "0.21.4",
@@ -92,7 +92,7 @@
92
92
  "moment-duration-format": "2.3.2",
93
93
  "prettier": "2.8.4",
94
94
  "prop-types": "15.8.1",
95
- "vite": "4.3.1"
95
+ "vite": "4.3.9"
96
96
  },
97
97
  "scarfSettings": {
98
98
  "enabled": false