@oiz/stzh-components 2.12.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-5c0c2c46.js → app-globals-9e469998.js} +2 -2
- package/dist/cjs/{app-globals-5c0c2c46.js.map → app-globals-9e469998.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +12 -3
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js +2 -2
- package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +8 -0
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +2 -2
- package/dist/collection/assets/i18n/en.json +2 -2
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +1 -0
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +10 -2
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/collection/components/stzh-input/stzh-input.css +6 -0
- package/dist/collection/components/stzh-input/stzh-input.js +4 -4
- package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js +12 -0
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +4 -3
- package/dist/collection/libraries/tom-select/cjs/tom-select.js +4 -3
- package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +4 -3
- package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +4 -3
- package/dist/collection/libraries/tom-select/esm/tom-select.js +4 -3
- package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +4 -3
- package/dist/collection/libraries/tom-select/js/tom-select.base.js +4 -3
- package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +16 -16
- package/dist/collection/libraries/tom-select/js/tom-select.complete.js +4 -3
- package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +3 -3
- package/dist/collection/libraries/tom-select/js/tom-select.popular.js +4 -3
- package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +30 -30
- package/dist/components/index.js +1 -1
- package/dist/components/stzh-datalist-item2.js +1 -1
- package/dist/components/stzh-datalist-item2.js.map +1 -1
- package/dist/components/stzh-dropdown2.js +12 -3
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-input2.js +3 -3
- package/dist/components/stzh-input2.js.map +1 -1
- package/dist/components/stzh-upload.js +10 -0
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/esm/{app-globals-bfc779f0.js → app-globals-27a24a34.js} +2 -2
- package/dist/esm/{app-globals-bfc779f0.js.map → app-globals-27a24a34.js.map} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-datalist_2.entry.js +1 -1
- package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
- package/dist/esm/stzh-dropdown.entry.js +12 -3
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-input.entry.js +2 -2
- package/dist/esm/stzh-input.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +8 -0
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/esm-es5/{app-globals-bfc779f0.js → app-globals-27a24a34.js} +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-components.js.map +1 -1
- package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
- package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js +2 -2
- package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm-es5/stzh-input.entry.js +1 -1
- package/dist/esm-es5/stzh-input.entry.js.map +1 -1
- package/dist/esm-es5/stzh-upload.entry.js +1 -1
- package/dist/esm-es5/stzh-upload.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +2 -2
- package/dist/stzh-components/assets/i18n/en.json +2 -2
- package/dist/stzh-components/{p-aa9975e6.entry.js → p-24d82258.entry.js} +2 -2
- package/dist/stzh-components/p-24d82258.entry.js.map +1 -0
- package/dist/stzh-components/{p-11a57dcd.entry.js → p-2653562a.entry.js} +6 -6
- package/dist/stzh-components/p-2653562a.entry.js.map +1 -0
- package/dist/stzh-components/{p-4206f3e1.system.entry.js → p-376b64c8.system.entry.js} +5 -5
- package/dist/stzh-components/p-376b64c8.system.entry.js.map +1 -0
- package/dist/stzh-components/p-651140ac.system.js +2 -0
- package/dist/stzh-components/{p-eed26372.system.js.map → p-651140ac.system.js.map} +1 -1
- package/dist/stzh-components/{p-ea2fd8f8.js → p-77585f2e.js} +2 -2
- package/dist/stzh-components/p-990141f4.entry.js +2 -0
- package/dist/stzh-components/p-990141f4.entry.js.map +1 -0
- package/dist/stzh-components/p-c1f89d5c.system.entry.js +2 -0
- package/dist/stzh-components/p-c1f89d5c.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-4488789b.entry.js → p-c90cf7f4.entry.js} +2 -2
- package/dist/stzh-components/p-c90cf7f4.entry.js.map +1 -0
- package/dist/stzh-components/{p-9035fa3b.system.js → p-cb34f6b6.system.js} +2 -2
- package/dist/stzh-components/{p-b19c3193.system.entry.js → p-cf18eff2.system.entry.js} +2 -2
- package/dist/stzh-components/p-cf18eff2.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-2d88c544.system.entry.js → p-e6444356.system.entry.js} +2 -2
- package/dist/stzh-components/p-e6444356.system.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/stzh-components/stzh-components.js +1 -1
- package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +1 -1
- package/dist/types/components/stzh-input/stzh-input.d.ts +1 -1
- package/dist/types/components/stzh-upload/stzh-upload.d.ts +2 -0
- package/dist/types/components.d.ts +4 -4
- package/dist/types/libraries/tom-select/types/defaults.d.ts +1 -0
- package/dist/types/libraries/tom-select/types/types/settings.d.ts +1 -0
- package/dist/vscode-data.json +7537 -0
- package/package.json +1 -1
- package/dist/stzh-components/p-11a57dcd.entry.js.map +0 -1
- package/dist/stzh-components/p-2d88c544.system.entry.js.map +0 -1
- package/dist/stzh-components/p-4206f3e1.system.entry.js.map +0 -1
- package/dist/stzh-components/p-4488789b.entry.js.map +0 -1
- package/dist/stzh-components/p-4ad49ece.entry.js +0 -2
- package/dist/stzh-components/p-4ad49ece.entry.js.map +0 -1
- package/dist/stzh-components/p-a0b350c2.system.entry.js +0 -2
- package/dist/stzh-components/p-a0b350c2.system.entry.js.map +0 -1
- package/dist/stzh-components/p-aa9975e6.entry.js.map +0 -1
- package/dist/stzh-components/p-b19c3193.system.entry.js.map +0 -1
- package/dist/stzh-components/p-eed26372.system.js +0 -2
- /package/dist/esm-es5/{app-globals-bfc779f0.js.map → app-globals-27a24a34.js.map} +0 -0
- /package/dist/stzh-components/{p-ea2fd8f8.js.map → p-77585f2e.js.map} +0 -0
- /package/dist/stzh-components/{p-9035fa3b.system.js.map → p-cb34f6b6.system.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-upload.js","sourceRoot":"","sources":["../../../../src/components/stzh-upload/stzh-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,MAAM,EACN,KAAK,EACL,KAAK,EAEN,MAAM,eAAe,CAAC;AAyBvB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,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n\nimport {\n StzhUploadFilesItem,\n StzhUploadFile,\n StzhUploadFileAddedEvent,\n StzhUploadFilesAddedEvent,\n StzhUploadFileRemoveEvent,\n StzhUploadFileRemovedEvent,\n StzhUploadSendingEvent,\n StzhUploadSendingMultipleEvent,\n StzhUploadProcessingEvent,\n StzhUploadProcessingMultipleEvent,\n StzhUploadProgressEvent,\n StzhUploadProgressTotalEvent,\n StzhUploadErrorEvent,\n StzhUploadErrorMultipleEvent,\n StzhUploadSuccessEvent,\n StzhUploadSuccessMultipleEvent,\n StzhUploadCanceledEvent,\n StzhUploadCanceledMultipleEvent,\n StzhUploadCompleteEvent,\n StzhUploadCompleteMultipleEvent\n} from \"../../index\";\n\nimport { hasSlot, isStzhElement } from \"../../utils/utils\";\nimport { StzhUploadLocalizedText } from './stzh-upload.localization';\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nimport \"../../libraries/dropzone/dropzone\";\nwindow.Dropzone.autoDiscover = false;\n\nconst ATTR_NAME = \"data-dz-name\";\nconst ATTR_TYPE = \"data-dz-type\";\nconst ATTR_SIZE = \"data-dz-size\";\nconst ATTR_LINK = \"data-dz-link\";\nconst ATTR_EXTENSION = \"data-dz-extension\";\nconst ATTR_META_ID = \"data-dz-meta-id\";\nconst ATTR_ERROR_MESSAGE_ID = \"data-dz-error-message-id\";\nconst ATTR_PROGRESS_TEXT = \"data-dz-progress-text\";\nconst ATTR_REMOVE = \"data-dz-remove\";\n\nlet uploadCounter = 0;\nlet previewCounter = 0;\n\n// Most properties taken over from:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js\n\n// Possible events to listen to:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/dropzone.js#L17\n\n/**\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-upload\",\n styleUrl: \"stzh-upload.scss\"\n})\nexport class StzhUpload {\n /**\n * Initially pre existing files (e.g. already uploaded by the user).\n * Array of objects that must at least include `name` and `size` attribute:\n * `[{\"name\":\"file1.txt\", \"size\": 12345}, {\"name\":\"file2.txt\", \"size\": 12345}]`\n */\n @Prop() existingFiles: StzhUploadFilesItem[] | string = [];\n private _existingFiles: StzhUploadFilesItem[] = [];\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Description */\n @Prop() description: string = \"\";\n\n /** Button text */\n @Prop() button: string = \"\";\n\n /**\n * URL the files are processed to.\n *\n * You can also provide a function that will be called with `files` and\n * `dataBlocks` and must return the url as string.\n */\n @Prop() url: string | Function = \"\";\n\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method.\n */\n @Prop() method: \"post\" | \"put\" | Function = \"post\";\n\n /**\n * Will be set on the XHRequest.\n */\n @Prop() withCredentials: boolean = false;\n\n /**\n * Whether the upload is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the upload is marked as invalid.\n */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Whether download functionality should be disabled. */\n @Prop() downloadDisabled: boolean = false;\n\n /** Whether download functionality should only be shown to completed files. */\n @Prop() downloadDisabledWhileProcessing: boolean = false;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * This option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */\n @Prop() acceptedFiles: string | null = null;\n\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `element.processQueue()`.\n */\n @Prop() autoProcessQueue: boolean = true;\n\n /**\n * Hide progress (bars and text).\n */\n @Prop() hideProgress: boolean = false;\n\n /**\n * Hide progress (bars) only while idle (will show them as soon as upload starts).\n * Can be used together with `autoProcessQueue`, e.g. if files are uploaded at form submit to prevent showing empty progressbar.\n */\n @Prop() hideProgressWhileIdle: boolean = false;\n\n /**\n * If not `null` defines how many files this dropzone handles. If it exceeds,\n * the event `stzhMaxfilesexceeded` will be called.\n */\n @Prop() maxFiles: number | null = null;\n\n /**\n * The maximum filesize (in MiB) that is allowed to be uploaded.\n */\n @Prop() maxFilesize: number = 25;\n\n /**\n * How many file uploads to process in parallel.\n */\n @Prop() parallelUploads: number = 2;\n\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `stzhSuccessMultiple`). See the events\n * documentation section for more information.\n */\n @Prop() uploadMultiple: boolean = false;\n\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See `chunksUploaded` prop for the callback to finalise an upload.\n */\n @Prop() chunking: boolean = false;\n\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */\n @Prop() forceChunking: boolean = false;\n\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */\n @Prop() chunkSize: number = 2 * 1024 * 1024;\n\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */\n @Prop() parallelChunkUploads: boolean = false;\n\n /**\n * Whether a chunk should be retried if it fails.\n */\n @Prop() retryChunks: boolean = false;\n\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */\n @Prop() retryChunksLimit: number = 3;\n\n /**\n * The base that is used to calculate the **displayed** filesize. You can\n * change this to 1024 if you would rather display kibibytes, mebibytes,\n * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`\n * not `1 kilobyte`. You can change this to `1024` if you don't care about\n * validity.\n */\n @Prop() filesizeBase: number = 1024;\n\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n *\n * Can also be set as function returning the headers object dynamically.\n */\n @Prop() headers: object\n | ((Dropzone: any) => { [key: string]: string })\n | null\n = null;\n\n /**\n * Should the default headers be set or not?\n * Accept: application/json <- for requesting json response\n * Cache-Control: no-cache <- Request shouldnt be cached\n * X-Requested-With: XMLHttpRequest <- We sent the request via XMLHttpRequest\n */\n @Prop() defaultHeaders: boolean = true;\n\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */\n @Prop() accept: Function = function(_file, done) {\n return done();\n };\n\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */\n @Prop() chunksUploaded: Function = function(_file, done) {\n done();\n };\n\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n *\n * Can be a selector string, or an element directly. Will be rendered into element by default.\n */\n @Prop() hiddenInputContainer: string | HTMLElement;\n\n /** Translation strings. */\n @Prop() localization: StzhUploadLocalizedText;\n\n @Element() element: HTMLStzhUploadElement;\n\n @Watch(\"existingFiles\")\n existingFilesWatcher(newValue: StzhUploadFilesItem[] | string) {\n if (typeof newValue === \"string\") {\n this._existingFiles = JSON.parse(newValue);\n } else {\n this._existingFiles = newValue;\n }\n }\n\n @Watch(\"disabled\")\n disabledWatcher() {\n if (!this.dropzone) {\n return;\n }\n\n if (this.disabled) {\n this.dropzone.disable();\n } else {\n this.dropzone.enable();\n }\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n\n this.invalid = this._error.length > 0;\n }\n\n /** File added */\n @Event() stzhFileAdded: EventEmitter<StzhUploadFileAddedEvent>;\n\n /** Files added (multiple) */\n @Event() stzhFilesAdded: EventEmitter<StzhUploadFilesAddedEvent>;\n\n /** File remove (before, cancelable) */\n @Event() stzhFileRemove: EventEmitter<StzhUploadFileRemoveEvent>;\n\n /** File removed */\n @Event() stzhFileRemoved: EventEmitter<StzhUploadFileRemovedEvent>;\n\n /** Before sending file (add additional data before request if necessary) */\n @Event() stzhSending: EventEmitter<StzhUploadSendingEvent>;\n\n /** Before sending multiple files (add additional data before request if necessary) */\n @Event() stzhSendingMultiple: EventEmitter<StzhUploadSendingMultipleEvent>;\n\n /** Files starting to get processed */\n @Event() stzhProcessing: EventEmitter<StzhUploadProcessingEvent>;\n\n /** Files starting to get processed (multiple) */\n @Event() stzhProcessingMultiple: EventEmitter<StzhUploadProcessingMultipleEvent>;\n\n /** Upload file progress during upload */\n @Event() stzhProgress: EventEmitter<StzhUploadProgressEvent>;\n\n /** Upload total file progress during upload */\n @Event() stzhProgressTotal: EventEmitter<StzhUploadProgressTotalEvent>;\n\n /** File error */\n @Event() stzhError: EventEmitter<StzhUploadErrorEvent>;\n\n /** Files error (multiple files) */\n @Event() stzhErrorMultiple: EventEmitter<StzhUploadErrorMultipleEvent>;\n\n /** File successfully uploaded */\n @Event() stzhSuccess: EventEmitter<StzhUploadSuccessEvent>;\n\n /** Files successfully uploaded (multiple files) */\n @Event() stzhSuccessMultiple: EventEmitter<StzhUploadSuccessMultipleEvent>;\n\n /** Canceled file upload */\n @Event() stzhCanceled: EventEmitter<StzhUploadCanceledEvent>;\n\n /** Canceled file upload (multiple files) */\n @Event() stzhCanceledMultiple: EventEmitter<StzhUploadCanceledMultipleEvent>;\n\n /** Completed upload (successfully or with error) */\n @Event() stzhComplete: EventEmitter<StzhUploadCompleteEvent>;\n\n /** Completed upload (successfully or with error, multiple files) */\n @Event() stzhCompleteMultiple: EventEmitter<StzhUploadCompleteMultipleEvent>;\n\n @Method()\n async processQueue() {\n return this.dropzone.processQueue();\n }\n\n @Method()\n async removeFile(file, force = false) {\n return this.dropzone.removeFile(file, force);\n }\n\n @Method()\n async removeAllFiles(onlyCancelCurrentlyUploadingFiles = false, force = false) {\n return this.dropzone.removeAllFiles(onlyCancelCurrentlyUploadingFiles, force);\n }\n\n private dropzone: any;\n private dropzoneElement: HTMLElement;\n private buttonElement: HTMLStzhButtonElement;\n private clickareaElement: HTMLElement;\n private previewsElement: HTMLElement;\n private errorsElement: HTMLElement;\n private hiddenInputContainerElement: HTMLElement;\n private uploadId: string;\n\n private filesize = function(size) {\n let selectedSize = 0;\n let selectedUnit = \"b\";\n\n if (size > 0) {\n let units = [\"tb\", \"gb\", \"mb\", \"kb\", \"b\"];\n\n for (let i = 0; i < units.length; i++) {\n let unit = units[i];\n let cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n\n selectedSize = Math.round(selectedSize * 100) / 100; // Cutting of digits\n }\n\n return `<strong>${selectedSize}</strong> ${this.options.dictFileSizeUnits[selectedUnit]}`;\n }\n\n private filePreviewId = function(file): string {\n return `${this.uploadId}-${file._id}`\n }\n\n async componentWillLoad() {\n this.uploadId = `stzh-upload-${uploadCounter++}`;\n\n this.existingFilesWatcher(this.existingFiles);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'upload');\n }\n }\n\n componentDidRender() {\n if (this.dropzone) {\n return;\n }\n\n const self = this;\n\n function enableDownload(file) {\n let fileHref = file.url || '';\n\n if (file.upload) {\n fileHref = URL.createObjectURL(file);\n }\n\n if (fileHref) {\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_LINK}]`)) {\n node.setAttribute(\"href\", fileHref);\n node.setAttribute(\"download\", file.name);\n\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n }\n }\n\n this.dropzone = new window.Dropzone(this.dropzoneElement, {\n previewsContainer: this.previewsElement,\n url: this.url,\n method: this.method,\n withCredentials: this.withCredentials,\n clickable: [this.clickareaElement],\n acceptedFiles: this.acceptedFiles,\n accept: this.accept,\n maxFiles: this.maxFiles,\n maxFilesize: this.maxFilesize,\n filesizeBase: this.filesizeBase,\n parallelUploads: this.parallelUploads,\n uploadMultiple: this.uploadMultiple,\n autoProcessQueue: this.autoProcessQueue,\n headers: this.headers,\n defaultHeaders: this.defaultHeaders,\n chunking: this.chunking,\n chunkSize: this.chunkSize,\n chunksUploaded: this.chunksUploaded,\n forceChunking: this.forceChunking,\n parallelChunkUploads: this.parallelChunkUploads,\n retryChunks: this.retryChunks,\n retryChunksLimit: this.retryChunksLimit,\n createImageThumbnails: false,\n hiddenInputContainer: this.hiddenInputContainer ? this.hiddenInputContainer : this.hiddenInputContainerElement,\n dictFileSizeUnits: { tb: \"TiB\", gb: \"GiB\", mb: \"MiB\", kb: \"KiB\", b: \"b\" },\n dictRemoveFileConfirmation: null,\n dictMaxFilesExceeded: this.localization.maxFilesExceeded,\n dictRemoveFile: this.localization.removeFile,\n dictDeleteFile: this.localization.deleteFile,\n dictCancelUploadConfirmation: this.localization.cancelUploadConfirmation,\n dictUploadCanceled: this.localization.uploadCanceled,\n dictCancelUpload: this.localization.cancelUpload,\n dictResponseError: this.localization.responseError,\n dictInvalidFileType: this.localization.invalidFileType,\n dictFileTooBig: this.localization.fileTooBig,\n // Called when a file is added to the queue\n // Receives `file`\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L594\n addedfile(file) {\n file._id = previewCounter++;\n\n if (this.element === this.previewsContainer) {\n this.element.classList.add(\"dz-started\");\n }\n\n if (this.previewsContainer && !this.options.disablePreviews) {\n file.previewElement = window.Dropzone.createElement(\n this.options.previewTemplate.trim()\n );\n file.previewTemplate = file.previewElement; // Backwards compatibility\n this.previewsContainer.appendChild(file.previewElement);\n\n if (!file.size) {\n file.previewElement.classList.add(\"dz-empty\");\n }\n\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_NAME}]`)) {\n node.textContent = file.name;\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_SIZE}]`)) {\n node.innerHTML = self.filesize.call(this, file.size);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_META_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-meta`);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_ERROR_MESSAGE_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-error-message`);\n }\n\n if (this.options.addRemoveLinks) {\n file._removeLink = window.Dropzone.createElement(\n `<a class=\"dz-remove\" href=\"javascript:undefined;\" ${ATTR_REMOVE}>\n ${this.options.dictRemoveFile}\n </a>`\n );\n file.previewElement.appendChild(file._removeLink);\n }\n\n let removeFileEvent = (e) => {\n e.preventDefault();\n e.stopPropagation();\n if (file.status === window.Dropzone.UPLOADING) {\n return window.Dropzone.confirm(\n this.options.dictCancelUploadConfirmation,\n () => this.removeFile(file)\n );\n } else {\n if (this.options.dictRemoveFileConfirmation) {\n return window.Dropzone.confirm(\n this.options.dictRemoveFileConfirmation,\n () => this.removeFile(file)\n );\n } else {\n return this.removeFile(file);\n }\n }\n };\n\n for (let removeLink of file.previewElement.querySelectorAll(\n `[${ATTR_REMOVE}]`\n )) {\n removeLink.addEventListener(\"click\", removeFileEvent);\n\n const isStzh = isStzhElement(removeLink);\n const fileId = self.filePreviewId(file);\n\n removeLink.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${this.options.dictRemoveFile}`);\n removeLink.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${this.options.dictRemoveFile} ${file.name}`);\n removeLink.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n if (!self.downloadDisabled && !self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n }\n },\n // When the upload is finished, either with success or an error.\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L752\n complete(file) {\n for (let node of file.previewElement.querySelectorAll(`[${ATTR_REMOVE}]`)) {\n const hasErrorState = (file.status === \"error\");\n const removeOrDeleteLabel = hasErrorState ? this.options.dictRemoveFile : this.options.dictDeleteFile;\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${removeOrDeleteLabel} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n // move file uploads with errors to another element, so they are grouped together\n if (file.status === \"error\") {\n self.errorsElement.appendChild(file.previewElement);\n } else if (!self.downloadDisabled && self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n\n if (file._removeLink) {\n file._removeLink.innerHTML = this.options.dictRemoveFile;\n }\n\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-complete\");\n }\n },\n // Called whenever a file is removed.\n // Taken fom https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L649\n removedfile(file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) {\n file.previewElement.parentNode.removeChild(file.previewElement);\n }\n\n // set focus to upload\n self.buttonElement.setFocus();\n\n return this._updateMaxFilesReachedClass();\n },\n error(file, message, xhr) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n\n if (typeof message !== \"string\" && message.error) {\n message = message.error;\n } else if (xhr) {\n if (xhr.status === 401 || xhr.status === 403) {\n message = self.localization.accessError;\n } else if (xhr.status === 413) {\n message = self.localization.fileTooBigServer;\n } else if (xhr.status === 415) {\n message = self.localization.invalidFileType;\n } else if (xhr.status >= 500) {\n message = self.localization.serverError;\n } else {\n const defaultError = self.localization.responseError\n .replace(\"{{statusCode}}\", xhr.status);\n\n message = defaultError;\n }\n }\n\n for (let node of file.previewElement.querySelectorAll(\"[data-dz-errormessage]\")) {\n node.textContent = message;\n }\n }\n },\n previewTemplate: `\n <div class=\"stzh-upload__preview\">\n <div class=\"stzh-upload__image\">\n <img data-dz-thumbnail />\n </div>\n\n <div class=\"stzh-upload__details\">\n <div class=\"stzh-upload__info-wrapper\">\n <div class=\"stzh-upload__info-wrapper-processing\">\n <div class=\"stzh-upload__infos\">\n <div class=\"stzh-upload__subtitle\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__progress-text\">\n <span ${ATTR_PROGRESS_TEXT}></span>\n </div>\n </div>\n <div class=\"stzh-upload__meta\">\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__progress\">\n <span class=\"stzh-upload__progress-bar\" data-dz-uploadprogress></span>\n </div>\n </div>\n <div class=\"stzh-upload__info-wrapper-complete\">\n <div class=\"stzh-upload__title\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__meta\" ${ATTR_META_ID}>\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__error-message\" ${ATTR_ERROR_MESSAGE_ID}>\n <span data-dz-errormessage></span>\n </div>\n </div>\n </div>\n <div class=\"stzh-upload__actions\">\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only icon=\"download\" class=\"stzh-upload__download\" ${ATTR_LINK}></stzh-button>\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only class=\"stzh-upload__delete\" ${ATTR_REMOVE}>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon\" name=\"delete\"></stzh-icon>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon-error\" name=\"close\"></stzh-icon>\n </stzh-button>\n </div>\n </div>\n </div>\n `\n });\n\n this.disabledWatcher();\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => this.stzhFileAdded.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"addedfiles\", (files: StzhUploadFile[]) => this.stzhFilesAdded.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"removefile\", (file: StzhUploadFile) => this.stzhFileRemove.emit({\n component: \"stzh-upload\", file\n }).defaultPrevented === false);\n\n this.dropzone.on(\"removedfile\", (file: StzhUploadFile, force: boolean) => this.stzhFileRemoved.emit({\n component: \"stzh-upload\", file, force\n }));\n\n this.dropzone.on(\"sending\", (file: StzhUploadFile, xhr: XMLHttpRequest, formData: FormData) => this.stzhSending.emit({\n component: \"stzh-upload\", file, xhr, formData\n }));\n\n this.dropzone.on(\"sendingmultiple\", (files: StzhUploadFile[], xhr: XMLHttpRequest, formData: FormData) => this.stzhSendingMultiple.emit({\n component: \"stzh-upload\", files, xhr, formData\n }));\n\n this.dropzone.on(\"processing\", (file: StzhUploadFile) => this.stzhProcessing.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"processingmultiple\", (files: StzhUploadFile[]) => this.stzhProcessingMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number, bytesSent: number) => this.stzhProgress.emit({\n component: \"stzh-upload\", file, progress, bytesSent\n }));\n\n this.dropzone.on(\"totaluploadprogress\", (totalUploadProgress: number, totalBytes: number, totalBytesSent: number) => this.stzhProgressTotal.emit({\n component: \"stzh-upload\", totalUploadProgress, totalBytes, totalBytesSent\n }));\n\n this.dropzone.on(\"error\", (file: StzhUploadFile, message: string, xhr: XMLHttpRequest) => this.stzhError.emit({\n component: \"stzh-upload\", file, message, xhr\n }));\n\n this.dropzone.on(\"errormultiple\", (files: StzhUploadFile[], message: string, xhr: XMLHttpRequest) => this.stzhErrorMultiple.emit({\n component: \"stzh-upload\", files, message, xhr\n }));\n\n this.dropzone.on(\"success\", (file: StzhUploadFile, responseText: string, event: ProgressEvent) => this.stzhSuccess.emit({\n component: \"stzh-upload\", file, responseText, event\n }));\n\n this.dropzone.on(\"successmultiple\", (files: StzhUploadFile[], responseText: string, event: ProgressEvent) => this.stzhSuccessMultiple.emit({\n component: \"stzh-upload\", files, responseText, event\n }));\n\n this.dropzone.on(\"canceled\", (file: StzhUploadFile) => this.stzhCanceled.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"canceledmultiple\", (files: StzhUploadFile[]) => this.stzhCanceledMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"complete\", (file: StzhUploadFile) => this.stzhComplete.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"completemultiple\", (files: StzhUploadFile[]) => this.stzhCompleteMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => {\n file.previewElement.querySelectorAll(`[${ATTR_NAME}]`).forEach((name: HTMLElement) => {\n name.setAttribute(\"title\", file.name);\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_TYPE}]`).forEach((type: HTMLElement) => {\n type.innerText = file.type;\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_EXTENSION}]`).forEach((extension: HTMLElement) => {\n extension.innerText = file.name.split(\".\").pop();\n })\n });\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number) => {\n file.previewElement.querySelectorAll(`[${ATTR_PROGRESS_TEXT}]`).forEach((progressText: HTMLElement) => {\n progressText.innerText = `${progress.toString()}%`;\n });\n });\n\n this._existingFiles.forEach((file) => {\n this.dropzone.displayExistingFile(file, null, null, null, null);\n });\n }\n\n disconnectedCallback() {\n if (this.dropzone) {\n this.dropzone.destroy();\n this.dropzone = null;\n }\n }\n\n render() {\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-upload\": true,\n \"stzh-upload--is-invalid\": this.invalid,\n \"stzh-upload--is-disabled\": this.disabled,\n \"stzh-upload--has-hidden-progress\": this.hideProgress,\n \"stzh-upload--has-hidden-progress-while-idle\": this.hideProgressWhileIdle,\n \"stzh-upload--has-error\": errorUsed,\n \"stzh-upload--has-instructions\": !!this.description || !!this.localization.description\n };\n\n return (\n <Host>\n <div\n class={classes}\n ref={(el) => (this.dropzoneElement = el as HTMLDivElement)}\n >\n <div ref={(el) => (this.hiddenInputContainerElement = el as HTMLElement)}></div>\n\n <div id={`${this.uploadId}-label`}>\n {this.label && <div class=\"stzh-upload__label\">{this.label}</div>}\n </div>\n\n <div\n class=\"stzh-upload__clickarea\"\n ref={(el) => (this.clickareaElement = el as HTMLDivElement)}\n >\n <div class=\"stzh-upload__instructions\" id={`${this.uploadId}-instruction`}>\n {this.description ? this.description : this.localization.description}\n </div>\n <stzh-button\n size=\"small\"\n class=\"stzh-upload__button\"\n ref={(el) => (this.buttonElement = el as HTMLStzhButtonElement)}\n a11yDescribedby={`${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`}\n disabled={this.disabled}\n a11yControls={`${this.uploadId}-previews`}\n >\n {this.button ? this.button : this.localization.button}\n </stzh-button>\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-upload\"\n id={`${this.uploadId}-description`}\n error={this._error}\n />\n\n <div id={`${this.uploadId}-previews`}>\n <div\n class=\"stzh-upload__errors\"\n ref={(el) => (this.errorsElement = el as HTMLElement)}\n ></div>\n\n <div\n class=\"stzh-upload__previews dropzone-previews\"\n ref={(el) => (this.previewsElement = el as HTMLElement)}\n ></div>\n </div>\n\n </div>\n </Host>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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhUploadFilesItem,\n StzhUploadFile,\n StzhUploadFileAddedEvent,\n StzhUploadFilesAddedEvent,\n StzhUploadFileRemoveEvent,\n StzhUploadFileRemovedEvent,\n StzhUploadSendingEvent,\n StzhUploadSendingMultipleEvent,\n StzhUploadProcessingEvent,\n StzhUploadProcessingMultipleEvent,\n StzhUploadProgressEvent,\n StzhUploadProgressTotalEvent,\n StzhUploadErrorEvent,\n StzhUploadErrorMultipleEvent,\n StzhUploadSuccessEvent,\n StzhUploadSuccessMultipleEvent,\n StzhUploadCanceledEvent,\n StzhUploadCanceledMultipleEvent,\n StzhUploadCompleteEvent,\n StzhUploadCompleteMultipleEvent\n} from \"../../index\";\n\nimport { hasSlot, isStzhElement } from \"../../utils/utils\";\nimport { StzhUploadLocalizedText } from './stzh-upload.localization';\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nimport \"../../libraries/dropzone/dropzone\";\nwindow.Dropzone.autoDiscover = false;\n\nconst ATTR_NAME = \"data-dz-name\";\nconst ATTR_TYPE = \"data-dz-type\";\nconst ATTR_SIZE = \"data-dz-size\";\nconst ATTR_LINK = \"data-dz-link\";\nconst ATTR_EXTENSION = \"data-dz-extension\";\nconst ATTR_META_ID = \"data-dz-meta-id\";\nconst ATTR_ERROR_MESSAGE_ID = \"data-dz-error-message-id\";\nconst ATTR_PROGRESS_TEXT = \"data-dz-progress-text\";\nconst ATTR_REMOVE = \"data-dz-remove\";\n\nlet uploadCounter = 0;\nlet previewCounter = 0;\n\n// Most properties taken over from:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js\n\n// Possible events to listen to:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/dropzone.js#L17\n\n/**\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-upload\",\n styleUrl: \"stzh-upload.scss\"\n})\nexport class StzhUpload {\n /**\n * Initially pre existing files (e.g. already uploaded by the user).\n * Array of objects that must at least include `name` and `size` attribute:\n * `[{\"name\":\"file1.txt\", \"size\": 12345}, {\"name\":\"file2.txt\", \"size\": 12345}]`\n */\n @Prop() existingFiles: StzhUploadFilesItem[] | string = [];\n private _existingFiles: StzhUploadFilesItem[] = [];\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Description */\n @Prop() description: string = \"\";\n\n /** Button text */\n @Prop() button: string = \"\";\n\n /**\n * URL the files are processed to.\n *\n * You can also provide a function that will be called with `files` and\n * `dataBlocks` and must return the url as string.\n */\n @Prop() url: string | Function = \"\";\n\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method.\n */\n @Prop() method: \"post\" | \"put\" | Function = \"post\";\n\n /**\n * Will be set on the XHRequest.\n */\n @Prop() withCredentials: boolean = false;\n\n /**\n * Whether the upload is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the upload is marked as invalid.\n */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Whether download functionality should be disabled. */\n @Prop() downloadDisabled: boolean = false;\n\n /** Whether download functionality should only be shown to completed files. */\n @Prop() downloadDisabledWhileProcessing: boolean = false;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * This option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */\n @Prop() acceptedFiles: string | null = null;\n\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `element.processQueue()`.\n */\n @Prop() autoProcessQueue: boolean = true;\n\n /**\n * Hide progress (bars and text).\n */\n @Prop() hideProgress: boolean = false;\n\n /**\n * Hide progress (bars) only while idle (will show them as soon as upload starts).\n * Can be used together with `autoProcessQueue`, e.g. if files are uploaded at form submit to prevent showing empty progressbar.\n */\n @Prop() hideProgressWhileIdle: boolean = false;\n\n /**\n * If not `null` defines how many files this dropzone handles. If it exceeds,\n * the event `stzhMaxfilesexceeded` will be called.\n */\n @Prop() maxFiles: number | null = null;\n\n /**\n * The maximum filesize (in MiB) that is allowed to be uploaded.\n */\n @Prop() maxFilesize: number = 25;\n\n /**\n * How many file uploads to process in parallel.\n */\n @Prop() parallelUploads: number = 2;\n\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `stzhSuccessMultiple`). See the events\n * documentation section for more information.\n */\n @Prop() uploadMultiple: boolean = false;\n\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See `chunksUploaded` prop for the callback to finalise an upload.\n */\n @Prop() chunking: boolean = false;\n\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */\n @Prop() forceChunking: boolean = false;\n\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */\n @Prop() chunkSize: number = 2 * 1024 * 1024;\n\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */\n @Prop() parallelChunkUploads: boolean = false;\n\n /**\n * Whether a chunk should be retried if it fails.\n */\n @Prop() retryChunks: boolean = false;\n\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */\n @Prop() retryChunksLimit: number = 3;\n\n /**\n * The base that is used to calculate the **displayed** filesize. You can\n * change this to 1024 if you would rather display kibibytes, mebibytes,\n * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`\n * not `1 kilobyte`. You can change this to `1024` if you don't care about\n * validity.\n */\n @Prop() filesizeBase: number = 1024;\n\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n *\n * Can also be set as function returning the headers object dynamically.\n */\n @Prop() headers: object\n | ((Dropzone: any) => { [key: string]: string })\n | null\n = null;\n\n /**\n * Should the default headers be set or not?\n * Accept: application/json <- for requesting json response\n * Cache-Control: no-cache <- Request shouldnt be cached\n * X-Requested-With: XMLHttpRequest <- We sent the request via XMLHttpRequest\n */\n @Prop() defaultHeaders: boolean = true;\n\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */\n @Prop() accept: Function = function(_file, done) {\n return done();\n };\n\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */\n @Prop() chunksUploaded: Function = function(_file, done) {\n done();\n };\n\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n *\n * Can be a selector string, or an element directly. Will be rendered into element by default.\n */\n @Prop() hiddenInputContainer: string | HTMLElement;\n\n /** Translation strings. */\n @Prop() localization: StzhUploadLocalizedText;\n\n @Element() element: HTMLStzhUploadElement;\n\n @Watch(\"maxFiles\")\n maxFilesWatcher(newMaxFiles: number | null) {\n this.dropzone.options.maxFiles = newMaxFiles;\n }\n\n @Watch(\"maxFilesize\")\n maxFilesizeWatcher(newMaxFilesize: number) {\n this.dropzone.options.maxFilesize = newMaxFilesize;\n }\n\n @Watch(\"existingFiles\")\n existingFilesWatcher(newValue: StzhUploadFilesItem[] | string) {\n if (typeof newValue === \"string\") {\n this._existingFiles = JSON.parse(newValue);\n } else {\n this._existingFiles = newValue;\n }\n }\n\n @Watch(\"disabled\")\n disabledWatcher() {\n if (!this.dropzone) {\n return;\n }\n\n if (this.disabled) {\n this.dropzone.disable();\n } else {\n this.dropzone.enable();\n }\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n\n this.invalid = this._error.length > 0;\n }\n\n /** File added */\n @Event() stzhFileAdded: EventEmitter<StzhUploadFileAddedEvent>;\n\n /** Files added (multiple) */\n @Event() stzhFilesAdded: EventEmitter<StzhUploadFilesAddedEvent>;\n\n /** File remove (before, cancelable) */\n @Event() stzhFileRemove: EventEmitter<StzhUploadFileRemoveEvent>;\n\n /** File removed */\n @Event() stzhFileRemoved: EventEmitter<StzhUploadFileRemovedEvent>;\n\n /** Before sending file (add additional data before request if necessary) */\n @Event() stzhSending: EventEmitter<StzhUploadSendingEvent>;\n\n /** Before sending multiple files (add additional data before request if necessary) */\n @Event() stzhSendingMultiple: EventEmitter<StzhUploadSendingMultipleEvent>;\n\n /** Files starting to get processed */\n @Event() stzhProcessing: EventEmitter<StzhUploadProcessingEvent>;\n\n /** Files starting to get processed (multiple) */\n @Event() stzhProcessingMultiple: EventEmitter<StzhUploadProcessingMultipleEvent>;\n\n /** Upload file progress during upload */\n @Event() stzhProgress: EventEmitter<StzhUploadProgressEvent>;\n\n /** Upload total file progress during upload */\n @Event() stzhProgressTotal: EventEmitter<StzhUploadProgressTotalEvent>;\n\n /** File error */\n @Event() stzhError: EventEmitter<StzhUploadErrorEvent>;\n\n /** Files error (multiple files) */\n @Event() stzhErrorMultiple: EventEmitter<StzhUploadErrorMultipleEvent>;\n\n /** File successfully uploaded */\n @Event() stzhSuccess: EventEmitter<StzhUploadSuccessEvent>;\n\n /** Files successfully uploaded (multiple files) */\n @Event() stzhSuccessMultiple: EventEmitter<StzhUploadSuccessMultipleEvent>;\n\n /** Canceled file upload */\n @Event() stzhCanceled: EventEmitter<StzhUploadCanceledEvent>;\n\n /** Canceled file upload (multiple files) */\n @Event() stzhCanceledMultiple: EventEmitter<StzhUploadCanceledMultipleEvent>;\n\n /** Completed upload (successfully or with error) */\n @Event() stzhComplete: EventEmitter<StzhUploadCompleteEvent>;\n\n /** Completed upload (successfully or with error, multiple files) */\n @Event() stzhCompleteMultiple: EventEmitter<StzhUploadCompleteMultipleEvent>;\n\n @Method()\n async processQueue() {\n return this.dropzone.processQueue();\n }\n\n @Method()\n async removeFile(file, force = false) {\n return this.dropzone.removeFile(file, force);\n }\n\n @Method()\n async removeAllFiles(onlyCancelCurrentlyUploadingFiles = false, force = false) {\n return this.dropzone.removeAllFiles(onlyCancelCurrentlyUploadingFiles, force);\n }\n\n private dropzone: any;\n private dropzoneElement: HTMLElement;\n private buttonElement: HTMLStzhButtonElement;\n private clickareaElement: HTMLElement;\n private previewsElement: HTMLElement;\n private errorsElement: HTMLElement;\n private hiddenInputContainerElement: HTMLElement;\n private uploadId: string;\n\n private filesize = function(size) {\n let selectedSize = 0;\n let selectedUnit = \"b\";\n\n if (size > 0) {\n let units = [\"tb\", \"gb\", \"mb\", \"kb\", \"b\"];\n\n for (let i = 0; i < units.length; i++) {\n let unit = units[i];\n let cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n\n selectedSize = Math.round(selectedSize * 100) / 100; // Cutting of digits\n }\n\n return `<strong>${selectedSize}</strong> ${this.options.dictFileSizeUnits[selectedUnit]}`;\n }\n\n private filePreviewId = function(file): string {\n return `${this.uploadId}-${file._id}`\n }\n\n async componentWillLoad() {\n this.uploadId = `stzh-upload-${uploadCounter++}`;\n\n this.existingFilesWatcher(this.existingFiles);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'upload');\n }\n }\n\n componentDidRender() {\n if (this.dropzone) {\n return;\n }\n\n const self = this;\n\n function enableDownload(file) {\n let fileHref = file.url || '';\n\n if (file.upload) {\n fileHref = URL.createObjectURL(file);\n }\n\n if (fileHref) {\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_LINK}]`)) {\n node.setAttribute(\"href\", fileHref);\n node.setAttribute(\"download\", file.name);\n\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n }\n }\n\n this.dropzone = new window.Dropzone(this.dropzoneElement, {\n previewsContainer: this.previewsElement,\n url: this.url,\n method: this.method,\n withCredentials: this.withCredentials,\n clickable: [this.clickareaElement],\n acceptedFiles: this.acceptedFiles,\n accept: this.accept,\n maxFiles: this.maxFiles,\n maxFilesize: this.maxFilesize,\n filesizeBase: this.filesizeBase,\n parallelUploads: this.parallelUploads,\n uploadMultiple: this.uploadMultiple,\n autoProcessQueue: this.autoProcessQueue,\n headers: this.headers,\n defaultHeaders: this.defaultHeaders,\n chunking: this.chunking,\n chunkSize: this.chunkSize,\n chunksUploaded: this.chunksUploaded,\n forceChunking: this.forceChunking,\n parallelChunkUploads: this.parallelChunkUploads,\n retryChunks: this.retryChunks,\n retryChunksLimit: this.retryChunksLimit,\n createImageThumbnails: false,\n hiddenInputContainer: this.hiddenInputContainer ? this.hiddenInputContainer : this.hiddenInputContainerElement,\n dictFileSizeUnits: { tb: \"TiB\", gb: \"GiB\", mb: \"MiB\", kb: \"KiB\", b: \"b\" },\n dictRemoveFileConfirmation: null,\n dictMaxFilesExceeded: this.localization.maxFilesExceeded,\n dictRemoveFile: this.localization.removeFile,\n dictDeleteFile: this.localization.deleteFile,\n dictCancelUploadConfirmation: this.localization.cancelUploadConfirmation,\n dictUploadCanceled: this.localization.uploadCanceled,\n dictCancelUpload: this.localization.cancelUpload,\n dictResponseError: this.localization.responseError,\n dictInvalidFileType: this.localization.invalidFileType,\n dictFileTooBig: this.localization.fileTooBig,\n // Called when a file is added to the queue\n // Receives `file`\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L594\n addedfile(file) {\n file._id = previewCounter++;\n\n if (this.element === this.previewsContainer) {\n this.element.classList.add(\"dz-started\");\n }\n\n if (this.previewsContainer && !this.options.disablePreviews) {\n file.previewElement = window.Dropzone.createElement(\n this.options.previewTemplate.trim()\n );\n file.previewTemplate = file.previewElement; // Backwards compatibility\n this.previewsContainer.appendChild(file.previewElement);\n\n if (!file.size) {\n file.previewElement.classList.add(\"dz-empty\");\n }\n\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_NAME}]`)) {\n node.textContent = file.name;\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_SIZE}]`)) {\n node.innerHTML = self.filesize.call(this, file.size);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_META_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-meta`);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_ERROR_MESSAGE_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-error-message`);\n }\n\n if (this.options.addRemoveLinks) {\n file._removeLink = window.Dropzone.createElement(\n `<a class=\"dz-remove\" href=\"javascript:undefined;\" ${ATTR_REMOVE}>\n ${this.options.dictRemoveFile}\n </a>`\n );\n file.previewElement.appendChild(file._removeLink);\n }\n\n let removeFileEvent = (e) => {\n e.preventDefault();\n e.stopPropagation();\n if (file.status === window.Dropzone.UPLOADING) {\n return window.Dropzone.confirm(\n this.options.dictCancelUploadConfirmation,\n () => this.removeFile(file)\n );\n } else {\n if (this.options.dictRemoveFileConfirmation) {\n return window.Dropzone.confirm(\n this.options.dictRemoveFileConfirmation,\n () => this.removeFile(file)\n );\n } else {\n return this.removeFile(file);\n }\n }\n };\n\n for (let removeLink of file.previewElement.querySelectorAll(\n `[${ATTR_REMOVE}]`\n )) {\n removeLink.addEventListener(\"click\", removeFileEvent);\n\n const isStzh = isStzhElement(removeLink);\n const fileId = self.filePreviewId(file);\n\n removeLink.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${this.options.dictRemoveFile}`);\n removeLink.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${this.options.dictRemoveFile} ${file.name}`);\n removeLink.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n if (!self.downloadDisabled && !self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n }\n },\n // When the upload is finished, either with success or an error.\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L752\n complete(file) {\n for (let node of file.previewElement.querySelectorAll(`[${ATTR_REMOVE}]`)) {\n const hasErrorState = (file.status === \"error\");\n const removeOrDeleteLabel = hasErrorState ? this.options.dictRemoveFile : this.options.dictDeleteFile;\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${removeOrDeleteLabel} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n // move file uploads with errors to another element, so they are grouped together\n if (file.status === \"error\") {\n self.errorsElement.appendChild(file.previewElement);\n } else if (!self.downloadDisabled && self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n\n if (file._removeLink) {\n file._removeLink.innerHTML = this.options.dictRemoveFile;\n }\n\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-complete\");\n }\n },\n // Called whenever a file is removed.\n // Taken fom https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L649\n removedfile(file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) {\n file.previewElement.parentNode.removeChild(file.previewElement);\n }\n\n // set focus to upload\n self.buttonElement.setFocus();\n\n return this._updateMaxFilesReachedClass();\n },\n error(file, message, xhr) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n\n if (typeof message !== \"string\" && message.error) {\n message = message.error;\n } else if (xhr) {\n if (xhr.status === 401 || xhr.status === 403) {\n message = self.localization.accessError;\n } else if (xhr.status === 413) {\n message = self.localization.fileTooBigServer;\n } else if (xhr.status === 415) {\n message = self.localization.invalidFileType;\n } else if (xhr.status >= 500) {\n message = self.localization.serverError;\n } else {\n const defaultError = self.localization.responseError\n .replace(\"{{statusCode}}\", xhr.status);\n\n message = defaultError;\n }\n }\n\n for (let node of file.previewElement.querySelectorAll(\"[data-dz-errormessage]\")) {\n node.textContent = message;\n }\n }\n },\n previewTemplate: `\n <div class=\"stzh-upload__preview\">\n <div class=\"stzh-upload__image\">\n <img data-dz-thumbnail />\n </div>\n\n <div class=\"stzh-upload__details\">\n <div class=\"stzh-upload__info-wrapper\">\n <div class=\"stzh-upload__info-wrapper-processing\">\n <div class=\"stzh-upload__infos\">\n <div class=\"stzh-upload__subtitle\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__progress-text\">\n <span ${ATTR_PROGRESS_TEXT}></span>\n </div>\n </div>\n <div class=\"stzh-upload__meta\">\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__progress\">\n <span class=\"stzh-upload__progress-bar\" data-dz-uploadprogress></span>\n </div>\n </div>\n <div class=\"stzh-upload__info-wrapper-complete\">\n <div class=\"stzh-upload__title\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__meta\" ${ATTR_META_ID}>\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__error-message\" ${ATTR_ERROR_MESSAGE_ID}>\n <span data-dz-errormessage></span>\n </div>\n </div>\n </div>\n <div class=\"stzh-upload__actions\">\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only icon=\"download\" class=\"stzh-upload__download\" ${ATTR_LINK}></stzh-button>\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only class=\"stzh-upload__delete\" ${ATTR_REMOVE}>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon\" name=\"delete\"></stzh-icon>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon-error\" name=\"close\"></stzh-icon>\n </stzh-button>\n </div>\n </div>\n </div>\n `\n });\n\n this.disabledWatcher();\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => this.stzhFileAdded.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"addedfiles\", (files: StzhUploadFile[]) => this.stzhFilesAdded.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"removefile\", (file: StzhUploadFile) => this.stzhFileRemove.emit({\n component: \"stzh-upload\", file\n }).defaultPrevented === false);\n\n this.dropzone.on(\"removedfile\", (file: StzhUploadFile, force: boolean) => this.stzhFileRemoved.emit({\n component: \"stzh-upload\", file, force\n }));\n\n this.dropzone.on(\"sending\", (file: StzhUploadFile, xhr: XMLHttpRequest, formData: FormData) => this.stzhSending.emit({\n component: \"stzh-upload\", file, xhr, formData\n }));\n\n this.dropzone.on(\"sendingmultiple\", (files: StzhUploadFile[], xhr: XMLHttpRequest, formData: FormData) => this.stzhSendingMultiple.emit({\n component: \"stzh-upload\", files, xhr, formData\n }));\n\n this.dropzone.on(\"processing\", (file: StzhUploadFile) => this.stzhProcessing.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"processingmultiple\", (files: StzhUploadFile[]) => this.stzhProcessingMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number, bytesSent: number) => this.stzhProgress.emit({\n component: \"stzh-upload\", file, progress, bytesSent\n }));\n\n this.dropzone.on(\"totaluploadprogress\", (totalUploadProgress: number, totalBytes: number, totalBytesSent: number) => this.stzhProgressTotal.emit({\n component: \"stzh-upload\", totalUploadProgress, totalBytes, totalBytesSent\n }));\n\n this.dropzone.on(\"error\", (file: StzhUploadFile, message: string, xhr: XMLHttpRequest) => this.stzhError.emit({\n component: \"stzh-upload\", file, message, xhr\n }));\n\n this.dropzone.on(\"errormultiple\", (files: StzhUploadFile[], message: string, xhr: XMLHttpRequest) => this.stzhErrorMultiple.emit({\n component: \"stzh-upload\", files, message, xhr\n }));\n\n this.dropzone.on(\"success\", (file: StzhUploadFile, responseText: string, event: ProgressEvent) => this.stzhSuccess.emit({\n component: \"stzh-upload\", file, responseText, event\n }));\n\n this.dropzone.on(\"successmultiple\", (files: StzhUploadFile[], responseText: string, event: ProgressEvent) => this.stzhSuccessMultiple.emit({\n component: \"stzh-upload\", files, responseText, event\n }));\n\n this.dropzone.on(\"canceled\", (file: StzhUploadFile) => this.stzhCanceled.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"canceledmultiple\", (files: StzhUploadFile[]) => this.stzhCanceledMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"complete\", (file: StzhUploadFile) => this.stzhComplete.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"completemultiple\", (files: StzhUploadFile[]) => this.stzhCompleteMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => {\n file.previewElement.querySelectorAll(`[${ATTR_NAME}]`).forEach((name: HTMLElement) => {\n name.setAttribute(\"title\", file.name);\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_TYPE}]`).forEach((type: HTMLElement) => {\n type.innerText = file.type;\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_EXTENSION}]`).forEach((extension: HTMLElement) => {\n extension.innerText = file.name.split(\".\").pop();\n })\n });\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number) => {\n file.previewElement.querySelectorAll(`[${ATTR_PROGRESS_TEXT}]`).forEach((progressText: HTMLElement) => {\n progressText.innerText = `${progress.toString()}%`;\n });\n });\n\n this._existingFiles.forEach((file) => {\n this.dropzone.displayExistingFile(file, null, null, null, null);\n });\n }\n\n disconnectedCallback() {\n if (this.dropzone) {\n this.dropzone.destroy();\n this.dropzone = null;\n }\n }\n\n render() {\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-upload\": true,\n \"stzh-upload--is-invalid\": this.invalid,\n \"stzh-upload--is-disabled\": this.disabled,\n \"stzh-upload--has-hidden-progress\": this.hideProgress,\n \"stzh-upload--has-hidden-progress-while-idle\": this.hideProgressWhileIdle,\n \"stzh-upload--has-error\": errorUsed,\n \"stzh-upload--has-instructions\": !!this.description || !!this.localization.description\n };\n\n return (\n <Host>\n <div\n class={classes}\n ref={(el) => (this.dropzoneElement = el as HTMLDivElement)}\n >\n <div ref={(el) => (this.hiddenInputContainerElement = el as HTMLElement)}></div>\n\n <div id={`${this.uploadId}-label`}>\n {this.label && <div class=\"stzh-upload__label\">{this.label}</div>}\n </div>\n\n <div\n class=\"stzh-upload__clickarea\"\n ref={(el) => (this.clickareaElement = el as HTMLDivElement)}\n >\n <div class=\"stzh-upload__instructions\" id={`${this.uploadId}-instruction`}>\n {this.description ? this.description : this.localization.description}\n </div>\n <stzh-button\n size=\"small\"\n class=\"stzh-upload__button\"\n ref={(el) => (this.buttonElement = el as HTMLStzhButtonElement)}\n a11yDescribedby={`${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`}\n disabled={this.disabled}\n a11yControls={`${this.uploadId}-previews`}\n >\n {this.button ? this.button : this.localization.button}\n </stzh-button>\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-upload\"\n id={`${this.uploadId}-description`}\n error={this._error}\n />\n\n <div id={`${this.uploadId}-previews`}>\n <div\n class=\"stzh-upload__errors\"\n ref={(el) => (this.errorsElement = el as HTMLElement)}\n ></div>\n\n <div\n class=\"stzh-upload__previews dropzone-previews\"\n ref={(el) => (this.previewsElement = el as HTMLElement)}\n ></div>\n </div>\n\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1606,6 +1606,7 @@ var defaults = {
|
|
|
1606
1606
|
searchField: ['text'],
|
|
1607
1607
|
searchConjunction: 'and',
|
|
1608
1608
|
mode: null,
|
|
1609
|
+
openDisplay: 'block',
|
|
1609
1610
|
wrapperClass: 'ts-wrapper',
|
|
1610
1611
|
controlClass: 'ts-control',
|
|
1611
1612
|
dropdownClass: 'ts-dropdown',
|
|
@@ -3187,7 +3188,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3187
3188
|
const groups = {};
|
|
3188
3189
|
const groups_order = [];
|
|
3189
3190
|
var self = this;
|
|
3190
|
-
var query =
|
|
3191
|
+
var query = this.settings.transformLoadQuery(this.control_input.value);
|
|
3191
3192
|
const same_query = query === self.lastQuery || query == '' && self.lastQuery == null;
|
|
3192
3193
|
var results = self.search(query);
|
|
3193
3194
|
var active_option = null;
|
|
@@ -3959,12 +3960,12 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3959
3960
|
self.refreshState();
|
|
3960
3961
|
applyCSS(self.dropdown, {
|
|
3961
3962
|
visibility: 'hidden',
|
|
3962
|
-
display:
|
|
3963
|
+
display: self.settings.openDisplay
|
|
3963
3964
|
});
|
|
3964
3965
|
self.positionDropdown();
|
|
3965
3966
|
applyCSS(self.dropdown, {
|
|
3966
3967
|
visibility: 'visible',
|
|
3967
|
-
display:
|
|
3968
|
+
display: self.settings.openDisplay
|
|
3968
3969
|
});
|
|
3969
3970
|
self.focus();
|
|
3970
3971
|
self.trigger('dropdown_open', self.dropdown);
|
|
@@ -1606,6 +1606,7 @@ var defaults = {
|
|
|
1606
1606
|
searchField: ['text'],
|
|
1607
1607
|
searchConjunction: 'and',
|
|
1608
1608
|
mode: null,
|
|
1609
|
+
openDisplay: 'block',
|
|
1609
1610
|
wrapperClass: 'ts-wrapper',
|
|
1610
1611
|
controlClass: 'ts-control',
|
|
1611
1612
|
dropdownClass: 'ts-dropdown',
|
|
@@ -3187,7 +3188,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3187
3188
|
const groups = {};
|
|
3188
3189
|
const groups_order = [];
|
|
3189
3190
|
var self = this;
|
|
3190
|
-
var query =
|
|
3191
|
+
var query = this.settings.transformLoadQuery(this.control_input.value);
|
|
3191
3192
|
const same_query = query === self.lastQuery || query == '' && self.lastQuery == null;
|
|
3192
3193
|
var results = self.search(query);
|
|
3193
3194
|
var active_option = null;
|
|
@@ -3959,12 +3960,12 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3959
3960
|
self.refreshState();
|
|
3960
3961
|
applyCSS(self.dropdown, {
|
|
3961
3962
|
visibility: 'hidden',
|
|
3962
|
-
display:
|
|
3963
|
+
display: self.settings.openDisplay
|
|
3963
3964
|
});
|
|
3964
3965
|
self.positionDropdown();
|
|
3965
3966
|
applyCSS(self.dropdown, {
|
|
3966
3967
|
visibility: 'visible',
|
|
3967
|
-
display:
|
|
3968
|
+
display: self.settings.openDisplay
|
|
3968
3969
|
});
|
|
3969
3970
|
self.focus();
|
|
3970
3971
|
self.trigger('dropdown_open', self.dropdown);
|
|
@@ -1606,6 +1606,7 @@ var defaults = {
|
|
|
1606
1606
|
searchField: ['text'],
|
|
1607
1607
|
searchConjunction: 'and',
|
|
1608
1608
|
mode: null,
|
|
1609
|
+
openDisplay: 'block',
|
|
1609
1610
|
wrapperClass: 'ts-wrapper',
|
|
1610
1611
|
controlClass: 'ts-control',
|
|
1611
1612
|
dropdownClass: 'ts-dropdown',
|
|
@@ -3187,7 +3188,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3187
3188
|
const groups = {};
|
|
3188
3189
|
const groups_order = [];
|
|
3189
3190
|
var self = this;
|
|
3190
|
-
var query =
|
|
3191
|
+
var query = this.settings.transformLoadQuery(this.control_input.value);
|
|
3191
3192
|
const same_query = query === self.lastQuery || query == '' && self.lastQuery == null;
|
|
3192
3193
|
var results = self.search(query);
|
|
3193
3194
|
var active_option = null;
|
|
@@ -3959,12 +3960,12 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3959
3960
|
self.refreshState();
|
|
3960
3961
|
applyCSS(self.dropdown, {
|
|
3961
3962
|
visibility: 'hidden',
|
|
3962
|
-
display:
|
|
3963
|
+
display: self.settings.openDisplay
|
|
3963
3964
|
});
|
|
3964
3965
|
self.positionDropdown();
|
|
3965
3966
|
applyCSS(self.dropdown, {
|
|
3966
3967
|
visibility: 'visible',
|
|
3967
|
-
display:
|
|
3968
|
+
display: self.settings.openDisplay
|
|
3968
3969
|
});
|
|
3969
3970
|
self.focus();
|
|
3970
3971
|
self.trigger('dropdown_open', self.dropdown);
|
|
@@ -1604,6 +1604,7 @@ var defaults = {
|
|
|
1604
1604
|
searchField: ['text'],
|
|
1605
1605
|
searchConjunction: 'and',
|
|
1606
1606
|
mode: null,
|
|
1607
|
+
openDisplay: 'block',
|
|
1607
1608
|
wrapperClass: 'ts-wrapper',
|
|
1608
1609
|
controlClass: 'ts-control',
|
|
1609
1610
|
dropdownClass: 'ts-dropdown',
|
|
@@ -3185,7 +3186,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3185
3186
|
const groups = {};
|
|
3186
3187
|
const groups_order = [];
|
|
3187
3188
|
var self = this;
|
|
3188
|
-
var query =
|
|
3189
|
+
var query = this.settings.transformLoadQuery(this.control_input.value);
|
|
3189
3190
|
const same_query = query === self.lastQuery || query == '' && self.lastQuery == null;
|
|
3190
3191
|
var results = self.search(query);
|
|
3191
3192
|
var active_option = null;
|
|
@@ -3957,12 +3958,12 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3957
3958
|
self.refreshState();
|
|
3958
3959
|
applyCSS(self.dropdown, {
|
|
3959
3960
|
visibility: 'hidden',
|
|
3960
|
-
display:
|
|
3961
|
+
display: self.settings.openDisplay
|
|
3961
3962
|
});
|
|
3962
3963
|
self.positionDropdown();
|
|
3963
3964
|
applyCSS(self.dropdown, {
|
|
3964
3965
|
visibility: 'visible',
|
|
3965
|
-
display:
|
|
3966
|
+
display: self.settings.openDisplay
|
|
3966
3967
|
});
|
|
3967
3968
|
self.focus();
|
|
3968
3969
|
self.trigger('dropdown_open', self.dropdown);
|
|
@@ -1604,6 +1604,7 @@ var defaults = {
|
|
|
1604
1604
|
searchField: ['text'],
|
|
1605
1605
|
searchConjunction: 'and',
|
|
1606
1606
|
mode: null,
|
|
1607
|
+
openDisplay: 'block',
|
|
1607
1608
|
wrapperClass: 'ts-wrapper',
|
|
1608
1609
|
controlClass: 'ts-control',
|
|
1609
1610
|
dropdownClass: 'ts-dropdown',
|
|
@@ -3185,7 +3186,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3185
3186
|
const groups = {};
|
|
3186
3187
|
const groups_order = [];
|
|
3187
3188
|
var self = this;
|
|
3188
|
-
var query =
|
|
3189
|
+
var query = this.settings.transformLoadQuery(this.control_input.value);
|
|
3189
3190
|
const same_query = query === self.lastQuery || query == '' && self.lastQuery == null;
|
|
3190
3191
|
var results = self.search(query);
|
|
3191
3192
|
var active_option = null;
|
|
@@ -3957,12 +3958,12 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3957
3958
|
self.refreshState();
|
|
3958
3959
|
applyCSS(self.dropdown, {
|
|
3959
3960
|
visibility: 'hidden',
|
|
3960
|
-
display:
|
|
3961
|
+
display: self.settings.openDisplay
|
|
3961
3962
|
});
|
|
3962
3963
|
self.positionDropdown();
|
|
3963
3964
|
applyCSS(self.dropdown, {
|
|
3964
3965
|
visibility: 'visible',
|
|
3965
|
-
display:
|
|
3966
|
+
display: self.settings.openDisplay
|
|
3966
3967
|
});
|
|
3967
3968
|
self.focus();
|
|
3968
3969
|
self.trigger('dropdown_open', self.dropdown);
|
|
@@ -1604,6 +1604,7 @@ var defaults = {
|
|
|
1604
1604
|
searchField: ['text'],
|
|
1605
1605
|
searchConjunction: 'and',
|
|
1606
1606
|
mode: null,
|
|
1607
|
+
openDisplay: 'block',
|
|
1607
1608
|
wrapperClass: 'ts-wrapper',
|
|
1608
1609
|
controlClass: 'ts-control',
|
|
1609
1610
|
dropdownClass: 'ts-dropdown',
|
|
@@ -3185,7 +3186,7 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3185
3186
|
const groups = {};
|
|
3186
3187
|
const groups_order = [];
|
|
3187
3188
|
var self = this;
|
|
3188
|
-
var query =
|
|
3189
|
+
var query = this.settings.transformLoadQuery(this.control_input.value);
|
|
3189
3190
|
const same_query = query === self.lastQuery || query == '' && self.lastQuery == null;
|
|
3190
3191
|
var results = self.search(query);
|
|
3191
3192
|
var active_option = null;
|
|
@@ -3957,12 +3958,12 @@ class TomSelect extends MicroPlugin(MicroEvent) {
|
|
|
3957
3958
|
self.refreshState();
|
|
3958
3959
|
applyCSS(self.dropdown, {
|
|
3959
3960
|
visibility: 'hidden',
|
|
3960
|
-
display:
|
|
3961
|
+
display: self.settings.openDisplay
|
|
3961
3962
|
});
|
|
3962
3963
|
self.positionDropdown();
|
|
3963
3964
|
applyCSS(self.dropdown, {
|
|
3964
3965
|
visibility: 'visible',
|
|
3965
|
-
display:
|
|
3966
|
+
display: self.settings.openDisplay
|
|
3966
3967
|
});
|
|
3967
3968
|
self.focus();
|
|
3968
3969
|
self.trigger('dropdown_open', self.dropdown);
|
|
@@ -1610,6 +1610,7 @@
|
|
|
1610
1610
|
searchField: ['text'],
|
|
1611
1611
|
searchConjunction: 'and',
|
|
1612
1612
|
mode: null,
|
|
1613
|
+
openDisplay: 'block',
|
|
1613
1614
|
wrapperClass: 'ts-wrapper',
|
|
1614
1615
|
controlClass: 'ts-control',
|
|
1615
1616
|
dropdownClass: 'ts-dropdown',
|
|
@@ -3191,7 +3192,7 @@
|
|
|
3191
3192
|
const groups = {};
|
|
3192
3193
|
const groups_order = [];
|
|
3193
3194
|
var self = this;
|
|
3194
|
-
var query =
|
|
3195
|
+
var query = this.settings.transformLoadQuery(this.control_input.value);
|
|
3195
3196
|
const same_query = query === self.lastQuery || query == '' && self.lastQuery == null;
|
|
3196
3197
|
var results = self.search(query);
|
|
3197
3198
|
var active_option = null;
|
|
@@ -3963,12 +3964,12 @@
|
|
|
3963
3964
|
self.refreshState();
|
|
3964
3965
|
applyCSS(self.dropdown, {
|
|
3965
3966
|
visibility: 'hidden',
|
|
3966
|
-
display:
|
|
3967
|
+
display: self.settings.openDisplay
|
|
3967
3968
|
});
|
|
3968
3969
|
self.positionDropdown();
|
|
3969
3970
|
applyCSS(self.dropdown, {
|
|
3970
3971
|
visibility: 'visible',
|
|
3971
|
-
display:
|
|
3972
|
+
display: self.settings.openDisplay
|
|
3972
3973
|
});
|
|
3973
3974
|
self.focus();
|
|
3974
3975
|
self.trigger('dropdown_open', self.dropdown);
|
|
@@ -104,13 +104,13 @@ const o=e.score||n._getScoreFunction(s)
|
|
|
104
104
|
t.length?E(n.items,((t,n)=>{i=o(t),(!1===e.filter||i>0)&&s.items.push({score:i,id:n})})):E(n.items,((t,e)=>{s.items.push({score:1,id:e})}))
|
|
105
105
|
const r=n._getSortFunction(s)
|
|
106
106
|
return r&&s.items.sort(r),s.total=s.items.length,"number"==typeof e.limit&&(s.items=s.items.slice(0,e.limit)),s}}const $=(t,e)=>{if(Array.isArray(t))t.forEach(e)
|
|
107
|
-
else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},
|
|
107
|
+
else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},j=t=>{if(t.jquery)return t[0]
|
|
108
108
|
if(t instanceof HTMLElement)return t
|
|
109
|
-
if(
|
|
110
|
-
return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},
|
|
109
|
+
if(V(t)){var e=document.createElement("template")
|
|
110
|
+
return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},V=t=>"string"==typeof t&&t.indexOf("<")>-1,q=(t,e)=>{var i=document.createEvent("HTMLEvents")
|
|
111
111
|
i.initEvent(e,!0,!1),t.dispatchEvent(i)},D=(t,e)=>{Object.assign(t.style,e)},H=(t,...e)=>{var i=R(e);(t=M(t)).map((t=>{i.map((e=>{t.classList.add(e)}))}))},N=(t,...e)=>{var i=R(e);(t=M(t)).map((t=>{i.map((e=>{t.classList.remove(e)}))}))},R=t=>{var e=[]
|
|
112
112
|
return $(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},M=t=>(Array.isArray(t)||(t=[t]),t),z=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t
|
|
113
|
-
t=t.parentNode}},
|
|
113
|
+
t=t.parentNode}},Q=(t,e=0)=>e>0?t[t.length-1]:t[0],B=(t,e)=>{if(!t)return-1
|
|
114
114
|
e=e||t.nodeName
|
|
115
115
|
for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++
|
|
116
116
|
return i},K=(t,e)=>{$(e,((e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)}))},G=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},J=(t,e)=>{if(null===e)return
|
|
@@ -123,7 +123,7 @@ n.splitText(i[0].length)
|
|
|
123
123
|
var o=n.cloneNode(!0)
|
|
124
124
|
return s.appendChild(o),G(n,s),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{i(t)}))})(t),0)
|
|
125
125
|
i(t)},U="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey"
|
|
126
|
-
var W={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,transformLoadQuery:function(t){return t.trim()},shouldLoad:function(t){return t.length>0},render:{}}
|
|
126
|
+
var W={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,openDisplay:"block",wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,transformLoadQuery:function(t){return t.trim()},shouldLoad:function(t){return t.length>0},render:{}}
|
|
127
127
|
const X=t=>null==t?null:Y(t),Y=t=>"boolean"==typeof t?t?"1":"0":t+"",Z=t=>(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),tt=(t,e)=>{var i
|
|
128
128
|
return function(s,n){var o=this
|
|
129
129
|
i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[s]=!0,t.call(o,s,n)}),e)}},et=(t,e,i)=>{var s,n=t.trigger,o={}
|
|
@@ -156,17 +156,17 @@ s.requested[e]=!0,s.loaded[e]=n.fn.apply(i,[i.plugins.settings[e]||{}]),s.names.
|
|
|
156
156
|
if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")')
|
|
157
157
|
e.loadPlugin(t)}return i.loaded[t]}}}(e)){constructor(t,e){var i
|
|
158
158
|
super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],ct++
|
|
159
|
-
var s=
|
|
159
|
+
var s=j(t)
|
|
160
160
|
if(s.tomselect)throw new Error("Tom Select already initialized on this element")
|
|
161
161
|
s.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(s,null)).getPropertyValue("direction")
|
|
162
162
|
const n=at(s,e)
|
|
163
163
|
this.settings=n,this.input=s,this.tabIndex=s.tabIndex||0,this.is_select_tag="select"===s.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=ot(s,"tomselect-"+ct),this.isRequired=s.required,this.sifter=new T(this.options,{diacritics:n.diacritics}),n.mode=n.mode||(1===n.maxItems?"single":"multi"),"boolean"!=typeof n.hideSelected&&(n.hideSelected="multi"===n.mode),"boolean"!=typeof n.hidePlaceholder&&(n.hidePlaceholder="multi"!==n.mode)
|
|
164
164
|
var o=n.createFilter
|
|
165
165
|
"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?n.createFilter=t=>o.test(t):n.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(n.plugins),this.setupCallbacks(),this.setupTemplates()
|
|
166
|
-
const r=
|
|
166
|
+
const r=j("<div>"),l=j("<div>"),a=this._render("dropdown"),c=j('<div role="listbox" tabindex="-1">'),d=this.input.getAttribute("class")||"",u=n.mode
|
|
167
167
|
var p
|
|
168
|
-
if(H(r,n.wrapperClass,d,u),H(l,n.controlClass),lt(r,l),H(a,n.dropdownClass,u),n.copyClassesToDropdown&&H(a,d),H(c,n.dropdownContentClass),lt(a,c),
|
|
169
|
-
E(["autocorrect","autocapitalize","autocomplete"],(t=>{s.getAttribute(t)&&K(p,{[t]:s.getAttribute(t)})})),p.tabIndex=-1,l.appendChild(p),this.focus_node=p}else n.controlInput?(p=
|
|
168
|
+
if(H(r,n.wrapperClass,d,u),H(l,n.controlClass),lt(r,l),H(a,n.dropdownClass,u),n.copyClassesToDropdown&&H(a,d),H(c,n.dropdownContentClass),lt(a,c),j(n.dropdownParent||r).appendChild(a),V(n.controlInput)){p=j(n.controlInput)
|
|
169
|
+
E(["autocorrect","autocapitalize","autocomplete"],(t=>{s.getAttribute(t)&&K(p,{[t]:s.getAttribute(t)})})),p.tabIndex=-1,l.appendChild(p),this.focus_node=p}else n.controlInput?(p=j(n.controlInput),this.focus_node=p):(p=j("<input/>"),this.focus_node=l)
|
|
170
170
|
this.wrapper=r,this.dropdown=a,this.dropdown_content=c,this.control=l,this.control_input=p,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,s=t.dropdown,n=t.dropdown_content,o=t.wrapper,l=t.control,a=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown"
|
|
171
171
|
K(n,{id:u}),K(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u})
|
|
172
172
|
const p=ot(c,t.inputId+"-ts-control"),h="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",g=document.querySelector(h),f=t.focus.bind(t),v=a.getAttribute("aria-labelledby")
|
|
@@ -239,7 +239,7 @@ if(s.settings.score&&"function"!=typeof(i=s.settings.score.call(s,t)))throw new
|
|
|
239
239
|
return t!==s.lastQuery?(s.lastQuery=t,e=s.sifter.search(t,Object.assign(n,{score:i})),s.currentResults=e):e=Object.assign({},s.currentResults),s.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=X(t.id)
|
|
240
240
|
return!(e&&-1!==s.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,i,s,n,o,r,l,a,c,d
|
|
241
241
|
const u={},p=[]
|
|
242
|
-
var h=this,g=
|
|
242
|
+
var h=this,g=this.settings.transformLoadQuery(this.control_input.value)
|
|
243
243
|
const f=g===h.lastQuery||""==g&&null==h.lastQuery
|
|
244
244
|
var v,m=h.search(g),y=null,O=h.settings.shouldOpen||!1,b=h.dropdown_content
|
|
245
245
|
for(f&&(y=h.activeOption)&&(c=y.closest("[data-group]")),n=m.items.length,"number"==typeof h.settings.maxOptions&&(n=Math.min(n,h.settings.maxOptions)),n>0&&(O=!0),e=0;e<n;e++){let t=m.items[e]
|
|
@@ -300,7 +300,7 @@ e&&n.setActiveOption(e)}n.isPending||n.settings.closeAfterSelect||n.refreshOptio
|
|
|
300
300
|
if(!(t=i.getItem(t)))return
|
|
301
301
|
var s,n
|
|
302
302
|
const o=t.dataset.value
|
|
303
|
-
s=
|
|
303
|
+
s=B(t),t.remove(),t.classList.contains("active")&&(n=i.activeItems.indexOf(t),i.activeItems.splice(n,1),N(t,"active")),i.items.splice(s,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),s<i.caretPos&&i.setCaret(i.caretPos-1),i.updateOriginalInput({silent:e}),i.refreshState(),i.positionDropdown(),i.trigger("item_remove",o,t)}createItem(t=null,e=(()=>{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{})
|
|
304
304
|
var i,s=this,n=s.caretPos
|
|
305
305
|
if(t=t||s.inputValue(),!s.canCreate(t))return e(),!1
|
|
306
306
|
s.lock()
|
|
@@ -320,9 +320,9 @@ t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFu
|
|
|
320
320
|
var i,s
|
|
321
321
|
const n=e.input.querySelector('option[value=""]')
|
|
322
322
|
if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length
|
|
323
|
-
function l(t,i,s){return t||(t=
|
|
323
|
+
function l(t,i,s){return t||(t=j('<option value="'+Z(i)+'">'+Z(s)+"</option>")),t!=n&&e.input.append(t),o.push(t),(t!=n||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?l(n,"",""):e.items.forEach((t=>{if(i=e.options[t],s=i[e.settings.labelField]||"",o.includes(i.$option)){l(e.input.querySelector(`option[value="${rt(t)}"]:not(:checked)`),t,s)}else i.$option=l(i.$option,t,s)}))}else e.input.value=e.getValue()
|
|
324
324
|
e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this
|
|
325
|
-
t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,K(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),D(t.dropdown,{visibility:"hidden",display:
|
|
325
|
+
t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,K(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),D(t.dropdown,{visibility:"hidden",display:t.settings.openDisplay}),t.positionDropdown(),D(t.dropdown,{visibility:"visible",display:t.settings.openDisplay}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen
|
|
326
326
|
t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.hideInput()),e.isOpen=!1,K(e.focus_node,{"aria-expanded":"false"}),D(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,s=e.left+window.scrollX
|
|
327
327
|
D(this.dropdown,{width:e.width+"px",top:i+"px",left:s+"px"})}}clear(t){var e=this
|
|
328
328
|
if(e.items.length){var i=e.controlChildren()
|
|
@@ -330,7 +330,7 @@ E(i,(t=>{e.removeItem(t,!0)})),e.showInput(),t||e.updateOriginalInput(),e.trigge
|
|
|
330
330
|
s.insertBefore(t,s.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,s,n,o,r=this
|
|
331
331
|
e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)}
|
|
332
332
|
const l=[]
|
|
333
|
-
if(r.activeItems.length)n=
|
|
333
|
+
if(r.activeItems.length)n=Q(r.activeItems,e),s=B(n),e>0&&s++,E(r.activeItems,(t=>l.push(t)))
|
|
334
334
|
else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren()
|
|
335
335
|
let s
|
|
336
336
|
e<0&&0===i.start&&0===i.length?s=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(s=t[r.caretPos]),void 0!==s&&l.push(s)}if(!r.shouldDelete(l,t))return!1
|
|
@@ -340,14 +340,14 @@ return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings
|
|
|
340
340
|
n.rtl&&(t*=-1),n.inputValue().length||(nt(U,e)||nt("shiftKey",e)?(s=(i=n.getLastActive(t))?i.classList.contains("active")?n.getAdjacent(i,t,"item"):i:t>0?n.control_input.nextElementSibling:n.control_input.previousElementSibling)&&(s.classList.contains("active")&&n.removeActiveItem(i),n.setActiveItemClass(s)):n.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active")
|
|
341
341
|
if(e)return e
|
|
342
342
|
var i=this.control.querySelectorAll(".active")
|
|
343
|
-
return i?
|
|
343
|
+
return i?Q(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this
|
|
344
344
|
t.input.disabled=!0,t.control_input.disabled=!0,t.focus_node.tabIndex=-1,t.isDisabled=!0,this.close(),t.lock()}enable(){var t=this
|
|
345
345
|
t.input.disabled=!1,t.control_input.disabled=!1,t.focus_node.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings
|
|
346
346
|
t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,N(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,s
|
|
347
347
|
const n=this
|
|
348
348
|
if("function"!=typeof this.settings.render[t])return null
|
|
349
349
|
if(!(s=n.settings.render[t].call(this,e,Z)))return null
|
|
350
|
-
if(s=
|
|
350
|
+
if(s=j(s),"option"===t||"option_create"===t?e[n.settings.disabledField]?K(s,{"aria-disabled":"true"}):K(s,{"data-selectable":""}):"optgroup"===t&&(i=e.group[n.settings.optgroupValueField],K(s,{"data-group":i}),e.group[n.settings.disabledField]&&K(s,{"data-disabled":""})),"option"===t||"item"===t){const i=Y(e[n.settings.valueField])
|
|
351
351
|
K(s,{"data-value":i}),"item"===t?(H(s,n.settings.itemClass),K(s,{"data-ts-item":""})):(H(s,n.settings.optionClass),K(s,{role:"option",id:e.$id}),e.$div=s,n.options[i]=e)}return s}_render(t,e){const i=this.render(t,e)
|
|
352
352
|
if(null==i)throw"HTMLElement expected"
|
|
353
353
|
return i}clearCache(){E(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t)
|