@nuskin/nextgen-header 1.0.0-library-setup.1 → 1.0.0
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/package-dist/index.css +22 -19
- package/package-dist/index.css.map +1 -1
- package/package-dist/index.d.ts +10 -48
- package/package-dist/index.js +838 -244
- package/package-dist/index.js.map +1 -1
- package/package.json +8 -12
- package/readme.md +40 -18
- package/package-dist/index.mjs +0 -253
- package/package-dist/index.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/library/index.js","../src/components/HeaderPlaceholder.jsx","../src/Main.js","../src/styles/Main.styled.js","../src/utils/locale.js","../src/utils/config.js","../src/utils/contentstack.js","../src/constants.js"],"sourcesContent":["/**\n * Public API for `@nuskin/nextgen-header` npm consumers.\n * Does not include the Module Federation app entry, Express server, or bootstrap.\n */\n\nexport { default as HeaderPlaceholder } from \"../components/HeaderPlaceholder\";\nexport { default as Main, HeaderMFEContext } from \"../Main\";\nexport { getLocale } from \"../utils/locale\";\nexport { getStackConfig } from \"../utils/config\";\nexport {\n stack,\n getContent,\n initLivePreview,\n onEntryChange,\n isEditingMode,\n} from \"../utils/contentstack\";\nexport {\n CONTENTSTACK_API_KEY,\n CONTENTSTACK_DELIVERY_TOKEN,\n CONTENTSTACK_ENVIRONMENT,\n CONTENTSTACK_PREVIEW_TOKEN,\n referenceFields,\n VB_EmptyBlockParentClass,\n} from \"../constants\";\n","import React from \"react\";\n\n/**\n * Stub shell for the future header. Replace with real navigation/branding when\n * Contentstack content types and UX are defined.\n */\nexport default function HeaderPlaceholder() {\n return (\n <header role=\"banner\" data-testid=\"header-placeholder\">\n <p>Header MFE — TODO: implement header content</p>\n </header>\n );\n}\n","import React, { createContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Routes, Route, BrowserRouter } from \"react-router-dom\";\nimport HeaderPlaceholder from \"./components/HeaderPlaceholder\";\nimport { AppContainer } from \"./styles/Main.styled\";\nimport \"./styles/globals.css\";\nimport { getLocale } from \"./utils/locale\";\n\nexport const HeaderMFEContext = createContext({ isMFE: true });\n\nfunction Main({ isMFE = true }) {\n let { country, language } = getLocale();\n country = country.toLocaleLowerCase();\n language = language.toLocaleLowerCase();\n\n const baseName = isMFE\n ? `/${country}/${language}`\n : `/${country}/${language}/static/header-mfe`;\n\n return (\n <HeaderMFEContext.Provider value={{ isMFE }}>\n <BrowserRouter basename={baseName}>\n <AppContainer>\n <Routes>\n <Route path=\"*\" element={<HeaderPlaceholder />} />\n </Routes>\n </AppContainer>\n </BrowserRouter>\n </HeaderMFEContext.Provider>\n );\n}\n\nMain.propTypes = {\n isMFE: PropTypes.bool,\n};\n\nexport default Main;\n","import styled from \"@emotion/styled\";\n\nexport const AppContainer = styled.div`\n font-family: \"Inter\", sans-serif;\n`;\n","/**\n * Extracts the locale code from the provided URL or the current URL.\n *\n * @param options - An object with the following properties:\n * @param options.url - The URL to extract the locale code from. If not provided, the current URL will be used.\n * @param options.defaultLocale - The default locale code to use if the locale cannot be extracted from the URL.\n * @returns The locale code in the format \"language_COUNTRY\".\n */\nfunction getLocaleCodeFromUrl(options) {\n const { url = \"\", defaultLocale = \"\" } = options ?? {};\n\n let localeAsArr = [];\n\n let tempUrl = url || (typeof location != \"undefined\" && location.href);\n\n if (tempUrl) {\n /* adding dummy domain since express originalUrl will not have request domain */\n if (!tempUrl?.includes(\"https://\") && !tempUrl?.includes(\"http://\")) {\n tempUrl = `https://domain.com${tempUrl}`;\n }\n const updatedUrl = new URL(tempUrl);\n\n const pathParams = updatedUrl.pathname;\n if (pathParams) {\n const pathList = pathParams?.split(\"/\")?.filter(Boolean);\n if (pathList.length > 1) {\n localeAsArr = pathList;\n }\n }\n\n if (localeAsArr.length > 2) {\n localeAsArr = localeAsArr.slice(0, 2);\n }\n }\n localeAsArr = localeAsArr.reverse();\n\n if (localeAsArr.length === 0) {\n localeAsArr = defaultLocale.split(\"_\");\n }\n\n return `${localeAsArr[1]?.toUpperCase()}-${localeAsArr[0]}`;\n}\n\nfunction getLocale({ url } = {}) {\n const currentLocale = getLocaleCodeFromUrl(url ? { url } : null);\n const splitLocale = currentLocale?.split(\"-\");\n\n return {\n locale: currentLocale,\n language: splitLocale?.[1]?.toLowerCase(),\n country: splitLocale?.[0]?.toUpperCase(),\n };\n}\nexport { getLocale };\n","import { getLocale } from \"./locale\";\n\n/**\n * Stack-related config for Contentstack calls (e.g. getContent).\n * Set CONTENTSTACK_HEADER_CONTENT_TYPE in env when the header content type exists.\n */\nfunction getStackConfig() {\n const { locale } = getLocale();\n return {\n contentType: process.env.CONTENTSTACK_HEADER_CONTENT_TYPE || \"\",\n locale,\n };\n}\n\nexport { getStackConfig };\n","import contentstack from \"@contentstack/delivery-sdk\";\nimport ContentstackLivePreview from \"@contentstack/live-preview-utils\";\nimport { addEditableTags } from \"@contentstack/utils\";\nimport {\n CONTENTSTACK_API_KEY,\n CONTENTSTACK_DELIVERY_TOKEN,\n CONTENTSTACK_ENVIRONMENT,\n CONTENTSTACK_PREVIEW_TOKEN,\n} from \"../constants\";\n\n/**\n * Contentstack delivery stack, live preview, and entry fetch.\n * TODO: Call getContent from header UI once CONTENTSTACK_HEADER_CONTENT_TYPE and\n * URL/slug strategy are defined; wire initLivePreview / onEntryChange in Visual Builder.\n */\n\n// Lazy-initialize the stack to avoid \"API key is required\" errors\n// when this module is loaded via Module Federation on the host server\n// (where env vars may not be available).\nlet _stack = null;\nfunction getStack() {\n if (!_stack) {\n _stack = contentstack.stack({\n apiKey: CONTENTSTACK_API_KEY,\n deliveryToken: CONTENTSTACK_DELIVERY_TOKEN,\n environment: CONTENTSTACK_ENVIRONMENT,\n live_preview: {\n enable: true,\n preview_token: CONTENTSTACK_PREVIEW_TOKEN,\n host: \"rest-preview.contentstack.com\",\n },\n });\n }\n return _stack;\n}\n\nconst BRIDGED_CONFIG_KEYS = [\"live_preview\", \"headers\", \"environment\"];\n\nexport const stack = new Proxy(\n {},\n {\n get(_, prop) {\n const s = getStack();\n if (BRIDGED_CONFIG_KEYS.includes(prop)) {\n return s.config?.[prop];\n }\n return s[prop];\n },\n set(_, prop, value) {\n const s = getStack();\n if (BRIDGED_CONFIG_KEYS.includes(prop)) {\n if (!s.config) return false;\n s.config[prop] = value;\n return true;\n }\n s[prop] = value;\n return true;\n },\n has(_, prop) {\n if (BRIDGED_CONFIG_KEYS.includes(prop)) return true;\n return prop in getStack();\n },\n ownKeys() {\n return [\n ...new Set([...Reflect.ownKeys(getStack()), ...BRIDGED_CONFIG_KEYS]),\n ];\n },\n getOwnPropertyDescriptor(_, prop) {\n if (BRIDGED_CONFIG_KEYS.includes(prop)) {\n return {\n configurable: true,\n enumerable: true,\n writable: true,\n value: getStack().config?.[prop],\n };\n }\n return Object.getOwnPropertyDescriptor(getStack(), prop);\n },\n },\n);\n\nlet _livePreviewInitialized = false;\n\nexport const onEntryChange = ContentstackLivePreview.onEntryChange.bind(\n ContentstackLivePreview,\n);\n\nexport function initLivePreview() {\n if (_livePreviewInitialized) return;\n _livePreviewInitialized = true;\n\n ContentstackLivePreview.init({\n ssr: false,\n enable: true,\n mode: \"builder\",\n stackSdk: stack,\n stackDetails: {\n apiKey: CONTENTSTACK_API_KEY,\n environment: CONTENTSTACK_ENVIRONMENT,\n },\n clientUrlParams: {\n host: \"app.contentstack.com\",\n },\n editButton: {\n enable: false,\n },\n });\n}\n\nexport function isEditingMode() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (window.self !== window.top) {\n return true;\n }\n\n const params = new URLSearchParams(window.location.search);\n return (\n params.has(\"visual-builder\") ||\n params.has(\"contentstack\") ||\n params.has(\"live_preview\")\n );\n}\n\nexport const getContent = async ({\n url,\n uid,\n contentType,\n language,\n referenceFields = [],\n} = {}) => {\n const tryFetch = async (locale) => {\n const CT = stack.contentType(contentType);\n let fetched = null;\n\n if (uid) {\n fetched = await CT.entry(uid)\n .locale(locale)\n .includeReference(referenceFields)\n .fetch();\n } else if (url) {\n const urlWithSlash = url.startsWith(\"/\") ? url : `/${url}`;\n const result = await CT.entry()\n .locale(locale)\n .includeReference(referenceFields)\n .query({ url: urlWithSlash })\n .find();\n fetched = result.entries?.[0];\n }\n if (isEditingMode() && fetched) {\n addEditableTags(fetched, contentType, true, language, {\n useLowerCaseLocale: false,\n });\n }\n\n return fetched;\n };\n\n try {\n const result = await tryFetch(language);\n return result;\n } catch (error) {\n console.warn(\n \"Failed to fetch content with language:\",\n language,\n error.message,\n );\n try {\n const fallbackResult = await tryFetch(\"en\");\n return fallbackResult;\n } catch (fallbackError) {\n console.warn(\n \"Failed to fetch content with fallback language:\",\n fallbackError.message,\n );\n return null;\n }\n }\n};\n","const CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;\nconst CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;\nconst CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;\nconst CONTENTSTACK_PREVIEW_TOKEN = process.env.CONTENTSTACK_PREVIEW_TOKEN;\n\n/**\n * Reference field UIDs for `includeReference` when fetching header entries.\n * TODO: populate when the header content model uses references.\n */\nconst referenceFields = [];\n\n// SSR-safe constant — avoids importing @contentstack/live-preview-utils\n// which accesses `window` at module load time.\nconst VB_EmptyBlockParentClass = \"visual-builder__empty-block-parent\";\n\nexport {\n CONTENTSTACK_API_KEY,\n CONTENTSTACK_DELIVERY_TOKEN,\n CONTENTSTACK_ENVIRONMENT,\n CONTENTSTACK_PREVIEW_TOKEN,\n referenceFields,\n VB_EmptyBlockParentClass,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAMH,SAAR,oBAAqC;AAC1C,SACE,6BAAAA,QAAA,cAAC,YAAO,MAAK,UAAS,eAAY,w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AAAA,IACH;AAEA,WAAO;AAAA,EACT;AAEA,MAAI;AACF,UAAM,SAAS,MAAM,SAAS,QAAQ;AACtC,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA,MAAM;AAAA,IACR;AACA,QAAI;AACF,YAAM,iBAAiB,MAAM,SAAS,IAAI;AAC1C,aAAO;AAAA,IACT,SAAS,eAAe;AACtB,cAAQ;AAAA,QACN;AAAA,QACA,cAAc;AAAA,MAChB;AACA,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["React","import_react","styled","React","PropTypes","contentstack","ContentstackLivePreview","referenceFields"]}
|
|
1
|
+
{"version":3,"file":"index.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;ACNA,MAAM,8BAA4B,oB;;ACAlC,MAAM,mCAA4B,yB;;;ACAlC,MAAM,2BAA4B,gC;;ACAR;AACS;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAOe,SAASI,iBAAiBA,CAAAC,IAAA,EAAgC;EAAA,IAA7BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,MAAM,GAAAH,IAAA,CAANG,MAAM;EACnE,oBACEL,mCAAA;IACEM,IAAI,EAAC,QAAQ;IACb,eAAY,oBAAoB;IAChC,gBAAcH,OAAQ;IACtB,iBAAeC,QAAS;IACxB,eAAaC,MAAO;IAAAE,QAAA,eAEpBP,mCAAA;MAAAO,QAAA,EAAG;IAA2C,CAAG;EAAC,CAC5C,CAAC;AAEb;AAEAN,iBAAiB,CAACO,SAAS,GAAG;EAC5BL,OAAO,EAAEL,sCAAgB;EACzBM,QAAQ,EAAEN,sCAAgB;EAC1BO,MAAM,EAAEP,sCAAgBW;AAC1B,CAAC;AAEDR,iBAAiB,CAACS,YAAY,GAAG;EAC/BP,OAAO,EAAE,EAAE;EACXC,QAAQ,EAAE,EAAE;EACZC,MAAM,EAAE;AACV,CAAC,C;;AClCD;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA,0BAA0B;AAC1B;AACA;AACA,GAAG;AACH;;;ACRA,MAAM,qBAA4B,6B;;ACAlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAE8B;;;ACtD9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEmC;;;ACnDnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAE8B;;;ACRS;AACE;AACF;;AAEvC;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sCAAsC,OAAO;AAC7C;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA,MAAM,YAAQ;AACd;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,gBAAgB;AACpC,yEAAyE;AACzE;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA,4BAA4B,6BAA6B;AACzD,UAAU;AACV,uFAAuF;AACvF;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA,2BAA2B,mBAAmB;AAC9C;AACA,4FAA4F;AAC5F;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;;AAEA;AACA;;AAEA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oCAAoC,QAAQ,OAAO;AACnD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA,IAAI;;;AAGJ,kBAAkB,iBAAiB;AACnC;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA,aAAa,OAAU;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAE2B;;;AC3OI;;AAE/B;AACA;AACA;;AAEA,yBAAyB,8BAAK,8BAA8B,8BAAK;AACjE;AACA,iEAAiE,8CAAqB;;AAEI;;;ACV1F;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,MAAM;AACN;AACA;;AAE6D;;;AC5CtB;;AAEvC;AACA,ukIAAukI;;AAEvkI,iCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEkC;;;ACfwB;AACM;AACX;AACmD;AACrB;AACpD;AACkB;;AAEjD,IAAI,6CAAa;;AAEjB,+BAA+B,WAAW;;AAE1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,cAAc;AAChB,EAAE,wCAAwC;AAC1C,WAAW,YAAY;AACvB,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD;AAChD;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;;AAEA,aAAa,SAAS;;AAEtB;AACA;AACA;;AAEA,iBAAiB,0CAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,yCAAgB,CAAC,kCAAY;AACzD;;AAEA;AACA,oBAAoB,mBAAmB;AACvC,QAAQ;AACR;AACA;;AAEA,uBAAuB,eAAe;AACtC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,0BAA0B,4CAAmB,CAAC,uCAAc,qBAAqB,4CAAmB;AACpG;AACA;AACA;AACA,OAAO,gBAAgB,4CAAmB;AAC1C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6CAAa;AAC1D;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA,4CAA4C,QAAQ,GAAG;AACvD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-header/webpack/bootstrap","webpack://@nuskin/nextgen-header/webpack/runtime/compat get default export","webpack://@nuskin/nextgen-header/webpack/runtime/define property getters","webpack://@nuskin/nextgen-header/webpack/runtime/hasOwnProperty shorthand","webpack://@nuskin/nextgen-header/webpack/runtime/make namespace object","webpack://@nuskin/nextgen-header/external commonjs \"react\"","webpack://@nuskin/nextgen-header/external commonjs \"prop-types\"","webpack://@nuskin/nextgen-header/external commonjs \"react/jsx-runtime\"","webpack://@nuskin/nextgen-header/./src/components/HeaderPlaceholder.jsx","webpack://@nuskin/nextgen-header/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@nuskin/nextgen-header/external commonjs \"@emotion/react\"","webpack://@nuskin/nextgen-header/./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://@nuskin/nextgen-header/./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://@nuskin/nextgen-header/./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://@nuskin/nextgen-header/./node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","webpack://@nuskin/nextgen-header/./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","webpack://@nuskin/nextgen-header/./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://@nuskin/nextgen-header/./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","webpack://@nuskin/nextgen-header/./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","webpack://@nuskin/nextgen-header/./src/styles/Main.styled.js","webpack://@nuskin/nextgen-header/./src/styles/globals.css?ee18","webpack://@nuskin/nextgen-header/./src/utils/locale.js","webpack://@nuskin/nextgen-header/./src/Main.js","webpack://@nuskin/nextgen-header/./src/library/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"prop-types\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * Stub shell for the future header. Replace with real navigation/branding when\n * Contentstack content types and UX are defined.\n *\n * Locale is supplied by the parent (e.g. Main); `getLocale()` can be used upstream\n * to derive values from the URL when needed.\n */\nexport default function HeaderPlaceholder({ country, language, locale }) {\n return (\n <header\n role=\"banner\"\n data-testid=\"header-placeholder\"\n data-country={country}\n data-language={language}\n data-locale={locale}\n >\n <p>Header MFE — TODO: implement header content</p>\n </header>\n );\n}\n\nHeaderPlaceholder.propTypes = {\n country: PropTypes.string,\n language: PropTypes.string,\n locale: PropTypes.string,\n};\n\nHeaderPlaceholder.defaultProps = {\n country: \"\",\n language: \"\",\n locale: \"\",\n};\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@emotion/react\");","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g; // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\n\nvar isDevelopment = false;\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n // eslint-disable-next-line prefer-spread\n styles.push.apply(styles, args);\n } else {\n var templateStringsArr = args[0];\n\n styles.push(templateStringsArr[0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], templateStringsArr[i]);\n }\n }\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n }));\n return newStyled.apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import styled from \"@emotion/styled\";\n\nexport const AppContainer = styled.div`\n font-family: \"Inter\", sans-serif;\n`;\n","// extracted by mini-css-extract-plugin\nexport {};","/**\n * Extracts the locale code from the provided URL or the current URL.\n *\n * @param options - An object with the following properties:\n * @param options.url - The URL to extract the locale code from. If not provided, the current URL will be used.\n * @param options.defaultLocale - The default locale code to use if the locale cannot be extracted from the URL.\n * @returns The locale code in the format \"language_COUNTRY\".\n */\nfunction getLocaleCodeFromUrl(options) {\n const { url = \"\", defaultLocale = \"\" } = options ?? {};\n\n let localeAsArr = [];\n\n let tempUrl = url || (typeof location != \"undefined\" && location.href);\n\n if (tempUrl) {\n /* adding dummy domain since express originalUrl will not have request domain */\n if (!tempUrl?.includes(\"https://\") && !tempUrl?.includes(\"http://\")) {\n tempUrl = `https://domain.com${tempUrl}`;\n }\n const updatedUrl = new URL(tempUrl);\n\n const pathParams = updatedUrl.pathname;\n if (pathParams) {\n const pathList = pathParams?.split(\"/\")?.filter(Boolean);\n if (pathList.length > 1) {\n localeAsArr = pathList;\n }\n }\n\n if (localeAsArr.length > 2) {\n localeAsArr = localeAsArr.slice(0, 2);\n }\n }\n localeAsArr = localeAsArr.reverse();\n\n if (localeAsArr.length === 0) {\n localeAsArr = defaultLocale.split(\"_\");\n }\n\n return `${localeAsArr[1]?.toUpperCase()}-${localeAsArr[0]}`;\n}\n\nfunction getLocale({ url } = {}) {\n const currentLocale = getLocaleCodeFromUrl(url ? { url } : null);\n const splitLocale = currentLocale?.split(\"-\");\n\n return {\n locale: currentLocale,\n language: splitLocale?.[1]?.toLowerCase(),\n country: splitLocale?.[0]?.toUpperCase(),\n };\n}\n\nfunction isBrowser() {\n return typeof window !== \"undefined\" && window != null;\n}\n\n/** Normalized `country`, `language`, and `locale` string from explicit market + language. */\nfunction buildLocaleData(market, language) {\n const country = String(market).trim().toUpperCase();\n const lang = String(language).trim().toLowerCase();\n if (!country || !lang) {\n throw new Error(\n \"@nuskin/nextgen-header: `market` and `language` must be non-empty when provided.\",\n );\n }\n return { country, language: lang, locale: `${country}-${lang}` };\n}\n\n/**\n * Resolves locale data (`country`, `language`, `locale`) for the header shell.\n *\n * - **SSR (no `window`):** `market` and `language` are required (e.g. from the host or from `requestUrl` in `renderAndExtractContext`).\n * - **CSR:** `market` and `language` optional; if omitted, derived from the current URL via the same rules as `getLocale()`. Throws if `window` is missing or the path cannot be parsed.\n */\nfunction resolveHeaderLocale({ market, language } = {}) {\n const explicit =\n market != null &&\n language != null &&\n String(market).trim() !== \"\" &&\n String(language).trim() !== \"\";\n\n if (explicit) {\n return buildLocaleData(market, language);\n }\n\n if (!isBrowser()) {\n throw new Error(\n \"@nuskin/nextgen-header: SSR requires `market` and `language` on `<Main />`, or pass `requestUrl` into `renderAndExtractContext` so they can be derived from the request path.\",\n );\n }\n\n const fromUrl = getLocale();\n if (\n !fromUrl.country ||\n !fromUrl.language ||\n !fromUrl.locale ||\n String(fromUrl.locale).includes(\"undefined\")\n ) {\n throw new Error(\n \"@nuskin/nextgen-header: could not derive `market` and `language` from the current URL (expected a path with at least two segments, e.g. /en/us/...). Pass `market` and `language` explicitly.\",\n );\n }\n\n return fromUrl;\n}\n\nexport { getLocale, resolveHeaderLocale };\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport HeaderPlaceholder from \"./components/HeaderPlaceholder\";\nimport { AppContainer } from \"./styles/Main.styled\";\nimport \"./styles/globals.css\";\nimport { resolveHeaderLocale } from \"./utils/locale\";\n\nfunction Main({ market, language }) {\n const resolved = resolveHeaderLocale({ market, language });\n\n return (\n <AppContainer>\n <HeaderPlaceholder\n country={resolved.country}\n language={resolved.language}\n locale={resolved.locale}\n />\n </AppContainer>\n );\n}\n\nMain.propTypes = {\n market: PropTypes.string,\n language: PropTypes.string,\n};\n\nexport default Main;\n","/**\n * Public API for `@nuskin/nextgen-header` npm consumers.\n *\n * **Header** — `AppContainer` + market/language resolution → renders the header placeholder inside.\n * (Source: `Main.js`; exported under the product name `Header`.)\n *\n * Does not include the Module Federation app entry (`App`), Express server, or bootstrap.\n * Contentstack helpers are internal for now; re-export here when the public API is defined.\n */\n\nexport { default as Header } from \"../Main\";\n"],"names":["React","PropTypes","jsx","_jsx","HeaderPlaceholder","_ref","country","language","locale","role","children","propTypes","string","defaultProps","AppContainer","_styled","process","env","NODE_ENV","target","label","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","getLocaleCodeFromUrl","options","_localeAsArr$","_ref$url","url","_ref$defaultLocale","defaultLocale","localeAsArr","tempUrl","location","href","_tempUrl","_tempUrl2","includes","concat","updatedUrl","URL","pathParams","pathname","_pathParams$split","pathList","split","filter","Boolean","length","slice","reverse","toUpperCase","getLocale","_splitLocale$","_splitLocale$2","_ref2","arguments","undefined","currentLocale","splitLocale","toLowerCase","isBrowser","window","buildLocaleData","market","String","trim","lang","Error","resolveHeaderLocale","_ref3","explicit","fromUrl","Main","resolved","default","Header"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/nextgen-header",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Header micro-frontend and npm component library",
|
|
5
5
|
"main": "package-dist/index.js",
|
|
6
6
|
"module": "package-dist/index.mjs",
|
|
7
7
|
"types": "package-dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"start": "nodemon --watch src --ext js,jsx,css --delay 2 --exec \"yarn
|
|
10
|
-
"
|
|
11
|
-
"build": "cross-env CMS_ENV=
|
|
12
|
-
"build-
|
|
13
|
-
"build-test": "cross-env CMS_ENV=test NODE_ENV=production yarn build:server:dev && cross-env CMS_ENV=test NODE_ENV=production yarn build:client:dev",
|
|
9
|
+
"start": "nodemon --watch src --ext js,jsx,css --delay 2 --exec \"yarn build && node server-launcher.js\"",
|
|
10
|
+
"build": "cross-env CMS_ENV=local yarn build:server:dev && yarn build:client:dev",
|
|
11
|
+
"build-dev": "cross-env CMS_ENV=dev yarn build:server:dev && cross-env CMS_ENV=dev yarn build:client:dev",
|
|
12
|
+
"build-test": "cross-env CMS_ENV=test yarn build:server:dev && cross-env CMS_ENV=test yarn build:client:dev",
|
|
14
13
|
"build-prod": "cross-env CMS_ENV=prod NODE_ENV=production yarn build:server:prod && cross-env CMS_ENV=prod NODE_ENV=production yarn build:client:prod",
|
|
15
14
|
"build:client:dev": "rimraf --glob dist/*.js dist/*.js.map dist/loadable-stats.json dist/index.html && yarn webpack --mode development --progress --config config/webpack.client.js",
|
|
16
15
|
"build:client:prod": "rimraf --glob dist/*.js dist/*.js.map dist/loadable-stats.json dist/index.html && yarn webpack --mode production --progress --config config/webpack.client.js",
|
|
@@ -19,8 +18,7 @@
|
|
|
19
18
|
"test": "jest",
|
|
20
19
|
"integration-test": "echo 'Integration test not yet implemented'",
|
|
21
20
|
"lint": "eslint src/ --ext .js,.jsx",
|
|
22
|
-
"build:package": "rimraf package-dist &&
|
|
23
|
-
"prepublishOnly": "yarn build:package"
|
|
21
|
+
"build:package": "rimraf package-dist && webpack --mode production --config config/webpack.library.js && shx cp src/library/index.d.ts package-dist/index.d.ts"
|
|
24
22
|
},
|
|
25
23
|
"keywords": [
|
|
26
24
|
"react",
|
|
@@ -58,8 +56,7 @@
|
|
|
58
56
|
"contentstack": "^3.26.0",
|
|
59
57
|
"prop-types": "^15.8.0",
|
|
60
58
|
"react": "^18.2.0",
|
|
61
|
-
"react-dom": "^18.2.0"
|
|
62
|
-
"react-router-dom": "^7.7.0"
|
|
59
|
+
"react-dom": "^18.2.0"
|
|
63
60
|
},
|
|
64
61
|
"engines": {
|
|
65
62
|
"node": ">=24.0.0"
|
|
@@ -90,7 +87,6 @@
|
|
|
90
87
|
"react": "^18.2.0",
|
|
91
88
|
"react-dom": "^18.2.0",
|
|
92
89
|
"react-gtm-module": "^2.0.11",
|
|
93
|
-
"react-router-dom": "^7.7.1",
|
|
94
90
|
"regenerator-runtime": "0.14.1"
|
|
95
91
|
},
|
|
96
92
|
"devDependencies": {
|
|
@@ -115,12 +111,12 @@
|
|
|
115
111
|
"file-loader": "^6.2.0",
|
|
116
112
|
"html-webpack-plugin": "^5.5.0",
|
|
117
113
|
"identity-obj-proxy": "^3.0.0",
|
|
114
|
+
"mini-css-extract-plugin": "^2.9.2",
|
|
118
115
|
"nodemon": "^3.1.14",
|
|
119
116
|
"process": "^0.11.10",
|
|
120
117
|
"rimraf": "5.0.8",
|
|
121
118
|
"shx": "^0.4.0",
|
|
122
119
|
"style-loader": "^3.3.0",
|
|
123
|
-
"tsup": "^8.5.1",
|
|
124
120
|
"typescript": "^5.9.3",
|
|
125
121
|
"webpack": "^5.88.0",
|
|
126
122
|
"webpack-cli": "^5.1.0",
|
package/readme.md
CHANGED
|
@@ -7,6 +7,22 @@ This repository produces **two** deployables:
|
|
|
7
7
|
|
|
8
8
|
The UI is intentionally minimal (`HeaderPlaceholder`). Replace it when navigation, Contentstack types, and analytics are defined.
|
|
9
9
|
|
|
10
|
+
## Domain language (header UI)
|
|
11
|
+
|
|
12
|
+
Shared vocabulary for Nu Skin header work—use these names in code, docs, and Contentstack discussions so everyone means the same region of the UI.
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
| Term | Description |
|
|
17
|
+
|------|-------------|
|
|
18
|
+
| **Logo** | Brand mark (e.g. NU SKIN), top-left. |
|
|
19
|
+
| **Utility bar** | Top-right strip: currency / language, Nu Skin Rewards, account (Sign Up / Sign In), cart with badge. |
|
|
20
|
+
| **Search bar** | Product search field (e.g. “Product Search”). Kept **separate from the utility bar** so future features can be added between or around them without coupling. |
|
|
21
|
+
| **Top navigation** | Primary horizontal category row under the logo (e.g. Devices, Beauty & Skincare, Health & Wellness). |
|
|
22
|
+
| **Jump to** | Left column in the expanded mega-menu: quick links (e.g. Most Popular, Science, Kits & Bundles). |
|
|
23
|
+
| **Categories** | Horizontal row inside the mega-menu that expresses the active hierarchy (e.g. Skincare → Concerns → Key ingredients). |
|
|
24
|
+
| **Sub categories** | Vertical link lists under each **Categories** heading (e.g. Anti-Aging, Lines & Wrinkles, Dry Skin under Concerns). |
|
|
25
|
+
|
|
10
26
|
## Prerequisites
|
|
11
27
|
|
|
12
28
|
- **Node.js 24+** (see `engines` in `package.json` and `.nvmrc` for `nvm` / `fnm`)
|
|
@@ -21,22 +37,27 @@ yarn install
|
|
|
21
37
|
|
|
22
38
|
## NPM library (`@nuskin/nextgen-header`)
|
|
23
39
|
|
|
24
|
-
Install in a host application that already provides the peer dependencies (React 18, Emotion,
|
|
40
|
+
Install in a host application that already provides the peer dependencies (React 18, Emotion, Contentstack SDKs):
|
|
25
41
|
|
|
26
42
|
```bash
|
|
27
43
|
yarn add @nuskin/nextgen-header
|
|
28
44
|
```
|
|
29
45
|
|
|
46
|
+
**Public export** (see [`src/library/index.js`](src/library/index.js)):
|
|
47
|
+
|
|
48
|
+
| Export | Description |
|
|
49
|
+
|--------|-------------|
|
|
50
|
+
| **`Header`** | **`AppContainer`** styling plus **market/language** resolution (browser URL or explicit props; SSR via **`requestUrl`** in **`renderAndExtractContext`**). Renders the header placeholder inside. |
|
|
51
|
+
|
|
30
52
|
**Example**
|
|
31
53
|
|
|
32
54
|
```jsx
|
|
33
|
-
import {
|
|
34
|
-
HeaderPlaceholder,
|
|
35
|
-
Main,
|
|
36
|
-
getLocale,
|
|
37
|
-
getStackConfig,
|
|
38
|
-
} from "@nuskin/nextgen-header";
|
|
55
|
+
import { Header } from "@nuskin/nextgen-header";
|
|
39
56
|
import "@nuskin/nextgen-header/index.css";
|
|
57
|
+
|
|
58
|
+
// CSR: optional market/language; SSR: pass props or wire `requestUrl` in `renderAndExtractContext`.
|
|
59
|
+
<Header />
|
|
60
|
+
<Header market="US" language="en" />
|
|
40
61
|
```
|
|
41
62
|
|
|
42
63
|
- **Exports** are defined in [`src/library/index.js`](src/library/index.js) (barrel for the published API).
|
|
@@ -49,15 +70,17 @@ import "@nuskin/nextgen-header/index.css";
|
|
|
49
70
|
yarn build:package
|
|
50
71
|
```
|
|
51
72
|
|
|
52
|
-
**Publish** (
|
|
73
|
+
**Publish** (GitLab **release** / **pre-release** jobs run `yarn build:package` in `before_script` before publish; align with your org’s versioning and `yarn npm publish` / tags. For a local publish, run `yarn build:package` first.)
|
|
53
74
|
|
|
54
75
|
### Peer dependencies
|
|
55
76
|
|
|
56
|
-
Declared in `package.json` under `peerDependencies`: `react`, `react-dom`, `prop-types`,
|
|
77
|
+
Declared in `package.json` under `peerDependencies`: `react`, `react-dom`, `prop-types`, `@emotion/react`, `@emotion/styled`, Contentstack packages, and `contentstack`. Your app must install compatible versions.
|
|
57
78
|
|
|
58
79
|
## Environment variables
|
|
59
80
|
|
|
60
|
-
|
|
81
|
+
For the **webpack / MFE** build, dotenv files are loaded per build via `CMS_ENV` (see `package.json` scripts): `.env.local`, `.env.dev`, `.env.test`, `.env.prod`. The **npm library** does not expose these values on its public API; consumers still configure the usual `CONTENTSTACK_*` variables in their own environment so internal Contentstack helpers can run.
|
|
82
|
+
|
|
83
|
+
### MFE / webpack (`CMS_ENV`)
|
|
61
84
|
|
|
62
85
|
| Variable | Purpose |
|
|
63
86
|
|----------|---------|
|
|
@@ -65,8 +88,7 @@ Dotenv files are loaded per **webpack** build via `CMS_ENV` (see `package.json`
|
|
|
65
88
|
| `CONTENTSTACK_DELIVERY_TOKEN` | Delivery token |
|
|
66
89
|
| `CONTENTSTACK_ENVIRONMENT` | Environment name |
|
|
67
90
|
| `CONTENTSTACK_PREVIEW_TOKEN` | Preview token (Visual Builder / live preview) |
|
|
68
|
-
| `
|
|
69
|
-
| `REACT_APP_GTM_KEY_DEV` / `REACT_APP_GTM_KEY_TEST` | Optional; used by `src/utils/datalayer.js` if present |
|
|
91
|
+
| `REACT_APP_GTM_KEY` | Optional; used by `src/utils/datalayer.js` if present |
|
|
70
92
|
|
|
71
93
|
`REACT_APP_BASENAME` is injected at build time from the client webpack config (static asset path segment).
|
|
72
94
|
|
|
@@ -75,8 +97,8 @@ Dotenv files are loaded per **webpack** build via `CMS_ENV` (see `package.json`
|
|
|
75
97
|
| Command | Description |
|
|
76
98
|
|---------|-------------|
|
|
77
99
|
| `yarn start` | Rebuild and run the Express server (see `server-launcher.js`) |
|
|
78
|
-
| `yarn build` |
|
|
79
|
-
| `yarn build:package` | **Library** build to `package-dist/` (
|
|
100
|
+
| `yarn build` | Client + server **webpack** build in **development** mode with `CMS_ENV=local` (same as `build:*:dev`). Use **`yarn build-prod`** for production mode + minification. |
|
|
101
|
+
| `yarn build:package` | **Library** build to `package-dist/` via [`config/webpack.library.js`](config/webpack.library.js) (dual CJS/ESM + extracted CSS + copied `index.d.ts`); required before `npm publish` |
|
|
80
102
|
| `yarn test` | Jest + coverage |
|
|
81
103
|
| `yarn lint` | ESLint on `src/` |
|
|
82
104
|
|
|
@@ -90,15 +112,15 @@ Dotenv files are loaded per **webpack** build via `CMS_ENV` (see `package.json`
|
|
|
90
112
|
|
|
91
113
|
The host must load `remoteEntry.js` and consume the `./App` expose.
|
|
92
114
|
|
|
93
|
-
|
|
115
|
+
**Locale:** The npm **`Header`** export accepts **`market`** / **`language`** (see [`src/utils/locale.js`](src/utils/locale.js) `resolveHeaderLocale`). On **SSR**, pass them explicitly or rely on Express passing **`requestUrl`** into **`renderAndExtractContext`**. On **CSR**, they are optional; URL parsing **throws** if `window` is missing or the path is invalid. The header does not ship React Router; the host owns routing.
|
|
94
116
|
|
|
95
117
|
## Contentstack
|
|
96
118
|
|
|
97
119
|
- `src/utils/contentstack.js` — stack proxy, `getContent`, `initLivePreview`, `onEntryChange`, `isEditingMode`
|
|
98
|
-
- `src/utils/config.js` — `getStackConfig()`
|
|
99
|
-
- `src/constants.js` —
|
|
120
|
+
- `src/utils/config.js` — `getStackConfig()` returns a fixed header content type (internal to that module) and locale from the URL
|
|
121
|
+
- `src/constants.js` — Contentstack credentials from env (used by the webpack/MFE build and internally by `contentstack.js`; not exported from the npm package)
|
|
100
122
|
|
|
101
|
-
No header entry is fetched in the UI yet; wire `getContent` when the slug/UID strategy is decided.
|
|
123
|
+
The **npm library** currently exports only **`Header`** (the `Main` shell under that name); Contentstack helpers are not part of the published API yet. No header entry is fetched in the UI yet; wire `getContent` when the slug/UID strategy is decided.
|
|
102
124
|
|
|
103
125
|
## GitLab CI
|
|
104
126
|
|
package/package-dist/index.mjs
DELETED
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
// src/components/HeaderPlaceholder.jsx
|
|
2
|
-
import React from "react";
|
|
3
|
-
function HeaderPlaceholder() {
|
|
4
|
-
return /* @__PURE__ */ React.createElement("header", { role: "banner", "data-testid": "header-placeholder" }, /* @__PURE__ */ React.createElement("p", null, "Header MFE \u2014 TODO: implement header content"));
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// src/Main.js
|
|
8
|
-
import React2, { createContext } from "react";
|
|
9
|
-
import PropTypes from "prop-types";
|
|
10
|
-
import { Routes, Route, BrowserRouter } from "react-router-dom";
|
|
11
|
-
|
|
12
|
-
// src/styles/Main.styled.js
|
|
13
|
-
import styled from "@emotion/styled";
|
|
14
|
-
var AppContainer = styled.div`
|
|
15
|
-
font-family: "Inter", sans-serif;
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
// src/utils/locale.js
|
|
19
|
-
function getLocaleCodeFromUrl(options) {
|
|
20
|
-
var _a, _b;
|
|
21
|
-
const { url = "", defaultLocale = "" } = options ?? {};
|
|
22
|
-
let localeAsArr = [];
|
|
23
|
-
let tempUrl = url || typeof location != "undefined" && location.href;
|
|
24
|
-
if (tempUrl) {
|
|
25
|
-
if (!(tempUrl == null ? void 0 : tempUrl.includes("https://")) && !(tempUrl == null ? void 0 : tempUrl.includes("http://"))) {
|
|
26
|
-
tempUrl = `https://domain.com${tempUrl}`;
|
|
27
|
-
}
|
|
28
|
-
const updatedUrl = new URL(tempUrl);
|
|
29
|
-
const pathParams = updatedUrl.pathname;
|
|
30
|
-
if (pathParams) {
|
|
31
|
-
const pathList = (_a = pathParams == null ? void 0 : pathParams.split("/")) == null ? void 0 : _a.filter(Boolean);
|
|
32
|
-
if (pathList.length > 1) {
|
|
33
|
-
localeAsArr = pathList;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (localeAsArr.length > 2) {
|
|
37
|
-
localeAsArr = localeAsArr.slice(0, 2);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
localeAsArr = localeAsArr.reverse();
|
|
41
|
-
if (localeAsArr.length === 0) {
|
|
42
|
-
localeAsArr = defaultLocale.split("_");
|
|
43
|
-
}
|
|
44
|
-
return `${(_b = localeAsArr[1]) == null ? void 0 : _b.toUpperCase()}-${localeAsArr[0]}`;
|
|
45
|
-
}
|
|
46
|
-
function getLocale({ url } = {}) {
|
|
47
|
-
var _a, _b;
|
|
48
|
-
const currentLocale = getLocaleCodeFromUrl(url ? { url } : null);
|
|
49
|
-
const splitLocale = currentLocale == null ? void 0 : currentLocale.split("-");
|
|
50
|
-
return {
|
|
51
|
-
locale: currentLocale,
|
|
52
|
-
language: (_a = splitLocale == null ? void 0 : splitLocale[1]) == null ? void 0 : _a.toLowerCase(),
|
|
53
|
-
country: (_b = splitLocale == null ? void 0 : splitLocale[0]) == null ? void 0 : _b.toUpperCase()
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// src/Main.js
|
|
58
|
-
var HeaderMFEContext = createContext({ isMFE: true });
|
|
59
|
-
function Main({ isMFE = true }) {
|
|
60
|
-
let { country, language } = getLocale();
|
|
61
|
-
country = country.toLocaleLowerCase();
|
|
62
|
-
language = language.toLocaleLowerCase();
|
|
63
|
-
const baseName = isMFE ? `/${country}/${language}` : `/${country}/${language}/static/header-mfe`;
|
|
64
|
-
return /* @__PURE__ */ React2.createElement(HeaderMFEContext.Provider, { value: { isMFE } }, /* @__PURE__ */ React2.createElement(BrowserRouter, { basename: baseName }, /* @__PURE__ */ React2.createElement(AppContainer, null, /* @__PURE__ */ React2.createElement(Routes, null, /* @__PURE__ */ React2.createElement(Route, { path: "*", element: /* @__PURE__ */ React2.createElement(HeaderPlaceholder, null) })))));
|
|
65
|
-
}
|
|
66
|
-
Main.propTypes = {
|
|
67
|
-
isMFE: PropTypes.bool
|
|
68
|
-
};
|
|
69
|
-
var Main_default = Main;
|
|
70
|
-
|
|
71
|
-
// src/utils/config.js
|
|
72
|
-
function getStackConfig() {
|
|
73
|
-
const { locale } = getLocale();
|
|
74
|
-
return {
|
|
75
|
-
contentType: process.env.CONTENTSTACK_HEADER_CONTENT_TYPE || "",
|
|
76
|
-
locale
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// src/utils/contentstack.js
|
|
81
|
-
import contentstack from "@contentstack/delivery-sdk";
|
|
82
|
-
import ContentstackLivePreview from "@contentstack/live-preview-utils";
|
|
83
|
-
import { addEditableTags } from "@contentstack/utils";
|
|
84
|
-
|
|
85
|
-
// src/constants.js
|
|
86
|
-
var CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;
|
|
87
|
-
var CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;
|
|
88
|
-
var CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;
|
|
89
|
-
var CONTENTSTACK_PREVIEW_TOKEN = process.env.CONTENTSTACK_PREVIEW_TOKEN;
|
|
90
|
-
var referenceFields = [];
|
|
91
|
-
var VB_EmptyBlockParentClass = "visual-builder__empty-block-parent";
|
|
92
|
-
|
|
93
|
-
// src/utils/contentstack.js
|
|
94
|
-
var _stack = null;
|
|
95
|
-
function getStack() {
|
|
96
|
-
if (!_stack) {
|
|
97
|
-
_stack = contentstack.stack({
|
|
98
|
-
apiKey: CONTENTSTACK_API_KEY,
|
|
99
|
-
deliveryToken: CONTENTSTACK_DELIVERY_TOKEN,
|
|
100
|
-
environment: CONTENTSTACK_ENVIRONMENT,
|
|
101
|
-
live_preview: {
|
|
102
|
-
enable: true,
|
|
103
|
-
preview_token: CONTENTSTACK_PREVIEW_TOKEN,
|
|
104
|
-
host: "rest-preview.contentstack.com"
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return _stack;
|
|
109
|
-
}
|
|
110
|
-
var BRIDGED_CONFIG_KEYS = ["live_preview", "headers", "environment"];
|
|
111
|
-
var stack = new Proxy(
|
|
112
|
-
{},
|
|
113
|
-
{
|
|
114
|
-
get(_, prop) {
|
|
115
|
-
var _a;
|
|
116
|
-
const s = getStack();
|
|
117
|
-
if (BRIDGED_CONFIG_KEYS.includes(prop)) {
|
|
118
|
-
return (_a = s.config) == null ? void 0 : _a[prop];
|
|
119
|
-
}
|
|
120
|
-
return s[prop];
|
|
121
|
-
},
|
|
122
|
-
set(_, prop, value) {
|
|
123
|
-
const s = getStack();
|
|
124
|
-
if (BRIDGED_CONFIG_KEYS.includes(prop)) {
|
|
125
|
-
if (!s.config) return false;
|
|
126
|
-
s.config[prop] = value;
|
|
127
|
-
return true;
|
|
128
|
-
}
|
|
129
|
-
s[prop] = value;
|
|
130
|
-
return true;
|
|
131
|
-
},
|
|
132
|
-
has(_, prop) {
|
|
133
|
-
if (BRIDGED_CONFIG_KEYS.includes(prop)) return true;
|
|
134
|
-
return prop in getStack();
|
|
135
|
-
},
|
|
136
|
-
ownKeys() {
|
|
137
|
-
return [
|
|
138
|
-
.../* @__PURE__ */ new Set([...Reflect.ownKeys(getStack()), ...BRIDGED_CONFIG_KEYS])
|
|
139
|
-
];
|
|
140
|
-
},
|
|
141
|
-
getOwnPropertyDescriptor(_, prop) {
|
|
142
|
-
var _a;
|
|
143
|
-
if (BRIDGED_CONFIG_KEYS.includes(prop)) {
|
|
144
|
-
return {
|
|
145
|
-
configurable: true,
|
|
146
|
-
enumerable: true,
|
|
147
|
-
writable: true,
|
|
148
|
-
value: (_a = getStack().config) == null ? void 0 : _a[prop]
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
return Object.getOwnPropertyDescriptor(getStack(), prop);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
|
-
var _livePreviewInitialized = false;
|
|
156
|
-
var onEntryChange = ContentstackLivePreview.onEntryChange.bind(
|
|
157
|
-
ContentstackLivePreview
|
|
158
|
-
);
|
|
159
|
-
function initLivePreview() {
|
|
160
|
-
if (_livePreviewInitialized) return;
|
|
161
|
-
_livePreviewInitialized = true;
|
|
162
|
-
ContentstackLivePreview.init({
|
|
163
|
-
ssr: false,
|
|
164
|
-
enable: true,
|
|
165
|
-
mode: "builder",
|
|
166
|
-
stackSdk: stack,
|
|
167
|
-
stackDetails: {
|
|
168
|
-
apiKey: CONTENTSTACK_API_KEY,
|
|
169
|
-
environment: CONTENTSTACK_ENVIRONMENT
|
|
170
|
-
},
|
|
171
|
-
clientUrlParams: {
|
|
172
|
-
host: "app.contentstack.com"
|
|
173
|
-
},
|
|
174
|
-
editButton: {
|
|
175
|
-
enable: false
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
function isEditingMode() {
|
|
180
|
-
if (typeof window === "undefined") {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
if (window.self !== window.top) {
|
|
184
|
-
return true;
|
|
185
|
-
}
|
|
186
|
-
const params = new URLSearchParams(window.location.search);
|
|
187
|
-
return params.has("visual-builder") || params.has("contentstack") || params.has("live_preview");
|
|
188
|
-
}
|
|
189
|
-
var getContent = async ({
|
|
190
|
-
url,
|
|
191
|
-
uid,
|
|
192
|
-
contentType,
|
|
193
|
-
language,
|
|
194
|
-
referenceFields: referenceFields2 = []
|
|
195
|
-
} = {}) => {
|
|
196
|
-
const tryFetch = async (locale) => {
|
|
197
|
-
var _a;
|
|
198
|
-
const CT = stack.contentType(contentType);
|
|
199
|
-
let fetched = null;
|
|
200
|
-
if (uid) {
|
|
201
|
-
fetched = await CT.entry(uid).locale(locale).includeReference(referenceFields2).fetch();
|
|
202
|
-
} else if (url) {
|
|
203
|
-
const urlWithSlash = url.startsWith("/") ? url : `/${url}`;
|
|
204
|
-
const result = await CT.entry().locale(locale).includeReference(referenceFields2).query({ url: urlWithSlash }).find();
|
|
205
|
-
fetched = (_a = result.entries) == null ? void 0 : _a[0];
|
|
206
|
-
}
|
|
207
|
-
if (isEditingMode() && fetched) {
|
|
208
|
-
addEditableTags(fetched, contentType, true, language, {
|
|
209
|
-
useLowerCaseLocale: false
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
return fetched;
|
|
213
|
-
};
|
|
214
|
-
try {
|
|
215
|
-
const result = await tryFetch(language);
|
|
216
|
-
return result;
|
|
217
|
-
} catch (error) {
|
|
218
|
-
console.warn(
|
|
219
|
-
"Failed to fetch content with language:",
|
|
220
|
-
language,
|
|
221
|
-
error.message
|
|
222
|
-
);
|
|
223
|
-
try {
|
|
224
|
-
const fallbackResult = await tryFetch("en");
|
|
225
|
-
return fallbackResult;
|
|
226
|
-
} catch (fallbackError) {
|
|
227
|
-
console.warn(
|
|
228
|
-
"Failed to fetch content with fallback language:",
|
|
229
|
-
fallbackError.message
|
|
230
|
-
);
|
|
231
|
-
return null;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
export {
|
|
236
|
-
CONTENTSTACK_API_KEY,
|
|
237
|
-
CONTENTSTACK_DELIVERY_TOKEN,
|
|
238
|
-
CONTENTSTACK_ENVIRONMENT,
|
|
239
|
-
CONTENTSTACK_PREVIEW_TOKEN,
|
|
240
|
-
HeaderMFEContext,
|
|
241
|
-
HeaderPlaceholder,
|
|
242
|
-
Main_default as Main,
|
|
243
|
-
VB_EmptyBlockParentClass,
|
|
244
|
-
getContent,
|
|
245
|
-
getLocale,
|
|
246
|
-
getStackConfig,
|
|
247
|
-
initLivePreview,
|
|
248
|
-
isEditingMode,
|
|
249
|
-
onEntryChange,
|
|
250
|
-
referenceFields,
|
|
251
|
-
stack
|
|
252
|
-
};
|
|
253
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/HeaderPlaceholder.jsx","../src/Main.js","../src/styles/Main.styled.js","../src/utils/locale.js","../src/utils/config.js","../src/utils/contentstack.js","../src/constants.js"],"sourcesContent":["import React from \"react\";\n\n/**\n * Stub shell for the future header. Replace with real navigation/branding when\n * Contentstack content types and UX are defined.\n */\nexport default function HeaderPlaceholder() {\n return (\n <header role=\"banner\" data-testid=\"header-placeholder\">\n <p>Header MFE — TODO: implement header content</p>\n </header>\n );\n}\n","import React, { createContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Routes, Route, BrowserRouter } from \"react-router-dom\";\nimport HeaderPlaceholder from \"./components/HeaderPlaceholder\";\nimport { AppContainer } from \"./styles/Main.styled\";\nimport \"./styles/globals.css\";\nimport { getLocale } from \"./utils/locale\";\n\nexport const HeaderMFEContext = createContext({ isMFE: true });\n\nfunction Main({ isMFE = true }) {\n let { country, language } = getLocale();\n country = country.toLocaleLowerCase();\n language = language.toLocaleLowerCase();\n\n const baseName = isMFE\n ? `/${country}/${language}`\n : `/${country}/${language}/static/header-mfe`;\n\n return (\n <HeaderMFEContext.Provider value={{ isMFE }}>\n <BrowserRouter basename={baseName}>\n <AppContainer>\n <Routes>\n <Route path=\"*\" element={<HeaderPlaceholder />} />\n </Routes>\n </AppContainer>\n </BrowserRouter>\n </HeaderMFEContext.Provider>\n );\n}\n\nMain.propTypes = {\n isMFE: PropTypes.bool,\n};\n\nexport default Main;\n","import styled from \"@emotion/styled\";\n\nexport const AppContainer = styled.div`\n font-family: \"Inter\", sans-serif;\n`;\n","/**\n * Extracts the locale code from the provided URL or the current URL.\n *\n * @param options - An object with the following properties:\n * @param options.url - The URL to extract the locale code from. If not provided, the current URL will be used.\n * @param options.defaultLocale - The default locale code to use if the locale cannot be extracted from the URL.\n * @returns The locale code in the format \"language_COUNTRY\".\n */\nfunction getLocaleCodeFromUrl(options) {\n const { url = \"\", defaultLocale = \"\" } = options ?? {};\n\n let localeAsArr = [];\n\n let tempUrl = url || (typeof location != \"undefined\" && location.href);\n\n if (tempUrl) {\n /* adding dummy domain since express originalUrl will not have request domain */\n if (!tempUrl?.includes(\"https://\") && !tempUrl?.includes(\"http://\")) {\n tempUrl = `https://domain.com${tempUrl}`;\n }\n const updatedUrl = new URL(tempUrl);\n\n const pathParams = updatedUrl.pathname;\n if (pathParams) {\n const pathList = pathParams?.split(\"/\")?.filter(Boolean);\n if (pathList.length > 1) {\n localeAsArr = pathList;\n }\n }\n\n if (localeAsArr.length > 2) {\n localeAsArr = localeAsArr.slice(0, 2);\n }\n }\n localeAsArr = localeAsArr.reverse();\n\n if (localeAsArr.length === 0) {\n localeAsArr = defaultLocale.split(\"_\");\n }\n\n return `${localeAsArr[1]?.toUpperCase()}-${localeAsArr[0]}`;\n}\n\nfunction getLocale({ url } = {}) {\n const currentLocale = getLocaleCodeFromUrl(url ? { url } : null);\n const splitLocale = currentLocale?.split(\"-\");\n\n return {\n locale: currentLocale,\n language: splitLocale?.[1]?.toLowerCase(),\n country: splitLocale?.[0]?.toUpperCase(),\n };\n}\nexport { getLocale };\n","import { getLocale } from \"./locale\";\n\n/**\n * Stack-related config for Contentstack calls (e.g. getContent).\n * Set CONTENTSTACK_HEADER_CONTENT_TYPE in env when the header content type exists.\n */\nfunction getStackConfig() {\n const { locale } = getLocale();\n return {\n contentType: process.env.CONTENTSTACK_HEADER_CONTENT_TYPE || \"\",\n locale,\n };\n}\n\nexport { getStackConfig };\n","import contentstack from \"@contentstack/delivery-sdk\";\nimport ContentstackLivePreview from \"@contentstack/live-preview-utils\";\nimport { addEditableTags } from \"@contentstack/utils\";\nimport {\n CONTENTSTACK_API_KEY,\n CONTENTSTACK_DELIVERY_TOKEN,\n CONTENTSTACK_ENVIRONMENT,\n CONTENTSTACK_PREVIEW_TOKEN,\n} from \"../constants\";\n\n/**\n * Contentstack delivery stack, live preview, and entry fetch.\n * TODO: Call getContent from header UI once CONTENTSTACK_HEADER_CONTENT_TYPE and\n * URL/slug strategy are defined; wire initLivePreview / onEntryChange in Visual Builder.\n */\n\n// Lazy-initialize the stack to avoid \"API key is required\" errors\n// when this module is loaded via Module Federation on the host server\n// (where env vars may not be available).\nlet _stack = null;\nfunction getStack() {\n if (!_stack) {\n _stack = contentstack.stack({\n apiKey: CONTENTSTACK_API_KEY,\n deliveryToken: CONTENTSTACK_DELIVERY_TOKEN,\n environment: CONTENTSTACK_ENVIRONMENT,\n live_preview: {\n enable: true,\n preview_token: CONTENTSTACK_PREVIEW_TOKEN,\n host: \"rest-preview.contentstack.com\",\n },\n });\n }\n return _stack;\n}\n\nconst BRIDGED_CONFIG_KEYS = [\"live_preview\", \"headers\", \"environment\"];\n\nexport const stack = new Proxy(\n {},\n {\n get(_, prop) {\n const s = getStack();\n if (BRIDGED_CONFIG_KEYS.includes(prop)) {\n return s.config?.[prop];\n }\n return s[prop];\n },\n set(_, prop, value) {\n const s = getStack();\n if (BRIDGED_CONFIG_KEYS.includes(prop)) {\n if (!s.config) return false;\n s.config[prop] = value;\n return true;\n }\n s[prop] = value;\n return true;\n },\n has(_, prop) {\n if (BRIDGED_CONFIG_KEYS.includes(prop)) return true;\n return prop in getStack();\n },\n ownKeys() {\n return [\n ...new Set([...Reflect.ownKeys(getStack()), ...BRIDGED_CONFIG_KEYS]),\n ];\n },\n getOwnPropertyDescriptor(_, prop) {\n if (BRIDGED_CONFIG_KEYS.includes(prop)) {\n return {\n configurable: true,\n enumerable: true,\n writable: true,\n value: getStack().config?.[prop],\n };\n }\n return Object.getOwnPropertyDescriptor(getStack(), prop);\n },\n },\n);\n\nlet _livePreviewInitialized = false;\n\nexport const onEntryChange = ContentstackLivePreview.onEntryChange.bind(\n ContentstackLivePreview,\n);\n\nexport function initLivePreview() {\n if (_livePreviewInitialized) return;\n _livePreviewInitialized = true;\n\n ContentstackLivePreview.init({\n ssr: false,\n enable: true,\n mode: \"builder\",\n stackSdk: stack,\n stackDetails: {\n apiKey: CONTENTSTACK_API_KEY,\n environment: CONTENTSTACK_ENVIRONMENT,\n },\n clientUrlParams: {\n host: \"app.contentstack.com\",\n },\n editButton: {\n enable: false,\n },\n });\n}\n\nexport function isEditingMode() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (window.self !== window.top) {\n return true;\n }\n\n const params = new URLSearchParams(window.location.search);\n return (\n params.has(\"visual-builder\") ||\n params.has(\"contentstack\") ||\n params.has(\"live_preview\")\n );\n}\n\nexport const getContent = async ({\n url,\n uid,\n contentType,\n language,\n referenceFields = [],\n} = {}) => {\n const tryFetch = async (locale) => {\n const CT = stack.contentType(contentType);\n let fetched = null;\n\n if (uid) {\n fetched = await CT.entry(uid)\n .locale(locale)\n .includeReference(referenceFields)\n .fetch();\n } else if (url) {\n const urlWithSlash = url.startsWith(\"/\") ? url : `/${url}`;\n const result = await CT.entry()\n .locale(locale)\n .includeReference(referenceFields)\n .query({ url: urlWithSlash })\n .find();\n fetched = result.entries?.[0];\n }\n if (isEditingMode() && fetched) {\n addEditableTags(fetched, contentType, true, language, {\n useLowerCaseLocale: false,\n });\n }\n\n return fetched;\n };\n\n try {\n const result = await tryFetch(language);\n return result;\n } catch (error) {\n console.warn(\n \"Failed to fetch content with language:\",\n language,\n error.message,\n );\n try {\n const fallbackResult = await tryFetch(\"en\");\n return fallbackResult;\n } catch (fallbackError) {\n console.warn(\n \"Failed to fetch content with fallback language:\",\n fallbackError.message,\n );\n return null;\n }\n }\n};\n","const CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;\nconst CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;\nconst CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;\nconst CONTENTSTACK_PREVIEW_TOKEN = process.env.CONTENTSTACK_PREVIEW_TOKEN;\n\n/**\n * Reference field UIDs for `includeReference` when fetching header entries.\n * TODO: populate when the header content model uses references.\n */\nconst referenceFields = [];\n\n// SSR-safe constant — avoids importing @contentstack/live-preview-utils\n// which accesses `window` at module load time.\nconst VB_EmptyBlockParentClass = \"visual-builder__empty-block-parent\";\n\nexport {\n CONTENTSTACK_API_KEY,\n CONTENTSTACK_DELIVERY_TOKEN,\n CONTENTSTACK_ENVIRONMENT,\n CONTENTSTACK_PREVIEW_TOKEN,\n referenceFields,\n VB_EmptyBlockParentClass,\n};\n"],"mappings":";AAAA,OAAO,WAAW;AAMH,SAAR,oBAAqC;AAC1C,SACE,oCAAC,YAAO,MAAK,UAAS,eAAY,wBAChC,oCAAC,WAAE,kDAA2C,CAChD;AAEJ;;;ACZA,OAAOA,UAAS,qBAAqB;AACrC,OAAO,eAAe;AACtB,SAAS,QAAQ,OAAO,qBAAqB;;;ACF7C,OAAO,YAAY;AAEZ,IAAM,eAAe,OAAO;AAAA;AAAA;;;ACMnC,SAAS,qBAAqB,SAAS;AARvC;AASE,QAAM,EAAE,MAAM,IAAI,gBAAgB,GAAG,IAAI,WAAW,CAAC;AAErD,MAAI,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