@nationalarchives/frontend 1.3.0 → 1.4.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/nationalarchives/all+analytics.js +1 -1
- package/nationalarchives/all+analytics.js.map +1 -1
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/analytics.js +1 -1
- package/nationalarchives/analytics.js.map +1 -1
- package/nationalarchives/analytics.mjs +1 -1
- package/nationalarchives/components/accordion/accordion.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +10 -1
- package/nationalarchives/components/code-block/code-block.js.map +1 -1
- package/nationalarchives/components/code-block/fixtures.json +1 -1
- package/nationalarchives/components/code-block/template.njk +1 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
- package/nationalarchives/components/date-input/date-input.js.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
- package/nationalarchives/components/file-input/file-input.js.map +1 -1
- package/nationalarchives/components/footer/footer.js.map +1 -1
- package/nationalarchives/components/gallery/gallery.js.map +1 -1
- package/nationalarchives/components/global-header/global-header.js.map +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/sidebar/sidebar.js.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
- package/nationalarchives/components/tabs/fixtures.json +149 -0
- package/nationalarchives/components/tabs/macro-options.json +18 -0
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.mjs +18 -10
- package/nationalarchives/components/tabs/tabs.scss +3 -1
- package/nationalarchives/components/tabs/template.njk +1 -1
- package/nationalarchives/components/text-input/text-input.js.map +1 -1
- package/nationalarchives/components/textarea/textarea.js.map +1 -1
- package/nationalarchives/error-page.css +1 -1
- package/nationalarchives/error-page.css.map +1 -1
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/file-input/file-input.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,
|
|
1
|
+
{"version":3,"file":"components/file-input/file-input.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,I,mBCRD,MAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAR,EAAAO,IACAE,OAAAC,eAAAV,EAAAO,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ,EAAAC,IAAAL,OAAAM,UAAAC,eAAAC,KAAAJ,EAAAC,GCCAT,EAAAL,IACAS,OAAAC,eAAAV,EAAAkB,OAAAC,YAAA,CAAsDC,MAAA,WACtDX,OAAAC,eAAAV,EAAA,cAAgDoB,OAAA,M,kDCHzC,M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webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/file-input/file-input.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class FileInputDroppable {\n constructor($module) {\n this.$module = $module;\n this.$body = $module && $module.querySelector(\".tna-form-item__body\");\n this.$input = this.$body && this.$body.querySelector(\".tna-file-input\");\n\n if (!this.$module || !this.$body || !this.$input) {\n return;\n }\n\n this.acceptMutltipleFiles = this.$input.hasAttribute(\"multiple\");\n\n this.init();\n }\n\n init() {\n this.$droppableArea = document.createElement(\"div\");\n this.$droppableArea.classList.add(\n \"tna-file-input__droppable\",\n \"tna-file-input__droppable--empty\",\n );\n this.$body.insertBefore(this.$droppableArea, this.$input);\n this.$droppableArea.appendChild(this.$input);\n this.$pseudoSelectFileText = document.createElement(\"span\");\n this.$pseudoSelectFileText.setAttribute(\"aria-live\", \"polite\");\n this.$pseudoSelectFileText.classList.add(\n \"tna-file-input__droppable-status\",\n );\n const fileText = this.acceptMutltipleFiles ? \"files\" : \"file\";\n this.$pseudoSelectFileText.textContent = `No ${fileText} selected`;\n this.$droppableArea.appendChild(this.$pseudoSelectFileText);\n const $droppableButtons = document.createElement(\"div\");\n $droppableButtons.classList.add(\n \"tna-button-group\",\n \"tna-button-group--small\",\n \"tna-!--margin-top-s\",\n \"tna-file-input__droppable-buttons\",\n );\n this.$droppableArea.appendChild($droppableButtons);\n const $pseudoSelectFileButton = document.createElement(\"span\");\n $pseudoSelectFileButton.classList.add(\"tna-button\");\n $pseudoSelectFileButton.textContent = `Choose ${fileText}`;\n $droppableButtons.appendChild($pseudoSelectFileButton);\n const $pseudoDropFileButton = document.createElement(\"span\");\n $pseudoDropFileButton.textContent = `or drop ${fileText}`;\n $droppableButtons.appendChild($pseudoDropFileButton);\n this.$droppableAreaAriaLabel = document.createElement(\"span\");\n this.$droppableAreaAriaLabel.classList.add(\"tna-visually-hidden\");\n this.$droppableAreaAriaLabel.setAttribute(\"aria-live\", \"assertive\");\n this.$droppableArea.appendChild(this.$droppableAreaAriaLabel);\n\n this.$input.addEventListener(\"dragenter\", (event) =>\n this.showDropTarget(event),\n );\n this.$input.addEventListener(\"dragleave\", () => this.hideDropTarget());\n this.$input.addEventListener(\"dragend\", () => this.hideDropTarget());\n this.$input.addEventListener(\"change\", () => this.onChange());\n this.$input.addEventListener(\"drop\", () => this.onChange());\n }\n\n /* eslint-disable-next-line class-methods-use-this */\n isContainingFiles(dataTransfer) {\n const hasNoTypesInfo = !dataTransfer.types.length;\n const isDraggingFiles = dataTransfer.types.some((type) => type === \"Files\");\n return hasNoTypesInfo || isDraggingFiles;\n }\n\n showDropTarget(event, updateAriaLabel = true) {\n if (event.dataTransfer && this.isContainingFiles(event.dataTransfer)) {\n let classToAdd = \"tna-file-input__droppable--over\";\n if (event.dataTransfer.items.length) {\n classToAdd = \"tna-file-input__droppable--over-multiple\";\n }\n this.$droppableArea.classList.add(classToAdd);\n\n if (updateAriaLabel) {\n this.$droppableAreaAriaLabel.textContent = \"Entered drop zone\";\n }\n }\n }\n\n hideDropTarget(updateAriaLabel = true) {\n this.$droppableArea.classList.remove(\n \"tna-file-input__droppable--over\",\n \"tna-file-input__droppable--over-multiple\",\n );\n if (updateAriaLabel) {\n this.$droppableAreaAriaLabel.textContent = \"Left drop zone\";\n }\n }\n\n onChange() {\n const { files } = this.$input;\n if (this.acceptMutltipleFiles) {\n if (files.length) {\n let fileText = \"file\";\n /* eslint-disable-next-line no-magic-numbers */\n if (files.length > 1) {\n fileText += \"s\";\n }\n const textContent = `${files.length} ${fileText} selected`;\n this.$pseudoSelectFileText.textContent = textContent;\n } else {\n this.$pseudoSelectFileText.textContent = `No files selected`;\n }\n } else {\n this.$pseudoSelectFileText.textContent =\n /* eslint-disable-next-line no-magic-numbers */\n files[0]?.name || `No file selected`;\n }\n if (files.length) {\n this.$droppableArea.classList.remove(\"tna-file-input__droppable--empty\");\n } else {\n this.$droppableArea.classList.add(\"tna-file-input__droppable--empty\");\n }\n this.hideDropTarget(false);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","FileInputDroppable","constructor","$module","this","$body","querySelector","$input","acceptMutltipleFiles","hasAttribute","init","$droppableArea","document","createElement","classList","add","insertBefore","appendChild","$pseudoSelectFileText","setAttribute","fileText","textContent","$droppableButtons","$pseudoSelectFileButton","$pseudoDropFileButton","$droppableAreaAriaLabel","addEventListener","event","showDropTarget","hideDropTarget","onChange","isContainingFiles","dataTransfer","hasNoTypesInfo","types","length","isDraggingFiles","some","type","updateAriaLabel","classToAdd","items","remove","files","name"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/footer/footer.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG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,WAAW,aAC3B/C,KAAKsH,qBAAqBoB,gBAAgB,SAE9C,CAEA,QAAAJ,CAASO,GACP,GAAc,UAAVA,EACF7I,KAAKwH,aAAasB,UAAUC,OAC1B,6BACA,iCAEG,GAAc,SAAVF,EACT7I,KAAKwH,aAAasB,UAAUC,OAAO,8BACnC/I,KAAKwH,aAAasB,UAAUE,IAAI,gCAC3B,IAAc,WAAVH,EAIT,OAHA7I,KAAKwH,aAAasB,UAAUC,OAAO,4BACnC/I,KAAKwH,aAAasB,UAAUE,IAAI,6BAGlC,CACAhJ,KAAKyH,aAAeoB,EAChB7I,KAAK2H,QAAQ5E,WAAW,YAC1B/C,KAAK2H,QAAQnD,IAAIxE,KAAKmH,gBAAiBnH,KAAKyH,cAE5CzH,KAAKsH,qBAAqBoB,gBAAgB,SAE9C,CAEA,yBAAAH,CAA0BU,GACxBjB,MAAMC,KAAKjI,KAAK8H,uBAAuBpH,QAAS0H,IAC1CA,EAAQpE,QAAUiF,EAAgBjF,OACpCoE,EAAQU,UAAUC,OAAO,qBACzBX,EAAQK,aAAa,gBAAgB,KAErCL,EAAQU,UAAUE,IAAI,qBACtBZ,EAAQM,gBAAgB,kBAG9B","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./node_modules/@nationalarchives/cookies/src/events.js","webpack://TNAFrontend/./node_modules/@nationalarchives/cookies/src/index.js","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","/**\n * Class to handle cookie events.\n * @class CookieEventHandler\n * @constructor\n * @public\n */\nexport default class CookieEventHandler {\n /** @protected */\n events = {};\n /** @protected */\n oneTimeEvents = {};\n\n constructor() {\n if (\n window.TNAFrontendCookieEvents &&\n window.TNAFrontendCookieEvents instanceof CookieEventHandler\n ) {\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n /**\n * Clear all event listeners.\n */\n clearAll() {\n this.events = {};\n this.oneTimeEvents = {};\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events[event] = [...(this.events[event] || []), callback];\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.oneTimeEvents[event] = [\n ...(this.oneTimeEvents[event] || []),\n callback,\n ];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event].forEach((eachEvent) =>\n eachEvent.call(this, data),\n );\n this.oneTimeEvents[event] = [];\n }\n }\n}\n","/* eslint-disable max-lines, no-ternary */\n\nimport CookieEventHandler from \"./events\";\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n preferencesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n preferencesCorrectOnInit = false;\n\n /** @protected */\n tnaCookiePreferences = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.preferencesKey] - The name of the cookie that stores the user's preferences.\n * @param {String} [options.preferencesSetKey] - The name of the cookie that dictates whether the user's preferences have been set.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie preference.\n */\n /* eslint-disable-next-line max-statements, */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n preferencesKey,\n preferencesSetKey,\n defaultAge,\n noInit = false,\n } = options;\n const docDataset = document.documentElement.dataset;\n this.defaultDomain = defaultDomain\n ? defaultDomain\n : docDataset.tnaCookiesDomain || window.location.hostname;\n this.defaultPath = defaultPath\n ? defaultPath\n : docDataset.tnaCookiesPath || \"/\";\n this.secure = secure ? secure : docDataset.tnaCookiesInsecure !== \"true\";\n this.preferencesKey = preferencesKey\n ? preferencesKey\n : docDataset.tnaCookiesPreferencesKey || \"cookie_preferences\";\n this.preferencesSetKey = preferencesSetKey\n ? preferencesSetKey\n : docDataset.tnaCookiesPreferencesSetKey || \"cookie_preferences_set\";\n this.defaultAge = defaultAge\n ? defaultAge\n : parseInt(docDataset.tnaCookiesDefaultAge, 10) ||\n /* eslint-disable-next-line no-magic-numbers */\n 365 * 24 * 60 * 60;\n this.events = new CookieEventHandler();\n this.preferencesCorrectOnInit = this.validatePreferences(this.preferences);\n if (!this.preferencesCorrectOnInit) {\n this.preferencesSet = false;\n if (!noInit) {\n this.init();\n }\n }\n }\n\n /** @protected */\n init() {\n const existingPreferences = this.preferences;\n const filteredExistingPreferences = Object.fromEntries(\n Object.keys(existingPreferences)\n .filter((preference) => this.tnaCookiePreferences.includes(preference))\n .map((preference) => [preference, existingPreferences[preference]]),\n );\n this.savePreferences({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPreferences,\n essential: true,\n });\n }\n\n validatePreferences(preferences) {\n return (\n Object.keys(preferences).length === this.tnaCookiePreferences.length &&\n this.tnaCookiePreferences.every(\n (preference) =>\n Object.keys(preferences).includes(preference) &&\n typeof preferences[preference] === \"boolean\",\n )\n );\n }\n\n /** @protected */\n /* eslint-disable-next-line class-methods-use-this */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((cookie) => cookie.trim() !== \"\")\n .filter((cookie) => cookie.includes(\"=\"))\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n const [key, value = \"\"] = parts;\n deserialised[key] = decodeURIComponent(value);\n });\n return deserialised;\n }\n\n /** @protected */\n get preferences() {\n try {\n return JSON.parse(this.get(this.preferencesKey) || \"{}\");\n // eslint-disable-next-line no-unused-vars\n } catch (error) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) === value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean|null}\n */\n get(key) {\n if (this.exists(key)) {\n return decodeURIComponent(this.all[key]);\n }\n /* eslint-disable-next-line no-undefined */\n return undefined;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n const secureString = secure ? \"; secure\" : \"\";\n const sessionString = session ? \"\" : `; max-age=${maxAge}`;\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${sessionString}${secureString}`;\n document.cookie = cookie;\n const cookieDetails = {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n };\n this.events.trigger(\"setCookie\", cookieDetails);\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain };\n this.set(key, \"\", options);\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n const details = { path, domain };\n this.events.trigger(\"deleteAllCookies\", details);\n }\n\n /**\n * Accept a preference.\n * @param {String} preference - The name of the preference.\n */\n enablePreference(preference) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n this.setPreference(preference, true);\n this.events.trigger(\"enablePreference\", preference);\n this.events.trigger(\"changePreference\", { [preference]: true });\n }\n\n /**\n * Reject a preference.\n * @param {String} preference - The name of the preference.\n */\n disablePreference(preference) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n this.setPreference(preference, false);\n this.events.trigger(\"disablePreference\", preference);\n this.events.trigger(\"changePreference\", { [preference]: false });\n }\n\n /**\n * Set a preference.\n * @param {String} preference - The name of the preference.\n * @param {Boolean} accepted - Whether the preference is accepted or not.\n */\n setPreference(preference, accepted) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n if (preference === \"essential\") {\n return;\n }\n this.savePreferences({\n ...this.preferences,\n [preference]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePreference\", { [preference]: accepted });\n }\n\n /**\n * Accept all the cookie preferences.\n */\n enableAllPreferences() {\n const allPreferences = Object.fromEntries(\n Object.keys(this.preferences).map((key) => [key.toLowerCase(), true]),\n );\n this.savePreferences(allPreferences);\n this.preferencesSet = true;\n this.events.trigger(\"enableAllPreferences\");\n this.events.trigger(\"changePreference\", allPreferences);\n }\n\n /**\n * Reject all the cookie preferences.\n */\n disableAllPreferences() {\n const allPreferences = {\n ...Object.fromEntries(\n Object.keys(this.preferences).map((key) => [key.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePreferences(allPreferences);\n this.preferencesSet = true;\n this.events.trigger(\"disableAllPreferences\");\n this.events.trigger(\"changePreference\", allPreferences);\n }\n\n /** @protected */\n savePreferences(preferences) {\n this.set(this.preferencesKey, JSON.stringify(preferences));\n }\n\n /**\n * Get the status of whether the preferences have been set.\n * @returns {Boolean}\n */\n get preferencesSet() {\n return this.hasValue(this.preferencesSetKey, \"true\");\n }\n\n /**\n * Set the status of whether the preferences have been set.\n * @param {Boolean} value\n */\n set preferencesSet(value) {\n if (\n value === true &&\n this.validatePreferences(JSON.parse(this.get(this.preferencesKey)))\n ) {\n this.set(this.preferencesSetKey, \"true\");\n } else {\n this.delete(this.preferencesSetKey);\n }\n this.events.trigger(\"preferencesSet\");\n }\n\n /**\n * Get the acceptance status of a preference.\n * @param {String} preference - The name of the preference.\n * @returns {Boolean}\n */\n preference(preference) {\n if (Object.hasOwn(this.preferences, preference)) {\n return this.preferences[preference] === true;\n }\n throw new Error(`Preference '${preference}' does not exist`);\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.events.once(event, callback);\n }\n}\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Cookies from \"@nationalarchives/cookies/src/index.js\";\n\nexport class Footer {\n constructor($module, themeCookieName = \"theme\") {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$themeSelectorNotice =\n $module && $module.querySelector(\".tna-footer__theme-selector-notice\");\n this.$themeSelectorEnableSettingsCookiesButton =\n this.$themeSelectorNotice &&\n this.$themeSelectorNotice.querySelector(\n \".tna-footer__theme-selector-enable-settings-cookies\",\n );\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (\n !this.$module ||\n !this.$themeSelector ||\n !this.$themeSelectorNotice ||\n !this.$themeSelectorEnableSettingsCookiesButton ||\n !this.$tnaTemplate\n ) {\n return;\n }\n\n this.themeCookieName = themeCookieName;\n\n this.init();\n }\n\n init() {\n this.currentTheme = this.$themeSelector.dataset.themeOnLoad;\n\n this.cookies = new Cookies();\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (event) => {\n const $button = event.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.$themeSelectorEnableSettingsCookiesButton.addEventListener(\n \"click\",\n () => {\n this.cookies.enablePreference(\"settings\");\n },\n );\n\n this.showThemeSelector();\n this.cookies.on(\"changePreference\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n this.$themeSelectorNotice.setAttribute(\"hidden\", \"\");\n } else {\n this.cookies.delete(this.themeCookieName);\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(this.themeCookieName)) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(this.themeCookieName),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n if (!this.cookies.preference(\"settings\")) {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.currentTheme = theme;\n if (this.cookies.preference(\"settings\")) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n } else {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","CookieEventHandler","events","oneTimeEvents","constructor","window","TNAFrontendCookieEvents","this","clearAll","on","event","callback","once","trigger","data","Object","hasOwn","forEach","eventToTrigger","call","eachEvent","Cookies","defaultDomain","defaultPath","secure","preferencesKey","defaultAge","preferencesCorrectOnInit","tnaCookiePreferences","options","preferencesSetKey","noInit","docDataset","document","documentElement","dataset","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPreferencesKey","tnaCookiesPreferencesSetKey","parseInt","tnaCookiesDefaultAge","validatePreferences","preferences","preferencesSet","init","existingPreferences","filteredExistingPreferences","fromEntries","keys","filter","preference","includes","map","savePreferences","usage","settings","marketing","essential","length","every","all","deserialised","cookie","split","trim","parts","key","value","decodeURIComponent","JSON","parse","get","error","exists","hasValue","set","maxAge","sameSite","domain","path","session","secureString","sessionString","encodeURIComponent","cookieDetails","deleteAll","delete","details","enablePreference","Error","setPreference","disablePreference","accepted","enableAllPreferences","allPreferences","toLowerCase","disableAllPreferences","stringify","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","Footer","$module","themeCookieName","$themeSelector","querySelector","$themeSelectorNotice","$themeSelectorEnableSettingsCookiesButton","$tnaTemplate","currentTheme","themeOnLoad","cookies","_nationalarchives_cookies_src_index_js__WEBPACK_IMPORTED_MODULE_0__","A","$themeSelectorButtons","querySelectorAll","Array","from","$themeSelectorButton","addEventListener","$button","target","setTheme","selectThemeSelectorButton","showThemeSelector","setAttribute","removeAttribute","$currentThemeButton","find","theme","classList","remove","add","$selectedButton"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/footer/footer.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,I,sDCHc,MAAAC,EAEfC,OAAA,GAEAC,cAAA,GAEA,WAAAC,GACA,GACAC,OAAAC,yBACAD,OAAAC,mCAAAL,EAGA,OAAAI,OAAAC,wBAEAD,OAAAC,wBAAAC,IACA,CAKA,QAAAC,GACAD,KAAAL,OAAA,GACAK,KAAAJ,cAAA,EACA,CAOA,EAAAM,CAAAC,EAAAC,GACAJ,KAAAL,OAAAQ,GAAA,IAAAH,KAAAL,OAAAQ,IAAA,GAAAC,EACA,CAOA,IAAAC,CAAAF,EAAAC,GACAJ,KAAAJ,cAAAO,GAAA,IACAH,KAAAJ,cAAAO,IAAA,GACAC,EAEA,CAGA,OAAAE,CAAAH,EAAAI,EAAA,IACAC,OAAAC,OAAAT,KAAAL,OAAAQ,IACAH,KAAAL,OAAAQ,GAAAO,QAAAC,GACAA,EAAAC,KAAAZ,KAAAO,IAGAC,OAAAC,OAAAT,KAAAJ,cAAAO,KACAH,KAAAJ,cAAAO,GAAAO,QAAAG,GACAA,EAAAD,KAAAZ,KAAAO,IAEAP,KAAAJ,cAAAO,GAAA,GAEA,ECvDe,MAAAW,EAEfC,cAAA,GAEAC,YAAA,GAEAC,QAAA,EAEAC,eAAA,GAEAvB,OAAA,KAEAwB,WAAA,KAEAC,0BAAA,EAGAC,qBAAA,6CAaA,WAAAxB,CAAAyB,EAAA,IACA,MAAAP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,CAEA,iBAAAF,GAEE,GADAxI,KAAKoH,eAAesB,gBAAgB,UAChC1I,KAAK2H,QAAQrD,OAAOtE,KAAKmH,iBAAkB,CAC7C,MAAMwB,EAAsBX,MAAMC,KAAKjI,KAAK8H,uBAAuBc,KAChER,GAAYA,EAAQpE,QAAUhE,KAAK2H,QAAQvD,IAAIpE,KAAKmH,kBAEnDwB,GACF3I,KAAKuI,0BAA0BI,EAEnC,CACK3I,KAAK2H,QAAQ5E,WAAW,aAC3B/C,KAAKsH,qBAAqBoB,gBAAgB,SAE9C,CAEA,QAAAJ,CAASO,GACP,GAAc,UAAVA,EACF7I,KAAKwH,aAAasB,UAAUC,OAC1B,6BACA,iCAEG,GAAc,SAAVF,EACT7I,KAAKwH,aAAasB,UAAUC,OAAO,8BACnC/I,KAAKwH,aAAasB,UAAUE,IAAI,gCAC3B,IAAc,WAAVH,EAIT,OAHA7I,KAAKwH,aAAasB,UAAUC,OAAO,4BACnC/I,KAAKwH,aAAasB,UAAUE,IAAI,6BAGlC,CACAhJ,KAAKyH,aAAeoB,EAChB7I,KAAK2H,QAAQ5E,WAAW,YAC1B/C,KAAK2H,QAAQnD,IAAIxE,KAAKmH,gBAAiBnH,KAAKyH,cAE5CzH,KAAKsH,qBAAqBoB,gBAAgB,SAE9C,CAEA,yBAAAH,CAA0BU,GACxBjB,MAAMC,KAAKjI,KAAK8H,uBAAuBpH,QAAS0H,IAC1CA,EAAQpE,QAAUiF,EAAgBjF,OACpCoE,EAAQU,UAAUC,OAAO,qBACzBX,EAAQK,aAAa,gBAAgB,KAErCL,EAAQU,UAAUE,IAAI,qBACtBZ,EAAQM,gBAAgB,kBAG9B,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./node_modules/@nationalarchives/cookies/src/events.js","webpack://TNAFrontend/./node_modules/@nationalarchives/cookies/src/index.js","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","/**\n * Class to handle cookie events.\n * @class CookieEventHandler\n * @constructor\n * @public\n */\nexport default class CookieEventHandler {\n /** @protected */\n events = {};\n /** @protected */\n oneTimeEvents = {};\n\n constructor() {\n if (\n window.TNAFrontendCookieEvents &&\n window.TNAFrontendCookieEvents instanceof CookieEventHandler\n ) {\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n /**\n * Clear all event listeners.\n */\n clearAll() {\n this.events = {};\n this.oneTimeEvents = {};\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events[event] = [...(this.events[event] || []), callback];\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.oneTimeEvents[event] = [\n ...(this.oneTimeEvents[event] || []),\n callback,\n ];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event].forEach((eachEvent) =>\n eachEvent.call(this, data),\n );\n this.oneTimeEvents[event] = [];\n }\n }\n}\n","/* eslint-disable max-lines, no-ternary */\n\nimport CookieEventHandler from \"./events\";\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n preferencesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n preferencesCorrectOnInit = false;\n\n /** @protected */\n tnaCookiePreferences = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.preferencesKey] - The name of the cookie that stores the user's preferences.\n * @param {String} [options.preferencesSetKey] - The name of the cookie that dictates whether the user's preferences have been set.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie preference.\n */\n /* eslint-disable-next-line max-statements, */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n preferencesKey,\n preferencesSetKey,\n defaultAge,\n noInit = false,\n } = options;\n const docDataset = document.documentElement.dataset;\n this.defaultDomain = defaultDomain\n ? defaultDomain\n : docDataset.tnaCookiesDomain || window.location.hostname;\n this.defaultPath = defaultPath\n ? defaultPath\n : docDataset.tnaCookiesPath || \"/\";\n this.secure = secure ? secure : docDataset.tnaCookiesInsecure !== \"true\";\n this.preferencesKey = preferencesKey\n ? preferencesKey\n : docDataset.tnaCookiesPreferencesKey || \"cookie_preferences\";\n this.preferencesSetKey = preferencesSetKey\n ? preferencesSetKey\n : docDataset.tnaCookiesPreferencesSetKey || \"cookie_preferences_set\";\n this.defaultAge = defaultAge\n ? defaultAge\n : parseInt(docDataset.tnaCookiesDefaultAge, 10) ||\n /* eslint-disable-next-line no-magic-numbers */\n 365 * 24 * 60 * 60;\n this.events = new CookieEventHandler();\n this.preferencesCorrectOnInit = this.validatePreferences(this.preferences);\n if (!this.preferencesCorrectOnInit) {\n this.preferencesSet = false;\n if (!noInit) {\n this.init();\n }\n }\n }\n\n /** @protected */\n init() {\n const existingPreferences = this.preferences;\n const filteredExistingPreferences = Object.fromEntries(\n Object.keys(existingPreferences)\n .filter((preference) => this.tnaCookiePreferences.includes(preference))\n .map((preference) => [preference, existingPreferences[preference]]),\n );\n this.savePreferences({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPreferences,\n essential: true,\n });\n }\n\n validatePreferences(preferences) {\n return (\n Object.keys(preferences).length === this.tnaCookiePreferences.length &&\n this.tnaCookiePreferences.every(\n (preference) =>\n Object.keys(preferences).includes(preference) &&\n typeof preferences[preference] === \"boolean\",\n )\n );\n }\n\n /** @protected */\n /* eslint-disable-next-line class-methods-use-this */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((cookie) => cookie.trim() !== \"\")\n .filter((cookie) => cookie.includes(\"=\"))\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n const [key, value = \"\"] = parts;\n deserialised[key] = decodeURIComponent(value);\n });\n return deserialised;\n }\n\n /** @protected */\n get preferences() {\n try {\n return JSON.parse(this.get(this.preferencesKey) || \"{}\");\n // eslint-disable-next-line no-unused-vars\n } catch (error) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) === value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean|null}\n */\n get(key) {\n if (this.exists(key)) {\n return decodeURIComponent(this.all[key]);\n }\n /* eslint-disable-next-line no-undefined */\n return undefined;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n const secureString = secure ? \"; secure\" : \"\";\n const sessionString = session ? \"\" : `; max-age=${maxAge}`;\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${sessionString}${secureString}`;\n document.cookie = cookie;\n const cookieDetails = {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n };\n this.events.trigger(\"setCookie\", cookieDetails);\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain };\n this.set(key, \"\", options);\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n const details = { path, domain };\n this.events.trigger(\"deleteAllCookies\", details);\n }\n\n /**\n * Accept a preference.\n * @param {String} preference - The name of the preference.\n */\n enablePreference(preference) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n this.setPreference(preference, true);\n this.events.trigger(\"enablePreference\", preference);\n this.events.trigger(\"changePreference\", { [preference]: true });\n }\n\n /**\n * Reject a preference.\n * @param {String} preference - The name of the preference.\n */\n disablePreference(preference) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n this.setPreference(preference, false);\n this.events.trigger(\"disablePreference\", preference);\n this.events.trigger(\"changePreference\", { [preference]: false });\n }\n\n /**\n * Set a preference.\n * @param {String} preference - The name of the preference.\n * @param {Boolean} accepted - Whether the preference is accepted or not.\n */\n setPreference(preference, accepted) {\n if (!Object.hasOwn(this.preferences, preference)) {\n throw new Error(`Preference '${preference}' does not exist`);\n }\n if (preference === \"essential\") {\n return;\n }\n this.savePreferences({\n ...this.preferences,\n [preference]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePreference\", { [preference]: accepted });\n }\n\n /**\n * Accept all the cookie preferences.\n */\n enableAllPreferences() {\n const allPreferences = Object.fromEntries(\n Object.keys(this.preferences).map((key) => [key.toLowerCase(), true]),\n );\n this.savePreferences(allPreferences);\n this.preferencesSet = true;\n this.events.trigger(\"enableAllPreferences\");\n this.events.trigger(\"changePreference\", allPreferences);\n }\n\n /**\n * Reject all the cookie preferences.\n */\n disableAllPreferences() {\n const allPreferences = {\n ...Object.fromEntries(\n Object.keys(this.preferences).map((key) => [key.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePreferences(allPreferences);\n this.preferencesSet = true;\n this.events.trigger(\"disableAllPreferences\");\n this.events.trigger(\"changePreference\", allPreferences);\n }\n\n /** @protected */\n savePreferences(preferences) {\n this.set(this.preferencesKey, JSON.stringify(preferences));\n }\n\n /**\n * Get the status of whether the preferences have been set.\n * @returns {Boolean}\n */\n get preferencesSet() {\n return this.hasValue(this.preferencesSetKey, \"true\");\n }\n\n /**\n * Set the status of whether the preferences have been set.\n * @param {Boolean} value\n */\n set preferencesSet(value) {\n if (\n value === true &&\n this.validatePreferences(JSON.parse(this.get(this.preferencesKey)))\n ) {\n this.set(this.preferencesSetKey, \"true\");\n } else {\n this.delete(this.preferencesSetKey);\n }\n this.events.trigger(\"preferencesSet\");\n }\n\n /**\n * Get the acceptance status of a preference.\n * @param {String} preference - The name of the preference.\n * @returns {Boolean}\n */\n preference(preference) {\n if (Object.hasOwn(this.preferences, preference)) {\n return this.preferences[preference] === true;\n }\n throw new Error(`Preference '${preference}' does not exist`);\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.events.once(event, callback);\n }\n}\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Cookies from \"@nationalarchives/cookies/src/index.js\";\n\nexport class Footer {\n constructor($module, themeCookieName = \"theme\") {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$themeSelectorNotice =\n $module && $module.querySelector(\".tna-footer__theme-selector-notice\");\n this.$themeSelectorEnableSettingsCookiesButton =\n this.$themeSelectorNotice &&\n this.$themeSelectorNotice.querySelector(\n \".tna-footer__theme-selector-enable-settings-cookies\",\n );\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (\n !this.$module ||\n !this.$themeSelector ||\n !this.$themeSelectorNotice ||\n !this.$themeSelectorEnableSettingsCookiesButton ||\n !this.$tnaTemplate\n ) {\n return;\n }\n\n this.themeCookieName = themeCookieName;\n\n this.init();\n }\n\n init() {\n this.currentTheme = this.$themeSelector.dataset.themeOnLoad;\n\n this.cookies = new Cookies();\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (event) => {\n const $button = event.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.$themeSelectorEnableSettingsCookiesButton.addEventListener(\n \"click\",\n () => {\n this.cookies.enablePreference(\"settings\");\n },\n );\n\n this.showThemeSelector();\n this.cookies.on(\"changePreference\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n this.$themeSelectorNotice.setAttribute(\"hidden\", \"\");\n } else {\n this.cookies.delete(this.themeCookieName);\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(this.themeCookieName)) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(this.themeCookieName),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n if (!this.cookies.preference(\"settings\")) {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.currentTheme = theme;\n if (this.cookies.preference(\"settings\")) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n } else {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","CookieEventHandler","events","oneTimeEvents","constructor","window","TNAFrontendCookieEvents","this","clearAll","on","event","callback","once","trigger","data","Object","hasOwn","forEach","eventToTrigger","call","eachEvent","Cookies","defaultDomain","defaultPath","secure","preferencesKey","defaultAge","preferencesCorrectOnInit","tnaCookiePreferences","options","preferencesSetKey","noInit","docDataset","document","documentElement","dataset","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPreferencesKey","tnaCookiesPreferencesSetKey","parseInt","tnaCookiesDefaultAge","validatePreferences","preferences","preferencesSet","init","existingPreferences","filteredExistingPreferences","fromEntries","keys","filter","preference","includes","map","savePreferences","usage","settings","marketing","essential","length","every","all","deserialised","cookie","split","trim","parts","key","value","decodeURIComponent","JSON","parse","get","error","exists","hasValue","set","maxAge","sameSite","domain","path","session","secureString","sessionString","encodeURIComponent","cookieDetails","deleteAll","delete","details","enablePreference","Error","setPreference","disablePreference","accepted","enableAllPreferences","allPreferences","toLowerCase","disableAllPreferences","stringify","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","Footer","$module","themeCookieName","$themeSelector","querySelector","$themeSelectorNotice","$themeSelectorEnableSettingsCookiesButton","$tnaTemplate","currentTheme","themeOnLoad","cookies","_nationalarchives_cookies_src_index_js__WEBPACK_IMPORTED_MODULE_0__","A","$themeSelectorButtons","querySelectorAll","Array","from","$themeSelectorButton","addEventListener","$button","target","setTheme","selectThemeSelectorButton","showThemeSelector","setAttribute","removeAttribute","$currentThemeButton","find","theme","classList","remove","add","$selectedButton"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/gallery/gallery.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,uBCRD,MAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAR,EAAAO,IACAE,OAAAC,eAAAV,EAAAO,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ,EAAAC,IAAAL,OAAAM,UAAAC,eAAAC,KAAAJ,EAAAC,GCCAT,EAAAL,IACAS,OAAAC,eAAAV,EAAAkB,OAAAC,YAAA,CAAsDC,MAAA,WACtDX,OAAAC,eAAAV,EAAA,cAAgDoB,OAAA,6CCHzC,MAAMC,EACX,WAAAC,CAAYC,GACVC,KAAKD,QAAUA,EACfC,KAAKC,gBACHF,GAAWA,EAAQG,cAAc,uBACnCF,KAAKG,OACHH,KAAKC,iBACLD,KA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C7C,CAEA,aAAAa,GAEE5B,KAAKgB,SAAShB,KAAKG,OAAO,GAAGY,GAC/B,CAEA,YAAAc,GAEE7B,KAAKgB,SAAShB,KAAKG,OAAOH,KAAKG,OAAOK,OAAS,GAAGO,GACpD","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n /* eslint-disable-next-line no-magic-numbers */\n this.$items.length < 2 ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.setup();\n /* eslint-disable-next-line no-magic-numbers */\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (event) => {\n let preventDefaultKeyAction = false;\n switch (event.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n default:\n break;\n }\n if (preventDefaultKeyAction) {\n event.stopPropagation();\n event.preventDefault();\n }\n });\n\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n this.currentId = id;\n /* eslint-disable-next-line no-magic-numbers */\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n /* eslint-disable-next-line no-magic-numbers */\n if (nextIndexToShow < 0) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","constructor","$module","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$navigationButtons","length","classList","add","$navigationButtonPrev","$navigationButtonNext","setup","currentId","id","showItem","forEach","$item","setAttribute","removeAttribute","addEventListener","getAttribute","focus","event","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","$liveRegion","document","createElement","prepend","textContent","getCurrentItemIndex","Array","from","findIndex","nextIndexToShow"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/gallery/gallery.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,I,mBCRD,MAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAR,EAAAO,IACAE,OAAAC,eAAAV,EAAAO,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ,EAAAC,IAAAL,OAAAM,UAAAC,eAAAC,KAAAJ,EAAAC,GCCAT,EAAAL,IACAS,OAAAC,eAAAV,EAAAkB,OAAAC,YAAA,CAAsDC,MAAA,WACtDX,OAAAC,eAAAV,EAAA,cAAgDoB,OAAA,M,uCCHzC,MAAMC,EACX,WAAAC,CAAYC,GACVC,KAAKD,QAAUA,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G,OAAOK,SAEjCiC,EAAkB,GAEpBzC,KAAKgB,SAAShB,KAAKG,OAAOsC,GAAiB1B,GAC7C,CAEA,aAAAa,GAEE5B,KAAKgB,SAAShB,KAAKG,OAAO,GAAGY,GAC/B,CAEA,YAAAc,GAEE7B,KAAKgB,SAAShB,KAAKG,OAAOH,KAAKG,OAAOK,OAAS,GAAGO,GACpD,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n /* eslint-disable-next-line no-magic-numbers */\n this.$items.length < 2 ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.setup();\n /* eslint-disable-next-line no-magic-numbers */\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (event) => {\n let preventDefaultKeyAction = false;\n switch (event.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n default:\n break;\n }\n if (preventDefaultKeyAction) {\n event.stopPropagation();\n event.preventDefault();\n }\n });\n\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n this.currentId = id;\n /* eslint-disable-next-line no-magic-numbers */\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n /* eslint-disable-next-line no-magic-numbers */\n if (nextIndexToShow < 0) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","constructor","$module","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$navigationButtons","length","classList","add","$navigationButtonPrev","$navigationButtonNext","setup","currentId","id","showItem","forEach","$item","setAttribute","removeAttribute","addEventListener","getAttribute","focus","event","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","$liveRegion","document","createElement","prepend","textContent","getCurrentItemIndex","Array","from","findIndex","nextIndexToShow"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/global-header/global-header.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,
|
|
1
|
+
{"version":3,"file":"components/global-header/global-header.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,I,mBCRD,MAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAA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,KAAKoB,MAET,CAEA,IAAAC,GACMrB,KAAKG,cACPH,KAAKG,YAAYmB,QAAS,EAC1BtB,KAAKG,YAAYoB,aAAa,cAAe,SAE3CvB,KAAKI,iBACPJ,KAAKI,eAAekB,QAAS,EAC7BtB,KAAKI,eAAemB,aAAa,cAAe,SAElDvB,KAAKC,cAAcsB,aAAa,gBAAiB,SACjDvB,KAAKC,cAAcsB,aAAa,QAAS,aACzCvB,KAAKC,cAAcuB,UAAUC,OAC3B,gDAGF,IAAK,IAAIC,EAAQ,EAAGA,EAAQ1B,KAAKK,OAAOsB,OAAQD,GAAS,EACvD1B,KAAKK,OAAOqB,GAAOH,aAAa,WAAY,KAEhD,CAEA,IAAAH,GACMpB,KAAKG,cACPH,KAAKG,YAAYmB,QAAS,EAC1BtB,KAAKG,YAAYoB,aAAa,cAAe,UAE3CvB,KAAKI,iBACPJ,KAAKI,eAAekB,QAAS,EAC7BtB,KAAKI,eAAemB,aAAa,cAAe,UAElDvB,KAAKC,cAAcsB,aAAa,gBAAiB,QACjDvB,KAAKC,cAAcsB,aAAa,QAAS,cACzCvB,KAAKC,cAAcuB,UAAUI,IAC3B,gDAGF,IAAK,IAAIF,EAAQ,EAAGA,EAAQ1B,KAAKK,OAAOsB,OAAQD,GAAS,EACvD1B,KAAKK,OAAOqB,GAAOH,aAAa,WAAY,IAEhD,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/global-header/global-header.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class GlobalHeader {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-global-header__navigation-button\");\n this.$navigation =\n $module &&\n $module.querySelector(\".tna-global-header__navigation-wrapper\");\n this.$topNavigation =\n $module &&\n $module.querySelector(\".tna-global-header__top-navigation-wrapper\");\n this.$links =\n $module &&\n ((this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\")) ||\n (this.$topNavigation &&\n this.$topNavigation.querySelectorAll(\"[tabindex='0']\")));\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (\n !this.$module ||\n !this.$toggleButton ||\n (!this.$navigation && !this.$topNavigation)\n ) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$module.addEventListener(\"keyup\", (event) => {\n if (event.code === \"Escape\" && this.mql.matches && this.menuOpened) {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n hide() {\n if (this.$navigation) {\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = true;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"true\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-global-header__navigation-button--opened\",\n );\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"-1\");\n }\n }\n\n show() {\n if (this.$navigation) {\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = false;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"false\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-global-header__navigation-button--opened\",\n );\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"0\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","GlobalHeader","constructor","$module","this","$toggleButton","querySelector","$navigation","$topNavigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","removeAttribute","syncState","addEventListener","handleToggleNavigation","addListener","event","code","matches","focus","show","hide","hidden","setAttribute","classList","remove","index","length","add"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/header/header.js","mappings":"CAAA,SAAAA,EAAAC,GAC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AIK,iBAAiB,SAAU,IAAMZ,KAAKW,aAE/CX,KAAKO,IAAIO,YAAY,IAAMd,KAAKW,aAGlCX,KAAKD,QAAQa,iBAAiB,QAAUG,IACnB,WAAfA,EAAMC,MAAqBhB,KAAKM,YAAcN,KAAKO,IAAIU,UACzDjB,KAAKM,YAAa,EAClBN,KAAKW,YACLX,KAAKC,cAAciB,WAGzB,CAEA,sBAAAL,GACEb,KAAKM,YAAcN,KAAKM,WACxBN,KAAKW,WACP,CAEA,SAAAA,GACMX,KAAKO,IAAIU,QACPjB,KAAKM,WACPN,KAAKmB,OAELnB,KAAKoB,OAGPpB,KAAKmB,MAET,CAEA,IAAAA,GACEnB,KAAKG,YAAYkB,UAAUC,IAAI,gCAC/BtB,KAAKG,YAAYO,gBAAgB,UACjCV,KAAKG,YAAYoB,aAAa,cAAe,SAC7CvB,KAAKC,cAAcsB,aAAa,gBAAiB,QACjDvB,KAAKC,cAAcsB,aAAa,QAAS,cACzCvB,KAAKC,cAAcoB,UAAUC,IAAI,yCAGjC,IAAK,IAAIE,EAAQ,EAAGA,EAAQxB,KAAKI,OAAOqB,OAAQD,GAAS,EACvDxB,KAAKI,OAAOoB,GAAOD,aAAa,WAAY,IAEhD,CAEA,IAAAH,GACEpB,KAAKG,YAAYkB,UAAUK,OAAO,gCAClC1B,KAAKG,YAAYwB,QAAS,EAC1B3B,KAAKG,YAAYoB,aAAa,cAAe,QAC7CvB,KAAKC,cAAcsB,aAAa,gBAAiB,SACjDvB,KAAKC,cAAcsB,aAAa,QAAS,aACzCvB,KAAKC,cAAcoB,UAAUK,OAC3B,yCAIF,IAAK,IAAIF,EAAQ,EAAGA,EAAQxB,KAAKI,OAAOqB,OAAQD,GAAS,EACvDxB,KAAKI,OAAOoB,GAAOD,aAAa,WAAY,KAEhD,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-header__navigation-button\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (!this.$module || !this.$toggleButton || !this.$navigation) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$module.addEventListener(\"keyup\", (event) => {\n if (event.code === \"Escape\" && this.menuOpened && this.mql.matches) {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n show() {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\"tna-header__navigation-button--opened\");\n\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"0\");\n }\n }\n\n hide() {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-button--opened\",\n );\n\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Header","constructor","$module","this","$toggleButton","querySelector","$navigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","removeAttribute","syncState","addEventListener","handleToggleNavigation","addListener","event","code","matches","focus","show","hide","classList","add","setAttribute","index","length","remove","hidden"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/picture/picture.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,O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,iBAAiB,GACrDhB,KAAKG,kBAAkBc,UAAYjB,KAAKM,UACxCN,KAAKI,YAAYY,aAAa,SAAU,IAE5C,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","/* eslint-disable no-magic-numbers */\n/* eslint-disable no-bitwise */\nconst uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/gu, (char) =>\n (\n char ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (char / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tif(Array.isArray(definition)) {\n\t\tvar i = 0;\n\t\twhile(i < definition.length) {\n\t\t\tvar key = definition[i++];\n\t\t\tvar binding = definition[i++];\n\t\t\tvar descriptor = binding === 0 ? { enumerable: true, value: definition[i++] } : { enumerable: true, get: binding };\n\t\t\tif(!__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, descriptor);\n\t\t}\n\t} else {\n\t\tfor(var key in definition) {\n\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t\t}\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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n\n this.$transcriptToggle =\n this.$imageWrapper &&\n this.$imageWrapper.querySelector(\".tna-picture__toggle-transcript\");\n\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n\n if (\n !this.$module ||\n !this.$imageWrapper ||\n !this.$transcriptToggle ||\n !this.$transcript\n ) {\n return;\n }\n\n this.openLabel =\n this.$module.dataset.informationLabelOpen || \"Open transcript\";\n this.closeLabel =\n this.$module.dataset.informationLabelClose || \"Close transcript\";\n\n this.init();\n }\n\n init() {\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle.removeAttribute(\"hidden\");\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.toggleTranscript(),\n );\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", \"\");\n\n this.$transcript.addEventListener(\"keydown\", (event) => {\n switch (event.key) {\n case \"Escape\":\n this.toggleTranscript();\n this.$transcriptToggle.focus();\n break;\n default:\n break;\n }\n });\n }\n\n toggleTranscript() {\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = this.closeLabel;\n this.$transcript.removeAttribute(\"hidden\");\n } else {\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcript.setAttribute(\"hidden\", \"\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","replace","char","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","Array","isArray","i","length","key","binding","descriptor","enumerable","value","get","o","Object","defineProperty","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","Picture","constructor","$module","this","$imageWrapper","querySelector","$transcriptToggle","$transcript","transcriptOpened","openLabel","dataset","informationLabelOpen","closeLabel","informationLabelClose","init","uniqueId","_lib_uuid_mjs__WEBPACK_IMPORTED_MODULE_0__","A","removeAttribute","setAttribute","innerText","addEventListener","toggleTranscript","event","focus"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/sidebar/sidebar.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,
|
|
1
|
+
{"version":3,"file":"components/sidebar/sidebar.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QAC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A2C5B,KAAKiB,0CAA0CjC,OAAO0C,KAAK1B,KAAKmB,aAAaU,KAAK,SAGjI7B,KAAK8B,aAAeC,OAAOC,WACzB,eAAehC,KAAKmB,YAAYnB,KAAKiB,yBAEzC,MACEjB,KAAK8B,aAAe,KAGtB9B,KAAKiC,YAAc,KAEnBF,OAAOG,iBAAiB,SAAU,IAAMlC,KAAKmC,2BAC7CJ,OAAOG,iBAAiB,SAAU,IAAMlC,KAAKmC,2BAC7CnC,KAAKmC,yBACP,CAEA,uBAAAA,GACE,GAAInC,KAAK8B,cAAgB9B,KAAK8B,aAAaM,QAKzC,OAJApC,KAAKC,MAAMoC,QAAStB,IAClBA,EAAKT,MAAMgC,UAAUC,OAAO,qCAE9BvC,KAAKiC,YAAc,MAIrB,MAAMO,EAAWxC,KAAKC,MAAMwC,SACzB1B,GACC2B,KAAKC,MAAM5B,EAAKJ,OAAOiC,wBAAwBC,MAC/C7C,KAAKgB,oBAGLwB,IAAaxC,KAAKiC,aACpBjC,KAAKC,MAAMoC,QAAStB,IACdyB,GAAYzB,IAASyB,GACvBxC,KAAKiC,YAAclB,EACnBf,KAAKiC,YAAY3B,MAAMgC,UAAUQ,IAAI,+BAErC/B,EAAKT,MAAMgC,UAAUC,OAAO,gCAIlCvC,KAAKiC,YAAcO,GAAY,IACjC,E","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/sidebar/sidebar.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value 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\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Sidebar {\n constructor($module, options = {}) {\n this.$module = $module;\n this.items =\n $module &&\n Array.from($module.querySelectorAll(\".tna-sidebar__item\"))\n .map(($item) => {\n const id = $item\n .querySelector(\".tna-sidebar__link[href^='#']\")\n .getAttribute(\"href\")\n /* eslint-disable-next-line no-magic-numbers */\n .substring(1);\n const target = document.getElementById(id);\n return {\n $item,\n id,\n target,\n };\n })\n .filter((item) => item.target);\n\n if (!this.$module || !this.items) {\n return;\n }\n\n /* eslint-disable-next-line no-magic-numbers */\n const { scrollTopThreshold = 0, disableHighlightSize = \"small\" } = options;\n this.scrollTopThreshold = scrollTopThreshold;\n this.disableHighlightSize = disableHighlightSize;\n\n this.init();\n }\n\n init() {\n this.breakpoints = {\n tiny:\n getComputedStyle(document.documentElement).getPropertyValue(\n \"--media-breakpoint-tiny\",\n ) || \"480px\",\n small:\n getComputedStyle(document.documentElement).getPropertyValue(\n \"--media-breakpoint-small\",\n ) || \"768px\",\n medium:\n getComputedStyle(document.documentElement).getPropertyValue(\n \"--media-breakpoint-medium\",\n ) || \"1024px\",\n };\n\n if (this.disableHighlightSize) {\n if (!Object.keys(this.breakpoints).includes(this.disableHighlightSize)) {\n throw new Error(\n `Invalid value for disableHighlightSize: ${this.disableHighlightSize}. Expected one of: ${Object.keys(this.breakpoints).join(\", \")}`,\n );\n }\n this.hideOnDevice = window.matchMedia(\n `(max-width: ${this.breakpoints[this.disableHighlightSize]})`,\n );\n } else {\n this.hideOnDevice = null;\n }\n\n this.currentItem = null;\n\n window.addEventListener(\"scroll\", () => this.highlightCurrentSection());\n window.addEventListener(\"resize\", () => this.highlightCurrentSection());\n this.highlightCurrentSection();\n }\n\n highlightCurrentSection() {\n if (this.hideOnDevice && this.hideOnDevice.matches) {\n this.items.forEach((item) => {\n item.$item.classList.remove(\"tna-sidebar__item--current\");\n });\n this.currentItem = null;\n return;\n }\n\n const $topItem = this.items.findLast(\n (item) =>\n Math.floor(item.target.getBoundingClientRect().top) <=\n this.scrollTopThreshold,\n );\n\n if ($topItem !== this.currentItem) {\n this.items.forEach((item) => {\n if ($topItem && item === $topItem) {\n this.currentItem = item;\n this.currentItem.$item.classList.add(\"tna-sidebar__item--current\");\n } else {\n item.$item.classList.remove(\"tna-sidebar__item--current\");\n }\n });\n }\n this.currentItem = $topItem || null;\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Sidebar","constructor","$module","options","this","items","Array","from","querySelectorAll","map","$item","id","querySelector","getAttribute","substring","target","document","getElementById","filter","item","scrollTopThreshold","disableHighlightSize","init","breakpoints","tiny","getComputedStyle","documentElement","getPropertyValue","small","medium","keys","includes","Error","join","hideOnDevice","window","matchMedia","currentItem","addEventListener","highlightCurrentSection","matches","forEach","classList","remove","$topItem","findLast","Math","floor","getBoundingClientRect","top","add"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tna-button-group{margin-top:2rem}.tna-button-group:first-child{margin-top:0}.tna-button-group{display:flex;flex-wrap:wrap;align-items:center;gap:1rem}@media(max-width: 30em){.tna-button-group{flex-direction:column;align-items:stretch}}.tna-button-group--small{gap:0.5rem}.tna-button-group--centred{justify-content:center}.tna-button-group--full{justify-content:stretch}@media(max-width: 48em){.tna-button-group--full{flex-direction:column;align-items:stretch}}.tna-button-group--full .tna-button{margin:0;flex:1}.tna-button{padding:0.25rem 1rem;display:inline-flex;align-items:baseline;justify-content:center;gap:0.75rem;line-height:2rem;text-align:center;text-decoration:none;text-wrap:balance;cursor:pointer;-webkit-print-color-adjust:exact;print-color-adjust:exact;font-size:1.125rem;font-weight:700;background-color:var(--button-background, rgb(1, 1, 1));border:4px var(--button-background, rgb(1, 1, 1)) solid;border-radius:2px}.tna-button,.tna-button:link,.tna-button:visited{color:var(--button-text, rgb(255, 255, 255))}.tna-button:hover{color:var(--button-hover-text, rgb(1, 1, 1));text-decoration:none;background:rgba(0,0,0,0)}.tna-button .fa-solid{display:block}.tna-button svg{height:1.1em;align-self:center;flex-shrink:0;fill:currentColor}.tna-button--plain{font-weight:400;text-decoration:underline;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0);border-radius:.1px}.tna-button--plain,.tna-button--plain:link,.tna-button--plain:
|
|
1
|
+
.tna-button-group{margin-top:2rem}.tna-button-group:first-child{margin-top:0}.tna-button-group{display:flex;flex-wrap:wrap;align-items:center;gap:1rem}@media(max-width: 30em){.tna-button-group{flex-direction:column;align-items:stretch}}.tna-button-group--small{gap:0.5rem}.tna-button-group--centred{justify-content:center}.tna-button-group--full{justify-content:stretch}@media(max-width: 48em){.tna-button-group--full{flex-direction:column;align-items:stretch}}.tna-button-group--full .tna-button{margin:0;flex:1}.tna-button{padding:0.25rem 1rem;display:inline-flex;align-items:baseline;justify-content:center;gap:0.75rem;line-height:2rem;text-align:center;text-decoration:none;text-wrap:balance;cursor:pointer;-webkit-print-color-adjust:exact;print-color-adjust:exact;font-size:1.125rem;font-weight:700;background-color:var(--button-background, rgb(1, 1, 1));border:4px var(--button-background, rgb(1, 1, 1)) solid;border-radius:2px}.tna-button,.tna-button:link,.tna-button:visited{color:var(--button-text, rgb(255, 255, 255))}.tna-button:hover{color:var(--button-hover-text, rgb(1, 1, 1));text-decoration:none;background:rgba(0,0,0,0)}.tna-button .fa-solid{display:block}.tna-button svg{height:1.1em;align-self:center;flex-shrink:0;fill:currentColor}.tna-button--plain{font-weight:400;text-decoration:underline;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0);border-radius:.1px}.tna-button--plain,.tna-button--plain:link,.tna-button--plain:hover{color:var(--link, #005fa3)}.tna-button--plain:visited{color:var(--link-visited, #634abb)}.tna-button--plain:hover{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}.tna-button--plain.tna-button--no-visited-state:visited{color:var(--link, #005fa3)}.tna-button--accent{background-color:var(--button-accented-background, rgb(140, 150, 148));border-color:var(--button-accented-background, rgb(140, 150, 148))}.tna-button--accent,.tna-button--accent:link,.tna-button--accent:visited{color:var(--button-accented-text, rgb(1, 1, 1))}.tna-button--accent:hover{color:var(--font-dark, rgb(1, 1, 1))}.tna-button--icon-right{flex-direction:row-reverse}.tna-button--icon-right:has(.fa-solid){align-items:center}.tna-button--small,.tna-button-group--small .tna-button{padding:0 0.5rem;gap:0.375rem;line-height:1.5rem;font-size:0.875rem}.tna-button--icon-only{padding-right:0;padding-left:0;gap:0;font-size:0 !important;line-height:0 !important}.tna-button--icon-only .fa-solid{width:2.5rem;line-height:2rem;font-size:1.125rem}.tna-button--icon-only svg{height:1.5rem;margin:.5rem}.tna-button--small.tna-button--icon-only,.tna-button-group--small .tna-button--icon-only{padding-right:0;padding-left:0}.tna-button--small.tna-button--icon-only .fa-solid,.tna-button-group--small .tna-button--icon-only .fa-solid{width:1.5rem;line-height:1.5rem}.tna-button--small.tna-button--icon-only svg,.tna-button-group--small .tna-button--icon-only svg{height:1.2rem;margin:.5rem}@media(max-width: 48em){.tna-button--icon-only-mobile{padding-right:0;padding-left:0;gap:0;font-size:0 !important;line-height:0 !important}.tna-button--icon-only-mobile .fa-solid{width:2.5rem;line-height:2rem;font-size:1.125rem}.tna-button--icon-only-mobile svg{height:1.5rem;margin:.5rem}.tna-button--small.tna-button--icon-only-mobile,.tna-button-group--small .tna-button--icon-only-mobile{padding-right:0;padding-left:0}.tna-button--small.tna-button--icon-only-mobile .fa-solid,.tna-button-group--small .tna-button--icon-only-mobile .fa-solid{width:1.5rem;line-height:1.5rem}.tna-button--small.tna-button--icon-only-mobile svg,.tna-button-group--small .tna-button--icon-only-mobile svg{height:1.2rem;margin:.5rem}}.tna-button--solid-hover:not(.tna-button--plain):hover{color:var(--font-dark, rgb(1, 1, 1));background-color:var(--background, #f4f4f4)}.tna-background-accent .tna-button:hover,.tna-template--dark-theme .tna-background-accent-light .tna-button:hover{color:var(--font-dark, rgb(1, 1, 1))}.tna-background-accent .tna-button--accent,.tna-template--dark-theme .tna-background-accent-light .tna-button--accent{background-color:var(--contrast-button-background, rgb(255, 255, 255));border-color:var(--contrast-button-background, rgb(255, 255, 255))}.tna-background-accent .tna-button--accent,.tna-background-accent .tna-button--accent:link,.tna-background-accent .tna-button--accent:visited,.tna-template--dark-theme .tna-background-accent-light .tna-button--accent,.tna-template--dark-theme .tna-background-accent-light .tna-button--accent:link,.tna-template--dark-theme .tna-background-accent-light .tna-button--accent:visited{color:var(--contrast-button-text, rgb(1, 1, 1))}.tna-background-accent .tna-button--accent:hover,.tna-template--dark-theme .tna-background-accent-light .tna-button--accent:hover{color:var(--contrast-font-dark, rgb(255, 255, 255));background-color:var(--contrast-background, #1e1e1e)}@media(prefers-color-scheme: dark){.tna-template--system-theme .tna-background-accent-light .tna-button:hover{color:var(--font-dark, rgb(1, 1, 1))}.tna-template--system-theme .tna-background-accent-light .tna-button--accent{background-color:var(--contrast-button-background, rgb(255, 255, 255));border-color:var(--contrast-button-background, rgb(255, 255, 255))}.tna-template--system-theme .tna-background-accent-light .tna-button--accent,.tna-template--system-theme .tna-background-accent-light .tna-button--accent:link,.tna-template--system-theme .tna-background-accent-light .tna-button--accent:visited{color:var(--contrast-button-text, rgb(1, 1, 1))}.tna-template--system-theme .tna-background-accent-light .tna-button--accent:hover{color:var(--contrast-font-dark, rgb(255, 255, 255));background-color:var(--contrast-background, #1e1e1e)}}@media(forced-colors: active){.tna-button:hover{text-decoration:underline;text-decoration-thickness:0.25rem;text-underline-offset:.125em}}.tna-skip-link{width:1px !important;height:1px !important;margin:0 !important;padding:0 !important;display:block !important;overflow:hidden !important;position:absolute !important;top:-100vh !important;left:-100vw !important;white-space:nowrap !important;background-color:#fc0;border:3px #010101 solid;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important}.tna-skip-link,.tna-skip-link:link,.tna-skip-link:visited{color:#010101}.tna-skip-link:active,.tna-skip-link:focus{width:auto !important;height:auto !important;margin:inherit !important;padding:1rem 1.5rem !important;overflow:visible !important;position:static !important;white-space:inherit !important;outline:none !important;box-shadow:inset 0 0 0 3px #fff !important;-webkit-clip-path:none !important;clip-path:none !important}.tna-skip-link::after{content:"›";content:"›"/""}/*# sourceMappingURL=skip-link.css.map */
|