@naviedu/room-platform-react 0.0.41 → 0.0.42

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.
Files changed (3) hide show
  1. package/index.d.ts +11 -1
  2. package/index.esm.js +22 -11
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -292,7 +292,7 @@ declare type RoomPlatformControlBarProps = {
292
292
  onToggleTheaterMode?: () => void;
293
293
  };
294
294
 
295
- export declare function RoomPlatformCurrentOperationStrip({ activeSpeakerParticipantIdentity, canClearActiveSpeaker, isClearingActiveSpeaker, onClearActiveSpeaker, currentPrivateRoomOperation, onCancelPrivateRoom, participants, }: {
295
+ export declare function RoomPlatformCurrentOperationStrip({ activeSpeakerParticipantIdentity, canClearActiveSpeaker, isClearingActiveSpeaker, onClearActiveSpeaker, currentPrivateRoomOperation, onCancelPrivateRoom, participants, currentOperation, }: {
296
296
  activeSpeakerParticipantIdentity?: string;
297
297
  canClearActiveSpeaker?: boolean;
298
298
  isClearingActiveSpeaker?: boolean;
@@ -303,6 +303,11 @@ export declare function RoomPlatformCurrentOperationStrip({ activeSpeakerPartici
303
303
  };
304
304
  onCancelPrivateRoom?: () => Promise<void> | void;
305
305
  participants: readonly Pick<RoomParticipantPresence, 'name' | 'participantIdentity' | 'externalActorId' | 'isLocal'>[];
306
+ currentOperation?: {
307
+ label: string;
308
+ name: string;
309
+ leading?: ReactNode;
310
+ };
306
311
  }): JSX.Element;
307
312
 
308
313
  export declare type RoomPlatformDeviceKind = 'audioinput' | 'audiooutput' | 'videoinput';
@@ -337,6 +342,11 @@ export declare type RoomPlatformExtensionProps = {
337
342
  };
338
343
 
339
344
  export declare type RoomPlatformExtensions = {
345
+ currentOperation?: {
346
+ label: string;
347
+ name: string;
348
+ leading?: ReactNode;
349
+ };
340
350
  topBarLeading?: ComponentType<RoomPlatformExtensionProps>;
341
351
  topBarTrailing?: ComponentType<RoomPlatformExtensionProps>;
342
352
  monitor?: {
package/index.esm.js CHANGED
@@ -19106,7 +19106,7 @@ function _ts_generator$g(thisArg, body) {
19106
19106
  }
19107
19107
  }
19108
19108
  function RoomPlatformCurrentOperationStrip(param) {
19109
- var activeSpeakerParticipantIdentity = param.activeSpeakerParticipantIdentity, canClearActiveSpeaker = param.canClearActiveSpeaker, isClearingActiveSpeaker = param.isClearingActiveSpeaker, onClearActiveSpeaker = param.onClearActiveSpeaker, currentPrivateRoomOperation = param.currentPrivateRoomOperation, onCancelPrivateRoom = param.onCancelPrivateRoom, participants = param.participants;
19109
+ var activeSpeakerParticipantIdentity = param.activeSpeakerParticipantIdentity, canClearActiveSpeaker = param.canClearActiveSpeaker, isClearingActiveSpeaker = param.isClearingActiveSpeaker, onClearActiveSpeaker = param.onClearActiveSpeaker, currentPrivateRoomOperation = param.currentPrivateRoomOperation, onCancelPrivateRoom = param.onCancelPrivateRoom, participants = param.participants, currentOperation = param.currentOperation;
19110
19110
  var _ref, _ref1;
19111
19111
  var _useState = _sliced_to_array$g(useState(false), 2), isCancelingPrivateRoomOperation = _useState[0], setIsCancelingPrivateRoomOperation = _useState[1];
19112
19112
  var roomPlatformToast = useRoomPlatformToast();
@@ -19118,6 +19118,10 @@ function RoomPlatformCurrentOperationStrip(param) {
19118
19118
  return participant.externalActorId === currentPrivateRoomOperation.studentExternalActorId;
19119
19119
  }) : undefined;
19120
19120
  var privateStudentName = (_ref1 = privateStudent === null || privateStudent === void 0 ? void 0 : privateStudent.name) !== null && _ref1 !== void 0 ? _ref1 : currentPrivateRoomOperation === null || currentPrivateRoomOperation === void 0 ? void 0 : currentPrivateRoomOperation.studentExternalActorId;
19121
+ var operation = currentOperation !== null && currentOperation !== void 0 ? currentOperation : activeSpeakerName ? {
19122
+ label: 'Đang phát biểu',
19123
+ name: activeSpeakerName
19124
+ } : undefined;
19121
19125
  var cancelPrivateRoomOperation = function() {
19122
19126
  return _async_to_generator$g(function() {
19123
19127
  return _ts_generator$g(this, function(_state) {
@@ -19165,23 +19169,29 @@ function RoomPlatformCurrentOperationStrip(param) {
19165
19169
  });
19166
19170
  })();
19167
19171
  };
19168
- if (!activeSpeakerName && !privateStudentName) return null;
19172
+ if (!operation && !privateStudentName) return null;
19169
19173
  return /*#__PURE__*/ jsxs("div", {
19170
19174
  className: "grid gap-2 border-b border-primary/10 p-3",
19171
19175
  children: [
19172
- activeSpeakerName ? /*#__PURE__*/ jsxs("div", {
19176
+ operation ? /*#__PURE__*/ jsxs("div", {
19173
19177
  className: "flex items-center justify-between gap-3 rounded-lg border border-liveclass-orange/30 bg-liveclass-orange/10 px-3 py-2",
19174
19178
  children: [
19175
19179
  /*#__PURE__*/ jsxs("div", {
19176
- className: "min-w-0",
19180
+ className: "flex min-w-0 items-center gap-2",
19177
19181
  children: [
19178
- /*#__PURE__*/ jsx("p", {
19179
- className: "text-xs font-semibold uppercase text-liveclass-orange",
19180
- children: "Đang ph\xe1t biểu"
19181
- }),
19182
- /*#__PURE__*/ jsx("p", {
19183
- className: "truncate text-sm font-semibold text-primary",
19184
- children: activeSpeakerName
19182
+ operation.leading,
19183
+ /*#__PURE__*/ jsxs("div", {
19184
+ className: "min-w-0",
19185
+ children: [
19186
+ /*#__PURE__*/ jsx("p", {
19187
+ className: "text-xs font-semibold uppercase text-liveclass-orange",
19188
+ children: operation.label
19189
+ }),
19190
+ /*#__PURE__*/ jsx("p", {
19191
+ className: "truncate text-sm font-semibold text-primary",
19192
+ children: operation.name
19193
+ })
19194
+ ]
19185
19195
  })
19186
19196
  ]
19187
19197
  }),
@@ -29128,6 +29138,7 @@ var RoomPlatformWorkspaceContent = function(param) {
29128
29138
  canClearActiveSpeaker: canModerate,
29129
29139
  isClearingActiveSpeaker: isClearingActiveSpeaker,
29130
29140
  onClearActiveSpeaker: canModerate ? clearActiveSpeaker : undefined,
29141
+ currentOperation: extensions === null || extensions === void 0 ? void 0 : extensions.currentOperation,
29131
29142
  currentPrivateRoomOperation: currentPrivateRoomOperation,
29132
29143
  onCancelPrivateRoom: cancelPrivateRoom,
29133
29144
  participants: participants
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naviedu/room-platform-react",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "type": "module",
5
5
  "main": "./index.esm.js",
6
6
  "module": "./index.esm.js",