@mjhls/mjh-framework 1.0.844-beta.0 → 1.0.844-beta.1

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