From 56302214283d2137ced48399cd2a9489386cb437 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 12 Dec 2023 18:14:52 +0100 Subject: [PATCH] Use absolute imports for web components In some Rails apps it does not work with relative imports. --- app/javascript/alchemy_admin/components/char_counter.js | 2 +- app/javascript/alchemy_admin/components/datepicker.js | 2 +- app/javascript/alchemy_admin/components/node_select.js | 2 +- app/javascript/alchemy_admin/components/overlay.js | 2 +- app/javascript/alchemy_admin/components/page_select.js | 2 +- app/javascript/alchemy_admin/components/remote_select.js | 2 +- app/javascript/alchemy_admin/components/spinner.js | 2 +- app/javascript/alchemy_admin/components/tinymce.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/javascript/alchemy_admin/components/char_counter.js b/app/javascript/alchemy_admin/components/char_counter.js index b36b91ec8e..2a8752b43d 100644 --- a/app/javascript/alchemy_admin/components/char_counter.js +++ b/app/javascript/alchemy_admin/components/char_counter.js @@ -1,7 +1,7 @@ /** * Show the character counter below input fields and textareas */ -import { AlchemyHTMLElement } from "./alchemy_html_element" +import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element" import { translate } from "alchemy_admin/i18n" class CharCounter extends AlchemyHTMLElement { diff --git a/app/javascript/alchemy_admin/components/datepicker.js b/app/javascript/alchemy_admin/components/datepicker.js index ef83f038ab..22d7ca287b 100644 --- a/app/javascript/alchemy_admin/components/datepicker.js +++ b/app/javascript/alchemy_admin/components/datepicker.js @@ -1,4 +1,4 @@ -import { AlchemyHTMLElement } from "./alchemy_html_element" +import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element" import { translate, currentLocale } from "alchemy_admin/i18n" import flatpickr from "flatpickr" diff --git a/app/javascript/alchemy_admin/components/node_select.js b/app/javascript/alchemy_admin/components/node_select.js index 5e648bb28a..e3d17c1bdd 100644 --- a/app/javascript/alchemy_admin/components/node_select.js +++ b/app/javascript/alchemy_admin/components/node_select.js @@ -1,4 +1,4 @@ -import { RemoteSelect } from "./remote_select" +import { RemoteSelect } from "alchemy_admin/components/remote_select" class NodeSelect extends RemoteSelect { _searchQuery(term, page) { diff --git a/app/javascript/alchemy_admin/components/overlay.js b/app/javascript/alchemy_admin/components/overlay.js index 6db711350f..cbfd58c464 100644 --- a/app/javascript/alchemy_admin/components/overlay.js +++ b/app/javascript/alchemy_admin/components/overlay.js @@ -1,4 +1,4 @@ -import { AlchemyHTMLElement } from "./alchemy_html_element" +import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element" class Overlay extends AlchemyHTMLElement { static properties = { diff --git a/app/javascript/alchemy_admin/components/page_select.js b/app/javascript/alchemy_admin/components/page_select.js index cac24fe1de..7d2475bf43 100644 --- a/app/javascript/alchemy_admin/components/page_select.js +++ b/app/javascript/alchemy_admin/components/page_select.js @@ -1,4 +1,4 @@ -import { RemoteSelect } from "./remote_select" +import { RemoteSelect } from "alchemy_admin/components/remote_select" class PageSelect extends RemoteSelect { onChange(event) { diff --git a/app/javascript/alchemy_admin/components/remote_select.js b/app/javascript/alchemy_admin/components/remote_select.js index 6ed12036b9..4612473373 100644 --- a/app/javascript/alchemy_admin/components/remote_select.js +++ b/app/javascript/alchemy_admin/components/remote_select.js @@ -1,4 +1,4 @@ -import { AlchemyHTMLElement } from "./alchemy_html_element" +import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element" export class RemoteSelect extends AlchemyHTMLElement { static properties = { diff --git a/app/javascript/alchemy_admin/components/spinner.js b/app/javascript/alchemy_admin/components/spinner.js index d2fb01104b..8b0cdc88e7 100644 --- a/app/javascript/alchemy_admin/components/spinner.js +++ b/app/javascript/alchemy_admin/components/spinner.js @@ -1,4 +1,4 @@ -import { AlchemyHTMLElement } from "./alchemy_html_element" +import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element" class Spinner extends AlchemyHTMLElement { static properties = { diff --git a/app/javascript/alchemy_admin/components/tinymce.js b/app/javascript/alchemy_admin/components/tinymce.js index 1548e4d7df..349e4ee52c 100644 --- a/app/javascript/alchemy_admin/components/tinymce.js +++ b/app/javascript/alchemy_admin/components/tinymce.js @@ -1,4 +1,4 @@ -import { AlchemyHTMLElement } from "./alchemy_html_element" +import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_element" import { currentLocale } from "alchemy_admin/i18n" const TOOLBAR_ROW_HEIGHT = 30