@propriety/court-calendar 1.0.55 → 1.0.57
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/dist/_components/List/CalendarList.d.ts +4 -5
- package/dist/_components/Modal/Modal.d.ts +3 -1
- package/dist/court-calendar.css +1 -1
- package/dist/helpers/CalEvent.d.ts +23 -0
- package/dist/hooks/UseCalendarEvents.d.ts +6 -7
- package/dist/hooks/UseModalSelection.d.ts +17 -11
- package/dist/index.mjs +5864 -5864
- package/dist/types.d.ts +10 -1
- package/package.json +1 -1
- package/src/_components/CCalendar.css +137 -1
- package/src/_components/CCalendar.tsx +11 -3
- package/src/_components/List/CalendarList.tsx +52 -117
- package/src/_components/Modal/Modal.tsx +5 -2
- package/src/helpers/CalEvent.ts +175 -0
- package/src/hooks/UseCalendarEvents.ts +236 -209
- package/src/hooks/UseModalSelection.ts +28 -14
- package/src/types.ts +23 -13
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function CalendarList({ filteredDates,
|
|
3
|
-
filteredDates:
|
|
4
|
-
|
|
1
|
+
import { CalEvent } from '../../helpers/CalEvent';
|
|
2
|
+
export default function CalendarList({ filteredDates, onSelectCalEvent, currentDate, onUpdateChair, isPrinting, }: {
|
|
3
|
+
filteredDates: CalEvent[];
|
|
4
|
+
onSelectCalEvent: (calEvent: CalEvent) => void;
|
|
5
5
|
currentDate: Date;
|
|
6
6
|
onUpdateChair?: (courtDateId: number, position: "first" | "second", userId: number | null) => void;
|
|
7
|
-
allCases: Record<string, Case[]>;
|
|
8
7
|
isPrinting?: boolean;
|
|
9
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Case, CourtDate } from '../../types';
|
|
2
|
+
import { CalEvent } from '../../helpers/CalEvent';
|
|
2
3
|
import { ModalMode } from './types';
|
|
3
|
-
export default function CCModal({ modalIsOpen, modalMode, setModalMode, setIsOpen, selectedCourtDate, selectedDate, selectedCases, isFetchingCases, }: {
|
|
4
|
+
export default function CCModal({ modalIsOpen, modalMode, setModalMode, setIsOpen, selectedCourtDate, selectedDate, selectedCalEvent, selectedCases, isFetchingCases, }: {
|
|
4
5
|
modalIsOpen: boolean;
|
|
5
6
|
modalMode: ModalMode;
|
|
6
7
|
setModalMode: (mode: ModalMode) => void;
|
|
7
8
|
setIsOpen: (isOpen: boolean) => void;
|
|
8
9
|
selectedCourtDate: CourtDate | null;
|
|
9
10
|
selectedDate: Date | null;
|
|
11
|
+
selectedCalEvent: CalEvent | null;
|
|
10
12
|
selectedCases: Case[];
|
|
11
13
|
isFetchingCases: boolean;
|
|
12
14
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/court-calendar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pop-in-ccalendar-event{opacity:0;transform:scale(.8);transform-origin:center center;animation:popInBounce .4s cubic-bezier(.34,1.56,.64,1) forwards;will-change:opacity,transform}@keyframes popInBounce{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}:root{--bg: #ffffff;--text: #212121;--fc-today-bg-color: #e3eefa;--fc-border-color: #cccccc;--fc-event-inperson-color: #1da39c;--fc-event-virtual-color: #216edf;--fc-event-unknown-color: #9e9e9e;--fc-event-negotiations-color: #33d391}[data-theme=dark]{--bg: #121212;--text: #ffffff;--fc-today-bg-color: #303e4a;--fc-border-color: #353333}.MuiTabs-flexContainer{justify-content:flex-start}.themed,.themed div:not(.MuiAvatar-root,.iconHolder,.evidence-row,.evidence-row *,.timeline-connector,.fab-bar,.info-hover-overlay),.themed .MuiInputBase-root,.themed label,.themed a,.themed .MuiSelect-select,.themed button:not(.MuiFab-root){background-color:var(--bg)!important;color:var(--text)!important;border-color:var(--fc-border-color)!important;scrollbar-color:var(--fc-border-color) var(--bg)}:is(.themed,.themed div:not(.MuiAvatar-root,.iconHolder,.evidence-row,.evidence-row *,.timeline-connector,.fab-bar,.info-hover-overlay),.themed .MuiInputBase-root,.themed label,.themed a,.themed .MuiSelect-select,.themed button:not(.MuiFab-root)):focus{outline-color:var(--fc-border-color)!important}.court-calendar a{color:var(--text)!important;text-decoration:none!important}.themed .MuiMenuItem-root,.themed .MuiMenuItem-root div:not(.MuiAvatar-root){background-color:transparent!important}.themed .MuiMenuItem-root:hover,.themed .MuiMenuItem-root:hover div:not(.MuiAvatar-root){background-color:var(--fc-today-bg-color)!important}.themed button.MuiToggleButton-root.Mui-selected{background-color:var(--fc-today-bg-color)!important}.themed button.MuiToggleButton-root:hover{background-color:var(--fc-border-color)!important}.themed .Mui-disabled *:not(input){color:var(--text)!important;cursor:not-allowed!important;opacity:.8!important}.themed::-webkit-scrollbar,.themed div::-webkit-scrollbar{width:8px;background:var(--bg)}.themed::-webkit-scrollbar-thumb,.themed div::-webkit-scrollbar-thumb{background:var(--fc-border-color);border-radius:4px}.themed::-webkit-scrollbar-track,.themed div::-webkit-scrollbar-track{background:var(--bg)}.themed input::placeholder,.themed .MuiFab-root>svg{color:var(--text)!important}.themed *{border-color:var(--fc-border-color)!important}.themed button:hover,.themed .MuiSelect-select:hover,.themed input:hover{background-color:var(--fc-today-bg-color)!important}.themed .MuiDataGrid-row:hover,.themed .MuiDataGrid-row:hover>*{background-color:var(--fc-today-bg-color)!important}.themed .MuiCheckbox-root{color:var(--text)!important}.themed .MuiInputBase-root:hover .MuiAutocomplete-endAdornment,.themed .MuiInputBase-root:hover input{background-color:var(--fc-today-bg-color)!important}:is(.themed .MuiInputBase-root:hover .MuiAutocomplete-endAdornment,.themed .MuiInputBase-root:hover input) button,:is(.themed .MuiInputBase-root:hover .MuiAutocomplete-endAdornment,.themed .MuiInputBase-root:hover input) input{background-color:var(--fc-today-bg-color)!important}.themed .MuiFormControl-root:hover .MuiFormLabel-root{background-color:var(--fc-today-bg-color)!important}.month-day-cell{background-color:var(--bg);color:var(--text);cursor:pointer;height:120px;padding:3px!important;position:relative}.month-day-cell.fc-day-other{filter:brightness(.9)}.month-day-cell.fc-day-today{background-color:var(--fc-today-bg-color)}.month-day-cell:hover:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--fc-today-bg-color);opacity:.5;pointer-events:none}.day-header{background-color:var(--bg);color:var(--text);border-bottom:1px solid var(--fc-border-color)}.day-header a{padding:6px 4px!important;display:inline-block}.court-calendar th[role=presentation]{background-color:var(--bg)}.day-cell-allday{background-color:var(--bg)!important;color:var(--text)!important}.fc-daygrid-day-events{max-height:100px;min-height:100px;overflow-y:inherit;margin:0!important;overflow-y:auto;scrollbar-color:var(--fc-border-color) transparent}.fc-day-today .fc-daygrid-day-events{scrollbar-color:var(--fc-event-unknown-color) transparent}.court-calendar .fc-timegrid-slot-label{background-color:var(--bg);color:var(--text)}.court-calendar .fc-timegrid-axis{border-color:var(--fc-border-color);background-color:var(--bg);color:var(--text)}.court-calendar .fc-timegrid-divider{border-color:var(--fc-border-color);background-color:var(--bg)}.fc .fc-button,.fc-button{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color);font-family:Roboto,Helvetica,Arial,"sans-serif";padding:.25rem .5rem;cursor:pointer}:is(.fc .fc-button,.fc-button).fc-button-primary{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color)}:is(.fc .fc-button,.fc-button).fc-button-active.fc-button-primary{background-color:var(--fc-today-bg-color);color:var(--text)}:is(.fc .fc-button,.fc-button):hover{background-color:var(--fc-today-bg-color)}.fc.fc-media-screen{background-color:var(--bg);color:var(--text);font-family:Roboto,Helvetica,Arial,"sans-serif"}#event-tooltip{background-color:var(--text);color:var(--bg);border:1px solid var(--fc-border-color);border-radius:4px;padding:8px;box-shadow:0 4px 8px #00000026;z-index:9999;font-size:16px}.court-event{cursor:pointer;padding:4px 2px}.CCButton{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color);font-family:Roboto,Helvetica,Arial,"sans-serif";padding:8px 16px;margin-right:8px;border-radius:4px;cursor:pointer;-webkit-user-select:none;user-select:none}.CCButton:hover{background-color:var(--fc-today-bg-color)}.CCButton-Icon{min-width:35px;max-width:35px;min-height:35px;max-height:35px;border:none;padding:0;display:flex;align-items:center;justify-content:center}.CCDropdown-Button{width:75px}.CCDropdown-Menu{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color);font-family:Roboto,Helvetica,Arial,"sans-serif";box-shadow:0 2px 8px #00000026}.CCDropdown-Menu div{padding:8px 19px}.CCDropdown-Menu div:hover{background-color:var(--fc-today-bg-color)}.CCButton-Primary{background-color:#1976d2;color:#fff;border:none}.CCButton-Primary:hover{background-color:#1565c0}.CCButton-Error{background-color:#c15a5a;color:#fff;border:none}.CCButton-Error:hover{background-color:#953838}.modal-footer{background-color:var(--bg);color:var(--text);border-top:1px solid var(--fc-border-color)}.MuiInputBase-root.Mui-disabled{opacity:.5!important}.ccdisabled{pointer-events:none;opacity:.6}.switch-track{outline:2px solid var(--fc-border-color)}.fc-list-day-cushion{background-color:var(--bg)!important;color:var(--text)}.fc-list .fc-list-event:hover td{background-color:var(--fc-today-bg-color)!important}.fc-list .deadline-event .fc-list-event-dot{border:none;width:1em;height:1em;vertical-align:middle;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="%2300c853"/><path d="M4 8l3 3 5-5" stroke="white" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center center;background-size:contain}.fc-list .deadline-event.inperson{--color: var(--fc-event-inperson-color)}.fc-list .deadline-event.virtual{--color: var(--fc-event-virtual-color)}.fc-list .deadline-event.unknown{--color: var(--fc-event-unknown-color)}.fc-list .deadline-event.negotiations{--color: var(--fc-event-negotiations-color)}.fc-view:not(.fc-list) .deadline-event{background-color:transparent!important;border-color:transparent!important;display:flex;align-items:center;overflow-x:hidden;position:relative}.fc-view:not(.fc-list) .deadline-event .fc-event-title{color:var(--text)!important}.fc-view:not(.fc-list) .deadline-event.inperson{--color: var(--fc-event-inperson-color)}.fc-view:not(.fc-list) .deadline-event.virtual{--color: var(--fc-event-virtual-color)}.fc-view:not(.fc-list) .deadline-event.unknown{--color: var(--fc-event-unknown-color)}.fc-view:not(.fc-list) .deadline-event.negotiations{--color: var(--fc-event-negotiations-color)}.fc-view:not(.fc-list) .deadline-event.adjourned-no-date{--color: rgb(151, 11, 134) !important}.fc-view:not(.fc-list) .deadline-event.status-uploaded:before{content:"";display:inline-block;width:1em;height:1em;vertical-align:middle;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="%2300c853"/><path d="M4 8l3 3 5-5" stroke="white" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center center;background-size:contain;margin:0 4px 0 0;top:.35em;border:none;position:absolute}.fc-view:not(.fc-list) .deadline-event.status-uploaded .fc-event-main{margin-left:1.5em!important}.fc-view:not(.fc-list) .deadline-event:not(.status-uploaded):before{content:"";display:inline-block;border-radius:calc(var(--fc-daygrid-event-dot-width) / 2);box-sizing:content-box;height:0px;margin:0 4px;width:0px;border:calc(var(--fc-daygrid-event-dot-width) / 2) solid var(--color)}.courtdate-event,.adjournment-event{border:1px solid var(--fc-border-color)!important}:is(.courtdate-event,.adjournment-event) .fc-event-title,:is(.courtdate-event,.adjournment-event) .fc-event-time{color:#fff!important}:is(.courtdate-event,.adjournment-event).inperson{background-color:var(--fc-event-inperson-color)!important;border-color:var(--fc-event-inperson-color)!important}:is(.courtdate-event,.adjournment-event).virtual{background-color:var(--fc-event-virtual-color)!important;border-color:var(--fc-event-virtual-color)!important}:is(.courtdate-event,.adjournment-event).unknown{background-color:var(--fc-event-unknown-color)!important;border-color:var(--fc-event-unknown-color)!important}:is(.courtdate-event,.adjournment-event).negotiations{background-color:var(--fc-event-negotiations-color)!important;border-color:var(--fc-event-negotiations-color)!important}:is(.courtdate-event,.adjournment-event) .fc-daygrid-event-dot,:is(.courtdate-event,.adjournment-event) .fc-list-event-dot{display:none}:is(.courtdate-event,.adjournment-event).adjourned-no-date{border-color:#970b86!important;background-color:#970b86!important}.ccalendar-list-row{cursor:pointer}.CCAvatarIcon:hover{cursor:pointer;transform:scale(1.1);box-shadow:0 4px 8px #0003}@page{size:landscape;margin:.5in}@media print{#ccalendar-container>.MuiStack-root:first-child,#event-tooltip,.ReactModal__Overlay,.MuiDataGrid-footerContainer{display:none!important}#ccalendar-container{width:100%!important;overflow:visible!important;padding-top:10px}.fc.fc-media-screen,.fc .fc-scrollgrid,.fc .fc-scrollgrid-section>td,.fc .fc-daygrid-body,.fc table{width:100%!important;max-width:100%!important}.fc .fc-scrollgrid{overflow:visible!important}.fc colgroup col{width:auto!important}.fc-daygrid-day-events{max-height:none!important;min-height:auto!important;overflow:visible!important}.month-day-cell{height:auto!important}#ccalendar-container .MuiDataGrid-root{height:auto!important;max-height:none!important}#ccalendar-container .MuiDataGrid-virtualScroller{overflow:visible!important;height:auto!important}*{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}}.modal-appear-animate{animation:modalFadeIn .35s cubic-bezier(.4,0,.2,1)}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96) translateY(24px)}to{opacity:1;transform:scale(1) translateY(0)}}
|
|
1
|
+
.pop-in-ccalendar-event{opacity:0;transform:scale(.8);transform-origin:center center;animation:popInBounce .4s cubic-bezier(.34,1.56,.64,1) forwards;will-change:opacity,transform}@keyframes popInBounce{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}:root{--bg: #ffffff;--text: #212121;--fc-today-bg-color: #e3eefa;--fc-border-color: #cccccc;--fc-event-inperson-color: #1da39c;--fc-event-virtual-color: #216edf;--fc-event-unknown-color: #9e9e9e;--fc-event-negotiations-color: #33d391}[data-theme=dark]{--bg: #121212;--text: #ffffff;--fc-today-bg-color: #303e4a;--fc-border-color: #353333}.MuiTabs-flexContainer{justify-content:flex-start}.themed,.themed div:not(.MuiAvatar-root,.iconHolder,.evidence-row,.evidence-row *,.timeline-connector,.fab-bar,.info-hover-overlay),.themed .MuiInputBase-root,.themed label,.themed a,.themed .MuiSelect-select,.themed button:not(.MuiFab-root){background-color:var(--bg)!important;color:var(--text)!important;border-color:var(--fc-border-color)!important;scrollbar-color:var(--fc-border-color) var(--bg)}:is(.themed,.themed div:not(.MuiAvatar-root,.iconHolder,.evidence-row,.evidence-row *,.timeline-connector,.fab-bar,.info-hover-overlay),.themed .MuiInputBase-root,.themed label,.themed a,.themed .MuiSelect-select,.themed button:not(.MuiFab-root)):focus{outline-color:var(--fc-border-color)!important}.court-calendar a{color:var(--text)!important;text-decoration:none!important}.themed .MuiMenuItem-root,.themed .MuiMenuItem-root div:not(.MuiAvatar-root){background-color:transparent!important}.themed .MuiMenuItem-root:hover,.themed .MuiMenuItem-root:hover div:not(.MuiAvatar-root){background-color:var(--fc-today-bg-color)!important}.themed button.MuiToggleButton-root.Mui-selected{background-color:var(--fc-today-bg-color)!important}.themed button.MuiToggleButton-root:hover{background-color:var(--fc-border-color)!important}.themed .Mui-disabled *:not(input){color:var(--text)!important;cursor:not-allowed!important;opacity:.8!important}.themed::-webkit-scrollbar,.themed div::-webkit-scrollbar{width:8px;background:var(--bg)}.themed::-webkit-scrollbar-thumb,.themed div::-webkit-scrollbar-thumb{background:var(--fc-border-color);border-radius:4px}.themed::-webkit-scrollbar-track,.themed div::-webkit-scrollbar-track{background:var(--bg)}.themed input::placeholder,.themed .MuiFab-root>svg{color:var(--text)!important}.themed *{border-color:var(--fc-border-color)!important}.themed button:hover,.themed .MuiSelect-select:hover,.themed input:hover{background-color:var(--fc-today-bg-color)!important}.themed .MuiDataGrid-row:hover,.themed .MuiDataGrid-row:hover>*{background-color:var(--fc-today-bg-color)!important}.themed .MuiCheckbox-root{color:var(--text)!important}.themed .MuiInputBase-root:hover .MuiAutocomplete-endAdornment,.themed .MuiInputBase-root:hover input{background-color:var(--fc-today-bg-color)!important}:is(.themed .MuiInputBase-root:hover .MuiAutocomplete-endAdornment,.themed .MuiInputBase-root:hover input) button,:is(.themed .MuiInputBase-root:hover .MuiAutocomplete-endAdornment,.themed .MuiInputBase-root:hover input) input{background-color:var(--fc-today-bg-color)!important}.themed .MuiFormControl-root:hover .MuiFormLabel-root{background-color:var(--fc-today-bg-color)!important}.month-day-cell{background-color:var(--bg);color:var(--text);cursor:pointer;height:120px;padding:3px!important;position:relative}.month-day-cell.fc-day-other{filter:brightness(.9)}.month-day-cell.fc-day-today{background-color:var(--fc-today-bg-color)}.month-day-cell:hover:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--fc-today-bg-color);opacity:.5;pointer-events:none}.day-header{background-color:var(--bg);color:var(--text);border-bottom:1px solid var(--fc-border-color)}.day-header a{padding:6px 4px!important;display:inline-block}.court-calendar th[role=presentation]{background-color:var(--bg)}.day-cell-allday{background-color:var(--bg)!important;color:var(--text)!important}.fc-daygrid-day-events{max-height:100px;min-height:100px;overflow-y:inherit;margin:0!important;overflow-y:auto;scrollbar-color:var(--fc-border-color) transparent}.fc-day-today .fc-daygrid-day-events{scrollbar-color:var(--fc-event-unknown-color) transparent}.court-calendar .fc-timegrid-slot-label{background-color:var(--bg);color:var(--text)}.court-calendar .fc-timegrid-axis{border-color:var(--fc-border-color);background-color:var(--bg);color:var(--text)}.court-calendar .fc-timegrid-divider{border-color:var(--fc-border-color);background-color:var(--bg)}.fc .fc-button,.fc-button{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color);font-family:Roboto,Helvetica,Arial,"sans-serif";padding:.25rem .5rem;cursor:pointer}:is(.fc .fc-button,.fc-button).fc-button-primary{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color)}:is(.fc .fc-button,.fc-button).fc-button-active.fc-button-primary{background-color:var(--fc-today-bg-color);color:var(--text)}:is(.fc .fc-button,.fc-button):hover{background-color:var(--fc-today-bg-color)}.fc.fc-media-screen{background-color:var(--bg);color:var(--text);font-family:Roboto,Helvetica,Arial,"sans-serif"}#event-tooltip{background-color:var(--text);color:var(--bg);border:1px solid var(--fc-border-color);border-radius:4px;padding:8px;box-shadow:0 4px 8px #00000026;z-index:9999;font-size:16px}.court-event{cursor:pointer;padding:4px 2px}.CCButton{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color);font-family:Roboto,Helvetica,Arial,"sans-serif";padding:8px 16px;margin-right:8px;border-radius:4px;cursor:pointer;-webkit-user-select:none;user-select:none}.CCButton:hover{background-color:var(--fc-today-bg-color)}.CCButton-Icon{min-width:35px;max-width:35px;min-height:35px;max-height:35px;border:none;padding:0;display:flex;align-items:center;justify-content:center}.CCDropdown-Button{width:75px}.CCDropdown-Menu{background-color:var(--bg);color:var(--text);border:1px solid var(--fc-border-color);font-family:Roboto,Helvetica,Arial,"sans-serif";box-shadow:0 2px 8px #00000026}.CCDropdown-Menu div{padding:8px 19px}.CCDropdown-Menu div:hover{background-color:var(--fc-today-bg-color)}.CCButton-Primary{background-color:#1976d2;color:#fff;border:none}.CCButton-Primary:hover{background-color:#1565c0}.CCButton-Error{background-color:#c15a5a;color:#fff;border:none}.CCButton-Error:hover{background-color:#953838}.modal-footer{background-color:var(--bg);color:var(--text);border-top:1px solid var(--fc-border-color)}.MuiInputBase-root.Mui-disabled{opacity:.5!important}.ccdisabled{pointer-events:none;opacity:.6}.switch-track{outline:2px solid var(--fc-border-color)}.fc-list-day-cushion{background-color:var(--bg)!important;color:var(--text)}.fc-list .fc-list-event:hover td{background-color:var(--fc-today-bg-color)!important}.fc-list .deadline-event .fc-list-event-dot{border:none;width:1em;height:1em;vertical-align:middle;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="%2300c853"/><path d="M4 8l3 3 5-5" stroke="white" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center center;background-size:contain}.fc-list .deadline-event.inperson{--color: var(--fc-event-inperson-color)}.fc-list .deadline-event.virtual{--color: var(--fc-event-virtual-color)}.fc-list .deadline-event.unknown{--color: var(--fc-event-unknown-color)}.fc-list .deadline-event.negotiations{--color: var(--fc-event-negotiations-color)}.fc-view:not(.fc-list) .deadline-event{background-color:transparent!important;border-color:transparent!important;display:flex;align-items:center;overflow-x:hidden;position:relative}.fc-view:not(.fc-list) .deadline-event .fc-event-title{color:var(--text)!important}.fc-view:not(.fc-list) .deadline-event.inperson{--color: var(--fc-event-inperson-color)}.fc-view:not(.fc-list) .deadline-event.virtual{--color: var(--fc-event-virtual-color)}.fc-view:not(.fc-list) .deadline-event.unknown{--color: var(--fc-event-unknown-color)}.fc-view:not(.fc-list) .deadline-event.negotiations{--color: var(--fc-event-negotiations-color)}.fc-view:not(.fc-list) .deadline-event.adjourned-no-date{--color: rgb(151, 11, 134) !important}.fc-view:not(.fc-list) .deadline-event.status-uploaded:before{content:"";display:inline-block;width:1em;height:1em;vertical-align:middle;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="%2300c853"/><path d="M4 8l3 3 5-5" stroke="white" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center center;background-size:contain;margin:0 4px 0 0;top:.35em;border:none;position:absolute}.fc-view:not(.fc-list) .deadline-event.status-uploaded .fc-event-main{margin-left:1.5em!important}.fc-view:not(.fc-list) .deadline-event:not(.status-uploaded):before{content:"";display:inline-block;border-radius:calc(var(--fc-daygrid-event-dot-width) / 2);box-sizing:content-box;height:0px;margin:0 4px;width:0px;border:calc(var(--fc-daygrid-event-dot-width) / 2) solid var(--color)}.courtdate-event,.adjournment-event{border:1px solid var(--fc-border-color)!important}:is(.courtdate-event,.adjournment-event) .fc-event-title,:is(.courtdate-event,.adjournment-event) .fc-event-time{color:#fff!important}:is(.courtdate-event,.adjournment-event).inperson{background-color:var(--fc-event-inperson-color)!important;border-color:var(--fc-event-inperson-color)!important}:is(.courtdate-event,.adjournment-event).virtual{background-color:var(--fc-event-virtual-color)!important;border-color:var(--fc-event-virtual-color)!important}:is(.courtdate-event,.adjournment-event).unknown{background-color:var(--fc-event-unknown-color)!important;border-color:var(--fc-event-unknown-color)!important}:is(.courtdate-event,.adjournment-event).negotiations{background-color:var(--fc-event-negotiations-color)!important;border-color:var(--fc-event-negotiations-color)!important}:is(.courtdate-event,.adjournment-event) .fc-daygrid-event-dot,:is(.courtdate-event,.adjournment-event) .fc-list-event-dot{display:none}:is(.courtdate-event,.adjournment-event).adjourned-no-date{border-color:#970b86!important;background-color:#970b86!important}.deadline-due-today.courtdate-event,.deadline-due-today.multipledate-event{border:2px solid #d32f2f!important;outline:1px solid #d32f2f}.deadline-due-today.courtdate-event .fc-event-main,.deadline-due-today.multipledate-event .fc-event-main{position:relative}.deadline-due-today.courtdate-event .fc-event-main:after,.deadline-due-today.multipledate-event .fc-event-main:after{content:"!";position:absolute;top:0;right:2px;background:#d32f2f;color:#fff;border-radius:50%;width:14px;height:14px;font-size:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;line-height:1;z-index:99999}.fc-view:not(.fc-list) .deadline-due-today.deadline-event{outline:2px solid #d32f2f;border-radius:2px}.fc-view:not(.fc-list) .deadline-due-today.deadline-event .fc-event-title{color:#d32f2f!important;font-weight:700}.fc-view:not(.fc-list) .deadline-due-today.deadline-event:after{content:"!";position:absolute;left:2.5px;background:#d32f2f;color:#fff;border-radius:50%;width:14px;height:14px;font-size:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;line-height:1;z-index:99999}@keyframes overdueFlash{0%,to{border-color:#b71c1c!important;box-shadow:0 0 #b71c1c00}50%{border-color:#ff1744!important;box-shadow:0 0 8px 3px #ff174499}}.deadline-overdue.courtdate-event,.deadline-overdue.multipledate-event{border:2px solid #b71c1c!important;animation:overdueFlash 1.8s ease-in-out infinite!important}.deadline-overdue.courtdate-event .fc-event-main,.deadline-overdue.multipledate-event .fc-event-main{position:relative}.deadline-overdue.courtdate-event .fc-event-main:after,.deadline-overdue.multipledate-event .fc-event-main:after{content:"⚠";position:absolute;top:0;right:2px;background:#b71c1c;color:#fff;border-radius:50%;width:16px;height:16px;font-size:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;line-height:1;z-index:5}.fc-view:not(.fc-list) .deadline-overdue.deadline-event{outline:2px solid #b71c1c;border-radius:2px;animation:overdueFlash 1.8s ease-in-out infinite!important}.fc-view:not(.fc-list) .deadline-overdue.deadline-event .fc-event-title{color:#b71c1c!important;font-weight:700}.fc-view:not(.fc-list) .deadline-overdue.deadline-event:after{content:"⚠";position:absolute;left:2.5px;background:#b71c1c;color:#fff;border-radius:50%;width:14px;height:14px;font-size:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;line-height:1;z-index:99999}.ccalendar-list-row{cursor:pointer}.CCAvatarIcon:hover{cursor:pointer;transform:scale(1.1);box-shadow:0 4px 8px #0003}@page{size:landscape;margin:.5in}@media print{#ccalendar-container>.MuiStack-root:first-child,#event-tooltip,.ReactModal__Overlay,.MuiDataGrid-footerContainer{display:none!important}#ccalendar-container{width:100%!important;overflow:visible!important;padding-top:10px}.fc.fc-media-screen,.fc .fc-scrollgrid,.fc .fc-scrollgrid-section>td,.fc .fc-daygrid-body,.fc table{width:100%!important;max-width:100%!important}.fc .fc-scrollgrid{overflow:visible!important}.fc colgroup col{width:auto!important}.fc-daygrid-day-events{max-height:none!important;min-height:auto!important;overflow:visible!important}.month-day-cell{height:auto!important}#ccalendar-container .MuiDataGrid-root{height:auto!important;max-height:none!important}#ccalendar-container .MuiDataGrid-virtualScroller{overflow:visible!important;height:auto!important}*{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}}.modal-appear-animate{animation:modalFadeIn .35s cubic-bezier(.4,0,.2,1)}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96) translateY(24px)}to{opacity:1;transform:scale(1) translateY(0)}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HearingType, DateType, Lifecycle, Case, CourtDate, Notes } from '../types';
|
|
2
|
+
export interface CalEvent {
|
|
3
|
+
id: string;
|
|
4
|
+
courtDateID: number;
|
|
5
|
+
cases: Case[];
|
|
6
|
+
hearingType: HearingType;
|
|
7
|
+
lifecycle: Lifecycle;
|
|
8
|
+
dateType: DateType;
|
|
9
|
+
muniCode: string;
|
|
10
|
+
firstChair: number | null;
|
|
11
|
+
secondChair: number | null;
|
|
12
|
+
notes: Notes[] | null;
|
|
13
|
+
originalDate: Date;
|
|
14
|
+
activeDate: Date;
|
|
15
|
+
uploadDeadline: Date | null;
|
|
16
|
+
isAdjourned: boolean;
|
|
17
|
+
isExtraDay: boolean;
|
|
18
|
+
extraDayIndex: number | null;
|
|
19
|
+
isMultiDay: boolean;
|
|
20
|
+
hasAdjournedNoDate: boolean;
|
|
21
|
+
source: CourtDate;
|
|
22
|
+
}
|
|
23
|
+
export declare function buildCalEvents(courtDates: CourtDate[], casesByCourtDateId: Record<string, Case[]>, allCourtDates?: CourtDate[]): CalEvent[];
|
|
@@ -7,23 +7,22 @@ import { EventSourceInput, EventMountArg, Calendar } from '@fullcalendar/core/in
|
|
|
7
7
|
* - Runs async case-term searches and accumulates matching court date IDs.
|
|
8
8
|
* - Filters `courtDates` according to every dimension in `filterCtx`
|
|
9
9
|
* (hearing type, assignment, muni, unsettled/no-evidence/unreviewed, search term).
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
13
|
-
* - **deadlines** – all-day upload-deadline events.
|
|
10
|
+
* - Calls `buildCalEvents` to produce one `CalEvent` per visual occurrence
|
|
11
|
+
* (original, extra-day, and adjournment events — bucketing/suppression lives there).
|
|
12
|
+
* - Maps each `CalEvent` to a FullCalendar event object.
|
|
14
13
|
* - Suppresses event updates while the modal is open to avoid UI churn.
|
|
15
14
|
* - Applies a staggered `pop-in` CSS animation to newly-appearing events via
|
|
16
15
|
* `handleEventMount`, and attaches HTML tooltip content to each event element.
|
|
17
16
|
*
|
|
18
17
|
* @param courtDates Full list of court dates to derive events from.
|
|
19
|
-
* @param allCases Map of `CourtDateID → Case[]` for case
|
|
18
|
+
* @param allCases Map of `CourtDateID → Case[]` for filtering and case counts.
|
|
20
19
|
* @param apiKey API key forwarded to the search helper.
|
|
21
20
|
* @param modalIsOpen When `true`, event state updates are paused.
|
|
22
21
|
* @param filterCtx Active filter/search context from the calendar UI.
|
|
23
22
|
*
|
|
24
23
|
* @returns
|
|
25
24
|
* - `events` – current FullCalendar `EventSourceInput` array.
|
|
26
|
-
* - `filteredDates` –
|
|
25
|
+
* - `filteredDates` – `CalEvent[]` that survive all active filters.
|
|
27
26
|
* - `eventHash` – JSON hash of `events`; changes whenever the event list changes.
|
|
28
27
|
* - `handleEventMount` – callback to pass to FullCalendar's `eventDidMount` prop.
|
|
29
28
|
*/
|
|
@@ -35,7 +34,7 @@ export declare function useCalendarEvents({ courtDates, allCases, apiKey, modalI
|
|
|
35
34
|
filterCtx: CalendarFilterCtx;
|
|
36
35
|
}): {
|
|
37
36
|
events: EventSourceInput;
|
|
38
|
-
filteredDates:
|
|
37
|
+
filteredDates: import('../helpers/CalEvent').CalEvent[];
|
|
39
38
|
eventHash: string;
|
|
40
39
|
handleEventMount: (info: EventMountArg, calendarApi: Calendar | null) => void;
|
|
41
40
|
};
|
|
@@ -1,34 +1,40 @@
|
|
|
1
1
|
import { CourtDate } from '../types';
|
|
2
2
|
import { ModalMode } from '../_components/Modal/types';
|
|
3
3
|
import { EventClickArg } from '@fullcalendar/core/index.js';
|
|
4
|
+
import { CalEvent } from '../helpers/CalEvent';
|
|
4
5
|
/**
|
|
5
6
|
* Manages which court date is selected and how the modal is opened.
|
|
6
7
|
*
|
|
7
8
|
* Tracks open/close state, the selected `CourtDate`, the active `ModalMode`,
|
|
8
9
|
* and the calendar date associated with the selection.
|
|
9
10
|
*
|
|
11
|
+
* `selectedCalEventId` identifies which CalEvent was clicked so that CCalendar
|
|
12
|
+
* can reactively derive the pre-bucketed `selectedCalEvent` from `filteredDates`.
|
|
13
|
+
*
|
|
10
14
|
* @returns
|
|
11
|
-
* - `modalIsOpen`
|
|
12
|
-
* - `setIsOpen`
|
|
13
|
-
* - `selectedCourtDate`
|
|
15
|
+
* - `modalIsOpen` – Whether the modal is currently open.
|
|
16
|
+
* - `setIsOpen` – Directly set the open/close state.
|
|
17
|
+
* - `selectedCourtDate` – The court date currently displayed in the modal (for editing).
|
|
14
18
|
* - `setSelectedCourtDate` – Override the selected court date directly.
|
|
15
|
-
* - `
|
|
16
|
-
* - `
|
|
17
|
-
* - `
|
|
18
|
-
* - `
|
|
19
|
-
* - `
|
|
20
|
-
* - `
|
|
21
|
-
*
|
|
19
|
+
* - `selectedCalEventId` – ID of the clicked CalEvent (used to derive selectedCalEvent).
|
|
20
|
+
* - `modalMode` – Current mode (`DETAILS` or `CREATE`).
|
|
21
|
+
* - `setModalMode` – Override the modal mode directly.
|
|
22
|
+
* - `selectedDate` – Calendar date extracted from the last clicked event.
|
|
23
|
+
* - `openCreateModal` – Opens the modal in CREATE mode pre-filled with a date.
|
|
24
|
+
* - `openDetailsModal` – Opens the modal in DETAILS mode for a given CalEvent.
|
|
25
|
+
* - `handleEventClick` – FullCalendar `eventClick` handler; extracts the CalEvent id
|
|
26
|
+
* and CourtDate from event props and opens the details modal.
|
|
22
27
|
*/
|
|
23
28
|
export declare function useModalSelection(): {
|
|
24
29
|
modalIsOpen: boolean;
|
|
25
30
|
setIsOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
26
31
|
selectedCourtDate: CourtDate | null;
|
|
27
32
|
setSelectedCourtDate: import('react').Dispatch<import('react').SetStateAction<CourtDate | null>>;
|
|
33
|
+
selectedCalEventId: string | null;
|
|
28
34
|
modalMode: ModalMode;
|
|
29
35
|
setModalMode: import('react').Dispatch<import('react').SetStateAction<ModalMode>>;
|
|
30
36
|
selectedDate: Date | null;
|
|
31
37
|
openCreateModal: (date: Date) => void;
|
|
32
|
-
openDetailsModal: (
|
|
38
|
+
openDetailsModal: (calEvent: CalEvent) => void;
|
|
33
39
|
handleEventClick: (clickInfo: EventClickArg) => void;
|
|
34
40
|
};
|