diff --git a/app/index.ts b/app/index.ts index d72e9acb1..94334eaab 100644 --- a/app/index.ts +++ b/app/index.ts @@ -77,11 +77,6 @@ require("./scripts/controllers/word_picture_controller") require("./scripts/map_controllers.js") require("./scripts/text_reader_controller.js") require("./scripts/video_controllers.js") -require("./scripts/services/backend") -require("./scripts/services/compare-searches") -require("./scripts/services/lexicons") -require("./scripts/services/searches") -require("./scripts/services/utils") require("./scripts/extended.js") require("./scripts/struct_services.js") require("./scripts/filter_directives.js") diff --git a/app/scripts/components/advanced-search.js b/app/scripts/components/advanced-search.js index 0a7bbe846..fc8d6c2e5 100644 --- a/app/scripts/components/advanced-search.js +++ b/app/scripts/components/advanced-search.js @@ -1,6 +1,7 @@ /** @format */ import angular from "angular" import { html } from "@/util" +import "@/services/compare-searches" import "@/directives/search-submit" angular.module("korpApp").component("advancedSearch", { diff --git a/app/scripts/components/autoc.js b/app/scripts/components/autoc.js index 2dd976a6d..5d90b4666 100644 --- a/app/scripts/components/autoc.js +++ b/app/scripts/components/autoc.js @@ -4,6 +4,7 @@ import angular from "angular" import settings from "@/settings" import { html, lemgramToString, saldoToString } from "@/util" import { loc } from "@/i18n" +import "@/services/lexicons" import "@/directives/typeahead-click-open" angular.module("korpApp").component("autoc", { diff --git a/app/scripts/components/compare-search.js b/app/scripts/components/compare-search.js index 42f0ddf99..bcd6048f4 100644 --- a/app/scripts/components/compare-search.js +++ b/app/scripts/components/compare-search.js @@ -2,6 +2,8 @@ import angular from "angular" import _ from "lodash" import settings from "@/settings" +import "@/services/backend" +import "@/services/compare-searches" import { html, valfilter } from "@/util" angular.module("korpApp").component("compareSearch", { diff --git a/app/scripts/components/extended/extended-parallel.js b/app/scripts/components/extended/extended-parallel.js index 8525fdea3..bba174979 100644 --- a/app/scripts/components/extended/extended-parallel.js +++ b/app/scripts/components/extended/extended-parallel.js @@ -4,6 +4,7 @@ import _ from "lodash" import settings from "@/settings" import { expandOperators } from "@/cqp_parser/cqp" import { html } from "@/util" +import "@/services/searches" import "@/components/extended/tokens" angular.module("korpApp").component("extendedParallel", { diff --git a/app/scripts/components/extended/extended-standard.js b/app/scripts/components/extended/extended-standard.js index c65e58b0c..95137a46e 100644 --- a/app/scripts/components/extended/extended-standard.js +++ b/app/scripts/components/extended/extended-standard.js @@ -5,6 +5,7 @@ import statemachine from "@/statemachine" import settings from "@/settings" import { expandOperators, mergeCqpExprs, parse, stringify, supportsInOrder } from "@/cqp_parser/cqp" import { html } from "@/util" +import "@/services/compare-searches" import "@/components/extended/tokens" import "@/directives/search-submit" diff --git a/app/scripts/components/frontpage.ts b/app/scripts/components/frontpage.ts index 45e9c53e9..5562c6bdf 100644 --- a/app/scripts/components/frontpage.ts +++ b/app/scripts/components/frontpage.ts @@ -1,13 +1,14 @@ /** @format */ import angular from "angular" +import settings from "@/settings" +import { RootScope } from "@/root-scope.types" +import { SearchesService } from "@/services/searches" import { html } from "@/util" import { isEnabled } from "@/news-service" +import "@/services/searches" import "@/components/corpus-updates" import "@/components/newsdesk" import "@/components/search-examples" -import settings from "@/settings" -import { RootScope } from "@/root-scope.types" -import { SearchesService } from "@/services/searches" export default angular.module("korpApp").component("frontpage", { template: html` diff --git a/app/scripts/components/header.js b/app/scripts/components/header.js index a4854dfca..0a6749848 100644 --- a/app/scripts/components/header.js +++ b/app/scripts/components/header.js @@ -9,6 +9,7 @@ import guLogo from "../../img/gu_logo_sv_head.svg" import settings from "@/settings" import currentMode from "@/mode" import { collatorSort, html } from "@/util" +import "@/services/utils" import "@/components/corpus_chooser/corpus-chooser" import "@/components/radio-list" import "@/directives/popper" diff --git a/app/scripts/components/results.js b/app/scripts/components/results.js index f4024998d..9ef766a7f 100644 --- a/app/scripts/components/results.js +++ b/app/scripts/components/results.js @@ -1,6 +1,7 @@ /** @format */ import angular from "angular" import { html } from "@/util" +import "@/services/searches" import "@/components/dynamic_tabs/compare-tabs" import "@/components/dynamic_tabs/graph-tabs" import "@/components/dynamic_tabs/kwic-tabs" diff --git a/app/scripts/components/searchtabs.js b/app/scripts/components/searchtabs.js index 3fa935806..1d2126c7b 100644 --- a/app/scripts/components/searchtabs.js +++ b/app/scripts/components/searchtabs.js @@ -3,6 +3,8 @@ import angular from "angular" import _ from "lodash" import settings from "@/settings" import { html } from "@/util" +import "@/services/compare-searches" +import "@/services/searches" import "@/components/simple-search" import "@/components/extended/extended-standard" import "@/components/extended/extended-parallel" diff --git a/app/scripts/components/sidebar.js b/app/scripts/components/sidebar.js index f82f62a15..8375a912b 100644 --- a/app/scripts/components/sidebar.js +++ b/app/scripts/components/sidebar.js @@ -7,6 +7,7 @@ import settings from "@/settings" import { stringify } from "@/stringify.js" import { html, regescape, splitLemgram, safeApply } from "@/util" import { loc, locAttribute } from "@/i18n" +import "@/services/utils" import "@/components/deptree/deptree" let sidebarComponents = {} diff --git a/app/scripts/components/simple-search.js b/app/scripts/components/simple-search.js index bc3a05f5c..8a75bc630 100644 --- a/app/scripts/components/simple-search.js +++ b/app/scripts/components/simple-search.js @@ -5,6 +5,9 @@ import statemachine from "@/statemachine" import settings from "@/settings" import { expandOperators, mergeCqpExprs, parse, stringify, supportsInOrder } from "@/cqp_parser/cqp" import { html, regescape, saldoToHtml, unregescape } from "@/util" +import "@/services/compare-searches" +import "@/services/lexicons" +import "@/services/searches" import "@/components/autoc" import "@/directives/search-submit" diff --git a/app/scripts/components/statistics.js b/app/scripts/components/statistics.js index 994504555..ca6bbe40a 100644 --- a/app/scripts/components/statistics.js +++ b/app/scripts/components/statistics.js @@ -7,6 +7,8 @@ import { html } from "@/util" import { loc, locObj } from "@/i18n" import { getCqp } from "../../config/statistics_config.js" import { expandOperators } from "@/cqp_parser/cqp" +import "@/services/backend" +import "@/services/searches" import "@/components/corpus-distribution-chart" angular.module("korpApp").component("statistics", { diff --git a/app/scripts/controllers/example_controller.ts b/app/scripts/controllers/example_controller.ts index b52963a8f..1cde3d48b 100644 --- a/app/scripts/controllers/example_controller.ts +++ b/app/scripts/controllers/example_controller.ts @@ -8,6 +8,7 @@ import { KwicTab, RootScope } from "@/root-scope.types" import { KorpResponse, ProgressReport } from "@/backend/types" import { KorpQueryResponse } from "@/backend/kwic-proxy" import { UtilsService } from "@/services/utils" +import "@/services/utils" const korpApp = angular.module("korpApp") diff --git a/app/scripts/controllers/kwic_controller.ts b/app/scripts/controllers/kwic_controller.ts index 60d2ee48f..48f7df1ef 100644 --- a/app/scripts/controllers/kwic_controller.ts +++ b/app/scripts/controllers/kwic_controller.ts @@ -7,6 +7,7 @@ import { RootScope } from "@/root-scope.types" import { LocationService } from "@/urlparams" import { KorpResponse, ProgressReport } from "@/backend/types" import { UtilsService } from "@/services/utils" +import "@/services/utils" angular.module("korpApp").directive("kwicCtrl", () => ({ controller: KwicCtrl })) diff --git a/app/scripts/controllers/statistics_controller.ts b/app/scripts/controllers/statistics_controller.ts index 4779ddf02..b99f5aeb6 100644 --- a/app/scripts/controllers/statistics_controller.ts +++ b/app/scripts/controllers/statistics_controller.ts @@ -11,6 +11,7 @@ import { Dataset } from "@/statistics_worker" import { SearchParams } from "@/statistics.types" import { SlickgridColumn } from "@/statistics" import { SearchesService } from "@/services/searches" +import "@/services/searches" type StatsResultCtrlScope = IScope & { $parent: any diff --git a/app/scripts/controllers/word_picture_controller.ts b/app/scripts/controllers/word_picture_controller.ts index a0b06d050..0fe9c1d44 100644 --- a/app/scripts/controllers/word_picture_controller.ts +++ b/app/scripts/controllers/word_picture_controller.ts @@ -9,6 +9,7 @@ import { LocationService } from "@/urlparams" import { KorpResponse, ProgressReport } from "@/backend/types" import { WordPictureDefItem } from "@/settings/app-settings.types" import { SearchesService } from "@/services/searches" +import "@/services/searches" type WordpicCtrlScope = IScope & { $parent: any diff --git a/app/scripts/directives/tab-hash.ts b/app/scripts/directives/tab-hash.ts index d8cbf33ae..0f3d9952e 100644 --- a/app/scripts/directives/tab-hash.ts +++ b/app/scripts/directives/tab-hash.ts @@ -3,6 +3,7 @@ import _ from "lodash" import angular, { IScope, ITimeoutService } from "angular" import { UtilsService } from "@/services/utils" import { LocationService } from "@/urlparams" +import "@/services/utils" type TabHashScope = IScope & { activeTab: number diff --git a/app/scripts/services/backend.ts b/app/scripts/services/backend.ts index 6fcff5bbc..51202e6d7 100644 --- a/app/scripts/services/backend.ts +++ b/app/scripts/services/backend.ts @@ -9,6 +9,7 @@ import { httpConfAddMethod, httpConfAddMethodAngular } from "@/util" import { KorpStatsResponse, normalizeStatsData } from "@/backend/stats-proxy" import { MapResult, parseMapData } from "@/map_services" import { KorpQueryResponse } from "@/backend/kwic-proxy" +import "@/services/lexicons" export type BackendService = { requestCompare: (cmpObj1: SavedSearch, cmpObj2: SavedSearch, reduce: string[]) => IPromise diff --git a/app/scripts/text_reader_controller.js b/app/scripts/text_reader_controller.js index 059a8d589..ea71d97ae 100644 --- a/app/scripts/text_reader_controller.js +++ b/app/scripts/text_reader_controller.js @@ -2,6 +2,7 @@ import _ from "lodash" import statemachine from "./statemachine" import settings from "@/settings" +import "@/services/backend" import "@/components/readingmode" const korpApp = angular.module("korpApp")