main.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import { runner } from "./runner";
  2. import {
  3. initVisualUI,
  4. addFunctionChangeListener,
  5. addGlobalChangeListener,
  6. removeFunctionListener,
  7. removeGlobalListener,
  8. getTestCases,
  9. } from "./visualUI/functions";
  10. import * as LocalizedStringsService from "./services/localizedStringsService";
  11. import { i18nHelper } from "./services/i18nHelper";
  12. import {
  13. ActionTypes,
  14. getLogs,
  15. getLogsAsString,
  16. registerClick,
  17. registerUserEvent,
  18. parseLogs,
  19. } from "./services/userLog";
  20. import {
  21. prepareActivityToStudentHelper,
  22. prepareActivityToStudentHelperJSON,
  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, parseCode } 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 Settings = {
  40. programming: [],
  41. functions: [],
  42. datatypes: [],
  43. commands: [],
  44. filter: []
  45. }
  46. const i18n = i18nHelper.i18n;
  47. const LocalizedStrings = LocalizedStringsService.getInstance();
  48. export {
  49. runner,
  50. initVisualUI,
  51. addFunctionChangeListener,
  52. addGlobalChangeListener,
  53. removeFunctionListener,
  54. removeGlobalListener,
  55. getTestCases,
  56. autoEval,
  57. prepareActivityToStudentHelper,
  58. prepareActivityToStudentHelperJSON,
  59. LocalizedStrings,
  60. i18n,
  61. getLogs,
  62. getLogsAsString,
  63. registerClick,
  64. registerUserEvent,
  65. parseLogs,
  66. ActionTypes,
  67. CodeEditor,
  68. openAssessmentDetail,
  69. autoGenerateTestCaseOutput,
  70. Config,
  71. parseExpression,
  72. parseCode,
  73. generate as generateCode,
  74. levenshteinDistance,
  75. processData,
  76. Settings
  77. };