Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import gui from './module/gui';
import controller from './module/controller-webform';
import settings from './module/settings';
import connection from './module/connection';
import { init as initTranslator, t, localize } from './module/translator';
const $loader = $( '.main-loader' );
const $formheader = $( '.main > .paper > .form-header' );
const survey = {
enketoId: settings.enketoId,
instanceId: settings.instanceId
};
// Completely disable calculations in Enketo Core
import calcModule from 'enketo-core/src/js/calculate';
calcModule.update = () => {
console.log( 'Calculations disabled.' );
};
// Completely disable instanceID and deprecatedID population in Enketo Core
import { FormModel } from 'enketo-core/src/js/form-model';
FormModel.prototype.setInstanceIdAndDeprecatedId = () => {
console.log( 'InstanceID and deprecatedID population disabled.' );
};
// Completely disable preload items
import preloadModule from 'enketo-core/src/js/preload';
preloadModule.init = () => {
console.log( 'Preloaders disabled.' );
};
initTranslator( survey )
.then( survey => connection.getFormParts( survey ) )
.then( formParts => {