interview-widget 3.2.24-beta.0 → 3.2.26
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.
- package/README.md +7 -4
- package/dist/components/interview/interview-content.d.ts +5 -0
- package/dist/components/media/video-feed.d.ts +1 -0
- package/dist/components/modals/retry-confirmation-modal.d.ts +9 -0
- package/dist/context/interview-widget-context.d.ts +3 -0
- package/dist/hooks/use-video-recording.d.ts +1 -1
- package/dist/services/stt/stt-service.d.ts +1 -0
- package/dist/types.d.ts +3 -0
- package/dist/utils/safari-audio-utils.d.ts +6 -6
- package/dist/widget.3.2.26.css +1 -0
- package/dist/{widget.es.3.2.24-beta.0.js → widget.es.3.2.26.js} +2702 -2611
- package/dist/widget.umd.3.2.26.js +179 -0
- package/package.json +9 -9
- package/dist/widget.3.2.24-beta.0.css +0 -1
- package/dist/widget.umd.3.2.24-beta.0.js +0 -179
package/README.md
CHANGED
|
@@ -201,10 +201,13 @@ Pass this object to `InterviewWidgetProvider` via the `config` prop. Tables list
|
|
|
201
201
|
|
|
202
202
|
### UI
|
|
203
203
|
|
|
204
|
-
| Prop
|
|
205
|
-
|
|
|
206
|
-
| baseColor
|
|
207
|
-
| borderRadius | `string (CSS)` | "8px"
|
|
204
|
+
| Prop | Type | Default | Description |
|
|
205
|
+
| --- | --- | --- | --- |
|
|
206
|
+
| baseColor | `string (hex)` | "#3B82F6" | Primary brand color used by the widget |
|
|
207
|
+
| borderRadius | `string (CSS)` | "8px" | Global corner radius for components |
|
|
208
|
+
| retryProgressSavedText | `string` | `"Your progress is saved — tap Retry or exit the interview..."` | Text to show in next-question retry modal |
|
|
209
|
+
| retryMaxAttempts | `number` | 3 | Maximum number of attempts allowed for retrying next question |
|
|
210
|
+
| retryNoAttemptsLeftText | `string` | `"No retry attempts left. Please refresh or come back later."` | Error message shown when max attempts are reached |
|
|
208
211
|
|
|
209
212
|
### Interview
|
|
210
213
|
|
|
@@ -22,6 +22,11 @@ interface InterviewContentProps {
|
|
|
22
22
|
onAnswerChange?: ((e: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
23
23
|
editingTime?: number | undefined;
|
|
24
24
|
disableSubmitButton?: boolean;
|
|
25
|
+
fetchQuestionError?: any;
|
|
26
|
+
onRetryQuestion?: () => void;
|
|
27
|
+
retryClicksCount?: number;
|
|
28
|
+
isFetchingQuestion?: boolean;
|
|
29
|
+
onExitInterview?: () => void;
|
|
25
30
|
}
|
|
26
31
|
export declare const InterviewContent: React.FC<InterviewContentProps>;
|
|
27
32
|
export {};
|
|
@@ -18,6 +18,7 @@ interface VideoFeedProps {
|
|
|
18
18
|
cheatingWarningVisible?: boolean;
|
|
19
19
|
isDeviceLoading?: boolean;
|
|
20
20
|
videoAllowed?: boolean;
|
|
21
|
+
questionNumber?: number;
|
|
21
22
|
}
|
|
22
23
|
declare const VideoFeed: import('react').ForwardRefExoticComponent<VideoFeedProps & import('react').RefAttributes<VideoFeedHandle>>;
|
|
23
24
|
export default VideoFeed;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface RetryConfirmationModalProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onRetry: () => void;
|
|
4
|
+
onExit: () => void;
|
|
5
|
+
retryClicksCount: number;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const RetryConfirmationModal: ({ isOpen, onRetry, onExit, retryClicksCount, isLoading, }: RetryConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -21,6 +21,9 @@ export declare function useAPIConfig(): {
|
|
|
21
21
|
export declare function useUIConfig(): {
|
|
22
22
|
baseColor?: string;
|
|
23
23
|
borderRadius?: string;
|
|
24
|
+
retryProgressSavedText?: string;
|
|
25
|
+
retryMaxAttempts?: number;
|
|
26
|
+
retryNoAttemptsLeftText?: string;
|
|
24
27
|
};
|
|
25
28
|
export declare function useInterviewConfigSection(): NonNullable<InterviewWidgetConfig["interview"]>;
|
|
26
29
|
export declare function useSTTConfig(): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function useVideoRecordingStream(interviewId: string, record_video?: boolean): {
|
|
1
|
+
export declare function useVideoRecordingStream(interviewId: string, record_video?: boolean, questionNumber?: number): {
|
|
2
2
|
startRecording: (stream: MediaStream) => void;
|
|
3
3
|
stopRecording: () => void;
|
|
4
4
|
isRecording: boolean;
|
package/dist/types.d.ts
CHANGED
|
@@ -46,6 +46,9 @@ export interface InterviewWidgetConfig {
|
|
|
46
46
|
ui?: {
|
|
47
47
|
baseColor?: string;
|
|
48
48
|
borderRadius?: string;
|
|
49
|
+
retryProgressSavedText?: string;
|
|
50
|
+
retryMaxAttempts?: number;
|
|
51
|
+
retryNoAttemptsLeftText?: string;
|
|
49
52
|
};
|
|
50
53
|
interview?: {
|
|
51
54
|
allow_answer_editing?: boolean;
|
|
@@ -39,11 +39,11 @@ export declare function getSafariSafeAudioConstraints(base?: MediaTrackConstrain
|
|
|
39
39
|
*/
|
|
40
40
|
export declare function getMediaRecorderStartArg(): number | undefined;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
42
|
+
* [SAFARI] Do NOT call requestData() before stop().
|
|
43
|
+
* Without a timeslice, stop() guarantees one ondataavailable fires
|
|
44
|
+
* synchronously before onstop. Calling requestData() first queues a
|
|
45
|
+
* SECOND ondataavailable as a separate task — on some Safari versions
|
|
46
|
+
* that second event arrives AFTER onstop, so audioChunks is empty
|
|
47
|
+
* when the blob is assembled. Just call stop().
|
|
48
48
|
*/
|
|
49
49
|
export declare function safariSafeStop(recorder: MediaRecorder): void;
|