-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
247 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 33 additions & 21 deletions
54
libs/asset-viewer/src/lib/state/asset-search/asset-search.actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,53 @@ | ||
import { AssetEditDetail, AssetSearchQuery, AssetSearchResult, AssetSearchStats } from '@asset-sg/shared'; | ||
import { AssetId } from '@asset-sg/shared/v2'; | ||
import { createAction, props } from '@ngrx/store'; | ||
import { AllStudyDTOs } from '../../models'; | ||
|
||
export const initialize = createAction('[Asset Search] Initialize'); | ||
export const runInitialSearch = createAction( | ||
'[Asset Search] Run Initial Search', | ||
props<{ | ||
assetId: number | undefined; | ||
query: AssetSearchQuery; | ||
}>() | ||
); | ||
export const search = createAction( | ||
'[Asset Search] Search', | ||
props<{ | ||
query: Partial<AssetSearchQuery>; | ||
query: AssetSearchQuery; | ||
}>() | ||
); | ||
export const updateStats = createAction( | ||
'[Asset Search] Update search stats', | ||
export const mergeQuery = createAction( | ||
'[Asset Search] Merge Query', | ||
props<{ | ||
searchStats: AssetSearchStats; | ||
query: AssetSearchQuery; | ||
}>() | ||
); | ||
export const updateSearchResults = createAction( | ||
'[Asset Search] Update search results', | ||
export const executeSearch = createAction('[Asset Search] Execute Search', props<{ query: AssetSearchQuery }>()); | ||
|
||
export const updateResults = createAction( | ||
'[Asset Search] Update Results', | ||
props<{ | ||
searchResults: AssetSearchResult; | ||
results: AssetSearchResult; | ||
}>() | ||
); | ||
export const clearSearchText = createAction('[Asset Search] Clear search text'); | ||
export const resetSearch = createAction('[Asset Search] Reset Search'); | ||
export const removePolygon = createAction('[Asset Search] Remove polygon'); | ||
export const initializeSearch = createAction('[Asset Search] Initialize search'); | ||
export const assetClicked = createAction('[Asset Search] Asset clicked', props<{ assetId: number }>()); | ||
export const showAssetDetail = createAction('[Asset Search] Show Asset Detail', props<{ assetId: number }>()); | ||
export const updateAssetDetail = createAction( | ||
'[Asset Search] Update Asset Detail', | ||
props<{ assetDetail: AssetEditDetail }>() | ||
export const updateStats = createAction( | ||
'[Asset Search] Update Stats', | ||
props<{ | ||
stats: AssetSearchStats; | ||
}>() | ||
); | ||
export const resetAssetDetail = createAction('[Asset Search] Reset Asset Detail'); | ||
export const resetSearch = createAction('[Asset Search] Reset Search'); | ||
|
||
export const assetClicked = createAction('[Asset Search] Asset Clicked', props<{ assetId: number }>()); | ||
export const selectAsset = createAction('[Asset Search] Select Asset', props<{ assetId: AssetId }>()); | ||
export const setSelectedAsset = createAction('[Asset Search] Set Selected Asset', props<{ asset: AssetEditDetail }>()); | ||
export const clearSelectedAsset = createAction('[Asset Search] Clear Selected Asset'); | ||
export const clearPolygon = createAction('[Asset Search] Clear Polygon'); | ||
export const setStudies = createAction('[Asset Search] Set Studies', props<{ studies: AllStudyDTOs }>()); | ||
|
||
export const openFilters = createAction('[Asset Search] Open Filters'); | ||
export const closeFilters = createAction('[Asset Search] Close Filters'); | ||
export const openResults = createAction('[Asset Search] Open Results'); | ||
export const closeResults = createAction('[Asset Search] Close Results'); | ||
export const setStudies = createAction('[Asset Search] Load Studies', props<{ studies: AllStudyDTOs }>()); | ||
export const loadSearch = createAction('[Asset Search] Load Search', props<{ query: AssetSearchQuery }>()); | ||
export const updateQueryParams = createAction('[Asset Search] Update Query Params'); | ||
export const manualToggleResult = createAction('[Asset Search] Manual Toggle Params'); | ||
export const toggleResults = createAction('[Asset Search] Toggle Results'); |
Oops, something went wrong.