main.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 } 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. generate as generateCode,
  64. levenshteinDistance,
  65. processData,
  66. };