From 28c060d0b42f98ed171d9a7211899b36cc2a5341 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Mon, 26 Aug 2024 16:19:30 +0200 Subject: [PATCH] refactor: import all @/directives/* where used --- app/index.ts | 3 --- app/scripts/components/extended/tokens.js | 1 + app/scripts/components/results.js | 1 + app/scripts/components/searchtabs.js | 1 + app/scripts/directives/{scroll.ts => scroll-to-start.ts} | 0 app/scripts/extended.js | 1 + 6 files changed, 4 insertions(+), 3 deletions(-) rename app/scripts/directives/{scroll.ts => scroll-to-start.ts} (100%) diff --git a/app/index.ts b/app/index.ts index 6fd47b210..d72e9acb1 100644 --- a/app/index.ts +++ b/app/index.ts @@ -84,8 +84,5 @@ require("./scripts/services/searches") require("./scripts/services/utils") require("./scripts/extended.js") require("./scripts/struct_services.js") -require("./scripts/directives/escaper") -require("./scripts/directives/scroll") -require("./scripts/directives/tab-hash") require("./scripts/filter_directives.js") require("./scripts/matomo.js") diff --git a/app/scripts/components/extended/tokens.js b/app/scripts/components/extended/tokens.js index 0f56f310a..42338470e 100644 --- a/app/scripts/components/extended/tokens.js +++ b/app/scripts/components/extended/tokens.js @@ -7,6 +7,7 @@ import { html } from "@/util" import "@/components/extended/token" import "@/components/extended/struct-token" import "@/components/extended/add-box" +import "@/directives/scroll-to-start" angular.module("korpApp").component("extendedTokens", { template: html` diff --git a/app/scripts/components/results.js b/app/scripts/components/results.js index 6e7ae06ac..f4024998d 100644 --- a/app/scripts/components/results.js +++ b/app/scripts/components/results.js @@ -11,6 +11,7 @@ import "@/components/kwic" import "@/components/statistics" import "@/components/sidebar" import "@/components/word-picture" +import "@/directives/tab-hash" import "@/directives/tab-preloader" angular.module("korpApp").component("results", { diff --git a/app/scripts/components/searchtabs.js b/app/scripts/components/searchtabs.js index ea1c8da08..3fa935806 100644 --- a/app/scripts/components/searchtabs.js +++ b/app/scripts/components/searchtabs.js @@ -10,6 +10,7 @@ import "@/components/advanced-search" import "@/components/compare-search" import "@/directives/click-cover" import "@/directives/reduce-select" +import "@/directives/tab-hash" angular.module("korpApp").component("searchtabs", { template: html` diff --git a/app/scripts/directives/scroll.ts b/app/scripts/directives/scroll-to-start.ts similarity index 100% rename from app/scripts/directives/scroll.ts rename to app/scripts/directives/scroll-to-start.ts diff --git a/app/scripts/extended.js b/app/scripts/extended.js index f7c04d2f4..69e452926 100644 --- a/app/scripts/extended.js +++ b/app/scripts/extended.js @@ -6,6 +6,7 @@ import { html, regescape, unregescape } from "@/util" import { loc, locAttribute } from "@/i18n" import "@/components/autoc" import "@/components/datetime-picker" +import "@/directives/escaper" import "@/directives/popper" let customExtendedTemplates = {}