How to use the @ngrx/store.createAction function in @ngrx/store

To help you get started, we’ve selected a few @ngrx/store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SciCatProject / catanie / src / app / state-management / actions / published-data.actions.ts View on Github external
"[PublishedData] Fetch All Published Data"
);
export const fetchAllPublishedDataCompleteAction = createAction(
  "[PublishedData] Fetch All Published Data Complete",
  props<{ publishedData: PublishedData[] }>()
);
export const fetchAllPublishedDataFailedAction = createAction(
  "[PublishedData] Fetch All Published Datas Failed"
);

export const fetchCountAction = createAction("[PublishedData] Fetch Count");
export const fetchCountCompleteAction = createAction(
  "[PublishedData] Fetch Count Complete",
  props<{ count: number }>()
);
export const fetchCountFailedAction = createAction(
  "[PublishedData] Fetch Count Failed"
);

export const fetchPublishedDataAction = createAction(
  "[PublishedData] Fetch Published Data",
  props<{ id: string }>()
);
export const fetchPublishedDataCompleteAction = createAction(
  "[PublishedData] Fetch Published Data Complete",
  props<{ publishedData: PublishedData }>()
);
export const fetchPublishedDataFailedAction = createAction(
  "[PublishedData] Fetch Published Data Failed"
);

export const publishDatasetAction = createAction(
github SciCatProject / catanie / src / app / state-management / actions / user.actions.ts View on Github external
export const fetchUserFailedAction = createAction("[User] Fetch User Failed");

export const fetchCurrentUserAction = createAction("[User] Fetch Current User");
export const fetchCurrentUserCompleteAction = createAction(
  "[User] Fetch Current User Complete",
  props<{ user: User }>()
);
export const fetchCurrentUserFailedAction = createAction(
  "[User] Fetch Current User Failed"
);

export const fetchUserIdentityAction = createAction(
  "[User] Fetch User Identity",
  props<{ id: string }>()
);
export const fetchUserIdentityCompleteAction = createAction(
  "[User] Fetch User Identity Complete",
  props<{ userIdentity: UserIdentity }>()
);
export const fetchUserIdentityFailedAction = createAction(
  "[User] Fetch User Identity Failed"
);

export const fetchCatamelTokenAction = createAction(
  "[User] Fetch Catamel Token"
);
export const fetchCatamelTokenCompleteAction = createAction(
  "[User] Fetch Catamel Token Complete",
  props<{ token: AccessToken }>()
);
export const fetchCatamelTokenFailedAction = createAction(
  "[User] Fetch Catamel Token Failed"
github stefanoslig / angular-ngrx-nx-realworld-example-app / libs / article / src / lib / +state / article.actions.ts View on Github external
export const deleteArticleFail = createAction('[article] DELETE_ARTICLE_FAIL', props<{ error: Error }>());

export const initializeArticle = createAction('[article] INITIALIZE_ARTICLE');

export const loadComments = createAction('[article] LOAD_COMMENTS', props<{ slug: string }>());

export const loadCommentsSuccess = createAction(
  '[article] LOAD_COMMENTS_SUCCESS',
  props<{ comments: ArticleComment[] }>(),
);

export const loadCommentsFail = createAction('[article] LOAD_COMMENTS_FAIL', props<{ error: Error }>());

export const favorite = createAction('[article] FAVORITE', props<{ slug: string }>());

export const favoriteSuccess = createAction('[article] FAVORITE_SUCCESS', props<{ article: ArticleData }>());

export const favoriteFail = createAction('[article] FAVORITE_FAIL', props<{ error: Error }>());

export const unFavorite = createAction('[article] UNFAVORITE', props<{ slug: string }>());

export const unFavoriteSuccess = createAction('[article] UNFAVORITE_SUCCESS', props<{ article: ArticleData }>());

export const unFavoriteFail = createAction('[article] UNFAVORITE_FAIL', props<{ error: Error }>());

export const follow = createAction('[article] FOLLOW', props<{ username: string }>());

export const followSuccess = createAction('[article] FOLLOW_SUCCESS', props<{ profile: Profile }>());

export const followFail = createAction('[article] FOLLOW_FAIL', props<{ error: Error }>());

export const unFollow = createAction('[article] UNFOLLOW', props<{ username: string }>());
github chrisjwalk / angular-cli-netcore-ngrx-starter / ClientApp / src / app / core / store / actions / router.action.ts View on Github external
import { NavigationExtras } from '@angular/router';
import { ROUTER_NAVIGATION } from '@ngrx/router-store';
import { createAction, props } from '@ngrx/store';

import { RouterStateUrl } from 'app/core/store/reducers';

export const NAVIGATION = ROUTER_NAVIGATION;

export const routerNavigation = createAction(
  ROUTER_NAVIGATION,
  props<{
    event: any;
    routerState: RouterStateUrl;
  }>(),
);

export const go = createAction(
  '[Router] Go',
  props<{
    path: any[];
    query?: object;
    extras?: NavigationExtras;
  }>(),
);
github SciCatProject / catanie / src / app / state-management / actions / logbooks.actions.ts View on Github external
);
export const fetchLogbookFailedAction = createAction(
  "[Logbook] Fetch Logbook Failed"
);

export const prefillFiltersAction = createAction(
  "[Logbook] Prefill Filters",
  props<{ values: Partial }>()
);

export const setTextFilterAction = createAction(
  "[Logbook] Set Text Filter",
  props<{ textSearch: string }>()
);

export const setDisplayFiltersAction = createAction(
  "[Logbook] Set Display Filters",
  props<{
    showBotMessages: boolean;
    showImages: boolean;
    showUserMessages: boolean;
  }>()
);
github SciCatProject / catanie / src / app / state-management / actions / datasets.actions.ts View on Github external
export const prefillFiltersAction = createAction(
  "[Dataset] Prefill Filters",
  props<{ values: Partial }>()
);
export const clearFacetsAction = createAction("[Dataset] Clear Facets");

export const setTextFilterAction = createAction(
  "[Dataset] Set Text Filter",
  props<{ text: string }>()
);

export const addLocationFilterAction = createAction(
  "[Dataset] Add Location Filter",
  props<{ location: string }>()
);
export const removeLocationFilterAction = createAction(
  "[Dataset] Remove Location Filter",
  props<{ location: string }>()
);

export const addGroupFilterAction = createAction(
  "[Dataset] Add Group Filter",
  props<{ group: string }>()
);
export const removeGroupFilterAction = createAction(
  "[Dataset] Remove Group Filter",
  props<{ group: string }>()
);

export const addTypeFilterAction = createAction(
  "[Dataset] Add Type Filter",
  props<{ datasetType: string }>()
github ngrx / platform / projects / example-app / src / app / books / actions / collection-api.actions.ts View on Github external
);

export const removeBookFailure = createAction(
  '[Collection/API] Remove Book Failure',
  props<{ book: Book }>()
);

/**
 * Load Collection Actions
 */
export const loadBooksSuccess = createAction(
  '[Collection/API] Load Books Success',
  props<{ books: Book[] }>()
);

export const loadBooksFailure = createAction(
  '[Collection/API] Load Books Failure',
  props<{ error: any }>()
);
github trasukg / local-aprs / src / app / aprs-situation / aprs-situation.actions.ts View on Github external
import { createAction, props } from '@ngrx/store';

export const enableHostConnection = createAction(
  '[Packet] Enable Host Connection'
);

export const receivedPacket = createAction(
  '[Packet] Receive',
  props<{ packet: any }>()
);

export const receivedInitialPackets = createAction(
  '[Packet] Receive Initial Packets',
  props<{ packets: any[] }>()
);

export const connected = createAction(
  '[Packet] Connected'
);

export const disconnected = createAction(
  '[Packet] Disconnected'
);

export const receivedConfig = createAction(
  '[Packet] Received Configuration',
  props<{ config: any }>()
);
github SciCatProject / catanie / src / app / state-management / actions / published-data.actions.ts View on Github external
"[PublishedData] Publish Dataset Complete",
  props<{ publishedData: PublishedData }>()
);
export const publishDatasetFailedAction = createAction(
  "[PublishedData] Publish Dataset Failed"
);

export const registerPublishedDataAction = createAction(
  "[PublishedData] Register Published Data",
  props<{ doi: string }>()
);
export const registerPublishedDataCompleteAction = createAction(
  "[PublishedData] Register Published Data Complete",
  props<{ publishedData: PublishedData }>()
);
export const registerPublishedDataFailedAction = createAction(
  "[PublishedData] Register Published Data Failed"
);

export const changePageAction = createAction(
  "[PublishedData] Change Page",
  props<{ page: number; limit: number }>()
);
github SciCatProject / catanie / src / app / state-management / actions / user.actions.ts View on Github external
export const fetchUserIdentityFailedAction = createAction(
  "[User] Fetch User Identity Failed"
);

export const fetchCatamelTokenAction = createAction(
  "[User] Fetch Catamel Token"
);
export const fetchCatamelTokenCompleteAction = createAction(
  "[User] Fetch Catamel Token Complete",
  props<{ token: AccessToken }>()
);
export const fetchCatamelTokenFailedAction = createAction(
  "[User] Fetch Catamel Token Failed"
);

export const logoutAction = createAction("[User] Logout");
export const logoutCompleteAction = createAction("[User] Logout Complete");
export const logoutFailedAction = createAction("[User] Logout Failed");

export const selectColumnAction = createAction(
  "[User] Select Column",
  props<{ column: string }>()
);
export const deselectColumnAction = createAction(
  "[User] Deselect Column",
  props<{ column: string }>()
);

export const showMessageAction = createAction(
  "[User] Show Message",
  props<{ message: Message }>()
);