@mjhls/mjh-framework 1.0.884-content-card-pagination-v1 → 1.0.884-gridcontent-paginated-v2
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/cjs/GridContent.js +44 -157
- package/dist/cjs/GridContentPaginated.js +703 -0
- package/dist/cjs/PublicationFeature-5ccf9b13.js +130 -0
- package/dist/cjs/index.js +1 -0
- package/dist/esm/GridContent.js +2 -114
- package/dist/esm/GridContentPaginated.js +692 -0
- package/dist/esm/PublicationFeature-d88e76b9.js +121 -0
- package/dist/esm/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import Row from 'react-bootstrap/Row';
|
|
3
|
+
import Col from 'react-bootstrap/Col';
|
|
4
|
+
import Button from 'react-bootstrap/Button';
|
|
5
|
+
import { L as LazyLoad } from './index-755f2cc2.js';
|
|
6
|
+
import urlFor from './urlFor.js';
|
|
7
|
+
|
|
8
|
+
var PublicationFeature = function PublicationFeature(_ref) {
|
|
9
|
+
var data = _ref.data,
|
|
10
|
+
_ref$issueMapping = _ref.issueMapping,
|
|
11
|
+
issueMapping = _ref$issueMapping === undefined ? '/publications' : _ref$issueMapping,
|
|
12
|
+
defaultImage = _ref.defaultImage,
|
|
13
|
+
client = _ref.client;
|
|
14
|
+
|
|
15
|
+
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
16
|
+
var _data$parent = data.parent;
|
|
17
|
+
_data$parent = _data$parent === undefined ? {} : _data$parent;
|
|
18
|
+
var _data$parent$identifi = _data$parent.identifier;
|
|
19
|
+
_data$parent$identifi = _data$parent$identifi === undefined ? {} : _data$parent$identifi;
|
|
20
|
+
var parentSlug = _data$parent$identifi.current,
|
|
21
|
+
_data$identifier = data.identifier;
|
|
22
|
+
_data$identifier = _data$identifier === undefined ? {} : _data$identifier;
|
|
23
|
+
var childSlug = _data$identifier.current,
|
|
24
|
+
name = data.name,
|
|
25
|
+
articles = data.articles,
|
|
26
|
+
month = data.month,
|
|
27
|
+
year = data.year,
|
|
28
|
+
thumbnail = data.thumbnail;
|
|
29
|
+
|
|
30
|
+
if (name && articles && articles.length > 0) {
|
|
31
|
+
return React__default.createElement(
|
|
32
|
+
'div',
|
|
33
|
+
{ className: 'publication-feature-container border rounded p-2' },
|
|
34
|
+
React__default.createElement(
|
|
35
|
+
Row,
|
|
36
|
+
null,
|
|
37
|
+
React__default.createElement(
|
|
38
|
+
Col,
|
|
39
|
+
{ xs: 12 },
|
|
40
|
+
React__default.createElement(
|
|
41
|
+
'h4',
|
|
42
|
+
null,
|
|
43
|
+
name,
|
|
44
|
+
month && year && React__default.createElement(
|
|
45
|
+
'span',
|
|
46
|
+
null,
|
|
47
|
+
' ',
|
|
48
|
+
'| ',
|
|
49
|
+
months[parseInt(month, 10)],
|
|
50
|
+
' ',
|
|
51
|
+
year
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
),
|
|
55
|
+
React__default.createElement(
|
|
56
|
+
Col,
|
|
57
|
+
{ xs: 12, sm: 4 },
|
|
58
|
+
React__default.createElement(
|
|
59
|
+
LazyLoad,
|
|
60
|
+
{ once: true },
|
|
61
|
+
React__default.createElement('img', { className: 'w-100 mb-2', src: thumbnail && thumbnail.asset && client ? urlFor({ client: client, source: thumbnail.asset }) : defaultImage, alt: name || '' })
|
|
62
|
+
)
|
|
63
|
+
),
|
|
64
|
+
React__default.createElement(
|
|
65
|
+
Col,
|
|
66
|
+
{ xs: 12, sm: 8 },
|
|
67
|
+
React__default.createElement(
|
|
68
|
+
Row,
|
|
69
|
+
null,
|
|
70
|
+
articles.map(function (article) {
|
|
71
|
+
return React__default.createElement(
|
|
72
|
+
Col,
|
|
73
|
+
{ key: article._id, xs: 12, sm: 6 },
|
|
74
|
+
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
75
|
+
'h6',
|
|
76
|
+
{ className: 'text-primary m-0 p-0 text-uppercase font-weight-bold' },
|
|
77
|
+
article.issueSection.name
|
|
78
|
+
),
|
|
79
|
+
article.title && React__default.createElement(
|
|
80
|
+
React__default.Fragment,
|
|
81
|
+
null,
|
|
82
|
+
article.url && article.url.current ? React__default.createElement(
|
|
83
|
+
'a',
|
|
84
|
+
{ href: '/view/' + article.url.current },
|
|
85
|
+
React__default.createElement(
|
|
86
|
+
'h6',
|
|
87
|
+
{ className: 'text-break' },
|
|
88
|
+
article.title
|
|
89
|
+
)
|
|
90
|
+
) : React__default.createElement(
|
|
91
|
+
'h6',
|
|
92
|
+
{ className: 'text-break' },
|
|
93
|
+
article.title
|
|
94
|
+
)
|
|
95
|
+
)
|
|
96
|
+
);
|
|
97
|
+
})
|
|
98
|
+
)
|
|
99
|
+
),
|
|
100
|
+
issueMapping && parentSlug && childSlug && React__default.createElement(
|
|
101
|
+
Col,
|
|
102
|
+
{ xs: 12 },
|
|
103
|
+
React__default.createElement(
|
|
104
|
+
Button,
|
|
105
|
+
{ href: issueMapping + '/' + parentSlug + '/' + childSlug, className: 'float-right', variant: 'outline-primary' },
|
|
106
|
+
'More Articles ',
|
|
107
|
+
'>>'
|
|
108
|
+
)
|
|
109
|
+
)
|
|
110
|
+
),
|
|
111
|
+
React__default.createElement(
|
|
112
|
+
'style',
|
|
113
|
+
{ jsx: 'true' },
|
|
114
|
+
'\n .row {\n margin-top: -15px;\n margin-left: -15px;\n margin-right: 0;\n }\n .row > * {\n padding-top: 15px;\n padding-left: 15px;\n padding-right: 0;\n }\n '
|
|
115
|
+
)
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
return null;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export { PublicationFeature as P };
|
package/dist/esm/index.js
CHANGED
|
@@ -132,6 +132,7 @@ import './getContentCategory-15dcc413.js';
|
|
|
132
132
|
import './get-3c308da4.js';
|
|
133
133
|
import './eq-bdcbf886.js';
|
|
134
134
|
import './AuthorComponent-11adff02.js';
|
|
135
|
+
import './PublicationFeature-d88e76b9.js';
|
|
135
136
|
import 'react-bootstrap/Button';
|
|
136
137
|
import 'react-bootstrap/Media';
|
|
137
138
|
import './BlockContent-1e73bd2c.js';
|