Ver código fonte

ref(TS) Convert some features to TS (#12523)

factor2
Robert Pintilii 2 anos atrás
pai
commit
4bd27730ce
Nenhuma conta vinculada ao e-mail do autor do commit
60 arquivos alterados com 410 adições e 374 exclusões
  1. 1
    1
      react/features/app/functions.native.ts
  2. 6
    9
      react/features/authentication/actions.native.ts
  3. 5
    6
      react/features/authentication/functions.ts
  4. 13
    15
      react/features/authentication/middleware.native.ts
  5. 12
    10
      react/features/authentication/middleware.web.ts
  6. 3
    1
      react/features/authentication/reducer.ts
  7. 1
    1
      react/features/base/conference/actions.ts
  8. 1
    0
      react/features/base/config/configType.ts
  9. 20
    0
      react/features/base/config/functions.any.ts
  10. 0
    20
      react/features/base/config/functions.web.ts
  11. 1
    1
      react/features/base/environment/environment.ts
  12. 1
    1
      react/features/base/media/functions.ts
  13. 1
    1
      react/features/base/participants/actions.ts
  14. 10
    13
      react/features/conference/actions.native.ts
  15. 7
    13
      react/features/conference/actions.web.ts
  16. 5
    4
      react/features/conference/functions.any.ts
  17. 3
    4
      react/features/conference/functions.native.ts
  18. 6
    4
      react/features/conference/functions.web.ts
  19. 0
    2
      react/features/conference/logger.ts
  20. 15
    14
      react/features/conference/middleware.ts
  21. 1
    1
      react/features/connection-indicator/functions.ts
  22. 0
    1
      react/features/dropbox/actions.ts
  23. 3
    4
      react/features/dropbox/functions.any.ts
  24. 14
    8
      react/features/dropbox/functions.native.ts
  25. 14
    9
      react/features/dropbox/functions.web.ts
  26. 0
    2
      react/features/dropbox/logger.ts
  27. 0
    2
      react/features/filmstrip/actions.any.ts
  28. 4
    4
      react/features/filmstrip/actions.native.ts
  29. 39
    38
      react/features/filmstrip/actions.web.ts
  30. 1
    1
      react/features/filmstrip/components/web/Filmstrip.tsx
  31. 1
    1
      react/features/filmstrip/components/web/PinnedIndicator.tsx
  32. 8
    4
      react/features/filmstrip/functions.any.ts
  33. 39
    19
      react/features/filmstrip/functions.native.ts
  34. 69
    46
      react/features/filmstrip/functions.web.ts
  35. 0
    2
      react/features/filmstrip/logger.ts
  36. 6
    8
      react/features/filmstrip/middleware.native.ts
  37. 20
    21
      react/features/filmstrip/middleware.web.ts
  38. 1
    3
      react/features/filmstrip/subscriber.any.ts
  39. 3
    5
      react/features/filmstrip/subscriber.native.ts
  40. 11
    10
      react/features/filmstrip/subscriber.web.ts
  41. 1
    1
      react/features/follow-me/subscriber.ts
  42. 1
    0
      react/features/notifications/types.ts
  43. 6
    5
      react/features/overlay/functions.ts
  44. 0
    2
      react/features/overlay/logger.ts
  45. 10
    13
      react/features/overlay/middleware.ts
  46. 0
    16
      react/features/overlay/overlays.native.js
  47. 15
    0
      react/features/overlay/overlays.native.ts
  48. 2
    2
      react/features/overlay/overlays.web.ts
  49. 1
    1
      react/features/prejoin/functions.ts
  50. 13
    1
      react/features/reactions/actions.any.ts
  51. 1
    0
      react/features/reactions/actions.native.ts
  52. 2
    12
      react/features/reactions/actions.web.ts
  53. 2
    2
      react/features/reactions/middleware.ts
  54. 2
    2
      react/features/screen-share/actions.web.ts
  55. 2
    2
      react/features/screen-share/components/web/ShareAudioDialog.tsx
  56. 1
    1
      react/features/settings/middleware.web.ts
  57. 1
    1
      react/features/toolbox/actions.any.ts
  58. 1
    1
      react/features/video-layout/functions.web.ts
  59. 2
    2
      react/features/video-layout/subscriber.ts
  60. 2
    1
      react/features/video-quality/subscriber.ts

+ 1
- 1
react/features/app/functions.native.ts Ver arquivo

@@ -2,7 +2,7 @@ import { NativeModules } from 'react-native';
2 2
 
3 3
 import { IStateful } from '../base/app/types';
4 4
 import { toState } from '../base/redux/functions';
5
-import { getServerURL } from '../base/settings/functions';
5
+import { getServerURL } from '../base/settings/functions.native';
6 6
 
7 7
 export * from './functions.any';
8 8
 

react/features/authentication/actions.native.js → react/features/authentication/actions.native.ts Ver arquivo

@@ -1,11 +1,8 @@
1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5 1
 import { appNavigate } from '../app/actions';
2
+import { IStore } from '../app/types';
6 3
 import { conferenceLeft } from '../base/conference/actions';
7 4
 import { connectionFailed } from '../base/connection/actions.native';
8
-import { set } from '../base/redux';
5
+import { set } from '../base/redux/functions';
9 6
 
10 7
 import { CANCEL_LOGIN } from './actionTypes';
11 8
 import { stopWaitForOwner } from './actions.any';
@@ -20,7 +17,7 @@ export * from './actions.any';
20 17
  * }}
21 18
  */
22 19
 export function cancelLogin() {
23
-    return (dispatch: Dispatch<any>, getState: Function) => {
20
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
24 21
         dispatch({ type: CANCEL_LOGIN });
25 22
 
26 23
         // XXX The error associated with CONNECTION_FAILED was marked as
@@ -36,8 +33,8 @@ export function cancelLogin() {
36 33
         passwordRequired
37 34
             && dispatch(
38 35
                 connectionFailed(
39
-                    passwordRequired,
40
-                    set(error, 'recoverable', false)));
36
+                    passwordRequired, // @ts-ignore
37
+                    set(error, 'recoverable', false) as any));
41 38
     };
42 39
 }
43 40
 
@@ -47,7 +44,7 @@ export function cancelLogin() {
47 44
  * @returns {Function}
48 45
  */
49 46
 export function cancelWaitForOwner() {
50
-    return (dispatch: Dispatch<any>, getState: Function) => {
47
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
51 48
         dispatch(stopWaitForOwner());
52 49
 
53 50
         // XXX The error associated with CONFERENCE_FAILED was marked as

react/features/authentication/functions.js → react/features/authentication/functions.ts Ver arquivo

@@ -1,6 +1,5 @@
1
-// @flow
2
-
3
-import JitsiMeetJS from '../../../react/features/base/lib-jitsi-meet';
1
+import { IConfig } from '../base/config/configType';
2
+import JitsiMeetJS from '../base/lib-jitsi-meet';
4 3
 
5 4
 
6 5
 /**
@@ -9,7 +8,7 @@ import JitsiMeetJS from '../../../react/features/base/lib-jitsi-meet';
9 8
  * @param {Object} config - Configuration state object from store.
10 9
  * @returns {boolean}
11 10
  */
12
-export const isTokenAuthEnabled = (config: Object) =>
11
+export const isTokenAuthEnabled = (config: IConfig) =>
13 12
     typeof config.tokenAuthUrl === 'string'
14 13
     && config.tokenAuthUrl.length;
15 14
 
@@ -20,6 +19,6 @@ export const isTokenAuthEnabled = (config: Object) =>
20 19
  * @param {Object} config - Configuration state object from store.
21 20
  * @returns {string}
22 21
  */
23
-export const getTokenAuthUrl = (config: Object) =>
22
+export const getTokenAuthUrl = (config: IConfig) =>
24 23
     JitsiMeetJS.util.AuthUtil.getTokenAuthUrl.bind(null,
25
-         config.tokenAuthUrl);
24
+        config.tokenAuthUrl);

react/features/authentication/middleware.native.js → react/features/authentication/middleware.native.ts Ver arquivo

@@ -1,20 +1,18 @@
1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5
-import { appNavigate } from '../app/actions';
1
+import { appNavigate } from '../app/actions.native';
2
+import { IStore } from '../app/types';
6 3
 import {
7 4
     CONFERENCE_FAILED,
8 5
     CONFERENCE_JOINED,
9 6
     CONFERENCE_LEFT
10
-} from '../base/conference';
11
-import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../base/connection';
12
-import { hideDialog, isDialogOpen } from '../base/dialog';
7
+} from '../base/conference/actionTypes';
8
+import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../base/connection/actionTypes';
9
+import { hideDialog } from '../base/dialog/actions';
10
+import { isDialogOpen } from '../base/dialog/functions';
13 11
 import {
14 12
     JitsiConferenceErrors,
15 13
     JitsiConnectionErrors
16 14
 } from '../base/lib-jitsi-meet';
17
-import { MiddlewareRegistry } from '../base/redux';
15
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
18 16
 
19 17
 import {
20 18
     CANCEL_LOGIN,
@@ -26,7 +24,7 @@ import {
26 24
     openLoginDialog,
27 25
     openWaitForOwnerDialog,
28 26
     stopWaitForOwner,
29
-    waitForOwner } from './actions.native';
27
+    waitForOwner } from './actions.native'; // @ts-ignore
30 28
 import { LoginDialog, WaitForOwnerDialog } from './components';
31 29
 
32 30
 /**
@@ -44,7 +42,7 @@ MiddlewareRegistry.register(store => next => action => {
44 42
         const { dispatch, getState } = store;
45 43
         const { thenableWithCancel } = getState()['features/authentication'];
46 44
 
47
-        thenableWithCancel && thenableWithCancel.cancel();
45
+        thenableWithCancel?.cancel();
48 46
 
49 47
         // The LoginDialog can be opened on top of "wait for owner". The app
50 48
         // should navigate only if LoginDialog was open without the
@@ -142,7 +140,7 @@ MiddlewareRegistry.register(store => next => action => {
142 140
     case WAIT_FOR_OWNER: {
143 141
         _clearExistingWaitForOwnerTimeout(store);
144 142
 
145
-        const { handler, timeoutMs } = action;
143
+        const { handler, timeoutMs }: { handler: () => void; timeoutMs: number; } = action;
146 144
 
147 145
         action.waitForOwnerTimeoutID = setTimeout(handler, timeoutMs);
148 146
 
@@ -165,7 +163,7 @@ MiddlewareRegistry.register(store => next => action => {
165 163
  * @returns {void}
166 164
  */
167 165
 function _clearExistingWaitForOwnerTimeout(
168
-        { getState }: { getState: Function }) {
166
+        { getState }: IStore) {
169 167
     const { waitForOwnerTimeoutID } = getState()['features/authentication'];
170 168
 
171 169
     waitForOwnerTimeoutID && clearTimeout(waitForOwnerTimeoutID);
@@ -177,7 +175,7 @@ function _clearExistingWaitForOwnerTimeout(
177 175
  * @param {Object} store - The redux store.
178 176
  * @returns {void}
179 177
  */
180
-function _hideLoginDialog({ dispatch }: { dispatch: Dispatch<any> }) {
178
+function _hideLoginDialog({ dispatch }: IStore) {
181 179
     dispatch(hideDialog(LoginDialog));
182 180
 }
183 181
 
@@ -187,6 +185,6 @@ function _hideLoginDialog({ dispatch }: { dispatch: Dispatch<any> }) {
187 185
  * @param {Object} store - The redux store.
188 186
  * @returns {boolean}
189 187
  */
190
-function _isWaitingForOwner({ getState }: { getState: Function }) {
188
+function _isWaitingForOwner({ getState }: IStore) {
191 189
     return Boolean(getState()['features/authentication'].waitForOwnerTimeoutID);
192 190
 }

react/features/authentication/middleware.web.js → react/features/authentication/middleware.web.ts Ver arquivo

@@ -1,17 +1,17 @@
1
-// @flow
2
-
3
-import { maybeRedirectToWelcomePage } from '../app/actions';
1
+import { maybeRedirectToWelcomePage } from '../app/actions.web';
2
+import { IStore } from '../app/types';
4 3
 import {
5 4
     CONFERENCE_FAILED,
6 5
     CONFERENCE_JOINED,
7 6
     CONFERENCE_LEFT
8
-} from '../base/conference';
9
-import { CONNECTION_ESTABLISHED } from '../base/connection';
10
-import { hideDialog, isDialogOpen } from '../base/dialog';
7
+} from '../base/conference/actionTypes';
8
+import { CONNECTION_ESTABLISHED } from '../base/connection/actionTypes';
9
+import { hideDialog } from '../base/dialog/actions';
10
+import { isDialogOpen } from '../base/dialog/functions';
11 11
 import {
12 12
     JitsiConferenceErrors
13 13
 } from '../base/lib-jitsi-meet';
14
-import { MiddlewareRegistry } from '../base/redux';
14
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
15 15
 
16 16
 import {
17 17
     CANCEL_LOGIN,
@@ -24,6 +24,8 @@ import {
24 24
     openWaitForOwnerDialog,
25 25
     stopWaitForOwner
26 26
 } from './actions.web';
27
+// eslint-disable-next-line lines-around-comment
28
+// @ts-ignore
27 29
 import { LoginDialog, WaitForOwnerDialog } from './components';
28 30
 
29 31
 /**
@@ -113,7 +115,7 @@ MiddlewareRegistry.register(store => next => action => {
113 115
     case WAIT_FOR_OWNER: {
114 116
         _clearExistingWaitForOwnerTimeout(store);
115 117
 
116
-        const { handler, timeoutMs } = action;
118
+        const { handler, timeoutMs }: { handler: () => void; timeoutMs: number; } = action;
117 119
 
118 120
         action.waitForOwnerTimeoutID = setTimeout(handler, timeoutMs);
119 121
 
@@ -134,7 +136,7 @@ MiddlewareRegistry.register(store => next => action => {
134 136
  * @returns {void}
135 137
  */
136 138
 function _clearExistingWaitForOwnerTimeout(
137
-        { getState }: { getState: Function }) {
139
+        { getState }: IStore) {
138 140
     const { waitForOwnerTimeoutID } = getState()['features/authentication'];
139 141
 
140 142
     waitForOwnerTimeoutID && clearTimeout(waitForOwnerTimeoutID);
@@ -146,6 +148,6 @@ function _clearExistingWaitForOwnerTimeout(
146 148
  * @param {Object} store - The redux store.
147 149
  * @returns {void}
148 150
  */
149
-function _isWaitingForOwner({ getState }: { getState: Function }) {
151
+function _isWaitingForOwner({ getState }: IStore) {
150 152
     return getState()['features/authentication'].waitForOwnerTimeoutID;
151 153
 }

+ 3
- 1
react/features/authentication/reducer.ts Ver arquivo

@@ -12,7 +12,9 @@ import {
12 12
 export interface IAuthenticationState {
13 13
     error?: Object | undefined;
14 14
     progress?: number | undefined;
15
-    thenableWithCancel?: Object | undefined;
15
+    thenableWithCancel?: {
16
+        cancel: Function;
17
+    };
16 18
     waitForOwnerTimeoutID?: number;
17 19
 }
18 20
 

+ 1
- 1
react/features/base/conference/actions.ts Ver arquivo

@@ -377,7 +377,7 @@ export function conferenceJoinInProgress(conference: IJitsiConference) {
377 377
  *     conference: JitsiConference
378 378
  * }}
379 379
  */
380
-export function conferenceLeft(conference: IJitsiConference) {
380
+export function conferenceLeft(conference: Partial<IJitsiConference>) {
381 381
     return {
382 382
         type: CONFERENCE_LEFT,
383 383
         conference

+ 1
- 0
react/features/base/config/configType.ts Ver arquivo

@@ -456,6 +456,7 @@ export interface IConfig {
456 456
     tileView?: {
457 457
         numberOfVisibleTiles?: number;
458 458
     };
459
+    tokenAuthUrl?: string;
459 460
     toolbarButtons?: Array<ToolbarButtons>;
460 461
     toolbarConfig?: {
461 462
         alwaysVisible?: boolean;

+ 20
- 0
react/features/base/config/functions.any.ts Ver arquivo

@@ -286,3 +286,23 @@ export function setConfigFromURLParams(
286 286
 }
287 287
 
288 288
 /* eslint-enable max-params */
289
+
290
+/**
291
+ * Returns the dial out url.
292
+ *
293
+ * @param {Object} state - The state of the app.
294
+ * @returns {string}
295
+ */
296
+export function getDialOutStatusUrl(state: IReduxState) {
297
+    return state['features/base/config'].guestDialOutStatusUrl;
298
+}
299
+
300
+/**
301
+ * Returns the dial out status url.
302
+ *
303
+ * @param {Object} state - The state of the app.
304
+ * @returns {string}
305
+ */
306
+export function getDialOutUrl(state: IReduxState) {
307
+    return state['features/base/config'].guestDialOutUrl;
308
+}

+ 0
- 20
react/features/base/config/functions.web.ts Ver arquivo

@@ -14,26 +14,6 @@ export * from './functions.any';
14 14
 export function _cleanupConfig(config: IConfig) { // eslint-disable-line @typescript-eslint/no-unused-vars
15 15
 }
16 16
 
17
-/**
18
- * Returns the dial out url.
19
- *
20
- * @param {Object} state - The state of the app.
21
- * @returns {string}
22
- */
23
-export function getDialOutStatusUrl(state: IReduxState): string | undefined {
24
-    return state['features/base/config'].guestDialOutStatusUrl;
25
-}
26
-
27
-/**
28
- * Returns the dial out status url.
29
- *
30
- * @param {Object} state - The state of the app.
31
- * @returns {string}
32
- */
33
-export function getDialOutUrl(state: IReduxState): string | undefined {
34
-    return state['features/base/config'].guestDialOutUrl;
35
-}
36
-
37 17
 /**
38 18
  * Returns the replaceParticipant config.
39 19
  *

+ 1
- 1
react/features/base/environment/environment.ts Ver arquivo

@@ -1,5 +1,5 @@
1 1
 import JitsiMeetJS from '../lib-jitsi-meet';
2
-import Platform from '../react/Platform.web';
2
+import Platform from '../react/Platform';
3 3
 
4 4
 import { isMobileBrowser } from './utils';
5 5
 

+ 1
- 1
react/features/base/media/functions.ts Ver arquivo

@@ -1,6 +1,6 @@
1 1
 import { IStateful } from '../app/types';
2 2
 import { toState } from '../redux/functions';
3
-import { getPropertyValue } from '../settings/functions.any';
3
+import { getPropertyValue } from '../settings/functions';
4 4
 
5 5
 import { VIDEO_MUTISM_AUTHORITY } from './constants';
6 6
 

+ 1
- 1
react/features/base/participants/actions.ts Ver arquivo

@@ -540,7 +540,7 @@ export function participantKicked(kicker: any, kicked: any) {
540 540
  *     }
541 541
  * }}
542 542
  */
543
-export function pinParticipant(id: string | null) {
543
+export function pinParticipant(id?: string | null) {
544 544
     return {
545 545
         type: PIN_PARTICIPANT,
546 546
         participant: {

react/features/conference/actions.native.js → react/features/conference/actions.native.ts Ver arquivo

@@ -1,12 +1,9 @@
1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5
-import {
6
-    AlertDialog,
7
-    openDialog
8
-} from '../base/dialog';
9
-import { getParticipantDisplayName } from '../base/participants';
1
+import { IStore } from '../app/types';
2
+import { openDialog } from '../base/dialog/actions';
3
+// eslint-disable-next-line lines-around-comment
4
+// @ts-ignore
5
+import { AlertDialog } from '../base/dialog/components/native';
6
+import { getParticipantDisplayName } from '../base/participants/functions';
10 7
 
11 8
 /**
12 9
  * Notify that we've been kicked out of the conference.
@@ -16,10 +13,10 @@ import { getParticipantDisplayName } from '../base/participants';
16 13
  * @param {?Function} submit - The function to execute after submiting the dialog.
17 14
  * @returns {Function}
18 15
  */
19
-export function notifyKickedOut(participant: Object, submit: ?Function) {
20
-    return (dispatch: Dispatch<any>, getState: Function) => {
21
-        if (!participant || (participant.isReplaced && participant.isReplaced())) {
22
-            submit && submit();
16
+export function notifyKickedOut(participant: any, submit?: Function) {
17
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
18
+        if (!participant || participant?.isReplaced?.()) {
19
+            submit?.();
23 20
 
24 21
             return;
25 22
         }

react/features/conference/actions.web.js → react/features/conference/actions.web.ts Ver arquivo

@@ -1,13 +1,7 @@
1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5
-import { getParticipantDisplayName } from '../base/participants';
6
-import {
7
-    NOTIFICATION_TIMEOUT_TYPE,
8
-    NOTIFICATION_TYPE,
9
-    showNotification
10
-} from '../notifications';
1
+import { IStore } from '../app/types';
2
+import { getParticipantDisplayName } from '../base/participants/functions';
3
+import { showNotification } from '../notifications/actions';
4
+import { NOTIFICATION_TIMEOUT_TYPE, NOTIFICATION_TYPE } from '../notifications/constants';
11 5
 
12 6
 /**
13 7
  * Notify that we've been kicked out of the conference.
@@ -17,9 +11,9 @@ import {
17 11
  * @param {?Function} _ - Used only in native code.
18 12
  * @returns {Function}
19 13
  */
20
-export function notifyKickedOut(participant: Object, _: ?Function) { // eslint-disable-line no-unused-vars
21
-    return (dispatch: Dispatch<any>, getState: Function) => {
22
-        if (!participant || (participant.isReplaced && participant.isReplaced())) {
14
+export function notifyKickedOut(participant: any, _?: Function) {
15
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
16
+        if (!participant || participant?.isReplaced()) {
23 17
             return;
24 18
         }
25 19
 

react/features/conference/functions.any.js → react/features/conference/functions.any.ts Ver arquivo

@@ -1,6 +1,7 @@
1
-import { toState } from '../base/redux';
2
-import { areThereNotifications } from '../notifications';
3
-import { getOverlayToRender } from '../overlay';
1
+import { IStateful } from '../base/app/types';
2
+import { toState } from '../base/redux/functions';
3
+import { areThereNotifications } from '../notifications/functions';
4
+import { getOverlayToRender } from '../overlay/functions';
4 5
 
5 6
 /**
6 7
  * Tells whether or not the notifications should be displayed within
@@ -9,7 +10,7 @@ import { getOverlayToRender } from '../overlay';
9 10
  * @param {Object|Function} stateful - The redux store state.
10 11
  * @returns {boolean}
11 12
  */
12
-export function shouldDisplayNotifications(stateful) {
13
+export function shouldDisplayNotifications(stateful: IStateful) {
13 14
     const state = toState(stateful);
14 15
     const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
15 16
     const { calleeInfoVisible } = state['features/invite'];

react/features/conference/functions.native.js → react/features/conference/functions.native.ts Ver arquivo

@@ -1,6 +1,5 @@
1
-// @flow
2
-
3
-import { toState } from '../base/redux';
1
+import { IStateful } from '../base/app/types';
2
+import { toState } from '../base/redux/functions';
4 3
 
5 4
 export * from './functions.any';
6 5
 
@@ -14,7 +13,7 @@ export * from './functions.any';
14 13
  * features/base/config.
15 14
  * @returns {boolean}.
16 15
  */
17
-export function getDisablePolls(stateful: Object) {
16
+export function getDisablePolls(stateful: IStateful) {
18 17
     const state = toState(stateful)['features/base/config'];
19 18
 
20 19
     return state.disablePolls;

react/features/conference/functions.web.js → react/features/conference/functions.web.ts Ver arquivo

@@ -1,6 +1,8 @@
1
-import { isSuboptimalBrowser } from '../base/environment';
2
-import { translateToHTML } from '../base/i18n';
3
-import { NOTIFICATION_TIMEOUT_TYPE, showWarningNotification } from '../notifications';
1
+import { IStore } from '../app/types';
2
+import { isSuboptimalBrowser } from '../base/environment/environment';
3
+import { translateToHTML } from '../base/i18n/functions';
4
+import { showWarningNotification } from '../notifications/actions';
5
+import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
4 6
 
5 7
 export * from './functions.any';
6 8
 
@@ -11,7 +13,7 @@ export * from './functions.any';
11 13
  * @param {Function} t - The translation function.
12 14
  * @returns {void}
13 15
  */
14
-export function maybeShowSuboptimalExperienceNotification(dispatch, t) {
16
+export function maybeShowSuboptimalExperienceNotification(dispatch: IStore['dispatch'], t: Function) {
15 17
     if (isSuboptimalBrowser()) {
16 18
         dispatch(
17 19
             showWarningNotification(

react/features/conference/logger.js → react/features/conference/logger.ts Ver arquivo

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { getLogger } from '../base/logging/functions';
4 2
 
5 3
 export default getLogger('features/conference');

react/features/conference/middleware.js → react/features/conference/middleware.ts Ver arquivo

@@ -1,17 +1,18 @@
1
-// @flow
2 1
 import { appNavigate } from '../app/actions';
3
-import {
4
-    CONFERENCE_JOINED,
5
-    KICKED_OUT,
6
-    conferenceLeft,
7
-    getCurrentConference
8
-} from '../base/conference';
9
-import { hideDialog, isDialogOpen } from '../base/dialog';
10
-import { pinParticipant } from '../base/participants';
11
-import { MiddlewareRegistry, StateListenerRegistry } from '../base/redux';
12
-import { SET_REDUCED_UI } from '../base/responsive-ui';
2
+import { IStore } from '../app/types';
3
+import { CONFERENCE_JOINED, KICKED_OUT } from '../base/conference/actionTypes';
4
+import { conferenceLeft } from '../base/conference/actions';
5
+import { getCurrentConference } from '../base/conference/functions';
6
+import { hideDialog } from '../base/dialog/actions';
7
+import { isDialogOpen } from '../base/dialog/functions';
8
+import { pinParticipant } from '../base/participants/actions';
9
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
10
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
11
+import { SET_REDUCED_UI } from '../base/responsive-ui/actionTypes';
12
+// eslint-disable-next-line lines-around-comment
13
+// @ts-ignore
13 14
 import { FeedbackDialog } from '../feedback';
14
-import { setFilmstripEnabled } from '../filmstrip';
15
+import { setFilmstripEnabled } from '../filmstrip/actions';
15 16
 import { showSalesforceNotification } from '../salesforce/actions';
16 17
 import { setToolboxEnabled } from '../toolbox/actions';
17 18
 
@@ -90,7 +91,7 @@ StateListenerRegistry.register(
90 91
  * @private
91 92
  * @returns {void}
92 93
  */
93
-function _setReducedUI({ dispatch, getState }) {
94
+function _setReducedUI({ dispatch, getState }: IStore) {
94 95
     const { reducedUI } = getState()['features/base/responsive-ui'];
95 96
 
96 97
     dispatch(setToolboxEnabled(!reducedUI));
@@ -106,7 +107,7 @@ function _setReducedUI({ dispatch, getState }) {
106 107
  * @private
107 108
  * @returns {void}
108 109
  */
109
-function _conferenceJoined({ dispatch, getState }) {
110
+function _conferenceJoined({ dispatch, getState }: IStore) {
110 111
     _setReducedUI({
111 112
         dispatch,
112 113
         getState

+ 1
- 1
react/features/connection-indicator/functions.ts Ver arquivo

@@ -7,7 +7,7 @@ import { ITrack } from '../base/tracks/types';
7 7
  * @param {Object} videoTrack - Track reference.
8 8
  * @returns {boolean} - Is streaming status active.
9 9
  */
10
-export function isTrackStreamingStatusActive(videoTrack: ITrack) {
10
+export function isTrackStreamingStatusActive(videoTrack?: ITrack) {
11 11
     const streamingStatus = videoTrack?.streamingStatus;
12 12
 
13 13
     return streamingStatus === JitsiTrackStreamingStatus.ACTIVE;

react/features/dropbox/actions.js → react/features/dropbox/actions.ts Ver arquivo

@@ -1,4 +1,3 @@
1
-// @flow
2 1
 import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
3 2
 import { _authorizeDropbox } from './functions';
4 3
 import logger from './logger';

react/features/dropbox/functions.any.js → react/features/dropbox/functions.any.ts Ver arquivo

@@ -1,4 +1,3 @@
1
-// @flow
2 1
 export * from './functions';
3 2
 
4 3
 import { getDisplayName, getSpaceUsage } from './functions';
@@ -12,12 +11,12 @@ type DropboxUserData = {
12 11
     /**
13 12
      * The available space left in MB into the user's Dropbox account.
14 13
      */
15
-    spaceLeft: number,
14
+    spaceLeft: number;
16 15
 
17 16
     /**
18 17
      * The display name of the user in Dropbox.
19 18
      */
20
-    userName: string
19
+    userName: string;
21 20
 };
22 21
 
23 22
 /**
@@ -30,7 +29,7 @@ type DropboxUserData = {
30 29
 export function getDropboxData(
31 30
         token: string,
32 31
         appKey: string
33
-): Promise<?DropboxUserData> {
32
+): Promise<DropboxUserData | undefined> {
34 33
     return Promise.all(
35 34
         [ getDisplayName(token, appKey), getSpaceUsage(token, appKey) ]
36 35
     ).then(([ userName, space ]) => {

react/features/dropbox/functions.native.js → react/features/dropbox/functions.native.ts Ver arquivo

@@ -1,18 +1,21 @@
1
-// @flow
2
-
3 1
 import { NativeModules } from 'react-native';
4 2
 
5
-const { Dropbox } = NativeModules;
6
-
3
+import { IReduxState } from '../app/types';
4
+// eslint-disable-next-line lines-around-comment
5
+// @ts-ignore
7 6
 import { setPictureInPictureEnabled } from '../mobile/picture-in-picture/functions';
8 7
 
8
+const { Dropbox } = NativeModules;
9
+
9 10
 /**
10 11
  * Action to authorize the Jitsi Recording app in dropbox.
11 12
  *
13
+ * @param {any} _appKey - Used on web.
14
+ * @param {any} _redirectURI - Used on web.
12 15
  * @returns {Promise<Object>} - The promise will be resolved with the dropbox
13 16
  * access token or rejected with an error.
14 17
  */
15
-export async function _authorizeDropbox(): Promise<Object> {
18
+export async function _authorizeDropbox(_appKey?: any, _redirectURI?: any): Promise<any> {
16 19
     setPictureInPictureEnabled(false);
17 20
 
18 21
     try {
@@ -35,10 +38,11 @@ export function getNewAccessToken() {
35 38
  * Returns the display name for the current dropbox account.
36 39
  *
37 40
  * @param {string} token - The dropbox access token.
41
+ * @param {any} _appKey - Used on web.
38 42
  * @returns {Promise<string>} - The promise will be resolved with the display
39 43
  * name or rejected with an error.
40 44
  */
41
-export function getDisplayName(token: string) {
45
+export function getDisplayName(token: string, _appKey?: any) {
42 46
     return Dropbox.getDisplayName(token);
43 47
 }
44 48
 
@@ -46,12 +50,13 @@ export function getDisplayName(token: string) {
46 50
  * Returns information about the space usage for the current dropbox account.
47 51
  *
48 52
  * @param {string} token - The dropbox access token.
53
+ * @param {any} _appKey - Used on web.
49 54
  * @returns {Promise<{ used: number, allocated: number}>} - The promise will be
50 55
  * resolved with the object with information about the space usage (the used
51 56
  * space and the allocated space) for the current dropbox account or rejected
52 57
  * with an error.
53 58
  */
54
-export function getSpaceUsage(token: string) {
59
+export function getSpaceUsage(token: string, _appKey?: any) {
55 60
     return Dropbox.getSpaceUsage(token);
56 61
 }
57 62
 
@@ -62,8 +67,9 @@ export function getSpaceUsage(token: string) {
62 67
  * @param {Object} state - The redux state.
63 68
  * @returns {boolean}
64 69
  */
65
-export function isEnabled(state: Object) {
70
+export function isEnabled(state: IReduxState) {
66 71
     const { dropbox = {} } = state['features/base/config'];
67 72
 
73
+    // @ts-ignore
68 74
     return Boolean(Dropbox?.ENABLED && typeof dropbox.appKey === 'string');
69 75
 }

react/features/dropbox/functions.web.js → react/features/dropbox/functions.web.ts Ver arquivo

@@ -1,7 +1,7 @@
1
-// @flow
2
-
3 1
 import { Dropbox, DropboxAuth } from 'dropbox';
4 2
 
3
+import { IReduxState } from '../app/types';
4
+
5 5
 /**
6 6
  * Executes the oauth flow.
7 7
  *
@@ -13,8 +13,8 @@ function authorize(authUrl: string): Promise<string> {
13 13
 
14 14
     return new Promise(resolve => {
15 15
         // eslint-disable-next-line prefer-const
16
-        let popup;
17
-        const handleAuth = ({ data }) => {
16
+        let popup: any;
17
+        const handleAuth = ({ data }: { data: { type: string; url: string; windowName: string; }; }) => {
18 18
             if (data && data.type === 'dropbox-login' && data.windowName === windowName) {
19 19
                 if (popup) {
20 20
                     popup.close();
@@ -49,18 +49,20 @@ function getTokenExpiresAtTimestamp(expiresIn: number) {
49 49
 export function _authorizeDropbox(
50 50
         appKey: string,
51 51
         redirectURI: string
52
-): Promise<Object> {
52
+): Promise<any> {
53 53
     const dropbox = new DropboxAuth({ clientId: appKey });
54 54
 
55 55
     return dropbox.getAuthenticationUrl(redirectURI, undefined, 'code', 'offline', undefined, undefined, true)
56
+
57
+        // @ts-ignore
56 58
         .then(authorize)
57 59
         .then(returnUrl => {
58 60
             const params = new URLSearchParams(new URL(returnUrl).search);
59 61
             const code = params.get('code');
60 62
 
61
-            return dropbox.getAccessTokenFromCode(redirectURI, code);
63
+            return dropbox.getAccessTokenFromCode(redirectURI, code ?? '');
62 64
         })
63
-        .then(resp => {
65
+        .then((resp: any) => {
64 66
             return {
65 67
                 token: resp.result.access_token,
66 68
                 rToken: resp.result.refresh_token,
@@ -82,7 +84,7 @@ export function getNewAccessToken(appKey: string, rToken: string) {
82 84
 
83 85
     dropbox.setRefreshToken(rToken);
84 86
 
85
-    return dropbox.refreshAccessToken()
87
+    return dropbox.refreshAccessToken() // @ts-ignore
86 88
         .then(() => {
87 89
             return {
88 90
                 token: dropbox.getAccessToken(),
@@ -125,6 +127,8 @@ export function getSpaceUsage(token: string, appKey: string) {
125 127
 
126 128
     return dropboxAPI.usersGetSpaceUsage().then(space => {
127 129
         const { allocation, used } = space.result;
130
+
131
+        // @ts-ignore
128 132
         const { allocated } = allocation;
129 133
 
130 134
         return {
@@ -141,8 +145,9 @@ export function getSpaceUsage(token: string, appKey: string) {
141 145
  * @param {Object} state - The redux state.
142 146
  * @returns {boolean}
143 147
  */
144
-export function isEnabled(state: Object) {
148
+export function isEnabled(state: IReduxState) {
145 149
     const { dropbox = {} } = state['features/base/config'];
146 150
 
151
+    // @ts-ignore
147 152
     return typeof dropbox.appKey === 'string';
148 153
 }

react/features/dropbox/logger.js → react/features/dropbox/logger.ts Ver arquivo

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { getLogger } from '../base/logging/functions';
4 2
 
5 3
 export default getLogger('features/dropbox');

react/features/filmstrip/actions.any.js → react/features/filmstrip/actions.any.ts Ver arquivo

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import {
4 2
     SET_FILMSTRIP_ENABLED,
5 3
     SET_FILMSTRIP_VISIBLE,

react/features/filmstrip/actions.native.js → react/features/filmstrip/actions.native.ts Ver arquivo

@@ -1,12 +1,12 @@
1
-// @flow
2
-
1
+// @ts-ignore
3 2
 import conferenceStyles from '../conference/components/native/styles';
4 3
 
5 4
 import { SET_TILE_VIEW_DIMENSIONS } from './actionTypes';
5
+// eslint-disable-next-line lines-around-comment
6
+// @ts-ignore
6 7
 import { styles } from './components';
7 8
 import { SQUARE_TILE_ASPECT_RATIO, TILE_MARGIN } from './constants';
8
-import { getColumnCount } from './functions';
9
-import { getTileViewParticipantCount } from './functions.native';
9
+import { getColumnCount, getTileViewParticipantCount } from './functions.native';
10 10
 
11 11
 export * from './actions.any';
12 12
 

react/features/filmstrip/actions.web.js → react/features/filmstrip/actions.web.ts Ver arquivo

@@ -1,14 +1,12 @@
1
-// @flow
2
-import type { Dispatch } from 'redux';
3
-
1
+import { IStore } from '../app/types';
2
+import { pinParticipant } from '../base/participants/actions';
4 3
 import {
5 4
     getLocalParticipant,
6 5
     getParticipantById,
7
-    getRemoteParticipantCount,
8
-    pinParticipant
9
-} from '../base/participants';
10
-import { shouldHideSelfView } from '../base/settings/functions.any';
11
-import { getMaxColumnCount } from '../video-layout';
6
+    getRemoteParticipantCount
7
+} from '../base/participants/functions';
8
+import { shouldHideSelfView } from '../base/settings/functions.web';
9
+import { getMaxColumnCount } from '../video-layout/functions.web';
12 10
 
13 11
 import {
14 12
     ADD_STAGE_PARTICIPANT,
@@ -54,10 +52,9 @@ import {
54 52
     getNumberOfPartipantsForTileView,
55 53
     getVerticalViewMaxWidth,
56 54
     isFilmstripResizable,
57
-    isStageFilmstripTopPanel,
58
-    showGridInVerticalView
59
-} from './functions';
60
-import { isStageFilmstripAvailable } from './functions.web';
55
+    isStageFilmstripAvailable,
56
+    isStageFilmstripTopPanel
57
+    , showGridInVerticalView } from './functions.web';
61 58
 
62 59
 export * from './actions.any';
63 60
 
@@ -71,7 +68,7 @@ export * from './actions.any';
71 68
  *  width: number,
72 69
  * }}
73 70
  */
74
-export function resizeFilmStrip(width) {
71
+export function resizeFilmStrip(width: number) {
75 72
     return {
76 73
         type: RESIZE_FILMSTRIP,
77 74
         width
@@ -84,7 +81,7 @@ export function resizeFilmStrip(width) {
84 81
  * @returns {Function}
85 82
  */
86 83
 export function setTileViewDimensions() {
87
-    return (dispatch: Dispatch<any>, getState: Function) => {
84
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
88 85
         const state = getState();
89 86
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
90 87
         const {
@@ -111,11 +108,12 @@ export function setTileViewDimensions() {
111 108
                 numberOfParticipants,
112 109
                 desiredNumberOfVisibleTiles: numberOfVisibleTiles
113 110
             });
114
-        const thumbnailsTotalHeight = rows * (TILE_VERTICAL_MARGIN + height);
111
+        const thumbnailsTotalHeight = (rows ?? 1) * (TILE_VERTICAL_MARGIN + (height ?? 0));
115 112
         const availableHeight = clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN;
116 113
         const hasScroll = availableHeight < thumbnailsTotalHeight;
117 114
         const filmstripWidth
118
-            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN, columns * (TILE_HORIZONTAL_MARGIN + width))
115
+            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN,
116
+                (columns ?? 1) * (TILE_HORIZONTAL_MARGIN + (width ?? 0)))
119 117
                 + (hasScroll ? SCROLL_SIZE : 0);
120 118
         const filmstripHeight = Math.min(availableHeight, thumbnailsTotalHeight);
121 119
 
@@ -144,7 +142,7 @@ export function setTileViewDimensions() {
144 142
  * @returns {Function}
145 143
  */
146 144
 export function setVerticalViewDimensions() {
147
-    return (dispatch: Dispatch<any>, getState: Function) => {
145
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
148 146
         const state = getState();
149 147
         const { clientHeight = 0, clientWidth = 0 } = state['features/base/responsive-ui'];
150 148
         const { width: filmstripWidth } = state['features/filmstrip'];
@@ -155,7 +153,7 @@ export function setVerticalViewDimensions() {
155 153
         const { localScreenShare } = state['features/base/participants'];
156 154
 
157 155
         let gridView = {};
158
-        let thumbnails = {};
156
+        let thumbnails: any = {};
159 157
         let filmstripDimensions = {};
160 158
         let hasScroll = false;
161 159
         let remoteVideosContainerWidth;
@@ -177,7 +175,7 @@ export function setVerticalViewDimensions() {
177 175
                 columns,
178 176
                 rows
179 177
             } = calculateResponsiveTileViewDimensions({
180
-                clientWidth: filmstripWidth.current,
178
+                clientWidth: filmstripWidth.current ?? 0,
181 179
                 clientHeight,
182 180
                 disableTileEnlargement: false,
183 181
                 maxColumns,
@@ -185,10 +183,11 @@ export function setVerticalViewDimensions() {
185 183
                 numberOfParticipants,
186 184
                 desiredNumberOfVisibleTiles: numberOfVisibleTiles
187 185
             });
188
-            const thumbnailsTotalHeight = rows * (TILE_VERTICAL_MARGIN + height);
186
+            const thumbnailsTotalHeight = (rows ?? 1) * (TILE_VERTICAL_MARGIN + (height ?? 0));
189 187
 
190 188
             hasScroll = clientHeight < thumbnailsTotalHeight;
191
-            const widthOfFilmstrip = (columns * (TILE_HORIZONTAL_MARGIN + width)) + (hasScroll ? SCROLL_SIZE : 0);
189
+            const widthOfFilmstrip = ((columns ?? 1) * (TILE_HORIZONTAL_MARGIN + (width ?? 0)))
190
+                + (hasScroll ? SCROLL_SIZE : 0);
192 191
             const filmstripHeight = Math.min(clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN, thumbnailsTotalHeight);
193 192
 
194 193
             gridView = {
@@ -208,7 +207,8 @@ export function setVerticalViewDimensions() {
208 207
                 width: widthOfFilmstrip
209 208
             };
210 209
         } else {
211
-            thumbnails = calculateThumbnailSizeForVerticalView(clientWidth, filmstripWidth.current, resizableFilmstrip);
210
+            thumbnails = calculateThumbnailSizeForVerticalView(clientWidth, filmstripWidth.current ?? 0,
211
+                resizableFilmstrip);
212 212
 
213 213
             remoteVideosContainerWidth
214 214
                 = thumbnails?.local?.width + TILE_VERTICAL_CONTAINER_HORIZONTAL_MARGIN + SCROLL_SIZE;
@@ -252,7 +252,7 @@ export function setVerticalViewDimensions() {
252 252
  * @returns {Function}
253 253
  */
254 254
 export function setHorizontalViewDimensions() {
255
-    return (dispatch: Dispatch<any>, getState: Function) => {
255
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
256 256
         const state = getState();
257 257
         const { clientHeight = 0, clientWidth = 0 } = state['features/base/responsive-ui'];
258 258
         const disableSelfView = shouldHideSelfView(state);
@@ -286,7 +286,7 @@ export function setHorizontalViewDimensions() {
286 286
  * @returns {Function}
287 287
  */
288 288
 export function setStageFilmstripViewDimensions() {
289
-    return (dispatch: Dispatch<any>, getState: Function) => {
289
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
290 290
         const state = getState();
291 291
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
292 292
         const {
@@ -316,13 +316,14 @@ export function setStageFilmstripViewDimensions() {
316 316
             maxColumns,
317 317
             noHorizontalContainerMargin: verticalWidth > 0,
318 318
             numberOfParticipants,
319
-            numberOfVisibleTiles,
319
+            desiredNumberOfVisibleTiles: numberOfVisibleTiles,
320 320
             minTileHeight: topPanel ? TILE_MIN_HEIGHT_SMALL : null
321 321
         });
322
-        const thumbnailsTotalHeight = rows * (TILE_VERTICAL_MARGIN + height);
322
+        const thumbnailsTotalHeight = (rows ?? 1) * (TILE_VERTICAL_MARGIN + (height ?? 0));
323 323
         const hasScroll = clientHeight < thumbnailsTotalHeight;
324 324
         const filmstripWidth
325
-            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN, columns * (TILE_HORIZONTAL_MARGIN + width))
325
+            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN,
326
+                (columns ?? 1) * (TILE_HORIZONTAL_MARGIN + (width ?? 0)))
326 327
             + (hasScroll ? SCROLL_SIZE : 0);
327 328
         const filmstripHeight = Math.min(clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN, thumbnailsTotalHeight);
328 329
 
@@ -352,9 +353,9 @@ export function setStageFilmstripViewDimensions() {
352 353
  * @returns {Function}
353 354
  */
354 355
 export function clickOnVideo(n: number) {
355
-    return (dispatch: Function, getState: Function) => {
356
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
356 357
         const state = getState();
357
-        const { id: localId } = getLocalParticipant(state);
358
+        const { id: localId } = getLocalParticipant(state) ?? {};
358 359
 
359 360
         // Use the list that correctly represents the current order of the participants as visible in the UI.
360 361
         const { remoteParticipants } = state['features/filmstrip'];
@@ -363,10 +364,10 @@ export function clickOnVideo(n: number) {
363 364
         if (participants.length - 1 < n) {
364 365
             return;
365 366
         }
366
-        const { id, pinned } = getParticipantById(state, participants[n]);
367
+        const { id, pinned } = getParticipantById(state, participants[n] ?? '') ?? {};
367 368
 
368 369
         if (isStageFilmstripAvailable(state)) {
369
-            dispatch(togglePinStageParticipant(id));
370
+            dispatch(togglePinStageParticipant(id ?? ''));
370 371
         } else {
371 372
             dispatch(pinParticipant(pinned ? null : id));
372 373
         }
@@ -476,7 +477,7 @@ export function setUserIsResizing(resizing: boolean) {
476 477
  * @param {boolean?} pinned - Whether the participant is pinned or not.
477 478
  * @returns {Object}
478 479
  */
479
-export function addStageParticipant(participantId, pinned = false) {
480
+export function addStageParticipant(participantId: string, pinned = false) {
480 481
     return {
481 482
         type: ADD_STAGE_PARTICIPANT,
482 483
         participantId,
@@ -490,7 +491,7 @@ export function addStageParticipant(participantId, pinned = false) {
490 491
  * @param {string} participantId - The Id of the participant to be removed.
491 492
  * @returns {Object}
492 493
  */
493
-export function removeStageParticipant(participantId) {
494
+export function removeStageParticipant(participantId: string) {
494 495
     return {
495 496
         type: REMOVE_STAGE_PARTICIPANT,
496 497
         participantId
@@ -503,7 +504,7 @@ export function removeStageParticipant(participantId) {
503 504
  * @param {Array<Object>} queue - The new list.
504 505
  * @returns {Object}
505 506
  */
506
-export function setStageParticipants(queue) {
507
+export function setStageParticipants(queue: Object[]) {
507 508
     return {
508 509
         type: SET_STAGE_PARTICIPANTS,
509 510
         queue
@@ -516,7 +517,7 @@ export function setStageParticipants(queue) {
516 517
  * @param {string} participantId - The id of the participant to be toggled.
517 518
  * @returns {Object}
518 519
  */
519
-export function togglePinStageParticipant(participantId) {
520
+export function togglePinStageParticipant(participantId: string) {
520 521
     return {
521 522
         type: TOGGLE_PIN_STAGE_PARTICIPANT,
522 523
         participantId
@@ -540,7 +541,7 @@ export function clearStageParticipants() {
540 541
  * @returns {Object}
541 542
  */
542 543
 export function setScreensharingTileDimensions() {
543
-    return (dispatch: Dispatch<any>, getState: Function) => {
544
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
544 545
         const state = getState();
545 546
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
546 547
         const { visible, topPanelHeight, topPanelVisible } = state['features/filmstrip'];
@@ -569,7 +570,7 @@ export function setScreensharingTileDimensions() {
569 570
  * @param {boolean} visible - Whether it should be visible or not.
570 571
  * @returns {Object}
571 572
  */
572
-export function setTopPanelVisible(visible) {
573
+export function setTopPanelVisible(visible: boolean) {
573 574
     return {
574 575
         type: SET_TOP_PANEL_VISIBILITY,
575 576
         visible
@@ -582,7 +583,7 @@ export function setTopPanelVisible(visible) {
582 583
  * @param {string|undefined} participantId - The id of the participant to be set.
583 584
  * @returns {Object}
584 585
  */
585
-export function setScreenshareFilmstripParticipant(participantId) {
586
+export function setScreenshareFilmstripParticipant(participantId?: string) {
586 587
     return {
587 588
         type: SET_SCREENSHARE_FILMSTRIP_PARTICIPANT,
588 589
         participantId

+ 1
- 1
react/features/filmstrip/components/web/Filmstrip.tsx Ver arquivo

@@ -16,7 +16,7 @@ import Icon from '../../../base/icons/components/Icon';
16 16
 import { IconArrowDown, IconArrowUp } from '../../../base/icons/svg';
17 17
 import { IParticipant } from '../../../base/participants/types';
18 18
 import { connect } from '../../../base/redux/functions';
19
-import { shouldHideSelfView } from '../../../base/settings/functions.any';
19
+import { shouldHideSelfView } from '../../../base/settings/functions.web';
20 20
 // @ts-ignore
21 21
 import { showToolbox } from '../../../toolbox/actions.web';
22 22
 import { isButtonEnabled, isToolboxVisible } from '../../../toolbox/functions.web';

+ 1
- 1
react/features/filmstrip/components/web/PinnedIndicator.tsx Ver arquivo

@@ -57,7 +57,7 @@ const PinnedIndicator = ({
57 57
 }: IProps) => {
58 58
     const stageFilmstrip = useSelector(isStageFilmstripAvailable);
59 59
     const pinned = useSelector((state: IReduxState) => getParticipantById(state, participantId))?.pinned;
60
-    const activePinnedParticipants: Array<{ participantId: string; pinned: boolean; }>
60
+    const activePinnedParticipants: Array<{ participantId: string; pinned?: boolean; }>
61 61
         = useSelector(getPinnedActiveParticipants);
62 62
     const isPinned = activePinnedParticipants.find(p => p.participantId === participantId);
63 63
     const { classes: styles } = useStyles();

react/features/filmstrip/functions.any.js → react/features/filmstrip/functions.any.ts Ver arquivo

@@ -1,4 +1,8 @@
1
-import { getActiveSpeakersToBeDisplayed, getVirtualScreenshareParticipantOwnerId } from '../base/participants';
1
+import { IStore } from '../app/types';
2
+import {
3
+    getActiveSpeakersToBeDisplayed,
4
+    getVirtualScreenshareParticipantOwnerId
5
+} from '../base/participants/functions';
2 6
 
3 7
 import { setRemoteParticipants } from './actions';
4 8
 import { isFilmstripScrollVisible } from './functions';
@@ -11,7 +15,7 @@ import { isFilmstripScrollVisible } from './functions';
11 15
  * @returns {void}
12 16
  * @private
13 17
  */
14
-export function updateRemoteParticipants(store: Object, participantId: ?number) {
18
+export function updateRemoteParticipants(store: IStore, participantId?: string) {
15 19
     const state = store.getState();
16 20
     let reorderedParticipants = [];
17 21
     const { sortedRemoteVirtualScreenshareParticipants } = state['features/base/participants'];
@@ -53,7 +57,7 @@ export function updateRemoteParticipants(store: Object, participantId: ?number)
53 57
     }
54 58
 
55 59
     // Always update the order of the thumnails.
56
-    const participantsWithScreenShare = screenShareParticipants.reduce((acc, screenshare) => {
60
+    const participantsWithScreenShare = screenShareParticipants.reduce<string[]>((acc, screenshare) => {
57 61
         const ownerId = getVirtualScreenshareParticipantOwnerId(screenshare);
58 62
 
59 63
         acc.push(ownerId);
@@ -80,7 +84,7 @@ export function updateRemoteParticipants(store: Object, participantId: ?number)
80 84
  * @returns {void}
81 85
  * @private
82 86
  */
83
-export function updateRemoteParticipantsOnLeave(store: Object, participantId: ?string = null) {
87
+export function updateRemoteParticipantsOnLeave(store: IStore, participantId: string | null = null) {
84 88
     if (!participantId) {
85 89
         return;
86 90
     }

react/features/filmstrip/functions.native.js → react/features/filmstrip/functions.native.ts Ver arquivo

@@ -1,18 +1,22 @@
1
-// @flow
2
-
3
-import { FILMSTRIP_ENABLED, getFeatureFlag } from '../base/flags';
1
+import { IReduxState } from '../app/types';
2
+import { IStateful } from '../base/app/types';
3
+import { FILMSTRIP_ENABLED } from '../base/flags/constants';
4
+import { getFeatureFlag } from '../base/flags/functions';
4 5
 import {
5 6
     getLocalParticipant,
6 7
     getParticipantCountWithFake,
7 8
     getPinnedParticipant
8
-} from '../base/participants';
9
-import { Platform } from '../base/react';
10
-import { toState } from '../base/redux';
9
+} from '../base/participants/functions';
10
+import Platform from '../base/react/Platform.native';
11
+import { toState } from '../base/redux/functions';
11 12
 import { ASPECT_RATIO_NARROW } from '../base/responsive-ui/constants';
12
-import { shouldHideSelfView } from '../base/settings/functions.any';
13
+import { shouldHideSelfView } from '../base/settings/functions.native';
14
+// eslint-disable-next-line lines-around-comment
15
+// @ts-ignore
13 16
 import conferenceStyles from '../conference/components/native/styles';
14
-import { shouldDisplayTileView } from '../video-layout';
17
+import { shouldDisplayTileView } from '../video-layout/functions.native';
15 18
 
19
+// @ts-ignore
16 20
 import { styles } from './components';
17 21
 
18 22
 export * from './functions.any';
@@ -27,7 +31,7 @@ export * from './functions.any';
27 31
  * resolved to a Redux state object with the toState function.
28 32
  * @returns {boolean}
29 33
  */
30
-export function isFilmstripVisible(stateful: Object | Function) {
34
+export function isFilmstripVisible(stateful: IStateful) {
31 35
     const state = toState(stateful);
32 36
 
33 37
     const enabled = getFeatureFlag(state, FILMSTRIP_ENABLED, true);
@@ -47,7 +51,7 @@ export function isFilmstripVisible(stateful: Object | Function) {
47 51
  * @returns {boolean} - If remote video thumbnails should be displayed/visible
48 52
  * in the filmstrip, then {@code true}; otherwise, {@code false}.
49 53
  */
50
-export function shouldRemoteVideosBeVisible(state: Object) {
54
+export function shouldRemoteVideosBeVisible(state: IReduxState) {
51 55
     if (state['features/invite'].calleeInfoVisible) {
52 56
         return false;
53 57
     }
@@ -74,9 +78,10 @@ export function shouldRemoteVideosBeVisible(state: Object) {
74 78
 /**
75 79
  * Not implemented on mobile.
76 80
  *
81
+ * @param {any} _state - Used on web.
77 82
  * @returns {Array<string>}
78 83
  */
79
-export function getActiveParticipantsIds() {
84
+export function getActiveParticipantsIds(_state: any) {
80 85
     return [];
81 86
 }
82 87
 
@@ -87,7 +92,7 @@ export function getActiveParticipantsIds() {
87 92
  * resolved to a Redux state object with the toState function.
88 93
  * @returns {number} - The number of participants displayed in tile view.
89 94
  */
90
-export function getTileViewParticipantCount(stateful: Object | Function) {
95
+export function getTileViewParticipantCount(stateful: IStateful) {
91 96
     const state = toState(stateful);
92 97
     const disableSelfView = shouldHideSelfView(state);
93 98
     const localParticipant = getLocalParticipant(state);
@@ -104,7 +109,7 @@ export function getTileViewParticipantCount(stateful: Object | Function) {
104 109
  * @returns {number} - The number of columns to be rendered in tile view.
105 110
  * @private
106 111
  */
107
-export function getColumnCount(stateful: Object | Function) {
112
+export function getColumnCount(stateful: IStateful) {
108 113
     const state = toState(stateful);
109 114
     const participantCount = getTileViewParticipantCount(state);
110 115
     const { aspectRatio } = state['features/base/responsive-ui'];
@@ -130,7 +135,7 @@ export function getColumnCount(stateful: Object | Function) {
130 135
  * @param {Object} state - The redux state.
131 136
  * @returns {boolean} - True if the scroll is displayed and false otherwise.
132 137
  */
133
-export function isFilmstripScrollVisible(state) {
138
+export function isFilmstripScrollVisible(state: IReduxState) {
134 139
     if (shouldDisplayTileView(state)) {
135 140
         return state['features/filmstrip']?.tileViewDimensions?.hasScroll;
136 141
     }
@@ -162,28 +167,31 @@ export function isFilmstripScrollVisible(state) {
162 167
 /**
163 168
  * Whether the stage filmstrip is available or not.
164 169
  *
165
- * @param {Object} state - Redux state.
170
+ * @param {any} _state - Used on web.
171
+ * @param {any} _count - Used on web.
166 172
  * @returns {boolean}
167 173
  */
168
-export function isStageFilmstripAvailable() {
174
+export function isStageFilmstripAvailable(_state: any, _count?: any) {
169 175
     return false;
170 176
 }
171 177
 
172 178
 /**
173 179
  * Whether the stage filmstrip is enabled.
174 180
  *
181
+ * @param {any} _state - Used on web.
175 182
  * @returns {boolean}
176 183
  */
177
-export function isStageFilmstripEnabled() {
184
+export function isStageFilmstripEnabled(_state: any) {
178 185
     return false;
179 186
 }
180 187
 
181 188
 /**
182 189
  * Whether or not the top panel is enabled.
183 190
  *
191
+ * @param {any} _state - Used on web.
184 192
  * @returns {boolean}
185 193
  */
186
-export function isTopPanelEnabled() {
194
+export function isTopPanelEnabled(_state: any) {
187 195
     return false;
188 196
 
189 197
 }
@@ -200,6 +208,17 @@ export function getFilmstripDimensions({
200 208
     clientHeight,
201 209
     insets = {},
202 210
     localParticipantVisible = true
211
+}: {
212
+    aspectRatio: Symbol;
213
+    clientHeight: number;
214
+    clientWidth: number;
215
+    insets: {
216
+        bottom?: number;
217
+        left?: number;
218
+        right?: number;
219
+        top?: number;
220
+    };
221
+    localParticipantVisible?: boolean;
203 222
 }) {
204 223
     const { height, width, margin } = styles.thumbnail;
205 224
     const conferenceBorder = conferenceStyles.conference.borderWidth || 0;
@@ -254,9 +273,10 @@ export function shouldDisplayLocalThumbnailSeparately() {
254 273
 /**
255 274
  * Not implemented on mobile.
256 275
  *
276
+ * @param {any} _state - Used on web.
257 277
  * @returns {undefined}
258 278
  */
259
-export function getScreenshareFilmstripParticipantId() {
279
+export function getScreenshareFilmstripParticipantId(_state: any) {
260 280
     return undefined;
261 281
 }
262 282
 

react/features/filmstrip/functions.web.js → react/features/filmstrip/functions.web.ts Ver arquivo

@@ -1,7 +1,7 @@
1
-// @flow
2
-
1
+import { IReduxState } from '../app/types';
2
+import { IStateful } from '../base/app/types';
3 3
 import { isMobileBrowser } from '../base/environment/utils';
4
-import { MEDIA_TYPE } from '../base/media';
4
+import { MEDIA_TYPE } from '../base/media/constants';
5 5
 import {
6 6
     getLocalParticipant,
7 7
     getParticipantById,
@@ -9,9 +9,9 @@ import {
9 9
     getParticipantCountWithFake,
10 10
     getPinnedParticipant,
11 11
     isScreenShareParticipant
12
-} from '../base/participants';
13
-import { toState } from '../base/redux';
14
-import { shouldHideSelfView } from '../base/settings/functions.any';
12
+} from '../base/participants/functions';
13
+import { toState } from '../base/redux/functions';
14
+import { shouldHideSelfView } from '../base/settings/functions.web';
15 15
 import {
16 16
     getVideoTrackByParticipant,
17 17
     isLocalTrackMuted,
@@ -19,11 +19,8 @@ import {
19 19
 } from '../base/tracks/functions';
20 20
 import { isTrackStreamingStatusActive } from '../connection-indicator/functions';
21 21
 import { isSharingStatus } from '../shared-video/functions';
22
-import {
23
-    LAYOUTS,
24
-    getCurrentLayout,
25
-    getNotResponsiveTileViewGridDimensions
26
-} from '../video-layout';
22
+import { LAYOUTS } from '../video-layout/constants';
23
+import { getCurrentLayout, getNotResponsiveTileViewGridDimensions } from '../video-layout/functions.web';
27 24
 
28 25
 import {
29 26
     ASPECT_RATIO_BREAKPOINT,
@@ -51,8 +48,6 @@ import {
51 48
 
52 49
 export * from './functions.any';
53 50
 
54
-declare var interfaceConfig: Object;
55
-
56 51
 /**
57 52
  * Returns true if the filmstrip on mobile is visible, false otherwise.
58 53
  *
@@ -60,11 +55,11 @@ declare var interfaceConfig: Object;
60 55
  * function lies here only for the sake of consistency and to avoid flow errors
61 56
  * on import.
62 57
  *
63
- * @param {Object | Function} stateful - The Object or Function that can be
58
+ * @param {IStateful} stateful - The Object or Function that can be
64 59
  * resolved to a Redux state object with the toState function.
65 60
  * @returns {boolean}
66 61
  */
67
-export function isFilmstripVisible(stateful: Object | Function) {
62
+export function isFilmstripVisible(stateful: IStateful) {
68 63
     return toState(stateful)['features/filmstrip'].visible;
69 64
 }
70 65
 
@@ -72,11 +67,11 @@ export function isFilmstripVisible(stateful: Object | Function) {
72 67
  * Determines whether the remote video thumbnails should be displayed/visible in
73 68
  * the filmstrip.
74 69
  *
75
- * @param {Object} state - The full redux state.
70
+ * @param {IReduxState} state - The full redux state.
76 71
  * @returns {boolean} - If remote video thumbnails should be displayed/visible
77 72
  * in the filmstrip, then {@code true}; otherwise, {@code false}.
78 73
  */
79
-export function shouldRemoteVideosBeVisible(state: Object) {
74
+export function shouldRemoteVideosBeVisible(state: IReduxState) {
80 75
     if (state['features/invite'].calleeInfoVisible) {
81 76
         return false;
82 77
     }
@@ -107,13 +102,13 @@ export function shouldRemoteVideosBeVisible(state: Object) {
107 102
 /**
108 103
  * Checks whether there is a playable video stream available for the user associated with the passed ID.
109 104
  *
110
- * @param {Object | Function} stateful - The Object or Function that can be
105
+ * @param {IStateful} stateful - The Object or Function that can be
111 106
  * resolved to a Redux state object with the toState function.
112 107
  * @param {string} id - The id of the participant.
113 108
  * @returns {boolean} <tt>true</tt> if there is a playable video stream available
114 109
  * or <tt>false</tt> otherwise.
115 110
  */
116
-export function isVideoPlayable(stateful: Object | Function, id: String) {
111
+export function isVideoPlayable(stateful: IStateful, id: string) {
117 112
     const state = toState(stateful);
118 113
     const tracks = state['features/base/tracks'];
119 114
     const participant = id ? getParticipantById(state, id) : getLocalParticipant(state);
@@ -142,7 +137,7 @@ export function isVideoPlayable(stateful: Object | Function, id: String) {
142 137
  * @param {number} clientHeight - The height of the app window.
143 138
  * @returns {{local: {height, width}, remote: {height, width}}}
144 139
  */
145
-export function calculateThumbnailSizeForHorizontalView(clientHeight: number = 0) {
140
+export function calculateThumbnailSizeForHorizontalView(clientHeight = 0) {
146 141
     const topBottomMargin = 15;
147 142
     const availableHeight = Math.min(clientHeight,
148 143
         (interfaceConfig.FILM_STRIP_MAX_HEIGHT || DEFAULT_FILMSTRIP_WIDTH) + topBottomMargin);
@@ -168,8 +163,7 @@ export function calculateThumbnailSizeForHorizontalView(clientHeight: number = 0
168 163
  * @param {boolean} isResizable - Whether the filmstrip is resizable or not.
169 164
  * @returns {{local: {height, width}, remote: {height, width}}}
170 165
  */
171
-export function calculateThumbnailSizeForVerticalView(clientWidth: number = 0,
172
-        filmstripWidth: number = 0, isResizable = false) {
166
+export function calculateThumbnailSizeForVerticalView(clientWidth = 0, filmstripWidth = 0, isResizable = false) {
173 167
     const availableWidth = Math.min(
174 168
         Math.max(clientWidth - VERTICAL_VIEW_HORIZONTAL_MARGIN, 0),
175 169
         (isResizable ? filmstripWidth : interfaceConfig.FILM_STRIP_MAX_HEIGHT) || DEFAULT_FILMSTRIP_WIDTH);
@@ -195,7 +189,7 @@ export function calculateThumbnailSizeForVerticalView(clientWidth: number = 0,
195 189
  * @param {number} clientWidth - The width of the window.
196 190
  * @returns {number} The minimum height of a thumbnail.
197 191
  */
198
-export function getThumbnailMinHeight(clientWidth) {
192
+export function getThumbnailMinHeight(clientWidth: number) {
199 193
     return clientWidth < ASPECT_RATIO_BREAKPOINT ? TILE_MIN_HEIGHT_SMALL : TILE_MIN_HEIGHT_LARGE;
200 194
 }
201 195
 
@@ -207,7 +201,8 @@ export function getThumbnailMinHeight(clientWidth) {
207 201
  * @param {number} clientWidth - The width of the window.
208 202
  * @returns {number} The default aspect ratio for a tile.
209 203
  */
210
-export function getTileDefaultAspectRatio(disableResponsiveTiles, disableTileEnlargement, clientWidth) {
204
+export function getTileDefaultAspectRatio(disableResponsiveTiles: boolean,
205
+        disableTileEnlargement: boolean, clientWidth: number) {
211 206
     if (!disableResponsiveTiles && disableTileEnlargement && clientWidth < ASPECT_RATIO_BREAKPOINT) {
212 207
         return SQUARE_TILE_ASPECT_RATIO;
213 208
     }
@@ -221,7 +216,7 @@ export function getTileDefaultAspectRatio(disableResponsiveTiles, disableTileEnl
221 216
  * @param {Object} state - The redux store state.
222 217
  * @returns {number} The number of participants that will be displayed in tile view.
223 218
  */
224
-export function getNumberOfPartipantsForTileView(state) {
219
+export function getNumberOfPartipantsForTileView(state: IReduxState) {
225 220
     const { iAmRecorder } = state['features/base/config'];
226 221
     const disableSelfView = shouldHideSelfView(state);
227 222
     const { localScreenShare } = state['features/base/participants'];
@@ -240,7 +235,7 @@ export function getNumberOfPartipantsForTileView(state) {
240 235
  * @param {Object} state - The redux store state.
241 236
  * @returns {Object} - The dimensions.
242 237
  */
243
-export function calculateNonResponsiveTileViewDimensions(state) {
238
+export function calculateNonResponsiveTileViewDimensions(state: IReduxState) {
244 239
     const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
245 240
     const { disableTileEnlargement } = state['features/base/config'];
246 241
     const { columns: c, minVisibleRows, rows: r } = getNotResponsiveTileViewGridDimensions(state);
@@ -292,16 +287,35 @@ export function calculateResponsiveTileViewDimensions({
292 287
     numberOfParticipants,
293 288
     desiredNumberOfVisibleTiles = TILE_VIEW_DEFAULT_NUMBER_OF_VISIBLE_TILES,
294 289
     minTileHeight
290
+}: {
291
+    clientHeight: number;
292
+    clientWidth: number;
293
+    desiredNumberOfVisibleTiles: number;
294
+    disableTileEnlargement?: boolean;
295
+    maxColumns: number;
296
+    minTileHeight?: number | null;
297
+    noHorizontalContainerMargin?: boolean;
298
+    numberOfParticipants: number;
295 299
 }) {
296 300
     let height, width;
297 301
     let columns, rows;
298
-    let dimensions = {
302
+
303
+    interface IDimensions {
304
+        columns?: number;
305
+        height?: number;
306
+        maxArea: number;
307
+        numberOfVisibleParticipants?: number;
308
+        rows?: number;
309
+        width?: number;
310
+    }
311
+
312
+    let dimensions: IDimensions = {
299 313
         maxArea: 0
300 314
     };
301
-    let minHeightEnforcedDimensions = {
315
+    let minHeightEnforcedDimensions: IDimensions = {
302 316
         maxArea: 0
303 317
     };
304
-    let zeroVisibleRowsDimensions = {
318
+    let zeroVisibleRowsDimensions: IDimensions = {
305 319
         maxArea: 0
306 320
     };
307 321
 
@@ -411,7 +425,16 @@ export function calculateThumbnailSizeForTileView({
411 425
     disableTileEnlargement = false,
412 426
     noHorizontalContainerMargin = false,
413 427
     minTileHeight
414
-}: Object) {
428
+}: {
429
+    clientHeight: number;
430
+    clientWidth: number;
431
+    columns: number;
432
+    disableResponsiveTiles: boolean;
433
+    disableTileEnlargement?: boolean;
434
+    minTileHeight?: number | null;
435
+    minVisibleRows: number;
436
+    noHorizontalContainerMargin?: boolean;
437
+}) {
415 438
     const aspectRatio = getTileDefaultAspectRatio(disableResponsiveTiles, disableTileEnlargement, clientWidth);
416 439
     const minHeight = minTileHeight || getThumbnailMinHeight(clientWidth);
417 440
     const viewWidth = clientWidth - (columns * TILE_HORIZONTAL_MARGIN)
@@ -501,7 +524,7 @@ export function getVerticalFilmstripVisibleAreaWidth() {
501 524
  * the thumbnail.
502 525
  * @returns {number} - One of <tt>DISPLAY_VIDEO</tt> or <tt>DISPLAY_AVATAR</tt>.
503 526
 */
504
-export function computeDisplayModeFromInput(input: Object) {
527
+export function computeDisplayModeFromInput(input: any) {
505 528
     const {
506 529
         filmstripType,
507 530
         isActiveParticipant,
@@ -550,7 +573,7 @@ export function computeDisplayModeFromInput(input: Object) {
550 573
  * @param {Object} state - The Thumbnail component's state.
551 574
  * @returns {Object}
552 575
 */
553
-export function getDisplayModeInput(props: Object, state: Object) {
576
+export function getDisplayModeInput(props: any, state: { canPlayEventReceived: boolean; }) {
554 577
     const {
555 578
         _currentLayout,
556 579
         _isActiveParticipant,
@@ -600,7 +623,7 @@ export function getIndicatorsTooltipPosition(thumbnailType: string) {
600 623
  * @param {Object} state - Redux state.
601 624
  * @returns {boolean}
602 625
  */
603
-export function isFilmstripResizable(state: Object) {
626
+export function isFilmstripResizable(state: IReduxState) {
604 627
     const { filmstrip } = state['features/base/config'];
605 628
     const _currentLayout = getCurrentLayout(state);
606 629
 
@@ -614,7 +637,7 @@ export function isFilmstripResizable(state: Object) {
614 637
  * @param {Object} state - Redux state.
615 638
  * @returns {boolean}
616 639
  */
617
-export function showGridInVerticalView(state) {
640
+export function showGridInVerticalView(state: IReduxState) {
618 641
     const resizableFilmstrip = isFilmstripResizable(state);
619 642
     const { width } = state['features/filmstrip'];
620 643
 
@@ -627,7 +650,7 @@ export function showGridInVerticalView(state) {
627 650
  * @param {Object} state - Redux state.
628 651
  * @returns {number}
629 652
  */
630
-export function getVerticalViewMaxWidth(state) {
653
+export function getVerticalViewMaxWidth(state: IReduxState) {
631 654
     const { width } = state['features/filmstrip'];
632 655
     const _resizableFilmstrip = isFilmstripResizable(state);
633 656
     const _verticalViewGrid = showGridInVerticalView(state);
@@ -649,13 +672,13 @@ export function getVerticalViewMaxWidth(state) {
649 672
  * @param {Object} state - The redux state.
650 673
  * @returns {boolean} - True if the scroll is displayed and false otherwise.
651 674
  */
652
-export function isFilmstripScrollVisible(state) {
675
+export function isFilmstripScrollVisible(state: IReduxState) {
653 676
     const _currentLayout = getCurrentLayout(state);
654 677
     let hasScroll = false;
655 678
 
656 679
     switch (_currentLayout) {
657 680
     case LAYOUTS.TILE_VIEW:
658
-        ({ hasScroll = false } = state['features/filmstrip'].tileViewDimensions);
681
+        ({ hasScroll = false } = state['features/filmstrip'].tileViewDimensions ?? {});
659 682
         break;
660 683
     case LAYOUTS.VERTICAL_FILMSTRIP_VIEW:
661 684
     case LAYOUTS.STAGE_FILMSTRIP_VIEW: {
@@ -677,7 +700,7 @@ export function isFilmstripScrollVisible(state) {
677 700
  * @param {Object} state - Redux state.
678 701
  * @returns {Array<string>}
679 702
  */
680
-export function getActiveParticipantsIds(state) {
703
+export function getActiveParticipantsIds(state: IReduxState) {
681 704
     const { activeParticipants } = state['features/filmstrip'];
682 705
 
683 706
     return activeParticipants.map(p => p.participantId);
@@ -689,7 +712,7 @@ export function getActiveParticipantsIds(state) {
689 712
  * @param {Object} state - Redux state.
690 713
  * @returns {Array<Object>}
691 714
  */
692
-export function getPinnedActiveParticipants(state) {
715
+export function getPinnedActiveParticipants(state: IReduxState) {
693 716
     const { activeParticipants } = state['features/filmstrip'];
694 717
 
695 718
     return activeParticipants.filter(p => p.pinned);
@@ -703,10 +726,10 @@ export function getPinnedActiveParticipants(state) {
703 726
  * to be displayed.
704 727
  * @returns {boolean}
705 728
  */
706
-export function isStageFilmstripAvailable(state, minParticipantCount = 0) {
729
+export function isStageFilmstripAvailable(state: IReduxState, minParticipantCount = 0) {
707 730
     const { activeParticipants } = state['features/filmstrip'];
708 731
     const { remoteScreenShares } = state['features/video-layout'];
709
-    const sharedVideo = isSharingStatus(state['features/shared-video']?.status);
732
+    const sharedVideo = isSharingStatus(state['features/shared-video']?.status ?? '');
710 733
 
711 734
     return isStageFilmstripEnabled(state) && !sharedVideo
712 735
         && activeParticipants.length >= minParticipantCount
@@ -721,7 +744,7 @@ export function isStageFilmstripAvailable(state, minParticipantCount = 0) {
721 744
  * to be displayed.
722 745
  * @returns {boolean}
723 746
  */
724
-export function isStageFilmstripTopPanel(state, minParticipantCount = 0) {
747
+export function isStageFilmstripTopPanel(state: IReduxState, minParticipantCount = 0) {
725 748
     const { remoteScreenShares } = state['features/video-layout'];
726 749
 
727 750
     return isTopPanelEnabled(state)
@@ -734,7 +757,7 @@ export function isStageFilmstripTopPanel(state, minParticipantCount = 0) {
734 757
  * @param {Object} state - Redux state.
735 758
  * @returns {boolean}
736 759
  */
737
-export function isStageFilmstripEnabled(state) {
760
+export function isStageFilmstripEnabled(state: IReduxState) {
738 761
     const { filmstrip } = state['features/base/config'];
739 762
 
740 763
     return !filmstrip?.disableStageFilmstrip && interfaceConfig.VERTICAL_FILMSTRIP;
@@ -747,7 +770,7 @@ export function isStageFilmstripEnabled(state) {
747 770
  * @param {string} filmstripType - The current filmstrip type.
748 771
  * @returns {string}
749 772
  */
750
-export function getThumbnailTypeFromLayout(currentLayout, filmstripType) {
773
+export function getThumbnailTypeFromLayout(currentLayout: string, filmstripType: string) {
751 774
     switch (currentLayout) {
752 775
     case LAYOUTS.TILE_VIEW:
753 776
         return THUMBNAIL_TYPE.TILE;
@@ -770,7 +793,7 @@ export function getThumbnailTypeFromLayout(currentLayout, filmstripType) {
770 793
  * @param {Object} state - Redux state.
771 794
  * @returns {string} - The participant id.
772 795
  */
773
-export function getScreenshareFilmstripParticipantId(state) {
796
+export function getScreenshareFilmstripParticipantId(state: IReduxState) {
774 797
     const { screenshareFilmstripParticipantId } = state['features/filmstrip'];
775 798
     const screenshares = state['features/video-layout'].remoteScreenShares;
776 799
     let id = screenshares.find(sId => sId === screenshareFilmstripParticipantId);
@@ -788,7 +811,7 @@ export function getScreenshareFilmstripParticipantId(state) {
788 811
  * @param {Object} state - Redux state.
789 812
  * @returns {boolean}
790 813
  */
791
-export function isTopPanelEnabled(state) {
814
+export function isTopPanelEnabled(state: IReduxState) {
792 815
     const { filmstrip } = state['features/base/config'];
793 816
     const participantsCount = getParticipantCount(state);
794 817
 

react/features/filmstrip/logger.js → react/features/filmstrip/logger.ts Ver arquivo

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { getLogger } from '../base/logging/functions';
4 2
 
5 3
 export default getLogger('features/filmstrip');

react/features/filmstrip/middleware.native.js → react/features/filmstrip/middleware.native.ts Ver arquivo

@@ -1,12 +1,10 @@
1
-// @flow
1
+import { PARTICIPANT_JOINED, PARTICIPANT_LEFT } from '../base/participants/actionTypes';
2
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
3
+import { CLIENT_RESIZED, SAFE_AREA_INSETS_CHANGED, SET_ASPECT_RATIO } from '../base/responsive-ui/actionTypes';
2 4
 
3
-import { PARTICIPANT_JOINED, PARTICIPANT_LEFT } from '../base/participants';
4
-import { MiddlewareRegistry } from '../base/redux';
5
-import { CLIENT_RESIZED, SAFE_AREA_INSETS_CHANGED, SET_ASPECT_RATIO } from '../base/responsive-ui';
6
-
7
-import { setTileViewDimensions } from './actions';
8
-import { updateRemoteParticipants, updateRemoteParticipantsOnLeave } from './functions';
9
-import './subscriber';
5
+import { setTileViewDimensions } from './actions.native';
6
+import { updateRemoteParticipants, updateRemoteParticipantsOnLeave } from './functions.native';
7
+import './subscriber.native';
10 8
 
11 9
 /**
12 10
  * The middleware of the feature Filmstrip.

react/features/filmstrip/middleware.web.js → react/features/filmstrip/middleware.web.ts Ver arquivo

@@ -1,25 +1,24 @@
1
-// @flow
2
-
3 1
 import { batch } from 'react-redux';
4 2
 
3
+// @ts-expect-error
5 4
 import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
6 5
 import {
7 6
     DOMINANT_SPEAKER_CHANGED,
8 7
     PARTICIPANT_JOINED,
9
-    PARTICIPANT_LEFT,
8
+    PARTICIPANT_LEFT
9
+} from '../base/participants/actionTypes';
10
+import {
10 11
     getDominantSpeakerParticipant,
11 12
     getLocalParticipant,
12 13
     getLocalScreenShareParticipant,
13 14
     isScreenShareParticipant
14
-} from '../base/participants';
15
-import { MiddlewareRegistry } from '../base/redux';
16
-import { CLIENT_RESIZED } from '../base/responsive-ui';
17
-import { SETTINGS_UPDATED } from '../base/settings';
18
-import {
19
-    LAYOUTS,
20
-    getCurrentLayout,
21
-    setTileView
22
-} from '../video-layout';
15
+} from '../base/participants/functions';
16
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
17
+import { CLIENT_RESIZED } from '../base/responsive-ui/actionTypes';
18
+import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
19
+import { setTileView } from '../video-layout/actions.web';
20
+import { LAYOUTS } from '../video-layout/constants';
21
+import { getCurrentLayout } from '../video-layout/functions.web';
23 22
 
24 23
 import {
25 24
     ADD_STAGE_PARTICIPANT,
@@ -54,7 +53,7 @@ import {
54 53
     updateRemoteParticipants,
55 54
     updateRemoteParticipantsOnLeave
56 55
 } from './functions.web';
57
-import './subscriber';
56
+import './subscriber.web';
58 57
 
59 58
 /**
60 59
  * Map of timers.
@@ -87,19 +86,19 @@ MiddlewareRegistry.register(store => next => action => {
87 86
             const { clientWidth, clientHeight } = action;
88 87
             let height, width;
89 88
 
90
-            if (filmstripWidth.current > clientWidth - MIN_STAGE_VIEW_WIDTH) {
89
+            if ((filmstripWidth.current ?? 0) > clientWidth - MIN_STAGE_VIEW_WIDTH) {
91 90
                 width = Math.max(clientWidth - MIN_STAGE_VIEW_WIDTH, DEFAULT_FILMSTRIP_WIDTH);
92 91
             } else {
93
-                width = Math.min(clientWidth - MIN_STAGE_VIEW_WIDTH, filmstripWidth.userSet);
92
+                width = Math.min(clientWidth - MIN_STAGE_VIEW_WIDTH, filmstripWidth.userSet ?? 0);
94 93
             }
95 94
             if (width !== filmstripWidth.current) {
96 95
                 store.dispatch(setFilmstripWidth(width));
97 96
             }
98 97
 
99
-            if (topPanelHeight.current > clientHeight - MIN_STAGE_VIEW_HEIGHT) {
98
+            if ((topPanelHeight.current ?? 0) > clientHeight - MIN_STAGE_VIEW_HEIGHT) {
100 99
                 height = Math.max(clientHeight - MIN_STAGE_VIEW_HEIGHT, TOP_FILMSTRIP_HEIGHT);
101 100
             } else {
102
-                height = Math.min(clientHeight - MIN_STAGE_VIEW_HEIGHT, topPanelHeight.userSet);
101
+                height = Math.min(clientHeight - MIN_STAGE_VIEW_HEIGHT, topPanelHeight.userSet ?? 0);
103 102
             }
104 103
             if (height !== topPanelHeight.current) {
105 104
                 store.dispatch(setFilmstripHeight(height));
@@ -127,8 +126,8 @@ MiddlewareRegistry.register(store => next => action => {
127 126
             const localScreenShare = getLocalScreenShareParticipant(state);
128 127
             const activeParticipantsIds = getActiveParticipantsIds(state);
129 128
 
130
-            if (activeParticipantsIds.find(id => id === local.id)) {
131
-                store.dispatch(removeStageParticipant(local.id));
129
+            if (activeParticipantsIds.find(id => id === local?.id)) {
130
+                store.dispatch(removeStageParticipant(local?.id ?? ''));
132 131
             }
133 132
 
134 133
             if (localScreenShare) {
@@ -181,7 +180,7 @@ MiddlewareRegistry.register(store => next => action => {
181 180
 
182 181
             clearTimeout(tid);
183 182
             timers.delete(participantId);
184
-        } else if (activeParticipants.length < maxStageParticipants) {
183
+        } else if (activeParticipants.length < (maxStageParticipants ?? 0)) {
185 184
             queue = [ ...activeParticipants, {
186 185
                 participantId,
187 186
                 pinned
@@ -252,7 +251,7 @@ MiddlewareRegistry.register(store => next => action => {
252 251
         const currentLayout = getCurrentLayout(state);
253 252
         const dominantSpeaker = getDominantSpeakerParticipant(state);
254 253
 
255
-        if (dominantSpeaker?.id === id || id === local.id || currentLayout === LAYOUTS.TILE_VIEW) {
254
+        if (dominantSpeaker?.id === id || id === local?.id || currentLayout === LAYOUTS.TILE_VIEW) {
256 255
             break;
257 256
         }
258 257
 

react/features/filmstrip/subscriber.any.js → react/features/filmstrip/subscriber.any.ts Ver arquivo

@@ -1,6 +1,4 @@
1
-// @flow
2
-
3
-import { StateListenerRegistry } from '../base/redux';
1
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
4 2
 
5 3
 import { isFilmstripScrollVisible, updateRemoteParticipants } from './functions';
6 4
 

react/features/filmstrip/subscriber.native.js → react/features/filmstrip/subscriber.native.ts Ver arquivo

@@ -1,10 +1,8 @@
1
-// @flow
2
-
3 1
 import { getCurrentConference } from '../base/conference/functions';
4
-import { StateListenerRegistry } from '../base/redux';
5
-import { shouldDisplayTileView } from '../video-layout';
2
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
3
+import { shouldDisplayTileView } from '../video-layout/functions.native';
6 4
 
7
-import { setRemoteParticipants, setTileViewDimensions } from './actions';
5
+import { setRemoteParticipants, setTileViewDimensions } from './actions.native';
8 6
 import { getTileViewParticipantCount } from './functions.native';
9 7
 import './subscriber.any';
10 8
 

react/features/filmstrip/subscriber.web.js → react/features/filmstrip/subscriber.web.ts Ver arquivo

@@ -1,18 +1,19 @@
1
-// @flow
2
-
3 1
 import { isMobileBrowser } from '../base/environment/utils';
4
-import { getParticipantCountWithFake, pinParticipant } from '../base/participants';
5
-import { StateListenerRegistry } from '../base/redux';
6
-import { clientResized } from '../base/responsive-ui';
7
-import { shouldHideSelfView } from '../base/settings';
8
-import { setFilmstripVisible } from '../filmstrip/actions';
2
+import { pinParticipant } from '../base/participants/actions';
3
+import { getParticipantCountWithFake } from '../base/participants/functions';
4
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
5
+import { clientResized } from '../base/responsive-ui/actions';
6
+import { shouldHideSelfView } from '../base/settings/functions.web';
7
+// eslint-disable-next-line lines-around-comment
8
+// @ts-ignore
9 9
 import { selectParticipantInLargeVideo } from '../large-video/actions.any';
10 10
 import { getParticipantsPaneOpen } from '../participants-pane/functions';
11 11
 import { setOverflowDrawer } from '../toolbox/actions.web';
12
-import { LAYOUTS, getCurrentLayout, shouldDisplayTileView } from '../video-layout';
12
+import { LAYOUTS } from '../video-layout/constants';
13
+import { getCurrentLayout, shouldDisplayTileView } from '../video-layout/functions.web';
13 14
 
14
-import {
15
-    clearStageParticipants,
15
+import { clearStageParticipants,
16
+    setFilmstripVisible,
16 17
     setHorizontalViewDimensions,
17 18
     setScreenshareFilmstripParticipant,
18 19
     setScreensharingTileDimensions,

+ 1
- 1
react/features/follow-me/subscriber.ts Ver arquivo

@@ -7,7 +7,7 @@ import {
7 7
 import StateListenerRegistry from '../base/redux/StateListenerRegistry';
8 8
 // eslint-disable-next-line lines-around-comment
9 9
 // @ts-ignore
10
-import { getPinnedActiveParticipants, isStageFilmstripEnabled } from '../filmstrip/functions.web';
10
+import { getPinnedActiveParticipants, isStageFilmstripEnabled } from '../filmstrip/functions';
11 11
 import { shouldDisplayTileView } from '../video-layout/functions';
12 12
 
13 13
 import { FOLLOW_ME_COMMAND } from './constants';

+ 1
- 0
react/features/notifications/types.ts Ver arquivo

@@ -8,6 +8,7 @@ export interface INotificationProps {
8 8
     description?: string | React.ReactNode;
9 9
     descriptionArguments?: Object;
10 10
     descriptionKey?: string;
11
+    hideErrorSupportLink?: boolean;
11 12
     icon?: string;
12 13
     maxLines?: number;
13 14
     sticky?: boolean;

react/features/overlay/functions.js → react/features/overlay/functions.ts Ver arquivo

@@ -1,17 +1,18 @@
1
-// @flow
1
+import { IReduxState } from '../app/types';
2 2
 
3 3
 import { getOverlays } from './overlays';
4 4
 
5 5
 /**
6 6
  * Returns the overlay to be currently rendered.
7 7
  *
8
- * @param {Object} state - The Redux state.
8
+ * @param {IReduxState} state - The Redux state.
9 9
  * @returns {?React$ComponentType<*>}
10 10
  */
11
-export function getOverlayToRender(state: Object) {
11
+export function getOverlayToRender(state: IReduxState) {
12 12
     for (const overlay of getOverlays()) {
13 13
         // react-i18n / react-redux wrap components and thus we cannot access
14 14
         // the wrapped component's static methods directly.
15
+        // @ts-ignore
15 16
         const component = overlay.WrappedComponent || overlay;
16 17
 
17 18
         if (component.needsRender(state)) {
@@ -25,9 +26,9 @@ export function getOverlayToRender(state: Object) {
25 26
 /**
26 27
  * Returns the visibility of the media permissions prompt.
27 28
  *
28
- * @param {Object} state - The Redux state.
29
+ * @param {IReduxState} state - The Redux state.
29 30
  * @returns {boolean}
30 31
  */
31
-export function getMediaPermissionPromptVisibility(state: Object) {
32
+export function getMediaPermissionPromptVisibility(state: IReduxState) {
32 33
     return state['features/overlay'].isMediaPermissionPromptVisible;
33 34
 }

react/features/overlay/logger.js → react/features/overlay/logger.ts Ver arquivo

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { getLogger } from '../base/logging/functions';
4 2
 
5 3
 export default getLogger('features/overlay');

react/features/overlay/middleware.js → react/features/overlay/middleware.ts Ver arquivo

@@ -1,36 +1,33 @@
1
-// @flow
2
-
1
+import { IStore } from '../app/types';
3 2
 import { JitsiConferenceErrors } from '../base/lib-jitsi-meet';
4 3
 import {
5 4
     isFatalJitsiConferenceError,
6 5
     isFatalJitsiConnectionError
7 6
 } from '../base/lib-jitsi-meet/functions';
8
-import { StateListenerRegistry } from '../base/redux';
7
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
9 8
 
10 9
 import { setFatalError } from './actions';
11 10
 
12
-declare var APP: Object;
13
-
14 11
 /**
15 12
  * Error type. Basically like Error, but augmented with a recoverable property.
16 13
  */
17
-type ErrorType = {|
14
+type ErrorType = {
18 15
 
19 16
     /**
20 17
      * Error message.
21 18
      */
22
-    message?: string,
19
+    message?: string;
23 20
 
24 21
     /**
25 22
      * Error name.
26 23
      */
27
-    name: string,
24
+    name: string;
28 25
 
29 26
     /**
30 27
      * Indicates whether this event is recoverable or not.
31 28
      */
32
-    recoverable?: boolean
33
-|};
29
+    recoverable?: boolean;
30
+};
34 31
 
35 32
 /**
36 33
  * List of errors that are not fatal (or handled differently) so then the overlays won't kick in.
@@ -54,7 +51,7 @@ const ERROR_TYPES = {
54 51
  * @param {Object|string} error - The error to process.
55 52
  * @returns {void}
56 53
  */
57
-const getErrorExtraInfo = (getState, error) => {
54
+const getErrorExtraInfo = (getState: IStore['getState'], error: ErrorType) => {
58 55
     const state = getState();
59 56
     const { error: conferenceError } = state['features/base/conference'];
60 57
     const { error: configError } = state['features/base/config'];
@@ -62,7 +59,7 @@ const getErrorExtraInfo = (getState, error) => {
62 59
 
63 60
     if (error === conferenceError) {
64 61
         return {
65
-            type: ERROR_TYPES.CONFERENCE,
62
+            type: ERROR_TYPES.CONFERENCE, // @ts-ignore
66 63
             isFatal: isFatalJitsiConferenceError(error.name || error)
67 64
         };
68 65
     }
@@ -76,7 +73,7 @@ const getErrorExtraInfo = (getState, error) => {
76 73
 
77 74
     if (error === connectionError) {
78 75
         return {
79
-            type: ERROR_TYPES.CONNECTION,
76
+            type: ERROR_TYPES.CONNECTION, // @ts-ignore
80 77
             isFatal: isFatalJitsiConnectionError(error.name || error)
81 78
         };
82 79
     }

+ 0
- 16
react/features/overlay/overlays.native.js Ver arquivo

@@ -1,16 +0,0 @@
1
-// @flow
2
-
3
-import {
4
-    PageReloadOverlay
5
-} from './components/native';
6
-
7
-/**
8
- * Returns the list of available platform specific overlays.
9
- *
10
- * @returns {Array<React$Element>}
11
- */
12
-export function getOverlays(): Array<React$Element<*>> {
13
-    return [
14
-        PageReloadOverlay
15
-    ];
16
-}

+ 15
- 0
react/features/overlay/overlays.native.ts Ver arquivo

@@ -0,0 +1,15 @@
1
+import { ReactElement } from 'react';
2
+
3
+// @ts-ignore
4
+import { PageReloadOverlay } from './components/native';
5
+
6
+/**
7
+ * Returns the list of available platform specific overlays.
8
+ *
9
+ * @returns {Array<ReactElement>}
10
+ */
11
+export function getOverlays(): Array<ReactElement> {
12
+    return [
13
+        PageReloadOverlay
14
+    ];
15
+}

react/features/overlay/overlays.web.js → react/features/overlay/overlays.web.ts Ver arquivo

@@ -1,9 +1,9 @@
1
-// @flow
2
-
3 1
 import {
4 2
     PageReloadOverlay,
5 3
     SuspendedOverlay,
6 4
     UserMediaPermissionsOverlay
5
+
6
+    // @ts-ignore
7 7
 } from './components/web';
8 8
 
9 9
 /**

+ 1
- 1
react/features/prejoin/functions.ts Ver arquivo

@@ -1,6 +1,6 @@
1 1
 import { IReduxState } from '../app/types';
2 2
 import { getRoomName } from '../base/conference/functions';
3
-import { getDialOutStatusUrl, getDialOutUrl } from '../base/config/functions.web';
3
+import { getDialOutStatusUrl, getDialOutUrl } from '../base/config/functions';
4 4
 import { isAudioMuted, isVideoMutedByUser } from '../base/media/functions';
5 5
 
6 6
 /**

+ 13
- 1
react/features/reactions/actions.any.ts Ver arquivo

@@ -4,7 +4,8 @@ import {
4 4
     FLUSH_REACTION_BUFFER,
5 5
     PUSH_REACTIONS,
6 6
     SEND_REACTIONS,
7
-    SET_REACTION_QUEUE
7
+    SET_REACTION_QUEUE,
8
+    SHOW_SOUNDS_NOTIFICATION
8 9
 } from './actionTypes';
9 10
 import { IReactionEmojiProps } from './constants';
10 11
 import { IReactionsAction } from './reducer';
@@ -98,3 +99,14 @@ export function pushReactions(reactions: Array<string>): IReactionsAction {
98 99
         reactions
99 100
     };
100 101
 }
102
+
103
+/**
104
+ * Displays the disable sounds notification.
105
+ *
106
+ * @returns {void}
107
+ */
108
+export function displayReactionSoundsNotification(): IReactionsAction {
109
+    return {
110
+        type: SHOW_SOUNDS_NOTIFICATION
111
+    };
112
+}

+ 1
- 0
react/features/reactions/actions.native.ts Ver arquivo

@@ -0,0 +1 @@
1
+export * from './actions.any';

+ 2
- 12
react/features/reactions/actions.web.ts Ver arquivo

@@ -1,9 +1,10 @@
1 1
 import {
2
-    SHOW_SOUNDS_NOTIFICATION,
3 2
     TOGGLE_REACTIONS_VISIBLE
4 3
 } from './actionTypes';
5 4
 import { IReactionsAction } from './reducer';
6 5
 
6
+export * from './actions.any';
7
+
7 8
 /**
8 9
  * Toggles the visibility of the reactions menu.
9 10
  *
@@ -14,14 +15,3 @@ export function toggleReactionsMenuVisibility(): IReactionsAction {
14 15
         type: TOGGLE_REACTIONS_VISIBLE
15 16
     };
16 17
 }
17
-
18
-/**
19
- * Displays the disable sounds notification.
20
- *
21
- * @returns {void}
22
- */
23
-export function displayReactionSoundsNotification(): IReactionsAction {
24
-    return {
25
-        type: SHOW_SOUNDS_NOTIFICATION
26
-    };
27
-}

+ 2
- 2
react/features/reactions/middleware.ts Ver arquivo

@@ -28,12 +28,12 @@ import {
28 28
 } from './actionTypes';
29 29
 import {
30 30
     addReactionsToChat,
31
+    displayReactionSoundsNotification,
31 32
     flushReactionBuffer,
32 33
     pushReactions,
33 34
     sendReactions,
34 35
     setReactionQueue
35
-} from './actions.any';
36
-import { displayReactionSoundsNotification } from './actions.web';
36
+} from './actions';
37 37
 import {
38 38
     ENDPOINT_REACTION_NAME,
39 39
     IMuteCommandAttributes,

+ 2
- 2
react/features/screen-share/actions.web.ts Ver arquivo

@@ -1,8 +1,8 @@
1 1
 import { IStore } from '../app/types';
2 2
 import { openDialog } from '../base/dialog/actions';
3 3
 import { browser } from '../base/lib-jitsi-meet';
4
-import { shouldHideShareAudioHelper } from '../base/settings/functions';
5
-import { toggleScreensharing } from '../base/tracks/actions';
4
+import { shouldHideShareAudioHelper } from '../base/settings/functions.web';
5
+import { toggleScreensharing } from '../base/tracks/actions.web';
6 6
 
7 7
 import {
8 8
     SET_SCREENSHARE_TRACKS,

+ 2
- 2
react/features/screen-share/components/web/ShareAudioDialog.tsx Ver arquivo

@@ -5,8 +5,8 @@ import { IReduxState, IStore } from '../../../app/types';
5 5
 import { translate } from '../../../base/i18n/functions';
6 6
 import { connect } from '../../../base/redux/functions';
7 7
 import { updateSettings } from '../../../base/settings/actions';
8
-import { shouldHideShareAudioHelper } from '../../../base/settings/functions.any';
9
-import { toggleScreensharing } from '../../../base/tracks/actions';
8
+import { shouldHideShareAudioHelper } from '../../../base/settings/functions.web';
9
+import { toggleScreensharing } from '../../../base/tracks/actions.web';
10 10
 import Checkbox from '../../../base/ui/components/web/Checkbox';
11 11
 import Dialog from '../../../base/ui/components/web/Dialog';
12 12
 

+ 1
- 1
react/features/settings/middleware.web.ts Ver arquivo

@@ -1,6 +1,6 @@
1 1
 import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
2 2
 import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
3
-import { getHideSelfView } from '../base/settings/functions';
3
+import { getHideSelfView } from '../base/settings/functions.web';
4 4
 import { showNotification } from '../notifications/actions';
5 5
 import { DISABLE_SELF_VIEW_NOTIFICATION_ID, NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
6 6
 

+ 1
- 1
react/features/toolbox/actions.any.ts Ver arquivo

@@ -22,7 +22,7 @@ import {
22 22
  *     enabled: boolean
23 23
  * }}
24 24
  */
25
-export function setToolboxEnabled(enabled: boolean): Object {
25
+export function setToolboxEnabled(enabled: boolean) {
26 26
     return {
27 27
         type: SET_TOOLBOX_ENABLED,
28 28
         enabled

+ 1
- 1
react/features/video-layout/functions.web.ts Ver arquivo

@@ -26,7 +26,7 @@ export * from './functions.any';
26 26
  * @returns {number}
27 27
  */
28 28
 export function getMaxColumnCount(state: IReduxState, options: {
29
-    disableResponsiveTiles?: boolean; disableTileEnlargement?: boolean; width?: number; } = {}) {
29
+    disableResponsiveTiles?: boolean; disableTileEnlargement?: boolean; width?: number | null; } = {}) {
30 30
     if (typeof interfaceConfig === 'undefined') {
31 31
         return DEFAULT_MAX_COLUMNS;
32 32
     }

+ 2
- 2
react/features/video-layout/subscriber.ts Ver arquivo

@@ -2,8 +2,8 @@ import StateListenerRegistry from '../base/redux/StateListenerRegistry';
2 2
 import { equals } from '../base/redux/functions';
3 3
 import { isFollowMeActive } from '../follow-me/functions';
4 4
 
5
-import { virtualScreenshareParticipantsUpdated } from './actions.web';
6
-import { getAutoPinSetting, updateAutoPinnedParticipant } from './functions.web';
5
+import { virtualScreenshareParticipantsUpdated } from './actions';
6
+import { getAutoPinSetting, updateAutoPinnedParticipant } from './functions';
7 7
 
8 8
 StateListenerRegistry.register(
9 9
     /* selector */ state => state['features/base/participants'].sortedRemoteVirtualScreenshareParticipants,

+ 2
- 1
react/features/video-quality/subscriber.ts Ver arquivo

@@ -16,12 +16,13 @@ import {
16 16
 } from '../filmstrip/functions';
17 17
 import { LAYOUTS } from '../video-layout/constants';
18 18
 import {
19
+    getCurrentLayout,
19 20
     getVideoQualityForLargeVideo,
20 21
     getVideoQualityForResizableFilmstripThumbnails,
22
+    getVideoQualityForScreenSharingFilmstrip,
21 23
     getVideoQualityForStageThumbnails,
22 24
     shouldDisplayTileView
23 25
 } from '../video-layout/functions';
24
-import { getCurrentLayout, getVideoQualityForScreenSharingFilmstrip } from '../video-layout/functions.any';
25 26
 
26 27
 import {
27 28
     setMaxReceiverVideoQualityForLargeVideo,

Carregando…
Cancelar
Salvar