@eeacms/volto-datahub 0.1.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.
@@ -0,0 +1,150 @@
1
+ import React from 'react';
2
+ import cx from 'classnames';
3
+ import { Label, Button, Dropdown } from 'semantic-ui-react';
4
+ // import { useAppConfig, useWindowDimensions } from '@eeacms/search/lib/hocs';
5
+ // import { TagsList } from '@eeacms/search/components'; // SegmentedBreadcrumb,
6
+ // import { firstWords, getTermDisplayValue } from '@eeacms/search/lib/utils';
7
+
8
+ // import MoreLikeThisTrigger from '@eeacms/search/components/Result/MoreLikeThisTrigger';
9
+ // import ExternalLink from '@eeacms/search/components/Result/ExternalLink';
10
+ // import ResultContext from '@eeacms/search/components/Result/ResultContext';
11
+ // import ContentClusters from '@eeacms/search/components/Result/ContentClusters';
12
+ import {
13
+ useAppConfig,
14
+ useWindowDimensions,
15
+ ContentClusters,
16
+ MoreLikeThisTrigger,
17
+ TagsList,
18
+ // ExternalLink,
19
+ ResultContext,
20
+ firstWords,
21
+ getTermDisplayValue,
22
+ } from '@eeacms/search';
23
+ import { Link } from 'react-router-dom';
24
+
25
+ const DatahubCardItem = (props) => {
26
+ const { result, showControls = true } = props;
27
+ const { appConfig } = useAppConfig();
28
+ const { vocab = {}, debugQuery } = appConfig;
29
+ const [hovered, setHovered] = React.useState(false);
30
+
31
+ // console.log('result', result.metaTypes, result._result);
32
+
33
+ let metaType = result.metaTypes || '';
34
+ if (metaType.length === 0) {
35
+ metaType = 'Others';
36
+ }
37
+
38
+ const classColLeft = result.hasImage ? 'col-left' : 'col-left no-image';
39
+
40
+ const { width } = useWindowDimensions();
41
+ const isSmallScreen = width < 1000;
42
+ const clusters = result.clusterInfo;
43
+ const [resultId] = (result.href || '').split('/').reverse();
44
+
45
+ return (
46
+ <div
47
+ className={cx('search-result', { hovered })}
48
+ onMouseEnter={() => setHovered(true)}
49
+ onMouseLeave={() => setHovered(false)}
50
+ >
51
+ <div className="col-full">
52
+ <div className="meta">
53
+ <ContentClusters clusters={clusters} item={result} />
54
+ <div className="tags-list">
55
+ <TagsList value={result.tags} />
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <div className={classColLeft}>
60
+ <div className="details">
61
+ <h3>
62
+ <Link to={`/datahub/view/${resultId}`} title={result.title}>
63
+ {firstWords(result.title, 12)}
64
+ </Link>
65
+ {result.isNew && (
66
+ <Label className="new-item" horizontal>
67
+ New
68
+ </Label>
69
+ )}
70
+ {result.isExpired && (
71
+ <Label className="archived-item" horizontal>
72
+ Archived
73
+ </Label>
74
+ )}
75
+ </h3>
76
+ <div className="source">
77
+ <span>Source: </span>
78
+ <Link to={`/datahub/view/${resultId}`} title={result.title}>
79
+ <strong title={result.source} className="source">
80
+ {firstWords(
81
+ getTermDisplayValue({
82
+ vocab,
83
+ field: 'cluster_name',
84
+ term: result.source,
85
+ }),
86
+ 8,
87
+ )}
88
+ </strong>
89
+ {/* <SegmentedBreadcrumb */}
90
+ {/* href={result.href} */}
91
+ {/* short={true} */}
92
+ {/* maxChars={40} */}
93
+ {/* /> */}
94
+ </Link>
95
+
96
+ {showControls && !isSmallScreen && (
97
+ <MoreLikeThisTrigger
98
+ view={Button}
99
+ className="mlt"
100
+ compact
101
+ color="green"
102
+ size="mini"
103
+ result={result}
104
+ >
105
+ more like this
106
+ </MoreLikeThisTrigger>
107
+ )}
108
+ {showControls && isSmallScreen && (
109
+ <Dropdown icon="ellipsis vertical">
110
+ <Dropdown.Menu className="mlt">
111
+ <MoreLikeThisTrigger result={result} view={Dropdown.Item}>
112
+ More like this
113
+ </MoreLikeThisTrigger>
114
+ </Dropdown.Menu>
115
+ </Dropdown>
116
+ )}
117
+ </div>
118
+
119
+ {props.children ? props.children : <ResultContext {...props} />}
120
+ </div>
121
+ {debugQuery && (
122
+ <div>
123
+ <div>Explanation:</div>
124
+ <pre>{JSON.stringify(result.explanation, undefined, 2)}</pre>
125
+ </div>
126
+ )}
127
+ </div>
128
+ {result.hasImage ? (
129
+ <div className="col-right">
130
+ <a
131
+ className={`centered fluid image img-thumbnail`}
132
+ href={result.href}
133
+ target="_blank"
134
+ rel="noreferrer"
135
+ >
136
+ <img
137
+ alt={result.title}
138
+ src={result.thumbUrl}
139
+ onError={(e) => {
140
+ e.target.style.display = 'none';
141
+ }}
142
+ />
143
+ </a>
144
+ </div>
145
+ ) : null}
146
+ </div>
147
+ );
148
+ };
149
+
150
+ export default DatahubCardItem;
@@ -0,0 +1,370 @@
1
+ import { multiTermFacet, fixedRangeFacet } from '@eeacms/search';
2
+ import {
3
+ // booleanFacet,
4
+ // histogramFacet,
5
+ // makeRange,
6
+ dateRangeFacet,
7
+ } from '@eeacms/search';
8
+
9
+ // import { getTodayWithTime } from '@eeacms/globalsearch/utils';
10
+ const facets = [
11
+ multiTermFacet({
12
+ field: 'rod',
13
+ isFilterable: true,
14
+ isMulti: true,
15
+ label: 'Reporting obligations',
16
+ factory: 'MultiTermListFacet',
17
+ wrapper: 'ModalFacetWrapper',
18
+ show: 10000,
19
+ showAllOptions: true, // show all options (even if 0) in modal facet
20
+ // factory: 'sui.Facet',
21
+ }),
22
+ multiTermFacet({
23
+ field: 'topic',
24
+ isFilterable: true,
25
+ isMulti: true,
26
+ label: 'EEA topics',
27
+ factory: 'MultiTermListFacet',
28
+ wrapper: 'ModalFacetWrapper',
29
+ show: 10000,
30
+ showAllOptions: true, // show all options (even if 0) in modal facet
31
+ // factory: 'sui.Facet',
32
+ }),
33
+ multiTermFacet({
34
+ field: 'gemet',
35
+ isFilterable: true,
36
+ isMulti: true,
37
+ label: 'GEMET keywords',
38
+ factory: 'MultiTermListFacet',
39
+ wrapper: 'ModalFacetWrapper',
40
+ show: 10000,
41
+ showAllOptions: true, // show all options (even if 0) in modal facet
42
+ // factory: 'sui.Facet',
43
+ }),
44
+ multiTermFacet({
45
+ field: 'organisation',
46
+ isFilterable: true,
47
+ isMulti: true,
48
+ label: 'Organisations',
49
+ factory: 'MultiTermListFacet',
50
+ wrapper: 'ModalFacetWrapper',
51
+ show: 10000,
52
+ showAllOptions: true, // show all options (even if 0) in modal facet
53
+ // factory: 'sui.Facet',
54
+ }),
55
+ multiTermFacet({
56
+ field: 'spatialRepresentationType',
57
+ isFilterable: true,
58
+ isMulti: true,
59
+ label: 'Spatial Representation Type',
60
+ factory: 'MultiTermListFacet',
61
+ wrapper: 'ModalFacetWrapper',
62
+ show: 10000,
63
+ showAllOptions: true, // show all options (even if 0) in modal facet
64
+ // factory: 'sui.Facet',
65
+ }),
66
+ fixedRangeFacet({
67
+ wrapper: 'ModalFacetWrapper',
68
+ field: 'resolutionScaleDenominator',
69
+ label: 'Scales',
70
+ rangeType: 'fixed',
71
+ isMulti: true,
72
+ ranges: [
73
+ { from: 0, to: 99999, key: '*-100,000' },
74
+ { from: 100000, to: 999999, key: '100,000-1,000,000' },
75
+ { from: 1000000, to: 9999999, key: '1,000,000-10,000,000' },
76
+ { from: 10000000, to: 99999999999, key: '10,000,000-*' },
77
+ // { to: -0.0001, key: 'Unknown' },
78
+ ],
79
+ factory: 'ModalFixedRangeFacet',
80
+ // default: {
81
+ // values: [{ name: 'All', rangeType: 'fixed' }],
82
+ // type: 'any',
83
+ // },
84
+ }),
85
+ ////////////////////
86
+ // booleanFacet(() => ({
87
+ // field: 'IncludeArchived',
88
+ // label: 'Include archived content',
89
+ // id: 'archived-facet',
90
+ // showInFacetsList: false,
91
+ // showInSecondaryFacetsList: true,
92
+ // isFilter: true, // filters don't need facet options to show up
93
+
94
+ // // we want this to be applied by default
95
+ // // when the facet is checked, then apply the `on` key:
96
+ // off: {
97
+ // constant_score: {
98
+ // filter: {
99
+ // bool: {
100
+ // should: [
101
+ // { bool: { must_not: { exists: { field: 'expires' } } } },
102
+ // // Functions should be supported in the buildFilters
103
+ // { range: { expires: { gte: getTodayWithTime() } } },
104
+ // ],
105
+ // },
106
+ // },
107
+ // },
108
+ // },
109
+ // on: null,
110
+ // })),
111
+ // multiTermFacet({
112
+ // field: 'moreLikeThis',
113
+ // isFilterable: true,
114
+ // isMulti: false,
115
+ // label: 'More like this',
116
+ // showInFacetsList: false,
117
+ // filterListComponent: 'MoreLikeThisEntry',
118
+ // factory: 'MoreLikeThis',
119
+ // condition: 'like',
120
+ // queryParams: {
121
+ // fields: ['title', 'text'],
122
+ // min_term_freq: 1,
123
+ // max_query_terms: 12,
124
+ // },
125
+
126
+ // // registryConfig: 'MoreLikeThis',
127
+ // }),
128
+ // multiTermFacet({
129
+ // field: 'topic',
130
+ // isFilterable: true,
131
+ // isMulti: true,
132
+ // label: 'Topics',
133
+ // //blacklist: topicsBlacklist,
134
+ // factory: 'MultiTermListFacet',
135
+ // wrapper: 'ModalFacetWrapper',
136
+ // show: 10000,
137
+ // showAllOptions: true, // show all options (even if 0) in modal facet
138
+ // // factory: 'sui.Facet',
139
+ // }),
140
+ // multiTermFacet({
141
+ // field: 'spatial',
142
+ // isFilterable: true,
143
+ // isMulti: true,
144
+ // label: 'Countries',
145
+ // //whitelist: spatialWhitelist,
146
+ // wrapper: 'ModalFacetWrapper',
147
+ // show: 10000,
148
+ // factory: 'MultiTermListFacet',
149
+ // iconsFamily: 'Countries',
150
+ // enableExact: true,
151
+ // sortOn: 'value',
152
+ // }),
153
+ multiTermFacet({
154
+ field: 'op_cluster',
155
+ isFilterable: true,
156
+ isMulti: true,
157
+ label: 'Section',
158
+ wrapper: 'ModalFacetWrapper',
159
+ show: 10000,
160
+ factory: 'MultiTermListFacet',
161
+ showInFacetsList: false,
162
+ }),
163
+
164
+ // multiTermFacet({
165
+ // field: 'places',
166
+ // isFilterable: true,
167
+ // isMulti: true,
168
+ // label: 'Regions/Places/Cities/Seas...',
169
+ // //blacklist: placesBlacklist,
170
+ // wrapper: 'ModalFacetWrapper',
171
+ // show: 10000,
172
+ // factory: 'MultiTermListFacet',
173
+ // showAllOptions: true, // show all options (even if 0) in modal facet
174
+ // }),
175
+ // multiTermFacet({
176
+ // field: 'objectProvides',
177
+ // isFilterable: false,
178
+ // isMulti: true,
179
+ // label: 'Content types',
180
+ // iconsFamily: 'Content types',
181
+ // //whitelist: objectProvidesWhitelist,
182
+ // wrapper: 'ModalFacetWrapper',
183
+ // factory: 'MultiTermListFacet',
184
+ // optionsFilter: 'typesForClustersOptionsFilter',
185
+ // }),
186
+ multiTermFacet({
187
+ field: 'cluster_name',
188
+ isFilterable: false,
189
+ isMulti: true,
190
+ showInFacetsList: false,
191
+ label: 'Sources',
192
+ wrapper: 'ModalFacetWrapper',
193
+ factory: 'MultiTermListFacet',
194
+ iconsFamily: 'Sources',
195
+ }),
196
+ // histogramFacet({
197
+ // wrapper: 'ModalFacetWrapper',
198
+ // field: 'year',
199
+ // // isFilterable: false,
200
+ // isMulti: true,
201
+ // label: 'Publishing year',
202
+ // // TODO: implement split in buckets
203
+ // ranges: makeRange({
204
+ // step: 1,
205
+ // normalRange: [1994, 2022],
206
+ // includeOutlierStart: false,
207
+ // includeOutlierEnd: false,
208
+ // }),
209
+ // step: 10,
210
+ // // [
211
+ // // {
212
+ // // to: 1900,
213
+ // // },
214
+ // // {
215
+ // // key: '2001-2010',
216
+ // // from: 2001,
217
+ // // to: 2010,
218
+ // // },
219
+ // // {
220
+ // // from: 2011,
221
+ // // },
222
+ // // ]
223
+ // // min_max_script:
224
+ // //
225
+ // //"def vals = doc['year']; if (vals.length == 0){return 2000} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2000);}return ret;}",
226
+
227
+ // aggs_script:
228
+ // "def vals = doc['year']; if (vals.length == 0){return 2500} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2500);}return ret;}",
229
+ // }),
230
+
231
+ // histogramFacet({
232
+ // wrapper: 'ModalFacetWrapper',
233
+ // field: 'time_coverage',
234
+ // // isFilterable: false,
235
+ // isMulti: true,
236
+ // label: 'Time coverage',
237
+ // // TODO: implement split in buckets
238
+ // ranges: makeRange({
239
+ // step: 10,
240
+ // normalRange: [1700, 2210],
241
+ // includeOutlierStart: false,
242
+ // includeOutlierEnd: false,
243
+ // }),
244
+ // step: 10,
245
+ // // [
246
+ // // {
247
+ // // to: 1900,
248
+ // // },
249
+ // // {
250
+ // // key: '2001-2010',
251
+ // // from: 2001,
252
+ // // to: 2010,
253
+ // // },
254
+ // // {
255
+ // // from: 2011,
256
+ // // },
257
+ // // ]
258
+ // // min_max_script:
259
+ // //
260
+ // //"def vals = doc['year']; if (vals.length == 0){return 2000} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2000);}return ret;}",
261
+
262
+ // aggs_script:
263
+ // "def vals = doc['time_coverage']; if (vals.length == 0){return 2500} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2500);}return ret;}",
264
+ // }),
265
+
266
+ // fixedRangeFacet({
267
+ // wrapper: 'ModalFacetWrapper',
268
+ // field: 'readingTime',
269
+ // label: 'Reading time (minutes)',
270
+ // rangeType: 'fixed',
271
+ // isMulti: true,
272
+ // ranges: [
273
+ // { key: 'All' },
274
+ // { from: 0, to: 4.99999, key: 'Short (<5 minutes)' },
275
+ // { from: 5, to: 24.9999, key: 'Medium (5-25 minutes)' },
276
+ // { from: 25, to: 10000, key: 'Large (25+ minutes)' },
277
+ // // { to: -0.0001, key: 'Unknown' },
278
+ // ],
279
+ // factory: 'ModalFixedRangeFacet',
280
+ // default: {
281
+ // values: [{ name: 'All', rangeType: 'fixed' }],
282
+ // type: 'any',
283
+ // },
284
+ // }),
285
+ dateRangeFacet({
286
+ field: 'issued.date',
287
+ label: ' ',
288
+ isFilter: true, // filters don't need facet options to show up
289
+ showInFacetsList: false,
290
+ showInSecondaryFacetsList: true,
291
+ // rangeType: 'dateRange',
292
+ isMulti: false,
293
+ ranges: [
294
+ { key: 'All time' },
295
+ { key: 'Last week', from: 'now-1w', to: 'now' },
296
+ { key: 'Last month', from: 'now-1m', to: 'now' },
297
+ { key: 'Last 3 months', from: 'now-3m', to: 'now' },
298
+ { key: 'Last year', from: 'now-1y', to: 'now' },
299
+ { key: 'Last 2 years', from: 'now-2y', to: 'now' },
300
+ ],
301
+ factory: 'DropdownRangeFilter',
302
+ default: {
303
+ values: ['All time'],
304
+ type: 'any',
305
+ },
306
+ }),
307
+ // multiTermFacet({
308
+ // wrapper: 'ModalFacetWrapper',
309
+ // field: 'language',
310
+ // isFilterable: false,
311
+ // isMulti: true,
312
+ // label: 'Language',
313
+ // default: {
314
+ // values: ['en'],
315
+ // type: 'any',
316
+ // },
317
+ // factory: 'MultiTermListFacet',
318
+ // facetValues: [
319
+ // 'ar',
320
+ // 'sr',
321
+ // 'sq',
322
+ // 'bg',
323
+ // 'bs',
324
+ // 'cs',
325
+ // 'hr',
326
+ // 'da',
327
+ // 'nl',
328
+ // 'el',
329
+ // 'en',
330
+ // 'et',
331
+ // 'fi',
332
+ // 'fr',
333
+ // 'ga',
334
+ // 'de',
335
+ // 'hu',
336
+ // 'is',
337
+ // 'it',
338
+ // 'lv',
339
+ // 'lt',
340
+ // 'mk',
341
+ // 'mt',
342
+ // 'no',
343
+ // 'pl',
344
+ // 'pt',
345
+ // 'ro',
346
+ // 'ru',
347
+ // 'sh',
348
+ // 'sk',
349
+ // 'sl',
350
+ // 'es',
351
+ // 'sv',
352
+ // 'tr',
353
+ // ],
354
+ // sortOn: 'custom',
355
+ // sortOnCustomLabel: 'Alphabetical',
356
+ // }),
357
+ ];
358
+
359
+ export default {
360
+ facets,
361
+ };
362
+
363
+ // default filter values
364
+ // TODO: this needs to be removed and the configuration plugged into each of
365
+ // the facets
366
+ // readingTime: {
367
+ // value: { name: 'All', rangeType: 'fixed' },
368
+ // type: 'any',
369
+ // },
370
+ // },
@@ -0,0 +1,4 @@
1
+ export default {
2
+ // filter values that are always added to the ES requests
3
+ permanentFilters: [{ term: { cluster_name: 'sdi' } }],
4
+ };
@@ -0,0 +1,55 @@
1
+ import { mergeConfig } from '@eeacms/search';
2
+ import facets from './facets';
3
+ import views from './views';
4
+ import filters from './filters';
5
+ import vocabs from './vocabulary';
6
+
7
+ import DatahubLandingPage from '../components/LandingPage/DatahubLandingPage';
8
+
9
+ const datahubConfig = {
10
+ title: 'Datahub',
11
+
12
+ ...facets,
13
+ ...views,
14
+ ...filters,
15
+ ...vocabs,
16
+
17
+ sourceExcludedFields: ['nlp_*', 'event'], // don't need these in results
18
+ };
19
+
20
+ const getClientProxyAddress = () => {
21
+ const url = new URL(window.location);
22
+ url.pathname = '';
23
+ url.search = '';
24
+ return url.toString();
25
+ };
26
+
27
+ export default function install(config) {
28
+ // console.log(process.env.RAZZLE_ENV_CONFIG);
29
+ const envConfig = process.env.RAZZLE_ENV_CONFIG
30
+ ? JSON.parse(process.env.RAZZLE_ENV_CONFIG)
31
+ : datahubConfig;
32
+
33
+ const pjson = require('../../package.json');
34
+ envConfig.app_name = pjson.name;
35
+ envConfig.app_version = pjson.version;
36
+
37
+ config.searchui.datahub = {
38
+ ...mergeConfig(envConfig, config.searchui.globalsearch),
39
+ elastic_index: 'es',
40
+ host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
41
+ };
42
+
43
+ config.searchui.datahub.facets = envConfig.facets;
44
+
45
+ config.resolve['DatahubLandingPage'] = {
46
+ component: DatahubLandingPage,
47
+ };
48
+
49
+ if (typeof window !== 'undefined') {
50
+ config.searchui.datahub.host =
51
+ process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
52
+ }
53
+
54
+ return config;
55
+ }
@@ -0,0 +1,45 @@
1
+ export default {
2
+ resultViews: [
3
+ {
4
+ id: 'datahubCards',
5
+ title: 'Horizontal cards',
6
+ icon: 'bars',
7
+ render: null,
8
+ isDefault: true,
9
+ factories: {
10
+ view: 'HorizontalCard.Group',
11
+ item: 'DatahubCardItem',
12
+ },
13
+ },
14
+ ],
15
+ initialView: {
16
+ factory: 'DatahubLandingPage',
17
+ tilesLandingPageParams: {
18
+ maxPerSection: 30,
19
+ sortField: 'issued.date',
20
+ sortDirection: 'desc',
21
+ sections: [
22
+ {
23
+ id: 'rod',
24
+ title: 'Reporting obligations',
25
+ facetField: 'rod',
26
+ sortOn: 'alpha',
27
+ },
28
+ {
29
+ id: 'topics',
30
+ title: 'EEA topics',
31
+ facetField: 'topic',
32
+ sortOn: 'alpha',
33
+ },
34
+ {
35
+ id: 'website',
36
+ title: 'Sources',
37
+ facetField: 'cluster_name',
38
+ sortOn: 'count',
39
+ sortOrder: 'desc',
40
+ hidden: true,
41
+ },
42
+ ],
43
+ },
44
+ },
45
+ };
@@ -0,0 +1,7 @@
1
+ const vocab = {
2
+ cluster_name: {
3
+ sdi: 'Datahub series',
4
+ },
5
+ };
6
+
7
+ export default { vocab };
package/src/index.js ADDED
@@ -0,0 +1,44 @@
1
+ import installDatahub from './config';
2
+ import DatahubCardItem from './components/Result/DatahubCardItem';
3
+ import DatahubItemView from './components/ItemView/ItemView';
4
+
5
+ function tweakForNLPService(body, config) {
6
+ if (!config.enableNLP) {
7
+ body._source = { ...body.source };
8
+ delete body.source;
9
+ delete body.index;
10
+ return body;
11
+ }
12
+ return body;
13
+ }
14
+
15
+ const applyConfig = (config) => {
16
+ config.settings.searchlib = installDatahub(config.settings.searchlib);
17
+
18
+ const {
19
+ resolve,
20
+ searchui: { datahub },
21
+ } = config.settings.searchlib;
22
+
23
+ resolve.DatahubCardItem = { component: DatahubCardItem };
24
+
25
+ // Tweak the searchlib config to use the middleware instead of the index
26
+ datahub.elastic_index = '_es/datahub';
27
+ datahub.index_name = 'data_searchui_datahub';
28
+ datahub.enableNLP = false;
29
+ datahub.requestBodyModifiers.push(tweakForNLPService);
30
+ // datahub.resultViews[0].factories.item = "DatahubListingViewItem"
31
+
32
+ config.settings.nonContentRoutes.push(/\/datahub\/view\/(.*)/);
33
+ config.addonRoutes = [
34
+ {
35
+ path: '/datahub/view/:id',
36
+ component: DatahubItemView,
37
+ },
38
+
39
+ ...(config.addonRoutes || []),
40
+ ];
41
+ return config;
42
+ };
43
+
44
+ export default applyConfig;