@vidispine/vdt-materialui 25.4.4 → 25.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/item/ItemShapeTable/components/ItemShapeRow.js +1 -1
- package/dist/cjs/search/querybuilder/QueryBuilderCard/QueryBuilderCard.js +1 -1
- package/dist/es/item/ItemShapeTable/components/ItemShapeRow.js +49 -45
- package/dist/es/search/querybuilder/QueryBuilderCard/QueryBuilderCard.js +40 -38
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),x=require("react"),b=require("lodash.get"),l=require("@material-ui/core"),o=require("@material-ui/icons"),z=require("@vidispine/vdt-js"),w=require("../../ItemSourceTable/components/ShapeTypeTableBody.js"),B=require("./ItemShapeMenu.js");function R({shapeType:n,TableRowProps:f,canExpand:r=!0,onRemove:a,showDownload:C,itemId:c,storageListType:m,displayMethodTypes:g,storageMetadataKeys:S}){const{id:T}=n,i=x.useMemo(()=>z.parseShapeType(n),[n]),[d,p]=x.useState(!1),q=()=>p(s=>!s),{containerComponent:{file:t=[]}={}}=n;if(t.length===0){const{binaryComponent:s=[]}=n;s.length>0&&t.push(...s[0].file)}let u,h;t.length>0&&(u=b(t,"[0].uri[0]","undefined"),h=b(t,"[0].path","undefined"));const v=n.tag.join(", "),j=i.fileSize==="-1 B"?"Not Available":i.fileSize;return e.jsxs(e.Fragment,{children:[e.jsxs(l.TableRow,{...f,children:[e.jsx(l.TableCell,{children:r&&e.jsx(l.IconButton,{size:"small",onClick:q,children:d?e.jsx(o.ExpandMore,{}):e.jsx(o.ChevronRight,{})})}),e.jsx(l.TableCell,{children:v}),e.jsxs(l.Hidden,{smDown:!0,children:[e.jsx(l.TableCell,{children:i.containerFormat}),e.jsx(l.TableCell,{children:i.videoCodec}),e.jsx(l.TableCell,{children:i.audioCodec}),e.jsx(l.TableCell,{children:i.frameRate})]}),e.jsx(l.TableCell,{children:i.dimension}),e.jsx(l.TableCell,{children:j}),e.jsxs(l.TableCell,{children:[C&&e.jsx(l.IconButton,{size:"small",href:u,download:h,style:{visibility:i.fileSizeBytes?"visible":"hidden"},children:e.jsx(o.CloudDownload,{})}),a&&e.jsx(B.default,{shapeType:n,shapeId:T,itemId:c,onRemove:a})]})]}),r&&e.jsx(l.TableRow,{children:e.jsx(l.TableCell,{colSpan:9,children:e.jsx(l.Collapse,{in:d,timeout:"auto",unmountOnExit:!0,children:e.jsx(l.Box,{margin:1,children:e.jsx(l.Table,{size:"small",padding:"none",children:e.jsx(w.default,{shapeActualSize:j,shapeType:n,itemId:c,storageListType:m,displayMethodTypes:g,storageMetadataKeys:S})})})})})})]})}exports.default=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),y=require("react"),T=require("clsx"),e=require("prop-types"),a=require("@material-ui/core"),b=require("@vidispine/proptypes"),v=require("../QueryBuilder/index.js"),A=s=>({root:{padding:s.spacing(1)},resetButton:{},searchButton:{},DialogActions:{},errorButton:{color:s.palette.error.light,float:"left"},successButton:{color:s.palette.success.light,float:"left"}});function u({className:s,classes:o,resetText:h,searchText:g,onSubmit:l,itemSearchDocument:c,initialOperator:f,fields:m,groups:B,QueryBuilderProps:O,PaperProps:P,resetButtonProps:j,searchButtonProps:x,showGeneralOperator:N}){const[t,D]=y.useState(f),[i,p]=y.useState({operator:t,...c}),q=()=>{D(t.operation==="AND"?{operation:"OR"}:{operation:"AND"})},S=()=>{const r={...c,operator:{operation:t.operation==="NOT"?{operation:"AND"}:{operation:t.operation}}};p(r),l(r)},d=()=>{const r={...c,...i.toItemSearchDocument?i.toItemSearchDocument():i};r.operator.operation=t.operation,l(r)};return n.jsxs(a.Paper,{className:T(o.root,s),onKeyPress:r=>{r.key==="Enter"&&d()},variant:"outlined",elevation:0,square:!0,...P,children:[N&&n.jsx(a.Button,{className:t&&t.operation==="AND"?o.successButton:o.errorButton,edge:"end",onClick:q,size:"small",children:t&&t.operation}),n.jsx(v.default,{query:i,fields:m,groups:B,onChange:p,...O}),n.jsxs(a.DialogActions,{className:o.DialogActions,children:[n.jsx(a.Button,{className:o.resetButton,onClick:S,...j,children:h}),n.jsx(a.Button,{className:o.searchButton,variant:"contained",color:"primary",onClick:d,...x,children:g})]})]})}u.propTypes={classes:e.objectOf(e.string),className:e.string,resetText:e.string,searchText:e.string,onSubmit:e.func.isRequired,itemSearchDocument:b.ItemSearchType,initialOperator:e.objectOf(e.any),fields:e.arrayOf(e.shape({name:e.string,label:e.string,type:e.string})),groups:e.arrayOf(e.shape({name:e.string})),PaperProps:e.objectOf(e.any),QueryBuilderProps:e.objectOf(e.any),resetButtonProps:e.objectOf(e.any),searchButtonProps:e.objectOf(e.any),showGeneralOperator:e.bool};u.defaultProps={className:void 0,classes:{},resetText:"Reset",searchText:"Search",fields:void 0,groups:void 0,itemSearchDocument:{},initialOperator:{operation:"AND"},PaperProps:{},QueryBuilderProps:{},resetButtonProps:{},searchButtonProps:{},showGeneralOperator:!0};exports.default=u;exports.styles=A;
|
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, Fragment as I, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as M, useState as O } from "react";
|
|
3
3
|
import u from "lodash.get";
|
|
4
|
-
import { TableRow as
|
|
4
|
+
import { TableRow as p, TableCell as i, IconButton as g, Hidden as R, Collapse as A, Box as D, Table as F } from "@material-ui/core";
|
|
5
5
|
import { ExpandMore as k, ChevronRight as E, CloudDownload as H } from "@material-ui/icons";
|
|
6
6
|
import { parseShapeType as N } from "@vidispine/vdt-js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import q from "../../ItemSourceTable/components/ShapeTypeTableBody.js";
|
|
8
|
+
import y from "./ItemShapeMenu.js";
|
|
9
9
|
function V({
|
|
10
|
-
shapeType:
|
|
11
|
-
TableRowProps:
|
|
12
|
-
canExpand:
|
|
13
|
-
onRemove:
|
|
14
|
-
showDownload:
|
|
10
|
+
shapeType: n,
|
|
11
|
+
TableRowProps: S,
|
|
12
|
+
canExpand: d = !0,
|
|
13
|
+
onRemove: c,
|
|
14
|
+
showDownload: C,
|
|
15
15
|
itemId: a,
|
|
16
|
-
storageListType:
|
|
17
|
-
displayMethodTypes:
|
|
18
|
-
storageMetadataKeys:
|
|
16
|
+
storageListType: b,
|
|
17
|
+
displayMethodTypes: z,
|
|
18
|
+
storageMetadataKeys: w
|
|
19
19
|
}) {
|
|
20
|
-
const { id:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
const { id: x } = n, o = M(() => N(n), [n]), [h, B] = O(!1), v = () => B((t) => !t), { containerComponent: { file: l = [] } = {} } = n;
|
|
21
|
+
if (l.length === 0) {
|
|
22
|
+
const { binaryComponent: t = [] } = n;
|
|
23
|
+
t.length > 0 && l.push(...t[0].file);
|
|
24
|
+
}
|
|
25
|
+
let m, s;
|
|
26
|
+
l.length > 0 && (m = u(l, "[0].uri[0]", "undefined"), s = u(l, "[0].path", "undefined"));
|
|
27
|
+
const j = n.tag.join(", "), f = o.fileSize === "-1 B" ? "Not Available" : o.fileSize;
|
|
28
|
+
return /* @__PURE__ */ r(I, { children: [
|
|
29
|
+
/* @__PURE__ */ r(p, { ...S, children: [
|
|
30
|
+
/* @__PURE__ */ e(i, { children: d && /* @__PURE__ */ e(g, { size: "small", onClick: v, children: h ? /* @__PURE__ */ e(k, {}) : /* @__PURE__ */ e(E, {}) }) }),
|
|
31
|
+
/* @__PURE__ */ e(i, { children: j }),
|
|
32
|
+
/* @__PURE__ */ r(R, { smDown: !0, children: [
|
|
33
|
+
/* @__PURE__ */ e(i, { children: o.containerFormat }),
|
|
34
|
+
/* @__PURE__ */ e(i, { children: o.videoCodec }),
|
|
35
|
+
/* @__PURE__ */ e(i, { children: o.audioCodec }),
|
|
36
|
+
/* @__PURE__ */ e(i, { children: o.frameRate })
|
|
33
37
|
] }),
|
|
34
|
-
/* @__PURE__ */ e(i, { children:
|
|
35
|
-
/* @__PURE__ */ e(i, { children:
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
/* @__PURE__ */ e(i, { children: o.dimension }),
|
|
39
|
+
/* @__PURE__ */ e(i, { children: f }),
|
|
40
|
+
/* @__PURE__ */ r(i, { children: [
|
|
41
|
+
C && /* @__PURE__ */ e(
|
|
42
|
+
g,
|
|
39
43
|
{
|
|
40
44
|
size: "small",
|
|
41
45
|
href: m,
|
|
42
|
-
download:
|
|
43
|
-
style: { visibility:
|
|
46
|
+
download: s,
|
|
47
|
+
style: { visibility: o.fileSizeBytes ? "visible" : "hidden" },
|
|
44
48
|
children: /* @__PURE__ */ e(H, {})
|
|
45
49
|
}
|
|
46
50
|
),
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
c && /* @__PURE__ */ e(
|
|
52
|
+
y,
|
|
49
53
|
{
|
|
50
|
-
shapeType:
|
|
51
|
-
shapeId:
|
|
54
|
+
shapeType: n,
|
|
55
|
+
shapeId: x,
|
|
52
56
|
itemId: a,
|
|
53
|
-
onRemove:
|
|
57
|
+
onRemove: c
|
|
54
58
|
}
|
|
55
59
|
)
|
|
56
60
|
] })
|
|
57
61
|
] }),
|
|
58
|
-
|
|
62
|
+
d && /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
|
|
59
63
|
i,
|
|
60
64
|
{
|
|
61
65
|
colSpan: 9,
|
|
62
|
-
children: /* @__PURE__ */ e(A, { in:
|
|
63
|
-
|
|
66
|
+
children: /* @__PURE__ */ e(A, { in: h, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ e(D, { margin: 1, children: /* @__PURE__ */ e(F, { size: "small", padding: "none", children: /* @__PURE__ */ e(
|
|
67
|
+
q,
|
|
64
68
|
{
|
|
65
|
-
shapeActualSize:
|
|
66
|
-
shapeType:
|
|
69
|
+
shapeActualSize: f,
|
|
70
|
+
shapeType: n,
|
|
67
71
|
itemId: a,
|
|
68
|
-
storageListType:
|
|
69
|
-
displayMethodTypes:
|
|
70
|
-
storageMetadataKeys:
|
|
72
|
+
storageListType: b,
|
|
73
|
+
displayMethodTypes: z,
|
|
74
|
+
storageMetadataKeys: w
|
|
71
75
|
}
|
|
72
76
|
) }) }) })
|
|
73
77
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import S from "clsx";
|
|
4
4
|
import e from "prop-types";
|
|
5
|
-
import { Paper as I, Button as
|
|
5
|
+
import { Paper as I, Button as p, DialogActions as v } from "@material-ui/core";
|
|
6
6
|
import C from "@vidispine/proptypes";
|
|
7
7
|
import Q from "../QueryBuilder/index.js";
|
|
8
8
|
const E = (a) => ({
|
|
@@ -19,62 +19,64 @@ const E = (a) => ({
|
|
|
19
19
|
float: "left"
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
function
|
|
22
|
+
function f({
|
|
23
23
|
className: a,
|
|
24
24
|
classes: t,
|
|
25
|
-
resetText:
|
|
26
|
-
searchText:
|
|
27
|
-
onSubmit:
|
|
25
|
+
resetText: h,
|
|
26
|
+
searchText: y,
|
|
27
|
+
onSubmit: c,
|
|
28
28
|
itemSearchDocument: i,
|
|
29
|
-
initialOperator:
|
|
29
|
+
initialOperator: g,
|
|
30
30
|
fields: B,
|
|
31
31
|
groups: O,
|
|
32
32
|
QueryBuilderProps: P,
|
|
33
|
-
PaperProps:
|
|
34
|
-
resetButtonProps:
|
|
33
|
+
PaperProps: N,
|
|
34
|
+
resetButtonProps: D,
|
|
35
35
|
searchButtonProps: T,
|
|
36
36
|
showGeneralOperator: b
|
|
37
37
|
}) {
|
|
38
|
-
const [
|
|
39
|
-
operator:
|
|
38
|
+
const [o, j] = d(g), [n, l] = d({
|
|
39
|
+
operator: o,
|
|
40
40
|
...i
|
|
41
41
|
}), x = () => {
|
|
42
42
|
j(
|
|
43
|
-
|
|
43
|
+
o.operation === "AND" ? { operation: "OR" } : { operation: "AND" }
|
|
44
44
|
);
|
|
45
|
-
},
|
|
46
|
-
const
|
|
45
|
+
}, A = () => {
|
|
46
|
+
const r = {
|
|
47
47
|
...i,
|
|
48
|
-
operator:
|
|
48
|
+
operator: {
|
|
49
|
+
operation: o.operation === "NOT" ? { operation: "AND" } : { operation: o.operation }
|
|
50
|
+
}
|
|
49
51
|
};
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
const
|
|
52
|
+
l(r), c(r);
|
|
53
|
+
}, u = () => {
|
|
54
|
+
const r = {
|
|
53
55
|
...i,
|
|
54
56
|
...n.toItemSearchDocument ? n.toItemSearchDocument() : n
|
|
55
57
|
};
|
|
56
|
-
|
|
58
|
+
r.operator.operation = o.operation, c(r);
|
|
57
59
|
};
|
|
58
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ m(
|
|
59
61
|
I,
|
|
60
62
|
{
|
|
61
|
-
className:
|
|
62
|
-
onKeyPress: (
|
|
63
|
-
|
|
63
|
+
className: S(t.root, a),
|
|
64
|
+
onKeyPress: (r) => {
|
|
65
|
+
r.key === "Enter" && u();
|
|
64
66
|
},
|
|
65
67
|
variant: "outlined",
|
|
66
68
|
elevation: 0,
|
|
67
69
|
square: !0,
|
|
68
|
-
...
|
|
70
|
+
...N,
|
|
69
71
|
children: [
|
|
70
72
|
b && /* @__PURE__ */ s(
|
|
71
|
-
|
|
73
|
+
p,
|
|
72
74
|
{
|
|
73
|
-
className:
|
|
75
|
+
className: o && o.operation === "AND" ? t.successButton : t.errorButton,
|
|
74
76
|
edge: "end",
|
|
75
77
|
onClick: x,
|
|
76
78
|
size: "small",
|
|
77
|
-
children:
|
|
79
|
+
children: o && o.operation
|
|
78
80
|
}
|
|
79
81
|
),
|
|
80
82
|
/* @__PURE__ */ s(
|
|
@@ -83,21 +85,21 @@ function h({
|
|
|
83
85
|
query: n,
|
|
84
86
|
fields: B,
|
|
85
87
|
groups: O,
|
|
86
|
-
onChange:
|
|
88
|
+
onChange: l,
|
|
87
89
|
...P
|
|
88
90
|
}
|
|
89
91
|
),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */ s(
|
|
92
|
+
/* @__PURE__ */ m(v, { className: t.DialogActions, children: [
|
|
93
|
+
/* @__PURE__ */ s(p, { className: t.resetButton, onClick: A, ...D, children: h }),
|
|
92
94
|
/* @__PURE__ */ s(
|
|
93
|
-
|
|
95
|
+
p,
|
|
94
96
|
{
|
|
95
97
|
className: t.searchButton,
|
|
96
98
|
variant: "contained",
|
|
97
99
|
color: "primary",
|
|
98
|
-
onClick:
|
|
100
|
+
onClick: u,
|
|
99
101
|
...T,
|
|
100
|
-
children:
|
|
102
|
+
children: y
|
|
101
103
|
}
|
|
102
104
|
)
|
|
103
105
|
] })
|
|
@@ -105,7 +107,7 @@ function h({
|
|
|
105
107
|
}
|
|
106
108
|
);
|
|
107
109
|
}
|
|
108
|
-
|
|
110
|
+
f.propTypes = {
|
|
109
111
|
/**
|
|
110
112
|
* Override or extend the styles applied to the component.
|
|
111
113
|
*/
|
|
@@ -129,7 +131,7 @@ h.propTypes = {
|
|
|
129
131
|
searchButtonProps: e.objectOf(e.any),
|
|
130
132
|
showGeneralOperator: e.bool
|
|
131
133
|
};
|
|
132
|
-
|
|
134
|
+
f.defaultProps = {
|
|
133
135
|
className: void 0,
|
|
134
136
|
classes: {},
|
|
135
137
|
resetText: "Reset",
|
|
@@ -145,6 +147,6 @@ h.defaultProps = {
|
|
|
145
147
|
showGeneralOperator: !0
|
|
146
148
|
};
|
|
147
149
|
export {
|
|
148
|
-
|
|
150
|
+
f as default,
|
|
149
151
|
E as styles
|
|
150
152
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidispine/vdt-materialui",
|
|
3
|
-
"version": "25.4.
|
|
3
|
+
"version": "25.4.6",
|
|
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": "25.4.
|
|
40
|
-
"@vidispine/vdt-api": "25.4.
|
|
41
|
-
"@vidispine/vdt-js": "25.4.
|
|
42
|
-
"@vidispine/vdt-react": "25.4.
|
|
43
|
-
"@vidispine/vdt-videojs-react": "25.4.
|
|
39
|
+
"@vidispine/proptypes": "25.4.6",
|
|
40
|
+
"@vidispine/vdt-api": "25.4.6",
|
|
41
|
+
"@vidispine/vdt-js": "25.4.6",
|
|
42
|
+
"@vidispine/vdt-react": "25.4.6",
|
|
43
|
+
"@vidispine/vdt-videojs-react": "25.4.6",
|
|
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": "25.4.
|
|
78
|
-
"@vidispine/eslint-config-react": "25.4.
|
|
79
|
-
"@vidispine/eslint-config-storybook": "25.4.
|
|
80
|
-
"@vidispine/prettier-config": "25.4.
|
|
81
|
-
"@vidispine/proptypes": "25.4.
|
|
77
|
+
"@vidispine/eslint-config-mdx": "25.4.6",
|
|
78
|
+
"@vidispine/eslint-config-react": "25.4.6",
|
|
79
|
+
"@vidispine/eslint-config-storybook": "25.4.6",
|
|
80
|
+
"@vidispine/prettier-config": "25.4.6",
|
|
81
|
+
"@vidispine/proptypes": "25.4.6",
|
|
82
82
|
"@vitejs/plugin-react": "4.2.1",
|
|
83
83
|
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
|
|
84
84
|
"axios": "1.7.7",
|