main.js 2.0 KB

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