siam-ui-utils 2.2.6 → 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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siam-ui-utils",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "keywords": [
5
5
  "ampf-react",
6
6
  "ampf-utils",
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/test-ampf-room"
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 = ({ src, onEvent, onActions, iframeClass }) => {
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 = ({ src, onEvent, onActions, iframeClass }) => {
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(() => {
@@ -29,8 +36,16 @@ export const Room = ({ src, onEvent, onActions, iframeClass }) => {
29
36
 
30
37
  const events = [
31
38
  'ready',
39
+ 'grant_device_permission',
40
+ 'deny_device_permission',
41
+ 'precall_check_completed',
42
+ 'precall_check_skipped',
43
+ 'knock',
44
+ 'cancel_knock',
32
45
  'join',
33
46
  'leave',
47
+ 'meeting_end',
48
+ 'participantupdate',
34
49
  'participant_join',
35
50
  'participant_leave',
36
51
  'microphone_toggle',
@@ -39,10 +54,10 @@ export const Room = ({ src, onEvent, onActions, iframeClass }) => {
39
54
  'chat_toggle',
40
55
  'people_toggle',
41
56
  'pip_toggle',
42
- 'deny_device_permission',
43
57
  'streaming_status_change',
58
+ 'recording_status_change',
59
+ 'transcription_status_change',
44
60
  'connection_status_change',
45
- 'meeting_end',
46
61
  ];
47
62
  function handleEvent(e) {
48
63
  if (onEvent) onEvent(e.type, e.detail);
@@ -59,11 +74,12 @@ export const Room = ({ src, onEvent, onActions, iframeClass }) => {
59
74
  ref={wherebyRef}
60
75
  class={iframeClass}
61
76
  room={src}
62
- chat="on"
77
+ chat={isChatEnabled ? 'on' : 'off'}
63
78
  screenshare="on"
64
79
  audio="on"
65
80
  video="on"
66
81
  allow="camera; microphone; fullscreen"
82
+ minimal={isMinimalEnabled ? 'on' : 'off'}
67
83
  />
68
84
  </div>
69
85
  );