@testgorilla/tgo-coding-test 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/fesm2022/testgorilla-tgo-coding-test.mjs +4526 -0
  2. package/fesm2022/testgorilla-tgo-coding-test.mjs.map +1 -0
  3. package/{src/index.ts → index.d.ts} +2 -19
  4. package/lib/components/code-editor/code-editor.component.d.ts +54 -0
  5. package/lib/components/code-editor/code-editor.service.d.ts +12 -0
  6. package/lib/components/code-editor/helpers/c-helper.d.ts +11 -0
  7. package/lib/components/code-editor/helpers/code-editor-helper.base.d.ts +8 -0
  8. package/lib/components/code-editor/helpers/code-editor-helper.model.d.ts +62 -0
  9. package/lib/components/code-editor/helpers/cpp-helper.d.ts +11 -0
  10. package/lib/components/code-editor/helpers/csharp-helper.d.ts +12 -0
  11. package/lib/components/code-editor/helpers/go-helper.d.ts +12 -0
  12. package/lib/components/code-editor/helpers/java-helper.d.ts +12 -0
  13. package/lib/components/code-editor/helpers/javascript-helper.d.ts +10 -0
  14. package/lib/components/code-editor/helpers/kotlin-helper.d.ts +12 -0
  15. package/lib/components/code-editor/helpers/php-helper.d.ts +10 -0
  16. package/lib/components/code-editor/helpers/python-helper.d.ts +10 -0
  17. package/lib/components/code-editor/helpers/r-helper.d.ts +10 -0
  18. package/lib/components/code-editor/helpers/ruby-helper.d.ts +10 -0
  19. package/lib/components/code-editor/helpers/scala-helper.d.ts +12 -0
  20. package/lib/components/code-editor/helpers/sql-helper.d.ts +10 -0
  21. package/lib/components/code-editor/helpers/swift-helper.d.ts +11 -0
  22. package/lib/components/code-editor/helpers/typescript-helper.d.ts +11 -0
  23. package/lib/components/code-editor/models/code-editor.model.d.ts +8 -0
  24. package/lib/components/code-editor/models/coding-snapshot.model.d.ts +4 -0
  25. package/lib/components/coding-question/coding-question.component.d.ts +45 -0
  26. package/lib/components/coding-section/coding-section.component.d.ts +52 -0
  27. package/lib/components/common/truncated-text/truncated-text.component.d.ts +13 -0
  28. package/lib/components/configurations/configurations.component.d.ts +40 -0
  29. package/lib/components/instructions/instructions.component.d.ts +48 -0
  30. package/lib/components/panel/panel.component.d.ts +12 -0
  31. package/lib/components/runnable-editor/runnable-editor.component.d.ts +53 -0
  32. package/lib/components/tests/test-cases/test-cases.component.d.ts +46 -0
  33. package/lib/components/tests/test-cases-content/test-cases-content.component.d.ts +26 -0
  34. package/lib/components/tests/test-cases-status/test-cases-status.component.d.ts +9 -0
  35. package/lib/components/tests/test-results.component.d.ts +33 -0
  36. package/lib/components/tgo-coding-test/tgo-coding-test.component.d.ts +69 -0
  37. package/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.d.ts +101 -0
  38. package/{src/lib/config/index.ts → lib/config/index.d.ts} +0 -1
  39. package/lib/config/tgo-coding-test.config.d.ts +24 -0
  40. package/{src/lib/config/tgo-coding-test.provider.ts → lib/config/tgo-coding-test.provider.d.ts} +6 -18
  41. package/lib/config/tgo-coding-test.token.d.ts +9 -0
  42. package/lib/models/auto-saved-data.d.ts +42 -0
  43. package/lib/models/code-event.d.ts +15 -0
  44. package/lib/models/coderunner-execution-results.d.ts +51 -0
  45. package/lib/models/configs.d.ts +15 -0
  46. package/lib/models/language-change-action.d.ts +4 -0
  47. package/lib/models/lat-languages.d.ts +8 -0
  48. package/lib/models/mixpanel-events.d.ts +3 -0
  49. package/lib/models/mode.d.ts +5 -0
  50. package/lib/models/paste-data.d.ts +4 -0
  51. package/lib/models/programming-language.d.ts +8 -0
  52. package/lib/models/test-cases.d.ts +67 -0
  53. package/lib/models/theme.d.ts +4 -0
  54. package/lib/models/translations.d.ts +1 -0
  55. package/lib/models/view-mode.d.ts +6 -0
  56. package/{src/lib/pipes/memoize-func.pipe.ts → lib/pipes/memoize-func.pipe.d.ts} +6 -14
  57. package/lib/services/candidate-coding-test-services/candidature-api.service.d.ts +10 -0
  58. package/lib/services/candidate-coding-test-services/coderunner-api.service.d.ts +18 -0
  59. package/lib/services/candidate-coding-test-services/coding-test-tour.service.d.ts +22 -0
  60. package/lib/services/candidate-coding-test-services/coding-test.service.d.ts +68 -0
  61. package/{src/lib/services/candidate-coding-test-services/index.ts → lib/services/candidate-coding-test-services/index.d.ts} +1 -1
  62. package/lib/services/coding-test-config.service.d.ts +38 -0
  63. package/lib/services/configurations.service.d.ts +37 -0
  64. package/lib/services/lib-coding-test.service.d.ts +69 -0
  65. package/lib/services/storage.service.d.ts +83 -0
  66. package/lib/services/test-cases.service.d.ts +12 -0
  67. package/lib/services/theme.service.d.ts +17 -0
  68. package/lib/utils/additional-languages/erlang.d.ts +37 -0
  69. package/lib/utils/resize-element.d.ts +2 -0
  70. package/lib/utils/time-to-ms.util.d.ts +1 -0
  71. package/package.json +17 -3
  72. package/shared/index.d.ts +4 -0
  73. package/shared/lib/components/audio-animation/audio-animation.component.d.ts +27 -0
  74. package/shared/lib/components/audio-animation/index.d.ts +1 -0
  75. package/shared/lib/components/index.d.ts +2 -0
  76. package/shared/lib/components/vimeo-video/index.d.ts +1 -0
  77. package/shared/lib/components/vimeo-video/vimeo-video.component.d.ts +24 -0
  78. package/shared/lib/models/answer.d.ts +17 -0
  79. package/shared/lib/models/assessment.d.ts +80 -0
  80. package/shared/lib/models/environment.d.ts +1 -0
  81. package/shared/lib/models/index.d.ts +8 -0
  82. package/shared/lib/models/question-component.d.ts +54 -0
  83. package/shared/lib/models/question.d.ts +102 -0
  84. package/shared/lib/models/test.d.ts +81 -0
  85. package/shared/lib/models/translations.d.ts +1 -0
  86. package/shared/lib/models/window.d.ts +6 -0
  87. package/shared/lib/services/api/api.service.d.ts +25 -0
  88. package/shared/lib/services/api/mocked-api.service.d.ts +35 -0
  89. package/shared/lib/services/environment/environment.service.d.ts +6 -0
  90. package/shared/lib/services/index.d.ts +9 -0
  91. package/shared/lib/services/localization/languages.model.d.ts +15 -0
  92. package/shared/lib/services/localization/transloco-lazy-module-utils.d.ts +11 -0
  93. package/shared/lib/services/localization/transloco-testing.module.d.ts +2 -0
  94. package/shared/lib/services/media/media.service.d.ts +29 -0
  95. package/shared/lib/services/mixpanel/mixpanel.service.d.ts +10 -0
  96. package/shared/lib/services/theme/theme.service.d.ts +8 -0
  97. package/shared/test-mocks/assessment-test.mock.d.ts +21 -0
  98. package/shared/test-mocks/index.d.ts +2 -0
  99. package/shared/test-mocks/tgo-ui.mock.d.ts +21 -0
  100. package/.eslintrc.json +0 -46
  101. package/jest.config.ts +0 -26
  102. package/ng-package.json +0 -14
  103. package/project.json +0 -48
  104. package/src/lib/components/.gitkeep +0 -0
  105. package/src/lib/components/code-editor/code-editor.component.html +0 -10
  106. package/src/lib/components/code-editor/code-editor.component.scss +0 -21
  107. package/src/lib/components/code-editor/code-editor.component.spec.ts +0 -136
  108. package/src/lib/components/code-editor/code-editor.component.ts +0 -368
  109. package/src/lib/components/code-editor/code-editor.mocks.ts +0 -28
  110. package/src/lib/components/code-editor/code-editor.service.spec.ts +0 -160
  111. package/src/lib/components/code-editor/code-editor.service.ts +0 -94
  112. package/src/lib/components/code-editor/helpers/c-helper.spec.ts +0 -39
  113. package/src/lib/components/code-editor/helpers/c-helper.ts +0 -51
  114. package/src/lib/components/code-editor/helpers/code-editor-helper.base.spec.ts +0 -30
  115. package/src/lib/components/code-editor/helpers/code-editor-helper.base.ts +0 -16
  116. package/src/lib/components/code-editor/helpers/code-editor-helper.mocks.ts +0 -24
  117. package/src/lib/components/code-editor/helpers/code-editor-helper.model.ts +0 -67
  118. package/src/lib/components/code-editor/helpers/cpp-helper.spec.ts +0 -40
  119. package/src/lib/components/code-editor/helpers/cpp-helper.ts +0 -52
  120. package/src/lib/components/code-editor/helpers/csharp-helper.spec.ts +0 -42
  121. package/src/lib/components/code-editor/helpers/csharp-helper.ts +0 -55
  122. package/src/lib/components/code-editor/helpers/go-helper.spec.ts +0 -41
  123. package/src/lib/components/code-editor/helpers/go-helper.ts +0 -54
  124. package/src/lib/components/code-editor/helpers/java-helper.spec.ts +0 -41
  125. package/src/lib/components/code-editor/helpers/java-helper.ts +0 -54
  126. package/src/lib/components/code-editor/helpers/javascript-helper.spec.ts +0 -39
  127. package/src/lib/components/code-editor/helpers/javascript-helper.ts +0 -32
  128. package/src/lib/components/code-editor/helpers/kotlin-helper.spec.ts +0 -41
  129. package/src/lib/components/code-editor/helpers/kotlin-helper.ts +0 -54
  130. package/src/lib/components/code-editor/helpers/php-helper.spec.ts +0 -39
  131. package/src/lib/components/code-editor/helpers/php-helper.ts +0 -32
  132. package/src/lib/components/code-editor/helpers/python-helper.spec.ts +0 -39
  133. package/src/lib/components/code-editor/helpers/python-helper.ts +0 -32
  134. package/src/lib/components/code-editor/helpers/r-helper.spec.ts +0 -39
  135. package/src/lib/components/code-editor/helpers/r-helper.ts +0 -32
  136. package/src/lib/components/code-editor/helpers/ruby-helper.spec.ts +0 -39
  137. package/src/lib/components/code-editor/helpers/ruby-helper.ts +0 -32
  138. package/src/lib/components/code-editor/helpers/scala-helper.spec.ts +0 -41
  139. package/src/lib/components/code-editor/helpers/scala-helper.ts +0 -53
  140. package/src/lib/components/code-editor/helpers/sql-helper.spec.ts +0 -87
  141. package/src/lib/components/code-editor/helpers/sql-helper.ts +0 -44
  142. package/src/lib/components/code-editor/helpers/swift-helper.spec.ts +0 -40
  143. package/src/lib/components/code-editor/helpers/swift-helper.ts +0 -51
  144. package/src/lib/components/code-editor/helpers/typescript-helper.spec.ts +0 -40
  145. package/src/lib/components/code-editor/helpers/typescript-helper.ts +0 -52
  146. package/src/lib/components/code-editor/models/code-editor.model.ts +0 -9
  147. package/src/lib/components/code-editor/models/coding-snapshot.model.ts +0 -4
  148. package/src/lib/components/coding-question/coding-question.component.html +0 -78
  149. package/src/lib/components/coding-question/coding-question.component.scss +0 -75
  150. package/src/lib/components/coding-question/coding-question.component.spec.ts +0 -85
  151. package/src/lib/components/coding-question/coding-question.component.ts +0 -101
  152. package/src/lib/components/coding-section/coding-section.component.html +0 -82
  153. package/src/lib/components/coding-section/coding-section.component.scss +0 -64
  154. package/src/lib/components/coding-section/coding-section.component.spec.ts +0 -257
  155. package/src/lib/components/coding-section/coding-section.component.ts +0 -186
  156. package/src/lib/components/coding-test.module.ts +0 -124
  157. package/src/lib/components/common/truncated-text/truncated-text.component.html +0 -6
  158. package/src/lib/components/common/truncated-text/truncated-text.component.scss +0 -18
  159. package/src/lib/components/common/truncated-text/truncated-text.component.spec.ts +0 -84
  160. package/src/lib/components/common/truncated-text/truncated-text.component.ts +0 -36
  161. package/src/lib/components/configurations/configurations.component.html +0 -57
  162. package/src/lib/components/configurations/configurations.component.scss +0 -42
  163. package/src/lib/components/configurations/configurations.component.spec.ts +0 -186
  164. package/src/lib/components/configurations/configurations.component.ts +0 -97
  165. package/src/lib/components/instructions/instructions.component.html +0 -41
  166. package/src/lib/components/instructions/instructions.component.scss +0 -173
  167. package/src/lib/components/instructions/instructions.component.spec.ts +0 -106
  168. package/src/lib/components/instructions/instructions.component.ts +0 -137
  169. package/src/lib/components/panel/panel.component.html +0 -19
  170. package/src/lib/components/panel/panel.component.scss +0 -41
  171. package/src/lib/components/panel/panel.component.spec.ts +0 -40
  172. package/src/lib/components/panel/panel.component.ts +0 -33
  173. package/src/lib/components/runnable-editor/runnable-editor.component.html +0 -75
  174. package/src/lib/components/runnable-editor/runnable-editor.component.scss +0 -55
  175. package/src/lib/components/runnable-editor/runnable-editor.component.spec.ts +0 -124
  176. package/src/lib/components/runnable-editor/runnable-editor.component.ts +0 -154
  177. package/src/lib/components/tests/test-cases/test-cases.component.html +0 -135
  178. package/src/lib/components/tests/test-cases/test-cases.component.scss +0 -220
  179. package/src/lib/components/tests/test-cases/test-cases.component.spec.ts +0 -401
  180. package/src/lib/components/tests/test-cases/test-cases.component.ts +0 -204
  181. package/src/lib/components/tests/test-cases-content/test-cases-content.component.html +0 -94
  182. package/src/lib/components/tests/test-cases-content/test-cases-content.component.scss +0 -103
  183. package/src/lib/components/tests/test-cases-content/test-cases-content.component.spec.ts +0 -122
  184. package/src/lib/components/tests/test-cases-content/test-cases-content.component.ts +0 -101
  185. package/src/lib/components/tests/test-cases-status/test-cases-status.component.html +0 -16
  186. package/src/lib/components/tests/test-cases-status/test-cases-status.component.scss +0 -49
  187. package/src/lib/components/tests/test-cases-status/test-cases-status.component.spec.ts +0 -22
  188. package/src/lib/components/tests/test-cases-status/test-cases-status.component.ts +0 -17
  189. package/src/lib/components/tests/test-results.component.html +0 -119
  190. package/src/lib/components/tests/test-results.component.scss +0 -189
  191. package/src/lib/components/tests/test-results.component.spec.ts +0 -140
  192. package/src/lib/components/tests/test-results.component.ts +0 -97
  193. package/src/lib/components/tgo-coding-test/tgo-coding-test.component.html +0 -96
  194. package/src/lib/components/tgo-coding-test/tgo-coding-test.component.scss +0 -6
  195. package/src/lib/components/tgo-coding-test/tgo-coding-test.component.spec.ts +0 -599
  196. package/src/lib/components/tgo-coding-test/tgo-coding-test.component.ts +0 -278
  197. package/src/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.html +0 -36
  198. package/src/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.scss +0 -183
  199. package/src/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.spec.ts +0 -883
  200. package/src/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.ts +0 -578
  201. package/src/lib/config/tgo-coding-test.config.ts +0 -26
  202. package/src/lib/config/tgo-coding-test.token.ts +0 -21
  203. package/src/lib/models/.gitkeep +0 -0
  204. package/src/lib/models/auto-saved-data.ts +0 -51
  205. package/src/lib/models/code-event.ts +0 -17
  206. package/src/lib/models/coderunner-execution-results.ts +0 -58
  207. package/src/lib/models/coding-lib.mocks.ts +0 -246
  208. package/src/lib/models/configs.ts +0 -18
  209. package/src/lib/models/language-change-action.ts +0 -4
  210. package/src/lib/models/lat-languages.ts +0 -12
  211. package/src/lib/models/mixpanel-events.ts +0 -3
  212. package/src/lib/models/mode.ts +0 -5
  213. package/src/lib/models/paste-data.ts +0 -4
  214. package/src/lib/models/programming-language.ts +0 -9
  215. package/src/lib/models/test-cases.ts +0 -74
  216. package/src/lib/models/theme.ts +0 -5
  217. package/src/lib/models/translations.ts +0 -1
  218. package/src/lib/models/view-mode.ts +0 -6
  219. package/src/lib/services/.gitkeep +0 -0
  220. package/src/lib/services/candidate-coding-test-services/candidature-api.service.spec.ts +0 -40
  221. package/src/lib/services/candidate-coding-test-services/candidature-api.service.ts +0 -15
  222. package/src/lib/services/candidate-coding-test-services/coderunner-api.service.spec.ts +0 -134
  223. package/src/lib/services/candidate-coding-test-services/coderunner-api.service.ts +0 -105
  224. package/src/lib/services/candidate-coding-test-services/coding-test-tour.service.spec.ts +0 -161
  225. package/src/lib/services/candidate-coding-test-services/coding-test-tour.service.ts +0 -100
  226. package/src/lib/services/candidate-coding-test-services/coding-test.service.spec.ts +0 -1524
  227. package/src/lib/services/candidate-coding-test-services/coding-test.service.ts +0 -843
  228. package/src/lib/services/coding-test-config.service.ts +0 -48
  229. package/src/lib/services/configurations.service.mocks.ts +0 -77
  230. package/src/lib/services/configurations.service.spec.ts +0 -79
  231. package/src/lib/services/configurations.service.ts +0 -111
  232. package/src/lib/services/index.ts +0 -0
  233. package/src/lib/services/lib-coding-test.service.spec.ts +0 -265
  234. package/src/lib/services/lib-coding-test.service.ts +0 -157
  235. package/src/lib/services/local-storage.service.mocks.ts +0 -22
  236. package/src/lib/services/storage.service.spec.ts +0 -1119
  237. package/src/lib/services/storage.service.ts +0 -729
  238. package/src/lib/services/test-cases.service.spec.ts +0 -53
  239. package/src/lib/services/test-cases.service.ts +0 -29
  240. package/src/lib/services/theme.service.spec.ts +0 -76
  241. package/src/lib/services/theme.service.ts +0 -34
  242. package/src/lib/styles/mixins.scss +0 -86
  243. package/src/lib/styles/styles.scss +0 -112
  244. package/src/lib/styles/variables.scss +0 -105
  245. package/src/lib/utils/.gitkeep +0 -0
  246. package/src/lib/utils/additional-languages/erlang.ts +0 -115
  247. package/src/lib/utils/resize-element.ts +0 -15
  248. package/src/lib/utils/time-to-ms.util.ts +0 -10
  249. package/src/test-setup.ts +0 -3
  250. package/tsconfig.json +0 -19
  251. package/tsconfig.lib.json +0 -19
  252. package/tsconfig.lib.prod.json +0 -10
  253. package/tsconfig.spec.json +0 -17
  254. /package/{src/assets → assets}/i18n/en.json +0 -0
  255. /package/{src/lib/components/code-editor/helpers/index.ts → lib/components/code-editor/helpers/index.d.ts} +0 -0
@@ -0,0 +1,53 @@
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
2
+ import { ApplicationTheme } from '@testgorilla/tgo-ui';
3
+ import { LATLanguages } from '../../models/lat-languages';
4
+ import { ExampleTestCase } from '../../models/test-cases';
5
+ import { CodeEditorFuncParam, CodeEditorLanguages, CodeEditorTypesMap } from '../code-editor/helpers/code-editor-helper.model';
6
+ import { PasteData } from '../code-editor/models/code-editor.model';
7
+ import * as i0 from "@angular/core";
8
+ export declare class RunnableEditorComponent implements AfterViewInit {
9
+ private changeDetectorRef;
10
+ initCode: string;
11
+ functionParams: CodeEditorFuncParam[];
12
+ functionName: string;
13
+ returnType: keyof CodeEditorTypesMap;
14
+ isFullViewMode: boolean;
15
+ isLAT: boolean;
16
+ isSQL: boolean;
17
+ canAddCustomTestCases: boolean;
18
+ hideTestCases: boolean;
19
+ languages: LATLanguages;
20
+ shouldGenerateInitCode: boolean;
21
+ autoHeight: boolean;
22
+ translations: Record<string, unknown>;
23
+ questionText: string;
24
+ companyColor: string;
25
+ testCasesStatus: any;
26
+ loading: boolean;
27
+ runTestResponse: any[];
28
+ exampleTestCases: ExampleTestCase[];
29
+ isRunnableWithLangSelector: boolean;
30
+ applicationTheme: ApplicationTheme;
31
+ pasteEvent: EventEmitter<PasteData>;
32
+ codeChange: EventEmitter<string>;
33
+ runTestClick: EventEmitter<boolean>;
34
+ languageChange: EventEmitter<CodeEditorLanguages>;
35
+ codingTestsSplitRef: ElementRef;
36
+ testsSplitAreaRef: ElementRef;
37
+ minTestsSplitHeight: number;
38
+ currentIdeSplitHeight: number;
39
+ currentTestsSplitHeight: number;
40
+ MIN_TESTS_HEIGHT_PX: number;
41
+ MIN_LAT_TESTS_HEIGHT_PX: number;
42
+ GUTTER_SIZE: number;
43
+ isMobile: boolean;
44
+ constructor(changeDetectorRef: ChangeDetectorRef);
45
+ ngAfterViewInit(): void;
46
+ private setCodingSplitListener;
47
+ private calculateCurrentHeights;
48
+ private getInitialMaxHeight$;
49
+ private getPercentHeightFromWhole;
50
+ private getMinTestsPercentHeight;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<RunnableEditorComponent, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<RunnableEditorComponent, "tgo-runnable-editor", never, { "initCode": { "alias": "initCode"; "required": false; }; "functionParams": { "alias": "functionParams"; "required": false; }; "functionName": { "alias": "functionName"; "required": false; }; "returnType": { "alias": "returnType"; "required": false; }; "isFullViewMode": { "alias": "isFullViewMode"; "required": false; }; "isLAT": { "alias": "isLAT"; "required": false; }; "isSQL": { "alias": "isSQL"; "required": false; }; "canAddCustomTestCases": { "alias": "canAddCustomTestCases"; "required": false; }; "hideTestCases": { "alias": "hideTestCases"; "required": false; }; "languages": { "alias": "languages"; "required": false; }; "shouldGenerateInitCode": { "alias": "shouldGenerateInitCode"; "required": false; }; "autoHeight": { "alias": "autoHeight"; "required": false; }; "translations": { "alias": "translations"; "required": false; }; "questionText": { "alias": "questionText"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "testCasesStatus": { "alias": "testCasesStatus"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "runTestResponse": { "alias": "runTestResponse"; "required": false; }; "exampleTestCases": { "alias": "exampleTestCases"; "required": false; }; "isRunnableWithLangSelector": { "alias": "isRunnableWithLangSelector"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; }, { "pasteEvent": "pasteEvent"; "codeChange": "codeChange"; "runTestClick": "runTestClick"; "languageChange": "languageChange"; }, never, never, true, never>;
53
+ }
@@ -0,0 +1,46 @@
1
+ import { ChangeDetectorRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { MatTabGroup } from '@angular/material/tabs';
3
+ import { ApplicationTheme } from '@testgorilla/tgo-ui';
4
+ import { AllowedModificationFields, CustomTestCase, ExampleTestCase, TestCaseResult } from '../../../models/test-cases';
5
+ import { LibCodingTestService } from '../../../services/lib-coding-test.service';
6
+ import { StorageCodingService } from '../../../services/storage.service';
7
+ import { TestCasesService } from '../../../services/test-cases.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class TestCasesComponent implements OnInit, OnChanges {
10
+ private libCodingTestService;
11
+ private changeDetectorRef;
12
+ private testCasesService;
13
+ private StorageCodingService;
14
+ exampleTestCases: ExampleTestCase[];
15
+ apiTestCasesResult: TestCaseResult[];
16
+ testCasesStatus: any;
17
+ testCases: (CustomTestCase | ExampleTestCase)[];
18
+ translations: Record<string, unknown>;
19
+ areTestsRun: boolean;
20
+ applicationTheme: ApplicationTheme;
21
+ canAddCustomTestCases: boolean;
22
+ isSQL: boolean;
23
+ tabGroup: MatTabGroup;
24
+ testCasesResult: TestCaseResult[];
25
+ activeTestCaseIndex: number | null;
26
+ maxTestCasesAllowed: number;
27
+ isAddTestCasesDisabled: boolean;
28
+ isMobile: boolean;
29
+ isContentViewOpened: boolean;
30
+ constructor(libCodingTestService: LibCodingTestService, changeDetectorRef: ChangeDetectorRef, testCasesService: TestCasesService, StorageCodingService: StorageCodingService);
31
+ ngOnInit(): void;
32
+ ngOnChanges({ apiTestCasesResult }: SimpleChanges): void;
33
+ private setDefaultTestCases;
34
+ addTestCase(): void;
35
+ removeTestCase(index: number): void;
36
+ modifyTestCase(index: number, modifiedValue: AllowedModificationFields): void;
37
+ private setFocus;
38
+ private onTestCasesChanged;
39
+ setActiveTestCaseIndex(index: number): void;
40
+ closeTestCaseMobileView(): void;
41
+ private listenTestCaseDeletion;
42
+ private handleEmptyTestCases;
43
+ private updateAddCustomTestCaseDisabled;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<TestCasesComponent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<TestCasesComponent, "tgo-test-cases", never, { "exampleTestCases": { "alias": "exampleTestCases"; "required": false; }; "apiTestCasesResult": { "alias": "apiTestCasesResult"; "required": false; }; "testCasesStatus": { "alias": "testCasesStatus"; "required": false; }; "testCases": { "alias": "testCases"; "required": false; }; "translations": { "alias": "translations"; "required": false; }; "areTestsRun": { "alias": "areTestsRun"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "canAddCustomTestCases": { "alias": "canAddCustomTestCases"; "required": false; }; "isSQL": { "alias": "isSQL"; "required": false; }; }, {}, never, never, true, never>;
46
+ }
@@ -0,0 +1,26 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { ApplicationTheme } from '@testgorilla/tgo-ui';
4
+ import { AllowedModificationFields, CustomTestCase, ExampleTestCase, TestCaseResult, TestCaseStatus } from '../../../models/test-cases';
5
+ import * as i0 from "@angular/core";
6
+ export declare class TestCasesContentComponent implements OnInit, OnChanges {
7
+ private readonly fb;
8
+ testCase: ExampleTestCase | CustomTestCase;
9
+ testCaseResult: TestCaseResult;
10
+ areTestsRun: boolean;
11
+ translations: Record<string, unknown>;
12
+ applicationTheme: ApplicationTheme;
13
+ isSQL: boolean;
14
+ valueChange: EventEmitter<AllowedModificationFields>;
15
+ isCustomTestCase: boolean;
16
+ form: import("@angular/forms").FormGroup<{
17
+ input: FormControl<string>;
18
+ expectedOutput: FormControl<string>;
19
+ }>;
20
+ ngOnInit(): void;
21
+ ngOnChanges(changes: SimpleChanges): void;
22
+ isEmptyTestCase(status: TestCaseStatus): boolean;
23
+ private listenFormChanges;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<TestCasesContentComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<TestCasesContentComponent, "tgo-test-cases-content", never, { "testCase": { "alias": "testCase"; "required": false; }; "testCaseResult": { "alias": "testCaseResult"; "required": false; }; "areTestsRun": { "alias": "areTestsRun"; "required": false; }; "translations": { "alias": "translations"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "isSQL": { "alias": "isSQL"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
26
+ }
@@ -0,0 +1,9 @@
1
+ import { TestCaseStatus } from '../../../models/test-cases';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TestCasesStatusComponent {
4
+ status: TestCaseStatus;
5
+ translations: Record<string, unknown>;
6
+ readonly TestCaseStatus: typeof TestCaseStatus;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TestCasesStatusComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<TestCasesStatusComponent, "tgo-test-cases-status", never, { "status": { "alias": "status"; "required": false; }; "translations": { "alias": "translations"; "required": false; }; }, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,33 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
+ import { ApplicationTheme } from '@testgorilla/tgo-ui';
3
+ import { CustomTestCase, ExampleTestCase } from '../../models/test-cases';
4
+ import { LibCodingTestService } from '../../services/lib-coding-test.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class TestResultsComponent implements OnInit {
7
+ private libCodingTestService;
8
+ private changeDetectorRef;
9
+ companyColor: string;
10
+ testCasesStatus: any;
11
+ loading: boolean;
12
+ runTestResponse: any[];
13
+ translations: Record<string, unknown>;
14
+ isLAT: boolean;
15
+ isSQL: boolean;
16
+ exampleTestCases: ExampleTestCase[];
17
+ canChangeProgrammingLang: boolean;
18
+ showTestCases: boolean;
19
+ canAddCustomTestCases: boolean;
20
+ applicationTheme: ApplicationTheme;
21
+ runTestClick: EventEmitter<boolean>;
22
+ runTestFirstClick: boolean;
23
+ emptySpaceRegex: RegExp;
24
+ disableRun$: import("rxjs").Observable<boolean>;
25
+ constructor(libCodingTestService: LibCodingTestService, changeDetectorRef: ChangeDetectorRef);
26
+ ngOnInit(): void;
27
+ trackByFunction(index: number, item: any): any;
28
+ runTest(): void;
29
+ getTestCases([canAddCustomTestCases]: [boolean]): (ExampleTestCase | CustomTestCase)[];
30
+ private listenLanguageChange;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<TestResultsComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<TestResultsComponent, "tgo-code-test-results", never, { "companyColor": { "alias": "companyColor"; "required": false; }; "testCasesStatus": { "alias": "testCasesStatus"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "runTestResponse": { "alias": "runTestResponse"; "required": false; }; "translations": { "alias": "translations"; "required": false; }; "isLAT": { "alias": "isLAT"; "required": false; }; "isSQL": { "alias": "isSQL"; "required": false; }; "exampleTestCases": { "alias": "exampleTestCases"; "required": false; }; "canChangeProgrammingLang": { "alias": "canChangeProgrammingLang"; "required": false; }; "showTestCases": { "alias": "showTestCases"; "required": false; }; "canAddCustomTestCases": { "alias": "canAddCustomTestCases"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; }, { "runTestClick": "runTestClick"; }, never, never, true, never>;
33
+ }
@@ -0,0 +1,69 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { ApplicationTheme } from '@testgorilla/tgo-ui';
3
+ import { CodeEditorFuncParam, CodeEditorLanguages, CodeEditorTypesMap } from '../code-editor/helpers/code-editor-helper.model';
4
+ import { PasteData } from '../code-editor/models/code-editor.model';
5
+ import { CodingSnapshot } from '../code-editor/models/coding-snapshot.model';
6
+ import { LATLanguage, LATLanguages } from '../../models/lat-languages';
7
+ import { Modes } from '../../models/mode';
8
+ import { ExampleTestCase } from '../../models/test-cases';
9
+ import { ViewMode } from '../../models/view-mode';
10
+ import * as i0 from "@angular/core";
11
+ export declare class TgoCodingTestComponent implements OnInit, OnChanges {
12
+ private readonly configurationsService;
13
+ private readonly libCodingTestService;
14
+ private readonly testCasesService;
15
+ private readonly StorageCodingService;
16
+ private readonly themeService;
17
+ initCode: string;
18
+ snapshot: CodingSnapshot;
19
+ functionParams: CodeEditorFuncParam[];
20
+ functionName: string;
21
+ returnType: keyof CodeEditorTypesMap;
22
+ isLAT: boolean;
23
+ isSQL: boolean;
24
+ shouldGenerateInitCode: boolean;
25
+ canAddCustomTestCases: boolean;
26
+ selectedProgrammingLanguage: LATLanguage;
27
+ set languages(value: LATLanguages);
28
+ isReadonly: boolean;
29
+ autoHeight: boolean;
30
+ translations: Record<string, unknown>;
31
+ questionText: string;
32
+ mode: Modes;
33
+ assessmentId: string;
34
+ companyColor: string;
35
+ testCasesStatus: any;
36
+ loading: boolean;
37
+ runTestResponse: any[];
38
+ viewMode: ViewMode;
39
+ exampleTestCases: ExampleTestCase[];
40
+ hideTestCases: boolean;
41
+ applicationTheme: ApplicationTheme;
42
+ questionId: number;
43
+ pasteEvent: EventEmitter<PasteData>;
44
+ codeChange: EventEmitter<string>;
45
+ runTestClick: EventEmitter<boolean>;
46
+ languageChange: EventEmitter<CodeEditorLanguages>;
47
+ colorTheme$: import("rxjs").Observable<import("@testgorilla/tgo-coding-test").Themes>;
48
+ isFullscreenMode$: import("rxjs").Observable<boolean>;
49
+ isFullViewMode: boolean;
50
+ ViewModes: typeof ViewMode;
51
+ themeSpecificColor: string;
52
+ ngOnInit(): void;
53
+ ngOnChanges(changes: SimpleChanges): void;
54
+ updateInitCode(code: string): void;
55
+ private updateLanguage;
56
+ private isSavedLangRelevant;
57
+ private getRelevantLangVersion;
58
+ private updateTestCases;
59
+ private setIsFullViewMode;
60
+ private setCompanyColor;
61
+ /**
62
+ * Performs periodic maintenance on localStorage data
63
+ * This is done with a random chance to distribute cleanup over time
64
+ * and prevent all users from cleaning up storage at the same time.
65
+ */
66
+ private performPeriodicMaintenance;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<TgoCodingTestComponent, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<TgoCodingTestComponent, "tgo-coding-test[languages]", never, { "initCode": { "alias": "initCode"; "required": false; }; "snapshot": { "alias": "snapshot"; "required": false; }; "functionParams": { "alias": "functionParams"; "required": false; }; "functionName": { "alias": "functionName"; "required": false; }; "returnType": { "alias": "returnType"; "required": false; }; "isLAT": { "alias": "isLAT"; "required": false; }; "isSQL": { "alias": "isSQL"; "required": false; }; "shouldGenerateInitCode": { "alias": "shouldGenerateInitCode"; "required": false; }; "canAddCustomTestCases": { "alias": "canAddCustomTestCases"; "required": false; }; "selectedProgrammingLanguage": { "alias": "selectedProgrammingLanguage"; "required": false; }; "languages": { "alias": "languages"; "required": false; }; "isReadonly": { "alias": "isReadonly"; "required": false; }; "autoHeight": { "alias": "autoHeight"; "required": false; }; "translations": { "alias": "translations"; "required": false; }; "questionText": { "alias": "questionText"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "assessmentId": { "alias": "assessmentId"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "testCasesStatus": { "alias": "testCasesStatus"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "runTestResponse": { "alias": "runTestResponse"; "required": false; }; "viewMode": { "alias": "viewMode"; "required": false; }; "exampleTestCases": { "alias": "exampleTestCases"; "required": false; }; "hideTestCases": { "alias": "hideTestCases"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "questionId": { "alias": "questionId"; "required": false; }; }, { "pasteEvent": "pasteEvent"; "codeChange": "codeChange"; "runTestClick": "runTestClick"; "languageChange": "languageChange"; }, never, never, true, never>;
69
+ }
@@ -0,0 +1,101 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { Assessment, IAntiCheatingState, IConfigurationState, INavigationButtonState, IQuestionDataContract, ISubmissionState, Question, TestResultRead } from '../../../shared/index';
3
+ import { ApplicationTheme } from '@testgorilla/tgo-ui';
4
+ import { Observable } from 'rxjs';
5
+ import { CodingTestsResultsModel } from '../../models/coderunner-execution-results';
6
+ import { LATLanguages } from '../../models/lat-languages';
7
+ import { Modes } from '../../models/mode';
8
+ import { PasteData } from '../../models/paste-data';
9
+ import { ProgrammingLanguage } from '../../models/programming-language';
10
+ import { ExampleTestCase } from '../../models/test-cases';
11
+ import { ViewMode } from '../../models/view-mode';
12
+ import { CodeEditorLanguages } from '../code-editor/helpers/code-editor-helper.model';
13
+ import * as i0 from "@angular/core";
14
+ export declare class TgoCodingTestCandidateViewComponent implements OnInit, IQuestionDataContract, OnDestroy {
15
+ private readonly dialogService;
16
+ private readonly translationScope;
17
+ private readonly candidatureApiService;
18
+ private readonly codingTestTourService;
19
+ private readonly libCodingTestService;
20
+ private readonly environmentService;
21
+ private readonly codingTestService;
22
+ private readonly translocoService;
23
+ private readonly themeService;
24
+ private readonly apiService;
25
+ private readonly route;
26
+ private readonly codingTestConfigService;
27
+ assessment?: Assessment;
28
+ question: Question;
29
+ test: TestResultRead;
30
+ expirationObservable?: Observable<void>;
31
+ completeObservable?: Observable<void>;
32
+ isDemo?: boolean;
33
+ validationStatusChanged: EventEmitter<any>;
34
+ antiCheatingConfigurationChanged: EventEmitter<IAntiCheatingState>;
35
+ fullscreenChanged: EventEmitter<boolean>;
36
+ themeChanged: EventEmitter<ApplicationTheme>;
37
+ codingFullscreenChanged: EventEmitter<boolean>;
38
+ navigationButtonStateChanged: EventEmitter<INavigationButtonState>;
39
+ configurationStateChanged: EventEmitter<IConfigurationState>;
40
+ submissionStateChanged: EventEmitter<ISubmissionState>;
41
+ loadingStateChanged: EventEmitter<boolean>;
42
+ hostClass: string;
43
+ private readonly subscription;
44
+ initCode: string;
45
+ viewModes: typeof ViewMode;
46
+ mode: Modes;
47
+ companyColor: string;
48
+ initCodesMap: Map<CodeEditorLanguages, string>;
49
+ languages: import("@angular/core").WritableSignal<LATLanguages>;
50
+ codingLibTranslations: import("@angular/core").WritableSignal<{
51
+ [key: string]: string;
52
+ }>;
53
+ rawLanguages: ProgrammingLanguage[];
54
+ currentLanguage?: string;
55
+ isSQL: boolean;
56
+ isLAT: boolean;
57
+ code: string;
58
+ codingTestResults?: CodingTestsResultsModel;
59
+ testResultsLoading: import("@angular/core").Signal<boolean>;
60
+ exampleTestCases: ExampleTestCase[];
61
+ activeGuidedTourId$: Observable<string>;
62
+ firstTestRunComplete: boolean;
63
+ canopyUiTheme: ApplicationTheme;
64
+ private wasTourShown;
65
+ ngOnDestroy(): void;
66
+ ngOnInit(): void;
67
+ openSaveDialog(): void;
68
+ private clearLastLanguageSelected;
69
+ private clearSavedCode;
70
+ private submitCode;
71
+ private getVersionedLanguage;
72
+ private enableNextButton;
73
+ languageChange(selectedLangName: CodeEditorLanguages): void;
74
+ updateCode(code: string): void;
75
+ runTest(): void;
76
+ screenshotPaste(event: PasteData): void;
77
+ private setupAutosaveEvent;
78
+ private setupState;
79
+ private setCodingLibTranslations;
80
+ private setApiParams;
81
+ private setIsSQL;
82
+ private setSqlInitCode;
83
+ private setSqlLang;
84
+ private setIsLat;
85
+ private setMode;
86
+ private listenGuidedTourStart;
87
+ private handleGuidedTour;
88
+ private getAllLanguages;
89
+ private loadAvailableLanguages;
90
+ private listenThemeChange;
91
+ private listenFullscreenChange;
92
+ private listenDeleteCustomTestCases;
93
+ private listenLanguageChange;
94
+ private listenResetCode;
95
+ private listenTestResults;
96
+ private setSqlTestCases;
97
+ private setTestCases;
98
+ private setListeners;
99
+ static ɵfac: i0.ɵɵFactoryDeclaration<TgoCodingTestCandidateViewComponent, never>;
100
+ static ɵcmp: i0.ɵɵComponentDeclaration<TgoCodingTestCandidateViewComponent, "tgo-coding-test-candidate-view", never, { "assessment": { "alias": "assessment"; "required": false; }; "question": { "alias": "question"; "required": true; }; "test": { "alias": "test"; "required": true; }; "expirationObservable": { "alias": "expirationObservable"; "required": false; }; "completeObservable": { "alias": "completeObservable"; "required": false; }; "isDemo": { "alias": "isDemo"; "required": false; }; }, { "validationStatusChanged": "validationStatusChanged"; "antiCheatingConfigurationChanged": "antiCheatingConfigurationChanged"; "fullscreenChanged": "fullscreenChanged"; "themeChanged": "themeChanged"; "codingFullscreenChanged": "codingFullscreenChanged"; "navigationButtonStateChanged": "navigationButtonStateChanged"; "configurationStateChanged": "configurationStateChanged"; "submissionStateChanged": "submissionStateChanged"; "loadingStateChanged": "loadingStateChanged"; }, never, never, true, never>;
101
+ }
@@ -1,3 +1,2 @@
1
1
  export { TgoCodingTestConfig } from './tgo-coding-test.config';
2
2
  export { provideTgoCodingTest } from './tgo-coding-test.provider';
3
-
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Configuration interface for the TGO Coding Test library.
3
+ *
4
+ * This interface defines the runtime configuration that must be provided
5
+ * by the consuming application. The library does not hold environment
6
+ * variables itself; instead, it receives them from the host application
7
+ * through dependency injection.
8
+ */
9
+ export interface TgoCodingTestConfig {
10
+ /**
11
+ * The base URL for the main API endpoint.
12
+ * This is required for the library to communicate with the main API service.
13
+ *
14
+ * Example: 'https://api-talent-staging.testgorilla.com/api/'
15
+ */
16
+ apiUrl: string;
17
+ /**
18
+ * The base URL for the CodeRunner V2 API endpoint.
19
+ * This is required for the library to communicate with the code execution service.
20
+ *
21
+ * Example: 'https://cr-v2-staging.testgorilla.com'
22
+ */
23
+ coderunnerV2Endpoint: string;
24
+ }
@@ -1,21 +1,19 @@
1
- import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';
2
- import { TGO_CODING_TEST_CONFIG } from './tgo-coding-test.token';
1
+ import { EnvironmentProviders } from '@angular/core';
3
2
  import { TgoCodingTestConfig } from './tgo-coding-test.config';
4
-
5
3
  /**
6
4
  * Provides the TGO Coding Test library configuration.
7
- *
5
+ *
8
6
  * This function should be called in the consuming application's
9
7
  * app.config.ts (for standalone apps) or module providers.
10
- *
8
+ *
11
9
  * @param config - The configuration object containing required settings
12
10
  * @returns EnvironmentProviders that can be added to the application providers
13
- *
11
+ *
14
12
  * @example
15
13
  * ```typescript
16
14
  * import { provideTgoCodingTest } from '@testgorilla/tgo-coding-test';
17
15
  * import { environment } from './environments/environment';
18
- *
16
+ *
19
17
  * export const appConfig: ApplicationConfig = {
20
18
  * providers: [
21
19
  * provideTgoCodingTest({
@@ -25,14 +23,4 @@ import { TgoCodingTestConfig } from './tgo-coding-test.config';
25
23
  * };
26
24
  * ```
27
25
  */
28
- export function provideTgoCodingTest(
29
- config: TgoCodingTestConfig
30
- ): EnvironmentProviders {
31
- return makeEnvironmentProviders([
32
- {
33
- provide: TGO_CODING_TEST_CONFIG,
34
- useValue: config,
35
- },
36
- ]);
37
- }
38
-
26
+ export declare function provideTgoCodingTest(config: TgoCodingTestConfig): EnvironmentProviders;
@@ -0,0 +1,9 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { TgoCodingTestConfig } from './tgo-coding-test.config';
3
+ /**
4
+ * Injection token for the TGO Coding Test library configuration.
5
+ *
6
+ * This token is used to inject the runtime configuration provided
7
+ * by the consuming application into library services.
8
+ */
9
+ export declare const TGO_CODING_TEST_CONFIG: InjectionToken<TgoCodingTestConfig>;
@@ -0,0 +1,42 @@
1
+ import { CodeEditorLanguages } from '../components/code-editor/helpers/code-editor-helper.model';
2
+ import { Config } from './configs';
3
+ import { CustomTestCase, ExampleTestCase } from './test-cases';
4
+ export type TestData = {
5
+ code: {
6
+ [key in CodeEditorLanguages]?: string;
7
+ };
8
+ testCasesLAT?: (CustomTestCase | ExampleTestCase)[];
9
+ lastModified?: number;
10
+ };
11
+ export type QuestionData = {
12
+ preview?: TestData;
13
+ actual?: TestData;
14
+ lastModified?: number;
15
+ };
16
+ export type AutoSavedDataV1 = {
17
+ config: Config;
18
+ isFullscreen: boolean;
19
+ assessments: {
20
+ [key: string]: TestData;
21
+ };
22
+ lastLanguageLAT?: {
23
+ value: CodeEditorLanguages;
24
+ version: string;
25
+ };
26
+ };
27
+ export type AutoSavedDataV2 = {
28
+ version: 2;
29
+ config: Config;
30
+ isFullscreen: boolean;
31
+ assessments: {
32
+ [assessmentId: string]: {
33
+ [questionId: string]: QuestionData;
34
+ };
35
+ };
36
+ lastLanguageLAT?: {
37
+ value: CodeEditorLanguages;
38
+ version: string;
39
+ } | null;
40
+ lastModified: number;
41
+ };
42
+ export type AutoSavedData = AutoSavedDataV2;
@@ -0,0 +1,15 @@
1
+ export interface CodeEvent {
2
+ language: string;
3
+ code: string;
4
+ extra_payload: string;
5
+ event_type: CodeEventTypeEnum;
6
+ attempt_id: string | null;
7
+ question_result_id: number;
8
+ }
9
+ export interface CodeEventResponse extends CodeEvent {
10
+ id: string;
11
+ created_at: string;
12
+ updated_at: string;
13
+ }
14
+ type CodeEventTypeEnum = 'AUTOSAVE' | 'SWITCH' | 'COPYPASTE' | 'ATTEMPT';
15
+ export {};
@@ -0,0 +1,51 @@
1
+ export interface SqlTestResult {
2
+ content: string;
3
+ response_msg: string;
4
+ stderr: string | null;
5
+ stdout: string[];
6
+ test_result: string;
7
+ }
8
+ export interface CodeTestResult {
9
+ actualOutput: string;
10
+ logs: string;
11
+ status: 'passed' | 'error';
12
+ }
13
+ export type TestResult = SqlTestResult | CodeTestResult;
14
+ export interface CodingTestsResultsModel {
15
+ listResponse: TestResult[];
16
+ resume: {
17
+ ok: number;
18
+ error: number;
19
+ total: number;
20
+ };
21
+ }
22
+ export interface CoderunnerAttemptModel {
23
+ code?: string;
24
+ created_at?: string;
25
+ executions?: CoderunnerTestCaseExecutionModel[];
26
+ id?: string;
27
+ language?: string;
28
+ question_result_id?: number;
29
+ updated_at?: string;
30
+ }
31
+ export interface CoderunnerTestCaseExecutionModel {
32
+ input: string;
33
+ evaluation: {
34
+ testcase?: string;
35
+ };
36
+ run: CodeRunnerTestCaseExecutionOutputModel;
37
+ compile: CodeRunnerTestCaseExecutionOutputModel;
38
+ attempt_id: null;
39
+ submission_id: null;
40
+ validation_id: null;
41
+ id: string;
42
+ created_at: string;
43
+ updated_at: string;
44
+ }
45
+ export interface CodeRunnerTestCaseExecutionOutputModel {
46
+ stdout?: string;
47
+ stderr?: string;
48
+ signal?: string;
49
+ output?: string;
50
+ }
51
+ export declare const TIMEOUT_SIGNAL = "SIGKILL";
@@ -0,0 +1,15 @@
1
+ import { Themes } from './theme';
2
+ export declare const enum FormattingOptions {
3
+ ColorTheme = "Color theme",
4
+ TabSize = "Tab size",
5
+ FontSize = "Font size"
6
+ }
7
+ export declare const enum CodingAssistanceOptions {
8
+ AutoComplete = "Auto-complete",
9
+ ErrorHighlighting = "Error highlighting",
10
+ AutoBrackets = "Auto-brackets"
11
+ }
12
+ export type ConfigValue = Themes | number | boolean;
13
+ export type Config = {
14
+ [key in FormattingOptions | CodingAssistanceOptions]?: ConfigValue;
15
+ };
@@ -0,0 +1,4 @@
1
+ export declare const enum LanguageChangeAction {
2
+ Cancel = "cancel",
3
+ Confirm = "confirm"
4
+ }
@@ -0,0 +1,8 @@
1
+ import { CodeEditorLanguages } from '../components/code-editor/helpers/code-editor-helper.model';
2
+ export type LATLanguage = {
3
+ label: string;
4
+ value: CodeEditorLanguages;
5
+ version?: string;
6
+ };
7
+ export type LATLanguages = LATLanguage[];
8
+ export declare const AssessmentIdPreview = "preview-id";
@@ -0,0 +1,3 @@
1
+ export declare const enum MixpanelEvents {
2
+ ChangedSettings = "Changed Coderunner setting"
3
+ }
@@ -0,0 +1,5 @@
1
+ export declare const enum Modes {
2
+ Preview = "preview",
3
+ Running = "running",
4
+ NonAssessmentPreview = "non-assessment-preview"
5
+ }
@@ -0,0 +1,4 @@
1
+ export interface PasteData {
2
+ type: string;
3
+ data: string;
4
+ }
@@ -0,0 +1,8 @@
1
+ export interface ProgrammingLanguage {
2
+ id?: number;
3
+ name?: string;
4
+ version?: string;
5
+ }
6
+ export declare const enum ProgrammingLanguageVersioned {
7
+ SQLite = "sqlite3-3.36.0"
8
+ }