@mjhls/mjh-framework 1.0.623-subNav-viewMore-hamNav → 1.0.624

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