@myinterview/widget-react 1.1.65-development-e68c11b → 1.1.66-development-c2b240e

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.
@@ -17,6 +17,7 @@ export type IViews = 'desktop' | 'mobile';
17
17
  interface IConfig {
18
18
  auth: string;
19
19
  onWidgetClicked?: () => void;
20
+ onVideoDataReceived?: (data: IWidgetConfigResponse) => void;
20
21
  onFinish?: (data: IOnFinish) => void;
21
22
  onError?: (data: IOnError) => void;
22
23
  onWidgetClose?: () => void;
@@ -131,6 +131,7 @@ export declare const enum STATES {
131
131
  ERROR = "error"
132
132
  }
133
133
  export declare const enum ACTIONS {
134
+ VIDEO_DATA_RECEIVED_CB = "videoDataReceivedCb",
134
135
  CONSOLE_LOG = "consoleLog",
135
136
  CONSOLE_DEBUG = "consoleDebug",
136
137
  SET_CONNECTION = "setConnection",
package/dist/esm/index.js CHANGED
@@ -7685,6 +7685,7 @@ var STATES$5;
7685
7685
  })(STATES$5 || (STATES$5 = {}));
7686
7686
  var ACTIONS$6;
7687
7687
  (function (ACTIONS) {
7688
+ ACTIONS["VIDEO_DATA_RECEIVED_CB"] = "videoDataReceivedCb";
7688
7689
  ACTIONS["CONSOLE_LOG"] = "consoleLog";
7689
7690
  ACTIONS["CONSOLE_DEBUG"] = "consoleDebug";
7690
7691
  ACTIONS["SET_CONNECTION"] = "setConnection";
@@ -35030,7 +35031,7 @@ const configGenerator = () => {
35030
35031
  let release;
35031
35032
  try {
35032
35033
  environment !== null && environment !== void 0 ? environment : (environment = "staging");
35033
- release !== null && release !== void 0 ? release : (release = "1.1.65");
35034
+ release !== null && release !== void 0 ? release : (release = "1.1.66");
35034
35035
  }
35035
35036
  catch (_a) {
35036
35037
  console.error('sentry configGenerator error');
@@ -51286,12 +51287,12 @@ const accWidgetMachine = createMachine({
51286
51287
  src: ({ widgetConfig: { candidate, job, video, config } }) => createVideo({ candidate, job, video: (Object.assign(Object.assign({}, video), { platform: getUAParserData(navigator.userAgent) })) }, config.event_id),
51287
51288
  onDone: [
51288
51289
  {
51289
- actions: [ACTIONS$6.SET_CONFIG, ACTIONS$6.SET_EVENT_ID, ACTIONS$6.SET_SESSION, { type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_DATA_RECEIVED } }],
51290
+ actions: [ACTIONS$6.SET_CONFIG, ACTIONS$6.VIDEO_DATA_RECEIVED_CB, ACTIONS$6.SET_EVENT_ID, ACTIONS$6.SET_SESSION, { type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_DATA_RECEIVED } }],
51290
51291
  target: STATES$5.WELCOME,
51291
51292
  cond: GUARDS$3.SHOULD_SHOW_WELCOME,
51292
51293
  },
51293
51294
  {
51294
- actions: [ACTIONS$6.SET_CONFIG, ACTIONS$6.SET_EVENT_ID, ACTIONS$6.SET_SESSION, { type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_DATA_RECEIVED } }],
51295
+ actions: [ACTIONS$6.SET_CONFIG, ACTIONS$6.VIDEO_DATA_RECEIVED_CB, ACTIONS$6.SET_EVENT_ID, ACTIONS$6.SET_SESSION, { type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_DATA_RECEIVED } }],
51295
51296
  target: STATES$5.SETUP,
51296
51297
  },
51297
51298
  ],
@@ -51896,6 +51897,11 @@ const accWidgetMachine = createMachine({
51896
51897
  },
51897
51898
  }, {
51898
51899
  actions: {
51900
+ [ACTIONS$6.VIDEO_DATA_RECEIVED_CB]: (context, event) => {
51901
+ var _a, _b;
51902
+ const data = event.data.data.data;
51903
+ (_b = (_a = context.widgetConfig.config).onVideoDataReceived) === null || _b === void 0 ? void 0 : _b.call(_a, data);
51904
+ },
51899
51905
  [ACTIONS$6.SESSION_EVENT]: (context, event, meta) => {
51900
51906
  var _a;
51901
51907
  (_a = triggerEvent[meta.action.data.type]) === null || _a === void 0 ? void 0 : _a.call(triggerEvent, meta.action.data.event);
@@ -55321,7 +55327,7 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
55321
55327
  SentryHub.configureScope((scope) => {
55322
55328
  scope.setTags(Object.assign({ company_id: candidate === null || candidate === void 0 ? void 0 : candidate.company_id, email: candidate.email }, (isIphone && { iphoneModel: getIPhoneModel() })));
55323
55329
  });
55324
- }, [candidate, job === null || job === void 0 ? void 0 : job.language]);
55330
+ }, [candidate]);
55325
55331
  const setBackgroundOpacity = () => {
55326
55332
  var _a;
55327
55333
  (_a = myinterviewRef === null || myinterviewRef === void 0 ? void 0 : myinterviewRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--myinterview-background-opacity', isLoading || isErrorState ? '0' : '1');
@@ -55485,7 +55491,7 @@ const FOCUSABLE_SELECTORS = Object.freeze([
55485
55491
  'a[href]', 'button:not([disabled]):not([tabindex="-1"])', 'textarea', 'input', 'select', '[tabindex]:not([tabindex="-1"])',
55486
55492
  ]);
55487
55493
  const Widget = forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
55488
- const widget_version = "1.1.65";
55494
+ const widget_version = "1.1.66";
55489
55495
  const [isWidgetOpen, setIsWidgetOpen] = useState(false);
55490
55496
  const [isWidgetMinimized, setIsWidgetMinimized] = useState(false);
55491
55497
  const [isIncognitoMode, setIsIncognitoMode] = useState(false);