@mjhls/mjh-framework 1.0.689-segment → 1.0.689
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.
- package/README.md +1 -1
- package/dist/cjs/Auth.js +206 -6
- package/dist/cjs/NavNative.js +4 -18
- package/dist/cjs/PartnerDetailListing.js +4 -1201
- package/dist/cjs/View.js +2 -2
- package/dist/cjs/getRelatedArticle.js +5 -416
- package/dist/cjs/index.js +4 -3
- package/dist/esm/Auth.js +201 -1
- package/dist/esm/NavNative.js +4 -18
- package/dist/esm/PartnerDetailListing.js +4 -1200
- package/dist/esm/View.js +2 -2
- package/dist/esm/getRelatedArticle.js +5 -416
- package/dist/esm/index.js +3 -2
- package/package.json +2 -2
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/esm/index-db3bb315.js +0 -207
package/dist/esm/NavNative.js
CHANGED
|
@@ -85,23 +85,13 @@ var NavNative = function NavNative(props) {
|
|
|
85
85
|
var topNavHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight;
|
|
86
86
|
// Setting the top of the search component based on the offset of navigation component.
|
|
87
87
|
searchRef.current.style.top = (topNavHeight ? topNavHeight + navRef.current.offsetHeight : navRef.current.offsetHeight) + 1 + 'px';
|
|
88
|
-
}, []);
|
|
89
|
-
|
|
90
|
-
useEffect(function () {
|
|
91
|
-
|
|
92
|
-
var navdropdowns = navRef.current.querySelectorAll('#basic-nav-dropdown');
|
|
93
|
-
console.log('navdropdowns:', navdropdowns);
|
|
94
88
|
|
|
95
89
|
setTimeout(function () {
|
|
96
|
-
|
|
97
90
|
var segmentLinks = navRef.current.querySelectorAll('a[needsegmentsupport="true"]');
|
|
98
|
-
console.log('segmentLinks:', segmentLinks);
|
|
99
91
|
for (var i = 0; i < segmentLinks.length; i++) {
|
|
100
92
|
var link = segmentLinks[i];
|
|
101
93
|
var href = link.getAttribute('href');
|
|
102
94
|
var newRef = Segment.getURL(href, { needSegmentSupport: true });
|
|
103
|
-
console.log('href:', href);
|
|
104
|
-
console.log('newRef:', newRef);
|
|
105
95
|
link.setAttribute('href', newRef);
|
|
106
96
|
}
|
|
107
97
|
}, 1000);
|
|
@@ -426,19 +416,15 @@ var NavNative = function NavNative(props) {
|
|
|
426
416
|
{ key: 'subnav-' + index },
|
|
427
417
|
React__default.createElement(
|
|
428
418
|
NavDropdown,
|
|
429
|
-
{ key: index, title: row.name, id: 'basic-nav-dropdown'
|
|
419
|
+
{ key: index, title: row.name, id: 'basic-nav-dropdown' },
|
|
430
420
|
row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
|
|
431
421
|
if (ddRow.type === 'divider') {
|
|
432
422
|
return React__default.createElement(NavDropdown.Divider, { key: subIndex });
|
|
433
423
|
} else {
|
|
434
424
|
return ddRow.url && ddRow.name ? React__default.createElement(
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
NavDropdown.Link,
|
|
439
|
-
{ key: subIndex, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', href: ddRow.url, target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
440
|
-
ddRow.name
|
|
441
|
-
)
|
|
425
|
+
'a',
|
|
426
|
+
{ key: subIndex, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', href: ddRow.url, target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
427
|
+
ddRow.name
|
|
442
428
|
) : null;
|
|
443
429
|
}
|
|
444
430
|
})
|