@ministryofjustice/frontend 5.0.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/moj/all.bundle.js +1598 -1062
  2. package/moj/all.bundle.js.map +1 -1
  3. package/moj/all.bundle.mjs +1894 -1054
  4. package/moj/all.bundle.mjs.map +1 -1
  5. package/moj/all.mjs +7 -90
  6. package/moj/all.mjs.map +1 -1
  7. package/moj/all.scss +1 -0
  8. package/moj/all.scss.map +1 -1
  9. package/moj/common/index.mjs +57 -0
  10. package/moj/common/index.mjs.map +1 -0
  11. package/moj/common/moj-frontend-version.mjs +14 -0
  12. package/moj/common/moj-frontend-version.mjs.map +1 -0
  13. package/moj/components/add-another/add-another.bundle.js +105 -76
  14. package/moj/components/add-another/add-another.bundle.js.map +1 -1
  15. package/moj/components/add-another/add-another.bundle.mjs +222 -71
  16. package/moj/components/add-another/add-another.bundle.mjs.map +1 -1
  17. package/moj/components/add-another/add-another.mjs +103 -72
  18. package/moj/components/add-another/add-another.mjs.map +1 -1
  19. package/moj/components/alert/alert.bundle.js +115 -191
  20. package/moj/components/alert/alert.bundle.js.map +1 -1
  21. package/moj/components/alert/alert.bundle.mjs +354 -186
  22. package/moj/components/alert/alert.bundle.mjs.map +1 -1
  23. package/moj/components/alert/alert.mjs +55 -140
  24. package/moj/components/alert/alert.mjs.map +1 -1
  25. package/moj/components/button-menu/README.md +3 -1
  26. package/moj/components/button-menu/button-menu.bundle.js +91 -120
  27. package/moj/components/button-menu/button-menu.bundle.js.map +1 -1
  28. package/moj/components/button-menu/button-menu.bundle.mjs +329 -114
  29. package/moj/components/button-menu/button-menu.bundle.mjs.map +1 -1
  30. package/moj/components/button-menu/button-menu.mjs +89 -116
  31. package/moj/components/button-menu/button-menu.mjs.map +1 -1
  32. package/moj/components/date-picker/date-picker.bundle.js +174 -154
  33. package/moj/components/date-picker/date-picker.bundle.js.map +1 -1
  34. package/moj/components/date-picker/date-picker.bundle.mjs +411 -147
  35. package/moj/components/date-picker/date-picker.bundle.mjs.map +1 -1
  36. package/moj/components/date-picker/date-picker.mjs +172 -150
  37. package/moj/components/date-picker/date-picker.mjs.map +1 -1
  38. package/moj/components/filter/template.njk +1 -1
  39. package/moj/components/filter-toggle-button/filter-toggle-button.bundle.js +133 -44
  40. package/moj/components/filter-toggle-button/filter-toggle-button.bundle.js.map +1 -1
  41. package/moj/components/filter-toggle-button/filter-toggle-button.bundle.mjs +374 -41
  42. package/moj/components/filter-toggle-button/filter-toggle-button.bundle.mjs.map +1 -1
  43. package/moj/components/filter-toggle-button/filter-toggle-button.mjs +131 -40
  44. package/moj/components/filter-toggle-button/filter-toggle-button.mjs.map +1 -1
  45. package/moj/components/form-validator/form-validator.bundle.js +159 -69
  46. package/moj/components/form-validator/form-validator.bundle.js.map +1 -1
  47. package/moj/components/form-validator/form-validator.bundle.mjs +399 -65
  48. package/moj/components/form-validator/form-validator.bundle.mjs.map +1 -1
  49. package/moj/components/form-validator/form-validator.mjs +134 -54
  50. package/moj/components/form-validator/form-validator.mjs.map +1 -1
  51. package/moj/components/multi-file-upload/multi-file-upload.bundle.js +291 -117
  52. package/moj/components/multi-file-upload/multi-file-upload.bundle.js.map +1 -1
  53. package/moj/components/multi-file-upload/multi-file-upload.bundle.mjs +527 -109
  54. package/moj/components/multi-file-upload/multi-file-upload.bundle.mjs.map +1 -1
  55. package/moj/components/multi-file-upload/multi-file-upload.mjs +288 -101
  56. package/moj/components/multi-file-upload/multi-file-upload.mjs.map +1 -1
  57. package/moj/components/multi-file-upload/template.njk +1 -1
  58. package/moj/components/multi-select/multi-select.bundle.js +106 -41
  59. package/moj/components/multi-select/multi-select.bundle.js.map +1 -1
  60. package/moj/components/multi-select/multi-select.bundle.mjs +346 -37
  61. package/moj/components/multi-select/multi-select.bundle.mjs.map +1 -1
  62. package/moj/components/multi-select/multi-select.mjs +104 -37
  63. package/moj/components/multi-select/multi-select.mjs.map +1 -1
  64. package/moj/components/password-reveal/_password-reveal.scss +3 -1
  65. package/moj/components/password-reveal/_password-reveal.scss.map +1 -1
  66. package/moj/components/password-reveal/password-reveal.bundle.js +32 -29
  67. package/moj/components/password-reveal/password-reveal.bundle.js.map +1 -1
  68. package/moj/components/password-reveal/password-reveal.bundle.mjs +149 -24
  69. package/moj/components/password-reveal/password-reveal.bundle.mjs.map +1 -1
  70. package/moj/components/password-reveal/password-reveal.mjs +30 -25
  71. package/moj/components/password-reveal/password-reveal.mjs.map +1 -1
  72. package/moj/components/rich-text-editor/README.md +4 -3
  73. package/moj/components/rich-text-editor/rich-text-editor.bundle.js +127 -62
  74. package/moj/components/rich-text-editor/rich-text-editor.bundle.js.map +1 -1
  75. package/moj/components/rich-text-editor/rich-text-editor.bundle.mjs +367 -58
  76. package/moj/components/rich-text-editor/rich-text-editor.bundle.mjs.map +1 -1
  77. package/moj/components/rich-text-editor/rich-text-editor.mjs +125 -58
  78. package/moj/components/rich-text-editor/rich-text-editor.mjs.map +1 -1
  79. package/moj/components/search-toggle/search-toggle.bundle.js +94 -26
  80. package/moj/components/search-toggle/search-toggle.bundle.js.map +1 -1
  81. package/moj/components/search-toggle/search-toggle.bundle.mjs +334 -22
  82. package/moj/components/search-toggle/search-toggle.bundle.mjs.map +1 -1
  83. package/moj/components/search-toggle/search-toggle.mjs +92 -22
  84. package/moj/components/search-toggle/search-toggle.mjs.map +1 -1
  85. package/moj/components/sortable-table/_sortable-table.scss +3 -42
  86. package/moj/components/sortable-table/_sortable-table.scss.map +1 -1
  87. package/moj/components/sortable-table/sortable-table.bundle.js +200 -83
  88. package/moj/components/sortable-table/sortable-table.bundle.js.map +1 -1
  89. package/moj/components/sortable-table/sortable-table.bundle.mjs +439 -78
  90. package/moj/components/sortable-table/sortable-table.bundle.mjs.map +1 -1
  91. package/moj/components/sortable-table/sortable-table.mjs +198 -79
  92. package/moj/components/sortable-table/sortable-table.mjs.map +1 -1
  93. package/moj/core/_all.scss +3 -0
  94. package/moj/core/_all.scss.map +1 -0
  95. package/moj/core/_moj-frontend-properties.scss +7 -0
  96. package/moj/core/_moj-frontend-properties.scss.map +1 -0
  97. package/moj/filters/prototype-kit-13-filters.js +4 -3
  98. package/moj/helpers.bundle.js +22 -77
  99. package/moj/helpers.bundle.js.map +1 -1
  100. package/moj/helpers.bundle.mjs +23 -74
  101. package/moj/helpers.bundle.mjs.map +1 -1
  102. package/moj/helpers.mjs +23 -74
  103. package/moj/helpers.mjs.map +1 -1
  104. package/moj/moj-frontend.min.css +1 -1
  105. package/moj/moj-frontend.min.css.map +1 -1
  106. package/moj/moj-frontend.min.js +1 -1
  107. package/moj/moj-frontend.min.js.map +1 -1
  108. package/package.json +1 -1
  109. package/moj/version.bundle.js +0 -12
  110. package/moj/version.bundle.js.map +0 -1
  111. package/moj/version.bundle.mjs +0 -4
  112. package/moj/version.bundle.mjs.map +0 -1
  113. package/moj/version.mjs +0 -4
  114. package/moj/version.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"multi-file-upload.bundle.mjs","sources":["../../../../src/moj/helpers.mjs","../../../../src/moj/components/multi-file-upload/multi-file-upload.mjs"],"sourcesContent":["export function removeAttributeValue(el, attr, value) {\n let re, m\n if (el.getAttribute(attr)) {\n if (el.getAttribute(attr) === value) {\n el.removeAttribute(attr)\n } else {\n re = new RegExp(`(^|\\\\s)${value}(\\\\s|$)`)\n m = el.getAttribute(attr).match(re)\n if (m && m.length === 3) {\n el.setAttribute(\n attr,\n el.getAttribute(attr).replace(re, m[1] && m[2] ? ' ' : '')\n )\n }\n }\n }\n}\n\nexport function addAttributeValue(el, attr, value) {\n let re\n if (!el.getAttribute(attr)) {\n el.setAttribute(attr, value)\n } else {\n re = new RegExp(`(^|\\\\s)${value}(\\\\s|$)`)\n if (!re.test(el.getAttribute(attr))) {\n el.setAttribute(attr, `${el.getAttribute(attr)} ${value}`)\n }\n }\n}\n\nexport function dragAndDropSupported() {\n const div = document.createElement('div')\n return typeof div.ondrop !== 'undefined'\n}\n\nexport function formDataSupported() {\n return typeof FormData === 'function'\n}\n\nexport function fileApiSupported() {\n const input = document.createElement('input')\n input.type = 'file'\n return typeof input.files !== 'undefined'\n}\n\n/**\n * Find an elements next sibling\n *\n * Utility function to find an elements next sibling matching the provided\n * selector.\n *\n * @param {Element | null} $element - Element to find siblings for\n * @param {string} [selector] - selector for required sibling\n */\nexport function getNextSibling($element, selector) {\n if (!$element || !($element instanceof HTMLElement)) {\n return\n }\n\n // Get the next sibling element\n let $sibling = $element.nextElementSibling\n\n // If there's no selector, return the first sibling\n if (!selector) return $sibling\n\n // If the sibling matches our selector, use it\n // If not, jump to the next sibling and continue the loop\n while ($sibling) {\n if ($sibling.matches(selector)) return $sibling\n $sibling = $sibling.nextElementSibling\n }\n}\n\n/**\n * Find an elements preceding sibling\n *\n * Utility function to find an elements previous sibling matching the provided\n * selector.\n *\n * @param {Element | null} $element - Element to find siblings for\n * @param {string} [selector] - selector for required sibling\n */\nexport function getPreviousSibling($element, selector) {\n if (!$element || !($element instanceof HTMLElement)) {\n return\n }\n\n // Get the previous sibling element\n let $sibling = $element.previousElementSibling\n\n // If there's no selector, return the first sibling\n if (!selector) return $sibling\n\n // If the sibling matches our selector, use it\n // If not, jump to the next sibling and continue the loop\n while ($sibling) {\n if ($sibling.matches(selector)) return $sibling\n $sibling = $sibling.previousElementSibling\n }\n}\n\n/**\n * @param {Element | null} $element\n * @param {string} [selector]\n */\nexport function findNearestMatchingElement($element, selector) {\n // If no element or selector is provided, return\n if (!$element || !($element instanceof HTMLElement) || !selector) {\n return\n }\n\n // Start with the current element\n let $currentElement = $element\n\n while ($currentElement) {\n // First check the current element\n if ($currentElement.matches(selector)) {\n return $currentElement\n }\n\n // Check all previous siblings\n let $sibling = $currentElement.previousElementSibling\n while ($sibling) {\n // Check if the sibling itself is a heading\n if ($sibling.matches(selector)) {\n return $sibling\n }\n $sibling = $sibling.previousElementSibling\n }\n\n // If no match found in siblings, move up to parent\n $currentElement = $currentElement.parentElement\n }\n}\n\n/**\n * Move focus to element\n *\n * Sets tabindex to -1 to make the element programmatically focusable,\n * but removes it on blur as the element doesn't need to be focused again.\n *\n * @param {HTMLElement} $element - HTML element\n * @param {object} [options] - Handler options\n * @param {function(this: HTMLElement): void} [options.onBeforeFocus] - Callback before focus\n * @param {function(this: HTMLElement): void} [options.onBlur] - Callback on blur\n */\nexport function setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute('tabindex')\n\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1')\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener('blur', onBlur, { once: true })\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n if (options.onBlur) {\n options.onBlur.call($element)\n }\n\n if (!isFocusable) {\n $element.removeAttribute('tabindex')\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener('focus', onFocus, { once: true })\n\n // Focus element\n if (options.onBeforeFocus) {\n options.onBeforeFocus.call($element)\n }\n $element.focus()\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\n\nimport {\n dragAndDropSupported,\n fileApiSupported,\n formDataSupported\n} from '../../helpers.mjs'\n\nexport class MultiFileUpload {\n /**\n * @param {MultiFileUploadConfig} [params] - Multi file upload config\n */\n constructor(params = {}) {\n const { container } = params\n\n if (\n !container ||\n !(container instanceof HTMLElement) ||\n !(dragAndDropSupported() && formDataSupported() && fileApiSupported())\n ) {\n return this\n }\n\n this.container = container\n this.container.classList.add('moj-multi-file-upload--enhanced')\n\n this.defaultParams = {\n uploadFileEntryHook: () => {},\n uploadFileExitHook: () => {},\n uploadFileErrorHook: () => {},\n fileDeleteHook: () => {},\n uploadStatusText: 'Uploading files, please wait',\n dropzoneHintText: 'Drag and drop files here or',\n dropzoneButtonText: 'Choose files'\n }\n\n this.params = Object.assign({}, this.defaultParams, params)\n\n this.feedbackContainer = /** @type {HTMLDivElement} */ (\n this.container.querySelector('.moj-multi-file__uploaded-files')\n )\n\n this.setupFileInput()\n this.setupDropzone()\n this.setupLabel()\n this.setupStatusBox()\n\n this.container.addEventListener('click', this.onFileDeleteClick.bind(this))\n }\n\n setupDropzone() {\n this.dropzone = document.createElement('div')\n this.dropzone.classList.add('moj-multi-file-upload__dropzone')\n\n this.dropzone.addEventListener('dragover', this.onDragOver.bind(this))\n this.dropzone.addEventListener('dragleave', this.onDragLeave.bind(this))\n this.dropzone.addEventListener('drop', this.onDrop.bind(this))\n\n this.fileInput.replaceWith(this.dropzone)\n this.dropzone.appendChild(this.fileInput)\n }\n\n setupLabel() {\n const label = document.createElement('label')\n label.setAttribute('for', this.fileInput.id)\n label.classList.add('govuk-button', 'govuk-button--secondary')\n label.textContent = this.params.dropzoneButtonText\n\n const hint = document.createElement('p')\n hint.classList.add('govuk-body')\n hint.textContent = this.params.dropzoneHintText\n\n this.label = label\n this.dropzone.append(hint)\n this.dropzone.append(label)\n }\n\n setupFileInput() {\n this.fileInput = /** @type {HTMLInputElement} */ (\n this.container.querySelector('.moj-multi-file-upload__input')\n )\n this.fileInput.addEventListener('change', this.onFileChange.bind(this))\n this.fileInput.addEventListener('focus', this.onFileFocus.bind(this))\n this.fileInput.addEventListener('blur', this.onFileBlur.bind(this))\n }\n\n setupStatusBox() {\n this.status = document.createElement('div')\n this.status.classList.add('govuk-visually-hidden')\n this.status.setAttribute('aria-live', 'polite')\n this.status.setAttribute('role', 'status')\n this.dropzone.append(this.status)\n }\n\n onDragOver(event) {\n event.preventDefault()\n this.dropzone.classList.add('moj-multi-file-upload--dragover')\n }\n\n onDragLeave() {\n this.dropzone.classList.remove('moj-multi-file-upload--dragover')\n }\n\n onDrop(event) {\n event.preventDefault()\n this.dropzone.classList.remove('moj-multi-file-upload--dragover')\n this.feedbackContainer.classList.remove('moj-hidden')\n this.status.textContent = this.params.uploadStatusText\n this.uploadFiles(event.dataTransfer.files)\n }\n\n uploadFiles(files) {\n for (const file of Array.from(files)) {\n this.uploadFile(file)\n }\n }\n\n onFileChange() {\n this.feedbackContainer.classList.remove('moj-hidden')\n this.status.textContent = this.params.uploadStatusText\n this.uploadFiles(this.fileInput.files)\n\n const fileInput = this.fileInput.cloneNode(true)\n if (!fileInput || !(fileInput instanceof HTMLInputElement)) {\n return\n }\n\n fileInput.value = ''\n this.fileInput.replaceWith(fileInput)\n\n this.setupFileInput()\n this.fileInput.focus()\n }\n\n onFileFocus() {\n this.label.classList.add('moj-multi-file-upload--focused')\n }\n\n onFileBlur() {\n this.label.classList.remove('moj-multi-file-upload--focused')\n }\n\n getSuccessHtml(success) {\n return `<span class=\"moj-multi-file-upload__success\"> <svg class=\"moj-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\"><path d=\"M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z\"/></svg>${success.messageHtml}</span>`\n }\n\n getErrorHtml(error) {\n return `<span class=\"moj-multi-file-upload__error\"> <svg class=\"moj-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\"><path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"/></svg>${error.message}</span>`\n }\n\n getFileRow(file) {\n const row = document.createElement('div')\n\n row.classList.add('govuk-summary-list__row', 'moj-multi-file-upload__row')\n\n row.innerHTML = `\n <div class=\"govuk-summary-list__value moj-multi-file-upload__message\">\n <span class=\"moj-multi-file-upload__filename\">${file.name}</span>\n <span class=\"moj-multi-file-upload__progress\">0%</span>\n </div>\n <div class=\"govuk-summary-list__actions moj-multi-file-upload__actions\"></div>\n `\n\n return row\n }\n\n getDeleteButton(file) {\n const button = document.createElement('button')\n\n button.setAttribute('type', 'button')\n button.setAttribute('name', 'delete')\n button.setAttribute('value', file.filename)\n\n button.classList.add(\n 'moj-multi-file-upload__delete',\n 'govuk-button',\n 'govuk-button--secondary',\n 'govuk-!-margin-bottom-0'\n )\n\n button.innerHTML = `Delete <span class=\"govuk-visually-hidden\">${file.originalname}</span>`\n\n return button\n }\n\n uploadFile(file) {\n this.params.uploadFileEntryHook(this, file)\n\n const item = this.getFileRow(file)\n const message = item.querySelector('.moj-multi-file-upload__message')\n const actions = item.querySelector('.moj-multi-file-upload__actions')\n const progress = item.querySelector('.moj-multi-file-upload__progress')\n\n const formData = new FormData()\n formData.append('documents', file)\n\n this.feedbackContainer\n .querySelector('.moj-multi-file-upload__list')\n .append(item)\n\n const xhr = new XMLHttpRequest()\n\n const onLoad = () => {\n if (\n xhr.status < 200 ||\n xhr.status >= 300 ||\n !('success' in xhr.response)\n ) {\n return onError()\n }\n\n message.innerHTML = this.getSuccessHtml(xhr.response.success)\n this.status.textContent = xhr.response.success.messageText\n\n actions.append(this.getDeleteButton(xhr.response.file))\n this.params.uploadFileExitHook(this, file, xhr, xhr.responseText)\n }\n\n const onError = () => {\n const error = new Error(\n xhr.response && 'error' in xhr.response\n ? xhr.response.error.message\n : xhr.statusText || 'Upload failed'\n )\n\n message.innerHTML = this.getErrorHtml(error)\n this.status.textContent = error.message\n\n this.params.uploadFileErrorHook(this, file, xhr, xhr.responseText, error)\n }\n\n xhr.addEventListener('load', onLoad)\n xhr.addEventListener('error', onError)\n\n xhr.upload.addEventListener('progress', (event) => {\n if (!event.lengthComputable) {\n return\n }\n\n const percentComplete = Math.round((event.loaded / event.total) * 100)\n progress.textContent = ` ${percentComplete}%`\n })\n\n xhr.open('POST', this.params.uploadUrl)\n xhr.responseType = 'json'\n\n xhr.send(formData)\n }\n\n onFileDeleteClick(event) {\n const button = event.target\n\n if (\n !button ||\n !(button instanceof HTMLButtonElement) ||\n !button.classList.contains('moj-multi-file-upload__delete')\n ) {\n return\n }\n\n event.preventDefault() // if user refreshes page and then deletes\n\n const xhr = new XMLHttpRequest()\n\n xhr.addEventListener('load', () => {\n if (xhr.status < 200 || xhr.status >= 300) {\n return\n }\n\n const rows = Array.from(\n this.feedbackContainer.querySelectorAll('.moj-multi-file-upload__row')\n )\n\n if (rows.length === 1) {\n this.feedbackContainer.classList.add('moj-hidden')\n }\n\n const row = rows.find((row) => row.contains(button))\n if (row) row.remove()\n\n this.params.fileDeleteHook(this, undefined, xhr, xhr.responseText)\n })\n\n xhr.open('POST', this.params.deleteUrl)\n xhr.setRequestHeader('Content-Type', 'application/json')\n xhr.responseType = 'json'\n\n xhr.send(\n JSON.stringify({\n [button.name]: button.value\n })\n )\n }\n}\n"],"names":["dragAndDropSupported","div","document","createElement","ondrop","formDataSupported","FormData","fileApiSupported","input","type","files","MultiFileUpload","constructor","params","container","HTMLElement","classList","add","defaultParams","uploadFileEntryHook","uploadFileExitHook","uploadFileErrorHook","fileDeleteHook","uploadStatusText","dropzoneHintText","dropzoneButtonText","Object","assign","feedbackContainer","querySelector","setupFileInput","setupDropzone","setupLabel","setupStatusBox","addEventListener","onFileDeleteClick","bind","dropzone","onDragOver","onDragLeave","onDrop","fileInput","replaceWith","appendChild","label","setAttribute","id","textContent","hint","append","onFileChange","onFileFocus","onFileBlur","status","event","preventDefault","remove","uploadFiles","dataTransfer","file","Array","from","uploadFile","cloneNode","HTMLInputElement","value","focus","getSuccessHtml","success","messageHtml","getErrorHtml","error","message","getFileRow","row","innerHTML","name","getDeleteButton","button","filename","originalname","item","actions","progress","formData","xhr","XMLHttpRequest","onLoad","response","onError","messageText","responseText","Error","statusText","upload","lengthComputable","percentComplete","Math","round","loaded","total","open","uploadUrl","responseType","send","target","HTMLButtonElement","contains","rows","querySelectorAll","length","find","undefined","deleteUrl","setRequestHeader","JSON","stringify"],"mappings":"AA8BO,SAASA,oBAAoBA,GAAG;AACrC,EAAA,MAAMC,GAAG,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;AACzC,EAAA,OAAO,OAAOF,GAAG,CAACG,MAAM,KAAK,WAAW;AAC1C;AAEO,SAASC,iBAAiBA,GAAG;EA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AAG,CAAClB,MAAM,EAAE;AAErB,MAAA,IAAI,CAAC3C,MAAM,CAACS,cAAc,CAAC,IAAI,EAAE0F,SAAS,EAAE3B,GAAG,EAAEA,GAAG,CAACM,YAAY,CAAC;AACpE,KAAC,CAAC;IAEFN,GAAG,CAACgB,IAAI,CAAC,MAAM,EAAE,IAAI,CAACxF,MAAM,CAACoG,SAAS,CAAC;AACvC5B,IAAAA,GAAG,CAAC6B,gBAAgB,CAAC,cAAc,EAAE,kBAAkB,CAAC;IACxD7B,GAAG,CAACkB,YAAY,GAAG,MAAM;AAEzBlB,IAAAA,GAAG,CAACmB,IAAI,CACNW,IAAI,CAACC,SAAS,CAAC;AACb,MAAA,CAACtC,MAAM,CAACF,IAAI,GAAGE,MAAM,CAACb;AACxB,KAAC,CACH,CAAC;AACH;AACF;;;;"}
1
+ {"version":3,"file":"multi-file-upload.bundle.mjs","sources":["../../../../node_modules/govuk-frontend/dist/govuk/common/index.mjs","../../../../node_modules/govuk-frontend/dist/govuk/errors/index.mjs","../../../../node_modules/govuk-frontend/dist/govuk/component.mjs","../../../../node_modules/govuk-frontend/dist/govuk/common/configuration.mjs","../../../../src/moj/components/multi-file-upload/multi-file-upload.mjs"],"sourcesContent":["function getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined;\n }\n return url.split('#').pop();\n}\nfunction getBreakpoint(name) {\n const property = `--govuk-frontend-breakpoint-${name}`;\n const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);\n return {\n property,\n value: value || undefined\n };\n}\nfunction setFocus($element, options = {}) {\n var _options$onBeforeFocu;\n const isFocusable = $element.getAttribute('tabindex');\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1');\n }\n function onFocus() {\n $element.addEventListener('blur', onBlur, {\n once: true\n });\n }\n function onBlur() {\n var _options$onBlur;\n (_options$onBlur = options.onBlur) == null || _options$onBlur.call($element);\n if (!isFocusable) {\n $element.removeAttribute('tabindex');\n }\n }\n $element.addEventListener('focus', onFocus, {\n once: true\n });\n (_options$onBeforeFocu = options.onBeforeFocus) == null || _options$onBeforeFocu.call($element);\n $element.focus();\n}\nfunction isInitialised($root, moduleName) {\n return $root instanceof HTMLElement && $root.hasAttribute(`data-${moduleName}-init`);\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nfunction isSupported($scope = document.body) {\n if (!$scope) {\n return false;\n }\n return $scope.classList.contains('govuk-frontend-supported');\n}\nfunction isArray(option) {\n return Array.isArray(option);\n}\nfunction isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option);\n}\nfunction formatErrorMessage(Component, message) {\n return `${Component.moduleName}: ${message}`;\n}\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n/**\n * @import { ObjectNested } from './configuration.mjs'\n */\n\nexport { formatErrorMessage, getBreakpoint, getFragmentFromUrl, isInitialised, isObject, isSupported, setFocus };\n//# sourceMappingURL=index.mjs.map\n","import { formatErrorMessage } from '../common/index.mjs';\n\nclass GOVUKFrontendError extends Error {\n constructor(...args) {\n super(...args);\n this.name = 'GOVUKFrontendError';\n }\n}\nclass SupportError extends GOVUKFrontendError {\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';\n super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type=\"module\">`');\n this.name = 'SupportError';\n }\n}\nclass ConfigError extends GOVUKFrontendError {\n constructor(...args) {\n super(...args);\n this.name = 'ConfigError';\n }\n}\nclass ElementError extends GOVUKFrontendError {\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';\n if (typeof messageOrOptions === 'object') {\n const {\n component,\n identifier,\n element,\n expectedType\n } = messageOrOptions;\n message = identifier;\n message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';\n message = formatErrorMessage(component, message);\n }\n super(message);\n this.name = 'ElementError';\n }\n}\nclass InitError extends GOVUKFrontendError {\n constructor(componentOrMessage) {\n const message = typeof componentOrMessage === 'string' ? componentOrMessage : formatErrorMessage(componentOrMessage, `Root element (\\`$root\\`) already initialised`);\n super(message);\n this.name = 'InitError';\n }\n}\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n\nexport { ConfigError, ElementError, GOVUKFrontendError, InitError, SupportError };\n//# sourceMappingURL=index.mjs.map\n","import { isInitialised, isSupported } from './common/index.mjs';\nimport { InitError, ElementError, SupportError } from './errors/index.mjs';\n\nclass Component {\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {RootElementType} - the root element of component\n */\n get $root() {\n return this._$root;\n }\n constructor($root) {\n this._$root = void 0;\n const childConstructor = this.constructor;\n if (typeof childConstructor.moduleName !== 'string') {\n throw new InitError(`\\`moduleName\\` not defined in component`);\n }\n if (!($root instanceof childConstructor.elementType)) {\n throw new ElementError({\n element: $root,\n component: childConstructor,\n identifier: 'Root element (`$root`)',\n expectedType: childConstructor.elementType.name\n });\n } else {\n this._$root = $root;\n }\n childConstructor.checkSupport();\n this.checkInitialised();\n const moduleName = childConstructor.moduleName;\n this.$root.setAttribute(`data-${moduleName}-init`, '');\n }\n checkInitialised() {\n const constructor = this.constructor;\n const moduleName = constructor.moduleName;\n if (moduleName && isInitialised(this.$root, moduleName)) {\n throw new InitError(constructor);\n }\n }\n static checkSupport() {\n if (!isSupported()) {\n throw new SupportError();\n }\n }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\nComponent.elementType = HTMLElement;\n\nexport { Component };\n//# sourceMappingURL=component.mjs.map\n","import { Component } from '../component.mjs';\nimport { ConfigError } from '../errors/index.mjs';\nimport { isObject, formatErrorMessage } from './index.mjs';\n\nconst configOverride = Symbol.for('configOverride');\nclass ConfigurableComponent extends Component {\n [configOverride](param) {\n return {};\n }\n\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {ConfigurationType} - the root element of component\n */\n get config() {\n return this._config;\n }\n constructor($root, config) {\n super($root);\n this._config = void 0;\n const childConstructor = this.constructor;\n if (!isObject(childConstructor.defaults)) {\n throw new ConfigError(formatErrorMessage(childConstructor, 'Config passed as parameter into constructor but no defaults defined'));\n }\n const datasetConfig = normaliseDataset(childConstructor, this._$root.dataset);\n this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {}, this[configOverride](datasetConfig), datasetConfig);\n }\n}\nfunction normaliseString(value, property) {\n const trimmedValue = value ? value.trim() : '';\n let output;\n let outputType = property == null ? void 0 : property.type;\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean';\n }\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number';\n }\n }\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true';\n break;\n case 'number':\n output = Number(trimmedValue);\n break;\n default:\n output = value;\n }\n return output;\n}\nfunction normaliseDataset(Component, dataset) {\n if (!isObject(Component.schema)) {\n throw new ConfigError(formatErrorMessage(Component, 'Config passed as parameter into constructor but no schema defined'));\n }\n const out = {};\n const entries = Object.entries(Component.schema.properties);\n for (const entry of entries) {\n const [namespace, property] = entry;\n const field = namespace.toString();\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property);\n }\n if ((property == null ? void 0 : property.type) === 'object') {\n out[field] = extractConfigByNamespace(Component.schema, dataset, namespace);\n }\n }\n return out;\n}\nfunction mergeConfigs(...configObjects) {\n const formattedConfigObject = {};\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key];\n const override = configObject[key];\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override);\n } else {\n formattedConfigObject[key] = override;\n }\n }\n }\n return formattedConfigObject;\n}\nfunction validateConfig(schema, config) {\n const validationErrors = [];\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = [];\n if (Array.isArray(conditions)) {\n for (const {\n required,\n errorMessage\n } of conditions) {\n if (!required.every(key => !!config[key])) {\n errors.push(errorMessage);\n }\n }\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors);\n }\n }\n }\n return validationErrors;\n}\nfunction extractConfigByNamespace(schema, dataset, namespace) {\n const property = schema.properties[namespace];\n if ((property == null ? void 0 : property.type) !== 'object') {\n return;\n }\n const newObject = {\n [namespace]: {}\n };\n for (const [key, value] of Object.entries(dataset)) {\n let current = newObject;\n const keyParts = key.split('.');\n for (const [index, name] of keyParts.entries()) {\n if (isObject(current)) {\n if (index < keyParts.length - 1) {\n if (!isObject(current[name])) {\n current[name] = {};\n }\n current = current[name];\n } else if (key !== namespace) {\n current[name] = normaliseString(value);\n }\n }\n }\n }\n return newObject[namespace];\n}\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\n */\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n/**\n * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n\nexport { ConfigurableComponent, configOverride, extractConfigByNamespace, mergeConfigs, normaliseDataset, normaliseString, validateConfig };\n//# sourceMappingURL=configuration.mjs.map\n","/* eslint-disable @typescript-eslint/no-empty-function */\n\nimport { ConfigurableComponent } from 'govuk-frontend'\n\n/**\n * @augments {ConfigurableComponent<MultiFileUploadConfig>}\n */\nexport class MultiFileUpload extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for multi file upload\n * @param {MultiFileUploadConfig} [config] - Multi file upload config\n */\n constructor($root, config = {}) {\n super($root, config)\n\n if (!MultiFileUpload.isSupported()) {\n return this\n }\n\n const $feedbackContainer =\n this.config.feedbackContainer.element ??\n this.$root.querySelector(this.config.feedbackContainer.selector)\n\n if (!$feedbackContainer || !($feedbackContainer instanceof HTMLElement)) {\n return this\n }\n\n this.$feedbackContainer = $feedbackContainer\n\n this.setupFileInput()\n this.setupDropzone()\n this.setupLabel()\n this.setupStatusBox()\n\n this.$root.addEventListener('click', this.onFileDeleteClick.bind(this))\n this.$root.classList.add('moj-multi-file-upload--enhanced')\n }\n\n setupDropzone() {\n this.$dropzone = document.createElement('div')\n this.$dropzone.classList.add('moj-multi-file-upload__dropzone')\n\n this.$dropzone.addEventListener('dragover', this.onDragOver.bind(this))\n this.$dropzone.addEventListener('dragleave', this.onDragLeave.bind(this))\n this.$dropzone.addEventListener('drop', this.onDrop.bind(this))\n\n this.$fileInput.replaceWith(this.$dropzone)\n this.$dropzone.appendChild(this.$fileInput)\n }\n\n setupLabel() {\n const $label = document.createElement('label')\n $label.setAttribute('for', this.$fileInput.id)\n $label.classList.add('govuk-button', 'govuk-button--secondary')\n $label.textContent = this.config.dropzoneButtonText\n\n const $hint = document.createElement('p')\n $hint.classList.add('govuk-body')\n $hint.textContent = this.config.dropzoneHintText\n\n this.$label = $label\n this.$dropzone.append($hint)\n this.$dropzone.append($label)\n }\n\n setupFileInput() {\n this.$fileInput = /** @type {HTMLInputElement} */ (\n this.$root.querySelector('.moj-multi-file-upload__input')\n )\n this.$fileInput.addEventListener('change', this.onFileChange.bind(this))\n this.$fileInput.addEventListener('focus', this.onFileFocus.bind(this))\n this.$fileInput.addEventListener('blur', this.onFileBlur.bind(this))\n }\n\n setupStatusBox() {\n this.$status = document.createElement('div')\n this.$status.classList.add('govuk-visually-hidden')\n this.$status.setAttribute('aria-live', 'polite')\n this.$status.setAttribute('role', 'status')\n this.$dropzone.append(this.$status)\n }\n\n /**\n * @param {DragEvent} event - Drag event\n */\n onDragOver(event) {\n event.preventDefault()\n this.$dropzone.classList.add('moj-multi-file-upload--dragover')\n }\n\n onDragLeave() {\n this.$dropzone.classList.remove('moj-multi-file-upload--dragover')\n }\n\n /**\n * @param {DragEvent} event - Drag event\n */\n onDrop(event) {\n event.preventDefault()\n this.$dropzone.classList.remove('moj-multi-file-upload--dragover')\n this.$feedbackContainer.classList.remove('moj-hidden')\n this.$status.textContent = this.config.uploadStatusText\n this.uploadFiles(event.dataTransfer.files)\n }\n\n /**\n * @param {FileList} files - File list\n */\n uploadFiles(files) {\n for (const file of Array.from(files)) {\n this.uploadFile(file)\n }\n }\n\n onFileChange() {\n this.$feedbackContainer.classList.remove('moj-hidden')\n this.$status.textContent = this.config.uploadStatusText\n this.uploadFiles(this.$fileInput.files)\n\n const $fileInput = this.$fileInput.cloneNode(true)\n if (!$fileInput || !($fileInput instanceof HTMLInputElement)) {\n return\n }\n\n $fileInput.value = ''\n this.$fileInput.replaceWith($fileInput)\n\n this.setupFileInput()\n this.$fileInput.focus()\n }\n\n onFileFocus() {\n this.$label.classList.add('moj-multi-file-upload--focused')\n }\n\n onFileBlur() {\n this.$label.classList.remove('moj-multi-file-upload--focused')\n }\n\n /**\n * @param {UploadResponseSuccess['success']} success\n */\n getSuccessHtml(success) {\n return `<span class=\"moj-multi-file-upload__success\"> <svg class=\"moj-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\"><path d=\"M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z\"/></svg>${success.messageHtml}</span>`\n }\n\n /**\n * @param {UploadResponseError['error']} error\n */\n getErrorHtml(error) {\n return `<span class=\"moj-multi-file-upload__error\"> <svg class=\"moj-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\"><path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"/></svg>${error.message}</span>`\n }\n\n /**\n * @param {File} file\n */\n getFileRow(file) {\n const $row = document.createElement('div')\n\n $row.classList.add('govuk-summary-list__row', 'moj-multi-file-upload__row')\n\n $row.innerHTML = `\n <div class=\"govuk-summary-list__value moj-multi-file-upload__message\">\n <span class=\"moj-multi-file-upload__filename\">${file.name}</span>\n <span class=\"moj-multi-file-upload__progress\">0%</span>\n </div>\n <div class=\"govuk-summary-list__actions moj-multi-file-upload__actions\"></div>\n `\n\n return $row\n }\n\n /**\n * @param {UploadResponseFile} file\n */\n getDeleteButton(file) {\n const $button = document.createElement('button')\n\n $button.setAttribute('type', 'button')\n $button.setAttribute('name', 'delete')\n $button.setAttribute('value', file.filename)\n\n $button.classList.add(\n 'moj-multi-file-upload__delete',\n 'govuk-button',\n 'govuk-button--secondary',\n 'govuk-!-margin-bottom-0'\n )\n\n $button.innerHTML = `Delete <span class=\"govuk-visually-hidden\">${file.originalname}</span>`\n\n return $button\n }\n\n /**\n * @param {File} file\n */\n uploadFile(file) {\n this.config.hooks.entryHook(this, file)\n\n const $item = this.getFileRow(file)\n const $message = $item.querySelector('.moj-multi-file-upload__message')\n const $actions = $item.querySelector('.moj-multi-file-upload__actions')\n const $progress = $item.querySelector('.moj-multi-file-upload__progress')\n\n const formData = new FormData()\n formData.append('documents', file)\n\n this.$feedbackContainer\n .querySelector('.moj-multi-file-upload__list')\n .append($item)\n\n const xhr = new XMLHttpRequest()\n\n const onLoad = () => {\n if (\n xhr.status < 200 ||\n xhr.status >= 300 ||\n !('success' in xhr.response)\n ) {\n return onError()\n }\n\n $message.innerHTML = this.getSuccessHtml(xhr.response.success)\n this.$status.textContent = xhr.response.success.messageText\n\n $actions.append(this.getDeleteButton(xhr.response.file))\n this.config.hooks.exitHook(this, file, xhr, xhr.responseText)\n }\n\n const onError = () => {\n const error = new Error(\n xhr.response && 'error' in xhr.response\n ? xhr.response.error.message\n : xhr.statusText || 'Upload failed'\n )\n\n $message.innerHTML = this.getErrorHtml(error)\n this.$status.textContent = error.message\n\n this.config.hooks.errorHook(this, file, xhr, xhr.responseText, error)\n }\n\n xhr.addEventListener('load', onLoad)\n xhr.addEventListener('error', onError)\n\n xhr.upload.addEventListener('progress', (event) => {\n if (!event.lengthComputable) {\n return\n }\n\n const percentComplete = Math.round((event.loaded / event.total) * 100)\n $progress.textContent = ` ${percentComplete}%`\n })\n\n xhr.open('POST', this.config.uploadUrl)\n xhr.responseType = 'json'\n\n xhr.send(formData)\n }\n\n /**\n * @param {MouseEvent} event - Click event\n */\n onFileDeleteClick(event) {\n const $button = event.target\n\n if (\n !$button ||\n !($button instanceof HTMLButtonElement) ||\n !$button.classList.contains('moj-multi-file-upload__delete')\n ) {\n return\n }\n\n event.preventDefault() // if user refreshes page and then deletes\n\n const xhr = new XMLHttpRequest()\n\n xhr.addEventListener('load', () => {\n if (xhr.status < 200 || xhr.status >= 300) {\n return\n }\n\n const $rows = Array.from(\n this.$feedbackContainer.querySelectorAll('.moj-multi-file-upload__row')\n )\n\n if ($rows.length === 1) {\n this.$feedbackContainer.classList.add('moj-hidden')\n }\n\n const $rowDelete = $rows.find(($row) => $row.contains($button))\n if ($rowDelete) $rowDelete.remove()\n\n this.config.hooks.deleteHook(this, undefined, xhr, xhr.responseText)\n })\n\n xhr.open('POST', this.config.deleteUrl)\n xhr.setRequestHeader('Content-Type', 'application/json')\n xhr.responseType = 'json'\n\n xhr.send(\n JSON.stringify({\n [$button.name]: $button.value\n })\n )\n }\n\n static isSupported() {\n return (\n this.isDragAndDropSupported() &&\n this.isFormDataSupported() &&\n this.isFileApiSupported()\n )\n }\n\n static isDragAndDropSupported() {\n const div = document.createElement('div')\n return typeof div.ondrop !== 'undefined'\n }\n\n static isFormDataSupported() {\n return typeof FormData === 'function'\n }\n\n static isFileApiSupported() {\n const input = document.createElement('input')\n input.type = 'file'\n return typeof input.files !== 'undefined'\n }\n\n /**\n * Name for the component used when initialising using data-module attributes.\n */\n static moduleName = 'moj-multi-file-upload'\n\n /**\n * Multi file upload default config\n *\n * @type {MultiFileUploadConfig}\n */\n static defaults = Object.freeze({\n uploadStatusText: 'Uploading files, please wait',\n dropzoneHintText: 'Drag and drop files here or',\n dropzoneButtonText: 'Choose files',\n feedbackContainer: {\n selector: '.moj-multi-file__uploaded-files'\n },\n hooks: {\n entryHook: () => {},\n exitHook: () => {},\n errorHook: () => {},\n deleteHook: () => {}\n }\n })\n\n /**\n * Multi file upload config schema\n *\n * @satisfies {Schema<MultiFileUploadConfig>}\n */\n static schema = Object.freeze(\n /** @type {const} */ ({\n properties: {\n uploadUrl: { type: 'string' },\n deleteUrl: { type: 'string' },\n uploadStatusText: { type: 'string' },\n dropzoneHintText: { type: 'string' },\n dropzoneButtonText: { type: 'string' },\n feedbackContainer: { type: 'object' },\n hooks: { type: 'object' }\n }\n })\n )\n}\n\n/**\n * Multi file upload config\n *\n * @typedef {object} MultiFileUploadConfig\n * @property {string} [uploadUrl] - File upload URL\n * @property {string} [deleteUrl] - File delete URL\n * @property {string} [uploadStatusText] - Upload status text\n * @property {string} [dropzoneHintText] - Dropzone hint text\n * @property {string} [dropzoneButtonText] - Dropzone button text\n * @property {object} [feedbackContainer] - Feedback container config\n * @property {string} [feedbackContainer.selector] - Selector for feedback container\n * @property {Element | null} [feedbackContainer.element] - HTML element for feedback container\n * @property {MultiFileUploadHooks} [hooks] - Upload hooks\n */\n\n/**\n * Multi file upload hooks\n *\n * @typedef {object} MultiFileUploadHooks\n * @property {OnUploadFileEntryHook} [entryHook] - File upload entry hook\n * @property {OnUploadFileExitHook} [exitHook] - File upload exit hook\n * @property {OnUploadFileErrorHook} [errorHook] - File upload error hook\n * @property {OnUploadFileDeleteHook} [deleteHook] - File delete hook\n */\n\n/**\n * Upload hook: File entry\n *\n * @callback OnUploadFileEntryHook\n * @param {InstanceType<typeof MultiFileUpload>} upload - Multi file upload\n * @param {File} file - File upload\n */\n\n/**\n * Upload hook: File exit\n *\n * @callback OnUploadFileExitHook\n * @param {InstanceType<typeof MultiFileUpload>} upload - Multi file upload\n * @param {File} file - File upload\n * @param {XMLHttpRequest} xhr - XMLHttpRequest\n * @param {string} textStatus - Text status\n */\n\n/**\n * Upload hook: File error\n *\n * @callback OnUploadFileErrorHook\n * @param {InstanceType<typeof MultiFileUpload>} upload - Multi file upload\n * @param {File} file - File upload\n * @param {XMLHttpRequest} xhr - XMLHttpRequest\n * @param {string} textStatus - Text status\n * @param {Error} errorThrown - Error thrown\n */\n\n/**\n * Upload hook: File delete\n *\n * @callback OnUploadFileDeleteHook\n * @param {InstanceType<typeof MultiFileUpload>} upload - Multi file upload\n * @param {File} [file] - File upload\n * @param {XMLHttpRequest} xhr - XMLHttpRequest\n * @param {string} textStatus - Text status\n */\n\n/**\n * @typedef {object} UploadResponseSuccess\n * @property {{ messageText: string, messageHtml: string }} success - Response success\n * @property {UploadResponseFile} file - Response file\n */\n\n/**\n * @typedef {object} UploadResponseError\n * @property {{ message: string }} error - Response error\n * @property {UploadResponseFile} file - Response file\n */\n\n/**\n * @typedef {object} UploadResponseFile\n * @property {string} filename - File name\n * @property {string} originalname - Original file name\n */\n\n/**\n * @import { Schema } from 'govuk-frontend/dist/govuk/common/configuration.mjs'\n */\n"],"names":["isInitialised","$root","moduleName","HTMLElement","hasAttribute","isSupported","$scope","document","body","classList","contains","isArray","option","Array","isObject","formatErrorMessage","Component","message","GOVUKFrontendError","Error","constructor","args","name","SupportError","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","_$root","childConstructor","elementType","checkSupport","checkInitialised","setAttribute","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","normaliseDataset","dataset","mergeConfigs","normaliseString","value","property","trimmedValue","trim","output","outputType","type","includes","length","isFinite","Number","schema","out","entries","Object","properties","entry","namespace","field","toString","extractConfigByNamespace","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","MultiFileUpload","_this$config$feedback","$feedbackContainer","feedbackContainer","querySelector","selector","setupFileInput","setupDropzone","setupLabel","setupStatusBox","addEventListener","onFileDeleteClick","bind","add","$dropzone","createElement","onDragOver","onDragLeave","onDrop","$fileInput","replaceWith","appendChild","$label","id","textContent","dropzoneButtonText","$hint","dropzoneHintText","append","onFileChange","onFileFocus","onFileBlur","$status","event","preventDefault","remove","uploadStatusText","uploadFiles","dataTransfer","files","file","from","uploadFile","cloneNode","HTMLInputElement","focus","getSuccessHtml","success","messageHtml","getErrorHtml","error","getFileRow","$row","innerHTML","getDeleteButton","$button","filename","originalname","hooks","entryHook","$item","$message","$actions","$progress","formData","FormData","xhr","XMLHttpRequest","onLoad","status","response","onError","messageText","exitHook","responseText","statusText","errorHook","upload","lengthComputable","percentComplete","Math","round","loaded","total","open","uploadUrl","responseType","send","target","HTMLButtonElement","$rows","querySelectorAll","$rowDelete","find","deleteHook","undefined","deleteUrl","setRequestHeader","JSON","stringify","isDragAndDropSupported","isFormDataSupported","isFileApi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