-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add filter reducer * misc style fix; change filters to be mandatory attribute; modified tests * moved array to util.ts * changed filters to be an array of RangeFilter/OneOfFilter * misc fixes * reorder * Remove unnecessary colons * added FilterModify * make filter reducers more fine grained * fixed import
- Loading branch information
Showing
16 changed files
with
346 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import {DateTime} from 'vega-lite/build/src/datetime'; | ||
import {OneOfFilter, RangeFilter} from 'vega-lite/build/src/filter'; | ||
import {ReduxAction} from './redux-action'; | ||
|
||
export type FilterAction = FilterAdd | FilterRemove | FilterModifyMinBound | FilterModifyMaxBound | | ||
FilterModifyOneOf; | ||
|
||
export const FILTER_ADD = 'FILTER_ADD'; | ||
export type FilterAdd = ReduxAction<typeof FILTER_ADD, { | ||
filter: RangeFilter | OneOfFilter, | ||
index: number | ||
}>; | ||
|
||
export const FILTER_REMOVE = 'FILTER_REMOVE'; | ||
export type FilterRemove = ReduxAction<typeof FILTER_REMOVE, { | ||
index: number | ||
}>; | ||
|
||
export const FILTER_MODIFY_MIN_BOUND = 'FILTER_MODIFY_MIN_BOUND'; | ||
export type FilterModifyMinBound = ReduxAction<typeof FILTER_MODIFY_MIN_BOUND, { | ||
minBound: number | DateTime, | ||
index: number | ||
}>; | ||
|
||
export const FILTER_MODIFY_MAX_BOUND = 'FILTER_MODIFY_MAX_BOUND'; | ||
export type FilterModifyMaxBound = ReduxAction<typeof FILTER_MODIFY_MAX_BOUND, { | ||
maxBound: number | DateTime, | ||
index: number | ||
}>; | ||
|
||
export const FILTER_MODIFY_ONE_OF = 'FILTER_MODIFY_ONE_OF'; | ||
export type FilterModifyOneOf = ReduxAction<typeof FILTER_MODIFY_ONE_OF, { | ||
oneOf: string[] | number[] | boolean[] | DateTime[], | ||
index: number | ||
}>; |
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
Oops, something went wrong.