@oiz/stzh-components 2.6.0-beta → 2.6.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-b9f31c77.js → app-globals-4dcdf160.js} +2 -2
- package/dist/cjs/{app-globals-b9f31c77.js.map → app-globals-4dcdf160.js.map} +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-actions.cjs.entry.js +1 -5
- package/dist/cjs/stzh-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-actionset.cjs.entry.js +2 -2
- package/dist/cjs/stzh-actionset.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-amount.cjs.entry.js +43 -13
- package/dist/cjs/stzh-amount.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +2 -2
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-ghettobox_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-invert.cjs.entry.js +1 -1
- package/dist/cjs/stzh-invert.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +19 -7
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/collection/components/stzh-actions/stzh-actions.js +1 -5
- package/dist/collection/components/stzh-actions/stzh-actions.js.map +1 -1
- package/dist/collection/components/stzh-actionset/stzh-actionset.js +2 -2
- package/dist/collection/components/stzh-actionset/stzh-actionset.js.map +1 -1
- package/dist/collection/components/stzh-amount/stzh-amount.css +1 -0
- package/dist/collection/components/stzh-amount/stzh-amount.js +75 -23
- package/dist/collection/components/stzh-amount/stzh-amount.js.map +1 -1
- package/dist/collection/components/stzh-amount/stzh-amount.stories.js +15 -1
- package/dist/collection/components/stzh-button/stzh-button.css +2 -2
- package/dist/collection/components/stzh-button/stzh-button.js +1 -1
- package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.js +1 -1
- package/dist/collection/components/stzh-checkbox/stzh-checkbox.js.map +1 -1
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +1 -1
- package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js.map +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +1 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +4 -4
- package/dist/collection/components/stzh-input/stzh-input.js +1 -1
- package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
- package/dist/collection/components/stzh-invert/stzh-invert.css +2 -2
- package/dist/collection/components/stzh-radio/stzh-radio.js +1 -1
- package/dist/collection/components/stzh-radio/stzh-radio.js.map +1 -1
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +1 -1
- package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js.map +1 -1
- package/dist/collection/components/stzh-toggle/stzh-toggle.js +1 -1
- package/dist/collection/components/stzh-toggle/stzh-toggle.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js +53 -3
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/libraries/dropzone/dropzone-amd-module.js +11 -5
- package/dist/collection/libraries/dropzone/dropzone.js +11 -5
- package/dist/collection/libraries/dropzone/min/dropzone-amd-module.min.js +1 -1
- package/dist/collection/libraries/dropzone/min/dropzone.min.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-actions.js +1 -5
- package/dist/components/stzh-actions.js.map +1 -1
- package/dist/components/stzh-actionset2.js +2 -2
- package/dist/components/stzh-actionset2.js.map +1 -1
- package/dist/components/stzh-amount.js +52 -22
- package/dist/components/stzh-amount.js.map +1 -1
- package/dist/components/stzh-button2.js +2 -2
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-checkbox.js.map +1 -1
- package/dist/components/stzh-checkboxgroup.js.map +1 -1
- package/dist/components/stzh-datepicker2.js.map +1 -1
- package/dist/components/stzh-dropdown2.js +1 -1
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-ghettobox2.js +1 -1
- package/dist/components/stzh-ghettobox2.js.map +1 -1
- package/dist/components/stzh-input2.js.map +1 -1
- package/dist/components/stzh-invert.js +1 -1
- package/dist/components/stzh-invert.js.map +1 -1
- package/dist/components/stzh-radio2.js.map +1 -1
- package/dist/components/stzh-radiogroup2.js.map +1 -1
- package/dist/components/stzh-toggle.js.map +1 -1
- package/dist/components/stzh-upload.js +22 -8
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/esm/{app-globals-0c7feedc.js → app-globals-91875913.js} +2 -2
- package/dist/esm/{app-globals-0c7feedc.js.map → app-globals-91875913.js.map} +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-actions.entry.js +1 -5
- package/dist/esm/stzh-actions.entry.js.map +1 -1
- package/dist/esm/stzh-actionset.entry.js +2 -2
- package/dist/esm/stzh-actionset.entry.js.map +1 -1
- package/dist/esm/stzh-amount.entry.js +44 -14
- package/dist/esm/stzh-amount.entry.js.map +1 -1
- package/dist/esm/stzh-badge_3.entry.js +2 -2
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-checkbox.entry.js.map +1 -1
- package/dist/esm/stzh-checkboxgroup.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-dropdown.entry.js +1 -1
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-ghettobox_2.entry.js +1 -1
- package/dist/esm/stzh-ghettobox_2.entry.js.map +1 -1
- package/dist/esm/stzh-input.entry.js.map +1 -1
- package/dist/esm/stzh-invert.entry.js +1 -1
- package/dist/esm/stzh-invert.entry.js.map +1 -1
- package/dist/esm/stzh-toggle.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +19 -7
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/esm-es5/{app-globals-0c7feedc.js → app-globals-91875913.js} +2 -2
- package/dist/esm-es5/{app-globals-0c7feedc.js.map → app-globals-91875913.js.map} +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/stzh-actions.entry.js +1 -1
- package/dist/esm-es5/stzh-actions.entry.js.map +1 -1
- package/dist/esm-es5/stzh-actionset.entry.js +1 -1
- package/dist/esm-es5/stzh-actionset.entry.js.map +1 -1
- package/dist/esm-es5/stzh-amount.entry.js +1 -1
- package/dist/esm-es5/stzh-amount.entry.js.map +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm-es5/stzh-checkbox.entry.js.map +1 -1
- package/dist/esm-es5/stzh-checkboxgroup.entry.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-datepicker_3.entry.js.map +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
- package/dist/esm-es5/stzh-ghettobox_2.entry.js.map +1 -1
- package/dist/esm-es5/stzh-input.entry.js.map +1 -1
- package/dist/esm-es5/stzh-invert.entry.js +1 -1
- package/dist/esm-es5/stzh-invert.entry.js.map +1 -1
- package/dist/esm-es5/stzh-toggle.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/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-8228cd4c.system.entry.js → p-09191103.system.entry.js} +2 -2
- package/dist/stzh-components/{p-8228cd4c.system.entry.js.map → p-09191103.system.entry.js.map} +1 -1
- package/dist/stzh-components/p-0f328a2d.system.entry.js +2 -0
- package/dist/stzh-components/{p-12964da2.system.entry.js.map → p-0f328a2d.system.entry.js.map} +1 -1
- package/dist/stzh-components/{p-c4503250.entry.js → p-1cc48f98.entry.js} +2 -2
- package/dist/stzh-components/{p-c4503250.entry.js.map → p-1cc48f98.entry.js.map} +1 -1
- package/dist/stzh-components/p-2615433f.system.entry.js +2 -0
- package/dist/stzh-components/p-2615433f.system.entry.js.map +1 -0
- package/dist/stzh-components/p-2907f1b5.entry.js +2 -0
- package/dist/stzh-components/{p-72da8eba.entry.js.map → p-2907f1b5.entry.js.map} +1 -1
- package/dist/stzh-components/{p-728cc738.entry.js → p-2d25bcc8.entry.js} +2 -2
- package/dist/stzh-components/p-2d25bcc8.entry.js.map +1 -0
- package/dist/stzh-components/p-2f3add2f.system.entry.js +2 -0
- package/dist/stzh-components/{p-0fa1dc9b.system.entry.js.map → p-2f3add2f.system.entry.js.map} +1 -1
- package/dist/stzh-components/{p-a226d634.js → p-362af013.js} +2 -2
- package/dist/stzh-components/{p-a226d634.js.map → p-362af013.js.map} +1 -1
- package/dist/stzh-components/p-39a4904e.system.entry.js.map +1 -1
- package/dist/stzh-components/p-3aa5623c.entry.js.map +1 -1
- package/dist/stzh-components/p-3cb43903.entry.js.map +1 -1
- package/dist/stzh-components/p-3e10addb.system.js +2 -0
- package/dist/stzh-components/{p-8ebb6058.system.js.map → p-3e10addb.system.js.map} +1 -1
- package/dist/stzh-components/p-49a0420a.entry.js +2 -0
- package/dist/stzh-components/{p-8bbb27f2.entry.js.map → p-49a0420a.entry.js.map} +1 -1
- package/dist/stzh-components/p-5d8ad1f4.system.entry.js.map +1 -1
- package/dist/stzh-components/{p-37cfb2b2.system.js → p-61b66e55.system.js} +2 -2
- package/dist/stzh-components/{p-37cfb2b2.system.js.map → p-61b66e55.system.js.map} +1 -1
- package/dist/stzh-components/{p-6ee544b4.entry.js → p-62188444.entry.js} +2 -2
- package/dist/stzh-components/{p-6ee544b4.entry.js.map → p-62188444.entry.js.map} +1 -1
- package/dist/stzh-components/p-67b11b03.system.entry.js +2 -0
- package/dist/stzh-components/p-67b11b03.system.entry.js.map +1 -0
- package/dist/stzh-components/{p-09a8bcde.system.entry.js → p-6bb83b30.system.entry.js} +4 -4
- package/dist/stzh-components/{p-09a8bcde.system.entry.js.map → p-6bb83b30.system.entry.js.map} +1 -1
- package/dist/stzh-components/{p-e683abe3.system.entry.js → p-6d097e82.system.entry.js} +2 -2
- package/dist/stzh-components/p-6d097e82.system.entry.js.map +1 -0
- package/dist/stzh-components/p-82e886d4.entry.js.map +1 -1
- package/dist/stzh-components/{p-d69b11ec.system.entry.js → p-94a5e295.system.entry.js} +2 -2
- package/dist/stzh-components/p-94a5e295.system.entry.js.map +1 -0
- package/dist/stzh-components/p-9b7d4e8d.entry.js.map +1 -1
- package/dist/stzh-components/p-9d46101e.entry.js +2 -0
- package/dist/stzh-components/p-9d46101e.entry.js.map +1 -0
- package/dist/stzh-components/p-b05c240b.system.entry.js.map +1 -1
- package/dist/stzh-components/p-b8ad5f47.system.entry.js.map +1 -1
- package/dist/stzh-components/{p-5e09547b.entry.js → p-bcd5b20e.entry.js} +2 -2
- package/dist/stzh-components/p-bcd5b20e.entry.js.map +1 -0
- package/dist/stzh-components/p-c94f7331.entry.js +2 -0
- package/dist/stzh-components/p-c94f7331.entry.js.map +1 -0
- package/dist/stzh-components/p-cc35e963.entry.js.map +1 -1
- package/dist/stzh-components/p-eaa65f52.system.js.map +1 -1
- package/dist/stzh-components/p-f2d74491.system.entry.js.map +1 -1
- 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.d.ts +28 -18
- package/dist/types/index.d.ts +5 -0
- package/dist/vscode-data.json +19 -7
- package/package.json +1 -1
- package/dist/stzh-components/p-0fa1dc9b.system.entry.js +0 -2
- package/dist/stzh-components/p-12964da2.system.entry.js +0 -2
- package/dist/stzh-components/p-2ee0d173.system.entry.js +0 -2
- package/dist/stzh-components/p-2ee0d173.system.entry.js.map +0 -1
- package/dist/stzh-components/p-30e04d53.entry.js +0 -2
- package/dist/stzh-components/p-30e04d53.entry.js.map +0 -1
- package/dist/stzh-components/p-427461c5.system.entry.js +0 -2
- package/dist/stzh-components/p-427461c5.system.entry.js.map +0 -1
- package/dist/stzh-components/p-5e09547b.entry.js.map +0 -1
- package/dist/stzh-components/p-66c1942a.entry.js +0 -2
- package/dist/stzh-components/p-66c1942a.entry.js.map +0 -1
- package/dist/stzh-components/p-728cc738.entry.js.map +0 -1
- package/dist/stzh-components/p-72da8eba.entry.js +0 -2
- package/dist/stzh-components/p-8bbb27f2.entry.js +0 -2
- package/dist/stzh-components/p-8ebb6058.system.js +0 -2
- package/dist/stzh-components/p-d69b11ec.system.entry.js.map +0 -1
- package/dist/stzh-components/p-e683abe3.system.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-upload.js","sourceRoot":"","sources":["../../../src/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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 { fetchTranslations } from \"../../utils/translation-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_PROGRESS_TEXT = \"data-dz-progress-text\";\n\nlet uploadCounter = 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 /** 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 * 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 @Prop() headers: object | null = 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 private dropzone: any;\n private dropzoneElement: HTMLElement;\n private buttonElement: HTMLStzhButtonElement;\n private clickareaElement: 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 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 fetchTranslations(this.element, 'upload');\n }\n }\n\n componentDidRender() {\n if (this.dropzone) {\n return;\n }\n\n const self = this;\n\n this.dropzone = new window.Dropzone(this.dropzoneElement, {\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 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 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\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 if (this.options.addRemoveLinks) {\n file._removeLink = window.Dropzone.createElement(\n `<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-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 \"[data-dz-remove]\"\n )) {\n removeLink.addEventListener(\"click\", removeFileEvent);\n\n const isStzh = isStzhElement(removeLink);\n removeLink.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${this.options.dictRemoveFile} ${file.name}`);\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(\"[data-dz-remove]\")) {\n node.setAttribute(\"title\", this.options.dictRemoveFile);\n node.setAttribute(\"aria-label\", this.options.dictRemoveFile);\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 {\n if (!self.downloadDisabled) {\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 node.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${self.localization.download} ${file.name}`);\n }\n }\n }\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-processing\">\n <div class=\"stzh-upload__infos\">\n <div class=\"stzh-upload__subtitle\">\n <span ${ATTR_NAME}></span>\n </div>\n <div class=\"stzh-upload__progress-text\">\n <span ${ATTR_PROGRESS_TEXT}></span>\n </div>\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\">\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\">\n <span data-dz-errormessage></span>\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} aria-label=\"${this.localization.download}\" title=\"${this.localization.download}\"></stzh-button>\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only class=\"stzh-upload__delete\" data-dz-remove aria-label=\"${this.localization.cancelUpload}\" title=\"${this.localization.cancelUpload}\">\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) => this.stzhFileRemoved.emit({\n component: \"stzh-upload\", file\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-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 >\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\n class=\"stzh-upload__errors\"\n ref={(el) => (this.errorsElement = el as HTMLElement)}\n ></div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
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,mBAAmB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,mCAAmC,CAAC;AAC3C,MAAM,CAAC,QAAQ,CAAC,YAAY,GAAG,KAAK,CAAC;AAErC,MAAM,SAAS,GAAG,cAAc,CAAC;AACjC,MAAM,SAAS,GAAG,cAAc,CAAC;AACjC,MAAM,SAAS,GAAG,cAAc,CAAC;AACjC,MAAM,SAAS,GAAG,cAAc,CAAC;AACjC,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AAEnD,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB,mCAAmC;AACnC,kEAAkE;AAElE,gCAAgC;AAChC,uEAAuE;AAEvE;;GAEG;AAKH,MAAM,OAAO,UAAU;;IAOb,mBAAc,GAA0B,EAAE,CAAC;IAqT3C,aAAQ,GAAG,UAAS,IAAI;MAC9B,IAAI,YAAY,GAAG,CAAC,CAAC;MACrB,IAAI,YAAY,GAAG,GAAG,CAAC;MAEvB,IAAI,IAAI,GAAG,CAAC,EA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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 { fetchTranslations } from \"../../utils/translation-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_PROGRESS_TEXT = \"data-dz-progress-text\";\n\nlet uploadCounter = 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 /** 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 * 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 @Prop() headers: object | null = 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 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 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 fetchTranslations(this.element, 'upload');\n }\n }\n\n componentDidRender() {\n if (this.dropzone) {\n return;\n }\n\n const self = this;\n\n this.dropzone = new window.Dropzone(this.dropzoneElement, {\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 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 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\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 if (this.options.addRemoveLinks) {\n file._removeLink = window.Dropzone.createElement(\n `<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-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 \"[data-dz-remove]\"\n )) {\n removeLink.addEventListener(\"click\", removeFileEvent);\n\n const isStzh = isStzhElement(removeLink);\n removeLink.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${this.options.dictRemoveFile} ${file.name}`);\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(\"[data-dz-remove]\")) {\n node.setAttribute(\"title\", this.options.dictRemoveFile);\n node.setAttribute(\"aria-label\", this.options.dictRemoveFile);\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 {\n if (!self.downloadDisabled) {\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 node.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${self.localization.download} ${file.name}`);\n }\n }\n }\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-processing\">\n <div class=\"stzh-upload__infos\">\n <div class=\"stzh-upload__subtitle\">\n <span ${ATTR_NAME}></span>\n </div>\n <div class=\"stzh-upload__progress-text\">\n <span ${ATTR_PROGRESS_TEXT}></span>\n </div>\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\">\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\">\n <span data-dz-errormessage></span>\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} aria-label=\"${this.localization.download}\" title=\"${this.localization.download}\"></stzh-button>\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only class=\"stzh-upload__delete\" data-dz-remove aria-label=\"${this.localization.cancelUpload}\" title=\"${this.localization.cancelUpload}\">\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-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 >\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\n class=\"stzh-upload__errors\"\n ref={(el) => (this.errorsElement = el as HTMLElement)}\n ></div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM;AACN,sBAAsB;AACtB,MAAM;AAu+BN,MAAM,KAAW,GAAG,CAoMnB;AApMD,WAAiB,GAAG;EACL,oBAAgB,GAAG,QAAQ,CAAC;EAE5B,kBAAc,GAAG,QAAQ,CAAC;EAC1B,2BAAuB,GAAG,sBAAsB,CAAC;EAEjD,sBAAkB,GAAG,YAAY,CAAC;EAClC,2BAAuB,GAAG,GAAG,CAAC;EAC9B,4BAAwB,GAAG,GAAG,CAAC;EAC/B,sBAAkB,GAAG,GAAG,CAAC;EACzB,qBAAiB,GAAG,GAAG,CAAC;EACxB,mBAAe,GAAG,GAAG,CAAC;AAyLrC,CAAC,EApMgB,GAAG,KAAH,GAAG,QAoMnB;AAED,MAAM;AACN,0BAA0B;AAC1B,MAAM;AAEN,cAAc,cAAc,CAAC","sourcesContent":["// ---\n// Global window types\n// ---\n\nimport {\n StzhLocaleFormats\n} from './utils/translation-utils';\n\nexport type WindowStzhComponents = {\n version: string\n locale: string\n pathMedia: string\n pathTranslations: string\n cacheTranslations: boolean\n formats: StzhLocaleFormats\n labels: \"flyout\" | \"fixed\"\n}\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents\n Dropzone: any\n // readspeaker lib APIs\n ReadSpeaker: any\n rspkr: any\n proj4: any\n }\n}\n\n// ---\n// Event Types\n// ---\n\n/* Sortable */\n\nexport type StzhSortableUpdateEvent = {\n component: \"stzh-sortable\"\n data: string[]\n item: HTMLElement\n newIndex: number\n oldIndex: number\n}\n\nexport type StzhSortableDisableEvent = {\n component: \"stzh-sortable\"\n disabled: boolean\n}\n\n/* Olmap */\n\nexport type OlmapLayer = {\n title?: string,\n thumbnailUrl: string,\n options: {\n url: string,\n layer: string,\n matrixSet: string,\n origin: number[],\n extent: number[]\n }\n}\n\nexport type StzhOlmapInitializedEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapPostRenderEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveStartEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveEndEvent = {\n component: \"stzh-olmap\"\n}\n\n/* Sticky */\n\nexport type StzhStickyStuckTopEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\nexport type StzhStickyStuckBottomEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\n/* Anchornav */\n\nexport type StzhAnchornavItem = {\n label: string\n href?: string\n icon?: string\n}\n\nexport type StzhAnchornavItemClickEvent = {\n component: \"stzh-anchornav\"\n item: StzhAnchornavItem\n originalEvent: MouseEvent\n}\n\n/* Actionset */\n\nexport type StzhActionsetItem = {\n id: string\n label?: string\n icon?: string\n iconPosition?: \"left\" | \"right\"\n iconOnly?: boolean\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n variant?: \"default\" | \"secondary\" | \"input\" | \"tertiary\"\n size?: \"default\" | \"small\" | \"tiny\"\n badgePosition?: \"icon\" | \"button\"\n tooltipContent?: string\n}\n\nexport type StzhActionsetItemClickEvent = {\n component: \"stzh-actionset\"\n action: StzhActionsetItem\n originalEvent: MouseEvent\n}\n\n/* Audio */\n\nexport type StzhAudioPlayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPlayingEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPauseEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioReplayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndedEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioErrorEvent = {\n component: \"stzh-audio\"\n originalEvent: ErrorEvent\n}\n\n/* Share */\n\nexport type ShareService = \"facebook\" | \"twitter\" | \"linkedin\" | \"xing\" | \"mail\";\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string\n label?: string\n icon?: string\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n onlyCollapseText?: boolean\n}\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\"\n}\n\nexport type StzhCardCollapseEvent = {\n component: \"stzh-card\"\n collapsed: boolean\n}\n\nexport type StzhCardClickEvent = {\n component: \"stzh-card\"\n originalEvent: MouseEvent\n}\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\"\n starred: boolean\n}\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\"\n action: StzhCardHeaderAction\n}\n\n/* Microsite Teaserlist */\n\nexport type StzhMicrositeTeaserlistTag = {\n id: string\n name: string\n}\n\nexport type StzhMicrositeTeaserlistItem = {\n title?: string\n description?: string\n image?: string\n link: string\n tags: string[]\n teaserid: string\n}\n\n/* Card List */\n\nexport type StzhCardListCollapseAllEvent = {\n component: \"stzh-card-list\"\n allCollapsed: boolean\n}\n\n/* Calendar */\n\nexport type StzhCalendarChangeEvent = {\n component: \"stzh-calendar\"\n valueAsDate: Date\n value: string\n}\n\n/* Datepicker */\n\nexport type StzhDatepickerChangeEvent = {\n component: \"stzh-datepicker\"\n value: string,\n valueAsDate: Date\n}\n\n/* Appointments */\n\nexport type StzhAppointmentsChangeEvent = {\n component: \"stzh-appointments\"\n value: string\n}\n\n/* Checkbox */\n\nexport type StzhCheckboxChangeEvent = {\n component: \"stzh-checkbox\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhCheckboxFocusEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\nexport type StzhCheckboxBlurEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\n/* Toggle */\n\nexport type StzhToggleChangeEvent = {\n component: \"stzh-toggle\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhToggleFocusEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\nexport type StzhToggleBlurEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\n/* Button */\n\nexport type StzhButtonFocusEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonChangeEvent = {\n component: \"stzh-button\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\n/* Link */\n\nexport type StzhLinkFocusEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\n/* Menu Item */\n\nexport type StzhMenuItemFocusEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhMenuItemBlurEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\n/* Carousel */\n\nexport type StzhCarouselSlideStartEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlidePassedEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlideEndEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\n/* Chip Select */\n\nexport type StzhChipSelectChangeEvent = {\n component: \"stzh-chip-select\"\n value: string\n}\n\n/* Datalist */\n\nexport type StzhDatalistItemEntry = {\n value: string\n leadingIcon?: string\n label?: string\n meta?: string\n icon?: string\n iconLabel?: string\n iconTooltip?: string\n href?: string\n rel?: string\n target?: string\n items?: StzhDatalistItemEntry[]\n}\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\"\n value: \"vertical\" | \"horizontal\"\n}\n\nexport type StzhDatalistHideBorderChangeEvent = {\n component: \"stzh-datalist\"\n value: boolean\n}\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\"\n originalEvent: MouseEvent\n}\n\n/* Datamessagelist */\n\nexport type StzhDatamessagelistItemEntryMeta = {\n label: string\n value: string\n}\n\nexport type StzhDatamessagelistItemEntryAction = {\n id: string | number\n icon: string\n label: string,\n badge?: string\n}\n\nexport type StzhDatamessagelistItemEntryTag = {\n icon: string\n label: string\n type: \"default\" | \"important\"\n}\n\nexport type StzhDatamessagelistItemEntryLoadingStatus = {\n percent: number\n label: string\n type: \"default\" | \"success\" | \"warning\" | \"error\"\n}\n\nexport type StzhDatamessagelistItemClickEvent = {\n component: \"stzh-datamessagelist-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\",\n action: StzhDatamessagelistItemEntryAction,\n originalEvent: MouseEvent\n}\n\n/* Chip */\n\nexport type StzhChipSelectItem = {\n label: string\n value: string\n disabled?: boolean\n variant?: \"tag\" | \"filter\" | \"input\"\n type?: \"default\" | \"secondary\"\n counter?: string\n icon?: string\n size?: \"default\" | \"small\"\n}\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipRemoveEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipFocusEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhChipBlurEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\n/* VBZ Major Ticker */\n\nexport type StzhVbzMajortickerDisturbance = {\n id: string\n head: string\n text: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n infoUrl?: VbzTickerInfoUrl\n};\n\nexport type StzhVbzMajortickerDisturbanceFetchedEvent = {\n component: \"stzh-vbz-majorticker\"\n disturbance: StzhVbzMajortickerDisturbance | null\n}\n\n/* VBZ Ticker */\n\nexport type VbzTickerInfoUrl = {\n name: string\n url: string\n};\n\nexport type VbzTickerDisturbance = {\n id: string\n head: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n baseType?: string\n infoUrl?: VbzTickerInfoUrl\n category:\n | typeof VBZ.DISTURBANCE_INFORMATION\n | typeof VBZ.DISTURBANCE_CONSTRUCTION\n | typeof VBZ.DISTURBANCE_NORMAL\n | typeof VBZ.DISTURBANCE_EVENT\n | typeof VBZ.DISTURBANCE_BUS\n};\n\nexport type VbzTickerLine = {\n line: VBZ.Lines\n name: string\n disturbances: VbzTickerDisturbance[]\n // whether normal or big disturbance for this line exist\n alert: boolean\n // 2 = Fernverkehr / 16 = Schiff / 32 = S-Bahn/Reg / 64 = Bus / 128 = Bergbahn / 256 = Nachtnetz / 512 = Tram\n category: \"2\" | \"16\" | \"32\" | \"64\" | \"128\" | \"256\" | \"512\"\n};\n\n/* VBZ Line Chip */\n\nexport type StzhVbzLinechipLine = {\n color: string\n background: string\n comment?: string\n}\n\nexport type StzhVbzLinechipFocusEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhVbzLinechipBlurEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\n/* Clamp */\n\nexport type StzhClampClampEvent = {\n component: \"stzh-clamp\"\n clamped: boolean\n}\n\nexport type StzhClampExpandEvent = {\n component: \"stzh-clamp\"\n expanded: boolean\n}\n\n/* Dialog */\n\nexport type StzhDialogOpenEvent = {\n component: \"stzh-dialog\"\n}\n\nexport type StzhDialogCloseEvent = {\n component: \"stzh-dialog\"\n}\n\n/* Contact */\n\nexport type ContactNumber = {\n type: \"tel\" | \"fax\"\n label: string\n number: string\n analyticsId?: string\n}\n\nexport type StzhContactAvailabilityItem = {\n weekday: string\n hours: string[]\n}\n\n/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\"\n}\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\"\n}\n\n/* Message */\n\nexport type StzhMessageOpenEvent = {\n component: \"stzh-message\"\n}\n\nexport type StzhMessageCloseEvent = {\n component: \"stzh-message\"\n}\n\n/* Ghettobox */\n\nexport type StzhGhettoboxOpenEvent = {\n component: \"stzh-ghettobox\"\n}\n\nexport type StzhGhettoboxCloseEvent = {\n component: \"stzh-ghettobox\"\n}\n\n/* Input */\n\nexport type StzhInputChangeEvent = {\n component: \"stzh-input\"\n originalEvent: InputEvent | MouseEvent\n value: string\n}\n\nexport type StzhInputFocusEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\nexport type StzhInputBlurEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\n/* Popover */\n\nexport type StzhPopoverOpenEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverOpenedEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverCloseEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverClosedEvent = {\n component: \"stzh-popover\"\n}\n\n/* Accordion */\n\nexport type StzhAccordionItemOpenEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemOpenedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemCloseEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemClosedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemFocusEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhAccordionItemBlurEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\n/* Tooltip */\n\nexport type StzhTooltipOpenEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipOpenedEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipCloseEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipClosedEvent = {\n component: \"stzh-tooltip\"\n}\n\n/* Radio */\n\nexport type StzhRadioChangeEvent = {\n component: \"stzh-radio\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhRadioFocusEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\nexport type StzhRadioBlurEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\n/* Langnav */\n\nexport type StzhLangnavChangeEvent = {\n component: \"stzh-langnav\",\n value: string\n}\n\n/* Dropdown */\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOpenEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowCloseEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdownFocusEvent = {\n component: \"stzh-dropdown\"\n originalEvent: {\n target: Element\n }\n}\n\nexport type StzhDropdownBlurEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowInitEvent = {\n component: \"stzh-dropdown\"\n}\n\n/** Progressbar */\n\nexport type StzhProgressbarDataItem = {\n label: string\n icon?: string\n disabled?: boolean\n analyticsId?: string\n}\n\n/* Progressbar Item */\n\nexport type StzhProgressbarItemClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhProgressbarItemDottedClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\n/* Upload */\n\nexport type StzhUploadFilesItem = {\n name: string\n size: number\n [key: string]: any\n}\n\nexport type StzhUploadFile = File & {\n xhr: XMLHttpRequest,\n status: string\n upload: any\n accepted: boolean\n previewElement: HTMLElement\n}\n\nexport type StzhUploadFileAddedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFilesAddedEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadFileRemoveEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFileRemovedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadSendingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadSendingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadProcessingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadProcessingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadProgressEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n progress: number,\n bytesSent: number\n}\n\nexport type StzhUploadProgressTotalEvent = {\n component: \"stzh-upload\",\n totalUploadProgress: number,\n totalBytes: number,\n totalBytesSent: number\n}\n\nexport type StzhUploadErrorEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadErrorMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadSuccessEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadSuccessMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadCanceledEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCanceledMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadCompleteEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCompleteMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\n// Merged Types\n\nexport type StzhFocusEvent =\n | StzhAccordionItemFocusEvent\n | StzhButtonFocusEvent\n | StzhCheckboxFocusEvent\n | StzhChipFocusEvent\n | StzhDropdownFocusEvent\n | StzhInputFocusEvent\n | StzhLinkFocusEvent\n | StzhMenuItemFocusEvent\n | StzhRadioFocusEvent\n | StzhToggleFocusEvent\n | StzhVbzLinechipFocusEvent\n\n// ---\n// Prop Types\n// ---\n\nexport type StzhCalendarDateDisabledPredicate = (date: Date) => boolean\n\nexport namespace Layout {\n export type Justify =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"between\"\n | \"around\"\n | \"evenly\";\n\n export type Items =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"baseline\"\n | \"stretch\";\n\n export type JustifySelf =\n | \"auto\"\n | Justify;\n\n export type AlignSelf =\n | \"auto\"\n | Items;\n}\n\nexport namespace Space {\n export type Sizes =\n | \"xxxsmall\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\"\n | \"xxxxlarge\"\n | \"big\"\n | \"xbig\"\n | \"huge\"\n | \"xhuge\"\n | \"none\"\n | \"inherit\";\n\n export type Curves =\n | \"tiny\"\n | \"small\"\n | \"regular\"\n | \"medium\"\n | \"large\"\n | \"big\"\n | \"huge\"\n | \"none\";\n}\n\nexport namespace Font {\n export type Fonts =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"heavy\"\n | \"default\";\n\n export type Sizes =\n | \"pico\"\n | \"nano\"\n | \"micro\"\n | \"milli\"\n | \"centi\"\n | \"deci\"\n | \"regular\"\n | \"deca\"\n | \"hecto\"\n | \"kilo\"\n | \"mega\"\n | \"giga\"\n | \"hero\"\n | \"inherit\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\n | \"default\";\n}\n\nexport namespace VBZ {\n export const BASE_TYPE_GLOBAL = \"GLOBAL\";\n\n export const CHANNEL_TICKER = \"ticker\";\n export const CHANNEL_INFO_URL_FILTER = \"stadt-zuerich.ch/vbz\";\n\n export const DISTURBANCE_GLOBAL = \"__global__\";\n export const DISTURBANCE_INFORMATION = \"0\";\n export const DISTURBANCE_CONSTRUCTION = \"1\";\n export const DISTURBANCE_NORMAL = \"2\";\n export const DISTURBANCE_EVENT = \"4\";\n export const DISTURBANCE_BUS = \"5\";\n\n export type Lines =\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | \"13\"\n | \"14\"\n | \"15\"\n | \"16\"\n | \"17\"\n | \"19\"\n | \"20\"\n | \"21\"\n | \"23\"\n | \"24\"\n | \"25\"\n | \"29\"\n | \"31\"\n | \"32\"\n | \"33\"\n | \"34\"\n | \"35\"\n | \"36\"\n | \"37\"\n | \"38\"\n | \"39\"\n | \"40\"\n | \"45\"\n | \"46\"\n | \"54\"\n | \"61\"\n | \"62\"\n | \"63\"\n | \"64\"\n | \"66\"\n | \"67\"\n | \"69\"\n | \"70\"\n | \"72\"\n | \"73\"\n | \"75\"\n | \"76\"\n | \"77\"\n | \"78\"\n | \"79\"\n | \"80\"\n | \"83\"\n | \"89\"\n | \"91\"\n | \"94\"\n | \"95\"\n | \"99\"\n | \"151\"\n | \"152\"\n | \"153\"\n | \"156\"\n | \"161\"\n | \"162\"\n | \"163\"\n | \"165\"\n | \"184\"\n | \"185\"\n | \"200\"\n | \"201\"\n | \"215\"\n | \"220\"\n | \"235\"\n | \"236\"\n | \"245\"\n | \"301\"\n | \"302\"\n | \"303\"\n | \"304\"\n | \"305\"\n | \"306\"\n | \"307\"\n | \"308\"\n | \"309\"\n | \"311\"\n | \"314\"\n | \"315\"\n | \"317\"\n | \"321\"\n | \"323\"\n | \"325\"\n | \"350\"\n | \"444\"\n | \"445\"\n | \"701\"\n | \"702\"\n | \"703\"\n | \"704\"\n | \"705\"\n | \"720\"\n | \"721\"\n | \"725\"\n | \"726\"\n | \"727\"\n | \"742\"\n | \"743\"\n | \"744\"\n | \"745\"\n | \"747\"\n | \"748\"\n | \"751\"\n | \"752\"\n | \"753\"\n | \"754\"\n | \"759\"\n | \"760\"\n | \"765\"\n | \"768\"\n | \"781\"\n | \"786\"\n | \"787\"\n | \"910\"\n | \"912\"\n | \"916\"\n | \"917\"\n | \"918\"\n | \"919\"\n | \"E\"\n | \"N\"\n | \"N1\"\n | \"N2\"\n | \"N4\"\n | \"N5\"\n | \"N6\"\n | \"N7\"\n | \"N8\"\n | \"N9\"\n | \"N10\"\n | \"N11\"\n | \"N12\"\n | \"N13\"\n | \"N14\"\n | \"N15\"\n | \"N16\"\n | \"N17\"\n | \"N18\"\n | \"N19\"\n | \"N30\"\n | \"N31\"\n | \"N32\"\n | \"N33\"\n | \"N34\"\n | \"N45\"\n | \"N72\"\n | \"N78\"\n | \"SN1\"\n | \"SN4\"\n | \"SN5\"\n | \"SN6\"\n | \"SN7\"\n | \"SN8\"\n | \"SN9\"\n | \"S2\"\n | \"S3\"\n | \"S4\"\n | \"S5\"\n | \"S6\"\n | \"S7\"\n | \"S8\"\n | \"S9\"\n | \"S10\"\n | \"S11\"\n | \"S14\"\n | \"S15\"\n | \"S16\"\n | \"S18\"\n | \"S19\"\n | \"S20\"\n | \"S21\"\n | \"S23\"\n | \"S24\"\n | \"S25\"\n}\n\n// ---\n// Stencil component types\n// ---\n\nexport * from './components';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM;AACN,sBAAsB;AACtB,MAAM;AA++BN,MAAM,KAAW,GAAG,CAoMnB;AApMD,WAAiB,GAAG;EACL,oBAAgB,GAAG,QAAQ,CAAC;EAE5B,kBAAc,GAAG,QAAQ,CAAC;EAC1B,2BAAuB,GAAG,sBAAsB,CAAC;EAEjD,sBAAkB,GAAG,YAAY,CAAC;EAClC,2BAAuB,GAAG,GAAG,CAAC;EAC9B,4BAAwB,GAAG,GAAG,CAAC;EAC/B,sBAAkB,GAAG,GAAG,CAAC;EACzB,qBAAiB,GAAG,GAAG,CAAC;EACxB,mBAAe,GAAG,GAAG,CAAC;AAyLrC,CAAC,EApMgB,GAAG,KAAH,GAAG,QAoMnB;AAED,MAAM;AACN,0BAA0B;AAC1B,MAAM;AAEN,cAAc,cAAc,CAAC","sourcesContent":["// ---\n// Global window types\n// ---\n\nimport {\n StzhLocaleFormats\n} from './utils/translation-utils';\n\nexport type WindowStzhComponents = {\n version: string\n locale: string\n pathMedia: string\n pathTranslations: string\n cacheTranslations: boolean\n formats: StzhLocaleFormats\n labels: \"flyout\" | \"fixed\"\n}\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents\n Dropzone: any\n // readspeaker lib APIs\n ReadSpeaker: any\n rspkr: any\n proj4: any\n }\n}\n\n// ---\n// Event Types\n// ---\n\n/* Sortable */\n\nexport type StzhSortableUpdateEvent = {\n component: \"stzh-sortable\"\n data: string[]\n item: HTMLElement\n newIndex: number\n oldIndex: number\n}\n\nexport type StzhSortableDisableEvent = {\n component: \"stzh-sortable\"\n disabled: boolean\n}\n\n/* Olmap */\n\nexport type OlmapLayer = {\n title?: string,\n thumbnailUrl: string,\n options: {\n url: string,\n layer: string,\n matrixSet: string,\n origin: number[],\n extent: number[]\n }\n}\n\nexport type StzhOlmapInitializedEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapPostRenderEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveStartEvent = {\n component: \"stzh-olmap\"\n}\n\nexport type StzhOlmapMoveEndEvent = {\n component: \"stzh-olmap\"\n}\n\n/* Sticky */\n\nexport type StzhStickyStuckTopEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\nexport type StzhStickyStuckBottomEvent = {\n component: \"stzh-sticky\"\n sticky: boolean\n}\n\n/* Anchornav */\n\nexport type StzhAnchornavItem = {\n label: string\n href?: string\n icon?: string\n}\n\nexport type StzhAnchornavItemClickEvent = {\n component: \"stzh-anchornav\"\n item: StzhAnchornavItem\n originalEvent: MouseEvent\n}\n\n/* Actionset */\n\nexport type StzhActionsetItem = {\n id: string\n label?: string\n icon?: string\n iconPosition?: \"left\" | \"right\"\n iconOnly?: boolean\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n variant?: \"default\" | \"secondary\" | \"input\" | \"tertiary\"\n size?: \"default\" | \"small\" | \"tiny\"\n badgePosition?: \"icon\" | \"button\"\n tooltipContent?: string\n}\n\nexport type StzhActionsetItemClickEvent = {\n component: \"stzh-actionset\"\n action: StzhActionsetItem\n originalEvent: MouseEvent\n}\n\n/* Audio */\n\nexport type StzhAudioPlayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPlayingEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioPauseEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioReplayEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioEndedEvent = {\n component: \"stzh-audio\"\n}\n\nexport type StzhAudioErrorEvent = {\n component: \"stzh-audio\"\n originalEvent: ErrorEvent\n}\n\n/* Share */\n\nexport type ShareService = \"facebook\" | \"twitter\" | \"linkedin\" | \"xing\" | \"mail\";\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string\n label?: string\n icon?: string\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n onlyCollapseText?: boolean\n}\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\"\n}\n\nexport type StzhCardCollapseEvent = {\n component: \"stzh-card\"\n collapsed: boolean\n}\n\nexport type StzhCardClickEvent = {\n component: \"stzh-card\"\n originalEvent: MouseEvent\n}\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\"\n starred: boolean\n}\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\"\n action: StzhCardHeaderAction\n}\n\n/* Microsite Teaserlist */\n\nexport type StzhMicrositeTeaserlistTag = {\n id: string\n name: string\n}\n\nexport type StzhMicrositeTeaserlistItem = {\n title?: string\n description?: string\n image?: string\n link: string\n tags: string[]\n teaserid: string\n}\n\n/* Card List */\n\nexport type StzhCardListCollapseAllEvent = {\n component: \"stzh-card-list\"\n allCollapsed: boolean\n}\n\n/* Calendar */\n\nexport type StzhCalendarChangeEvent = {\n component: \"stzh-calendar\"\n valueAsDate: Date\n value: string\n}\n\n/* Datepicker */\n\nexport type StzhDatepickerChangeEvent = {\n component: \"stzh-datepicker\"\n value: string,\n valueAsDate: Date\n}\n\n/* Amount */\n\nexport type StzhAmountChangeEvent = {\n component: \"stzh-amount\"\n value: string\n}\n\n/* Appointments */\n\nexport type StzhAppointmentsChangeEvent = {\n component: \"stzh-appointments\"\n value: string\n}\n\n/* Checkbox */\n\nexport type StzhCheckboxChangeEvent = {\n component: \"stzh-checkbox\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhCheckboxFocusEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\nexport type StzhCheckboxBlurEvent = {\n component: \"stzh-checkbox\"\n originalEvent: FocusEvent\n}\n\n/* Toggle */\n\nexport type StzhToggleChangeEvent = {\n component: \"stzh-toggle\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhToggleFocusEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\nexport type StzhToggleBlurEvent = {\n component: \"stzh-toggle\"\n originalEvent: FocusEvent\n}\n\n/* Button */\n\nexport type StzhButtonFocusEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonChangeEvent = {\n component: \"stzh-button\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\n/* Link */\n\nexport type StzhLinkFocusEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\n/* Menu Item */\n\nexport type StzhMenuItemFocusEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhMenuItemBlurEvent = {\n component: \"stzh-menu-item\"\n originalEvent: FocusEvent\n}\n\n/* Carousel */\n\nexport type StzhCarouselSlideStartEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlidePassedEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\nexport type StzhCarouselSlideEndEvent = {\n component: \"stzh-carousel\"\n index: number\n}\n\n/* Chip Select */\n\nexport type StzhChipSelectChangeEvent = {\n component: \"stzh-chip-select\"\n value: string\n}\n\n/* Datalist */\n\nexport type StzhDatalistItemEntry = {\n value: string\n leadingIcon?: string\n label?: string\n meta?: string\n icon?: string\n iconLabel?: string\n iconTooltip?: string\n href?: string\n rel?: string\n target?: string\n items?: StzhDatalistItemEntry[]\n}\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\"\n value: \"vertical\" | \"horizontal\"\n}\n\nexport type StzhDatalistHideBorderChangeEvent = {\n component: \"stzh-datalist\"\n value: boolean\n}\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\"\n originalEvent: MouseEvent\n}\n\n/* Datamessagelist */\n\nexport type StzhDatamessagelistItemEntryMeta = {\n label: string\n value: string\n}\n\nexport type StzhDatamessagelistItemEntryAction = {\n id: string | number\n icon: string\n label: string,\n badge?: string\n}\n\nexport type StzhDatamessagelistItemEntryTag = {\n icon: string\n label: string\n type: \"default\" | \"important\"\n}\n\nexport type StzhDatamessagelistItemEntryLoadingStatus = {\n percent: number\n label: string\n type: \"default\" | \"success\" | \"warning\" | \"error\"\n}\n\nexport type StzhDatamessagelistItemClickEvent = {\n component: \"stzh-datamessagelist-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\",\n action: StzhDatamessagelistItemEntryAction,\n originalEvent: MouseEvent\n}\n\n/* Chip */\n\nexport type StzhChipSelectItem = {\n label: string\n value: string\n disabled?: boolean\n variant?: \"tag\" | \"filter\" | \"input\"\n type?: \"default\" | \"secondary\"\n counter?: string\n icon?: string\n size?: \"default\" | \"small\"\n}\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipRemoveEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\n}\n\nexport type StzhChipFocusEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhChipBlurEvent = {\n component: \"stzh-chip\"\n originalEvent: FocusEvent\n}\n\n/* VBZ Major Ticker */\n\nexport type StzhVbzMajortickerDisturbance = {\n id: string\n head: string\n text: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n infoUrl?: VbzTickerInfoUrl\n};\n\nexport type StzhVbzMajortickerDisturbanceFetchedEvent = {\n component: \"stzh-vbz-majorticker\"\n disturbance: StzhVbzMajortickerDisturbance | null\n}\n\n/* VBZ Ticker */\n\nexport type VbzTickerInfoUrl = {\n name: string\n url: string\n};\n\nexport type VbzTickerDisturbance = {\n id: string\n head: string\n startDate: Date\n endDate: Date\n altStart: string\n altEnd: string\n baseType?: string\n infoUrl?: VbzTickerInfoUrl\n category:\n | typeof VBZ.DISTURBANCE_INFORMATION\n | typeof VBZ.DISTURBANCE_CONSTRUCTION\n | typeof VBZ.DISTURBANCE_NORMAL\n | typeof VBZ.DISTURBANCE_EVENT\n | typeof VBZ.DISTURBANCE_BUS\n};\n\nexport type VbzTickerLine = {\n line: VBZ.Lines\n name: string\n disturbances: VbzTickerDisturbance[]\n // whether normal or big disturbance for this line exist\n alert: boolean\n // 2 = Fernverkehr / 16 = Schiff / 32 = S-Bahn/Reg / 64 = Bus / 128 = Bergbahn / 256 = Nachtnetz / 512 = Tram\n category: \"2\" | \"16\" | \"32\" | \"64\" | \"128\" | \"256\" | \"512\"\n};\n\n/* VBZ Line Chip */\n\nexport type StzhVbzLinechipLine = {\n color: string\n background: string\n comment?: string\n}\n\nexport type StzhVbzLinechipFocusEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\nexport type StzhVbzLinechipBlurEvent = {\n component: \"stzh-vbz-linechip\"\n originalEvent: FocusEvent\n}\n\n/* Clamp */\n\nexport type StzhClampClampEvent = {\n component: \"stzh-clamp\"\n clamped: boolean\n}\n\nexport type StzhClampExpandEvent = {\n component: \"stzh-clamp\"\n expanded: boolean\n}\n\n/* Dialog */\n\nexport type StzhDialogOpenEvent = {\n component: \"stzh-dialog\"\n}\n\nexport type StzhDialogCloseEvent = {\n component: \"stzh-dialog\"\n}\n\n/* Contact */\n\nexport type ContactNumber = {\n type: \"tel\" | \"fax\"\n label: string\n number: string\n analyticsId?: string\n}\n\nexport type StzhContactAvailabilityItem = {\n weekday: string\n hours: string[]\n}\n\n/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\"\n}\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\"\n}\n\n/* Message */\n\nexport type StzhMessageOpenEvent = {\n component: \"stzh-message\"\n}\n\nexport type StzhMessageCloseEvent = {\n component: \"stzh-message\"\n}\n\n/* Ghettobox */\n\nexport type StzhGhettoboxOpenEvent = {\n component: \"stzh-ghettobox\"\n}\n\nexport type StzhGhettoboxCloseEvent = {\n component: \"stzh-ghettobox\"\n}\n\n/* Input */\n\nexport type StzhInputChangeEvent = {\n component: \"stzh-input\"\n originalEvent: InputEvent | MouseEvent\n value: string\n}\n\nexport type StzhInputFocusEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\nexport type StzhInputBlurEvent = {\n component: \"stzh-input\"\n originalEvent: FocusEvent\n}\n\n/* Popover */\n\nexport type StzhPopoverOpenEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverOpenedEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverCloseEvent = {\n component: \"stzh-popover\"\n}\n\nexport type StzhPopoverClosedEvent = {\n component: \"stzh-popover\"\n}\n\n/* Accordion */\n\nexport type StzhAccordionItemOpenEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemOpenedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemCloseEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemClosedEvent = {\n component: \"stzh-accordion-item\"\n}\n\nexport type StzhAccordionItemFocusEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\nexport type StzhAccordionItemBlurEvent = {\n component: \"stzh-accordion-item\"\n originalEvent: FocusEvent\n}\n\n/* Tooltip */\n\nexport type StzhTooltipOpenEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipOpenedEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipCloseEvent = {\n component: \"stzh-tooltip\"\n}\n\nexport type StzhTooltipClosedEvent = {\n component: \"stzh-tooltip\"\n}\n\n/* Radio */\n\nexport type StzhRadioChangeEvent = {\n component: \"stzh-radio\"\n originalEvent: InputEvent\n value: string\n checked: boolean\n}\n\nexport type StzhRadioFocusEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\nexport type StzhRadioBlurEvent = {\n component: \"stzh-radio\"\n originalEvent: FocusEvent\n}\n\n/* Langnav */\n\nexport type StzhLangnavChangeEvent = {\n component: \"stzh-langnav\",\n value: string\n}\n\n/* Dropdown */\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownItemRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionAddEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOptionRemoveEvent = {\n component: \"stzh-dropdown\",\n value: string\n}\n\nexport type StzhDropdownOpenEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowCloseEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdownFocusEvent = {\n component: \"stzh-dropdown\"\n originalEvent: {\n target: Element\n }\n}\n\nexport type StzhDropdownBlurEvent = {\n component: \"stzh-dropdown\"\n}\n\nexport type StzhDropdowInitEvent = {\n component: \"stzh-dropdown\"\n}\n\n/** Progressbar */\n\nexport type StzhProgressbarDataItem = {\n label: string\n icon?: string\n disabled?: boolean\n analyticsId?: string\n}\n\n/* Progressbar Item */\n\nexport type StzhProgressbarItemClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\nexport type StzhProgressbarItemDottedClickEvent = {\n component: \"stzh-progressbar-item\",\n originalEvent: MouseEvent\n}\n\n/* Upload */\n\nexport type StzhUploadFilesItem = {\n name: string\n size: number\n [key: string]: any\n}\n\nexport type StzhUploadFile = File & {\n xhr: XMLHttpRequest,\n status: string\n upload: any\n accepted: boolean\n previewElement: HTMLElement\n}\n\nexport type StzhUploadFileAddedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFilesAddedEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadFileRemoveEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadFileRemovedEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n force: boolean\n}\n\nexport type StzhUploadSendingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadSendingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n xhr: XMLHttpRequest,\n formData: FormData\n}\n\nexport type StzhUploadProcessingEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadProcessingMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadProgressEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n progress: number,\n bytesSent: number\n}\n\nexport type StzhUploadProgressTotalEvent = {\n component: \"stzh-upload\",\n totalUploadProgress: number,\n totalBytes: number,\n totalBytesSent: number\n}\n\nexport type StzhUploadErrorEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadErrorMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n message: string,\n xhr: XMLHttpRequest\n}\n\nexport type StzhUploadSuccessEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile,\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadSuccessMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[],\n responseText: string,\n event: ProgressEvent\n}\n\nexport type StzhUploadCanceledEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCanceledMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\nexport type StzhUploadCompleteEvent = {\n component: \"stzh-upload\",\n file: StzhUploadFile\n}\n\nexport type StzhUploadCompleteMultipleEvent = {\n component: \"stzh-upload\",\n files: StzhUploadFile[]\n}\n\n// Merged Types\n\nexport type StzhFocusEvent =\n | StzhAccordionItemFocusEvent\n | StzhButtonFocusEvent\n | StzhCheckboxFocusEvent\n | StzhChipFocusEvent\n | StzhDropdownFocusEvent\n | StzhInputFocusEvent\n | StzhLinkFocusEvent\n | StzhMenuItemFocusEvent\n | StzhRadioFocusEvent\n | StzhToggleFocusEvent\n | StzhVbzLinechipFocusEvent\n\n// ---\n// Prop Types\n// ---\n\nexport type StzhCalendarDateDisabledPredicate = (date: Date) => boolean\n\nexport namespace Layout {\n export type Justify =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"between\"\n | \"around\"\n | \"evenly\";\n\n export type Items =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"baseline\"\n | \"stretch\";\n\n export type JustifySelf =\n | \"auto\"\n | Justify;\n\n export type AlignSelf =\n | \"auto\"\n | Items;\n}\n\nexport namespace Space {\n export type Sizes =\n | \"xxxsmall\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\"\n | \"xxxxlarge\"\n | \"big\"\n | \"xbig\"\n | \"huge\"\n | \"xhuge\"\n | \"none\"\n | \"inherit\";\n\n export type Curves =\n | \"tiny\"\n | \"small\"\n | \"regular\"\n | \"medium\"\n | \"large\"\n | \"big\"\n | \"huge\"\n | \"none\";\n}\n\nexport namespace Font {\n export type Fonts =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"heavy\"\n | \"default\";\n\n export type Sizes =\n | \"pico\"\n | \"nano\"\n | \"micro\"\n | \"milli\"\n | \"centi\"\n | \"deci\"\n | \"regular\"\n | \"deca\"\n | \"hecto\"\n | \"kilo\"\n | \"mega\"\n | \"giga\"\n | \"hero\"\n | \"inherit\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\n | \"default\";\n}\n\nexport namespace VBZ {\n export const BASE_TYPE_GLOBAL = \"GLOBAL\";\n\n export const CHANNEL_TICKER = \"ticker\";\n export const CHANNEL_INFO_URL_FILTER = \"stadt-zuerich.ch/vbz\";\n\n export const DISTURBANCE_GLOBAL = \"__global__\";\n export const DISTURBANCE_INFORMATION = \"0\";\n export const DISTURBANCE_CONSTRUCTION = \"1\";\n export const DISTURBANCE_NORMAL = \"2\";\n export const DISTURBANCE_EVENT = \"4\";\n export const DISTURBANCE_BUS = \"5\";\n\n export type Lines =\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | \"13\"\n | \"14\"\n | \"15\"\n | \"16\"\n | \"17\"\n | \"19\"\n | \"20\"\n | \"21\"\n | \"23\"\n | \"24\"\n | \"25\"\n | \"29\"\n | \"31\"\n | \"32\"\n | \"33\"\n | \"34\"\n | \"35\"\n | \"36\"\n | \"37\"\n | \"38\"\n | \"39\"\n | \"40\"\n | \"45\"\n | \"46\"\n | \"54\"\n | \"61\"\n | \"62\"\n | \"63\"\n | \"64\"\n | \"66\"\n | \"67\"\n | \"69\"\n | \"70\"\n | \"72\"\n | \"73\"\n | \"75\"\n | \"76\"\n | \"77\"\n | \"78\"\n | \"79\"\n | \"80\"\n | \"83\"\n | \"89\"\n | \"91\"\n | \"94\"\n | \"95\"\n | \"99\"\n | \"151\"\n | \"152\"\n | \"153\"\n | \"156\"\n | \"161\"\n | \"162\"\n | \"163\"\n | \"165\"\n | \"184\"\n | \"185\"\n | \"200\"\n | \"201\"\n | \"215\"\n | \"220\"\n | \"235\"\n | \"236\"\n | \"245\"\n | \"301\"\n | \"302\"\n | \"303\"\n | \"304\"\n | \"305\"\n | \"306\"\n | \"307\"\n | \"308\"\n | \"309\"\n | \"311\"\n | \"314\"\n | \"315\"\n | \"317\"\n | \"321\"\n | \"323\"\n | \"325\"\n | \"350\"\n | \"444\"\n | \"445\"\n | \"701\"\n | \"702\"\n | \"703\"\n | \"704\"\n | \"705\"\n | \"720\"\n | \"721\"\n | \"725\"\n | \"726\"\n | \"727\"\n | \"742\"\n | \"743\"\n | \"744\"\n | \"745\"\n | \"747\"\n | \"748\"\n | \"751\"\n | \"752\"\n | \"753\"\n | \"754\"\n | \"759\"\n | \"760\"\n | \"765\"\n | \"768\"\n | \"781\"\n | \"786\"\n | \"787\"\n | \"910\"\n | \"912\"\n | \"916\"\n | \"917\"\n | \"918\"\n | \"919\"\n | \"E\"\n | \"N\"\n | \"N1\"\n | \"N2\"\n | \"N4\"\n | \"N5\"\n | \"N6\"\n | \"N7\"\n | \"N8\"\n | \"N9\"\n | \"N10\"\n | \"N11\"\n | \"N12\"\n | \"N13\"\n | \"N14\"\n | \"N15\"\n | \"N16\"\n | \"N17\"\n | \"N18\"\n | \"N19\"\n | \"N30\"\n | \"N31\"\n | \"N32\"\n | \"N33\"\n | \"N34\"\n | \"N45\"\n | \"N72\"\n | \"N78\"\n | \"SN1\"\n | \"SN4\"\n | \"SN5\"\n | \"SN6\"\n | \"SN7\"\n | \"SN8\"\n | \"SN9\"\n | \"S2\"\n | \"S3\"\n | \"S4\"\n | \"S5\"\n | \"S6\"\n | \"S7\"\n | \"S8\"\n | \"S9\"\n | \"S10\"\n | \"S11\"\n | \"S14\"\n | \"S15\"\n | \"S16\"\n | \"S18\"\n | \"S19\"\n | \"S20\"\n | \"S21\"\n | \"S23\"\n | \"S24\"\n | \"S25\"\n}\n\n// ---\n// Stencil component types\n// ---\n\nexport * from './components';\n"]}
|
|
@@ -8807,10 +8807,14 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8807
8807
|
}, {
|
|
8808
8808
|
key: "removeFile",
|
|
8809
8809
|
value: function removeFile(file) {
|
|
8810
|
-
var
|
|
8810
|
+
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8811
8811
|
|
|
8812
|
-
if (!
|
|
8813
|
-
|
|
8812
|
+
if (!force) {
|
|
8813
|
+
var executeRemove = this.emit("removefile", file);
|
|
8814
|
+
|
|
8815
|
+
if (!executeRemove) {
|
|
8816
|
+
return false;
|
|
8817
|
+
}
|
|
8814
8818
|
}
|
|
8815
8819
|
|
|
8816
8820
|
if (file.status === Dropzone.UPLOADING) {
|
|
@@ -8818,7 +8822,7 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8818
8822
|
}
|
|
8819
8823
|
|
|
8820
8824
|
this.files = without(this.files, file);
|
|
8821
|
-
this.emit("removedfile", file);
|
|
8825
|
+
this.emit("removedfile", file, force);
|
|
8822
8826
|
|
|
8823
8827
|
if (this.files.length === 0) {
|
|
8824
8828
|
this.emit("reset");
|
|
@@ -8830,6 +8834,8 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8830
8834
|
}, {
|
|
8831
8835
|
key: "removeAllFiles",
|
|
8832
8836
|
value: function removeAllFiles(cancelIfNecessary) {
|
|
8837
|
+
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8838
|
+
|
|
8833
8839
|
// Create a copy of files since removeFile() changes the @files array.
|
|
8834
8840
|
if (cancelIfNecessary == null) {
|
|
8835
8841
|
cancelIfNecessary = false;
|
|
@@ -8843,7 +8849,7 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8843
8849
|
var file = _step9.value;
|
|
8844
8850
|
|
|
8845
8851
|
if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
|
|
8846
|
-
this.removeFile(file);
|
|
8852
|
+
this.removeFile(file, force);
|
|
8847
8853
|
}
|
|
8848
8854
|
}
|
|
8849
8855
|
} catch (err) {
|
|
@@ -8807,10 +8807,14 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8807
8807
|
}, {
|
|
8808
8808
|
key: "removeFile",
|
|
8809
8809
|
value: function removeFile(file) {
|
|
8810
|
-
var
|
|
8810
|
+
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8811
8811
|
|
|
8812
|
-
if (!
|
|
8813
|
-
|
|
8812
|
+
if (!force) {
|
|
8813
|
+
var executeRemove = this.emit("removefile", file);
|
|
8814
|
+
|
|
8815
|
+
if (!executeRemove) {
|
|
8816
|
+
return false;
|
|
8817
|
+
}
|
|
8814
8818
|
}
|
|
8815
8819
|
|
|
8816
8820
|
if (file.status === Dropzone.UPLOADING) {
|
|
@@ -8818,7 +8822,7 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8818
8822
|
}
|
|
8819
8823
|
|
|
8820
8824
|
this.files = without(this.files, file);
|
|
8821
|
-
this.emit("removedfile", file);
|
|
8825
|
+
this.emit("removedfile", file, force);
|
|
8822
8826
|
|
|
8823
8827
|
if (this.files.length === 0) {
|
|
8824
8828
|
this.emit("reset");
|
|
@@ -8830,6 +8834,8 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8830
8834
|
}, {
|
|
8831
8835
|
key: "removeAllFiles",
|
|
8832
8836
|
value: function removeAllFiles(cancelIfNecessary) {
|
|
8837
|
+
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8838
|
+
|
|
8833
8839
|
// Create a copy of files since removeFile() changes the @files array.
|
|
8834
8840
|
if (cancelIfNecessary == null) {
|
|
8835
8841
|
cancelIfNecessary = false;
|
|
@@ -8843,7 +8849,7 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
|
|
|
8843
8849
|
var file = _step9.value;
|
|
8844
8850
|
|
|
8845
8851
|
if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
|
|
8846
|
-
this.removeFile(file);
|
|
8852
|
+
this.removeFile(file, force);
|
|
8847
8853
|
}
|
|
8848
8854
|
}
|
|
8849
8855
|
} catch (err) {
|