@collectionspace/cspace-public-browser 1.5.1
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/LICENSE.md +71 -0
- package/README.md +38 -0
- package/dist/cspacePublicBrowser.js +4680 -0
- package/dist/cspacePublicBrowser.min.js +2 -0
- package/dist/cspacePublicBrowser.min.js.LICENSE.txt +56 -0
- package/images/check.svg +3 -0
- package/images/close.svg +3 -0
- package/images/collapse.svg +3 -0
- package/images/collapseActive.svg +3 -0
- package/images/expand.svg +3 -0
- package/images/expandActive.svg +3 -0
- package/images/filter.svg +4 -0
- package/images/hideLeft.svg +4 -0
- package/images/linkBack.svg +4 -0
- package/images/linkDown.svg +4 -0
- package/images/linkNext.svg +4 -0
- package/images/linkPrev.svg +4 -0
- package/images/openNew.svg +4 -0
- package/images/search.svg +4 -0
- package/images/select.svg +4 -0
- package/images/top.svg +1 -0
- package/lib/actions/detailActions.js +177 -0
- package/lib/actions/filterActions.js +16 -0
- package/lib/actions/mediaActions.js +63 -0
- package/lib/actions/prefsActions.js +84 -0
- package/lib/actions/searchActions.js +140 -0
- package/lib/actions/searchEntryFormActions.js +19 -0
- package/lib/components/App.js +24 -0
- package/lib/components/detail/DetailNavBar.js +98 -0
- package/lib/components/detail/DetailPanel.js +171 -0
- package/lib/components/detail/DetailPanelContainer.js +22 -0
- package/lib/components/detail/ExhibitionSection.js +54 -0
- package/lib/components/detail/FieldList.js +95 -0
- package/lib/components/detail/FieldValueList.js +30 -0
- package/lib/components/detail/ImageGallery.js +137 -0
- package/lib/components/detail/ImageGalleryContainer.js +19 -0
- package/lib/components/detail/InstitutionHoldingList.js +155 -0
- package/lib/components/detail/InstitutionHoldingListContainer.js +22 -0
- package/lib/components/detail/InstitutionIndex.js +53 -0
- package/lib/components/detail/InstitutionIndexContainer.js +15 -0
- package/lib/components/detail/InstitutionSection.js +44 -0
- package/lib/components/detail/InstitutionSectionContainer.js +15 -0
- package/lib/components/layout/Fixed.js +26 -0
- package/lib/components/layout/IconButton.js +41 -0
- package/lib/components/layout/Panel.js +56 -0
- package/lib/components/layout/PanelContainer.js +19 -0
- package/lib/components/layout/PanelTitle.js +38 -0
- package/lib/components/layout/ScrollTopButton.js +70 -0
- package/lib/components/layout/ToggleFilterPanelButton.js +42 -0
- package/lib/components/pages/DetailPage.js +93 -0
- package/lib/components/pages/DetailPageContainer.js +20 -0
- package/lib/components/pages/RootPage.js +41 -0
- package/lib/components/pages/SearchPage.js +130 -0
- package/lib/components/pages/SearchPageContainer.js +23 -0
- package/lib/components/search/entry/SearchEntryForm.js +74 -0
- package/lib/components/search/entry/SearchEntryFormContainer.js +20 -0
- package/lib/components/search/entry/SearchEntryPanel.js +30 -0
- package/lib/components/search/entry/SearchQueryInput.js +89 -0
- package/lib/components/search/entry/SearchSubmitButton.js +22 -0
- package/lib/components/search/entry/SortSelect.js +89 -0
- package/lib/components/search/entry/SortSelectContainer.js +15 -0
- package/lib/components/search/result/ClearSearchParamsLink.js +42 -0
- package/lib/components/search/result/Filter.js +186 -0
- package/lib/components/search/result/FilterContainer.js +22 -0
- package/lib/components/search/result/FilterGroup.js +72 -0
- package/lib/components/search/result/FilterList.js +48 -0
- package/lib/components/search/result/FilterPanel.js +115 -0
- package/lib/components/search/result/FilterPanelContainer.js +16 -0
- package/lib/components/search/result/FilterSearchInput.js +63 -0
- package/lib/components/search/result/RemoveSearchParamLink.js +66 -0
- package/lib/components/search/result/SearchError.js +29 -0
- package/lib/components/search/result/SearchLoadMore.js +36 -0
- package/lib/components/search/result/SearchParamList.js +41 -0
- package/lib/components/search/result/SearchPending.js +21 -0
- package/lib/components/search/result/SearchResultImage.js +227 -0
- package/lib/components/search/result/SearchResultList.js +119 -0
- package/lib/components/search/result/SearchResultPanel.js +139 -0
- package/lib/components/search/result/SearchResultPanelContainer.js +23 -0
- package/lib/components/search/result/SearchResultStats.js +39 -0
- package/lib/components/search/result/SearchResultTile.js +61 -0
- package/lib/config/anthro.js +123 -0
- package/lib/config/bonsai.js +50 -0
- package/lib/config/botgarden.js +10 -0
- package/lib/config/default.js +530 -0
- package/lib/config/fcart.js +36 -0
- package/lib/config/herbarium.js +10 -0
- package/lib/config/index.js +53 -0
- package/lib/config/lhmc.js +10 -0
- package/lib/config/materials.js +982 -0
- package/lib/config/publicart.js +10 -0
- package/lib/constants/actionCodes.js +46 -0
- package/lib/constants/ids.js +12 -0
- package/lib/helpers/bodyClassName.js +11 -0
- package/lib/helpers/esQueryHelpers.js +206 -0
- package/lib/helpers/formatHelpers.js +293 -0
- package/lib/helpers/searchDimensions.js +28 -0
- package/lib/helpers/urlHelpers.js +43 -0
- package/lib/index.js +53 -0
- package/lib/intl/index.js +16 -0
- package/lib/reducers/detailReducer.js +145 -0
- package/lib/reducers/filterReducer.js +22 -0
- package/lib/reducers/index.js +66 -0
- package/lib/reducers/mediaReducer.js +43 -0
- package/lib/reducers/prefsReducer.js +27 -0
- package/lib/reducers/searchEntryFormReducer.js +24 -0
- package/lib/reducers/searchReducer.js +88 -0
- package/package.json +118 -0
- package/src/actions/detailActions.js +231 -0
- package/src/actions/filterActions.js +10 -0
- package/src/actions/mediaActions.js +65 -0
- package/src/actions/prefsActions.js +95 -0
- package/src/actions/searchActions.js +188 -0
- package/src/actions/searchEntryFormActions.js +15 -0
- package/src/components/App.jsx +18 -0
- package/src/components/detail/DetailNavBar.jsx +132 -0
- package/src/components/detail/DetailPanel.jsx +215 -0
- package/src/components/detail/DetailPanelContainer.js +29 -0
- package/src/components/detail/ExhibitionSection.jsx +71 -0
- package/src/components/detail/FieldList.jsx +122 -0
- package/src/components/detail/FieldValueList.jsx +31 -0
- package/src/components/detail/ImageGallery.jsx +153 -0
- package/src/components/detail/ImageGalleryContainer.js +17 -0
- package/src/components/detail/InstitutionHoldingList.jsx +188 -0
- package/src/components/detail/InstitutionHoldingListContainer.js +29 -0
- package/src/components/detail/InstitutionIndex.jsx +57 -0
- package/src/components/detail/InstitutionIndexContainer.js +11 -0
- package/src/components/detail/InstitutionSection.jsx +48 -0
- package/src/components/detail/InstitutionSectionContainer.js +11 -0
- package/src/components/layout/Fixed.jsx +29 -0
- package/src/components/layout/IconButton.jsx +41 -0
- package/src/components/layout/Panel.jsx +60 -0
- package/src/components/layout/PanelContainer.js +20 -0
- package/src/components/layout/PanelTitle.jsx +43 -0
- package/src/components/layout/ScrollTopButton.jsx +76 -0
- package/src/components/layout/ToggleFilterPanelButton.jsx +43 -0
- package/src/components/pages/DetailPage.jsx +101 -0
- package/src/components/pages/DetailPageContainer.js +18 -0
- package/src/components/pages/RootPage.jsx +37 -0
- package/src/components/pages/SearchPage.jsx +160 -0
- package/src/components/pages/SearchPageContainer.js +21 -0
- package/src/components/search/entry/SearchEntryForm.jsx +82 -0
- package/src/components/search/entry/SearchEntryFormContainer.js +22 -0
- package/src/components/search/entry/SearchEntryPanel.jsx +28 -0
- package/src/components/search/entry/SearchQueryInput.jsx +95 -0
- package/src/components/search/entry/SearchSubmitButton.jsx +22 -0
- package/src/components/search/entry/SortSelect.jsx +104 -0
- package/src/components/search/entry/SortSelectContainer.js +12 -0
- package/src/components/search/result/ClearSearchParamsLink.jsx +43 -0
- package/src/components/search/result/Filter.jsx +226 -0
- package/src/components/search/result/FilterContainer.js +20 -0
- package/src/components/search/result/FilterGroup.jsx +83 -0
- package/src/components/search/result/FilterList.jsx +51 -0
- package/src/components/search/result/FilterPanel.jsx +143 -0
- package/src/components/search/result/FilterPanelContainer.js +16 -0
- package/src/components/search/result/FilterSearchInput.jsx +68 -0
- package/src/components/search/result/RemoveSearchParamLink.jsx +79 -0
- package/src/components/search/result/SearchError.jsx +30 -0
- package/src/components/search/result/SearchLoadMore.jsx +37 -0
- package/src/components/search/result/SearchParamList.jsx +47 -0
- package/src/components/search/result/SearchPending.jsx +19 -0
- package/src/components/search/result/SearchResultImage.jsx +275 -0
- package/src/components/search/result/SearchResultList.jsx +144 -0
- package/src/components/search/result/SearchResultPanel.jsx +169 -0
- package/src/components/search/result/SearchResultPanelContainer.js +31 -0
- package/src/components/search/result/SearchResultStats.jsx +38 -0
- package/src/components/search/result/SearchResultTile.jsx +70 -0
- package/src/config/anthro.js +153 -0
- package/src/config/bonsai.js +50 -0
- package/src/config/botgarden.js +3 -0
- package/src/config/default.js +604 -0
- package/src/config/fcart.js +38 -0
- package/src/config/herbarium.js +3 -0
- package/src/config/index.js +51 -0
- package/src/config/lhmc.js +3 -0
- package/src/config/materials.js +1173 -0
- package/src/config/publicart.js +3 -0
- package/src/constants/actionCodes.js +26 -0
- package/src/constants/ids.js +3 -0
- package/src/helpers/bodyClassName.js +5 -0
- package/src/helpers/esQueryHelpers.js +224 -0
- package/src/helpers/formatHelpers.jsx +361 -0
- package/src/helpers/searchDimensions.js +21 -0
- package/src/helpers/urlHelpers.js +49 -0
- package/src/index.jsx +59 -0
- package/src/intl/index.js +16 -0
- package/src/reducers/detailReducer.js +201 -0
- package/src/reducers/filterReducer.js +16 -0
- package/src/reducers/index.js +56 -0
- package/src/reducers/mediaReducer.js +44 -0
- package/src/reducers/prefsReducer.js +24 -0
- package/src/reducers/searchEntryFormReducer.js +19 -0
- package/src/reducers/searchReducer.js +118 -0
- package/styles/colors.css +7 -0
- package/styles/cspace/DetailNavBar.css +17 -0
- package/styles/cspace/DetailPage.css +3 -0
- package/styles/cspace/DetailPanel.css +69 -0
- package/styles/cspace/ExhibitionSection.css +9 -0
- package/styles/cspace/FieldList.css +15 -0
- package/styles/cspace/FieldListField.css +7 -0
- package/styles/cspace/FieldListGroup.css +27 -0
- package/styles/cspace/FieldValueList.css +19 -0
- package/styles/cspace/Filter.css +64 -0
- package/styles/cspace/FilterGroup.css +21 -0
- package/styles/cspace/FilterPanel.css +45 -0
- package/styles/cspace/FilterSearchInput.css +13 -0
- package/styles/cspace/Fixed.css +8 -0
- package/styles/cspace/IconButton.css +11 -0
- package/styles/cspace/ImageGallery.css +43 -0
- package/styles/cspace/InstitutionHoldingList.css +109 -0
- package/styles/cspace/InstitutionIndex.css +13 -0
- package/styles/cspace/InstitutionSection.css +4 -0
- package/styles/cspace/Link.css +39 -0
- package/styles/cspace/Panel.css +53 -0
- package/styles/cspace/PanelTitle.css +48 -0
- package/styles/cspace/RemoveSearchParamLink.css +15 -0
- package/styles/cspace/RootPage.css +60 -0
- package/styles/cspace/ScrollTopButton.css +32 -0
- package/styles/cspace/SearchEntryForm.css +4 -0
- package/styles/cspace/SearchEntryPanel.css +11 -0
- package/styles/cspace/SearchPage.css +2 -0
- package/styles/cspace/SearchParamLink.css +21 -0
- package/styles/cspace/SearchParamList.css +6 -0
- package/styles/cspace/SearchQueryInput.css +30 -0
- package/styles/cspace/SearchResultImage.css +29 -0
- package/styles/cspace/SearchResultList.css +10 -0
- package/styles/cspace/SearchResultPanel.css +31 -0
- package/styles/cspace/SearchResultStats.css +4 -0
- package/styles/cspace/SearchResultTile.css +67 -0
- package/styles/cspace/SearchStatus.css +12 -0
- package/styles/cspace/SearchSubmitButton.css +3 -0
- package/styles/cspace/SortSelect.css +19 -0
- package/styles/cspace/ToggleFilterPanelButton.css +44 -0
- package/styles/dimensions.css +9 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
import { getIntl } from '../intl';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
boolean,
|
|
6
|
+
decade,
|
|
7
|
+
displayName,
|
|
8
|
+
filterLink,
|
|
9
|
+
list,
|
|
10
|
+
listOf,
|
|
11
|
+
nameRole,
|
|
12
|
+
valueAt,
|
|
13
|
+
} from '../helpers/formatHelpers';
|
|
14
|
+
|
|
15
|
+
const departmentMessages = defineMessages({
|
|
16
|
+
antiquities: {
|
|
17
|
+
id: 'option.departments.antiquities',
|
|
18
|
+
defaultMessage: 'Antiquities',
|
|
19
|
+
},
|
|
20
|
+
'architecture-design': {
|
|
21
|
+
id: 'option.departments.architecture-design',
|
|
22
|
+
defaultMessage: 'Architecture and Design',
|
|
23
|
+
},
|
|
24
|
+
'decorative-arts': {
|
|
25
|
+
id: 'option.departments.decorative-arts',
|
|
26
|
+
defaultMessage: 'Decorative Arts',
|
|
27
|
+
},
|
|
28
|
+
ethnography: {
|
|
29
|
+
id: 'option.departments.ethnography',
|
|
30
|
+
defaultMessage: 'Ethnography',
|
|
31
|
+
},
|
|
32
|
+
herpetology: {
|
|
33
|
+
id: 'option.departments.herpetology',
|
|
34
|
+
defaultMessage: 'Herpetology',
|
|
35
|
+
},
|
|
36
|
+
'media-performance-art': {
|
|
37
|
+
id: 'option.departments.media-performance-art',
|
|
38
|
+
defaultMessage: 'Media and Performance Art',
|
|
39
|
+
},
|
|
40
|
+
'paintings-sculpture': {
|
|
41
|
+
id: 'option.departments.paintings-sculpture',
|
|
42
|
+
defaultMessage: 'Paintings and Sculpture',
|
|
43
|
+
},
|
|
44
|
+
paleobotany: {
|
|
45
|
+
id: 'option.departments.paleobotany',
|
|
46
|
+
defaultMessage: 'Paleobotany',
|
|
47
|
+
},
|
|
48
|
+
photographs: {
|
|
49
|
+
id: 'option.departments.photographs',
|
|
50
|
+
defaultMessage: 'Photographs',
|
|
51
|
+
},
|
|
52
|
+
'prints-drawings': {
|
|
53
|
+
id: 'option.departments.prints-drawings',
|
|
54
|
+
defaultMessage: 'Prints and Drawings',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const formatDepartment = (data) => {
|
|
59
|
+
const message = departmentMessages[data];
|
|
60
|
+
|
|
61
|
+
return message ? getIntl().formatMessage(message) : data;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
basename: '',
|
|
66
|
+
container: '#cspace-browser',
|
|
67
|
+
gatewayUrl: 'http://localhost:8180/gateway/core',
|
|
68
|
+
locale: 'en-US',
|
|
69
|
+
detailPath: 'detail',
|
|
70
|
+
|
|
71
|
+
// Time in milliseconds to wait before fetching a search result image. If the search result is
|
|
72
|
+
// scrolled offscreen before the time elapses, the image is not loaded until the result is
|
|
73
|
+
// scrolled into view again. This applies only to pages of results after the first. Images for
|
|
74
|
+
// the first page are fetched immediately.
|
|
75
|
+
imageLoadDelay: 2000,
|
|
76
|
+
|
|
77
|
+
// Time in milliseconds to wait before fetching another page of search results, when the result
|
|
78
|
+
// list is scrolled to the bottom.
|
|
79
|
+
pageLoadDelay: 1000,
|
|
80
|
+
|
|
81
|
+
// The maximum number of results to automatically load while scrolling. Once this number of
|
|
82
|
+
// results has been retrieved, the user must click a button to load more results.
|
|
83
|
+
pageAutoLoadLimit: 80,
|
|
84
|
+
|
|
85
|
+
defaultQuery: {
|
|
86
|
+
term: {
|
|
87
|
+
'ecm:primaryType': 'CollectionObject',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
fulltextSearchFields: [
|
|
92
|
+
'all_field',
|
|
93
|
+
],
|
|
94
|
+
|
|
95
|
+
includeFields: [
|
|
96
|
+
'ecm:name',
|
|
97
|
+
'ecm:primaryType',
|
|
98
|
+
'collectionspace_denorm:mediaCsid',
|
|
99
|
+
'collectionspace_denorm:title',
|
|
100
|
+
],
|
|
101
|
+
|
|
102
|
+
referenceField: 'ecm:name',
|
|
103
|
+
|
|
104
|
+
defaultSortOrder: 'bestmatch',
|
|
105
|
+
sortField: 'collectionspace_denorm:title',
|
|
106
|
+
storageKey: 'cspace-browser',
|
|
107
|
+
|
|
108
|
+
searchResultImageDerivative: 'Small',
|
|
109
|
+
detailImageDerivative: 'Medium',
|
|
110
|
+
|
|
111
|
+
tileTitle: {
|
|
112
|
+
field: 'collectionspace_denorm:title',
|
|
113
|
+
formatValue: displayName,
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
filters: {
|
|
117
|
+
fields: {
|
|
118
|
+
objectName: {
|
|
119
|
+
field: 'collectionobjects_common:objectNameList.objectName',
|
|
120
|
+
messages: defineMessages({
|
|
121
|
+
label: {
|
|
122
|
+
id: 'filter.objectName.label',
|
|
123
|
+
defaultMessage: 'Name',
|
|
124
|
+
},
|
|
125
|
+
shortLabel: {
|
|
126
|
+
id: 'filter.objectName.shortLabel',
|
|
127
|
+
defaultMessage: 'Name',
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
130
|
+
},
|
|
131
|
+
objectProductionPerson: {
|
|
132
|
+
field: 'collectionobjects_common:objectProductionPersonGroupList.objectProductionPerson.displayName',
|
|
133
|
+
messages: defineMessages({
|
|
134
|
+
label: {
|
|
135
|
+
id: 'filter.objectProductionPerson.label',
|
|
136
|
+
defaultMessage: 'Production person',
|
|
137
|
+
},
|
|
138
|
+
shortLabel: {
|
|
139
|
+
id: 'filter.objectProductionPerson.shortLabel',
|
|
140
|
+
defaultMessage: 'Prod. person',
|
|
141
|
+
},
|
|
142
|
+
}),
|
|
143
|
+
},
|
|
144
|
+
objectProductionOrganization: {
|
|
145
|
+
field: 'collectionobjects_common:objectProductionOrganizationGroupList.objectProductionOrganization.displayName',
|
|
146
|
+
messages: defineMessages({
|
|
147
|
+
label: {
|
|
148
|
+
id: 'filter.objectProductionOrganization.label',
|
|
149
|
+
defaultMessage: 'Production organization',
|
|
150
|
+
},
|
|
151
|
+
shortLabel: {
|
|
152
|
+
id: 'filter.objectProductionOrganization.shortLabel',
|
|
153
|
+
defaultMessage: 'Prod. organization',
|
|
154
|
+
},
|
|
155
|
+
}),
|
|
156
|
+
},
|
|
157
|
+
objectProductionPeople: {
|
|
158
|
+
field: 'collectionobjects_common:objectProductionPeopleGroupList.objectProductionPeople',
|
|
159
|
+
messages: defineMessages({
|
|
160
|
+
label: {
|
|
161
|
+
id: 'filter.objectProductionPeople.label',
|
|
162
|
+
defaultMessage: 'Production people/culture',
|
|
163
|
+
},
|
|
164
|
+
shortLabel: {
|
|
165
|
+
id: 'filter.objectProductionPeople.shortLabel',
|
|
166
|
+
defaultMessage: 'Prod. people/culture',
|
|
167
|
+
},
|
|
168
|
+
}),
|
|
169
|
+
},
|
|
170
|
+
prodYears: {
|
|
171
|
+
field: 'collectionspace_denorm:prodYears',
|
|
172
|
+
type: 'histogram',
|
|
173
|
+
interval: 10,
|
|
174
|
+
formatValue: decade,
|
|
175
|
+
messages: defineMessages({
|
|
176
|
+
label: {
|
|
177
|
+
id: 'filter.prodYears.label',
|
|
178
|
+
defaultMessage: 'Production date',
|
|
179
|
+
},
|
|
180
|
+
shortLabel: {
|
|
181
|
+
id: 'filter.prodYears.shortLabel',
|
|
182
|
+
defaultMessage: 'Prod. date',
|
|
183
|
+
},
|
|
184
|
+
}),
|
|
185
|
+
},
|
|
186
|
+
objectProductionPlace: {
|
|
187
|
+
field: 'collectionobjects_common:objectProductionPlaceGroupList.objectProductionPlace',
|
|
188
|
+
messages: defineMessages({
|
|
189
|
+
label: {
|
|
190
|
+
id: 'filter.objectProductionPlace.label',
|
|
191
|
+
defaultMessage: 'Production place',
|
|
192
|
+
},
|
|
193
|
+
shortLabel: {
|
|
194
|
+
id: 'filter.objectProductionPlace.shortLabel',
|
|
195
|
+
defaultMessage: 'Prod. place',
|
|
196
|
+
},
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
material: {
|
|
200
|
+
field: 'collectionobjects_common:materialGroupList.material',
|
|
201
|
+
messages: defineMessages({
|
|
202
|
+
label: {
|
|
203
|
+
id: 'filter.material.label',
|
|
204
|
+
defaultMessage: 'Material',
|
|
205
|
+
},
|
|
206
|
+
shortLabel: {
|
|
207
|
+
id: 'filter.material.shortLabel',
|
|
208
|
+
defaultMessage: 'Material',
|
|
209
|
+
},
|
|
210
|
+
}),
|
|
211
|
+
},
|
|
212
|
+
color: {
|
|
213
|
+
field: 'collectionobjects_common:colors',
|
|
214
|
+
messages: defineMessages({
|
|
215
|
+
label: {
|
|
216
|
+
id: 'filter.color.label',
|
|
217
|
+
defaultMessage: 'Color',
|
|
218
|
+
},
|
|
219
|
+
shortLabel: {
|
|
220
|
+
id: 'filter.color.shortLabel',
|
|
221
|
+
defaultMessage: 'Color',
|
|
222
|
+
},
|
|
223
|
+
}),
|
|
224
|
+
},
|
|
225
|
+
responsibleDepartment: {
|
|
226
|
+
field: 'collectionobjects_common:responsibleDepartments',
|
|
227
|
+
formatValue: formatDepartment,
|
|
228
|
+
messages: defineMessages({
|
|
229
|
+
label: {
|
|
230
|
+
id: 'filter.responsibleDepartment.label',
|
|
231
|
+
defaultMessage: 'Department',
|
|
232
|
+
},
|
|
233
|
+
shortLabel: {
|
|
234
|
+
id: 'filter.responsibleDepartment.shortLabel',
|
|
235
|
+
defaultMessage: 'Dept',
|
|
236
|
+
},
|
|
237
|
+
}),
|
|
238
|
+
},
|
|
239
|
+
exhibitionTitle: {
|
|
240
|
+
field: 'collectionspace_denorm:exhibition.title',
|
|
241
|
+
messages: defineMessages({
|
|
242
|
+
label: {
|
|
243
|
+
id: 'filter.exhibitionTitle.label',
|
|
244
|
+
defaultMessage: 'Exhibition title',
|
|
245
|
+
},
|
|
246
|
+
shortLabel: {
|
|
247
|
+
id: 'filter.exhibitionTitle.shortLabel',
|
|
248
|
+
defaultMessage: 'Exhibition title',
|
|
249
|
+
},
|
|
250
|
+
}),
|
|
251
|
+
},
|
|
252
|
+
contentConcept: {
|
|
253
|
+
field: 'collectionobjects_common:contentConcepts.displayName',
|
|
254
|
+
messages: defineMessages({
|
|
255
|
+
label: {
|
|
256
|
+
id: 'filter.contentConcept.label',
|
|
257
|
+
defaultMessage: 'Subject',
|
|
258
|
+
},
|
|
259
|
+
shortLabel: {
|
|
260
|
+
id: 'filter.contentConcept.shortLabel',
|
|
261
|
+
defaultMessage: 'Subject',
|
|
262
|
+
},
|
|
263
|
+
}),
|
|
264
|
+
order: {
|
|
265
|
+
_count: 'desc',
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
technique: {
|
|
269
|
+
field: 'collectionobjects_common:techniqueGroupList.technique',
|
|
270
|
+
messages: defineMessages({
|
|
271
|
+
label: {
|
|
272
|
+
id: 'filter.technique.label',
|
|
273
|
+
defaultMessage: 'Technique',
|
|
274
|
+
},
|
|
275
|
+
shortLabel: {
|
|
276
|
+
id: 'filter.technique.shortLabel',
|
|
277
|
+
defaultMessage: 'Technique',
|
|
278
|
+
},
|
|
279
|
+
}),
|
|
280
|
+
},
|
|
281
|
+
hasMedia: {
|
|
282
|
+
field: 'collectionspace_denorm:hasMedia',
|
|
283
|
+
formatValue: boolean,
|
|
284
|
+
showSearch: false,
|
|
285
|
+
messages: defineMessages({
|
|
286
|
+
label: {
|
|
287
|
+
id: 'filter.hasMedia.label',
|
|
288
|
+
defaultMessage: 'Has image',
|
|
289
|
+
},
|
|
290
|
+
shortLabel: {
|
|
291
|
+
id: 'filter.hasMedia.shortLabel',
|
|
292
|
+
defaultMessage: 'Has image',
|
|
293
|
+
},
|
|
294
|
+
}),
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
groups: {
|
|
298
|
+
group_id: {
|
|
299
|
+
messages: defineMessages({
|
|
300
|
+
label: {
|
|
301
|
+
id: 'filterGroup.group_id.label',
|
|
302
|
+
defaultMessage: 'Identification',
|
|
303
|
+
},
|
|
304
|
+
}),
|
|
305
|
+
fields: [
|
|
306
|
+
'responsibleDepartment',
|
|
307
|
+
'objectName',
|
|
308
|
+
'exhibitionTitle',
|
|
309
|
+
],
|
|
310
|
+
},
|
|
311
|
+
group_media: {
|
|
312
|
+
messages: defineMessages({
|
|
313
|
+
label: {
|
|
314
|
+
id: 'filterGroup.group_media.label',
|
|
315
|
+
defaultMessage: 'Media',
|
|
316
|
+
},
|
|
317
|
+
}),
|
|
318
|
+
fields: [
|
|
319
|
+
'hasMedia',
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
group_description: {
|
|
323
|
+
messages: defineMessages({
|
|
324
|
+
label: {
|
|
325
|
+
id: 'filterGroup.group_description.label',
|
|
326
|
+
defaultMessage: 'Description',
|
|
327
|
+
},
|
|
328
|
+
}),
|
|
329
|
+
fields: [
|
|
330
|
+
'material',
|
|
331
|
+
'contentConcept',
|
|
332
|
+
'color',
|
|
333
|
+
],
|
|
334
|
+
},
|
|
335
|
+
group_production: {
|
|
336
|
+
messages: defineMessages({
|
|
337
|
+
label: {
|
|
338
|
+
id: 'filterGroup.group_production.label',
|
|
339
|
+
defaultMessage: 'Production',
|
|
340
|
+
},
|
|
341
|
+
}),
|
|
342
|
+
fields: [
|
|
343
|
+
'technique',
|
|
344
|
+
'objectProductionPerson',
|
|
345
|
+
'objectProductionOrganization',
|
|
346
|
+
'objectProductionPeople',
|
|
347
|
+
'objectProductionPlace',
|
|
348
|
+
'prodYears',
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
layout: {
|
|
353
|
+
filters1: [
|
|
354
|
+
'group_id',
|
|
355
|
+
'group_media',
|
|
356
|
+
'group_description',
|
|
357
|
+
'group_production',
|
|
358
|
+
],
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
detailTitle: (data) => {
|
|
363
|
+
const {
|
|
364
|
+
'collectionobjects_common:titleGroupList': titleGroups,
|
|
365
|
+
} = data;
|
|
366
|
+
|
|
367
|
+
if (titleGroups && titleGroups.length > 0) {
|
|
368
|
+
const {
|
|
369
|
+
title,
|
|
370
|
+
} = titleGroups[0];
|
|
371
|
+
|
|
372
|
+
return title;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return undefined;
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
detailSubtitle: (data) => {
|
|
379
|
+
const {
|
|
380
|
+
'collectionobjects_common:objectNameList': objectNameGroups,
|
|
381
|
+
} = data;
|
|
382
|
+
|
|
383
|
+
if (objectNameGroups && objectNameGroups.length > 0) {
|
|
384
|
+
const {
|
|
385
|
+
objectName,
|
|
386
|
+
} = objectNameGroups[0];
|
|
387
|
+
|
|
388
|
+
return objectName;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
return undefined;
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
detailDescription: (data) => {
|
|
395
|
+
const {
|
|
396
|
+
'collectionobjects_common:briefDescriptions': briefDescriptions,
|
|
397
|
+
} = data;
|
|
398
|
+
|
|
399
|
+
if (briefDescriptions && briefDescriptions.length > 0) {
|
|
400
|
+
return briefDescriptions[0];
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
return undefined;
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
detailFields: {
|
|
407
|
+
fields: {
|
|
408
|
+
objectNumber: {
|
|
409
|
+
messages: defineMessages({
|
|
410
|
+
label: {
|
|
411
|
+
id: 'detailField.objectNumber.label',
|
|
412
|
+
defaultMessage: 'Number',
|
|
413
|
+
},
|
|
414
|
+
}),
|
|
415
|
+
field: 'collectionobjects_common:objectNumber',
|
|
416
|
+
},
|
|
417
|
+
responsibleDepartment: {
|
|
418
|
+
messages: defineMessages({
|
|
419
|
+
label: {
|
|
420
|
+
id: 'detailField.responsibleDepartment.label',
|
|
421
|
+
defaultMessage: 'Department',
|
|
422
|
+
},
|
|
423
|
+
}),
|
|
424
|
+
field: 'collectionobjects_common:responsibleDepartments',
|
|
425
|
+
format: listOf(filterLink({ linkTextFormat: formatDepartment })),
|
|
426
|
+
},
|
|
427
|
+
objectProductionPerson: {
|
|
428
|
+
messages: defineMessages({
|
|
429
|
+
label: {
|
|
430
|
+
id: 'detailField.objectProductionPerson.label',
|
|
431
|
+
defaultMessage: 'Person',
|
|
432
|
+
},
|
|
433
|
+
}),
|
|
434
|
+
field: 'collectionobjects_common:objectProductionPersonGroupList',
|
|
435
|
+
format: listOf(nameRole({
|
|
436
|
+
nameFieldName: 'objectProductionPerson',
|
|
437
|
+
roleFieldName: 'objectProductionPersonRole',
|
|
438
|
+
})),
|
|
439
|
+
},
|
|
440
|
+
objectProductionOrganization: {
|
|
441
|
+
messages: defineMessages({
|
|
442
|
+
label: {
|
|
443
|
+
id: 'detailField.objectProductionOrganization.label',
|
|
444
|
+
defaultMessage: 'Organization',
|
|
445
|
+
},
|
|
446
|
+
}),
|
|
447
|
+
field: 'collectionobjects_common:objectProductionOrganizationGroupList',
|
|
448
|
+
format: listOf(nameRole({
|
|
449
|
+
nameFieldName: 'objectProductionOrganization',
|
|
450
|
+
roleFieldName: 'objectProductionOrganizationRole',
|
|
451
|
+
})),
|
|
452
|
+
},
|
|
453
|
+
objectProductionPeople: {
|
|
454
|
+
messages: defineMessages({
|
|
455
|
+
label: {
|
|
456
|
+
id: 'detailField.objectProductionPeople.label',
|
|
457
|
+
defaultMessage: 'People/culture',
|
|
458
|
+
},
|
|
459
|
+
}),
|
|
460
|
+
field: 'collectionobjects_common:objectProductionPeopleGroupList',
|
|
461
|
+
format: listOf(nameRole({
|
|
462
|
+
nameFieldName: 'objectProductionPeople',
|
|
463
|
+
roleFieldName: 'objectProductionPeopleRole',
|
|
464
|
+
})),
|
|
465
|
+
},
|
|
466
|
+
objectProductionPlace: {
|
|
467
|
+
messages: defineMessages({
|
|
468
|
+
label: {
|
|
469
|
+
id: 'detailField.objectProductionPlace.label',
|
|
470
|
+
defaultMessage: 'Place',
|
|
471
|
+
},
|
|
472
|
+
}),
|
|
473
|
+
field: 'collectionobjects_common:objectProductionPlaceGroupList',
|
|
474
|
+
format: listOf(nameRole({
|
|
475
|
+
nameFieldName: 'objectProductionPlace',
|
|
476
|
+
roleFieldName: 'objectProductionPlaceRole',
|
|
477
|
+
})),
|
|
478
|
+
},
|
|
479
|
+
objectProductionDate: {
|
|
480
|
+
messages: defineMessages({
|
|
481
|
+
label: {
|
|
482
|
+
id: 'detailField.objectProductionDate.label',
|
|
483
|
+
defaultMessage: 'Date',
|
|
484
|
+
},
|
|
485
|
+
}),
|
|
486
|
+
field: 'collectionobjects_common:objectProductionDateGroupList',
|
|
487
|
+
format: listOf(valueAt({ path: 'dateDisplayDate' })),
|
|
488
|
+
},
|
|
489
|
+
material: {
|
|
490
|
+
messages: defineMessages({
|
|
491
|
+
label: {
|
|
492
|
+
id: 'detailField.material.label',
|
|
493
|
+
defaultMessage: 'Material',
|
|
494
|
+
},
|
|
495
|
+
}),
|
|
496
|
+
field: 'collectionobjects_common:materialGroupList',
|
|
497
|
+
format: listOf(valueAt({
|
|
498
|
+
path: 'material',
|
|
499
|
+
format: filterLink({}),
|
|
500
|
+
})),
|
|
501
|
+
},
|
|
502
|
+
technique: {
|
|
503
|
+
messages: defineMessages({
|
|
504
|
+
label: {
|
|
505
|
+
id: 'detailField.technique.label',
|
|
506
|
+
defaultMessage: 'Technique',
|
|
507
|
+
},
|
|
508
|
+
}),
|
|
509
|
+
field: 'collectionobjects_common:techniqueGroupList',
|
|
510
|
+
format: listOf(nameRole({
|
|
511
|
+
nameFieldName: 'technique',
|
|
512
|
+
roleFieldName: 'techniqueType',
|
|
513
|
+
})),
|
|
514
|
+
},
|
|
515
|
+
contentConcept: {
|
|
516
|
+
messages: defineMessages({
|
|
517
|
+
label: {
|
|
518
|
+
id: 'detailField.contentConcept.label',
|
|
519
|
+
defaultMessage: 'Subject',
|
|
520
|
+
},
|
|
521
|
+
}),
|
|
522
|
+
field: 'collectionobjects_common:contentConcepts',
|
|
523
|
+
format: listOf(filterLink({
|
|
524
|
+
filterValueFormat: displayName,
|
|
525
|
+
})),
|
|
526
|
+
},
|
|
527
|
+
measuredPart: {
|
|
528
|
+
messages: defineMessages({
|
|
529
|
+
label: {
|
|
530
|
+
id: 'detailField.measuredPart.label',
|
|
531
|
+
defaultMessage: 'Dimensions',
|
|
532
|
+
},
|
|
533
|
+
}),
|
|
534
|
+
field: 'collectionobjects_common:measuredPartGroupList',
|
|
535
|
+
format: listOf(nameRole({
|
|
536
|
+
nameFieldName: 'dimensionSummary',
|
|
537
|
+
roleFieldName: 'measuredPart',
|
|
538
|
+
linkName: false,
|
|
539
|
+
})),
|
|
540
|
+
},
|
|
541
|
+
creditLine: {
|
|
542
|
+
messages: defineMessages({
|
|
543
|
+
label: {
|
|
544
|
+
id: 'detailField.creditLine.label',
|
|
545
|
+
defaultMessage: 'Credit',
|
|
546
|
+
},
|
|
547
|
+
}),
|
|
548
|
+
field: 'collectionspace_denorm:creditLine',
|
|
549
|
+
format: list,
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
groups: {
|
|
553
|
+
group_id: {
|
|
554
|
+
messages: defineMessages({
|
|
555
|
+
label: {
|
|
556
|
+
id: 'detailGroup.group_id.label',
|
|
557
|
+
defaultMessage: 'Identification',
|
|
558
|
+
},
|
|
559
|
+
}),
|
|
560
|
+
fields: [
|
|
561
|
+
'objectNumber',
|
|
562
|
+
'responsibleDepartment',
|
|
563
|
+
],
|
|
564
|
+
},
|
|
565
|
+
group_description: {
|
|
566
|
+
messages: defineMessages({
|
|
567
|
+
label: {
|
|
568
|
+
id: 'detailGroup.group_description.label',
|
|
569
|
+
defaultMessage: 'Description',
|
|
570
|
+
},
|
|
571
|
+
}),
|
|
572
|
+
fields: [
|
|
573
|
+
'material',
|
|
574
|
+
'technique',
|
|
575
|
+
'contentConcept',
|
|
576
|
+
'measuredPart',
|
|
577
|
+
'creditLine',
|
|
578
|
+
],
|
|
579
|
+
},
|
|
580
|
+
group_production: {
|
|
581
|
+
messages: defineMessages({
|
|
582
|
+
label: {
|
|
583
|
+
id: 'detailGroup.group_production.label',
|
|
584
|
+
defaultMessage: 'Production',
|
|
585
|
+
},
|
|
586
|
+
}),
|
|
587
|
+
fields: [
|
|
588
|
+
'objectProductionPerson',
|
|
589
|
+
'objectProductionOrganization',
|
|
590
|
+
'objectProductionPeople',
|
|
591
|
+
'objectProductionPlace',
|
|
592
|
+
'objectProductionDate',
|
|
593
|
+
],
|
|
594
|
+
},
|
|
595
|
+
},
|
|
596
|
+
layout: {
|
|
597
|
+
fields1: [
|
|
598
|
+
'group_id',
|
|
599
|
+
'group_description',
|
|
600
|
+
'group_production',
|
|
601
|
+
],
|
|
602
|
+
},
|
|
603
|
+
},
|
|
604
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
gatewayUrl: 'http://localhost:8180/gateway/fcart',
|
|
5
|
+
|
|
6
|
+
filters: {
|
|
7
|
+
fields: {
|
|
8
|
+
objectProductionPlace: {
|
|
9
|
+
field: 'collectionobjects_common:objectProductionPlaceGroupList.objectProductionPlace.displayName',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
detailFields: {
|
|
14
|
+
fields: {
|
|
15
|
+
materialTechniqueDescription: {
|
|
16
|
+
messages: defineMessages({
|
|
17
|
+
label: {
|
|
18
|
+
id: 'detailField.materialTechniqueDescription.label',
|
|
19
|
+
defaultMessage: 'Medium',
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
field: 'collectionobjects_fineart:materialTechniqueDescription',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
groups: {
|
|
26
|
+
group_description: {
|
|
27
|
+
fields: [
|
|
28
|
+
'materialTechniqueDescription',
|
|
29
|
+
'material',
|
|
30
|
+
'technique',
|
|
31
|
+
'contentConcept',
|
|
32
|
+
'measuredPart',
|
|
33
|
+
'creditLine',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import loget from 'lodash/get';
|
|
2
|
+
import lomerge from 'lodash/merge';
|
|
3
|
+
import defaultConfig from './default';
|
|
4
|
+
import anthroConfig from './anthro';
|
|
5
|
+
import bonsaiConfig from './bonsai';
|
|
6
|
+
import botgardenConfig from './botgarden';
|
|
7
|
+
import fcartConfig from './fcart';
|
|
8
|
+
import herbariumConfig from './herbarium';
|
|
9
|
+
import lhmcConfig from './lhmc';
|
|
10
|
+
import materialsConfig from './materials';
|
|
11
|
+
import publicartConfig from './publicart';
|
|
12
|
+
|
|
13
|
+
const namedConfig = {
|
|
14
|
+
anthro: anthroConfig,
|
|
15
|
+
bonsai: bonsaiConfig,
|
|
16
|
+
botgarden: botgardenConfig,
|
|
17
|
+
fcart: fcartConfig,
|
|
18
|
+
herbarium: herbariumConfig,
|
|
19
|
+
lhmc: lhmcConfig,
|
|
20
|
+
materials: materialsConfig,
|
|
21
|
+
publicart: publicartConfig,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const config = lomerge({}, defaultConfig);
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
get: (path, defaultValue) => loget(config, path, defaultValue),
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
30
|
+
log: () => console.log(config),
|
|
31
|
+
|
|
32
|
+
merge: (...sources) => {
|
|
33
|
+
sources.forEach((source) => {
|
|
34
|
+
const {
|
|
35
|
+
baseConfig: baseConfigName,
|
|
36
|
+
} = source;
|
|
37
|
+
|
|
38
|
+
if (baseConfigName) {
|
|
39
|
+
const baseConfig = namedConfig[baseConfigName];
|
|
40
|
+
|
|
41
|
+
if (baseConfig) {
|
|
42
|
+
lomerge(config, baseConfig);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
lomerge(config, source);
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
getFilterFieldConfig: (id) => loget(config, ['filters', 'fields', id]),
|
|
51
|
+
};
|