@mjhls/mjh-framework 1.0.673-preview-ad-v1 → 1.0.673

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