@mjhls/mjh-framework 1.0.884-beta.0 → 1.0.884-beta.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.
Files changed (91) hide show
  1. package/dist/cjs/AD.js +1 -1
  2. package/dist/cjs/AlgoliaSearch.js +1 -1
  3. package/dist/cjs/ArticleProgramLandingPage.js +6 -6
  4. package/dist/cjs/ArticleSeriesLandingPage.js +4 -4
  5. package/dist/cjs/ArticleSeriesListing.js +1 -1
  6. package/dist/cjs/ContentCardPaginated.js +409 -0
  7. package/dist/cjs/DeckContent.js +1 -1
  8. package/dist/cjs/DeckQueue.js +1 -1
  9. package/dist/cjs/DeckQueuePaginated.js +340 -0
  10. package/dist/cjs/{Dfp-14d2455c.js → Dfp-f492f985.js} +2 -2
  11. package/dist/cjs/ExternalResources.js +2 -2
  12. package/dist/cjs/GridContent.js +4 -116
  13. package/dist/cjs/GridContentPaginated.js +699 -0
  14. package/dist/cjs/HorizontalArticleListing.js +2 -2
  15. package/dist/cjs/ImageSlider-38f25e66.js +3989 -0
  16. package/dist/cjs/IssueLanding.js +2 -2
  17. package/dist/cjs/MasterDeck.js +1 -1
  18. package/dist/cjs/MasterDeckPaginated.js +444 -0
  19. package/dist/cjs/MediaSeriesCard-8d27612b.js +9411 -0
  20. package/dist/cjs/MediaSeriesLanding.js +26 -9415
  21. package/dist/cjs/MediaSeriesLandingPaginated.js +522 -0
  22. package/dist/cjs/Pagination-2f76381b.js +51 -0
  23. package/dist/cjs/PartnerDetailListing.js +15 -3986
  24. package/dist/cjs/PartnerDetailListingPaginated.js +312 -0
  25. package/dist/cjs/PublicationFeature-28c549f2.js +126 -0
  26. package/dist/cjs/QueueDeckExpandedPaginated.js +1378 -0
  27. package/dist/cjs/TaxonomyDescription.js +2 -2
  28. package/dist/cjs/VideoProgramLandingPage.js +5 -5
  29. package/dist/cjs/VideoSeriesLandingPage.js +4 -4
  30. package/dist/cjs/VideoSeriesListing.js +1 -1
  31. package/dist/cjs/View.js +83 -3
  32. package/dist/cjs/faundadb.js +15 -15
  33. package/dist/cjs/getRootDocGroup.js +3 -3
  34. package/dist/cjs/getSerializers.js +2 -2
  35. package/dist/cjs/{index-396089c0.js → index-54adcbc3.js} +1 -1
  36. package/dist/cjs/index.js +4 -4
  37. package/dist/cjs/{inherits-cba9c846.js → inherits-12d44cca.js} +2 -2
  38. package/dist/esm/{ADInfeed-8a038df9.js → ADInfeed-d767ebe2.js} +2 -2
  39. package/dist/esm/ArticleProgramLandingPage.js +1 -1
  40. package/dist/esm/ArticleSeriesLandingPage.js +1 -1
  41. package/dist/esm/ArticleSeriesListing.js +2 -2
  42. package/dist/esm/Column1.js +4 -4
  43. package/dist/esm/Column2.js +5 -5
  44. package/dist/esm/Column3.js +6 -6
  45. package/dist/esm/ContentCardPaginated.js +403 -0
  46. package/dist/esm/DeckContent.js +16 -16
  47. package/dist/esm/DeckQueue.js +18 -18
  48. package/dist/esm/DeckQueuePaginated.js +334 -0
  49. package/dist/esm/EventsDeck.js +26 -26
  50. package/dist/esm/ExternalResources.js +3 -3
  51. package/dist/esm/GridContent.js +38 -150
  52. package/dist/esm/GridContentPaginated.js +693 -0
  53. package/dist/esm/HamMagazine.js +4 -4
  54. package/dist/esm/HorizontalArticleListing.js +1 -1
  55. package/dist/esm/ImageSlider-a3154b97.js +3980 -0
  56. package/dist/esm/IssueContentDeck.js +14 -14
  57. package/dist/esm/IssueDeck.js +22 -22
  58. package/dist/esm/IssueLanding.js +2 -2
  59. package/dist/esm/MasterDeck.js +4 -4
  60. package/dist/esm/MasterDeckPaginated.js +438 -0
  61. package/dist/esm/MediaSeriesCard-1dd7eae8.js +9403 -0
  62. package/dist/esm/MediaSeriesLanding.js +23 -9411
  63. package/dist/esm/MediaSeriesLandingPaginated.js +517 -0
  64. package/dist/esm/NavDvm.js +3 -3
  65. package/dist/esm/NavMagazine.js +4 -4
  66. package/dist/esm/NavNative.js +5 -5
  67. package/dist/esm/Pagination-c0db7ca1.js +46 -0
  68. package/dist/esm/PartnerDetailListing.js +12 -3982
  69. package/dist/esm/PartnerDetailListingPaginated.js +307 -0
  70. package/dist/esm/PubSection.js +1 -1
  71. package/dist/esm/PublicationDeck.js +18 -18
  72. package/dist/esm/PublicationFeature-fa24dedb.js +121 -0
  73. package/dist/esm/PublicationLanding.js +22 -22
  74. package/dist/esm/QueueDeckExpanded.js +1 -1
  75. package/dist/esm/QueueDeckExpandedPaginated.js +1372 -0
  76. package/dist/esm/RolesDeck.js +12 -12
  77. package/dist/esm/Search.js +2 -2
  78. package/dist/esm/{SocialSearchComponent-b5be0e6c.js → SocialSearchComponent-dca69151.js} +3 -3
  79. package/dist/esm/TaxonomyCard.js +16 -16
  80. package/dist/esm/TaxonomyDescription.js +1 -1
  81. package/dist/esm/TemplateNormal.js +4 -4
  82. package/dist/esm/VideoProgramLandingPage.js +6 -6
  83. package/dist/esm/VideoSeriesLandingPage.js +1 -1
  84. package/dist/esm/VideoSeriesListing.js +3 -3
  85. package/dist/esm/View.js +84 -4
  86. package/dist/esm/getSerializers.js +1 -1
  87. package/dist/esm/{index-0e04b7d7.js → index-d1476645.js} +19 -19
  88. package/dist/esm/index.js +10 -9
  89. package/package.json +2 -1
  90. package/dist/cjs/Schema.js +0 -100
  91. package/dist/esm/Schema.js +0 -95
@@ -0,0 +1,307 @@
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
+ import './core.get-iterator-method-86d4db69.js';
3
+ import './_library-528f1934.js';
4
+ import './_iter-detect-130ee549.js';
5
+ import './toConsumableArray-32282905.js';
6
+ import './_object-pie-33c40e79.js';
7
+ import { _ as _extends } from './extends-5b1796d4.js';
8
+ import './_object-sap-8b8ea5a9.js';
9
+ import './inherits-2409637d.js';
10
+ import './define-property-6d26cb48.js';
11
+ import './web.dom.iterable-f8f967cd.js';
12
+ import './typeof-c05a82ba.js';
13
+ import './_is-array-4df618a6.js';
14
+ import React__default from 'react';
15
+ import './events-6c3a7a63.js';
16
+ import './index-41a678ea.js';
17
+ import 'prop-types';
18
+ import 'react-bootstrap/Row';
19
+ import 'react-bootstrap/Col';
20
+ import 'react-bootstrap/Card';
21
+ import './moment-e2f9b20c.js';
22
+ import 'next/router';
23
+ import './isSymbol-1981418f.js';
24
+ import './debounce-9207d8ee.js';
25
+ import './toNumber-2f7a84cd.js';
26
+ import 'react-dom';
27
+ import { _ as _slicedToArray } from './slicedToArray-67a08c9c.js';
28
+ import './index-73819142.js';
29
+ import urlFor from './urlFor.js';
30
+ import './index-5f7e79e7.js';
31
+ import './main-c0612122.js';
32
+ import './entities-7cc3bf45.js';
33
+ import './stringify-70b72959.js';
34
+ import { a as _asyncToGenerator, r as regenerator, _ as _Promise } from './asyncToGenerator-7bf8bc4d.js';
35
+ import './Segment.js';
36
+ import './Beam.js';
37
+ import './AdSlot.js';
38
+ import './ADInfeed-d767ebe2.js';
39
+ import './lodash-17fdfebb.js';
40
+ import './ADlgInfeed-cee95aa2.js';
41
+ import './getContentCategory-15dcc413.js';
42
+ import './AuthorComponent-e6f95c2f.js';
43
+ import 'react-bootstrap/Button';
44
+ import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
45
+ import { r as reactSocialIcons_1 } from './react-social-icons-a7d5c5c7.js';
46
+ import './index-c7e2ac95.js';
47
+ import './smoothscroll-0cd4c7a6.js';
48
+ import './GroupDeck.js';
49
+ import 'react-bootstrap';
50
+ import './timeDifferenceCalc.js';
51
+ import './iconBase-602d52fe.js';
52
+ import './index.esm-29e48d38.js';
53
+ import { g as getSerializers } from './index-d1476645.js';
54
+ import './util-7700fc59.js';
55
+ import './brightcove-react-player-loader.es-83f53e4e.js';
56
+ import 'next/head';
57
+ import 'react-share';
58
+ import './SocialShare.js';
59
+ import './_object-to-array-c54dd835.js';
60
+ import 'react-bootstrap/Pagination';
61
+ import 'react-bootstrap/Figure';
62
+ import 'react-bootstrap/OverlayTrigger';
63
+ import 'react-bootstrap/Tooltip';
64
+ import 'react-bootstrap/Popover';
65
+ import './inherits-77d5e4fc.js';
66
+ import 'react-bootstrap/Carousel';
67
+ import Feature from './Feature.js';
68
+ import 'react-bootstrap/Breadcrumb';
69
+ import Breadcrumbs from './Breadcrumbs.js';
70
+ import { I as ImageSlider, T as TwitterTimelineEmbed, F as Facebook, P as Page } from './ImageSlider-a3154b97.js';
71
+ import 'react-paginate';
72
+ import './Pagination-c0db7ca1.js';
73
+ import QueueDeckExpanded from './QueueDeckExpandedPaginated.js';
74
+
75
+ var _this = undefined;
76
+
77
+ var checkIsFacebookGroup = function checkIsFacebookGroup(url) {
78
+ return (/www\.facebook\.com\/groups/.test(url)
79
+ );
80
+ };
81
+
82
+ var PartnerDetails = function PartnerDetails(_ref) {
83
+ var posts = _ref.posts,
84
+ totalPostsCount = _ref.totalPostsCount,
85
+ query = _ref.query,
86
+ params = _ref.params,
87
+ features = _ref.features,
88
+ currentPage = _ref.currentPage,
89
+ partnerDetails = _ref.partnerDetails,
90
+ client = _ref.client,
91
+ Settings = _ref.Settings,
92
+ pageview = _ref.pageview,
93
+ page = _ref.page;
94
+
95
+ return React__default.createElement(
96
+ React__default.Fragment,
97
+ null,
98
+ React__default.createElement(Breadcrumbs, null),
99
+ React__default.createElement(
100
+ 'div',
101
+ { className: 'partners-page' },
102
+ React__default.createElement(
103
+ 'div',
104
+ { className: 'my-5 partner-logo-wrap', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
105
+ partnerDetails.thumbnail && partnerDetails.thumbnail.link ? React__default.createElement(
106
+ 'a',
107
+ { className: 'partners-logo', style: { width: '25%', minWidth: '25%' }, href: partnerDetails.thumbnail.link, target: partnerDetails.thumbnail.blank ? '_blank' : '' },
108
+ React__default.createElement(
109
+ 'figure',
110
+ { style: { width: '100%', textAlign: 'center' } },
111
+ React__default.createElement('img', {
112
+ alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
113
+ style: { maxWidth: '100%' },
114
+ src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : ''
115
+ }),
116
+ partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
117
+ 'figcaption',
118
+ null,
119
+ partnerDetails.thumbnail.caption
120
+ )
121
+ )
122
+ ) : React__default.createElement(
123
+ 'figure',
124
+ { className: 'partners-logo', style: { width: '25%', minWidth: '25%', textAlign: 'center' } },
125
+ React__default.createElement('img', {
126
+ alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
127
+ style: { maxWidth: '100%' },
128
+ src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : ''
129
+ }),
130
+ partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
131
+ 'figcaption',
132
+ null,
133
+ partnerDetails.thumbnail.caption
134
+ )
135
+ ),
136
+ React__default.createElement(
137
+ 'style',
138
+ { jsx: 'true' },
139
+ '\n @media screen and (max-width: 768px) {\n .partners-logo {\n width: 100%;\n min-width: 100%;\n }\n .partner-logo-wrap {\n flex-wrap: wrap;\n }\n .block-content-partners {\n padding-left: 0 !important;\n }\n }\n '
140
+ ),
141
+ (partnerDetails.description || partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
142
+ 'div',
143
+ { className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
144
+ partnerDetails.description && React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
145
+ (partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
146
+ 'div',
147
+ null,
148
+ React__default.createElement(
149
+ 'p',
150
+ { className: 'd-inline-block font-weight-bold' },
151
+ 'Connect with us:'
152
+ ),
153
+ ' ',
154
+ partnerDetails.linkedin && React__default.createElement(reactSocialIcons_1, {
155
+ url: '' + partnerDetails.linkedin + (partnerDetails.linkedin.slice(-1) === '/' ? '' : '/') + 'posts/?feedView=all',
156
+ target: '_blank',
157
+ rel: 'noopener noreferrer',
158
+ style: { height: 30, width: 30 }
159
+ }),
160
+ (partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } })
161
+ )
162
+ )
163
+ ),
164
+ partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default.createElement(
165
+ 'div',
166
+ { className: 'mb-4', style: { padding: '0 15px' } },
167
+ partnerDetails.affiliates[0].title && React__default.createElement(
168
+ 'h2',
169
+ { className: 'bb-gold' },
170
+ partnerDetails.affiliates[0].title
171
+ ),
172
+ React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
173
+ ),
174
+ features.length > 0 && React__default.createElement(
175
+ 'div',
176
+ { className: ' mb-5' },
177
+ React__default.createElement(Feature, { dataset: features, client: client })
178
+ ),
179
+ (partnerDetails.twitter || partnerDetails.facebook && !checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
180
+ 'div',
181
+ { className: 'mb-5', style: { width: '100%', maxWidth: '100%', textAlign: 'center', padding: '15px', border: '2px solid #aaa', borderRadius: '15px' } },
182
+ partnerDetails.twitter ? React__default.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } }) : partnerDetails.facebook && React__default.createElement(
183
+ Facebook,
184
+ { appId: ' ' },
185
+ React__default.createElement(Page, { href: partnerDetails.facebook, tabs: 'timeline', width: '500', height: '500' })
186
+ )
187
+ ),
188
+ React__default.createElement(
189
+ 'div',
190
+ null,
191
+ posts && posts.length > 0 && React__default.createElement(
192
+ React__default.Fragment,
193
+ null,
194
+ React__default.createElement(
195
+ 'h2',
196
+ { className: 'bb-gold mb-2' },
197
+ 'Latest from ',
198
+ partnerDetails.name
199
+ ),
200
+ React__default.createElement('hr', null)
201
+ ),
202
+ React__default.createElement(QueueDeckExpanded, {
203
+ client: client,
204
+ mapping: Settings.mapping,
205
+ dataRecord: posts,
206
+ totalDataCount: totalPostsCount,
207
+ query: query,
208
+ params: params,
209
+ currentPage: currentPage,
210
+ seoPaginate: true,
211
+ columns: 'rotate',
212
+ variant: 'top',
213
+ page: page,
214
+ autoScroll: true,
215
+ defaultImage: Settings.logo,
216
+ showPublished: true,
217
+ showCategory: true,
218
+ pageview: pageview
219
+ })
220
+ )
221
+ )
222
+ );
223
+ };
224
+
225
+ PartnerDetails.returnGetInitialProps = function () {
226
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(identifier, partnerPageUrl, partnerDocumentGroupID, params, currentPage, client) {
227
+ var category = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
228
+
229
+ var featureQuery, partnerQuery, taxonomyQuery, _ref3, _ref4, features, partnerDetails, taxonomyDetails, articlesQueryFilters, articlesQuerySorts, articlesQueryProjection, articlesQuery, totalArticlesCountQuery, _ref5, _ref6, articles, totalArticlesCount;
230
+
231
+ return regenerator.wrap(function _callee$(_context) {
232
+ while (1) {
233
+ switch (_context.prev = _context.next) {
234
+ case 0:
235
+ featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
236
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
237
+
238
+
239
+ if (category) {
240
+ // if partners page has a sub category such as onclive
241
+ // e.g. /sap-partner/[category]/[partner]
242
+
243
+ partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
244
+ }
245
+
246
+ taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
247
+
248
+ if (category) {
249
+ taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && isShow != false\n && identifier.current == \'' + identifier + '\' && references(*[_type == \'documentGroup\' && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')]._id)] [0] {\n \'id\': _id,\n \'title\': name\n }';
250
+ }
251
+ _context.next = 7;
252
+ return _Promise.all([client.fetch(featureQuery), client.fetch(partnerQuery), client.fetch(taxonomyQuery)]);
253
+
254
+ case 7:
255
+ _ref3 = _context.sent;
256
+ _ref4 = _slicedToArray(_ref3, 3);
257
+ features = _ref4[0];
258
+ partnerDetails = _ref4[1];
259
+ taxonomyDetails = _ref4[2];
260
+ articlesQueryFilters = '[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && is_visible == true \n && defined(url) \n && published <= now()\n && passwordLocked != true \n && references(\'' + taxonomyDetails.id + '\')\n ]';
261
+ articlesQuerySorts = 'order(published desc)[$from...$to]';
262
+ articlesQueryProjection = '{\n title,\n summary,\n thumbnail,\n url,\n published,\n contentCategory->\n }';
263
+ articlesQuery = ['*'].concat(articlesQueryFilters).concat(articlesQuerySorts).concat(articlesQueryProjection).join('|');
264
+ totalArticlesCountQuery = 'count(' + ['*'].concat(articlesQueryFilters).join('|') + ')';
265
+ _context.next = 19;
266
+ return _Promise.all([client.fetch(articlesQuery, params), client.fetch(totalArticlesCountQuery)]);
267
+
268
+ case 19:
269
+ _ref5 = _context.sent;
270
+ _ref6 = _slicedToArray(_ref5, 2);
271
+ articles = _ref6[0];
272
+ totalArticlesCount = _ref6[1];
273
+
274
+
275
+ // need to exclude slideshows from body due to the affiliate slider
276
+ if (partnerDetails && partnerDetails.description) {
277
+ partnerDetails.description = partnerDetails.description.filter(function (block) {
278
+ return block._type !== 'slideshows';
279
+ });
280
+ }
281
+
282
+ return _context.abrupt('return', {
283
+ articles: articles,
284
+ totalArticlesCount: totalArticlesCount,
285
+ taxonomyDetails: taxonomyDetails,
286
+ partnerDetails: category ? partnerDetails.partner : partnerDetails,
287
+ features: features,
288
+ featureQuery: featureQuery,
289
+ partnerQuery: partnerQuery,
290
+ taxonomyQuery: taxonomyQuery,
291
+ articlesQuery: articlesQuery
292
+ });
293
+
294
+ case 25:
295
+ case 'end':
296
+ return _context.stop();
297
+ }
298
+ }
299
+ }, _callee, _this);
300
+ }));
301
+
302
+ return function (_x, _x2, _x3, _x4, _x5, _x6) {
303
+ return _ref2.apply(this, arguments);
304
+ };
305
+ }();
306
+
307
+ export default PartnerDetails;
@@ -30,7 +30,7 @@ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7bf
30
30
  import './Segment.js';
31
31
  import './Beam.js';
32
32
  import './AdSlot.js';
33
- import './ADInfeed-8a038df9.js';
33
+ import './ADInfeed-d767ebe2.js';
34
34
  import './lodash-17fdfebb.js';
35
35
  import './ADlgInfeed-cee95aa2.js';
36
36
  import './getContentCategory-15dcc413.js';
@@ -3,16 +3,16 @@ import './core.get-iterator-method-86d4db69.js';
3
3
  import './web.dom.iterable-f8f967cd.js';
4
4
  import React__default from 'react';
5
5
  import 'prop-types';
6
- import Row$1 from 'react-bootstrap/Row';
7
- import Col$1 from 'react-bootstrap/Col';
8
- import Card$1 from 'react-bootstrap/Card';
6
+ import Row from 'react-bootstrap/Row';
7
+ import Col from 'react-bootstrap/Col';
8
+ import Card from 'react-bootstrap/Card';
9
9
  import 'react-dom';
10
10
  import './slicedToArray-67a08c9c.js';
11
11
  import './index-73819142.js';
12
12
  import urlFor from './urlFor.js';
13
13
  import { L as LazyLoad } from './index-5f7e79e7.js';
14
14
  import { l as lodash } from './lodash-17fdfebb.js';
15
- import Button$1 from 'react-bootstrap/Button';
15
+ import Button from 'react-bootstrap/Button';
16
16
 
17
17
  var PublicationDeck = function PublicationDeck(props) {
18
18
  var data = props.data,
@@ -55,14 +55,14 @@ var PublicationDeck = function PublicationDeck(props) {
55
55
  'div',
56
56
  { className: 'publication-wrapper', style: { paddingBottom: '150px' } },
57
57
  sortedRegPubs && sortedRegPubs.length > 0 && React__default.createElement(
58
- Row$1,
58
+ Row,
59
59
  { className: 'regular-publication-wrapper' },
60
60
  sortedRegPubs.map(function (row, index) {
61
61
  return row.identifier && row.identifier.current && React__default.createElement(
62
- Col$1,
62
+ Col,
63
63
  { xs: 6, sm: 6, md: 6, lg: 4, style: { display: 'flex', flex: '1 0 auto' }, key: index },
64
64
  React__default.createElement(
65
- Card$1,
65
+ Card,
66
66
  { className: 'block-card', style: { width: '200px' } },
67
67
  React__default.createElement(
68
68
  'a',
@@ -70,18 +70,18 @@ var PublicationDeck = function PublicationDeck(props) {
70
70
  row.childIssue && row.childIssue.thumbnail ? React__default.createElement(
71
71
  LazyLoad,
72
72
  { height: imageHeight },
73
- React__default.createElement(Card$1.Img, { variant: 'top', src: renderCardImage(row.childIssue.thumbnail), style: { objectFit: 'contain', maxHeight: '200px', maxWidth: '200px' } })
73
+ React__default.createElement(Card.Img, { variant: 'top', src: renderCardImage(row.childIssue.thumbnail), style: { objectFit: 'contain', maxHeight: '200px', maxWidth: '200px' } })
74
74
  ) : React__default.createElement('p', { className: 'placeholder-tag' }),
75
75
  React__default.createElement(
76
- Card$1.Body,
76
+ Card.Body,
77
77
  { style: { paddingTop: '0', paddingBottom: '2.75rem' } },
78
78
  React__default.createElement(
79
- Card$1.Title,
79
+ Card.Title,
80
80
  null,
81
81
  row.name
82
82
  ),
83
83
  React__default.createElement(
84
- Button$1,
84
+ Button,
85
85
  { style: { position: 'absolute', bottom: '1rem', margin: '0px', width: '78%' }, variant: 'secondary' },
86
86
  'Browse Issues'
87
87
  )
@@ -110,14 +110,14 @@ var PublicationDeck = function PublicationDeck(props) {
110
110
  React__default.createElement('hr', null)
111
111
  ),
112
112
  React__default.createElement(
113
- Row$1,
113
+ Row,
114
114
  { className: 'legacy-publication-wrapper' },
115
115
  sortedLegacyPubs.map(function (row, index) {
116
116
  return row.identifier && row.identifier.current && React__default.createElement(
117
- Col$1,
117
+ Col,
118
118
  { xs: 6, sm: 6, md: 6, lg: 4, style: { display: 'flex', flex: '1 0 auto' }, key: index },
119
119
  React__default.createElement(
120
- Card$1,
120
+ Card,
121
121
  { className: 'block-card', style: { width: '200px' } },
122
122
  React__default.createElement(
123
123
  'a',
@@ -125,18 +125,18 @@ var PublicationDeck = function PublicationDeck(props) {
125
125
  row.childIssue && row.childIssue.thumbnail ? React__default.createElement(
126
126
  LazyLoad,
127
127
  { height: imageHeight },
128
- React__default.createElement(Card$1.Img, { variant: 'top', src: renderCardImage(row.childIssue.thumbnail), style: { objectFit: 'contain', maxHeight: '200px', maxWidth: '200px' } })
128
+ React__default.createElement(Card.Img, { variant: 'top', src: renderCardImage(row.childIssue.thumbnail), style: { objectFit: 'contain', maxHeight: '200px', maxWidth: '200px' } })
129
129
  ) : React__default.createElement('p', { className: 'placeholder-tag' }),
130
130
  React__default.createElement(
131
- Card$1.Body,
131
+ Card.Body,
132
132
  { style: { paddingTop: '0', paddingBottom: '2.75rem' } },
133
133
  React__default.createElement(
134
- Card$1.Title,
134
+ Card.Title,
135
135
  null,
136
136
  row.name
137
137
  ),
138
138
  React__default.createElement(
139
- Button$1,
139
+ Button,
140
140
  { style: { position: 'absolute', bottom: '1rem', margin: '0px', width: '78%' }, variant: 'secondary' },
141
141
  'Browse Issues'
142
142
  )
@@ -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 urlFor from './urlFor.js';
5
+ import { L as LazyLoad } from './index-5f7e79e7.js';
6
+ import Button from 'react-bootstrap/Button';
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 };
@@ -9,9 +9,9 @@ import { _ as _iterStep } from './web.dom.iterable-f8f967cd.js';
9
9
  import { _ as _meta, a as _isArray } from './_is-array-4df618a6.js';
10
10
  import React__default, { useState, useEffect } from 'react';
11
11
  import 'prop-types';
12
- import Row$1 from 'react-bootstrap/Row';
13
- import Col$1 from 'react-bootstrap/Col';
14
- import Card$1 from 'react-bootstrap/Card';
12
+ import Row from 'react-bootstrap/Row';
13
+ import Col from 'react-bootstrap/Col';
14
+ import Card from 'react-bootstrap/Card';
15
15
  import { useRouter } from 'next/router';
16
16
  import 'react-dom';
17
17
  import { _ as _slicedToArray } from './slicedToArray-67a08c9c.js';
@@ -638,10 +638,10 @@ var PublicationLanding = function PublicationLanding(props) {
638
638
  '\n #pubYearFilter .dropdown-menu.show,\n #contentPlacementFilter .dropdown-menu.show {\n max-height: 25vh;\n overflow: auto;\n }\n '
639
639
  ),
640
640
  React__default.createElement(
641
- Row$1,
641
+ Row,
642
642
  null,
643
643
  issueData && issueData.length > 0 && years.length > 0 && React__default.createElement(
644
- Col$1,
644
+ Col,
645
645
  { className: 'flex-grow-0 mb-3' },
646
646
  React__default.createElement(
647
647
  Dropdown,
@@ -670,7 +670,7 @@ var PublicationLanding = function PublicationLanding(props) {
670
670
  )
671
671
  ),
672
672
  contentPlacements && contentPlacements.length > 0 && React__default.createElement(
673
- Col$1,
673
+ Col,
674
674
  { className: 'flex-grow-0 mb-3' },
675
675
  React__default.createElement(
676
676
  Dropdown,
@@ -704,28 +704,28 @@ var PublicationLanding = function PublicationLanding(props) {
704
704
  ),
705
705
  sortedIssues && sortedIssues.length > 0 ? sortedIssues.map(function (issue, key) {
706
706
  return React__default.createElement(
707
- Card$1,
707
+ Card,
708
708
  { key: key, className: 'issueCard' },
709
709
  React__default.createElement(
710
- Row$1,
710
+ Row,
711
711
  null,
712
712
  React__default.createElement(
713
- Col$1,
713
+ Col,
714
714
  { md: 3, id: 'issueThumbnail' },
715
715
  React__default.createElement(
716
716
  LazyLoad,
717
717
  { once: true },
718
- React__default.createElement(Card$1.Img, { src: issue.thumbnail })
718
+ React__default.createElement(Card.Img, { src: issue.thumbnail })
719
719
  )
720
720
  ),
721
721
  React__default.createElement(
722
- Col$1,
722
+ Col,
723
723
  { md: 9, id: 'issueDetail' },
724
724
  React__default.createElement(
725
- Card$1.Body,
725
+ Card.Body,
726
726
  null,
727
727
  React__default.createElement(
728
- Card$1.Title,
728
+ Card.Title,
729
729
  null,
730
730
  issue.name
731
731
  ),
@@ -749,7 +749,7 @@ var PublicationLanding = function PublicationLanding(props) {
749
749
  )
750
750
  ),
751
751
  React__default.createElement(
752
- Card$1.Footer,
752
+ Card.Footer,
753
753
  null,
754
754
  issue && issue.articles && issue.articles.length > 0 ? React__default.createElement(
755
755
  'a',
@@ -767,28 +767,28 @@ var PublicationLanding = function PublicationLanding(props) {
767
767
  );
768
768
  }) : !activeContentPlacement && !activeYear && issueData && issueData.length > 0 ? issueData.map(function (issue, key) {
769
769
  return React__default.createElement(
770
- Card$1,
770
+ Card,
771
771
  { key: key, className: 'issueCard' },
772
772
  React__default.createElement(
773
- Row$1,
773
+ Row,
774
774
  null,
775
775
  React__default.createElement(
776
- Col$1,
776
+ Col,
777
777
  { md: 3, id: 'issueThumbnail' },
778
778
  React__default.createElement(
779
779
  LazyLoad,
780
780
  { once: true },
781
- React__default.createElement(Card$1.Img, { src: issue.thumbnail })
781
+ React__default.createElement(Card.Img, { src: issue.thumbnail })
782
782
  )
783
783
  ),
784
784
  React__default.createElement(
785
- Col$1,
785
+ Col,
786
786
  { md: 9, id: 'issueDetail' },
787
787
  React__default.createElement(
788
- Card$1.Body,
788
+ Card.Body,
789
789
  null,
790
790
  React__default.createElement(
791
- Card$1.Title,
791
+ Card.Title,
792
792
  null,
793
793
  issue.name
794
794
  ),
@@ -812,7 +812,7 @@ var PublicationLanding = function PublicationLanding(props) {
812
812
  )
813
813
  ),
814
814
  React__default.createElement(
815
- Card$1.Footer,
815
+ Card.Footer,
816
816
  null,
817
817
  issue && issue.articles && issue.articles.length > 0 ? React__default.createElement(
818
818
  'a',