@propriety/court-calendar 1.0.184 → 1.0.186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,7 +44,7 @@ import '@propriety/court-calendar/styles.css';
44
44
  | `themeOverrides` | `ThemeOptions` | — | MUI theme overrides applied on top of the default theme |
45
45
  | `routeParams` | `CalendarRouteParams` | — | Current URL state, parsed and passed in by the host app's router. See [URL routing](#url-routing--deep-linking). |
46
46
  | `onRouteChange` | `(params: CalendarRouteParams) => void` | — | Called whenever navigable state changes. The host app should write these params to the URL. See [URL routing](#url-routing--deep-linking). |
47
- | `checkAdminVersion` | `boolean` | `true` | Fetches Admin's `/version.json` and shows a notice above the calendar when Admin runs a newer calendar release. Dismissing it hides it for 7 days. Admin itself passes `false`. |
47
+ | `checkAdminVersion` | `boolean` | `true` | Fetches Admin's `/version.json` and shows a slim notice inside the calendar, above its toolbar, when Admin runs a newer calendar release. It never covers or blocks anything, and shows nothing if Admin can't be reached. Dismissing it hides it for 7 days. Admin itself passes `false`. |
48
48
 
49
49
  ---
50
50
 
@@ -219,7 +219,7 @@ Parameters use short keys to keep the address bar readable. Only non-default val
219
219
  | `dl` | `showUploadDeadlines` | `false` | `dl=1` when true |
220
220
  | `adj` | `showAdjournmentDates` | `true` | `adj=0` when false |
221
221
  | `dt` | `dateTypeFilter` | `'all'` | `scar`, `negotiations`, or `collections` |
222
- | `muni` | `municode` | `null` | Municipality code string |
222
+ | `muni` | `municode` | `null` | Municipality code string, or a one-letter county code (`N`) for the whole county |
223
223
  | `settled` | `showOnlyUnsettled` | `true` | `settled=1` when the filter is **off** (inverted because default is on) |
224
224
  | `noEvid` | `showOnlyWithoutEvidence` | `false` | `noEvid=1` when true |
225
225
  | `unrev` | `showOnlyUnreviewed` | `false` | `unrev=1` when true |
@@ -262,7 +262,7 @@ If a `cdId` or `ci` value in the URL doesn't match any loaded data, a brief erro
262
262
  | Component | Description |
263
263
  |-----------|-------------|
264
264
  | `CCalendar` | Root component. Manages state, events, filtering, and renders the calendar + modal. |
265
- | `Toolbar` | Navigation and filter controls (date type, hearing type, case filters, user filter, view switcher, municipality dropdown, search). |
265
+ | `Toolbar` | Navigation and filter controls (date type, hearing type, case filters, user filter, view switcher, municipality/county dropdown, search). |
266
266
  | `CalendarList` | MUI DataGrid table view of court dates with color-coded status, county, and location columns. |
267
267
  | `Modal` | Dialog with 4 modes: Details, Edit, Create, Case Details. |
268
268
  | `CreateEditCase` | Form for court date fields (dates, municipality, hearing details, chair assignments, case IDs). |
@@ -289,7 +289,7 @@ If a `cdId` or `ci` value in the URL doesn't match any loaded data, a brief erro
289
289
  | `helpers/routing.ts` | `parseCalendarSearchParams`, `serializeCalendarParams`, `buildCalendarRouteParams`, `extractFilterFields`. Pure functions for URL encoding/decoding. |
290
290
  | `helpers/CalEvent.ts` | `buildCalEvents` — derives main, extra-day, and adjournment `CalEvent` buckets from court date + case data. |
291
291
  | `helpers/cases.ts` | Case fetching (by court date, paginated, search). Settlement and evidence checks. |
292
- | `helpers/courtDates.ts` | `caseKey` (memory-map key), `isVillageDate` (municipality code check). |
292
+ | `helpers/courtDates.ts` | `caseKey` (memory-map key), `isVillageDate` (municipality code check), `isCountyCode` (one-letter county code). |
293
293
  | `helpers/documentActions.ts` | Open, download, and print document helpers (used by DocCard). |
294
294
  | `helpers/formatter.ts` | Date formatting for API (`YYYY-MM-DD` or `YYYY-MM-DD HH:mm:00`). Evidence string formatting. |
295
295
  | `helpers/cache.ts` | Dexie-based IndexedDB caching with TTL. |
@@ -3,8 +3,8 @@
3
3
  * than one municipality. The selected value is stored in the same MuniCode field every
4
4
  * other date type uses, but holds a county code ('N') instead of a muni code ('N2000').
5
5
  *
6
- * Deliberately not part of MuniDropdown: only collections may pick a county, and county
7
- * entries must never appear in the municipality list.
6
+ * Deliberately not part of MuniDropdown: only collections may be *assigned* a county. The
7
+ * toolbar filter lists counties through MuniDropdown's `includeCounties`, which only narrows the view.
8
8
  */
9
9
  export default function CountyDropdown({ selectedCounty, setSelectedCounty, size, onOpen, onClose, }: {
10
10
  selectedCounty: string | null;
@@ -1,8 +1,10 @@
1
- export default function MuniDropdown({ selectedMuni, setSelectedMuni, allowClear, size, onOpen, onClose, }: {
1
+ export default function MuniDropdown({ selectedMuni, setSelectedMuni, allowClear, size, onOpen, onClose, includeCounties, }: {
2
2
  selectedMuni: string | null;
3
3
  setSelectedMuni: (muni: string) => void;
4
4
  allowClear: boolean;
5
5
  size: 'small' | 'medium';
6
6
  onOpen?: () => void;
7
7
  onClose?: () => void;
8
+ /** Filters only. Where the pick becomes a date's MuniCode, a county code would file a SCAR date under a whole county. */
9
+ includeCounties?: boolean;
8
10
  }): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@
6
6
  * scheduled per county rather than per municipality and store one of these codes
7
7
  * in MuniCode.
8
8
  *
9
- * Deliberately a separate endpoint from /utils/get-muni-names: county codes must
10
- * not appear in the municipality dropdown.
9
+ * Deliberately a separate endpoint from /utils/get-muni-names: county codes must not
10
+ * appear where the municipality dropdown assigns a date's muni, only where it filters.
11
11
  */
12
12
  export declare function getAllCounties(apiKey: string): Promise<Record<string, string>>;
@@ -1,5 +1,7 @@
1
1
  import { DateType, HearingType, Case, CourtDate } from '../types';
2
2
  export declare function isVillageDate(muniCode: string): boolean;
3
+ /** A county code is the letter every muni code in that county starts with: 'N' covers 'N05' and 'N2005'. */
4
+ export declare function isCountyCode(muniCode: string): boolean;
3
5
  /**
4
6
  * The CSS class that paints a hearing type — `.inperson`, `.virtual`, `.unknown` in
5
7
  * CalendarEvents.css.