agora-appbuilder-core 4.1.8-beta.7 → 4.1.8-beta.9

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": "4.1.8-beta.7",
3
+ "version": "4.1.8-beta.9",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -77,8 +77,8 @@ const DefaultConfig = {
77
77
  CHAT_ORG_NAME: '',
78
78
  CHAT_APP_NAME: '',
79
79
  CHAT_URL: '',
80
- CLI_VERSION: '3.1.8-beta.7',
81
- CORE_VERSION: '4.1.8-beta.7',
80
+ CLI_VERSION: '3.1.8-beta.9',
81
+ CORE_VERSION: '4.1.8-beta.9',
82
82
  DISABLE_LANDSCAPE_MODE: false,
83
83
  STT_AUTO_START: false,
84
84
  CLOUD_RECORDING_AUTO_START: false,
@@ -64,7 +64,7 @@
64
64
  "agora-extension-beauty-effect": "^1.0.2-beta",
65
65
  "agora-extension-virtual-background": "^1.1.3",
66
66
  "agora-react-native-rtm": "1.5.1",
67
- "agora-rtc-sdk-ng": "4.23.3",
67
+ "agora-rtc-sdk-ng": "4.23.4",
68
68
  "agora-rtm-sdk": "1.5.1",
69
69
  "buffer": "^6.0.3",
70
70
  "electron-log": "4.3.5",
@@ -19,6 +19,7 @@ interface TableHeaderProps {
19
19
  rowStyle?: ViewStyle;
20
20
  cellStyle?: ViewStyle;
21
21
  firstCellStyle?: ViewStyle;
22
+ lastCellStyle?: ViewStyle;
22
23
  textStyle?: TextStyle;
23
24
  }
24
25
 
@@ -28,22 +29,27 @@ const TableHeader: React.FC<TableHeaderProps> = ({
28
29
  rowStyle,
29
30
  cellStyle,
30
31
  firstCellStyle,
32
+ lastCellStyle,
31
33
  textStyle,
32
34
  }) => (
33
35
  <View style={[style.thead, containerStyle]}>
34
36
  <View style={[style.throw, rowStyle]}>
35
- {columns.map((col, index) => (
36
- <View
37
- key={col}
38
- style={[
39
- style.th,
40
- index === 0 && style.plzero,
41
- cellStyle,
42
- index === 0 && firstCellStyle,
43
- ]}>
44
- <Text style={[style.thText, textStyle]}>{col}</Text>
45
- </View>
46
- ))}
37
+ {columns.map((col, index) => {
38
+ const isFirst = index === 0;
39
+ const isLast = index === (columns.length > 1 ? columns.length - 1 : 0);
40
+ return (
41
+ <View
42
+ key={col}
43
+ style={[
44
+ style.th,
45
+ cellStyle,
46
+ isFirst && firstCellStyle,
47
+ isLast && lastCellStyle,
48
+ ]}>
49
+ <Text style={[style.thText, textStyle]}>{col}</Text>
50
+ </View>
51
+ );
52
+ })}
47
53
  </View>
48
54
  </View>
49
55
  );
@@ -222,7 +228,7 @@ export const style = StyleSheet.create({
222
228
  flex: 1,
223
229
  alignSelf: 'stretch',
224
230
  justifyContent: 'center',
225
- paddingHorizontal: 12,
231
+ // paddingHorizontal: 12,
226
232
  },
227
233
  thText: {
228
234
  color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.medium,
@@ -389,8 +395,8 @@ export const style = StyleSheet.create({
389
395
  flexShrink: 0,
390
396
  alignItems: 'flex-start',
391
397
  justifyContent: 'center',
392
- minWidth: 50,
393
- paddingRight: 50 + 12,
398
+ minWidth: 52,
399
+ // paddingRight: 50 + 12,
394
400
  },
395
401
  thIconCell: {
396
402
  flex: 0,
@@ -400,4 +406,7 @@ export const style = StyleSheet.create({
400
406
  minWidth: 50,
401
407
  paddingHorizontal: 12,
402
408
  },
409
+ alignCellToRight: {
410
+ alignItems: 'flex-end',
411
+ },
403
412
  });
@@ -16,11 +16,13 @@ interface RecordingItemRowProps {
16
16
  item: FetchRecordingData['recordings'][0];
17
17
  onDeleteAction: (id: string) => void;
18
18
  onTextTrackDownload: (textTrackLink: string) => void;
19
+ showTextTracks: boolean;
19
20
  }
20
21
  export default function RecordingItemRow({
21
22
  item,
22
23
  onDeleteAction,
23
24
  onTextTrackDownload,
25
+ showTextTracks = false,
24
26
  }: RecordingItemRowProps) {
25
27
  const [expanded, setIsExpanded] = useState(false);
26
28
 
@@ -33,7 +35,7 @@ export default function RecordingItemRow({
33
35
  error,
34
36
  data: {stts = []},
35
37
  } = sttRecState;
36
- console.log('supriya sttRecState', sttRecState);
38
+
37
39
  useEffect(() => {
38
40
  if (expanded) {
39
41
  if (item.id) {
@@ -70,20 +72,22 @@ export default function RecordingItemRow({
70
72
  <View>
71
73
  {/* ========== PARENT ROW ========== */}
72
74
  <View style={style.tbrow} key={item.id}>
73
- <View style={style.tdIconCell}>
74
- <IconButtonWithToolTip
75
- hoverEffect={true}
76
- hoverEffectStyle={style.iconButtonHoverEffect}
77
- containerStyle={style.iconButton}
78
- iconProps={{
79
- name: expanded ? 'arrow-up' : 'arrow-down',
80
- iconType: 'plain',
81
- iconSize: 20,
82
- tintColor: `${$config.FONT_COLOR}`,
83
- }}
84
- onPress={() => setIsExpanded(prev => !prev)}
85
- />
86
- </View>
75
+ {showTextTracks && (
76
+ <View style={style.tdIconCell}>
77
+ <IconButtonWithToolTip
78
+ hoverEffect={true}
79
+ hoverEffectStyle={style.iconButtonHoverEffect}
80
+ containerStyle={style.iconButton}
81
+ iconProps={{
82
+ name: expanded ? 'arrow-up' : 'arrow-down',
83
+ iconType: 'plain',
84
+ iconSize: 20,
85
+ tintColor: `${$config.FONT_COLOR}`,
86
+ }}
87
+ onPress={() => setIsExpanded(prev => !prev)}
88
+ />
89
+ </View>
90
+ )}
87
91
  <View style={[style.td, style.plzero]}>
88
92
  <Text style={style.ttime}>
89
93
  {date}
@@ -223,7 +227,7 @@ export default function RecordingItemRow({
223
227
  {expanded && (
224
228
  <View style={expanedStyles.expandedContainer}>
225
229
  <View>
226
- <Text style={expanedStyles.expandedHeaderText}>STT's</Text>
230
+ <Text style={expanedStyles.expandedHeaderText}>Text-tracks</Text>
227
231
  </View>
228
232
  <View style={expanedStyles.expandedHeaderBody}>
229
233
  {status === 'idle' || status === 'pending' ? (
@@ -235,7 +239,7 @@ export default function RecordingItemRow({
235
239
  </Text>
236
240
  ) : status === 'resolved' && stts?.length === 0 ? (
237
241
  <Text style={style.ttime}>
238
- There are no STT's for this recording
242
+ There are no text-tracks's for this recording
239
243
  </Text>
240
244
  ) : (
241
245
  <>
@@ -13,6 +13,7 @@ import ImageIcon from '../../atoms/ImageIcon';
13
13
  import RecordingItemRow from './RecordingItemRow';
14
14
  import GenericPopup from '../common/GenericPopup';
15
15
  import {downloadS3Link} from '../../utils/common';
16
+ import {useControlPermissionMatrix} from '../controls/useControlPermissionMatrix';
16
17
 
17
18
  function EmptyRecordingState() {
18
19
  return (
@@ -34,7 +35,6 @@ function EmptyRecordingState() {
34
35
  );
35
36
  }
36
37
 
37
- const headers = ['', 'Date/Time', 'Duration', 'Actions'];
38
38
  const defaultPageNumber = 1;
39
39
 
40
40
  function RecordingsDateTable(props) {
@@ -57,6 +57,8 @@ function RecordingsDateTable(props) {
57
57
  const [currentPage, setCurrentPage] = useState(defaultPageNumber);
58
58
 
59
59
  const {fetchRecordings} = useRecording();
60
+ const canAccessAllTextTracks =
61
+ useControlPermissionMatrix('viewAllTextTracks');
60
62
 
61
63
  // message for any download‐error popup
62
64
  const [errorSnack, setErrorSnack] = React.useState<string | undefined>();
@@ -111,9 +113,17 @@ function RecordingsDateTable(props) {
111
113
  });
112
114
  };
113
115
 
116
+ const headers = canAccessAllTextTracks
117
+ ? ['', 'Date/Time', 'Duration', 'Actions']
118
+ : ['Date/Time', 'Duration', 'Actions'];
119
+
114
120
  return (
115
121
  <View style={style.ttable}>
116
- <TableHeader columns={headers} firstCellStyle={style.thIconCell} />
122
+ <TableHeader
123
+ columns={headers}
124
+ firstCellStyle={canAccessAllTextTracks ? style.thIconCell : {}}
125
+ lastCellStyle={style.alignCellToRight}
126
+ />
117
127
  <TableBody
118
128
  status={state.status}
119
129
  items={state.data.recordings}
@@ -126,6 +136,7 @@ function RecordingsDateTable(props) {
126
136
  item={item}
127
137
  onDeleteAction={props?.onDeleteAction}
128
138
  onTextTrackDownload={onTextTrackDownload}
139
+ showTextTracks={canAccessAllTextTracks}
129
140
  />
130
141
  )}
131
142
  emptyComponent={<EmptyRecordingState />}