Sha256: 43af74ceb9f0cfca4ab8de80e8d04c5cdab514300ffb588e2166961369000e62

Contents?: true

Size: 1.71 KB

Versions: 32

Compression:

Stored size: 1.71 KB

Contents

// eslint-disable-next-line import/no-extraneous-dependencies
import 'core-js/stable'
// eslint-disable-next-line import/no-extraneous-dependencies
import 'regenerator-runtime/runtime'
import 'trix'
import * as Mousetrap from 'mousetrap'
import { Application } from 'stimulus'
import { Turbo } from '@hotwired/turbo-rails'
import { definitionsFromContext } from 'stimulus/webpack-helpers'
import Rails from '@rails/ujs'
import tippy from 'tippy.js'

// Toastr alerts
import '../js/toastr'

Rails.start()

window.Turbolinks = Turbo

Mousetrap.bind('r r r', () => Turbo.visit(window.location.href, { action: 'replace' }))

const application = Application.start()

const context = require.context('./../js/controllers', true, /\.js$/)
application.load(definitionsFromContext(context))

const fieldsContext = require.context('./../js/controllers/fields', true, /\.js$/)
application.load(definitionsFromContext(fieldsContext))

document.addEventListener('turbo:load', () => {
  document.body.classList.remove('turbo-loading')

  tippy('[data-tippy="tooltip"]', {
    theme: 'light',
    content(reference) {
      const title = reference.getAttribute('title')
      reference.removeAttribute('title')

      return title
    },
  })
})
document.addEventListener('turbo:visit', () => document.body.classList.add('turbo-loading'))
document.addEventListener('turbo:submit-start', () => document.body.classList.add('turbo-loading'))

// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
const images = require.context('../images', true)
const imagePath = (name) => images(name, true)

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
avo-1.3.4 app/packs/entrypoints/application.js
avo-1.3.3 app/packs/entrypoints/application.js
avo-1.3.2 app/packs/entrypoints/application.js
avo-1.3.1 app/packs/entrypoints/application.js
avo-1.3.0 app/packs/entrypoints/application.js
avo-1.2.11.pre.4 app/packs/entrypoints/application.js
avo-1.2.11.pre.3 app/packs/entrypoints/application.js
avo-1.2.11.pre.2 app/packs/entrypoints/application.js
avo-1.2.11.pre.1 app/packs/entrypoints/application.js
avo-1.2.10 app/packs/entrypoints/application.js
avo-1.2.9 app/packs/entrypoints/application.js
avo-1.2.8 app/packs/entrypoints/application.js
avo-1.2.7 app/packs/entrypoints/application.js
avo-1.2.6 app/packs/entrypoints/application.js
avo-1.2.6.pre.1 app/packs/entrypoints/application.js
avo-1.2.5 app/packs/entrypoints/application.js
avo-1.2.4 app/packs/entrypoints/application.js
avo-1.2.3 app/packs/entrypoints/application.js
avo-1.2.2 app/packs/entrypoints/application.js
avo-1.1.0 app/packs/entrypoints/application.js