@myinterview/widget-react 1.1.42-experimental-test-deps-001 → 1.1.43-development-26c81aa
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 +4 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { createContext, forwardRef, useRef, useEffect, useState, useLayoutEffect, useImperativeHandle, useDebugValue, useContext, createElement, useCallback, useMemo } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
+
import { renderToString } from 'react-dom/server';
|
|
4
5
|
|
|
5
6
|
/*! *****************************************************************************
|
|
6
7
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1236,7 +1237,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1236
1237
|
propTypes$1.exports = requireFactoryWithThrowingShims()();
|
|
1237
1238
|
}
|
|
1238
1239
|
|
|
1239
|
-
var
|
|
1240
|
+
var f$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p$1(e,r){return e(r={exports:{}},r.exports),r.exports}var d=p$1((function(e){!function(r){var t=function(e,r,n){if(!u(r)||s(r)||f(r)||p(r)||i(r))return r;var o,a=0,c=0;if(l(r))for(o=[],c=r.length;a<c;a++)o.push(t(e,r[a],n));else for(var d in o={},r)Object.prototype.hasOwnProperty.call(r,d)&&(o[e(d,n)]=t(e,r[d],n));return o},n=function(e){return d(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,r){return r?r.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var r=n(e);return r.substr(0,1).toUpperCase()+r.substr(1)},a=function(e,r){return function(e,r){var t=(r=r||{}).separator||"_",n=r.split||/(?=[A-Z])/;return e.split(n).join(t)}(e,r).toLowerCase()},c=Object.prototype.toString,i=function(e){return "function"==typeof e},u=function(e){return e===Object(e)},l=function(e){return "[object Array]"==c.call(e)},s=function(e){return "[object Date]"==c.call(e)},f=function(e){return "[object RegExp]"==c.call(e)},p=function(e){return "[object Boolean]"==c.call(e)},d=function(e){return (e-=0)==e},y=function(e,r){var t=r&&"process"in r?r.process:r;return "function"!=typeof t?e:function(r,n){return t(r,e,n)}},h={camelize:n,decamelize:a,pascalize:o,depascalize:a,camelizeKeys:function(e,r){return t(y(n,r),e)},decamelizeKeys:function(e,r){return t(y(a,r),e,r)},pascalizeKeys:function(e,r){return t(y(o,r),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=h:r.humps=h;}(f$1);})).decamelize;var y$1=function(e){if(Array.isArray(e))return e};var h$1=function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(t.push(c.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e;}finally{try{n||null==i.return||i.return();}finally{if(o)throw a}}return t}};var v$1=function(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n};var m$1=function(e,r){if(e){if("string"==typeof e)return v$1(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return "Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v$1(e,r):void 0}};var b$1=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var g$1=function(e,r){return y$1(e)||h$1(e,r)||m$1(e,r)||b$1()},S$1=p$1((function(e){function r(){return e.exports=r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);}return e},r.apply(this,arguments)}e.exports=r;}));var w=function(e,r){if(null==e)return {};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o};var O$1=function(e,r){if(null==e)return {};var t,n,o=w(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t]);}return o};var j$1=createContext(null);function x$1(r){var t=r.children,n=void 0===t?"":t,o=O$1(r,["children"]);return "string"!=typeof n&&(n=renderToString(n)),React__default.createElement("template",S$1({},o,{dangerouslySetInnerHTML:{__html:n}}))}function z$1(e){var r=e.root,t=e.children;return createPortal(void 0===t?null:t,r)}function E$1(n){var i=forwardRef((function(o,i){var u,l,s=o.mode,f=void 0===s?"open":s,p=o.delegatesFocus,d=void 0!==p&&p,y=o.styleSheets,h=void 0===y?[]:y,v=o.ssr,m=void 0!==v&&v,b=o.children,w=O$1(o,["mode","delegatesFocus","styleSheets","ssr","children"]),E=(l=useRef((u=i)&&u.current),useEffect((function(){u&&(u.current=l.current);}),[u]),l),T=useState(null),A=g$1(T,2),C=A[0],P=A[1],F="node_".concat(f).concat(d);return useLayoutEffect((function(){if(E.current)try{if("function"==typeof i&&i(E.current),m){var e=E.current.shadowRoot;return void P(e)}var r=E.current.attachShadow({mode:f,delegatesFocus:d});h.length>0&&(r.adoptedStyleSheets=h),P(r);}catch(e){!function(e){var r=e.error,t=e.styleSheets,n=e.root;switch(r.name){case"NotSupportedError":t.length>0&&(n.adoptedStyleSheets=t);break;default:throw r}}({error:e,styleSheets:h,root:C});}}),[i,E,h]),React__default.createElement(React__default.Fragment,null,React__default.createElement(n.tag,S$1({key:F,ref:E},w),(C||m)&&React__default.createElement(j$1.Provider,{value:C},m?React__default.createElement(x$1,{shadowroot:f,shadowrootmode:f},n.render({root:C,ssr:m,children:b})):React__default.createElement(z$1,{root:C},n.render({root:C,ssr:m,children:b})))))}));return i.propTypes={mode:propTypes$1.exports.oneOf(["open","closed"]),delegatesFocus:propTypes$1.exports.bool,styleSheets:propTypes$1.exports.arrayOf(propTypes$1.exports.instanceOf(globalThis.CSSStyleSheet)),ssr:propTypes$1.exports.bool,children:propTypes$1.exports.node},i}x$1.propTypes={children:propTypes$1.exports.oneOfType([propTypes$1.exports.string,propTypes$1.exports.node])},z$1.propTypes={root:propTypes$1.exports.object.isRequired,children:propTypes$1.exports.node};var T$1=new Map;function C$1(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=d(n,{separator:"-"}),a="".concat(r,"-").concat(o);return T$1.has(a)||T$1.set(a,E$1({tag:o,render:t})),T$1.get(a)}})}var P$1=C$1();
|
|
1240
1241
|
|
|
1241
1242
|
function l(d,e){var t={};for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&e.indexOf(n)<0&&(t[n]=d[n]);if(null!=d&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(d);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(d,n[r])&&(t[n[r]]=d[n[r]]);}return t}const s=e=>{const{x:t=0,y:n=0}=e,r=l(e,["x","y"]);return React__default.createElement("div",Object.assign({style:{height:`${n||0}rem`,width:`${t||0}rem`}},r))},$=React__default.createContext({});function u({baseColor:d,highlightColor:e,width:t,height:n,borderRadius:r,circle:o,direction:a,duration:i,enableAnimation:l=true}){const c={};return "rtl"===a&&(c["--animation-direction"]="reverse"),"number"==typeof i&&(c["--animation-duration"]=`${i}s`),l||(c["--pseudo-element-display"]="none"),"string"!=typeof t&&"number"!=typeof t||(c.width=t),"string"!=typeof n&&"number"!=typeof n||(c.height=n),"string"!=typeof r&&"number"!=typeof r||(c.borderRadius=r),o&&(c.borderRadius="50%"),void 0!==d&&(c["--base-color"]=d),void 0!==e&&(c["--highlight-color"]=e),c}function f({count:e=1,wrapper:t,className:n,containerClassName:r,containerTestId:o,circle:a=!1,style:i,...l}){var c,s,f;const p=React__default.useContext($),h={...l};for(const[d,e]of Object.entries(l))void 0===e&&delete h[d];const g={...p,...h,circle:a},m={...i,...u(g)};let y="react-loading-skeleton";n&&(y+=` ${n}`);const v=null!==(c=g.inline)&&void 0!==c&&c,C=[],w=Math.ceil(e);for(let t=0;t<w;t++){let n=m;if(w>e&&t===w-1){const d=null!==(s=n.width)&&void 0!==s?s:"100%",t=e%1,r="number"==typeof d?d*t:`calc(${d} * ${t})`;n={...n,width:r};}const r=React__default.createElement("span",{className:y,style:n,key:t},"");v?C.push(r):C.push(React__default.createElement(React__default.Fragment,{key:t},r,React__default.createElement("br",null)));}return React__default.createElement("span",{className:r,"data-testid":o,"aria-live":"polite","aria-busy":null===(f=g.enableAnimation)||void 0===f||f},t?C.map(((e,n)=>React__default.createElement(t,{key:n},e))):C)}const p=e=>{const{height:t}=e;return React__default.createElement(f,Object.assign({},e,{height:t||"100%"}))};var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var m,y={exports:{}};
|
|
1242
1243
|
/*!
|
|
@@ -35429,7 +35430,7 @@ const configGenerator = () => {
|
|
|
35429
35430
|
let release;
|
|
35430
35431
|
try {
|
|
35431
35432
|
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
35432
|
-
release !== null && release !== void 0 ? release : (release = "1.1.
|
|
35433
|
+
release !== null && release !== void 0 ? release : (release = "1.1.43");
|
|
35433
35434
|
}
|
|
35434
35435
|
catch (_a) {
|
|
35435
35436
|
console.error('sentry configGenerator error');
|
|
@@ -54746,7 +54747,7 @@ const useAccessibility = () => {
|
|
|
54746
54747
|
};
|
|
54747
54748
|
|
|
54748
54749
|
const Widget = forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
|
|
54749
|
-
const widget_version = "1.1.
|
|
54750
|
+
const widget_version = "1.1.43";
|
|
54750
54751
|
const [isWidgetOpen, setIsWidgetOpen] = useState(false);
|
|
54751
54752
|
const [isWidgetMinimized, setIsWidgetMinimized] = useState(false);
|
|
54752
54753
|
const [isIncognitoMode, setIsIncognitoMode] = useState(false);
|