@myinterview/widget-react 1.0.0 → 1.0.2
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 +39 -27
- package/package.json +5 -5
- package/dist/esm/App.d.ts +0 -2
- package/dist/esm/components/CountDown.d.ts +0 -6
- package/dist/esm/components/Counter.d.ts +0 -8
- package/dist/esm/components/DeviceSelector.d.ts +0 -10
- package/dist/esm/components/DeviceSelectorList.d.ts +0 -9
- package/dist/esm/components/DeviceSelectorListNative.d.ts +0 -6
- package/dist/esm/components/Error.d.ts +0 -8
- package/dist/esm/components/ErrorBoundaries.d.ts +0 -9
- package/dist/esm/components/Errors.d.ts +0 -9
- package/dist/esm/components/Explanation.d.ts +0 -7
- package/dist/esm/components/Footer.d.ts +0 -2
- package/dist/esm/components/Header.d.ts +0 -10
- package/dist/esm/components/InnerView.d.ts +0 -12
- package/dist/esm/components/Main.d.ts +0 -8
- package/dist/esm/components/OuterView.d.ts +0 -8
- package/dist/esm/components/PermissionSteps.d.ts +0 -6
- package/dist/esm/components/PracticeModeInfo.d.ts +0 -8
- package/dist/esm/components/PreviewItem.d.ts +0 -10
- package/dist/esm/components/PreviewList.d.ts +0 -17
- package/dist/esm/components/Question.d.ts +0 -9
- package/dist/esm/components/QuestionItem.d.ts +0 -12
- package/dist/esm/components/QuestionsList.d.ts +0 -11
- package/dist/esm/components/RecorderModal.d.ts +0 -14
- package/dist/esm/components/Setup.d.ts +0 -6
- package/dist/esm/components/SetupChecks.d.ts +0 -14
- package/dist/esm/components/SliderModal.d.ts +0 -8
- package/dist/esm/components/Upload.d.ts +0 -13
- package/dist/esm/components/VideoCamera.d.ts +0 -28
- package/dist/esm/components/VideoQuestion.d.ts +0 -9
- package/dist/esm/components/VideoTimeBar.d.ts +0 -9
- package/dist/esm/components/Widget.d.ts +0 -9
- package/dist/esm/components/icons/ClockIcon.d.ts +0 -2
- package/dist/esm/components/icons/Loading.d.ts +0 -2
- package/dist/esm/components/icons/NoCameraMic.d.ts +0 -2
- package/dist/esm/components/icons/PlayIcon.d.ts +0 -6
- package/dist/esm/components/icons/Retake.d.ts +0 -2
- package/dist/esm/components/icons/RotateScreenIcon.d.ts +0 -2
- package/dist/esm/components/ui/Loader.d.ts +0 -2
- package/dist/esm/components/ui/MicrophoneIndicator.d.ts +0 -7
- package/dist/esm/components/ui/PracticeMode.d.ts +0 -2
- package/dist/esm/components/ui/Progress.d.ts +0 -6
- package/dist/esm/components/ui/QuestionDuration.d.ts +0 -6
- package/dist/esm/components/ui/QuestionNumber.d.ts +0 -7
- package/dist/esm/components/ui/RecordingButton.d.ts +0 -6
- package/dist/esm/components/ui/RotateScreen.d.ts +0 -2
- package/dist/esm/components/ui/Signal.d.ts +0 -9
- package/dist/esm/components/ui/StartNowButton.d.ts +0 -6
- package/dist/esm/components/ui/StartRecordingButton.d.ts +0 -10
- package/dist/esm/components/ui/StopRecordingButton.d.ts +0 -7
- package/dist/esm/components/ui/UnsupportedModal.d.ts +0 -6
- package/dist/esm/config/index.d.ts +0 -6
- package/dist/esm/config/local.env.d.ts +0 -6
- package/dist/esm/config/prod.env.d.ts +0 -6
- package/dist/esm/config/staging.env.d.ts +0 -6
- package/dist/esm/i18n/config.d.ts +0 -430
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.js +0 -32177
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/interfaces/candidateInterface.d.ts +0 -10
- package/dist/esm/interfaces/candidateSessionInterface.d.ts +0 -78
- package/dist/esm/interfaces/companyInterface.d.ts +0 -3
- package/dist/esm/interfaces/configInterface.d.ts +0 -33
- package/dist/esm/interfaces/jobInterface.d.ts +0 -22
- package/dist/esm/interfaces/microphoneInterface.d.ts +0 -36
- package/dist/esm/interfaces/networkInterface.d.ts +0 -9
- package/dist/esm/interfaces/previewInterface.d.ts +0 -14
- package/dist/esm/interfaces/recorderInterface.d.ts +0 -110
- package/dist/esm/interfaces/storageInterface.d.ts +0 -29
- package/dist/esm/interfaces/uploaderInterface.d.ts +0 -39
- package/dist/esm/interfaces/videoInterface.d.ts +0 -54
- package/dist/esm/interfaces/widgetInterface.d.ts +0 -192
- package/dist/esm/machines/acceleratorMachines/accUploaderMachine.d.ts +0 -6
- package/dist/esm/machines/acceleratorMachines/accWidgetMachine.d.ts +0 -6
- package/dist/esm/machines/acceleratorMachines/microphoneMachine.d.ts +0 -6
- package/dist/esm/machines/acceleratorMachines/networkMachine.d.ts +0 -5
- package/dist/esm/machines/acceleratorMachines/previewMachine.d.ts +0 -6
- package/dist/esm/machines/acceleratorMachines/recorderMachineV2.d.ts +0 -6
- package/dist/esm/machines/acceleratorMachines/storageMachine.d.ts +0 -6
- package/dist/esm/reportWebVitals.d.ts +0 -3
- package/dist/esm/services/axiosInstances.service.d.ts +0 -3
- package/dist/esm/services/s3.service.d.ts +0 -1
- package/dist/esm/services/session.service.d.ts +0 -46
- package/dist/esm/services/speedTest.service.d.ts +0 -2
- package/dist/esm/services/video.service.d.ts +0 -7
- package/dist/esm/setupTests.d.ts +0 -1
- package/dist/esm/utils/constants.utils.d.ts +0 -9
- package/dist/esm/utils/device.utils.d.ts +0 -12
- package/dist/esm/utils/errors.utils.d.ts +0 -9
- package/dist/esm/utils/formatters.utils.d.ts +0 -5
- package/dist/esm/utils/messages.utils.d.ts +0 -16
- package/dist/esm/utils/practiceQuestions.utils.d.ts +0 -2
- package/dist/esm/utils/sentry.utils.d.ts +0 -4
- package/dist/esm/utils/statusCodes.utils.d.ts +0 -13
- package/dist/index.d.ts +0 -117
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DoneInvokeEvent } from 'xstate';
|
|
2
|
-
import { RecorderInterface } from '../../interfaces/recorderInterface';
|
|
3
|
-
export declare const recorderMachineV2: import("xstate").StateMachine<RecorderInterface, any, DoneInvokeEvent<any>, {
|
|
4
|
-
value: any;
|
|
5
|
-
context: RecorderInterface;
|
|
6
|
-
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, DoneInvokeEvent<any>, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DoneInvokeEvent } from 'xstate';
|
|
2
|
-
import { InitialState } from '../../interfaces/storageInterface';
|
|
3
|
-
export declare const storageMachine: import("xstate").StateMachine<InitialState, any, DoneInvokeEvent<any>, {
|
|
4
|
-
value: any;
|
|
5
|
-
context: InitialState;
|
|
6
|
-
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, DoneInvokeEvent<any>, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const uploadToS3: (url: string, data: File, onProgress?: ((e: any) => void) | undefined, timeout?: number) => Promise<void>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author tht7 ( tht7 )
|
|
3
|
-
* @date 10/07/12022 6:36 pm
|
|
4
|
-
*/
|
|
5
|
-
import { ICandidateSession } from '../interfaces/candidateSessionInterface';
|
|
6
|
-
/**
|
|
7
|
-
* This function will update the session in the database and cache it in the window object
|
|
8
|
-
* it will fill in the current session over the provided object
|
|
9
|
-
* @param session
|
|
10
|
-
* @param baseURL
|
|
11
|
-
*/
|
|
12
|
-
export declare function updateSession(session: Partial<ICandidateSession>, baseURL?: string): Promise<ICandidateSession | undefined>;
|
|
13
|
-
/**
|
|
14
|
-
* This function will fetch the session from the sessionStorage and server
|
|
15
|
-
* it will then cache the session in the window object
|
|
16
|
-
* @param _session - in case you want to override the session, or save a new one to the cache
|
|
17
|
-
* @param _session_id - in case you want to override the session_id and fetch from the server
|
|
18
|
-
*/
|
|
19
|
-
export declare function getCandidateSession(_session?: ICandidateSession, _session_id?: string): Promise<ICandidateSession | undefined>;
|
|
20
|
-
export declare function getSessionIdFromCache(): string | undefined | null;
|
|
21
|
-
/**
|
|
22
|
-
* this will remove the session from the sessionStorage, but not the window cache
|
|
23
|
-
* this should signal the end of this session
|
|
24
|
-
* however the end of a session is when the window gets closed
|
|
25
|
-
* so in order to prevent a new window from (maybe) getting the stale session
|
|
26
|
-
* we remove it from the sessionStorage
|
|
27
|
-
*/
|
|
28
|
-
export declare function deleteSession(): void;
|
|
29
|
-
/** ehehehe this is a type that takes 2 types and matches all the keys of type V from type K */
|
|
30
|
-
declare type KeysMatching<T, V> = {
|
|
31
|
-
[K in keyof T]-?: T[K] extends (V | undefined) ? K : never;
|
|
32
|
-
}[keyof T];
|
|
33
|
-
/**
|
|
34
|
-
* A cute shortcut for updating a date event in the session
|
|
35
|
-
* just give it the key of the date event, and it will update it
|
|
36
|
-
* @param eventType
|
|
37
|
-
*/
|
|
38
|
-
export declare function registerDateEvent(eventType: KeysMatching<ICandidateSession, Date>): Promise<ICandidateSession | undefined>;
|
|
39
|
-
/**
|
|
40
|
-
* Another cute shortcut for updating a number state of a session
|
|
41
|
-
* if no data is provided, it will just increment the number
|
|
42
|
-
* @param eventType
|
|
43
|
-
* @param data
|
|
44
|
-
*/
|
|
45
|
-
export declare function registerCountEvent(eventType: KeysMatching<ICandidateSession, number>, data?: number): Promise<ICandidateSession | undefined>;
|
|
46
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IConfigRequest, IConfigResponse } from '../interfaces/configInterface';
|
|
2
|
-
import { IVideo, IVideoFile } from '../interfaces/videoInterface';
|
|
3
|
-
export declare const createVideo: (config: IConfigRequest) => Promise<IConfigResponse>;
|
|
4
|
-
export declare const getVideo: (videoId: string) => Promise<IConfigResponse>;
|
|
5
|
-
export declare const updateVideo: ({ video_id, completed, uploaded, bandwidth }: IVideo) => Promise<IConfigResponse>;
|
|
6
|
-
export declare const updateVideoFile: (videoId: string, videoFile: IVideoFile) => Promise<IConfigResponse>;
|
|
7
|
-
export declare const getUploadUrl: (videoId: string, fileName: string, typeExtension: string) => Promise<IConfigResponse>;
|
package/dist/esm/setupTests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_COUNT_DOWN = 3;
|
|
2
|
-
export declare const DEFAULT_DURATION = 60;
|
|
3
|
-
export declare const ENOUGH_RECODING_TIME = 3;
|
|
4
|
-
export declare const SPEED_TEST_FILE_SIZE = 5;
|
|
5
|
-
export declare const FAST_UPLOAD_SPEED = 0.35;
|
|
6
|
-
export declare const SLOW_UPLOAD_SPEED = 0.1;
|
|
7
|
-
export declare const SPEED_TEST_TIMEOUT = 5000;
|
|
8
|
-
export declare const MICROPHONE_NO_SOUND_ERROR_CODE = 777;
|
|
9
|
-
export declare const VIDEO_INACTIVE_TIMEOUT = 2000;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const isMobile: boolean;
|
|
2
|
-
export declare const isAndroid: boolean;
|
|
3
|
-
export declare const isSupportedIosDevice: boolean;
|
|
4
|
-
export declare const isSupportedDevice: boolean;
|
|
5
|
-
declare const PLATFORMS_OPTIONS: readonly ["ANDROID", "IOS", "MACBOOK", "WINDOWS"];
|
|
6
|
-
declare const BROWSERS_OPTIONS: readonly ["CHROME", "SAFARI", "FIREFOX", "SAMSUNG"];
|
|
7
|
-
declare type DEVICE_TYPE = {
|
|
8
|
-
PLATFORM: typeof PLATFORMS_OPTIONS[number];
|
|
9
|
-
BROWSER: typeof BROWSERS_OPTIONS[number];
|
|
10
|
-
};
|
|
11
|
-
export declare const DEVICE: DEVICE_TYPE;
|
|
12
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const twoDigitsNumber: (num: number) => string;
|
|
2
|
-
export declare const timeFormatter: (number: number) => string;
|
|
3
|
-
export declare const timeLeftInMinutesFormatter: (number: number) => string;
|
|
4
|
-
export declare const timerCountDown: (number: number) => string;
|
|
5
|
-
export declare const formattedDuration: (number: number) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const CAMERA_STATES_MESSAGES: {
|
|
2
|
-
WAITING: string;
|
|
3
|
-
ERROR: string;
|
|
4
|
-
READY: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const MICROPHONE_STATES_MESSAGES: {
|
|
7
|
-
WAITING: string;
|
|
8
|
-
ERROR: string;
|
|
9
|
-
READY: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const INTERNET_STATES_MESSAGES: {
|
|
12
|
-
DISCONNECTED: string;
|
|
13
|
-
TESTING: string;
|
|
14
|
-
SLOW_CONNECTION: string;
|
|
15
|
-
CONNECTED: string;
|
|
16
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const enum STATUS_CODES {
|
|
2
|
-
OK = 200,
|
|
3
|
-
CREATED = 201,
|
|
4
|
-
DELETED = 202,
|
|
5
|
-
BAD_REQUEST = 400,
|
|
6
|
-
UNAUTHORIZED = 401,
|
|
7
|
-
PAYMENT_REQUIRED = 402,
|
|
8
|
-
FORBIDDEN = 403,
|
|
9
|
-
NOT_FOUND = 404,
|
|
10
|
-
TOO_MANY_REQUESTS = 429,
|
|
11
|
-
SERVER_ERROR = 500,
|
|
12
|
-
SERVICE_UNAVAILABLE = 503
|
|
13
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
interface ICandidate {
|
|
4
|
-
candidate_id?: string;
|
|
5
|
-
email: string;
|
|
6
|
-
username: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
video_id?: string;
|
|
9
|
-
redirectUrl?: string;
|
|
10
|
-
apiKey?: string;
|
|
11
|
-
company_id?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface ICompany {
|
|
15
|
-
shouldShowWaterMark: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface IQuestion {
|
|
19
|
-
question: string;
|
|
20
|
-
numOfRetakes: number;
|
|
21
|
-
partDuration: number;
|
|
22
|
-
thinkingTime: number;
|
|
23
|
-
timeLimit?: number;
|
|
24
|
-
videoQuestion?: string;
|
|
25
|
-
description?: string;
|
|
26
|
-
}
|
|
27
|
-
interface IJob {
|
|
28
|
-
language?: string;
|
|
29
|
-
overlay?: string;
|
|
30
|
-
transcriptLanguage?: string;
|
|
31
|
-
title?: string;
|
|
32
|
-
company?: string;
|
|
33
|
-
job_id?: string;
|
|
34
|
-
logo?: string;
|
|
35
|
-
questions?: IQuestion[];
|
|
36
|
-
old_jobID?: string;
|
|
37
|
-
apiKey?: string;
|
|
38
|
-
company_id?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface IVideoPlatformOS {
|
|
42
|
-
architecture: number;
|
|
43
|
-
family: string;
|
|
44
|
-
version: string;
|
|
45
|
-
}
|
|
46
|
-
interface IVideoPlatform {
|
|
47
|
-
description: string;
|
|
48
|
-
layout: string;
|
|
49
|
-
manufacturer: string;
|
|
50
|
-
name: string;
|
|
51
|
-
prerelease: string;
|
|
52
|
-
product: string;
|
|
53
|
-
ua: string;
|
|
54
|
-
version: string;
|
|
55
|
-
os: IVideoPlatformOS;
|
|
56
|
-
}
|
|
57
|
-
interface IVideoFile {
|
|
58
|
-
completed: boolean;
|
|
59
|
-
uploaded: boolean;
|
|
60
|
-
filename: string;
|
|
61
|
-
retakes: number;
|
|
62
|
-
started: boolean;
|
|
63
|
-
videoLength?: number;
|
|
64
|
-
uploadUrl?: string;
|
|
65
|
-
question?: string;
|
|
66
|
-
}
|
|
67
|
-
interface IVideo {
|
|
68
|
-
video_id: string;
|
|
69
|
-
bandwidth?: string;
|
|
70
|
-
clicked?: boolean;
|
|
71
|
-
started?: boolean;
|
|
72
|
-
completed?: boolean;
|
|
73
|
-
uploaded?: boolean;
|
|
74
|
-
jobID?: string;
|
|
75
|
-
platform?: IVideoPlatform;
|
|
76
|
-
quality?: string;
|
|
77
|
-
referrer?: string;
|
|
78
|
-
cvUrl?: string;
|
|
79
|
-
videos: IVideoFile[];
|
|
80
|
-
processTime?: number;
|
|
81
|
-
files?: string[];
|
|
82
|
-
personalInfo?: Record<string, string>;
|
|
83
|
-
language?: string;
|
|
84
|
-
gdprTimestamp?: string;
|
|
85
|
-
tracking?: {
|
|
86
|
-
reminder: number;
|
|
87
|
-
source: number;
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
declare type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
|
|
92
|
-
interface IOnCompleteCallback {
|
|
93
|
-
redirectUrl?: string;
|
|
94
|
-
video_id: string;
|
|
95
|
-
}
|
|
96
|
-
interface IOnError {
|
|
97
|
-
messageType: IMessageType;
|
|
98
|
-
}
|
|
99
|
-
interface IConfig {
|
|
100
|
-
video?: IVideo;
|
|
101
|
-
candidate: ICandidate;
|
|
102
|
-
job?: IJob;
|
|
103
|
-
company?: ICompany;
|
|
104
|
-
config: {
|
|
105
|
-
auth: string;
|
|
106
|
-
onCompleteCallback?: (data: IOnCompleteCallback) => void;
|
|
107
|
-
onError?: (data: IOnError) => void;
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
interface IProps extends IConfig {
|
|
112
|
-
disabled?: boolean;
|
|
113
|
-
buttonText?: string;
|
|
114
|
-
}
|
|
115
|
-
declare const Widget: React.FC<IProps>;
|
|
116
|
-
|
|
117
|
-
export { Widget };
|