@myinterview/chatbot 0.1.61-experimental-78d62d2 → 0.1.62-experimental-629fc40
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/dist/index.js +58 -55
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -104828,7 +104828,7 @@ const tst = {
|
|
|
104828
104828
|
}, mH = () => {
|
|
104829
104829
|
let e, t;
|
|
104830
104830
|
try {
|
|
104831
|
-
e ?? (e = "prod"), t ?? (t = "1.1.
|
|
104831
|
+
e ?? (e = "prod"), t ?? (t = "1.1.49");
|
|
104832
104832
|
} catch {
|
|
104833
104833
|
console.error("sentry configGenerator error");
|
|
104834
104834
|
}
|
|
@@ -111856,16 +111856,18 @@ const Mlt = (e) => {
|
|
|
111856
111856
|
"/",
|
|
111857
111857
|
" ",
|
|
111858
111858
|
t
|
|
111859
|
-
), Flt = ({ onAnswer: e, maxChars: t = $st }) => {
|
|
111860
|
-
const { t:
|
|
111861
|
-
|
|
111862
|
-
|
|
111859
|
+
), Flt = ({ onAnswer: e, maxChars: t = $st, antiCheat: r = !1 }) => {
|
|
111860
|
+
const { t: n } = Jn(), [i, o] = St(""), a = (c) => {
|
|
111861
|
+
r && c.preventDefault();
|
|
111862
|
+
}, s = (c) => {
|
|
111863
|
+
const u = c.target.value, l = t && u.length > t ? u.substring(0, t) : u;
|
|
111864
|
+
o(l), e(l);
|
|
111863
111865
|
};
|
|
111864
111866
|
return M.createElement(
|
|
111865
111867
|
"div",
|
|
111866
111868
|
{ className: "myinterview-widget-assessment__free-text" },
|
|
111867
|
-
M.createElement("textarea", { className: "myinterview-widget-assessment__input myinterview-widget-scroll-indicator", value:
|
|
111868
|
-
!!t && M.createElement(Ult, { currentLength:
|
|
111869
|
+
M.createElement("textarea", { className: "myinterview-widget-assessment__input myinterview-widget-scroll-indicator", value: i, placeholder: n("assessment.free_text.input_placeholder"), onPaste: a, onDrop: a, onChange: s }),
|
|
111870
|
+
!!t && M.createElement(Ult, { currentLength: i.length, maxLength: t })
|
|
111869
111871
|
);
|
|
111870
111872
|
}, Blt = ({ answerOptions: e, onAnswer: t }) => {
|
|
111871
111873
|
const [r, n] = St(e.map((o) => Object.assign(Object.assign({}, o), { selected: !1 }))), i = (o) => {
|
|
@@ -111908,29 +111910,29 @@ const Mlt = (e) => {
|
|
|
111908
111910
|
[an.TEXT]: Flt,
|
|
111909
111911
|
[an.SINGLE]: zlt,
|
|
111910
111912
|
[an.MULTIPLE]: Blt
|
|
111911
|
-
}, Hlt = ({ currentQuestionObj: e, timer: t, currentQuestion: r, numberOfQuestions: n,
|
|
111912
|
-
var
|
|
111913
|
-
const { t:
|
|
111914
|
-
|
|
111915
|
-
},
|
|
111913
|
+
}, Hlt = ({ currentQuestionObj: e, timer: t, currentQuestion: r, numberOfQuestions: n, antiCheat: i, onSubmitAssessment: o }) => {
|
|
111914
|
+
var a, s, c;
|
|
111915
|
+
const { t: u } = Jn(), l = dt(e.answerType !== an.TEXT ? [] : ""), d = ji(() => Vlt[e.answerType], [e.answerType]), [f, p] = St(!1), h = e.answerType !== an.TEXT ? ((a = e.config) === null || a === void 0 ? void 0 : a.answers) || [] : [], m = (b) => {
|
|
111916
|
+
o(l.current, b);
|
|
111917
|
+
}, y = ji(() => {
|
|
111916
111918
|
switch (e.answerType) {
|
|
111917
111919
|
case an.TEXT:
|
|
111918
111920
|
return () => {
|
|
111919
|
-
var
|
|
111920
|
-
return
|
|
111921
|
+
var b;
|
|
111922
|
+
return l.current.length >= (((b = e.config) === null || b === void 0 ? void 0 : b.minChars) || 1);
|
|
111921
111923
|
};
|
|
111922
111924
|
case an.SINGLE:
|
|
111923
111925
|
case an.MULTIPLE:
|
|
111924
|
-
return () =>
|
|
111926
|
+
return () => l.current.some((b) => b.selected);
|
|
111925
111927
|
default:
|
|
111926
111928
|
return () => !0;
|
|
111927
111929
|
}
|
|
111928
111930
|
}, [e.answerType]);
|
|
111929
111931
|
At(() => {
|
|
111930
|
-
e.partDuration && !t &&
|
|
111932
|
+
e.partDuration && !t && m(!0);
|
|
111931
111933
|
}, [t]);
|
|
111932
|
-
const
|
|
111933
|
-
|
|
111934
|
+
const g = (b) => {
|
|
111935
|
+
l.current = b || "", p(y);
|
|
111934
111936
|
};
|
|
111935
111937
|
return M.createElement(
|
|
111936
111938
|
"div",
|
|
@@ -111943,8 +111945,8 @@ const Mlt = (e) => {
|
|
|
111943
111945
|
),
|
|
111944
111946
|
M.createElement(JR, { questionObj: e }),
|
|
111945
111947
|
M.createElement(Llt, { currentQuestionObj: e }),
|
|
111946
|
-
M.createElement(
|
|
111947
|
-
M.createElement(jo, { disabled: !
|
|
111948
|
+
M.createElement(d, Object.assign({ answerOptions: h, onAnswer: g }, e.answerType === an.TEXT && { maxChars: (s = e.config) === null || s === void 0 ? void 0 : s.maxChars, antiCheat: i || ((c = e.config) === null || c === void 0 ? void 0 : c.antiCheat) })),
|
|
111949
|
+
M.createElement(jo, { disabled: !f, className: "myinterview-widget-assessment__submit-button", onClick: () => m(!1) }, u("buttons.SUBMIT"))
|
|
111948
111950
|
);
|
|
111949
111951
|
}, Wlt = ({ onContinue: e }) => {
|
|
111950
111952
|
const { t } = Jn();
|
|
@@ -112023,7 +112025,7 @@ const Mlt = (e) => {
|
|
|
112023
112025
|
{ className: nt },
|
|
112024
112026
|
x && M.createElement(qQe, { isVideoQuestion: !!(L != null && L.videoQuestion), isAssessment: ie, timeLimit: ie ? L.partDuration : L.thinkingTime, answerType: L.answerType || an.VIDEO, duration: L.partDuration, takes: L.numOfRetakes }),
|
|
112025
112027
|
M.createElement(Ast, { recordWithoutVideo: I, myinterviewRef: u, ref: l, microphoneRef: Q, isCameraDisplayed: fe, isPracticeModeDisplayed: !le && Re, errorType: ot, isPermissionStepsOpen: n, onDisplayPermissionSteps: o, onReInitRecorder: c, onClosePermissionSteps: a, onRecorderRetry: ce ? s : c, isRecorderCanChangeSettings: zt, videoDevices: F, audioDevices: re, selectedVideoDevice: J, selectedAudioDevice: G, handleDeviceChange: Ht, canStartRecording: De, currentQuestion: E, numberOfQuestions: T.length, currentQuestionObj: L, isRecording: Re, durations: N, recordingTime: C, isCountDown: _e, countdown: P, isQuestionDisplayed: Vt, isAssessment: ie }),
|
|
112026
|
-
pe && !!(L != null && L.answerType) && (L == null ? void 0 : L.answerType) !== an.VIDEO && M.createElement(Hlt, { currentQuestionObj: L, timer: k, currentQuestion: E, numberOfQuestions: T.length, onSubmitAssessment: Qn }),
|
|
112028
|
+
pe && !!(L != null && L.answerType) && (L == null ? void 0 : L.answerType) !== an.VIDEO && M.createElement(Hlt, { currentQuestionObj: L, timer: k, currentQuestion: E, numberOfQuestions: T.length, onSubmitAssessment: Qn, antiCheat: !!O.config.antiCheat }),
|
|
112027
112029
|
ue && M.createElement(Wlt, { onContinue: Je }),
|
|
112028
112030
|
(xe || x && !!(L != null && L.videoQuestion)) && M.createElement(bse, { src: (L == null ? void 0 : L.videoQuestion) || "", isThinkingTime: U, onVideoEnds: Fr, isWidgetMinimized: i, hidden: x, onVideoStateChanged: mi }),
|
|
112029
112031
|
b && $e && M.createElement(gst, { myinterviewRef: u, previewRef: b, onNextQuestion: qn, onNextRetake: et, onQuestionMode: Be, isRetakeAvailable: at, totalRetakes: he, isQuestionMode: le, isLastQuestion: Ve, isConnected: w, currentQuestion: E, numberOfQuestions: T.length }),
|
|
@@ -119734,7 +119736,7 @@ const Umt = ({ messageType: e }) => {
|
|
|
119734
119736
|
var { children: r } = e, n = $Ke(e, ["children"]);
|
|
119735
119737
|
return M.createElement("div", Object.assign({ ref: t }, n), r);
|
|
119736
119738
|
}), zmt = IT(({ candidate: e, job: t, video: r, config: n, disabled: i = !1, buttonText: o = "START INTERVIEW", buttonStyle: a = {}, children: s, styleUrls: c = [], fontsUrls: u = [] }, l) => {
|
|
119737
|
-
const d = "1.1.
|
|
119739
|
+
const d = "1.1.49", [f, p] = St(!1), [h, m] = St(!1), [y, g] = St(!1), b = dt(null), T = dt(null), E = dt(null), [S, _] = St(!1), [w, v] = St(!1), { setSitekey: O, shutdown: $ } = Fmt();
|
|
119738
119740
|
At(() => (oZe && PXe().then((L) => {
|
|
119739
119741
|
g(L.browserName === "Chrome" && L.isPrivate && Fn);
|
|
119740
119742
|
}), b.current && b.current.shadowRoot && (v(typeof s == "object" && s.type === "style"), (Array.isArray(u) ? u : [u]).concat(Ost).forEach((L) => {
|
|
@@ -119837,51 +119839,52 @@ const Umt = ({ messageType: e }) => {
|
|
|
119837
119839
|
)
|
|
119838
119840
|
)
|
|
119839
119841
|
);
|
|
119840
|
-
}), Vmt = ({ completed: e }) => {
|
|
119841
|
-
const
|
|
119842
|
+
}), Vmt = ({ completed: e, data: t }) => {
|
|
119843
|
+
const r = qr((g) => g.chatbotConfig.auth), n = qr((g) => g.chatbotConfig.env), i = qr((g) => g.main.selectedConversationId), [o, a] = St(), s = dt(null), c = dt(null), [u, l] = St({ width: "0px", height: "0px", top: "0px", left: "0px" }), [d, f] = St("Start Interview");
|
|
119842
119844
|
At(() => {
|
|
119843
|
-
var
|
|
119844
|
-
const
|
|
119845
|
-
|
|
119846
|
-
video_id:
|
|
119847
|
-
candidate_id:
|
|
119848
|
-
username:
|
|
119849
|
-
email:
|
|
119845
|
+
var b;
|
|
119846
|
+
const g = (b = Ac.get(i)) == null ? void 0 : b.attributes;
|
|
119847
|
+
a({
|
|
119848
|
+
video_id: g.video_id,
|
|
119849
|
+
candidate_id: g.candidate_id,
|
|
119850
|
+
username: g.username,
|
|
119851
|
+
email: g.email
|
|
119850
119852
|
});
|
|
119851
119853
|
}, []);
|
|
119852
|
-
const
|
|
119853
|
-
if (!
|
|
119854
|
+
const p = () => {
|
|
119855
|
+
if (!c.current)
|
|
119854
119856
|
return;
|
|
119855
|
-
const { width:
|
|
119856
|
-
|
|
119857
|
-
width: `${
|
|
119858
|
-
height: `${
|
|
119859
|
-
top: `${
|
|
119860
|
-
left: `${
|
|
119857
|
+
const { width: g, height: b, top: T, left: E } = c.current.getBoundingClientRect();
|
|
119858
|
+
l({
|
|
119859
|
+
width: `${g}px`,
|
|
119860
|
+
height: `${b}px`,
|
|
119861
|
+
top: `${T}px`,
|
|
119862
|
+
left: `${E}px`
|
|
119861
119863
|
});
|
|
119862
|
-
},
|
|
119863
|
-
var
|
|
119864
|
-
qse(
|
|
119865
|
-
},
|
|
119866
|
-
|
|
119864
|
+
}, h = () => {
|
|
119865
|
+
var g;
|
|
119866
|
+
qse(p), (g = s.current) == null || g.open();
|
|
119867
|
+
}, m = () => f("Resume Interview"), y = () => {
|
|
119868
|
+
f("Interview Completed");
|
|
119867
119869
|
};
|
|
119868
|
-
return At(
|
|
119870
|
+
return At(p, [d]), kt("div", { className: "myinterview-chatbot-widget", children: [Se(Wc, { ref: c, size: "small", onClick: h, disabled: e, children: d }), Mb(Se(zmt, { disabled: e, ref: s, buttonStyle: {
|
|
119869
119871
|
position: "fixed",
|
|
119870
119872
|
visibility: "hidden",
|
|
119871
119873
|
pointerEvents: "none",
|
|
119872
|
-
...
|
|
119874
|
+
...u
|
|
119873
119875
|
}, config: {
|
|
119874
|
-
auth:
|
|
119875
|
-
env:
|
|
119876
|
+
auth: r,
|
|
119877
|
+
env: n,
|
|
119876
119878
|
minimizable: !0,
|
|
119877
119879
|
useLightDom: !0,
|
|
119878
|
-
|
|
119879
|
-
|
|
119880
|
+
antiCheat: t.antiCheat,
|
|
119881
|
+
onWidgetClicked: m,
|
|
119882
|
+
onFinish: y
|
|
119880
119883
|
}, candidate: {
|
|
119881
|
-
candidate_id:
|
|
119882
|
-
username: (
|
|
119883
|
-
email: (
|
|
119884
|
-
}, job: {}, video: { video_id:
|
|
119884
|
+
candidate_id: o == null ? void 0 : o.candidate_id,
|
|
119885
|
+
username: (o == null ? void 0 : o.username) ?? "",
|
|
119886
|
+
email: (o == null ? void 0 : o.email) ?? ""
|
|
119887
|
+
}, job: {}, video: { video_id: o == null ? void 0 : o.video_id } }), document.body)] });
|
|
119885
119888
|
}, Hmt = (e) => {
|
|
119886
119889
|
const t = /* @__PURE__ */ new Map();
|
|
119887
119890
|
return e.available_slots.forEach(({ start: r }) => {
|
|
@@ -120426,7 +120429,7 @@ const kT = {
|
|
|
120426
120429
|
pde() && fde(), r2e({
|
|
120427
120430
|
dsn: gm.SENTRY_DSN,
|
|
120428
120431
|
environment: "production",
|
|
120429
|
-
release: "0.1.
|
|
120432
|
+
release: "0.1.62",
|
|
120430
120433
|
integrations: [
|
|
120431
120434
|
Cye(),
|
|
120432
120435
|
gye()
|