Skip to content

Commit

Permalink
Import alias additions across the board.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jul 26, 2024
1 parent 76a1f52 commit 7a5e07b
Show file tree
Hide file tree
Showing 314 changed files with 999 additions and 819 deletions.
6 changes: 3 additions & 3 deletions client/docs/avoid-using-global-Galaxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ component inside the old Backbone layout until the application is fully converte
```js static
// src/mvc/OldBackboneView.js

import { getGalaxyInstance } from "app";
import MyComponent from "components/MyComponent";
import { mountVueComponent } from "utils/mountVueComponent";
import { getGalaxyInstance } from "@/app";
import MyComponent from "@/components/MyComponent";
import { mountVueComponent } from "@/utils/mountVueComponent";

const OldBackboneView = {
someInitMethodYouMake() {
Expand Down
4 changes: 2 additions & 2 deletions client/docs/querying-the-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const { data: dataset } = await datasetsFetcher({ id: "testID" });

```js
import axios from "axios";
import { getAppRoot } from "onload/loadConfig";
import { rethrowSimple } from "utils/simple-error";
import { getAppRoot } from "@/onload/loadConfig";
import { rethrowSimple } from "@/utils/simple-error";

async getDataset(datasetId) {
const url = `${getAppRoot()}api/datasets/${datasetId}`;
Expand Down
3 changes: 2 additions & 1 deletion client/src/app/app.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import galaxyOptions from "@tests/test-data/bootstrapped";
import { getGalaxyInstance, setGalaxyInstance } from "app";
import Backbone from "backbone";

import { getGalaxyInstance, setGalaxyInstance } from "./";

export function setupTestGalaxy(galaxyOptions_ = null) {
galaxyOptions_ = galaxyOptions_ || galaxyOptions;
setGalaxyInstance((GalaxyApp) => {
Expand Down
3 changes: 2 additions & 1 deletion client/src/app/base-mvc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Backbone from "backbone";
import $ from "jquery";
import _ from "underscore";
import _l from "utils/localization";

import _l from "@/utils/localization";

//==============================================================================
/** Backbone model that syncs to the browser's sessionStorage API.
Expand Down
7 changes: 4 additions & 3 deletions client/src/app/galaxy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { getGalaxyInstance } from "app";
import Backbone from "backbone";
import $ from "jquery";
import _ from "underscore";
import { create, dialog } from "utils/data";
import { _getUserLocale, _setUserLocale, localize } from "utils/localization";

import { create, dialog } from "@/utils/data";
import { _getUserLocale, _setUserLocale, localize } from "@/utils/localization";

import { getGalaxyInstance } from "./";
import userModel from "./user-model";

// ============================================================================
Expand Down
9 changes: 5 additions & 4 deletions client/src/app/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// pass through the singleton accessors. All future code should access galaxy
// through getGalaxyInstance, and rarely with setGalaxyInstance

import { getGalaxyInstance, setGalaxyInstance } from "app";
import config from "config";
import { getAppRoot } from "onload/loadConfig";
import { serverPath } from "utils/serverPath";
import config from "@/config";
import { getAppRoot } from "@/onload/loadConfig";
import { serverPath } from "@/utils/serverPath";

import { getGalaxyInstance, setGalaxyInstance } from "./";

const galaxyStub = {
root: getAppRoot(),
Expand Down
4 changes: 2 additions & 2 deletions client/src/app/singleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* TODO: Make this part of galaxy.js later, once the global refs are gone
*/

import config from "config";
import { serverPath } from "utils/serverPath";
import config from "@/config";
import { serverPath } from "@/utils/serverPath";

import { GalaxyApp } from "./galaxy";

Expand Down
5 changes: 3 additions & 2 deletions client/src/app/user-model.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Backbone from "backbone";
import { getAppRoot } from "onload/loadConfig";
import _l from "utils/localization";

import { getAppRoot } from "@/onload/loadConfig";
import _l from "@/utils/localization";

//==============================================================================
/** @class Model for a Galaxy user (including anonymous users).
Expand Down
5 changes: 3 additions & 2 deletions client/src/bundleEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

/* jquery and _ are exposed via expose-loader while several external plugins rely on these */
import $ from "jquery"; // eslint-disable-line no-unused-vars
import Client from "mvc/visualization/chart/chart-client";
import _ from "underscore"; // eslint-disable-line no-unused-vars
import { TracksterUIView } from "viz/trackster";

import Client from "./mvc/visualization/chart/chart-client";
import { TracksterUIView } from "./viz/trackster";

// Previously "chart"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { computed } from "vue";
import { useEntryPointStore } from "@/stores/entryPointStore";
import ActivityItem from "components/ActivityBar/ActivityItem.vue";
import ActivityItem from "@/components/ActivityBar/ActivityItem.vue";
const { entryPoints } = storeToRefs(useEntryPointStore());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { computed } from "vue";
import { useNotificationsStore } from "@/stores/notificationsStore";
import ActivityItem from "components/ActivityBar/ActivityItem.vue";
import ActivityItem from "@/components/ActivityBar/ActivityItem.vue";
const { totalUnreadCount } = storeToRefs(useNotificationsStore());
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ActivityBar/Items/UploadItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useGlobalUploadModal } from "@/composables/globalUploadModal.js";
import { useUploadStore } from "@/stores/uploadStore";
import Query from "@/utils/query-string-parsing.js";
import ActivityItem from "components/ActivityBar/ActivityItem.vue";
import ActivityItem from "@/components/ActivityBar/ActivityItem.vue";
export interface Props {
id: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _l from "utils/localization";
import Vue from "vue";

import _l from "@/utils/localization";

import { collectionCreatorModalSetup } from "./common/modal";

function listCollectionCreatorModal(elements, options) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _l from "utils/localization";
import Vue from "vue";

import _l from "@/utils/localization";

import { collectionCreatorModalSetup } from "./common/modal";

function pairCollectionCreatorModal(elements, options) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import DATA from "@tests/test-data/paired-collection-creator.data.js";
import { mount, shallowMount } from "@vue/test-utils";
import PairedListCollectionCreator from "components/Collections/PairedListCollectionCreator";

import PairedListCollectionCreator from "./PairedListCollectionCreator";

describe("PairedListCollectionCreator", () => {
let wrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,14 @@
</template>
<script>
import BootstrapVue from "bootstrap-vue";
import STATES from "mvc/dataset/states";
import levenshteinDistance from "utils/levenshtein";
import _l from "utils/localization";
import naturalSort from "utils/natural-sort";
import Vue from "vue";
import draggable from "vuedraggable";
import STATES from "@/mvc/dataset/states";
import levenshteinDistance from "@/utils/levenshtein";
import _l from "@/utils/localization";
import naturalSort from "@/utils/natural-sort";
import mixin from "./common/mixin";
import PairedElementView from "./PairedElementView";
import UnpairedDatasetElementView from "./UnpairedDatasetElementView";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _l from "utils/localization";
import Vue from "vue";

import _l from "@/utils/localization";

import { collectionCreatorModalSetup } from "./common/modal";

import PairedListCollectionCreator from "./PairedListCollectionCreator.vue";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _l from "utils/localization";
import Vue from "vue";

import _l from "@/utils/localization";

import { collectionCreatorModalSetup } from "./common/modal";

function ruleBasedCollectionCreatorModal(elements, elementsType, importType, options) {
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Collections/common/modal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getGalaxyInstance } from "app";
import UI_MODAL from "mvc/ui/ui-modal";
import _l from "utils/localization";
import { getGalaxyInstance } from "@/app";
import UI_MODAL from "@/mvc/ui/ui-modal";
import _l from "@/utils/localization";

export function collectionCreatorModalSetup(options, Galaxy = null) {
Galaxy = Galaxy || getGalaxyInstance();
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/CopyToClipboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faCopy } from "@fortawesome/free-regular-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { copy } from "utils/clipboard";
import { copy } from "@/utils/clipboard";
library.add(faCopy);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/DataDialog/DataDialog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Services } from "./services";
import { UrlTracker } from "./utilities";

import DataDialog from "./DataDialog.vue";
import SelectionDialog from "components/SelectionDialog/SelectionDialog.vue";
import SelectionDialog from "@/components/SelectionDialog/SelectionDialog.vue";

jest.mock("app");

Expand Down
3 changes: 2 additions & 1 deletion client/src/components/DataDialog/services.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import axios from "axios";
import { getAppRoot } from "onload/loadConfig";

import { getAppRoot } from "@/onload/loadConfig";

/** Data populator traverses raw server responses **/
export class Services {
Expand Down
7 changes: 4 additions & 3 deletions client/src/components/DecodedId.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<span v-if="decoded_id">({{ decoded_id }})</span>
</template>
<script>
import { getGalaxyInstance } from "app";
import axios from "axios";
import { getAppRoot } from "onload/loadConfig";
import { rethrowSimple } from "utils/simple-error";
import { getGalaxyInstance } from "@/app";
import { getAppRoot } from "@/onload/loadConfig";
import { rethrowSimple } from "@/utils/simple-error";
export default {
props: {
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/DragGhost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { library } from "@fortawesome/fontawesome-svg-core";
import { faPaperPlane } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { storeToRefs } from "pinia";
import { useEventStore } from "stores/eventStore";
import { computed } from "vue";
import { useEventStore } from "@/stores/eventStore";
import TextShort from "./Common/TextShort.vue";
library.add(faPaperPlane);
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Form/Elements/FormDirectory.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { mount } from "@vue/test-utils";
import FilesDialog from "components/FilesDialog/FilesDialog";
import { rootResponse } from "components/FilesDialog/testingData";
import flushPromises from "flush-promises";
import { createPinia } from "pinia";
import { getLocalVue } from "tests/jest/helpers";

import { mockFetcher } from "@/api/schema/__mocks__";
import FilesDialog from "@/components/FilesDialog/FilesDialog";
import { rootResponse } from "@/components/FilesDialog/testingData";

import FormDirectory from "./FormDirectory";

Expand Down
5 changes: 3 additions & 2 deletions client/src/components/Form/Elements/FormDirectory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faFolder, faFolderOpen } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { FilesDialog } from "components/FilesDialog";
import _l from "utils/localization";
import { FilesDialog } from "@/components/FilesDialog";
import _l from "@/utils/localization";
library.add(faFolder, faFolderOpen);
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Form/Elements/FormRulesEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faEdit } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import RuleCollectionBuilder from "components/RuleCollectionBuilder";
import RulesDisplay from "components/RulesDisplay/RulesDisplay";
import { computed, ref } from "vue";
import { fetchCollectionDetails } from "@/api/datasetCollections";
import RuleCollectionBuilder from "@/components/RuleCollectionBuilder";
import RulesDisplay from "@/components/RulesDisplay/RulesDisplay";
library.add(faEdit);
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/Form/FormGeneric.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
</template>

<script>
import FormCard from "components/Form/FormCard";
import FormDisplay from "components/Form/FormDisplay";
import { visitInputs } from "components/Form/utilities";
import { UrlDataProvider } from "components/providers/UrlDataProvider";
import { withPrefix } from "utils/redirect";
import { UrlDataProvider } from "@/components/providers/UrlDataProvider";
import { withPrefix } from "@/utils/redirect";
import FormCard from "./FormCard";
import FormDisplay from "./FormDisplay";
import { submitData } from "./services";
import { visitInputs } from "./utilities";
export default {
components: {
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/Form/services.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import axios from "axios";
import { withPrefix } from "utils/redirect";
import { rethrowSimple } from "utils/simple-error";

import { withPrefix } from "@/utils/redirect";
import { rethrowSimple } from "@/utils/simple-error";

export async function submitData(url, payload) {
try {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Grid/Grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</template>

<script>
import GridView from "mvc/grid/grid-view";
import { getAppRoot } from "onload";
import GridView from "@/mvc/grid/grid-view";
import { getAppRoot } from "@/onload";
export default {
props: {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/History/Content/ContentItem.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { createTestingPinia } from "@pinia/testing";
import { mount } from "@vue/test-utils";
import { updateContentFields } from "components/History/model/queries";
import { PiniaVuePlugin } from "pinia";
import { getLocalVue } from "tests/jest/helpers";
import VueRouter from "vue-router";

import { mockFetcher } from "@/api/schema/__mocks__";
import { updateContentFields } from "@/components/History/model/queries";

import ContentItem from "./ContentItem";

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/History/Content/ExpandedItems.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { loadSet, saveSet } from "utils/setCache";
import { loadSet, saveSet } from "@/utils/setCache";

export default {
props: {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/History/Content/GenericItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
</template>

<script>
import LoadingSpan from "components/LoadingSpan";
import { Toast } from "composables/toast";
import { mapActions } from "pinia";
import { deleteContent, updateContentFields } from "@/components/History/model/queries";
import LoadingSpan from "@/components/LoadingSpan";
import { DatasetCollectionProvider, DatasetProvider } from "@/components/providers";
import { DatasetCollectionElementProvider } from "@/components/providers/storeProviders";
import { Toast } from "@/composables/toast";
import { useHistoryStore } from "@/stores/historyStore";
import { errorMessageAsString } from "@/utils/simple-error";
Expand Down
Loading

0 comments on commit 7a5e07b

Please sign in to comment.