@mjhls/mjh-framework 1.0.649 → 1.0.651

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