demarches-normaliennes/app/javascript/packs/application.js

65 lines
1.9 KiB
JavaScript
Raw Normal View History

import '../shared/polyfills';
import Turbolinks from 'turbolinks';
import Rails from 'rails-ujs';
2018-12-04 11:36:45 +01:00
import * as ActiveStorage from 'activestorage';
import Chartkick from 'chartkick';
import Highcharts from 'highcharts';
2019-03-20 14:29:19 +01:00
import ReactUJS from '../shared/react-ujs';
2019-03-20 14:29:19 +01:00
import reactComponents from '../shared/react-components';
2019-02-13 14:16:22 +01:00
import '../shared/activestorage/ujs';
import '../shared/activestorage/attachment-checker';
import '../shared/rails-ujs-fix';
2018-08-31 12:56:56 +02:00
import '../shared/safari-11-file-xhr-workaround';
import '../shared/autocomplete';
import '../shared/remote-input';
import '../shared/franceconnect';
import '../shared/toggle-target';
import '../new_design/dropdown';
import '../new_design/form-validation';
import '../new_design/procedure-context';
import '../new_design/select2';
2019-02-21 17:50:18 +01:00
import '../new_design/spinner';
import '../new_design/support';
2018-10-17 12:07:12 +02:00
import '../new_design/champs/carte';
import '../new_design/champs/linked-drop-down-list';
2019-01-30 16:14:15 +01:00
import '../new_design/champs/repetition';
import { toggleCondidentielExplanation } from '../new_design/avis';
import { scrollMessagerie } from '../new_design/messagerie';
import {
showMotivation,
motivationCancel,
showImportJustificatif
} from '../new_design/state-button';
import { toggleChart } from '../new_design/toggle-chart';
import { replaceSemicolonByComma } from '../new_design/avis';
// This is the global application namespace where we expose helpers used from rails views
const DS = {
2018-11-14 16:28:02 +01:00
fire: (eventName, data) => Rails.fire(document, eventName, data),
toggleCondidentielExplanation,
scrollMessagerie,
showMotivation,
motivationCancel,
showImportJustificatif,
toggleChart,
replaceSemicolonByComma
};
// Start Rails helpers
Chartkick.addAdapter(Highcharts);
Rails.start();
Turbolinks.start();
ActiveStorage.start();
2019-03-20 14:29:19 +01:00
const loader = new ReactUJS(reactComponents);
loader.start();
// Expose globals
window.DS = window.DS || DS;
window.Chartkick = Chartkick;