interview-widget 2.0.3 → 3.0.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.
- package/README.md +1 -0
- package/dist/assets/check-icon.d.ts +1 -0
- package/dist/assets/cross-icon.d.ts +1 -0
- package/dist/assets/hourglass-icon.d.ts +1 -0
- package/dist/assets/index.d.ts +10 -2
- package/dist/assets/mic-icon.d.ts +1 -0
- package/dist/assets/mic-off-icon.d.ts +1 -0
- package/dist/assets/video-icon.d.ts +1 -0
- package/dist/assets/video-off-icon.d.ts +1 -0
- package/dist/components/interview/interview-content.d.ts +12 -1
- package/dist/components/interview/interview-controller.d.ts +1 -0
- package/dist/components/interview/interview-header.d.ts +4 -1
- package/dist/components/interview/interview-timer-label.d.ts +8 -0
- package/dist/components/interview/question-display.d.ts +5 -0
- package/dist/components/interview/submit-response-button.d.ts +7 -0
- package/dist/components/interview/transcript/editable-answer.d.ts +10 -0
- package/dist/components/interview/transcript/interview-transcript-view.d.ts +15 -0
- package/dist/components/interview/transcript/interview-transcript.d.ts +19 -0
- package/dist/components/interview/transcript/transcript-phase-indicator.d.ts +8 -0
- package/dist/components/interview/transcript/transcript-qna-item.d.ts +15 -0
- package/dist/components/media/video-feed.d.ts +3 -0
- package/dist/components/modals/onboarding-media-controls.d.ts +16 -0
- package/dist/components/modals/onboarding-steps.d.ts +10 -0
- package/dist/components/ui/extended/chat-ui.d.ts +12 -0
- package/dist/dev.d.ts +2 -0
- package/dist/hooks/use-timer.d.ts +1 -1
- package/dist/services/api/endpoints.d.ts +1 -0
- package/dist/services/api/interview-api.d.ts +5 -1
- package/dist/services/timer/timer-service.d.ts +5 -0
- package/dist/types.d.ts +19 -0
- package/dist/utils/helper.d.ts +1 -0
- package/dist/widget.css +1 -1
- package/dist/widget.es.js +14631 -4716
- package/dist/widget.umd.js +31 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -156,6 +156,7 @@ export default function App() {
|
|
|
156
156
|
| `interviewId` | `string` | Required | Unique interview identifier used for backend API calls |
|
|
157
157
|
| `title` | `string` | `"Interview"` | Title displayed in the interview header |
|
|
158
158
|
| `brandName` | `string` | `"Novara"` | Brand name displayed in the widget header |
|
|
159
|
+
| `brandLogo` | `ReactNode` | `undefined` | Brand logo displayed in the widget header (replaces brandName initial) |
|
|
159
160
|
| `onInterviewEnd` | `() => void` | `undefined` | Called when the interview completes or the user exits |
|
|
160
161
|
| `onInterviewDisqualify` | `() => void` | `undefined` | Called when the interview is disqualified (e.g., due to cheating detection) |
|
|
161
162
|
| `className` | `string` | `""` | Additional CSS classes applied to the outer widget container |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CheckIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CrossIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HourglassIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/assets/index.d.ts
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
export * from './alert-triangle-icon';
|
|
2
|
+
export * from './bolt-icon';
|
|
2
3
|
export * from './bot-icon';
|
|
4
|
+
export * from './camera-off-icon';
|
|
5
|
+
export * from './check-icon';
|
|
3
6
|
export * from './clock-fading-icon';
|
|
4
7
|
export * from './clock-icon';
|
|
8
|
+
export * from './cross-icon';
|
|
5
9
|
export * from './eye-icon';
|
|
6
10
|
export * from './focus-icon';
|
|
11
|
+
export * from './hourglass-icon';
|
|
12
|
+
export * from './info-icon';
|
|
7
13
|
export * from './keyboard-icon';
|
|
8
14
|
export * from './loader-icon';
|
|
15
|
+
export * from './mic-icon';
|
|
16
|
+
export * from './mic-off-icon';
|
|
9
17
|
export * from './monitor-icon';
|
|
10
18
|
export * from './mouse-pointer-click-icon';
|
|
11
19
|
export * from './shield-icon';
|
|
12
20
|
export * from './speak-icon';
|
|
13
|
-
export * from './bolt-icon';
|
|
14
|
-
export * from './camera-off-icon';
|
|
15
21
|
export * from './target-icon';
|
|
16
22
|
export * from './users-icon';
|
|
23
|
+
export * from './video-icon';
|
|
24
|
+
export * from './video-off-icon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MicIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MicOffIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VideoIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VideoOffIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { TimerPhase } from '../../services/timer/timer-service';
|
|
2
|
+
import { TimerPhase, TimerState } from '../../services/timer/timer-service';
|
|
3
3
|
import { InterviewQuestionData } from '../../types';
|
|
4
4
|
import { VideoFeedHandle } from '../media/video-feed';
|
|
5
5
|
interface InterviewContentProps {
|
|
6
|
+
brandName?: string;
|
|
6
7
|
currentQuestion: InterviewQuestionData | null;
|
|
8
|
+
state?: TimerState;
|
|
7
9
|
phase: TimerPhase;
|
|
8
10
|
className?: string;
|
|
9
11
|
children: ReactNode;
|
|
10
12
|
interviewId?: string;
|
|
11
13
|
interview_duration?: number | undefined;
|
|
12
14
|
videoFeedRef?: React.Ref<VideoFeedHandle> | undefined;
|
|
15
|
+
lastSubmittedAnswer?: {
|
|
16
|
+
qnaId: string;
|
|
17
|
+
answer: string;
|
|
18
|
+
} | null;
|
|
19
|
+
onNextPhase?: () => void;
|
|
20
|
+
answerText?: string | undefined;
|
|
21
|
+
onAnswerChange?: ((e: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
22
|
+
editingTime?: number | undefined;
|
|
23
|
+
answeringTime?: number | undefined;
|
|
13
24
|
}
|
|
14
25
|
export declare const InterviewContent: React.FC<InterviewContentProps>;
|
|
15
26
|
export {};
|
|
@@ -3,6 +3,7 @@ import { VideoFeedHandle } from '../media/video-feed';
|
|
|
3
3
|
interface InterviewControllerProps {
|
|
4
4
|
interviewTitle: string;
|
|
5
5
|
brandName?: string;
|
|
6
|
+
brandLogo?: React.ReactNode;
|
|
6
7
|
interviewId: string;
|
|
7
8
|
onComplete?: (() => void) | undefined;
|
|
8
9
|
onDisqualify?: (() => void) | undefined;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
interface InterviewHeaderProps {
|
|
2
|
+
export interface InterviewHeaderProps {
|
|
3
3
|
title: string;
|
|
4
4
|
brandName?: string;
|
|
5
|
+
brandLogo?: React.ReactNode;
|
|
5
6
|
onExit: () => void;
|
|
7
|
+
totalDuration?: number;
|
|
8
|
+
elapsedTime?: number;
|
|
6
9
|
}
|
|
7
10
|
declare const InterviewHeader: React.FC<InterviewHeaderProps>;
|
|
8
11
|
export default InterviewHeader;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TimerState } from '../../services/timer/timer-service';
|
|
3
|
+
interface InterviewTimerLabelProps {
|
|
4
|
+
timerState?: TimerState | undefined;
|
|
5
|
+
answeringTime?: number | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const InterviewTimerLabel: React.FC<InterviewTimerLabelProps>;
|
|
8
|
+
export {};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { TimerPhase, TimerState } from '../../services/timer';
|
|
2
3
|
import { InterviewQuestionData } from '../../types';
|
|
3
4
|
interface QuestionDisplayProps {
|
|
4
5
|
question: InterviewQuestionData | null;
|
|
5
6
|
isLoading?: boolean;
|
|
6
7
|
className?: string;
|
|
8
|
+
phase?: TimerPhase;
|
|
9
|
+
brandName?: string | undefined;
|
|
10
|
+
timerState?: TimerState | undefined;
|
|
11
|
+
answeringTime?: number | undefined;
|
|
7
12
|
}
|
|
8
13
|
declare const QuestionDisplay: React.FC<QuestionDisplayProps>;
|
|
9
14
|
export default QuestionDisplay;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TimerState } from '../../../services/timer';
|
|
3
|
+
interface EditableAnswerProps {
|
|
4
|
+
answerText: string;
|
|
5
|
+
onAnswerChange?: ((e: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
6
|
+
timerState: TimerState;
|
|
7
|
+
editingTime: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const EditableAnswer: React.FC<EditableAnswerProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TimerState } from '../../../services/timer';
|
|
3
|
+
import { TranscriptMessage } from '../../../types';
|
|
4
|
+
export interface InterviewTranscriptViewProps {
|
|
5
|
+
transcript: TranscriptMessage[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
bottomRef?: React.Ref<HTMLDivElement>;
|
|
9
|
+
isEditing?: boolean | undefined;
|
|
10
|
+
answerText?: string | undefined;
|
|
11
|
+
onAnswerChange?: ((e: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
12
|
+
timerState?: TimerState | undefined;
|
|
13
|
+
editingTime?: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare const InterviewTranscriptView: React.FC<InterviewTranscriptViewProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TimerState } from '../../../services/timer';
|
|
3
|
+
import { InterviewQuestionData } from '../../../types';
|
|
4
|
+
interface InterviewTranscriptProps {
|
|
5
|
+
interviewId: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
currentQuestion?: InterviewQuestionData | null | undefined;
|
|
8
|
+
lastSubmittedAnswer?: {
|
|
9
|
+
qnaId: string;
|
|
10
|
+
answer: string;
|
|
11
|
+
} | null | undefined;
|
|
12
|
+
isEditing?: boolean | undefined;
|
|
13
|
+
answerText?: string | undefined;
|
|
14
|
+
onAnswerChange?: ((e: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
15
|
+
timerState?: TimerState | undefined;
|
|
16
|
+
editingTime?: number | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare const InterviewTranscript: React.FC<InterviewTranscriptProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TimerPhase } from '../../../services/timer';
|
|
3
|
+
interface TranscriptPhaseIndicatorProps {
|
|
4
|
+
phase?: TimerPhase | undefined;
|
|
5
|
+
questionNumber: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const TranscriptPhaseIndicator: React.FC<TranscriptPhaseIndicatorProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TimerState } from '../../../services/timer';
|
|
3
|
+
import { TranscriptMessage } from '../../../types';
|
|
4
|
+
interface TranscriptItemProps {
|
|
5
|
+
item: TranscriptMessage;
|
|
6
|
+
index: number;
|
|
7
|
+
isCurrentQuestion?: boolean;
|
|
8
|
+
isEditable?: boolean | undefined;
|
|
9
|
+
answerText?: string | undefined;
|
|
10
|
+
onAnswerChange?: ((e: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
11
|
+
timerState?: TimerState | undefined;
|
|
12
|
+
editingTime?: number | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare const TranscriptItem: React.FC<TranscriptItemProps>;
|
|
15
|
+
export {};
|
|
@@ -8,6 +8,9 @@ interface VideoFeedProps {
|
|
|
8
8
|
interview_duration?: number | undefined;
|
|
9
9
|
showProctoringUI?: boolean;
|
|
10
10
|
onSetReference?: () => void;
|
|
11
|
+
isAnswering?: boolean;
|
|
12
|
+
onProctoringStatusChange?: (status: string) => void;
|
|
13
|
+
showStatusOverlay?: boolean;
|
|
11
14
|
}
|
|
12
15
|
declare const VideoFeed: import('react').ForwardRefExoticComponent<VideoFeedProps & import('react').RefAttributes<VideoFeedHandle>>;
|
|
13
16
|
export default VideoFeed;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface OnboardingMediaControlsProps {
|
|
3
|
+
micEnabled?: boolean;
|
|
4
|
+
videoEnabled?: boolean;
|
|
5
|
+
onMicToggle?: () => void;
|
|
6
|
+
onVideoToggle?: () => void;
|
|
7
|
+
buttonText: string;
|
|
8
|
+
onButtonClick: () => void;
|
|
9
|
+
isAgreed: boolean;
|
|
10
|
+
onAgreedToggle: (checked: boolean) => void;
|
|
11
|
+
showCheckbox?: boolean;
|
|
12
|
+
showMediaIcons?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const OnboardingMediaControls: React.FC<OnboardingMediaControlsProps>;
|
|
16
|
+
export default OnboardingMediaControls;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface Step {
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
interface OnboardingStepsProps {
|
|
6
|
+
steps: Step[];
|
|
7
|
+
currentStepIndex: number;
|
|
8
|
+
}
|
|
9
|
+
declare const OnboardingSteps: React.FC<OnboardingStepsProps>;
|
|
10
|
+
export default OnboardingSteps;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SystemMessage: React.FC<{
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
}>;
|
|
4
|
+
export declare const UserMessage: React.FC<{
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const QuestionLabel: ({ questionNumber }: {
|
|
8
|
+
questionNumber: number;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const TypingDots: ({ label }: {
|
|
11
|
+
label?: string;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/dev.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TimerCallbacks, TimerConfig, TimerService, TimerState } from '../services/timer/timer-service';
|
|
2
2
|
export interface UseTimerOptions {
|
|
3
3
|
config?: Partial<TimerConfig>;
|
|
4
4
|
callbacks?: TimerCallbacks;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InterviewQuestionPayload, InterviewQuestionResponse,
|
|
1
|
+
import { InterviewConfigResponse, InterviewQuestionPayload, InterviewQuestionResponse, InterviewSubmitAnswerPayload, InterviewTranscriptResponse, InterviewWidgetConfig, ScreenshotUploadRequestResponse } from '../../types';
|
|
2
2
|
declare class InterviewAPI {
|
|
3
3
|
private config;
|
|
4
4
|
constructor(config?: InterviewWidgetConfig["api"]);
|
|
@@ -42,6 +42,10 @@ declare class InterviewAPI {
|
|
|
42
42
|
* Confirm screenshot upload
|
|
43
43
|
*/
|
|
44
44
|
confirmScreenshotUpload(assetId: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Get interview transcription
|
|
47
|
+
*/
|
|
48
|
+
getInterviewTranscription(interviewId: string): Promise<InterviewTranscriptResponse>;
|
|
45
49
|
}
|
|
46
50
|
export declare const interviewAPI: InterviewAPI;
|
|
47
51
|
export { InterviewAPI };
|
|
@@ -28,6 +28,7 @@ export interface TimerCallbacks {
|
|
|
28
28
|
onTick?: (state: TimerState) => void;
|
|
29
29
|
onInterviewEnd?: () => void;
|
|
30
30
|
}
|
|
31
|
+
export declare const DEFAULT_CONFIG: TimerConfig;
|
|
31
32
|
export declare class TimerService {
|
|
32
33
|
private config;
|
|
33
34
|
private state;
|
|
@@ -35,6 +36,10 @@ export declare class TimerService {
|
|
|
35
36
|
private globalIntervalId;
|
|
36
37
|
callbacks: TimerCallbacks;
|
|
37
38
|
constructor(config?: Partial<TimerConfig>, callbacks?: TimerCallbacks);
|
|
39
|
+
/**
|
|
40
|
+
* Update configuration
|
|
41
|
+
*/
|
|
42
|
+
updateConfig(config: Partial<TimerConfig>): void;
|
|
38
43
|
/**
|
|
39
44
|
* Get current state
|
|
40
45
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface InterviewSubmitAnswerPayload {
|
|
|
27
27
|
export interface InterviewWidgetProps {
|
|
28
28
|
interviewId: string;
|
|
29
29
|
brandName?: string;
|
|
30
|
+
brandLogo?: React.ReactNode;
|
|
30
31
|
title?: string;
|
|
31
32
|
onInterviewEnd?: () => void;
|
|
32
33
|
onInterviewDisqualify?: () => void;
|
|
@@ -47,6 +48,7 @@ export interface InterviewWidgetConfig {
|
|
|
47
48
|
borderRadius?: string;
|
|
48
49
|
};
|
|
49
50
|
interview?: {
|
|
51
|
+
allow_answer_editing?: boolean;
|
|
50
52
|
timers?: {
|
|
51
53
|
thinkingDuration?: number;
|
|
52
54
|
answeringDuration?: number;
|
|
@@ -73,6 +75,7 @@ export interface InterviewConfigResponse {
|
|
|
73
75
|
message: string;
|
|
74
76
|
data: {
|
|
75
77
|
duration_in_minutes: number;
|
|
78
|
+
allow_answer_editing: boolean;
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
81
|
export type APIErrorType = "network" | "timeout" | "server" | "client" | "auth" | "rate-limit" | "unknown";
|
|
@@ -113,3 +116,19 @@ export interface ScreenshotUploadRequestResponse {
|
|
|
113
116
|
error?: string | null;
|
|
114
117
|
code?: number;
|
|
115
118
|
}
|
|
119
|
+
export interface InterviewTranscriptResponse {
|
|
120
|
+
success: boolean;
|
|
121
|
+
message: string;
|
|
122
|
+
data: {
|
|
123
|
+
question_answers: TranscriptMessage[];
|
|
124
|
+
};
|
|
125
|
+
error?: string | null;
|
|
126
|
+
code?: number;
|
|
127
|
+
}
|
|
128
|
+
export interface TranscriptMessage {
|
|
129
|
+
qna_id: string;
|
|
130
|
+
question: string;
|
|
131
|
+
answer: string | null;
|
|
132
|
+
question_generated_at: string;
|
|
133
|
+
answer_submitted_at: string | null;
|
|
134
|
+
}
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare function generateButtonGradient(baseColor: string): string;
|
|
|
7
7
|
export declare const generateUniqueId: () => string;
|
|
8
8
|
export declare function decodeJwt(token: string): Record<string, any> | null;
|
|
9
9
|
export declare const getFirstCapital: (str: string | null | undefined) => string;
|
|
10
|
+
export declare const formatTime: (seconds: number) => string;
|