@propriety/court-calendar 1.0.84 → 1.0.87

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.
Files changed (44) hide show
  1. package/dist/__tests__/helpers/negotiations.test.d.ts +1 -0
  2. package/dist/_components/DebugModal/Dashboard.d.ts +12 -0
  3. package/dist/_components/DebugModal/Warnings.d.ts +17 -0
  4. package/dist/_components/{DebugModal.d.ts → DebugModal/index.d.ts} +3 -3
  5. package/dist/_components/DebugModal/sections/BucketAnalysis.d.ts +8 -0
  6. package/dist/_components/DebugModal/sections/CaseComparison.d.ts +16 -0
  7. package/dist/_components/DebugModal/sections/CourtDateFields.d.ts +6 -0
  8. package/dist/_components/DebugModal/sections/EventIdentity.d.ts +4 -0
  9. package/dist/_components/DebugModal/sections/Negotiations.d.ts +4 -0
  10. package/dist/_components/DebugModal/sections/StipTracking.d.ts +4 -0
  11. package/dist/_components/DebugModal/sections/UploadStatus.d.ts +16 -0
  12. package/dist/_components/DebugModal/shared.d.ts +24 -0
  13. package/dist/_components/DebugModal/ui.d.ts +28 -0
  14. package/dist/_components/Modal/DateDetails/NegotiationsViewer.d.ts +4 -0
  15. package/dist/_components/Modal/DateDetails/StatusTimeline.d.ts +5 -1
  16. package/dist/helpers/cases.d.ts +2 -0
  17. package/dist/index.mjs +7697 -7354
  18. package/dist/types.d.ts +32 -1
  19. package/package.json +1 -1
  20. package/src/__tests__/fixtures.ts +2 -0
  21. package/src/__tests__/helpers/negotiations.test.ts +101 -0
  22. package/src/_components/DebugModal/Dashboard.tsx +116 -0
  23. package/src/_components/DebugModal/Warnings.tsx +113 -0
  24. package/src/_components/DebugModal/index.tsx +128 -0
  25. package/src/_components/DebugModal/sections/BucketAnalysis.tsx +108 -0
  26. package/src/_components/DebugModal/sections/CaseComparison.tsx +154 -0
  27. package/src/_components/DebugModal/sections/CourtDateFields.tsx +47 -0
  28. package/src/_components/DebugModal/sections/EventIdentity.tsx +34 -0
  29. package/src/_components/DebugModal/sections/Negotiations.tsx +47 -0
  30. package/src/_components/DebugModal/sections/StipTracking.tsx +47 -0
  31. package/src/_components/DebugModal/sections/UploadStatus.tsx +122 -0
  32. package/src/_components/DebugModal/shared.ts +71 -0
  33. package/src/_components/DebugModal/ui.tsx +74 -0
  34. package/src/_components/Modal/CaseDetails/CaseDetails.tsx +185 -88
  35. package/src/_components/Modal/DateDetails/CaseViewer.tsx +48 -1
  36. package/src/_components/Modal/DateDetails/DateDetails.tsx +21 -1
  37. package/src/_components/Modal/DateDetails/DateTabs.tsx +6 -1
  38. package/src/_components/Modal/DateDetails/NegotiationsViewer.tsx +102 -0
  39. package/src/_components/Modal/DateDetails/StatusTimeline.tsx +42 -15
  40. package/src/constants.ts +2 -0
  41. package/src/helpers/api/cases.ts +4 -0
  42. package/src/helpers/cases.ts +9 -0
  43. package/src/types.ts +46 -13
  44. package/src/_components/DebugModal.tsx +0 -789
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Case, CourtDate } from '../../types';
2
+ import { CalEvent } from '../../helpers/CalEvent';
3
+ import { Warning } from './Warnings';
4
+ export declare function DashboardPanel({ courtDate, memSnap, apiCases, loading, warnings, isVillage, calEvent, }: {
5
+ courtDate: CourtDate;
6
+ memSnap: Case[];
7
+ apiCases: Case[] | null;
8
+ loading: boolean;
9
+ warnings: Warning[];
10
+ isVillage: boolean;
11
+ calEvent: CalEvent | null;
12
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { Case, CourtDate } from '../../types';
2
+ import { CalEvent } from '../../helpers/CalEvent';
3
+ export interface Warning {
4
+ level: 'error' | 'warn' | 'ok';
5
+ message: string;
6
+ }
7
+ export declare function computeWarnings({ calEvent, memoryCases, apiCases, allDates, isVillage, }: {
8
+ calEvent: CalEvent | null;
9
+ memoryCases: Case[];
10
+ apiCases: Case[] | null;
11
+ allDates: CourtDate[];
12
+ isVillage: boolean;
13
+ }): Warning[];
14
+ export declare function WarningsPanel({ warnings, loading }: {
15
+ warnings: Warning[];
16
+ loading: boolean;
17
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { Case, CourtDate } from '../types';
2
- import { CalEvent } from '../helpers/CalEvent';
3
- export default function DebugModal({ open, onClose, courtDate, memoryCases, calEvent, allDates, }: {
1
+ import { Case, CourtDate } from '../../types';
2
+ import { CalEvent } from '../../helpers/CalEvent';
3
+ export default function DebugModal({ open, onClose, courtDate, memoryCases, calEvent, allDates }: {
4
4
  open: boolean;
5
5
  onClose: () => void;
6
6
  courtDate: CourtDate | null;
@@ -0,0 +1,8 @@
1
+ import { Case, CourtDate } from '../../../types';
2
+ import { CalEvent } from '../../../helpers/CalEvent';
3
+ export declare function BucketAnalysisSection({ memoryCases, calEvent, isVillage, allDates }: {
4
+ memoryCases: Case[];
5
+ calEvent: CalEvent | null;
6
+ isVillage: boolean;
7
+ allDates: CourtDate[];
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { Case } from '../../../types';
2
+ export declare const DIFF_FIELDS: (keyof Case)[];
3
+ export declare function fieldDiff(a: Case | undefined, b: Case | undefined, field: keyof Case): boolean;
4
+ export declare function CaseComparisonSection({ allIndexNumbers, memById, cacheById, apiById, resolvedCache, loading }: {
5
+ allIndexNumbers: string[];
6
+ memById: Map<string, Case>;
7
+ cacheById: Map<string, Case>;
8
+ apiById: Map<string, Case>;
9
+ resolvedCache: Case[] | null;
10
+ loading: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export declare function RawDiffSection({ diffCases, memById, apiById }: {
13
+ diffCases: string[];
14
+ memById: Map<string, Case>;
15
+ apiById: Map<string, Case>;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { Case, CourtDate } from '../../../types';
2
+ export declare function CourtDateSection({ courtDate, cacheCases, resolvedCache }: {
3
+ courtDate: CourtDate;
4
+ cacheCases: Case[] | 'none' | null;
5
+ resolvedCache: Case[] | null;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { CalEvent } from '../../../helpers/CalEvent';
2
+ export declare function EventIdentitySection({ calEvent }: {
3
+ calEvent: CalEvent | null;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Case } from '../../../types';
2
+ export declare function NegotiationsSection({ cases }: {
3
+ cases: Case[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Case } from '../../../types';
2
+ export declare function StipTrackingSection({ cases }: {
3
+ cases: Case[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { Case, CourtDate } from '../../../types';
2
+ export interface UploadCounts {
3
+ uploaded: number;
4
+ hasEvidenceNotUploaded: number;
5
+ noEvidence: number;
6
+ settled: number;
7
+ total: number;
8
+ }
9
+ export declare function computeUploadCounts(cases: Case[], isVillage: boolean): UploadCounts;
10
+ export declare function UploadStatusSection({ courtDate, memoryCases, apiCases, isVillage, loading }: {
11
+ courtDate: CourtDate;
12
+ memoryCases: Case[];
13
+ apiCases: Case[] | null;
14
+ isVillage: boolean;
15
+ loading: boolean;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { Case, CourtDate } from '../../types';
2
+ export declare const C: {
3
+ readonly text: "#ccc";
4
+ readonly dim: "#aaa";
5
+ readonly label: "#555";
6
+ readonly muted: "#444";
7
+ readonly divider: "#2a2a2a";
8
+ readonly border: "#222";
9
+ readonly rowHead: "#1a1a1a";
10
+ readonly panelBg: "#111";
11
+ readonly dashBg: "#0d0d0d";
12
+ readonly statDim: "#3a3a3a";
13
+ readonly green: "#88cc88";
14
+ readonly orange: "#f0a500";
15
+ readonly red: "#ff6b6b";
16
+ readonly blue: "#88aaff";
17
+ };
18
+ export declare function dateToKey(d: Date): string;
19
+ export declare function getCaseBucket(c: Case): string;
20
+ export declare function isOACaseWithNoDate(c: Case, isVillage: boolean): boolean;
21
+ export declare function isAdjEventSuppressed(muniCode: string, activeDate: Date, allDates: CourtDate[]): boolean;
22
+ export declare function fmtVal(val: unknown): string;
23
+ export declare function fmtDate(d: unknown): string;
24
+ export declare function casesById(cases: Case[]): Map<string, Case>;
@@ -0,0 +1,28 @@
1
+ export declare function Section({ title, children, accent, defaultOpen }: {
2
+ title: string;
3
+ children: React.ReactNode;
4
+ accent?: string;
5
+ defaultOpen?: boolean;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function KV({ label, value, color }: {
8
+ label: string;
9
+ value: React.ReactNode;
10
+ color?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Flag({ label, value, redWhenTrue }: {
13
+ label: string;
14
+ value: boolean;
15
+ redWhenTrue?: boolean;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ export declare function MonoText({ children, color }: {
18
+ children: React.ReactNode;
19
+ color?: string;
20
+ }): import("react/jsx-runtime").JSX.Element;
21
+ export declare function SubLabel({ children }: {
22
+ children: React.ReactNode;
23
+ }): import("react/jsx-runtime").JSX.Element;
24
+ export declare const TH_STYLE: React.CSSProperties;
25
+ export declare const TD_STYLE: React.CSSProperties;
26
+ export declare const TABLE_STYLE: React.CSSProperties;
27
+ export declare const THEAD_ROW_STYLE: React.CSSProperties;
28
+ export declare const TBODY_ROW_STYLE: React.CSSProperties;
@@ -0,0 +1,4 @@
1
+ import { Case } from '../../../types';
2
+ export default function NegotiationsViewer({ cases }: {
3
+ cases: Case[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -9,11 +9,15 @@ export declare enum Status {
9
9
  Incomplete = "incomplete",
10
10
  Loading = "loading"
11
11
  }
12
- export default function StatusTimeline({ reviewed, reviewedCount, uploaded, uploadedCount, settled, settledCount, loading, }: {
12
+ export default function StatusTimeline({ reviewed, reviewedCount, stip, stipCount, uploaded, uploadedCount, sentOffers, sentOffersCount, settled, settledCount, loading, }: {
13
13
  reviewed: Status;
14
14
  reviewedCount?: StageCount;
15
+ stip: Status;
16
+ stipCount?: StageCount;
15
17
  uploaded: Status;
16
18
  uploadedCount?: StageCount;
19
+ sentOffers: Status;
20
+ sentOffersCount?: StageCount;
17
21
  settled: Status;
18
22
  settledCount?: StageCount;
19
23
  loading?: boolean;
@@ -3,4 +3,6 @@ export declare function isCaseSettled(c: Case, isVillage: boolean): boolean;
3
3
  export declare function isCaseUploadedOrSettled(c: Case, isVillage: boolean): boolean;
4
4
  export declare function isCaseMissingEvidence(c: Case): boolean;
5
5
  export declare function hasCaseUnuploadedEvidence(c: Case): boolean;
6
+ export declare function hasCaseSentOffer(c: Case): boolean;
7
+ export declare function isStipComplete(c: Case): boolean;
6
8
  export declare function filterCases(cases: Case[], filterCtx: CalendarFilterCtx, isVillage: boolean, selectedDate?: Date): Case[];