浏览代码

feat(deps) replace lodash with lodash-es

The latter supports tree-shaking and we don't need to embed the whole
500KB of lodash.
factor2
Saúl Ibarra Corretgé 1年前
父节点
当前提交
b35200648c
共有 34 个文件被更改,包括 121 次插入104 次删除
  1. 34
    4
      package-lock.json
  2. 2
    2
      package.json
  3. 2
    2
      react/features/base/app/components/BaseApp.tsx
  4. 2
    2
      react/features/base/avatar/functions.ts
  5. 3
    3
      react/features/base/conference/functions.ts
  6. 6
    8
      react/features/base/config/functions.any.ts
  7. 4
    4
      react/features/base/config/reducer.ts
  8. 2
    2
      react/features/base/connection/actions.any.ts
  9. 3
    3
      react/features/base/flags/reducer.ts
  10. 2
    2
      react/features/base/i18n/i18next.ts
  11. 2
    2
      react/features/base/logging/functions.ts
  12. 2
    2
      react/features/base/logging/reducer.ts
  13. 3
    3
      react/features/base/participants/subscriber.ts
  14. 2
    2
      react/features/base/redux/functions.ts
  15. 2
    5
      react/features/base/redux/middleware.ts
  16. 3
    3
      react/features/base/settings/middleware.any.ts
  17. 3
    3
      react/features/base/settings/reducer.ts
  18. 2
    2
      react/features/base/tracks/subscriber.ts
  19. 2
    2
      react/features/base/util/isInsecureRoomName.ts
  20. 3
    3
      react/features/breakout-rooms/actions.ts
  21. 3
    3
      react/features/breakout-rooms/functions.ts
  22. 3
    3
      react/features/conference/components/web/Conference.tsx
  23. 2
    2
      react/features/connection-indicator/statsEmitter.ts
  24. 2
    2
      react/features/filmstrip/components/web/Filmstrip.tsx
  25. 4
    4
      react/features/follow-me/middleware.ts
  26. 7
    7
      react/features/invite/components/add-people-dialog/native/AddPeopleDialog.tsx
  27. 2
    2
      react/features/mobile/audio-mode/components/AudioRoutePickerDialog.tsx
  28. 2
    2
      react/features/recording/components/LiveStream/AbstractStreamKeyForm.ts
  29. 3
    3
      react/features/speaker-stats/functions.ts
  30. 3
    11
      react/features/speaker-stats/reducer.ts
  31. 2
    2
      react/features/toolbox/components/HangupButton.ts
  32. 1
    1
      react/features/toolbox/subscriber.web.ts
  33. 2
    2
      react/features/video-menu/components/native/VolumeSlider.tsx
  34. 1
    1
      react/features/visitors/components/web/JoinMeetingDialog.tsx

+ 34
- 4
package-lock.json 查看文件

62
         "js-sha512": "0.8.0",
62
         "js-sha512": "0.8.0",
63
         "jwt-decode": "2.2.0",
63
         "jwt-decode": "2.2.0",
64
         "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1847.0.0+03eef6de/lib-jitsi-meet.tgz",
64
         "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1847.0.0+03eef6de/lib-jitsi-meet.tgz",
65
-        "lodash": "4.17.21",
65
+        "lodash-es": "4.17.21",
66
         "moment": "2.29.4",
66
         "moment": "2.29.4",
67
         "moment-duration-format": "2.2.2",
67
         "moment-duration-format": "2.2.2",
68
         "null-loader": "4.0.1",
68
         "null-loader": "4.0.1",
132
         "@types/audioworklet": "0.0.29",
132
         "@types/audioworklet": "0.0.29",
133
         "@types/dom-screen-wake-lock": "1.0.1",
133
         "@types/dom-screen-wake-lock": "1.0.1",
134
         "@types/js-md5": "0.4.3",
134
         "@types/js-md5": "0.4.3",
135
-        "@types/lodash": "4.14.182",
135
+        "@types/lodash-es": "4.17.12",
136
         "@types/moment-duration-format": "2.2.6",
136
         "@types/moment-duration-format": "2.2.6",
137
         "@types/offscreencanvas": "2019.7.2",
137
         "@types/offscreencanvas": "2019.7.2",
138
         "@types/pixelmatch": "5.2.5",
138
         "@types/pixelmatch": "5.2.5",
6254
       "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==",
6254
       "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==",
6255
       "dev": true
6255
       "dev": true
6256
     },
6256
     },
6257
+    "node_modules/@types/lodash-es": {
6258
+      "version": "4.17.12",
6259
+      "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
6260
+      "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
6261
+      "dev": true,
6262
+      "dependencies": {
6263
+        "@types/lodash": "*"
6264
+      }
6265
+    },
6257
     "node_modules/@types/long": {
6266
     "node_modules/@types/long": {
6258
       "version": "4.0.1",
6267
       "version": "4.0.1",
6259
       "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
6268
       "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
12824
     "node_modules/lodash": {
12833
     "node_modules/lodash": {
12825
       "version": "4.17.21",
12834
       "version": "4.17.21",
12826
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
12835
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
12827
-      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
12836
+      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
12837
+      "dev": true
12838
+    },
12839
+    "node_modules/lodash-es": {
12840
+      "version": "4.17.21",
12841
+      "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
12842
+      "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
12828
     },
12843
     },
12829
     "node_modules/lodash.clonedeep": {
12844
     "node_modules/lodash.clonedeep": {
12830
       "version": "4.5.0",
12845
       "version": "4.5.0",
23404
       "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==",
23419
       "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==",
23405
       "dev": true
23420
       "dev": true
23406
     },
23421
     },
23422
+    "@types/lodash-es": {
23423
+      "version": "4.17.12",
23424
+      "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
23425
+      "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
23426
+      "dev": true,
23427
+      "requires": {
23428
+        "@types/lodash": "*"
23429
+      }
23430
+    },
23407
     "@types/long": {
23431
     "@types/long": {
23408
       "version": "4.0.1",
23432
       "version": "4.0.1",
23409
       "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
23433
       "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
28254
     "lodash": {
28278
     "lodash": {
28255
       "version": "4.17.21",
28279
       "version": "4.17.21",
28256
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
28280
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
28257
-      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
28281
+      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
28282
+      "dev": true
28283
+    },
28284
+    "lodash-es": {
28285
+      "version": "4.17.21",
28286
+      "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
28287
+      "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
28258
     },
28288
     },
28259
     "lodash.clonedeep": {
28289
     "lodash.clonedeep": {
28260
       "version": "4.5.0",
28290
       "version": "4.5.0",

+ 2
- 2
package.json 查看文件

68
     "js-sha512": "0.8.0",
68
     "js-sha512": "0.8.0",
69
     "jwt-decode": "2.2.0",
69
     "jwt-decode": "2.2.0",
70
     "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1847.0.0+03eef6de/lib-jitsi-meet.tgz",
70
     "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1847.0.0+03eef6de/lib-jitsi-meet.tgz",
71
-    "lodash": "4.17.21",
71
+    "lodash-es": "4.17.21",
72
     "moment": "2.29.4",
72
     "moment": "2.29.4",
73
     "moment-duration-format": "2.2.2",
73
     "moment-duration-format": "2.2.2",
74
     "null-loader": "4.0.1",
74
     "null-loader": "4.0.1",
138
     "@types/audioworklet": "0.0.29",
138
     "@types/audioworklet": "0.0.29",
139
     "@types/dom-screen-wake-lock": "1.0.1",
139
     "@types/dom-screen-wake-lock": "1.0.1",
140
     "@types/js-md5": "0.4.3",
140
     "@types/js-md5": "0.4.3",
141
-    "@types/lodash": "4.14.182",
141
+    "@types/lodash-es": "4.17.12",
142
     "@types/moment-duration-format": "2.2.6",
142
     "@types/moment-duration-format": "2.2.6",
143
     "@types/offscreencanvas": "2019.7.2",
143
     "@types/offscreencanvas": "2019.7.2",
144
     "@types/pixelmatch": "5.2.5",
144
     "@types/pixelmatch": "5.2.5",

+ 2
- 2
react/features/base/app/components/BaseApp.tsx 查看文件

1
 // @ts-expect-error
1
 // @ts-expect-error
2
 import { jitsiLocalStorage } from '@jitsi/js-utils';
2
 import { jitsiLocalStorage } from '@jitsi/js-utils';
3
-import _ from 'lodash';
3
+import { isEqual } from 'lodash-es';
4
 import React, { Component, ComponentType, Fragment } from 'react';
4
 import React, { Component, ComponentType, Fragment } from 'react';
5
 import { I18nextProvider } from 'react-i18next';
5
 import { I18nextProvider } from 'react-i18next';
6
 import { Provider } from 'react-redux';
6
 import { Provider } from 'react-redux';
254
         href?: string;
254
         href?: string;
255
         props?: Object;
255
         props?: Object;
256
     }): Promise<any> {
256
     }): Promise<any> {
257
-        if (_.isEqual(route, this.state.route)) {
257
+        if (isEqual(route, this.state.route)) {
258
             return Promise.resolve();
258
             return Promise.resolve();
259
         }
259
         }
260
 
260
 

+ 2
- 2
react/features/base/avatar/functions.ts 查看文件

1
 import GraphemeSplitter from 'grapheme-splitter';
1
 import GraphemeSplitter from 'grapheme-splitter';
2
-import _ from 'lodash';
2
+import { split } from 'lodash-es';
3
 
3
 
4
 const AVATAR_COLORS = [
4
 const AVATAR_COLORS = [
5
     '#6A50D3',
5
     '#6A50D3',
63
  */
63
  */
64
 export function getInitials(s?: string) {
64
 export function getInitials(s?: string) {
65
     // We don't want to use the domain part of an email address, if it is one
65
     // We don't want to use the domain part of an email address, if it is one
66
-    const initialsBasis = _.split(s, '@')[0];
66
+    const initialsBasis = split(s, '@')[0];
67
     const [ firstWord, secondWord ] = initialsBasis.split(wordSplitRegex).filter(Boolean);
67
     const [ firstWord, secondWord ] = initialsBasis.split(wordSplitRegex).filter(Boolean);
68
 
68
 
69
     return getFirstGraphemeUpper(firstWord) + getFirstGraphemeUpper(secondWord);
69
     return getFirstGraphemeUpper(firstWord) + getFirstGraphemeUpper(secondWord);

+ 3
- 3
react/features/base/conference/functions.ts 查看文件

1
 import { sha512_256 as sha512 } from 'js-sha512';
1
 import { sha512_256 as sha512 } from 'js-sha512';
2
-import _ from 'lodash';
2
+import { upperFirst, words } from 'lodash-es';
3
 
3
 
4
 import { getName } from '../../app/functions';
4
 import { getName } from '../../app/functions';
5
 import { IReduxState, IStore } from '../../app/types';
5
 import { IReduxState, IStore } from '../../app/types';
571
  * @returns {string}
571
  * @returns {string}
572
  */
572
  */
573
 function safeStartCase(s = '') {
573
 function safeStartCase(s = '') {
574
-    return _.words(`${s}`.replace(/['\u2019]/g, '')).reduce(
575
-        (result, word, index) => result + (index ? ' ' : '') + _.upperFirst(word)
574
+    return words(`${s}`.replace(/['\u2019]/g, '')).reduce(
575
+        (result, word, index) => result + (index ? ' ' : '') + upperFirst(word)
576
         , '');
576
         , '');
577
 }
577
 }

+ 6
- 8
react/features/base/config/functions.any.ts 查看文件

3
 // eslint-disable-next-line lines-around-comment
3
 // eslint-disable-next-line lines-around-comment
4
 // @ts-ignore
4
 // @ts-ignore
5
 import { safeJsonParse } from '@jitsi/js-utils/json';
5
 import { safeJsonParse } from '@jitsi/js-utils/json';
6
-import _ from 'lodash';
6
+import { isEmpty, mergeWith, pick } from 'lodash-es';
7
 
7
 
8
 import { IReduxState } from '../../app/types';
8
 import { IReduxState } from '../../app/types';
9
 import { getLocalParticipant } from '../participants/functions';
9
 import { getLocalParticipant } from '../participants/functions';
166
             const configJSON
166
             const configJSON
167
                 = getWhitelistedJSON(configName as 'interfaceConfig' | 'config', json[configName]);
167
                 = getWhitelistedJSON(configName as 'interfaceConfig' | 'config', json[configName]);
168
 
168
 
169
-            if (!_.isEmpty(configJSON)) {
170
-                logger.info(
171
-                    `Extending ${configName} with: ${
172
-                        JSON.stringify(configJSON)}`);
169
+            if (!isEmpty(configJSON)) {
170
+                logger.info(`Extending ${configName} with: ${JSON.stringify(configJSON)}`);
173
 
171
 
174
                 // eslint-disable-next-line arrow-body-style
172
                 // eslint-disable-next-line arrow-body-style
175
-                _.mergeWith(configObj, configJSON, (oldValue, newValue) => {
173
+                mergeWith(configObj, configJSON, (oldValue, newValue) => {
176
 
174
 
177
                     // XXX We don't want to merge the arrays, we want to
175
                     // XXX We don't want to merge the arrays, we want to
178
                     // overwrite them.
176
                     // overwrite them.
196
  */
194
  */
197
 export function getWhitelistedJSON(configName: 'interfaceConfig' | 'config', configJSON: any): Object {
195
 export function getWhitelistedJSON(configName: 'interfaceConfig' | 'config', configJSON: any): Object {
198
     if (configName === 'interfaceConfig') {
196
     if (configName === 'interfaceConfig') {
199
-        return _.pick(configJSON, INTERFACE_CONFIG_WHITELIST);
197
+        return pick(configJSON, INTERFACE_CONFIG_WHITELIST);
200
     } else if (configName === 'config') {
198
     } else if (configName === 'config') {
201
-        return _.pick(configJSON, CONFIG_WHITELIST);
199
+        return pick(configJSON, CONFIG_WHITELIST);
202
     }
200
     }
203
 
201
 
204
     return configJSON;
202
     return configJSON;

+ 4
- 4
react/features/base/config/reducer.ts 查看文件

1
-import _ from 'lodash';
1
+import { merge, union } from 'lodash-es';
2
 
2
 
3
 import { CONFERENCE_INFO } from '../../conference/components/constants';
3
 import { CONFERENCE_INFO } from '../../conference/components/constants';
4
 import { TOOLBAR_BUTTONS } from '../../toolbox/constants';
4
 import { TOOLBAR_BUTTONS } from '../../toolbox/constants';
194
         });
194
         });
195
     }
195
     }
196
 
196
 
197
-    const newState = _.merge(
197
+    const newState = merge(
198
         {},
198
         {},
199
         config,
199
         config,
200
         hdAudioOptions,
200
         hdAudioOptions,
397
                     = (newValue.conferenceInfo?.alwaysVisible ?? [])
397
                     = (newValue.conferenceInfo?.alwaysVisible ?? [])
398
                     .filter(c => !CONFERENCE_HEADER_MAPPING[key].includes(c));
398
                     .filter(c => !CONFERENCE_HEADER_MAPPING[key].includes(c));
399
                 newValue.conferenceInfo.autoHide
399
                 newValue.conferenceInfo.autoHide
400
-                    = _.union(newValue.conferenceInfo.autoHide, CONFERENCE_HEADER_MAPPING[key]);
400
+                    = union(newValue.conferenceInfo.autoHide, CONFERENCE_HEADER_MAPPING[key]);
401
             } else {
401
             } else {
402
                 newValue.conferenceInfo.alwaysVisible
402
                 newValue.conferenceInfo.alwaysVisible
403
                     = (newValue.conferenceInfo.alwaysVisible ?? [])
403
                     = (newValue.conferenceInfo.alwaysVisible ?? [])
599
  * @returns {Object} The new state after the reduction of the specified action.
599
  * @returns {Object} The new state after the reduction of the specified action.
600
  */
600
  */
601
 function _updateConfig(state: IConfig, { config }: { config: IConfig; }) {
601
 function _updateConfig(state: IConfig, { config }: { config: IConfig; }) {
602
-    const newState = _.merge({}, state, config);
602
+    const newState = merge({}, state, config);
603
 
603
 
604
     _cleanupConfig(newState);
604
     _cleanupConfig(newState);
605
 
605
 

+ 2
- 2
react/features/base/connection/actions.any.ts 查看文件

1
-import _ from 'lodash';
1
+import { cloneDeep } from 'lodash-es';
2
 
2
 
3
 import { IReduxState, IStore } from '../../app/types';
3
 import { IReduxState, IStore } from '../../app/types';
4
 import { conferenceLeft, conferenceWillLeave, redirect } from '../conference/actions';
4
 import { conferenceLeft, conferenceWillLeave, redirect } from '../conference/actions';
113
 export function constructOptions(state: IReduxState) {
113
 export function constructOptions(state: IReduxState) {
114
     // Deep clone the options to make sure we don't modify the object in the
114
     // Deep clone the options to make sure we don't modify the object in the
115
     // redux store.
115
     // redux store.
116
-    const options: IOptions = _.cloneDeep(state['features/base/config']);
116
+    const options: IOptions = cloneDeep(state['features/base/config']);
117
 
117
 
118
     const { locationURL, preferVisitor } = state['features/base/connection'];
118
     const { locationURL, preferVisitor } = state['features/base/connection'];
119
     const params = parseURLParams(locationURL || '');
119
     const params = parseURLParams(locationURL || '');

+ 3
- 3
react/features/base/flags/reducer.ts 查看文件

1
-import _ from 'lodash';
1
+import { isEqual, merge } from 'lodash-es';
2
 
2
 
3
 import ReducerRegistry from '../redux/ReducerRegistry';
3
 import ReducerRegistry from '../redux/ReducerRegistry';
4
 
4
 
25
 ReducerRegistry.register<IFlagsState>('features/base/flags', (state = DEFAULT_STATE, action): IFlagsState => {
25
 ReducerRegistry.register<IFlagsState>('features/base/flags', (state = DEFAULT_STATE, action): IFlagsState => {
26
     switch (action.type) {
26
     switch (action.type) {
27
     case UPDATE_FLAGS: {
27
     case UPDATE_FLAGS: {
28
-        const newState = _.merge({}, state, action.flags);
28
+        const newState = merge({}, state, action.flags);
29
 
29
 
30
-        return _.isEqual(state, newState) ? state : newState;
30
+        return isEqual(state, newState) ? state : newState;
31
     }
31
     }
32
     }
32
     }
33
 
33
 

+ 2
- 2
react/features/base/i18n/i18next.ts 查看文件

1
 import COUNTRIES_RESOURCES from 'i18n-iso-countries/langs/en.json';
1
 import COUNTRIES_RESOURCES from 'i18n-iso-countries/langs/en.json';
2
 import i18next from 'i18next';
2
 import i18next from 'i18next';
3
 import I18nextXHRBackend, { HttpBackendOptions } from 'i18next-http-backend';
3
 import I18nextXHRBackend, { HttpBackendOptions } from 'i18next-http-backend';
4
-import _ from 'lodash';
4
+import { merge } from 'lodash-es';
5
 
5
 
6
 import LANGUAGES_RESOURCES from '../../../../lang/languages.json';
6
 import LANGUAGES_RESOURCES from '../../../../lang/languages.json';
7
 import MAIN_RESOURCES from '../../../../lang/main.json';
7
 import MAIN_RESOURCES from '../../../../lang/main.json';
22
 /**
22
 /**
23
  * Merged country names.
23
  * Merged country names.
24
  */
24
  */
25
-const COUNTRIES = _.merge({}, COUNTRIES_RESOURCES, COUNTRIES_RESOURCES_OVERRIDES);
25
+const COUNTRIES = merge({}, COUNTRIES_RESOURCES, COUNTRIES_RESOURCES_OVERRIDES);
26
 
26
 
27
 /**
27
 /**
28
  * The available/supported languages.
28
  * The available/supported languages.

+ 2
- 2
react/features/base/logging/functions.ts 查看文件

1
 // @ts-expect-error
1
 // @ts-expect-error
2
 import Logger, { getLogger as _getLogger } from '@jitsi/logger';
2
 import Logger, { getLogger as _getLogger } from '@jitsi/logger';
3
-import _ from 'lodash';
3
+import { once } from 'lodash-es';
4
 
4
 
5
 import LogTransport from './LogTransport';
5
 import LogTransport from './LogTransport';
6
 
6
 
26
 /**
26
 /**
27
  * Initializes native logging. This operations must be done as early as possible.
27
  * Initializes native logging. This operations must be done as early as possible.
28
  */
28
  */
29
-export const _initLogging = _.once(() => {
29
+export const _initLogging = once(() => {
30
     if (navigator.product !== 'ReactNative') {
30
     if (navigator.product !== 'ReactNative') {
31
         return;
31
         return;
32
     }
32
     }

+ 2
- 2
react/features/base/logging/reducer.ts 查看文件

1
-import _ from 'lodash';
1
+import { merge } from 'lodash-es';
2
 import { AnyAction } from 'redux';
2
 import { AnyAction } from 'redux';
3
 
3
 
4
 import ReducerRegistry from '../redux/ReducerRegistry';
4
 import ReducerRegistry from '../redux/ReducerRegistry';
95
  * reduction of the specified action.
95
  * reduction of the specified action.
96
  */
96
  */
97
 function _setLoggingConfig(state: ILoggingState, action: AnyAction) {
97
 function _setLoggingConfig(state: ILoggingState, action: AnyAction) {
98
-    const newConfig = _.merge({}, DEFAULT_STATE.config, action.config);
98
+    const newConfig = merge({}, DEFAULT_STATE.config, action.config);
99
 
99
 
100
     if (equals(state.config, newConfig)) {
100
     if (equals(state.config, newConfig)) {
101
         return state;
101
         return state;

+ 3
- 3
react/features/base/participants/subscriber.ts 查看文件

1
 
1
 
2
-import _ from 'lodash';
2
+import { difference } from 'lodash-es';
3
 import { batch } from 'react-redux';
3
 import { batch } from 'react-redux';
4
 
4
 
5
 import { IStore } from '../../app/types';
5
 import { IStore } from '../../app/types';
64
         store: IStore): void {
64
         store: IStore): void {
65
     const { dispatch, getState } = store;
65
     const { dispatch, getState } = store;
66
     const conference = getCurrentConference(getState());
66
     const conference = getCurrentConference(getState());
67
-    const removedScreenshareSourceNames = _.difference(oldScreenshareSourceNames, newScreenshareSourceNames);
68
-    const addedScreenshareSourceNames = _.difference(newScreenshareSourceNames, oldScreenshareSourceNames);
67
+    const removedScreenshareSourceNames = difference(oldScreenshareSourceNames, newScreenshareSourceNames);
68
+    const addedScreenshareSourceNames = difference(newScreenshareSourceNames, oldScreenshareSourceNames);
69
 
69
 
70
     if (removedScreenshareSourceNames.length) {
70
     if (removedScreenshareSourceNames.length) {
71
         removedScreenshareSourceNames.forEach(id => dispatch(participantLeft(id, conference, {
71
         removedScreenshareSourceNames.forEach(id => dispatch(participantLeft(id, conference, {

+ 2
- 2
react/features/base/redux/functions.ts 查看文件

1
-import _ from 'lodash';
1
+import { isEqual } from 'lodash-es';
2
 
2
 
3
 import { IReduxState, IStore } from '../../app/types';
3
 import { IReduxState, IStore } from '../../app/types';
4
 import { IStateful } from '../app/types';
4
 import { IStateful } from '../app/types';
36
  * comparison); false, otherwise.
36
  * comparison); false, otherwise.
37
  */
37
  */
38
 export function equals(a: any, b: any) {
38
 export function equals(a: any, b: any) {
39
-    return _.isEqual(a, b);
39
+    return isEqual(a, b);
40
 }
40
 }
41
 
41
 
42
 /**
42
 /**

+ 2
- 5
react/features/base/redux/middleware.ts 查看文件

1
-import _ from 'lodash';
1
+import { throttle } from 'lodash-es';
2
 
2
 
3
 import MiddlewareRegistry from './MiddlewareRegistry';
3
 import MiddlewareRegistry from './MiddlewareRegistry';
4
 import PersistenceRegistry from './PersistenceRegistry';
4
 import PersistenceRegistry from './PersistenceRegistry';
13
 /**
13
 /**
14
  * A throttled function to avoid repetitive state persisting.
14
  * A throttled function to avoid repetitive state persisting.
15
  */
15
  */
16
-const throttledPersistState
17
-    = _.throttle(
18
-        state => PersistenceRegistry.persistState(state),
19
-        PERSIST_STATE_DELAY);
16
+const throttledPersistState = throttle(state => PersistenceRegistry.persistState(state), PERSIST_STATE_DELAY);
20
 
17
 
21
 // Web only code.
18
 // Web only code.
22
 // We need the <tt>if</tt> because it appears that on mobile the polyfill is not
19
 // We need the <tt>if</tt> because it appears that on mobile the polyfill is not

+ 3
- 3
react/features/base/settings/middleware.any.ts 查看文件

1
-import _ from 'lodash';
1
+import { escape } from 'lodash-es';
2
 import { AnyAction } from 'redux';
2
 import { AnyAction } from 'redux';
3
 
3
 
4
 import { IStore } from '../../app/types';
4
 import { IStore } from '../../app/types';
100
     const localParticipant = getLocalParticipant(getState());
100
     const localParticipant = getLocalParticipant(getState());
101
 
101
 
102
     if (localParticipant) {
102
     if (localParticipant) {
103
-        const displayName = _.escape(urlDisplayName);
104
-        const email = _.escape(urlEmail);
103
+        const displayName = escape(urlDisplayName);
104
+        const email = escape(urlEmail);
105
 
105
 
106
         dispatch(participantUpdated({
106
         dispatch(participantUpdated({
107
             ...localParticipant,
107
             ...localParticipant,

+ 3
- 3
react/features/base/settings/reducer.ts 查看文件

1
 // @ts-expect-error
1
 // @ts-expect-error
2
 import { jitsiLocalStorage } from '@jitsi/js-utils';
2
 import { jitsiLocalStorage } from '@jitsi/js-utils';
3
-import _ from 'lodash';
3
+import { escape } from 'lodash-es';
4
 
4
 
5
 import { APP_WILL_MOUNT } from '../app/actionTypes';
5
 import { APP_WILL_MOUNT } from '../app/actionTypes';
6
 import PersistenceRegistry from '../redux/PersistenceRegistry';
6
 import PersistenceRegistry from '../redux/PersistenceRegistry';
154
     // is a defined value, it will override any value found in local storage.
154
     // is a defined value, it will override any value found in local storage.
155
     // The workaround is sidestepping _.escape when the value is not set in
155
     // The workaround is sidestepping _.escape when the value is not set in
156
     // local storage.
156
     // local storage.
157
-    const displayName = savedDisplayName === null ? undefined : _.escape(savedDisplayName);
158
-    const email = savedEmail === null ? undefined : _.escape(savedEmail);
157
+    const displayName = savedDisplayName === null ? undefined : escape(savedDisplayName);
158
+    const email = savedEmail === null ? undefined : escape(savedEmail);
159
 
159
 
160
     settings = assignIfDefined({
160
     settings = assignIfDefined({
161
         displayName,
161
         displayName,

+ 2
- 2
react/features/base/tracks/subscriber.ts 查看文件

1
-import _ from 'lodash';
1
+import { isEqual, sortBy } from 'lodash-es';
2
 
2
 
3
 import { MEDIA_TYPE } from '../media/constants';
3
 import { MEDIA_TYPE } from '../media/constants';
4
 import { getScreenshareParticipantIds } from '../participants/functions';
4
 import { getScreenshareParticipantIds } from '../participants/functions';
16
             return;
16
             return;
17
         }
17
         }
18
 
18
 
19
-        if (!_.isEqual(_.sortBy(participantIDs), _.sortBy(previousParticipantIDs))) {
19
+        if (!isEqual(sortBy(participantIDs), sortBy(previousParticipantIDs))) {
20
             APP.API.notifySharingParticipantsChanged(participantIDs);
20
             APP.API.notifySharingParticipantsChanged(participantIDs);
21
         }
21
         }
22
     }
22
     }

+ 2
- 2
react/features/base/util/isInsecureRoomName.ts 查看文件

1
-import _ from 'lodash';
1
+import { isEqual } from 'lodash-es';
2
 import { NIL, parse as parseUUID } from 'uuid';
2
 import { NIL, parse as parseUUID } from 'uuid';
3
 import zxcvbn from 'zxcvbn';
3
 import zxcvbn from 'zxcvbn';
4
 
4
 
22
         return false;
22
         return false;
23
     }
23
     }
24
 
24
 
25
-    return !_.isEqual(uuid, NIL_UUID);
25
+    return !isEqual(uuid, NIL_UUID);
26
 }
26
 }
27
 
27
 
28
 /**
28
 /**

+ 3
- 3
react/features/breakout-rooms/actions.ts 查看文件

1
 import i18next from 'i18next';
1
 import i18next from 'i18next';
2
-import _ from 'lodash';
2
+import { chunk, filter, shuffle } from 'lodash-es';
3
 
3
 
4
 import { createBreakoutRoomsEvent } from '../analytics/AnalyticsEvents';
4
 import { createBreakoutRoomsEvent } from '../analytics/AnalyticsEvents';
5
 import { sendAnalytics } from '../analytics/functions';
5
 import { sendAnalytics } from '../analytics/functions';
129
 export function autoAssignToBreakoutRooms() {
129
 export function autoAssignToBreakoutRooms() {
130
     return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
130
     return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
131
         const rooms = getBreakoutRooms(getState);
131
         const rooms = getBreakoutRooms(getState);
132
-        const breakoutRooms = _.filter(rooms, room => !room.isMainRoom);
132
+        const breakoutRooms = filter(rooms, room => !room.isMainRoom);
133
 
133
 
134
         if (breakoutRooms) {
134
         if (breakoutRooms) {
135
             sendAnalytics(createBreakoutRoomsEvent('auto.assign'));
135
             sendAnalytics(createBreakoutRoomsEvent('auto.assign'));
136
             const participantIds = Array.from(getRemoteParticipants(getState).keys());
136
             const participantIds = Array.from(getRemoteParticipants(getState).keys());
137
             const length = Math.ceil(participantIds.length / breakoutRooms.length);
137
             const length = Math.ceil(participantIds.length / breakoutRooms.length);
138
 
138
 
139
-            _.chunk(_.shuffle(participantIds), length).forEach((group, index) =>
139
+            chunk(shuffle(participantIds), length).forEach((group, index) =>
140
                 group.forEach(participantId => {
140
                 group.forEach(participantId => {
141
                     dispatch(sendParticipantToRoom(participantId, breakoutRooms[index].id));
141
                     dispatch(sendParticipantToRoom(participantId, breakoutRooms[index].id));
142
                 })
142
                 })

+ 3
- 3
react/features/breakout-rooms/functions.ts 查看文件

1
-import _ from 'lodash';
1
+import { find } from 'lodash-es';
2
 
2
 
3
 import { IStateful } from '../base/app/types';
3
 import { IStateful } from '../base/app/types';
4
 import { getCurrentConference } from '../base/conference/functions';
4
 import { getCurrentConference } from '../base/conference/functions';
33
 export const getMainRoom = (stateful: IStateful) => {
33
 export const getMainRoom = (stateful: IStateful) => {
34
     const rooms = getBreakoutRooms(stateful);
34
     const rooms = getBreakoutRooms(stateful);
35
 
35
 
36
-    return _.find(rooms, room => Boolean(room.isMainRoom));
36
+    return find(rooms, room => Boolean(room.isMainRoom));
37
 };
37
 };
38
 
38
 
39
 /**
39
 /**
135
 export const getRoomByJid = (stateful: IStateful, roomJid: string) => {
135
 export const getRoomByJid = (stateful: IStateful, roomJid: string) => {
136
     const rooms = getBreakoutRooms(stateful);
136
     const rooms = getBreakoutRooms(stateful);
137
 
137
 
138
-    return _.find(rooms, (room: IRoom) => room.jid === roomJid);
138
+    return find(rooms, (room: IRoom) => room.jid === roomJid);
139
 };
139
 };
140
 
140
 
141
 /**
141
 /**

+ 3
- 3
react/features/conference/components/web/Conference.tsx 查看文件

1
-import _ from 'lodash';
1
+import { throttle } from 'lodash-es';
2
 import React from 'react';
2
 import React from 'react';
3
 import { WithTranslation } from 'react-i18next';
3
 import { WithTranslation } from 'react-i18next';
4
 import { connect as reactReduxConnect } from 'react-redux';
4
 import { connect as reactReduxConnect } from 'react-redux';
133
         this._originalOnShowToolbar = this._onShowToolbar;
133
         this._originalOnShowToolbar = this._onShowToolbar;
134
         this._originalOnMouseMove = this._onMouseMove;
134
         this._originalOnMouseMove = this._onMouseMove;
135
 
135
 
136
-        this._onShowToolbar = _.throttle(
136
+        this._onShowToolbar = throttle(
137
             () => this._originalOnShowToolbar(),
137
             () => this._originalOnShowToolbar(),
138
             100,
138
             100,
139
             {
139
             {
141
                 trailing: false
141
                 trailing: false
142
             });
142
             });
143
 
143
 
144
-        this._onMouseMove = _.throttle(
144
+        this._onMouseMove = throttle(
145
             event => this._originalOnMouseMove(event),
145
             event => this._originalOnMouseMove(event),
146
             _mouseMoveCallbackInterval,
146
             _mouseMoveCallbackInterval,
147
             {
147
             {

+ 2
- 2
react/features/connection-indicator/statsEmitter.ts 查看文件

1
-import _ from 'lodash';
1
+import { union } from 'lodash-es';
2
 
2
 
3
 import { IJitsiConference } from '../base/conference/reducer';
3
 import { IJitsiConference } from '../base/conference/reducer';
4
 import {
4
 import {
143
         const resolutionUserIds = Object.keys(allUserResolutions);
143
         const resolutionUserIds = Object.keys(allUserResolutions);
144
         const codecUserIds = Object.keys(allUserCodecs);
144
         const codecUserIds = Object.keys(allUserCodecs);
145
 
145
 
146
-        _.union(framerateUserIds, resolutionUserIds, codecUserIds)
146
+        union(framerateUserIds, resolutionUserIds, codecUserIds)
147
             .filter(id => id !== localUserId)
147
             .filter(id => id !== localUserId)
148
             .forEach(id => {
148
             .forEach(id => {
149
                 const remoteUserStats: IStats = {};
149
                 const remoteUserStats: IStats = {};

+ 2
- 2
react/features/filmstrip/components/web/Filmstrip.tsx 查看文件

1
 import clsx from 'clsx';
1
 import clsx from 'clsx';
2
-import _ from 'lodash';
2
+import { throttle } from 'lodash-es';
3
 import React, { PureComponent } from 'react';
3
 import React, { PureComponent } from 'react';
4
 import { WithTranslation } from 'react-i18next';
4
 import { WithTranslation } from 'react-i18next';
5
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
286
         this._onDragMouseUp = this._onDragMouseUp.bind(this);
286
         this._onDragMouseUp = this._onDragMouseUp.bind(this);
287
         this._onFilmstripResize = this._onFilmstripResize.bind(this);
287
         this._onFilmstripResize = this._onFilmstripResize.bind(this);
288
 
288
 
289
-        this._throttledResize = _.throttle(
289
+        this._throttledResize = throttle(
290
             this._onFilmstripResize,
290
             this._onFilmstripResize,
291
             50,
291
             50,
292
             {
292
             {

+ 4
- 4
react/features/follow-me/middleware.ts 查看文件

1
-import _ from 'lodash';
1
+import { differenceWith, isEqual } from 'lodash-es';
2
 
2
 
3
 import { IStore } from '../app/types';
3
 import { IStore } from '../app/types';
4
 import { CONFERENCE_JOIN_IN_PROGRESS } from '../base/conference/actionTypes';
4
 import { CONFERENCE_JOIN_IN_PROGRESS } from '../base/conference/actionTypes';
184
             oldStageParticipants = JSON.parse(oldState.pinnedStageParticipants);
184
             oldStageParticipants = JSON.parse(oldState.pinnedStageParticipants);
185
         }
185
         }
186
 
186
 
187
-        if (!_.isEqual(stageParticipants, oldStageParticipants)) {
188
-            const toRemove = _.differenceWith(oldStageParticipants, stageParticipants, _.isEqual);
189
-            const toAdd = _.differenceWith(stageParticipants, oldStageParticipants, _.isEqual);
187
+        if (!isEqual(stageParticipants, oldStageParticipants)) {
188
+            const toRemove = differenceWith(oldStageParticipants, stageParticipants, isEqual);
189
+            const toAdd = differenceWith(stageParticipants, oldStageParticipants, isEqual);
190
 
190
 
191
             toRemove.forEach((p: { participantId: string; }) =>
191
             toRemove.forEach((p: { participantId: string; }) =>
192
                 store.dispatch(removeStageParticipant(p.participantId)));
192
                 store.dispatch(removeStageParticipant(p.participantId)));

+ 7
- 7
react/features/invite/components/add-people-dialog/native/AddPeopleDialog.tsx 查看文件

1
-import _ from 'lodash';
1
+import { matchesProperty, sortBy } from 'lodash-es';
2
 import React, { ReactElement } from 'react';
2
 import React, { ReactElement } from 'react';
3
 import { WithTranslation } from 'react-i18next';
3
 import { WithTranslation } from 'react-i18next';
4
 import {
4
 import {
331
             const finderKey = item.type === INVITE_TYPES.PHONE ? 'number' : 'user_id';
331
             const finderKey = item.type === INVITE_TYPES.PHONE ? 'number' : 'user_id';
332
 
332
 
333
             if (inviteItems.find(
333
             if (inviteItems.find(
334
-                _.matchesProperty(finderKey, item[finderKey as keyof typeof item]))) {
334
+                matchesProperty(finderKey, item[finderKey as keyof typeof item]))) {
335
                 // Item is already selected, need to unselect it.
335
                 // Item is already selected, need to unselect it.
336
                 this.setState({
336
                 this.setState({
337
                     inviteItems: inviteItems.filter(
337
                     inviteItems: inviteItems.filter(
343
                 const items = inviteItems.concat(item);
343
                 const items = inviteItems.concat(item);
344
 
344
 
345
                 this.setState({
345
                 this.setState({
346
-                    inviteItems: _.sortBy(items, [ 'name', 'number' ])
346
+                    inviteItems: sortBy(items, [ 'name', 'number' ])
347
                 });
347
                 });
348
             }
348
             }
349
         };
349
         };
394
     _performSearch(query: string) {
394
     _performSearch(query: string) {
395
         this._query(query).then(results => {
395
         this._query(query).then(results => {
396
             this.setState({
396
             this.setState({
397
-                selectableItems: _.sortBy(results, [ 'name', 'number' ])
397
+                selectableItems: sortBy(results, [ 'name', 'number' ])
398
             });
398
             });
399
         })
399
         })
400
         .finally(() => {
400
         .finally(() => {
459
 
459
 
460
         switch (item.type) {
460
         switch (item.type) {
461
         case INVITE_TYPES.PHONE:
461
         case INVITE_TYPES.PHONE:
462
-            selected = inviteItems.find(_.matchesProperty('number', item.number));
462
+            selected = inviteItems.find(matchesProperty('number', item.number));
463
             break;
463
             break;
464
         case INVITE_TYPES.USER:
464
         case INVITE_TYPES.USER:
465
         case INVITE_TYPES.EMAIL:
465
         case INVITE_TYPES.EMAIL:
466
             selected = item.id
466
             selected = item.id
467
-                ? inviteItems.find(_.matchesProperty('id', item.id))
468
-                : inviteItems.find(_.matchesProperty('user_id', item.user_id));
467
+                ? inviteItems.find(matchesProperty('id', item.id))
468
+                : inviteItems.find(matchesProperty('user_id', item.user_id));
469
             break;
469
             break;
470
         default:
470
         default:
471
             return null;
471
             return null;

+ 2
- 2
react/features/mobile/audio-mode/components/AudioRoutePickerDialog.tsx 查看文件

1
-import _ from 'lodash';
1
+import { sortBy } from 'lodash-es';
2
 import React, { Component } from 'react';
2
 import React, { Component } from 'react';
3
 import { NativeModules, Text, TextStyle, TouchableHighlight, View, ViewStyle } from 'react-native';
3
 import { NativeModules, Text, TextStyle, TouchableHighlight, View, ViewStyle } from 'react-native';
4
 import { connect } from 'react-redux';
4
 import { connect } from 'react-redux';
201
 
201
 
202
         // Make sure devices is alphabetically sorted.
202
         // Make sure devices is alphabetically sorted.
203
         return {
203
         return {
204
-            devices: _.sortBy(audioDevices, 'text')
204
+            devices: sortBy(audioDevices, 'text')
205
         };
205
         };
206
     }
206
     }
207
 
207
 

+ 2
- 2
react/features/recording/components/LiveStream/AbstractStreamKeyForm.ts 查看文件

1
-import { DebouncedFunc } from 'lodash';
2
-import debounce from 'lodash/debounce';
1
+import { debounce } from 'lodash-es';
2
+import type { DebouncedFunc } from 'lodash-es';
3
 import { Component } from 'react';
3
 import { Component } from 'react';
4
 import { WithTranslation } from 'react-i18next';
4
 import { WithTranslation } from 'react-i18next';
5
 
5
 

+ 3
- 3
react/features/speaker-stats/functions.ts 查看文件

1
-import _ from 'lodash';
1
+import { cloneDeep } from 'lodash-es';
2
 
2
 
3
 import { IReduxState } from '../app/types';
3
 import { IReduxState } from '../app/types';
4
 import { getConferenceTimestamp } from '../base/conference/functions';
4
 import { getConferenceTimestamp } from '../base/conference/functions';
175
  * @public
175
  * @public
176
  */
176
  */
177
 export function filterBySearchCriteria(state: IReduxState, stats?: ISpeakerStats) {
177
 export function filterBySearchCriteria(state: IReduxState, stats?: ISpeakerStats) {
178
-    const filteredStats = _.cloneDeep(stats ?? getSpeakerStats(state));
178
+    const filteredStats = cloneDeep(stats ?? getSpeakerStats(state));
179
     const criteria = getSearchCriteria(state);
179
     const criteria = getSearchCriteria(state);
180
 
180
 
181
     if (criteria !== null) {
181
     if (criteria !== null) {
203
  * @public
203
  * @public
204
  */
204
  */
205
 export function resetHiddenStats(state: IReduxState, stats?: ISpeakerStats) {
205
 export function resetHiddenStats(state: IReduxState, stats?: ISpeakerStats) {
206
-    const resetStats = _.cloneDeep(stats ?? getSpeakerStats(state));
206
+    const resetStats = cloneDeep(stats ?? getSpeakerStats(state));
207
 
207
 
208
     for (const id in resetStats) {
208
     for (const id in resetStats) {
209
         if (resetStats[id].hidden) {
209
         if (resetStats[id].hidden) {

+ 3
- 11
react/features/speaker-stats/reducer.ts 查看文件

1
-import _ from 'lodash';
1
+import { assign } from 'lodash-es';
2
 
2
 
3
 import ReducerRegistry from '../base/redux/ReducerRegistry';
3
 import ReducerRegistry from '../base/redux/ReducerRegistry';
4
 import { FaceLandmarks } from '../face-landmarks/types';
4
 import { FaceLandmarks } from '../face-landmarks/types';
141
  * @returns {Object} The new state after the reduction of the specified action.
141
  * @returns {Object} The new state after the reduction of the specified action.
142
  */
142
  */
143
 function _updateCriteria(state: ISpeakerStatsState, { criteria }: { criteria: string | null; }) {
143
 function _updateCriteria(state: ISpeakerStatsState, { criteria }: { criteria: string | null; }) {
144
-    return _.assign(
145
-        {},
146
-        state,
147
-        { criteria }
148
-    );
144
+    return assign({}, state, { criteria });
149
 }
145
 }
150
 
146
 
151
 /**
147
 /**
188
  * @returns {Object} The new state after the reduction of the specified action.
184
  * @returns {Object} The new state after the reduction of the specified action.
189
  */
185
  */
190
 function _initReorderStats(state: ISpeakerStatsState) {
186
 function _initReorderStats(state: ISpeakerStatsState) {
191
-    return _.assign(
192
-        {},
193
-        state,
194
-        { pendingReorder: true }
195
-    );
187
+    return assign({}, state, { pendingReorder: true });
196
 }
188
 }

+ 2
- 2
react/features/toolbox/components/HangupButton.ts 查看文件

1
-import _ from 'lodash';
1
+import { once } from 'lodash-es';
2
 import { connect } from 'react-redux';
2
 import { connect } from 'react-redux';
3
 
3
 
4
 import { createToolbarEvent } from '../../analytics/AnalyticsEvents';
4
 import { createToolbarEvent } from '../../analytics/AnalyticsEvents';
29
     constructor(props: AbstractButtonProps) {
29
     constructor(props: AbstractButtonProps) {
30
         super(props);
30
         super(props);
31
 
31
 
32
-        this._hangup = _.once(() => {
32
+        this._hangup = once(() => {
33
             sendAnalytics(createToolbarEvent('hangup'));
33
             sendAnalytics(createToolbarEvent('hangup'));
34
             this.props.dispatch(leaveConference());
34
             this.props.dispatch(leaveConference());
35
         });
35
         });

+ 1
- 1
react/features/toolbox/subscriber.web.ts 查看文件

1
-import { throttle } from 'lodash';
1
+import { throttle } from 'lodash-es';
2
 
2
 
3
 import { IReduxState, IStore } from '../app/types';
3
 import { IReduxState, IStore } from '../app/types';
4
 import { getParticipantCount } from '../base/participants/functions';
4
 import { getParticipantCount } from '../base/participants/functions';

+ 2
- 2
react/features/video-menu/components/native/VolumeSlider.tsx 查看文件

1
 /* eslint-disable lines-around-comment*/
1
 /* eslint-disable lines-around-comment*/
2
 
2
 
3
 import Slider from '@react-native-community/slider';
3
 import Slider from '@react-native-community/slider';
4
-import _ from 'lodash';
4
+import { throttle } from 'lodash-es';
5
 import React, { PureComponent } from 'react';
5
 import React, { PureComponent } from 'react';
6
 import { View, ViewStyle } from 'react-native';
6
 import { View, ViewStyle } from 'react-native';
7
 import { connect } from 'react-redux';
7
 import { connect } from 'react-redux';
88
 
88
 
89
         this._originalVolumeChange = this._onVolumeChange;
89
         this._originalVolumeChange = this._onVolumeChange;
90
 
90
 
91
-        this._onVolumeChange = _.throttle(
91
+        this._onVolumeChange = throttle(
92
             volumeLevel => this._originalVolumeChange(volumeLevel), 500
92
             volumeLevel => this._originalVolumeChange(volumeLevel), 500
93
         );
93
         );
94
     }
94
     }

+ 1
- 1
react/features/visitors/components/web/JoinMeetingDialog.tsx 查看文件

1
-import { noop } from 'lodash';
1
+import { noop } from 'lodash-es';
2
 import React from 'react';
2
 import React from 'react';
3
 import { useTranslation } from 'react-i18next';
3
 import { useTranslation } from 'react-i18next';
4
 import { makeStyles } from 'tss-react/mui';
4
 import { makeStyles } from 'tss-react/mui';

正在加载...
取消
保存