@visns-studio/visns-components 1.1.6 → 1.1.7
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.
|
@@ -393,8 +393,11 @@ const DataGrid = (props) => {
|
|
|
393
393
|
data = numeral(data[column.id]).format(
|
|
394
394
|
"$0,0.00"
|
|
395
395
|
);
|
|
396
|
+
|
|
397
|
+
return <span>{data}</span>;
|
|
398
|
+
} else {
|
|
399
|
+
return null;
|
|
396
400
|
}
|
|
397
|
-
return <span>{data}</span>;
|
|
398
401
|
},
|
|
399
402
|
};
|
|
400
403
|
case "date":
|
|
@@ -412,8 +415,11 @@ const DataGrid = (props) => {
|
|
|
412
415
|
data = moment(data[column.id]).format(
|
|
413
416
|
column.format ? column.format : "DD-MM-YYYY"
|
|
414
417
|
);
|
|
418
|
+
|
|
419
|
+
return <span>{data}</span>;
|
|
420
|
+
} else {
|
|
421
|
+
return null;
|
|
415
422
|
}
|
|
416
|
-
return <span>{data}</span>;
|
|
417
423
|
},
|
|
418
424
|
};
|
|
419
425
|
case "datetime":
|
|
@@ -433,8 +439,11 @@ const DataGrid = (props) => {
|
|
|
433
439
|
? column.format
|
|
434
440
|
: "DD-MM-YYYY hh:mm A"
|
|
435
441
|
);
|
|
442
|
+
|
|
443
|
+
return <span>{data}</span>;
|
|
444
|
+
} else {
|
|
445
|
+
return null;
|
|
436
446
|
}
|
|
437
|
-
return <span>{data}</span>;
|
|
438
447
|
},
|
|
439
448
|
};
|
|
440
449
|
case "file":
|
|
@@ -541,10 +550,17 @@ const DataGrid = (props) => {
|
|
|
541
550
|
: undefined,
|
|
542
551
|
link: column.link ? column.link : {},
|
|
543
552
|
render: ({ data }) => {
|
|
544
|
-
if (
|
|
553
|
+
if (
|
|
554
|
+
data &&
|
|
555
|
+
column.options &&
|
|
556
|
+
column.options[data[column.id]]
|
|
557
|
+
) {
|
|
545
558
|
data = column.options[data[column.id]];
|
|
559
|
+
|
|
560
|
+
return <span>{data}</span>;
|
|
561
|
+
} else {
|
|
562
|
+
return null;
|
|
546
563
|
}
|
|
547
|
-
return <span>{data}</span>;
|
|
548
564
|
},
|
|
549
565
|
};
|
|
550
566
|
case "placeholder":
|
|
@@ -636,8 +652,11 @@ const DataGrid = (props) => {
|
|
|
636
652
|
data = moment(data[column.id]).format(
|
|
637
653
|
column.format ? column.format : "hh:mm A"
|
|
638
654
|
);
|
|
655
|
+
|
|
656
|
+
return <span>{data}</span>;
|
|
657
|
+
} else {
|
|
658
|
+
return null;
|
|
639
659
|
}
|
|
640
|
-
return <span>{data}</span>;
|
|
641
660
|
},
|
|
642
661
|
};
|
|
643
662
|
case "url":
|
|
@@ -651,13 +670,17 @@ const DataGrid = (props) => {
|
|
|
651
670
|
: undefined,
|
|
652
671
|
link: column.link ? column.link : {},
|
|
653
672
|
render: ({ data }) => {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
<
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
673
|
+
if (data) {
|
|
674
|
+
return (
|
|
675
|
+
<span>
|
|
676
|
+
<a href={data} target="_blank">
|
|
677
|
+
Link
|
|
678
|
+
</a>
|
|
679
|
+
</span>
|
|
680
|
+
);
|
|
681
|
+
} else {
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
661
684
|
},
|
|
662
685
|
};
|
|
663
686
|
default:
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"react-dom": ">=18.2.0"
|
|
33
33
|
},
|
|
34
34
|
"name": "@visns-studio/visns-components",
|
|
35
|
-
"version": "1.1.
|
|
35
|
+
"version": "1.1.7",
|
|
36
36
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
37
37
|
"main": "index.js",
|
|
38
38
|
"devDependencies": {},
|