@myinterview/widget-react 1.0.31 → 1.0.32-beta-9294bde-03882a8-2e665ae-b442156

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.
@@ -1,2 +1,3 @@
1
1
  import React from 'react';
2
+ import './assets/styles/global.scss';
2
3
  export declare const App: React.FC;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { mediaDeviceType } from '../interfaces/recorderInterface';
3
3
  export interface IDeviceSelectorProps {
4
4
  handleDeviceChange: (type?: mediaDeviceType, id?: string) => void;
@@ -6,5 +6,6 @@ export interface IDeviceSelectorProps {
6
6
  videoDevices?: MediaDeviceInfo[];
7
7
  selectedAudioDevice?: MediaDeviceInfo;
8
8
  selectedVideoDevice?: MediaDeviceInfo;
9
+ myinterviewRef: React.RefObject<HTMLDivElement>;
9
10
  }
10
- export declare const DeviceSelector: ({ handleDeviceChange, videoDevices, audioDevices, selectedAudioDevice, selectedVideoDevice, }: IDeviceSelectorProps) => JSX.Element;
11
+ export declare const DeviceSelector: ({ handleDeviceChange, videoDevices, audioDevices, selectedAudioDevice, selectedVideoDevice, myinterviewRef, }: IDeviceSelectorProps) => JSX.Element;
@@ -9,6 +9,7 @@ interface IProps extends IWidgetMachineProps {
9
9
  onCloseSliderModal: () => void;
10
10
  onRecorderRetry: () => void;
11
11
  onReInitRecorder: () => void;
12
+ myinterviewRef: React.RefObject<HTMLDivElement>;
12
13
  }
13
14
  export declare const InnerView: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLVideoElement>>;
14
15
  export {};
@@ -3,6 +3,7 @@ import { IWidgetConfig } from '../interfaces/configInterface';
3
3
  interface IProps {
4
4
  widgetConfig: IWidgetConfig;
5
5
  setShouldShowWaterMark: React.Dispatch<React.SetStateAction<boolean>>;
6
+ myinterviewRef: React.RefObject<HTMLDivElement>;
6
7
  isWidgetMinimized: boolean;
7
8
  }
8
9
  export declare const Main: React.FC<IProps>;
@@ -11,6 +11,7 @@ interface IProps {
11
11
  position: number;
12
12
  isPreviewMode: boolean;
13
13
  onPreviewMode: (dimensions: IDimensions) => void;
14
+ myinterviewRef: React.RefObject<HTMLDivElement>;
14
15
  }
15
16
  export declare const PreviewItem: React.FC<IProps>;
16
17
  export {};
@@ -12,6 +12,7 @@ interface IProps {
12
12
  isConnected: boolean;
13
13
  currentQuestion: number;
14
14
  numberOfQuestions: number;
15
+ myinterviewRef: React.RefObject<HTMLDivElement>;
15
16
  }
16
17
  export declare const PreviewList: React.FC<IProps>;
17
18
  export {};
@@ -24,6 +24,7 @@ interface IProps extends IDeviceSelectorProps {
24
24
  isCountDown: boolean;
25
25
  countdown: number;
26
26
  isQuestionDisplayed: boolean;
27
+ myinterviewRef: React.RefObject<HTMLDivElement>;
27
28
  }
28
29
  export declare const VideoCamera: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLVideoElement>>;
29
30
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import '../assets/styles/font.scss';
2
3
  import { IClientWidgetConfig } from '../interfaces/configInterface';
3
- import '../assets/styles/global.scss';
4
4
  import { getToken } from '../utils/authToken.utils';
5
5
  export declare const Widget: React.FC<IClientWidgetConfig>;
6
6
  export { getToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myinterview/widget-react",
3
- "version": "1.0.31",
3
+ "version": "1.0.32-beta-9294bde-03882a8-2e665ae-b442156",
4
4
  "description": "myInterview widget v3",
5
5
  "module": "dist/esm/index.js",
6
6
  "files": [
@@ -8,33 +8,80 @@
8
8
  ],
9
9
  "types": "dist/index.d.ts",
10
10
  "dependencies": {
11
+ "@babel/core": "^7.16.0",
11
12
  "@cloudflare/stream-react": "^1.8.0",
12
- "@myinterview/component-library": "^1.0.22",
13
+ "@myinterview/component-library": "^1.0.31-beta-62421ad7a21bc83c4a75737f7e8b238ef94c5f49",
14
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
13
15
  "@sentry/react": "^7.7.0",
14
16
  "@sentry/tracing": "^7.7.0",
17
+ "@svgr/webpack": "^5.5.0",
15
18
  "@xstate/react": "^3.0.1",
16
19
  "axios": "^0.27.2",
20
+ "babel-jest": "^27.4.2",
21
+ "babel-loader": "^8.2.3",
22
+ "babel-plugin-named-asset-import": "^0.3.8",
23
+ "babel-preset-react-app": "^10.0.1",
24
+ "bfj": "^7.0.2",
25
+ "browserslist": "^4.18.1",
26
+ "camelcase": "^6.2.1",
27
+ "case-sensitive-paths-webpack-plugin": "^2.4.0",
17
28
  "crypto-js": "^4.1.1",
29
+ "css-loader": "^6.5.1",
30
+ "css-minimizer-webpack-plugin": "^3.2.0",
18
31
  "detect-incognito": "^1.0.0",
32
+ "dotenv": "^10.0.0",
33
+ "dotenv-expand": "^5.1.0",
34
+ "eslint": "^8.3.0",
35
+ "eslint-config-react-app": "^7.0.0",
36
+ "eslint-webpack-plugin": "^3.1.1",
37
+ "file-loader": "^6.2.0",
19
38
  "fix-webm-duration": "^1.0.5",
39
+ "fs-extra": "^10.0.0",
40
+ "html-webpack-plugin": "^5.5.0",
20
41
  "i18next": "^21.8.16",
42
+ "identity-obj-proxy": "^3.0.0",
43
+ "jest": "^27.4.3",
44
+ "jest-resolve": "^27.4.2",
45
+ "jest-watch-typeahead": "^1.0.0",
46
+ "mini-css-extract-plugin": "^2.4.5",
21
47
  "platform": "^1.3.6",
48
+ "postcss": "^8.4.4",
49
+ "postcss-flexbugs-fixes": "^5.0.2",
50
+ "postcss-loader": "^6.2.1",
51
+ "postcss-normalize": "^10.0.1",
52
+ "postcss-preset-env": "^7.0.1",
53
+ "prompts": "^2.4.2",
54
+ "react-app-polyfill": "^3.0.0",
55
+ "react-dev-utils": "^12.0.0",
22
56
  "react-i18next": "^11.18.5",
23
57
  "react-player": "^2.10.1",
58
+ "react-refresh": "^0.11.0",
59
+ "react-shadow": "^19.0.3",
24
60
  "react-use-intercom": "^2.0.0",
61
+ "resolve": "^1.20.0",
62
+ "resolve-url-loader": "^4.0.0",
25
63
  "rxjs": "^7.5.7",
64
+ "sass-loader": "^12.3.0",
65
+ "semver": "^7.3.5",
66
+ "source-map-loader": "^3.0.0",
67
+ "style-loader": "^3.3.1",
68
+ "tailwindcss": "^3.0.2",
69
+ "terser-webpack-plugin": "^5.2.5",
26
70
  "web-vitals": "^2.1.4",
71
+ "webpack": "^5.64.4",
72
+ "webpack-dev-server": "^4.6.0",
73
+ "webpack-manifest-plugin": "^4.0.2",
74
+ "workbox-webpack-plugin": "^6.4.1",
27
75
  "xstate": "^4.33.2"
28
76
  },
29
77
  "scripts": {
30
- "start": "REACT_APP_ENV=local HTTPS=true react-scripts start",
31
- "start-prod": "REACT_APP_ENV=prod HTTPS=true react-scripts start",
32
- "start-staging": "REACT_APP_ENV=staging HTTPS=true react-scripts start",
33
- "build": "react-scripts build",
78
+ "start": "REACT_APP_ENV=local HTTPS=true node scripts/start.js",
79
+ "start-prod": "REACT_APP_ENV=prod HTTPS=true node scripts/start.js",
80
+ "start-staging": "REACT_APP_ENV=staging HTTPS=true node scripts/start.js",
81
+ "build": "node scripts/build.js",
34
82
  "publish-prod": "REACT_APP_ENV=prod rollup -c && npm publish",
35
83
  "publish-staging": "REACT_APP_ENV=staging rollup -c && npm publish --tag beta",
36
- "test": "react-scripts test",
37
- "eject": "react-scripts eject"
84
+ "test": "node scripts/test.js"
38
85
  },
39
86
  "eslintConfig": {
40
87
  "extends": [
@@ -55,6 +102,7 @@
55
102
  ]
56
103
  },
57
104
  "devDependencies": {
105
+ "@rollup/plugin-babel": "^6.0.2",
58
106
  "@rollup/plugin-commonjs": "^22.0.1",
59
107
  "@rollup/plugin-json": "^4.1.0",
60
108
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -79,14 +127,16 @@
79
127
  "eslint-plugin-jsx-a11y": "^6.5.1",
80
128
  "eslint-plugin-react": "^7.29.4",
81
129
  "eslint-plugin-react-hooks": "^4.4.0",
130
+ "raw-loader": "^4.0.2",
82
131
  "react": "^18.0.0",
83
132
  "react-dom": "^18.0.0",
84
- "react-scripts": "5.0.0",
85
133
  "rollup": "^2.75.7",
134
+ "rollup-plugin-delete": "^2.0.0",
86
135
  "rollup-plugin-dts": "^4.2.2",
87
136
  "rollup-plugin-peer-deps-external": "^2.2.4",
88
137
  "rollup-plugin-postcss": "^4.0.2",
89
138
  "sass": "^1.50.0",
139
+ "sass-to-string": "^1.6.3",
90
140
  "typescript": "^4.7.4",
91
141
  "webpack": "^5.73.0",
92
142
  "webpack-cli": "^4.10.0"
@@ -95,5 +145,61 @@
95
145
  "@testing-library/react": "^12.1.5 || ^13.4.0",
96
146
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
97
147
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
148
+ },
149
+ "jest": {
150
+ "roots": [
151
+ "<rootDir>/src"
152
+ ],
153
+ "collectCoverageFrom": [
154
+ "src/**/*.{js,jsx,ts,tsx}",
155
+ "!src/**/*.d.ts"
156
+ ],
157
+ "setupFiles": [
158
+ "react-app-polyfill/jsdom"
159
+ ],
160
+ "setupFilesAfterEnv": [
161
+ "<rootDir>/src/setupTests.ts"
162
+ ],
163
+ "testMatch": [
164
+ "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
165
+ "<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
166
+ ],
167
+ "testEnvironment": "jsdom",
168
+ "transform": {
169
+ "^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": "<rootDir>/config/jest/babelTransform.js",
170
+ "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
171
+ "^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
172
+ },
173
+ "transformIgnorePatterns": [
174
+ "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$",
175
+ "^.+\\.module\\.(css|sass|scss)$"
176
+ ],
177
+ "modulePaths": [],
178
+ "moduleNameMapper": {
179
+ "^react-native$": "react-native-web",
180
+ "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
181
+ },
182
+ "moduleFileExtensions": [
183
+ "web.js",
184
+ "js",
185
+ "web.ts",
186
+ "ts",
187
+ "web.tsx",
188
+ "tsx",
189
+ "json",
190
+ "web.jsx",
191
+ "jsx",
192
+ "node"
193
+ ],
194
+ "watchPlugins": [
195
+ "jest-watch-typeahead/filename",
196
+ "jest-watch-typeahead/testname"
197
+ ],
198
+ "resetMocks": true
199
+ },
200
+ "babel": {
201
+ "presets": [
202
+ "react-app"
203
+ ]
98
204
  }
99
205
  }