@myinterview/widget-react 1.0.311 → 1.1.0

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 (166) hide show
  1. package/dist/cjs/App.d.ts +3 -0
  2. package/dist/cjs/components/AnswerInstructions.d.ts +7 -0
  3. package/dist/cjs/components/AssessmentController.d.ts +12 -0
  4. package/dist/cjs/components/AssessmentFreeText.d.ts +7 -0
  5. package/dist/cjs/components/AssessmentMultiSelect.d.ts +9 -0
  6. package/dist/cjs/components/AssessmentSingleSelect.d.ts +9 -0
  7. package/dist/cjs/components/CharactersLimit.d.ts +7 -0
  8. package/dist/cjs/components/CountDown.d.ts +8 -0
  9. package/dist/cjs/components/Counter.d.ts +8 -0
  10. package/dist/cjs/components/DeviceSelector.d.ts +11 -0
  11. package/dist/cjs/components/DeviceSelectorList.d.ts +9 -0
  12. package/dist/cjs/components/DeviceSelectorListNative.d.ts +6 -0
  13. package/dist/cjs/components/Error.d.ts +8 -0
  14. package/dist/cjs/components/ErrorBoundaries.d.ts +9 -0
  15. package/dist/cjs/components/Errors.d.ts +12 -0
  16. package/dist/cjs/components/Explanation.d.ts +8 -0
  17. package/dist/cjs/components/Footer.d.ts +2 -0
  18. package/dist/cjs/components/Header.d.ts +10 -0
  19. package/dist/cjs/components/InnerView.d.ts +15 -0
  20. package/dist/cjs/components/Main.d.ts +11 -0
  21. package/dist/cjs/components/OuterView.d.ts +8 -0
  22. package/dist/cjs/components/PermissionSteps.d.ts +6 -0
  23. package/dist/cjs/components/PracticeModeInfo.d.ts +2 -0
  24. package/dist/cjs/components/PreviewItem.d.ts +20 -0
  25. package/dist/cjs/components/PreviewList.d.ts +18 -0
  26. package/dist/cjs/components/Question.d.ts +8 -0
  27. package/dist/cjs/components/QuestionItem.d.ts +12 -0
  28. package/dist/cjs/components/QuestionParamaters.d.ts +9 -0
  29. package/dist/cjs/components/QuestionsList.d.ts +11 -0
  30. package/dist/cjs/components/RecorderModal.d.ts +13 -0
  31. package/dist/cjs/components/Setup.d.ts +7 -0
  32. package/dist/cjs/components/SetupChecks.d.ts +14 -0
  33. package/dist/cjs/components/SliderModal.d.ts +8 -0
  34. package/dist/cjs/components/TopTips.d.ts +2 -0
  35. package/dist/cjs/components/Upload.d.ts +13 -0
  36. package/dist/cjs/components/VideoCamera.d.ts +31 -0
  37. package/dist/cjs/components/VideoQuestion.d.ts +10 -0
  38. package/dist/cjs/components/VideoTimeBar.d.ts +9 -0
  39. package/dist/cjs/components/WelcomePage.d.ts +16 -0
  40. package/dist/cjs/components/Widget.d.ts +3 -0
  41. package/dist/cjs/components/icons/ClockIcon.d.ts +2 -0
  42. package/dist/cjs/components/icons/Loading.d.ts +2 -0
  43. package/dist/cjs/components/icons/NoCameraMic.d.ts +2 -0
  44. package/dist/cjs/components/icons/PlayIcon.d.ts +6 -0
  45. package/dist/cjs/components/icons/Retake.d.ts +2 -0
  46. package/dist/cjs/components/icons/RotateScreenIcon.d.ts +2 -0
  47. package/dist/cjs/components/ui/DotSeparator.d.ts +2 -0
  48. package/dist/cjs/components/ui/Loader.d.ts +2 -0
  49. package/dist/cjs/components/ui/MicrophoneIndicator.d.ts +7 -0
  50. package/dist/cjs/components/ui/MinimizeButton.d.ts +6 -0
  51. package/dist/cjs/components/ui/PracticeMode.d.ts +2 -0
  52. package/dist/cjs/components/ui/Progress.d.ts +6 -0
  53. package/dist/cjs/components/ui/QuestionDuration.d.ts +6 -0
  54. package/dist/cjs/components/ui/QuestionNumber.d.ts +7 -0
  55. package/dist/cjs/components/ui/RecordingButton.d.ts +6 -0
  56. package/dist/cjs/components/ui/RotateScreen.d.ts +2 -0
  57. package/dist/cjs/components/ui/Signal.d.ts +9 -0
  58. package/dist/cjs/components/ui/StartNowButton.d.ts +6 -0
  59. package/dist/cjs/components/ui/StartRecordingButton.d.ts +11 -0
  60. package/dist/cjs/components/ui/StopRecordingButton.d.ts +7 -0
  61. package/dist/cjs/components/ui/UnsupportedModal.d.ts +6 -0
  62. package/dist/cjs/config/index.d.ts +7 -0
  63. package/dist/cjs/config/local.env.d.ts +6 -0
  64. package/dist/cjs/config/prod.env.d.ts +6 -0
  65. package/dist/cjs/config/staging.env.d.ts +6 -0
  66. package/dist/cjs/i18n/config.d.ts +1490 -0
  67. package/dist/cjs/index.d.ts +4 -0
  68. package/dist/cjs/index.js +36599 -0
  69. package/dist/cjs/index.js.map +1 -0
  70. package/dist/cjs/interfaces/candidateInterface.d.ts +14 -0
  71. package/dist/cjs/interfaces/candidateSessionInterface.d.ts +83 -0
  72. package/dist/cjs/interfaces/companyInterface.d.ts +4 -0
  73. package/dist/cjs/interfaces/configInterface.d.ts +64 -0
  74. package/dist/cjs/interfaces/countDownInterface.d.ts +23 -0
  75. package/dist/cjs/interfaces/jobInterface.d.ts +72 -0
  76. package/dist/cjs/interfaces/microphoneInterface.d.ts +41 -0
  77. package/dist/cjs/interfaces/networkInterface.d.ts +9 -0
  78. package/dist/cjs/interfaces/previewInterface.d.ts +14 -0
  79. package/dist/cjs/interfaces/recorderInterface.d.ts +203 -0
  80. package/dist/cjs/interfaces/storageInterface.d.ts +29 -0
  81. package/dist/cjs/interfaces/uploaderInterface.d.ts +41 -0
  82. package/dist/cjs/interfaces/videoInterface.d.ts +84 -0
  83. package/dist/cjs/interfaces/widgetInterface.d.ts +231 -0
  84. package/dist/cjs/machines/acceleratorMachines/accUploaderMachine.d.ts +6 -0
  85. package/dist/cjs/machines/acceleratorMachines/accWidgetMachine.d.ts +6 -0
  86. package/dist/cjs/machines/acceleratorMachines/counterMachine.d.ts +5 -0
  87. package/dist/cjs/machines/acceleratorMachines/microphoneMachine.d.ts +6 -0
  88. package/dist/cjs/machines/acceleratorMachines/networkMachine.d.ts +5 -0
  89. package/dist/cjs/machines/acceleratorMachines/previewMachine.d.ts +6 -0
  90. package/dist/cjs/machines/acceleratorMachines/recorderMachineV2.d.ts +6 -0
  91. package/dist/cjs/machines/acceleratorMachines/storageMachine.d.ts +6 -0
  92. package/dist/cjs/reportWebVitals.d.ts +3 -0
  93. package/dist/cjs/services/axiosInstances.service.d.ts +4 -0
  94. package/dist/cjs/services/s3.service.d.ts +1 -0
  95. package/dist/cjs/services/session.service.d.ts +57 -0
  96. package/dist/cjs/services/speedTest.service.d.ts +2 -0
  97. package/dist/cjs/services/video.service.d.ts +7 -0
  98. package/dist/cjs/setupTests.d.ts +1 -0
  99. package/dist/cjs/utils/authToken.utils.d.ts +7 -0
  100. package/dist/cjs/utils/constants.utils.d.ts +21 -0
  101. package/dist/cjs/utils/convertor.utils.d.ts +2 -0
  102. package/dist/cjs/utils/debug.utils.d.ts +19 -0
  103. package/dist/cjs/utils/device.utils.d.ts +12 -0
  104. package/dist/cjs/utils/errors.utils.d.ts +9 -0
  105. package/dist/cjs/utils/formatters.utils.d.ts +5 -0
  106. package/dist/cjs/utils/languages.utils.d.ts +1 -0
  107. package/dist/cjs/utils/messages.utils.d.ts +16 -0
  108. package/dist/cjs/utils/recorderErrors.utils.d.ts +29 -0
  109. package/dist/cjs/utils/sentry.utils.d.ts +6 -0
  110. package/dist/cjs/utils/statusCodes.utils.d.ts +13 -0
  111. package/dist/cjs/workers/microphone.worker.d.ts +2 -0
  112. package/dist/cjs/workers/worker-builder.d.ts +3 -0
  113. package/dist/esm/App.d.ts +1 -0
  114. package/dist/esm/components/AnswerInstructions.d.ts +7 -0
  115. package/dist/esm/components/AssessmentController.d.ts +12 -0
  116. package/dist/esm/components/AssessmentFreeText.d.ts +7 -0
  117. package/dist/esm/components/AssessmentMultiSelect.d.ts +9 -0
  118. package/dist/esm/components/AssessmentSingleSelect.d.ts +9 -0
  119. package/dist/esm/components/CharactersLimit.d.ts +7 -0
  120. package/dist/esm/components/CountDown.d.ts +3 -1
  121. package/dist/esm/components/DeviceSelector.d.ts +3 -2
  122. package/dist/esm/components/Errors.d.ts +2 -2
  123. package/dist/esm/components/Explanation.d.ts +2 -1
  124. package/dist/esm/components/InnerView.d.ts +1 -0
  125. package/dist/esm/components/Main.d.ts +2 -0
  126. package/dist/esm/components/PracticeModeInfo.d.ts +1 -7
  127. package/dist/esm/components/PreviewItem.d.ts +4 -0
  128. package/dist/esm/components/PreviewList.d.ts +1 -0
  129. package/dist/esm/components/Question.d.ts +2 -3
  130. package/dist/esm/components/QuestionItem.d.ts +2 -2
  131. package/dist/esm/components/QuestionParamaters.d.ts +9 -0
  132. package/dist/esm/components/QuestionsList.d.ts +2 -2
  133. package/dist/esm/components/RecorderModal.d.ts +2 -4
  134. package/dist/esm/components/Setup.d.ts +1 -0
  135. package/dist/esm/components/VideoCamera.d.ts +4 -2
  136. package/dist/esm/components/Widget.d.ts +0 -3
  137. package/dist/esm/components/ui/DotSeparator.d.ts +2 -0
  138. package/dist/esm/components/ui/StartRecordingButton.d.ts +1 -0
  139. package/dist/esm/i18n/config.d.ts +349 -0
  140. package/dist/esm/index.d.ts +2 -2
  141. package/dist/esm/index.js +6327 -12129
  142. package/dist/esm/index.js.map +1 -1
  143. package/dist/esm/interfaces/candidateSessionInterface.d.ts +1 -1
  144. package/dist/esm/interfaces/configInterface.d.ts +12 -6
  145. package/dist/esm/interfaces/countDownInterface.d.ts +23 -0
  146. package/dist/esm/interfaces/jobInterface.d.ts +43 -3
  147. package/dist/esm/interfaces/microphoneInterface.d.ts +3 -0
  148. package/dist/esm/interfaces/recorderInterface.d.ts +8 -3
  149. package/dist/esm/interfaces/uploaderInterface.d.ts +5 -3
  150. package/dist/esm/interfaces/videoInterface.d.ts +30 -1
  151. package/dist/esm/interfaces/widgetInterface.d.ts +28 -10
  152. package/dist/esm/machines/acceleratorMachines/counterMachine.d.ts +5 -0
  153. package/dist/esm/services/session.service.d.ts +1 -1
  154. package/dist/esm/services/video.service.d.ts +4 -4
  155. package/dist/esm/utils/constants.utils.d.ts +8 -0
  156. package/dist/esm/utils/convertor.utils.d.ts +2 -0
  157. package/dist/esm/utils/device.utils.d.ts +1 -1
  158. package/dist/esm/utils/formatters.utils.d.ts +1 -1
  159. package/dist/esm/utils/languages.utils.d.ts +1 -0
  160. package/dist/esm/utils/recorderErrors.utils.d.ts +1 -0
  161. package/dist/esm/utils/sentry.utils.d.ts +3 -1
  162. package/dist/esm/workers/microphone.worker.d.ts +2 -0
  163. package/dist/esm/workers/worker-builder.d.ts +3 -0
  164. package/dist/index.d.ts +82 -19
  165. package/package.json +121 -16
  166. package/dist/esm/utils/practiceQuestions.utils.d.ts +0 -2
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties } from 'react';
1
+ import React$1, { CSSProperties } from 'react';
2
2
 
3
3
  interface ICandidate {
4
4
  candidate_id?: string;
@@ -20,6 +20,12 @@ interface ICompany {
20
20
  shouldShowWaterMark: boolean;
21
21
  }
22
22
 
23
+ declare const enum ANSWER_TYPES {
24
+ VIDEO = "video",
25
+ TEXT = "text",
26
+ MULTIPLE = "multiple_choice",
27
+ SINGLE = "single_choice"
28
+ }
23
29
  interface IQuestion {
24
30
  question: string;
25
31
  numOfRetakes: number;
@@ -29,11 +35,43 @@ interface IQuestion {
29
35
  videoQuestion?: string;
30
36
  description?: string;
31
37
  }
32
- declare type IClientQuestion = Omit<IQuestion, 'numOfRetakes' | 'partDuration' | 'thinkingTime'> & {
38
+ interface IQuestionDefault extends IQuestion {
39
+ answerType?: `${ANSWER_TYPES.VIDEO}`;
40
+ }
41
+ interface IQuestionTextAnswer extends IQuestion {
42
+ answerType: `${ANSWER_TYPES.TEXT}`;
43
+ config?: {
44
+ minChars?: number;
45
+ maxChars?: number;
46
+ };
47
+ }
48
+ interface IMultipleChoiceOptionDefinition {
49
+ id: string;
50
+ label: string;
51
+ }
52
+ interface IQuestionChoiceAnswer extends IQuestion {
53
+ config?: {
54
+ shuffle?: boolean;
55
+ answers: IMultipleChoiceOptionDefinition[];
56
+ };
57
+ }
58
+ interface IQuestionMultipleAnswer extends IQuestionChoiceAnswer {
59
+ answerType: `${ANSWER_TYPES.MULTIPLE}`;
60
+ config?: {
61
+ minAnswers?: number;
62
+ maxAnswers?: number;
63
+ } & IQuestionChoiceAnswer['config'];
64
+ }
65
+ interface IQuestionSingleAnswer extends IQuestionChoiceAnswer {
66
+ answerType: `${ANSWER_TYPES.SINGLE}`;
67
+ }
68
+ type leanQuestion<T> = Omit<T, 'numOfRetakes' | 'partDuration' | 'thinkingTime'> & {
33
69
  attempts?: number;
34
70
  duration?: number;
35
71
  thinkingTime?: number;
36
72
  };
73
+ type ALL_JOB_QUESTIONS_TYPE = IQuestionDefault | IQuestionTextAnswer | IQuestionMultipleAnswer | IQuestionSingleAnswer;
74
+ type IClientQuestion = leanQuestion<IQuestionDefault> | leanQuestion<IQuestionTextAnswer> | leanQuestion<IQuestionMultipleAnswer> | leanQuestion<IQuestionSingleAnswer>;
37
75
  interface IJob {
38
76
  language?: string;
39
77
  transcriptLanguage?: string;
@@ -41,7 +79,7 @@ interface IJob {
41
79
  company?: string;
42
80
  job_id?: string;
43
81
  logo?: string;
44
- questions?: IQuestion[];
82
+ questions?: ALL_JOB_QUESTIONS_TYPE[];
45
83
  old_jobID?: string;
46
84
  termsUrl?: string;
47
85
  privacyUrl?: string;
@@ -49,10 +87,14 @@ interface IJob {
49
87
  company_id?: string;
50
88
  jobID?: string;
51
89
  }
52
- declare type IClientJob = Omit<IJob, 'questions'> & {
90
+ type IClientJob = Omit<IJob, 'questions'> & {
53
91
  questions?: IClientQuestion[];
54
92
  };
55
93
 
94
+ interface IVideoDimensions {
95
+ width: number;
96
+ height: number;
97
+ }
56
98
  interface IVideoPlatformOS {
57
99
  architecture: number;
58
100
  family: string;
@@ -79,7 +121,29 @@ interface IVideoFile {
79
121
  uploadUrl?: string;
80
122
  question?: string;
81
123
  selectedTake?: number;
124
+ originalDimensions?: IVideoDimensions;
125
+ }
126
+ interface IVideoFileDefault extends IVideoFile {
127
+ answerType?: ANSWER_TYPES.VIDEO;
128
+ }
129
+ interface IMultipleAnswer {
130
+ id: string;
131
+ label: string;
132
+ selected: boolean;
133
+ }
134
+ interface IVideoFileTextAnswer extends IVideoFile {
135
+ answerType: ANSWER_TYPES.TEXT;
136
+ answer: string;
82
137
  }
138
+ interface IVideoFileMultipleAnswer extends IVideoFile {
139
+ answerType: ANSWER_TYPES.MULTIPLE;
140
+ answer: IMultipleAnswer[];
141
+ }
142
+ interface IVideoFileSingleAnswer extends IVideoFile {
143
+ answerType: ANSWER_TYPES.SINGLE;
144
+ answer: IMultipleAnswer[];
145
+ }
146
+ type ALL_VIDEO_FILE_TYPES = IVideoFileDefault | IVideoFileTextAnswer | IVideoFileMultipleAnswer | IVideoFileSingleAnswer;
83
147
  interface IVideo {
84
148
  video_id?: string;
85
149
  bandwidth?: string;
@@ -92,7 +156,7 @@ interface IVideo {
92
156
  quality?: string;
93
157
  referrer?: string;
94
158
  cvUrl?: string;
95
- videos: IVideoFile[];
159
+ videos?: ALL_VIDEO_FILE_TYPES[];
96
160
  processTime?: number;
97
161
  files?: string[];
98
162
  personalInfo?: Record<string, string>;
@@ -104,7 +168,7 @@ interface IVideo {
104
168
  };
105
169
  }
106
170
 
107
- declare type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
171
+ type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
108
172
  interface IOnFinish {
109
173
  redirectUrl?: string;
110
174
  video_id: string;
@@ -112,15 +176,16 @@ interface IOnFinish {
112
176
  interface IOnError {
113
177
  messageType: IMessageType;
114
178
  }
115
- declare type IEnv = 'dev' | 'development' | 'staging' | 'production' | 'test' | 'local';
179
+ type IEnv = 'dev' | 'staging' | 'production' | 'development' | 'local';
116
180
  interface IConfig {
117
181
  auth: string;
118
182
  onWidgetClicked?: () => void;
119
183
  onFinish?: (data: IOnFinish) => void;
120
184
  onError?: (data: IOnError) => void;
185
+ onWidgetClose?: () => void;
121
186
  openAnimation?: boolean;
122
187
  debug?: boolean;
123
- practiceQuestions?: IQuestion[];
188
+ practiceQuestions?: ALL_JOB_QUESTIONS_TYPE[];
124
189
  overlay?: string;
125
190
  introVideo?: string;
126
191
  welcomeTitle?: string;
@@ -128,8 +193,10 @@ interface IConfig {
128
193
  env?: IEnv;
129
194
  minimizable?: boolean;
130
195
  hideHeader?: boolean;
196
+ hideIntercom?: boolean;
197
+ disablePractice?: boolean;
131
198
  }
132
- declare type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
199
+ type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
133
200
  practiceQuestions?: IClientQuestion[];
134
201
  };
135
202
  interface IWidgetConfig {
@@ -141,19 +208,15 @@ interface IWidgetConfig {
141
208
  disabled?: boolean;
142
209
  buttonText?: string;
143
210
  buttonStyle?: CSSProperties;
211
+ children?: React.ReactNode;
212
+ styleUrls?: string | string[];
213
+ fontsUrls?: string | string[];
144
214
  }
145
- declare type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
215
+ type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
146
216
  job: IClientJob;
147
217
  config: IClientConfig;
148
218
  };
149
219
 
150
- interface IGetToken {
151
- type: string;
152
- value: string;
153
- secretKey: string;
154
- }
155
- declare const getToken: ({ type, value, secretKey }: IGetToken) => string;
156
-
157
- declare const Widget: React.FC<IClientWidgetConfig>;
220
+ declare const Widget: React$1.FC<IClientWidgetConfig>;
158
221
 
159
- export { IClientWidgetConfig, IWidgetConfig, Widget, getToken };
222
+ export { IClientWidgetConfig, IWidgetConfig, Widget };
package/package.json CHANGED
@@ -1,40 +1,64 @@
1
1
  {
2
2
  "name": "@myinterview/widget-react",
3
- "version": "1.0.311",
3
+ "version": "1.1.0",
4
4
  "description": "myInterview widget v3",
5
5
  "module": "dist/esm/index.js",
6
+ "main": "dist/cjs/index.js",
6
7
  "files": [
7
8
  "dist"
8
9
  ],
9
10
  "types": "dist/index.d.ts",
10
11
  "dependencies": {
11
12
  "@cloudflare/stream-react": "^1.8.0",
12
- "@myinterview/component-library": "^1.0.22",
13
+ "@myinterview/component-library": "^1.0.43",
13
14
  "@sentry/react": "^7.7.0",
14
15
  "@sentry/tracing": "^7.7.0",
15
16
  "@xstate/react": "^3.0.1",
16
17
  "axios": "^0.27.2",
18
+ "babel-plugin-named-asset-import": "^0.3.8",
19
+ "bfj": "^7.0.2",
20
+ "browserslist": "^4.18.1",
21
+ "camelcase": "^6.2.1",
17
22
  "crypto-js": "^4.1.1",
23
+ "css-minimizer-webpack-plugin": "^3.2.0",
18
24
  "detect-incognito": "^1.0.0",
25
+ "dotenv": "^10.0.0",
26
+ "dotenv-expand": "^5.1.0",
19
27
  "fix-webm-duration": "^1.0.5",
28
+ "fs-extra": "^10.0.0",
20
29
  "i18next": "^21.8.16",
30
+ "identity-obj-proxy": "^3.0.0",
21
31
  "platform": "^1.3.6",
32
+ "postcss": "^8.4.4",
33
+ "postcss-flexbugs-fixes": "^5.0.2",
34
+ "postcss-loader": "^6.2.1",
35
+ "postcss-normalize": "^10.0.1",
36
+ "postcss-preset-env": "^7.0.1",
37
+ "prompts": "^2.4.2",
38
+ "react-app-polyfill": "^3.0.0",
39
+ "react-dev-utils": "^12.0.0",
22
40
  "react-i18next": "^11.18.5",
23
41
  "react-player": "^2.10.1",
42
+ "react-refresh": "^0.11.0",
43
+ "react-shadow": "^20.0.0",
24
44
  "react-use-intercom": "^2.0.0",
45
+ "resolve": "^1.20.0",
46
+ "resolve-url-loader": "^4.0.0",
25
47
  "rxjs": "^7.5.7",
48
+ "semver": "^7.3.5",
26
49
  "web-vitals": "^2.1.4",
50
+ "workbox-webpack-plugin": "^6.4.1",
27
51
  "xstate": "^4.33.2"
28
52
  },
29
53
  "scripts": {
30
- "start": "REACT_APP_ENV=local HTTPS=true react-scripts start",
31
- "start-prod": "REACT_APP_ENV=prod HTTPS=true react-scripts start",
32
- "start-staging": "REACT_APP_ENV=staging HTTPS=true react-scripts start",
33
- "build": "react-scripts build",
34
- "publish-prod": "REACT_APP_ENV=prod rollup -c && npm publish",
35
- "publish-staging": "REACT_APP_ENV=staging rollup -c && npm publish --tag beta",
36
- "test": "react-scripts test",
37
- "eject": "react-scripts eject"
54
+ "start": "REACT_APP_RELEASE=$npm_package_version REACT_APP_ENV=local HTTPS=true node scripts/start.js",
55
+ "start-prod": "REACT_APP_RELEASE=$npm_package_version REACT_APP_ENV=prod HTTPS=true node scripts/start.js",
56
+ "start-staging": "REACT_APP_RELEASE=$npm_package_version REACT_APP_ENV=staging HTTPS=true node scripts/start.js",
57
+ "build": "node scripts/build.js",
58
+ "publish-prod": "REACT_APP_RELEASE=$npm_package_version REACT_APP_ENV=prod rollup -c && npm publish",
59
+ "publish-staging": "REACT_APP_RELEASE=$npm_package_version REACT_APP_ENV=staging rollup -c && npm publish --tag beta",
60
+ "publish-experimental": "REACT_APP_RELEASE=$npm_package_version REACT_APP_ENV=staging rollup -c && npm publish --tag experimental",
61
+ "test": "node scripts/test.js"
38
62
  },
39
63
  "eslintConfig": {
40
64
  "extends": [
@@ -55,12 +79,16 @@
55
79
  ]
56
80
  },
57
81
  "devDependencies": {
82
+ "@babel/core": "^7.16.0",
83
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
84
+ "@rollup/plugin-babel": "^6.0.2",
58
85
  "@rollup/plugin-commonjs": "^22.0.1",
59
86
  "@rollup/plugin-json": "^4.1.0",
60
87
  "@rollup/plugin-node-resolve": "^13.3.0",
61
88
  "@rollup/plugin-typescript": "^8.3.3",
89
+ "@svgr/webpack": "^5.5.0",
62
90
  "@testing-library/jest-dom": "^5.16.4",
63
- "@testing-library/react": "^13.3.0",
91
+ "@testing-library/react": "^12.1.5 || ^13.4.0",
64
92
  "@testing-library/user-event": "^13.5.0",
65
93
  "@types/crypto-js": "^4.1.1",
66
94
  "@types/jest": "^27.4.1",
@@ -71,29 +99,106 @@
71
99
  "@types/styled-components": "^5.1.25",
72
100
  "@typescript-eslint/eslint-plugin": "^5.19.0",
73
101
  "@typescript-eslint/parser": "^5.30.0",
102
+ "babel-jest": "^27.4.2",
103
+ "babel-loader": "^8.3.0",
104
+ "babel-preset-react-app": "^10.0.1",
105
+ "case-sensitive-paths-webpack-plugin": "^2.4.0",
74
106
  "classnames": "^2.3.1",
107
+ "css-loader": "^6.5.1",
75
108
  "eslint": "^8.13.0",
76
109
  "eslint-config-airbnb": "^19.0.4",
77
110
  "eslint-config-airbnb-typescript": "^17.0.0",
111
+ "eslint-config-react-app": "^7.0.0",
78
112
  "eslint-plugin-import": "^2.26.0",
79
113
  "eslint-plugin-jsx-a11y": "^6.5.1",
80
114
  "eslint-plugin-react": "^7.29.4",
81
115
  "eslint-plugin-react-hooks": "^4.4.0",
116
+ "eslint-webpack-plugin": "^3.1.1",
117
+ "file-loader": "^6.2.0",
118
+ "html-webpack-plugin": "^5.5.0",
119
+ "jest": "^27.4.3",
120
+ "jest-resolve": "^27.4.2",
121
+ "jest-watch-typeahead": "^1.0.0",
122
+ "mini-css-extract-plugin": "^2.4.5",
123
+ "raw-loader": "^4.0.2",
82
124
  "react": "^18.0.0",
83
125
  "react-dom": "^18.0.0",
84
- "react-scripts": "5.0.0",
85
126
  "rollup": "^2.75.7",
127
+ "rollup-plugin-delete": "^2.0.0",
86
128
  "rollup-plugin-dts": "^4.2.2",
87
129
  "rollup-plugin-peer-deps-external": "^2.2.4",
88
130
  "rollup-plugin-postcss": "^4.0.2",
89
131
  "sass": "^1.50.0",
132
+ "sass-loader": "^12.3.0",
133
+ "sass-to-string": "^1.6.3",
134
+ "source-map-loader": "^3.0.0",
135
+ "style-loader": "^3.3.1",
136
+ "terser-webpack-plugin": "^5.2.5",
90
137
  "typescript": "^4.7.4",
91
138
  "webpack": "^5.73.0",
92
- "webpack-cli": "^4.10.0"
139
+ "webpack-cli": "^4.10.0",
140
+ "webpack-dev-server": "^4.6.0",
141
+ "webpack-manifest-plugin": "^4.0.2"
93
142
  },
94
143
  "peerDependencies": {
95
- "@testing-library/react": "^12.1.5 || ^13.4.0",
96
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
97
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
144
+ "babel-loader": "> =8.0.0",
145
+ "react": ">= 16.8.0",
146
+ "react-dom": ">= 16.8.0"
147
+ },
148
+ "jest": {
149
+ "roots": [
150
+ "<rootDir>/src"
151
+ ],
152
+ "collectCoverageFrom": [
153
+ "src/**/*.{js,jsx,ts,tsx}",
154
+ "!src/**/*.d.ts"
155
+ ],
156
+ "setupFiles": [
157
+ "react-app-polyfill/jsdom"
158
+ ],
159
+ "setupFilesAfterEnv": [
160
+ "<rootDir>/src/setupTests.ts"
161
+ ],
162
+ "testMatch": [
163
+ "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
164
+ "<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
165
+ ],
166
+ "testEnvironment": "jsdom",
167
+ "transform": {
168
+ "^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": "<rootDir>/config/jest/babelTransform.js",
169
+ "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
170
+ "^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
171
+ },
172
+ "transformIgnorePatterns": [
173
+ "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$",
174
+ "^.+\\.module\\.(css|sass|scss)$"
175
+ ],
176
+ "modulePaths": [],
177
+ "moduleNameMapper": {
178
+ "^react-native$": "react-native-web",
179
+ "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
180
+ },
181
+ "moduleFileExtensions": [
182
+ "web.js",
183
+ "js",
184
+ "web.ts",
185
+ "ts",
186
+ "web.tsx",
187
+ "tsx",
188
+ "json",
189
+ "web.jsx",
190
+ "jsx",
191
+ "node"
192
+ ],
193
+ "watchPlugins": [
194
+ "jest-watch-typeahead/filename",
195
+ "jest-watch-typeahead/testname"
196
+ ],
197
+ "resetMocks": true
198
+ },
199
+ "babel": {
200
+ "presets": [
201
+ "react-app"
202
+ ]
98
203
  }
99
204
  }
@@ -1,2 +0,0 @@
1
- import { IQuestion } from '../interfaces/jobInterface';
2
- export declare const PRACTICE_QUESTIONS: IQuestion[];