UNPKG

79.7 kBSource Map (JSON)View Raw
1{"version":3,"sources":["index.js"],"names":["require","h","Plugin","Translator","DashboardUI","StatusBar","Informer","ThumbnailGenerator","findAllDOMElements","toArray","getDroppedFiles","getTextDirection","trapFocus","cuid","ResizeObserver","default","createSuperFocus","memoize","FOCUSABLE_ELEMENTS","TAB_KEY","ESC_KEY","createPromise","o","promise","Promise","resolve","reject","defaultPickerIcon","module","exports","uppy","opts","setOptions","newOpts","i18nInit","translator","defaultLocale","locale","i18n","translate","bind","i18nArray","translateArray","setPluginState","removeTarget","plugin","pluginState","getPluginState","newTargets","targets","filter","target","id","addTarget","callerPluginId","constructor","name","callerPluginName","title","callerPluginType","type","msg","log","state","slice","push","el","hideAllPanels","update","activePickerPanel","showAddFilesPanel","activeOverlayType","fileCardFor","showFileEditor","current","showPanel","canEditFile","file","editors","_getEditors","some","getPlugin","openFileEditor","forEach","editor","selectFile","openModal","savedScrollPosition","window","pageYOffset","savedActiveElement","document","activeElement","disablePageScrollWhenModalOpen","body","classList","add","animateOpenClose","isClosing","handler","isHidden","removeEventListener","addEventListener","browserBackButtonClose","updateBrowserHistory","handleKeyDownInModal","emit","closeModal","manualClose","remove","superFocus","cancel","focus","history","modalName","go","isModalOpen","requestCloseModal","onRequestCloseModal","setDarkModeCapability","isDarkModeOn","getState","capabilities","setState","darkMode","handleSystemDarkModeChange","event","isDarkModeOnNow","matches","toggleFileCard","show","fileID","getFile","toggleAddFilesPanel","addFiles","files","descriptors","map","source","data","meta","relativePath","err","startListeningToResize","resizeObserver","entries","observer","uppyDashboardInnerEl","contentRect","width","height","containerWidth","containerHeight","areInsidesReadyToBeVisible","observe","querySelector","makeDashboardInsidesVisibleAnywayTimeout","setTimeout","isModalAndClosed","inline","stopListeningToResize","disconnect","clearTimeout","recordIfFocusedOnUppyRecently","contains","ifFocusedOnUppyRecently","disableAllFocusableElements","disable","focusableNodes","querySelectorAll","node","currentTabIndex","getAttribute","dataset","inertTabindex","setAttribute","removeAttribute","dashboardIsDisabled","pushState","handlePopState","keyCode","forModal","handleClickOutside","closeModalOnClickOutside","handlePaste","iteratePlugins","handleRootPaste","clipboardData","handleInputChange","preventDefault","handleDragOver","stopPropagation","disabled","dataTransfer","dropEffect","removeDragOverClassTimeout","isDraggingOver","handleDragLeave","handleDrop","dropCategory","handleRootDrop","executedDropErrorOnce","logDropError","error","info","message","then","length","handleRequestThumbnail","waitForThumbnailsBeforeUpload","handleCancelThumbnail","handleKeyDownInInline","forInline","handlePasteOnBody","isFocusInOverlay","handleComplete","failed","closeAfterFinish","_openFileEditorWhenFilesAdded","firstFile","initEvents","trigger","showModalTrigger","on","autoOpenFileEditor","removeEvents","off","superFocusOnEachUpdate","isFocusInUppy","isFocusNowhere","isInformerHidden","isModal","afterUpdate","cancelUpload","removeFile","saveFileCard","setFileMeta","_attachRenderFunctionToTarget","icon","render","_isTargetSupported","isSupported","_getAcquirers","_getProgressIndicators","allowNewUpload","newFiles","Object","keys","progress","uploadStarted","uploadStartedFiles","pausedFiles","isPaused","completeFiles","uploadComplete","erroredFiles","inProgressFiles","inProgressNotPausedFiles","processingFiles","preprocess","postprocess","isUploadStarted","isAllComplete","totalProgress","isAllErrored","isAllPaused","acquirers","progressindicators","theme","indexOf","fileManagerSelectionType","console","totalFileCount","direction","autoProceed","note","metaFields","resumableUploads","individualCancellation","isMobileDevice","pauseUpload","pauseResume","retryUpload","cancelAll","showLinkToFileUploadResult","proudlyDisplayPoweredByUppy","hideCancelButton","hideRetryButton","hidePauseResumeButton","showRemoveButtonAfterComplete","isTargetDOMEl","parentElement","allowedFileTypes","restrictions","maxNumberOfFiles","showSelectedFiles","discoverProviderPlugins","install","Error","allowMultipleUploads","mount","plugins","pluginID","disableStatusBar","use","hideUploadButton","showProgressDetails","hideAfterFinish","hideProgressAfterFinish","doneButtonHandler","disableInformer","disableThumbnailGenerator","thumbnailWidth","thumbnailType","lazy","darkModeMediaQuery","matchMedia","isDarkModeOnFromTheStart","addListener","uninstall","informer","removePlugin","statusBar","thumbnail","unmount","removeListener","strings","importFrom","addingMoreFiles","addMoreFiles","dashboardWindowTitle","dashboardTitle","copyLinkToClipboardSuccess","copyLinkToClipboardFallback","copyLink","fileSource","done","back","addMore","editFile","editing","finishEditingFile","saveChanges","myDevice","dropPasteFiles","dropPasteFolders","dropPasteBoth","dropPasteImportFiles","dropPasteImportFolders","dropPasteImportBoth","dropHint","browseFiles","browseFolders","uploadPaused","resumeUpload","xFilesSelected","uploadingXFiles","processingXFiles","poweredBy2","poweredBy","defaultOptions","reset","onMount","element","dir","VERSION"],"mappings":";;;;;;;;eAAcA,OAAO,CAAC,QAAD,C;IAAbC,C,YAAAA,C;;gBACWD,OAAO,CAAC,YAAD,C;IAAlBE,M,aAAAA,M;;AACR,IAAMC,UAAU,GAAGH,OAAO,CAAC,4BAAD,CAA1B;;AACA,IAAMI,WAAW,GAAGJ,OAAO,CAAC,wBAAD,CAA3B;;AACA,IAAMK,SAAS,GAAGL,OAAO,CAAC,kBAAD,CAAzB;;AACA,IAAMM,QAAQ,GAAGN,OAAO,CAAC,gBAAD,CAAxB;;AACA,IAAMO,kBAAkB,GAAGP,OAAO,CAAC,2BAAD,CAAlC;;AACA,IAAMQ,kBAAkB,GAAGR,OAAO,CAAC,oCAAD,CAAlC;;AACA,IAAMS,OAAO,GAAGT,OAAO,CAAC,yBAAD,CAAvB;;AACA,IAAMU,eAAe,GAAGV,OAAO,CAAC,iCAAD,CAA/B;;AACA,IAAMW,gBAAgB,GAAGX,OAAO,CAAC,kCAAD,CAAhC;;AACA,IAAMY,SAAS,GAAGZ,OAAO,CAAC,mBAAD,CAAzB;;AACA,IAAMa,IAAI,GAAGb,OAAO,CAAC,MAAD,CAApB;;AACA,IAAMc,cAAc,GAAGd,OAAO,CAAC,0BAAD,CAAP,CAAoCe,OAApC,IAA+Cf,OAAO,CAAC,0BAAD,CAA7E;;AACA,IAAMgB,gBAAgB,GAAGhB,OAAO,CAAC,0BAAD,CAAhC;;AACA,IAAMiB,OAAO,GA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C,IAAlC;AAtHuB;AAuHxB;;AA1HH;;AAAA,SAi9BEuK,OAj9BF,GAi9BE,mBAAW;AACT;AACA,QAAMC,OAAO,GAAG,KAAKzS,EAArB;AACA,QAAM+M,SAAS,GAAGtQ,gBAAgB,CAACgW,OAAD,CAAlC;;AACA,QAAI,CAAC1F,SAAL,EAAgB;AACd0F,MAAAA,OAAO,CAACC,GAAR,GAAc,KAAd;AACD;AACF,GAx9BH;;AAAA;AAAA,EAAyC1W,MAAzC,UACS2W,OADT","sourcesContent":["const { h } = require('preact')\nconst { Plugin } = require('@uppy/core')\nconst Translator = require('@uppy/utils/lib/Translator')\nconst DashboardUI = require('./components/Dashboard')\nconst StatusBar = require('@uppy/status-bar')\nconst Informer = require('@uppy/informer')\nconst ThumbnailGenerator = require('@uppy/thumbnail-generator')\nconst findAllDOMElements = require('@uppy/utils/lib/findAllDOMElements')\nconst toArray = require('@uppy/utils/lib/toArray')\nconst getDroppedFiles = require('@uppy/utils/lib/getDroppedFiles')\nconst getTextDirection = require('@uppy/utils/lib/getTextDirection')\nconst trapFocus = require('./utils/trapFocus')\nconst cuid = require('cuid')\nconst ResizeObserver = require('resize-observer-polyfill').default || require('resize-observer-polyfill')\nconst createSuperFocus = require('./utils/createSuperFocus')\nconst memoize = require('memoize-one').default || require('memoize-one')\nconst FOCUSABLE_ELEMENTS = require('@uppy/utils/lib/FOCUSABLE_ELEMENTS')\n\nconst TAB_KEY = 9\nconst ESC_KEY = 27\n\nfunction createPromise () {\n const o = {}\n o.promise = new Promise((resolve, reject) => {\n o.resolve = resolve\n o.reject = reject\n })\n return o\n}\n\nfunction defaultPickerIcon () {\n return (\n <svg aria-hidden=\"true\" focusable=\"false\" width=\"30\" height=\"30\" viewBox=\"0 0 30 30\">\n <path d=\"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z\" />\n </svg>\n )\n}\n\n/**\n * Dashboard UI with previews, metadata editing, tabs for various services and more\n */\nmodule.exports = class Dashboard extends Plugin {\n static VERSION = require('../package.json').version\n\n constructor (uppy, opts) {\n super(uppy, opts)\n this.id = this.opts.id || 'Dashboard'\n this.title = 'Dashboard'\n this.type = 'orchestrator'\n this.modalName = `uppy-Dashboard-${cuid()}`\n\n this.defaultLocale = {\n strings: {\n closeModal: 'Close Modal',\n importFrom: 'Import from %{name}',\n addingMoreFiles: 'Adding more files',\n addMoreFiles: 'Add more files',\n dashboardWindowTitle: 'File Uploader Window (Press escape to close)',\n dashboardTitle: 'File Uploader',\n copyLinkToClipboardSuccess: 'Link copied to clipboard',\n copyLinkToClipboardFallback: 'Copy the URL below',\n copyLink: 'Copy link',\n fileSource: 'File source: %{name}',\n done: 'Done',\n back: 'Back',\n addMore: 'Add more',\n removeFile: 'Remove file',\n editFile: 'Edit file',\n editing: 'Editing %{file}',\n finishEditingFile: 'Finish editing file',\n saveChanges: 'Save changes',\n cancel: 'Cancel',\n myDevice: 'My Device',\n dropPasteFiles: 'Drop files here, paste or %{browseFiles}',\n dropPasteFolders: 'Drop files here, paste or %{browseFolders}',\n dropPasteBoth: 'Drop files here, paste, %{browseFiles} or %{browseFolders}',\n dropPasteImportFiles: 'Drop files here, paste, %{browseFiles} or import from:',\n dropPasteImportFolders: 'Drop files here, paste, %{browseFolders} or import from:',\n dropPasteImportBoth: 'Drop files here, paste, %{browseFiles}, %{browseFolders} or import from:',\n dropHint: 'Drop your files here',\n browseFiles: 'browse files',\n browseFolders: 'browse folders',\n uploadComplete: 'Upload complete',\n uploadPaused: 'Upload paused',\n resumeUpload: 'Resume upload',\n pauseUpload: 'Pause upload',\n retryUpload: 'Retry upload',\n cancelUpload: 'Cancel upload',\n xFilesSelected: {\n 0: '%{smart_count} file selected',\n 1: '%{smart_count} files selected'\n },\n uploadingXFiles: {\n 0: 'Uploading %{smart_count} file',\n 1: 'Uploading %{smart_count} files'\n },\n processingXFiles: {\n 0: 'Processing %{smart_count} file',\n 1: 'Processing %{smart_count} files'\n },\n // The default `poweredBy2` string only combines the `poweredBy` string (%{backwardsCompat}) with the size.\n // Locales can override `poweredBy2` to specify a different word order. This is for backwards compat with\n // Uppy 1.9.x and below which did a naive concatenation of `poweredBy2 + size` instead of using a locale-specific\n // substitution.\n // TODO: In 2.0 `poweredBy2` should be removed in and `poweredBy` updated to use substitution.\n poweredBy2: '%{backwardsCompat} %{uppy}',\n poweredBy: 'Powered by'\n }\n }\n\n // set default options\n const defaultOptions = {\n target: 'body',\n metaFields: [],\n trigger: '#uppy-select-files',\n inline: false,\n width: 750,\n height: 550,\n thumbnailWidth: 280,\n thumbnailType: 'image/jpeg',\n waitForThumbnailsBeforeUpload: false,\n defaultPickerIcon,\n showLinkToFileUploadResult: true,\n showProgressDetails: false,\n hideUploadButton: false,\n hideCancelButton: false,\n hideRetryButton: false,\n hidePauseResumeButton: false,\n hideProgressAfterFinish: false,\n doneButtonHandler: () => {\n this.uppy.reset()\n this.requestCloseModal()\n },\n note: null,\n closeModalOnClickOutside: false,\n closeAfterFinish: false,\n disableStatusBar: false,\n disableInformer: false,\n disableThumbnailGenerator: false,\n disablePageScrollWhenModalOpen: true,\n animateOpenClose: true,\n fileManagerSelectionType: 'files',\n proudlyDisplayPoweredByUppy: true,\n onRequestCloseModal: () => this.closeModal(),\n showSelectedFiles: true,\n showRemoveButtonAfterComplete: false,\n browserBackButtonClose: false,\n theme: 'light',\n autoOpenFileEditor: false,\n disabled: false\n }\n\n // merge default options with the ones set by user\n this.opts = { ...defaultOptions, ...opts }\n\n this.i18nInit()\n\n this.superFocus = createSuperFocus()\n this.ifFocusedOnUppyRecently = false\n\n // Timeouts\n this.makeDashboardInsidesVisibleAnywayTimeout = null\n this.removeDragOverClassTimeout = null\n }\n\n setOptions = (newOpts) => {\n super.setOptions(newOpts)\n this.i18nInit()\n }\n\n i18nInit = () => {\n this.translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale])\n this.i18n = this.translator.translate.bind(this.translator)\n this.i18nArray = this.translator.translateArray.bind(this.translator)\n this.setPluginState() // so that UI re-renders and we see the updated locale\n }\n\n removeTarget = (plugin) => {\n const pluginState = this.getPluginState()\n // filter out the one we want to remove\n const newTargets = pluginState.targets.filter(target => target.id !== plugin.id)\n\n this.setPluginState({\n targets: newTargets\n })\n }\n\n addTarget = (plugin) => {\n const callerPluginId = plugin.id || plugin.constructor.name\n const callerPluginName = plugin.title || callerPluginId\n const callerPluginType = plugin.type\n\n if (callerPluginType !== 'acquirer' &&\n callerPluginType !== 'progressindicator' &&\n callerPluginType !== 'editor') {\n const msg = 'Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor'\n this.uppy.log(msg, 'error')\n return\n }\n\n const target = {\n id: callerPluginId,\n name: callerPluginName,\n type: callerPluginType\n }\n\n const state = this.getPluginState()\n const newTargets = state.targets.slice()\n newTargets.push(target)\n\n this.setPluginState({\n targets: newTargets\n })\n\n return this.el\n }\n\n hideAllPanels = () => {\n const update = {\n activePickerPanel: false,\n showAddFilesPanel: false,\n activeOverlayType: null,\n fileCardFor: null,\n showFileEditor: false\n }\n\n const current = this.getPluginState()\n if (current.activePickerPanel === update.activePickerPanel &&\n current.showAddFilesPanel === update.showAddFilesPanel &&\n current.showFileEditor === update.showFileEditor &&\n current.activeOverlayType === update.activeOverlayType) {\n // avoid doing a state update if nothing changed\n return\n }\n\n this.setPluginState(update)\n }\n\n showPanel = (id) => {\n const { targets } = this.getPluginState()\n\n const activePickerPanel = targets.filter((target) => {\n return target.type === 'acquirer' && target.id === id\n })[0]\n\n this.setPluginState({\n activePickerPanel: activePickerPanel,\n activeOverlayType: 'PickerPanel'\n })\n }\n\n canEditFile = (file) => {\n const { targets } = this.getPluginState()\n const editors = this._getEditors(targets)\n\n return editors.some((target) => (\n this.uppy.getPlugin(target.id).canEditFile(file)\n ))\n }\n\n openFileEditor = (file) => {\n const { targets } = this.getPluginState()\n const editors = this._getEditors(targets)\n\n this.setPluginState({\n showFileEditor: true,\n fileCardFor: file.id || null,\n activeOverlayType: 'FileEditor'\n })\n\n editors.forEach((editor) => {\n this.uppy.getPlugin(editor.id).selectFile(file)\n })\n }\n\n openModal = () => {\n const { promise, resolve } = createPromise()\n // save scroll position\n this.savedScrollPosition = window.pageYOffset\n // save active element, so we can restore focus when modal is closed\n this.savedActiveElement = document.activeElement\n\n if (this.opts.disablePageScrollWhenModalOpen) {\n document.body.classList.add('uppy-Dashboard-isFixed')\n }\n\n if (this.opts.animateOpenClose && this.getPluginState().isClosing) {\n const handler = () => {\n this.setPluginState({\n isHidden: false\n })\n this.el.removeEventListener('animationend', handler, false)\n resolve()\n }\n this.el.addEventListener('animationend', handler, false)\n } else {\n this.setPluginState({\n isHidden: false\n })\n resolve()\n }\n\n if (this.opts.browserBackButtonClose) {\n this.updateBrowserHistory()\n }\n\n // handle ESC and TAB keys in modal dialog\n document.addEventListener('keydown', this.handleKeyDownInModal)\n\n this.uppy.emit('dashboard:modal-open')\n\n return promise\n }\n\n closeModal = (opts = {}) => {\n const {\n manualClose = true // Whether the modal is being closed by the user (`true`) or by other means (e.g. browser back button)\n } = opts\n\n const { isHidden, isClosing } = this.getPluginState()\n if (isHidden || isClosing) {\n // short-circuit if animation is ongoing\n return\n }\n\n const { promise, resolve } = createPromise()\n\n if (this.opts.disablePageScrollWhenModalOpen) {\n document.body.classList.remove('uppy-Dashboard-isFixed')\n }\n\n if (this.opts.animateOpenClose) {\n this.setPluginState({\n isClosing: true\n })\n const handler = () => {\n this.setPluginState({\n isHidden: true,\n isClosing: false\n })\n\n this.superFocus.cancel()\n this.savedActiveElement.focus()\n\n this.el.removeEventListener('animationend', handler, false)\n resolve()\n }\n this.el.addEventListener('animationend', handler, false)\n } else {\n this.setPluginState({\n isHidden: true\n })\n\n this.superFocus.cancel()\n this.savedActiveElement.focus()\n\n resolve()\n }\n\n // handle ESC and TAB keys in modal dialog\n document.removeEventListener('keydown', this.handleKeyDownInModal)\n\n if (manualClose) {\n if (this.opts.browserBackButtonClose) {\n // Make sure that the latest entry in the history state is our modal name\n if (history.state && history.state[this.modalName]) {\n // Go back in history to clear out the entry we created (ultimately closing the modal)\n history.go(-1)\n }\n }\n }\n\n this.uppy.emit('dashboard:modal-closed')\n\n return promise\n }\n\n isModalOpen = () => {\n return !this.getPluginState().isHidden || false\n }\n\n requestCloseModal = () => {\n if (this.opts.onRequestCloseModal) {\n return this.opts.onRequestCloseModal()\n }\n return this.closeModal()\n }\n\n setDarkModeCapability = (isDarkModeOn) => {\n const { capabilities } = this.uppy.getState()\n this.uppy.setState({\n capabilities: {\n ...capabilities,\n darkMode: isDarkModeOn\n }\n })\n }\n\n handleSystemDarkModeChange = (event) => {\n const isDarkModeOnNow = event.matches\n this.uppy.log(`[Dashboard] Dark mode is ${isDarkModeOnNow ? 'on' : 'off'}`)\n this.setDarkModeCapability(isDarkModeOnNow)\n }\n\n toggleFileCard = (show, fileID) => {\n const file = this.uppy.getFile(fileID)\n if (show) {\n this.uppy.emit('dashboard:file-edit-start', file)\n } else {\n this.uppy.emit('dashboard:file-edit-complete', file)\n }\n\n this.setPluginState({\n fileCardFor: show ? fileID : null,\n activeOverlayType: show ? 'FileCard' : null\n })\n }\n\n toggleAddFilesPanel = (show) => {\n this.setPluginState({\n showAddFilesPanel: show,\n activeOverlayType: show ? 'AddFiles' : null\n })\n }\n\n addFiles = (files) => {\n const descriptors = files.map((file) => ({\n source: this.id,\n name: file.name,\n type: file.type,\n data: file,\n meta: {\n // path of the file relative to the ancestor directory the user selected.\n // e.g. 'docs/Old Prague/airbnb.pdf'\n relativePath: file.relativePath || null\n }\n }))\n\n try {\n this.uppy.addFiles(descriptors)\n } catch (err) {\n this.uppy.log(err)\n }\n }\n\n // ___Why make insides of Dashboard invisible until first ResizeObserver event is emitted?\n // ResizeOberserver doesn't emit the first resize event fast enough, users can see the jump from one .uppy-size-- to another (e.g. in Safari)\n // ___Why not apply visibility property to .uppy-Dashboard-inner?\n // Because ideally, acc to specs, ResizeObserver should see invisible elements as of width 0. So even though applying invisibility to .uppy-Dashboard-inner works now, it may not work in the future.\n startListeningToResize = () => {\n // Watch for Dashboard container (`.uppy-Dashboard-inner`) resize\n // and update containerWidth/containerHeight in plugin state accordingly.\n // Emits first event on initialization.\n this.resizeObserver = new ResizeObserver((entries, observer) => {\n const uppyDashboardInnerEl = entries[0]\n\n const { width, height } = uppyDashboardInnerEl.contentRect\n\n this.uppy.log(`[Dashboard] resized: ${width} / ${height}`, 'debug')\n\n this.setPluginState({\n containerWidth: width,\n containerHeight: height,\n areInsidesReadyToBeVisible: true\n })\n })\n this.resizeObserver.observe(this.el.querySelector('.uppy-Dashboard-inner'))\n\n // If ResizeObserver fails to emit an event telling us what size to use - default to the mobile view\n this.makeDashboardInsidesVisibleAnywayTimeout = setTimeout(() => {\n const pluginState = this.getPluginState()\n const isModalAndClosed = !this.opts.inline && pluginState.isHidden\n if (\n // if ResizeObserver hasn't yet fired,\n !pluginState.areInsidesReadyToBeVisible &&\n // and it's not due to the modal being closed\n !isModalAndClosed\n ) {\n this.uppy.log(\"[Dashboard] resize event didn't fire on time: defaulted to mobile layout\", 'debug')\n\n this.setPluginState({\n areInsidesReadyToBeVisible: true\n })\n }\n }, 1000)\n }\n\n stopListeningToResize = () => {\n this.resizeObserver.disconnect()\n\n clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)\n }\n\n // Records whether we have been interacting with uppy right now, which is then used to determine whether state updates should trigger a refocusing.\n recordIfFocusedOnUppyRecently = (event) => {\n if (this.el.contains(event.target)) {\n this.ifFocusedOnUppyRecently = true\n } else {\n this.ifFocusedOnUppyRecently = false\n // ___Why run this.superFocus.cancel here when it already runs in superFocusOnEachUpdate?\n // Because superFocus is debounced, when we move from Uppy to some other element on the page,\n // previously run superFocus sometimes hits and moves focus back to Uppy.\n this.superFocus.cancel()\n }\n }\n\n disableAllFocusableElements = (disable) => {\n const focusableNodes = toArray(this.el.querySelectorAll(FOCUSABLE_ELEMENTS))\n if (disable) {\n focusableNodes.forEach((node) => {\n // save previous tabindex in a data-attribute, to restore when enabling\n const currentTabIndex = node.getAttribute('tabindex')\n if (currentTabIndex) {\n node.dataset.inertTabindex = currentTabIndex\n }\n node.setAttribute('tabindex', '-1')\n })\n } else {\n focusableNodes.forEach((node) => {\n if ('inertTabindex' in node.dataset) {\n node.setAttribute('tabindex', node.dataset.inertTabindex)\n } else {\n node.removeAttribute('tabindex')\n }\n })\n }\n this.dashboardIsDisabled = disable\n }\n\n updateBrowserHistory = () => {\n // Ensure history state does not already contain our modal name to avoid double-pushing\n if (!history.state || !history.state[this.modalName]) {\n // Push to history so that the page is not lost on browser back button press\n history.pushState({\n ...history.state,\n [this.modalName]: true\n }, '')\n }\n\n // Listen for back button presses\n window.addEventListener('popstate', this.handlePopState, false)\n }\n\n handlePopState = (event) => {\n // Close the modal if the history state no longer contains our modal name\n if (this.isModalOpen() && (!event.state || !event.state[this.modalName])) {\n this.closeModal({ manualClose: false })\n }\n\n // When the browser back button is pressed and uppy is now the latest entry in the history but the modal is closed, fix the history by removing the uppy history entry\n // This occurs when another entry is added into the history state while the modal is open, and then the modal gets manually closed\n // Solves PR #575 (https://github.com/transloadit/uppy/pull/575)\n if (!this.isModalOpen() && event.state && event.state[this.modalName]) {\n history.go(-1)\n }\n }\n\n handleKeyDownInModal = (event) => {\n // close modal on esc key press\n if (event.keyCode === ESC_KEY) this.requestCloseModal(event)\n // trap focus on tab key press\n if (event.keyCode === TAB_KEY) trapFocus.forModal(event, this.getPluginState().activeOverlayType, this.el)\n }\n\n handleClickOutside = () => {\n if (this.opts.closeModalOnClickOutside) this.requestCloseModal()\n }\n\n handlePaste = (event) => {\n // 1. Let any acquirer plugin (Url/Webcam/etc.) handle pastes to the root\n this.uppy.iteratePlugins((plugin) => {\n if (plugin.type === 'acquirer') {\n // Every Plugin with .type acquirer can define handleRootPaste(event)\n plugin.handleRootPaste && plugin.handleRootPaste(event)\n }\n })\n\n // 2. Add all dropped files\n const files = toArray(event.clipboardData.files)\n this.addFiles(files)\n }\n\n handleInputChange = (event) => {\n event.preventDefault()\n const files = toArray(event.target.files)\n this.addFiles(files)\n }\n\n handleDragOver = (event) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (this.opts.disabled) {\n return\n }\n\n // 1. Add a small (+) icon on drop\n // (and prevent browsers from interpreting this as files being _moved_ into the browser, https://github.com/transloadit/uppy/issues/1978)\n event.dataTransfer.dropEffect = 'copy'\n\n clearTimeout(this.removeDragOverClassTimeout)\n this.setPluginState({ isDraggingOver: true })\n }\n\n handleDragLeave = (event) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (this.opts.disabled) {\n return\n }\n\n clearTimeout(this.removeDragOverClassTimeout)\n // Timeout against flickering, this solution is taken from drag-drop library. Solution with 'pointer-events: none' didn't work across browsers.\n this.removeDragOverClassTimeout = setTimeout(() => {\n this.setPluginState({ isDraggingOver: false })\n }, 50)\n }\n\n handleDrop = (event, dropCategory) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (this.opts.disabled) {\n return\n }\n\n clearTimeout(this.removeDragOverClassTimeout)\n\n // 2. Remove dragover class\n this.setPluginState({ isDraggingOver: false })\n\n // 3. Let any acquirer plugin (Url/Webcam/etc.) handle drops to the root\n this.uppy.iteratePlugins((plugin) => {\n if (plugin.type === 'acquirer') {\n // Every Plugin with .type acquirer can define handleRootDrop(event)\n plugin.handleRootDrop && plugin.handleRootDrop(event)\n }\n })\n\n // 4. Add all dropped files\n let executedDropErrorOnce = false\n const logDropError = (error) => {\n this.uppy.log(error, 'error')\n\n // In practice all drop errors are most likely the same, so let's just show one to avoid overwhelming the user\n if (!executedDropErrorOnce) {\n this.uppy.info(error.message, 'error')\n executedDropErrorOnce = true\n }\n }\n\n getDroppedFiles(event.dataTransfer, { logDropError })\n .then((files) => {\n if (files.length > 0) {\n this.uppy.log('[Dashboard] Files were dropped')\n this.addFiles(files)\n }\n })\n }\n\n handleRequestThumbnail = (file) => {\n if (!this.opts.waitForThumbnailsBeforeUpload) {\n this.uppy.emit('thumbnail:request', file)\n }\n }\n\n /**\n * We cancel thumbnail requests when a file item component unmounts to avoid clogging up the queue when the user scrolls past many elements.\n */\n handleCancelThumbnail = (file) => {\n if (!this.opts.waitForThumbnailsBeforeUpload) {\n this.uppy.emit('thumbnail:cancel', file)\n }\n }\n\n handleKeyDownInInline = (event) => {\n // Trap focus on tab key press.\n if (event.keyCode === TAB_KEY) trapFocus.forInline(event, this.getPluginState().activeOverlayType, this.el)\n }\n\n // ___Why do we listen to the 'paste' event on a document instead of onPaste={props.handlePaste} prop, or this.el.addEventListener('paste')?\n // Because (at least) Chrome doesn't handle paste if focus is on some button, e.g. 'My Device'.\n // => Therefore, the best option is to listen to all 'paste' events, and only react to them when we are focused on our particular Uppy instance.\n // ___Why do we still need onPaste={props.handlePaste} for the DashboardUi?\n // Because if we click on the 'Drop files here' caption e.g., `document.activeElement` will be 'body'. Which means our standard determination of whether we're pasting into our Uppy instance won't work.\n // => Therefore, we need a traditional onPaste={props.handlePaste} handler too.\n handlePasteOnBody = (event) => {\n const isFocusInOverlay = this.el.contains(document.activeElement)\n if (isFocusInOverlay) {\n this.handlePaste(event)\n }\n }\n\n handleComplete = ({ failed }) => {\n if (this.opts.closeAfterFinish && failed.length === 0) {\n // All uploads are done\n this.requestCloseModal()\n }\n }\n\n _openFileEditorWhenFilesAdded = (files) => {\n const firstFile = files[0]\n if (this.canEditFile(firstFile)) {\n this.openFileEditor(firstFile)\n }\n }\n\n initEvents = () => {\n // Modal open button\n if (this.opts.trigger && !this.opts.inline) {\n const showModalTrigger = findAllDOMElements(this.opts.trigger)\n if (showModalTrigger) {\n showModalTrigger.forEach(trigger => trigger.addEventListener('click', this.openModal))\n } else {\n this.uppy.log('Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself', 'warning')\n }\n }\n\n this.startListeningToResize()\n document.addEventListener('paste', this.handlePasteOnBody)\n\n this.uppy.on('plugin-remove', this.removeTarget)\n this.uppy.on('file-added', this.hideAllPanels)\n this.uppy.on('dashboard:modal-closed', this.hideAllPanels)\n this.uppy.on('file-editor:complete', this.hideAllPanels)\n this.uppy.on('complete', this.handleComplete)\n\n // ___Why fire on capture?\n // Because this.ifFocusedOnUppyRecently needs to change before onUpdate() fires.\n document.addEventListener('focus', this.recordIfFocusedOnUppyRecently, true)\n document.addEventListener('click', this.recordIfFocusedOnUppyRecently, true)\n\n if (this.opts.inline) {\n this.el.addEventListener('keydown', this.handleKeyDownInInline)\n }\n\n if (this.opts.autoOpenFileEditor) {\n this.uppy.on('files-added', this._openFileEditorWhenFilesAdded)\n }\n }\n\n removeEvents = () => {\n const showModalTrigger = findAllDOMElements(this.opts.trigger)\n if (!this.opts.inline && showModalTrigger) {\n showModalTrigger.forEach(trigger => trigger.removeEventListener('click', this.openModal))\n }\n\n this.stopListeningToResize()\n document.removeEventListener('paste', this.handlePasteOnBody)\n\n window.removeEventListener('popstate', this.handlePopState, false)\n this.uppy.off('plugin-remove', this.removeTarget)\n this.uppy.off('file-added', this.hideAllPanels)\n this.uppy.off('dashboard:modal-closed', this.hideAllPanels)\n this.uppy.off('complete', this.handleComplete)\n\n document.removeEventListener('focus', this.recordIfFocusedOnUppyRecently)\n document.removeEventListener('click', this.recordIfFocusedOnUppyRecently)\n\n if (this.opts.inline) {\n this.el.removeEventListener('keydown', this.handleKeyDownInInline)\n }\n\n if (this.opts.autoOpenFileEditor) {\n this.uppy.off('files-added', this._openFileEditorWhenFilesAdded)\n }\n }\n\n superFocusOnEachUpdate = () => {\n const isFocusInUppy = this.el.contains(document.activeElement)\n // When focus is lost on the page (== focus is on body for most browsers, or focus is null for IE11)\n const isFocusNowhere = document.activeElement === document.body || document.activeElement === null\n const isInformerHidden = this.uppy.getState().info.isHidden\n const isModal = !this.opts.inline\n\n if (\n // If update is connected to showing the Informer - let the screen reader calmly read it.\n isInformerHidden &&\n (\n // If we are in a modal - always superfocus without concern for other elements on the page (user is unlikely to want to interact with the rest of the page)\n isModal ||\n // If we are already inside of Uppy, or\n isFocusInUppy ||\n // If we are not focused on anything BUT we have already, at least once, focused on uppy\n // 1. We focus when isFocusNowhere, because when the element we were focused on disappears (e.g. an overlay), - focus gets lost. If user is typing something somewhere else on the page, - focus won't be 'nowhere'.\n // 2. We only focus when focus is nowhere AND this.ifFocusedOnUppyRecently, to avoid focus jumps if we do something else on the page.\n // [Practical check] Without '&& this.ifFocusedOnUppyRecently', in Safari, in inline mode, when file is uploading, - navigate via tab to the checkbox, try to press space multiple times. Focus will jump to Uppy.\n (isFocusNowhere && this.ifFocusedOnUppyRecently)\n )\n ) {\n this.superFocus(this.el, this.getPluginState().activeOverlayType)\n } else {\n this.superFocus.cancel()\n }\n }\n\n afterUpdate = () => {\n if (this.opts.disabled && !this.dashboardIsDisabled) {\n this.disableAllFocusableElements(true)\n return\n }\n\n if (!this.opts.disabled && this.dashboardIsDisabled) {\n this.disableAllFocusableElements(false)\n }\n\n this.superFocusOnEachUpdate()\n }\n\n cancelUpload = (fileID) => {\n this.uppy.removeFile(fileID)\n }\n\n saveFileCard = (meta, fileID) => {\n this.uppy.setFileMeta(fileID, meta)\n this.toggleFileCard(false, fileID)\n }\n\n _attachRenderFunctionToTarget = (target) => {\n const plugin = this.uppy.getPlugin(target.id)\n return {\n ...target,\n icon: plugin.icon || this.opts.defaultPickerIcon,\n render: plugin.render\n }\n }\n\n _isTargetSupported = (target) => {\n const plugin = this.uppy.getPlugin(target.id)\n // If the plugin does not provide a `supported` check, assume the plugin works everywhere.\n if (typeof plugin.isSupported !== 'function') {\n return true\n }\n return plugin.isSupported()\n }\n\n _getAcquirers = memoize((targets) => {\n return targets\n .filter(target => target.type === 'acquirer' && this._isTargetSupported(target))\n .map(this._attachRenderFunctionToTarget)\n })\n\n _getProgressIndicators = memoize((targets) => {\n return targets\n .filter(target => target.type === 'progressindicator')\n .map(this._attachRenderFunctionToTarget)\n })\n\n _getEditors = memoize((targets) => {\n return targets\n .filter(target => target.type === 'editor')\n .map(this._attachRenderFunctionToTarget)\n })\n\n render = (state) => {\n const pluginState = this.getPluginState()\n const { files, capabilities, allowNewUpload } = state\n\n // TODO: move this to Core, to share between Status Bar and Dashboard\n // (and any other plugin that might need it, too)\n const newFiles = Object.keys(files).filter((file) => {\n return !files[file].progress.uploadStarted\n })\n\n const uploadStartedFiles = Object.keys(files).filter((file) => {\n return files[file].progress.uploadStarted\n })\n\n const pausedFiles = Object.keys(files).filter((file) => {\n return files[file].isPaused\n })\n\n const completeFiles = Object.keys(files).filter((file) => {\n return files[file].progress.uploadComplete\n })\n\n const erroredFiles = Object.keys(files).filter((file) => {\n return files[file].error\n })\n\n const inProgressFiles = Object.keys(files).filter((file) => {\n return !files[file].progress.uploadComplete &&\n files[file].progress.uploadStarted\n })\n\n const inProgressNotPausedFiles = inProgressFiles.filter((file) => {\n return !files[file].isPaused\n })\n\n const processingFiles = Object.keys(files).filter((file) => {\n return files[file].progress.preprocess || files[file].progress.postprocess\n })\n\n const isUploadStarted = uploadStartedFiles.length > 0\n\n const isAllComplete = state.totalProgress === 100 &&\n completeFiles.length === Object.keys(files).length &&\n processingFiles.length === 0\n\n const isAllErrored = isUploadStarted &&\n erroredFiles.length === uploadStartedFiles.length\n\n const isAllPaused = inProgressFiles.length !== 0 &&\n pausedFiles.length === inProgressFiles.length\n\n const acquirers = this._getAcquirers(pluginState.targets)\n const progressindicators = this._getProgressIndicators(pluginState.targets)\n const editors = this._getEditors(pluginState.targets)\n\n let theme\n if (this.opts.theme === 'auto') {\n theme = capabilities.darkMode ? 'dark' : 'light'\n } else {\n theme = this.opts.theme\n }\n\n if (['files', 'folders', 'both'].indexOf(this.opts.fileManagerSelectionType) < 0) {\n this.opts.fileManagerSelectionType = 'files'\n console.error(`Unsupported option for \"fileManagerSelectionType\". Using default of \"${this.opts.fileManagerSelectionType}\".`)\n }\n\n return DashboardUI({\n state,\n isHidden: pluginState.isHidden,\n files,\n newFiles,\n uploadStartedFiles,\n completeFiles,\n erroredFiles,\n inProgressFiles,\n inProgressNotPausedFiles,\n processingFiles,\n isUploadStarted,\n isAllComplete,\n isAllErrored,\n isAllPaused,\n totalFileCount: Object.keys(files).length,\n totalProgress: state.totalProgress,\n allowNewUpload,\n acquirers,\n theme,\n disabled: this.opts.disabled,\n direction: this.opts.direction,\n activePickerPanel: pluginState.activePickerPanel,\n showFileEditor: pluginState.showFileEditor,\n disableAllFocusableElements: this.disableAllFocusableElements,\n animateOpenClose: this.opts.animateOpenClose,\n isClosing: pluginState.isClosing,\n getPlugin: this.uppy.getPlugin,\n progressindicators: progressindicators,\n editors: editors,\n autoProceed: this.uppy.opts.autoProceed,\n id: this.id,\n closeModal: this.requestCloseModal,\n handleClickOutside: this.handleClickOutside,\n handleInputChange: this.handleInputChange,\n handlePaste: this.handlePaste,\n inline: this.opts.inline,\n showPanel: this.showPanel,\n hideAllPanels: this.hideAllPanels,\n log: this.uppy.log,\n i18n: this.i18n,\n i18nArray: this.i18nArray,\n removeFile: this.uppy.removeFile,\n uppy: this.uppy,\n info: this.uppy.info,\n note: this.opts.note,\n metaFields: pluginState.metaFields,\n resumableUploads: capabilities.resumableUploads || false,\n individualCancellation: capabilities.individualCancellation,\n isMobileDevice: capabilities.isMobileDevice,\n pauseUpload: this.uppy.pauseResume,\n retryUpload: this.uppy.retryUpload,\n cancelUpload: this.cancelUpload,\n cancelAll: this.uppy.cancelAll,\n fileCardFor: pluginState.fileCardFor,\n toggleFileCard: this.toggleFileCard,\n toggleAddFilesPanel: this.toggleAddFilesPanel,\n showAddFilesPanel: pluginState.showAddFilesPanel,\n saveFileCard: this.saveFileCard,\n openFileEditor: this.openFileEditor,\n canEditFile: this.canEditFile,\n width: this.opts.width,\n height: this.opts.height,\n showLinkToFileUploadResult: this.opts.showLinkToFileUploadResult,\n fileManagerSelectionType: this.opts.fileManagerSelectionType,\n proudlyDisplayPoweredByUppy: this.opts.proudlyDisplayPoweredByUppy,\n hideCancelButton: this.opts.hideCancelButton,\n hideRetryButton: this.opts.hideRetryButton,\n hidePauseResumeButton: this.opts.hidePauseResumeButton,\n showRemoveButtonAfterComplete: this.opts.showRemoveButtonAfterComplete,\n containerWidth: pluginState.containerWidth,\n containerHeight: pluginState.containerHeight,\n areInsidesReadyToBeVisible: pluginState.areInsidesReadyToBeVisible,\n isTargetDOMEl: this.isTargetDOMEl,\n parentElement: this.el,\n allowedFileTypes: this.uppy.opts.restrictions.allowedFileTypes,\n maxNumberOfFiles: this.uppy.opts.restrictions.maxNumberOfFiles,\n showSelectedFiles: this.opts.showSelectedFiles,\n handleRequestThumbnail: this.handleRequestThumbnail,\n handleCancelThumbnail: this.handleCancelThumbnail,\n // drag props\n isDraggingOver: pluginState.isDraggingOver,\n handleDragOver: this.handleDragOver,\n handleDragLeave: this.handleDragLeave,\n handleDrop: this.handleDrop\n })\n }\n\n discoverProviderPlugins = () => {\n this.uppy.iteratePlugins((plugin) => {\n if (plugin && !plugin.target && plugin.opts && plugin.opts.target === this.constructor) {\n this.addTarget(plugin)\n }\n })\n }\n\n onMount () {\n // Set the text direction if the page has not defined one.\n const element = this.el\n const direction = getTextDirection(element)\n if (!direction) {\n element.dir = 'ltr'\n }\n }\n\n install = () => {\n // Set default state for Dashboard\n this.setPluginState({\n isHidden: true,\n fileCardFor: null,\n activeOverlayType: null,\n showAddFilesPanel: false,\n activePickerPanel: false,\n showFileEditor: false,\n metaFields: this.opts.metaFields,\n targets: [],\n // We'll make them visible once .containerWidth is determined\n areInsidesReadyToBeVisible: false,\n isDraggingOver: false\n })\n\n const { inline, closeAfterFinish } = this.opts\n if (inline && closeAfterFinish) {\n throw new Error('[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.')\n }\n\n const { allowMultipleUploads } = this.uppy.opts\n if (allowMultipleUploads && closeAfterFinish) {\n this.uppy.log('[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploads` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true', 'warning')\n }\n\n const { target } = this.opts\n if (target) {\n this.mount(target, this)\n }\n\n const plugins = this.opts.plugins || []\n plugins.forEach((pluginID) => {\n const plugin = this.uppy.getPlugin(pluginID)\n if (plugin) {\n plugin.mount(this, plugin)\n }\n })\n\n if (!this.opts.disableStatusBar) {\n this.uppy.use(StatusBar, {\n id: `${this.id}:StatusBar`,\n target: this,\n hideUploadButton: this.opts.hideUploadButton,\n hideRetryButton: this.opts.hideRetryButton,\n hidePauseResumeButton: this.opts.hidePauseResumeButton,\n hideCancelButton: this.opts.hideCancelButton,\n showProgressDetails: this.opts.showProgressDetails,\n hideAfterFinish: this.opts.hideProgressAfterFinish,\n locale: this.opts.locale,\n doneButtonHandler: this.opts.doneButtonHandler\n })\n }\n\n if (!this.opts.disableInformer) {\n this.uppy.use(Informer, {\n id: `${this.id}:Informer`,\n target: this\n })\n }\n\n if (!this.opts.disableThumbnailGenerator) {\n this.uppy.use(ThumbnailGenerator, {\n id: `${this.id}:ThumbnailGenerator`,\n thumbnailWidth: this.opts.thumbnailWidth,\n thumbnailType: this.opts.thumbnailType,\n waitForThumbnailsBeforeUpload: this.opts.waitForThumbnailsBeforeUpload,\n // If we don't block on thumbnails, we can lazily generate them\n lazy: !this.opts.waitForThumbnailsBeforeUpload\n })\n }\n\n // Dark Mode / theme\n this.darkModeMediaQuery = (typeof window !== 'undefined' && window.matchMedia)\n ? window.matchMedia('(prefers-color-scheme: dark)')\n : null\n\n const isDarkModeOnFromTheStart = this.darkModeMediaQuery ? this.darkModeMediaQuery.matches : false\n this.uppy.log(`[Dashboard] Dark mode is ${isDarkModeOnFromTheStart ? 'on' : 'off'}`)\n this.setDarkModeCapability(isDarkModeOnFromTheStart)\n\n if (this.opts.theme === 'auto') {\n this.darkModeMediaQuery.addListener(this.handleSystemDarkModeChange)\n }\n\n this.discoverProviderPlugins()\n this.initEvents()\n }\n\n uninstall = () => {\n if (!this.opts.disableInformer) {\n const informer = this.uppy.getPlugin(`${this.id}:Informer`)\n // Checking if this plugin exists, in case it was removed by uppy-core\n // before the Dashboard was.\n if (informer) this.uppy.removePlugin(informer)\n }\n\n if (!this.opts.disableStatusBar) {\n const statusBar = this.uppy.getPlugin(`${this.id}:StatusBar`)\n if (statusBar) this.uppy.removePlugin(statusBar)\n }\n\n if (!this.opts.disableThumbnailGenerator) {\n const thumbnail = this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`)\n if (thumbnail) this.uppy.removePlugin(thumbnail)\n }\n\n const plugins = this.opts.plugins || []\n plugins.forEach((pluginID) => {\n const plugin = this.uppy.getPlugin(pluginID)\n if (plugin) plugin.unmount()\n })\n\n if (this.opts.theme === 'auto') {\n this.darkModeMediaQuery.removeListener(this.handleSystemDarkModeChange)\n }\n\n this.unmount()\n this.removeEvents()\n }\n}\n"]}
\No newline at end of file