diff --git a/schemas/json/base_metadata_schema.json b/schemas/json/base_metadata_schema.json index aef6287c5..201620788 100644 --- a/schemas/json/base_metadata_schema.json +++ b/schemas/json/base_metadata_schema.json @@ -168,4 +168,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/renderer/src/dependencies/globals.js b/src/renderer/src/dependencies/globals.js index d5cdeaad8..e391b27b6 100644 --- a/src/renderer/src/dependencies/globals.js +++ b/src/renderer/src/dependencies/globals.js @@ -22,7 +22,7 @@ export const startLottie = (lottieElement, animationData) => { return thisLottie; }; -const longDuration = 20000 +const longDuration = 20000; // ---------- Notification Helper ---------- export const notyf = new Notyf({ @@ -94,7 +94,7 @@ export const notyf = new Notyf({ tagName: "i", color: "white", }, - duration: longDuration + duration: longDuration, }, { type: "error", diff --git a/src/renderer/src/stories/FileSystemSelector.js b/src/renderer/src/stories/FileSystemSelector.js index 7da7e91d7..5bdc10c9d 100644 --- a/src/renderer/src/stories/FileSystemSelector.js +++ b/src/renderer/src/stories/FileSystemSelector.js @@ -132,8 +132,7 @@ export class FilesystemSelector extends LitElement { }; #handleFiles = async (pathOrPaths, type) => { - - const resolvedType = type ?? this.type + const resolvedType = type ?? this.type; if (Array.isArray(pathOrPaths)) pathOrPaths.forEach(this.#checkType); else if (!type) this.#checkType(pathOrPaths); @@ -151,7 +150,7 @@ export class FilesystemSelector extends LitElement { if (this.multiple && !Array.isArray(resolvedValue)) resolvedValue = []; - console.log(resolvedValue) + console.log(resolvedValue); this.value = resolvedValue; this.onSelect(this.value); @@ -187,7 +186,7 @@ export class FilesystemSelector extends LitElement { resolved = this.value.map((str) => str.replaceAll("\\", "/")); isUpdated = JSON.stringify(resolved) !== JSON.stringify(this.value); } else { - resolved = typeof this.value === 'string' ? this.value.replaceAll("\\", "/") : this.value; + resolved = typeof this.value === "string" ? this.value.replaceAll("\\", "/") : this.value; isUpdated = resolved !== this.value; } diff --git a/src/renderer/src/stories/Search.js b/src/renderer/src/stories/Search.js index 65b1f3afd..95109ddab 100644 --- a/src/renderer/src/stories/Search.js +++ b/src/renderer/src/stories/Search.js @@ -6,7 +6,7 @@ export class Search extends LitElement { super(); this.options = options; this.showAllWhenEmpty = showAllWhenEmpty; - this.disabledLabel = disabledLabel + this.disabledLabel = disabledLabel; } static get styles() { @@ -79,7 +79,6 @@ export class Search extends LitElement { font-size: 90%; white-space: nowrap; min-width: min-content; - } `; } @@ -118,14 +117,12 @@ export class Search extends LitElement { list = document.createElement("ul"); render() { - // Update list this.list.remove(); this.list = document.createElement("ul"); - if (this.disabledLabel) this.style.setProperty('--disabled-label', `"${this.disabledLabel}"`); - else this.style.removeProperty('--disabled-label') - + if (this.disabledLabel) this.style.setProperty("--disabled-label", `"${this.disabledLabel}"`); + else this.style.removeProperty("--disabled-label"); const slot = document.createElement("slot"); this.list.appendChild(slot); @@ -151,7 +148,7 @@ export class Search extends LitElement { if (option.disabled) li.setAttribute("disabled", ""); - const container = document.createElement('div') + const container = document.createElement("div"); const label = document.createElement("h4"); label.classList.add("label"); @@ -163,7 +160,7 @@ export class Search extends LitElement { keywords.innerText = option.keywords.join(", "); container.appendChild(keywords); - li.append(container) + li.append(container); this.list.appendChild(li); return option.disabled; diff --git a/src/renderer/src/stories/assets/server.svg b/src/renderer/src/stories/assets/server.svg index 50a2510d1..11dea85b4 100644 --- a/src/renderer/src/stories/assets/server.svg +++ b/src/renderer/src/stories/assets/server.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/renderer/src/stories/pages/Page.js b/src/renderer/src/stories/pages/Page.js index e23e96ba5..d9a016d02 100644 --- a/src/renderer/src/stories/pages/Page.js +++ b/src/renderer/src/stories/pages/Page.js @@ -143,11 +143,14 @@ export class Page extends LitElement { popup.hideLoading(); const element = popup.getHtmlContainer(); element.innerText = ""; - element.style.textAlign = 'left' + element.style.textAlign = "left"; const progressBar = new ProgressBar(); elements.progress = progressBar; element.append(progressBar); - element.insertAdjacentHTML('beforeend', `Note: This may take a while to complete...`) + element.insertAdjacentHTML( + "beforeend", + `Note: This may take a while to complete...` + ); // } let completed = 0; @@ -194,7 +197,7 @@ export class Page extends LitElement { } popup.close(); - element.style.textAlign = '' // Clear style update + element.style.textAlign = ""; // Clear style update return results; } diff --git a/src/renderer/src/stories/pages/guided-mode/GuidedStart.js b/src/renderer/src/stories/pages/guided-mode/GuidedStart.js index d3426d1c2..f596c2dd7 100644 --- a/src/renderer/src/stories/pages/guided-mode/GuidedStart.js +++ b/src/renderer/src/stories/pages/guided-mode/GuidedStart.js @@ -56,9 +56,9 @@ export class GuidedStartPage extends Page {
Guided Mode is divided into four high-level sections. During the first three sections, you will be directed to specify the data formats and files to include in your dataset and - provide information about your conversion pipeline. In the final section, NWB GUIDE will automatically - generate a valid NWB file and ask for your review before uploading to DANDI. Note that none - of your local data files will ever be modified or moved. + provide information about your conversion pipeline. In the final section, NWB GUIDE will + automatically generate a valid NWB file and ask for your review before uploading to DANDI. + Note that none of your local data files will ever be modified or moved.
${new InfoBox({ header: "Learn more about the conversion process", diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js b/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js index f1e28e5b0..648f91402 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js +++ b/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js @@ -35,7 +35,7 @@ export class GuidedStructurePage extends Page { search = new Search({ showAllWhenEmpty: true, - disabledLabel: "Not supported" + disabledLabel: "Not supported", }); list = new List({ diff --git a/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js b/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js index 94418fafd..662adc7ff 100644 --- a/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js +++ b/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js @@ -13,17 +13,32 @@ import baseMetadataSchema from "../../../../../../../schemas/base-metadata.schem const changesAcrossSessions = { Subject: ["weight", "subject_id", "age", "date_of_birth", "age__reference"], - NWBFile: ["session_id", "session_start_time", "identifier", "data_collection", "notes", "pharmacolocy", "session_description", "slices", "source_script", "source_script_file_name"] -} + NWBFile: [ + "session_id", + "session_start_time", + "identifier", + "data_collection", + "notes", + "pharmacolocy", + "session_description", + "slices", + "source_script", + "source_script_file_name", + ], +}; const projectMetadataSchema = merge(projectGlobalSchema, projectGeneralSchema); Object.entries(baseMetadataSchema.properties).forEach(([globalProp, v]) => { - Object.keys(v.properties).filter(prop => !(changesAcrossSessions[globalProp] ?? []).includes(prop)).forEach(prop => { - const globalNestedProp = projectMetadataSchema.properties[globalProp] ?? (projectMetadataSchema.properties[globalProp] = { properties: {} }) - globalNestedProp.properties[prop] = baseMetadataSchema.properties[globalProp].properties[prop] - }) -}) + Object.keys(v.properties) + .filter((prop) => !(changesAcrossSessions[globalProp] ?? []).includes(prop)) + .forEach((prop) => { + const globalNestedProp = + projectMetadataSchema.properties[globalProp] ?? + (projectMetadataSchema.properties[globalProp] = { properties: {} }); + globalNestedProp.properties[prop] = baseMetadataSchema.properties[globalProp].properties[prop]; + }); +}); export class GuidedNewDatasetPage extends Page { constructor(...args) { diff --git a/src/renderer/src/stories/pages/preview/PreviewPage.js b/src/renderer/src/stories/pages/preview/PreviewPage.js index 7ee86017f..e1893abe0 100644 --- a/src/renderer/src/stories/pages/preview/PreviewPage.js +++ b/src/renderer/src/stories/pages/preview/PreviewPage.js @@ -14,7 +14,7 @@ export class PreviewPage extends Page { if (path) { const result = await fetch(`${baseUrl}/files/${path}`, { method: "POST" }).then((res) => res.text()); if (result) this.neurosift.url = result; - } else this.neurosift.url = undefined + } else this.neurosift.url = undefined; }; neurosift = new Neurosift();