• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript reselect.createStructuredSelector函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中reselect.createStructuredSelector函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createStructuredSelector函数的具体用法?TypeScript createStructuredSelector怎么用?TypeScript createStructuredSelector使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了createStructuredSelector函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: createStructuredSelector

import { connect } from '../../helpers/migration';

import { Teamspaces } from './teamspaces.component';
import { selectCurrentTeamspace } from '../../modules/currentUser';
import { TeamspacesActions,
	selectIsPending,
	selectTeamspaces,
	selectActiveProject,
	selectActiveTeamspace
} from '../../modules/teamspaces';
import { ModelActions } from './../../modules/model';
import { DialogActions } from '../../modules/dialog';
const mapStateToProps = createStructuredSelector({
	currentTeamspace: selectCurrentTeamspace,
	teamspaces: selectTeamspaces,
	isPending: selectIsPending,
	activeProject: selectActiveProject,
	activeTeamspace: selectActiveTeamspace
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	showDialog: DialogActions.showDialog,
	showConfirmDialog: DialogActions.showConfirmDialog,
	createProject: TeamspacesActions.createProject,
	updateProject: TeamspacesActions.updateProject,
	removeProject: TeamspacesActions.removeProject,
	createModel: TeamspacesActions.createModel,
	updateModel: TeamspacesActions.updateModel,
	removeModel: TeamspacesActions.removeModel,
	fetchTeamspaces: TeamspacesActions.fetchTeamspaces,
	downloadModel: ModelActions.downloadModel,
开发者ID:3drepo,项目名称:3drepo.io,代码行数:31,代码来源:teamspaces.container.ts


示例2: createStructuredSelector

 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';
import { withRouter } from 'react-router-dom';
import { connect, addRouting } from '../../helpers/migration';

import { Dashboard } from './dashboard.component';
import {
	selectCurrentUser,
	selectIsInitialised,
	selectIsAvatarPending,
	selectIsPending,
	CurrentUserActions
} from '../../modules/currentUser';

const mapStateToProps = createStructuredSelector({
	currentUser: selectCurrentUser,
	isInitialised: selectIsInitialised,
	isPending: selectIsPending,
	isAvatarPending: selectIsAvatarPending
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	fetchUser: CurrentUserActions.fetchUser
}, dispatch);

export default addRouting(withRouter(connect(mapStateToProps, mapDispatchToProps)(Dashboard)));
开发者ID:3drepo,项目名称:3drepo.io,代码行数:30,代码来源:dashboard.container.ts


示例3: createStructuredSelector

 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import { connect } from '../../helpers/migration';
import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';

import { ProjectsPermissions } from './projectsPermissions.component';
import { selectExtendedProjectPermissions, UserManagementActions } from '../../modules/userManagement';

const mapStateToProps = createStructuredSelector({
	permissions: selectExtendedProjectPermissions
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	onPermissionsChange: UserManagementActions.updateProjectPermissions
}, dispatch);

export default connect(mapStateToProps, mapDispatchToProps)(ProjectsPermissions);
开发者ID:3drepo,项目名称:3drepo.io,代码行数:30,代码来源:projectsPermissions.container.ts


示例4: createStructuredSelector

 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';
import { connect } from '../../helpers/migration';

import { History } from './history.component';
import { selectCurrentTeamspace } from './../../modules/currentUser';
import { BillingActions, selectInvoices, selectIsPending } from './../../modules/billing';

const mapStateToProps = createStructuredSelector({
	teamspace: selectCurrentTeamspace,
	invoices: selectInvoices,
	isLoadingBilling: selectIsPending
});

export const mapDispatchToProps = (dispatch) =>
	bindActionCreators({
		fetchInvoices: BillingActions.fetchInvoices,
		downloadInvoice: BillingActions.downloadInvoice
	}, dispatch);

export default connect(
	mapStateToProps,
	mapDispatchToProps
)(History);
开发者ID:3drepo,项目名称:3drepo.io,代码行数:30,代码来源:history.container.ts


示例5: createStructuredSelector

 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';
import { connect } from '../../helpers/migration';
import { ModelActions, selectSettings, selectIsPending } from './../../modules/model';
import { ModelSettings } from './modelSettings.component';
import { selectCurrentTeamspace } from './../../modules/userManagement';

const mapStateToProps = createStructuredSelector({
	currentTeamspace: selectCurrentTeamspace,
	modelSettings: selectSettings,
	isSettingsLoading: selectIsPending
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	fetchModelSettings: ModelActions.fetchSettings,
	updateModelSettings: ModelActions.updateSettings
}, dispatch);

export default connect(mapStateToProps, mapDispatchToProps)(ModelSettings);
开发者ID:3drepo,项目名称:3drepo.io,代码行数:30,代码来源:modelSettings.container.ts


示例6: createStructuredSelector

 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';
import { withRouter } from 'react-router-dom';
import { connect, addRouting } from '../../helpers/migration';

import { PasswordChange } from './passwordChange.component';
import { AuthActions, selectIsPending, selectMessage } from '../../modules/auth';

const mapStateToProps = createStructuredSelector({
	isPending: selectIsPending,
	message: selectMessage
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	changePassword: AuthActions.changePassword,
	clearMessage: AuthActions.clearAuthMessage
}, dispatch);

export default addRouting(withRouter(connect(mapStateToProps, mapDispatchToProps)(PasswordChange)));
开发者ID:3drepo,项目名称:3drepo.io,代码行数:30,代码来源:passwordChange.container.ts


示例7: createStructuredSelector

import {
	CurrentUserActions,
	selectCurrentTeamspace,
	selectSpaceInfo
} from '../../modules/currentUser';
import {
	BillingActions,
	selectLicencesInfo,
	selectBillingInfo,
	selectIsPending
} from '../../modules/billing';

const mapStateToProps = createStructuredSelector({
	billingInfo: selectBillingInfo,
	teamspace: selectCurrentTeamspace,
	spaceInfo: selectSpaceInfo,
	licencesInfo: selectLicencesInfo,
	isLoadingBilling: selectIsPending
});

export const mapDispatchToProps = (dispatch) =>
	bindActionCreators(
		{
			fetchQuotaInfo: CurrentUserActions.fetchQuotaInfo,
			fetchBillingData: BillingActions.fetchBillingData,
			changeSubscription: BillingActions.changeSubscription
		},
		dispatch
	);

export default connect(
开发者ID:3drepo,项目名称:3drepo.io,代码行数:31,代码来源:subscription.container.ts


示例8: createStructuredSelector

	selectSelectedFilters,
	selectShowPins,
	selectIsRisksPending,
	selectSortOrder,
	selectFetchingDetailsIsPending
} from '../../../../modules/risks';
import { selectJobsList } from '../../../../modules/jobs';
import { selectSettings } from '../../../../modules/model';

const mapStateToProps = createStructuredSelector({
	modelSettings: selectSettings,
	risks: selectRisks,
	jobs: selectJobsList,
	activeRiskId: selectActiveRiskId,
	activeRiskDetails: selectActiveRiskDetails,
	showPins: selectShowPins,
	showDetails: selectShowDetails,
	searchEnabled: selectSearchEnabled,
	selectedFilters: selectSelectedFilters,
	isPending: selectIsRisksPending,
	fetchingDetailsIsPending: selectFetchingDetailsIsPending,
	sortOrder: selectSortOrder
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	fetchRisks: RisksActions.fetchRisks,
	setState: RisksActions.setComponentState,
	setNewRisk: RisksActions.setNewRisk,
	downloadRisks: RisksActions.downloadRisks,
	printRisks: RisksActions.printRisks,
	setActiveRisk: RisksActions.setActiveRisk,
	showRiskDetails: RisksActions.showDetails,
开发者ID:3drepo,项目名称:3drepo.io,代码行数:32,代码来源:risks.container.ts


示例9: createStructuredSelector

import {
	UserManagementActions,
	selectCurrentTeamspace,
	selectIsPending,
	selectIsTeamspaceAdmin
} from '../../modules/userManagement';

import { selectTeamspacesWithAdminAccess } from '../../modules/teamspaces/teamspaces.selectors';

import {
	selectCurrentTeamspace as selectDefaultTeamspace,
	selectCurrentUser
} from '../../modules/currentUser';
import { TeamspacesActions } from '../../modules/teamspaces';

const mapStateToProps = createStructuredSelector({
	defaultTeamspace: selectDefaultTeamspace,
	selectedTeamspace: selectCurrentTeamspace,
	teamspaces: selectTeamspacesWithAdminAccess,
	isTeamspaceAdmin: selectIsTeamspaceAdmin,
	isLoadingTeamspace: selectIsPending,
	currentUser: selectCurrentUser
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	fetchTeamspaces: TeamspacesActions.fetchTeamspaces,
	onTeamspaceChange: UserManagementActions.fetchTeamspaceDetails
}, dispatch);

export default connect(mapStateToProps, mapDispatchToProps)(UserManagement);
开发者ID:3drepo,项目名称:3drepo.io,代码行数:30,代码来源:userManagement.container.ts


示例10: createStructuredSelector

	IssuesActions,
	selectActiveIssueDetails,
	selectExpandDetails,
	selectFetchingDetailsIsPending,
	selectNewComment,
	selectFailedToLoad
} from '../../../../../../modules/issues';
import { selectSettings, selectTopicTypes } from '../../../../../../modules/model';
import { IssueDetails } from './issueDetails.component';

const mapStateToProps = createStructuredSelector({
	issue: selectActiveIssueDetails,
	jobs: selectJobsList,
	expandDetails: selectExpandDetails,
	fetchingDetailsIsPending: selectFetchingDetailsIsPending,
	newComment: selectNewComment,
	myJob: selectMyJob,
	currentUser: selectCurrentUser,
	settings: selectSettings,
	topicTypes: selectTopicTypes,
	failedToLoad: selectFailedToLoad
});

export const mapDispatchToProps = (dispatch) => bindActionCreators({
	setState: IssuesActions.setComponentState,
	fetchIssue: IssuesActions.fetchIssue,
	saveIssue: IssuesActions.saveIssue,
	updateIssue: IssuesActions.updateIssue,
	postComment: IssuesActions.postComment,
	removeComment: IssuesActions.removeComment,
	showNewPin: IssuesActions.showNewPin,
	subscribeOnIssueCommentsChanges: IssuesActions.subscribeOnIssueCommentsChanges,
开发者ID:3drepo,项目名称:3drepo.io,代码行数:32,代码来源:issueDetails.container.ts



注:本文中的reselect.createStructuredSelector函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript reselect.Selector类代码示例发布时间:2022-05-25
下一篇:
TypeScript reselect.createSelector函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap