import { clearPreviousErrors } from "WoltLabSuite/Core/Component/File/Upload";
type FileId = string;
-const fileProcessors = new Map<FieldId, FileProcessor>();
+const fileProcessors = new Map<FileId, FileProcessor>();
export interface ExtraButton {
title: string;
this.#registerFile(element, element.parentElement);
});
- _data.set(fieldId, this);
+ fileProcessors.set(fieldId, this);
}
get classPrefix(): string {
}
export function getValues(fieldId: string): undefined | number | Set<number> {
- const field = _data.get(fieldId);
+ const field = fileProcessors.get(fieldId);
if (field === undefined) {
throw new Error("Unknown field with id '" + fieldId + "'");
}
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValues = exports.FileProcessor = void 0;
Listener_1 = tslib_1.__importDefault(Listener_1);
- const _data = new Map();
+ const fileProcessors = new Map();
class FileProcessor {
#container;
#uploadButton;
this.#container.querySelectorAll("woltlab-core-file").forEach((element) => {
this.#registerFile(element, element.parentElement);
});
- _data.set(fieldId, this);
+ fileProcessors.set(fieldId, this);
}
get classPrefix() {
return this.showBigPreview ? "fileUpload__preview__" : "fileList__";
}
exports.FileProcessor = FileProcessor;
function getValues(fieldId) {
- const field = _data.get(fieldId);
+ const field = fileProcessors.get(fieldId);
if (field === undefined) {
throw new Error("Unknown field with id '" + fieldId + "'");
}