@visns-studio/visns-components 1.1.6 → 1.1.8
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.
|
@@ -360,7 +360,7 @@ const DataGrid = (props) => {
|
|
|
360
360
|
header: column.label,
|
|
361
361
|
defaultFlex: 1,
|
|
362
362
|
link: column.link ? column.link : {},
|
|
363
|
-
|
|
363
|
+
minWidth:
|
|
364
364
|
column.width && column.width > 0
|
|
365
365
|
? column.width
|
|
366
366
|
: undefined,
|
|
@@ -383,7 +383,7 @@ const DataGrid = (props) => {
|
|
|
383
383
|
name: column.id,
|
|
384
384
|
header: column.label,
|
|
385
385
|
defaultFlex: 1,
|
|
386
|
-
|
|
386
|
+
minWidth:
|
|
387
387
|
column.width && column.width > 0
|
|
388
388
|
? column.width
|
|
389
389
|
: undefined,
|
|
@@ -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":
|
|
@@ -402,7 +405,7 @@ const DataGrid = (props) => {
|
|
|
402
405
|
name: column.id,
|
|
403
406
|
header: column.label,
|
|
404
407
|
defaultFlex: 1,
|
|
405
|
-
|
|
408
|
+
minWidth:
|
|
406
409
|
column.width && column.width > 0
|
|
407
410
|
? column.width
|
|
408
411
|
: undefined,
|
|
@@ -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":
|
|
@@ -421,7 +427,7 @@ const DataGrid = (props) => {
|
|
|
421
427
|
name: column.id,
|
|
422
428
|
header: column.label,
|
|
423
429
|
defaultFlex: 1,
|
|
424
|
-
|
|
430
|
+
minWidth:
|
|
425
431
|
column.width && column.width > 0
|
|
426
432
|
? column.width
|
|
427
433
|
: undefined,
|
|
@@ -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":
|
|
@@ -442,7 +451,7 @@ const DataGrid = (props) => {
|
|
|
442
451
|
name: column.id,
|
|
443
452
|
header: column.label,
|
|
444
453
|
defaultFlex: 1,
|
|
445
|
-
|
|
454
|
+
minWidth:
|
|
446
455
|
column.width && column.width > 0
|
|
447
456
|
? column.width
|
|
448
457
|
: undefined,
|
|
@@ -470,7 +479,7 @@ const DataGrid = (props) => {
|
|
|
470
479
|
name: column.id,
|
|
471
480
|
header: column.label,
|
|
472
481
|
defaultFlex: 1,
|
|
473
|
-
|
|
482
|
+
minWidth:
|
|
474
483
|
column.width && column.width > 0
|
|
475
484
|
? column.width
|
|
476
485
|
: undefined,
|
|
@@ -499,7 +508,7 @@ const DataGrid = (props) => {
|
|
|
499
508
|
name: column.id,
|
|
500
509
|
header: column.label,
|
|
501
510
|
defaultFlex: 1,
|
|
502
|
-
|
|
511
|
+
minWidth:
|
|
503
512
|
column.width && column.width > 0
|
|
504
513
|
? column.width
|
|
505
514
|
: undefined,
|
|
@@ -523,7 +532,7 @@ const DataGrid = (props) => {
|
|
|
523
532
|
name: column.id,
|
|
524
533
|
header: column.label,
|
|
525
534
|
defaultFlex: 1,
|
|
526
|
-
|
|
535
|
+
minWidth:
|
|
527
536
|
column.width && column.width > 0
|
|
528
537
|
? column.width
|
|
529
538
|
: undefined,
|
|
@@ -535,16 +544,23 @@ const DataGrid = (props) => {
|
|
|
535
544
|
name: column.id,
|
|
536
545
|
header: column.label,
|
|
537
546
|
defaultFlex: 1,
|
|
538
|
-
|
|
547
|
+
minWidth:
|
|
539
548
|
column.width && column.width > 0
|
|
540
549
|
? column.width
|
|
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":
|
|
@@ -552,7 +568,7 @@ const DataGrid = (props) => {
|
|
|
552
568
|
name: column.id,
|
|
553
569
|
header: column.label,
|
|
554
570
|
defaultFlex: 1,
|
|
555
|
-
|
|
571
|
+
minWidth:
|
|
556
572
|
column.width && column.width > 0
|
|
557
573
|
? column.width
|
|
558
574
|
: undefined,
|
|
@@ -572,7 +588,7 @@ const DataGrid = (props) => {
|
|
|
572
588
|
name: relationName,
|
|
573
589
|
header: column.label,
|
|
574
590
|
defaultFlex: 1,
|
|
575
|
-
|
|
591
|
+
minWidth:
|
|
576
592
|
column.width && column.width > 0
|
|
577
593
|
? column.width
|
|
578
594
|
: undefined,
|
|
@@ -604,7 +620,7 @@ const DataGrid = (props) => {
|
|
|
604
620
|
name: column.id,
|
|
605
621
|
header: column.label,
|
|
606
622
|
defaultFlex: 1,
|
|
607
|
-
|
|
623
|
+
minWidth:
|
|
608
624
|
column.width && column.width > 0
|
|
609
625
|
? column.width
|
|
610
626
|
: undefined,
|
|
@@ -626,7 +642,7 @@ const DataGrid = (props) => {
|
|
|
626
642
|
name: column.id,
|
|
627
643
|
header: column.label,
|
|
628
644
|
defaultFlex: 1,
|
|
629
|
-
|
|
645
|
+
minWidth:
|
|
630
646
|
column.width && column.width > 0
|
|
631
647
|
? column.width
|
|
632
648
|
: undefined,
|
|
@@ -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":
|
|
@@ -645,19 +664,23 @@ const DataGrid = (props) => {
|
|
|
645
664
|
name: column.id,
|
|
646
665
|
header: column.label,
|
|
647
666
|
defaultFlex: 1,
|
|
648
|
-
|
|
667
|
+
minWidth:
|
|
649
668
|
column.width && column.width > 0
|
|
650
669
|
? column.width
|
|
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:
|
|
@@ -665,7 +688,7 @@ const DataGrid = (props) => {
|
|
|
665
688
|
name: column.id,
|
|
666
689
|
header: column.label,
|
|
667
690
|
defaultFlex: 1,
|
|
668
|
-
|
|
691
|
+
minWidth:
|
|
669
692
|
column.width && column.width > 0
|
|
670
693
|
? column.width
|
|
671
694
|
: undefined,
|
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.8",
|
|
36
36
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
37
37
|
"main": "index.js",
|
|
38
38
|
"devDependencies": {},
|