@collectionspace/cspace-public-browser 3.2.0 → 3.3.0
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/cspacePublicBrowser.js +4 -4
- package/dist/cspacePublicBrowser.min.js +1 -1
- package/lib/components/detail/DetailPanel.js +12 -2
- package/lib/config/default.js +26 -3
- package/lib/config/materials.js +21 -1
- package/package.json +1 -1
- package/src/components/detail/DetailPanel.jsx +15 -2
- package/src/config/default.js +29 -2
- package/src/config/materials.js +21 -1
- package/styles/cspace/DetailPanel.css +13 -0
|
@@ -66,8 +66,18 @@ class DetailPanel extends _react.Component {
|
|
|
66
66
|
data
|
|
67
67
|
} = this.props;
|
|
68
68
|
const descFormatter = _config.default.get('detailDescription');
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const descriptionData = descFormatter && descFormatter(data);
|
|
70
|
+
if (descriptionData) {
|
|
71
|
+
const descriptions = Array.isArray(descriptionData)
|
|
72
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
73
|
+
? descriptionData.map((desc, idx) => /*#__PURE__*/_react.default.createElement("p", {
|
|
74
|
+
key: idx
|
|
75
|
+
}, desc)) : /*#__PURE__*/_react.default.createElement("p", null, descriptionData);
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
77
|
+
className: _DetailPanel.default.description
|
|
78
|
+
}, descriptions);
|
|
79
|
+
}
|
|
80
|
+
return undefined;
|
|
71
81
|
}
|
|
72
82
|
renderFieldList() {
|
|
73
83
|
const {
|
package/lib/config/default.js
CHANGED
|
@@ -343,9 +343,9 @@ var _default = exports.default = {
|
|
|
343
343
|
'collectionobjects_common:briefDescriptions': briefDescriptions
|
|
344
344
|
} = data;
|
|
345
345
|
if (briefDescriptions && briefDescriptions.length > 0) {
|
|
346
|
-
return briefDescriptions
|
|
346
|
+
return briefDescriptions;
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return [];
|
|
349
349
|
},
|
|
350
350
|
detailFields: {
|
|
351
351
|
fields: {
|
|
@@ -555,6 +555,20 @@ var _default = exports.default = {
|
|
|
555
555
|
format: (0, _formatHelpers.listOf)((0, _formatHelpers.valueAt)({
|
|
556
556
|
path: 'rightReproductionStatement'
|
|
557
557
|
}))
|
|
558
|
+
},
|
|
559
|
+
relatedLinks: {
|
|
560
|
+
messages: (0, _reactIntl.defineMessages)({
|
|
561
|
+
label: {
|
|
562
|
+
"id": "detailField.relatedLinks.label",
|
|
563
|
+
"defaultMessage": "Related Links"
|
|
564
|
+
}
|
|
565
|
+
}),
|
|
566
|
+
field: 'collectionobjects_common:publishedRelatedLinkGroupList',
|
|
567
|
+
format: (0, _formatHelpers.listOf)((0, _formatHelpers.linkText)({
|
|
568
|
+
urlFieldName: 'relatedLink',
|
|
569
|
+
textFieldName: 'descriptiveTitle',
|
|
570
|
+
type: 'external'
|
|
571
|
+
}))
|
|
558
572
|
}
|
|
559
573
|
},
|
|
560
574
|
groups: {
|
|
@@ -593,10 +607,19 @@ var _default = exports.default = {
|
|
|
593
607
|
}
|
|
594
608
|
}),
|
|
595
609
|
fields: ['rightStatement', 'standardizedRightStatement', 'rightReproductionStatement']
|
|
610
|
+
},
|
|
611
|
+
group_reference: {
|
|
612
|
+
messages: (0, _reactIntl.defineMessages)({
|
|
613
|
+
label: {
|
|
614
|
+
"id": "detailGroup.group_reference.label",
|
|
615
|
+
"defaultMessage": "Reference"
|
|
616
|
+
}
|
|
617
|
+
}),
|
|
618
|
+
fields: ['relatedLinks']
|
|
596
619
|
}
|
|
597
620
|
},
|
|
598
621
|
layout: {
|
|
599
|
-
fields1: ['group_id', 'group_description', 'group_production', 'group_rights']
|
|
622
|
+
fields1: ['group_id', 'group_description', 'group_production', 'group_rights', 'group_reference']
|
|
600
623
|
}
|
|
601
624
|
}
|
|
602
625
|
};
|
package/lib/config/materials.js
CHANGED
|
@@ -401,6 +401,24 @@ var _default = exports.default = {
|
|
|
401
401
|
"defaultMessage": "Additional process"
|
|
402
402
|
}
|
|
403
403
|
})
|
|
404
|
+
},
|
|
405
|
+
featuredApplication: {
|
|
406
|
+
field: 'materials_common:featuredApplicationGroupList.featuredApplication.displayName',
|
|
407
|
+
messages: (0, _reactIntl.defineMessages)({
|
|
408
|
+
label: {
|
|
409
|
+
"id": "filter.featuredApplication.label",
|
|
410
|
+
"defaultMessage": "Featured application"
|
|
411
|
+
}
|
|
412
|
+
})
|
|
413
|
+
},
|
|
414
|
+
featuredCollection: {
|
|
415
|
+
field: 'materials_common:featuredCollectionGroupList.featuredCollection.displayName',
|
|
416
|
+
messages: (0, _reactIntl.defineMessages)({
|
|
417
|
+
label: {
|
|
418
|
+
"id": "filter.featuredCollection.label",
|
|
419
|
+
"defaultMessage": "Featured collection"
|
|
420
|
+
}
|
|
421
|
+
})
|
|
404
422
|
}
|
|
405
423
|
},
|
|
406
424
|
groups: {
|
|
@@ -481,7 +499,9 @@ var _default = exports.default = {
|
|
|
481
499
|
field: 'materials_common:featuredCollectionGroupList',
|
|
482
500
|
format: (0, _formatHelpers.listOf)((0, _formatHelpers.valueAt)({
|
|
483
501
|
path: 'featuredCollection',
|
|
484
|
-
format: _formatHelpers.
|
|
502
|
+
format: (0, _formatHelpers.filterLink)({
|
|
503
|
+
filterValueFormat: _formatHelpers.displayName
|
|
504
|
+
})
|
|
485
505
|
}))
|
|
486
506
|
},
|
|
487
507
|
materialCompositionGroupList: {
|
package/package.json
CHANGED
|
@@ -67,9 +67,22 @@ export default class DetailPanel extends Component {
|
|
|
67
67
|
} = this.props;
|
|
68
68
|
|
|
69
69
|
const descFormatter = config.get('detailDescription');
|
|
70
|
-
const
|
|
70
|
+
const descriptionData = descFormatter && descFormatter(data);
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
if (descriptionData) {
|
|
73
|
+
const descriptions = Array.isArray(descriptionData)
|
|
74
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
75
|
+
? descriptionData.map((desc, idx) => <p key={idx}>{desc}</p>)
|
|
76
|
+
: <p>{descriptionData}</p>;
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<div className={styles.description}>
|
|
80
|
+
{descriptions}
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return undefined;
|
|
73
86
|
}
|
|
74
87
|
|
|
75
88
|
renderFieldList() {
|
package/src/config/default.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
decade,
|
|
7
7
|
displayName,
|
|
8
8
|
filterLink,
|
|
9
|
+
linkText,
|
|
9
10
|
list,
|
|
10
11
|
listOf,
|
|
11
12
|
nameRole,
|
|
@@ -400,10 +401,10 @@ export default {
|
|
|
400
401
|
} = data;
|
|
401
402
|
|
|
402
403
|
if (briefDescriptions && briefDescriptions.length > 0) {
|
|
403
|
-
return briefDescriptions
|
|
404
|
+
return briefDescriptions;
|
|
404
405
|
}
|
|
405
406
|
|
|
406
|
-
return
|
|
407
|
+
return [];
|
|
407
408
|
},
|
|
408
409
|
|
|
409
410
|
detailFields: {
|
|
@@ -611,6 +612,20 @@ export default {
|
|
|
611
612
|
path: 'rightReproductionStatement',
|
|
612
613
|
})),
|
|
613
614
|
},
|
|
615
|
+
relatedLinks: {
|
|
616
|
+
messages: defineMessages({
|
|
617
|
+
label: {
|
|
618
|
+
id: 'detailField.relatedLinks.label',
|
|
619
|
+
defaultMessage: 'Related Links',
|
|
620
|
+
},
|
|
621
|
+
}),
|
|
622
|
+
field: 'collectionobjects_common:publishedRelatedLinkGroupList',
|
|
623
|
+
format: listOf(linkText({
|
|
624
|
+
urlFieldName: 'relatedLink',
|
|
625
|
+
textFieldName: 'descriptiveTitle',
|
|
626
|
+
type: 'external',
|
|
627
|
+
})),
|
|
628
|
+
},
|
|
614
629
|
},
|
|
615
630
|
groups: {
|
|
616
631
|
group_id: {
|
|
@@ -670,6 +685,17 @@ export default {
|
|
|
670
685
|
'rightReproductionStatement',
|
|
671
686
|
],
|
|
672
687
|
},
|
|
688
|
+
group_reference: {
|
|
689
|
+
messages: defineMessages({
|
|
690
|
+
label: {
|
|
691
|
+
id: 'detailGroup.group_reference.label',
|
|
692
|
+
defaultMessage: 'Reference',
|
|
693
|
+
},
|
|
694
|
+
}),
|
|
695
|
+
fields: [
|
|
696
|
+
'relatedLinks',
|
|
697
|
+
],
|
|
698
|
+
},
|
|
673
699
|
},
|
|
674
700
|
layout: {
|
|
675
701
|
fields1: [
|
|
@@ -677,6 +703,7 @@ export default {
|
|
|
677
703
|
'group_description',
|
|
678
704
|
'group_production',
|
|
679
705
|
'group_rights',
|
|
706
|
+
'group_reference',
|
|
680
707
|
],
|
|
681
708
|
},
|
|
682
709
|
},
|
package/src/config/materials.js
CHANGED
|
@@ -454,6 +454,24 @@ export default {
|
|
|
454
454
|
},
|
|
455
455
|
}),
|
|
456
456
|
},
|
|
457
|
+
featuredApplication: {
|
|
458
|
+
field: 'materials_common:featuredApplicationGroupList.featuredApplication.displayName',
|
|
459
|
+
messages: defineMessages({
|
|
460
|
+
label: {
|
|
461
|
+
id: 'filter.featuredApplication.label',
|
|
462
|
+
defaultMessage: 'Featured application',
|
|
463
|
+
},
|
|
464
|
+
}),
|
|
465
|
+
},
|
|
466
|
+
featuredCollection: {
|
|
467
|
+
field: 'materials_common:featuredCollectionGroupList.featuredCollection.displayName',
|
|
468
|
+
messages: defineMessages({
|
|
469
|
+
label: {
|
|
470
|
+
id: 'filter.featuredCollection.label',
|
|
471
|
+
defaultMessage: 'Featured collection',
|
|
472
|
+
},
|
|
473
|
+
}),
|
|
474
|
+
},
|
|
457
475
|
},
|
|
458
476
|
groups: {
|
|
459
477
|
group_institution: {
|
|
@@ -576,7 +594,9 @@ export default {
|
|
|
576
594
|
field: 'materials_common:featuredCollectionGroupList',
|
|
577
595
|
format: listOf((valueAt({
|
|
578
596
|
path: 'featuredCollection',
|
|
579
|
-
format:
|
|
597
|
+
format: filterLink({
|
|
598
|
+
filterValueFormat: displayName,
|
|
599
|
+
}),
|
|
580
600
|
}))),
|
|
581
601
|
},
|
|
582
602
|
materialCompositionGroupList: {
|
|
@@ -67,3 +67,16 @@ and (max-width: 839px) {
|
|
|
67
67
|
grid-template-columns: auto 360px;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
.description > p {
|
|
72
|
+
margin-top: 0;
|
|
73
|
+
margin-bottom: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.description > p:first-child {
|
|
77
|
+
margin-top: 16px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.description > p:last-child {
|
|
81
|
+
margin-bottom: 16px;
|
|
82
|
+
}
|