@mjhls/mjh-framework 1.0.390 → 1.0.392
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/cjs/index.js +81 -0
- package/dist/esm/index.js +80 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -75,6 +75,7 @@ var Breadcrumb = _interopDefault(require('react-bootstrap/Breadcrumb'));
|
|
|
75
75
|
var DropdownButton = _interopDefault(require('react-bootstrap/DropdownButton'));
|
|
76
76
|
var Dropdown = _interopDefault(require('react-bootstrap/Dropdown'));
|
|
77
77
|
var Ustream = require('./Ustream-c7baf022.js');
|
|
78
|
+
var Modal = _interopDefault(require('react-bootstrap/Modal'));
|
|
78
79
|
var useSWR = _interopDefault(require('swr'));
|
|
79
80
|
var Local = _interopDefault(require('passport-local'));
|
|
80
81
|
var mysql = _interopDefault(require('mysql'));
|
|
@@ -15525,6 +15526,49 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
15525
15526
|
);
|
|
15526
15527
|
};
|
|
15527
15528
|
|
|
15529
|
+
var PopUpModal = function PopUpModal(props) {
|
|
15530
|
+
var _ref = props.ModalImage ? React.useState(true) : React.useState(false),
|
|
15531
|
+
_ref2 = slicedToArray._slicedToArray(_ref, 2),
|
|
15532
|
+
show = _ref2[0],
|
|
15533
|
+
setShow = _ref2[1];
|
|
15534
|
+
|
|
15535
|
+
var launchModalButton = function launchModalButton(e) {
|
|
15536
|
+
window.open(props.landingURL, '_blank');
|
|
15537
|
+
setShow(false);
|
|
15538
|
+
};
|
|
15539
|
+
|
|
15540
|
+
return React__default.createElement(
|
|
15541
|
+
Modal,
|
|
15542
|
+
{ show: show, onHide: function onHide() {
|
|
15543
|
+
return setShow(false);
|
|
15544
|
+
}, 'aria-labelledby': 'Popup-Modal' },
|
|
15545
|
+
React__default.createElement(Modal.Title, null),
|
|
15546
|
+
React__default.createElement(
|
|
15547
|
+
Modal.Body,
|
|
15548
|
+
null,
|
|
15549
|
+
React__default.createElement(
|
|
15550
|
+
'div',
|
|
15551
|
+
{ className: 'modalImageHolder' },
|
|
15552
|
+
React__default.createElement('img', { className: 'modalImage', src: props.ModalImage, onClick: function onClick() {
|
|
15553
|
+
return launchModalButton();
|
|
15554
|
+
} }),
|
|
15555
|
+
React__default.createElement(
|
|
15556
|
+
'div',
|
|
15557
|
+
{ className: 'modalClose', onClick: function onClick() {
|
|
15558
|
+
return setShow(false);
|
|
15559
|
+
} },
|
|
15560
|
+
'X'
|
|
15561
|
+
)
|
|
15562
|
+
)
|
|
15563
|
+
),
|
|
15564
|
+
React__default.createElement(
|
|
15565
|
+
'style',
|
|
15566
|
+
{ jsx: 'true' },
|
|
15567
|
+
'\n .modalImageHolder {\n display: flex;\n justify-content: center;\n }\n .modalClose {\n display: flex;\n justify-content: center;\n width: 25px;\n height: 25px;\n font-size: 1.25rem;\n color: #fff;\n cursor: pointer;\n }\n .modalImage {\n cursor: pointer;\n }\n '
|
|
15568
|
+
)
|
|
15569
|
+
);
|
|
15570
|
+
};
|
|
15571
|
+
|
|
15528
15572
|
var fbsHero = function fbsHero(props) {
|
|
15529
15573
|
var removeTimeStamp = props.removeTimeStamp;
|
|
15530
15574
|
|
|
@@ -18126,6 +18170,41 @@ var KMTracker = function KMTracker(props) {
|
|
|
18126
18170
|
}
|
|
18127
18171
|
};
|
|
18128
18172
|
|
|
18173
|
+
var getSeriesDetail = function getSeriesDetail(article, currentSeries) {
|
|
18174
|
+
//For use in getInitialProps to return series detail to display next/prev links when javascript is disabled
|
|
18175
|
+
if (!currentSeries) {
|
|
18176
|
+
return {
|
|
18177
|
+
seriesUrl: '',
|
|
18178
|
+
currentSeries: false,
|
|
18179
|
+
prevUrl: false,
|
|
18180
|
+
nextUrl: false
|
|
18181
|
+
|
|
18182
|
+
};
|
|
18183
|
+
}
|
|
18184
|
+
var nextUrl = false;
|
|
18185
|
+
var prevUrl = false;
|
|
18186
|
+
var galleryBody = article.body.find(function (body) {
|
|
18187
|
+
if (body._type == 'youtubeGallery') {
|
|
18188
|
+
return body;
|
|
18189
|
+
}
|
|
18190
|
+
});
|
|
18191
|
+
if (currentSeries >= 1 && currentSeries < galleryBody.videos.length) {
|
|
18192
|
+
nextUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) + 1);
|
|
18193
|
+
}
|
|
18194
|
+
if (currentSeries > 1 && currentSeries <= galleryBody.videos.length) {
|
|
18195
|
+
prevUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) - 1);
|
|
18196
|
+
}
|
|
18197
|
+
var seriesDetail = {
|
|
18198
|
+
seriesUrl: article.url.current,
|
|
18199
|
+
currentSeries: currentSeries,
|
|
18200
|
+
nextUrl: nextUrl,
|
|
18201
|
+
prevUrl: prevUrl,
|
|
18202
|
+
type: 'Video'
|
|
18203
|
+
};
|
|
18204
|
+
|
|
18205
|
+
return seriesDetail;
|
|
18206
|
+
};
|
|
18207
|
+
|
|
18129
18208
|
var returnFormField = function returnFormField(_ref) {
|
|
18130
18209
|
var name = _ref.name,
|
|
18131
18210
|
label = _ref.label,
|
|
@@ -22144,6 +22223,7 @@ exports.KMTracker = KMTracker;
|
|
|
22144
22223
|
exports.OncliveHero = OncliveHero;
|
|
22145
22224
|
exports.OncliveLargeHero = OncliveLargeHero;
|
|
22146
22225
|
exports.PdfDownload = PdfDownload;
|
|
22226
|
+
exports.PopUpModal = PopUpModal;
|
|
22147
22227
|
exports.PublicationLanding = PublicationLanding;
|
|
22148
22228
|
exports.RelatedContent = RelatedContent;
|
|
22149
22229
|
exports.RelatedTopicsDropdown = RelatedTopicsDropdown;
|
|
@@ -22152,3 +22232,4 @@ exports.SocialShare = SocialShare$1;
|
|
|
22152
22232
|
exports.VerticalHero = VerticalHero;
|
|
22153
22233
|
exports.YahooHero = YahooHero;
|
|
22154
22234
|
exports.getSerializers = getSerializers;
|
|
22235
|
+
exports.getSeriesDetail = getSeriesDetail;
|
package/dist/esm/index.js
CHANGED
|
@@ -72,6 +72,7 @@ import DropdownButton from 'react-bootstrap/DropdownButton';
|
|
|
72
72
|
import Dropdown from 'react-bootstrap/Dropdown';
|
|
73
73
|
import { F as FaLongArrowAltRight } from './Ustream-ee7aeeef.js';
|
|
74
74
|
export { U as Ustream } from './Ustream-ee7aeeef.js';
|
|
75
|
+
import Modal from 'react-bootstrap/Modal';
|
|
75
76
|
import useSWR from 'swr';
|
|
76
77
|
import Local from 'passport-local';
|
|
77
78
|
import mysql from 'mysql';
|
|
@@ -15522,6 +15523,49 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
15522
15523
|
);
|
|
15523
15524
|
};
|
|
15524
15525
|
|
|
15526
|
+
var PopUpModal = function PopUpModal(props) {
|
|
15527
|
+
var _ref = props.ModalImage ? useState(true) : useState(false),
|
|
15528
|
+
_ref2 = _slicedToArray(_ref, 2),
|
|
15529
|
+
show = _ref2[0],
|
|
15530
|
+
setShow = _ref2[1];
|
|
15531
|
+
|
|
15532
|
+
var launchModalButton = function launchModalButton(e) {
|
|
15533
|
+
window.open(props.landingURL, '_blank');
|
|
15534
|
+
setShow(false);
|
|
15535
|
+
};
|
|
15536
|
+
|
|
15537
|
+
return React__default.createElement(
|
|
15538
|
+
Modal,
|
|
15539
|
+
{ show: show, onHide: function onHide() {
|
|
15540
|
+
return setShow(false);
|
|
15541
|
+
}, 'aria-labelledby': 'Popup-Modal' },
|
|
15542
|
+
React__default.createElement(Modal.Title, null),
|
|
15543
|
+
React__default.createElement(
|
|
15544
|
+
Modal.Body,
|
|
15545
|
+
null,
|
|
15546
|
+
React__default.createElement(
|
|
15547
|
+
'div',
|
|
15548
|
+
{ className: 'modalImageHolder' },
|
|
15549
|
+
React__default.createElement('img', { className: 'modalImage', src: props.ModalImage, onClick: function onClick() {
|
|
15550
|
+
return launchModalButton();
|
|
15551
|
+
} }),
|
|
15552
|
+
React__default.createElement(
|
|
15553
|
+
'div',
|
|
15554
|
+
{ className: 'modalClose', onClick: function onClick() {
|
|
15555
|
+
return setShow(false);
|
|
15556
|
+
} },
|
|
15557
|
+
'X'
|
|
15558
|
+
)
|
|
15559
|
+
)
|
|
15560
|
+
),
|
|
15561
|
+
React__default.createElement(
|
|
15562
|
+
'style',
|
|
15563
|
+
{ jsx: 'true' },
|
|
15564
|
+
'\n .modalImageHolder {\n display: flex;\n justify-content: center;\n }\n .modalClose {\n display: flex;\n justify-content: center;\n width: 25px;\n height: 25px;\n font-size: 1.25rem;\n color: #fff;\n cursor: pointer;\n }\n .modalImage {\n cursor: pointer;\n }\n '
|
|
15565
|
+
)
|
|
15566
|
+
);
|
|
15567
|
+
};
|
|
15568
|
+
|
|
15525
15569
|
var fbsHero = function fbsHero(props) {
|
|
15526
15570
|
var removeTimeStamp = props.removeTimeStamp;
|
|
15527
15571
|
|
|
@@ -18123,6 +18167,41 @@ var KMTracker = function KMTracker(props) {
|
|
|
18123
18167
|
}
|
|
18124
18168
|
};
|
|
18125
18169
|
|
|
18170
|
+
var getSeriesDetail = function getSeriesDetail(article, currentSeries) {
|
|
18171
|
+
//For use in getInitialProps to return series detail to display next/prev links when javascript is disabled
|
|
18172
|
+
if (!currentSeries) {
|
|
18173
|
+
return {
|
|
18174
|
+
seriesUrl: '',
|
|
18175
|
+
currentSeries: false,
|
|
18176
|
+
prevUrl: false,
|
|
18177
|
+
nextUrl: false
|
|
18178
|
+
|
|
18179
|
+
};
|
|
18180
|
+
}
|
|
18181
|
+
var nextUrl = false;
|
|
18182
|
+
var prevUrl = false;
|
|
18183
|
+
var galleryBody = article.body.find(function (body) {
|
|
18184
|
+
if (body._type == 'youtubeGallery') {
|
|
18185
|
+
return body;
|
|
18186
|
+
}
|
|
18187
|
+
});
|
|
18188
|
+
if (currentSeries >= 1 && currentSeries < galleryBody.videos.length) {
|
|
18189
|
+
nextUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) + 1);
|
|
18190
|
+
}
|
|
18191
|
+
if (currentSeries > 1 && currentSeries <= galleryBody.videos.length) {
|
|
18192
|
+
prevUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) - 1);
|
|
18193
|
+
}
|
|
18194
|
+
var seriesDetail = {
|
|
18195
|
+
seriesUrl: article.url.current,
|
|
18196
|
+
currentSeries: currentSeries,
|
|
18197
|
+
nextUrl: nextUrl,
|
|
18198
|
+
prevUrl: prevUrl,
|
|
18199
|
+
type: 'Video'
|
|
18200
|
+
};
|
|
18201
|
+
|
|
18202
|
+
return seriesDetail;
|
|
18203
|
+
};
|
|
18204
|
+
|
|
18126
18205
|
var returnFormField = function returnFormField(_ref) {
|
|
18127
18206
|
var name = _ref.name,
|
|
18128
18207
|
label = _ref.label,
|
|
@@ -22081,4 +22160,4 @@ var auth = {
|
|
|
22081
22160
|
ProcessData: ProcessData_1
|
|
22082
22161
|
};
|
|
22083
22162
|
|
|
22084
|
-
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADSponsoredResources, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, auth as Auth, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HighlightenVideo, HorizontalHero, InfiniteScrollDeck, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, PublicationLanding, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers };
|
|
22163
|
+
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADSponsoredResources, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, auth as Auth, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HighlightenVideo, HorizontalHero, InfiniteScrollDeck, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, PopUpModal, PublicationLanding, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers, getSeriesDetail };
|