@mjhls/mjh-framework 1.0.884-content-card-pagination-v1 → 1.0.884-gridcontent-paginated-v1
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 +695 -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 +684 -0
- package/dist/esm/PublicationFeature-d88e76b9.js +121 -0
- package/dist/esm/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Row = require('react-bootstrap/Row');
|
|
5
|
+
var Col = require('react-bootstrap/Col');
|
|
6
|
+
var Button = require('react-bootstrap/Button');
|
|
7
|
+
var index = require('./index-eadd5035.js');
|
|
8
|
+
var urlFor = require('./urlFor.js');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
var Row__default = /*#__PURE__*/_interopDefaultLegacy(Row);
|
|
14
|
+
var Col__default = /*#__PURE__*/_interopDefaultLegacy(Col);
|
|
15
|
+
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
16
|
+
|
|
17
|
+
var PublicationFeature = function PublicationFeature(_ref) {
|
|
18
|
+
var data = _ref.data,
|
|
19
|
+
_ref$issueMapping = _ref.issueMapping,
|
|
20
|
+
issueMapping = _ref$issueMapping === undefined ? '/publications' : _ref$issueMapping,
|
|
21
|
+
defaultImage = _ref.defaultImage,
|
|
22
|
+
client = _ref.client;
|
|
23
|
+
|
|
24
|
+
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
25
|
+
var _data$parent = data.parent;
|
|
26
|
+
_data$parent = _data$parent === undefined ? {} : _data$parent;
|
|
27
|
+
var _data$parent$identifi = _data$parent.identifier;
|
|
28
|
+
_data$parent$identifi = _data$parent$identifi === undefined ? {} : _data$parent$identifi;
|
|
29
|
+
var parentSlug = _data$parent$identifi.current,
|
|
30
|
+
_data$identifier = data.identifier;
|
|
31
|
+
_data$identifier = _data$identifier === undefined ? {} : _data$identifier;
|
|
32
|
+
var childSlug = _data$identifier.current,
|
|
33
|
+
name = data.name,
|
|
34
|
+
articles = data.articles,
|
|
35
|
+
month = data.month,
|
|
36
|
+
year = data.year,
|
|
37
|
+
thumbnail = data.thumbnail;
|
|
38
|
+
|
|
39
|
+
if (name && articles && articles.length > 0) {
|
|
40
|
+
return React__default['default'].createElement(
|
|
41
|
+
'div',
|
|
42
|
+
{ className: 'publication-feature-container border rounded p-2' },
|
|
43
|
+
React__default['default'].createElement(
|
|
44
|
+
Row__default['default'],
|
|
45
|
+
null,
|
|
46
|
+
React__default['default'].createElement(
|
|
47
|
+
Col__default['default'],
|
|
48
|
+
{ xs: 12 },
|
|
49
|
+
React__default['default'].createElement(
|
|
50
|
+
'h4',
|
|
51
|
+
null,
|
|
52
|
+
name,
|
|
53
|
+
month && year && React__default['default'].createElement(
|
|
54
|
+
'span',
|
|
55
|
+
null,
|
|
56
|
+
' ',
|
|
57
|
+
'| ',
|
|
58
|
+
months[parseInt(month, 10)],
|
|
59
|
+
' ',
|
|
60
|
+
year
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
),
|
|
64
|
+
React__default['default'].createElement(
|
|
65
|
+
Col__default['default'],
|
|
66
|
+
{ xs: 12, sm: 4 },
|
|
67
|
+
React__default['default'].createElement(
|
|
68
|
+
index.LazyLoad,
|
|
69
|
+
{ once: true },
|
|
70
|
+
React__default['default'].createElement('img', { className: 'w-100 mb-2', src: thumbnail && thumbnail.asset && client ? urlFor({ client: client, source: thumbnail.asset }) : defaultImage, alt: name || '' })
|
|
71
|
+
)
|
|
72
|
+
),
|
|
73
|
+
React__default['default'].createElement(
|
|
74
|
+
Col__default['default'],
|
|
75
|
+
{ xs: 12, sm: 8 },
|
|
76
|
+
React__default['default'].createElement(
|
|
77
|
+
Row__default['default'],
|
|
78
|
+
null,
|
|
79
|
+
articles.map(function (article) {
|
|
80
|
+
return React__default['default'].createElement(
|
|
81
|
+
Col__default['default'],
|
|
82
|
+
{ key: article._id, xs: 12, sm: 6 },
|
|
83
|
+
article.issueSection && article.issueSection.name && React__default['default'].createElement(
|
|
84
|
+
'h6',
|
|
85
|
+
{ className: 'text-primary m-0 p-0 text-uppercase font-weight-bold' },
|
|
86
|
+
article.issueSection.name
|
|
87
|
+
),
|
|
88
|
+
article.title && React__default['default'].createElement(
|
|
89
|
+
React__default['default'].Fragment,
|
|
90
|
+
null,
|
|
91
|
+
article.url && article.url.current ? React__default['default'].createElement(
|
|
92
|
+
'a',
|
|
93
|
+
{ href: '/view/' + article.url.current },
|
|
94
|
+
React__default['default'].createElement(
|
|
95
|
+
'h6',
|
|
96
|
+
{ className: 'text-break' },
|
|
97
|
+
article.title
|
|
98
|
+
)
|
|
99
|
+
) : React__default['default'].createElement(
|
|
100
|
+
'h6',
|
|
101
|
+
{ className: 'text-break' },
|
|
102
|
+
article.title
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
})
|
|
107
|
+
)
|
|
108
|
+
),
|
|
109
|
+
issueMapping && parentSlug && childSlug && React__default['default'].createElement(
|
|
110
|
+
Col__default['default'],
|
|
111
|
+
{ xs: 12 },
|
|
112
|
+
React__default['default'].createElement(
|
|
113
|
+
Button__default['default'],
|
|
114
|
+
{ href: issueMapping + '/' + parentSlug + '/' + childSlug, className: 'float-right', variant: 'outline-primary' },
|
|
115
|
+
'More Articles ',
|
|
116
|
+
'>>'
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
),
|
|
120
|
+
React__default['default'].createElement(
|
|
121
|
+
'style',
|
|
122
|
+
{ jsx: 'true' },
|
|
123
|
+
'\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 '
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
exports.PublicationFeature = PublicationFeature;
|
package/dist/cjs/index.js
CHANGED
|
@@ -135,6 +135,7 @@ require('./getContentCategory-f38a4c00.js');
|
|
|
135
135
|
require('./get-5839e5b5.js');
|
|
136
136
|
require('./eq-5fc26c07.js');
|
|
137
137
|
require('./AuthorComponent-39b37d84.js');
|
|
138
|
+
require('./PublicationFeature-5ccf9b13.js');
|
|
138
139
|
require('react-bootstrap/Button');
|
|
139
140
|
require('react-bootstrap/Media');
|
|
140
141
|
require('./BlockContent-9ebd251f.js');
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -23,7 +23,7 @@ import urlFor from './urlFor.js';
|
|
|
23
23
|
import { m as main_43 } from './main-1894c974.js';
|
|
24
24
|
import './AD.js';
|
|
25
25
|
import { A as AuthorComponent } from './AuthorComponent-11adff02.js';
|
|
26
|
-
import
|
|
26
|
+
import { P as PublicationFeature } from './PublicationFeature-d88e76b9.js';
|
|
27
27
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
28
28
|
import './core.get-iterator-method-ea258bb1.js';
|
|
29
29
|
import './_iter-detect-98db3b07.js';
|
|
@@ -47,119 +47,7 @@ import './isSymbol-a7e9aafe.js';
|
|
|
47
47
|
import './eq-bdcbf886.js';
|
|
48
48
|
import './toNumber-5aeba6e7.js';
|
|
49
49
|
import './index-3f5c03b2.js';
|
|
50
|
-
|
|
51
|
-
var PublicationFeature = function PublicationFeature(_ref) {
|
|
52
|
-
var data = _ref.data,
|
|
53
|
-
_ref$issueMapping = _ref.issueMapping,
|
|
54
|
-
issueMapping = _ref$issueMapping === undefined ? '/publications' : _ref$issueMapping,
|
|
55
|
-
defaultImage = _ref.defaultImage,
|
|
56
|
-
client = _ref.client;
|
|
57
|
-
|
|
58
|
-
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
59
|
-
var _data$parent = data.parent;
|
|
60
|
-
_data$parent = _data$parent === undefined ? {} : _data$parent;
|
|
61
|
-
var _data$parent$identifi = _data$parent.identifier;
|
|
62
|
-
_data$parent$identifi = _data$parent$identifi === undefined ? {} : _data$parent$identifi;
|
|
63
|
-
var parentSlug = _data$parent$identifi.current,
|
|
64
|
-
_data$identifier = data.identifier;
|
|
65
|
-
_data$identifier = _data$identifier === undefined ? {} : _data$identifier;
|
|
66
|
-
var childSlug = _data$identifier.current,
|
|
67
|
-
name = data.name,
|
|
68
|
-
articles = data.articles,
|
|
69
|
-
month = data.month,
|
|
70
|
-
year = data.year,
|
|
71
|
-
thumbnail = data.thumbnail;
|
|
72
|
-
|
|
73
|
-
if (name && articles && articles.length > 0) {
|
|
74
|
-
return React__default.createElement(
|
|
75
|
-
'div',
|
|
76
|
-
{ className: 'publication-feature-container border rounded p-2' },
|
|
77
|
-
React__default.createElement(
|
|
78
|
-
Row,
|
|
79
|
-
null,
|
|
80
|
-
React__default.createElement(
|
|
81
|
-
Col,
|
|
82
|
-
{ xs: 12 },
|
|
83
|
-
React__default.createElement(
|
|
84
|
-
'h4',
|
|
85
|
-
null,
|
|
86
|
-
name,
|
|
87
|
-
month && year && React__default.createElement(
|
|
88
|
-
'span',
|
|
89
|
-
null,
|
|
90
|
-
' ',
|
|
91
|
-
'| ',
|
|
92
|
-
months[parseInt(month, 10)],
|
|
93
|
-
' ',
|
|
94
|
-
year
|
|
95
|
-
)
|
|
96
|
-
)
|
|
97
|
-
),
|
|
98
|
-
React__default.createElement(
|
|
99
|
-
Col,
|
|
100
|
-
{ xs: 12, sm: 4 },
|
|
101
|
-
React__default.createElement(
|
|
102
|
-
LazyLoad,
|
|
103
|
-
{ once: true },
|
|
104
|
-
React__default.createElement('img', { className: 'w-100 mb-2', src: thumbnail && thumbnail.asset && client ? urlFor({ client: client, source: thumbnail.asset }) : defaultImage, alt: name || '' })
|
|
105
|
-
)
|
|
106
|
-
),
|
|
107
|
-
React__default.createElement(
|
|
108
|
-
Col,
|
|
109
|
-
{ xs: 12, sm: 8 },
|
|
110
|
-
React__default.createElement(
|
|
111
|
-
Row,
|
|
112
|
-
null,
|
|
113
|
-
articles.map(function (article) {
|
|
114
|
-
return React__default.createElement(
|
|
115
|
-
Col,
|
|
116
|
-
{ key: article._id, xs: 12, sm: 6 },
|
|
117
|
-
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
118
|
-
'h6',
|
|
119
|
-
{ className: 'text-primary m-0 p-0 text-uppercase font-weight-bold' },
|
|
120
|
-
article.issueSection.name
|
|
121
|
-
),
|
|
122
|
-
article.title && React__default.createElement(
|
|
123
|
-
React__default.Fragment,
|
|
124
|
-
null,
|
|
125
|
-
article.url && article.url.current ? React__default.createElement(
|
|
126
|
-
'a',
|
|
127
|
-
{ href: '/view/' + article.url.current },
|
|
128
|
-
React__default.createElement(
|
|
129
|
-
'h6',
|
|
130
|
-
{ className: 'text-break' },
|
|
131
|
-
article.title
|
|
132
|
-
)
|
|
133
|
-
) : React__default.createElement(
|
|
134
|
-
'h6',
|
|
135
|
-
{ className: 'text-break' },
|
|
136
|
-
article.title
|
|
137
|
-
)
|
|
138
|
-
)
|
|
139
|
-
);
|
|
140
|
-
})
|
|
141
|
-
)
|
|
142
|
-
),
|
|
143
|
-
issueMapping && parentSlug && childSlug && React__default.createElement(
|
|
144
|
-
Col,
|
|
145
|
-
{ xs: 12 },
|
|
146
|
-
React__default.createElement(
|
|
147
|
-
Button,
|
|
148
|
-
{ href: issueMapping + '/' + parentSlug + '/' + childSlug, className: 'float-right', variant: 'outline-primary' },
|
|
149
|
-
'More Articles ',
|
|
150
|
-
'>>'
|
|
151
|
-
)
|
|
152
|
-
)
|
|
153
|
-
),
|
|
154
|
-
React__default.createElement(
|
|
155
|
-
'style',
|
|
156
|
-
{ jsx: 'true' },
|
|
157
|
-
'\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 '
|
|
158
|
-
)
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
return null;
|
|
162
|
-
};
|
|
50
|
+
import 'react-bootstrap/Button';
|
|
163
51
|
|
|
164
52
|
var GridContent = function (_React$Component) {
|
|
165
53
|
_inherits(GridContent, _React$Component);
|