main.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. autoEval,
  23. } from "./util/iassignHelpers";
  24. import { openAssessmentDetail, levenshteinDistance } from "./util/utils";
  25. import { Config } from "./util/config";
  26. import { processData } from "./util/dataProcess";
  27. import { parseExpression, parseCode } from "./util/parseFromVisual";
  28. import * as CodeEditorAll from "./visualUI/text_editor";
  29. import { autoGenerateTestCaseOutput } from "./util/auto_gen_output";
  30. import { generate } from "./visualUI/code_generator";
  31. const CodeEditor = {
  32. initTextEditor: CodeEditorAll.initTextEditor,
  33. setCode: CodeEditorAll.setCode,
  34. getCode: CodeEditorAll.getCode,
  35. updateEditor: CodeEditorAll.updateEditor,
  36. disable: CodeEditorAll.disable,
  37. };
  38. const i18n = i18nHelper.i18n;
  39. const LocalizedStrings = LocalizedStringsService.getInstance();
  40. export {
  41. runner,
  42. initVisualUI,
  43. addFunctionChangeListener,
  44. addGlobalChangeListener,
  45. removeFunctionListener,
  46. removeGlobalListener,
  47. getTestCases,
  48. autoEval,
  49. prepareActivityToStudentHelper,
  50. LocalizedStrings,
  51. i18n,
  52. getLogs,
  53. getLogsAsString,
  54. registerClick,
  55. registerUserEvent,
  56. parseLogs,
  57. ActionTypes,
  58. CodeEditor,
  59. openAssessmentDetail,
  60. autoGenerateTestCaseOutput,
  61. Config,
  62. parseExpression,
  63. parseCode,
  64. generate as generateCode,
  65. levenshteinDistance,
  66. processData,
  67. };