siam-ui-utils 2.2.7 → 2.2.8
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/eslint.config.mjs +41 -41
- package/package.json +1 -1
- package/src/App.jsx +1 -1
- package/src/where-by-room/index.jsx +10 -1
- package/src/where-by-room/room.jsx +10 -2
package/eslint.config.mjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import globals from 'globals';
|
|
3
|
-
import pluginReact from 'eslint-plugin-react';
|
|
4
|
-
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
5
|
-
import pluginReactRefresh from 'eslint-plugin-react-refresh';
|
|
6
|
-
import { defineConfig } from 'eslint/config';
|
|
7
|
-
|
|
8
|
-
export default defineConfig([
|
|
9
|
-
{ ignores: ['build', '**/*.d.ts'] },
|
|
10
|
-
{
|
|
11
|
-
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
12
|
-
languageOptions: {
|
|
13
|
-
ecmaVersion: 'latest',
|
|
14
|
-
sourceType: 'module',
|
|
15
|
-
globals: globals.browser,
|
|
16
|
-
parserOptions: {
|
|
17
|
-
ecmaFeatures: { jsx: true },
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
plugins: {
|
|
21
|
-
react: pluginReact,
|
|
22
|
-
'react-hooks': pluginReactHooks,
|
|
23
|
-
'react-refresh': pluginReactRefresh,
|
|
24
|
-
},
|
|
25
|
-
rules: {
|
|
26
|
-
...js.configs.recommended.rules,
|
|
27
|
-
...pluginReact.configs.recommended.rules,
|
|
28
|
-
...pluginReact.configs['jsx-runtime'].rules,
|
|
29
|
-
...pluginReactHooks.configs.recommended.rules,
|
|
30
|
-
'react/jsx-no-target-blank': 'off',
|
|
31
|
-
'react-refresh/only-export-components': [
|
|
32
|
-
'off',
|
|
33
|
-
{ allowConstantExport: true },
|
|
34
|
-
],
|
|
35
|
-
'react/prop-types': 'off',
|
|
36
|
-
'@/no-default-export': 'off',
|
|
37
|
-
'no-unused-vars': 'warn',
|
|
38
|
-
},
|
|
39
|
-
settings: { react: { version: 'detect' } },
|
|
40
|
-
},
|
|
41
|
-
]);
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
import pluginReact from 'eslint-plugin-react';
|
|
4
|
+
import pluginReactHooks from 'eslint-plugin-react-hooks';
|
|
5
|
+
import pluginReactRefresh from 'eslint-plugin-react-refresh';
|
|
6
|
+
import { defineConfig } from 'eslint/config';
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
{ ignores: ['build', '**/*.d.ts'] },
|
|
10
|
+
{
|
|
11
|
+
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 'latest',
|
|
14
|
+
sourceType: 'module',
|
|
15
|
+
globals: globals.browser,
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaFeatures: { jsx: true },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
plugins: {
|
|
21
|
+
react: pluginReact,
|
|
22
|
+
'react-hooks': pluginReactHooks,
|
|
23
|
+
'react-refresh': pluginReactRefresh,
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
...js.configs.recommended.rules,
|
|
27
|
+
...pluginReact.configs.recommended.rules,
|
|
28
|
+
...pluginReact.configs['jsx-runtime'].rules,
|
|
29
|
+
...pluginReactHooks.configs.recommended.rules,
|
|
30
|
+
'react/jsx-no-target-blank': 'off',
|
|
31
|
+
'react-refresh/only-export-components': [
|
|
32
|
+
'off',
|
|
33
|
+
{ allowConstantExport: true },
|
|
34
|
+
],
|
|
35
|
+
'react/prop-types': 'off',
|
|
36
|
+
'@/no-default-export': 'off',
|
|
37
|
+
'no-unused-vars': 'warn',
|
|
38
|
+
},
|
|
39
|
+
settings: { react: { version: 'detect' } },
|
|
40
|
+
},
|
|
41
|
+
]);
|
package/package.json
CHANGED
package/src/App.jsx
CHANGED
|
@@ -81,7 +81,7 @@ const App = () => {
|
|
|
81
81
|
<AccordionHeader targetId="4">Video Call Room</AccordionHeader>
|
|
82
82
|
<AccordionBody accordionId="4">
|
|
83
83
|
<WhereByRoom
|
|
84
|
-
src="https://whereby.com/
|
|
84
|
+
src="https://ampf.whereby.com/ampf-cons-virc92qft?displayName=Jose"
|
|
85
85
|
title="Videollamada de ejemplo"
|
|
86
86
|
/>
|
|
87
87
|
</AccordionBody>
|
|
@@ -2,7 +2,14 @@ import { WherebyProvider } from '@whereby.com/browser-sdk/react';
|
|
|
2
2
|
import '@whereby.com/browser-sdk/embed';
|
|
3
3
|
import Room from './room';
|
|
4
4
|
|
|
5
|
-
export const WhereByRoom = ({
|
|
5
|
+
export const WhereByRoom = ({
|
|
6
|
+
src,
|
|
7
|
+
onEvent,
|
|
8
|
+
onActions,
|
|
9
|
+
iframeClass,
|
|
10
|
+
isChatEnabled = true,
|
|
11
|
+
isMinimalEnabled = false,
|
|
12
|
+
}) => {
|
|
6
13
|
return (
|
|
7
14
|
<WherebyProvider>
|
|
8
15
|
<Room
|
|
@@ -10,6 +17,8 @@ export const WhereByRoom = ({ src, onEvent, onActions, iframeClass }) => {
|
|
|
10
17
|
onEvent={onEvent}
|
|
11
18
|
onActions={onActions}
|
|
12
19
|
iframeClass={iframeClass}
|
|
20
|
+
isChatEnabled={isChatEnabled}
|
|
21
|
+
isMinimalEnabled={isMinimalEnabled}
|
|
13
22
|
/>
|
|
14
23
|
</WherebyProvider>
|
|
15
24
|
);
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
2
|
import '@whereby.com/browser-sdk/embed';
|
|
3
3
|
|
|
4
|
-
export const Room = ({
|
|
4
|
+
export const Room = ({
|
|
5
|
+
src,
|
|
6
|
+
onEvent,
|
|
7
|
+
onActions,
|
|
8
|
+
iframeClass,
|
|
9
|
+
isChatEnabled = true,
|
|
10
|
+
isMinimalEnabled = false,
|
|
11
|
+
}) => {
|
|
5
12
|
const wherebyRef = useRef(null);
|
|
6
13
|
|
|
7
14
|
useEffect(() => {
|
|
@@ -67,11 +74,12 @@ export const Room = ({ src, onEvent, onActions, iframeClass }) => {
|
|
|
67
74
|
ref={wherebyRef}
|
|
68
75
|
class={iframeClass}
|
|
69
76
|
room={src}
|
|
70
|
-
chat=
|
|
77
|
+
chat={isChatEnabled ? 'on' : 'off'}
|
|
71
78
|
screenshare="on"
|
|
72
79
|
audio="on"
|
|
73
80
|
video="on"
|
|
74
81
|
allow="camera; microphone; fullscreen"
|
|
82
|
+
minimal={isMinimalEnabled ? 'on' : 'off'}
|
|
75
83
|
/>
|
|
76
84
|
</div>
|
|
77
85
|
);
|