Calendar · Search params & storage
3 modules · 31 exports · 1 repository · 11 e2e tests · 6 routes
The state Calendar keeps in the URL and in the browser's storage. Every param has a default and never fails to decode, see Search params, and each definition should have an assertRoundTrips test. The definitions of the whole app are listed in the reference.
Search params
URL calendarSearchParams
app/features/calendar/calendar-search-params.ts:50
| Param | Value | Default | Loader | Description |
|---|---|---|---|---|
modes | v.pipe( v.array(modeShortWithSpecial), v.minLength(1), v.maxLength(modesShortWithSpecial.length), ) | [...modesShortWithSpecial] | true | |
modesExact | v.boolean() | false | true | |
games | v.pipe( v.array(gamesShortSchema), v.minLength(1), v.maxLength(gamesShort.length), ) | [...gamesShort] | true | |
preferredVersus | v.pipe( v.array(v.picklist(versusShort)), v.minLength(1), v.maxLength(versusShort.length), ) | [...versusShort] | true | |
preferredStartTime | v.picklist(["ANY", "EU", "NA", "AU"]) | "ANY" | true | |
tagsIncluded | calendarFilterTagsArr | [] | true | |
tagsExcluded | calendarFilterTagsArr | [] | true | |
isSendou | v.boolean() | false | true | |
isRanked | v.boolean() | false | true | |
minTeamCount | v.pipe(v.number(), v.integer(), v.minValue(0)) | 0 | true | |
minTier | tierNumber | BEST_TIER_NUMBER | true | |
maxTier | tierNumber | WORST_TIER_NUMBER | true | |
orgsIncluded | v.pipe(v.array(v.pipe(v.string(), v.maxLength(100))), v.maxLength(10)) | [] | true | |
orgsExcluded | v.pipe(v.array(v.pipe(v.string(), v.maxLength(100))), v.maxLength(10)) | [] | true | |
authorIdsExcluded | v.pipe( v.array(v.pipe(v.number(), v.integer(), v.gtValue(0))), v.maxLength(10), ) | [] | true | |
useDefaults | v.boolean() | true | true | False once the user has edited the filters, making the URL win over their saved defaults. |
day | v.nullable(dayNumber) | null | true | |
month | v.nullable(monthNumber) | null | true | |
year | v.nullable(yearNumber) | null | true |
Used in calendar.tsxcalendar-urls.tsFiltersBar.tsxcalendar.server.tscalendar[.]ics.server.tscalendar.tsx
URL calendarEventsSearchParams
app/features/calendar/calendar-search-params.ts:130
| Param | Value | Default | Loader | Description |
|---|---|---|---|---|
view | v.nullable(v.picklist(VIEW_FILTERS)) | null | false |
Used in events.tsx
URL calendarNewSearchParams
app/features/calendar/calendar-search-params.ts:134
| Param | Value | Default | Loader | Description |
|---|---|---|---|---|
eventId | v.nullable(v.pipe(v.number(), v.integer(), v.gtValue(0))) | null | true | |
copyEventId | v.nullable(v.pipe(v.number(), v.integer(), v.gtValue(0))) | null | true | |
tournament | v.boolean() | false | true |
Used in calendar-urls.tscalendar.new.server.tscalendar.new.tsx