-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refactor transport mode to a module
- Loading branch information
1 parent
145ebf9
commit ede4246
Showing
47 changed files
with
416 additions
and
268 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { default } from './search'; | ||
export { default as GeolocationButton } from './geolocation-button'; | ||
export { default as SwapButton } from './swap-button'; |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,3 +1,5 @@ | ||
export { default as SearchTimeSelector } from './selector'; | ||
|
||
export * from './types'; | ||
|
||
export { parseSearchTimeQuery, searchTimeToQueryString } from './utils'; |
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
6 changes: 3 additions & 3 deletions
6
.../__tests__/transport-mode-filter.test.tsx → ...ort-mode/filter/__tests__/filter.test.tsx
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
File renamed without changes.
14 changes: 4 additions & 10 deletions
14
...omponents/transport-mode-filter/index.tsx → src/modules/transport-mode/filter/filter.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export { default as TransportModeFilter } from './filter'; | ||
|
||
export { | ||
type TransportModeFilterOption, | ||
type TransportModeFilterState, | ||
} from './types'; | ||
|
||
export { | ||
getAllTransportModesFromFilterOptions, | ||
getInitialTransportModeFilter, | ||
parseFilterQuery, | ||
filterToQueryString, | ||
} from './utils'; |
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,22 @@ | ||
import { z } from 'zod'; | ||
|
||
export const transportModeFilterSchema = z.union([ | ||
z.literal('bus'), | ||
z.literal('rail'), | ||
z.literal('expressboat'), | ||
z.literal('ferry'), | ||
z.literal('airportbus'), | ||
z.literal('air'), | ||
z.literal('other'), | ||
]); | ||
|
||
export type TransportModeFilterOption = z.infer< | ||
typeof transportModeFilterSchema | ||
>; | ||
|
||
export type TransportModeFilterState = Record< | ||
TransportModeFilterOption, | ||
boolean | ||
>; | ||
|
||
export { TransportModeFilterOptionType } from '@atb-as/config-specs'; |
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
6 changes: 0 additions & 6 deletions
6
.../transport-icon/transport-icon.module.css → ...dules/transport-mode/icon/icon.module.css
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export { | ||
type TransportModeType, | ||
type TransportSubmodeType, | ||
type TransportModeGroup, | ||
transportModeSchema, | ||
transportSubmodeSchema, | ||
} from './types'; | ||
|
||
export { | ||
transportModeToTranslatedString, | ||
severalTransportModesToTranslatedStrings, | ||
isTransportModeType, | ||
isTransportSubmodeType, | ||
filterGraphQlTransportModes, | ||
} from './utils'; | ||
|
||
export * from './icon'; | ||
export * from './filter'; |
Oops, something went wrong.