main.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 Settings = {
  39. programming: [],
  40. functions: [],
  41. datatypes: [],
  42. commands: [],
  43. filter: []
  44. }
  45. const i18n = i18nHelper.i18n;
  46. const LocalizedStrings = LocalizedStringsService.getInstance();
  47. export {
  48. runner,
  49. initVisualUI,
  50. addFunctionChangeListener,
  51. addGlobalChangeListener,
  52. removeFunctionListener,
  53. removeGlobalListener,
  54. getTestCases,
  55. autoEval,
  56. prepareActivityToStudentHelper,
  57. LocalizedStrings,
  58. i18n,
  59. getLogs,
  60. getLogsAsString,
  61. registerClick,
  62. registerUserEvent,
  63. parseLogs,
  64. ActionTypes,
  65. CodeEditor,
  66. openAssessmentDetail,
  67. autoGenerateTestCaseOutput,
  68. Config,
  69. parseExpression,
  70. parseCode,
  71. generate as generateCode,
  72. levenshteinDistance,
  73. processData,
  74. Settings
  75. };