main.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { runner } from "./runner";
  2. import {
  3. initVisualUI,
  4. addFunctionChangeListener,
  5. addGlobalChangeListener,
  6. removeFunctionListener,
  7. removeGlobalListener,
  8. getExerciseType,
  9. getTestCases,
  10. } from "./visualUI/functions";
  11. import * as LocalizedStringsService from "./services/localizedStringsService";
  12. import { i18nHelper } from "./services/i18nHelper";
  13. import {
  14. ActionTypes,
  15. getLogs,
  16. getLogsAsString,
  17. registerClick,
  18. registerUserEvent,
  19. parseLogs,
  20. } from "./services/userLog";
  21. import {
  22. prepareActivityToStudentHelper,
  23. autoEval,
  24. } from "./util/iassignHelpers";
  25. import { openAssessmentDetail, levenshteinDistance } from "./util/utils";
  26. import { Config } from "./util/config";
  27. import { processData } from "./util/dataProcess";
  28. import { parseExpression } from "./util/parseFromVisual";
  29. import * as CodeEditorAll from "./visualUI/text_editor";
  30. import { autoGenerateTestCaseOutput } from "./util/auto_gen_output";
  31. import { generate } from "./visualUI/code_generator";
  32. const CodeEditor = {
  33. initTextEditor: CodeEditorAll.initTextEditor,
  34. setCode: CodeEditorAll.setCode,
  35. getCode: CodeEditorAll.getCode,
  36. updateEditor: CodeEditorAll.updateEditor,
  37. disable: CodeEditorAll.disable,
  38. };
  39. const i18n = i18nHelper.i18n;
  40. const LocalizedStrings = LocalizedStringsService.getInstance();
  41. export {
  42. runner,
  43. initVisualUI,
  44. addFunctionChangeListener,
  45. addGlobalChangeListener,
  46. removeFunctionListener,
  47. removeGlobalListener,
  48. getExerciseType,
  49. getTestCases,
  50. autoEval,
  51. prepareActivityToStudentHelper,
  52. LocalizedStrings,
  53. i18n,
  54. getLogs,
  55. getLogsAsString,
  56. registerClick,
  57. registerUserEvent,
  58. parseLogs,
  59. ActionTypes,
  60. CodeEditor,
  61. openAssessmentDetail,
  62. autoGenerateTestCaseOutput,
  63. Config,
  64. parseExpression,
  65. generate as generateCode,
  66. levenshteinDistance,
  67. processData,
  68. };