@visns-studio/visns-components 1.4.13 → 1.4.14
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.
|
@@ -422,8 +422,8 @@ const DataGrid = ({
|
|
|
422
422
|
let date;
|
|
423
423
|
let filterEditor = null;
|
|
424
424
|
let filterEditorProps = null;
|
|
425
|
+
let fileUrl = null;
|
|
425
426
|
let icons = [];
|
|
426
|
-
let match;
|
|
427
427
|
let relationName;
|
|
428
428
|
let selectedDataSource = null;
|
|
429
429
|
let stage;
|
|
@@ -704,6 +704,30 @@ const DataGrid = ({
|
|
|
704
704
|
}
|
|
705
705
|
},
|
|
706
706
|
};
|
|
707
|
+
case "image":
|
|
708
|
+
return {
|
|
709
|
+
...commonProps,
|
|
710
|
+
name: column.id,
|
|
711
|
+
render: ({ data }) => {
|
|
712
|
+
if (data && data[column.id]) {
|
|
713
|
+
const fileUrl =
|
|
714
|
+
data[column.id][0]?.file_url ||
|
|
715
|
+
data[column.id]?.file_url;
|
|
716
|
+
|
|
717
|
+
if (fileUrl) {
|
|
718
|
+
return (
|
|
719
|
+
<span>
|
|
720
|
+
{parse(
|
|
721
|
+
`<img width="150" src="${fileUrl}" />`
|
|
722
|
+
)}
|
|
723
|
+
</span>
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
return null;
|
|
729
|
+
},
|
|
730
|
+
};
|
|
707
731
|
case "json":
|
|
708
732
|
return {
|
|
709
733
|
...commonProps,
|
|
@@ -569,8 +569,8 @@ const DataGrid = forwardRef(
|
|
|
569
569
|
let date;
|
|
570
570
|
let filterEditor = null;
|
|
571
571
|
let filterEditorProps = null;
|
|
572
|
+
let fileUrl = null;
|
|
572
573
|
let icons = [];
|
|
573
|
-
let match;
|
|
574
574
|
let relationName;
|
|
575
575
|
let selectedDataSource = null;
|
|
576
576
|
let stage;
|
|
@@ -868,6 +868,30 @@ const DataGrid = forwardRef(
|
|
|
868
868
|
}
|
|
869
869
|
},
|
|
870
870
|
};
|
|
871
|
+
case "image":
|
|
872
|
+
return {
|
|
873
|
+
...commonProps,
|
|
874
|
+
name: column.id,
|
|
875
|
+
render: ({ data }) => {
|
|
876
|
+
if (data && data[column.id]) {
|
|
877
|
+
const fileUrl =
|
|
878
|
+
data[column.id][0]?.file_url ||
|
|
879
|
+
data[column.id]?.file_url;
|
|
880
|
+
|
|
881
|
+
if (fileUrl) {
|
|
882
|
+
return (
|
|
883
|
+
<span>
|
|
884
|
+
{parse(
|
|
885
|
+
`<img width="150" src="${fileUrl}" />`
|
|
886
|
+
)}
|
|
887
|
+
</span>
|
|
888
|
+
);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
return null;
|
|
893
|
+
},
|
|
894
|
+
};
|
|
871
895
|
case "json":
|
|
872
896
|
return {
|
|
873
897
|
...commonProps,
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "^17.0.1"
|
|
36
36
|
},
|
|
37
37
|
"name": "@visns-studio/visns-components",
|
|
38
|
-
"version": "1.4.
|
|
38
|
+
"version": "1.4.14",
|
|
39
39
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
40
40
|
"main": "index.js",
|
|
41
41
|
"devDependencies": {},
|