agora-appbuilder-core 3.0.2-beta.0 → 3.0.2-beta.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "3.0.2-beta.0",
3
+ "version": "3.0.2-beta.1",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -10,7 +10,7 @@
10
10
  *********************************************
11
11
  */
12
12
  const configVars = require('./configTransform');
13
- const getCustomizationApiPath = require('./customization.config');
13
+ const { getCustomizationApiPath } = require('./customization.config');
14
14
 
15
15
  // This file is read only by react native for IOS & Android. Doesn't apply to electron, Web targets
16
16
  module.exports = {
@@ -26,4 +26,4 @@ const getCustomizationApiPath = () => {
26
26
  }
27
27
  return customizationDummyPath;
28
28
  };
29
- module.exports = getCustomizationApiPath;
29
+ module.exports = {getCustomizationApiPath, customizationDummyPath};
@@ -31,7 +31,12 @@ import {numFormatter} from '../utils/index';
31
31
  import {useLayout} from '../utils/useLayout';
32
32
  import {useChatNotification} from '../components/chat-notification/useChatNotification';
33
33
  import useLayoutsData from '../pages/video-call/useLayoutsData';
34
- import {isIOS, isValidReactComponent, isWebInternal} from '../utils/common';
34
+ import {
35
+ isAndroid,
36
+ isIOS,
37
+ isValidReactComponent,
38
+ isWebInternal,
39
+ } from '../utils/common';
35
40
  import {useChangeDefaultLayout} from '../pages/video-call/DefaultLayouts';
36
41
  import {useRecording} from '../subComponents/recording/useRecording';
37
42
  import LayoutIconDropdown from '../subComponents/LayoutIconDropdown';
@@ -357,6 +362,8 @@ const Navbar = () => {
357
362
  const {isRecordingActive} = useRecording();
358
363
  const {getDimensionData} = useContext(DimensionContext);
359
364
  const {isDesktop} = getDimensionData();
365
+ const layoutsData = useLayoutsData();
366
+ const isNative = isIOS() || isAndroid();
360
367
 
361
368
  return (
362
369
  <View
@@ -440,7 +447,11 @@ const Navbar = () => {
440
447
  </View>
441
448
  ) : (
442
449
  <View>
443
- <Text style={style.roomNameText}>{meetingTitle}</Text>
450
+ <Text style={style.roomNameText}>
451
+ {meetingTitle.length > 13
452
+ ? meetingTitle.slice(0, 13) + '..'
453
+ : meetingTitle}
454
+ </Text>
444
455
  </View>
445
456
  )}
446
457
  </View>
@@ -453,7 +464,10 @@ const Navbar = () => {
453
464
  isWebInternal() && isDesktop
454
465
  ? 300
455
466
  : isMobileOrTablet()
456
- ? 160
467
+ ? //In native - if only one layout is provided then we are hiding the layout icon. so we need less space. otherwise there will empty space around the icon
468
+ layoutsData && layoutsData.length === 1 && isNative
469
+ ? 130
470
+ : 160
457
471
  : 200,
458
472
  },
459
473
  ]}>
@@ -471,17 +485,24 @@ const Navbar = () => {
471
485
  ) : (
472
486
  <></>
473
487
  )}
474
- <RenderSeparator />
475
- <View
476
- style={[style.navItem, style.navSmItem]}
477
- /**
478
- * .measure returns undefined on Android unless collapsable=false or onLayout are specified
479
- * so added collapsable property
480
- * https://github.com/facebook/react-native/issues/29712
481
- * */
482
- collapsable={false}>
483
- <LayoutIconButton />
484
- </View>
488
+ {/**
489
+ * In custom-layout - show the layout icon if more than 1 layout provided otherwise hide it from the ui
490
+ */}
491
+ {layoutsData && layoutsData.length > 1 && (
492
+ <>
493
+ <RenderSeparator />
494
+ <View
495
+ style={[style.navItem, style.navSmItem]}
496
+ /**
497
+ * .measure returns undefined on Android unless collapsable=false or onLayout are specified
498
+ * so added collapsable property
499
+ * https://github.com/facebook/react-native/issues/29712
500
+ * */
501
+ collapsable={false}>
502
+ <LayoutIconButton />
503
+ </View>
504
+ </>
505
+ )}
485
506
  <RenderSeparator />
486
507
  <SettingsIconButtonWithWrapper />
487
508
  </View>
@@ -530,7 +551,7 @@ const style = StyleSheet.create({
530
551
  height: 35,
531
552
  maxHeight: 30,
532
553
  position: 'absolute',
533
- left: isMobileOrTablet() ? '50%' : 10,
554
+ left: isMobileOrTablet() ? '48%' : 10,
534
555
  paddingHorizontal: 5,
535
556
  flexDirection: 'row',
536
557
  alignItems: 'center',
@@ -590,7 +611,8 @@ const style = StyleSheet.create({
590
611
  backgroundColor: $config.PRIMARY_COLOR,
591
612
  borderRadius: 2.5,
592
613
  paddingHorizontal: 5,
593
- marginHorizontal: 5,
614
+ marginLeft: 5,
615
+ marginRight: 0,
594
616
  paddingVertical: 1,
595
617
  display: 'flex',
596
618
  alignItems: 'center',
@@ -19,7 +19,10 @@ const isDevelopment = process.env.NODE_ENV === 'development';
19
19
  const path = require('path');
20
20
  const HtmlWebpackPlugin = require('html-webpack-plugin');
21
21
  const configVars = require('./configTransform');
22
- const getCustomizationApiPath = require('./customization.config');
22
+ const {
23
+ getCustomizationApiPath,
24
+ customizationDummyPath,
25
+ } = require('./customization.config');
23
26
 
24
27
  const isElectron = ['linux', 'windows', 'mac'].includes(process.env.TARGET);
25
28
  const isReactSdk = process.env.TARGET === 'rsdk';
@@ -58,7 +61,10 @@ module.exports = {
58
61
  __dirname,
59
62
  'customization-implementation/index.ts',
60
63
  ),
61
- customization: path.join(__dirname, getCustomizationApiPath()),
64
+ customization: path.join(
65
+ __dirname,
66
+ isSdk ? customizationDummyPath : getCustomizationApiPath(),
67
+ ),
62
68
  'agora-react-native-rtm/lib/typescript/src': path.join(
63
69
  __dirname,
64
70
  'bridge/rtm/web/index.ts',