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

54 lines
1.4 KiB
JavaScript
Raw Normal View History

import 'core-js/proposals/relative-indexing-method';
import Rails from '@rails/ujs';
import * as ActiveStorage from '@rails/activestorage';
import * as Turbo from '@hotwired/turbo';
import { Application } from '@hotwired/stimulus';
2024-07-23 18:05:50 +02:00
import '../shared/dsfr';
2019-02-13 14:16:22 +01:00
import '../shared/activestorage/ujs';
import '../shared/safari-11-empty-file-workaround';
import '../shared/toggle-target';
2024-07-18 09:33:07 +02:00
import '../shared/intl-listformat';
import { registerControllers } from '../shared/stimulus-loader';
import '../new_design/form-validation';
import { toggleCondidentielExplanation } from '../new_design/avis';
import {
showMotivation,
motivationCancel,
showImportJustificatif,
showDeleteJustificatif,
deleteJustificatif
} from '../new_design/instruction-button';
import { showFusion, showNewAccount } from '../new_design/fc-fusion';
const application = Application.start();
registerControllers(application);
// This is the global application namespace where we expose helpers used from rails views
const DS = {
toggleCondidentielExplanation,
showMotivation,
motivationCancel,
showImportJustificatif,
showDeleteJustificatif,
deleteJustificatif,
showFusion,
showNewAccount
};
// Start Rails helpers
ActiveStorage.start();
2022-06-27 13:40:59 +02:00
if (!window._rails_loaded) {
Rails.start();
}
2022-04-20 14:17:40 +02:00
Turbo.session.drive = false;
// Expose globals
window.DS = window.DS || DS;
2022-06-17 12:36:21 +02:00
import('../shared/track/matomo');
import('../shared/track/sentry');