@myinterview/widget-react 1.1.25 → 1.1.26-development-081afbd
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/components/Widget.d.ts +5 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +9 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/configInterface.d.ts +4 -0
- package/dist/esm/components/Widget.d.ts +5 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +9 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +4 -0
- package/dist/index.d.ts +29 -22
- package/package.json +1 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const Widget: React.
|
|
2
|
+
import { IWidgetRef } from '../interfaces/configInterface';
|
|
3
|
+
export declare const Widget: React.ForwardRefExoticComponent<Omit<import("../interfaces/configInterface").IWidgetConfig, "config" | "event_id" | "job"> & {
|
|
4
|
+
job: import("../interfaces/jobInterface").IClientJob;
|
|
5
|
+
config: import("../interfaces/configInterface").IClientConfig;
|
|
6
|
+
} & React.RefAttributes<IWidgetRef>>;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Widget } from './components/Widget';
|
|
2
|
-
import { IWidgetConfig, IClientWidgetConfig } from './interfaces/configInterface';
|
|
2
|
+
import { IWidgetConfig, IClientWidgetConfig, IWidgetRef } from './interfaces/configInterface';
|
|
3
3
|
export { Widget };
|
|
4
|
-
export type { IWidgetConfig, IClientWidgetConfig };
|
|
4
|
+
export type { IWidgetConfig, IClientWidgetConfig, IWidgetRef };
|
package/dist/esm/index.js
CHANGED
|
@@ -30212,7 +30212,7 @@ const prod_config = {
|
|
|
30212
30212
|
const config$1 = (configEnv) => {
|
|
30213
30213
|
let env = configEnv;
|
|
30214
30214
|
try {
|
|
30215
|
-
env !== null && env !== void 0 ? env : (env = "
|
|
30215
|
+
env !== null && env !== void 0 ? env : (env = "staging");
|
|
30216
30216
|
}
|
|
30217
30217
|
catch (_a) { }
|
|
30218
30218
|
switch (env) {
|
|
@@ -30231,8 +30231,8 @@ const configGenerator = () => {
|
|
|
30231
30231
|
let environment;
|
|
30232
30232
|
let release;
|
|
30233
30233
|
try {
|
|
30234
|
-
environment !== null && environment !== void 0 ? environment : (environment = "
|
|
30235
|
-
release !== null && release !== void 0 ? release : (release = "1.1.
|
|
30234
|
+
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
30235
|
+
release !== null && release !== void 0 ? release : (release = "1.1.26");
|
|
30236
30236
|
}
|
|
30237
30237
|
catch (_a) {
|
|
30238
30238
|
console.error('sentry configGenerator error');
|
|
@@ -48529,7 +48529,7 @@ const useAccessibility = () => {
|
|
|
48529
48529
|
return { setSitekey, shutdown };
|
|
48530
48530
|
};
|
|
48531
48531
|
|
|
48532
|
-
const Widget = ({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }) => {
|
|
48532
|
+
const Widget = forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
|
|
48533
48533
|
const [isWidgetOpen, setIsWidgetOpen] = useState(false);
|
|
48534
48534
|
const [isWidgetMinimized, setIsWidgetMinimized] = useState(false);
|
|
48535
48535
|
const [isIncognitoMode, setIsIncognitoMode] = useState(false);
|
|
@@ -48625,6 +48625,10 @@ const Widget = ({ candidate, job, video, config, disabled = false, buttonText =
|
|
|
48625
48625
|
emitTrackEvent({ eventType: EVENT_TYPES.WIDGET_MINIMIZED });
|
|
48626
48626
|
shutdown();
|
|
48627
48627
|
};
|
|
48628
|
+
useImperativeHandle(clientRef, () => ({
|
|
48629
|
+
open: () => { var _a; return (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.click(); },
|
|
48630
|
+
close: onMinimize,
|
|
48631
|
+
}), []);
|
|
48628
48632
|
const layoutClassNames = classNames({
|
|
48629
48633
|
'myinterview-widget__layout': true,
|
|
48630
48634
|
'myinterview-widget-no-select': true,
|
|
@@ -48657,7 +48661,7 @@ const Widget = ({ candidate, job, video, config, disabled = false, buttonText =
|
|
|
48657
48661
|
video: Object.assign(Object.assign({}, video), { referrer: (video === null || video === void 0 ? void 0 : video.referrer) || window.location.href }),
|
|
48658
48662
|
candidate,
|
|
48659
48663
|
}, setShouldShowWaterMark: setShouldShowWaterMark, isWidgetMinimized: isWidgetMinimized, onMinimize: onMinimize }))))))))));
|
|
48660
|
-
};
|
|
48664
|
+
});
|
|
48661
48665
|
|
|
48662
48666
|
export { Widget };
|
|
48663
48667
|
//# sourceMappingURL=index.js.map
|