@washingtonpost/site-footer
Advanced tools
Comparing version 0.4.15 to 0.4.16-experimental.0
@@ -1,558 +0,2 @@ | ||
var $kKGuy$react = require("react"); | ||
var $kKGuy$proptypes = require("prop-types"); | ||
var $kKGuy$washingtonpostsitecomponentscorehooks = require("@washingtonpost/site-components/core/hooks"); | ||
var $kKGuy$washingtonpostsitecomponentscoreutilities = require("@washingtonpost/site-components/core/utilities"); | ||
function $parcel$export(e, n, v, s) { | ||
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); | ||
} | ||
function $parcel$interopDefault(a) { | ||
return a && a.__esModule ? a.default : a; | ||
} | ||
$parcel$export(module.exports, "Grid", () => $1d69d9c5e5b116b7$export$ef2184bd89960b14); | ||
$parcel$export(module.exports, "Column", () => $1d69d9c5e5b116b7$export$816b5d811295e6bc); | ||
$parcel$export(module.exports, "Footer", () => $89431fa8bdb22bf5$export$a06f1c675e846f6f); | ||
const $1d69d9c5e5b116b7$var$getClasses = (defaultClassNames = "", conditionalClassNames = { | ||
})=>{ | ||
let classes = defaultClassNames; | ||
Object.entries(conditionalClassNames).forEach(([classname, shouldApply])=>{ | ||
if (shouldApply) classes += ` ${classname}`; | ||
}); | ||
return classes.trim(); | ||
}; | ||
const $1d69d9c5e5b116b7$export$ef2184bd89960b14 = ({ as: as , children: children })=>{ | ||
const ComponentAsElement = as ? as : "div"; | ||
return(/*#__PURE__*/ ($parcel$interopDefault($kKGuy$react)).createElement(ComponentAsElement, { | ||
className: "mw-grid border-box grid w-100 pl-vw-sm pr-vw-sm gap-x-0 grid-cols-12 mr-auto ml-auto" | ||
}, children)); | ||
}; | ||
$1d69d9c5e5b116b7$export$ef2184bd89960b14.propTypes = { | ||
as: ($parcel$interopDefault($kKGuy$proptypes)).elementType, | ||
children: ($parcel$interopDefault($kKGuy$proptypes)).node.isRequired | ||
}; | ||
const $1d69d9c5e5b116b7$var$columnSize = [ | ||
"1", | ||
"2", | ||
"3", | ||
"4", | ||
"5", | ||
"6", | ||
"7", | ||
"8", | ||
"9", | ||
"10", | ||
"11", | ||
"12", | ||
"13" | ||
]; | ||
const $1d69d9c5e5b116b7$export$816b5d811295e6bc = ({ as: as , children: children , className: className = "" , span: span , start: start , end: end , spanMedium: spanMedium , startMedium: startMedium , endMedium: endMedium , spanLarge: spanLarge , startLarge: startLarge , endLarge: endLarge , ...otherProps })=>{ | ||
const columnClassName = $1d69d9c5e5b116b7$var$getClasses(`mw-100 border-box ${className}`, { | ||
[`col-span-${span}`]: span, | ||
[`col-start-${start}`]: start, | ||
[`col-end-${end}`]: end, | ||
[`col-span-${spanMedium}-md`]: spanMedium, | ||
[`col-start-${startMedium}-md`]: startMedium, | ||
[`col-end-${endMedium}-md`]: endMedium, | ||
[`col-span-${spanLarge}-lg`]: spanLarge, | ||
[`col-start-${startLarge}-lg`]: startLarge, | ||
[`col-end-${endLarge}-lg`]: endLarge | ||
}); | ||
const ComponentAsElement = as ? as : "div"; | ||
return(/*#__PURE__*/ ($parcel$interopDefault($kKGuy$react)).createElement(ComponentAsElement, { | ||
className: columnClassName, | ||
...otherProps | ||
}, children)); | ||
}; | ||
$1d69d9c5e5b116b7$export$816b5d811295e6bc.propTypes = { | ||
as: ($parcel$interopDefault($kKGuy$proptypes)).elementType, | ||
children: ($parcel$interopDefault($kKGuy$proptypes)).node, | ||
className: ($parcel$interopDefault($kKGuy$proptypes)).string, | ||
span: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
start: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
end: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
spanMedium: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
startMedium: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
endMedium: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
spanLarge: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
startLarge: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize), | ||
endLarge: ($parcel$interopDefault($kKGuy$proptypes)).oneOf($1d69d9c5e5b116b7$var$columnSize) | ||
}; | ||
const $89431fa8bdb22bf5$var$getClasses = (defaultClassNames = "", conditionalClassNames = { | ||
})=>{ | ||
let classes = defaultClassNames; | ||
Object.entries(conditionalClassNames).forEach(([classname, shouldApply])=>{ | ||
if (shouldApply) classes += ` ${classname}`; | ||
}); | ||
return classes.trim(); | ||
}; | ||
const $89431fa8bdb22bf5$export$97fc2a18d9188811 = [ | ||
{ | ||
name: "About The Post", | ||
url: "https://www.washingtonpost.com/about-the-post/" | ||
}, | ||
{ | ||
name: "Newsroom Policies & Standards", | ||
url: "https://www.washingtonpost.com/policies-and-standards/" | ||
}, | ||
{ | ||
name: "Diversity and Inclusion", | ||
url: "https://washingtonpost.com/about-the-post/workforce-demographics/" | ||
}, | ||
{ | ||
name: "Careers", | ||
url: "https://careers.washingtonpost.com/" | ||
}, | ||
{ | ||
name: "Media & Community Relations", | ||
url: "https://www.washingtonpost.com/public-relations/" | ||
}, | ||
{ | ||
name: "WP Creative Group", | ||
url: "https://www.washingtonpost.com/brand-studio/archive/" | ||
}, | ||
{ | ||
name: "Accessibility Statement", | ||
url: "https://www.washingtonpost.com/accessibility/" | ||
} | ||
]; | ||
const $89431fa8bdb22bf5$export$7b19f4583cbf3961 = { | ||
title: "Company", | ||
links: $89431fa8bdb22bf5$export$97fc2a18d9188811 | ||
}; | ||
const $89431fa8bdb22bf5$export$25cc1b215872af00 = "https://www.washingtonpost.com"; | ||
const $89431fa8bdb22bf5$export$1b84743f8a5f3d14 = "washingtonpost.com"; | ||
const $89431fa8bdb22bf5$export$4ab8c75045d12480 = `© 1996-${new Date().getFullYear()} The Washington Post`; | ||
/** | ||
* CCPA variables | ||
*/ const $89431fa8bdb22bf5$var$CCPA_TEXT = "Do Not Sell My Personal Information"; | ||
const $89431fa8bdb22bf5$var$CCPA_URL = "/my-post/privacy-settings"; | ||
const $89431fa8bdb22bf5$export$5449d45792fffd55 = { | ||
name: $89431fa8bdb22bf5$var$CCPA_TEXT, | ||
url: $89431fa8bdb22bf5$var$CCPA_URL | ||
}; | ||
const $89431fa8bdb22bf5$export$64f4d8e69b13c00b = [ | ||
{ | ||
name: "CA Notice of Collection", | ||
url: "https://www.washingtonpost.com/privacy-policy/2011/11/18/gIQASIiaiN_story.html#CALIFORNIA" | ||
}, | ||
$89431fa8bdb22bf5$export$5449d45792fffd55 | ||
]; | ||
const $89431fa8bdb22bf5$export$e2d5d1b72024844a = [ | ||
{ | ||
name: "About The Post", | ||
url: "https://www.washingtonpost.com/about-the-post/" | ||
}, | ||
{ | ||
name: "Contact the Newsroom", | ||
url: "https://helpcenter.washingtonpost.com/hc/en-us/articles/360002940991-Leadership-of-The-Washington-Post-newsroom" | ||
}, | ||
{ | ||
name: "Contact Customer Care", | ||
url: "https://helpcenter.washingtonpost.com/hc/en-us" | ||
}, | ||
{ | ||
name: "Request a Correction", | ||
url: "https://helpcenter.washingtonpost.com/hc/en-us/articles/115003675928-Submit-a-correction" | ||
}, | ||
{ | ||
name: "Send a News Tip", | ||
url: "https://www.washingtonpost.com/anonymous-news-tips/" | ||
}, | ||
{ | ||
name: "Report a Vulnerability", | ||
url: "https://www.washingtonpost.com/discussions/2021/05/13/vulnerability-disclosure-policy/" | ||
}, | ||
{ | ||
name: "Download the Washington Post App", | ||
url: "https://wapo.onelink.me/e76N/8081805d" | ||
}, | ||
{ | ||
name: "Policies & Standards", | ||
url: "/policies-and-standards/" | ||
}, | ||
{ | ||
name: "Terms of Service", | ||
url: "/terms-of-service/2011/11/18/gIQAldiYiN_story.html" | ||
}, | ||
{ | ||
name: "Privacy Policy", | ||
url: "/privacy-policy/2011/11/18/gIQASIiaiN_story.html" | ||
}, | ||
{ | ||
name: "Cookie Settings", | ||
url: "https://www.washingtonpost.com/cookie-policy/" | ||
}, | ||
{ | ||
name: "Print Products Terms of Sale", | ||
url: "/terms-of-sale-for-print-products/2014/05/08/d60c4bc8-d6c0-11e3-aae8-c2d44bd79778_story.html" | ||
}, | ||
{ | ||
name: "Digital Products Terms of Sale", | ||
url: "/terms-of-sale-for-digital-products/2014/05/06/b7763844-cbf9-11e3-93eb-6c0037dde2ad_story.html" | ||
}, | ||
{ | ||
name: "Submissions & Discussion Policy", | ||
url: "/discussions/2021/11/23/discussion-submission-guidelines/" | ||
}, | ||
{ | ||
name: "RSS Terms of Service", | ||
url: "/rss-terms-of-service/2012/01/16/gIQAadFYAQ_story.html" | ||
}, | ||
{ | ||
name: "Ad Choices", | ||
url: "/how-can-i-opt-out-of-online-advertising-cookies/2011/11/18/gIQABECbiN_story.html" | ||
} | ||
]; | ||
const $89431fa8bdb22bf5$var$MobileFooter = ({ mobileLinkData: mobileLinkData = [] })=>/*#__PURE__*/ $kKGuy$react.createElement("footer", { | ||
className: "b bt pt-sm" | ||
}, /*#__PURE__*/ $kKGuy$react.createElement("div", { | ||
className: "mr-gutter ml-gutter" | ||
}, /*#__PURE__*/ $kKGuy$react.createElement("ul", { | ||
className: "list-none pa-0 ml-0 mt-md mr-0 mb-md" | ||
}, /*#__PURE__*/ $kKGuy$react.createElement("li", null, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$FooterLink, { | ||
name: $89431fa8bdb22bf5$export$1b84743f8a5f3d14, | ||
url: $89431fa8bdb22bf5$export$25cc1b215872af00, | ||
className: "font--subhead lh-default font-xxxs gray-darkest font-bold" | ||
})), /*#__PURE__*/ $kKGuy$react.createElement("li", { | ||
"data-qa": "mobile-copyright", | ||
className: "mb-sm font--subhead lh-default font-xxxs gray-darkest" | ||
}, $89431fa8bdb22bf5$export$4ab8c75045d12480), mobileLinkData.map((link)=>/*#__PURE__*/ $kKGuy$react.createElement("li", { | ||
key: link.name | ||
}, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$FooterLink, { | ||
...link, | ||
className: "font--subhead font-xxxs gray-darkest" | ||
})) | ||
)))) | ||
; | ||
const $89431fa8bdb22bf5$var$getThePostLinks = [ | ||
{ | ||
name: "Manage Your Subscription", | ||
url: "https://subscribe.washingtonpost.com/profile/#!/profile/access", | ||
userRole: "subscriber" | ||
}, | ||
{ | ||
name: "Become a Subscriber", | ||
url: "https://subscribe.washingtonpost.com/acquisition/?p=s_v&s_l=ONSITE_FOOTER_DIGITAL", | ||
userRole: "non-subscriber" | ||
}, | ||
{ | ||
name: "Gift Subscriptions", | ||
url: "https://subscribe.washingtonpost.com/acquisition/?p=g_v&s_l=ONSITE_FOOTER_GIFT" | ||
}, | ||
{ | ||
name: "Mobile & Apps", | ||
url: "https://subscription.washingtonpost.com/mobile/" | ||
}, | ||
{ | ||
name: "Newsletters & Alerts", | ||
url: "https://washingtonpost.com/newsletters/" | ||
}, | ||
{ | ||
name: "Washington Post Live", | ||
url: "https://www.washingtonpost.com/washington-post-live/" | ||
}, | ||
{ | ||
name: "Reprints & Permissions", | ||
url: "https://www.washingtonpost.com/reprints-permissions/" | ||
}, | ||
{ | ||
name: "Post Store", | ||
url: "https://store.washingtonpost.com/" | ||
}, | ||
{ | ||
name: "Books & E-Books", | ||
url: "https://www.washingtonpost.com/photos-books/" | ||
}, | ||
{ | ||
name: "Newspaper in Education", | ||
url: "https://nie.washingtonpost.com" | ||
}, | ||
{ | ||
name: "Print Archives (Subscribers Only)", | ||
url: "https://search.proquest.com/?accountid=189667" | ||
}, | ||
{ | ||
name: "e-Replica", | ||
url: "https://www.washingtonpost.com/subscribe/signin/?case=ereplica" | ||
}, | ||
{ | ||
name: "Today’s Paper", | ||
url: "https://www.washingtonpost.com/todays_paper/updates" | ||
} | ||
]; | ||
const $89431fa8bdb22bf5$export$3c9e69fe1141b123 = { | ||
title: "Get The Post", | ||
links: $89431fa8bdb22bf5$var$getThePostLinks | ||
}; | ||
/** | ||
* Generate footer "Terms of Use" links | ||
* */ const $89431fa8bdb22bf5$var$termsOfUseLinks = [ | ||
{ | ||
name: "Digital Products Terms of Sale", | ||
url: "https://www.washingtonpost.com/terms-of-sale-for-digital-products/2014/05/06/b7763844-cbf9-11e3-93eb-6c0037dde2ad_story.html" | ||
}, | ||
{ | ||
name: "Print Products Terms of Sale", | ||
url: "https://www.washingtonpost.com/terms-of-sale-for-print-products/2014/05/08/d60c4bc8-d6c0-11e3-aae8-c2d44bd79778_story.html" | ||
}, | ||
{ | ||
name: "Terms of Service", | ||
url: "https://www.washingtonpost.com/terms-of-service/2011/11/18/gIQAldiYiN_story.html" | ||
}, | ||
{ | ||
name: "Privacy Policy", | ||
url: "https://www.washingtonpost.com/privacy-policy/2011/11/18/gIQASIiaiN_story.html" | ||
}, | ||
{ | ||
name: "Cookie Settings", | ||
url: "https://www.washingtonpost.com/cookie-policy/" | ||
}, | ||
{ | ||
name: "Submissions & Discussion Policy", | ||
url: "/discussions/2021/11/23/discussion-submission-guidelines/" | ||
}, | ||
{ | ||
name: "RSS Terms of Service", | ||
url: "https://www.washingtonpost.com/rss-terms-of-service/2012/01/16/gIQAadFYAQ_story.html" | ||
}, | ||
{ | ||
name: "Ad Choices", | ||
url: "https://www.washingtonpost.com/how-can-i-opt-out-of-online-advertising-cookies/2011/11/18/gIQABECbiN_story.html" | ||
} | ||
]; | ||
const $89431fa8bdb22bf5$export$f7a028a762aa0ac6 = { | ||
title: "Terms of Use", | ||
links: $89431fa8bdb22bf5$var$termsOfUseLinks | ||
}; | ||
/** | ||
* Generate footer "Help" links | ||
* */ const $89431fa8bdb22bf5$var$helpLinks = [ | ||
{ | ||
name: "Contact the Newsroom", | ||
url: "https://helpcenter.washingtonpost.com/hc/en-us/articles/360002940991-Leadership-of-The-Washington-Post-newsroom" | ||
}, | ||
{ | ||
name: "Contact Customer Care", | ||
url: "https://helpcenter.washingtonpost.com/hc/en-us/" | ||
}, | ||
{ | ||
name: "Contact the Opinions team", | ||
url: "https://helpcenter.washingtonpost.com/hc/en-us/articles/360004745292-Leadership-of-The-Washington-Post-Opinions-section" | ||
}, | ||
{ | ||
name: "Advertise", | ||
url: "https://www.washingtonpost.com/mediakit/" | ||
}, | ||
{ | ||
name: "Licensing & Syndication", | ||
url: "https://www.washingtonpost.com/syndication/" | ||
}, | ||
{ | ||
name: "Request a Correction", | ||
url: "https://helpcenter.washingtonpost.com/hc/en-us/articles/115003675928-Submit-a-correction" | ||
}, | ||
{ | ||
name: "Send a News Tip", | ||
url: "https://www.washingtonpost.com/anonymous-news-tips/" | ||
}, | ||
{ | ||
name: "Report a Vulnerability", | ||
url: "https://www.washingtonpost.com/discussions/2021/05/13/vulnerability-disclosure-policy/" | ||
} | ||
]; | ||
const $89431fa8bdb22bf5$export$34512e3b2db52a4e = { | ||
title: "Contact Us", | ||
links: $89431fa8bdb22bf5$var$helpLinks | ||
}; | ||
const $89431fa8bdb22bf5$export$6bea50a77e2141fa = ()=>{ | ||
try { | ||
const raw = localStorage.getItem("wapo_identity"); | ||
return JSON.parse(raw) || { | ||
}; | ||
} catch (e) { | ||
// do nothing identity can't be found; | ||
return { | ||
}; | ||
} | ||
}; | ||
const $89431fa8bdb22bf5$export$3e316f8acc5818c0 = ()=>{ | ||
const identity = $89431fa8bdb22bf5$export$6bea50a77e2141fa(); | ||
if (identity) { | ||
const geoState = identity.geoState || ""; | ||
const addressState = identity.addressState || ""; | ||
return geoState.toUpperCase() === "CA" || addressState.toUpperCase() === "CA"; | ||
} | ||
return false; | ||
}; | ||
const $89431fa8bdb22bf5$var$DesktopFooter = ({ children: children , className: className })=>/*#__PURE__*/ $kKGuy$react.createElement("footer", { | ||
className: $89431fa8bdb22bf5$var$getClasses("dn flex-ns flex-column w-100 b bt", { | ||
[className]: className | ||
}) | ||
}, /*#__PURE__*/ $kKGuy$react.createElement("div", { | ||
className: "flex" | ||
}, children), /*#__PURE__*/ $kKGuy$react.createElement("div", { | ||
className: "w-100 b bt mt-sm pt-sm center font--subhead lh-default font-xxxxs font-xxxs-l gray-darkest", | ||
"data-qa": "desktop-copyright" | ||
}, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$FooterLink, { | ||
name: $89431fa8bdb22bf5$export$1b84743f8a5f3d14, | ||
url: $89431fa8bdb22bf5$export$25cc1b215872af00, | ||
className: "gray-darkest", | ||
dataQa: "desktop-footer-site-link" | ||
}), ` ${$89431fa8bdb22bf5$export$4ab8c75045d12480}`)) | ||
; | ||
const $89431fa8bdb22bf5$var$FooterSection = ({ title: title , children: children })=>{ | ||
return(/*#__PURE__*/ $kKGuy$react.createElement("div", { | ||
className: "flex-1 border-box", | ||
"data-qa": "footer-section" | ||
}, /*#__PURE__*/ $kKGuy$react.createElement("div", { | ||
"data-qa": "footer-section-title", | ||
className: "font--subhead lh-default font-xxxxs font-xxxs-l gray-darkest font-bold mt-md" | ||
}, title), /*#__PURE__*/ $kKGuy$react.createElement("ul", { | ||
className: "list-none pa-0 ml-0 mt-0 mb-md mr-0", | ||
"data-qa": "footer-section-list" | ||
}, children))); | ||
}; | ||
const $89431fa8bdb22bf5$var$FooterLink = ({ className: className , url: url , name: name , dataQa: dataQa })=>/*#__PURE__*/ $kKGuy$react.createElement("a", { | ||
href: url, | ||
className: $89431fa8bdb22bf5$var$getClasses("hover-blue", { | ||
[className]: className | ||
}), | ||
"data-qa": dataQa | ||
}, name) | ||
; | ||
const $89431fa8bdb22bf5$export$a96680420070074f = { | ||
className: ($parcel$interopDefault($kKGuy$proptypes)).string, | ||
url: ($parcel$interopDefault($kKGuy$proptypes)).string.isRequired, | ||
name: ($parcel$interopDefault($kKGuy$proptypes)).string.isRequired, | ||
dataQa: ($parcel$interopDefault($kKGuy$proptypes)).string | ||
}; | ||
$89431fa8bdb22bf5$var$FooterLink.propTypes = $89431fa8bdb22bf5$export$a96680420070074f; | ||
var $89431fa8bdb22bf5$export$2e2bcd8739ae039 = $89431fa8bdb22bf5$var$FooterLink; | ||
const $89431fa8bdb22bf5$export$bf99a782e77a03f4 = (link)=>{ | ||
return(/*#__PURE__*/ $kKGuy$react.createElement("li", { | ||
className: link.listItemClasses, | ||
"data-qa": "footer-section-link" | ||
}, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$FooterLink, { | ||
...link, | ||
className: "font--subhead lh-default font-xxxxs font-xxxs-l gray-darkest" | ||
}))); | ||
}; | ||
const $89431fa8bdb22bf5$export$bd7c423c3eca33c = ({ requiresAuth: requiresAuth = false , condition: condition , children: children })=>{ | ||
const [isClientSide, setClientSide] = $kKGuy$react.useState(false); | ||
$kKGuy$react.useEffect(()=>{ | ||
if (typeof window !== "undefined") setClientSide(true); | ||
}, []); | ||
if (requiresAuth) { | ||
if (condition) { | ||
if (isClientSide) return children; | ||
else return(/*#__PURE__*/ $kKGuy$react.createElement("li", null)); | ||
} else return(/*#__PURE__*/ $kKGuy$react.createElement("li", null)); | ||
} | ||
return children; | ||
}; | ||
$89431fa8bdb22bf5$export$bd7c423c3eca33c.propTypes = { | ||
link: ($parcel$interopDefault($kKGuy$proptypes)).object, | ||
condition: ($parcel$interopDefault($kKGuy$proptypes)).bool, | ||
children: ($parcel$interopDefault($kKGuy$proptypes)).node.isRequired, | ||
requiresAuth: ($parcel$interopDefault($kKGuy$proptypes)).bool | ||
}; | ||
const $89431fa8bdb22bf5$export$a06f1c675e846f6f = ({ isAmp: isAmp = false , env: env = "prod" , className: className })=>{ | ||
const useUserDataWithAmp = isAmp ? ()=>{ | ||
return { | ||
isAuthenticated: false, | ||
isSub: false | ||
}; // useUserData uses client side JS | ||
} : $kKGuy$washingtonpostsitecomponentscorehooks.useUserData; | ||
const { isAuthenticated: isAuthenticated = false } = useUserDataWithAmp({ | ||
env: env | ||
}); | ||
let showDoNotSell = false; | ||
function checkUserRole(userRole) { | ||
if (userRole === "subscriber" && $kKGuy$washingtonpostsitecomponentscoreutilities.isSubscriber()) return true; | ||
if (userRole === "non-subscriber" && $kKGuy$washingtonpostsitecomponentscoreutilities.isSubscriber() === false) return true; | ||
return false; | ||
} | ||
if (isAmp) showDoNotSell = true; | ||
else if ($89431fa8bdb22bf5$export$3e316f8acc5818c0()) showDoNotSell = true; | ||
// Based on showDoNotSell, assemble mobile link data | ||
const mobileLinkData = (()=>{ | ||
const linksGroup = showDoNotSell ? [ | ||
...$89431fa8bdb22bf5$export$e2d5d1b72024844a, | ||
...$89431fa8bdb22bf5$export$64f4d8e69b13c00b | ||
] : $89431fa8bdb22bf5$export$e2d5d1b72024844a; | ||
const formattedMobileLinks = isAmp ? linksGroup.map(({ url: url , ...rest })=>({ | ||
...rest, | ||
url: `${url}?itid=a_inl-amp` | ||
}) | ||
) : linksGroup; | ||
return formattedMobileLinks; | ||
})(); | ||
// Based on showDoNotSell, assemble desktop footer section data | ||
const footerSectionData = (()=>{ | ||
// Desktop footer data | ||
const doNotSellLink = showDoNotSell ? [ | ||
...$89431fa8bdb22bf5$export$64f4d8e69b13c00b | ||
] : []; | ||
return [ | ||
$89431fa8bdb22bf5$export$7b19f4583cbf3961, | ||
$89431fa8bdb22bf5$export$3c9e69fe1141b123, | ||
$89431fa8bdb22bf5$export$34512e3b2db52a4e, | ||
{ | ||
...$89431fa8bdb22bf5$export$f7a028a762aa0ac6, | ||
links: [ | ||
...$89431fa8bdb22bf5$export$f7a028a762aa0ac6.links, | ||
...doNotSellLink | ||
] | ||
} | ||
]; | ||
})(); | ||
return isAmp ? /*#__PURE__*/ $kKGuy$react.createElement("section", { | ||
"subscriptions-section": "content", | ||
className: className | ||
}, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$MobileFooter, { | ||
mobileLinkData: mobileLinkData | ||
})) : /*#__PURE__*/ $kKGuy$react.createElement($kKGuy$react.Fragment, null, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$DesktopFooter, { | ||
className: className | ||
}, footerSectionData.map(({ title: title , links: links })=>{ | ||
return(/*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$FooterSection, { | ||
key: title, | ||
title: title | ||
}, links.map((link)=>{ | ||
return(/*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$export$bd7c423c3eca33c, { | ||
key: link.name, | ||
requiresAuth: !!link.userRole, | ||
hasAuth: isAuthenticated, | ||
condition: checkUserRole(link.userRole) | ||
}, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$export$bf99a782e77a03f4, link))); | ||
}))); | ||
})), /*#__PURE__*/ $kKGuy$react.createElement("div", { | ||
className: $89431fa8bdb22bf5$var$getClasses("dn-ns", { | ||
[className]: className | ||
}) | ||
}, /*#__PURE__*/ $kKGuy$react.createElement($89431fa8bdb22bf5$var$MobileFooter, { | ||
mobileLinkData: mobileLinkData | ||
}))); | ||
}; | ||
$89431fa8bdb22bf5$export$a06f1c675e846f6f.propTypes = { | ||
isAmp: ($parcel$interopDefault($kKGuy$proptypes)).bool, | ||
env: ($parcel$interopDefault($kKGuy$proptypes)).oneOf([ | ||
"prod", | ||
"dev", | ||
"sandbox" | ||
]), | ||
className: ($parcel$interopDefault($kKGuy$proptypes)).string | ||
}; | ||
//# sourceMappingURL=index.js.map | ||
var K=Object.create;var g=Object.defineProperty,V=Object.defineProperties,z=Object.getOwnPropertyDescriptor,J=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertyNames,C=Object.getOwnPropertySymbols,Z=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var O=(t,s,e)=>s in t?g(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,p=(t,s)=>{for(var e in s||(s={}))v.call(s,e)&&O(t,e,s[e]);if(C)for(var e of C(s))R.call(s,e)&&O(t,e,s[e]);return t},b=(t,s)=>V(t,J(s)),D=t=>g(t,"__esModule",{value:!0});var k=(t,s)=>{var e={};for(var n in t)v.call(t,n)&&s.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&C)for(var n of C(t))s.indexOf(n)<0&&R.call(t,n)&&(e[n]=t[n]);return e};var tt=(t,s)=>{for(var e in s)g(t,e,{get:s[e],enumerable:!0})},E=(t,s,e,n)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of X(s))!v.call(t,r)&&(e||r!=="default")&&g(t,r,{get:()=>s[r],enumerable:!(n=z(s,r))||n.enumerable});return t},h=(t,s)=>E(D(g(t!=null?K(Z(t)):{},"default",!s&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),st=(t=>(s,e)=>t&&t.get(s)||(e=E(D({}),s,1),t&&t.set(s,e),e))(typeof WeakMap!="undefined"?new WeakMap:0);var yt={};tt(yt,{Column:()=>P,Footer:()=>L,Grid:()=>T});var A=h(require("react")),i=h(require("prop-types")),et=(t="",s={})=>{let e=t;return Object.entries(s).forEach(([n,r])=>{r&&(e+=` ${n}`)}),e.trim()},T=({as:t,children:s})=>A.default.createElement(t||"div",{className:"mw-grid border-box grid w-100 pl-vw-sm pr-vw-sm gap-x-0 grid-cols-12 mr-auto ml-auto"},s);T.propTypes={as:i.default.elementType,children:i.default.node.isRequired};var m=["1","2","3","4","5","6","7","8","9","10","11","12","13"],P=j=>{var f=j,{as:t,children:s,className:e="",span:n,start:r,end:u,spanMedium:x,startMedium:d,endMedium:S,spanLarge:a,startLarge:w,endLarge:c}=f,N=k(f,["as","children","className","span","start","end","spanMedium","startMedium","endMedium","spanLarge","startLarge","endLarge"]);let H=et(`mw-100 border-box ${e}`,{[`col-span-${n}`]:n,[`col-start-${r}`]:r,[`col-end-${u}`]:u,[`col-span-${x}-md`]:x,[`col-start-${d}-md`]:d,[`col-end-${S}-md`]:S,[`col-span-${a}-lg`]:a,[`col-start-${w}-lg`]:w,[`col-end-${c}-lg`]:c});return A.default.createElement(t||"div",p({className:H},N),s)};P.propTypes={as:i.default.elementType,children:i.default.node,className:i.default.string,span:i.default.oneOf(m),start:i.default.oneOf(m),end:i.default.oneOf(m),spanMedium:i.default.oneOf(m),startMedium:i.default.oneOf(m),endMedium:i.default.oneOf(m),spanLarge:i.default.oneOf(m),startLarge:i.default.oneOf(m),endLarge:i.default.oneOf(m)};var o=h(require("react")),l=h(require("prop-types")),G=h(require("@washingtonpost/site-components/core/hooks/index.js")),_=h(require("@washingtonpost/site-components/core/utilities/index.js")),I=(t="",s={})=>{let e=t;return Object.entries(s).forEach(([n,r])=>{r&&(e+=` ${n}`)}),e.trim()},ot=[{name:"About The Post",url:"https://www.washingtonpost.com/about-the-post/"},{name:"Newsroom Policies & Standards",url:"https://www.washingtonpost.com/policies-and-standards/"},{name:"Diversity and Inclusion",url:"https://washingtonpost.com/about-the-post/workforce-demographics/"},{name:"Careers",url:"https://careers.washingtonpost.com/"},{name:"Media & Community Relations",url:"https://www.washingtonpost.com/public-relations/"},{name:"WP Creative Group",url:"https://www.washingtonpost.com/brand-studio/archive/"},{name:"Accessibility Statement",url:"https://www.washingtonpost.com/accessibility/"}],nt={title:"Company",links:ot},M="https://www.washingtonpost.com",W="washingtonpost.com",Y=`\xA9 1996-${new Date().getFullYear()} The Washington Post`,rt="Do Not Sell My Personal Information",it="/my-post/privacy-settings",at={name:rt,url:it},F=[{name:"CA Notice of Collection",url:"https://www.washingtonpost.com/privacy-policy/2011/11/18/gIQASIiaiN_story.html#CALIFORNIA"},at],U=[{name:"About The Post",url:"https://www.washingtonpost.com/about-the-post/"},{name:"Contact the Newsroom",url:"https://helpcenter.washingtonpost.com/hc/en-us/articles/360002940991-Leadership-of-The-Washington-Post-newsroom"},{name:"Contact Customer Care",url:"https://helpcenter.washingtonpost.com/hc/en-us"},{name:"Request a Correction",url:"https://helpcenter.washingtonpost.com/hc/en-us/articles/115003675928-Submit-a-correction"},{name:"Send a News Tip",url:"https://www.washingtonpost.com/anonymous-news-tips/"},{name:"Report a Vulnerability",url:"https://www.washingtonpost.com/discussions/2021/05/13/vulnerability-disclosure-policy/"},{name:"Download the Washington Post App",url:"https://wapo.onelink.me/e76N/8081805d"},{name:"Policies & Standards",url:"/policies-and-standards/"},{name:"Terms of Service",url:"/terms-of-service/2011/11/18/gIQAldiYiN_story.html"},{name:"Privacy Policy",url:"/privacy-policy/2011/11/18/gIQASIiaiN_story.html"},{name:"Cookie Settings",url:"https://www.washingtonpost.com/cookie-policy/"},{name:"Print Products Terms of Sale",url:"/terms-of-sale-for-print-products/2014/05/08/d60c4bc8-d6c0-11e3-aae8-c2d44bd79778_story.html"},{name:"Digital Products Terms of Sale",url:"/terms-of-sale-for-digital-products/2014/05/06/b7763844-cbf9-11e3-93eb-6c0037dde2ad_story.html"},{name:"Submissions & Discussion Policy",url:"/discussions/2021/11/23/discussion-submission-guidelines/"},{name:"RSS Terms of Service",url:"/rss-terms-of-service/2012/01/16/gIQAadFYAQ_story.html"},{name:"Ad Choices",url:"/how-can-i-opt-out-of-online-advertising-cookies/2011/11/18/gIQABECbiN_story.html"}],$=({mobileLinkData:t=[]})=>o.createElement("footer",{className:"b bt pt-sm"},o.createElement("div",{className:"mr-gutter ml-gutter"},o.createElement("ul",{className:"list-none pa-0 ml-0 mt-md mr-0 mb-md"},o.createElement("li",null,o.createElement(y,{name:W,url:M,className:"font--subhead lh-default font-xxxs gray-darkest font-bold"})),o.createElement("li",{"data-qa":"mobile-copyright",className:"mb-sm font--subhead lh-default font-xxxs gray-darkest"},Y),t.map(s=>o.createElement("li",{key:s.name},o.createElement(y,b(p({},s),{className:"font--subhead font-xxxs gray-darkest"}))))))),lt=[{name:"Manage Your Subscription",url:"https://subscribe.washingtonpost.com/profile/#!/profile/access",userRole:"subscriber"},{name:"Become a Subscriber",url:"https://subscribe.washingtonpost.com/acquisition/?p=s_v&s_l=ONSITE_FOOTER_DIGITAL",userRole:"non-subscriber"},{name:"Gift Subscriptions",url:"https://subscribe.washingtonpost.com/acquisition/?p=g_v&s_l=ONSITE_FOOTER_GIFT"},{name:"Mobile & Apps",url:"https://subscription.washingtonpost.com/mobile/"},{name:"Newsletters & Alerts",url:"https://washingtonpost.com/newsletters/"},{name:"Washington Post Live",url:"https://www.washingtonpost.com/washington-post-live/"},{name:"Reprints & Permissions",url:"https://www.washingtonpost.com/reprints-permissions/"},{name:"Post Store",url:"https://store.washingtonpost.com/"},{name:"Books & E-Books",url:"https://www.washingtonpost.com/photos-books/"},{name:"Newspaper in Education",url:"https://nie.washingtonpost.com"},{name:"Print Archives (Subscribers Only)",url:"https://search.proquest.com/?accountid=189667"},{name:"e-Replica",url:"https://www.washingtonpost.com/subscribe/signin/?case=ereplica"},{name:"Today\u2019s Paper",url:"https://www.washingtonpost.com/todays_paper/updates"}],ct={title:"Get The Post",links:lt},mt=[{name:"Digital Products Terms of Sale",url:"https://www.washingtonpost.com/terms-of-sale-for-digital-products/2014/05/06/b7763844-cbf9-11e3-93eb-6c0037dde2ad_story.html"},{name:"Print Products Terms of Sale",url:"https://www.washingtonpost.com/terms-of-sale-for-print-products/2014/05/08/d60c4bc8-d6c0-11e3-aae8-c2d44bd79778_story.html"},{name:"Terms of Service",url:"https://www.washingtonpost.com/terms-of-service/2011/11/18/gIQAldiYiN_story.html"},{name:"Privacy Policy",url:"https://www.washingtonpost.com/privacy-policy/2011/11/18/gIQASIiaiN_story.html"},{name:"Cookie Settings",url:"https://www.washingtonpost.com/cookie-policy/"},{name:"Submissions & Discussion Policy",url:"/discussions/2021/11/23/discussion-submission-guidelines/"},{name:"RSS Terms of Service",url:"https://www.washingtonpost.com/rss-terms-of-service/2012/01/16/gIQAadFYAQ_story.html"},{name:"Ad Choices",url:"https://www.washingtonpost.com/how-can-i-opt-out-of-online-advertising-cookies/2011/11/18/gIQABECbiN_story.html"}],Q={title:"Terms of Use",links:mt},pt=[{name:"Contact the Newsroom",url:"https://helpcenter.washingtonpost.com/hc/en-us/articles/360002940991-Leadership-of-The-Washington-Post-newsroom"},{name:"Contact Customer Care",url:"https://helpcenter.washingtonpost.com/hc/en-us/"},{name:"Contact the Opinions team",url:"https://helpcenter.washingtonpost.com/hc/en-us/articles/360004745292-Leadership-of-The-Washington-Post-Opinions-section"},{name:"Advertise",url:"https://www.washingtonpost.com/mediakit/"},{name:"Licensing & Syndication",url:"https://www.washingtonpost.com/syndication/"},{name:"Request a Correction",url:"https://helpcenter.washingtonpost.com/hc/en-us/articles/115003675928-Submit-a-correction"},{name:"Send a News Tip",url:"https://www.washingtonpost.com/anonymous-news-tips/"},{name:"Report a Vulnerability",url:"https://www.washingtonpost.com/discussions/2021/05/13/vulnerability-disclosure-policy/"}],ut={title:"Contact Us",links:pt},ht=()=>{try{let t=localStorage.getItem("wapo_identity");return JSON.parse(t)||{}}catch{return{}}},dt=()=>{let t=ht();if(t){let s=t.geoState||"",e=t.addressState||"";return s.toUpperCase()==="CA"||e.toUpperCase()==="CA"}return!1},wt=({children:t,className:s})=>o.createElement("footer",{className:I("dn flex-ns flex-column w-100 b bt",{[s]:s})},o.createElement("div",{className:"flex"},t),o.createElement("div",{className:"w-100 b bt mt-sm pt-sm center font--subhead lh-default font-xxxxs font-xxxs-l gray-darkest","data-qa":"desktop-copyright"},o.createElement(y,{name:W,url:M,className:"gray-darkest",dataQa:"desktop-footer-site-link"}),` ${Y}`)),ft=({title:t,children:s})=>o.createElement("div",{className:"flex-1 border-box","data-qa":"footer-section"},o.createElement("div",{"data-qa":"footer-section-title",className:"font--subhead lh-default font-xxxxs font-xxxs-l gray-darkest font-bold mt-md"},t),o.createElement("ul",{className:"list-none pa-0 ml-0 mt-0 mb-md mr-0","data-qa":"footer-section-list"},s)),y=({className:t,url:s,name:e,dataQa:n})=>o.createElement("a",{href:s,className:I("hover-blue",{[t]:t}),"data-qa":n},e),gt={className:l.default.string,url:l.default.string.isRequired,name:l.default.string.isRequired,dataQa:l.default.string};y.propTypes=gt;var bt=t=>o.createElement("li",{className:t.listItemClasses,"data-qa":"footer-section-link"},o.createElement(y,b(p({},t),{className:"font--subhead lh-default font-xxxxs font-xxxs-l gray-darkest"}))),B=({requiresAuth:t=!1,condition:s,children:e})=>{let[n,r]=o.useState(!1);return o.useEffect(()=>{typeof window<"u"&&r(!0)},[]),t?s?n?e:o.createElement("li",null):o.createElement("li",null):e};B.propTypes={link:l.default.object,condition:l.default.bool,children:l.default.node.isRequired,requiresAuth:l.default.bool};var L=({isAmp:t=!1,env:s="prod",className:e})=>{let n=t?()=>({isAuthenticated:!1,isSub:!1}):G.useUserData,{isAuthenticated:r=!1}=n({env:s}),u=!1;function x(a){return!!(a==="subscriber"&&_.isSubscriber()||a==="non-subscriber"&&_.isSubscriber()===!1)}(t||dt())&&(u=!0);let d=(()=>{let a=u?[...U,...F]:U;return t?a.map(j=>{var f=j,{url:c}=f,N=k(f,["url"]);return b(p({},N),{url:`${c}?itid=a_inl-amp`})}):a})(),S=(()=>{let a=u?[...F]:[];return[nt,ct,ut,b(p({},Q),{links:[...Q.links,...a]})]})();return t?o.createElement("section",{"subscriptions-section":"content",className:e},o.createElement($,{mobileLinkData:d})):o.createElement(o.Fragment,null,o.createElement(wt,{className:e},S.map(({title:a,links:w})=>o.createElement(ft,{key:a,title:a},w.map(c=>o.createElement(B,{key:c.name,requiresAuth:!!c.userRole,hasAuth:r,condition:x(c.userRole)},o.createElement(bt,p({},c))))))),o.createElement("div",{className:I("dn-ns",{[e]:e})},o.createElement($,{mobileLinkData:d})))};L.propTypes={isAmp:l.default.bool,env:l.default.oneOf(["prod","dev","sandbox"]),className:l.default.string};module.exports=st(yt);0&&(module.exports={Column,Footer,Grid}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@washingtonpost/site-footer", | ||
"version": "0.4.15", | ||
"version": "0.4.16-experimental.0", | ||
"description": "> TODO: description", | ||
@@ -9,3 +9,4 @@ "author": "artmsilva <artmsilva@gmail.com>", | ||
"main": "dist/index.js", | ||
"module": "dist/index.module.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
@@ -25,3 +26,3 @@ "dist", | ||
"test": "echo \"Error: run tests from root\" && exit 1", | ||
"build": "npx parcel build src/index.js --log-level verbose --no-cache" | ||
"build": "tsup src/index.js --loader '.js=jsx' --minify --format esm,cjs --dts --sourcemap" | ||
}, | ||
@@ -38,9 +39,22 @@ "bugs": { | ||
"dependencies": { | ||
"@babel/runtime": "^7.13.10", | ||
"@washingtonpost/site-components": "^6.5.2" | ||
"@washingtonpost/site-components": "^6.5.3-experimental.0", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.0.1 || ^17.0.2", | ||
"react-dom": "^16.0.1 || ^17.0.2" | ||
}, | ||
"gitHead": "90fa6e27daf1787e36a85fd902163f4616d7dff3", | ||
"devDependencies": { | ||
"parcel": "^2.0.1" | ||
"@size-limit/file": "^7.0.8", | ||
"@size-limit/time": "^7.0.8", | ||
"@size-limit/webpack": "^7.0.8", | ||
"tsup": "^5.11.13", | ||
"typescript": "^4.5.5" | ||
}, | ||
"gitHead": "8a642d18dc50ba8382e5c8db7a19ac96ac66368b" | ||
"size-limit": [ | ||
{ | ||
"path": "dist/index.js", | ||
"import": "{ Footer }", | ||
"limit": "4kb" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
7
74519
8
5
151
3
1
+ Addedprop-types@^15.7.2
+ Addedreact@^16.0.1 || ^17.0.2
+ Addedreact-dom@^16.0.1 || ^17.0.2
- Removed@babel/runtime@^7.13.10
- Removed@babel/runtime@7.26.0(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
Updated@washingtonpost/site-components@^6.5.3-experimental.0