@mjhls/mjh-framework 1.0.567 → 1.0.569
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 +10 -9
- package/dist/cjs/AD300x250.js +8 -7
- package/dist/cjs/AD300x250x600.js +8 -7
- package/dist/cjs/AD728x90.js +11 -10
- package/dist/cjs/ADFloatingFooter.js +15 -14
- package/dist/cjs/ADFooter.js +9 -8
- package/dist/cjs/ADGutter.js +12 -11
- package/dist/cjs/{ADInfeed-17a378db.js → ADInfeed-fdbd80ea.js} +11 -9
- package/dist/cjs/ADSkyscraper.js +12 -11
- package/dist/cjs/ADSponsoredResources.js +11 -10
- package/dist/cjs/ADWebcast.js +11 -10
- package/dist/cjs/ADWelcome.js +16 -15
- package/dist/cjs/{ADlgInfeed-070d911c.js → ADlgInfeed-ecd2642c.js} +7 -6
- package/dist/cjs/AccordionPanel.js +25 -23
- package/dist/cjs/AdSlot.js +15 -13
- package/dist/cjs/AdSlotsProvider.js +6 -5
- package/dist/cjs/AlphabeticList.js +16 -15
- package/dist/cjs/ArticleQueue.js +115 -112
- package/dist/cjs/Auth.js +430 -593
- package/dist/cjs/{AuthorComponent-cb8b8128.js → AuthorComponent-5bb8f868.js} +13 -12
- package/dist/cjs/{BlockContent-f942392e.js → BlockContent-8b494587.js} +26 -24
- package/dist/cjs/Breadcrumbs.js +23 -21
- package/dist/cjs/CMEDeck.js +61 -61
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +22 -19
- package/dist/cjs/Column3.js +35 -32
- package/dist/cjs/ConferenceArticleCard.js +34 -33
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +85 -81
- package/dist/cjs/DeckQueue.js +73 -69
- package/dist/cjs/{Dfp-fbe32b96.js → Dfp-a06d722a.js} +22 -20
- package/dist/cjs/EventsDeck.js +113 -106
- package/dist/cjs/ExternalResources.js +42 -41
- package/dist/cjs/Feature.js +26 -24
- package/dist/cjs/ForbesHero.js +34 -33
- package/dist/cjs/GridContent.js +149 -145
- package/dist/cjs/GridHero.js +35 -34
- package/dist/cjs/GroupDeck.js +38 -37
- package/dist/cjs/HamMagazine.js +119 -114
- package/dist/cjs/Header.js +13 -11
- package/dist/cjs/Hero.js +11 -10
- package/dist/cjs/HighlightenVideo.js +17 -16
- package/dist/cjs/HorizontalHero.js +26 -25
- package/dist/cjs/{InscreenSensor-3aec8492.js → InscreenSensor-1f9f7db4.js} +8 -7
- package/dist/cjs/IssueContentDeck.js +69 -64
- package/dist/cjs/IssueDeck.js +64 -59
- package/dist/cjs/IssueLanding.js +47 -46
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +22 -20
- package/dist/cjs/MasterDeck.js +60 -59
- package/dist/cjs/NavDvm.js +68 -63
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +123 -118
- package/dist/cjs/NavNative.js +306 -104
- package/dist/cjs/NavNormal.js +42 -37
- package/dist/cjs/OncliveHero.js +19 -19
- package/dist/cjs/OncliveLargeHero.js +59 -58
- package/dist/cjs/PageFilter.js +9 -8
- package/dist/cjs/PartnerDetailListing.js +1267 -69
- package/dist/cjs/PdfDownload.js +10 -9
- package/dist/cjs/PopUpModal.js +15 -13
- package/dist/cjs/PublicationDeck.js +63 -58
- package/dist/cjs/PublicationLanding.js +85 -81
- package/dist/cjs/QueueDeckExpanded.js +223 -223
- package/dist/cjs/RelatedContent.js +47 -46
- package/dist/cjs/RelatedTopicsDropdown.js +32 -29
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +16 -12
- package/dist/cjs/SideFooter.js +20 -19
- package/dist/cjs/SocialIcons.js +91 -0
- package/dist/cjs/{SocialNavFooter-9a07520f.js → SocialNavFooter-d9ab4d17.js} +18 -17
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +59 -54
- package/dist/cjs/TemplateNormal.js +37 -35
- package/dist/cjs/ThumbnailCard.js +19 -17
- package/dist/cjs/Ustream.js +22 -21
- package/dist/cjs/VerticalHero.js +17 -16
- package/dist/cjs/VideoSeriesFilter.js +10 -10
- package/dist/cjs/VideoSeriesListing.js +39 -38
- package/dist/cjs/View.js +166 -161
- package/dist/cjs/YahooHero.js +30 -29
- package/dist/cjs/YoutubeGroup.js +46 -45
- package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-5c98aec7.js} +10 -8
- package/dist/cjs/getQuery.js +1 -1
- package/dist/cjs/getRelatedArticle.js +355 -6
- package/dist/cjs/getSerializers.js +269 -259
- package/dist/cjs/{getTargeting-b15993cb.js → getTargeting-86e68d62.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{iconBase-637d3f1e.js → iconBase-68959171.js} +1 -3
- package/dist/cjs/{index-f7ee1612.js → index-44481153.js} +10 -8
- package/dist/cjs/{index-fa0fb52c.js → index-8a3fb0bc.js} +13 -10
- package/dist/cjs/{index-5be2866f.js → index-99edf08a.js} +1 -1
- package/dist/cjs/index-bd6c9f56.js +211 -0
- package/dist/cjs/{index.es-ab3f2690.js → index.es-f3e47207.js} +28 -11
- package/dist/cjs/{index.esm-c0d8b44b.js → index.esm-3b9b8952.js} +5 -10
- package/dist/cjs/{index.esm-25423c2f.js → index.esm-55da9104.js} +4 -7
- package/dist/cjs/{index.esm-fcdbd2c6.js → index.esm-99553d28.js} +7 -16
- package/dist/cjs/index.js +34 -33
- package/dist/cjs/{inherits-14962339.js → inherits-4a2f1cc3.js} +4 -4
- package/dist/cjs/{lodash-fc2922d0.js → lodash-7fd85bcf.js} +71 -22
- package/dist/cjs/{main-bc4db521.js → main-c50facd7.js} +48 -43
- package/dist/cjs/{moment-66a6a284.js → moment-ca3bd9fb.js} +10 -8
- package/dist/cjs/{react-social-icons-cd0d9d3b.js → react-social-icons-07939b41.js} +13 -11
- package/dist/cjs/{typeof-1869832c.js → typeof-583cdc4b.js} +1 -1
- package/dist/cjs/urlFor.js +2 -2
- package/dist/cjs/{visibility-sensor-0c45a583.js → visibility-sensor-8b54af99.js} +7 -5
- 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-c7dba95f.js → ADInfeed-ed104a2b.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-8bfd6d58.js → ADlgInfeed-dfde985e.js} +4 -4
- package/dist/esm/AccordionPanel.js +18 -18
- 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 +411 -578
- package/dist/esm/{AuthorComponent-158226c9.js → AuthorComponent-f67cb027.js} +10 -10
- package/dist/esm/{BlockContent-a614acdf.js → BlockContent-d05b5b23.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-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +61 -61
- package/dist/esm/DeckQueue.js +46 -46
- package/dist/esm/{Dfp-ae9336e2.js → Dfp-0557840a.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 +87 -87
- 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 +21 -21
- package/dist/esm/{InscreenSensor-280b2b10.js → InscreenSensor-3e1fe82a.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-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +93 -93
- package/dist/esm/NavNative.js +280 -86
- package/dist/esm/NavNormal.js +22 -22
- package/dist/esm/OncliveHero.js +14 -15
- package/dist/esm/OncliveLargeHero.js +51 -51
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +1261 -65
- package/dist/esm/PdfDownload.js +7 -7
- 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 +203 -203
- 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 +17 -17
- package/dist/esm/SocialIcons.js +85 -0
- package/dist/esm/{SocialNavFooter-4fb16720.js → SocialNavFooter-1a531144.js} +15 -15
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +35 -35
- package/dist/esm/TemplateNormal.js +30 -29
- package/dist/esm/ThumbnailCard.js +9 -9
- package/dist/esm/Ustream.js +19 -19
- package/dist/esm/VerticalHero.js +12 -12
- package/dist/esm/VideoSeriesFilter.js +7 -7
- package/dist/esm/VideoSeriesListing.js +33 -33
- 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-83f53e4e.js → brightcove-react-player-loader.es-4abff0b1.js} +7 -6
- package/dist/esm/getQuery.js +1 -1
- package/dist/esm/getRelatedArticle.js +355 -6
- package/dist/esm/getSerializers.js +220 -216
- package/dist/esm/{getTargeting-1a0bd08d.js → getTargeting-1f2c61e3.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/{iconBase-6ee2f2fb.js → iconBase-602d52fe.js} +1 -1
- package/dist/esm/{index-93ec3c59.js → index-1819118a.js} +3 -3
- package/dist/esm/{index-5f9f807a.js → index-c5fd0af5.js} +4 -4
- package/dist/esm/index-db3bb315.js +207 -0
- package/dist/esm/{index-d2f90501.js → index-fa2ffe86.js} +1 -1
- package/dist/esm/{index.es-938a3a58.js → index.es-c6222053.js} +25 -9
- package/dist/esm/{index.esm-b97cf389.js → index.esm-116f3274.js} +7 -16
- package/dist/esm/{index.esm-a7ad65ba.js → index.esm-16e9450c.js} +4 -7
- package/dist/esm/{index.esm-9d6faf80.js → index.esm-d6f88d94.js} +5 -10
- package/dist/esm/index.js +28 -28
- package/dist/esm/{inherits-b8e4c697.js → inherits-2758cc14.js} +1 -1
- package/dist/esm/{lodash-17fdfebb.js → lodash-ec8c6b48.js} +71 -22
- package/dist/esm/{main-7255814e.js → main-b722e2e2.js} +48 -44
- package/dist/esm/{moment-12415288.js → moment-b6f49411.js} +10 -8
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-3822f1ce.js} +5 -5
- package/dist/esm/{typeof-5f046efd.js → typeof-7e72fee0.js} +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{visibility-sensor-0baa4eea.js → visibility-sensor-082c757b.js} +2 -2
- package/package.json +107 -107
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './_commonjsHelpers-0c4b6f40.js';
|
|
1
|
+
import { c as createCommonjsModule, u as unwrapExports } from './_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-7e72fee0.js';
|
|
12
12
|
import './_is-array-dd5523d6.js';
|
|
13
|
-
import
|
|
14
|
-
import './index-
|
|
15
|
-
import 'prop-types';
|
|
13
|
+
import React, { Component } from 'react';
|
|
14
|
+
import './index-1819118a.js';
|
|
15
|
+
import PropTypes from '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-b6f49411.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-c6222053.js';
|
|
24
24
|
import 'react-dom';
|
|
25
|
-
import './visibility-sensor-
|
|
25
|
+
import './visibility-sensor-082c757b.js';
|
|
26
26
|
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
27
|
-
import './index-
|
|
28
|
-
import './main-
|
|
27
|
+
import './index-c5fd0af5.js';
|
|
28
|
+
import './main-b722e2e2.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-ed104a2b.js';
|
|
37
|
+
import './lodash-ec8c6b48.js';
|
|
38
|
+
import './ADlgInfeed-dfde985e.js';
|
|
39
|
+
import './AuthorComponent-f67cb027.js';
|
|
40
|
+
import { B as BlockContent } from './BlockContent-d05b5b23.js';
|
|
41
41
|
import './smoothscroll-4b699764.js';
|
|
42
42
|
import './GroupDeck.js';
|
|
43
43
|
import 'react-bootstrap';
|
|
@@ -45,14 +45,1210 @@ 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-4abff0b1.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
|
-
|
|
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
|
+
});
|
|
56
1252
|
|
|
57
1253
|
var ImageSlider = function ImageSlider(props) {
|
|
58
1254
|
var builder = imageUrlBuilder(props.client);
|
|
@@ -77,61 +1273,61 @@ var ImageSlider = function ImageSlider(props) {
|
|
|
77
1273
|
}
|
|
78
1274
|
|
|
79
1275
|
var variant = 'black';
|
|
80
|
-
return
|
|
81
|
-
|
|
1276
|
+
return React.createElement(
|
|
1277
|
+
React.Fragment,
|
|
82
1278
|
null,
|
|
83
|
-
|
|
1279
|
+
React.createElement(
|
|
84
1280
|
'div',
|
|
85
1281
|
{ id: 'vid-slider', className: 'col' },
|
|
86
|
-
|
|
1282
|
+
React.createElement(
|
|
87
1283
|
'div',
|
|
88
1284
|
{ className: 'row' },
|
|
89
|
-
|
|
1285
|
+
React.createElement(
|
|
90
1286
|
'div',
|
|
91
1287
|
{ onClick: function onClick(e) {
|
|
92
1288
|
return scrollSlider(e, 'prev');
|
|
93
1289
|
}, className: 'tile__slider-prev', style: { color: variant } },
|
|
94
|
-
|
|
1290
|
+
React.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
|
|
95
1291
|
),
|
|
96
|
-
|
|
1292
|
+
React.createElement(
|
|
97
1293
|
'div',
|
|
98
1294
|
{ onClick: function onClick(e) {
|
|
99
1295
|
return scrollSlider(e, 'next');
|
|
100
1296
|
}, className: 'tile__slider-next', style: { color: variant } },
|
|
101
|
-
|
|
1297
|
+
React.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
|
|
102
1298
|
),
|
|
103
|
-
|
|
1299
|
+
React.createElement(
|
|
104
1300
|
'div',
|
|
105
1301
|
{ className: 'row__inner' },
|
|
106
1302
|
props.data.slides.map(function (img, index) {
|
|
107
1303
|
var thumbnail = urlFor(img.slideshowImage).width(250);
|
|
108
1304
|
if (!img.slideshowImage.link) {
|
|
109
|
-
return
|
|
1305
|
+
return React.createElement(
|
|
110
1306
|
'div',
|
|
111
1307
|
{ key: index, className: 'tile' },
|
|
112
|
-
|
|
1308
|
+
React.createElement(
|
|
113
1309
|
'div',
|
|
114
1310
|
{ className: 'tile__media' },
|
|
115
|
-
|
|
1311
|
+
React.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
|
|
116
1312
|
),
|
|
117
|
-
|
|
1313
|
+
React.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
118
1314
|
);
|
|
119
1315
|
} else {
|
|
120
|
-
return
|
|
1316
|
+
return React.createElement(
|
|
121
1317
|
'a',
|
|
122
1318
|
{ key: index, href: img.slideshowImage.link, target: img.slideshowImage.blank ? '_target' : '_self', className: 'tile' },
|
|
123
|
-
|
|
1319
|
+
React.createElement(
|
|
124
1320
|
'div',
|
|
125
1321
|
{ className: 'tile__media' },
|
|
126
|
-
|
|
1322
|
+
React.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
|
|
127
1323
|
),
|
|
128
|
-
|
|
1324
|
+
React.createElement('div', { style: { color: variant }, className: 'tile__info' })
|
|
129
1325
|
);
|
|
130
1326
|
}
|
|
131
1327
|
})
|
|
132
1328
|
)
|
|
133
1329
|
),
|
|
134
|
-
|
|
1330
|
+
React.createElement(
|
|
135
1331
|
'style',
|
|
136
1332
|
{ jsx: 'true' },
|
|
137
1333
|
'\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 '
|
|
@@ -155,96 +1351,96 @@ var PartnerDetails = function PartnerDetails(_ref) {
|
|
|
155
1351
|
page = _ref.page;
|
|
156
1352
|
|
|
157
1353
|
|
|
158
|
-
return
|
|
159
|
-
|
|
1354
|
+
return React.createElement(
|
|
1355
|
+
React.Fragment,
|
|
160
1356
|
null,
|
|
161
|
-
|
|
162
|
-
|
|
1357
|
+
React.createElement(Breadcrumbs, null),
|
|
1358
|
+
React.createElement(
|
|
163
1359
|
'div',
|
|
164
1360
|
{ className: 'partners-page' },
|
|
165
|
-
|
|
1361
|
+
React.createElement(
|
|
166
1362
|
'div',
|
|
167
1363
|
{ className: 'my-5 partner-logo-wrap', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
168
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.link ?
|
|
1364
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.link ? React.createElement(
|
|
169
1365
|
'a',
|
|
170
1366
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%' }, href: partnerDetails.thumbnail.link, target: partnerDetails.thumbnail.blank ? '_blank' : '' },
|
|
171
|
-
|
|
1367
|
+
React.createElement(
|
|
172
1368
|
'figure',
|
|
173
1369
|
{ style: { width: '100%', textAlign: 'center' } },
|
|
174
|
-
|
|
1370
|
+
React.createElement('img', {
|
|
175
1371
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
176
1372
|
style: { maxWidth: '100%' },
|
|
177
1373
|
src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
|
|
178
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption &&
|
|
1374
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React.createElement(
|
|
179
1375
|
'figcaption',
|
|
180
1376
|
null,
|
|
181
1377
|
partnerDetails.thumbnail.caption
|
|
182
1378
|
)
|
|
183
1379
|
)
|
|
184
|
-
) :
|
|
1380
|
+
) : React.createElement(
|
|
185
1381
|
'figure',
|
|
186
1382
|
{ className: 'partners-logo', style: { width: '25%', minWidth: '25%', textAlign: 'center' } },
|
|
187
|
-
|
|
1383
|
+
React.createElement('img', {
|
|
188
1384
|
alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
|
|
189
1385
|
style: { maxWidth: '100%' },
|
|
190
1386
|
src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
|
|
191
|
-
partnerDetails.thumbnail && partnerDetails.thumbnail.caption &&
|
|
1387
|
+
partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React.createElement(
|
|
192
1388
|
'figcaption',
|
|
193
1389
|
null,
|
|
194
1390
|
partnerDetails.thumbnail.caption
|
|
195
1391
|
)
|
|
196
1392
|
),
|
|
197
|
-
|
|
1393
|
+
React.createElement(
|
|
198
1394
|
'style',
|
|
199
1395
|
{ jsx: 'true' },
|
|
200
1396
|
'\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 '
|
|
201
1397
|
),
|
|
202
|
-
partnerDetails.description &&
|
|
1398
|
+
partnerDetails.description && React.createElement(
|
|
203
1399
|
'div',
|
|
204
1400
|
{ className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
|
|
205
|
-
|
|
1401
|
+
React.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
206
1402
|
)
|
|
207
1403
|
),
|
|
208
|
-
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides &&
|
|
1404
|
+
partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React.createElement(
|
|
209
1405
|
'div',
|
|
210
1406
|
{ className: 'mb-4', style: { padding: '0 15px' } },
|
|
211
|
-
partnerDetails.name &&
|
|
1407
|
+
partnerDetails.name && React.createElement(
|
|
212
1408
|
'h2',
|
|
213
1409
|
{ className: 'bb-gold' },
|
|
214
1410
|
'Affiliates of ',
|
|
215
1411
|
partnerDetails.name
|
|
216
1412
|
),
|
|
217
|
-
|
|
1413
|
+
React.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
|
|
218
1414
|
),
|
|
219
|
-
features.length > 0 &&
|
|
1415
|
+
features.length > 0 && React.createElement(
|
|
220
1416
|
'div',
|
|
221
1417
|
{ className: ' mb-5' },
|
|
222
|
-
|
|
1418
|
+
React.createElement(Feature, { dataset: features, client: client })
|
|
223
1419
|
),
|
|
224
|
-
partnerDetails.twitter &&
|
|
225
|
-
|
|
1420
|
+
partnerDetails.twitter && React.createElement(
|
|
1421
|
+
React.Fragment,
|
|
226
1422
|
null,
|
|
227
|
-
|
|
1423
|
+
React.createElement(
|
|
228
1424
|
'div',
|
|
229
1425
|
{ className: 'mb-5', style: { width: '100%', textAlign: 'center', padding: '0 15px', border: '2px solid #aaa', borderRadius: '15px' } },
|
|
230
|
-
|
|
1426
|
+
React.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } })
|
|
231
1427
|
)
|
|
232
1428
|
),
|
|
233
|
-
|
|
1429
|
+
React.createElement(
|
|
234
1430
|
'div',
|
|
235
1431
|
null,
|
|
236
|
-
posts && posts.length > 0 &&
|
|
237
|
-
|
|
1432
|
+
posts && posts.length > 0 && React.createElement(
|
|
1433
|
+
React.Fragment,
|
|
238
1434
|
null,
|
|
239
|
-
|
|
1435
|
+
React.createElement(
|
|
240
1436
|
'h2',
|
|
241
1437
|
{ className: 'bb-gold mb-2' },
|
|
242
1438
|
'Latest from ',
|
|
243
1439
|
partnerDetails.name
|
|
244
1440
|
),
|
|
245
|
-
|
|
1441
|
+
React.createElement('hr', null)
|
|
246
1442
|
),
|
|
247
|
-
|
|
1443
|
+
React.createElement(QueueDeckExpanded, {
|
|
248
1444
|
client: client,
|
|
249
1445
|
mapping: Settings.mapping,
|
|
250
1446
|
dataRecord: posts,
|