@myinterview/widget-react 1.1.65-development-e68c11b → 1.1.66-beta-9d97e2a

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/cjs/index.js CHANGED
@@ -7711,6 +7711,7 @@ var STATES$5;
7711
7711
  })(STATES$5 || (STATES$5 = {}));
7712
7712
  var ACTIONS$6;
7713
7713
  (function (ACTIONS) {
7714
+ ACTIONS["VIDEO_DATA_RECEIVED_CB"] = "videoDataReceivedCb";
7714
7715
  ACTIONS["CONSOLE_LOG"] = "consoleLog";
7715
7716
  ACTIONS["CONSOLE_DEBUG"] = "consoleDebug";
7716
7717
  ACTIONS["SET_CONNECTION"] = "setConnection";
@@ -35056,7 +35057,7 @@ const configGenerator = () => {
35056
35057
  let release;
35057
35058
  try {
35058
35059
  environment !== null && environment !== void 0 ? environment : (environment = "staging");
35059
- release !== null && release !== void 0 ? release : (release = "1.1.65");
35060
+ release !== null && release !== void 0 ? release : (release = "1.1.66");
35060
35061
  }
35061
35062
  catch (_a) {
35062
35063
  console.error('sentry configGenerator error');
@@ -51312,12 +51313,12 @@ const accWidgetMachine = createMachine({
51312
51313
  src: ({ widgetConfig: { candidate, job, video, config } }) => createVideo({ candidate, job, video: (Object.assign(Object.assign({}, video), { platform: getUAParserData(navigator.userAgent) })) }, config.event_id),
51313
51314
  onDone: [
51314
51315
  {
51315
- 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 } }],
51316
+ 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 } }],
51316
51317
  target: STATES$5.WELCOME,
51317
51318
  cond: GUARDS$3.SHOULD_SHOW_WELCOME,
51318
51319
  },
51319
51320
  {
51320
- 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 } }],
51321
+ 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 } }],
51321
51322
  target: STATES$5.SETUP,
51322
51323
  },
51323
51324
  ],
@@ -51922,6 +51923,11 @@ const accWidgetMachine = createMachine({
51922
51923
  },
51923
51924
  }, {
51924
51925
  actions: {
51926
+ [ACTIONS$6.VIDEO_DATA_RECEIVED_CB]: (context, event) => {
51927
+ var _a, _b;
51928
+ const data = event.data.data.data;
51929
+ (_b = (_a = context.widgetConfig.config).onVideoDataReceived) === null || _b === void 0 ? void 0 : _b.call(_a, data);
51930
+ },
51925
51931
  [ACTIONS$6.SESSION_EVENT]: (context, event, meta) => {
51926
51932
  var _a;
51927
51933
  (_a = triggerEvent[meta.action.data.type]) === null || _a === void 0 ? void 0 : _a.call(triggerEvent, meta.action.data.event);
@@ -55347,7 +55353,7 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
55347
55353
  SentryHub.configureScope((scope) => {
55348
55354
  scope.setTags(Object.assign({ company_id: candidate === null || candidate === void 0 ? void 0 : candidate.company_id, email: candidate.email }, (isIphone && { iphoneModel: getIPhoneModel() })));
55349
55355
  });
55350
- }, [candidate, job === null || job === void 0 ? void 0 : job.language]);
55356
+ }, [candidate]);
55351
55357
  const setBackgroundOpacity = () => {
55352
55358
  var _a;
55353
55359
  (_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');
@@ -55511,7 +55517,7 @@ const FOCUSABLE_SELECTORS = Object.freeze([
55511
55517
  'a[href]', 'button:not([disabled]):not([tabindex="-1"])', 'textarea', 'input', 'select', '[tabindex]:not([tabindex="-1"])',
55512
55518
  ]);
55513
55519
  const Widget = React.forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
55514
- const widget_version = "1.1.65";
55520
+ const widget_version = "1.1.66";
55515
55521
  const [isWidgetOpen, setIsWidgetOpen] = React.useState(false);
55516
55522
  const [isWidgetMinimized, setIsWidgetMinimized] = React.useState(false);
55517
55523
  const [isIncognitoMode, setIsIncognitoMode] = React.useState(false);