react-redux#MapDispatchToPropsFunction TypeScript Examples

The following examples show how to use react-redux#MapDispatchToPropsFunction. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UserForm.tsx    From firebase-tools-ui with Apache License 2.0 6 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<
  PropsFromDispatch,
  {}
> = (dispatch) => {
  return {
    clearAuthUserDialogData: () => dispatch(clearAuthUserDialogData()),
    updateUser: (d) => dispatch(updateUserRequest(d)),
    createUser: (d) => dispatch(createUserRequest(d)),
  };
}
Example #2
Source File: UsersCard.tsx    From firebase-tools-ui with Apache License 2.0 6 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<
  PropsFromDispatch,
  {}
> = (dispatch) => {
  return {
    openAuthUserDialog: (data: RemoteResult<AuthUser | undefined>) =>
      dispatch(openAuthUserDialog(data)),
  };
}
Example #3
Source File: UsersTable.tsx    From firebase-tools-ui with Apache License 2.0 6 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<
  PropsFromDispatch,
  {}
> = (dispatch) => {
  return {
    setUserDisabled: (d) => dispatch(setUserDisabledRequest(d)),
    deleteUser: (d) => dispatch(deleteUserRequest(d)),
    openAuthUserDialog: (data: RemoteResult<AuthUser | undefined>) =>
      dispatch(openAuthUserDialog(data)),
  };
}
Example #4
Source File: ATNDecoderContainer.tsx    From alchemist with MIT License 6 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<IATNDecoderDispatch, Record<string, unknown>> = (dispatch): IATNDecoderDispatch => ({
	setData: (data) => dispatch(setDataAction(data)),
	onClearAll: () => dispatch(clearAllAction()),
	onPassSelected: (desc, replace) => {
		dispatch(setMainTabAction("descriptors"));
		dispatch(setModeTabAction("reference"));
		dispatch(setInspectorViewAction("code", "generated"));
		dispatch(toggleDescriptorsGroupingAction("none"));
		dispatch(addDescriptorAction(desc, replace));
	},
	onSelectAlchemistDescriptors: (operation, uuid) => dispatch(selectDescriptorAction(operation, uuid)),
	setSelectedItem: (uuid, operation) => dispatch(setSelectActionAction(operation, uuid)),
	onSetDontSendDisabled: (value) => dispatch(setDontSendDisabledAction(value)),
})
Example #5
Source File: InspectorContainer.tsx    From alchemist with MIT License 6 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<IInspectorDispatch, Record<string, unknown>> = (dispatch):IInspectorDispatch => ({
	setMainTab: (key) => dispatch(setMainTabAction(key)),
	setModeTab: (key) => dispatch(setModeTabAction(key)),
	setWholeState: async () => {
		dispatch(replaceWholeStateAction(await Settings.importState()));
		Settings.loaded = true;
	},
	setColumnSize:(px)=>dispatch(setColumnSizeAction(px)),
})
Example #6
Source File: LeftColumn.tsx    From alchemist with MIT License 6 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<ILeftColumnDispatch, Record<string, unknown>> = (dispatch: Dispatch): ILeftColumnDispatch => ({
	onSetTargetReference: (arg) => dispatch(setTargetReferenceAction(arg)),
	onAddDescriptor: (desc) => dispatch(addDescriptorAction(desc,false)),
	onSetSelectedReferenceType: (type) => dispatch(setSelectedReferenceTypeAction(type)),
	
	onClear: () => dispatch(clearAction()),
	onPin: (pin, arg) => dispatch(pinDescAction(pin, arg)),
	onRemove: (arg) => dispatch(removeDescAction(arg)),
	onLock: (lock, arg) => dispatch(lockDescAction(lock, arg)),

	onSetFilter: (type, subType, state) => dispatch(setFilterStateAction(type, subType, state)),
	setListener: (enabled) => dispatch(setListenerAction(enabled)),
	setAutoInspector: (enabled) => dispatch(setAutoInspectorAction(enabled)),
	setSearchTerm: (str) => dispatch(setSearchTermAction(str)),
	setRenameMode: (uuid: string, on: boolean) => dispatch(setRenameModeAction(uuid, on)),
	onSelect: (operation: TSelectDescriptorOperation, uuid?: string) => dispatch(selectDescriptorAction(operation, uuid)),
	
	onSetDontShowMarketplaceInfo: (enabled: boolean) => dispatch(setDontShowMarketplaceInfoAction(enabled)),
	toggleDescGrouping:()=>dispatch(toggleDescriptorsGroupingAction()),
})
Example #7
Source File: SorcererContainer.tsx    From alchemist with MIT License 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<ISorcererDispatch, Record<string, unknown>> = (dispatch): ISorcererDispatch => ({
	//setData: (data) => dispatch(setDataAction(data)),
	selectItem: (type, uuid) => dispatch(setSelectAction(type, uuid)),
	make: (type) => dispatch(makeAction(type)),
	remove: (type, uuid) => dispatch(removeAction(type, uuid)),
	setPreset: (data) => dispatch(setPresetAction(data)),
})
Example #8
Source File: OneAccountPerEmailDialog.tsx    From firebase-tools-ui with Apache License 2.0 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<
  PropsFromDispatch,
  {}
> = (dispatch) => ({
  setAllowDuplicateEmails: (value: boolean) =>
    dispatch(setAllowDuplicateEmailsRequest(value)),
})
Example #9
Source File: TreeDomContainer.tsx    From alchemist with MIT License 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<ITreeDomDispatch, Record<string, unknown>> = (dispatch):ITreeDomDispatch => ({
	onInspectPath: (path, mode) => dispatch(setInspectorPathDomAction(path, mode)),
	onSetExpandedPath: (path, expand, recursive, data) => dispatch(setExpandedPathAction("dom", path, expand, recursive, data)),
	onSetAutoExpandLevel: (level) => dispatch(setAutoExpandLevelAction("DOM", level)),
})
Example #10
Source File: TreeDiffContainer.tsx    From alchemist with MIT License 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<ITreeDiffDispatch, Record<string, unknown>> = (dispatch:Dispatch):ITreeDiffDispatch => ({
	onInspectPath: (path, mode) => dispatch(setInspectorPathDiffAction(path, mode)),
	onSetExpandedPath: (path, expand, recursive,data) => dispatch(setExpandedPathAction("difference",path, expand, recursive,data)),
	onSetView: (viewType) => dispatch(setInspectorViewAction("diff", viewType)),
	onSetAutoExpandLevel: (level) => dispatch(setAutoExpandLevelAction("diff", level)),
})
Example #11
Source File: TreeContentContainer.tsx    From alchemist with MIT License 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<ITreeContentDispatch, Record<string, unknown>> = (dispatch):ITreeContentDispatch => ({
	onInspectPath: (path, mode) => dispatch(setInspectorPathContentAction(path, mode)),
	onSetExpandedPath: (path, expand, recursive, data) => dispatch(setExpandedPathAction("content", path, expand, recursive, data)),
	onSetView: (viewType) => dispatch(setInspectorViewAction("content", viewType)),
	onSetAutoExpandLevel: (level) => dispatch(setAutoExpandLevelAction("content", level)),
})
Example #12
Source File: ListenerFilterContainer.tsx    From alchemist with MIT License 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<IListenerFilterDispatch, Record<string, unknown>> = (dispatch):IListenerFilterDispatch => ({
	setExclude: (arr) => dispatch(setExcludeAction(arr)),
	setFilterEventsType: (type) => dispatch(setFilterTypeAction(type)),
	setInclude: (arr) => dispatch(setIncludeAction(arr)),
	onSetFilter: (type, subType, state) => dispatch(setFilterStateAction(type, subType, state)),
	onSetTargetReference:(arg) => dispatch(setTargetReferenceAction(arg)),
})
Example #13
Source File: GeneratedCodeContainer.tsx    From alchemist with MIT License 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<IGeneratedCodeDispatch, Record<string, unknown>> = (dispatch: Dispatch): IGeneratedCodeDispatch => ({
	onSetGlobalOptions: (options)=>dispatch(setSettingsAction(options)),
	onSetDescriptorOptions: (uuids, options) => dispatch(setDescriptorOptionsAction(uuids, options)),
	onSetView:(viewType) => dispatch(setInspectorViewAction("code",viewType)),
})
Example #14
Source File: AMConverter.tsx    From alchemist with MIT License 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<IAMConverterDispatch, Record<string, unknown>> = (dispatch):IAMConverterDispatch => ({	
	setConverterInfoAction: (value) => dispatch(setConverterInfoAction(value)),	
})
Example #15
Source File: RefreshButton.tsx    From firebase-tools-ui with Apache License 2.0 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<
  PropsFromDispatch,
  {}
> = (dispatch) => {
  return {
    refresh: () => dispatch(authFetchUsersRequest()),
  };
}
Example #16
Source File: AuthFilter.tsx    From firebase-tools-ui with Apache License 2.0 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<
  PropsFromDispatch,
  {}
> = (dispatch) => ({
  updateFilter: (f) => dispatch(updateFilter(f)),
})
Example #17
Source File: ClearAll.tsx    From firebase-tools-ui with Apache License 2.0 5 votes vote down vote up
mapDispatchToProps: MapDispatchToPropsFunction<
  PropsFromDispatch,
  {}
> = (dispatch) => ({
  clearAllData: () => dispatch(nukeUsersRequest()),
})