@mjhls/mjh-framework 1.0.993-topelement-v5 → 1.0.993

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