frontend/js/index.js in trestle-0.9.8 vs frontend/js/index.js in trestle-0.10.0.pre
- old
+ new
@@ -1,62 +1,50 @@
-// Dependencies
+// Global Dependencies
-import 'jquery'
-import Rails from '@rails/ujs'
-
+import '@hotwired/turbo'
import 'bootstrap'
-import 'bootstrap-confirmation2'
-import 'magnific-popup'
+// Core Functionality
-import 'flatpickr'
+import './core/stream_actions'
+import './core/turbo_errors'
-import 'select2/dist/js/select2.full'
-
-// Core
-
-import { refreshContext, refreshMainContext } from './core/contexts'
import cookie from './core/cookie'
-import { init, ready, triggerInit, triggerReady } from './core/events'
import { i18n, localize } from './core/i18n'
-import turbolinks from './core/turbolinks'
-import visit from './core/visit'
-// Components
+import Modal from './core/modal'
+import ErrorModal from './core/error_modal'
-import './components/confirmation'
-import './components/datepicker'
-import Dialog from './components/dialog'
-import './components/file'
-import './components/form'
-import './components/gallery'
-import './components/pagination'
-import './components/select'
-import './components/sidebar'
-import './components/table'
-import { focusTab, focusActiveTab } from './components/tabs'
-import './components/tooltips'
+// Stimulus Controllers
-// Initialize
+import { ApplicationController, Controllers } from './controllers'
+import Mixins from './mixins'
-Rails.start()
+// Deprecated Functionality
+import { init, ready, triggerInit, triggerReady } from './deprecated/events'
+import './deprecated/tooltip'
+
// Export
const Trestle = {
- refreshContext,
- refreshMainContext,
cookie,
+ i18n,
+ localize,
+
+ // Stimulus
+ ApplicationController,
+ Controllers,
+ Mixins,
+
+ // Modals
+ Modal,
+ ErrorModal,
+
+ // Deprecated
init,
ready,
triggerInit,
- triggerReady,
- i18n,
- localize,
- turbolinks,
- visit,
- Dialog,
- focusTab,
- focusActiveTab
+ triggerReady
}
export default Trestle