From aa9d32dd153ed16943ad8be5e8795afaad24d0cf Mon Sep 17 00:00:00 2001 From: GeoSot Date: Wed, 26 Oct 2022 08:26:51 +0300 Subject: Use explicit imports in our javascript source files (#36854) --- js/src/alert.js | 8 ++++---- js/src/base-component.js | 8 ++++---- js/src/button.js | 6 +++--- js/src/carousel.js | 12 ++++++------ js/src/collapse.js | 8 ++++---- js/src/dom/event-handler.js | 2 +- js/src/dom/selector-engine.js | 2 +- js/src/dropdown.js | 10 +++++----- js/src/modal.js | 16 ++++++++-------- js/src/offcanvas.js | 16 ++++++++-------- js/src/popover.js | 4 ++-- js/src/scrollspy.js | 8 ++++---- js/src/tab.js | 8 ++++---- js/src/toast.js | 8 ++++---- js/src/tooltip.js | 12 ++++++------ js/src/util/backdrop.js | 6 +++--- js/src/util/component-functions.js | 4 ++-- js/src/util/config.js | 4 ++-- js/src/util/focustrap.js | 6 +++--- js/src/util/scrollbar.js | 6 +++--- js/src/util/swipe.js | 6 +++--- js/src/util/template-factory.js | 8 ++++---- 22 files changed, 84 insertions(+), 84 deletions(-) (limited to 'js/src') diff --git a/js/src/alert.js b/js/src/alert.js index 6ab6650c1..0019970be 100644 --- a/js/src/alert.js +++ b/js/src/alert.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import { defineJQueryPlugin } from './util/index' -import EventHandler from './dom/event-handler' -import BaseComponent from './base-component' -import { enableDismissTrigger } from './util/component-functions' +import { defineJQueryPlugin } from './util/index.js' +import EventHandler from './dom/event-handler.js' +import BaseComponent from './base-component.js' +import { enableDismissTrigger } from './util/component-functions.js' /** * Constants diff --git a/js/src/base-component.js b/js/src/base-component.js index dba5e0742..168d7f8cb 100644 --- a/js/src/base-component.js +++ b/js/src/base-component.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import Data from './dom/data' -import { executeAfterTransition, getElement } from './util/index' -import EventHandler from './dom/event-handler' -import Config from './util/config' +import Data from './dom/data.js' +import { executeAfterTransition, getElement } from './util/index.js' +import EventHandler from './dom/event-handler.js' +import Config from './util/config.js' /** * Constants diff --git a/js/src/button.js b/js/src/button.js index e70525c8b..3a84c0120 100644 --- a/js/src/button.js +++ b/js/src/button.js @@ -5,9 +5,9 @@ * -------------------------------------------------------------------------- */ -import { defineJQueryPlugin } from './util/index' -import EventHandler from './dom/event-handler' -import BaseComponent from './base-component' +import { defineJQueryPlugin } from './util/index.js' +import EventHandler from './dom/event-handler.js' +import BaseComponent from './base-component.js' /** * Constants diff --git a/js/src/carousel.js b/js/src/carousel.js index 7e89e1614..e25395628 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -13,12 +13,12 @@ import { isVisible, reflow, triggerTransitionEnd -} from './util/index' -import EventHandler from './dom/event-handler' -import Manipulator from './dom/manipulator' -import SelectorEngine from './dom/selector-engine' -import Swipe from './util/swipe' -import BaseComponent from './base-component' +} from './util/index.js' +import EventHandler from './dom/event-handler.js' +import Manipulator from './dom/manipulator.js' +import SelectorEngine from './dom/selector-engine.js' +import Swipe from './util/swipe.js' +import BaseComponent from './base-component.js' /** * Constants diff --git a/js/src/collapse.js b/js/src/collapse.js index df2bbc647..04a5f4cdf 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -11,10 +11,10 @@ import { getElementFromSelector, getSelectorFromElement, reflow -} from './util/index' -import EventHandler from './dom/event-handler' -import SelectorEngine from './dom/selector-engine' -import BaseComponent from './base-component' +} from './util/index.js' +import EventHandler from './dom/event-handler.js' +import SelectorEngine from './dom/selector-engine.js' +import BaseComponent from './base-component.js' /** * Constants diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js index c7019a8d0..c9408d353 100644 --- a/js/src/dom/event-handler.js +++ b/js/src/dom/event-handler.js @@ -5,7 +5,7 @@ * -------------------------------------------------------------------------- */ -import { getjQuery } from '../util/index' +import { getjQuery } from '../util/index.js' /** * Constants diff --git a/js/src/dom/selector-engine.js b/js/src/dom/selector-engine.js index 28f23ff8f..63bc2d176 100644 --- a/js/src/dom/selector-engine.js +++ b/js/src/dom/selector-engine.js @@ -5,7 +5,7 @@ * -------------------------------------------------------------------------- */ -import { isDisabled, isVisible } from '../util/index' +import { isDisabled, isVisible } from '../util/index.js' /** * Constants diff --git a/js/src/dropdown.js b/js/src/dropdown.js index d37886d89..6f9adcbe6 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -16,11 +16,11 @@ import { isRTL, isVisible, noop -} from './util/index' -import EventHandler from './dom/event-handler' -import Manipulator from './dom/manipulator' -import SelectorEngine from './dom/selector-engine' -import BaseComponent from './base-component' +} from './util/index.js' +import EventHandler from './dom/event-handler.js' +import Manipulator from './dom/manipulator.js' +import SelectorEngine from './dom/selector-engine.js' +import BaseComponent from './base-component.js' /** * Constants diff --git a/js/src/modal.js b/js/src/modal.js index c2c5c19e9..11efab20a 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -5,14 +5,14 @@ * -------------------------------------------------------------------------- */ -import { defineJQueryPlugin, getElementFromSelector, isRTL, isVisible, reflow } from './util/index' -import EventHandler from './dom/event-handler' -import SelectorEngine from './dom/selector-engine' -import ScrollBarHelper from './util/scrollbar' -import BaseComponent from './base-component' -import Backdrop from './util/backdrop' -import FocusTrap from './util/focustrap' -import { enableDismissTrigger } from './util/component-functions' +import { defineJQueryPlugin, getElementFromSelector, isRTL, isVisible, reflow } from './util/index.js' +import EventHandler from './dom/event-handler.js' +import SelectorEngine from './dom/selector-engine.js' +import ScrollBarHelper from './util/scrollbar.js' +import BaseComponent from './base-component.js' +import Backdrop from './util/backdrop.js' +import FocusTrap from './util/focustrap.js' +import { enableDismissTrigger } from './util/component-functions.js' /** * Constants diff --git a/js/src/offcanvas.js b/js/src/offcanvas.js index dc3e91075..a857c4d7e 100644 --- a/js/src/offcanvas.js +++ b/js/src/offcanvas.js @@ -10,14 +10,14 @@ import { getElementFromSelector, isDisabled, isVisible -} from './util/index' -import ScrollBarHelper from './util/scrollbar' -import EventHandler from './dom/event-handler' -import BaseComponent from './base-component' -import SelectorEngine from './dom/selector-engine' -import Backdrop from './util/backdrop' -import FocusTrap from './util/focustrap' -import { enableDismissTrigger } from './util/component-functions' +} from './util/index.js' +import ScrollBarHelper from './util/scrollbar.js' +import EventHandler from './dom/event-handler.js' +import BaseComponent from './base-component.js' +import SelectorEngine from './dom/selector-engine.js' +import Backdrop from './util/backdrop.js' +import FocusTrap from './util/focustrap.js' +import { enableDismissTrigger } from './util/component-functions.js' /** * Constants diff --git a/js/src/popover.js b/js/src/popover.js index 93fdc35ff..ff1aef023 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -5,8 +5,8 @@ * -------------------------------------------------------------------------- */ -import { defineJQueryPlugin } from './util/index' -import Tooltip from './tooltip' +import { defineJQueryPlugin } from './util/index.js' +import Tooltip from './tooltip.js' /** * Constants diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index a73bba840..14c1dbc12 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index' -import EventHandler from './dom/event-handler' -import SelectorEngine from './dom/selector-engine' -import BaseComponent from './base-component' +import { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index.js' +import EventHandler from './dom/event-handler.js' +import SelectorEngine from './dom/selector-engine.js' +import BaseComponent from './base-component.js' /** * Constants diff --git a/js/src/tab.js b/js/src/tab.js index a78c27538..19d3bfc36 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import { defineJQueryPlugin, getElementFromSelector, getNextActiveElement, isDisabled } from './util/index' -import EventHandler from './dom/event-handler' -import SelectorEngine from './dom/selector-engine' -import BaseComponent from './base-component' +import { defineJQueryPlugin, getElementFromSelector, getNextActiveElement, isDisabled } from './util/index.js' +import EventHandler from './dom/event-handler.js' +import SelectorEngine from './dom/selector-engine.js' +import BaseComponent from './base-component.js' /** * Constants diff --git a/js/src/toast.js b/js/src/toast.js index aef5da3a9..5cadb85f8 100644 --- a/js/src/toast.js +++ b/js/src/toast.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import { defineJQueryPlugin, reflow } from './util/index' -import EventHandler from './dom/event-handler' -import BaseComponent from './base-component' -import { enableDismissTrigger } from './util/component-functions' +import { defineJQueryPlugin, reflow } from './util/index.js' +import EventHandler from './dom/event-handler.js' +import BaseComponent from './base-component.js' +import { enableDismissTrigger } from './util/component-functions.js' /** * Constants diff --git a/js/src/tooltip.js b/js/src/tooltip.js index a3f3377c0..02d11363a 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -6,12 +6,12 @@ */ import * as Popper from '@popperjs/core' -import { defineJQueryPlugin, execute, findShadowRoot, getElement, getUID, isRTL, noop } from './util/index' -import { DefaultAllowlist } from './util/sanitizer' -import EventHandler from './dom/event-handler' -import Manipulator from './dom/manipulator' -import BaseComponent from './base-component' -import TemplateFactory from './util/template-factory' +import { defineJQueryPlugin, execute, findShadowRoot, getElement, getUID, isRTL, noop } from './util/index.js' +import { DefaultAllowlist } from './util/sanitizer.js' +import EventHandler from './dom/event-handler.js' +import Manipulator from './dom/manipulator.js' +import BaseComponent from './base-component.js' +import TemplateFactory from './util/template-factory.js' /** * Constants diff --git a/js/src/util/backdrop.js b/js/src/util/backdrop.js index 342f8afc1..832ba745a 100644 --- a/js/src/util/backdrop.js +++ b/js/src/util/backdrop.js @@ -5,9 +5,9 @@ * -------------------------------------------------------------------------- */ -import EventHandler from '../dom/event-handler' -import { execute, executeAfterTransition, getElement, reflow } from './index' -import Config from './config' +import EventHandler from '../dom/event-handler.js' +import { execute, executeAfterTransition, getElement, reflow } from './index.js' +import Config from './config.js' /** * Constants diff --git a/js/src/util/component-functions.js b/js/src/util/component-functions.js index 798366b07..2298ac371 100644 --- a/js/src/util/component-functions.js +++ b/js/src/util/component-functions.js @@ -5,8 +5,8 @@ * -------------------------------------------------------------------------- */ -import EventHandler from '../dom/event-handler' -import { getElementFromSelector, isDisabled } from './index' +import EventHandler from '../dom/event-handler.js' +import { getElementFromSelector, isDisabled } from './index.js' const enableDismissTrigger = (component, method = 'hide') => { const clickEvent = `click.dismiss${component.EVENT_KEY}` diff --git a/js/src/util/config.js b/js/src/util/config.js index 119a3ea3d..f2d24b4ba 100644 --- a/js/src/util/config.js +++ b/js/src/util/config.js @@ -5,8 +5,8 @@ * -------------------------------------------------------------------------- */ -import { isElement, toType } from './index' -import Manipulator from '../dom/manipulator' +import { isElement, toType } from './index.js' +import Manipulator from '../dom/manipulator.js' /** * Class definition diff --git a/js/src/util/focustrap.js b/js/src/util/focustrap.js index 01ac76683..b03d46136 100644 --- a/js/src/util/focustrap.js +++ b/js/src/util/focustrap.js @@ -5,9 +5,9 @@ * -------------------------------------------------------------------------- */ -import EventHandler from '../dom/event-handler' -import SelectorEngine from '../dom/selector-engine' -import Config from './config' +import EventHandler from '../dom/event-handler.js' +import SelectorEngine from '../dom/selector-engine.js' +import Config from './config.js' /** * Constants diff --git a/js/src/util/scrollbar.js b/js/src/util/scrollbar.js index 421426d41..94a677c9f 100644 --- a/js/src/util/scrollbar.js +++ b/js/src/util/scrollbar.js @@ -5,9 +5,9 @@ * -------------------------------------------------------------------------- */ -import SelectorEngine from '../dom/selector-engine' -import Manipulator from '../dom/manipulator' -import { isElement } from './index' +import SelectorEngine from '../dom/selector-engine.js' +import Manipulator from '../dom/manipulator.js' +import { isElement } from './index.js' /** * Constants diff --git a/js/src/util/swipe.js b/js/src/util/swipe.js index 7fcd65588..3a9139cc0 100644 --- a/js/src/util/swipe.js +++ b/js/src/util/swipe.js @@ -5,9 +5,9 @@ * -------------------------------------------------------------------------- */ -import Config from './config' -import EventHandler from '../dom/event-handler' -import { execute } from './index' +import Config from './config.js' +import EventHandler from '../dom/event-handler.js' +import { execute } from './index.js' /** * Constants diff --git a/js/src/util/template-factory.js b/js/src/util/template-factory.js index 16ec6c28d..9cd12dcdb 100644 --- a/js/src/util/template-factory.js +++ b/js/src/util/template-factory.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import { DefaultAllowlist, sanitizeHtml } from './sanitizer' -import { execute, getElement, isElement } from '../util/index' -import SelectorEngine from '../dom/selector-engine' -import Config from './config' +import { DefaultAllowlist, sanitizeHtml } from './sanitizer.js' +import { execute, getElement, isElement } from './index.js' +import SelectorEngine from '../dom/selector-engine.js' +import Config from './config.js' /** * Constants -- cgit v1.2.3