@mjhls/mjh-framework 1.0.588 → 1.0.589
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 +172 -172
- package/dist/cjs/AD.js +9 -10
- package/dist/cjs/AD300x250.js +7 -8
- package/dist/cjs/AD300x250x600.js +7 -8
- package/dist/cjs/AD728x90.js +10 -11
- package/dist/cjs/ADFloatingFooter.js +14 -15
- package/dist/cjs/ADFooter.js +8 -9
- package/dist/cjs/ADGutter.js +11 -12
- package/dist/cjs/{ADInfeed-fdbd80ea.js → ADInfeed-17a378db.js} +9 -11
- package/dist/cjs/ADSkyscraper.js +11 -12
- package/dist/cjs/ADSponsoredResources.js +10 -11
- package/dist/cjs/ADWebcast.js +10 -11
- package/dist/cjs/ADWelcome.js +15 -16
- package/dist/cjs/{ADlgInfeed-ecd2642c.js → ADlgInfeed-070d911c.js} +6 -7
- package/dist/cjs/AccordionPanel.js +22 -24
- package/dist/cjs/AdSlot.js +13 -15
- package/dist/cjs/AdSlotsProvider.js +5 -6
- package/dist/cjs/AlphabeticList.js +15 -16
- package/dist/cjs/ArticleQueue.js +112 -115
- package/dist/cjs/Auth.js +593 -430
- package/dist/cjs/{AuthorComponent-5bb8f868.js → AuthorComponent-cb8b8128.js} +12 -13
- package/dist/cjs/{BlockContent-8b494587.js → BlockContent-f942392e.js} +24 -26
- package/dist/cjs/Breadcrumbs.js +21 -23
- package/dist/cjs/CMEDeck.js +61 -61
- package/dist/cjs/Column1.js +11 -14
- package/dist/cjs/Column2.js +19 -22
- package/dist/cjs/Column3.js +32 -35
- package/dist/cjs/ConferenceArticleCard.js +33 -34
- package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
- package/dist/cjs/DeckContent.js +81 -85
- package/dist/cjs/DeckQueue.js +69 -73
- package/dist/cjs/{Dfp-a06d722a.js → Dfp-fbe32b96.js} +20 -22
- package/dist/cjs/EventsDeck.js +106 -113
- package/dist/cjs/ExternalResources.js +41 -42
- package/dist/cjs/Feature.js +24 -26
- package/dist/cjs/ForbesHero.js +33 -34
- package/dist/cjs/GridContent.js +145 -149
- package/dist/cjs/GridHero.js +34 -35
- package/dist/cjs/GroupDeck.js +37 -38
- package/dist/cjs/HamMagazine.js +113 -118
- package/dist/cjs/Header.js +11 -13
- package/dist/cjs/Hero.js +10 -11
- package/dist/cjs/HighlightenVideo.js +16 -17
- package/dist/cjs/HorizontalHero.js +24 -25
- package/dist/cjs/{InscreenSensor-1f9f7db4.js → InscreenSensor-3aec8492.js} +7 -8
- package/dist/cjs/IssueContentDeck.js +64 -69
- package/dist/cjs/IssueDeck.js +59 -64
- package/dist/cjs/IssueLanding.js +46 -47
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +20 -22
- package/dist/cjs/MasterDeck.js +59 -60
- package/dist/cjs/NavDvm.js +63 -68
- package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
- package/dist/cjs/NavMagazine.js +147 -155
- package/dist/cjs/NavNative.js +103 -111
- package/dist/cjs/NavNormal.js +36 -41
- package/dist/cjs/OncliveHero.js +18 -18
- package/dist/cjs/OncliveLargeHero.js +58 -59
- package/dist/cjs/PageFilter.js +8 -9
- package/dist/cjs/PartnerDetailListing.js +69 -1267
- package/dist/cjs/PdfDownload.js +8 -9
- package/dist/cjs/PopUpModal.js +13 -15
- package/dist/cjs/PublicationDeck.js +58 -63
- package/dist/cjs/PublicationLanding.js +81 -85
- package/dist/cjs/QueueDeckExpanded.js +217 -217
- package/dist/cjs/RelatedContent.js +46 -47
- package/dist/cjs/RelatedTopicsDropdown.js +29 -32
- package/dist/cjs/RolesDeck.js +27 -32
- package/dist/cjs/Search.js +12 -16
- package/dist/cjs/SideFooter.js +23 -24
- package/dist/cjs/SocialIcons.js +9 -10
- package/dist/cjs/{SocialNavFooter-d9ab4d17.js → SocialNavFooter-9a07520f.js} +17 -18
- package/dist/cjs/SocialShare.js +29 -31
- package/dist/cjs/TaxonomyCard.js +54 -59
- package/dist/cjs/TemplateNormal.js +35 -36
- package/dist/cjs/ThumbnailCard.js +17 -19
- package/dist/cjs/Ustream.js +20 -21
- package/dist/cjs/VerticalHero.js +16 -17
- package/dist/cjs/VideoSeriesFilter.js +10 -10
- package/dist/cjs/VideoSeriesListing.js +37 -38
- package/dist/cjs/View.js +161 -166
- package/dist/cjs/YahooHero.js +29 -30
- package/dist/cjs/YoutubeGroup.js +45 -46
- package/dist/cjs/{brightcove-react-player-loader.es-5c98aec7.js → brightcove-react-player-loader.es-156bd4d6.js} +8 -10
- package/dist/cjs/getQuery.js +1 -1
- package/dist/cjs/getRelatedArticle.js +6 -355
- package/dist/cjs/getSerializers.js +271 -270
- package/dist/cjs/{getTargeting-86e68d62.js → getTargeting-b15993cb.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/iconBase-68959171.js +3 -0
- package/dist/cjs/{index-99edf08a.js → index-5be2866f.js} +1 -1
- package/dist/cjs/{index-44481153.js → index-f7ee1612.js} +8 -10
- package/dist/cjs/{index-8a3fb0bc.js → index-fa0fb52c.js} +10 -13
- package/dist/cjs/{index.es-f3e47207.js → index.es-ab3f2690.js} +11 -28
- package/dist/cjs/{index.esm-d02b6c3d.js → index.esm-0e5c6a9e.js} +3 -2
- package/dist/cjs/{index.esm-3b9b8952.js → index.esm-66ffa47a.js} +9 -4
- package/dist/cjs/{index.esm-55da9104.js → index.esm-89fabc47.js} +6 -3
- package/dist/cjs/{index.esm-99553d28.js → index.esm-fbd1f7e9.js} +15 -6
- package/dist/cjs/index.js +33 -32
- package/dist/cjs/{inherits-4a2f1cc3.js → inherits-14962339.js} +4 -4
- package/dist/cjs/{lodash-7fd85bcf.js → lodash-fc2922d0.js} +22 -71
- package/dist/cjs/{main-c50facd7.js → main-bc4db521.js} +43 -48
- package/dist/cjs/{moment-ca3bd9fb.js → moment-66a6a284.js} +8 -10
- package/dist/cjs/{react-social-icons-07939b41.js → react-social-icons-cd0d9d3b.js} +11 -13
- package/dist/cjs/{typeof-583cdc4b.js → typeof-1869832c.js} +1 -1
- package/dist/cjs/urlFor.js +2 -2
- package/dist/cjs/{visibility-sensor-8b54af99.js → visibility-sensor-0c45a583.js} +5 -7
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +5 -5
- package/dist/esm/AD300x250x600.js +5 -5
- package/dist/esm/AD728x90.js +8 -8
- package/dist/esm/ADFloatingFooter.js +12 -12
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +9 -9
- package/dist/esm/{ADInfeed-ed104a2b.js → ADInfeed-c7dba95f.js} +5 -5
- package/dist/esm/ADSkyscraper.js +9 -9
- package/dist/esm/ADSponsoredResources.js +8 -8
- package/dist/esm/ADWebcast.js +8 -8
- package/dist/esm/ADWelcome.js +13 -13
- package/dist/esm/{ADlgInfeed-dfde985e.js → ADlgInfeed-8bfd6d58.js} +4 -4
- package/dist/esm/AccordionPanel.js +17 -17
- package/dist/esm/AdSlot.js +5 -5
- package/dist/esm/AdSlotsProvider.js +3 -3
- package/dist/esm/AlphabeticList.js +13 -13
- package/dist/esm/ArticleQueue.js +97 -97
- package/dist/esm/Auth.js +578 -411
- package/dist/esm/{AuthorComponent-f67cb027.js → AuthorComponent-158226c9.js} +10 -10
- package/dist/esm/{BlockContent-d05b5b23.js → BlockContent-a614acdf.js} +3 -3
- package/dist/esm/Breadcrumbs.js +11 -11
- package/dist/esm/CMEDeck.js +58 -58
- package/dist/esm/Column1.js +5 -5
- package/dist/esm/Column2.js +12 -12
- package/dist/esm/Column3.js +24 -24
- package/dist/esm/ConferenceArticleCard.js +28 -28
- package/dist/esm/{ConferenceBanner-9162d0ca.js → ConferenceBanner-8792ebd2.js} +4 -4
- package/dist/esm/DeckContent.js +61 -61
- package/dist/esm/DeckQueue.js +46 -46
- package/dist/esm/{Dfp-0557840a.js → Dfp-ae9336e2.js} +10 -10
- package/dist/esm/EventsDeck.js +64 -64
- package/dist/esm/ExternalResources.js +35 -35
- package/dist/esm/Feature.js +16 -16
- package/dist/esm/ForbesHero.js +27 -27
- package/dist/esm/GridContent.js +106 -106
- package/dist/esm/GridHero.js +28 -28
- package/dist/esm/GroupDeck.js +33 -33
- package/dist/esm/HamMagazine.js +86 -86
- package/dist/esm/Header.js +7 -7
- package/dist/esm/Hero.js +6 -6
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalHero.js +20 -20
- package/dist/esm/{InscreenSensor-3e1fe82a.js → InscreenSensor-280b2b10.js} +5 -5
- package/dist/esm/IssueContentDeck.js +40 -40
- package/dist/esm/IssueDeck.js +33 -33
- package/dist/esm/IssueLanding.js +44 -44
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +16 -16
- package/dist/esm/MasterDeck.js +53 -53
- package/dist/esm/NavDvm.js +43 -43
- package/dist/esm/{NavFooter-c29526b7.js → NavFooter-e27bd93b.js} +12 -12
- package/dist/esm/NavMagazine.js +114 -114
- package/dist/esm/NavNative.js +78 -78
- package/dist/esm/NavNormal.js +21 -21
- package/dist/esm/OncliveHero.js +14 -13
- package/dist/esm/OncliveLargeHero.js +51 -51
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +65 -1261
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +8 -8
- package/dist/esm/PublicationDeck.js +34 -34
- package/dist/esm/PublicationLanding.js +61 -61
- package/dist/esm/QueueDeckExpanded.js +197 -197
- package/dist/esm/RelatedContent.js +42 -42
- package/dist/esm/RelatedTopicsDropdown.js +21 -21
- package/dist/esm/RolesDeck.js +13 -13
- package/dist/esm/Search.js +5 -5
- package/dist/esm/SideFooter.js +21 -21
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialNavFooter-1a531144.js → SocialNavFooter-4fb16720.js} +15 -15
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +35 -35
- package/dist/esm/TemplateNormal.js +29 -29
- package/dist/esm/ThumbnailCard.js +9 -9
- package/dist/esm/Ustream.js +18 -18
- package/dist/esm/VerticalHero.js +12 -12
- package/dist/esm/VideoSeriesFilter.js +7 -7
- package/dist/esm/VideoSeriesListing.js +32 -32
- package/dist/esm/View.js +140 -140
- package/dist/esm/YahooHero.js +24 -24
- package/dist/esm/YoutubeGroup.js +36 -36
- package/dist/esm/{brightcove-react-player-loader.es-4abff0b1.js → brightcove-react-player-loader.es-83f53e4e.js} +6 -7
- package/dist/esm/getQuery.js +1 -1
- package/dist/esm/getRelatedArticle.js +6 -355
- package/dist/esm/getSerializers.js +228 -221
- package/dist/esm/{getTargeting-1f2c61e3.js → getTargeting-1a0bd08d.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/{index-c5fd0af5.js → index-5f9f807a.js} +4 -4
- package/dist/esm/{index-1819118a.js → index-93ec3c59.js} +3 -3
- package/dist/esm/{index-fa2ffe86.js → index-d2f90501.js} +1 -1
- package/dist/esm/{index.es-c6222053.js → index.es-938a3a58.js} +9 -25
- package/dist/esm/{index.esm-cc28490f.js → index.esm-16536e81.js} +3 -2
- package/dist/esm/{index.esm-116f3274.js → index.esm-4b1d94b7.js} +15 -6
- package/dist/esm/{index.esm-16e9450c.js → index.esm-9a4c8813.js} +6 -3
- package/dist/esm/{index.esm-d6f88d94.js → index.esm-b08f4b04.js} +9 -4
- package/dist/esm/index.js +28 -27
- package/dist/esm/{inherits-2758cc14.js → inherits-b8e4c697.js} +1 -1
- package/dist/esm/{lodash-ec8c6b48.js → lodash-17fdfebb.js} +22 -71
- package/dist/esm/{main-b722e2e2.js → main-7255814e.js} +44 -48
- package/dist/esm/{moment-b6f49411.js → moment-12415288.js} +8 -10
- package/dist/esm/{react-social-icons-3822f1ce.js → react-social-icons-a7d5c5c7.js} +5 -5
- package/dist/esm/{typeof-7e72fee0.js → typeof-5f046efd.js} +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{visibility-sensor-082c757b.js → visibility-sensor-0baa4eea.js} +2 -2
- package/package.json +107 -107
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/esm/index-db3bb315.js +0 -207
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import './_to-object-16fd8b46.js';
|
|
3
3
|
import './core.get-iterator-method-f5c0d66a.js';
|
|
4
4
|
import './_library-528f1934.js';
|
|
@@ -8,24 +8,24 @@ import './toConsumableArray-8712d678.js';
|
|
|
8
8
|
import './_object-pie-33c40e79.js';
|
|
9
9
|
import { _ as _extends } from './extends-6e00b262.js';
|
|
10
10
|
import './web.dom.iterable-46c95e52.js';
|
|
11
|
-
import './typeof-
|
|
11
|
+
import './typeof-5f046efd.js';
|
|
12
12
|
import './_is-array-dd5523d6.js';
|
|
13
|
-
import
|
|
14
|
-
import './index-
|
|
15
|
-
import
|
|
13
|
+
import React__default from 'react';
|
|
14
|
+
import './index-93ec3c59.js';
|
|
15
|
+
import 'prop-types';
|
|
16
16
|
import 'react-bootstrap/Row';
|
|
17
17
|
import 'react-bootstrap/Col';
|
|
18
18
|
import 'react-bootstrap/Card';
|
|
19
|
-
import { m as moment } from './moment-
|
|
19
|
+
import { m as moment } from './moment-12415288.js';
|
|
20
20
|
import 'next/router';
|
|
21
21
|
import './isSymbol-b7b7434f.js';
|
|
22
22
|
import './debounce-048d9cb6.js';
|
|
23
|
-
import './index.es-
|
|
23
|
+
import './index.es-938a3a58.js';
|
|
24
24
|
import 'react-dom';
|
|
25
|
-
import './visibility-sensor-
|
|
25
|
+
import './visibility-sensor-0baa4eea.js';
|
|
26
26
|
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
27
|
-
import './index-
|
|
28
|
-
import './main-
|
|
27
|
+
import './index-5f9f807a.js';
|
|
28
|
+
import './main-7255814e.js';
|
|
29
29
|
import './entities-7cc3bf45.js';
|
|
30
30
|
import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
|
|
31
31
|
import './stringify-e30bc114.js';
|
|
@@ -33,11 +33,11 @@ import { a as _asyncToGenerator, r as regenerator, _ as _Promise } from './async
|
|
|
33
33
|
import './_set-species-6f64f1c1.js';
|
|
34
34
|
import './beam-a25bd8fd.js';
|
|
35
35
|
import './AdSlot.js';
|
|
36
|
-
import './ADInfeed-
|
|
37
|
-
import './lodash-
|
|
38
|
-
import './ADlgInfeed-
|
|
39
|
-
import './AuthorComponent-
|
|
40
|
-
import { B as BlockContent } from './BlockContent-
|
|
36
|
+
import './ADInfeed-c7dba95f.js';
|
|
37
|
+
import './lodash-17fdfebb.js';
|
|
38
|
+
import './ADlgInfeed-8bfd6d58.js';
|
|
39
|
+
import './AuthorComponent-158226c9.js';
|
|
40
|
+
import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
41
41
|
import './smoothscroll-4b699764.js';
|
|
42
42
|
import './GroupDeck.js';
|
|
43
43
|
import 'react-bootstrap';
|
|
@@ -45,1210 +45,14 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
|
45
45
|
import 'react-bootstrap/Button';
|
|
46
46
|
import getSerializers from './getSerializers.js';
|
|
47
47
|
import './util-7700fc59.js';
|
|
48
|
-
import './brightcove-react-player-loader.es-
|
|
48
|
+
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
49
49
|
import 'react-bootstrap/Pagination';
|
|
50
50
|
import 'react-bootstrap/Carousel';
|
|
51
51
|
import Feature from './Feature.js';
|
|
52
52
|
import 'react-bootstrap/Breadcrumb';
|
|
53
53
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
54
54
|
import urlFor from './urlFor.js';
|
|
55
|
-
|
|
56
|
-
function _classCallCheck(instance, Constructor) {
|
|
57
|
-
if (!(instance instanceof Constructor)) {
|
|
58
|
-
throw new TypeError("Cannot call a class as a function");
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _defineProperties(target, props) {
|
|
63
|
-
for (var i = 0; i < props.length; i++) {
|
|
64
|
-
var descriptor = props[i];
|
|
65
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
66
|
-
descriptor.configurable = true;
|
|
67
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
68
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
73
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
74
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
75
|
-
return Constructor;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _typeof(obj) {
|
|
79
|
-
"@babel/helpers - typeof";
|
|
80
|
-
|
|
81
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
82
|
-
_typeof = function _typeof(obj) {
|
|
83
|
-
return typeof obj;
|
|
84
|
-
};
|
|
85
|
-
} else {
|
|
86
|
-
_typeof = function _typeof(obj) {
|
|
87
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return _typeof(obj);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _assertThisInitialized(self) {
|
|
95
|
-
if (self === void 0) {
|
|
96
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return self;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _possibleConstructorReturn(self, call) {
|
|
103
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
104
|
-
return call;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return _assertThisInitialized(self);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function _getPrototypeOf(o) {
|
|
111
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
112
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
113
|
-
};
|
|
114
|
-
return _getPrototypeOf(o);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function _setPrototypeOf(o, p) {
|
|
118
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
119
|
-
o.__proto__ = p;
|
|
120
|
-
return o;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
return _setPrototypeOf(o, p);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function _inherits(subClass, superClass) {
|
|
127
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
128
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
132
|
-
constructor: {
|
|
133
|
-
value: subClass,
|
|
134
|
-
writable: true,
|
|
135
|
-
configurable: true
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function _defineProperty(obj, key, value) {
|
|
142
|
-
if (key in obj) {
|
|
143
|
-
Object.defineProperty(obj, key, {
|
|
144
|
-
value: value,
|
|
145
|
-
enumerable: true,
|
|
146
|
-
configurable: true,
|
|
147
|
-
writable: true
|
|
148
|
-
});
|
|
149
|
-
} else {
|
|
150
|
-
obj[key] = value;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return obj;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
var isRequiredIf_1 = createCommonjsModule(function (module, exports) {
|
|
157
|
-
Object.defineProperty(exports,'__esModule',{value:!0});var VALIDATOR_ARG_ERROR_MESSAGE='The typeValidator argument must be a function with the signature function(props, propName, componentName).',MESSAGE_ARG_ERROR_MESSAGE='The error message is optional, but must be a string if provided.',propIsRequired=function propIsRequired(a,b,c,d){if('boolean'==typeof a)return a;return 'function'==typeof a?a(b,c,d):!(!0!==!!a)&&!!a},propExists=function propExists(a,b){return Object.hasOwnProperty.call(a,b)},missingPropError=function missingPropError(a,b,c,d){return d?new Error(d):new Error('Required '+a[b]+' `'+b+'`'+(' was not specified in `'+c+'`.'))},guardAgainstInvalidArgTypes=function guardAgainstInvalidArgTypes(a,b){if('function'!=typeof a)throw new TypeError(VALIDATOR_ARG_ERROR_MESSAGE);if(!!b&&'string'!=typeof b)throw new TypeError(MESSAGE_ARG_ERROR_MESSAGE)},isRequiredIf=function isRequiredIf(a,b,c){return guardAgainstInvalidArgTypes(a,c),function(d,e,f){for(var _len=arguments.length,g=Array(3<_len?_len-3:0),_key=3;_key<_len;_key++)g[_key-3]=arguments[_key];return propIsRequired(b,d,e,f)?propExists(d,e)?a.apply(void 0,[d,e,f].concat(g)):missingPropError(d,e,f,c):a.apply(void 0,[d,e,f].concat(g));// Is not required, so just run typeValidator.
|
|
158
|
-
}};exports.default=isRequiredIf;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
var isRequiredIf = unwrapExports(isRequiredIf_1);
|
|
164
|
-
|
|
165
|
-
var exenv = createCommonjsModule(function (module) {
|
|
166
|
-
/*!
|
|
167
|
-
Copyright (c) 2015 Jed Watson.
|
|
168
|
-
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
169
|
-
All rights reserved.
|
|
170
|
-
*/
|
|
171
|
-
/* global define */
|
|
172
|
-
|
|
173
|
-
(function () {
|
|
174
|
-
|
|
175
|
-
var canUseDOM = !!(
|
|
176
|
-
typeof window !== 'undefined' &&
|
|
177
|
-
window.document &&
|
|
178
|
-
window.document.createElement
|
|
179
|
-
);
|
|
180
|
-
|
|
181
|
-
var ExecutionEnvironment = {
|
|
182
|
-
|
|
183
|
-
canUseDOM: canUseDOM,
|
|
184
|
-
|
|
185
|
-
canUseWorkers: typeof Worker !== 'undefined',
|
|
186
|
-
|
|
187
|
-
canUseEventListeners:
|
|
188
|
-
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
|
189
|
-
|
|
190
|
-
canUseViewport: canUseDOM && !!window.screen
|
|
191
|
-
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
if ( module.exports) {
|
|
195
|
-
module.exports = ExecutionEnvironment;
|
|
196
|
-
} else {
|
|
197
|
-
window.ExecutionEnvironment = ExecutionEnvironment;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
}());
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
var twitterWidgetJs = 'https://platform.twitter.com/widgets.js';
|
|
204
|
-
|
|
205
|
-
var TwitterTimelineEmbed =
|
|
206
|
-
/*#__PURE__*/
|
|
207
|
-
function (_Component) {
|
|
208
|
-
_inherits(TwitterTimelineEmbed, _Component);
|
|
209
|
-
|
|
210
|
-
function TwitterTimelineEmbed(props) {
|
|
211
|
-
var _this;
|
|
212
|
-
|
|
213
|
-
_classCallCheck(this, TwitterTimelineEmbed);
|
|
214
|
-
|
|
215
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTimelineEmbed).call(this, props));
|
|
216
|
-
_this.state = {
|
|
217
|
-
isLoading: true
|
|
218
|
-
};
|
|
219
|
-
return _this;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
_createClass(TwitterTimelineEmbed, [{
|
|
223
|
-
key: "buildChromeOptions",
|
|
224
|
-
value: function buildChromeOptions(options) {
|
|
225
|
-
options.chrome = '';
|
|
226
|
-
|
|
227
|
-
if (this.props.noHeader) {
|
|
228
|
-
options.chrome = options.chrome + ' noheader';
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (this.props.noFooter) {
|
|
232
|
-
options.chrome = options.chrome + ' nofooter';
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (this.props.noBorders) {
|
|
236
|
-
options.chrome = options.chrome + ' noborders';
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
if (this.props.noScrollbar) {
|
|
240
|
-
options.chrome = options.chrome + ' noscrollbar';
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
if (this.props.transparent) {
|
|
244
|
-
options.chrome = options.chrome + ' transparent';
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
return options;
|
|
248
|
-
}
|
|
249
|
-
}, {
|
|
250
|
-
key: "buildOptions",
|
|
251
|
-
value: function buildOptions() {
|
|
252
|
-
var options = Object.assign({}, this.props.options);
|
|
253
|
-
|
|
254
|
-
if (this.props.autoHeight) {
|
|
255
|
-
options.height = this.refs.embedContainer.parentNode.offsetHeight;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
options = Object.assign({}, options, {
|
|
259
|
-
theme: this.props.theme,
|
|
260
|
-
linkColor: this.props.linkColor,
|
|
261
|
-
borderColor: this.props.borderColor,
|
|
262
|
-
lang: this.props.lang
|
|
263
|
-
});
|
|
264
|
-
return options;
|
|
265
|
-
}
|
|
266
|
-
}, {
|
|
267
|
-
key: "renderWidget",
|
|
268
|
-
value: function renderWidget(options) {
|
|
269
|
-
var _this2 = this;
|
|
270
|
-
|
|
271
|
-
var onLoad = this.props.onLoad;
|
|
272
|
-
|
|
273
|
-
if (!this.isMountCanceled) {
|
|
274
|
-
window.twttr.widgets.createTimeline({
|
|
275
|
-
sourceType: this.props.sourceType,
|
|
276
|
-
screenName: this.props.screenName,
|
|
277
|
-
userId: this.props.userId,
|
|
278
|
-
ownerScreenName: this.props.ownerScreenName,
|
|
279
|
-
slug: this.props.slug,
|
|
280
|
-
id: this.props.id || this.props.widgetId,
|
|
281
|
-
url: this.props.url
|
|
282
|
-
}, this.refs.embedContainer, options).then(function (element) {
|
|
283
|
-
_this2.setState({
|
|
284
|
-
isLoading: false
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
if (onLoad) {
|
|
288
|
-
onLoad(element);
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}, {
|
|
294
|
-
key: "componentDidMount",
|
|
295
|
-
value: function componentDidMount() {
|
|
296
|
-
var _this3 = this;
|
|
297
|
-
|
|
298
|
-
if (exenv.canUseDOM) {
|
|
299
|
-
var script = require('scriptjs');
|
|
300
|
-
|
|
301
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
302
|
-
if (!window.twttr) {
|
|
303
|
-
console.error('Failure to load window.twttr in TwitterTimelineEmbed, aborting load.');
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
var options = _this3.buildOptions();
|
|
308
|
-
/** Append chrome options */
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
options = _this3.buildChromeOptions(options);
|
|
312
|
-
|
|
313
|
-
_this3.renderWidget(options);
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}, {
|
|
318
|
-
key: "componentWillUnmount",
|
|
319
|
-
value: function componentWillUnmount() {
|
|
320
|
-
this.isMountCanceled = true;
|
|
321
|
-
}
|
|
322
|
-
}, {
|
|
323
|
-
key: "render",
|
|
324
|
-
value: function render() {
|
|
325
|
-
var isLoading = this.state.isLoading;
|
|
326
|
-
var placeholder = this.props.placeholder;
|
|
327
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
328
|
-
ref: "embedContainer"
|
|
329
|
-
}));
|
|
330
|
-
}
|
|
331
|
-
}]);
|
|
332
|
-
|
|
333
|
-
return TwitterTimelineEmbed;
|
|
334
|
-
}(Component);
|
|
335
|
-
|
|
336
|
-
_defineProperty(TwitterTimelineEmbed, "propTypes", {
|
|
337
|
-
/**
|
|
338
|
-
* This can be either of profile, likes, list, collection, URL, widget
|
|
339
|
-
*/
|
|
340
|
-
sourceType: PropTypes.oneOf(['profile', 'likes', 'list', 'collection', 'url', 'widget']).isRequired,
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* username of twitter handle as String
|
|
344
|
-
*/
|
|
345
|
-
screenName: isRequiredIf(PropTypes.string, function (props) {
|
|
346
|
-
return !props.hasOwnProperty('userId') && (props.sourceType === 'profile' || props.sourceType === 'likes');
|
|
347
|
-
}),
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* UserId of twitter handle as number
|
|
351
|
-
*/
|
|
352
|
-
userId: isRequiredIf(PropTypes.number, function (props) {
|
|
353
|
-
return !props.hasOwnProperty('screenName') && (props.sourceType === 'profile' || props.sourceType === 'likes');
|
|
354
|
-
}),
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* To show list, used along with slug
|
|
358
|
-
*/
|
|
359
|
-
ownerScreenName: isRequiredIf(PropTypes.string, function (props) {
|
|
360
|
-
return props.sourceType === 'list' && !props.hasOwnProperty('id');
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* To show list, used along with ownerScreenName
|
|
365
|
-
*/
|
|
366
|
-
slug: isRequiredIf(PropTypes.string, function (props) {
|
|
367
|
-
return props.sourceType === 'list' && !props.hasOwnProperty('id');
|
|
368
|
-
}),
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* To show list, unique list id
|
|
372
|
-
* Also used with collections, in that case its valid collection id
|
|
373
|
-
*/
|
|
374
|
-
id: isRequiredIf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]), function (props) {
|
|
375
|
-
return props.sourceType === 'list' && !props.hasOwnProperty('ownerScreenName') && !props.hasOwnProperty('slug') || props.sourceType === 'collection';
|
|
376
|
-
}),
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* To show twitter content with url.
|
|
380
|
-
* Supported content includes profiles, likes, lists, and collections.
|
|
381
|
-
*/
|
|
382
|
-
url: isRequiredIf(PropTypes.string, function (props) {
|
|
383
|
-
return props.sourceType === 'url';
|
|
384
|
-
}),
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* To show custom widget
|
|
388
|
-
*/
|
|
389
|
-
widgetId: isRequiredIf(PropTypes.string, function (props) {
|
|
390
|
-
return props.sourceType === 'widget';
|
|
391
|
-
}),
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* Additional options to pass to twitter widget plugin
|
|
395
|
-
*/
|
|
396
|
-
options: PropTypes.object,
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* Automatically fit into parent container height
|
|
400
|
-
*/
|
|
401
|
-
autoHeight: PropTypes.bool,
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* With dark or light theme
|
|
405
|
-
*/
|
|
406
|
-
theme: PropTypes.oneOf(['dark', 'light']),
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* With custom link colors. Note: Only Hex colors are supported.
|
|
410
|
-
*/
|
|
411
|
-
linkColor: PropTypes.string,
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* With custom border colors. Note: Only Hex colors are supported.
|
|
415
|
-
*/
|
|
416
|
-
borderColor: PropTypes.string,
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Hide the header from timeline
|
|
420
|
-
*/
|
|
421
|
-
noHeader: PropTypes.bool,
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* Hide the footer from timeline
|
|
425
|
-
*/
|
|
426
|
-
noFooter: PropTypes.bool,
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Hide the border from timeline
|
|
430
|
-
*/
|
|
431
|
-
noBorders: PropTypes.bool,
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Hide the scrollbars
|
|
435
|
-
*/
|
|
436
|
-
noScrollbar: PropTypes.bool,
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Enable Transparancy
|
|
440
|
-
*/
|
|
441
|
-
transparent: PropTypes.bool,
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Custom language code. Supported codes here: https://developer.twitter.com/en/docs/twitter-for-websites/twitter-for-websites-supported-languages/overview.html
|
|
445
|
-
*/
|
|
446
|
-
lang: PropTypes.string,
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Placeholder while tweet is loading
|
|
450
|
-
*/
|
|
451
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Function to execute after load, return html element
|
|
455
|
-
*/
|
|
456
|
-
onLoad: PropTypes.func
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
var TwitterShareButton =
|
|
460
|
-
/*#__PURE__*/
|
|
461
|
-
function (_Component) {
|
|
462
|
-
_inherits(TwitterShareButton, _Component);
|
|
463
|
-
|
|
464
|
-
function TwitterShareButton(props) {
|
|
465
|
-
var _this;
|
|
466
|
-
|
|
467
|
-
_classCallCheck(this, TwitterShareButton);
|
|
468
|
-
|
|
469
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterShareButton).call(this, props));
|
|
470
|
-
_this.state = {
|
|
471
|
-
isLoading: true
|
|
472
|
-
};
|
|
473
|
-
return _this;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
_createClass(TwitterShareButton, [{
|
|
477
|
-
key: "componentDidMount",
|
|
478
|
-
value: function componentDidMount() {
|
|
479
|
-
var _this2 = this;
|
|
480
|
-
|
|
481
|
-
var onLoad = this.props.onLoad;
|
|
482
|
-
|
|
483
|
-
if (exenv.canUseDOM) {
|
|
484
|
-
var script = require('scriptjs');
|
|
485
|
-
|
|
486
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
487
|
-
if (!window.twttr) {
|
|
488
|
-
console.error('Failure to load window.twttr in TwitterShareButton, aborting load.');
|
|
489
|
-
return;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
if (!_this2.isMountCanceled) {
|
|
493
|
-
window.twttr.widgets.createShareButton(_this2.props.url, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
494
|
-
_this2.setState({
|
|
495
|
-
isLoading: false
|
|
496
|
-
});
|
|
497
|
-
|
|
498
|
-
if (onLoad) {
|
|
499
|
-
onLoad(element);
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}, {
|
|
507
|
-
key: "componentWillUnmount",
|
|
508
|
-
value: function componentWillUnmount() {
|
|
509
|
-
this.isMountCanceled = true;
|
|
510
|
-
}
|
|
511
|
-
}, {
|
|
512
|
-
key: "render",
|
|
513
|
-
value: function render() {
|
|
514
|
-
var isLoading = this.state.isLoading;
|
|
515
|
-
var placeholder = this.props.placeholder;
|
|
516
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
517
|
-
ref: "embedContainer"
|
|
518
|
-
}));
|
|
519
|
-
}
|
|
520
|
-
}]);
|
|
521
|
-
|
|
522
|
-
return TwitterShareButton;
|
|
523
|
-
}(Component);
|
|
524
|
-
|
|
525
|
-
_defineProperty(TwitterShareButton, "propTypes", {
|
|
526
|
-
/**
|
|
527
|
-
* Url for sharing
|
|
528
|
-
*/
|
|
529
|
-
url: PropTypes.string.isRequired,
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* Additional options for overriding config. Details at : https://dev.twitter.com/web/tweet-button/parameters
|
|
533
|
-
*/
|
|
534
|
-
options: PropTypes.object,
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Placeholder while tweet is loading
|
|
538
|
-
*/
|
|
539
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Function to execute after load, return html element
|
|
543
|
-
*/
|
|
544
|
-
onLoad: PropTypes.func
|
|
545
|
-
});
|
|
546
|
-
|
|
547
|
-
var TwitterFollowButton =
|
|
548
|
-
/*#__PURE__*/
|
|
549
|
-
function (_Component) {
|
|
550
|
-
_inherits(TwitterFollowButton, _Component);
|
|
551
|
-
|
|
552
|
-
function TwitterFollowButton(props) {
|
|
553
|
-
var _this;
|
|
554
|
-
|
|
555
|
-
_classCallCheck(this, TwitterFollowButton);
|
|
556
|
-
|
|
557
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterFollowButton).call(this, props));
|
|
558
|
-
_this.state = {
|
|
559
|
-
isLoading: true
|
|
560
|
-
};
|
|
561
|
-
return _this;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
_createClass(TwitterFollowButton, [{
|
|
565
|
-
key: "componentDidMount",
|
|
566
|
-
value: function componentDidMount() {
|
|
567
|
-
var _this2 = this;
|
|
568
|
-
|
|
569
|
-
var onLoad = this.props.onLoad;
|
|
570
|
-
|
|
571
|
-
if (exenv.canUseDOM) {
|
|
572
|
-
var script = require('scriptjs');
|
|
573
|
-
|
|
574
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
575
|
-
if (!window.twttr) {
|
|
576
|
-
console.error('Failure to load window.twttr in TwitterFollowButton, aborting load.');
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (!_this2.isMountCanceled) {
|
|
581
|
-
window.twttr.widgets.createFollowButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
582
|
-
_this2.setState({
|
|
583
|
-
isLoading: false
|
|
584
|
-
});
|
|
585
|
-
|
|
586
|
-
if (onLoad) {
|
|
587
|
-
onLoad(element);
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}, {
|
|
595
|
-
key: "componentWillUnmount",
|
|
596
|
-
value: function componentWillUnmount() {
|
|
597
|
-
this.isMountCanceled = true;
|
|
598
|
-
}
|
|
599
|
-
}, {
|
|
600
|
-
key: "render",
|
|
601
|
-
value: function render() {
|
|
602
|
-
var isLoading = this.state.isLoading;
|
|
603
|
-
var placeholder = this.props.placeholder;
|
|
604
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
605
|
-
ref: "embedContainer"
|
|
606
|
-
}));
|
|
607
|
-
}
|
|
608
|
-
}]);
|
|
609
|
-
|
|
610
|
-
return TwitterFollowButton;
|
|
611
|
-
}(Component);
|
|
612
|
-
|
|
613
|
-
_defineProperty(TwitterFollowButton, "propTypes", {
|
|
614
|
-
/**
|
|
615
|
-
* Username of twitter user which will be followed on click
|
|
616
|
-
*/
|
|
617
|
-
screenName: PropTypes.string.isRequired,
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* Additional options to be added to the button
|
|
621
|
-
*/
|
|
622
|
-
options: PropTypes.object,
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* Placeholder while tweet is loading
|
|
626
|
-
*/
|
|
627
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* Function to execute after load, return html element
|
|
631
|
-
*/
|
|
632
|
-
onLoad: PropTypes.func
|
|
633
|
-
});
|
|
634
|
-
|
|
635
|
-
var TwitterHashtagButton =
|
|
636
|
-
/*#__PURE__*/
|
|
637
|
-
function (_Component) {
|
|
638
|
-
_inherits(TwitterHashtagButton, _Component);
|
|
639
|
-
|
|
640
|
-
function TwitterHashtagButton(props) {
|
|
641
|
-
var _this;
|
|
642
|
-
|
|
643
|
-
_classCallCheck(this, TwitterHashtagButton);
|
|
644
|
-
|
|
645
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterHashtagButton).call(this, props));
|
|
646
|
-
_this.state = {
|
|
647
|
-
isLoading: true
|
|
648
|
-
};
|
|
649
|
-
return _this;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
_createClass(TwitterHashtagButton, [{
|
|
653
|
-
key: "componentDidMount",
|
|
654
|
-
value: function componentDidMount() {
|
|
655
|
-
var _this2 = this;
|
|
656
|
-
|
|
657
|
-
var onLoad = this.props.onLoad;
|
|
658
|
-
|
|
659
|
-
if (exenv.canUseDOM) {
|
|
660
|
-
var script = require('scriptjs');
|
|
661
|
-
|
|
662
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
663
|
-
if (!window.twttr) {
|
|
664
|
-
console.error('Failure to load window.twttr in TwitterHashtagButton, aborting load.');
|
|
665
|
-
return;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
if (!_this2.isMountCanceled) {
|
|
669
|
-
window.twttr.widgets.createHashtagButton(_this2.props.tag, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
670
|
-
_this2.setState({
|
|
671
|
-
isLoading: false
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
if (onLoad) {
|
|
675
|
-
onLoad(element);
|
|
676
|
-
}
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}, {
|
|
683
|
-
key: "componentWillUnmount",
|
|
684
|
-
value: function componentWillUnmount() {
|
|
685
|
-
this.isMountCanceled = true;
|
|
686
|
-
}
|
|
687
|
-
}, {
|
|
688
|
-
key: "render",
|
|
689
|
-
value: function render() {
|
|
690
|
-
var isLoading = this.state.isLoading;
|
|
691
|
-
var placeholder = this.props.placeholder;
|
|
692
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
693
|
-
ref: "embedContainer"
|
|
694
|
-
}));
|
|
695
|
-
}
|
|
696
|
-
}]);
|
|
697
|
-
|
|
698
|
-
return TwitterHashtagButton;
|
|
699
|
-
}(Component);
|
|
700
|
-
|
|
701
|
-
_defineProperty(TwitterHashtagButton, "propTypes", {
|
|
702
|
-
/**
|
|
703
|
-
* Tag name for hashtag button
|
|
704
|
-
*/
|
|
705
|
-
tag: PropTypes.string.isRequired,
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Additional options to be added to the button
|
|
709
|
-
*/
|
|
710
|
-
options: PropTypes.object,
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Placeholder while tweet is loading
|
|
714
|
-
*/
|
|
715
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* Function to execute after load, return html element
|
|
719
|
-
*/
|
|
720
|
-
onLoad: PropTypes.func
|
|
721
|
-
});
|
|
722
|
-
|
|
723
|
-
var TwitterMentionButton =
|
|
724
|
-
/*#__PURE__*/
|
|
725
|
-
function (_Component) {
|
|
726
|
-
_inherits(TwitterMentionButton, _Component);
|
|
727
|
-
|
|
728
|
-
function TwitterMentionButton(props) {
|
|
729
|
-
var _this;
|
|
730
|
-
|
|
731
|
-
_classCallCheck(this, TwitterMentionButton);
|
|
732
|
-
|
|
733
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMentionButton).call(this, props));
|
|
734
|
-
_this.state = {
|
|
735
|
-
isLoading: true
|
|
736
|
-
};
|
|
737
|
-
return _this;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
_createClass(TwitterMentionButton, [{
|
|
741
|
-
key: "componentDidMount",
|
|
742
|
-
value: function componentDidMount() {
|
|
743
|
-
var _this2 = this;
|
|
744
|
-
|
|
745
|
-
var onLoad = this.props.onLoad;
|
|
746
|
-
|
|
747
|
-
if (exenv.canUseDOM) {
|
|
748
|
-
var script = require('scriptjs');
|
|
749
|
-
|
|
750
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
751
|
-
if (!window.twttr) {
|
|
752
|
-
console.error('Failure to load window.twttr in TwitterMentionButton, aborting load.');
|
|
753
|
-
return;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
if (!_this2.isMountCanceled) {
|
|
757
|
-
window.twttr.widgets.createMentionButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
758
|
-
_this2.setState({
|
|
759
|
-
isLoading: false
|
|
760
|
-
});
|
|
761
|
-
|
|
762
|
-
if (onLoad) {
|
|
763
|
-
onLoad(element);
|
|
764
|
-
}
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}, {
|
|
771
|
-
key: "componentWillUnmount",
|
|
772
|
-
value: function componentWillUnmount() {
|
|
773
|
-
this.isMountCanceled = true;
|
|
774
|
-
}
|
|
775
|
-
}, {
|
|
776
|
-
key: "render",
|
|
777
|
-
value: function render() {
|
|
778
|
-
var isLoading = this.state.isLoading;
|
|
779
|
-
var placeholder = this.props.placeholder;
|
|
780
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
781
|
-
ref: "embedContainer"
|
|
782
|
-
}));
|
|
783
|
-
}
|
|
784
|
-
}]);
|
|
785
|
-
|
|
786
|
-
return TwitterMentionButton;
|
|
787
|
-
}(Component);
|
|
788
|
-
|
|
789
|
-
_defineProperty(TwitterMentionButton, "propTypes", {
|
|
790
|
-
/**
|
|
791
|
-
* Username to which you will need to tweet
|
|
792
|
-
*/
|
|
793
|
-
screenName: PropTypes.string.isRequired,
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* Additional options for overriding config.
|
|
797
|
-
*/
|
|
798
|
-
options: PropTypes.object,
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* Placeholder while tweet is loading
|
|
802
|
-
*/
|
|
803
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* Function to execute after load, return html element
|
|
807
|
-
*/
|
|
808
|
-
onLoad: PropTypes.func
|
|
809
|
-
});
|
|
810
|
-
|
|
811
|
-
var TwitterTweetEmbed =
|
|
812
|
-
/*#__PURE__*/
|
|
813
|
-
function (_Component) {
|
|
814
|
-
_inherits(TwitterTweetEmbed, _Component);
|
|
815
|
-
|
|
816
|
-
function TwitterTweetEmbed(props) {
|
|
817
|
-
var _this;
|
|
818
|
-
|
|
819
|
-
_classCallCheck(this, TwitterTweetEmbed);
|
|
820
|
-
|
|
821
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTweetEmbed).call(this, props));
|
|
822
|
-
_this.state = {
|
|
823
|
-
isLoading: true
|
|
824
|
-
};
|
|
825
|
-
return _this;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
_createClass(TwitterTweetEmbed, [{
|
|
829
|
-
key: "renderWidget",
|
|
830
|
-
value: function renderWidget() {
|
|
831
|
-
var _this2 = this;
|
|
832
|
-
|
|
833
|
-
var onLoad = this.props.onLoad;
|
|
834
|
-
|
|
835
|
-
if (!window.twttr) {
|
|
836
|
-
console.error('Failure to load window.twttr in TwitterTweetEmbed, aborting load.');
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
if (!this.isMountCanceled) {
|
|
841
|
-
window.twttr.widgets.createTweet(this.props.tweetId, this.refs.embedContainer, this.props.options).then(function (element) {
|
|
842
|
-
_this2.setState({
|
|
843
|
-
isLoading: false
|
|
844
|
-
});
|
|
845
|
-
|
|
846
|
-
if (onLoad) {
|
|
847
|
-
onLoad(element);
|
|
848
|
-
}
|
|
849
|
-
});
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
}, {
|
|
853
|
-
key: "componentDidMount",
|
|
854
|
-
value: function componentDidMount() {
|
|
855
|
-
var _this3 = this;
|
|
856
|
-
|
|
857
|
-
if (exenv.canUseDOM) {
|
|
858
|
-
var script = require('scriptjs');
|
|
859
|
-
|
|
860
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
861
|
-
_this3.renderWidget();
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
}, {
|
|
866
|
-
key: "componentWillUnmount",
|
|
867
|
-
value: function componentWillUnmount() {
|
|
868
|
-
this.isMountCanceled = true;
|
|
869
|
-
}
|
|
870
|
-
}, {
|
|
871
|
-
key: "render",
|
|
872
|
-
value: function render() {
|
|
873
|
-
var isLoading = this.state.isLoading;
|
|
874
|
-
var placeholder = this.props.placeholder;
|
|
875
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
876
|
-
ref: "embedContainer"
|
|
877
|
-
}));
|
|
878
|
-
}
|
|
879
|
-
}]);
|
|
880
|
-
|
|
881
|
-
return TwitterTweetEmbed;
|
|
882
|
-
}(Component);
|
|
883
|
-
|
|
884
|
-
_defineProperty(TwitterTweetEmbed, "propTypes", {
|
|
885
|
-
/**
|
|
886
|
-
* Tweet id that needs to be shown
|
|
887
|
-
*/
|
|
888
|
-
tweetId: PropTypes.string.isRequired,
|
|
889
|
-
|
|
890
|
-
/**
|
|
891
|
-
* Additional options to pass to twitter widget plugin
|
|
892
|
-
*/
|
|
893
|
-
options: PropTypes.object,
|
|
894
|
-
|
|
895
|
-
/**
|
|
896
|
-
* Placeholder while tweet is loading
|
|
897
|
-
*/
|
|
898
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* Function to execute after load, return html element
|
|
902
|
-
*/
|
|
903
|
-
onLoad: PropTypes.func
|
|
904
|
-
});
|
|
905
|
-
|
|
906
|
-
var TwitterMomentShare =
|
|
907
|
-
/*#__PURE__*/
|
|
908
|
-
function (_Component) {
|
|
909
|
-
_inherits(TwitterMomentShare, _Component);
|
|
910
|
-
|
|
911
|
-
function TwitterMomentShare(props) {
|
|
912
|
-
var _this;
|
|
913
|
-
|
|
914
|
-
_classCallCheck(this, TwitterMomentShare);
|
|
915
|
-
|
|
916
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMomentShare).call(this, props));
|
|
917
|
-
_this.state = {
|
|
918
|
-
isLoading: true
|
|
919
|
-
};
|
|
920
|
-
return _this;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
_createClass(TwitterMomentShare, [{
|
|
924
|
-
key: "componentDidMount",
|
|
925
|
-
value: function componentDidMount() {
|
|
926
|
-
var _this2 = this;
|
|
927
|
-
|
|
928
|
-
var onLoad = this.props.onLoad;
|
|
929
|
-
|
|
930
|
-
if (exenv.canUseDOM) {
|
|
931
|
-
var script = require('scriptjs');
|
|
932
|
-
|
|
933
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
934
|
-
if (!window.twttr) {
|
|
935
|
-
console.error('Failure to load window.twttr in TwitterMomentShare, aborting load.');
|
|
936
|
-
return;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
if (!_this2.isMountCanceled) {
|
|
940
|
-
window.twttr.widgets.createMoment(_this2.props.momentId, _this2.refs.shareMoment, _this2.props.options).then(function (element) {
|
|
941
|
-
_this2.setState({
|
|
942
|
-
isLoading: false
|
|
943
|
-
});
|
|
944
|
-
|
|
945
|
-
if (onLoad) {
|
|
946
|
-
onLoad(element);
|
|
947
|
-
}
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
}, {
|
|
954
|
-
key: "componentWillUnmount",
|
|
955
|
-
value: function componentWillUnmount() {
|
|
956
|
-
this.isMountCanceled = true;
|
|
957
|
-
}
|
|
958
|
-
}, {
|
|
959
|
-
key: "render",
|
|
960
|
-
value: function render() {
|
|
961
|
-
var isLoading = this.state.isLoading;
|
|
962
|
-
var placeholder = this.props.placeholder;
|
|
963
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
964
|
-
ref: "shareMoment"
|
|
965
|
-
}));
|
|
966
|
-
}
|
|
967
|
-
}]);
|
|
968
|
-
|
|
969
|
-
return TwitterMomentShare;
|
|
970
|
-
}(Component);
|
|
971
|
-
|
|
972
|
-
_defineProperty(TwitterMomentShare, "propTypes", {
|
|
973
|
-
/**
|
|
974
|
-
* id of Twitter moment to show
|
|
975
|
-
*/
|
|
976
|
-
momentId: PropTypes.string.isRequired,
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Additional options for overriding config.
|
|
980
|
-
*/
|
|
981
|
-
options: PropTypes.object,
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* Placeholder while tweet is loading
|
|
985
|
-
*/
|
|
986
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* Function to execute after load, return html element
|
|
990
|
-
*/
|
|
991
|
-
onLoad: PropTypes.func
|
|
992
|
-
});
|
|
993
|
-
|
|
994
|
-
var TwitterDMButton =
|
|
995
|
-
/*#__PURE__*/
|
|
996
|
-
function (_Component) {
|
|
997
|
-
_inherits(TwitterDMButton, _Component);
|
|
998
|
-
|
|
999
|
-
function TwitterDMButton(props) {
|
|
1000
|
-
var _this;
|
|
1001
|
-
|
|
1002
|
-
_classCallCheck(this, TwitterDMButton);
|
|
1003
|
-
|
|
1004
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterDMButton).call(this, props));
|
|
1005
|
-
_this.state = {
|
|
1006
|
-
isLoading: true
|
|
1007
|
-
};
|
|
1008
|
-
return _this;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
_createClass(TwitterDMButton, [{
|
|
1012
|
-
key: "componentDidMount",
|
|
1013
|
-
value: function componentDidMount() {
|
|
1014
|
-
var _this2 = this;
|
|
1015
|
-
|
|
1016
|
-
var onLoad = this.props.onLoad;
|
|
1017
|
-
|
|
1018
|
-
if (exenv.canUseDOM) {
|
|
1019
|
-
var script = require('scriptjs');
|
|
1020
|
-
|
|
1021
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1022
|
-
if (!window.twttr) {
|
|
1023
|
-
console.error('Failure to load window.twttr in TwitterDMButton, aborting load.');
|
|
1024
|
-
return;
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
if (!_this2.isMountCanceled) {
|
|
1028
|
-
window.twttr.widgets.createDMButton(_this2.props.id, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
1029
|
-
_this2.setState({
|
|
1030
|
-
isLoading: false
|
|
1031
|
-
});
|
|
1032
|
-
|
|
1033
|
-
if (onLoad) {
|
|
1034
|
-
onLoad(element);
|
|
1035
|
-
}
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
}, {
|
|
1042
|
-
key: "componentWillUnmount",
|
|
1043
|
-
value: function componentWillUnmount() {
|
|
1044
|
-
this.isMountCanceled = true;
|
|
1045
|
-
}
|
|
1046
|
-
}, {
|
|
1047
|
-
key: "render",
|
|
1048
|
-
value: function render() {
|
|
1049
|
-
var isLoading = this.state.isLoading;
|
|
1050
|
-
var placeholder = this.props.placeholder;
|
|
1051
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
1052
|
-
ref: "embedContainer"
|
|
1053
|
-
}));
|
|
1054
|
-
}
|
|
1055
|
-
}]);
|
|
1056
|
-
|
|
1057
|
-
return TwitterDMButton;
|
|
1058
|
-
}(Component);
|
|
1059
|
-
|
|
1060
|
-
_defineProperty(TwitterDMButton, "propTypes", {
|
|
1061
|
-
/**
|
|
1062
|
-
* Twitter user id for DM button
|
|
1063
|
-
*/
|
|
1064
|
-
id: PropTypes.number.isRequired,
|
|
1065
|
-
|
|
1066
|
-
/**
|
|
1067
|
-
* Additional options to be added to the button
|
|
1068
|
-
*/
|
|
1069
|
-
options: PropTypes.object,
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* Placeholder while tweet is loading
|
|
1073
|
-
*/
|
|
1074
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* Function to execute after load, return html element
|
|
1078
|
-
*/
|
|
1079
|
-
onLoad: PropTypes.func
|
|
1080
|
-
});
|
|
1081
|
-
|
|
1082
|
-
var TwitterVideoEmbed =
|
|
1083
|
-
/*#__PURE__*/
|
|
1084
|
-
function (_Component) {
|
|
1085
|
-
_inherits(TwitterVideoEmbed, _Component);
|
|
1086
|
-
|
|
1087
|
-
function TwitterVideoEmbed(props) {
|
|
1088
|
-
var _this;
|
|
1089
|
-
|
|
1090
|
-
_classCallCheck(this, TwitterVideoEmbed);
|
|
1091
|
-
|
|
1092
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterVideoEmbed).call(this, props));
|
|
1093
|
-
_this.state = {
|
|
1094
|
-
isLoading: true
|
|
1095
|
-
};
|
|
1096
|
-
return _this;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
_createClass(TwitterVideoEmbed, [{
|
|
1100
|
-
key: "componentDidMount",
|
|
1101
|
-
value: function componentDidMount() {
|
|
1102
|
-
var _this2 = this;
|
|
1103
|
-
|
|
1104
|
-
var onLoad = this.props.onLoad;
|
|
1105
|
-
|
|
1106
|
-
if (exenv.canUseDOM) {
|
|
1107
|
-
var script = require('scriptjs');
|
|
1108
|
-
|
|
1109
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1110
|
-
if (!window.twttr) {
|
|
1111
|
-
console.error('Failure to load window.twttr in TwitterVideoEmbed, aborting load.');
|
|
1112
|
-
return;
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
if (!_this2.isMountCanceled) {
|
|
1116
|
-
window.twttr.widgets.createVideo(_this2.props.id, _this2.refs.embedContainer).then(function (element) {
|
|
1117
|
-
_this2.setState({
|
|
1118
|
-
isLoading: false
|
|
1119
|
-
});
|
|
1120
|
-
|
|
1121
|
-
if (onLoad) {
|
|
1122
|
-
onLoad(element);
|
|
1123
|
-
}
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
});
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
}, {
|
|
1130
|
-
key: "componentWillUnmount",
|
|
1131
|
-
value: function componentWillUnmount() {
|
|
1132
|
-
this.isMountCanceled = true;
|
|
1133
|
-
}
|
|
1134
|
-
}, {
|
|
1135
|
-
key: "render",
|
|
1136
|
-
value: function render() {
|
|
1137
|
-
var isLoading = this.state.isLoading;
|
|
1138
|
-
var placeholder = this.props.placeholder;
|
|
1139
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
1140
|
-
ref: "embedContainer"
|
|
1141
|
-
}));
|
|
1142
|
-
}
|
|
1143
|
-
}]);
|
|
1144
|
-
|
|
1145
|
-
return TwitterVideoEmbed;
|
|
1146
|
-
}(Component);
|
|
1147
|
-
|
|
1148
|
-
_defineProperty(TwitterVideoEmbed, "propTypes", {
|
|
1149
|
-
/**
|
|
1150
|
-
* Id of video tweet.
|
|
1151
|
-
*/
|
|
1152
|
-
id: PropTypes.string.isRequired,
|
|
1153
|
-
|
|
1154
|
-
/**
|
|
1155
|
-
* Placeholder while tweet is loading
|
|
1156
|
-
*/
|
|
1157
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* Function to execute after load, return html element
|
|
1161
|
-
*/
|
|
1162
|
-
onLoad: PropTypes.func
|
|
1163
|
-
});
|
|
1164
|
-
|
|
1165
|
-
var TwitterOnAirButton =
|
|
1166
|
-
/*#__PURE__*/
|
|
1167
|
-
function (_Component) {
|
|
1168
|
-
_inherits(TwitterOnAirButton, _Component);
|
|
1169
|
-
|
|
1170
|
-
function TwitterOnAirButton(props) {
|
|
1171
|
-
var _this;
|
|
1172
|
-
|
|
1173
|
-
_classCallCheck(this, TwitterOnAirButton);
|
|
1174
|
-
|
|
1175
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterOnAirButton).call(this, props));
|
|
1176
|
-
_this.state = {
|
|
1177
|
-
isLoading: true
|
|
1178
|
-
};
|
|
1179
|
-
return _this;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
_createClass(TwitterOnAirButton, [{
|
|
1183
|
-
key: "componentDidMount",
|
|
1184
|
-
value: function componentDidMount() {
|
|
1185
|
-
var _this2 = this;
|
|
1186
|
-
|
|
1187
|
-
var onLoad = this.props.onLoad;
|
|
1188
|
-
|
|
1189
|
-
if (exenv.canUseDOM) {
|
|
1190
|
-
var script = require('scriptjs');
|
|
1191
|
-
|
|
1192
|
-
script(twitterWidgetJs, 'twitter-embed', function () {
|
|
1193
|
-
if (!window.twttr) {
|
|
1194
|
-
console.error('Failure to load window.twttr in TwitterOnAirButton, aborting load.');
|
|
1195
|
-
return;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
if (!_this2.isMountCanceled) {
|
|
1199
|
-
window.twttr.widgets.createPeriscopeOnAirButton(_this2.props.username, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
|
|
1200
|
-
_this2.setState({
|
|
1201
|
-
isLoading: false
|
|
1202
|
-
});
|
|
1203
|
-
|
|
1204
|
-
if (onLoad) {
|
|
1205
|
-
onLoad(element);
|
|
1206
|
-
}
|
|
1207
|
-
});
|
|
1208
|
-
}
|
|
1209
|
-
});
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
}, {
|
|
1213
|
-
key: "componentWillUnmount",
|
|
1214
|
-
value: function componentWillUnmount() {
|
|
1215
|
-
this.isMountCanceled = true;
|
|
1216
|
-
}
|
|
1217
|
-
}, {
|
|
1218
|
-
key: "render",
|
|
1219
|
-
value: function render() {
|
|
1220
|
-
var isLoading = this.state.isLoading;
|
|
1221
|
-
var placeholder = this.props.placeholder;
|
|
1222
|
-
return React.createElement(React.Fragment, null, isLoading && placeholder, React.createElement("div", {
|
|
1223
|
-
ref: "embedContainer"
|
|
1224
|
-
}));
|
|
1225
|
-
}
|
|
1226
|
-
}]);
|
|
1227
|
-
|
|
1228
|
-
return TwitterOnAirButton;
|
|
1229
|
-
}(Component);
|
|
1230
|
-
|
|
1231
|
-
_defineProperty(TwitterOnAirButton, "propTypes", {
|
|
1232
|
-
/**
|
|
1233
|
-
* Username for which you require periscope on air button
|
|
1234
|
-
*/
|
|
1235
|
-
username: PropTypes.string.isRequired,
|
|
1236
|
-
|
|
1237
|
-
/**
|
|
1238
|
-
* Additional options for overriding config.
|
|
1239
|
-
*/
|
|
1240
|
-
options: PropTypes.object,
|
|
1241
|
-
|
|
1242
|
-
/**
|
|
1243
|
-
* Placeholder while tweet is loading
|
|
1244
|
-
*/
|
|
1245
|
-
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* Function to execute after load, return html element
|
|
1249
|
-
*/
|
|
1250
|
-
onLoad: PropTypes.func
|
|
1251
|
-
});
|
|
55
|
+
import { TwitterTimelineEmbed } from 'react-twitter-embed';
|
|
1252
56
|
|
|
1253
57
|
var ImageSlider = function ImageSlider(props) {
|
|
1254
58
|
var builder = imageUrlBuilder(props.client);
|
|
@@ -1273,61 +77,61 @@ var ImageSlider = function ImageSlider(props) {
|
|
|
1273
77
|
}
|
|
1274
78
|
|
|
1275
79
|
var variant = 'black';
|
|
1276
|
-
return
|
|
1277
|
-
|
|
80
|
+
return React__default.createElement(
|
|
81
|
+
React__default.Fragment,
|
|
1278
82
|
null,
|
|
1279
|
-
|
|
83
|
+
React__default.createElement(
|
|
1280
84
|
'div',
|
|
1281
85
|
{ id: 'vid-slider', className: 'col' },
|
|
1282
|
-
|
|
86
|
+
React__default.createElement(
|
|
1283
87
|
'div',
|
|
1284
88
|
{ className: 'row' },
|
|
1285
|
-
|
|
89
|
+
React__default.createElement(
|
|
1286
90
|
'div',
|
|
1287
91
|
{ onClick: function onClick(e) {
|
|
1288
92
|
return scrollSlider(e, 'prev');
|
|
1289
93
|
}, className: 'tile__slider-prev', style: { color: variant } },
|
|
1290
|
-
|
|
94
|
+
React__default.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
|
|
1291
95
|
),
|
|
1292
|
-
|
|
96
|
+
React__default.createElement(
|
|
1293
97
|
'div',
|
|
1294
98
|
{ onClick: function onClick(e) {
|
|
1295
99
|
return scrollSlider(e, 'next');
|
|
1296
100
|
}, className: 'tile__slider-next', style: { color: variant } },
|
|
1297
|
-
|
|
101
|
+
React__default.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
|
|
1298
102
|
),
|
|
1299
|
-
|
|
103
|
+
React__default.createElement(
|
|
1300
104
|
'div',
|
|
1301
105
|
{ className: 'row__inner' },
|
|
1302
106
|
props.data.slides.map(function (img, index) {
|
|
1303
107
|
var thumbnail = urlFor(img.slideshowImage).width(250);
|
|
1304
108
|
if (!img.slideshowImage.link) {
|
|
1305
|
-
return
|
|
109
|
+
return React__default.createElement(
|
|
1306
110
|
'div',
|
|
1307
111
|
{ key: index, className: 'tile' },
|
|
1308
|
-
|
|
112
|
+
React__default.createElement(
|
|
1309
113
|
'div',
|
|
1310
114
|
{ className: 'tile__media' },
|
|
1311
|
-
|
|
115
|
+
React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
|
|
1312
116
|
),
|
|
1313
|
-
|
|
117
|
+
React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
1314
118
|
);
|
|
1315
119
|
} else {
|
|
1316
|
-
return
|
|
120
|
+
return React__default.createElement(
|
|
1317
121
|
'a',
|
|
1318
122
|
{ key: index, href: img.slideshowImage.link, target: img.slideshowImage.blank ? '_target' : '_self', className: 'tile' },
|
|
1319
|
-
|
|
123
|
+
React__default.createElement(
|
|
1320
124
|
'div',
|
|
1321
125
|
{ className: 'tile__media' },
|
|
1322
|
-
|
|
126
|
+
React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
|
|
1323
127
|
),
|
|
1324
|
-
|
|
128
|
+
React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
1325
129
|
);
|
|
1326
130
|
}
|
|
1327
131
|
})
|
|
1328
132
|
)
|
|
1329
133
|
),
|
|
1330
|
-
|
|
134
|
+
React__default.createElement(
|
|
1331
135
|
'style',
|
|
1332
136
|
{ jsx: 'true' },
|
|
1333
137
|
'\n #vid-slider * {\n box-sizing: border-box;\n }\n #vid-slider::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider {\n position: relative;\n -ms-overflow-style: none;\n }\n #vid-slider .contain {\n width: 100%;\n }\n #vid-slider .row {\n overflow: scroll;\n width: 100%;\n -ms-overflow-style: none;\n max-height: 255px;\n }\n #vid-slider .tile__info {\n white-space: normal !important;\n position: absolute;\n text-align: center;\n color: ' + (props.dark ? 'white' : '#383838') + ';\n opacity: 1;\n font-size: 1rem;\n transition: opacity 0.25s;\n }\n #vid-slider .row__inner {\n transition: 450ms -webkit-transform;\n transition: 450ms transform;\n transition: 450ms transform, 450ms -webkit-transform;\n font-size: 0;\n white-space: nowrap;\n margin: 0.5rem 0;\n padding-bottom: 10px;\n padding-left: 0;\n }\n #vid-slider .tile {\n position: relative;\n display: inline-block;\n width: 250px;\n margin-right: 10px;\n font-size: 20px;\n transition: 450ms all;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n #vid-slider .tile__img {\n width: 250px;\n height: auto;\n max-height: 150px;\n padding: 0 1.5rem;\n -o-object-fit: contain;\n object-fit: contain;\n }\n #vid-slider .tile__slider-prev,\n #vid-slider .tile__slider-next {\n width: 30px;\n background: transparent;\n border: none;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 99;\n cursor: pointer;\n color: ' + (props.dark ? 'white' : 'black') + ';\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 2rem;\n }\n #vid-slider .tile__slider-prev {\n left: -3px;\n }\n #vid-slider .tile__slider-next {\n right: 0;\n }\n #vid-slider,\n #vid-slider .row {\n margin: 0;\n padding: 0 1.2rem;\n }\n #vid-slider .tile:last-child {\n margin-right: 2rem;\n }\n #vid-slider .row::-webkit-scrollbar-thumb {\n background-color: transparent !important;\n }\n #vid-slider i {\n border: solid ' + (props.dark ? 'white' : 'black') + ';\n border-width: 0 4px 4px 0;\n display: inline-block;\n padding: 4px;\n pointer-events: none;\n }\n #vid-slider .right {\n transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n }\n #vid-slider .left {\n transform: rotate(135deg);\n -webkit-transform: rotate(135deg);\n }\n '
|
|
@@ -1351,96 +155,96 @@ var PartnerDetails = function PartnerDetails(_ref) {
|
|
|
1351
155
|
page = _ref.page;
|
|
1352
156
|
|
|
1353
157
|
|
|
1354
|
-
return
|
|
1355
|
-
|
|
158
|
+
return React__default.createElement(
|
|
159
|
+
React__default.Fragment,
|
|
1356
160
|
null,
|
|
1357
|
-
|
|
1358
|
-
|
|
161
|
+
React__default.createElement(Breadcrumbs, null),
|
|
162
|
+
React__default.createElement(
|
|
1359
163
|
'div',
|
|
1360
164
|
{ className: 'partners-page' },
|
|
1361
|
-
|
|
165
|
+
React__default.createElement(
|
|
1362
166
|
'div',
|
|
1363
167
|
{ className: 'my-5 partner-logo-wrap', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
1364
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.link ?
|
|
168
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.link ? React__default.createElement(
|
|
1365
169
|
'a',
|
|
1366
170
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%' }, href: partnerDetails.thumbnail.link, target: partnerDetails.thumbnail.blank ? '_blank' : '' },
|
|
1367
|
-
|
|
171
|
+
React__default.createElement(
|
|
1368
172
|
'figure',
|
|
1369
173
|
{ style: { width: '100%', textAlign: 'center' } },
|
|
1370
|
-
|
|
174
|
+
React__default.createElement('img', {
|
|
1371
175
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
1372
176
|
style: { maxWidth: '100%' },
|
|
1373
177
|
src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
|
|
1374
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption &&
|
|
178
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
|
|
1375
179
|
'figcaption',
|
|
1376
180
|
null,
|
|
1377
181
|
partnerDetails.thumbnail.caption
|
|
1378
182
|
)
|
|
1379
183
|
)
|
|
1380
|
-
) :
|
|
184
|
+
) : React__default.createElement(
|
|
1381
185
|
'figure',
|
|
1382
186
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%', textAlign: 'center' } },
|
|
1383
|
-
|
|
187
|
+
React__default.createElement('img', {
|
|
1384
188
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
1385
189
|
style: { maxWidth: '100%' },
|
|
1386
190
|
src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
|
|
1387
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption &&
|
|
191
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
|
|
1388
192
|
'figcaption',
|
|
1389
193
|
null,
|
|
1390
194
|
partnerDetails.thumbnail.caption
|
|
1391
195
|
)
|
|
1392
196
|
),
|
|
1393
|
-
|
|
197
|
+
React__default.createElement(
|
|
1394
198
|
'style',
|
|
1395
199
|
{ jsx: 'true' },
|
|
1396
200
|
'\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 '
|
|
1397
201
|
),
|
|
1398
|
-
partnerDetails.description &&
|
|
202
|
+
partnerDetails.description && React__default.createElement(
|
|
1399
203
|
'div',
|
|
1400
204
|
{ className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
|
|
1401
|
-
|
|
205
|
+
React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
1402
206
|
)
|
|
1403
207
|
),
|
|
1404
|
-
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides &&
|
|
208
|
+
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default.createElement(
|
|
1405
209
|
'div',
|
|
1406
210
|
{ className: 'mb-4', style: { padding: '0 15px' } },
|
|
1407
|
-
partnerDetails.name &&
|
|
211
|
+
partnerDetails.name && React__default.createElement(
|
|
1408
212
|
'h2',
|
|
1409
213
|
{ className: 'bb-gold' },
|
|
1410
214
|
'Affiliates of ',
|
|
1411
215
|
partnerDetails.name
|
|
1412
216
|
),
|
|
1413
|
-
|
|
217
|
+
React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
|
|
1414
218
|
),
|
|
1415
|
-
features.length > 0 &&
|
|
219
|
+
features.length > 0 && React__default.createElement(
|
|
1416
220
|
'div',
|
|
1417
221
|
{ className: ' mb-5' },
|
|
1418
|
-
|
|
222
|
+
React__default.createElement(Feature, { dataset: features, client: client })
|
|
1419
223
|
),
|
|
1420
|
-
partnerDetails.twitter &&
|
|
1421
|
-
|
|
224
|
+
partnerDetails.twitter && React__default.createElement(
|
|
225
|
+
React__default.Fragment,
|
|
1422
226
|
null,
|
|
1423
|
-
|
|
227
|
+
React__default.createElement(
|
|
1424
228
|
'div',
|
|
1425
229
|
{ className: 'mb-5', style: { width: '100%', textAlign: 'center', padding: '0 15px', border: '2px solid #aaa', borderRadius: '15px' } },
|
|
1426
|
-
|
|
230
|
+
React__default.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } })
|
|
1427
231
|
)
|
|
1428
232
|
),
|
|
1429
|
-
|
|
233
|
+
React__default.createElement(
|
|
1430
234
|
'div',
|
|
1431
235
|
null,
|
|
1432
|
-
posts && posts.length > 0 &&
|
|
1433
|
-
|
|
236
|
+
posts && posts.length > 0 && React__default.createElement(
|
|
237
|
+
React__default.Fragment,
|
|
1434
238
|
null,
|
|
1435
|
-
|
|
239
|
+
React__default.createElement(
|
|
1436
240
|
'h2',
|
|
1437
241
|
{ className: 'bb-gold mb-2' },
|
|
1438
242
|
'Latest from ',
|
|
1439
243
|
partnerDetails.name
|
|
1440
244
|
),
|
|
1441
|
-
|
|
245
|
+
React__default.createElement('hr', null)
|
|
1442
246
|
),
|
|
1443
|
-
|
|
247
|
+
React__default.createElement(QueueDeckExpanded, {
|
|
1444
248
|
client: client,
|
|
1445
249
|
mapping: Settings.mapping,
|
|
1446
250
|
dataRecord: posts,
|