MM-52873 : Switch to npm's 'reselect' for Playbooks (#23396)

This commit is contained in:
M-ZubairAhmed 2023-05-30 13:20:28 +05:30 committed by GitHub
parent eaa190acf6
commit 20ec920b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 100 additions and 176 deletions

View File

@ -26,7 +26,6 @@ const config = {
'^mattermost-redux/test/(.*)$': '^mattermost-redux/test/(.*)$':
'<rootDir>/src/packages/mattermost-redux/test/$1', '<rootDir>/src/packages/mattermost-redux/test/$1',
'^mattermost-redux/(.*)$': '<rootDir>/src/packages/mattermost-redux/src/$1', '^mattermost-redux/(.*)$': '<rootDir>/src/packages/mattermost-redux/src/$1',
'^reselect$': '<rootDir>/src/packages/reselect/src',
'^.+\\.(jpg|jpeg|png|apng|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '^.+\\.(jpg|jpeg|png|apng|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'identity-obj-proxy', 'identity-obj-proxy',
'^.+\\.(css|less|scss)$': 'identity-obj-proxy', '^.+\\.(css|less|scss)$': 'identity-obj-proxy',

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {getSortedTrackedSelectors} from 'reselect';
import {Client4} from 'mattermost-redux/client'; import {Client4} from 'mattermost-redux/client';
import {Preferences} from 'mattermost-redux/constants'; import {Preferences} from 'mattermost-redux/constants';
import {getSortedTrackedSelectors} from 'mattermost-redux/selectors/create_selector';
import {getConfig, isPerformanceDebuggingEnabled} from 'mattermost-redux/selectors/entities/general'; import {getConfig, isPerformanceDebuggingEnabled} from 'mattermost-redux/selectors/entities/general';
import {getBool} from 'mattermost-redux/selectors/entities/preferences'; import {getBool} from 'mattermost-redux/selectors/entities/preferences';

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {Post} from '@mattermost/types/posts'; import {Post} from '@mattermost/types/posts';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import { import {

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {AppBinding} from '@mattermost/types/apps'; import {AppBinding} from '@mattermost/types/apps';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {AppBindingLocations} from 'mattermost-redux/constants/apps'; import {AppBindingLocations} from 'mattermost-redux/constants/apps';
import {makeAppBindingsSelector, makeRHSAppBindingSelector} from 'mattermost-redux/selectors/entities/apps'; import {makeAppBindingsSelector, makeRHSAppBindingSelector} from 'mattermost-redux/selectors/entities/apps';

View File

@ -4,9 +4,8 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux'; import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux';
import {createSelector} from 'reselect';
import {createComplianceReport, getComplianceReports} from 'mattermost-redux/actions/admin'; import {createComplianceReport, getComplianceReports} from 'mattermost-redux/actions/admin';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getComplianceReports as selectComplianceReports, getConfig} from 'mattermost-redux/selectors/entities/admin'; import {getComplianceReports as selectComplianceReports, getConfig} from 'mattermost-redux/selectors/entities/admin';
import {getLicense} from 'mattermost-redux/selectors/entities/general'; import {getLicense} from 'mattermost-redux/selectors/entities/general';

View File

@ -3,8 +3,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getRoles} from 'mattermost-redux/selectors/entities/roles'; import {getRoles} from 'mattermost-redux/selectors/entities/roles';
import {appsFeatureFlagEnabled} from 'mattermost-redux/selectors/entities/apps'; import {appsFeatureFlagEnabled} from 'mattermost-redux/selectors/entities/apps';
import {isCurrentLicenseCloud} from 'mattermost-redux/selectors/entities/cloud'; import {isCurrentLicenseCloud} from 'mattermost-redux/selectors/entities/cloud';

View File

@ -4,12 +4,11 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux'; import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux';
import {createSelector} from 'reselect';
import {GenericAction, ActionFunc} from 'mattermost-redux/types/actions'; import {GenericAction, ActionFunc} from 'mattermost-redux/types/actions';
import {TeamSearchOpts} from '@mattermost/types/teams'; import {TeamSearchOpts} from '@mattermost/types/teams';
import {getTeams as fetchTeams, searchTeams} from 'mattermost-redux/actions/teams'; import {getTeams as fetchTeams, searchTeams} from 'mattermost-redux/actions/teams';
import {getTeams} from 'mattermost-redux/selectors/entities/teams'; import {getTeams} from 'mattermost-redux/selectors/entities/teams';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {GlobalState} from 'types/store'; import {GlobalState} from 'types/store';

View File

@ -4,10 +4,10 @@
import React from 'react'; import React from 'react';
import {FormattedMessage} from 'react-intl'; import {FormattedMessage} from 'react-intl';
import {createSelector} from 'reselect';
import {Team, TeamSearchOpts} from '@mattermost/types/teams'; import {Team, TeamSearchOpts} from '@mattermost/types/teams';
import {debounce} from 'mattermost-redux/actions/helpers'; import {debounce} from 'mattermost-redux/actions/helpers';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import LoadingSpinner from 'components/widgets/loading/loading_spinner'; import LoadingSpinner from 'components/widgets/loading/loading_spinner';
import InfiniteScroll from 'components/gif_picker/components/InfiniteScroll'; import InfiniteScroll from 'components/gif_picker/components/InfiniteScroll';

View File

@ -4,12 +4,11 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux'; import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux';
import {createSelector} from 'reselect'; import {GlobalState} from '@mattermost/types/store';
import {linkLdapGroup, unlinkLdapGroup, getLdapGroups as fetchLdapGroups} from 'mattermost-redux/actions/admin'; import {linkLdapGroup, unlinkLdapGroup, getLdapGroups as fetchLdapGroups} from 'mattermost-redux/actions/admin';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getLdapGroups, getLdapGroupsCount} from 'mattermost-redux/selectors/entities/admin'; import {getLdapGroups, getLdapGroupsCount} from 'mattermost-redux/selectors/entities/admin';
import {GlobalState} from '@mattermost/types/store';
import {ActionFunc} from 'mattermost-redux/types/actions'; import {ActionFunc} from 'mattermost-redux/types/actions';
import GroupsList from './groups_list'; import GroupsList from './groups_list';

View File

@ -4,19 +4,15 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux'; import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux';
import {createSelector} from 'reselect';
import {ServerError} from '@mattermost/types/errors'; import {ServerError} from '@mattermost/types/errors';
import {UserProfile, UsersStats, GetFilteredUsersStatsOpts} from '@mattermost/types/users'; import {UserProfile, UsersStats, GetFilteredUsersStatsOpts} from '@mattermost/types/users';
import {filterProfilesStartingWithTerm, profileListToMap} from 'mattermost-redux/utils/user_utils';
import {ActionResult, ActionFunc, GenericAction} from 'mattermost-redux/types/actions';
import {ChannelStats} from '@mattermost/types/channels'; import {ChannelStats} from '@mattermost/types/channels';
import {filterProfilesStartingWithTerm, profileListToMap} from 'mattermost-redux/utils/user_utils';
import {ActionResult, ActionFunc, GenericAction} from 'mattermost-redux/types/actions';
import {getChannelStats} from 'mattermost-redux/actions/channels'; import {getChannelStats} from 'mattermost-redux/actions/channels';
import {getFilteredUsersStats} from 'mattermost-redux/actions/users'; import {getFilteredUsersStats} from 'mattermost-redux/actions/users';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getChannelMembersInChannels, getAllChannelStats, getChannel} from 'mattermost-redux/selectors/entities/channels'; import {getChannelMembersInChannels, getAllChannelStats, getChannel} from 'mattermost-redux/selectors/entities/channels';
import {makeGetProfilesInChannel, makeSearchProfilesInChannel, filterProfiles, getFilteredUsersStats as selectFilteredUsersStats} from 'mattermost-redux/selectors/entities/users'; import {makeGetProfilesInChannel, makeSearchProfilesInChannel, filterProfiles, getFilteredUsersStats as selectFilteredUsersStats} from 'mattermost-redux/selectors/entities/users';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';

View File

@ -4,12 +4,12 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux'; import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux';
import {createSelector} from 'reselect'; import {ChannelWithTeamData, ChannelSearchOpts} from '@mattermost/types/channels';
import {getAllChannelsWithCount as getData, searchAllChannels} from 'mattermost-redux/actions/channels'; import {getAllChannelsWithCount as getData, searchAllChannels} from 'mattermost-redux/actions/channels';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getAllChannels} from 'mattermost-redux/selectors/entities/channels'; import {getAllChannels} from 'mattermost-redux/selectors/entities/channels';
import {GenericAction, ActionFunc, ActionResult} from 'mattermost-redux/types/actions'; import {GenericAction, ActionFunc, ActionResult} from 'mattermost-redux/types/actions';
import {ChannelWithTeamData, ChannelSearchOpts} from '@mattermost/types/channels';
import {GlobalState} from 'types/store'; import {GlobalState} from 'types/store';
import {Constants} from 'utils/constants'; import {Constants} from 'utils/constants';

View File

@ -4,10 +4,9 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux'; import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux';
import {createSelector} from 'reselect';
import {getTeams as fetchTeams, searchTeams} from 'mattermost-redux/actions/teams'; import {getTeams as fetchTeams, searchTeams} from 'mattermost-redux/actions/teams';
import {getTeams} from 'mattermost-redux/selectors/entities/teams'; import {getTeams} from 'mattermost-redux/selectors/entities/teams';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {ActionFunc} from 'mattermost-redux/types/actions'; import {ActionFunc} from 'mattermost-redux/types/actions';

View File

@ -3,7 +3,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import { import {
getUser, getUser,

View File

@ -6,8 +6,7 @@ import {connect} from 'react-redux';
import {bindActionCreators, Dispatch} from 'redux'; import {bindActionCreators, Dispatch} from 'redux';
import {withRouter, matchPath} from 'react-router-dom'; import {withRouter, matchPath} from 'react-router-dom';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';
import { import {
getCurrentChannel, getCurrentChannel,

View File

@ -4,7 +4,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {AnyAction, bindActionCreators, Dispatch} from 'redux'; import {AnyAction, bindActionCreators, Dispatch} from 'redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import { import {
getCurrentChannel, getCurrentChannel,

View File

@ -3,8 +3,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getMyChannels} from 'mattermost-redux/selectors/entities/channels'; import {getMyChannels} from 'mattermost-redux/selectors/entities/channels';
import {getCurrentUserLocale} from 'mattermost-redux/selectors/entities/i18n'; import {getCurrentUserLocale} from 'mattermost-redux/selectors/entities/i18n';
import {sortChannelsByTypeAndDisplayName} from 'mattermost-redux/utils/channel_utils'; import {sortChannelsByTypeAndDisplayName} from 'mattermost-redux/utils/channel_utils';

View File

@ -3,14 +3,14 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect';
import {Preferences} from 'mattermost-redux/constants'; import {Preferences} from 'mattermost-redux/constants';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getChannelNameToDisplayNameMap} from 'mattermost-redux/selectors/entities/channels'; import {getChannelNameToDisplayNameMap} from 'mattermost-redux/selectors/entities/channels';
import {getAutolinkedUrlSchemes, getConfig, getManagedResourcePaths} from 'mattermost-redux/selectors/entities/general'; import {getAutolinkedUrlSchemes, getConfig, getManagedResourcePaths} from 'mattermost-redux/selectors/entities/general';
import {getBool} from 'mattermost-redux/selectors/entities/preferences'; import {getBool} from 'mattermost-redux/selectors/entities/preferences';
import {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams';
import {getAllUserMentionKeys} from 'mattermost-redux/selectors/entities/search'; import {getAllUserMentionKeys} from 'mattermost-redux/selectors/entities/search';
import {getPost} from 'mattermost-redux/selectors/entities/posts';
import {GlobalState} from 'types/store'; import {GlobalState} from 'types/store';
import {getEmojiMap} from 'selectors/emojis'; import {getEmojiMap} from 'selectors/emojis';
@ -18,8 +18,6 @@ import {getEmojiMap} from 'selectors/emojis';
import {getSiteURL} from 'utils/url'; import {getSiteURL} from 'utils/url';
import {ChannelNamesMap, MentionKey} from 'utils/text_formatting'; import {ChannelNamesMap, MentionKey} from 'utils/text_formatting';
import {getPost} from 'mattermost-redux/selectors/entities/posts';
import Markdown from './markdown'; import Markdown from './markdown';
type Props = { type Props = {

View File

@ -4,8 +4,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux'; import {bindActionCreators, Dispatch, ActionCreatorsMapObject} from 'redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {searchProfilesInCurrentChannel, getProfilesInCurrentChannel} from 'mattermost-redux/selectors/entities/users'; import {searchProfilesInCurrentChannel, getProfilesInCurrentChannel} from 'mattermost-redux/selectors/entities/users';
import {getMembersInCurrentChannel, getCurrentChannelStats, getCurrentChannel} from 'mattermost-redux/selectors/entities/channels'; import {getMembersInCurrentChannel, getCurrentChannelStats, getCurrentChannel} from 'mattermost-redux/selectors/entities/channels';
import {getMembersInCurrentTeam} from 'mattermost-redux/selectors/entities/teams'; import {getMembersInCurrentTeam} from 'mattermost-redux/selectors/entities/teams';

View File

@ -4,8 +4,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux'; import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {RequestStatus} from 'mattermost-redux/constants'; import {RequestStatus} from 'mattermost-redux/constants';
import {Channel} from '@mattermost/types/channels'; import {Channel} from '@mattermost/types/channels';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';

View File

@ -3,8 +3,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getAllChannels, getChannelsWithUserProfiles} from 'mattermost-redux/selectors/entities/channels'; import {getAllChannels, getChannelsWithUserProfiles} from 'mattermost-redux/selectors/entities/channels';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';

View File

@ -4,11 +4,10 @@
import {bindActionCreators, Dispatch} from 'redux'; import {bindActionCreators, Dispatch} from 'redux';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect';
import {Post} from '@mattermost/types/posts'; import {Post} from '@mattermost/types/posts';
import {GenericAction} from 'mattermost-redux/types/actions';
import {GenericAction} from 'mattermost-redux/types/actions';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {makeGetPostsForThread} from 'mattermost-redux/selectors/entities/posts'; import {makeGetPostsForThread} from 'mattermost-redux/selectors/entities/posts';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';

View File

@ -3,7 +3,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getChannel} from 'mattermost-redux/selectors/entities/channels'; import {getChannel} from 'mattermost-redux/selectors/entities/channels';
import { import {
getMyGroupMentionKeysForChannel, getMyGroupMentionKeysForChannel,

View File

@ -4,8 +4,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {bindActionCreators, Dispatch} from 'redux'; import {bindActionCreators, Dispatch} from 'redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {removeReaction} from 'mattermost-redux/actions/posts'; import {removeReaction} from 'mattermost-redux/actions/posts';
import {getMissingProfilesByIds} from 'mattermost-redux/actions/users'; import {getMissingProfilesByIds} from 'mattermost-redux/actions/users';

View File

@ -3,8 +3,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentUserId, makeGetProfilesForReactions} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId, makeGetProfilesForReactions} from 'mattermost-redux/selectors/entities/users';
import {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences'; import {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences';

View File

@ -4,8 +4,7 @@
import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux'; import {ActionCreatorsMapObject, bindActionCreators, Dispatch} from 'redux';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {patchChannel} from 'mattermost-redux/actions/channels'; import {patchChannel} from 'mattermost-redux/actions/channels';
import {getTeam} from 'mattermost-redux/selectors/entities/teams'; import {getTeam} from 'mattermost-redux/selectors/entities/teams';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';

View File

@ -4,8 +4,7 @@
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {bindActionCreators, Dispatch} from 'redux'; import {bindActionCreators, Dispatch} from 'redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {makeGetCategory} from 'mattermost-redux/selectors/entities/preferences'; import {makeGetCategory} from 'mattermost-redux/selectors/entities/preferences';
import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general'; import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general';
import {haveISystemPermission} from 'mattermost-redux/selectors/entities/roles'; import {haveISystemPermission} from 'mattermost-redux/selectors/entities/roles';

View File

@ -7,8 +7,7 @@ import {withRouter} from 'react-router-dom';
import {GlobalState} from 'types/store/index'; import {GlobalState} from 'types/store/index';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {Posts} from 'mattermost-redux/constants'; import {Posts} from 'mattermost-redux/constants';
import {getAllPosts, getPostIdsInChannel} from 'mattermost-redux/selectors/entities/posts'; import {getAllPosts, getPostIdsInChannel} from 'mattermost-redux/selectors/entities/posts';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';

View File

@ -18,7 +18,7 @@ import {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities
import {openDirectChannelToUserId} from 'actions/channel_actions'; import {openDirectChannelToUserId} from 'actions/channel_actions';
import {closeRightHandSide} from 'actions/views/rhs'; import {closeRightHandSide} from 'actions/views/rhs';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {displayUsername} from 'mattermost-redux/utils/user_utils'; import {displayUsername} from 'mattermost-redux/utils/user_utils';
import GroupMemberList, {GroupMember} from './group_member_list'; import GroupMemberList, {GroupMember} from './group_member_list';

View File

@ -1,14 +1,14 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {DataRetentionCustomPolicies, DataRetentionCustomPolicy} from '@mattermost/types/data_retention'; import {DataRetentionCustomPolicies, DataRetentionCustomPolicy} from '@mattermost/types/data_retention';
import {PluginStatusRedux} from '@mattermost/types/plugins'; import {PluginStatusRedux} from '@mattermost/types/plugins';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {LogObject} from '@mattermost/types/admin'; import {LogObject} from '@mattermost/types/admin';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
export function getLogs(state: GlobalState) { export function getLogs(state: GlobalState) {
return state.entities.admin.logs; return state.entities.admin.logs;
} }

View File

@ -1,12 +1,11 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {AppBinding} from '@mattermost/types/apps'; import {AppBinding} from '@mattermost/types/apps';
import {ClientConfig} from '@mattermost/types/config'; import {ClientConfig} from '@mattermost/types/config';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {AppBindingLocations} from 'mattermost-redux/constants/apps'; import {AppBindingLocations} from 'mattermost-redux/constants/apps';

View File

@ -1,11 +1,11 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {Bot} from '@mattermost/types/bots'; import {Bot} from '@mattermost/types/bots';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {getUsers} from 'mattermost-redux/selectors/entities/common'; import {getUsers} from 'mattermost-redux/selectors/entities/common';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
export const ExternalBotAccountNames: string[] = ['mattermost-advisor']; export const ExternalBotAccountNames: string[] = ['mattermost-advisor'];

View File

@ -3,8 +3,7 @@
import shallowEquals from 'shallow-equals'; import shallowEquals from 'shallow-equals';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {General, Preferences} from 'mattermost-redux/constants'; import {General, Preferences} from 'mattermost-redux/constants';
import {CategoryTypes} from 'mattermost-redux/constants/channel_categories'; import {CategoryTypes} from 'mattermost-redux/constants/channel_categories';

View File

@ -50,8 +50,7 @@ import {
import {createIdsSelector} from 'mattermost-redux/utils/helpers'; import {createIdsSelector} from 'mattermost-redux/utils/helpers';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import { import {
Channel, Channel,
ChannelMemberCountsByGroup, ChannelMemberCountsByGroup,

View File

@ -1,14 +1,14 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {ChannelMembership, Channel} from '@mattermost/types/channels'; import {ChannelMembership, Channel} from '@mattermost/types/channels';
import {TeamMembership} from '@mattermost/types/teams'; import {TeamMembership} from '@mattermost/types/teams';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {UserProfile} from '@mattermost/types/users'; import {UserProfile} from '@mattermost/types/users';
import {RelationOneToOne, IDMappedObjects} from '@mattermost/types/utilities'; import {RelationOneToOne, IDMappedObjects} from '@mattermost/types/utilities';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
const CALLS_PLUGIN = 'plugins-com.mattermost.calls'; const CALLS_PLUGIN = 'plugins-com.mattermost.calls';
type CallsConfig = { type CallsConfig = {

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {CustomEmoji} from '@mattermost/types/emojis'; import {CustomEmoji} from '@mattermost/types/emojis';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentUserLocale} from 'mattermost-redux/selectors/entities/i18n'; import {getCurrentUserLocale} from 'mattermost-redux/selectors/entities/i18n';
import {FileInfo, FileSearchResultItem} from '@mattermost/types/files'; import {FileInfo, FileSearchResultItem} from '@mattermost/types/files';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {General} from 'mattermost-redux/constants'; import {General} from 'mattermost-redux/constants';
import {isMinimumServerVersion} from 'mattermost-redux/utils/helpers'; import {isMinimumServerVersion} from 'mattermost-redux/utils/helpers';

View File

@ -1,15 +1,14 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {GlobalState} from '@mattermost/types/store';
import {Group, GroupSource} from '@mattermost/types/groups'; import {Group, GroupSource} from '@mattermost/types/groups';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {filterGroupsMatchingTerm, sortGroups} from 'mattermost-redux/utils/group_utils'; import {filterGroupsMatchingTerm, sortGroups} from 'mattermost-redux/utils/group_utils';
import {getChannel} from 'mattermost-redux/selectors/entities/channels'; import {getChannel} from 'mattermost-redux/selectors/entities/channels';
import {getTeam} from 'mattermost-redux/selectors/entities/teams'; import {getTeam} from 'mattermost-redux/selectors/entities/teams';
import {UserMentionKey} from 'mattermost-redux/selectors/entities/users'; import {UserMentionKey} from 'mattermost-redux/selectors/entities/users';
import {GlobalState} from '@mattermost/types/store';
import {getCurrentUserLocale} from './i18n'; import {getCurrentUserLocale} from './i18n';

View File

@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {TimeFrame, TimeFrames, TopReaction} from '@mattermost/types/insights'; import {TimeFrame, TimeFrames, TopReaction} from '@mattermost/types/insights';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {OutgoingWebhook, Command} from '@mattermost/types/integrations'; import {OutgoingWebhook, Command} from '@mattermost/types/integrations';

View File

@ -1,12 +1,12 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {JobType, Job, JobsByType} from '@mattermost/types/jobs'; import {JobType, Job, JobsByType} from '@mattermost/types/jobs';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {IDMappedObjects} from '@mattermost/types/utilities'; import {IDMappedObjects} from '@mattermost/types/utilities';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
export function getAllJobs(state: GlobalState): IDMappedObjects<Job> { export function getAllJobs(state: GlobalState): IDMappedObjects<Job> {
return state.entities.jobs.jobs; return state.entities.jobs.jobs;
} }

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {Posts, Preferences} from 'mattermost-redux/constants'; import {Posts, Preferences} from 'mattermost-redux/constants';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/common'; import {getCurrentUser} from 'mattermost-redux/selectors/entities/common';
import {getMyPreferences} from 'mattermost-redux/selectors/entities/preferences'; import {getMyPreferences} from 'mattermost-redux/selectors/entities/preferences';
import {getUsers, getCurrentUserId, getUserStatuses} from 'mattermost-redux/selectors/entities/users'; import {getUsers, getCurrentUserId, getUserStatuses} from 'mattermost-redux/selectors/entities/users';

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {General, Preferences} from 'mattermost-redux/constants'; import {General, Preferences} from 'mattermost-redux/constants';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getConfig, getFeatureFlagValue, getLicense} from 'mattermost-redux/selectors/entities/general'; import {getConfig, getFeatureFlagValue, getLicense} from 'mattermost-redux/selectors/entities/general';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';
import {isGuest} from 'mattermost-redux/utils/user_utils'; import {isGuest} from 'mattermost-redux/utils/user_utils';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/common'; import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/common';
import { import {
getMySystemPermissions, getMySystemPermissions,

View File

@ -1,14 +1,13 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/common';
import {Role} from '@mattermost/types/roles'; import {Role} from '@mattermost/types/roles';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {UserProfile} from '@mattermost/types/users'; import {UserProfile} from '@mattermost/types/users';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/common';
export type PermissionsOptions = { export type PermissionsOptions = {
channel?: string; channel?: string;
team?: string; team?: string;

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {ScopeTypes} from 'mattermost-redux/constants/schemes'; import {ScopeTypes} from 'mattermost-redux/constants/schemes';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getAllChannels} from 'mattermost-redux/selectors/entities/channels'; import {getAllChannels} from 'mattermost-redux/selectors/entities/channels';
import {getTeams} from 'mattermost-redux/selectors/entities/teams'; import {getTeams} from 'mattermost-redux/selectors/entities/teams';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {getCurrentUserMentionKeys, UserMentionKey} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserMentionKeys, UserMentionKey} from 'mattermost-redux/selectors/entities/users';
import {getMyGroupMentionKeys} from 'mattermost-redux/selectors/entities/groups'; import {getMyGroupMentionKeys} from 'mattermost-redux/selectors/entities/groups';

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {Permissions} from 'mattermost-redux/constants'; import {Permissions} from 'mattermost-redux/constants';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getConfig, isCompatibleWithJoinViewTeamPermissions} from 'mattermost-redux/selectors/entities/general'; import {getConfig, isCompatibleWithJoinViewTeamPermissions} from 'mattermost-redux/selectors/entities/general';
import {haveISystemPermission} from 'mattermost-redux/selectors/entities/roles_helpers'; import {haveISystemPermission} from 'mattermost-redux/selectors/entities/roles_helpers';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';

View File

@ -5,7 +5,8 @@ import timezones from 'timezones.json';
import {GlobalState} from '@mattermost/types/store'; import {GlobalState} from '@mattermost/types/store';
import {UserProfile} from '@mattermost/types/users'; import {UserProfile} from '@mattermost/types/users';
import {createSelector} from 'reselect';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getTimezoneLabel, getUserCurrentTimezone} from 'mattermost-redux/utils/timezone_utils'; import {getTimezoneLabel, getUserCurrentTimezone} from 'mattermost-redux/utils/timezone_utils';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getUsers} from 'mattermost-redux/selectors/entities/common'; import {getUsers} from 'mattermost-redux/selectors/entities/common';
import {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences'; import {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import { import {
getCurrentChannelId, getCurrentChannelId,
getCurrentUser, getCurrentUser,

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getMyChannelMemberships, getAllDmChannels} from 'mattermost-redux/selectors/entities/channels'; import {getMyChannelMemberships, getAllDmChannels} from 'mattermost-redux/selectors/entities/channels';
import {getCurrentUserId, getUserStatuses} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId, getUserStatuses} from 'mattermost-redux/selectors/entities/users';

View File

@ -3,7 +3,7 @@
import shallowEqual from 'shallow-equals'; import shallowEqual from 'shallow-equals';
import * as reselect from 'reselect'; import {createSelectorCreator, defaultMemoize} from 'mattermost-redux/selectors/create_selector';
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/ban-types
export function memoizeResult<F extends Function>(func: F, measure: Function | undefined = undefined): F { export function memoizeResult<F extends Function>(func: F, measure: Function | undefined = undefined): F {
@ -32,10 +32,10 @@ export function memoizeResult<F extends Function>(func: F, measure: Function | u
// Use this selector when you want a shallow comparison of the arguments and you want to memoize the result // Use this selector when you want a shallow comparison of the arguments and you want to memoize the result
// try and use this only when your selector returns an array of ids // try and use this only when your selector returns an array of ids
export const createIdsSelector = reselect.createSelectorCreator(memoizeResult); export const createIdsSelector = createSelectorCreator(memoizeResult);
// Use this selector when you want a shallow comparison of the arguments and you don't need to memoize the result // Use this selector when you want a shallow comparison of the arguments and you don't need to memoize the result
export const createShallowSelector = reselect.createSelectorCreator(reselect.defaultMemoize, shallowEqual as any); export const createShallowSelector = createSelectorCreator(defaultMemoize, shallowEqual as any);
// isMinimumServerVersion will return true if currentVersion is equal to higher or than the // isMinimumServerVersion will return true if currentVersion is equal to higher or than the
// the provided minimum version. A non-equal major version will ignore minor and dot // the provided minimum version. A non-equal major version will ignore minor and dot

View File

@ -3,10 +3,9 @@
import moment from 'moment-timezone'; import moment from 'moment-timezone';
import * as reselect from 'reselect';
import {Posts, Preferences} from 'mattermost-redux/constants'; import {Posts, Preferences} from 'mattermost-redux/constants';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {makeGetPostsForIds, UserActivityPost} from 'mattermost-redux/selectors/entities/posts'; import {makeGetPostsForIds, UserActivityPost} from 'mattermost-redux/selectors/entities/posts';
import {getBool} from 'mattermost-redux/selectors/entities/preferences'; import {getBool} from 'mattermost-redux/selectors/entities/preferences';
import {isTimezoneEnabled} from 'mattermost-redux/selectors/entities/timezone'; import {isTimezoneEnabled} from 'mattermost-redux/selectors/entities/timezone';
@ -275,7 +274,7 @@ export function makeGenerateCombinedPost(): (state: GlobalState, combinedId: str
const getPostsForIds = makeGetPostsForIds(); const getPostsForIds = makeGetPostsForIds();
const getPostIds = memoizeResult(getPostIdsForCombinedUserActivityPost); const getPostIds = memoizeResult(getPostIdsForCombinedUserActivityPost);
return reselect.createSelector( return createSelector(
'makeGenerateCombinedPost', 'makeGenerateCombinedPost',
(state: GlobalState, combinedId: string) => combinedId, (state: GlobalState, combinedId: string) => combinedId,
(state: GlobalState, combinedId: string) => getPostsForIds(state, getPostIds(combinedId)), (state: GlobalState, combinedId: string) => getPostsForIds(state, getPostIds(combinedId)),

View File

@ -3,8 +3,7 @@
import {cloneDeep} from 'lodash'; import {cloneDeep} from 'lodash';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getMySystemPermissions} from 'mattermost-redux/selectors/entities/roles_helpers'; import {getMySystemPermissions} from 'mattermost-redux/selectors/entities/roles_helpers';
import {ResourceToSysConsolePermissionsTable, RESOURCE_KEYS} from 'mattermost-redux/constants/permissions_sysconsole'; import {ResourceToSysConsolePermissionsTable, RESOURCE_KEYS} from 'mattermost-redux/constants/permissions_sysconsole';

View File

@ -4,7 +4,7 @@
import {Invoice, Subscription} from '@mattermost/types/cloud'; import {Invoice, Subscription} from '@mattermost/types/cloud';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {GlobalState} from 'types/store'; import {GlobalState} from 'types/store';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getMyActiveChannelIds} from 'mattermost-redux/selectors/entities/channels'; import {getMyActiveChannelIds} from 'mattermost-redux/selectors/entities/channels';
import {get, onboardingTourTipsEnabled} from 'mattermost-redux/selectors/entities/preferences'; import {get, onboardingTourTipsEnabled} from 'mattermost-redux/selectors/entities/preferences';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCustomEmojisByName} from 'mattermost-redux/selectors/entities/emojis'; import {getCustomEmojisByName} from 'mattermost-redux/selectors/entities/emojis';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';

View File

@ -1,9 +1,10 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {GlobalState} from 'types/store'; import {GlobalState} from 'types/store';
import {StaticPage} from 'types/store/lhs'; import {StaticPage} from 'types/store/lhs';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {makeGetDraftsCount} from 'selectors/drafts'; import {makeGetDraftsCount} from 'selectors/drafts';
import { import {
insightsAreEnabled, insightsAreEnabled,

View File

@ -3,8 +3,7 @@
import {isMobile} from 'utils/utils'; import {isMobile} from 'utils/utils';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {makeGetCategory, getBool} from 'mattermost-redux/selectors/entities/preferences'; import {makeGetCategory, getBool} from 'mattermost-redux/selectors/entities/preferences';
import {getCurrentUser, isFirstAdmin} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUser, isFirstAdmin} from 'mattermost-redux/selectors/entities/users';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {appBarEnabled, getAppBarAppBindings} from 'mattermost-redux/selectors/entities/apps'; import {appBarEnabled, getAppBarAppBindings} from 'mattermost-redux/selectors/entities/apps';
import {createShallowSelector} from 'mattermost-redux/utils/helpers'; import {createShallowSelector} from 'mattermost-redux/utils/helpers';

View File

@ -1,10 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {Post} from '@mattermost/types/posts'; import {Post} from '@mattermost/types/posts';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getPost} from 'mattermost-redux/selectors/entities/posts'; import {getPost} from 'mattermost-redux/selectors/entities/posts';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {makeGetChannel} from 'mattermost-redux/selectors/entities/channels'; import {makeGetChannel} from 'mattermost-redux/selectors/entities/channels';
import {Post, PostType} from '@mattermost/types/posts'; import {Post, PostType} from '@mattermost/types/posts';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import { import {
getAllChannels, getAllChannels,
getCurrentChannelId, getCurrentChannelId,

View File

@ -3,8 +3,7 @@
import moment from 'moment-timezone'; import moment from 'moment-timezone';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentTimezone} from 'mattermost-redux/selectors/entities/timezone'; import {getCurrentTimezone} from 'mattermost-redux/selectors/entities/timezone';
import {getCurrentUser, getUser} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUser, getUser} from 'mattermost-redux/selectors/entities/users';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';

View File

@ -1,11 +1,11 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect';
import {isPlugin} from 'mattermost-redux/utils/marketplace';
import type {MarketplaceApp, MarketplacePlugin} from '@mattermost/types/marketplace'; import type {MarketplaceApp, MarketplacePlugin} from '@mattermost/types/marketplace';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {isPlugin} from 'mattermost-redux/utils/marketplace';
import {GlobalState} from 'types/store'; import {GlobalState} from 'types/store';
export const getPlugins = (state: GlobalState): MarketplacePlugin[] => state.views.marketplace.plugins; export const getPlugins = (state: GlobalState): MarketplacePlugin[] => state.views.marketplace.plugins;

View File

@ -3,8 +3,7 @@
import moment from 'moment'; import moment from 'moment';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {makeGetPostsForIds} from 'mattermost-redux/selectors/entities/posts'; import {makeGetPostsForIds} from 'mattermost-redux/selectors/entities/posts';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {getThreads} from 'mattermost-redux/selectors/entities/threads'; import {getThreads} from 'mattermost-redux/selectors/entities/threads';

View File

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getFeatureFlagValue, getLicense} from 'mattermost-redux/selectors/entities/general'; import {getFeatureFlagValue, getLicense} from 'mattermost-redux/selectors/entities/general';
import {GlobalState} from 'types/store'; import {GlobalState} from 'types/store';
import {haveICurrentTeamPermission} from 'mattermost-redux/selectors/entities/roles'; import {haveICurrentTeamPermission} from 'mattermost-redux/selectors/entities/roles';

View File

@ -4,8 +4,7 @@
import {useCallback} from 'react'; import {useCallback} from 'react';
import {useSelector, useDispatch, shallowEqual} from 'react-redux'; import {useSelector, useDispatch, shallowEqual} from 'react-redux';
import {createSelector} from 'reselect'; import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';

View File

@ -2,17 +2,14 @@
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {IntlShape, useIntl} from 'react-intl'; import {IntlShape, useIntl} from 'react-intl';
import {useMemo} from 'react'; import {useMemo} from 'react';
import {useSelector} from 'react-redux'; import {useSelector} from 'react-redux';
import {createSelector} from 'reselect';
import {Client4} from 'mattermost-redux/client'; import {Client4} from 'mattermost-redux/client';
import {Permissions, Posts} from 'mattermost-redux/constants'; import {Permissions, Posts} from 'mattermost-redux/constants';
import {createSelector} from 'mattermost-redux/selectors/create_selector';
import {getChannel} from 'mattermost-redux/selectors/entities/channels'; import {getChannel} from 'mattermost-redux/selectors/entities/channels';
import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {makeGetReactionsForPost} from 'mattermost-redux/selectors/entities/posts'; import {makeGetReactionsForPost} from 'mattermost-redux/selectors/entities/posts';

View File

@ -25,7 +25,6 @@
"composite": true, "composite": true,
"paths": { "paths": {
"mattermost-redux/*": ["packages/mattermost-redux/src/*"], "mattermost-redux/*": ["packages/mattermost-redux/src/*"],
"reselect": ["packages/reselect/src"],
"@mui/styled-engine": ["./node_modules/@mui/styled-engine-sc"], "@mui/styled-engine": ["./node_modules/@mui/styled-engine-sc"],
} }
}, },

View File

@ -134,7 +134,6 @@ var config = {
alias: { alias: {
'mattermost-redux/test': 'packages/mattermost-redux/test', 'mattermost-redux/test': 'packages/mattermost-redux/test',
'mattermost-redux': 'packages/mattermost-redux/src', 'mattermost-redux': 'packages/mattermost-redux/src',
reselect: 'packages/reselect/src',
'@mui/styled-engine': '@mui/styled-engine-sc', '@mui/styled-engine': '@mui/styled-engine-sc',
}, },
extensions: ['.ts', '.tsx', '.js', '.jsx'], extensions: ['.ts', '.tsx', '.js', '.jsx'],

View File

@ -28284,9 +28284,9 @@
"dev": true "dev": true
}, },
"node_modules/reselect": { "node_modules/reselect": {
"version": "4.1.7", "version": "4.1.8",
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.7.tgz", "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
"integrity": "sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A==" "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ=="
}, },
"node_modules/resize-observer-polyfill": { "node_modules/resize-observer-polyfill": {
"version": "1.5.1", "version": "1.5.1",
@ -33824,6 +33824,7 @@
"react-select": "4.3.1", "react-select": "4.3.1",
"react-use": "17.3.2", "react-use": "17.3.2",
"redux": "4.1.2", "redux": "4.1.2",
"reselect": "4.1.8",
"styled-components": "5.3.3", "styled-components": "5.3.3",
"typescript": "4.7.4" "typescript": "4.7.4"
}, },
@ -55522,6 +55523,7 @@
"redux": "4.1.2", "redux": "4.1.2",
"redux-mock-store": "1.5.4", "redux-mock-store": "1.5.4",
"redux-thunk": "2.4.1", "redux-thunk": "2.4.1",
"reselect": "4.1.8",
"style-loader": "3.3.1", "style-loader": "3.3.1",
"styled-components": "5.3.3", "styled-components": "5.3.3",
"ts-prune": "0.10.3", "ts-prune": "0.10.3",
@ -58110,9 +58112,9 @@
"dev": true "dev": true
}, },
"reselect": { "reselect": {
"version": "4.1.7", "version": "4.1.8",
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.7.tgz", "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
"integrity": "sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A==" "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ=="
}, },
"resize-observer-polyfill": { "resize-observer-polyfill": {
"version": "1.5.1", "version": "1.5.1",

View File

@ -10,7 +10,6 @@ const config = {
'^@mattermost/(client)$': '<rootDir>/../platform/$1/src', '^@mattermost/(client)$': '<rootDir>/../platform/$1/src',
'^@mattermost/(types)/(.*)$': '<rootDir>/../platform/$1/src/$2', '^@mattermost/(types)/(.*)$': '<rootDir>/../platform/$1/src/$2',
'^mattermost-redux/(.*)$': '<rootDir>/../channels/src/packages/mattermost-redux/src/$1', '^mattermost-redux/(.*)$': '<rootDir>/../channels/src/packages/mattermost-redux/src/$1',
'^reselect$': '<rootDir>/../channels/src/packages/reselect/src',
'^src/(.*)$': '<rootDir>/src/$1', '^src/(.*)$': '<rootDir>/src/$1',
}, },
testEnvironment: 'jsdom', testEnvironment: 'jsdom',

View File

@ -35,6 +35,7 @@
"react-select": "4.3.1", "react-select": "4.3.1",
"react-use": "17.3.2", "react-use": "17.3.2",
"redux": "4.1.2", "redux": "4.1.2",
"reselect": "4.1.8",
"styled-components": "5.3.3", "styled-components": "5.3.3",
"typescript": "4.7.4" "typescript": "4.7.4"
}, },

View File

@ -32,7 +32,6 @@ export interface Props {
} }
const getAllPublicChannelsInTeam = (teamId: string) => createSelector( const getAllPublicChannelsInTeam = (teamId: string) => createSelector(
'getAllPublicChannelsInTeam',
getAllChannels, getAllChannels,
getChannelsInTeam, getChannelsInTeam,
(allChannels: IDMappedObjects<Channel>, channelsByTeam: RelationOneToMany<Team, Channel>): Channel[] => { (allChannels: IDMappedObjects<Channel>, channelsByTeam: RelationOneToMany<Team, Channel>): Channel[] => {
@ -48,7 +47,6 @@ const getAllPublicChannelsInTeam = (teamId: string) => createSelector(
); );
const getMyPublicAndPrivateChannelsInTeam = (teamId: string) => createSelector( const getMyPublicAndPrivateChannelsInTeam = (teamId: string) => createSelector(
'getMyPublicAndPrivateChannelsInTeam',
getAllChannels, getAllChannels,
getChannelsInTeam, getChannelsInTeam,
getMyChannelMemberships, getMyChannelMemberships,

View File

@ -96,7 +96,6 @@ export const canIPostUpdateForRun = (state: GlobalState, channelId: string, team
}; };
export const inPlaybookRunChannel = createSelector( export const inPlaybookRunChannel = createSelector(
'inPlaybookRunChannel',
getCurrentTeamId, getCurrentTeamId,
getCurrentChannelId, getCurrentChannelId,
myPlaybookRunsByTeam, myPlaybookRunsByTeam,
@ -106,7 +105,6 @@ export const inPlaybookRunChannel = createSelector(
); );
export const currentPlaybookRun = createSelector( export const currentPlaybookRun = createSelector(
'currentPlaybookRun',
getCurrentTeamId, getCurrentTeamId,
getCurrentChannelId, getCurrentChannelId,
myPlaybookRunsByTeam, myPlaybookRunsByTeam,
@ -118,7 +116,6 @@ export const currentPlaybookRun = createSelector(
const emptyChecklistState = {} as Record<number, boolean>; const emptyChecklistState = {} as Record<number, boolean>;
export const currentChecklistCollapsedState = (stateKey: string) => createSelector( export const currentChecklistCollapsedState = (stateKey: string) => createSelector(
'currentChecklistCollapsedState',
pluginState, pluginState,
(plugin) => { (plugin) => {
return plugin.checklistCollapsedState[stateKey] ?? emptyChecklistState; return plugin.checklistCollapsedState[stateKey] ?? emptyChecklistState;
@ -126,7 +123,6 @@ export const currentChecklistCollapsedState = (stateKey: string) => createSelect
); );
export const currentChecklistAllCollapsed = (stateKey: string) => createSelector( export const currentChecklistAllCollapsed = (stateKey: string) => createSelector(
'currentChecklistAllCollapsed',
currentChecklistCollapsedState(stateKey), currentChecklistCollapsedState(stateKey),
(checklistsState) => { (checklistsState) => {
if (Object.entries(checklistsState).length === 0) { if (Object.entries(checklistsState).length === 0) {
@ -147,7 +143,6 @@ export const currentChecklistItemsFilter = (state: GlobalState, stateKey: string
}; };
export const myActivePlaybookRunsList = createSelector( export const myActivePlaybookRunsList = createSelector(
'myActivePlaybookRunsList',
getCurrentTeamId, getCurrentTeamId,
myPlaybookRunsByTeam, myPlaybookRunsByTeam,
(teamId, playbookRunMapByTeam) => { (teamId, playbookRunMapByTeam) => {
@ -169,7 +164,6 @@ export const myPlaybookRunsMap = (state: GlobalState) => {
}; };
export const lastUpdatedByPlaybookRunId = createSelector( export const lastUpdatedByPlaybookRunId = createSelector(
'lastUpdatedByPlaybookRunId',
getCurrentTeamId, getCurrentTeamId,
myPlaybookRunsByTeam, myPlaybookRunsByTeam,
(teamId, playbookRunsMapByTeam) => { (teamId, playbookRunsMapByTeam) => {
@ -225,7 +219,6 @@ export const isPlaybookActionsModalVisible = (state: GlobalState): boolean =>
pluginState(state).playbookActionsModalVisibility; pluginState(state).playbookActionsModalVisibility;
export const isCurrentUserAdmin = createSelector( export const isCurrentUserAdmin = createSelector(
'isCurrentUserAdmin',
getCurrentUser, getCurrentUser,
(user) => { (user) => {
const rolesArray = user.roles.split(' '); const rolesArray = user.roles.split(' ');
@ -234,7 +227,6 @@ export const isCurrentUserAdmin = createSelector(
); );
export const isCurrentUserChannelAdmin = createSelector( export const isCurrentUserChannelAdmin = createSelector(
'isCurrentUserChannelAdmin',
getMyCurrentChannelMembership, getMyCurrentChannelMembership,
(membership) => { (membership) => {
return membership?.scheme_admin || false; return membership?.scheme_admin || false;
@ -242,7 +234,6 @@ export const isCurrentUserChannelAdmin = createSelector(
); );
export const isCurrentUserChannelMember = (channelId: string) => createSelector( export const isCurrentUserChannelMember = (channelId: string) => createSelector(
'isCurrentUserChannelMember',
getMyChannelMemberships, getMyChannelMemberships,
(memberships) => { (memberships) => {
return memberships[channelId]?.scheme_user || memberships[channelId]?.scheme_admin || false; return memberships[channelId]?.scheme_user || memberships[channelId]?.scheme_admin || false;
@ -252,7 +243,6 @@ export const isCurrentUserChannelMember = (channelId: string) => createSelector(
export const hasViewedByChannelID = (state: GlobalState) => pluginState(state).hasViewedByChannel; export const hasViewedByChannelID = (state: GlobalState) => pluginState(state).hasViewedByChannel;
export const isTeamEdition = createSelector( export const isTeamEdition = createSelector(
'isTeamEdition',
getConfig, getConfig,
(config) => config.BuildEnterpriseReady !== 'true', (config) => config.BuildEnterpriseReady !== 'true',
); );
@ -260,7 +250,6 @@ export const isTeamEdition = createSelector(
const rhsAboutCollapsedState = (state: GlobalState): Record<string, boolean> => pluginState(state).rhsAboutCollapsedByChannel; const rhsAboutCollapsedState = (state: GlobalState): Record<string, boolean> => pluginState(state).rhsAboutCollapsedByChannel;
export const currentRHSAboutCollapsedState = createSelector( export const currentRHSAboutCollapsedState = createSelector(
'currentRHSAboutCollapsedState',
getCurrentChannelId, getCurrentChannelId,
rhsAboutCollapsedState, rhsAboutCollapsedState,
(channelId, stateByChannel) => { (channelId, stateByChannel) => {
@ -280,7 +269,6 @@ export const selectExperimentalFeatures = (state: GlobalState) => Boolean(global
// Select tasks assigned to the current user, or unassigned but belonging to a run owned by the // Select tasks assigned to the current user, or unassigned but belonging to a run owned by the
// current user. // current user.
export const selectMyTasks = createSelector( export const selectMyTasks = createSelector(
'selectMyTasks',
myPlaybookRuns, myPlaybookRuns,
getCurrentUser, getCurrentUser,
(playbookRuns, currentUser) => Object (playbookRuns, currentUser) => Object
@ -331,7 +319,6 @@ export const isTaskOverdue = (item: ChecklistItem) => {
// Determine if there are overdue tasks assigned to the current user, or unassigned but belonging // Determine if there are overdue tasks assigned to the current user, or unassigned but belonging
// to a run owned by the current user. // to a run owned by the current user.
export const selectHasOverdueTasks = createSelector( export const selectHasOverdueTasks = createSelector(
'hasOverdueTasks',
selectMyTasks, selectMyTasks,
(myTasks) => myTasks.some((checklistItem) => isTaskOverdue(checklistItem)) (myTasks) => myTasks.some((checklistItem) => isTaskOverdue(checklistItem))
); );

View File

@ -25,7 +25,6 @@
"paths": { "paths": {
"src": ["src"], "src": ["src"],
"mattermost-redux/*": ["../channels/src/packages/mattermost-redux/src/*"], "mattermost-redux/*": ["../channels/src/packages/mattermost-redux/src/*"],
"reselect": ["../channels/src/packages/reselect/src"]
} }
}, },
"include": [ "include": [

View File

@ -23,7 +23,6 @@ const config = {
alias: { alias: {
src: path.resolve(__dirname, './src/'), src: path.resolve(__dirname, './src/'),
'mattermost-redux': path.resolve(__dirname, '../channels/src/packages/mattermost-redux/src/'), 'mattermost-redux': path.resolve(__dirname, '../channels/src/packages/mattermost-redux/src/'),
reselect: path.resolve(__dirname, '../channels/src/packages/reselect/src/index'),
'@mattermost/client': path.resolve(__dirname, '../platform/client/src/'), '@mattermost/client': path.resolve(__dirname, '../platform/client/src/'),
'@mattermost/components': path.resolve(__dirname, '../platform/components/src/'), '@mattermost/components': path.resolve(__dirname, '../platform/components/src/'),
}, },