@mjhls/mjh-framework 1.0.1064 → 1.0.1065-pdfGating
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/AD300x250.js +1 -2
- package/dist/cjs/AD300x250x600.js +1 -2
- package/dist/cjs/AD728x90.js +1 -2
- package/dist/cjs/ADFloatingFooter.js +1 -2
- package/dist/cjs/ADGutter.js +1 -2
- package/dist/cjs/ADSkyscraper.js +1 -2
- package/dist/cjs/ADSponsoredResources.js +1 -2
- package/dist/cjs/ADWebcast.js +1 -2
- package/dist/cjs/ADWelcome.js +1 -2
- package/dist/cjs/AdSlot.js +1 -2
- package/dist/cjs/AdSlotsProvider.js +1 -2
- package/dist/cjs/ArticleProgramLandingPage.js +3 -4
- package/dist/cjs/ArticleSeriesLandingPage.js +3 -4
- package/dist/cjs/Beam.js +1 -2
- package/dist/cjs/CMEDeck.js +1 -2
- package/dist/cjs/Column2.js +1 -2
- package/dist/cjs/Column3.js +1 -2
- package/dist/cjs/ContentCardPaginated.js +2 -3
- package/dist/cjs/DeckContent.js +2 -3
- package/dist/cjs/DeckQueuePaginated.js +1 -2
- package/dist/cjs/ExternalResources.js +3 -4
- package/dist/cjs/GridContent.js +3 -4
- package/dist/cjs/GridContentPaginated.js +3 -4
- package/dist/cjs/HamMagazine.js +1 -2
- package/dist/cjs/HorizontalArticleListing.js +3 -4
- package/dist/cjs/IssueLanding.js +5 -6
- package/dist/cjs/LeftNav.js +1 -2
- package/dist/cjs/MasterDeck.js +3 -4
- package/dist/cjs/MasterDeckPaginated.js +3 -4
- package/dist/cjs/{MediaSeriesCard-2e65fe95.js → MediaSeriesCard-2e66a6a0.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +6 -7
- package/dist/cjs/MediaSeriesLandingPaginated.js +6 -7
- package/dist/cjs/NavDvm.js +1 -2
- package/dist/cjs/NavMagazine.js +1 -2
- package/dist/cjs/NavNative.js +1 -2
- package/dist/cjs/PartnerDetailListing.js +5 -6
- package/dist/cjs/PartnerDetailListingPaginated.js +5 -6
- package/dist/cjs/PodcastsLanding.js +6 -7
- package/dist/cjs/PtceDeck.js +1 -2
- package/dist/cjs/PubSection.js +3 -4
- package/dist/cjs/PubToc.js +1 -2
- package/dist/cjs/PublicationLanding.js +593 -21
- package/dist/cjs/QueueDeckExpanded.js +3 -4
- package/dist/cjs/QueueDeckExpandedPaginated.js +3 -4
- package/dist/cjs/Segment.js +1 -2
- package/dist/cjs/SideFooter.js +1 -2
- package/dist/cjs/TaxonomyDescription.js +3 -4
- package/dist/cjs/TemplateNormal.js +1 -2
- package/dist/cjs/Ustream.js +1 -2
- package/dist/cjs/VideoProgramLandingPage.js +3 -4
- package/dist/cjs/VideoSeriesFilter.js +1 -2
- package/dist/cjs/VideoSeriesLandingPage.js +3 -4
- package/dist/cjs/View.js +3 -4
- package/dist/cjs/{asyncToGenerator-65df6bf8.js → asyncToGenerator-77821af0.js} +56 -8
- package/dist/cjs/faundadb.js +1 -2
- package/dist/cjs/getPtceActivities.js +1 -2
- package/dist/cjs/getRelatedArticle.js +1 -2
- package/dist/cjs/getRootDocGroup.js +1 -2
- package/dist/cjs/getSerializers.js +3 -4
- package/dist/cjs/getTIData.js +1 -2
- package/dist/cjs/{index-4e9a219e.js → index-d4004342.js} +2 -2
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/{urlForFile-5084fc48.js → urlForFile-ef20990d.js} +2 -1
- package/dist/esm/AD300x250.js +1 -2
- package/dist/esm/AD300x250x600.js +1 -2
- package/dist/esm/AD728x90.js +1 -2
- package/dist/esm/ADFloatingFooter.js +1 -2
- package/dist/esm/ADGutter.js +1 -2
- package/dist/esm/ADSkyscraper.js +1 -2
- package/dist/esm/ADSponsoredResources.js +1 -2
- package/dist/esm/ADWebcast.js +1 -2
- package/dist/esm/ADWelcome.js +1 -2
- package/dist/esm/AdSlot.js +1 -2
- package/dist/esm/AdSlotsProvider.js +1 -2
- package/dist/esm/ArticleProgramLandingPage.js +3 -4
- package/dist/esm/ArticleSeriesLandingPage.js +3 -4
- package/dist/esm/Beam.js +1 -2
- package/dist/esm/CMEDeck.js +1 -2
- package/dist/esm/Column2.js +1 -2
- package/dist/esm/Column3.js +1 -2
- package/dist/esm/ContentCardPaginated.js +2 -3
- package/dist/esm/DeckContent.js +2 -3
- package/dist/esm/DeckQueuePaginated.js +1 -2
- package/dist/esm/ExternalResources.js +3 -4
- package/dist/esm/GridContent.js +3 -4
- package/dist/esm/GridContentPaginated.js +3 -4
- package/dist/esm/HamMagazine.js +1 -2
- package/dist/esm/HorizontalArticleListing.js +3 -4
- package/dist/esm/IssueLanding.js +5 -6
- package/dist/esm/LeftNav.js +1 -2
- package/dist/esm/MasterDeck.js +3 -4
- package/dist/esm/MasterDeckPaginated.js +3 -4
- package/dist/esm/{MediaSeriesCard-27cce8ea.js → MediaSeriesCard-c30a730d.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +6 -7
- package/dist/esm/MediaSeriesLandingPaginated.js +6 -7
- package/dist/esm/NavDvm.js +1 -2
- package/dist/esm/NavMagazine.js +1 -2
- package/dist/esm/NavNative.js +1 -2
- package/dist/esm/PartnerDetailListing.js +5 -6
- package/dist/esm/PartnerDetailListingPaginated.js +5 -6
- package/dist/esm/PodcastsLanding.js +6 -7
- package/dist/esm/PtceDeck.js +1 -2
- package/dist/esm/PubSection.js +3 -4
- package/dist/esm/PubToc.js +1 -2
- package/dist/esm/PublicationLanding.js +579 -11
- package/dist/esm/QueueDeckExpanded.js +3 -4
- package/dist/esm/QueueDeckExpandedPaginated.js +3 -4
- package/dist/esm/Segment.js +1 -2
- package/dist/esm/SideFooter.js +1 -2
- package/dist/esm/TaxonomyDescription.js +3 -4
- package/dist/esm/TemplateNormal.js +1 -2
- package/dist/esm/Ustream.js +1 -2
- package/dist/esm/VideoProgramLandingPage.js +3 -4
- package/dist/esm/VideoSeriesFilter.js +1 -2
- package/dist/esm/VideoSeriesLandingPage.js +3 -4
- package/dist/esm/View.js +3 -4
- package/dist/esm/{asyncToGenerator-64822ccc.js → asyncToGenerator-958ef5fc.js} +50 -6
- package/dist/esm/faundadb.js +1 -2
- package/dist/esm/getPtceActivities.js +1 -2
- package/dist/esm/getRelatedArticle.js +1 -2
- package/dist/esm/getRootDocGroup.js +1 -2
- package/dist/esm/getSerializers.js +3 -4
- package/dist/esm/getTIData.js +1 -2
- package/dist/esm/{index-1fd45cc5.js → index-ae420a0c.js} +2 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/{urlForFile-f6485737.js → urlForFile-dc111d7f.js} +2 -1
- package/package.json +1 -1
- package/dist/cjs/_set-species-0c7864a2.js +0 -55
- package/dist/esm/_set-species-2cd9340f.js +0 -50
- /package/dist/cjs/{ADInfeed-98ee4120.js → ADInfeed-49bdb9e1.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-55df7d69.js → ADlgInfeed-33be9ab6.js} +0 -0
- /package/dist/esm/{ADInfeed-6d0c0856.js → ADInfeed-d2229e62.js} +0 -0
- /package/dist/esm/{ADlgInfeed-93bc2250.js → ADlgInfeed-e13fb474.js} +0 -0
|
@@ -1,18 +1,28 @@
|
|
|
1
|
+
import { _ as _extends } from './extends-1559c147.js';
|
|
2
|
+
import { _ as _defineProperty } from './defineProperty-8c30428f.js';
|
|
3
|
+
import { b as _anInstance, c as _forOf, d as _redefineAll, e as _setSpecies, _ as _asyncToGenerator, r as regenerator } from './asyncToGenerator-958ef5fc.js';
|
|
4
|
+
import { _ as _JSON$stringify } from './stringify-2b084bee.js';
|
|
1
5
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
2
6
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
3
7
|
import { b as _isObject, c as _objectDp, d as _objectCreate, e as _ctx, f as _descriptors, g as _iterDefine, h as _wks, i as _toObject, j as _iobject, k as _toLength, l as _global, m as _fails, n as _hide, o as _setToStringTag, _ as _export, p as _classof, q as _aFunction, a as _core } from './core.get-iterator-method-ea258bb1.js';
|
|
4
8
|
import { _ as _iterStep } from './web.dom.iterable-ab4dea5c.js';
|
|
5
|
-
import { _ as _anInstance, a as _forOf, b as _redefineAll, c as _setSpecies } from './_set-species-2cd9340f.js';
|
|
6
9
|
import { _ as _meta, a as _isArray } from './_is-array-8d21b9e3.js';
|
|
7
10
|
import { _ as _toConsumableArray } from './toConsumableArray-f7074d7c.js';
|
|
8
|
-
import React__default, { useState, useEffect } from 'react';
|
|
11
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
9
12
|
import Row from 'react-bootstrap/Row';
|
|
10
13
|
import Col from 'react-bootstrap/Col';
|
|
11
14
|
import Dropdown from 'react-bootstrap/Dropdown';
|
|
12
15
|
import Card from 'react-bootstrap/Card';
|
|
13
16
|
import { useRouter } from 'next/router';
|
|
14
17
|
import { L as LazyLoad } from './index-755f2cc2.js';
|
|
15
|
-
import { u as urlForFile } from './urlForFile-
|
|
18
|
+
import { u as urlForFile } from './urlForFile-dc111d7f.js';
|
|
19
|
+
import Overlay from 'react-bootstrap/Overlay';
|
|
20
|
+
import Popover from 'react-bootstrap/Popover';
|
|
21
|
+
import Button from 'react-bootstrap/Button';
|
|
22
|
+
import Form from 'react-bootstrap/Form';
|
|
23
|
+
import './main-754d4992.js';
|
|
24
|
+
import './define-property-5f1bda73.js';
|
|
25
|
+
import './_library-528f1934.js';
|
|
16
26
|
import './_iter-detect-98db3b07.js';
|
|
17
27
|
import 'react-dom';
|
|
18
28
|
import 'prop-types';
|
|
@@ -373,6 +383,8 @@ module.exports = { "default": set$1, __esModule: true };
|
|
|
373
383
|
|
|
374
384
|
var _Set = unwrapExports(set);
|
|
375
385
|
|
|
386
|
+
var _this = undefined;
|
|
387
|
+
|
|
376
388
|
/* usage & query
|
|
377
389
|
const Publication = (props) => {
|
|
378
390
|
const { cache, pub, year } = props
|
|
@@ -455,6 +467,54 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
455
467
|
|
|
456
468
|
var baseUrl = client ? client.config().baseUrl : '';
|
|
457
469
|
|
|
470
|
+
var _useState9 = useState(''),
|
|
471
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
472
|
+
email = _useState10[0],
|
|
473
|
+
setEmail = _useState10[1];
|
|
474
|
+
|
|
475
|
+
var _useState11 = useState(''),
|
|
476
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
477
|
+
firstName = _useState12[0],
|
|
478
|
+
setFirstName = _useState12[1];
|
|
479
|
+
|
|
480
|
+
var _useState13 = useState(''),
|
|
481
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
482
|
+
lastName = _useState14[0],
|
|
483
|
+
setLastName = _useState14[1];
|
|
484
|
+
|
|
485
|
+
var _useState15 = useState(false),
|
|
486
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
487
|
+
checkBox = _useState16[0],
|
|
488
|
+
setCheckBox = _useState16[1];
|
|
489
|
+
|
|
490
|
+
var _useState17 = useState(false),
|
|
491
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
492
|
+
isValidated = _useState18[0],
|
|
493
|
+
SetIsValidated = _useState18[1];
|
|
494
|
+
|
|
495
|
+
var DL_PDF = useRef();
|
|
496
|
+
var overLayRef = useRef([]);
|
|
497
|
+
|
|
498
|
+
var _useState19 = useState(true),
|
|
499
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
500
|
+
sendingData = _useState20[0],
|
|
501
|
+
setSendingData = _useState20[1];
|
|
502
|
+
|
|
503
|
+
var _useState21 = useState(''),
|
|
504
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
505
|
+
errorMsg = _useState22[0],
|
|
506
|
+
setErrorMsg = _useState22[1];
|
|
507
|
+
|
|
508
|
+
var _useState23 = useState({}),
|
|
509
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
510
|
+
show = _useState24[0],
|
|
511
|
+
setShow = _useState24[1];
|
|
512
|
+
|
|
513
|
+
var _useState25 = useState(null),
|
|
514
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
515
|
+
overlayTarget = _useState26[0],
|
|
516
|
+
setOverlayTarget = _useState26[1];
|
|
517
|
+
|
|
458
518
|
// useEffect(() => {
|
|
459
519
|
// ;(async function() {
|
|
460
520
|
// if (issueData && issueData.length > 0 && client) {
|
|
@@ -483,6 +543,8 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
483
543
|
// })()
|
|
484
544
|
// }, [])
|
|
485
545
|
// function for filtering by year
|
|
546
|
+
|
|
547
|
+
|
|
486
548
|
var filterByYear = function filterByYear(year) {
|
|
487
549
|
return issueData.filter(function (issue) {
|
|
488
550
|
return issue.year === year;
|
|
@@ -585,12 +647,196 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
585
647
|
}
|
|
586
648
|
}, [activeYear, activeContentPlacement, issueData]);
|
|
587
649
|
|
|
650
|
+
var handleFormInput = function handleFormInput(e) {
|
|
651
|
+
//console.dir(e.currentTarget)
|
|
652
|
+
e.preventDefault();
|
|
653
|
+
e.stopPropagation();
|
|
654
|
+
|
|
655
|
+
switch (e.currentTarget.name) {
|
|
656
|
+
case 'firstName':
|
|
657
|
+
setFirstName(e.currentTarget.value);
|
|
658
|
+
break;
|
|
659
|
+
case 'lastName':
|
|
660
|
+
setLastName(e.currentTarget.value);
|
|
661
|
+
break;
|
|
662
|
+
case 'email':
|
|
663
|
+
setEmail(e.currentTarget.value);
|
|
664
|
+
break;
|
|
665
|
+
case 'checkbox':
|
|
666
|
+
setCheckBox(e.currentTarget.checked);
|
|
667
|
+
break;
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
useEffect(function () {
|
|
672
|
+
if (firstName.length > 3 && lastName.length > 3 && email.includes('@') && checkBox) {
|
|
673
|
+
setSendingData(false);
|
|
674
|
+
}
|
|
675
|
+
}, [firstName, lastName, email, checkBox]);
|
|
676
|
+
|
|
677
|
+
var isGatedFormHandler = function () {
|
|
678
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(e) {
|
|
679
|
+
var form, body, res;
|
|
680
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
681
|
+
while (1) {
|
|
682
|
+
switch (_context.prev = _context.next) {
|
|
683
|
+
case 0:
|
|
684
|
+
e.preventDefault();
|
|
685
|
+
e.stopPropagation();
|
|
686
|
+
setSendingData(true);
|
|
687
|
+
form = e.currentTarget;
|
|
688
|
+
|
|
689
|
+
if (!(form.checkValidity() === false)) {
|
|
690
|
+
_context.next = 6;
|
|
691
|
+
break;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
return _context.abrupt('return');
|
|
695
|
+
|
|
696
|
+
case 6:
|
|
697
|
+
console.dir(overLayRef);
|
|
698
|
+
body = {};
|
|
699
|
+
|
|
700
|
+
body['firstName'] = firstName;
|
|
701
|
+
body['lastName'] = lastName;
|
|
702
|
+
body['email'] = email;
|
|
703
|
+
body['downloadedPDF'] = DL_PDF.current.dataset.pdfname;
|
|
704
|
+
body['publication'] = router.query.publication ? router.query.publication : null;
|
|
705
|
+
body['site'] = window.location.hostname;
|
|
706
|
+
body['Source'] = 'Gated Form';
|
|
707
|
+
SetIsValidated(true);
|
|
708
|
+
|
|
709
|
+
_context.prev = 16;
|
|
710
|
+
_context.next = 19;
|
|
711
|
+
return fetch('/api/pdfGating/check', {
|
|
712
|
+
method: 'POST',
|
|
713
|
+
headers: { 'Content-Type': 'application/json' },
|
|
714
|
+
body: _JSON$stringify(body)
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
case 19:
|
|
718
|
+
res = _context.sent;
|
|
719
|
+
|
|
720
|
+
console.dir(res);
|
|
721
|
+
|
|
722
|
+
if (!(res.status === 202)) {
|
|
723
|
+
_context.next = 26;
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
window.open(DL_PDF.current.dataset.pdf, '_blank');
|
|
728
|
+
closeAllOverlays();
|
|
729
|
+
_context.next = 31;
|
|
730
|
+
break;
|
|
731
|
+
|
|
732
|
+
case 26:
|
|
733
|
+
_context.t0 = Error;
|
|
734
|
+
_context.next = 29;
|
|
735
|
+
return res.text();
|
|
736
|
+
|
|
737
|
+
case 29:
|
|
738
|
+
_context.t1 = _context.sent;
|
|
739
|
+
throw new _context.t0(_context.t1);
|
|
740
|
+
|
|
741
|
+
case 31:
|
|
742
|
+
_context.next = 37;
|
|
743
|
+
break;
|
|
744
|
+
|
|
745
|
+
case 33:
|
|
746
|
+
_context.prev = 33;
|
|
747
|
+
_context.t2 = _context['catch'](16);
|
|
748
|
+
|
|
749
|
+
setErrorMsg(_context.t2.message);
|
|
750
|
+
window.setTimeout(function () {
|
|
751
|
+
closeAllOverlays();
|
|
752
|
+
}, 500);
|
|
753
|
+
|
|
754
|
+
case 37:
|
|
755
|
+
setSendingData(false);
|
|
756
|
+
SetIsValidated(false);
|
|
757
|
+
|
|
758
|
+
case 39:
|
|
759
|
+
case 'end':
|
|
760
|
+
return _context.stop();
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}, _callee, _this, [[16, 33]]);
|
|
764
|
+
}));
|
|
765
|
+
|
|
766
|
+
return function isGatedFormHandler(_x) {
|
|
767
|
+
return _ref.apply(this, arguments);
|
|
768
|
+
};
|
|
769
|
+
}();
|
|
770
|
+
|
|
771
|
+
var _useState27 = useState(null),
|
|
772
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
773
|
+
currentKey = _useState28[0],
|
|
774
|
+
setCurrentKey = _useState28[1];
|
|
775
|
+
|
|
776
|
+
var _useState29 = useState(false),
|
|
777
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
778
|
+
overLaysClosed = _useState30[0],
|
|
779
|
+
setOverLaysClosed = _useState30[1];
|
|
780
|
+
|
|
781
|
+
var closeAllOverlays = function closeAllOverlays(targetKey) {
|
|
782
|
+
for (var key in show) {
|
|
783
|
+
if (key !== targetKey) {
|
|
784
|
+
closeOverLay(key);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
if (targetKey) {
|
|
788
|
+
setCurrentKey(targetKey);
|
|
789
|
+
setOverLaysClosed(true);
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
useEffect(function () {
|
|
794
|
+
console.log(currentKey);
|
|
795
|
+
console.log(overLaysClosed);
|
|
796
|
+
if (overLaysClosed) {
|
|
797
|
+
window.setTimeout(function () {
|
|
798
|
+
console.dir(show[currentKey]);
|
|
799
|
+
var updatedValue = _defineProperty({}, currentKey, true);
|
|
800
|
+
setShow(function (show) {
|
|
801
|
+
return _extends({}, show, updatedValue);
|
|
802
|
+
});
|
|
803
|
+
setOverLaysClosed(false);
|
|
804
|
+
if (show[currentKey] !== true) {
|
|
805
|
+
try {
|
|
806
|
+
document.getElementById('download_' + currentKey).disabled = true;
|
|
807
|
+
} catch (e) {
|
|
808
|
+
console.log(e.message);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}, 250);
|
|
812
|
+
}
|
|
813
|
+
}, [currentKey, overLaysClosed, show]);
|
|
814
|
+
|
|
815
|
+
var handleOverLayOpen = function handleOverLayOpen(event) {
|
|
816
|
+
closeAllOverlays(event.target.dataset.key);
|
|
817
|
+
setOverlayTarget(event.target);
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
function closeOverLay(key) {
|
|
821
|
+
var updatedValue = {};
|
|
822
|
+
updatedValue = show[key] === true ? _defineProperty({}, key, false) : _defineProperty({}, key, true);
|
|
823
|
+
document.getElementById('download_' + key).disabled = false;
|
|
824
|
+
setShow(function (show) {
|
|
825
|
+
return _extends({}, show, updatedValue);
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
useEffect(function () {
|
|
830
|
+
console.dir(overlayTarget);
|
|
831
|
+
console.dir(show);
|
|
832
|
+
}, [overlayTarget, show]);
|
|
833
|
+
|
|
588
834
|
return React__default.createElement(
|
|
589
835
|
'div',
|
|
590
836
|
{ id: 'publicationLanding' },
|
|
591
837
|
React__default.createElement(
|
|
592
838
|
'style',
|
|
593
|
-
{ jsx: true },
|
|
839
|
+
{ jsx: 'true' },
|
|
594
840
|
'\n #pubYearFilter .dropdown-menu.show,\n #contentPlacementFilter .dropdown-menu.show {\n max-height: 25vh;\n overflow: auto;\n }\n #publicationLanding {\n margin-bottom: 6rem;\n }\n '
|
|
595
841
|
),
|
|
596
842
|
React__default.createElement(
|
|
@@ -707,16 +953,177 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
707
953
|
React__default.createElement(
|
|
708
954
|
Card.Footer,
|
|
709
955
|
null,
|
|
710
|
-
issue && issue.articles && issue.articles.length >
|
|
956
|
+
issue && issue.articles && issue.articles.length > 1 ? React__default.createElement(
|
|
711
957
|
'a',
|
|
712
958
|
{ href: publication.identifier.current + '/' + issue.identifier.current, className: 'btn btn-primary' },
|
|
713
959
|
'View Issue'
|
|
714
960
|
) : null,
|
|
715
|
-
issue
|
|
961
|
+
issue && issue.articles && issue.articles.length === 1 ? React__default.createElement(
|
|
962
|
+
'a',
|
|
963
|
+
{ href: '/view/' + issue.articles[0].url.current, className: 'btn btn-primary' },
|
|
964
|
+
'View Issue'
|
|
965
|
+
) : null,
|
|
966
|
+
issue.isGatedPDF ? issue.pdf && issue.pdf.asset && issue.pdf.asset.url ? React__default.createElement(
|
|
967
|
+
'div',
|
|
968
|
+
{ className: 'overLayWrapper', ref: function ref(el) {
|
|
969
|
+
return overLayRef.current[key] = el;
|
|
970
|
+
} },
|
|
971
|
+
React__default.createElement(
|
|
972
|
+
Overlay,
|
|
973
|
+
{ show: show[key], container: overLayRef.current[key], key: key, target: overlayTarget, placement: 'top', onHide: function onHide() {
|
|
974
|
+
return closeAllOverlays();
|
|
975
|
+
} },
|
|
976
|
+
React__default.createElement(
|
|
977
|
+
Popover,
|
|
978
|
+
{ id: 'popover-basic-' + key },
|
|
979
|
+
React__default.createElement(
|
|
980
|
+
Popover.Content,
|
|
981
|
+
null,
|
|
982
|
+
React__default.createElement(
|
|
983
|
+
Row,
|
|
984
|
+
null,
|
|
985
|
+
React__default.createElement(
|
|
986
|
+
'div',
|
|
987
|
+
{
|
|
988
|
+
onClick: function onClick(e) {
|
|
989
|
+
return closeOverLay(key);
|
|
990
|
+
},
|
|
991
|
+
style: { cursor: 'pointer', display: 'flex', flexDirection: 'row', justifyContent: 'flex-end', width: '100%', marginBottom: '-15px' } },
|
|
992
|
+
React__default.createElement(
|
|
993
|
+
'div',
|
|
994
|
+
{ style: { width: '25px', height: '25px' } },
|
|
995
|
+
'X'
|
|
996
|
+
)
|
|
997
|
+
)
|
|
998
|
+
),
|
|
999
|
+
React__default.createElement(
|
|
1000
|
+
Form,
|
|
1001
|
+
{ validated: isValidated, onSubmit: isGatedFormHandler },
|
|
1002
|
+
React__default.createElement(
|
|
1003
|
+
Row,
|
|
1004
|
+
{ className: 'gatedPdfForm' },
|
|
1005
|
+
React__default.createElement(
|
|
1006
|
+
Form.Group,
|
|
1007
|
+
{ className: 'mb-3 mt-3', controlId: 'pdfFormFirstName' },
|
|
1008
|
+
React__default.createElement(
|
|
1009
|
+
Form.Label,
|
|
1010
|
+
null,
|
|
1011
|
+
React__default.createElement(
|
|
1012
|
+
'span',
|
|
1013
|
+
{ style: { color: 'red' } },
|
|
1014
|
+
'*'
|
|
1015
|
+
),
|
|
1016
|
+
'First Name'
|
|
1017
|
+
),
|
|
1018
|
+
React__default.createElement(Form.Control, { onChange: function onChange(e) {
|
|
1019
|
+
return handleFormInput(e);
|
|
1020
|
+
}, value: firstName, name: 'firstName', required: true, type: 'text', min: '1', placeholder: 'First Name' }),
|
|
1021
|
+
React__default.createElement(
|
|
1022
|
+
Form.Control.Feedback,
|
|
1023
|
+
{ type: 'invalid' },
|
|
1024
|
+
'Please provide your first name.'
|
|
1025
|
+
)
|
|
1026
|
+
),
|
|
1027
|
+
React__default.createElement(
|
|
1028
|
+
Form.Group,
|
|
1029
|
+
{ required: true, className: 'mb-3', controlId: 'pdfFormLastName' },
|
|
1030
|
+
React__default.createElement(
|
|
1031
|
+
Form.Label,
|
|
1032
|
+
null,
|
|
1033
|
+
React__default.createElement(
|
|
1034
|
+
'span',
|
|
1035
|
+
{ style: { color: 'red' } },
|
|
1036
|
+
'*'
|
|
1037
|
+
),
|
|
1038
|
+
'Last Name'
|
|
1039
|
+
),
|
|
1040
|
+
React__default.createElement(Form.Control, { onChange: function onChange(e) {
|
|
1041
|
+
return handleFormInput(e);
|
|
1042
|
+
}, value: lastName, name: 'lastName', required: true, type: 'text', min: '1', placeholder: 'Last Name' }),
|
|
1043
|
+
React__default.createElement(
|
|
1044
|
+
Form.Control.Feedback,
|
|
1045
|
+
{ type: 'invalid' },
|
|
1046
|
+
'Please provide your last name.'
|
|
1047
|
+
)
|
|
1048
|
+
),
|
|
1049
|
+
React__default.createElement(
|
|
1050
|
+
Form.Group,
|
|
1051
|
+
{ className: 'mb-3', controlId: 'pdfFormEmail' },
|
|
1052
|
+
React__default.createElement(
|
|
1053
|
+
Form.Label,
|
|
1054
|
+
null,
|
|
1055
|
+
React__default.createElement(
|
|
1056
|
+
'span',
|
|
1057
|
+
{ style: { color: 'red' } },
|
|
1058
|
+
'*'
|
|
1059
|
+
),
|
|
1060
|
+
'Email'
|
|
1061
|
+
),
|
|
1062
|
+
React__default.createElement(Form.Control, { onChange: function onChange(e) {
|
|
1063
|
+
return handleFormInput(e);
|
|
1064
|
+
}, value: email, name: 'email', required: true, type: 'email', placeholder: 'Email' }),
|
|
1065
|
+
React__default.createElement(
|
|
1066
|
+
Form.Control.Feedback,
|
|
1067
|
+
{ type: 'invalid' },
|
|
1068
|
+
'Please provide your email.'
|
|
1069
|
+
)
|
|
1070
|
+
),
|
|
1071
|
+
React__default.createElement(
|
|
1072
|
+
Form.Group,
|
|
1073
|
+
{ className: 'mb-3', controlId: 'pdfPrivacyCheck' },
|
|
1074
|
+
React__default.createElement(
|
|
1075
|
+
Form.Check,
|
|
1076
|
+
null,
|
|
1077
|
+
React__default.createElement(Form.Check.Input, { required: true, onChange: function onChange(e) {
|
|
1078
|
+
return handleFormInput(e);
|
|
1079
|
+
}, type: 'checkbox', name: 'checkbox' }),
|
|
1080
|
+
React__default.createElement(
|
|
1081
|
+
Form.Check.Label,
|
|
1082
|
+
null,
|
|
1083
|
+
'By clicking on \'Submit\', you accept our ',
|
|
1084
|
+
React__default.createElement(
|
|
1085
|
+
'a',
|
|
1086
|
+
{ href: 'https://www.dentalproductsreport.com/privacy', target: '_blank' },
|
|
1087
|
+
'Privacy Policy'
|
|
1088
|
+
)
|
|
1089
|
+
)
|
|
1090
|
+
)
|
|
1091
|
+
),
|
|
1092
|
+
React__default.createElement(
|
|
1093
|
+
Button,
|
|
1094
|
+
{ disabled: sendingData, className: 'btn btn-primary mb-3', type: 'submit' },
|
|
1095
|
+
'Submit'
|
|
1096
|
+
),
|
|
1097
|
+
errorMsg ? React__default.createElement(
|
|
1098
|
+
'div',
|
|
1099
|
+
{ style: { color: 'red' } },
|
|
1100
|
+
errorMsg
|
|
1101
|
+
) : null
|
|
1102
|
+
)
|
|
1103
|
+
)
|
|
1104
|
+
)
|
|
1105
|
+
)
|
|
1106
|
+
),
|
|
1107
|
+
React__default.createElement(
|
|
1108
|
+
'button',
|
|
1109
|
+
{
|
|
1110
|
+
id: 'download_' + key,
|
|
1111
|
+
rel: 'noopener',
|
|
1112
|
+
onClick: function onClick(e) {
|
|
1113
|
+
return handleOverLayOpen(e);
|
|
1114
|
+
},
|
|
1115
|
+
ref: DL_PDF,
|
|
1116
|
+
'data-key': key,
|
|
1117
|
+
'data-pdfname': issue.name,
|
|
1118
|
+
'data-pdf': urlForFile(issue.pdf, baseUrl),
|
|
1119
|
+
className: 'btn btn-primary ml-3' },
|
|
1120
|
+
'Download Issue'
|
|
1121
|
+
)
|
|
1122
|
+
) : null : issue.pdf && issue.pdf.asset && issue.pdf.asset.url ? React__default.createElement(
|
|
716
1123
|
'a',
|
|
717
1124
|
{ rel: 'noopener', href: urlForFile(issue.pdf, baseUrl), target: '_blank', className: 'btn btn-primary' },
|
|
718
1125
|
'Download Issue'
|
|
719
|
-
)
|
|
1126
|
+
) : null
|
|
720
1127
|
)
|
|
721
1128
|
)
|
|
722
1129
|
)
|
|
@@ -770,16 +1177,177 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
770
1177
|
React__default.createElement(
|
|
771
1178
|
Card.Footer,
|
|
772
1179
|
null,
|
|
773
|
-
issue && issue.articles && issue.articles.length >
|
|
1180
|
+
issue && issue.articles && issue.articles.length > 1 ? React__default.createElement(
|
|
774
1181
|
'a',
|
|
775
1182
|
{ href: publication.identifier.current + '/' + issue.identifier.current, className: 'btn btn-primary' },
|
|
776
1183
|
'View Issue'
|
|
777
1184
|
) : null,
|
|
778
|
-
issue
|
|
1185
|
+
issue && issue.articles && issue.articles.length === 1 ? React__default.createElement(
|
|
1186
|
+
'a',
|
|
1187
|
+
{ href: '/view/' + issue.articles[0].url.current, className: 'btn btn-primary' },
|
|
1188
|
+
'View Issue'
|
|
1189
|
+
) : null,
|
|
1190
|
+
issue.isGatedPDF ? issue.pdf && issue.pdf.asset && issue.pdf.asset.url ? React__default.createElement(
|
|
1191
|
+
'div',
|
|
1192
|
+
{ className: 'overLayWrapper', ref: function ref(el) {
|
|
1193
|
+
return overLayRef.current[key] = el;
|
|
1194
|
+
} },
|
|
1195
|
+
React__default.createElement(
|
|
1196
|
+
Overlay,
|
|
1197
|
+
{ show: show[key], container: overLayRef.current[key], key: key, target: overlayTarget, placement: 'top', onHide: function onHide() {
|
|
1198
|
+
return closeAllOverlays();
|
|
1199
|
+
} },
|
|
1200
|
+
React__default.createElement(
|
|
1201
|
+
Popover,
|
|
1202
|
+
{ id: 'popover-basic-' + key },
|
|
1203
|
+
React__default.createElement(
|
|
1204
|
+
Popover.Content,
|
|
1205
|
+
null,
|
|
1206
|
+
React__default.createElement(
|
|
1207
|
+
Row,
|
|
1208
|
+
null,
|
|
1209
|
+
React__default.createElement(
|
|
1210
|
+
'div',
|
|
1211
|
+
{
|
|
1212
|
+
onClick: function onClick(e) {
|
|
1213
|
+
return closeOverLay(key);
|
|
1214
|
+
},
|
|
1215
|
+
style: { cursor: 'pointer', display: 'flex', flexDirection: 'row', justifyContent: 'flex-end', width: '100%', marginBottom: '-15px' } },
|
|
1216
|
+
React__default.createElement(
|
|
1217
|
+
'div',
|
|
1218
|
+
{ style: { width: '25px', height: '25px' } },
|
|
1219
|
+
'X'
|
|
1220
|
+
)
|
|
1221
|
+
)
|
|
1222
|
+
),
|
|
1223
|
+
React__default.createElement(
|
|
1224
|
+
Form,
|
|
1225
|
+
{ validated: isValidated, onSubmit: isGatedFormHandler },
|
|
1226
|
+
React__default.createElement(
|
|
1227
|
+
Row,
|
|
1228
|
+
{ className: 'gatedPdfForm' },
|
|
1229
|
+
React__default.createElement(
|
|
1230
|
+
Form.Group,
|
|
1231
|
+
{ className: 'mb-3 mt-3', controlId: 'pdfFormFirstName' },
|
|
1232
|
+
React__default.createElement(
|
|
1233
|
+
Form.Label,
|
|
1234
|
+
null,
|
|
1235
|
+
React__default.createElement(
|
|
1236
|
+
'span',
|
|
1237
|
+
{ style: { color: 'red' } },
|
|
1238
|
+
'*'
|
|
1239
|
+
),
|
|
1240
|
+
'First Name'
|
|
1241
|
+
),
|
|
1242
|
+
React__default.createElement(Form.Control, { onChange: function onChange(e) {
|
|
1243
|
+
return handleFormInput(e);
|
|
1244
|
+
}, value: firstName, name: 'firstName', required: true, type: 'text', min: '1', placeholder: 'First Name' }),
|
|
1245
|
+
React__default.createElement(
|
|
1246
|
+
Form.Control.Feedback,
|
|
1247
|
+
{ type: 'invalid' },
|
|
1248
|
+
'Please provide your first name.'
|
|
1249
|
+
)
|
|
1250
|
+
),
|
|
1251
|
+
React__default.createElement(
|
|
1252
|
+
Form.Group,
|
|
1253
|
+
{ required: true, className: 'mb-3', controlId: 'pdfFormLastName' },
|
|
1254
|
+
React__default.createElement(
|
|
1255
|
+
Form.Label,
|
|
1256
|
+
null,
|
|
1257
|
+
React__default.createElement(
|
|
1258
|
+
'span',
|
|
1259
|
+
{ style: { color: 'red' } },
|
|
1260
|
+
'*'
|
|
1261
|
+
),
|
|
1262
|
+
'Last Name'
|
|
1263
|
+
),
|
|
1264
|
+
React__default.createElement(Form.Control, { onChange: function onChange(e) {
|
|
1265
|
+
return handleFormInput(e);
|
|
1266
|
+
}, value: lastName, name: 'lastName', required: true, type: 'text', min: '1', placeholder: 'Last Name' }),
|
|
1267
|
+
React__default.createElement(
|
|
1268
|
+
Form.Control.Feedback,
|
|
1269
|
+
{ type: 'invalid' },
|
|
1270
|
+
'Please provide your last name.'
|
|
1271
|
+
)
|
|
1272
|
+
),
|
|
1273
|
+
React__default.createElement(
|
|
1274
|
+
Form.Group,
|
|
1275
|
+
{ className: 'mb-3', controlId: 'pdfFormEmail' },
|
|
1276
|
+
React__default.createElement(
|
|
1277
|
+
Form.Label,
|
|
1278
|
+
null,
|
|
1279
|
+
React__default.createElement(
|
|
1280
|
+
'span',
|
|
1281
|
+
{ style: { color: 'red' } },
|
|
1282
|
+
'*'
|
|
1283
|
+
),
|
|
1284
|
+
'Email'
|
|
1285
|
+
),
|
|
1286
|
+
React__default.createElement(Form.Control, { onChange: function onChange(e) {
|
|
1287
|
+
return handleFormInput(e);
|
|
1288
|
+
}, value: email, name: 'email', required: true, type: 'email', placeholder: 'Email' }),
|
|
1289
|
+
React__default.createElement(
|
|
1290
|
+
Form.Control.Feedback,
|
|
1291
|
+
{ type: 'invalid' },
|
|
1292
|
+
'Please provide your email.'
|
|
1293
|
+
)
|
|
1294
|
+
),
|
|
1295
|
+
React__default.createElement(
|
|
1296
|
+
Form.Group,
|
|
1297
|
+
{ className: 'mb-3', controlId: 'pdfPrivacyCheck' },
|
|
1298
|
+
React__default.createElement(
|
|
1299
|
+
Form.Check,
|
|
1300
|
+
null,
|
|
1301
|
+
React__default.createElement(Form.Check.Input, { required: true, onChange: function onChange(e) {
|
|
1302
|
+
return handleFormInput(e);
|
|
1303
|
+
}, type: 'checkbox', name: 'checkbox' }),
|
|
1304
|
+
React__default.createElement(
|
|
1305
|
+
Form.Check.Label,
|
|
1306
|
+
null,
|
|
1307
|
+
'By clicking on \'Submit\', you accept our ',
|
|
1308
|
+
React__default.createElement(
|
|
1309
|
+
'a',
|
|
1310
|
+
{ href: 'https://www.dentalproductsreport.com/privacy', target: '_blank' },
|
|
1311
|
+
'Privacy Policy'
|
|
1312
|
+
)
|
|
1313
|
+
)
|
|
1314
|
+
)
|
|
1315
|
+
),
|
|
1316
|
+
React__default.createElement(
|
|
1317
|
+
Button,
|
|
1318
|
+
{ disabled: sendingData, className: 'btn btn-primary mb-3', type: 'submit' },
|
|
1319
|
+
'Submit'
|
|
1320
|
+
),
|
|
1321
|
+
errorMsg ? React__default.createElement(
|
|
1322
|
+
'div',
|
|
1323
|
+
{ style: { color: 'red' } },
|
|
1324
|
+
errorMsg
|
|
1325
|
+
) : null
|
|
1326
|
+
)
|
|
1327
|
+
)
|
|
1328
|
+
)
|
|
1329
|
+
)
|
|
1330
|
+
),
|
|
1331
|
+
React__default.createElement(
|
|
1332
|
+
'button',
|
|
1333
|
+
{
|
|
1334
|
+
id: 'download_' + key,
|
|
1335
|
+
rel: 'noopener',
|
|
1336
|
+
onClick: function onClick(e) {
|
|
1337
|
+
return handleOverLayOpen(e);
|
|
1338
|
+
},
|
|
1339
|
+
ref: DL_PDF,
|
|
1340
|
+
'data-key': key,
|
|
1341
|
+
'data-pdfname': issue.name,
|
|
1342
|
+
'data-pdf': urlForFile(issue.pdf, baseUrl),
|
|
1343
|
+
className: 'btn btn-primary ml-3' },
|
|
1344
|
+
'Download Issue'
|
|
1345
|
+
)
|
|
1346
|
+
) : null : issue.pdf && issue.pdf.asset && issue.pdf.asset.url ? React__default.createElement(
|
|
779
1347
|
'a',
|
|
780
1348
|
{ rel: 'noopener', href: urlForFile(issue.pdf, baseUrl), target: '_blank', className: 'btn btn-primary' },
|
|
781
1349
|
'Download Issue'
|
|
782
|
-
)
|
|
1350
|
+
) : null
|
|
783
1351
|
)
|
|
784
1352
|
)
|
|
785
1353
|
)
|
|
@@ -792,7 +1360,7 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
792
1360
|
React__default.createElement(
|
|
793
1361
|
'style',
|
|
794
1362
|
{ jsx: 'true' },
|
|
795
|
-
'\n .issueCard.card:hover {\n cursor: default;\n }\n .content-category-label {\n margin: 0.5rem 0;\n display: block;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n display: inline;\n width: 100%;\n padding: 5px;\n color: #484848;\n border-radius: 2px;\n }\n .dropdown-toggle {\n min-width: 5rem;\n }\n .dropdown-toggle:empty:after {\n margin-left: 4rem;\n }\n .card-footer {\n background-color: transparent;\n border-top: 0;\n }\n .card-footer a:not(:first-child) {\n margin-left: 1rem;\n }\n '
|
|
1363
|
+
'\n .gatedPdfForm {\n justify-content: center;\n flex-direction: column;\n padding: 0 1.5rem;\n }\n .popoverClose {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n }\n .popoverClose button {\n border: none;\n background: transparent;\n color: #2780e3;\n }\n .card-footer {\n display: flex;\n }\n .card-footer button:not(:first-child) {\n color: #fff;\n margin-left: 1rem;\n }\n .issueCard.card:hover {\n cursor: default;\n }\n .content-category-label {\n margin: 0.5rem 0;\n display: block;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n display: inline;\n width: 100%;\n padding: 5px;\n color: #484848;\n border-radius: 2px;\n }\n .dropdown-toggle {\n min-width: 5rem;\n }\n .dropdown-toggle:empty:after {\n margin-left: 4rem;\n }\n .card-footer {\n background-color: transparent;\n border-top: 0;\n }\n .card-footer a:not(:first-child) {\n margin-left: 1rem;\n }\n '
|
|
796
1364
|
)
|
|
797
1365
|
);
|
|
798
1366
|
};
|