@mjhls/mjh-framework 1.0.684-beta.1 → 1.0.685

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.
Files changed (152) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +4 -4
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSkyscraper.js +2 -2
  9. package/dist/cjs/ADSponsoredResources.js +2 -2
  10. package/dist/cjs/ADWebcast.js +2 -2
  11. package/dist/cjs/ADWelcome.js +2 -2
  12. package/dist/cjs/AdSlot.js +2 -2
  13. package/dist/cjs/AdSlotsProvider.js +1 -1
  14. package/dist/cjs/ArticleCarousel.js +1 -1
  15. package/dist/cjs/ArticleSeriesListing.js +4 -4
  16. package/dist/cjs/Auth.js +507 -256
  17. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-88f69acd.js} +1 -1
  18. package/dist/cjs/BrowseVideosListing.js +1 -1
  19. package/dist/cjs/CMEDeck.js +5 -5
  20. package/dist/cjs/Column3.js +4 -4
  21. package/dist/cjs/ConferenceArticleCard.js +2 -2
  22. package/dist/cjs/DeckContent.js +7 -7
  23. package/dist/cjs/DeckQueue.js +6 -6
  24. package/dist/cjs/{Dfp-f6a18ed2.js → Dfp-b2bc3b97.js} +1 -1
  25. package/dist/cjs/EventsDeck.js +4 -4
  26. package/dist/cjs/ExternalResources.js +7 -7
  27. package/dist/cjs/Feature.js +3 -3
  28. package/dist/cjs/ForbesHero.js +2 -2
  29. package/dist/cjs/GridContent.js +10 -10
  30. package/dist/cjs/GridHero.js +2 -2
  31. package/dist/cjs/GroupDeck.js +1 -1
  32. package/dist/cjs/HamMagazine.js +4 -4
  33. package/dist/cjs/Hero.js +1 -1
  34. package/dist/cjs/HorizontalHero.js +2 -2
  35. package/dist/cjs/IssueContentDeck.js +2 -2
  36. package/dist/cjs/IssueDeck.js +2 -2
  37. package/dist/cjs/IssueLanding.js +7 -7
  38. package/dist/cjs/LeftNav.js +2 -2
  39. package/dist/cjs/MasterDeck.js +7 -7
  40. package/dist/cjs/NavMagazine.js +4 -4
  41. package/dist/cjs/NavNative.js +3 -3
  42. package/dist/cjs/OncliveHero.js +2 -2
  43. package/dist/cjs/OncliveLargeHero.js +2 -2
  44. package/dist/cjs/PartnerDetailListing.js +15 -1212
  45. package/dist/cjs/PublicationDeck.js +1 -1
  46. package/dist/cjs/QueueDeckExpanded.js +21 -21
  47. package/dist/cjs/RecentNews.js +2 -2
  48. package/dist/cjs/RelatedContent.js +2 -2
  49. package/dist/cjs/{SocialSearchComponent-9cd24578.js → SocialSearchComponent-6b5e5b47.js} +5 -5
  50. package/dist/cjs/TaxonomyCard.js +2 -2
  51. package/dist/cjs/TemplateNormal.js +3 -3
  52. package/dist/cjs/ThumbnailCard.js +1 -1
  53. package/dist/cjs/Ustream.js +2 -2
  54. package/dist/cjs/VerticalHero.js +2 -2
  55. package/dist/cjs/VideoSeriesCard.js +2 -2
  56. package/dist/cjs/VideoSeriesListing.js +3 -3
  57. package/dist/cjs/View.js +137 -532
  58. package/dist/cjs/YahooHero.js +2 -2
  59. package/dist/cjs/YoutubeGroup.js +1 -1
  60. package/dist/cjs/getQuery.js +2 -2
  61. package/dist/cjs/getRelatedArticle.js +5 -354
  62. package/dist/cjs/getSerializers.js +6 -6
  63. package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
  64. package/dist/cjs/getTargeting.js +1 -1
  65. package/dist/cjs/{index-fa8ed292.js → index-2d0a4911.js} +34 -27
  66. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  67. package/dist/cjs/{index-c49c3b5e.js → index-8c9e8ca7.js} +462 -450
  68. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  69. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  70. package/dist/cjs/index.js +16 -15
  71. package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
  72. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  73. package/dist/cjs/timeDifferenceCalc.js +3 -5
  74. package/dist/cjs/urlFor.js +1 -1
  75. package/dist/esm/AD.js +1 -1
  76. package/dist/esm/AD300x250.js +3 -3
  77. package/dist/esm/AD300x250x600.js +3 -3
  78. package/dist/esm/AD728x90.js +4 -4
  79. package/dist/esm/ADFloatingFooter.js +2 -2
  80. package/dist/esm/ADGutter.js +2 -2
  81. package/dist/esm/ADSkyscraper.js +2 -2
  82. package/dist/esm/ADSponsoredResources.js +2 -2
  83. package/dist/esm/ADWebcast.js +2 -2
  84. package/dist/esm/ADWelcome.js +2 -2
  85. package/dist/esm/AdSlot.js +2 -2
  86. package/dist/esm/AdSlotsProvider.js +1 -1
  87. package/dist/esm/ArticleCarousel.js +1 -1
  88. package/dist/esm/ArticleSeriesListing.js +4 -4
  89. package/dist/esm/Auth.js +499 -248
  90. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
  91. package/dist/esm/BrowseVideosListing.js +1 -1
  92. package/dist/esm/CMEDeck.js +5 -5
  93. package/dist/esm/Column3.js +4 -4
  94. package/dist/esm/ConferenceArticleCard.js +2 -2
  95. package/dist/esm/DeckContent.js +7 -7
  96. package/dist/esm/DeckQueue.js +6 -6
  97. package/dist/esm/{Dfp-96b49def.js → Dfp-8a8fca18.js} +1 -1
  98. package/dist/esm/EventsDeck.js +4 -4
  99. package/dist/esm/ExternalResources.js +7 -7
  100. package/dist/esm/Feature.js +3 -3
  101. package/dist/esm/ForbesHero.js +2 -2
  102. package/dist/esm/GridContent.js +10 -10
  103. package/dist/esm/GridHero.js +2 -2
  104. package/dist/esm/GroupDeck.js +1 -1
  105. package/dist/esm/HamMagazine.js +4 -4
  106. package/dist/esm/Hero.js +1 -1
  107. package/dist/esm/HorizontalHero.js +2 -2
  108. package/dist/esm/IssueContentDeck.js +2 -2
  109. package/dist/esm/IssueDeck.js +2 -2
  110. package/dist/esm/IssueLanding.js +7 -7
  111. package/dist/esm/LeftNav.js +2 -2
  112. package/dist/esm/MasterDeck.js +7 -7
  113. package/dist/esm/NavMagazine.js +4 -4
  114. package/dist/esm/NavNative.js +3 -3
  115. package/dist/esm/OncliveHero.js +2 -2
  116. package/dist/esm/OncliveLargeHero.js +2 -2
  117. package/dist/esm/PartnerDetailListing.js +13 -1209
  118. package/dist/esm/PublicationDeck.js +1 -1
  119. package/dist/esm/QueueDeckExpanded.js +21 -21
  120. package/dist/esm/RecentNews.js +2 -2
  121. package/dist/esm/RelatedContent.js +2 -2
  122. package/dist/esm/{SocialSearchComponent-93233334.js → SocialSearchComponent-7f14e0f3.js} +5 -5
  123. package/dist/esm/TaxonomyCard.js +2 -2
  124. package/dist/esm/TemplateNormal.js +3 -3
  125. package/dist/esm/ThumbnailCard.js +1 -1
  126. package/dist/esm/Ustream.js +2 -2
  127. package/dist/esm/VerticalHero.js +2 -2
  128. package/dist/esm/VideoSeriesCard.js +2 -2
  129. package/dist/esm/VideoSeriesListing.js +3 -3
  130. package/dist/esm/View.js +117 -512
  131. package/dist/esm/YahooHero.js +2 -2
  132. package/dist/esm/YoutubeGroup.js +1 -1
  133. package/dist/esm/getQuery.js +2 -2
  134. package/dist/esm/getRelatedArticle.js +5 -354
  135. package/dist/esm/getSerializers.js +6 -6
  136. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  137. package/dist/esm/{index-85783f24.js → index-5505d4f9.js} +462 -450
  138. package/dist/esm/{index-0e45a0b2.js → index-93ec3c59.js} +34 -27
  139. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  140. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  141. package/dist/esm/index.js +14 -13
  142. package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
  143. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  144. package/dist/esm/timeDifferenceCalc.js +3 -5
  145. package/dist/esm/urlFor.js +1 -1
  146. package/package.json +1 -1
  147. package/dist/cjs/index-bd6c9f56.js +0 -211
  148. package/dist/esm/index-db3bb315.js +0 -207
  149. /package/dist/cjs/{ADInfeed-f27bc4b5.js → ADInfeed-c676389b.js} +0 -0
  150. /package/dist/cjs/{ADlgInfeed-8decfd9e.js → ADlgInfeed-57d63c87.js} +0 -0
  151. /package/dist/esm/{ADInfeed-1e0ca5e0.js → ADInfeed-97b8cea7.js} +0 -0
  152. /package/dist/esm/{ADlgInfeed-979cf0d5.js → ADlgInfeed-3ab91c75.js} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
4
 
5
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
5
+ require('./_commonjsHelpers-06173234.js');
6
6
  require('./_to-object-329a650b.js');
7
7
  require('./es6.string.iterator-cc0bbaa4.js');
8
8
  require('./_library-dd23b178.js');
@@ -10,7 +10,7 @@ require('./_iter-detect-60b2f026.js');
10
10
  require('./toConsumableArray-9a3476fe.js');
11
11
  require('./core.get-iterator-method-f62321d4.js');
12
12
  require('./_object-pie-68c5bcbc.js');
13
- var _extends$1 = require('./extends-60837c34.js');
13
+ var _extends = require('./extends-60837c34.js');
14
14
  require('./_object-sap-5e74ba08.js');
15
15
  require('./inherits-513d81cd.js');
16
16
  require('./define-property-f4d12f4e.js');
@@ -19,22 +19,21 @@ require('./typeof-725500bc.js');
19
19
  require('./_is-array-754e012d.js');
20
20
  var React = require('react');
21
21
  var React__default = _interopDefault(React);
22
- require('./index-fa8ed292.js');
23
- var PropTypes = require('prop-types');
24
- var PropTypes__default = _interopDefault(PropTypes);
22
+ require('./index-2d0a4911.js');
23
+ require('prop-types');
25
24
  require('react-bootstrap/Row');
26
25
  require('react-bootstrap/Col');
27
26
  require('react-bootstrap/Card');
28
- var moment = require('./moment-575fe24c.js');
27
+ var moment = require('./moment-66a6a284.js');
29
28
  require('next/router');
30
29
  require('./isSymbol-04666465.js');
31
30
  require('./debounce-eb287781.js');
32
- require('./index.es-9110add6.js');
31
+ require('./index.es-ab3f2690.js');
33
32
  require('react-dom');
34
33
  require('./visibility-sensor-0c45a583.js');
35
- var index$1 = require('./index-be0c82be.js');
34
+ var index$1 = require('./index-b5eb3ff8.js');
36
35
  require('./index-da796b8c.js');
37
- require('./main-a4cb15bb.js');
36
+ require('./main-b6c96c8d.js');
38
37
  require('./entities-310b46ee.js');
39
38
  require('./stringify-7c5aff47.js');
40
39
  var slicedToArray = require('./slicedToArray-8f385299.js');
@@ -42,19 +41,19 @@ var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
42
41
  require('./_set-species-f92c67c5.js');
43
42
  require('./beam-7217b7e7.js');
44
43
  require('./AdSlot.js');
45
- require('./ADInfeed-f27bc4b5.js');
44
+ require('./ADInfeed-c676389b.js');
46
45
  require('./lodash-fc2922d0.js');
47
- require('./ADlgInfeed-8decfd9e.js');
46
+ require('./ADlgInfeed-57d63c87.js');
48
47
  require('./getContentCategory-f38a4c00.js');
49
48
  require('./AuthorComponent-bb831b74.js');
50
- var BlockContent = require('./BlockContent-091a991f.js');
49
+ var BlockContent = require('./BlockContent-88f69acd.js');
51
50
  var smoothscroll = require('./smoothscroll-95231a70.js');
52
51
  require('./GroupDeck.js');
53
52
  require('react-bootstrap');
54
53
  require('./timeDifferenceCalc.js');
55
54
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
56
55
  require('react-bootstrap/Button');
57
- var getSerializers = require('./index-c49c3b5e.js');
56
+ var getSerializers = require('./index-8c9e8ca7.js');
58
57
  require('./util-f2c1b65b.js');
59
58
  require('./brightcove-react-player-loader.es-156bd4d6.js');
60
59
  require('react-bootstrap/Pagination');
@@ -64,1203 +63,7 @@ var Feature = require('./Feature.js');
64
63
  require('react-bootstrap/Breadcrumb');
65
64
  var Breadcrumbs = require('./Breadcrumbs.js');
66
65
  var urlFor = require('./urlFor.js');
67
-
68
- function _classCallCheck(instance, Constructor) {
69
- if (!(instance instanceof Constructor)) {
70
- throw new TypeError("Cannot call a class as a function");
71
- }
72
- }
73
-
74
- function _defineProperties(target, props) {
75
- for (var i = 0; i < props.length; i++) {
76
- var descriptor = props[i];
77
- descriptor.enumerable = descriptor.enumerable || false;
78
- descriptor.configurable = true;
79
- if ("value" in descriptor) descriptor.writable = true;
80
- Object.defineProperty(target, descriptor.key, descriptor);
81
- }
82
- }
83
-
84
- function _createClass(Constructor, protoProps, staticProps) {
85
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
86
- if (staticProps) _defineProperties(Constructor, staticProps);
87
- return Constructor;
88
- }
89
-
90
- function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
91
-
92
- function _typeof(obj) {
93
- if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
94
- _typeof = function _typeof(obj) {
95
- return _typeof2(obj);
96
- };
97
- } else {
98
- _typeof = function _typeof(obj) {
99
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
100
- };
101
- }
102
-
103
- return _typeof(obj);
104
- }
105
-
106
- function _assertThisInitialized(self) {
107
- if (self === void 0) {
108
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
109
- }
110
-
111
- return self;
112
- }
113
-
114
- function _possibleConstructorReturn(self, call) {
115
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
116
- return call;
117
- }
118
-
119
- return _assertThisInitialized(self);
120
- }
121
-
122
- function _getPrototypeOf(o) {
123
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
124
- return o.__proto__ || Object.getPrototypeOf(o);
125
- };
126
- return _getPrototypeOf(o);
127
- }
128
-
129
- function _setPrototypeOf(o, p) {
130
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
131
- o.__proto__ = p;
132
- return o;
133
- };
134
-
135
- return _setPrototypeOf(o, p);
136
- }
137
-
138
- function _inherits(subClass, superClass) {
139
- if (typeof superClass !== "function" && superClass !== null) {
140
- throw new TypeError("Super expression must either be null or a function");
141
- }
142
-
143
- subClass.prototype = Object.create(superClass && superClass.prototype, {
144
- constructor: {
145
- value: subClass,
146
- writable: true,
147
- configurable: true
148
- }
149
- });
150
- if (superClass) _setPrototypeOf(subClass, superClass);
151
- }
152
-
153
- function _defineProperty(obj, key, value) {
154
- if (key in obj) {
155
- Object.defineProperty(obj, key, {
156
- value: value,
157
- enumerable: true,
158
- configurable: true,
159
- writable: true
160
- });
161
- } else {
162
- obj[key] = value;
163
- }
164
-
165
- return obj;
166
- }
167
-
168
- var isRequiredIf_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
169
- 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.
170
- }};exports.default=isRequiredIf;
171
-
172
-
173
- });
174
-
175
- var isRequiredIf = _commonjsHelpers.unwrapExports(isRequiredIf_1);
176
-
177
- var exenv = _commonjsHelpers.createCommonjsModule(function (module) {
178
- /*!
179
- Copyright (c) 2015 Jed Watson.
180
- Based on code that is Copyright 2013-2015, Facebook, Inc.
181
- All rights reserved.
182
- */
183
- /* global define */
184
-
185
- (function () {
186
-
187
- var canUseDOM = !!(
188
- typeof window !== 'undefined' &&
189
- window.document &&
190
- window.document.createElement
191
- );
192
-
193
- var ExecutionEnvironment = {
194
-
195
- canUseDOM: canUseDOM,
196
-
197
- canUseWorkers: typeof Worker !== 'undefined',
198
-
199
- canUseEventListeners:
200
- canUseDOM && !!(window.addEventListener || window.attachEvent),
201
-
202
- canUseViewport: canUseDOM && !!window.screen
203
-
204
- };
205
-
206
- if ( module.exports) {
207
- module.exports = ExecutionEnvironment;
208
- } else {
209
- window.ExecutionEnvironment = ExecutionEnvironment;
210
- }
211
-
212
- }());
213
- });
214
-
215
- var twitterWidgetJs = 'https://platform.twitter.com/widgets.js';
216
-
217
- var TwitterTimelineEmbed =
218
- /*#__PURE__*/
219
- function (_Component) {
220
- _inherits(TwitterTimelineEmbed, _Component);
221
-
222
- function TwitterTimelineEmbed(props) {
223
- var _this;
224
-
225
- _classCallCheck(this, TwitterTimelineEmbed);
226
-
227
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTimelineEmbed).call(this, props));
228
- _this.state = {
229
- isLoading: true
230
- };
231
- return _this;
232
- }
233
-
234
- _createClass(TwitterTimelineEmbed, [{
235
- key: "buildChromeOptions",
236
- value: function buildChromeOptions(options) {
237
- options.chrome = '';
238
-
239
- if (this.props.noHeader) {
240
- options.chrome = options.chrome + ' noheader';
241
- }
242
-
243
- if (this.props.noFooter) {
244
- options.chrome = options.chrome + ' nofooter';
245
- }
246
-
247
- if (this.props.noBorders) {
248
- options.chrome = options.chrome + ' noborders';
249
- }
250
-
251
- if (this.props.noScrollbar) {
252
- options.chrome = options.chrome + ' noscrollbar';
253
- }
254
-
255
- if (this.props.transparent) {
256
- options.chrome = options.chrome + ' transparent';
257
- }
258
-
259
- return options;
260
- }
261
- }, {
262
- key: "buildOptions",
263
- value: function buildOptions() {
264
- var options = Object.assign({}, this.props.options);
265
-
266
- if (this.props.autoHeight) {
267
- options.height = this.refs.embedContainer.parentNode.offsetHeight;
268
- }
269
-
270
- options = Object.assign({}, options, {
271
- theme: this.props.theme,
272
- linkColor: this.props.linkColor,
273
- borderColor: this.props.borderColor,
274
- lang: this.props.lang
275
- });
276
- return options;
277
- }
278
- }, {
279
- key: "renderWidget",
280
- value: function renderWidget(options) {
281
- var _this2 = this;
282
-
283
- var onLoad = this.props.onLoad;
284
-
285
- if (!this.isMountCanceled) {
286
- window.twttr.widgets.createTimeline({
287
- sourceType: this.props.sourceType,
288
- screenName: this.props.screenName,
289
- userId: this.props.userId,
290
- ownerScreenName: this.props.ownerScreenName,
291
- slug: this.props.slug,
292
- id: this.props.id || this.props.widgetId,
293
- url: this.props.url
294
- }, this.refs.embedContainer, options).then(function (element) {
295
- _this2.setState({
296
- isLoading: false
297
- });
298
-
299
- if (onLoad) {
300
- onLoad(element);
301
- }
302
- });
303
- }
304
- }
305
- }, {
306
- key: "componentDidMount",
307
- value: function componentDidMount() {
308
- var _this3 = this;
309
-
310
- if (exenv.canUseDOM) {
311
- var script = require('scriptjs');
312
-
313
- script(twitterWidgetJs, 'twitter-embed', function () {
314
- if (!window.twttr) {
315
- console.error('Failure to load window.twttr in TwitterTimelineEmbed, aborting load.');
316
- return;
317
- }
318
-
319
- var options = _this3.buildOptions();
320
- /** Append chrome options */
321
-
322
-
323
- options = _this3.buildChromeOptions(options);
324
-
325
- _this3.renderWidget(options);
326
- });
327
- }
328
- }
329
- }, {
330
- key: "componentWillUnmount",
331
- value: function componentWillUnmount() {
332
- this.isMountCanceled = true;
333
- }
334
- }, {
335
- key: "render",
336
- value: function render() {
337
- var isLoading = this.state.isLoading;
338
- var placeholder = this.props.placeholder;
339
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
340
- ref: "embedContainer"
341
- }));
342
- }
343
- }]);
344
-
345
- return TwitterTimelineEmbed;
346
- }(React.Component);
347
-
348
- _defineProperty(TwitterTimelineEmbed, "propTypes", {
349
- /**
350
- * This can be either of profile, likes, list, collection, URL, widget
351
- */
352
- sourceType: PropTypes__default.oneOf(['profile', 'likes', 'list', 'collection', 'url', 'widget']).isRequired,
353
-
354
- /**
355
- * username of twitter handle as String
356
- */
357
- screenName: isRequiredIf(PropTypes__default.string, function (props) {
358
- return !props.hasOwnProperty('userId') && (props.sourceType === 'profile' || props.sourceType === 'likes');
359
- }),
360
-
361
- /**
362
- * UserId of twitter handle as number
363
- */
364
- userId: isRequiredIf(PropTypes__default.number, function (props) {
365
- return !props.hasOwnProperty('screenName') && (props.sourceType === 'profile' || props.sourceType === 'likes');
366
- }),
367
-
368
- /**
369
- * To show list, used along with slug
370
- */
371
- ownerScreenName: isRequiredIf(PropTypes__default.string, function (props) {
372
- return props.sourceType === 'list' && !props.hasOwnProperty('id');
373
- }),
374
-
375
- /**
376
- * To show list, used along with ownerScreenName
377
- */
378
- slug: isRequiredIf(PropTypes__default.string, function (props) {
379
- return props.sourceType === 'list' && !props.hasOwnProperty('id');
380
- }),
381
-
382
- /**
383
- * To show list, unique list id
384
- * Also used with collections, in that case its valid collection id
385
- */
386
- id: isRequiredIf(PropTypes__default.oneOfType([PropTypes__default.number, PropTypes__default.string]), function (props) {
387
- return props.sourceType === 'list' && !props.hasOwnProperty('ownerScreenName') && !props.hasOwnProperty('slug') || props.sourceType === 'collection';
388
- }),
389
-
390
- /**
391
- * To show twitter content with url.
392
- * Supported content includes profiles, likes, lists, and collections.
393
- */
394
- url: isRequiredIf(PropTypes__default.string, function (props) {
395
- return props.sourceType === 'url';
396
- }),
397
-
398
- /**
399
- * To show custom widget
400
- */
401
- widgetId: isRequiredIf(PropTypes__default.string, function (props) {
402
- return props.sourceType === 'widget';
403
- }),
404
-
405
- /**
406
- * Additional options to pass to twitter widget plugin
407
- */
408
- options: PropTypes__default.object,
409
-
410
- /**
411
- * Automatically fit into parent container height
412
- */
413
- autoHeight: PropTypes__default.bool,
414
-
415
- /**
416
- * With dark or light theme
417
- */
418
- theme: PropTypes__default.oneOf(['dark', 'light']),
419
-
420
- /**
421
- * With custom link colors. Note: Only Hex colors are supported.
422
- */
423
- linkColor: PropTypes__default.string,
424
-
425
- /**
426
- * With custom border colors. Note: Only Hex colors are supported.
427
- */
428
- borderColor: PropTypes__default.string,
429
-
430
- /**
431
- * Hide the header from timeline
432
- */
433
- noHeader: PropTypes__default.bool,
434
-
435
- /**
436
- * Hide the footer from timeline
437
- */
438
- noFooter: PropTypes__default.bool,
439
-
440
- /**
441
- * Hide the border from timeline
442
- */
443
- noBorders: PropTypes__default.bool,
444
-
445
- /**
446
- * Hide the scrollbars
447
- */
448
- noScrollbar: PropTypes__default.bool,
449
-
450
- /**
451
- * Enable Transparancy
452
- */
453
- transparent: PropTypes__default.bool,
454
-
455
- /**
456
- * Custom language code. Supported codes here: https://developer.twitter.com/en/docs/twitter-for-websites/twitter-for-websites-supported-languages/overview.html
457
- */
458
- lang: PropTypes__default.string,
459
-
460
- /**
461
- * Placeholder while tweet is loading
462
- */
463
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
464
-
465
- /**
466
- * Function to execute after load, return html element
467
- */
468
- onLoad: PropTypes__default.func
469
- });
470
-
471
- var TwitterShareButton =
472
- /*#__PURE__*/
473
- function (_Component) {
474
- _inherits(TwitterShareButton, _Component);
475
-
476
- function TwitterShareButton(props) {
477
- var _this;
478
-
479
- _classCallCheck(this, TwitterShareButton);
480
-
481
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterShareButton).call(this, props));
482
- _this.state = {
483
- isLoading: true
484
- };
485
- return _this;
486
- }
487
-
488
- _createClass(TwitterShareButton, [{
489
- key: "componentDidMount",
490
- value: function componentDidMount() {
491
- var _this2 = this;
492
-
493
- var onLoad = this.props.onLoad;
494
-
495
- if (exenv.canUseDOM) {
496
- var script = require('scriptjs');
497
-
498
- script(twitterWidgetJs, 'twitter-embed', function () {
499
- if (!window.twttr) {
500
- console.error('Failure to load window.twttr in TwitterShareButton, aborting load.');
501
- return;
502
- }
503
-
504
- if (!_this2.isMountCanceled) {
505
- window.twttr.widgets.createShareButton(_this2.props.url, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
506
- _this2.setState({
507
- isLoading: false
508
- });
509
-
510
- if (onLoad) {
511
- onLoad(element);
512
- }
513
- });
514
- }
515
- });
516
- }
517
- }
518
- }, {
519
- key: "componentWillUnmount",
520
- value: function componentWillUnmount() {
521
- this.isMountCanceled = true;
522
- }
523
- }, {
524
- key: "render",
525
- value: function render() {
526
- var isLoading = this.state.isLoading;
527
- var placeholder = this.props.placeholder;
528
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
529
- ref: "embedContainer"
530
- }));
531
- }
532
- }]);
533
-
534
- return TwitterShareButton;
535
- }(React.Component);
536
-
537
- _defineProperty(TwitterShareButton, "propTypes", {
538
- /**
539
- * Url for sharing
540
- */
541
- url: PropTypes__default.string.isRequired,
542
-
543
- /**
544
- * Additional options for overriding config. Details at : https://dev.twitter.com/web/tweet-button/parameters
545
- */
546
- options: PropTypes__default.object,
547
-
548
- /**
549
- * Placeholder while tweet is loading
550
- */
551
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
552
-
553
- /**
554
- * Function to execute after load, return html element
555
- */
556
- onLoad: PropTypes__default.func
557
- });
558
-
559
- var TwitterFollowButton =
560
- /*#__PURE__*/
561
- function (_Component) {
562
- _inherits(TwitterFollowButton, _Component);
563
-
564
- function TwitterFollowButton(props) {
565
- var _this;
566
-
567
- _classCallCheck(this, TwitterFollowButton);
568
-
569
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterFollowButton).call(this, props));
570
- _this.state = {
571
- isLoading: true
572
- };
573
- return _this;
574
- }
575
-
576
- _createClass(TwitterFollowButton, [{
577
- key: "componentDidMount",
578
- value: function componentDidMount() {
579
- var _this2 = this;
580
-
581
- var onLoad = this.props.onLoad;
582
-
583
- if (exenv.canUseDOM) {
584
- var script = require('scriptjs');
585
-
586
- script(twitterWidgetJs, 'twitter-embed', function () {
587
- if (!window.twttr) {
588
- console.error('Failure to load window.twttr in TwitterFollowButton, aborting load.');
589
- return;
590
- }
591
-
592
- if (!_this2.isMountCanceled) {
593
- window.twttr.widgets.createFollowButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
594
- _this2.setState({
595
- isLoading: false
596
- });
597
-
598
- if (onLoad) {
599
- onLoad(element);
600
- }
601
- });
602
- }
603
- });
604
- }
605
- }
606
- }, {
607
- key: "componentWillUnmount",
608
- value: function componentWillUnmount() {
609
- this.isMountCanceled = true;
610
- }
611
- }, {
612
- key: "render",
613
- value: function render() {
614
- var isLoading = this.state.isLoading;
615
- var placeholder = this.props.placeholder;
616
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
617
- ref: "embedContainer"
618
- }));
619
- }
620
- }]);
621
-
622
- return TwitterFollowButton;
623
- }(React.Component);
624
-
625
- _defineProperty(TwitterFollowButton, "propTypes", {
626
- /**
627
- * Username of twitter user which will be followed on click
628
- */
629
- screenName: PropTypes__default.string.isRequired,
630
-
631
- /**
632
- * Additional options to be added to the button
633
- */
634
- options: PropTypes__default.object,
635
-
636
- /**
637
- * Placeholder while tweet is loading
638
- */
639
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
640
-
641
- /**
642
- * Function to execute after load, return html element
643
- */
644
- onLoad: PropTypes__default.func
645
- });
646
-
647
- var TwitterHashtagButton =
648
- /*#__PURE__*/
649
- function (_Component) {
650
- _inherits(TwitterHashtagButton, _Component);
651
-
652
- function TwitterHashtagButton(props) {
653
- var _this;
654
-
655
- _classCallCheck(this, TwitterHashtagButton);
656
-
657
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterHashtagButton).call(this, props));
658
- _this.state = {
659
- isLoading: true
660
- };
661
- return _this;
662
- }
663
-
664
- _createClass(TwitterHashtagButton, [{
665
- key: "componentDidMount",
666
- value: function componentDidMount() {
667
- var _this2 = this;
668
-
669
- var onLoad = this.props.onLoad;
670
-
671
- if (exenv.canUseDOM) {
672
- var script = require('scriptjs');
673
-
674
- script(twitterWidgetJs, 'twitter-embed', function () {
675
- if (!window.twttr) {
676
- console.error('Failure to load window.twttr in TwitterHashtagButton, aborting load.');
677
- return;
678
- }
679
-
680
- if (!_this2.isMountCanceled) {
681
- window.twttr.widgets.createHashtagButton(_this2.props.tag, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
682
- _this2.setState({
683
- isLoading: false
684
- });
685
-
686
- if (onLoad) {
687
- onLoad(element);
688
- }
689
- });
690
- }
691
- });
692
- }
693
- }
694
- }, {
695
- key: "componentWillUnmount",
696
- value: function componentWillUnmount() {
697
- this.isMountCanceled = true;
698
- }
699
- }, {
700
- key: "render",
701
- value: function render() {
702
- var isLoading = this.state.isLoading;
703
- var placeholder = this.props.placeholder;
704
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
705
- ref: "embedContainer"
706
- }));
707
- }
708
- }]);
709
-
710
- return TwitterHashtagButton;
711
- }(React.Component);
712
-
713
- _defineProperty(TwitterHashtagButton, "propTypes", {
714
- /**
715
- * Tag name for hashtag button
716
- */
717
- tag: PropTypes__default.string.isRequired,
718
-
719
- /**
720
- * Additional options to be added to the button
721
- */
722
- options: PropTypes__default.object,
723
-
724
- /**
725
- * Placeholder while tweet is loading
726
- */
727
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
728
-
729
- /**
730
- * Function to execute after load, return html element
731
- */
732
- onLoad: PropTypes__default.func
733
- });
734
-
735
- var TwitterMentionButton =
736
- /*#__PURE__*/
737
- function (_Component) {
738
- _inherits(TwitterMentionButton, _Component);
739
-
740
- function TwitterMentionButton(props) {
741
- var _this;
742
-
743
- _classCallCheck(this, TwitterMentionButton);
744
-
745
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMentionButton).call(this, props));
746
- _this.state = {
747
- isLoading: true
748
- };
749
- return _this;
750
- }
751
-
752
- _createClass(TwitterMentionButton, [{
753
- key: "componentDidMount",
754
- value: function componentDidMount() {
755
- var _this2 = this;
756
-
757
- var onLoad = this.props.onLoad;
758
-
759
- if (exenv.canUseDOM) {
760
- var script = require('scriptjs');
761
-
762
- script(twitterWidgetJs, 'twitter-embed', function () {
763
- if (!window.twttr) {
764
- console.error('Failure to load window.twttr in TwitterMentionButton, aborting load.');
765
- return;
766
- }
767
-
768
- if (!_this2.isMountCanceled) {
769
- window.twttr.widgets.createMentionButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
770
- _this2.setState({
771
- isLoading: false
772
- });
773
-
774
- if (onLoad) {
775
- onLoad(element);
776
- }
777
- });
778
- }
779
- });
780
- }
781
- }
782
- }, {
783
- key: "componentWillUnmount",
784
- value: function componentWillUnmount() {
785
- this.isMountCanceled = true;
786
- }
787
- }, {
788
- key: "render",
789
- value: function render() {
790
- var isLoading = this.state.isLoading;
791
- var placeholder = this.props.placeholder;
792
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
793
- ref: "embedContainer"
794
- }));
795
- }
796
- }]);
797
-
798
- return TwitterMentionButton;
799
- }(React.Component);
800
-
801
- _defineProperty(TwitterMentionButton, "propTypes", {
802
- /**
803
- * Username to which you will need to tweet
804
- */
805
- screenName: PropTypes__default.string.isRequired,
806
-
807
- /**
808
- * Additional options for overriding config.
809
- */
810
- options: PropTypes__default.object,
811
-
812
- /**
813
- * Placeholder while tweet is loading
814
- */
815
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
816
-
817
- /**
818
- * Function to execute after load, return html element
819
- */
820
- onLoad: PropTypes__default.func
821
- });
822
-
823
- var TwitterTweetEmbed =
824
- /*#__PURE__*/
825
- function (_Component) {
826
- _inherits(TwitterTweetEmbed, _Component);
827
-
828
- function TwitterTweetEmbed(props) {
829
- var _this;
830
-
831
- _classCallCheck(this, TwitterTweetEmbed);
832
-
833
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTweetEmbed).call(this, props));
834
- _this.state = {
835
- isLoading: true
836
- };
837
- return _this;
838
- }
839
-
840
- _createClass(TwitterTweetEmbed, [{
841
- key: "renderWidget",
842
- value: function renderWidget() {
843
- var _this2 = this;
844
-
845
- var onLoad = this.props.onLoad;
846
-
847
- if (!window.twttr) {
848
- console.error('Failure to load window.twttr in TwitterTweetEmbed, aborting load.');
849
- return;
850
- }
851
-
852
- if (!this.isMountCanceled) {
853
- window.twttr.widgets.createTweet(this.props.tweetId, this.refs.embedContainer, this.props.options).then(function (element) {
854
- _this2.setState({
855
- isLoading: false
856
- });
857
-
858
- if (onLoad) {
859
- onLoad(element);
860
- }
861
- });
862
- }
863
- }
864
- }, {
865
- key: "componentDidMount",
866
- value: function componentDidMount() {
867
- var _this3 = this;
868
-
869
- if (exenv.canUseDOM) {
870
- var script = require('scriptjs');
871
-
872
- script(twitterWidgetJs, 'twitter-embed', function () {
873
- _this3.renderWidget();
874
- });
875
- }
876
- }
877
- }, {
878
- key: "componentWillUnmount",
879
- value: function componentWillUnmount() {
880
- this.isMountCanceled = true;
881
- }
882
- }, {
883
- key: "render",
884
- value: function render() {
885
- var isLoading = this.state.isLoading;
886
- var placeholder = this.props.placeholder;
887
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
888
- ref: "embedContainer"
889
- }));
890
- }
891
- }]);
892
-
893
- return TwitterTweetEmbed;
894
- }(React.Component);
895
-
896
- _defineProperty(TwitterTweetEmbed, "propTypes", {
897
- /**
898
- * Tweet id that needs to be shown
899
- */
900
- tweetId: PropTypes__default.string.isRequired,
901
-
902
- /**
903
- * Additional options to pass to twitter widget plugin
904
- */
905
- options: PropTypes__default.object,
906
-
907
- /**
908
- * Placeholder while tweet is loading
909
- */
910
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
911
-
912
- /**
913
- * Function to execute after load, return html element
914
- */
915
- onLoad: PropTypes__default.func
916
- });
917
-
918
- var TwitterMomentShare =
919
- /*#__PURE__*/
920
- function (_Component) {
921
- _inherits(TwitterMomentShare, _Component);
922
-
923
- function TwitterMomentShare(props) {
924
- var _this;
925
-
926
- _classCallCheck(this, TwitterMomentShare);
927
-
928
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMomentShare).call(this, props));
929
- _this.state = {
930
- isLoading: true
931
- };
932
- return _this;
933
- }
934
-
935
- _createClass(TwitterMomentShare, [{
936
- key: "componentDidMount",
937
- value: function componentDidMount() {
938
- var _this2 = this;
939
-
940
- var onLoad = this.props.onLoad;
941
-
942
- if (exenv.canUseDOM) {
943
- var script = require('scriptjs');
944
-
945
- script(twitterWidgetJs, 'twitter-embed', function () {
946
- if (!window.twttr) {
947
- console.error('Failure to load window.twttr in TwitterMomentShare, aborting load.');
948
- return;
949
- }
950
-
951
- if (!_this2.isMountCanceled) {
952
- window.twttr.widgets.createMoment(_this2.props.momentId, _this2.refs.shareMoment, _this2.props.options).then(function (element) {
953
- _this2.setState({
954
- isLoading: false
955
- });
956
-
957
- if (onLoad) {
958
- onLoad(element);
959
- }
960
- });
961
- }
962
- });
963
- }
964
- }
965
- }, {
966
- key: "componentWillUnmount",
967
- value: function componentWillUnmount() {
968
- this.isMountCanceled = true;
969
- }
970
- }, {
971
- key: "render",
972
- value: function render() {
973
- var isLoading = this.state.isLoading;
974
- var placeholder = this.props.placeholder;
975
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
976
- ref: "shareMoment"
977
- }));
978
- }
979
- }]);
980
-
981
- return TwitterMomentShare;
982
- }(React.Component);
983
-
984
- _defineProperty(TwitterMomentShare, "propTypes", {
985
- /**
986
- * id of Twitter moment to show
987
- */
988
- momentId: PropTypes__default.string.isRequired,
989
-
990
- /**
991
- * Additional options for overriding config.
992
- */
993
- options: PropTypes__default.object,
994
-
995
- /**
996
- * Placeholder while tweet is loading
997
- */
998
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
999
-
1000
- /**
1001
- * Function to execute after load, return html element
1002
- */
1003
- onLoad: PropTypes__default.func
1004
- });
1005
-
1006
- var TwitterDMButton =
1007
- /*#__PURE__*/
1008
- function (_Component) {
1009
- _inherits(TwitterDMButton, _Component);
1010
-
1011
- function TwitterDMButton(props) {
1012
- var _this;
1013
-
1014
- _classCallCheck(this, TwitterDMButton);
1015
-
1016
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterDMButton).call(this, props));
1017
- _this.state = {
1018
- isLoading: true
1019
- };
1020
- return _this;
1021
- }
1022
-
1023
- _createClass(TwitterDMButton, [{
1024
- key: "componentDidMount",
1025
- value: function componentDidMount() {
1026
- var _this2 = this;
1027
-
1028
- var onLoad = this.props.onLoad;
1029
-
1030
- if (exenv.canUseDOM) {
1031
- var script = require('scriptjs');
1032
-
1033
- script(twitterWidgetJs, 'twitter-embed', function () {
1034
- if (!window.twttr) {
1035
- console.error('Failure to load window.twttr in TwitterDMButton, aborting load.');
1036
- return;
1037
- }
1038
-
1039
- if (!_this2.isMountCanceled) {
1040
- window.twttr.widgets.createDMButton(_this2.props.id, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
1041
- _this2.setState({
1042
- isLoading: false
1043
- });
1044
-
1045
- if (onLoad) {
1046
- onLoad(element);
1047
- }
1048
- });
1049
- }
1050
- });
1051
- }
1052
- }
1053
- }, {
1054
- key: "componentWillUnmount",
1055
- value: function componentWillUnmount() {
1056
- this.isMountCanceled = true;
1057
- }
1058
- }, {
1059
- key: "render",
1060
- value: function render() {
1061
- var isLoading = this.state.isLoading;
1062
- var placeholder = this.props.placeholder;
1063
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
1064
- ref: "embedContainer"
1065
- }));
1066
- }
1067
- }]);
1068
-
1069
- return TwitterDMButton;
1070
- }(React.Component);
1071
-
1072
- _defineProperty(TwitterDMButton, "propTypes", {
1073
- /**
1074
- * Twitter user id for DM button
1075
- */
1076
- id: PropTypes__default.number.isRequired,
1077
-
1078
- /**
1079
- * Additional options to be added to the button
1080
- */
1081
- options: PropTypes__default.object,
1082
-
1083
- /**
1084
- * Placeholder while tweet is loading
1085
- */
1086
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
1087
-
1088
- /**
1089
- * Function to execute after load, return html element
1090
- */
1091
- onLoad: PropTypes__default.func
1092
- });
1093
-
1094
- var TwitterVideoEmbed =
1095
- /*#__PURE__*/
1096
- function (_Component) {
1097
- _inherits(TwitterVideoEmbed, _Component);
1098
-
1099
- function TwitterVideoEmbed(props) {
1100
- var _this;
1101
-
1102
- _classCallCheck(this, TwitterVideoEmbed);
1103
-
1104
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterVideoEmbed).call(this, props));
1105
- _this.state = {
1106
- isLoading: true
1107
- };
1108
- return _this;
1109
- }
1110
-
1111
- _createClass(TwitterVideoEmbed, [{
1112
- key: "componentDidMount",
1113
- value: function componentDidMount() {
1114
- var _this2 = this;
1115
-
1116
- var onLoad = this.props.onLoad;
1117
-
1118
- if (exenv.canUseDOM) {
1119
- var script = require('scriptjs');
1120
-
1121
- script(twitterWidgetJs, 'twitter-embed', function () {
1122
- if (!window.twttr) {
1123
- console.error('Failure to load window.twttr in TwitterVideoEmbed, aborting load.');
1124
- return;
1125
- }
1126
-
1127
- if (!_this2.isMountCanceled) {
1128
- window.twttr.widgets.createVideo(_this2.props.id, _this2.refs.embedContainer).then(function (element) {
1129
- _this2.setState({
1130
- isLoading: false
1131
- });
1132
-
1133
- if (onLoad) {
1134
- onLoad(element);
1135
- }
1136
- });
1137
- }
1138
- });
1139
- }
1140
- }
1141
- }, {
1142
- key: "componentWillUnmount",
1143
- value: function componentWillUnmount() {
1144
- this.isMountCanceled = true;
1145
- }
1146
- }, {
1147
- key: "render",
1148
- value: function render() {
1149
- var isLoading = this.state.isLoading;
1150
- var placeholder = this.props.placeholder;
1151
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
1152
- ref: "embedContainer"
1153
- }));
1154
- }
1155
- }]);
1156
-
1157
- return TwitterVideoEmbed;
1158
- }(React.Component);
1159
-
1160
- _defineProperty(TwitterVideoEmbed, "propTypes", {
1161
- /**
1162
- * Id of video tweet.
1163
- */
1164
- id: PropTypes__default.string.isRequired,
1165
-
1166
- /**
1167
- * Placeholder while tweet is loading
1168
- */
1169
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
1170
-
1171
- /**
1172
- * Function to execute after load, return html element
1173
- */
1174
- onLoad: PropTypes__default.func
1175
- });
1176
-
1177
- var TwitterOnAirButton =
1178
- /*#__PURE__*/
1179
- function (_Component) {
1180
- _inherits(TwitterOnAirButton, _Component);
1181
-
1182
- function TwitterOnAirButton(props) {
1183
- var _this;
1184
-
1185
- _classCallCheck(this, TwitterOnAirButton);
1186
-
1187
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterOnAirButton).call(this, props));
1188
- _this.state = {
1189
- isLoading: true
1190
- };
1191
- return _this;
1192
- }
1193
-
1194
- _createClass(TwitterOnAirButton, [{
1195
- key: "componentDidMount",
1196
- value: function componentDidMount() {
1197
- var _this2 = this;
1198
-
1199
- var onLoad = this.props.onLoad;
1200
-
1201
- if (exenv.canUseDOM) {
1202
- var script = require('scriptjs');
1203
-
1204
- script(twitterWidgetJs, 'twitter-embed', function () {
1205
- if (!window.twttr) {
1206
- console.error('Failure to load window.twttr in TwitterOnAirButton, aborting load.');
1207
- return;
1208
- }
1209
-
1210
- if (!_this2.isMountCanceled) {
1211
- window.twttr.widgets.createPeriscopeOnAirButton(_this2.props.username, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
1212
- _this2.setState({
1213
- isLoading: false
1214
- });
1215
-
1216
- if (onLoad) {
1217
- onLoad(element);
1218
- }
1219
- });
1220
- }
1221
- });
1222
- }
1223
- }
1224
- }, {
1225
- key: "componentWillUnmount",
1226
- value: function componentWillUnmount() {
1227
- this.isMountCanceled = true;
1228
- }
1229
- }, {
1230
- key: "render",
1231
- value: function render() {
1232
- var isLoading = this.state.isLoading;
1233
- var placeholder = this.props.placeholder;
1234
- return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
1235
- ref: "embedContainer"
1236
- }));
1237
- }
1238
- }]);
1239
-
1240
- return TwitterOnAirButton;
1241
- }(React.Component);
1242
-
1243
- _defineProperty(TwitterOnAirButton, "propTypes", {
1244
- /**
1245
- * Username for which you require periscope on air button
1246
- */
1247
- username: PropTypes__default.string.isRequired,
1248
-
1249
- /**
1250
- * Additional options for overriding config.
1251
- */
1252
- options: PropTypes__default.object,
1253
-
1254
- /**
1255
- * Placeholder while tweet is loading
1256
- */
1257
- placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),
1258
-
1259
- /**
1260
- * Function to execute after load, return html element
1261
- */
1262
- onLoad: PropTypes__default.func
1263
- });
66
+ var reactTwitterEmbed = require('react-twitter-embed');
1264
67
 
1265
68
  var ImageSlider = function ImageSlider(props) {
1266
69
  var innerSlider = React.useRef(null);
@@ -1490,7 +293,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
1490
293
  partnerDetails.description && React__default.createElement(
1491
294
  'div',
1492
295
  { className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
1493
- React__default.createElement(BlockContent.BlockContent, _extends$1._extends({ serializers: getSerializers.getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
296
+ React__default.createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers.getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
1494
297
  )
1495
298
  ),
1496
299
  partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default.createElement(
@@ -1514,7 +317,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
1514
317
  React__default.createElement(
1515
318
  'div',
1516
319
  { className: 'mb-5', style: { width: '100%', textAlign: 'center', padding: '0 15px', border: '2px solid #aaa', borderRadius: '15px' } },
1517
- React__default.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } })
320
+ React__default.createElement(reactTwitterEmbed.TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } })
1518
321
  )
1519
322
  ),
1520
323
  React__default.createElement(