Skip to content

Commit

Permalink
Use absolute imports for web components
Browse files Browse the repository at this point in the history
In some Rails apps it does not work with relative imports.
  • Loading branch information
tvdeyen committed Dec 12, 2023
1 parent 385e7b1 commit 5630221
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/char_counter.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/datepicker.js
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/node_select.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RemoteSelect } from "./remote_select"
import { RemoteSelect } from "alchemy_admin/components/remote_select"

class NodeSelect extends RemoteSelect {
_searchQuery(term, page) {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/overlay.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/page_select.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RemoteSelect } from "./remote_select"
import { RemoteSelect } from "alchemy_admin/components/remote_select"

class PageSelect extends RemoteSelect {
onChange(event) {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/remote_select.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/spinner.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/components/tinymce.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5630221

Please sign in to comment.