Skip to content

Commit

Permalink
Apply type import enforcement/formatting to vue components.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jul 23, 2024
1 parent 0f3bbb5 commit a4d5cac
Show file tree
Hide file tree
Showing 54 changed files with 89 additions and 66 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Citation/CitationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { computed } from "vue";
import { Citation } from ".";
import { type Citation } from ".";
library.add(faExternalLinkAlt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import localize from "@/utils/localization";
import { prependPath } from "@/utils/redirect";
import { errorMessageAsString } from "@/utils/simple-error";
import { HistoryContentBulkOperationPayload, updateHistoryItemsBulk } from "./services";
import { type HistoryContentBulkOperationPayload, updateHistoryItemsBulk } from "./services";
import ChangeDatatypeTab from "@/components/Collections/common/ChangeDatatypeTab.vue";
import DatabaseEditTab from "@/components/Collections/common/DatabaseEditTab.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/ExportForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { BButton, BCol, BFormGroup, BFormInput, BRow } from "bootstrap-vue";
import { computed, ref } from "vue";
import { FilterFileSourcesOptions } from "@/api/remoteFiles";
import { type FilterFileSourcesOptions } from "@/api/remoteFiles";
import localize from "@/utils/localization";
import FilesInput from "@/components/FilesDialog/FilesInput.vue";
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Common/ExportRDMForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { BButton, BCard, BFormGroup, BFormInput, BFormRadio, BFormRadioGroup } f
import { computed, ref } from "vue";
import {
BrowsableFilesSourcePlugin,
CreatedEntry,
type BrowsableFilesSourcePlugin,
type CreatedEntry,
createRemoteEntry,
FilterFileSourcesOptions,
type FilterFileSourcesOptions,
} from "@/api/remoteFiles";
import { useToast } from "@/composables/toast";
import localize from "@/utils/localization";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/ExportRecordDOILink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import axios from "axios";
import { ref, watch } from "vue";
import { BrowsableFilesSourcePlugin } from "@/api/remoteFiles";
import { type BrowsableFilesSourcePlugin } from "@/api/remoteFiles";
import { useFileSources } from "@/composables/fileSources";
import DOILink from "./DOILink.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/ExportRecordDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { BAlert, BButton } from "bootstrap-vue";
import { computed } from "vue";
import type { ColorVariant } from ".";
import { ExportRecord } from "./models/exportRecordModel";
import { type ExportRecord } from "./models/exportRecordModel";
import Heading from "@/components/Common/Heading.vue";
import LoadingSpan from "@/components/LoadingSpan.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/FilterMenuDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BButton, BDropdown, BDropdownItem, BInputGroup, BInputGroupAppend, BMod
import { capitalize } from "lodash";
import { computed, onMounted, ref, type UnwrapRef, watch } from "vue";
import { QuotaUsage } from "@/components/User/DiskUsage/Quota/model";
import { type QuotaUsage } from "@/components/User/DiskUsage/Quota/model";
import { type FilterType, type ValidFilter } from "@/utils/filtering";
import { errorMessageAsString } from "@/utils/simple-error";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/FilterMenuMultiTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { BInputGroup } from "bootstrap-vue";
import { computed, ref, watch } from "vue";
import { ValidFilter } from "@/utils/filtering";
import { type ValidFilter } from "@/utils/filtering";
import StatelessTags from "@/components/TagsMultiselect/StatelessTags.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/FilterMenuObjectStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed, ref, watch } from "vue";
import { useSelectableObjectStores } from "@/composables/useObjectStores";
import { ValidFilter } from "@/utils/filtering";
import { type ValidFilter } from "@/utils/filtering";
import FilterObjectStoreLink from "./FilterObjectStoreLink.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/FilterObjectStoreLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { faTimes } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { computed, ref } from "vue";
import { ConcreteObjectStoreModel } from "@/api";
import { type ConcreteObjectStoreModel } from "@/api";
import { useObjectStoreStore } from "@/stores/objectStoreStore";
import ObjectStoreSelect from "./ObjectStoreSelect.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/ObjectStoreSelect.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ConcreteObjectStoreModel } from "@/api";
import { type ConcreteObjectStoreModel } from "@/api";
import ObjectStoreSelectButton from "@/components/ObjectStore/ObjectStoreSelectButton.vue";
import ObjectStoreSelectButtonDescribePopover from "@/components/ObjectStore/ObjectStoreSelectButtonDescribePopover.vue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BAlert, BLink } from "bootstrap-vue";
import { computed, watch } from "vue";
import { TaskMonitor } from "@/composables/genericTaskMonitor";
import { MonitoringRequest, usePersistentProgressTaskMonitor } from "@/composables/persistentProgressMonitor";
import { type TaskMonitor } from "@/composables/genericTaskMonitor";
import { type MonitoringRequest, usePersistentProgressTaskMonitor } from "@/composables/persistentProgressMonitor";
import { useShortTermStorage } from "@/composables/shortTermStorage";
import UtcDate from "@/components/UtcDate.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ConfigTemplates/EditSecretsForm.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { TemplateSummary } from "@/api/configTemplates";
import { type TemplateSummary } from "@/api/configTemplates";
import VaultSecret from "./VaultSecret.vue";
import FormCard from "@/components/Form/FormCard.vue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed } from "vue";
import type { DatasetExtraFiles } from "@/api/datasets";
import { PathDestination, useDatasetPathDestination } from "@/composables/datasetPathDestination";
import { type PathDestination, useDatasetPathDestination } from "@/composables/datasetPathDestination";
interface Props {
historyDatasetId: string;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Dataset/DatasetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BAlert, BTable } from "bootstrap-vue";
import { storeToRefs } from "pinia";
import { computed, onMounted, ref } from "vue";
import { HDASummary } from "@/api";
import { type HDASummary } from "@/api";
import { copyDataset, getDatasets } from "@/api/datasets";
import { updateTags } from "@/api/tags";
import { useHistoryStore } from "@/stores/historyStore";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Dataset/DatasetName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BLink } from "bootstrap-vue";
import { computed } from "vue";
import { HDASummary } from "@/api";
import { type HDASummary } from "@/api";
library.add(faCaretDown, faCopy, faEye, faTimesCircle, faPause);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, ref, watch } from "vue";
import { DatasetStorageDetails } from "@/api";
import { type DatasetStorageDetails } from "@/api";
import { fetchDatasetStorage } from "@/api/datasets";
import { errorMessageAsString } from "@/utils/simple-error";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ConcreteObjectStoreModel } from "@/api";
import { type ConcreteObjectStoreModel } from "@/api";
import ObjectStoreSelectButton from "@/components/ObjectStore/ObjectStoreSelectButton.vue";
import ObjectStoreSelectButtonDescribePopover from "@/components/ObjectStore/ObjectStoreSelectButtonDescribePopover.vue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BButton } from "bootstrap-vue";
import { storeToRefs } from "pinia";
import { computed, ref } from "vue";
import { ConcreteObjectStoreModel, DatasetStorageDetails } from "@/api";
import { type ConcreteObjectStoreModel, type DatasetStorageDetails } from "@/api";
import { updateObjectStore } from "@/api/objectStores";
import { useObjectStoreStore } from "@/stores/objectStoreStore";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { onMounted, onUnmounted, ref } from "vue";
import { type HDADetailed } from "@/api";
import { fetchDatasetDetails } from "@/api/datasets";
import { fetchJobDetails, JobDetails } from "@/api/jobs";
import { fetchJobDetails, type JobDetails } from "@/api/jobs";
import { useConfig } from "@/composables/config";
import { useUserStore } from "@/stores/userStore";
import { stateIsTerminal } from "@/utils/utils";
Expand Down
10 changes: 8 additions & 2 deletions client/src/components/DatasetInformation/DatasetError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faBug } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { AxiosError } from "axios";
import { type AxiosError } from "axios";
import { BAlert, BButton } from "bootstrap-vue";
import { storeToRefs } from "pinia";
import { computed, onMounted, ref } from "vue";
import { type HDADetailed } from "@/api";
import { fetchDatasetDetails } from "@/api/datasets";
import { fetchJobCommonProblems, fetchJobDetails, JobDetails, JobInputSummary, postJobErrorReport } from "@/api/jobs";
import {
fetchJobCommonProblems,
fetchJobDetails,
type JobDetails,
type JobInputSummary,
postJobErrorReport,
} from "@/api/jobs";
import { useMarkdown } from "@/composables/markdown";
import { useUserStore } from "@/stores/userStore";
import localize from "@/utils/localization";
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/FilesDialog/FilesDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import Vue, { computed, onMounted, ref } from "vue";
import {
browseRemoteFiles,
fetchFileSources,
FileSourceBrowsingMode,
FilterFileSourcesOptions,
RemoteEntry,
type FileSourceBrowsingMode,
type FilterFileSourcesOptions,
type RemoteEntry,
} from "@/api/remoteFiles";
import { UrlTracker } from "@/components/DataDialog/utilities";
import { fileSourcePluginToItem, isSubPath } from "@/components/FilesDialog/utilities";
import {
ItemsProvider,
ItemsProviderContext,
type ItemsProvider,
type ItemsProviderContext,
SELECTION_STATES,
type SelectionItem,
} from "@/components/SelectionDialog/selectionTypes";
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/FilesDialog/FilesInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { BFormInput } from "bootstrap-vue";
import { computed } from "vue";
import { FileSourceBrowsingMode, FilterFileSourcesOptions } from "@/api/remoteFiles";
import { type FileSourceBrowsingMode, type FilterFileSourcesOptions } from "@/api/remoteFiles";
import { filesDialog } from "@/utils/data";
import { SelectionItem } from "../SelectionDialog/selectionTypes";
import { type SelectionItem } from "../SelectionDialog/selectionTypes";
interface Props {
value: string;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/GDateTime.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { BFormInput, BInputGroup } from "bootstrap-vue";
import { Tuple } from "types/utilityTypes";
import { type Tuple } from "types/utilityTypes";
import { computed } from "vue";
const props = defineProps<{
Expand Down
9 changes: 8 additions & 1 deletion client/src/components/Grid/GridList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import { BAlert, BButton, BCard, BFormCheckbox, BOverlay, BPagination } from "bo
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from "vue";
import { useRouter } from "vue-router/composables";
import { BatchOperation, FieldEntry, FieldHandler, GridConfig, Operation, RowData } from "./configs/types";
import {
type BatchOperation,
type FieldEntry,
type FieldHandler,
type GridConfig,
type Operation,
type RowData,
} from "./configs/types";
import HelpText from "../Help/HelpText.vue";
import SwitchToHistoryLink from "../History/SwitchToHistoryLink.vue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BBadge, BButton, BButtonGroup } from "bootstrap-vue";
import { computed } from "vue";
import { ArchivedHistorySummary } from "@/api/histories.archived";
import { type ArchivedHistorySummary } from "@/api/histories.archived";
import localize from "@/utils/localization";
import ExportRecordDOILink from "@/components/Common/ExportRecordDOILink.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/History/Archiving/HistoryArchive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { computed, onMounted, ref, watch } from "vue";
import { useRouter } from "vue-router/composables";
import {
ArchivedHistorySummary,
type ArchivedHistorySummary,
fetchArchivedHistories,
reimportArchivedHistoryFromExportRecord,
} from "@/api/histories.archived";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
at components/JobStates/CollectionJobStates but it relies on the backbone data
model, so probably has to go eventually.-->
<script setup lang="ts">
import { JobStateSummary } from "./JobStateSummary";
import { type JobStateSummary } from "./JobStateSummary";

interface Props {
summary: JobStateSummary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed } from "vue";
import { useRouter } from "vue-router/composables";
import { HDCADetailed } from "@/api";
import { type HDCADetailed } from "@/api";
import { getAppRoot } from "@/onload/loadConfig";
const router = useRouter();
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/History/Export/HistoryExport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
reimportHistoryFromRecord,
} from "@/api/histories.export";
import type { ColorVariant } from "@/components/Common";
import { areEqual, ExportParams, ExportRecord } from "@/components/Common/models/exportRecordModel";
import { areEqual, type ExportParams, type ExportRecord } from "@/components/Common/models/exportRecordModel";
import { useConfirmDialog } from "@/composables/confirmDialog";
import { useFileSources } from "@/composables/fileSources";
import { DEFAULT_EXPORT_PARAMS, useShortTermStorage } from "@/composables/shortTermStorage";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { computed, type Ref, ref } from "vue";
//@ts-ignore missing typedefs
import VirtualList from "vue-virtual-scroll-list";
import { HistoryItemSummary, isHistoryItem } from "@/api";
import { type HistoryItemSummary, isHistoryItem } from "@/api";
import { copyDataset } from "@/api/datasets";
import { useAnimationFrameResizeObserver } from "@/composables/sensors/animationFrameResizeObserver";
import { useAnimationFrameScroll } from "@/composables/sensors/animationFrameScroll";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/History/SwitchToHistoryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BLink } from "bootstrap-vue";
import { computed } from "vue";
import { useRouter } from "vue-router/composables";
import { HistorySummary } from "@/api";
import { type HistorySummary } from "@/api";
import { useHistoryStore } from "@/stores/historyStore";
import LoadingSpan from "@/components/LoadingSpan.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Markdown/Elements/JobSelection.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { SelectOption } from "./handlesMappingJobs";
import { type SelectOption } from "./handlesMappingJobs";
interface JobSelectionProps {
jobId?: string;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Markdown/LabelSelector.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { WorkflowLabel } from "./labels";
import { type WorkflowLabel } from "./labels";
interface LabelSelectorProps {
hasLabels: boolean;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Markdown/MarkdownDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { jobsFetcher } from "@/api/jobs";
import { workflowsFetcher } from "@/api/workflows";
import { useHistoryStore } from "@/stores/historyStore";
import { WorkflowLabel, WorkflowLabels } from "./labels";
import { type WorkflowLabel, type WorkflowLabels } from "./labels";
import MarkdownSelector from "./MarkdownSelector.vue";
import MarkdownVisualization from "./MarkdownVisualization.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Markdown/MarkdownSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { BModal } from "bootstrap-vue";
import { computed, ref } from "vue";
import { WorkflowLabel } from "./labels";
import { type WorkflowLabel } from "./labels";
import LabelSelector from "./LabelSelector.vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ObjectStore/ObjectStoreTypeSpan.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed } from "vue";
import { ObjectStoreTemplateType } from "@/api/objectStores";
import { type ObjectStoreTemplateType } from "@/api/objectStores";
const MESSAGES = {
aws_s3: "This is a storage location based on the Amazon Simple Storage Service (S3). Data here is hosted by Amazon.",
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ObjectStore/SelectObjectStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { storeToRefs } from "pinia";
import { computed, ref } from "vue";
import { ConcreteObjectStoreModel } from "@/api";
import { type ConcreteObjectStoreModel } from "@/api";
import { useStorageLocationConfiguration } from "@/composables/storageLocation";
import { useObjectStoreStore } from "@/stores/objectStoreStore";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/PageEditor/ObjectPermissions.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import axios from "axios";
import Vue, { computed, Ref, ref, watch } from "vue";
import Vue, { computed, type Ref, ref, watch } from "vue";
import { fetchCollectionSummary } from "@/api/datasetCollections";
import { enableLink, sharing } from "@/api/histories";
Expand Down
Loading

0 comments on commit a4d5cac

Please sign in to comment.