@visns-studio/visns-components 1.4.13 → 1.4.15
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;
|
|
@@ -612,6 +612,8 @@ const DataGrid = forwardRef(
|
|
|
612
612
|
if (data.postcode) {
|
|
613
613
|
value += `${data.postcode} `;
|
|
614
614
|
}
|
|
615
|
+
|
|
616
|
+
return <span>{value}</span>;
|
|
615
617
|
},
|
|
616
618
|
};
|
|
617
619
|
case "age":
|
|
@@ -868,6 +870,30 @@ const DataGrid = forwardRef(
|
|
|
868
870
|
}
|
|
869
871
|
},
|
|
870
872
|
};
|
|
873
|
+
case "image":
|
|
874
|
+
return {
|
|
875
|
+
...commonProps,
|
|
876
|
+
name: column.id,
|
|
877
|
+
render: ({ data }) => {
|
|
878
|
+
if (data && data[column.id]) {
|
|
879
|
+
const fileUrl =
|
|
880
|
+
data[column.id][0]?.file_url ||
|
|
881
|
+
data[column.id]?.file_url;
|
|
882
|
+
|
|
883
|
+
if (fileUrl) {
|
|
884
|
+
return (
|
|
885
|
+
<span>
|
|
886
|
+
{parse(
|
|
887
|
+
`<img width="150" src="${fileUrl}" />`
|
|
888
|
+
)}
|
|
889
|
+
</span>
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
return null;
|
|
895
|
+
},
|
|
896
|
+
};
|
|
871
897
|
case "json":
|
|
872
898
|
return {
|
|
873
899
|
...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.15",
|
|
39
39
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
40
40
|
"main": "index.js",
|
|
41
41
|
"devDependencies": {},
|