@mjhls/mjh-framework 1.0.93 → 1.0.94
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/README.md +1 -1
- package/dist/index.es.js +145 -52
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +145 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -22,6 +22,7 @@ import Nav from 'react-bootstrap/Nav';
|
|
|
22
22
|
import Navbar from 'react-bootstrap/Navbar';
|
|
23
23
|
import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
24
24
|
import Carousel$1 from 'react-bootstrap/Carousel';
|
|
25
|
+
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
25
26
|
|
|
26
27
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
27
28
|
|
|
@@ -5150,66 +5151,62 @@ var GridContent = function (_React$Component) {
|
|
|
5150
5151
|
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = GridContent.__proto__ || Object.getPrototypeOf(GridContent)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
5151
5152
|
data: _this.data,
|
|
5152
5153
|
per: _this.params ? _this.params.to : 2,
|
|
5153
|
-
page: 1,
|
|
5154
|
+
page: _this.props.currentPage || 1,
|
|
5154
5155
|
from: _this.params ? _this.params.from : 0,
|
|
5155
5156
|
to: _this.params ? _this.params.to : 2,
|
|
5156
5157
|
total_pages: null,
|
|
5157
5158
|
scrolling: true,
|
|
5158
|
-
query: _this.query
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
to
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5159
|
+
query: _this.query,
|
|
5160
|
+
currentPage: _this.props.currentPage || 1
|
|
5161
|
+
}, _this.loadMore = debounce_1(function () {
|
|
5162
|
+
_this.setState(function (state) {
|
|
5163
|
+
var page = state.page,
|
|
5164
|
+
from = state.from,
|
|
5165
|
+
per = state.per,
|
|
5166
|
+
to = state.to;
|
|
5167
|
+
|
|
5168
|
+
return {
|
|
5169
|
+
page: page + 1,
|
|
5170
|
+
from: from + per,
|
|
5171
|
+
to: to + per
|
|
5172
|
+
};
|
|
5173
|
+
}, _this.loadData);
|
|
5174
|
+
}, 0), _this.loadData = function () {
|
|
5170
5175
|
var _this$state = _this.state,
|
|
5171
5176
|
from = _this$state.from,
|
|
5172
5177
|
to = _this$state.to,
|
|
5173
5178
|
data = _this$state.data,
|
|
5174
|
-
query = _this$state.query
|
|
5179
|
+
query = _this$state.query,
|
|
5180
|
+
page = _this$state.page;
|
|
5175
5181
|
var client = _this.props.client;
|
|
5176
5182
|
|
|
5177
5183
|
|
|
5178
5184
|
var params = _extends({}, _this.params, { from: from, to: to
|
|
5179
5185
|
// const queryUpdated = query.replace('$from', params.from).replace('$to', params.to)
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
scrolling: true
|
|
5189
|
-
};
|
|
5190
|
-
} else {
|
|
5191
|
-
return {
|
|
5192
|
-
scrolling: false
|
|
5193
|
-
};
|
|
5194
|
-
}
|
|
5186
|
+
});client.fetch(query, params).then(function (dataArr) {
|
|
5187
|
+
if (_this.pointer && _this.pointerArray) {
|
|
5188
|
+
var pointer = _this.pointer;
|
|
5189
|
+
dataArr = dataArr[_this.pointerArray][pointer];
|
|
5190
|
+
}
|
|
5191
|
+
dataArr = dataArr.map(function (item) {
|
|
5192
|
+
return _extends({}, item, {
|
|
5193
|
+
pageNumber: page
|
|
5195
5194
|
});
|
|
5196
5195
|
});
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
}
|
|
5210
|
-
});
|
|
5196
|
+
|
|
5197
|
+
_this.setState(function () {
|
|
5198
|
+
if (dataArr.length > 0) {
|
|
5199
|
+
return {
|
|
5200
|
+
data: [].concat(toConsumableArray(data), toConsumableArray(dataArr)),
|
|
5201
|
+
scrolling: true
|
|
5202
|
+
};
|
|
5203
|
+
} else {
|
|
5204
|
+
return {
|
|
5205
|
+
scrolling: false
|
|
5206
|
+
};
|
|
5207
|
+
}
|
|
5211
5208
|
});
|
|
5212
|
-
}
|
|
5209
|
+
});
|
|
5213
5210
|
}, _this.urlFor = function (source) {
|
|
5214
5211
|
var client = _this.props.client;
|
|
5215
5212
|
|
|
@@ -5279,6 +5276,23 @@ var GridContent = function (_React$Component) {
|
|
|
5279
5276
|
}
|
|
5280
5277
|
}
|
|
5281
5278
|
}
|
|
5279
|
+
}, _this.renderManualPagination = function () {
|
|
5280
|
+
var currentPage = _this.state.currentPage;
|
|
5281
|
+
|
|
5282
|
+
return React__default.createElement(
|
|
5283
|
+
'div',
|
|
5284
|
+
{ className: 'd-flex justify-content-between' },
|
|
5285
|
+
currentPage && currentPage > 1 && React__default.createElement(
|
|
5286
|
+
'a',
|
|
5287
|
+
{ href: '?page=' + (currentPage - 1) },
|
|
5288
|
+
'<< Previous'
|
|
5289
|
+
),
|
|
5290
|
+
React__default.createElement(
|
|
5291
|
+
'a',
|
|
5292
|
+
{ href: '?page=' + (currentPage + 1) },
|
|
5293
|
+
'Next >>'
|
|
5294
|
+
)
|
|
5295
|
+
);
|
|
5282
5296
|
}, _temp), possibleConstructorReturn(_this, _ret);
|
|
5283
5297
|
}
|
|
5284
5298
|
|
|
@@ -5329,7 +5343,7 @@ var GridContent = function (_React$Component) {
|
|
|
5329
5343
|
),
|
|
5330
5344
|
_this2.props.showPublished && row.published && React__default.createElement(
|
|
5331
5345
|
Card.Subtitle,
|
|
5332
|
-
|
|
5346
|
+
{ style: { marginTop: 0 } },
|
|
5333
5347
|
moment(row.published).format('MMMM DD, YYYY')
|
|
5334
5348
|
),
|
|
5335
5349
|
React__default.createElement(
|
|
@@ -5389,6 +5403,11 @@ var GridContent = function (_React$Component) {
|
|
|
5389
5403
|
null,
|
|
5390
5404
|
row.title
|
|
5391
5405
|
),
|
|
5406
|
+
_this2.props.showPublished && row.published && React__default.createElement(
|
|
5407
|
+
Card.Subtitle,
|
|
5408
|
+
{ style: { marginTop: 0 } },
|
|
5409
|
+
moment(row.published).format('MMMM DD, YYYY')
|
|
5410
|
+
),
|
|
5392
5411
|
React__default.createElement(
|
|
5393
5412
|
Card.Text,
|
|
5394
5413
|
{ className: index$$1 === 0 || index$$1 % 4 === 0 ? '' : 'card-subtext' },
|
|
@@ -5454,6 +5473,11 @@ var GridContent = function (_React$Component) {
|
|
|
5454
5473
|
'End of data'
|
|
5455
5474
|
)
|
|
5456
5475
|
)
|
|
5476
|
+
),
|
|
5477
|
+
React__default.createElement(
|
|
5478
|
+
'noscript',
|
|
5479
|
+
null,
|
|
5480
|
+
this.renderManualPagination()
|
|
5457
5481
|
)
|
|
5458
5482
|
)
|
|
5459
5483
|
);
|
|
@@ -7172,6 +7196,11 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
7172
7196
|
React__default.createElement(Search, null)
|
|
7173
7197
|
)
|
|
7174
7198
|
)
|
|
7199
|
+
),
|
|
7200
|
+
React__default.createElement(
|
|
7201
|
+
'style',
|
|
7202
|
+
{ jsx: true },
|
|
7203
|
+
'\n @media screen and (max-width: 991px) {\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n }\n '
|
|
7175
7204
|
)
|
|
7176
7205
|
);
|
|
7177
7206
|
};
|
|
@@ -7243,6 +7272,11 @@ var NavNative = function NavNative(props) {
|
|
|
7243
7272
|
React__default.createElement(Search, null)
|
|
7244
7273
|
)
|
|
7245
7274
|
)
|
|
7275
|
+
),
|
|
7276
|
+
React__default.createElement(
|
|
7277
|
+
'style',
|
|
7278
|
+
{ jsx: true },
|
|
7279
|
+
'\n @media screen and (max-width: 991px) {\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n }\n '
|
|
7246
7280
|
)
|
|
7247
7281
|
);
|
|
7248
7282
|
};
|
|
@@ -7316,6 +7350,11 @@ var NavNormal = function NavNormal(props) {
|
|
|
7316
7350
|
),
|
|
7317
7351
|
React__default.createElement(Search, null)
|
|
7318
7352
|
)
|
|
7353
|
+
),
|
|
7354
|
+
React__default.createElement(
|
|
7355
|
+
'style',
|
|
7356
|
+
{ jsx: true },
|
|
7357
|
+
'\n @media screen and (max-width: 991px) {\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n }\n '
|
|
7319
7358
|
)
|
|
7320
7359
|
);
|
|
7321
7360
|
};
|
|
@@ -7421,7 +7460,7 @@ var NavDvm = function NavDvm(props) {
|
|
|
7421
7460
|
React__default.createElement(
|
|
7422
7461
|
'style',
|
|
7423
7462
|
{ jsx: 'true' },
|
|
7424
|
-
'\n .mobile-logo{\n display: none;\n position: absolute;\n left: 50%;\n top: 0;\n height: 40px;\n transform: translateX(-50%);\n }\n .mobile-logo img{\n height: 100%;\n }\n @media screen and (max-width: 1199px){\n .mobile-logo{\n display: block;\n }\n .top-nav{\n display: none;\n }\n }\n '
|
|
7463
|
+
'\n .mobile-logo{\n display: none;\n position: absolute;\n left: 50%;\n top: 0;\n height: 40px;\n transform: translateX(-50%);\n }\n .mobile-logo img{\n height: 100%;\n }\n @media screen and (max-width: 1199px){\n .mobile-logo{\n display: block;\n }\n .top-nav{\n display: none;\n }\n }\n @media screen and (max-width: 991px) {\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n }\n \n '
|
|
7425
7464
|
)
|
|
7426
7465
|
);
|
|
7427
7466
|
};
|
|
@@ -8495,7 +8534,7 @@ var urlFor$1 = function urlFor(source, builder) {
|
|
|
8495
8534
|
var onChangeSlide = function onChangeSlide(selectedIndex, pageview, setCarouselIndex, asPath) {
|
|
8496
8535
|
setCarouselIndex(selectedIndex);
|
|
8497
8536
|
lib_3.refresh();
|
|
8498
|
-
pageview(asPath);
|
|
8537
|
+
if (pageview) pageview(asPath);
|
|
8499
8538
|
};
|
|
8500
8539
|
|
|
8501
8540
|
var Slideshow = function Slideshow(_ref) {
|
|
@@ -8514,7 +8553,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
8514
8553
|
|
|
8515
8554
|
return React__default.createElement(
|
|
8516
8555
|
'div',
|
|
8517
|
-
{
|
|
8556
|
+
{ className: 'mt-3 mb-3' },
|
|
8518
8557
|
React__default.createElement(
|
|
8519
8558
|
Carousel,
|
|
8520
8559
|
{ activeIndex: carouselIndex, onSelect: function onSelect(selectedIndex, e) {
|
|
@@ -8524,7 +8563,12 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
8524
8563
|
return React__default.createElement(
|
|
8525
8564
|
Carousel.Item,
|
|
8526
8565
|
{ key: slide._key },
|
|
8527
|
-
React__default.createElement('img', { src: urlFor$1(slide.
|
|
8566
|
+
React__default.createElement('img', { src: slide.image && urlFor$1(slide.image, builder).url(), style: { width: '100%' } }),
|
|
8567
|
+
React__default.createElement(
|
|
8568
|
+
'p',
|
|
8569
|
+
{ className: 'p-2' },
|
|
8570
|
+
slide.caption
|
|
8571
|
+
)
|
|
8528
8572
|
);
|
|
8529
8573
|
})
|
|
8530
8574
|
)
|
|
@@ -12072,7 +12116,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
12072
12116
|
|
|
12073
12117
|
return React__default.createElement(
|
|
12074
12118
|
'article',
|
|
12075
|
-
{ className: 'sidebar', style: { background: '#eee'
|
|
12119
|
+
{ className: 'sidebar', style: { background: '#eee' } },
|
|
12076
12120
|
React__default.createElement(
|
|
12077
12121
|
'div',
|
|
12078
12122
|
null,
|
|
@@ -12082,6 +12126,11 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
12082
12126
|
caption
|
|
12083
12127
|
),
|
|
12084
12128
|
React__default.createElement(BlockContent, { blocks: content })
|
|
12129
|
+
),
|
|
12130
|
+
React__default.createElement(
|
|
12131
|
+
'style',
|
|
12132
|
+
{ jsx: true },
|
|
12133
|
+
'\n .sidebar {\n width: 40%;\n padding: 1rem 0 0;\n margin-left: 1rem;\n margin-right: 10%;\n }\n @media screen and (max-width: 991px) {\n .sidebar {\n width: unset;\n padding: 1.25rem;\n margin-left: 1rem;\n margin-right: 1rem;\n }\n }\n '
|
|
12085
12134
|
)
|
|
12086
12135
|
);
|
|
12087
12136
|
};
|
|
@@ -12185,7 +12234,7 @@ var Audio = function Audio(_ref) {
|
|
|
12185
12234
|
{ className: 'd-block text-center mb-3' },
|
|
12186
12235
|
React__default.createElement(
|
|
12187
12236
|
'audio',
|
|
12188
|
-
{ controls: true },
|
|
12237
|
+
{ controls: true, controlsList: 'nodownload' },
|
|
12189
12238
|
React__default.createElement('source', { src: node.uploadAudio ? node.uploadAudio.asset.url : node.audioFilePth, type: 'audio/ogg' }),
|
|
12190
12239
|
React__default.createElement('source', { src: node.uploadAudio ? node.uploadAudio.asset.url : node.audioFilePth, type: 'audio/mpeg' }),
|
|
12191
12240
|
'Your browser does not support the audio element.'
|
|
@@ -12512,5 +12561,49 @@ var Feature = function Feature(props) {
|
|
|
12512
12561
|
);
|
|
12513
12562
|
};
|
|
12514
12563
|
|
|
12515
|
-
|
|
12564
|
+
var Breadcrumbs = function Breadcrumbs() {
|
|
12565
|
+
// To be used on landing pages eg. /news/[url]
|
|
12566
|
+
var _useState = useState(''),
|
|
12567
|
+
_useState2 = slicedToArray(_useState, 2),
|
|
12568
|
+
parentPath = _useState2[0],
|
|
12569
|
+
setParentPath = _useState2[1];
|
|
12570
|
+
|
|
12571
|
+
var _useState3 = useState(''),
|
|
12572
|
+
_useState4 = slicedToArray(_useState3, 2),
|
|
12573
|
+
currentPath = _useState4[0],
|
|
12574
|
+
setCurrentPath = _useState4[1];
|
|
12575
|
+
|
|
12576
|
+
useEffect(function () {
|
|
12577
|
+
var parsedUrl = window.location.href.split('/');
|
|
12578
|
+
setCurrentPath(parsedUrl[parsedUrl.length - 1]);
|
|
12579
|
+
setParentPath(parsedUrl[parsedUrl.length - 2]);
|
|
12580
|
+
});
|
|
12581
|
+
|
|
12582
|
+
return React__default.createElement(
|
|
12583
|
+
Breadcrumb,
|
|
12584
|
+
null,
|
|
12585
|
+
React__default.createElement(
|
|
12586
|
+
Breadcrumb.Item,
|
|
12587
|
+
{ href: '/' },
|
|
12588
|
+
'home'
|
|
12589
|
+
),
|
|
12590
|
+
React__default.createElement(
|
|
12591
|
+
Breadcrumb.Item,
|
|
12592
|
+
{ href: '/' + parentPath },
|
|
12593
|
+
parentPath
|
|
12594
|
+
),
|
|
12595
|
+
React__default.createElement(
|
|
12596
|
+
Breadcrumb.Item,
|
|
12597
|
+
{ active: true },
|
|
12598
|
+
currentPath
|
|
12599
|
+
),
|
|
12600
|
+
React__default.createElement(
|
|
12601
|
+
'style',
|
|
12602
|
+
{ jsx: true },
|
|
12603
|
+
'\n ol.breadcrumb {\n background: transparent;\n padding-left: 0.25rem;\n }\n '
|
|
12604
|
+
)
|
|
12605
|
+
);
|
|
12606
|
+
};
|
|
12607
|
+
|
|
12608
|
+
export { ContentCard as DeckContent, GridContent$1 as GridContent, DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, NavMagazine, NavNative, NavNormal, NavDvm, TemplateNormal, AD300x250, AD300x250x600, AD728x90, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs };
|
|
12516
12609
|
//# sourceMappingURL=index.es.js.map
|