@mjhls/mjh-framework 1.0.537 → 1.0.540

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 (166) hide show
  1. package/README.md +172 -172
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +5 -5
  6. package/dist/cjs/ADFloatingFooter.js +5 -5
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSponsoredResources.js +2 -2
  9. package/dist/cjs/ADWebcast.js +2 -2
  10. package/dist/cjs/ADWelcome.js +2 -2
  11. package/dist/cjs/AccordionPanel.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 +10 -10
  15. package/dist/cjs/Auth.js +507 -256
  16. package/dist/cjs/{BlockContent-77f81ffc.js → BlockContent-f942392e.js} +1 -1
  17. package/dist/cjs/CMEDeck.js +5 -5
  18. package/dist/cjs/Column3.js +4 -4
  19. package/dist/cjs/ConferenceArticleCard.js +17 -17
  20. package/dist/cjs/DeckContent.js +15 -15
  21. package/dist/cjs/DeckQueue.js +6 -6
  22. package/dist/cjs/{Dfp-fcdeabc4.js → Dfp-fbe32b96.js} +1 -1
  23. package/dist/cjs/EventsDeck.js +22 -22
  24. package/dist/cjs/ExternalResources.js +6 -6
  25. package/dist/cjs/Feature.js +3 -3
  26. package/dist/cjs/ForbesHero.js +2 -2
  27. package/dist/cjs/GridContent.js +10 -10
  28. package/dist/cjs/GridHero.js +2 -2
  29. package/dist/cjs/GroupDeck.js +5 -5
  30. package/dist/cjs/HamMagazine.js +218 -39
  31. package/dist/cjs/Hero.js +1 -1
  32. package/dist/cjs/HorizontalHero.js +5 -5
  33. package/dist/cjs/IssueContentDeck.js +2 -2
  34. package/dist/cjs/IssueDeck.js +2 -2
  35. package/dist/cjs/IssueLanding.js +36 -36
  36. package/dist/cjs/KMTracker.js +15 -15
  37. package/dist/cjs/LeftNav.js +2 -2
  38. package/dist/cjs/MasterDeck.js +20 -23
  39. package/dist/cjs/NavDvm.js +214 -14
  40. package/dist/cjs/NavMagazine.js +212 -25
  41. package/dist/cjs/NavNative.js +201 -24
  42. package/dist/cjs/NavNormal.js +229 -10
  43. package/dist/cjs/OncliveHero.js +4 -4
  44. package/dist/cjs/OncliveLargeHero.js +2 -2
  45. package/dist/cjs/PartnerDetailListing.js +14 -1210
  46. package/dist/cjs/PdfDownload.js +2 -2
  47. package/dist/cjs/PublicationDeck.js +1 -1
  48. package/dist/cjs/PublicationLanding.js +41 -34
  49. package/dist/cjs/QueueDeckExpanded.js +9 -9
  50. package/dist/cjs/RelatedContent.js +30 -30
  51. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  52. package/dist/cjs/SideFooter.js +2 -2
  53. package/dist/cjs/TaxonomyCard.js +2 -2
  54. package/dist/cjs/TemplateNormal.js +9 -9
  55. package/dist/cjs/ThumbnailCard.js +1 -1
  56. package/dist/cjs/Ustream.js +7 -7
  57. package/dist/cjs/VerticalHero.js +2 -2
  58. package/dist/cjs/VideoSeriesFilter.js +1 -1
  59. package/dist/cjs/VideoSeriesListing.js +6 -6
  60. package/dist/cjs/View.js +38 -38
  61. package/dist/cjs/YahooHero.js +2 -2
  62. package/dist/cjs/YoutubeGroup.js +5 -5
  63. package/dist/cjs/getQuery.js +1 -1
  64. package/dist/cjs/getRelatedArticle.js +6 -355
  65. package/dist/cjs/getSerializers.js +449 -437
  66. package/dist/cjs/{getTargeting-3d208b98.js → getTargeting-b15993cb.js} +11 -11
  67. package/dist/cjs/getTargeting.js +1 -1
  68. package/dist/cjs/{iconBase-637d3f1e.js → iconBase-68959171.js} +1 -0
  69. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  70. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  71. package/dist/cjs/{index-fa3cec70.js → index-f7ee1612.js} +4 -6
  72. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  73. package/dist/cjs/index.esm-0e5c6a9e.js +11 -0
  74. package/dist/cjs/{index.esm-c0d8b44b.js → index.esm-66ffa47a.js} +1 -1
  75. package/dist/cjs/{index.esm-25423c2f.js → index.esm-89fabc47.js} +1 -1
  76. package/dist/cjs/{index.esm-fcdbd2c6.js → index.esm-fbd1f7e9.js} +1 -1
  77. package/dist/cjs/index.js +23 -21
  78. package/dist/cjs/{main-88348b15.js → main-bc4db521.js} +66 -35
  79. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  80. package/dist/cjs/urlFor.js +2 -2
  81. package/dist/esm/AD.js +1 -1
  82. package/dist/esm/AD300x250.js +3 -3
  83. package/dist/esm/AD300x250x600.js +3 -3
  84. package/dist/esm/AD728x90.js +5 -5
  85. package/dist/esm/ADFloatingFooter.js +5 -5
  86. package/dist/esm/ADGutter.js +2 -2
  87. package/dist/esm/ADSponsoredResources.js +2 -2
  88. package/dist/esm/ADWebcast.js +2 -2
  89. package/dist/esm/ADWelcome.js +2 -2
  90. package/dist/esm/AccordionPanel.js +2 -2
  91. package/dist/esm/AdSlot.js +2 -2
  92. package/dist/esm/AdSlotsProvider.js +1 -1
  93. package/dist/esm/ArticleQueue.js +10 -10
  94. package/dist/esm/Auth.js +499 -248
  95. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
  96. package/dist/esm/CMEDeck.js +5 -5
  97. package/dist/esm/Column3.js +4 -4
  98. package/dist/esm/ConferenceArticleCard.js +17 -17
  99. package/dist/esm/DeckContent.js +15 -15
  100. package/dist/esm/DeckQueue.js +6 -6
  101. package/dist/esm/{Dfp-81a052c2.js → Dfp-ae9336e2.js} +1 -1
  102. package/dist/esm/EventsDeck.js +22 -22
  103. package/dist/esm/ExternalResources.js +6 -6
  104. package/dist/esm/Feature.js +3 -3
  105. package/dist/esm/ForbesHero.js +2 -2
  106. package/dist/esm/GridContent.js +10 -10
  107. package/dist/esm/GridHero.js +2 -2
  108. package/dist/esm/GroupDeck.js +5 -5
  109. package/dist/esm/HamMagazine.js +218 -39
  110. package/dist/esm/Hero.js +1 -1
  111. package/dist/esm/HorizontalHero.js +4 -4
  112. package/dist/esm/IssueContentDeck.js +2 -2
  113. package/dist/esm/IssueDeck.js +2 -2
  114. package/dist/esm/IssueLanding.js +36 -36
  115. package/dist/esm/KMTracker.js +15 -15
  116. package/dist/esm/LeftNav.js +2 -2
  117. package/dist/esm/MasterDeck.js +20 -23
  118. package/dist/esm/NavDvm.js +215 -15
  119. package/dist/esm/NavMagazine.js +212 -25
  120. package/dist/esm/NavNative.js +201 -24
  121. package/dist/esm/NavNormal.js +230 -11
  122. package/dist/esm/OncliveHero.js +4 -4
  123. package/dist/esm/OncliveLargeHero.js +2 -2
  124. package/dist/esm/PartnerDetailListing.js +12 -1208
  125. package/dist/esm/PdfDownload.js +2 -2
  126. package/dist/esm/PublicationDeck.js +1 -1
  127. package/dist/esm/PublicationLanding.js +41 -34
  128. package/dist/esm/QueueDeckExpanded.js +9 -9
  129. package/dist/esm/RelatedContent.js +30 -30
  130. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  131. package/dist/esm/SideFooter.js +2 -2
  132. package/dist/esm/TaxonomyCard.js +2 -2
  133. package/dist/esm/TemplateNormal.js +9 -9
  134. package/dist/esm/ThumbnailCard.js +1 -1
  135. package/dist/esm/Ustream.js +5 -5
  136. package/dist/esm/VerticalHero.js +2 -2
  137. package/dist/esm/VideoSeriesFilter.js +1 -1
  138. package/dist/esm/VideoSeriesListing.js +6 -6
  139. package/dist/esm/View.js +13 -13
  140. package/dist/esm/YahooHero.js +2 -2
  141. package/dist/esm/YoutubeGroup.js +5 -5
  142. package/dist/esm/getQuery.js +1 -1
  143. package/dist/esm/getRelatedArticle.js +6 -355
  144. package/dist/esm/getSerializers.js +449 -437
  145. package/dist/esm/{getTargeting-1f2c61e3.js → getTargeting-1a0bd08d.js} +9 -9
  146. package/dist/esm/getTargeting.js +1 -1
  147. package/dist/esm/{iconBase-6ee2f2fb.js → iconBase-602d52fe.js} +1 -1
  148. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  149. package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
  150. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  151. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  152. package/dist/esm/index.esm-16536e81.js +9 -0
  153. package/dist/esm/{index.esm-b97cf389.js → index.esm-4b1d94b7.js} +1 -1
  154. package/dist/esm/{index.esm-a7ad65ba.js → index.esm-9a4c8813.js} +1 -1
  155. package/dist/esm/{index.esm-9d6faf80.js → index.esm-b08f4b04.js} +1 -1
  156. package/dist/esm/index.js +21 -19
  157. package/dist/esm/{main-d7ee6151.js → main-7255814e.js} +65 -34
  158. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  159. package/dist/esm/urlFor.js +2 -2
  160. package/package.json +107 -107
  161. package/dist/cjs/index-bd6c9f56.js +0 -211
  162. package/dist/esm/index-db3bb315.js +0 -207
  163. /package/dist/cjs/{ADInfeed-d8e47444.js → ADInfeed-3404200f.js} +0 -0
  164. /package/dist/cjs/{ADlgInfeed-947c3a47.js → ADlgInfeed-2611e1a9.js} +0 -0
  165. /package/dist/esm/{ADInfeed-2eb234ae.js → ADInfeed-27674dc6.js} +0 -0
  166. /package/dist/esm/{ADlgInfeed-17c13711.js → ADlgInfeed-43060a77.js} +0 -0
@@ -13,30 +13,30 @@ import './web.dom.iterable-46c95e52.js';
13
13
  import './typeof-5f046efd.js';
14
14
  import './_is-array-dd5523d6.js';
15
15
  import React__default from 'react';
16
- import { l as lib_3 } from './index-3f4dd6f2.js';
16
+ import { l as lib_3 } from './index-93ec3c59.js';
17
17
  import 'prop-types';
18
18
  import Container from 'react-bootstrap/Container';
19
19
  import 'react-bootstrap/Row';
20
20
  import 'react-bootstrap/Col';
21
21
  import 'react-bootstrap/Card';
22
- import './moment-e2f9b20c.js';
22
+ import './moment-12415288.js';
23
23
  import { withRouter } from 'next/router';
24
24
  import './isSymbol-b7b7434f.js';
25
25
  import { d as debounce_1 } from './debounce-048d9cb6.js';
26
- import { I as InfiniteScroll } from './index.es-29c1cef5.js';
26
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
27
27
  import 'react-dom';
28
28
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
29
- import './index-73819142.js';
30
- import { m as main_36 } from './main-d7ee6151.js';
29
+ import './index-51a80699.js';
30
+ import { m as main_39 } from './main-7255814e.js';
31
31
  import './slicedToArray-f1e40361.js';
32
32
  import './stringify-e30bc114.js';
33
33
  import { _ as _Promise } from './asyncToGenerator-0379e924.js';
34
34
  import './_set-species-6f64f1c1.js';
35
35
  import './beam-a25bd8fd.js';
36
36
  import './AdSlot.js';
37
- import { A as ADInfeed } from './ADInfeed-2eb234ae.js';
37
+ import { A as ADInfeed } from './ADInfeed-27674dc6.js';
38
38
  import { l as lodash } from './lodash-17fdfebb.js';
39
- import { A as ADlgInfeed } from './ADlgInfeed-17c13711.js';
39
+ import { A as ADlgInfeed } from './ADlgInfeed-43060a77.js';
40
40
 
41
41
  var MasterDeck = function (_React$Component) {
42
42
  _inherits(MasterDeck, _React$Component);
@@ -188,14 +188,14 @@ var MasterDeck = function (_React$Component) {
188
188
  }
189
189
 
190
190
  // please leave this for later debug purpose : Yong Jun.
191
- /* console.log('page change reported', {
192
- currentPage: currentPage,
193
- pageNumber: pageNumber,
194
- pathname: pathname,
195
- path: path,
196
- newPath: newPath,
197
- firstPage: pageNumber === 1,
198
- queryString: queryString
191
+ /* console.log('page change reported', {
192
+ currentPage: currentPage,
193
+ pageNumber: pageNumber,
194
+ pathname: pathname,
195
+ path: path,
196
+ newPath: newPath,
197
+ firstPage: pageNumber === 1,
198
+ queryString: queryString
199
199
  }) */
200
200
 
201
201
  if (pageview) {
@@ -250,13 +250,6 @@ var MasterDeck = function (_React$Component) {
250
250
  !_this.state.dataRemapped && _this.setState({ dataRemapped: true }); // To detect if appending of insights ads are completed
251
251
  }
252
252
 
253
- // set dataRemap to true as there are no infeed or BI ads or window width is less than limit
254
- _this.componentDidUpdate = function () {
255
- if (typeof window !== 'undefined' && (!lgInfeedAd || !brandInsightAd || window.innerWidth < 1400) && !_this.state.dataRemapped) {
256
- !_this.state.dataRemapped && _this.setState({ dataRemapped: true });
257
- }
258
- };
259
-
260
253
  // Integrating infeed AD
261
254
  if (showBI && brandInsightAd) {
262
255
  // Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
@@ -320,7 +313,7 @@ var MasterDeck = function (_React$Component) {
320
313
  React__default.Fragment,
321
314
  { key: index },
322
315
  React__default.createElement(_this2.Deck, { data: row, variant: variant, index: index, client: _this.props.client, defaultImage: _this.defaultImage }),
323
- main_36 && _this.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
316
+ main_39 && _this.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
324
317
  'div',
325
318
  { className: 'ad-container', style: { margin: '0 auto' } },
326
319
  _this.renderMobileAd(index, numberOfItemsBeforeAd, _this.rightItems)
@@ -406,6 +399,10 @@ var MasterDeck = function (_React$Component) {
406
399
  query: this.props.query
407
400
  });
408
401
  }
402
+ // set dataRemap to true as there are no infeed or BI ads or window width is less than limit
403
+ if (typeof window !== 'undefined' && (!this.props.lgInfeedAd || !this.props.brandInsightAd || window.innerWidth < 1400) && !this.state.dataRemapped) {
404
+ !this.state.dataRemapped && this.setState({ dataRemapped: true });
405
+ }
409
406
  }
410
407
  }, {
411
408
  key: 'componentDidMount',
@@ -4,30 +4,84 @@ import './core.get-iterator-method-f5c0d66a.js';
4
4
  import './_library-528f1934.js';
5
5
  import './_iter-detect-6e099a34.js';
6
6
  import './web.dom.iterable-46c95e52.js';
7
- import React__default from 'react';
7
+ import React__default, { useRef, useState, useEffect } from 'react';
8
+ import 'prop-types';
8
9
  import Container from 'react-bootstrap/Container';
9
- import './slicedToArray-f1e40361.js';
10
+ import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
10
11
  import './stringify-e30bc114.js';
11
12
  import './asyncToGenerator-0379e924.js';
12
13
  import './_set-species-6f64f1c1.js';
13
14
  import { S as Segment } from './beam-a25bd8fd.js';
14
- import 'react-bootstrap/Button';
15
+ import { r as reactSocialIcons_1 } from './react-social-icons-a7d5c5c7.js';
16
+ import { I as IconContext } from './iconBase-602d52fe.js';
17
+ import Button from 'react-bootstrap/Button';
15
18
  import Nav from 'react-bootstrap/Nav';
16
19
  import Navbar from 'react-bootstrap/Navbar';
17
20
  import NavDropdown from 'react-bootstrap/NavDropdown';
18
- import 'react-bootstrap/Form';
19
- import 'react-bootstrap/FormControl';
20
- import Search from './Search.js';
21
21
  import { N as NavFooter } from './NavFooter-e27bd93b.js';
22
+ import { G as GoSearch } from './index.esm-16536e81.js';
23
+ import Form from 'react-bootstrap/Form';
24
+ import FormControl from 'react-bootstrap/FormControl';
22
25
 
23
26
  var NavDvm = function NavDvm(props) {
24
27
  var logo = props.logo,
25
28
  mobileLogo = props.mobileLogo,
26
29
  dataObject = props.dataObject,
27
30
  subNav = props.subNav,
28
- _props$website = props.website,
29
- website = _props$website === undefined ? {} : _props$website;
31
+ website = props.website;
32
+ // reference to mobile search component
30
33
 
34
+ var searchRef = useRef(null);
35
+ // Search Term
36
+
37
+ var _useState = useState(''),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ searchKey = _useState2[0],
40
+ setSearchKey = _useState2[1];
41
+ // reference to navigation component
42
+
43
+
44
+ var navRef = useRef(null);
45
+ var relNavRef = useRef(null);
46
+
47
+ useEffect(function () {
48
+ // Setting the top of the search component based on the offset of navigation component.
49
+ searchRef.current.style.top = navRef.current.offsetHeight + 1 + 'px';
50
+
51
+ // eslint-disable-next-line react-hooks/exhaustive-deps
52
+ }, []);
53
+
54
+ useEffect(function () {
55
+ // Making the search and navbar Sticky on scroll
56
+ var navOffsetTop = document.getElementById('navbar-dvm').offsetTop;
57
+ if (window.pageYOffset > navOffsetTop) {
58
+ if (navRef.current && navRef.current.style) {
59
+ searchRef.current.style.position = 'fixed';
60
+ searchRef.current.style.top = navRef.current.offsetHeight + 1 + 'px';
61
+ searchRef.current.style.zIndex = '99999';
62
+ searchRef.current.style.width = '100%';
63
+ }
64
+ }
65
+ var stickyNav = window.addEventListener('scroll', function () {
66
+ if (window.pageYOffset > navOffsetTop) {
67
+ if (navRef.current && navRef.current.style) {
68
+ searchRef.current.style.position = 'fixed';
69
+ searchRef.current.style.top = navRef.current.offsetHeight + 1 + 'px';
70
+ searchRef.current.style.zIndex = '99999';
71
+ searchRef.current.style.width = '100%';
72
+ }
73
+ } else {
74
+ if (navRef.current && navRef.current.style) {
75
+ searchRef.current.style.position = 'fixed';
76
+ searchRef.current.style.top = navRef.current.offsetHeight + 1 + 'px';
77
+ searchRef.current.style.width = '100%';
78
+ }
79
+ }
80
+ });
81
+ return function () {
82
+ window.removeEventListener('scroll', stickyNav);
83
+ };
84
+ }, []);
31
85
 
32
86
  var getLink = function getLink(url, className, name, key, blank) {
33
87
  var needSegmentSupport = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
@@ -48,6 +102,139 @@ var NavDvm = function NavDvm(props) {
48
102
  );
49
103
  };
50
104
 
105
+ // Search function
106
+ var submitSearch = function submitSearch(e) {
107
+ e.preventDefault();
108
+ window.location.href = '/search?searchTerm=' + searchKey;
109
+ };
110
+
111
+ // Toggling class of an element.Can't use toggle() as IE doesn't support toggle()
112
+ var toggleClass = function toggleClass(selector, type, addOn) {
113
+ if (type === 'id') {
114
+ var searchBar = document.getElementById(selector);
115
+ if (searchBar && searchBar.classList && searchBar.classList.contains(addOn)) {
116
+ searchBar.classList.remove(addOn);
117
+ } else if (searchBar && searchBar.classList) {
118
+ searchBar.classList.add(addOn);
119
+ }
120
+ } else if (type === 'class') {
121
+ var searchBtn = document.getElementsByClassName(selector)[0];
122
+ if (searchBtn && searchBtn.classList && searchBtn.classList.contains(addOn)) {
123
+ searchBtn.classList.remove(addOn);
124
+ } else if (searchBtn && searchBtn.classList) {
125
+ searchBtn.classList.add(addOn);
126
+ }
127
+ }
128
+ };
129
+
130
+ // Search Component
131
+ var socialSearchComponent = function socialSearchComponent(type) {
132
+ if (type === 'mobile') {
133
+ return React__default.createElement(
134
+ 'div',
135
+ { id: 'search-content-mobile' },
136
+ React__default.createElement(
137
+ 'div',
138
+ { id: 'search-bar-mobile', ref: searchRef },
139
+ React__default.createElement(
140
+ Form,
141
+ { inline: true, onSubmit: function onSubmit(e) {
142
+ return submitSearch(e);
143
+ } },
144
+ React__default.createElement(FormControl, { placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
145
+ return setSearchKey(e.target.value);
146
+ } }),
147
+ React__default.createElement(
148
+ Button,
149
+ { variant: 'primary', style: { backgroundColor: 'var(--primary)' }, onClick: function onClick(e) {
150
+ return submitSearch(e);
151
+ } },
152
+ 'Search'
153
+ )
154
+ )
155
+ ),
156
+ React__default.createElement(
157
+ IconContext.Provider,
158
+ { value: { color: 'white', className: 'search-btn-mobile', size: '50px' } },
159
+ React__default.createElement(GoSearch, {
160
+ onClick: function onClick() {
161
+ var navToggle = document.getElementsByClassName('navbar-toggler')[0];
162
+ if (navToggle && navToggle.classList && !navToggle.classList.contains('collapsed')) {
163
+ var nav = document.querySelectorAll('.navbar-collapse');
164
+ for (var i = 0; i < nav.length; i++) {
165
+ if (nav[i] && nav[i].classList) nav[i].classList.remove('show');
166
+ }
167
+ if (navToggle && navToggle.classList) navToggle.classList.add('collapsed');
168
+ }
169
+
170
+ toggleClass('search-bar-mobile', 'id', 'show');
171
+ toggleClass('search-btn-mobile', 'class', 'active-search');
172
+ }
173
+ })
174
+ ),
175
+ React__default.createElement(
176
+ 'style',
177
+ { jsx: 'true' },
178
+ '\n #search-content-mobile {\n display: flex;\n }\n @media screen and (min-width: 1200px) {\n #search-content-mobile {\n display: none;\n }\n }\n #search-content-mobile .search-btn-mobile {\n padding: 5px;\n position: absolute;\n right: 4%;\n height: 45px;\n width: 45px;\n margin-top: 4px;\n cursor: pointer;\n top: -20%;\n }\n #search-content-mobile #search-bar-mobile {\n position: fixed;\n display: none;\n background-color: #60bdcd;\n left: 0px;\n width: 100%;\n border-radius: 5px;\n padding: 10px;\n }\n #search-content-mobile #search-bar-mobile .form-inline {\n margin-top: 0px;\n width: 100% !important;\n }\n #search-content-mobile #search-bar-mobile .form-inline .form-control {\n width: 78%;\n border-radius: 5px;\n height: 45px;\n }\n #search-content-mobile #search-bar-mobile .form-inline .btn {\n width: 20%;\n border-radius: 5px;\n background-color: #040c5a;\n height: 45px;\n margin-left: 5px;\n }\n .show {\n display: block !important;\n }\n .active-search {\n border-radius: 5px;\n background-color: #60bdcd;\n border: 1px solid var(--secondary);\n }\n '
179
+ )
180
+ );
181
+ } else if (type === 'desktop') {
182
+ return React__default.createElement(
183
+ 'div',
184
+ { id: 'search-content-desktop' },
185
+ React__default.createElement(
186
+ 'div',
187
+ { id: 'search-bar-desktop' },
188
+ React__default.createElement(
189
+ Form,
190
+ { inline: true, onSubmit: function onSubmit(e) {
191
+ return submitSearch(e);
192
+ } },
193
+ React__default.createElement(FormControl, { placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
194
+ return setSearchKey(e.target.value);
195
+ } }),
196
+ React__default.createElement(
197
+ Button,
198
+ { variant: 'primary', style: { backgroundColor: 'var(--primary)' }, onClick: function onClick(e) {
199
+ return submitSearch(e);
200
+ } },
201
+ 'Search'
202
+ )
203
+ )
204
+ ),
205
+ React__default.createElement(
206
+ IconContext.Provider,
207
+ { value: { color: 'white', className: 'search-btn-desktop', size: '50px' } },
208
+ React__default.createElement(GoSearch, {
209
+ onClick: function onClick() {
210
+ toggleClass('search-bar-desktop', 'id', 'show');
211
+ toggleClass('search-btn-desktop', 'class', 'active-search');
212
+ }
213
+ })
214
+ ),
215
+ website && website.siteSettingCache && website.siteSettingCache.socialLinks && website.siteSettingCache.socialLinks.length !== 0 && React__default.createElement(
216
+ 'div',
217
+ { id: 'social-tab-desktop' },
218
+ website.siteSettingCache.socialLinks && website.siteSettingCache.socialLinks.map(function (row, index) {
219
+ return React__default.createElement(reactSocialIcons_1, {
220
+ target: row.blank ? '_blank' : '_self',
221
+ rel: 'noopener noreferrer',
222
+ key: index,
223
+ index: index,
224
+ url: row.url,
225
+ style: { width: 25, height: 25, marginRight: 3 }
226
+ });
227
+ })
228
+ ),
229
+ React__default.createElement(
230
+ 'style',
231
+ { jsx: 'true' },
232
+ '\n #social-tab-desktops {\n position: relative;\n display: flex;\n left: 0px;\n }\n @media screen and (max-width: 1199px) {\n #search-content-desktop {\n display: none !important;\n }\n }\n #search-content-desktop {\n display: flex;\n padding-top: 1px;\n height: 35px;\n position: absolute;\n right: 5%;\n }\n #search-content-desktop .search-btn-desktop {\n padding: 5px;\n height: 30px;\n width: 30px;\n margin: -1px 5px 0px 0px;\n cursor: pointer;\n }\n\n #search-content-desktop #search-bar-desktop {\n display: none;\n background-color: #60bdcd;\n position: relative;\n width: 400px;\n border-radius: 5px;\n height: 48px;\n top: 45px;\n }\n #search-content-desktop #search-bar-desktop .form-inline {\n padding: 5px;\n }\n #search-content-desktop #search-bar-desktop .form-inline .form-control {\n width: 78%;\n border-radius: 5px;\n }\n #search-content-desktop #search-bar-desktop .form-inline .btn {\n width: 20%;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n padding: 1px;\n }\n .show {\n display: block !important;\n }\n .active-search {\n border-radius: 5px;\n background-color: #60bdcd;\n border: 1px solid var(--secondary);\n }\n '
233
+ )
234
+ );
235
+ }
236
+ };
237
+
51
238
  return React__default.createElement(
52
239
  React__default.Fragment,
53
240
  null,
@@ -74,16 +261,29 @@ var NavDvm = function NavDvm(props) {
74
261
  ),
75
262
  React__default.createElement(
76
263
  Navbar,
77
- { className: 'bottom-nav', variant: 'dark', expand: 'xl', bg: 'primary', sticky: 'top' },
264
+ { id: 'navbar-dvm', className: 'bottom-nav', variant: 'dark', expand: 'xl', bg: 'primary', sticky: 'top', ref: navRef },
78
265
  React__default.createElement(
79
266
  Container,
80
- { className: 'mobile-nav position-relative' },
267
+ { className: 'mobile-nav position-relative', ref: relNavRef },
81
268
  mobileLogo && React__default.createElement(
82
269
  'a',
83
270
  { href: '/', className: 'mobile-logo' },
84
271
  React__default.createElement('img', { src: mobileLogo })
85
272
  ),
86
- React__default.createElement(Navbar.Toggle, { 'aria-controls': 'basic-navbar-nav' }),
273
+ React__default.createElement(Navbar.Toggle, {
274
+ 'aria-controls': 'basic-navbar-nav',
275
+ onClick: function onClick() {
276
+ var searchBar = document.getElementById('search-bar-mobile');
277
+ var searchBtn = document.getElementsByClassName('search-btn-mobile');
278
+ if (searchBar && searchBar.classList) {
279
+ searchBar.classList.remove('show');
280
+ }
281
+ if (searchBtn && searchBtn[0].classList) {
282
+ searchBtn[0].classList.remove('active-search');
283
+ }
284
+ }
285
+ }),
286
+ socialSearchComponent('mobile'),
87
287
  React__default.createElement(
88
288
  Navbar.Collapse,
89
289
  { id: 'basic-navbar-nav' },
@@ -126,8 +326,7 @@ var NavDvm = function NavDvm(props) {
126
326
  return getLink(row.url, 'nav-link', row.name, index, row.blank, row.needSegmentSupport);
127
327
  }
128
328
  })
129
- ),
130
- React__default.createElement(Search, null)
329
+ )
131
330
  ),
132
331
  subNav && React__default.createElement(
133
332
  Navbar.Collapse,
@@ -197,7 +396,8 @@ var NavDvm = function NavDvm(props) {
197
396
  { className: 'mr-auto' },
198
397
  React__default.createElement(NavFooter, { website: website })
199
398
  )
200
- )
399
+ ),
400
+ socialSearchComponent('desktop')
201
401
  )
202
402
  ),
203
403
  React__default.createElement(
@@ -212,7 +412,7 @@ var NavDvm = function NavDvm(props) {
212
412
  React__default.createElement(
213
413
  'style',
214
414
  { jsx: 'true' },
215
- '\n .mobile-logo {\n display: none;\n position: absolute;\n left: 50%;\n top: 0;\n height: 40px;\n transform: translateX(-50%);\n }\n .mobile-logo img {\n height: 100%;\n }\n @media screen and (max-width: 1192px) {\n .mobile-logo {\n display: block;\n }\n .top-nav {\n display: none;\n }\n .navbar-expand-lg .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 20px;\n border-bottom: 0.5px solid white;\n margin-bottom: 15px;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n margin: 5px 0px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n }\n @media screen and (max-width: 991px) {\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n }\n @media screen and (min-width: 1200px) {\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n }\n '
415
+ '\n .mobile-logo {\n display: none;\n position: absolute;\n left: 50%;\n top: 0;\n height: 40px;\n transform: translateX(-50%);\n }\n .mobile-logo img {\n height: 100%;\n }\n @media screen and (max-width: 1199px) {\n .mobile-logo {\n display: block;\n }\n .top-nav {\n display: none;\n }\n .navbar-expand-lg .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 20px;\n border-bottom: 0.5px solid white;\n margin-bottom: 15px;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n margin: 5px 0px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n /* To break text into next line */\n white-space: inherit !important;\n margin-bottom: 5px;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n }\n @media screen and (max-width: 991px) {\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n }\n @media screen and (min-width: 1200px) {\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n }\n '
216
416
  )
217
417
  );
218
418
  };