@mieweb/ui 0.9.0-dev.1 → 0.9.0-dev.3
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/{Animated-Cs-naa2g.d.cts → Animated-XmH6k8pZ.d.cts} +16 -3
- package/dist/{Animated-Cs-naa2g.d.ts → Animated-XmH6k8pZ.d.ts} +16 -3
- package/dist/{chunk-XUVEF2RQ.js → chunk-24SEAAOH.js} +2 -2
- package/dist/{chunk-XUVEF2RQ.js.map → chunk-24SEAAOH.js.map} +1 -1
- package/dist/{chunk-FUFBRKOG.cjs → chunk-2WBPNXO2.cjs} +21 -21
- package/dist/{chunk-FUFBRKOG.cjs.map → chunk-2WBPNXO2.cjs.map} +1 -1
- package/dist/{chunk-IUDY6S7I.cjs → chunk-37UZHCLM.cjs} +35 -14
- package/dist/chunk-37UZHCLM.cjs.map +1 -0
- package/dist/{chunk-L52N6BEN.cjs → chunk-AUOTJQGO.cjs} +7 -7
- package/dist/{chunk-L52N6BEN.cjs.map → chunk-AUOTJQGO.cjs.map} +1 -1
- package/dist/{chunk-2A2FLQJC.cjs → chunk-B67VPJCZ.cjs} +9 -9
- package/dist/{chunk-2A2FLQJC.cjs.map → chunk-B67VPJCZ.cjs.map} +1 -1
- package/dist/{chunk-6XDPJWSC.cjs → chunk-E7G22IQM.cjs} +32 -28
- package/dist/chunk-E7G22IQM.cjs.map +1 -0
- package/dist/{chunk-ONNY7UO4.js → chunk-JDJQTKTX.js} +3 -3
- package/dist/{chunk-ONNY7UO4.js.map → chunk-JDJQTKTX.js.map} +1 -1
- package/dist/{chunk-BJKAVWED.js → chunk-MBWF36DJ.js} +35 -14
- package/dist/chunk-MBWF36DJ.js.map +1 -0
- package/dist/{chunk-CXDMZT45.cjs → chunk-NPHZUCF3.cjs} +25 -2
- package/dist/chunk-NPHZUCF3.cjs.map +1 -0
- package/dist/chunk-NV2CWBI2.cjs +290 -0
- package/dist/chunk-NV2CWBI2.cjs.map +1 -0
- package/dist/{chunk-7KN6J7XV.cjs → chunk-OMAACCFW.cjs} +7 -7
- package/dist/{chunk-7KN6J7XV.cjs.map → chunk-OMAACCFW.cjs.map} +1 -1
- package/dist/{chunk-YJP6DUFO.cjs → chunk-PKD3JLS2.cjs} +6 -6
- package/dist/{chunk-YJP6DUFO.cjs.map → chunk-PKD3JLS2.cjs.map} +1 -1
- package/dist/{chunk-5H7SAEQO.js → chunk-QKFJDQEK.js} +3 -3
- package/dist/{chunk-5H7SAEQO.js.map → chunk-QKFJDQEK.js.map} +1 -1
- package/dist/{chunk-XJTFZLWH.cjs → chunk-QO6PRHDX.cjs} +2 -2
- package/dist/{chunk-XJTFZLWH.cjs.map → chunk-QO6PRHDX.cjs.map} +1 -1
- package/dist/{chunk-OHDIJOGG.js → chunk-RD3JDFYJ.js} +3 -3
- package/dist/{chunk-OHDIJOGG.js.map → chunk-RD3JDFYJ.js.map} +1 -1
- package/dist/{chunk-4SM3I7WE.cjs → chunk-RXPEZXAB.cjs} +67 -38
- package/dist/chunk-RXPEZXAB.cjs.map +1 -0
- package/dist/{chunk-VTR2KGLY.cjs → chunk-S3BCHPXT.cjs} +9 -9
- package/dist/{chunk-VTR2KGLY.cjs.map → chunk-S3BCHPXT.cjs.map} +1 -1
- package/dist/{chunk-KU3XRHWA.js → chunk-TZX76ZNZ.js} +67 -38
- package/dist/chunk-TZX76ZNZ.js.map +1 -0
- package/dist/{chunk-DGRXAIWK.js → chunk-UHHYJ42E.js} +25 -2
- package/dist/chunk-UHHYJ42E.js.map +1 -0
- package/dist/{chunk-KATEJG2F.js → chunk-VMQZAOFM.js} +3 -3
- package/dist/{chunk-KATEJG2F.js.map → chunk-VMQZAOFM.js.map} +1 -1
- package/dist/{chunk-Q7G56ZIO.js → chunk-WUBMDOTG.js} +3 -3
- package/dist/{chunk-Q7G56ZIO.js.map → chunk-WUBMDOTG.js.map} +1 -1
- package/dist/chunk-XCP454Q6.js +263 -0
- package/dist/chunk-XCP454Q6.js.map +1 -0
- package/dist/{chunk-I3DQXUSC.js → chunk-Y6DFMDMH.js} +3 -3
- package/dist/{chunk-I3DQXUSC.js.map → chunk-Y6DFMDMH.js.map} +1 -1
- package/dist/{chunk-ODYQYLO2.js → chunk-YSEMAI4I.js} +8 -4
- package/dist/chunk-YSEMAI4I.js.map +1 -0
- package/dist/components/AlertDialog/index.cjs +4 -4
- package/dist/components/AlertDialog/index.js +3 -3
- package/dist/components/Collapsible/index.cjs +6 -4
- package/dist/components/Collapsible/index.js +3 -1
- package/dist/components/Dropdown/index.cjs +9 -8
- package/dist/components/Dropdown/index.js +2 -1
- package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
- package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
- package/dist/components/MediaEditor/index.cjs +8 -8
- package/dist/components/MediaEditor/index.js +3 -3
- package/dist/components/Modal/index.cjs +10 -10
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/RichTextEditor/index.cjs +6 -5
- package/dist/components/RichTextEditor/index.js +3 -2
- package/dist/components/SuperChat/index.cjs +14 -13
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.js +3 -2
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/esheet.cjs +6 -6
- package/dist/esheet.js +3 -3
- package/dist/hooks/index.cjs +13 -13
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +1339 -1224
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +998 -884
- package/dist/index.js.map +1 -1
- package/dist/motion.cjs +7 -7
- package/dist/motion.d.cts +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4SM3I7WE.cjs.map +0 -1
- package/dist/chunk-6XDPJWSC.cjs.map +0 -1
- package/dist/chunk-BJKAVWED.js.map +0 -1
- package/dist/chunk-BN75TLUN.cjs +0 -163
- package/dist/chunk-BN75TLUN.cjs.map +0 -1
- package/dist/chunk-CXDMZT45.cjs.map +0 -1
- package/dist/chunk-DGRXAIWK.js.map +0 -1
- package/dist/chunk-IUDY6S7I.cjs.map +0 -1
- package/dist/chunk-KU3XRHWA.js.map +0 -1
- package/dist/chunk-ODYQYLO2.js.map +0 -1
- package/dist/chunk-WYMO3IIK.js +0 -136
- package/dist/chunk-WYMO3IIK.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -25,14 +25,14 @@ export { SourceTip } from './chunk-PHK4XBO5.js';
|
|
|
25
25
|
export { Sparkline } from './chunk-CG4ZKJLE.js';
|
|
26
26
|
import { Spinner, SpinnerWithLabel } from './chunk-UA7E7PDS.js';
|
|
27
27
|
export { FullPageSpinner, Spinner, SpinnerWithLabel, spinnerVariants } from './chunk-UA7E7PDS.js';
|
|
28
|
-
import { SparklesIcon, RefreshIcon, CloseIcon, AIMessageDisplay, ComposerModelSelector } from './chunk-
|
|
29
|
-
export { AILogoIcon, AIMessageDisplay, AITypingIndicator, ChatBubble, ChatComposer, ChevronIcon, CloseIcon, CollapsiblePill, ComposerModelSelector, MCPToolCallDisplay, MessageAvatar, RefreshIcon, ResourceLink, SendIcon, SparklesIcon, SpinnerIcon, ToolStatusIcon, getToolIcon } from './chunk-
|
|
28
|
+
import { SparklesIcon, RefreshIcon, CloseIcon, AIMessageDisplay, ComposerModelSelector } from './chunk-VMQZAOFM.js';
|
|
29
|
+
export { AILogoIcon, AIMessageDisplay, AITypingIndicator, ChatBubble, ChatComposer, ChevronIcon, CloseIcon, CollapsiblePill, ComposerModelSelector, MCPToolCallDisplay, MessageAvatar, RefreshIcon, ResourceLink, SendIcon, SparklesIcon, SpinnerIcon, ToolStatusIcon, getToolIcon } from './chunk-VMQZAOFM.js';
|
|
30
30
|
import { MessageComposer, EmptyState } from './chunk-RPG2ZP2T.js';
|
|
31
31
|
export { AttachmentPreview, CharacterCounter, ConversationHeader, ConversationListItem, ConversationListSkeleton, DateSeparator, EmptyState, LightboxModal, LoadMoreButton, MessageBubble, MessageComposer, MessageList, MessageStatusIcon, MessageThread, MessagingSplitView, ReadReceiptIndicator, SendButton, SkeletonMessage, TypingIndicator, bubbleVariants, formatDateLabel, formatFileSize, formatLastSeen, getConversationSubtitle, getConversationTitle, groupMessagesByDate, headerVariants, isSameSenderGroup, sendButtonVariants, useMessageScroll, useMessages, useReadReceipts, useTypingIndicator } from './chunk-RPG2ZP2T.js';
|
|
32
32
|
export { AttachmentPicker, AttachmentPreviewItem, CameraButton, DragDropZone, generateAttachmentId, getFileType, validateFile } from './chunk-IF3X2WZP.js';
|
|
33
33
|
import { RecordButton } from './chunk-VNWJTCBQ.js';
|
|
34
34
|
export { RecordButton, formatDuration, recordButtonVariants } from './chunk-VNWJTCBQ.js';
|
|
35
|
-
export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from './chunk-
|
|
35
|
+
export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from './chunk-QKFJDQEK.js';
|
|
36
36
|
export { DateButton, DatePicker, RadioOption, SchedulePicker, TimeButton, TimePicker, dateButtonVariants, radioOptionVariants, timeButtonVariants } from './chunk-23AYDOCH.js';
|
|
37
37
|
export { ScrollArea, scrollAreaVariants } from './chunk-HS25RPDW.js';
|
|
38
38
|
export { SectionSpyNav } from './chunk-3RB35GYK.js';
|
|
@@ -45,18 +45,18 @@ export { QuickAction, QuickActionGroup, QuickActionIcons, quickActionIconVariant
|
|
|
45
45
|
export { ReadingProgressBar } from './chunk-WKSUL2ZN.js';
|
|
46
46
|
export { FreshnessBadge, FreshnessDot, daysSince, freshnessLevel } from './chunk-HQ3XPCHG.js';
|
|
47
47
|
export { GlossaryTooltip } from './chunk-L5W7TJQ5.js';
|
|
48
|
-
export { Kbd, KeyboardShortcutsOverlay } from './chunk-
|
|
48
|
+
export { Kbd, KeyboardShortcutsOverlay } from './chunk-Y6DFMDMH.js';
|
|
49
49
|
export { CodeBlock, MarkdownRenderer, highlightCode, useMarkdown } from './chunk-D25WH7MH.js';
|
|
50
50
|
export { CsvBlock } from './chunk-NHN6A3ZO.js';
|
|
51
51
|
export { HtmlPreviewBlock } from './chunk-EG7XFZ3W.js';
|
|
52
52
|
export { MermaidBlock } from './chunk-ZB54MTMQ.js';
|
|
53
53
|
export { SurveyBlock } from './chunk-OSPTA4UR.js';
|
|
54
54
|
export { FenceBlock } from './chunk-CK3KLRNF.js';
|
|
55
|
-
export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-
|
|
55
|
+
export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-JDJQTKTX.js';
|
|
56
56
|
export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants } from './chunk-2BPIVWAK.js';
|
|
57
57
|
import './chunk-RISZWWEQ.js';
|
|
58
58
|
export { MediaPlayer, inferMediaKind, mediaPlayerVariants } from './chunk-5WOB4UBD.js';
|
|
59
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './chunk-
|
|
59
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './chunk-MBWF36DJ.js';
|
|
60
60
|
export { CopyButton } from './chunk-5QZ73PZC.js';
|
|
61
61
|
import { CountryDropdownBase } from './chunk-QAKASRE6.js';
|
|
62
62
|
export { CountryCodeDropdown, formatE164, validatePhoneNumber } from './chunk-QAKASRE6.js';
|
|
@@ -64,8 +64,8 @@ export { CustomizableDashboard, DashboardCustomizePanel, consolidateColumns, mer
|
|
|
64
64
|
import { Switch, switchThumbVariants, switchTrackVariants } from './chunk-AQ564XO7.js';
|
|
65
65
|
export { Switch, switchThumbVariants, switchTrackVariants } from './chunk-AQ564XO7.js';
|
|
66
66
|
export { Sheet, SheetBody, SheetClose, SheetDescription, SheetFooter, SheetHeader, SheetTitle, sheetContentVariants, sheetOverlayVariants } from './chunk-ON4JULCA.js';
|
|
67
|
-
import { Dropdown, DropdownItem, DropdownSeparator, DropdownContent, DropdownHeader } from './chunk-
|
|
68
|
-
export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator, DropdownSubmenu } from './chunk-
|
|
67
|
+
import { Dropdown, DropdownItem, DropdownSeparator, DropdownContent, DropdownHeader } from './chunk-TZX76ZNZ.js';
|
|
68
|
+
export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator, DropdownSubmenu } from './chunk-TZX76ZNZ.js';
|
|
69
69
|
export { FilterSummaryBar } from './chunk-6SCQ7FKT.js';
|
|
70
70
|
export { FloatingWindow, MinimizedWindow } from './chunk-PYHFVYVZ.js';
|
|
71
71
|
import { Avatar } from './chunk-HZ4MBUC3.js';
|
|
@@ -80,19 +80,19 @@ export { CollabStatus, defaultCollabStatusLabels, useYjsCollabStatus } from './c
|
|
|
80
80
|
import './chunk-7XUN3OQT.js';
|
|
81
81
|
export { isHtmlEmpty, stripHtmlTags } from './chunk-ERLPVXOV.js';
|
|
82
82
|
export { formatPhoneNumber, isPhoneNumberEmpty, isValidPhoneNumber, unformatPhoneNumber } from './chunk-ZVPJ2MH6.js';
|
|
83
|
-
export { miewebUIPreset, miewebUISafelist } from './chunk-
|
|
83
|
+
export { miewebUIPreset, miewebUISafelist } from './chunk-UHHYJ42E.js';
|
|
84
84
|
export { Accordion } from './chunk-KRU6IGV7.js';
|
|
85
85
|
import { Alert, AlertTitle, AlertDescription } from './chunk-3JWAABYI.js';
|
|
86
86
|
export { Alert, AlertDescription, AlertTitle, alertVariants } from './chunk-3JWAABYI.js';
|
|
87
|
-
import { AlertDialog } from './chunk-
|
|
88
|
-
export { AlertDialog } from './chunk-
|
|
87
|
+
import { AlertDialog } from './chunk-RD3JDFYJ.js';
|
|
88
|
+
export { AlertDialog } from './chunk-RD3JDFYJ.js';
|
|
89
89
|
export { AudioPlayer, ProgressBar, audioPlayerVariants, formatTime as formatAudioTime, playButtonVariants } from './chunk-VVDE4CHU.js';
|
|
90
90
|
export { AudioRecorder, audioRecorderVariants, controlButtonVariants, formatTime, waveformContainerVariants } from './chunk-2DW4PUJD.js';
|
|
91
91
|
export { Autocomplete } from './chunk-QAQOCS2J.js';
|
|
92
92
|
import { evaluateDue, completedKeys, normalizeOrders } from './chunk-Y5KEFV5O.js';
|
|
93
93
|
export { buildChartOrderRows, buildEncounterOrderRows, dueForOrder, evaluateDue, evaluateProgram, isApplicable } from './chunk-Y5KEFV5O.js';
|
|
94
|
-
import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-
|
|
95
|
-
export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-
|
|
94
|
+
import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-YSEMAI4I.js';
|
|
95
|
+
export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-YSEMAI4I.js';
|
|
96
96
|
import { Textarea } from './chunk-H3YO5GBM.js';
|
|
97
97
|
export { Textarea, textareaVariants } from './chunk-H3YO5GBM.js';
|
|
98
98
|
import { Tooltip } from './chunk-MUIDWFYJ.js';
|
|
@@ -109,23 +109,23 @@ import { Card, CardHeader, CardContent, CardTitle } from './chunk-QYSUYB3S.js';
|
|
|
109
109
|
export { Card, CardActions, CardBadge, CardCollapsible, CardContent, CardDescription, CardDivider, CardFooter, CardHeader, CardMedia, CardStat, CardTitle, cardAccentVariants, cardVariants } from './chunk-QYSUYB3S.js';
|
|
110
110
|
import { dateToDisplayFormat, isValidDate, displayFormatToDateString } from './chunk-RC2YMOMS.js';
|
|
111
111
|
export { calculateAge, dateToDisplayFormat, displayFormatToDateString, formatDateValue, isDateEmpty, isDateInFuture, isDateInPast, isValidDate, isValidDrivingAge, parseDateValue } from './chunk-RC2YMOMS.js';
|
|
112
|
-
import { Modal, ModalHeader, ModalTitle, ModalClose, ModalBody, ModalFooter } from './chunk-
|
|
113
|
-
export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-
|
|
112
|
+
import { Modal, ModalHeader, ModalTitle, ModalClose, ModalBody, ModalFooter } from './chunk-WUBMDOTG.js';
|
|
113
|
+
export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-WUBMDOTG.js';
|
|
114
114
|
import './chunk-6NZXWKUE.js';
|
|
115
115
|
import { Input, inputVariants } from './chunk-3IMM2PM4.js';
|
|
116
116
|
export { Input, RequiredMark, floatingGroupLabelVariants, floatingGroupVariants, floatingLabelVariants, inputVariants } from './chunk-3IMM2PM4.js';
|
|
117
|
-
import { Plus, GripVertical, RefreshCw, Pencil, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical,
|
|
117
|
+
import { Plus, GripVertical, RefreshCw, Pencil, Trash2, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical, Send, Scan, TestTube2, Pill, Share, User, Download, ChevronRight, Calendar, Printer, ClipboardPlus, FileCheck, Wheat, Bell, FileHeart, HeartPulse, Paperclip, HelpCircle, MoreHorizontal, AlertTriangle, Upload as Upload$1, Camera, Check as Check$1, X as X$1, ScanLine, Image } from './chunk-BKSPDTX4.js';
|
|
118
118
|
export { Accessibility as AccessibilityIcon, Activity as ActivityIcon, AlertCircle as AlertCircleIcon, AlertTriangle as AlertTriangleIcon, Wheat as AllergyIcon, WheatOff as AllergyOffIcon, Ambulance as AmbulanceIcon, ArrowLeft as ArrowLeftIcon, ArrowRight as ArrowRightIcon, ArrowUpDown as ArrowUpDownIcon, ArrowUp as ArrowUpIcon, AtSign as AtSignIcon, Baby as BabyIcon, BadgeAlert as BadgeAlertIcon, BadgeCheck as BadgeCheckIcon, BadgeMinus as BadgeMinusIcon, BadgePlus as BadgePlusIcon, BadgeX as BadgeXIcon, Ban as BanIcon, Bandage as BandageIcon, BedDouble as BedDoubleIcon, Bed as BedIcon, BedSingle as BedSingleIcon, Bell as BellIcon, BellOff as BellOffIcon, Biohazard as BiohazardIcon, Bone as BoneIcon, BookOpenCheck as BookOpenCheckIcon, BookOpen as BookOpenIcon, Bookmark as BookmarkIcon, Bot as BotIcon, Brain as BrainIcon, Briefcase as BriefcaseIcon, BriefcaseMedical as BriefcaseMedicalIcon, Building as BuildingIcon, CalendarCheck as CalendarCheckIcon, Calendar as CalendarIcon, Camera as CameraIcon, Cannabis as CannabisIcon, BarChart3 as ChartIcon, CheckCircle as CheckCircleIcon, Check as CheckIcon, ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, ChevronUp as ChevronUpIcon, Cigarette as CigaretteIcon, CigaretteOff as CigaretteOffIcon, CircleDotDashed as CircleDotDashedIcon, CircleDot as CircleDotIcon, CircleUser as CircleUserIcon, ClipboardCheck as ClipboardCheckIcon, Clipboard as ClipboardIcon, ClipboardList as ClipboardListIcon, ClipboardPlus as ClipboardPlusIcon, Clock as ClockIcon, Cog as CogIcon, Columns as ColumnsIcon, Copy as CopyIcon, CreditCard as CreditCardIcon, Cross as CrossIcon, Dna as DnaIcon, DollarSign as DollarSignIcon, Download as DownloadIcon, Droplet as DropletIcon, Droplets as DropletsIcon, Ear as EarIcon, ExternalLink as ExternalLinkIcon, Eye as EyeIcon, EyeOff as EyeOffIcon, FileCheck2 as FileCheck2Icon, FileCheck as FileCheckIcon, FileHeart as FileHeartIcon, File as FileIcon, FilePlus2 as FilePlus2Icon, FilePlus as FilePlusIcon, FileText as FileTextIcon, Filter as FilterIcon, Fingerprint as FingerprintIcon, Flag as FlagIcon, FlaskConical as FlaskIcon, FlaskRound as FlaskRoundIcon, Folder as FolderIcon, FolderOpen as FolderOpenIcon, Footprints as FootprintsIcon, Glasses as GlassesIcon, Globe as GlobeIcon, LayoutGrid as GridIcon, GripVertical as GripVerticalIcon, Hand as HandIcon, HandMetal as HandMetalIcon, Hash as HashIcon, Heart as HeartIcon, HeartOff as HeartOffIcon, HeartPulse as HeartPulseIcon, HelpCircle as HelpCircleIcon, History as HistoryIcon, Home as HomeIcon, Hospital as HospitalIcon, Image as ImageIcon, Info as InfoIcon, Key as KeyIcon, Link as LinkIcon, List as ListIcon, Loader2 as LoaderIcon, Lock as LockIcon, LogIn as LogInIcon, LogOut as LogOutIcon, Mail as MailIcon, MapPin as MapPinIcon, Maximize as MaximizeIcon, Menu as MenuIcon, MessageSquare as MessageIcon, Mic as MicIcon, Microscope as MicroscopeIcon, Minimize as MinimizeIcon, Minus as MinusIcon, Monitor as MonitorIcon, Moon as MoonIcon, MoreHorizontal as MoreHorizontalIcon, MoreVertical as MoreVerticalIcon, NotebookPen as NotebookPenIcon, Palette as PaletteIcon, Paperclip as PaperclipIcon, CircleUserRound as PatientIcon, Pencil as PencilIcon, UserRound as PersonIcon, Phone as PhoneIcon, PieChart as PieChartIcon, Pill as PillIcon, Plus as PlusIcon, Printer as PrinterIcon, Radiation as RadiationIcon, Ruler as RulerIcon, Save as SaveIcon, Scale as ScaleIcon, Scaling as ScalingIcon, ScanEye as ScanEyeIcon, Scan as ScanIcon, ScanLine as ScanLineIcon, Search as SearchIcon, Settings as SettingsIcon, Share as ShareIcon, ShieldCheck as ShieldCheckIcon, Shield as ShieldIcon, ShieldPlus as ShieldPlusIcon, Sliders as SlidersIcon, Sparkle as SparkleIcon, Star as StarIcon, Stethoscope as StethoscopeIcon, StickyNote as StickyNoteIcon, Square as StopIcon, Sun as SunIcon, Syringe as SyringeIcon, Table as TableIcon, Tablets as TabletsIcon, Tag as TagIcon, TestTube2 as TestTubeIcon, TestTubes as TestTubesIcon, Thermometer as ThermometerIcon, ThermometerSun as ThermometerSunIcon, ThumbsDown as ThumbsDownIcon, ThumbsUp as ThumbsUpIcon, Timer as TimerIcon, Trash2 as TrashIcon, TrendingDown as TrendingDownIcon, TrendingUp as TrendingUpIcon, Truck as TruckIcon, Unlock as UnlockIcon, Upload as UploadIcon, UserCheck as UserCheckIcon, User as UserIcon, UserMinus as UserMinusIcon, UserPlus as UserPlusIcon, UserRoundCheck as UserRoundCheckIcon, UserRoundMinus as UserRoundMinusIcon, UserRoundPlus as UserRoundPlusIcon, UserRoundX as UserRoundXIcon, Users as UsersIcon, Weight as WeightIcon, Wrench as WrenchIcon, XCircle as XCircleIcon, X2 as XIcon, Zap as ZapIcon } from './chunk-BKSPDTX4.js';
|
|
119
119
|
import { Badge } from './chunk-BMSG4NBH.js';
|
|
120
120
|
export { Badge, badgeVariants } from './chunk-BMSG4NBH.js';
|
|
121
121
|
import { Button, buttonVariants } from './chunk-KREUYVMZ.js';
|
|
122
122
|
export { Button, buttonVariants } from './chunk-KREUYVMZ.js';
|
|
123
|
-
import { AnimatedPresence, Animated } from './chunk-
|
|
124
|
-
export { Animated, AnimatedPresence, motionPresets, useMotionRuntime } from './chunk-
|
|
123
|
+
import { AnimatedPresence, Animated } from './chunk-XCP454Q6.js';
|
|
124
|
+
export { Animated, AnimatedPresence, motionPresets, useMotionRuntime } from './chunk-XCP454Q6.js';
|
|
125
125
|
import { cn } from './chunk-TQONQSJO.js';
|
|
126
126
|
export { cn, miewebUITwMergeConflicts } from './chunk-TQONQSJO.js';
|
|
127
|
-
import { useCommandK, useIsMobile, useMediaQuery
|
|
128
|
-
export { RTL_LOCALES, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useMediaQuery } from './chunk-
|
|
127
|
+
import { useDirection, useCommandK, useIsMobile, useMediaQuery } from './chunk-24SEAAOH.js';
|
|
128
|
+
export { RTL_LOCALES, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useMediaQuery } from './chunk-24SEAAOH.js';
|
|
129
129
|
export { useTheme } from './chunk-KJZNEVYM.js';
|
|
130
130
|
import { useScrollSpy } from './chunk-WBGUYSWY.js';
|
|
131
131
|
export { useScrollSpy } from './chunk-WBGUYSWY.js';
|
|
@@ -146,8 +146,8 @@ export { useClickOutside } from './chunk-62ZOA6PX.js';
|
|
|
146
146
|
import { useAnchoredPosition } from './chunk-WSNMQQ4P.js';
|
|
147
147
|
export { useAnchoredPosition } from './chunk-WSNMQQ4P.js';
|
|
148
148
|
export { isDarkMode, useIsDarkMode } from './chunk-RUGHNFQG.js';
|
|
149
|
-
import * as
|
|
150
|
-
import
|
|
149
|
+
import * as React13 from 'react';
|
|
150
|
+
import React13__default, { createContext, useState, useEffect, useCallback, useMemo, useContext, useRef } from 'react';
|
|
151
151
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
152
152
|
import { cva } from 'class-variance-authority';
|
|
153
153
|
import * as ReactDOM from 'react-dom';
|
|
@@ -621,8 +621,8 @@ function AdditionalFields({
|
|
|
621
621
|
className,
|
|
622
622
|
collapsible = true
|
|
623
623
|
}) {
|
|
624
|
-
const [isExpanded, setIsExpanded] =
|
|
625
|
-
const contentId =
|
|
624
|
+
const [isExpanded, setIsExpanded] = React13.useState(defaultExpanded);
|
|
625
|
+
const contentId = React13.useId();
|
|
626
626
|
const handleNameChange = (id, name) => {
|
|
627
627
|
const updated = value.map(
|
|
628
628
|
(entry) => entry.id === id ? { ...entry, name } : entry
|
|
@@ -1060,10 +1060,10 @@ function AddressForm({
|
|
|
1060
1060
|
className,
|
|
1061
1061
|
googlePlaces
|
|
1062
1062
|
}) {
|
|
1063
|
-
const generatedId =
|
|
1063
|
+
const generatedId = React13.useId();
|
|
1064
1064
|
const idPrefix = id || generatedId;
|
|
1065
|
-
const autocompleteRef =
|
|
1066
|
-
const inputRef =
|
|
1065
|
+
const autocompleteRef = React13.useRef(null);
|
|
1066
|
+
const inputRef = React13.useRef(null);
|
|
1067
1067
|
const mergedLabels = { ...DEFAULT_LABELS, ...labels };
|
|
1068
1068
|
const mergedPlaceholders = { ...DEFAULT_PLACEHOLDERS, ...placeholders };
|
|
1069
1069
|
const handleChange = (field, fieldValue) => {
|
|
@@ -1072,7 +1072,7 @@ function AddressForm({
|
|
|
1072
1072
|
[field]: fieldValue
|
|
1073
1073
|
});
|
|
1074
1074
|
};
|
|
1075
|
-
|
|
1075
|
+
React13.useEffect(() => {
|
|
1076
1076
|
if (!googlePlaces?.enabled || !inputRef.current) return;
|
|
1077
1077
|
const googleMaps = globalThis.window?.google;
|
|
1078
1078
|
if (!googleMaps?.maps?.places?.Autocomplete) {
|
|
@@ -1491,13 +1491,13 @@ function AIChat({
|
|
|
1491
1491
|
renderTextContent,
|
|
1492
1492
|
renderMessageFooter
|
|
1493
1493
|
}) {
|
|
1494
|
-
const messagesContainerRef =
|
|
1495
|
-
const messages =
|
|
1494
|
+
const messagesContainerRef = React13.useRef(null);
|
|
1495
|
+
const messages = React13.useMemo(
|
|
1496
1496
|
() => session?.messages || messagesProp || [],
|
|
1497
1497
|
[session?.messages, messagesProp]
|
|
1498
1498
|
);
|
|
1499
1499
|
const isGenerating = session?.isGenerating || isGeneratingProp || false;
|
|
1500
|
-
|
|
1500
|
+
React13.useEffect(() => {
|
|
1501
1501
|
const container = messagesContainerRef.current;
|
|
1502
1502
|
if (container) container.scrollTop = container.scrollHeight;
|
|
1503
1503
|
}, [messages]);
|
|
@@ -1908,7 +1908,6 @@ function Toast({
|
|
|
1908
1908
|
className: cn(
|
|
1909
1909
|
"flex items-start gap-3 rounded-lg border p-4 shadow-lg",
|
|
1910
1910
|
"max-w-[420px] min-w-[300px]",
|
|
1911
|
-
"animate-slide-in-right rtl:animate-slide-in-left",
|
|
1912
1911
|
styles.container
|
|
1913
1912
|
),
|
|
1914
1913
|
children: [
|
|
@@ -1953,17 +1952,27 @@ var positionStyles = {
|
|
|
1953
1952
|
"bottom-left": "bottom-4 start-4 items-start",
|
|
1954
1953
|
"bottom-right": "bottom-4 end-4 items-end"
|
|
1955
1954
|
};
|
|
1955
|
+
function toastEdge(position, isRtl) {
|
|
1956
|
+
if (position === "top-center") return "top";
|
|
1957
|
+
if (position === "bottom-center") return "bottom";
|
|
1958
|
+
const isStart = position.endsWith("-start") || position.endsWith("-left");
|
|
1959
|
+
return isStart === isRtl ? "right" : "left";
|
|
1960
|
+
}
|
|
1961
|
+
var TOAST_FALLBACK_ANIMATION = "animate-slide-in-right rtl:animate-slide-in-left";
|
|
1956
1962
|
function ToastContainer({
|
|
1957
1963
|
toasts,
|
|
1958
1964
|
position,
|
|
1959
1965
|
onDismiss
|
|
1960
1966
|
}) {
|
|
1961
1967
|
const context = useOptionalToast();
|
|
1968
|
+
const containerRef = React13__default.useRef(null);
|
|
1969
|
+
const isRtl = useDirection(containerRef) === "rtl";
|
|
1962
1970
|
const resolvedPosition = position ?? context?.position ?? "bottom-end";
|
|
1963
|
-
|
|
1971
|
+
const edge = toastEdge(resolvedPosition, isRtl);
|
|
1964
1972
|
return /* @__PURE__ */ jsx(
|
|
1965
1973
|
"div",
|
|
1966
1974
|
{
|
|
1975
|
+
ref: containerRef,
|
|
1967
1976
|
"data-slot": "toast-container",
|
|
1968
1977
|
className: cn(
|
|
1969
1978
|
"pointer-events-none fixed z-50 flex flex-col gap-2",
|
|
@@ -1971,7 +1980,18 @@ function ToastContainer({
|
|
|
1971
1980
|
),
|
|
1972
1981
|
"aria-live": "polite",
|
|
1973
1982
|
"aria-atomic": "true",
|
|
1974
|
-
children:
|
|
1983
|
+
children: /* @__PURE__ */ jsx(AnimatedPresence, { children: toasts.map((toast) => /* @__PURE__ */ jsx(
|
|
1984
|
+
Animated,
|
|
1985
|
+
{
|
|
1986
|
+
preset: "toast",
|
|
1987
|
+
mode: "presence",
|
|
1988
|
+
custom: edge,
|
|
1989
|
+
className: "pointer-events-auto",
|
|
1990
|
+
fallbackClassName: TOAST_FALLBACK_ANIMATION,
|
|
1991
|
+
children: /* @__PURE__ */ jsx(Toast, { ...toast, onClose: () => onDismiss(toast.id) })
|
|
1992
|
+
},
|
|
1993
|
+
toast.id
|
|
1994
|
+
)) })
|
|
1975
1995
|
}
|
|
1976
1996
|
);
|
|
1977
1997
|
}
|
|
@@ -2031,19 +2051,19 @@ function OzwellChat({
|
|
|
2031
2051
|
footer = "Powered by Ozwell",
|
|
2032
2052
|
className
|
|
2033
2053
|
}) {
|
|
2034
|
-
const shellRef =
|
|
2035
|
-
const [thinkingMenuOpen, setThinkingMenuOpen] =
|
|
2036
|
-
const [messagesMenuOpen, setMessagesMenuOpen] =
|
|
2037
|
-
const [messagesButtonFlare, setMessagesButtonFlare] =
|
|
2038
|
-
const [isEditingQueuedMessage, setIsEditingQueuedMessage] =
|
|
2039
|
-
const [queuedMessageDraft, setQueuedMessageDraft] =
|
|
2040
|
-
const hasFlaredRef =
|
|
2041
|
-
const queuedMessageEditorRef =
|
|
2042
|
-
const displayedMessages =
|
|
2054
|
+
const shellRef = React13.useRef(null);
|
|
2055
|
+
const [thinkingMenuOpen, setThinkingMenuOpen] = React13.useState(false);
|
|
2056
|
+
const [messagesMenuOpen, setMessagesMenuOpen] = React13.useState(false);
|
|
2057
|
+
const [messagesButtonFlare, setMessagesButtonFlare] = React13.useState(false);
|
|
2058
|
+
const [isEditingQueuedMessage, setIsEditingQueuedMessage] = React13.useState(false);
|
|
2059
|
+
const [queuedMessageDraft, setQueuedMessageDraft] = React13.useState("");
|
|
2060
|
+
const hasFlaredRef = React13.useRef(false);
|
|
2061
|
+
const queuedMessageEditorRef = React13.useRef(null);
|
|
2062
|
+
const displayedMessages = React13.useMemo(
|
|
2043
2063
|
() => applyThinkingMode(messages, thinking?.mode ?? "auto"),
|
|
2044
2064
|
[messages, thinking?.mode]
|
|
2045
2065
|
);
|
|
2046
|
-
const userMessageItems =
|
|
2066
|
+
const userMessageItems = React13.useMemo(
|
|
2047
2067
|
() => displayedMessages.flatMap((message, chatIndex) => {
|
|
2048
2068
|
if (message.role !== "user") return [];
|
|
2049
2069
|
const text = message.content.filter((block) => block.type === "text" && block.text).map((block) => block.text).join(" ").trim();
|
|
@@ -2052,7 +2072,7 @@ function OzwellChat({
|
|
|
2052
2072
|
[displayedMessages]
|
|
2053
2073
|
);
|
|
2054
2074
|
const showMessagesNav = userMessageItems.length >= 3;
|
|
2055
|
-
const chatMessages =
|
|
2075
|
+
const chatMessages = React13.useMemo(
|
|
2056
2076
|
() => queuedMessage ? [
|
|
2057
2077
|
...displayedMessages,
|
|
2058
2078
|
{
|
|
@@ -2069,13 +2089,13 @@ function OzwellChat({
|
|
|
2069
2089
|
(option) => option.value === thinking?.mode
|
|
2070
2090
|
);
|
|
2071
2091
|
const showModelSelector = Boolean(models?.value && models.options.length > 1);
|
|
2072
|
-
|
|
2092
|
+
React13.useEffect(() => {
|
|
2073
2093
|
if (!queuedMessage) setIsEditingQueuedMessage(false);
|
|
2074
2094
|
}, [queuedMessage]);
|
|
2075
|
-
|
|
2095
|
+
React13.useEffect(() => {
|
|
2076
2096
|
if (isEditingQueuedMessage) queuedMessageEditorRef.current?.focus();
|
|
2077
2097
|
}, [isEditingQueuedMessage]);
|
|
2078
|
-
|
|
2098
|
+
React13.useEffect(() => {
|
|
2079
2099
|
if (!showMessagesNav || hasFlaredRef.current) return;
|
|
2080
2100
|
hasFlaredRef.current = true;
|
|
2081
2101
|
setMessagesButtonFlare(true);
|
|
@@ -2351,8 +2371,8 @@ function OzwellLogo({
|
|
|
2351
2371
|
style,
|
|
2352
2372
|
className
|
|
2353
2373
|
}) {
|
|
2354
|
-
const [failed, setFailed] =
|
|
2355
|
-
|
|
2374
|
+
const [failed, setFailed] = React13.useState(false);
|
|
2375
|
+
React13.useEffect(() => setFailed(false), [src]);
|
|
2356
2376
|
if (failed) {
|
|
2357
2377
|
return /* @__PURE__ */ jsx(
|
|
2358
2378
|
"span",
|
|
@@ -2409,9 +2429,9 @@ function HeyOzwellToggle({
|
|
|
2409
2429
|
const octoScale = 1 + Math.min(0.28, lv * 2.2);
|
|
2410
2430
|
const glowOpacity = active ? 0.4 + Math.min(0.55, lv * 4) : 0;
|
|
2411
2431
|
const glowScale = 1 + Math.min(0.7, lv * 3);
|
|
2412
|
-
const [doneFlash, setDoneFlash] =
|
|
2413
|
-
const wasLoading =
|
|
2414
|
-
|
|
2432
|
+
const [doneFlash, setDoneFlash] = React13.useState(false);
|
|
2433
|
+
const wasLoading = React13.useRef(loading);
|
|
2434
|
+
React13.useEffect(() => {
|
|
2415
2435
|
if (wasLoading.current && !loading) {
|
|
2416
2436
|
setDoneFlash(true);
|
|
2417
2437
|
const t = window.setTimeout(() => setDoneFlash(false), 700);
|
|
@@ -2420,9 +2440,9 @@ function HeyOzwellToggle({
|
|
|
2420
2440
|
}
|
|
2421
2441
|
wasLoading.current = loading;
|
|
2422
2442
|
}, [loading]);
|
|
2423
|
-
const [warmFade, setWarmFade] =
|
|
2424
|
-
const wasWarm =
|
|
2425
|
-
|
|
2443
|
+
const [warmFade, setWarmFade] = React13.useState(false);
|
|
2444
|
+
const wasWarm = React13.useRef(warmActive);
|
|
2445
|
+
React13.useEffect(() => {
|
|
2426
2446
|
if (wasWarm.current && !warmActive) {
|
|
2427
2447
|
setWarmFade(true);
|
|
2428
2448
|
const t = window.setTimeout(() => setWarmFade(false), 500);
|
|
@@ -2437,8 +2457,8 @@ function HeyOzwellToggle({
|
|
|
2437
2457
|
const ringC = 2 * Math.PI * ringR;
|
|
2438
2458
|
const hasProgress = typeof loadProgress === "number";
|
|
2439
2459
|
const p = hasProgress ? Math.max(0, Math.min(1, loadProgress)) : 0;
|
|
2440
|
-
const [synthP, setSynthP] =
|
|
2441
|
-
|
|
2460
|
+
const [synthP, setSynthP] = React13.useState(0);
|
|
2461
|
+
React13.useEffect(() => {
|
|
2442
2462
|
if (!(loading && !hasProgress)) {
|
|
2443
2463
|
setSynthP(0);
|
|
2444
2464
|
return;
|
|
@@ -2456,9 +2476,9 @@ function HeyOzwellToggle({
|
|
|
2456
2476
|
const warmR = (warmBox - warmStroke) / 2;
|
|
2457
2477
|
const warmC = 2 * Math.PI * warmR;
|
|
2458
2478
|
const wp = typeof warmProgress === "number" ? Math.max(0, Math.min(1, warmProgress)) : 0;
|
|
2459
|
-
const pressTimer =
|
|
2460
|
-
const longFiredRef =
|
|
2461
|
-
|
|
2479
|
+
const pressTimer = React13.useRef(void 0);
|
|
2480
|
+
const longFiredRef = React13.useRef(false);
|
|
2481
|
+
React13.useEffect(
|
|
2462
2482
|
() => () => {
|
|
2463
2483
|
if (pressTimer.current) window.clearTimeout(pressTimer.current);
|
|
2464
2484
|
},
|
|
@@ -2787,18 +2807,18 @@ function OzwellSettingsMenu({
|
|
|
2787
2807
|
modelStatus,
|
|
2788
2808
|
onManageVoices
|
|
2789
2809
|
}) {
|
|
2790
|
-
const [modelsOpen, setModelsOpen] =
|
|
2791
|
-
const modelsRegionId =
|
|
2792
|
-
const scrollRef =
|
|
2793
|
-
const [hasMore, setHasMore] =
|
|
2794
|
-
const updateHasMore =
|
|
2810
|
+
const [modelsOpen, setModelsOpen] = React13.useState(false);
|
|
2811
|
+
const modelsRegionId = React13.useId();
|
|
2812
|
+
const scrollRef = React13.useRef(null);
|
|
2813
|
+
const [hasMore, setHasMore] = React13.useState(false);
|
|
2814
|
+
const updateHasMore = React13.useCallback(() => {
|
|
2795
2815
|
const el = scrollRef.current;
|
|
2796
2816
|
if (el) setHasMore(el.scrollTop + el.clientHeight < el.scrollHeight - 4);
|
|
2797
2817
|
}, []);
|
|
2798
|
-
|
|
2818
|
+
React13.useEffect(() => {
|
|
2799
2819
|
updateHasMore();
|
|
2800
2820
|
}, [modelsOpen, open, modelStatus, updateHasMore]);
|
|
2801
|
-
|
|
2821
|
+
React13.useEffect(() => {
|
|
2802
2822
|
if (!open) setModelsOpen(false);
|
|
2803
2823
|
}, [open]);
|
|
2804
2824
|
const act = (fn) => () => {
|
|
@@ -3008,19 +3028,19 @@ function useWakeWord(opts = {}) {
|
|
|
3008
3028
|
assetBase,
|
|
3009
3029
|
registerServiceWorker = true
|
|
3010
3030
|
} = opts;
|
|
3011
|
-
const [state, setState] =
|
|
3031
|
+
const [state, setState] = React13.useState({
|
|
3012
3032
|
ready: false,
|
|
3013
3033
|
error: null,
|
|
3014
3034
|
speech: 0,
|
|
3015
3035
|
probs: {}
|
|
3016
3036
|
});
|
|
3017
|
-
const onWakeRef =
|
|
3037
|
+
const onWakeRef = React13.useRef(onWake);
|
|
3018
3038
|
onWakeRef.current = onWake;
|
|
3019
|
-
const onUtteranceRef =
|
|
3039
|
+
const onUtteranceRef = React13.useRef(onUtterance);
|
|
3020
3040
|
onUtteranceRef.current = onUtterance;
|
|
3021
|
-
const lastFiredRef =
|
|
3022
|
-
const hbRef =
|
|
3023
|
-
|
|
3041
|
+
const lastFiredRef = React13.useRef(null);
|
|
3042
|
+
const hbRef = React13.useRef(null);
|
|
3043
|
+
React13.useEffect(() => {
|
|
3024
3044
|
if (!enabled) {
|
|
3025
3045
|
setState(
|
|
3026
3046
|
(s) => s.ready || s.error || s.speech ? { ready: false, error: null, speech: 0, probs: {} } : s
|
|
@@ -3132,7 +3152,7 @@ function useWakeWord(opts = {}) {
|
|
|
3132
3152
|
}
|
|
3133
3153
|
};
|
|
3134
3154
|
}, [enabled, assetBase]);
|
|
3135
|
-
|
|
3155
|
+
React13.useEffect(() => {
|
|
3136
3156
|
const hb = hbRef.current;
|
|
3137
3157
|
if (!hb) return;
|
|
3138
3158
|
if (thresholds) hb.wakeWordThresholds = { ...thresholds };
|
|
@@ -3853,10 +3873,10 @@ function endsWithDone(text) {
|
|
|
3853
3873
|
}
|
|
3854
3874
|
function useSpeakerVerify(opts = {}) {
|
|
3855
3875
|
const { enabled = true } = opts;
|
|
3856
|
-
const [ready, setReady] =
|
|
3857
|
-
const [error, setError] =
|
|
3858
|
-
const svRef =
|
|
3859
|
-
|
|
3876
|
+
const [ready, setReady] = React13.useState(false);
|
|
3877
|
+
const [error, setError] = React13.useState(null);
|
|
3878
|
+
const svRef = React13.useRef(null);
|
|
3879
|
+
React13.useEffect(() => {
|
|
3860
3880
|
if (!enabled) return;
|
|
3861
3881
|
let cancelled = false;
|
|
3862
3882
|
(async () => {
|
|
@@ -4076,15 +4096,15 @@ function useDiarization(options = {}) {
|
|
|
4076
4096
|
minSegmentSeconds = 1
|
|
4077
4097
|
} = options;
|
|
4078
4098
|
const sv = useSpeakerVerify({ enabled });
|
|
4079
|
-
const svRef =
|
|
4099
|
+
const svRef = React13.useRef(sv);
|
|
4080
4100
|
svRef.current = sv;
|
|
4081
|
-
const [busy, setBusy] =
|
|
4082
|
-
const [error, setError] =
|
|
4083
|
-
const [result, setResult] =
|
|
4084
|
-
|
|
4101
|
+
const [busy, setBusy] = React13.useState(false);
|
|
4102
|
+
const [error, setError] = React13.useState(null);
|
|
4103
|
+
const [result, setResult] = React13.useState(null);
|
|
4104
|
+
React13.useEffect(() => {
|
|
4085
4105
|
if (enabled) warmWhisper();
|
|
4086
4106
|
}, [enabled]);
|
|
4087
|
-
const diarize =
|
|
4107
|
+
const diarize = React13.useCallback(
|
|
4088
4108
|
async (blob) => {
|
|
4089
4109
|
setBusy(true);
|
|
4090
4110
|
setError(null);
|
|
@@ -4432,11 +4452,11 @@ function stopTrimLeadIn() {
|
|
|
4432
4452
|
return typeof v === "number" ? v : 0.35;
|
|
4433
4453
|
}
|
|
4434
4454
|
function useRoomLevel(getStream, ready) {
|
|
4435
|
-
const [level, setLevel] =
|
|
4436
|
-
const [listening, setListening] =
|
|
4437
|
-
const getStreamRef =
|
|
4455
|
+
const [level, setLevel] = React13.useState(0);
|
|
4456
|
+
const [listening, setListening] = React13.useState(false);
|
|
4457
|
+
const getStreamRef = React13.useRef(getStream);
|
|
4438
4458
|
getStreamRef.current = getStream;
|
|
4439
|
-
|
|
4459
|
+
React13.useEffect(() => {
|
|
4440
4460
|
if (!ready) {
|
|
4441
4461
|
setLevel(0);
|
|
4442
4462
|
setListening(false);
|
|
@@ -4501,20 +4521,20 @@ function useHeyOzwell(options = {}) {
|
|
|
4501
4521
|
reviewBeforeSend = false,
|
|
4502
4522
|
diarizationOptions
|
|
4503
4523
|
} = options;
|
|
4504
|
-
const [active, setActive] =
|
|
4505
|
-
const [chatOpen, setChatOpen] =
|
|
4506
|
-
const [settingsOpen, setSettingsOpen] =
|
|
4507
|
-
const [messages, setMessages] =
|
|
4508
|
-
const [generating, setGenerating] =
|
|
4509
|
-
const [phase, setPhase] =
|
|
4510
|
-
const [typed, setTyped] =
|
|
4511
|
-
const dictLoad =
|
|
4524
|
+
const [active, setActive] = React13.useState(autoStart);
|
|
4525
|
+
const [chatOpen, setChatOpen] = React13.useState(false);
|
|
4526
|
+
const [settingsOpen, setSettingsOpen] = React13.useState(false);
|
|
4527
|
+
const [messages, setMessages] = React13.useState([]);
|
|
4528
|
+
const [generating, setGenerating] = React13.useState(false);
|
|
4529
|
+
const [phase, setPhase] = React13.useState("listening");
|
|
4530
|
+
const [typed, setTyped] = React13.useState("");
|
|
4531
|
+
const dictLoad = React13.useSyncExternalStore(
|
|
4512
4532
|
subscribeDictationLoad,
|
|
4513
4533
|
getDictationLoad
|
|
4514
4534
|
);
|
|
4515
|
-
const wakeWarm2 =
|
|
4516
|
-
const counterRef =
|
|
4517
|
-
const mkMsg =
|
|
4535
|
+
const wakeWarm2 = React13.useSyncExternalStore(subscribeWakeWarm, getWakeWarm);
|
|
4536
|
+
const counterRef = React13.useRef(0);
|
|
4537
|
+
const mkMsg = React13.useCallback(
|
|
4518
4538
|
(role, text) => ({
|
|
4519
4539
|
id: `${role}-${++counterRef.current}`,
|
|
4520
4540
|
role,
|
|
@@ -4524,20 +4544,20 @@ function useHeyOzwell(options = {}) {
|
|
|
4524
4544
|
}),
|
|
4525
4545
|
[]
|
|
4526
4546
|
);
|
|
4527
|
-
const messagesRef =
|
|
4547
|
+
const messagesRef = React13.useRef(messages);
|
|
4528
4548
|
messagesRef.current = messages;
|
|
4529
|
-
const phaseRef =
|
|
4549
|
+
const phaseRef = React13.useRef(phase);
|
|
4530
4550
|
phaseRef.current = phase;
|
|
4531
|
-
const recRef =
|
|
4532
|
-
const chunksRef =
|
|
4533
|
-
const streamAbortRef =
|
|
4534
|
-
const [liveText, setLiveText] =
|
|
4535
|
-
const liveRecRef =
|
|
4536
|
-
const liveTimerRef =
|
|
4537
|
-
const liveCommittedRef =
|
|
4538
|
-
const liveCursorRef =
|
|
4539
|
-
const liveBusyRef =
|
|
4540
|
-
const stopLive =
|
|
4551
|
+
const recRef = React13.useRef(null);
|
|
4552
|
+
const chunksRef = React13.useRef([]);
|
|
4553
|
+
const streamAbortRef = React13.useRef(null);
|
|
4554
|
+
const [liveText, setLiveText] = React13.useState("");
|
|
4555
|
+
const liveRecRef = React13.useRef(null);
|
|
4556
|
+
const liveTimerRef = React13.useRef(null);
|
|
4557
|
+
const liveCommittedRef = React13.useRef("");
|
|
4558
|
+
const liveCursorRef = React13.useRef(0);
|
|
4559
|
+
const liveBusyRef = React13.useRef(false);
|
|
4560
|
+
const stopLive = React13.useCallback(() => {
|
|
4541
4561
|
if (liveTimerRef.current) window.clearInterval(liveTimerRef.current);
|
|
4542
4562
|
liveTimerRef.current = null;
|
|
4543
4563
|
liveRecRef.current?.close();
|
|
@@ -4547,18 +4567,18 @@ function useHeyOzwell(options = {}) {
|
|
|
4547
4567
|
liveBusyRef.current = false;
|
|
4548
4568
|
setLiveText("");
|
|
4549
4569
|
}, []);
|
|
4550
|
-
const wakeRef =
|
|
4570
|
+
const wakeRef = React13.useRef(null);
|
|
4551
4571
|
const sv = useSpeakerVerify({ enabled: requireDoctor });
|
|
4552
|
-
const svRef =
|
|
4572
|
+
const svRef = React13.useRef(sv);
|
|
4553
4573
|
svRef.current = sv;
|
|
4554
|
-
const rollRef =
|
|
4574
|
+
const rollRef = React13.useRef(null);
|
|
4555
4575
|
const diar = useDiarization({
|
|
4556
4576
|
...diarizationOptions,
|
|
4557
4577
|
enabled: conversationMode
|
|
4558
4578
|
});
|
|
4559
|
-
const diarRef =
|
|
4579
|
+
const diarRef = React13.useRef(diar);
|
|
4560
4580
|
diarRef.current = diar;
|
|
4561
|
-
const verified =
|
|
4581
|
+
const verified = React13.useCallback(
|
|
4562
4582
|
(name) => {
|
|
4563
4583
|
if (!requireDoctor) return true;
|
|
4564
4584
|
const svh = svRef.current;
|
|
@@ -4580,9 +4600,9 @@ function useHeyOzwell(options = {}) {
|
|
|
4580
4600
|
},
|
|
4581
4601
|
[requireDoctor]
|
|
4582
4602
|
);
|
|
4583
|
-
const onSendRef =
|
|
4603
|
+
const onSendRef = React13.useRef(onSend);
|
|
4584
4604
|
onSendRef.current = onSend;
|
|
4585
|
-
const send =
|
|
4605
|
+
const send = React13.useCallback(
|
|
4586
4606
|
(text) => {
|
|
4587
4607
|
const t = text.trim();
|
|
4588
4608
|
if (!t) return;
|
|
@@ -4640,7 +4660,7 @@ function useHeyOzwell(options = {}) {
|
|
|
4640
4660
|
},
|
|
4641
4661
|
[mkMsg]
|
|
4642
4662
|
);
|
|
4643
|
-
const startDictation =
|
|
4663
|
+
const startDictation = React13.useCallback(() => {
|
|
4644
4664
|
const stream = wakeRef.current?.getStream();
|
|
4645
4665
|
if (!stream) return;
|
|
4646
4666
|
chunksRef.current = [];
|
|
@@ -4686,7 +4706,7 @@ function useHeyOzwell(options = {}) {
|
|
|
4686
4706
|
}, 800);
|
|
4687
4707
|
}
|
|
4688
4708
|
}, [liveTranscript, transcription]);
|
|
4689
|
-
const stopDictation =
|
|
4709
|
+
const stopDictation = React13.useCallback(
|
|
4690
4710
|
(viaPhrase = false) => {
|
|
4691
4711
|
const rec = recRef.current;
|
|
4692
4712
|
if (!rec) return;
|
|
@@ -4762,7 +4782,7 @@ function useHeyOzwell(options = {}) {
|
|
|
4762
4782
|
});
|
|
4763
4783
|
wakeRef.current = wake;
|
|
4764
4784
|
const { level, listening } = useRoomLevel(wake.getStream, wake.ready);
|
|
4765
|
-
|
|
4785
|
+
React13.useEffect(() => {
|
|
4766
4786
|
if (!requireDoctor || !active || !wake.ready) return;
|
|
4767
4787
|
let cancelled = false;
|
|
4768
4788
|
let tries = 0;
|
|
@@ -4783,11 +4803,11 @@ function useHeyOzwell(options = {}) {
|
|
|
4783
4803
|
rollRef.current = null;
|
|
4784
4804
|
};
|
|
4785
4805
|
}, [requireDoctor, active, wake.ready]);
|
|
4786
|
-
const hasListenedRef =
|
|
4787
|
-
|
|
4806
|
+
const hasListenedRef = React13.useRef(false);
|
|
4807
|
+
React13.useEffect(() => {
|
|
4788
4808
|
if (listening) hasListenedRef.current = true;
|
|
4789
4809
|
}, [listening]);
|
|
4790
|
-
|
|
4810
|
+
React13.useEffect(() => {
|
|
4791
4811
|
if (!active) hasListenedRef.current = false;
|
|
4792
4812
|
}, [active]);
|
|
4793
4813
|
const coldStarting = active && !listening && !hasListenedRef.current;
|
|
@@ -4801,13 +4821,13 @@ function useHeyOzwell(options = {}) {
|
|
|
4801
4821
|
wake: wakeWarm2.done || wake.ready ? "ready" : ozLoading ? "loading" : "idle",
|
|
4802
4822
|
transcription: dictLoad.done ? "ready" : dictLoad.active ? "loading" : "idle"
|
|
4803
4823
|
};
|
|
4804
|
-
|
|
4824
|
+
React13.useEffect(() => {
|
|
4805
4825
|
void warmWakeModels(assetBase);
|
|
4806
4826
|
}, [assetBase]);
|
|
4807
|
-
|
|
4827
|
+
React13.useEffect(() => {
|
|
4808
4828
|
if (active) warmWhisper();
|
|
4809
4829
|
}, [active]);
|
|
4810
|
-
const toggle =
|
|
4830
|
+
const toggle = React13.useCallback(
|
|
4811
4831
|
(next) => {
|
|
4812
4832
|
setActive(next);
|
|
4813
4833
|
if (!next) {
|
|
@@ -5002,7 +5022,7 @@ function FloatingAIChat({
|
|
|
5002
5022
|
pulse = false,
|
|
5003
5023
|
...chatProps
|
|
5004
5024
|
}) {
|
|
5005
|
-
const [internalOpen, setInternalOpen] =
|
|
5025
|
+
const [internalOpen, setInternalOpen] = React13.useState(defaultOpen);
|
|
5006
5026
|
const isControlled = controlledOpen !== void 0;
|
|
5007
5027
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
5008
5028
|
const handleOpenChange = (open) => {
|
|
@@ -5075,36 +5095,36 @@ var TIMEOUT_MS = 5e3;
|
|
|
5075
5095
|
var delay = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
5076
5096
|
function useVoiceSetup(options = {}) {
|
|
5077
5097
|
const { startAdding = false, voiceId, label } = options;
|
|
5078
|
-
const [enrollVoiceId] =
|
|
5098
|
+
const [enrollVoiceId] = React13.useState(
|
|
5079
5099
|
() => voiceId || (startAdding ? `voice-${Date.now()}-${Math.floor(Math.random() * 1e4)}` : "you")
|
|
5080
5100
|
);
|
|
5081
5101
|
const sv = useSpeakerVerify();
|
|
5082
|
-
const expectRef =
|
|
5083
|
-
const resolveRef =
|
|
5084
|
-
const whatRef =
|
|
5085
|
-
const recRef =
|
|
5086
|
-
const abortRef =
|
|
5087
|
-
const [level, setLevel] =
|
|
5102
|
+
const expectRef = React13.useRef(null);
|
|
5103
|
+
const resolveRef = React13.useRef(null);
|
|
5104
|
+
const whatRef = React13.useRef({});
|
|
5105
|
+
const recRef = React13.useRef(null);
|
|
5106
|
+
const abortRef = React13.useRef(false);
|
|
5107
|
+
const [level, setLevel] = React13.useState(0);
|
|
5088
5108
|
const wake = useWakeWord({
|
|
5089
5109
|
onWake: (name) => {
|
|
5090
5110
|
if (expectRef.current && resolveRef.current) resolveRef.current(name);
|
|
5091
5111
|
}
|
|
5092
5112
|
});
|
|
5093
|
-
const wakeRef =
|
|
5113
|
+
const wakeRef = React13.useRef(wake);
|
|
5094
5114
|
wakeRef.current = wake;
|
|
5095
5115
|
const bothReady = sv.ready && wake.ready;
|
|
5096
|
-
const [phase, setPhase] =
|
|
5097
|
-
const [phrase, setPhrase] =
|
|
5098
|
-
const [step, setStep] =
|
|
5099
|
-
const [adding, setAdding] =
|
|
5116
|
+
const [phase, setPhase] = React13.useState("intro");
|
|
5117
|
+
const [phrase, setPhrase] = React13.useState("hey ozwell");
|
|
5118
|
+
const [step, setStep] = React13.useState(0);
|
|
5119
|
+
const [adding, setAdding] = React13.useState(startAdding);
|
|
5100
5120
|
const total = PHRASES2.length * REPS;
|
|
5101
|
-
|
|
5121
|
+
React13.useEffect(() => {
|
|
5102
5122
|
warmWhisper();
|
|
5103
5123
|
void loadWhatPrints().then((w) => {
|
|
5104
5124
|
whatRef.current = w;
|
|
5105
5125
|
});
|
|
5106
5126
|
}, []);
|
|
5107
|
-
|
|
5127
|
+
React13.useEffect(() => {
|
|
5108
5128
|
if (!wake.ready) {
|
|
5109
5129
|
setLevel(0);
|
|
5110
5130
|
return;
|
|
@@ -5171,7 +5191,7 @@ function useVoiceSetup(options = {}) {
|
|
|
5171
5191
|
};
|
|
5172
5192
|
});
|
|
5173
5193
|
};
|
|
5174
|
-
const start =
|
|
5194
|
+
const start = React13.useCallback(async () => {
|
|
5175
5195
|
if (!bothReady || phase !== "intro") return;
|
|
5176
5196
|
for (let i = 0; i < 20 && !recRef.current; i++) await delay(50);
|
|
5177
5197
|
if (!recRef.current) return;
|
|
@@ -5219,11 +5239,11 @@ function useVoiceSetup(options = {}) {
|
|
|
5219
5239
|
setAdding(false);
|
|
5220
5240
|
setPhase("done");
|
|
5221
5241
|
}, [bothReady, phase, adding, sv, enrollVoiceId, label]);
|
|
5222
|
-
const addAnotherSpot =
|
|
5242
|
+
const addAnotherSpot = React13.useCallback(() => {
|
|
5223
5243
|
setAdding(true);
|
|
5224
5244
|
setPhase("intro");
|
|
5225
5245
|
}, []);
|
|
5226
|
-
const cancel =
|
|
5246
|
+
const cancel = React13.useCallback(() => {
|
|
5227
5247
|
abortRef.current = true;
|
|
5228
5248
|
resolveRef.current?.("__cancelled__");
|
|
5229
5249
|
setPhase("intro");
|
|
@@ -5471,12 +5491,12 @@ var ozBtn2 = "bg-ozwell hover:bg-ozwell active:bg-ozwell text-ozwell-foreground
|
|
|
5471
5491
|
var dangerOutline = "border-destructive text-destructive hover:bg-destructive/10 hover:text-destructive";
|
|
5472
5492
|
function VoiceManager({ logoSrc }) {
|
|
5473
5493
|
const sv = useSpeakerVerify();
|
|
5474
|
-
const [inSetup, setInSetup] =
|
|
5475
|
-
const [, setTick] =
|
|
5476
|
-
const [addName, setAddName] =
|
|
5477
|
-
const [editingId, setEditingId] =
|
|
5478
|
-
const [editLabel, setEditLabel] =
|
|
5479
|
-
const [confirm, setConfirm] =
|
|
5494
|
+
const [inSetup, setInSetup] = React13.useState(null);
|
|
5495
|
+
const [, setTick] = React13.useState(0);
|
|
5496
|
+
const [addName, setAddName] = React13.useState("");
|
|
5497
|
+
const [editingId, setEditingId] = React13.useState(null);
|
|
5498
|
+
const [editLabel, setEditLabel] = React13.useState("");
|
|
5499
|
+
const [confirm, setConfirm] = React13.useState(null);
|
|
5480
5500
|
const voices = sv.ready ? sv.listVoices() : [];
|
|
5481
5501
|
if (inSetup) {
|
|
5482
5502
|
return /* @__PURE__ */ jsx(
|
|
@@ -5685,7 +5705,7 @@ function HandsFreeChat({
|
|
|
5685
5705
|
reviewBeforeSend
|
|
5686
5706
|
});
|
|
5687
5707
|
const { phase, ready, error } = oz;
|
|
5688
|
-
const [voicesOpen, setVoicesOpen] =
|
|
5708
|
+
const [voicesOpen, setVoicesOpen] = React13.useState(false);
|
|
5689
5709
|
const placeholder = !oz.active ? "Ozwell is off \u2014 tap the octopus to listen" : phase === "listening" ? ready ? "Say \u201Chey ozwell\u201D, or type\u2026" : error ? `\u26A0\uFE0F ${error}` : "\u2026 loading models" : oz.chatProps.inputPlaceholder;
|
|
5690
5710
|
return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column" }, children: [
|
|
5691
5711
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: [
|
|
@@ -5761,30 +5781,30 @@ var LIVE_CHUNK_SECONDS = 7;
|
|
|
5761
5781
|
function useVisitScribe(options = {}) {
|
|
5762
5782
|
const { liveTranscript = false, ...diarOptions } = options;
|
|
5763
5783
|
const diar = useDiarization(diarOptions);
|
|
5764
|
-
const diarRef =
|
|
5784
|
+
const diarRef = React13.useRef(diar);
|
|
5765
5785
|
diarRef.current = diar;
|
|
5766
|
-
const liveOnRef =
|
|
5786
|
+
const liveOnRef = React13.useRef(liveTranscript);
|
|
5767
5787
|
liveOnRef.current = liveTranscript;
|
|
5768
|
-
const [recording, setRecording] =
|
|
5769
|
-
const [elapsedMs, setElapsedMs] =
|
|
5770
|
-
const [liveText, setLiveText] =
|
|
5771
|
-
const [startError, setStartError] =
|
|
5772
|
-
const recRef =
|
|
5773
|
-
const streamRef =
|
|
5774
|
-
const chunksRef =
|
|
5775
|
-
const startedAtRef =
|
|
5776
|
-
const timerRef =
|
|
5777
|
-
const lastBlobRef =
|
|
5778
|
-
const [canReanalyze, setCanReanalyze] =
|
|
5779
|
-
const liveRecRef =
|
|
5780
|
-
const liveTimerRef =
|
|
5781
|
-
const liveCursorRef =
|
|
5782
|
-
const liveBusyRef =
|
|
5783
|
-
const clearTimer =
|
|
5788
|
+
const [recording, setRecording] = React13.useState(false);
|
|
5789
|
+
const [elapsedMs, setElapsedMs] = React13.useState(0);
|
|
5790
|
+
const [liveText, setLiveText] = React13.useState("");
|
|
5791
|
+
const [startError, setStartError] = React13.useState(null);
|
|
5792
|
+
const recRef = React13.useRef(null);
|
|
5793
|
+
const streamRef = React13.useRef(null);
|
|
5794
|
+
const chunksRef = React13.useRef([]);
|
|
5795
|
+
const startedAtRef = React13.useRef(0);
|
|
5796
|
+
const timerRef = React13.useRef(null);
|
|
5797
|
+
const lastBlobRef = React13.useRef(null);
|
|
5798
|
+
const [canReanalyze, setCanReanalyze] = React13.useState(false);
|
|
5799
|
+
const liveRecRef = React13.useRef(null);
|
|
5800
|
+
const liveTimerRef = React13.useRef(null);
|
|
5801
|
+
const liveCursorRef = React13.useRef(0);
|
|
5802
|
+
const liveBusyRef = React13.useRef(false);
|
|
5803
|
+
const clearTimer = React13.useCallback(() => {
|
|
5784
5804
|
if (timerRef.current) window.clearInterval(timerRef.current);
|
|
5785
5805
|
timerRef.current = null;
|
|
5786
5806
|
}, []);
|
|
5787
|
-
const stopLive =
|
|
5807
|
+
const stopLive = React13.useCallback(() => {
|
|
5788
5808
|
if (liveTimerRef.current) window.clearInterval(liveTimerRef.current);
|
|
5789
5809
|
liveTimerRef.current = null;
|
|
5790
5810
|
liveRecRef.current?.close();
|
|
@@ -5792,8 +5812,8 @@ function useVisitScribe(options = {}) {
|
|
|
5792
5812
|
liveCursorRef.current = 0;
|
|
5793
5813
|
liveBusyRef.current = false;
|
|
5794
5814
|
}, []);
|
|
5795
|
-
const startingRef =
|
|
5796
|
-
const start =
|
|
5815
|
+
const startingRef = React13.useRef(false);
|
|
5816
|
+
const start = React13.useCallback(async () => {
|
|
5797
5817
|
if (startingRef.current || recRef.current) return;
|
|
5798
5818
|
startingRef.current = true;
|
|
5799
5819
|
setStartError(null);
|
|
@@ -5886,7 +5906,7 @@ function useVisitScribe(options = {}) {
|
|
|
5886
5906
|
setRecording(true);
|
|
5887
5907
|
startingRef.current = false;
|
|
5888
5908
|
}, [clearTimer]);
|
|
5889
|
-
const stop =
|
|
5909
|
+
const stop = React13.useCallback(() => {
|
|
5890
5910
|
clearTimer();
|
|
5891
5911
|
stopLive();
|
|
5892
5912
|
setRecording(false);
|
|
@@ -5898,19 +5918,19 @@ function useVisitScribe(options = {}) {
|
|
|
5898
5918
|
streamRef.current?.getTracks().forEach((t) => t.stop());
|
|
5899
5919
|
streamRef.current = null;
|
|
5900
5920
|
}, [clearTimer, stopLive]);
|
|
5901
|
-
const reanalyze =
|
|
5921
|
+
const reanalyze = React13.useCallback(() => {
|
|
5902
5922
|
const blob = lastBlobRef.current;
|
|
5903
5923
|
if (blob) void diarRef.current.diarize(blob).catch(() => {
|
|
5904
5924
|
});
|
|
5905
5925
|
}, []);
|
|
5906
|
-
const reset =
|
|
5926
|
+
const reset = React13.useCallback(() => {
|
|
5907
5927
|
setElapsedMs(0);
|
|
5908
5928
|
setLiveText("");
|
|
5909
5929
|
setStartError(null);
|
|
5910
5930
|
lastBlobRef.current = null;
|
|
5911
5931
|
setCanReanalyze(false);
|
|
5912
5932
|
}, []);
|
|
5913
|
-
|
|
5933
|
+
React13.useEffect(() => {
|
|
5914
5934
|
return () => {
|
|
5915
5935
|
clearTimer();
|
|
5916
5936
|
stopLive();
|
|
@@ -5992,13 +6012,13 @@ function VisitScribe({
|
|
|
5992
6012
|
diarizationOptions,
|
|
5993
6013
|
className
|
|
5994
6014
|
}) {
|
|
5995
|
-
const [inferRoles, setInferRoles] =
|
|
5996
|
-
const [live, setLive] =
|
|
5997
|
-
const [showAdvanced, setShowAdvanced] =
|
|
5998
|
-
const [threshold, setThreshold] =
|
|
6015
|
+
const [inferRoles, setInferRoles] = React13.useState(inferRolesProp);
|
|
6016
|
+
const [live, setLive] = React13.useState(liveTranscriptProp);
|
|
6017
|
+
const [showAdvanced, setShowAdvanced] = React13.useState(false);
|
|
6018
|
+
const [threshold, setThreshold] = React13.useState(
|
|
5999
6019
|
diarizationOptions?.threshold ?? 0.65
|
|
6000
6020
|
);
|
|
6001
|
-
const [maxSpeakers, setMaxSpeakers] =
|
|
6021
|
+
const [maxSpeakers, setMaxSpeakers] = React13.useState(
|
|
6002
6022
|
diarizationOptions?.maxSpeakers
|
|
6003
6023
|
);
|
|
6004
6024
|
const scribe = useVisitScribe({
|
|
@@ -6018,43 +6038,43 @@ function VisitScribe({
|
|
|
6018
6038
|
elapsedMs,
|
|
6019
6039
|
canReanalyze
|
|
6020
6040
|
} = scribe;
|
|
6021
|
-
const [labels, setLabels] =
|
|
6022
|
-
const [turnSpeaker, setTurnSpeaker] =
|
|
6041
|
+
const [labels, setLabels] = React13.useState({});
|
|
6042
|
+
const [turnSpeaker, setTurnSpeaker] = React13.useState(
|
|
6023
6043
|
{}
|
|
6024
6044
|
);
|
|
6025
|
-
const [editing, setEditing] =
|
|
6026
|
-
|
|
6045
|
+
const [editing, setEditing] = React13.useState(false);
|
|
6046
|
+
React13.useEffect(() => {
|
|
6027
6047
|
setLabels({});
|
|
6028
6048
|
setTurnSpeaker({});
|
|
6029
6049
|
setEditing(false);
|
|
6030
6050
|
}, [result]);
|
|
6031
|
-
const effective =
|
|
6051
|
+
const effective = React13.useCallback(
|
|
6032
6052
|
(sp) => labels[sp]?.trim() || sp,
|
|
6033
6053
|
[labels]
|
|
6034
6054
|
);
|
|
6035
|
-
const speakers =
|
|
6055
|
+
const speakers = React13.useMemo(() => {
|
|
6036
6056
|
const seen = [];
|
|
6037
6057
|
result?.forEach((t) => {
|
|
6038
6058
|
if (!seen.includes(t.speaker)) seen.push(t.speaker);
|
|
6039
6059
|
});
|
|
6040
6060
|
return seen;
|
|
6041
6061
|
}, [result]);
|
|
6042
|
-
const origOf =
|
|
6062
|
+
const origOf = React13.useCallback(
|
|
6043
6063
|
(i) => turnSpeaker[i] ?? result?.[i]?.speaker ?? "",
|
|
6044
6064
|
[turnSpeaker, result]
|
|
6045
6065
|
);
|
|
6046
|
-
const resolved =
|
|
6066
|
+
const resolved = React13.useMemo(
|
|
6047
6067
|
() => (result ?? []).map((t, i) => effective(turnSpeaker[i] ?? t.speaker)),
|
|
6048
6068
|
[result, turnSpeaker, effective]
|
|
6049
6069
|
);
|
|
6050
|
-
const distinctLabels =
|
|
6070
|
+
const distinctLabels = React13.useMemo(() => {
|
|
6051
6071
|
const seen = [];
|
|
6052
6072
|
resolved.forEach((l) => {
|
|
6053
6073
|
if (!seen.includes(l)) seen.push(l);
|
|
6054
6074
|
});
|
|
6055
6075
|
return seen;
|
|
6056
6076
|
}, [resolved]);
|
|
6057
|
-
const colorByLabel =
|
|
6077
|
+
const colorByLabel = React13.useMemo(() => {
|
|
6058
6078
|
const m = /* @__PURE__ */ new Map();
|
|
6059
6079
|
distinctLabels.forEach(
|
|
6060
6080
|
(l, idx) => m.set(l, SPEAKER_COLORS[idx % SPEAKER_COLORS.length])
|
|
@@ -6413,7 +6433,7 @@ function ReconciliationProposalRow({
|
|
|
6413
6433
|
editing: false,
|
|
6414
6434
|
value: proposal.proposed
|
|
6415
6435
|
};
|
|
6416
|
-
const rowId =
|
|
6436
|
+
const rowId = React13.useId();
|
|
6417
6437
|
const checkboxId = `${rowId}-accept`;
|
|
6418
6438
|
const level = resolveConfidenceLevel(proposal);
|
|
6419
6439
|
const render = proposal.renderValue ?? formatValueDefault;
|
|
@@ -6592,17 +6612,17 @@ function AIReconciliationPanel({
|
|
|
6592
6612
|
onNothingToReconcile,
|
|
6593
6613
|
className
|
|
6594
6614
|
}) {
|
|
6595
|
-
const effective =
|
|
6615
|
+
const effective = React13.useMemo(
|
|
6596
6616
|
() => proposals.filter((p) => !isEqual(p.current, p.proposed)),
|
|
6597
6617
|
[proposals, isEqual]
|
|
6598
6618
|
);
|
|
6599
|
-
const stateSignature =
|
|
6619
|
+
const stateSignature = React13.useMemo(
|
|
6600
6620
|
() => effective.map(
|
|
6601
6621
|
(p) => `${p.id}\u241F${safeStableStringify(p.proposed)}\u241F${p.defaultAccepted ?? ""}\u241F${p.required ?? ""}\u241F${p.confidence ?? ""}\u241F${p.confidenceLevel ?? ""}`
|
|
6602
6622
|
).join("|"),
|
|
6603
6623
|
[effective]
|
|
6604
6624
|
);
|
|
6605
|
-
const [rowStates, setRowStates] =
|
|
6625
|
+
const [rowStates, setRowStates] = React13.useState(
|
|
6606
6626
|
() => Object.fromEntries(
|
|
6607
6627
|
effective.map((p) => [
|
|
6608
6628
|
p.id,
|
|
@@ -6614,7 +6634,7 @@ function AIReconciliationPanel({
|
|
|
6614
6634
|
])
|
|
6615
6635
|
)
|
|
6616
6636
|
);
|
|
6617
|
-
|
|
6637
|
+
React13.useEffect(() => {
|
|
6618
6638
|
setRowStates(
|
|
6619
6639
|
Object.fromEntries(
|
|
6620
6640
|
effective.map((p) => [
|
|
@@ -6628,20 +6648,20 @@ function AIReconciliationPanel({
|
|
|
6628
6648
|
)
|
|
6629
6649
|
);
|
|
6630
6650
|
}, [stateSignature]);
|
|
6631
|
-
const reportedEmpty =
|
|
6632
|
-
|
|
6651
|
+
const reportedEmpty = React13.useRef(false);
|
|
6652
|
+
React13.useEffect(() => {
|
|
6633
6653
|
if (effective.length === 0 && !reportedEmpty.current) {
|
|
6634
6654
|
reportedEmpty.current = true;
|
|
6635
6655
|
onNothingToReconcile?.();
|
|
6636
6656
|
}
|
|
6637
6657
|
if (effective.length > 0) reportedEmpty.current = false;
|
|
6638
6658
|
}, [effective.length, onNothingToReconcile]);
|
|
6639
|
-
const acceptedCount =
|
|
6659
|
+
const acceptedCount = React13.useMemo(
|
|
6640
6660
|
() => Object.values(rowStates).filter((s) => s.accepted).length,
|
|
6641
6661
|
[rowStates]
|
|
6642
6662
|
);
|
|
6643
|
-
const [submitting, setSubmitting] =
|
|
6644
|
-
const setAllAccepted =
|
|
6663
|
+
const [submitting, setSubmitting] = React13.useState(false);
|
|
6664
|
+
const setAllAccepted = React13.useCallback(
|
|
6645
6665
|
(accepted) => {
|
|
6646
6666
|
setRowStates((prev) => {
|
|
6647
6667
|
const next = { ...prev };
|
|
@@ -6659,7 +6679,7 @@ function AIReconciliationPanel({
|
|
|
6659
6679
|
},
|
|
6660
6680
|
[effective]
|
|
6661
6681
|
);
|
|
6662
|
-
const setRowAccepted =
|
|
6682
|
+
const setRowAccepted = React13.useCallback(
|
|
6663
6683
|
(id, accepted) => {
|
|
6664
6684
|
const proposal = effective.find((p) => p.id === id);
|
|
6665
6685
|
setRowStates((prev) => {
|
|
@@ -6673,7 +6693,7 @@ function AIReconciliationPanel({
|
|
|
6673
6693
|
},
|
|
6674
6694
|
[effective]
|
|
6675
6695
|
);
|
|
6676
|
-
const setRowValue =
|
|
6696
|
+
const setRowValue = React13.useCallback(
|
|
6677
6697
|
(id, value) => {
|
|
6678
6698
|
const proposal = effective.find((p) => p.id === id);
|
|
6679
6699
|
setRowStates((prev) => {
|
|
@@ -6687,7 +6707,7 @@ function AIReconciliationPanel({
|
|
|
6687
6707
|
},
|
|
6688
6708
|
[effective]
|
|
6689
6709
|
);
|
|
6690
|
-
const toggleRowEditing =
|
|
6710
|
+
const toggleRowEditing = React13.useCallback(
|
|
6691
6711
|
(id) => {
|
|
6692
6712
|
const proposal = effective.find((p) => p.id === id);
|
|
6693
6713
|
setRowStates((prev) => {
|
|
@@ -6701,7 +6721,7 @@ function AIReconciliationPanel({
|
|
|
6701
6721
|
},
|
|
6702
6722
|
[effective]
|
|
6703
6723
|
);
|
|
6704
|
-
const handleApply =
|
|
6724
|
+
const handleApply = React13.useCallback(async () => {
|
|
6705
6725
|
const accepted = effective.filter((p) => rowStates[p.id]?.accepted).map((p) => ({
|
|
6706
6726
|
id: p.id,
|
|
6707
6727
|
value: rowStates[p.id]?.value ?? p.proposed
|
|
@@ -6714,8 +6734,8 @@ function AIReconciliationPanel({
|
|
|
6714
6734
|
setSubmitting(false);
|
|
6715
6735
|
}
|
|
6716
6736
|
}, [effective, rowStates, onApply]);
|
|
6717
|
-
const containerRef =
|
|
6718
|
-
|
|
6737
|
+
const containerRef = React13.useRef(null);
|
|
6738
|
+
React13.useEffect(() => {
|
|
6719
6739
|
const el = containerRef.current;
|
|
6720
6740
|
if (!el) return void 0;
|
|
6721
6741
|
const handler = (e) => {
|
|
@@ -6747,7 +6767,7 @@ function AIReconciliationPanel({
|
|
|
6747
6767
|
const allAccepted = effective.length > 0 && acceptedCount === effective.length;
|
|
6748
6768
|
const someAccepted = acceptedCount > 0 && !allAccepted;
|
|
6749
6769
|
const resolvedApplyLabel = applyLabel ?? (acceptedCount === 1 ? "Apply 1 update" : `Apply ${acceptedCount} updates`);
|
|
6750
|
-
const grouped =
|
|
6770
|
+
const grouped = React13.useMemo(() => {
|
|
6751
6771
|
const map = /* @__PURE__ */ new Map();
|
|
6752
6772
|
for (const p of effective) {
|
|
6753
6773
|
const key = p.group;
|
|
@@ -6798,7 +6818,7 @@ function AIReconciliationPanel({
|
|
|
6798
6818
|
{
|
|
6799
6819
|
"data-slot": "reconciliation-rows",
|
|
6800
6820
|
className: "divide-border max-h-[60vh] overflow-y-auto",
|
|
6801
|
-
children: grouped.map(([groupKey, items]) => /* @__PURE__ */ jsxs(
|
|
6821
|
+
children: grouped.map(([groupKey, items]) => /* @__PURE__ */ jsxs(React13.Fragment, { children: [
|
|
6802
6822
|
groupKey && /* @__PURE__ */ jsx(
|
|
6803
6823
|
"li",
|
|
6804
6824
|
{
|
|
@@ -7416,7 +7436,7 @@ function ConcernRow({
|
|
|
7416
7436
|
drag,
|
|
7417
7437
|
onAction
|
|
7418
7438
|
}) {
|
|
7419
|
-
const [expanded, setExpanded] =
|
|
7439
|
+
const [expanded, setExpanded] = React13.useState(false);
|
|
7420
7440
|
const current = currentAssertion(concern);
|
|
7421
7441
|
const hasHistory = concern.assertions.length > 1;
|
|
7422
7442
|
const visibleActions = actions.filter(
|
|
@@ -7534,7 +7554,7 @@ function ConcernRow({
|
|
|
7534
7554
|
)
|
|
7535
7555
|
);
|
|
7536
7556
|
}
|
|
7537
|
-
var ProblemList =
|
|
7557
|
+
var ProblemList = React13.forwardRef(
|
|
7538
7558
|
({
|
|
7539
7559
|
concerns,
|
|
7540
7560
|
title = "Problem list",
|
|
@@ -7548,7 +7568,7 @@ var ProblemList = React12.forwardRef(
|
|
|
7548
7568
|
"data-testid": dataTestId,
|
|
7549
7569
|
...props
|
|
7550
7570
|
}, ref) => {
|
|
7551
|
-
const [draft, setDraft] =
|
|
7571
|
+
const [draft, setDraft] = React13.useState("");
|
|
7552
7572
|
const [announcement, setAnnouncement] = useLiveAnnouncement();
|
|
7553
7573
|
const submitDraft = () => {
|
|
7554
7574
|
const text = draft.trim();
|
|
@@ -7556,7 +7576,7 @@ var ProblemList = React12.forwardRef(
|
|
|
7556
7576
|
onAddProblem?.(text);
|
|
7557
7577
|
setDraft("");
|
|
7558
7578
|
};
|
|
7559
|
-
const moveConcern =
|
|
7579
|
+
const moveConcern = React13.useCallback(
|
|
7560
7580
|
(concern, dir) => {
|
|
7561
7581
|
if (!onReorder || readOnly) return;
|
|
7562
7582
|
const groupKey = concernGroupKey(concern);
|
|
@@ -7576,7 +7596,7 @@ var ProblemList = React12.forwardRef(
|
|
|
7576
7596
|
},
|
|
7577
7597
|
[concerns, onReorder, readOnly, setAnnouncement]
|
|
7578
7598
|
);
|
|
7579
|
-
const handleAction =
|
|
7599
|
+
const handleAction = React13.useCallback(
|
|
7580
7600
|
(concern, action) => {
|
|
7581
7601
|
if (action === "move-up") moveConcern(concern, -1);
|
|
7582
7602
|
else if (action === "move-down") moveConcern(concern, 1);
|
|
@@ -7584,13 +7604,13 @@ var ProblemList = React12.forwardRef(
|
|
|
7584
7604
|
},
|
|
7585
7605
|
[moveConcern, onAction]
|
|
7586
7606
|
);
|
|
7587
|
-
const groupById =
|
|
7607
|
+
const groupById = React13.useMemo(
|
|
7588
7608
|
() => new Map(
|
|
7589
7609
|
concerns.map((c) => [c.concernId, concernGroupKey(c)])
|
|
7590
7610
|
),
|
|
7591
7611
|
[concerns]
|
|
7592
7612
|
);
|
|
7593
|
-
const groupOf =
|
|
7613
|
+
const groupOf = React13.useCallback(
|
|
7594
7614
|
(id) => groupById.get(id),
|
|
7595
7615
|
[groupById]
|
|
7596
7616
|
);
|
|
@@ -7795,8 +7815,8 @@ function OrderRow({
|
|
|
7795
7815
|
controls?.moveWithin || controls?.moveToProblem || controls?.edit || controls?.editStart || controls?.remove
|
|
7796
7816
|
);
|
|
7797
7817
|
const canEdit = Boolean(controls?.edit || controls?.editStart);
|
|
7798
|
-
const [editing, setEditing] =
|
|
7799
|
-
const [menuOpen, setMenuOpen] =
|
|
7818
|
+
const [editing, setEditing] = React13.useState(null);
|
|
7819
|
+
const [menuOpen, setMenuOpen] = React13.useState(false);
|
|
7800
7820
|
const pick = (fn) => () => {
|
|
7801
7821
|
setMenuOpen(false);
|
|
7802
7822
|
fn();
|
|
@@ -7875,11 +7895,11 @@ function OrderRow({
|
|
|
7875
7895
|
"aria-label": `Edit order ${order.display}`,
|
|
7876
7896
|
className: "flex flex-1 flex-wrap items-center gap-1.5",
|
|
7877
7897
|
children: [
|
|
7878
|
-
/* @__PURE__ */ jsx(
|
|
7879
|
-
|
|
7898
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsx(
|
|
7899
|
+
Input,
|
|
7880
7900
|
{
|
|
7881
|
-
type: "text",
|
|
7882
7901
|
autoFocus: true,
|
|
7902
|
+
size: "sm",
|
|
7883
7903
|
value: editing.display,
|
|
7884
7904
|
onChange: (e) => setEditing(
|
|
7885
7905
|
(prev) => prev ? { ...prev, display: e.target.value } : prev
|
|
@@ -7889,17 +7909,13 @@ function OrderRow({
|
|
|
7889
7909
|
else if (e.key === "Escape") setEditing(null);
|
|
7890
7910
|
},
|
|
7891
7911
|
"aria-label": "Order description",
|
|
7892
|
-
className:
|
|
7893
|
-
"border-border bg-background text-foreground",
|
|
7894
|
-
"h-7 min-w-40 flex-1 rounded-md border px-2 text-sm",
|
|
7895
|
-
"focus:ring-ring focus:ring-2 focus:outline-none"
|
|
7896
|
-
)
|
|
7912
|
+
className: "h-7"
|
|
7897
7913
|
}
|
|
7898
|
-
),
|
|
7899
|
-
/* @__PURE__ */ jsx(
|
|
7900
|
-
|
|
7914
|
+
) }),
|
|
7915
|
+
/* @__PURE__ */ jsx("div", { className: "w-40", children: /* @__PURE__ */ jsx(
|
|
7916
|
+
Input,
|
|
7901
7917
|
{
|
|
7902
|
-
|
|
7918
|
+
size: "sm",
|
|
7903
7919
|
value: editing.detail,
|
|
7904
7920
|
onChange: (e) => setEditing(
|
|
7905
7921
|
(prev) => prev ? { ...prev, detail: e.target.value } : prev
|
|
@@ -7910,13 +7926,9 @@ function OrderRow({
|
|
|
7910
7926
|
},
|
|
7911
7927
|
placeholder: "detail (sig, timing\u2026)",
|
|
7912
7928
|
"aria-label": "Order detail",
|
|
7913
|
-
className:
|
|
7914
|
-
"border-border bg-background text-foreground placeholder:text-muted-foreground",
|
|
7915
|
-
"h-7 w-40 rounded-md border px-2 text-xs",
|
|
7916
|
-
"focus:ring-ring focus:ring-2 focus:outline-none"
|
|
7917
|
-
)
|
|
7929
|
+
className: "h-7 text-xs"
|
|
7918
7930
|
}
|
|
7919
|
-
),
|
|
7931
|
+
) }),
|
|
7920
7932
|
/* @__PURE__ */ jsx(
|
|
7921
7933
|
Button,
|
|
7922
7934
|
{
|
|
@@ -8035,17 +8047,18 @@ function OrderRow({
|
|
|
8035
8047
|
);
|
|
8036
8048
|
}
|
|
8037
8049
|
function AddOrderForm({
|
|
8050
|
+
id,
|
|
8038
8051
|
problemText,
|
|
8039
8052
|
onSubmit,
|
|
8040
8053
|
onCancel,
|
|
8041
8054
|
renderSearch
|
|
8042
8055
|
}) {
|
|
8043
|
-
const [type, setType] =
|
|
8056
|
+
const [type, setType] = React13.useState(
|
|
8044
8057
|
renderSearch ? "auto" : "medication"
|
|
8045
8058
|
);
|
|
8046
|
-
const [display, setDisplay] =
|
|
8047
|
-
const inputRef =
|
|
8048
|
-
|
|
8059
|
+
const [display, setDisplay] = React13.useState("");
|
|
8060
|
+
const inputRef = React13.useRef(null);
|
|
8061
|
+
React13.useEffect(() => {
|
|
8049
8062
|
inputRef.current?.focus();
|
|
8050
8063
|
}, []);
|
|
8051
8064
|
const submit = () => {
|
|
@@ -8069,6 +8082,7 @@ function AddOrderForm({
|
|
|
8069
8082
|
return /* @__PURE__ */ jsxs(
|
|
8070
8083
|
"div",
|
|
8071
8084
|
{
|
|
8085
|
+
id,
|
|
8072
8086
|
role: "form",
|
|
8073
8087
|
"aria-label": `Add order for ${problemText}`,
|
|
8074
8088
|
className: "border-border bg-muted/40 ms-2.5 mt-1.5 flex flex-wrap items-center gap-1.5 rounded-md border border-dashed p-2",
|
|
@@ -8107,12 +8121,11 @@ function AddOrderForm({
|
|
|
8107
8121
|
});
|
|
8108
8122
|
}
|
|
8109
8123
|
}) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8110
|
-
/* @__PURE__ */ jsx(
|
|
8111
|
-
|
|
8124
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-48 flex-1", children: /* @__PURE__ */ jsx(
|
|
8125
|
+
Input,
|
|
8112
8126
|
{
|
|
8113
8127
|
ref: inputRef,
|
|
8114
|
-
|
|
8115
|
-
"data-slot": "input",
|
|
8128
|
+
size: "sm",
|
|
8116
8129
|
value: display,
|
|
8117
8130
|
onChange: (e) => setDisplay(e.target.value),
|
|
8118
8131
|
onKeyDown: (e) => {
|
|
@@ -8120,14 +8133,9 @@ function AddOrderForm({
|
|
|
8120
8133
|
else if (e.key === "Escape") onCancel();
|
|
8121
8134
|
},
|
|
8122
8135
|
placeholder: "e.g. lisinopril 10 mg tablet \u2014 1 po daily",
|
|
8123
|
-
"aria-label": "Order description"
|
|
8124
|
-
className: cn(
|
|
8125
|
-
"border-border bg-background text-foreground placeholder:text-muted-foreground",
|
|
8126
|
-
"h-8 min-w-48 flex-1 rounded-md border px-2.5 text-sm",
|
|
8127
|
-
"focus:ring-ring focus:ring-2 focus:outline-none"
|
|
8128
|
-
)
|
|
8136
|
+
"aria-label": "Order description"
|
|
8129
8137
|
}
|
|
8130
|
-
),
|
|
8138
|
+
) }),
|
|
8131
8139
|
/* @__PURE__ */ jsx(
|
|
8132
8140
|
Button,
|
|
8133
8141
|
{
|
|
@@ -8155,7 +8163,7 @@ function AddOrderForm({
|
|
|
8155
8163
|
}
|
|
8156
8164
|
);
|
|
8157
8165
|
}
|
|
8158
|
-
var Assessment =
|
|
8166
|
+
var Assessment = React13.forwardRef(
|
|
8159
8167
|
({
|
|
8160
8168
|
concerns,
|
|
8161
8169
|
items,
|
|
@@ -8164,6 +8172,7 @@ var Assessment = React12.forwardRef(
|
|
|
8164
8172
|
showPlan = true,
|
|
8165
8173
|
onShowPlanChange,
|
|
8166
8174
|
onAction,
|
|
8175
|
+
onRemoveAssessment,
|
|
8167
8176
|
onAddOrder,
|
|
8168
8177
|
onAddAssessment,
|
|
8169
8178
|
onLinkOrder,
|
|
@@ -8180,17 +8189,18 @@ var Assessment = React12.forwardRef(
|
|
|
8180
8189
|
"data-testid": dataTestId,
|
|
8181
8190
|
...props
|
|
8182
8191
|
}, ref) => {
|
|
8183
|
-
const
|
|
8184
|
-
const [
|
|
8192
|
+
const instanceId = React13.useId();
|
|
8193
|
+
const [addingFor, setAddingFor] = React13.useState(null);
|
|
8194
|
+
const [addMode, setAddMode] = React13.useState(
|
|
8185
8195
|
defaultAddMode
|
|
8186
8196
|
);
|
|
8187
|
-
const [pendingFreeText, setPendingFreeText] =
|
|
8197
|
+
const [pendingFreeText, setPendingFreeText] = React13.useState(
|
|
8188
8198
|
null
|
|
8189
8199
|
);
|
|
8190
8200
|
const [announcement, setAnnouncement] = useLiveAnnouncement();
|
|
8191
8201
|
const ambientCodeLookup = useCodeLookupConfig();
|
|
8192
8202
|
const effectiveRenderOrderSearch = renderOrderSearch === false ? void 0 : renderOrderSearch ?? (ambientCodeLookup ? contextOrderSearch(ambientCodeLookup) : void 0);
|
|
8193
|
-
const concernById =
|
|
8203
|
+
const concernById = React13.useMemo(
|
|
8194
8204
|
() => new Map(concerns.map((c) => [c.concernId, c])),
|
|
8195
8205
|
[concerns]
|
|
8196
8206
|
);
|
|
@@ -8205,7 +8215,7 @@ var Assessment = React12.forwardRef(
|
|
|
8205
8215
|
onReorderItems(ids);
|
|
8206
8216
|
}
|
|
8207
8217
|
});
|
|
8208
|
-
const problemLabel =
|
|
8218
|
+
const problemLabel = React13.useCallback(
|
|
8209
8219
|
(concernId) => concernById.get(concernId)?.assertions.find(
|
|
8210
8220
|
(a) => items.some(
|
|
8211
8221
|
(i) => i.concernId === concernId && i.assertionId === a.id
|
|
@@ -8257,11 +8267,11 @@ var Assessment = React12.forwardRef(
|
|
|
8257
8267
|
}))
|
|
8258
8268
|
};
|
|
8259
8269
|
const orderDragEnabled = !readOnly && Boolean(onReorderOrders || onLinkOrder);
|
|
8260
|
-
const [draggingOrderId, setDraggingOrderId] =
|
|
8270
|
+
const [draggingOrderId, setDraggingOrderId] = React13.useState(
|
|
8261
8271
|
null
|
|
8262
8272
|
);
|
|
8263
|
-
const draggingOrderRef =
|
|
8264
|
-
const [orderOver, setOrderOver] =
|
|
8273
|
+
const draggingOrderRef = React13.useRef(null);
|
|
8274
|
+
const [orderOver, setOrderOver] = React13.useState(null);
|
|
8265
8275
|
const resetOrderDrag = () => {
|
|
8266
8276
|
draggingOrderRef.current = null;
|
|
8267
8277
|
setDraggingOrderId(null);
|
|
@@ -8380,18 +8390,15 @@ var Assessment = React12.forwardRef(
|
|
|
8380
8390
|
children: [
|
|
8381
8391
|
title !== null && /* @__PURE__ */ jsxs(CardHeader, { className: "border-border bg-muted/50 flex flex-row items-center justify-between border-b px-4 py-3", children: [
|
|
8382
8392
|
/* @__PURE__ */ jsx("h3", { className: "text-foreground text-sm font-semibold tracking-wide uppercase", children: title }),
|
|
8383
|
-
onShowPlanChange && /* @__PURE__ */
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
),
|
|
8393
|
-
"Show plan"
|
|
8394
|
-
] })
|
|
8393
|
+
onShowPlanChange && /* @__PURE__ */ jsx(
|
|
8394
|
+
Checkbox,
|
|
8395
|
+
{
|
|
8396
|
+
size: "sm",
|
|
8397
|
+
checked: showPlan,
|
|
8398
|
+
onChange: (e) => onShowPlanChange(e.target.checked),
|
|
8399
|
+
label: "Show plan"
|
|
8400
|
+
}
|
|
8401
|
+
)
|
|
8395
8402
|
] }),
|
|
8396
8403
|
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-4 px-4 py-4", children: [
|
|
8397
8404
|
items.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "No problems assessed this visit." }),
|
|
@@ -8403,6 +8410,7 @@ var Assessment = React12.forwardRef(
|
|
|
8403
8410
|
);
|
|
8404
8411
|
const bp = blockProps(item.concernId);
|
|
8405
8412
|
const formOpen = addingFor === item.concernId;
|
|
8413
|
+
const addOrderFormId = `${instanceId}-add-order-${item.concernId}`;
|
|
8406
8414
|
return /* @__PURE__ */ jsxs(
|
|
8407
8415
|
"li",
|
|
8408
8416
|
{
|
|
@@ -8443,36 +8451,62 @@ var Assessment = React12.forwardRef(
|
|
|
8443
8451
|
/* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: assertion.text }),
|
|
8444
8452
|
assertion.verificationStatus !== "confirmed" && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: assertion.verificationStatus }),
|
|
8445
8453
|
/* @__PURE__ */ jsx(CodingChips, { coding: assertion.coding }),
|
|
8446
|
-
!readOnly && /* @__PURE__ */
|
|
8454
|
+
!readOnly && (onAction || onAddOrder || onRemoveAssessment) && /* @__PURE__ */ jsxs(
|
|
8447
8455
|
RowActionToolbar,
|
|
8448
8456
|
{
|
|
8449
8457
|
label: `Actions for ${assertion.text}`,
|
|
8450
8458
|
align: "top",
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8459
|
+
className: cn(
|
|
8460
|
+
"pointer-fine:group-has-[[data-order-id]:hover]:pointer-events-none",
|
|
8461
|
+
"pointer-fine:group-has-[[data-order-id]:hover]:opacity-0",
|
|
8462
|
+
"pointer-fine:group-has-[[data-order-id]:focus-within]:pointer-events-none",
|
|
8463
|
+
"pointer-fine:group-has-[[data-order-id]:focus-within]:opacity-0"
|
|
8464
|
+
),
|
|
8465
|
+
children: [
|
|
8466
|
+
Object.keys(ACTION_META2).map(
|
|
8467
|
+
(action) => {
|
|
8468
|
+
const meta = ACTION_META2[action];
|
|
8469
|
+
if (action !== "add-order" && !onAction)
|
|
8470
|
+
return null;
|
|
8471
|
+
if (action === "add-order" && !onAddOrder && !onAction)
|
|
8472
|
+
return null;
|
|
8473
|
+
return /* @__PURE__ */ jsx(
|
|
8474
|
+
RowIconButton,
|
|
8475
|
+
{
|
|
8476
|
+
label: meta.label,
|
|
8477
|
+
icon: meta.icon,
|
|
8478
|
+
size: "sm",
|
|
8479
|
+
expanded: action === "add-order" && onAddOrder ? addingFor === item.concernId : void 0,
|
|
8480
|
+
controls: action === "add-order" && onAddOrder ? addOrderFormId : void 0,
|
|
8481
|
+
onClick: () => {
|
|
8482
|
+
if (action === "add-order" && onAddOrder) {
|
|
8483
|
+
setAddingFor(
|
|
8484
|
+
(prev) => prev === item.concernId ? null : item.concernId
|
|
8485
|
+
);
|
|
8486
|
+
} else {
|
|
8487
|
+
onAction?.(item, action);
|
|
8488
|
+
}
|
|
8469
8489
|
}
|
|
8470
|
-
}
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8490
|
+
},
|
|
8491
|
+
action
|
|
8492
|
+
);
|
|
8493
|
+
}
|
|
8494
|
+
),
|
|
8495
|
+
onRemoveAssessment && /* @__PURE__ */ jsx(
|
|
8496
|
+
RowIconButton,
|
|
8497
|
+
{
|
|
8498
|
+
label: `Remove ${assertion.text} from assessment`,
|
|
8499
|
+
icon: Trash2,
|
|
8500
|
+
size: "sm",
|
|
8501
|
+
onClick: () => {
|
|
8502
|
+
onRemoveAssessment(item);
|
|
8503
|
+
setAnnouncement(
|
|
8504
|
+
`${assertion.text} removed from assessment`
|
|
8505
|
+
);
|
|
8506
|
+
}
|
|
8507
|
+
}
|
|
8508
|
+
)
|
|
8509
|
+
]
|
|
8476
8510
|
}
|
|
8477
8511
|
)
|
|
8478
8512
|
]
|
|
@@ -8498,8 +8532,15 @@ var Assessment = React12.forwardRef(
|
|
|
8498
8532
|
!readOnly && onAddOrder && addingFor === item.concernId && /* @__PURE__ */ jsx(
|
|
8499
8533
|
AddOrderForm,
|
|
8500
8534
|
{
|
|
8535
|
+
id: addOrderFormId,
|
|
8501
8536
|
problemText: assertion.text,
|
|
8502
|
-
onSubmit: (order) =>
|
|
8537
|
+
onSubmit: (order) => {
|
|
8538
|
+
onAddOrder(item, order);
|
|
8539
|
+
setAnnouncement(
|
|
8540
|
+
`${order.display} added to ${assertion.text}`
|
|
8541
|
+
);
|
|
8542
|
+
setAddingFor(null);
|
|
8543
|
+
},
|
|
8503
8544
|
onCancel: () => setAddingFor(null),
|
|
8504
8545
|
renderSearch: effectiveRenderOrderSearch
|
|
8505
8546
|
}
|
|
@@ -8706,10 +8747,10 @@ function AuthDialog({
|
|
|
8706
8747
|
requireEmailVerification = false,
|
|
8707
8748
|
className
|
|
8708
8749
|
}) {
|
|
8709
|
-
const [internalMode, setInternalMode] =
|
|
8710
|
-
const [isLoading, setIsLoading] =
|
|
8711
|
-
const [error, setError] =
|
|
8712
|
-
const [success, setSuccess] =
|
|
8750
|
+
const [internalMode, setInternalMode] = React13.useState("login");
|
|
8751
|
+
const [isLoading, setIsLoading] = React13.useState(false);
|
|
8752
|
+
const [error, setError] = React13.useState(null);
|
|
8753
|
+
const [success, setSuccess] = React13.useState(null);
|
|
8713
8754
|
const mode = controlledMode ?? internalMode;
|
|
8714
8755
|
const setMode = (newMode) => {
|
|
8715
8756
|
setError(null);
|
|
@@ -8720,14 +8761,14 @@ function AuthDialog({
|
|
|
8720
8761
|
setInternalMode(newMode);
|
|
8721
8762
|
}
|
|
8722
8763
|
};
|
|
8723
|
-
|
|
8764
|
+
React13.useEffect(() => {
|
|
8724
8765
|
const handleEscape = (e) => {
|
|
8725
8766
|
if (e.key === "Escape" && isOpen) onClose();
|
|
8726
8767
|
};
|
|
8727
8768
|
document.addEventListener("keydown", handleEscape);
|
|
8728
8769
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
8729
8770
|
}, [isOpen, onClose]);
|
|
8730
|
-
|
|
8771
|
+
React13.useEffect(() => {
|
|
8731
8772
|
if (isOpen) {
|
|
8732
8773
|
document.body.style.overflow = "hidden";
|
|
8733
8774
|
} else {
|
|
@@ -8953,9 +8994,9 @@ function AuthDialog({
|
|
|
8953
8994
|
);
|
|
8954
8995
|
}
|
|
8955
8996
|
function LoginForm({ onSubmit, isLoading, onForgotPassword }) {
|
|
8956
|
-
const [email, setEmail] =
|
|
8957
|
-
const [password, setPassword] =
|
|
8958
|
-
const [showPassword, setShowPassword] =
|
|
8997
|
+
const [email, setEmail] = React13.useState("");
|
|
8998
|
+
const [password, setPassword] = React13.useState("");
|
|
8999
|
+
const [showPassword, setShowPassword] = React13.useState(false);
|
|
8959
9000
|
const handleSubmit = (e) => {
|
|
8960
9001
|
e.preventDefault();
|
|
8961
9002
|
onSubmit(email, password);
|
|
@@ -9057,11 +9098,11 @@ function SignupForm({
|
|
|
9057
9098
|
termsUrl,
|
|
9058
9099
|
privacyUrl
|
|
9059
9100
|
}) {
|
|
9060
|
-
const [email, setEmail] =
|
|
9061
|
-
const [password, setPassword] =
|
|
9062
|
-
const [confirmPassword, setConfirmPassword] =
|
|
9063
|
-
const [acceptedTerms, setAcceptedTerms] =
|
|
9064
|
-
const [showPassword, setShowPassword] =
|
|
9101
|
+
const [email, setEmail] = React13.useState("");
|
|
9102
|
+
const [password, setPassword] = React13.useState("");
|
|
9103
|
+
const [confirmPassword, setConfirmPassword] = React13.useState("");
|
|
9104
|
+
const [acceptedTerms, setAcceptedTerms] = React13.useState(false);
|
|
9105
|
+
const [showPassword, setShowPassword] = React13.useState(false);
|
|
9065
9106
|
const passwordsMatch = password === confirmPassword;
|
|
9066
9107
|
const handleSubmit = (e) => {
|
|
9067
9108
|
e.preventDefault();
|
|
@@ -9210,7 +9251,7 @@ function ForgotPasswordForm({
|
|
|
9210
9251
|
isLoading,
|
|
9211
9252
|
onBack
|
|
9212
9253
|
}) {
|
|
9213
|
-
const [email, setEmail] =
|
|
9254
|
+
const [email, setEmail] = React13.useState("");
|
|
9214
9255
|
const handleSubmit = (e) => {
|
|
9215
9256
|
e.preventDefault();
|
|
9216
9257
|
onSubmit(email);
|
|
@@ -9261,9 +9302,9 @@ function ForgotPasswordForm({
|
|
|
9261
9302
|
] });
|
|
9262
9303
|
}
|
|
9263
9304
|
function ResetPasswordForm({ onSubmit, isLoading }) {
|
|
9264
|
-
const [password, setPassword] =
|
|
9265
|
-
const [confirmPassword, setConfirmPassword] =
|
|
9266
|
-
const [showPassword, setShowPassword] =
|
|
9305
|
+
const [password, setPassword] = React13.useState("");
|
|
9306
|
+
const [confirmPassword, setConfirmPassword] = React13.useState("");
|
|
9307
|
+
const [showPassword, setShowPassword] = React13.useState(false);
|
|
9267
9308
|
const passwordsMatch = password === confirmPassword;
|
|
9268
9309
|
const handleSubmit = (e) => {
|
|
9269
9310
|
e.preventDefault();
|
|
@@ -9629,10 +9670,10 @@ function ServiceSelect({
|
|
|
9629
9670
|
error,
|
|
9630
9671
|
className
|
|
9631
9672
|
}) {
|
|
9632
|
-
const [isOpen, setIsOpen] =
|
|
9633
|
-
const dropdownRef =
|
|
9673
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
9674
|
+
const dropdownRef = React13.useRef(null);
|
|
9634
9675
|
const { anchorRef, floatingRef, style } = useAnchoredPosition({ open: isOpen, matchWidth: true, maxHeight: 240 });
|
|
9635
|
-
const outsideRefs =
|
|
9676
|
+
const outsideRefs = React13.useMemo(
|
|
9636
9677
|
() => [dropdownRef, floatingRef],
|
|
9637
9678
|
[floatingRef]
|
|
9638
9679
|
);
|
|
@@ -9811,7 +9852,7 @@ function DialogOverlay({
|
|
|
9811
9852
|
className,
|
|
9812
9853
|
titleId
|
|
9813
9854
|
}) {
|
|
9814
|
-
|
|
9855
|
+
React13.useEffect(() => {
|
|
9815
9856
|
if (!isOpen || isStorybookDocsMode()) {
|
|
9816
9857
|
return void 0;
|
|
9817
9858
|
}
|
|
@@ -9865,8 +9906,8 @@ function BookingDialog({
|
|
|
9865
9906
|
isLoading = false,
|
|
9866
9907
|
className
|
|
9867
9908
|
}) {
|
|
9868
|
-
const titleId =
|
|
9869
|
-
const [formData, setFormData] =
|
|
9909
|
+
const titleId = React13.useId();
|
|
9910
|
+
const [formData, setFormData] = React13.useState({
|
|
9870
9911
|
firstName: defaultValues?.firstName || "",
|
|
9871
9912
|
lastName: defaultValues?.lastName || "",
|
|
9872
9913
|
phoneNumber: defaultValues?.phoneNumber || "",
|
|
@@ -9875,7 +9916,7 @@ function BookingDialog({
|
|
|
9875
9916
|
consentEmail: defaultValues?.consentEmail ?? false,
|
|
9876
9917
|
consentSms: defaultValues?.consentSms ?? false
|
|
9877
9918
|
});
|
|
9878
|
-
const [errors, setErrors] =
|
|
9919
|
+
const [errors, setErrors] = React13.useState({});
|
|
9879
9920
|
const validate = () => {
|
|
9880
9921
|
const newErrors = {};
|
|
9881
9922
|
if (!formData.firstName.trim()) {
|
|
@@ -10143,7 +10184,7 @@ function InlineBookingForm({
|
|
|
10143
10184
|
isLoading = false,
|
|
10144
10185
|
className
|
|
10145
10186
|
}) {
|
|
10146
|
-
const [formData, setFormData] =
|
|
10187
|
+
const [formData, setFormData] = React13.useState({
|
|
10147
10188
|
firstName: defaultValues?.firstName || "",
|
|
10148
10189
|
lastName: defaultValues?.lastName || "",
|
|
10149
10190
|
phoneNumber: defaultValues?.phoneNumber || "",
|
|
@@ -10152,7 +10193,7 @@ function InlineBookingForm({
|
|
|
10152
10193
|
consentEmail: defaultValues?.consentEmail ?? false,
|
|
10153
10194
|
consentSms: defaultValues?.consentSms ?? false
|
|
10154
10195
|
});
|
|
10155
|
-
const [errors, setErrors] =
|
|
10196
|
+
const [errors, setErrors] = React13.useState({});
|
|
10156
10197
|
const validate = () => {
|
|
10157
10198
|
const newErrors = {};
|
|
10158
10199
|
if (!formData.firstName.trim()) {
|
|
@@ -10990,7 +11031,7 @@ function HoursSummary({
|
|
|
10990
11031
|
defaultExpanded = false,
|
|
10991
11032
|
className
|
|
10992
11033
|
}) {
|
|
10993
|
-
const [isExpanded, setIsExpanded] =
|
|
11034
|
+
const [isExpanded, setIsExpanded] = React13.useState(defaultExpanded);
|
|
10994
11035
|
const isOpen = isCurrentlyOpen(schedule.officeHours);
|
|
10995
11036
|
const todayHours = getTodayHours(schedule.officeHours, use24Hour);
|
|
10996
11037
|
const hasStructuredHours = schedule.officeHours && schedule.officeHours.length > 0;
|
|
@@ -11384,12 +11425,12 @@ function BusinessHoursRulesEditor({
|
|
|
11384
11425
|
className,
|
|
11385
11426
|
addHoursLabel = "Add Hours"
|
|
11386
11427
|
}) {
|
|
11387
|
-
const [rules, setRules] =
|
|
11428
|
+
const [rules, setRules] = React13.useState(
|
|
11388
11429
|
() => scheduleToRules(value)
|
|
11389
11430
|
);
|
|
11390
11431
|
const timeFormat = use24Hour ? "24-hour" : "12-hour";
|
|
11391
|
-
const lastScheduleRef =
|
|
11392
|
-
|
|
11432
|
+
const lastScheduleRef = React13.useRef(normalizeSchedule(value));
|
|
11433
|
+
React13.useEffect(() => {
|
|
11393
11434
|
const incoming = normalizeSchedule(value);
|
|
11394
11435
|
if (incoming !== lastScheduleRef.current) {
|
|
11395
11436
|
lastScheduleRef.current = incoming;
|
|
@@ -11631,13 +11672,13 @@ function CopyIcon({ className }) {
|
|
|
11631
11672
|
}
|
|
11632
11673
|
);
|
|
11633
11674
|
}
|
|
11634
|
-
var ButtonGroup =
|
|
11675
|
+
var ButtonGroup = React13.forwardRef(
|
|
11635
11676
|
({ orientation = "auto", split, className, children, ...props }, ref) => {
|
|
11636
|
-
const innerRef =
|
|
11637
|
-
|
|
11638
|
-
const [stacked, setStacked] =
|
|
11639
|
-
const requiredWidth =
|
|
11640
|
-
|
|
11677
|
+
const innerRef = React13.useRef(null);
|
|
11678
|
+
React13.useImperativeHandle(ref, () => innerRef.current);
|
|
11679
|
+
const [stacked, setStacked] = React13.useState(false);
|
|
11680
|
+
const requiredWidth = React13.useRef(0);
|
|
11681
|
+
React13.useLayoutEffect(() => {
|
|
11641
11682
|
if (orientation !== "auto") return;
|
|
11642
11683
|
const el = innerRef.current;
|
|
11643
11684
|
if (!el) return;
|
|
@@ -11664,7 +11705,7 @@ var ButtonGroup = React12.forwardRef(
|
|
|
11664
11705
|
return () => observer.disconnect();
|
|
11665
11706
|
}, [orientation, stacked, children]);
|
|
11666
11707
|
const isStacked = orientation === "vertical" || orientation === "auto" && stacked;
|
|
11667
|
-
const items =
|
|
11708
|
+
const items = React13.Children.toArray(children);
|
|
11668
11709
|
const splitCount = split === true ? 1 : typeof split === "number" ? split : 0;
|
|
11669
11710
|
const splitIndex = !isStacked && splitCount > 0 && splitCount < items.length ? splitCount : 0;
|
|
11670
11711
|
return /* @__PURE__ */ jsx(
|
|
@@ -11744,7 +11785,7 @@ function HeaderActionButton({
|
|
|
11744
11785
|
)
|
|
11745
11786
|
] });
|
|
11746
11787
|
}
|
|
11747
|
-
var CaseContextBar =
|
|
11788
|
+
var CaseContextBar = React13.forwardRef(
|
|
11748
11789
|
({
|
|
11749
11790
|
caseInfo,
|
|
11750
11791
|
showBackButton = false,
|
|
@@ -11811,7 +11852,7 @@ var CaseContextBar = React12.forwardRef(
|
|
|
11811
11852
|
}
|
|
11812
11853
|
);
|
|
11813
11854
|
CaseContextBar.displayName = "CaseContextBar";
|
|
11814
|
-
var CaseManagementHeader =
|
|
11855
|
+
var CaseManagementHeader = React13.forwardRef(
|
|
11815
11856
|
({
|
|
11816
11857
|
caseInfo,
|
|
11817
11858
|
patient,
|
|
@@ -11835,9 +11876,9 @@ var CaseManagementHeader = React12.forwardRef(
|
|
|
11835
11876
|
...props
|
|
11836
11877
|
}, ref) => {
|
|
11837
11878
|
const l = { ...defaultCaseManagementHeaderLabels, ...labels };
|
|
11838
|
-
const [internalExpanded, setInternalExpanded] =
|
|
11879
|
+
const [internalExpanded, setInternalExpanded] = React13.useState(defaultExpanded);
|
|
11839
11880
|
const isExpanded = expanded ?? internalExpanded;
|
|
11840
|
-
const detailsId =
|
|
11881
|
+
const detailsId = React13.useId();
|
|
11841
11882
|
const days = caseInfo.daysOpen ?? computeDaysOpen(caseInfo.openedDate);
|
|
11842
11883
|
const allDetails = days != null ? [...details, { label: l.daysOpenTerm, value: days }] : details;
|
|
11843
11884
|
const hasDetails = allDetails.length > 0;
|
|
@@ -11997,13 +12038,24 @@ var RELATIONSHIP_OPTIONS = [
|
|
|
11997
12038
|
];
|
|
11998
12039
|
var SEVERITIES = ["mild", "moderate", "severe"];
|
|
11999
12040
|
var CONFIDENCES = ["low", "medium", "high"];
|
|
12000
|
-
function
|
|
12041
|
+
function normalizeConditionCodingSystem(codetype) {
|
|
12001
12042
|
const ct = codetype.toUpperCase().replace(/[^A-Z0-9]/g, "");
|
|
12002
12043
|
if (ct === "ICD10" || ct === "ICD10CM") return "ICD-10-CM";
|
|
12003
12044
|
if (ct === "ICD11") return "ICD-11";
|
|
12004
|
-
if (ct === "SNOMED" || ct === "SNOMEDCT"
|
|
12045
|
+
if (ct === "SNOMED" || ct === "SNOMEDCT" || ct === "SNOMEDUS") {
|
|
12046
|
+
return "SNOMED";
|
|
12047
|
+
}
|
|
12005
12048
|
return codetype;
|
|
12006
12049
|
}
|
|
12050
|
+
function withSinglePrimary(coding) {
|
|
12051
|
+
if (coding.length === 0) return coding;
|
|
12052
|
+
const primaryIndex = coding.findIndex((entry) => entry.primary);
|
|
12053
|
+
const selectedIndex = primaryIndex >= 0 ? primaryIndex : 0;
|
|
12054
|
+
return coding.map((entry, index) => ({
|
|
12055
|
+
...entry,
|
|
12056
|
+
primary: index === selectedIndex
|
|
12057
|
+
}));
|
|
12058
|
+
}
|
|
12007
12059
|
function contextConditionCodeSearch(ctx) {
|
|
12008
12060
|
const ContextConditionCodeSearch = ({
|
|
12009
12061
|
placeholder,
|
|
@@ -12057,7 +12109,7 @@ function FieldFlag({
|
|
|
12057
12109
|
),
|
|
12058
12110
|
className: cn(
|
|
12059
12111
|
"rounded-full border px-2 py-0.5 text-[11px] font-medium transition-colors",
|
|
12060
|
-
unknown ? "border-
|
|
12112
|
+
unknown ? "border-warning/50 bg-warning/10 text-warning-800 dark:text-warning-200" : "border-border text-muted-foreground hover:text-foreground"
|
|
12061
12113
|
),
|
|
12062
12114
|
children: "Unknown"
|
|
12063
12115
|
}
|
|
@@ -12115,28 +12167,29 @@ function ConditionEditor({
|
|
|
12115
12167
|
const prior = concern ? currentAssertion(concern) : void 0;
|
|
12116
12168
|
const ambientCodeLookup = useCodeLookupConfig();
|
|
12117
12169
|
const effectiveRenderCodeSearch = renderCodeSearch === false ? void 0 : renderCodeSearch ?? (ambientCodeLookup ? contextConditionCodeSearch(ambientCodeLookup) : void 0);
|
|
12118
|
-
const [text, setText] =
|
|
12119
|
-
const [coding, setCoding] =
|
|
12120
|
-
const [verification, setVerification] =
|
|
12121
|
-
const [severity, setSeverity] =
|
|
12122
|
-
const [onsetDate, setOnsetDate] =
|
|
12123
|
-
const [onsetFuzzy, setOnsetFuzzy] =
|
|
12124
|
-
const [note, setNote] =
|
|
12125
|
-
const [progression, setProgression] =
|
|
12126
|
-
const [fields, setFields] =
|
|
12127
|
-
const [relType, setRelType] =
|
|
12128
|
-
const [relTarget, setRelTarget] =
|
|
12129
|
-
const [observation, setObservation] =
|
|
12130
|
-
|
|
12170
|
+
const [text, setText] = React13.useState("");
|
|
12171
|
+
const [coding, setCoding] = React13.useState([]);
|
|
12172
|
+
const [verification, setVerification] = React13.useState("confirmed");
|
|
12173
|
+
const [severity, setSeverity] = React13.useState();
|
|
12174
|
+
const [onsetDate, setOnsetDate] = React13.useState("");
|
|
12175
|
+
const [onsetFuzzy, setOnsetFuzzy] = React13.useState("");
|
|
12176
|
+
const [note, setNote] = React13.useState("");
|
|
12177
|
+
const [progression, setProgression] = React13.useState(false);
|
|
12178
|
+
const [fields, setFields] = React13.useState({});
|
|
12179
|
+
const [relType, setRelType] = React13.useState("caused-by");
|
|
12180
|
+
const [relTarget, setRelTarget] = React13.useState("");
|
|
12181
|
+
const [observation, setObservation] = React13.useState("");
|
|
12182
|
+
React13.useEffect(() => {
|
|
12131
12183
|
if (!open) return;
|
|
12132
12184
|
setText(prior?.text ?? "");
|
|
12133
|
-
setCoding(prior?.coding ?? []);
|
|
12185
|
+
setCoding(withSinglePrimary(prior?.coding ?? []));
|
|
12134
12186
|
setVerification(
|
|
12135
12187
|
mode === "add" ? "unconfirmed" : prior?.verificationStatus ?? "confirmed"
|
|
12136
12188
|
);
|
|
12137
12189
|
setSeverity(prior?.severity);
|
|
12138
|
-
|
|
12139
|
-
|
|
12190
|
+
const priorOnsetDate = prior?.onset?.date;
|
|
12191
|
+
setOnsetDate(priorOnsetDate ? dateToDisplayFormat(priorOnsetDate) : "");
|
|
12192
|
+
setOnsetFuzzy(priorOnsetDate ? "" : prior?.onset?.fuzzy ?? "");
|
|
12140
12193
|
setNote("");
|
|
12141
12194
|
setProgression(false);
|
|
12142
12195
|
setFields(prior?.uncertainty?.fields ?? {});
|
|
@@ -12152,18 +12205,14 @@ function ConditionEditor({
|
|
|
12152
12205
|
});
|
|
12153
12206
|
const updateCoding = (i, patch) => setCoding((prev) => prev.map((c, j) => j === i ? { ...c, ...patch } : c));
|
|
12154
12207
|
const codingUnknown = fields.coding?.known === false;
|
|
12208
|
+
const hasInvalidOnsetDate = fields.onset?.known !== false && Boolean(onsetDate) && !isValidDate(onsetDate);
|
|
12155
12209
|
const handleCodePick = (pick) => {
|
|
12156
|
-
const system =
|
|
12210
|
+
const system = normalizeConditionCodingSystem(pick.codetype);
|
|
12157
12211
|
setCoding(
|
|
12158
|
-
(prev) => prev.some((c) => c.system === system && c.code === pick.fullcode) ? prev : [
|
|
12212
|
+
(prev) => prev.some((c) => c.system === system && c.code === pick.fullcode) ? prev : withSinglePrimary([
|
|
12159
12213
|
...prev,
|
|
12160
|
-
{
|
|
12161
|
-
|
|
12162
|
-
code: pick.fullcode,
|
|
12163
|
-
display: pick.label,
|
|
12164
|
-
primary: prev.length === 0
|
|
12165
|
-
}
|
|
12166
|
-
]
|
|
12214
|
+
{ system, code: pick.fullcode, display: pick.label }
|
|
12215
|
+
])
|
|
12167
12216
|
);
|
|
12168
12217
|
setText((prev) => prev || pick.label);
|
|
12169
12218
|
setFields((prev) => {
|
|
@@ -12186,7 +12235,7 @@ function ConditionEditor({
|
|
|
12186
12235
|
onOpenChange(false);
|
|
12187
12236
|
return;
|
|
12188
12237
|
}
|
|
12189
|
-
if (!text.trim()) return;
|
|
12238
|
+
if (!text.trim() || hasInvalidOnsetDate) return;
|
|
12190
12239
|
if (observation.trim()) onAddObservation?.(observation.trim());
|
|
12191
12240
|
const uncertainty = Object.keys(fields).length > 0 ? { fields } : void 0;
|
|
12192
12241
|
onSave?.({
|
|
@@ -12195,41 +12244,46 @@ function ConditionEditor({
|
|
|
12195
12244
|
// checks downstream. A field marked explicitly unknown must not carry a
|
|
12196
12245
|
// value (e.g. one seeded from the prior assertion): value + "unknown"
|
|
12197
12246
|
// would be contradictory, so unknown wins and the value is dropped.
|
|
12198
|
-
coding: fields.coding?.known === false ? [] :
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12247
|
+
coding: fields.coding?.known === false ? [] : withSinglePrimary(
|
|
12248
|
+
coding.filter((c) => c.code.trim()).map((c) => ({
|
|
12249
|
+
...c,
|
|
12250
|
+
code: c.code.trim(),
|
|
12251
|
+
display: c.display?.trim() || void 0,
|
|
12252
|
+
mappedFrom: c.mappedFrom?.trim() || void 0
|
|
12253
|
+
}))
|
|
12254
|
+
),
|
|
12204
12255
|
verificationStatus: verification,
|
|
12205
12256
|
changeType: mode === "refine" ? progression ? "progression" : "refinement" : MODE_META[mode].changeType,
|
|
12206
12257
|
supersedes: prior?.id,
|
|
12207
12258
|
severity: fields.severity?.known === false ? void 0 : severity,
|
|
12208
|
-
onset: fields.onset?.known === false ? void 0 : onsetDate || onsetFuzzy ? {
|
|
12259
|
+
onset: fields.onset?.known === false ? void 0 : onsetDate || onsetFuzzy ? {
|
|
12260
|
+
date: onsetDate ? displayFormatToDateString(onsetDate) : void 0,
|
|
12261
|
+
fuzzy: onsetFuzzy || void 0
|
|
12262
|
+
} : void 0,
|
|
12209
12263
|
uncertainty,
|
|
12210
12264
|
note: note.trim() || void 0
|
|
12211
12265
|
});
|
|
12212
12266
|
onOpenChange(false);
|
|
12213
12267
|
};
|
|
12214
|
-
const saveDisabled = mode === "relate" ? !relTarget : mode === "observe" ? !observation.trim() : !text.trim();
|
|
12268
|
+
const saveDisabled = mode === "relate" ? !relTarget : mode === "observe" ? !observation.trim() : !text.trim() || hasInvalidOnsetDate;
|
|
12215
12269
|
return /* @__PURE__ */ jsxs(
|
|
12216
12270
|
Modal,
|
|
12217
12271
|
{
|
|
12218
12272
|
open,
|
|
12219
12273
|
onOpenChange,
|
|
12220
|
-
size: "
|
|
12274
|
+
size: "2xl",
|
|
12221
12275
|
className,
|
|
12222
12276
|
children: [
|
|
12223
12277
|
/* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs(ModalTitle, { children: [
|
|
12224
12278
|
MODE_META[mode].title,
|
|
12225
12279
|
prior ? ` \u2014 ${prior.text}` : ""
|
|
12226
12280
|
] }) }),
|
|
12227
|
-
/* @__PURE__ */ jsx(ModalBody, { "data-testid": dataTestId, children: /* @__PURE__ */ jsxs("div", { className: "space-y-
|
|
12281
|
+
/* @__PURE__ */ jsx(ModalBody, { "data-testid": dataTestId, className: "space-y-5", children: /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
|
|
12228
12282
|
mode === "revise" && /* @__PURE__ */ jsxs(
|
|
12229
12283
|
"div",
|
|
12230
12284
|
{
|
|
12231
12285
|
role: "alert",
|
|
12232
|
-
className: "flex items-start gap-2 rounded-md border
|
|
12286
|
+
className: "border-warning/30 bg-warning/10 text-warning-800 dark:text-warning-200 flex items-start gap-2 rounded-md border px-3 py-2 text-sm",
|
|
12233
12287
|
children: [
|
|
12234
12288
|
/* @__PURE__ */ jsx(AlertTriangle, { size: 16 }),
|
|
12235
12289
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -12302,21 +12356,19 @@ function ConditionEditor({
|
|
|
12302
12356
|
placeholder: "e.g. Type 1 diabetes mellitus with neuropathy"
|
|
12303
12357
|
}
|
|
12304
12358
|
),
|
|
12305
|
-
mode === "refine" && /* @__PURE__ */
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
/* @__PURE__ */ jsxs("legend", { className: "flex w-full items-center justify-between text-sm font-medium", children: [
|
|
12319
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
12359
|
+
mode === "refine" && /* @__PURE__ */ jsx(
|
|
12360
|
+
Checkbox,
|
|
12361
|
+
{
|
|
12362
|
+
size: "sm",
|
|
12363
|
+
checked: progression,
|
|
12364
|
+
onChange: (e) => setProgression(e.target.checked),
|
|
12365
|
+
label: "Disease progressed (e.g. new complication) rather than a more specific diagnosis"
|
|
12366
|
+
}
|
|
12367
|
+
),
|
|
12368
|
+
/* @__PURE__ */ jsxs("fieldset", { className: "space-y-3", children: [
|
|
12369
|
+
/* @__PURE__ */ jsx("legend", { className: "sr-only", children: "Coding" }),
|
|
12370
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
12371
|
+
/* @__PURE__ */ jsxs("span", { className: "flex flex-wrap items-center gap-2 text-sm font-medium", children: [
|
|
12320
12372
|
"Coding",
|
|
12321
12373
|
/* @__PURE__ */ jsx(
|
|
12322
12374
|
FieldFlag,
|
|
@@ -12343,82 +12395,136 @@ function ConditionEditor({
|
|
|
12343
12395
|
}
|
|
12344
12396
|
]),
|
|
12345
12397
|
leftIcon: /* @__PURE__ */ jsx(Plus, { size: 12 }),
|
|
12346
|
-
className: "h-
|
|
12398
|
+
className: "h-8 shrink-0 text-xs",
|
|
12347
12399
|
children: "Add code"
|
|
12348
12400
|
}
|
|
12349
12401
|
)
|
|
12350
12402
|
] }),
|
|
12351
|
-
effectiveRenderCodeSearch && !(mode === "add" && !text.trim()) && /* @__PURE__ */ jsx("div", {
|
|
12403
|
+
effectiveRenderCodeSearch && !(mode === "add" && !text.trim()) && /* @__PURE__ */ jsx("div", { children: effectiveRenderCodeSearch({
|
|
12352
12404
|
placeholder: "Search codes \u2014 ICD-10-CM / SNOMED\u2026",
|
|
12353
12405
|
onPick: handleCodePick,
|
|
12354
12406
|
onFreeText: (t) => setText((prev) => prev || t)
|
|
12355
12407
|
}) }),
|
|
12356
12408
|
coding.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Optional \u2014 a name-only problem is valid. Codes can be added any time." }),
|
|
12357
|
-
coding.
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
})
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
),
|
|
12383
|
-
/* @__PURE__ */ jsx(
|
|
12384
|
-
Input,
|
|
12385
|
-
{
|
|
12386
|
-
"aria-label": `Display ${i + 1}`,
|
|
12387
|
-
value: c.display ?? "",
|
|
12388
|
-
onChange: (e) => updateCoding(i, { display: e.target.value }),
|
|
12389
|
-
placeholder: "Display",
|
|
12390
|
-
disabled: codingUnknown,
|
|
12391
|
-
className: "min-w-32 flex-1"
|
|
12392
|
-
}
|
|
12393
|
-
),
|
|
12394
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs", children: [
|
|
12395
|
-
/* @__PURE__ */ jsx(
|
|
12396
|
-
"input",
|
|
12397
|
-
{
|
|
12398
|
-
type: "radio",
|
|
12399
|
-
name: "primary-coding",
|
|
12400
|
-
checked: Boolean(c.primary),
|
|
12401
|
-
disabled: codingUnknown,
|
|
12402
|
-
onChange: () => setCoding(
|
|
12403
|
-
(prev) => prev.map((cc, j) => ({ ...cc, primary: j === i }))
|
|
12404
|
-
),
|
|
12405
|
-
className: "accent-primary-600"
|
|
12406
|
-
}
|
|
12409
|
+
coding.length > 0 && /* @__PURE__ */ jsxs(
|
|
12410
|
+
"div",
|
|
12411
|
+
{
|
|
12412
|
+
"aria-hidden": "true",
|
|
12413
|
+
"data-slot": "condition-coding-header",
|
|
12414
|
+
className: "text-muted-foreground hidden grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] items-center gap-2 px-1 text-xs font-medium sm:!grid",
|
|
12415
|
+
children: [
|
|
12416
|
+
/* @__PURE__ */ jsx("span", { children: "System" }),
|
|
12417
|
+
/* @__PURE__ */ jsx("span", { children: "Code" }),
|
|
12418
|
+
/* @__PURE__ */ jsx("span", { children: "Display" }),
|
|
12419
|
+
/* @__PURE__ */ jsx("span", { className: "text-center", children: "Primary code" }),
|
|
12420
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Actions" })
|
|
12421
|
+
]
|
|
12422
|
+
}
|
|
12423
|
+
),
|
|
12424
|
+
coding.length > 0 && /* @__PURE__ */ jsx(
|
|
12425
|
+
RadioGroup,
|
|
12426
|
+
{
|
|
12427
|
+
name: "primary-coding",
|
|
12428
|
+
label: "Primary display code",
|
|
12429
|
+
value: String(
|
|
12430
|
+
Math.max(
|
|
12431
|
+
0,
|
|
12432
|
+
coding.findIndex((entry) => entry.primary)
|
|
12433
|
+
)
|
|
12407
12434
|
),
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12435
|
+
onValueChange: (value) => {
|
|
12436
|
+
const selectedIndex = Number(value);
|
|
12437
|
+
setCoding(
|
|
12438
|
+
(prev) => prev.map((entry, index) => ({
|
|
12439
|
+
...entry,
|
|
12440
|
+
primary: index === selectedIndex
|
|
12441
|
+
}))
|
|
12442
|
+
);
|
|
12443
|
+
},
|
|
12444
|
+
size: "sm",
|
|
12445
|
+
className: "gap-2 [&_[data-slot=radio-group-items]]:gap-2 sm:[&_[data-slot=radio-group-legend]]:sr-only",
|
|
12446
|
+
children: coding.map((c, i) => /* @__PURE__ */ jsxs(
|
|
12447
|
+
"div",
|
|
12448
|
+
{
|
|
12449
|
+
"data-slot": "condition-coding-row",
|
|
12450
|
+
className: "border-border/70 grid grid-cols-1 gap-2 rounded-md border p-2 sm:grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] sm:items-center sm:border-0 sm:p-0",
|
|
12451
|
+
children: [
|
|
12452
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
12453
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "System" }),
|
|
12454
|
+
/* @__PURE__ */ jsx(
|
|
12455
|
+
Select,
|
|
12456
|
+
{
|
|
12457
|
+
"aria-label": `Coding system ${i + 1}`,
|
|
12458
|
+
options: CODING_SYSTEMS.map((s) => ({
|
|
12459
|
+
value: s,
|
|
12460
|
+
label: s
|
|
12461
|
+
})),
|
|
12462
|
+
value: c.system,
|
|
12463
|
+
onValueChange: (v) => updateCoding(i, { system: v }),
|
|
12464
|
+
disabled: codingUnknown
|
|
12465
|
+
}
|
|
12466
|
+
)
|
|
12467
|
+
] }),
|
|
12468
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
12469
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Code" }),
|
|
12470
|
+
/* @__PURE__ */ jsx(
|
|
12471
|
+
Input,
|
|
12472
|
+
{
|
|
12473
|
+
"aria-label": `Code ${i + 1}`,
|
|
12474
|
+
value: c.code,
|
|
12475
|
+
onChange: (e) => updateCoding(i, { code: e.target.value }),
|
|
12476
|
+
placeholder: "Code",
|
|
12477
|
+
disabled: codingUnknown,
|
|
12478
|
+
className: "font-mono"
|
|
12479
|
+
}
|
|
12480
|
+
)
|
|
12481
|
+
] }),
|
|
12482
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
12483
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Display" }),
|
|
12484
|
+
/* @__PURE__ */ jsx(
|
|
12485
|
+
Input,
|
|
12486
|
+
{
|
|
12487
|
+
"aria-label": `Display ${i + 1}`,
|
|
12488
|
+
value: c.display ?? "",
|
|
12489
|
+
onChange: (e) => updateCoding(i, { display: e.target.value }),
|
|
12490
|
+
placeholder: "Display",
|
|
12491
|
+
disabled: codingUnknown
|
|
12492
|
+
}
|
|
12493
|
+
)
|
|
12494
|
+
] }),
|
|
12495
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-center gap-1.5 text-xs sm:justify-center", children: [
|
|
12496
|
+
/* @__PURE__ */ jsx(
|
|
12497
|
+
Radio,
|
|
12498
|
+
{
|
|
12499
|
+
value: String(i),
|
|
12500
|
+
"aria-label": `Primary code: ${c.system} ${c.code || `row ${i + 1}`}`,
|
|
12501
|
+
disabled: codingUnknown
|
|
12502
|
+
}
|
|
12503
|
+
),
|
|
12504
|
+
/* @__PURE__ */ jsx("span", { className: "sm:sr-only", children: "Primary code" })
|
|
12505
|
+
] }),
|
|
12506
|
+
/* @__PURE__ */ jsx(
|
|
12507
|
+
Button,
|
|
12508
|
+
{
|
|
12509
|
+
variant: "ghost",
|
|
12510
|
+
size: "icon",
|
|
12511
|
+
"aria-label": `Remove code ${i + 1}`,
|
|
12512
|
+
disabled: codingUnknown,
|
|
12513
|
+
onClick: () => setCoding(
|
|
12514
|
+
(prev) => withSinglePrimary(
|
|
12515
|
+
prev.filter((_, index) => index !== i)
|
|
12516
|
+
)
|
|
12517
|
+
),
|
|
12518
|
+
className: "h-10 w-10 justify-self-start sm:justify-self-center",
|
|
12519
|
+
children: /* @__PURE__ */ jsx(Trash2, { size: 14 })
|
|
12520
|
+
}
|
|
12521
|
+
)
|
|
12522
|
+
]
|
|
12523
|
+
},
|
|
12524
|
+
i
|
|
12525
|
+
))
|
|
12526
|
+
}
|
|
12527
|
+
)
|
|
12422
12528
|
] }),
|
|
12423
12529
|
/* @__PURE__ */ jsx(
|
|
12424
12530
|
Select,
|
|
@@ -12429,9 +12535,39 @@ function ConditionEditor({
|
|
|
12429
12535
|
onValueChange: (v) => setVerification(v)
|
|
12430
12536
|
}
|
|
12431
12537
|
),
|
|
12432
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
12433
|
-
/* @__PURE__ */ jsxs("
|
|
12434
|
-
"Severity",
|
|
12538
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-x-4 gap-y-2", children: [
|
|
12539
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
12540
|
+
/* @__PURE__ */ jsx("span", { className: "block text-sm font-medium", children: "Severity" }),
|
|
12541
|
+
/* @__PURE__ */ jsx(
|
|
12542
|
+
"div",
|
|
12543
|
+
{
|
|
12544
|
+
role: "group",
|
|
12545
|
+
"aria-label": "Severity",
|
|
12546
|
+
className: "border-border inline-flex items-center overflow-hidden rounded-md border",
|
|
12547
|
+
children: SEVERITIES.map((s) => {
|
|
12548
|
+
const active = severity === s;
|
|
12549
|
+
return /* @__PURE__ */ jsx(
|
|
12550
|
+
"button",
|
|
12551
|
+
{
|
|
12552
|
+
type: "button",
|
|
12553
|
+
"aria-pressed": active,
|
|
12554
|
+
disabled: fields.severity?.known === false,
|
|
12555
|
+
onClick: () => setSeverity(active ? void 0 : s),
|
|
12556
|
+
className: cn(
|
|
12557
|
+
"border-border border-s px-2.5 py-1 text-xs font-medium capitalize transition-colors first:border-s-0",
|
|
12558
|
+
"disabled:opacity-40",
|
|
12559
|
+
active ? "bg-primary-600 text-white" : "bg-background text-muted-foreground hover:text-foreground"
|
|
12560
|
+
),
|
|
12561
|
+
children: s
|
|
12562
|
+
},
|
|
12563
|
+
s
|
|
12564
|
+
);
|
|
12565
|
+
})
|
|
12566
|
+
}
|
|
12567
|
+
)
|
|
12568
|
+
] }),
|
|
12569
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
12570
|
+
/* @__PURE__ */ jsx("span", { className: "block text-sm font-medium", children: "Certainty" }),
|
|
12435
12571
|
/* @__PURE__ */ jsx(
|
|
12436
12572
|
FieldFlag,
|
|
12437
12573
|
{
|
|
@@ -12441,34 +12577,7 @@ function ConditionEditor({
|
|
|
12441
12577
|
hasValue: Boolean(severity)
|
|
12442
12578
|
}
|
|
12443
12579
|
)
|
|
12444
|
-
] })
|
|
12445
|
-
/* @__PURE__ */ jsx(
|
|
12446
|
-
"div",
|
|
12447
|
-
{
|
|
12448
|
-
role: "group",
|
|
12449
|
-
"aria-label": "Severity",
|
|
12450
|
-
className: "border-border inline-flex items-center overflow-hidden rounded-md border",
|
|
12451
|
-
children: SEVERITIES.map((s) => {
|
|
12452
|
-
const active = severity === s;
|
|
12453
|
-
return /* @__PURE__ */ jsx(
|
|
12454
|
-
"button",
|
|
12455
|
-
{
|
|
12456
|
-
type: "button",
|
|
12457
|
-
"aria-pressed": active,
|
|
12458
|
-
disabled: fields.severity?.known === false,
|
|
12459
|
-
onClick: () => setSeverity(active ? void 0 : s),
|
|
12460
|
-
className: cn(
|
|
12461
|
-
"border-border border-s px-2.5 py-1 text-xs font-medium capitalize transition-colors first:border-s-0",
|
|
12462
|
-
"disabled:opacity-40",
|
|
12463
|
-
active ? "bg-primary-600 text-white" : "bg-background text-muted-foreground hover:text-foreground"
|
|
12464
|
-
),
|
|
12465
|
-
children: s
|
|
12466
|
-
},
|
|
12467
|
-
s
|
|
12468
|
-
);
|
|
12469
|
-
})
|
|
12470
|
-
}
|
|
12471
|
-
)
|
|
12580
|
+
] })
|
|
12472
12581
|
] }),
|
|
12473
12582
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
12474
12583
|
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
@@ -12483,28 +12592,33 @@ function ConditionEditor({
|
|
|
12483
12592
|
}
|
|
12484
12593
|
)
|
|
12485
12594
|
] }),
|
|
12486
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
12595
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-end gap-2 sm:grid-cols-[minmax(10rem,0.8fr)_auto_minmax(14rem,1.2fr)]", children: [
|
|
12487
12596
|
/* @__PURE__ */ jsx(
|
|
12488
|
-
|
|
12597
|
+
DateInput,
|
|
12489
12598
|
{
|
|
12490
|
-
type: "date",
|
|
12491
12599
|
"aria-label": "Onset date (exact)",
|
|
12492
12600
|
value: onsetDate,
|
|
12493
|
-
onChange: (
|
|
12601
|
+
onChange: (value) => {
|
|
12602
|
+
setOnsetDate(value);
|
|
12603
|
+
if (value) setOnsetFuzzy("");
|
|
12604
|
+
},
|
|
12494
12605
|
disabled: fields.onset?.known === false,
|
|
12495
|
-
|
|
12606
|
+
validateOnBlur: true,
|
|
12607
|
+
width: "full"
|
|
12496
12608
|
}
|
|
12497
12609
|
),
|
|
12498
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: "or" }),
|
|
12610
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground pb-3 text-center text-xs", children: "or" }),
|
|
12499
12611
|
/* @__PURE__ */ jsx(
|
|
12500
12612
|
Input,
|
|
12501
12613
|
{
|
|
12502
12614
|
"aria-label": "Onset (fuzzy)",
|
|
12503
12615
|
value: onsetFuzzy,
|
|
12504
|
-
onChange: (e) =>
|
|
12616
|
+
onChange: (e) => {
|
|
12617
|
+
setOnsetFuzzy(e.target.value);
|
|
12618
|
+
if (e.target.value) setOnsetDate("");
|
|
12619
|
+
},
|
|
12505
12620
|
disabled: fields.onset?.known === false,
|
|
12506
|
-
placeholder: 'Fuzzy \u2014 "since her twenties", "~3 months ago"'
|
|
12507
|
-
className: "min-w-48 flex-1"
|
|
12621
|
+
placeholder: 'Fuzzy \u2014 "since her twenties", "~3 months ago"'
|
|
12508
12622
|
}
|
|
12509
12623
|
)
|
|
12510
12624
|
] })
|
|
@@ -12525,7 +12639,7 @@ function ConditionEditor({
|
|
|
12525
12639
|
"Uncertainty recorded:",
|
|
12526
12640
|
" ",
|
|
12527
12641
|
Object.entries(fields).map(
|
|
12528
|
-
([k, f]) => f?.known === false ? `${k} unknown` : `${
|
|
12642
|
+
([k, f]) => f?.known === false ? `${k} unknown` : `${f?.confidence ?? "unspecified"} confidence in ${k}`
|
|
12529
12643
|
).join(", ")
|
|
12530
12644
|
] })
|
|
12531
12645
|
] })
|
|
@@ -12583,17 +12697,17 @@ function CheckrIntegration({
|
|
|
12583
12697
|
viewDetails = "View Details",
|
|
12584
12698
|
noReportsSelected = "No reports selected"
|
|
12585
12699
|
} = labels;
|
|
12586
|
-
const [showInviteModal, setShowInviteModal] =
|
|
12587
|
-
const [candidateName, setCandidateName] =
|
|
12588
|
-
const [candidateEmail, setCandidateEmail] =
|
|
12589
|
-
const [candidatePhone, setCandidatePhone] =
|
|
12590
|
-
const [selectedPackage, setSelectedPackage] =
|
|
12700
|
+
const [showInviteModal, setShowInviteModal] = React13.useState(false);
|
|
12701
|
+
const [candidateName, setCandidateName] = React13.useState("");
|
|
12702
|
+
const [candidateEmail, setCandidateEmail] = React13.useState("");
|
|
12703
|
+
const [candidatePhone, setCandidatePhone] = React13.useState("");
|
|
12704
|
+
const [selectedPackage, setSelectedPackage] = React13.useState(
|
|
12591
12705
|
packages[0]?.id || ""
|
|
12592
12706
|
);
|
|
12593
|
-
const [selectedReports, setSelectedReports] =
|
|
12707
|
+
const [selectedReports, setSelectedReports] = React13.useState(
|
|
12594
12708
|
/* @__PURE__ */ new Set()
|
|
12595
12709
|
);
|
|
12596
|
-
|
|
12710
|
+
React13.useEffect(() => {
|
|
12597
12711
|
setSelectedReports((prev) => prev.size > 0 ? /* @__PURE__ */ new Set() : prev);
|
|
12598
12712
|
}, [reports, connected]);
|
|
12599
12713
|
const statusLabels = {
|
|
@@ -12627,7 +12741,7 @@ function CheckrIntegration({
|
|
|
12627
12741
|
failed: "bg-destructive",
|
|
12628
12742
|
expired: "bg-muted-foreground"
|
|
12629
12743
|
};
|
|
12630
|
-
const statusCounts =
|
|
12744
|
+
const statusCounts = React13.useMemo(() => {
|
|
12631
12745
|
const counts = {
|
|
12632
12746
|
pending: 0,
|
|
12633
12747
|
running: 0,
|
|
@@ -13166,7 +13280,7 @@ function CommandPaletteProvider({
|
|
|
13166
13280
|
}
|
|
13167
13281
|
}, [isOpen, open, close]);
|
|
13168
13282
|
useCommandK(toggle, enableShortcut);
|
|
13169
|
-
|
|
13283
|
+
React13__default.useEffect(() => {
|
|
13170
13284
|
if (!customEventName) return;
|
|
13171
13285
|
const handler = () => open();
|
|
13172
13286
|
document.addEventListener(customEventName, handler);
|
|
@@ -14078,11 +14192,11 @@ function formatRetryTime(time) {
|
|
|
14078
14192
|
}
|
|
14079
14193
|
function useConnectionStatus(options = {}) {
|
|
14080
14194
|
const { onDisconnect, onReconnect } = options;
|
|
14081
|
-
const [isOnline, setIsOnline] =
|
|
14195
|
+
const [isOnline, setIsOnline] = React13.useState(() => {
|
|
14082
14196
|
if (typeof window === "undefined") return true;
|
|
14083
14197
|
return navigator.onLine;
|
|
14084
14198
|
});
|
|
14085
|
-
|
|
14199
|
+
React13.useEffect(() => {
|
|
14086
14200
|
const handleOnline = () => {
|
|
14087
14201
|
setIsOnline(true);
|
|
14088
14202
|
onReconnect?.();
|
|
@@ -14201,12 +14315,12 @@ function RowActionMenu({
|
|
|
14201
14315
|
item,
|
|
14202
14316
|
actions
|
|
14203
14317
|
}) {
|
|
14204
|
-
const [open, setOpen] =
|
|
14205
|
-
const menuRef =
|
|
14206
|
-
const buttonRef =
|
|
14207
|
-
const outsideRefs =
|
|
14318
|
+
const [open, setOpen] = React13.useState(false);
|
|
14319
|
+
const menuRef = React13.useRef(null);
|
|
14320
|
+
const buttonRef = React13.useRef(null);
|
|
14321
|
+
const outsideRefs = React13.useMemo(() => [menuRef, buttonRef], []);
|
|
14208
14322
|
useClickOutside(outsideRefs, () => setOpen(false), open);
|
|
14209
|
-
|
|
14323
|
+
React13.useEffect(() => {
|
|
14210
14324
|
if (!open) return;
|
|
14211
14325
|
function handleKey(e) {
|
|
14212
14326
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -14214,8 +14328,8 @@ function RowActionMenu({
|
|
|
14214
14328
|
document.addEventListener("keydown", handleKey);
|
|
14215
14329
|
return () => document.removeEventListener("keydown", handleKey);
|
|
14216
14330
|
}, [open]);
|
|
14217
|
-
const [menuPos, setMenuPos] =
|
|
14218
|
-
|
|
14331
|
+
const [menuPos, setMenuPos] = React13.useState(null);
|
|
14332
|
+
React13.useLayoutEffect(() => {
|
|
14219
14333
|
if (!open || !buttonRef.current) return;
|
|
14220
14334
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
14221
14335
|
setMenuPos({
|
|
@@ -14402,8 +14516,8 @@ function buildDefaultActions(onView, onEdit, onDelete) {
|
|
|
14402
14516
|
function ViewModalActions({
|
|
14403
14517
|
viewTarget
|
|
14404
14518
|
}) {
|
|
14405
|
-
const [shareOpen, setShareOpen] =
|
|
14406
|
-
const shareRef =
|
|
14519
|
+
const [shareOpen, setShareOpen] = React13.useState(false);
|
|
14520
|
+
const shareRef = React13.useRef(null);
|
|
14407
14521
|
const {
|
|
14408
14522
|
anchorRef: shareAnchorRef,
|
|
14409
14523
|
floatingRef: shareFloatingRef,
|
|
@@ -14411,7 +14525,7 @@ function ViewModalActions({
|
|
|
14411
14525
|
} = useAnchoredPosition({
|
|
14412
14526
|
open: shareOpen
|
|
14413
14527
|
});
|
|
14414
|
-
const shareOutsideRefs =
|
|
14528
|
+
const shareOutsideRefs = React13.useMemo(
|
|
14415
14529
|
() => [shareRef, shareFloatingRef],
|
|
14416
14530
|
[shareFloatingRef]
|
|
14417
14531
|
);
|
|
@@ -14557,7 +14671,7 @@ function ViewModalActions({
|
|
|
14557
14671
|
)
|
|
14558
14672
|
] });
|
|
14559
14673
|
}
|
|
14560
|
-
var CountBadge =
|
|
14674
|
+
var CountBadge = React13.forwardRef(
|
|
14561
14675
|
({
|
|
14562
14676
|
className,
|
|
14563
14677
|
variant,
|
|
@@ -14574,19 +14688,19 @@ var CountBadge = React12.forwardRef(
|
|
|
14574
14688
|
showZero = false,
|
|
14575
14689
|
...props
|
|
14576
14690
|
}, ref) => {
|
|
14577
|
-
const [open, setOpen] =
|
|
14578
|
-
const containerRef =
|
|
14579
|
-
const [deleteTarget, setDeleteTarget] =
|
|
14580
|
-
const [editTarget, setEditTarget] =
|
|
14691
|
+
const [open, setOpen] = React13.useState(false);
|
|
14692
|
+
const containerRef = React13.useRef(null);
|
|
14693
|
+
const [deleteTarget, setDeleteTarget] = React13.useState(null);
|
|
14694
|
+
const [editTarget, setEditTarget] = React13.useState(
|
|
14581
14695
|
null
|
|
14582
14696
|
);
|
|
14583
|
-
const [editForm, setEditForm] =
|
|
14584
|
-
const [viewTarget, setViewTarget] =
|
|
14697
|
+
const [editForm, setEditForm] = React13.useState({});
|
|
14698
|
+
const [viewTarget, setViewTarget] = React13.useState(
|
|
14585
14699
|
null
|
|
14586
14700
|
);
|
|
14587
14701
|
const showMenu = items && items.length > 0;
|
|
14588
14702
|
const hidden = count === 0 && !showZero;
|
|
14589
|
-
|
|
14703
|
+
React13.useEffect(() => {
|
|
14590
14704
|
if (hidden) setOpen(false);
|
|
14591
14705
|
}, [hidden]);
|
|
14592
14706
|
const {
|
|
@@ -14598,12 +14712,12 @@ var CountBadge = React12.forwardRef(
|
|
|
14598
14712
|
placement: "bottom-end",
|
|
14599
14713
|
offset: 8
|
|
14600
14714
|
});
|
|
14601
|
-
const outsideRefs =
|
|
14715
|
+
const outsideRefs = React13.useMemo(
|
|
14602
14716
|
() => [containerRef, floatingRef],
|
|
14603
14717
|
[floatingRef]
|
|
14604
14718
|
);
|
|
14605
14719
|
useClickOutside(outsideRefs, () => setOpen(false), open);
|
|
14606
|
-
|
|
14720
|
+
React13.useEffect(() => {
|
|
14607
14721
|
if (!open) return;
|
|
14608
14722
|
const handleEscape = (e) => {
|
|
14609
14723
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -14611,13 +14725,13 @@ var CountBadge = React12.forwardRef(
|
|
|
14611
14725
|
document.addEventListener("keydown", handleEscape);
|
|
14612
14726
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
14613
14727
|
}, [open]);
|
|
14614
|
-
const handleDeleteRequest =
|
|
14728
|
+
const handleDeleteRequest = React13.useCallback((item) => {
|
|
14615
14729
|
setDeleteTarget(item);
|
|
14616
14730
|
}, []);
|
|
14617
|
-
const handleViewRequest =
|
|
14731
|
+
const handleViewRequest = React13.useCallback((item) => {
|
|
14618
14732
|
setViewTarget(item);
|
|
14619
14733
|
}, []);
|
|
14620
|
-
const handleEditRequest =
|
|
14734
|
+
const handleEditRequest = React13.useCallback((item) => {
|
|
14621
14735
|
setEditTarget(item);
|
|
14622
14736
|
setEditForm({
|
|
14623
14737
|
label: item.label,
|
|
@@ -15076,7 +15190,7 @@ function CookieConsentBanner({
|
|
|
15076
15190
|
isMobileApp = false,
|
|
15077
15191
|
className
|
|
15078
15192
|
}) {
|
|
15079
|
-
const [isAnimating, setIsAnimating] =
|
|
15193
|
+
const [isAnimating, setIsAnimating] = React13.useState(false);
|
|
15080
15194
|
const handleAccept = () => {
|
|
15081
15195
|
setIsAnimating(true);
|
|
15082
15196
|
setTimeout(() => {
|
|
@@ -15135,7 +15249,7 @@ function CookieConsentBanner({
|
|
|
15135
15249
|
appName,
|
|
15136
15250
|
" you are agreeing to our",
|
|
15137
15251
|
" ",
|
|
15138
|
-
legalLinks.map((link, index) => /* @__PURE__ */ jsxs(
|
|
15252
|
+
legalLinks.map((link, index) => /* @__PURE__ */ jsxs(React13.Fragment, { children: [
|
|
15139
15253
|
index > 0 && (index === legalLinks.length - 1 ? " and " : ", "),
|
|
15140
15254
|
/* @__PURE__ */ jsx(
|
|
15141
15255
|
"a",
|
|
@@ -15259,20 +15373,20 @@ function CompactCookieBanner({
|
|
|
15259
15373
|
var COOKIE_CONSENT_KEY = "cookie-consent-accepted";
|
|
15260
15374
|
function useCookieConsent(options = {}) {
|
|
15261
15375
|
const { storageKey = COOKIE_CONSENT_KEY, onConsent } = options;
|
|
15262
|
-
const [hasConsented, setHasConsented] =
|
|
15376
|
+
const [hasConsented, setHasConsented] = React13.useState(() => {
|
|
15263
15377
|
if (typeof window === "undefined") return false;
|
|
15264
15378
|
return localStorage.getItem(storageKey) === "true";
|
|
15265
15379
|
});
|
|
15266
|
-
const acceptCookies =
|
|
15380
|
+
const acceptCookies = React13.useCallback(() => {
|
|
15267
15381
|
localStorage.setItem(storageKey, "true");
|
|
15268
15382
|
setHasConsented(true);
|
|
15269
15383
|
onConsent?.();
|
|
15270
15384
|
}, [storageKey, onConsent]);
|
|
15271
|
-
const declineCookies =
|
|
15385
|
+
const declineCookies = React13.useCallback(() => {
|
|
15272
15386
|
localStorage.setItem(storageKey, "declined");
|
|
15273
15387
|
setHasConsented(true);
|
|
15274
15388
|
}, [storageKey]);
|
|
15275
|
-
const resetConsent =
|
|
15389
|
+
const resetConsent = React13.useCallback(() => {
|
|
15276
15390
|
localStorage.removeItem(storageKey);
|
|
15277
15391
|
setHasConsented(false);
|
|
15278
15392
|
}, [storageKey]);
|
|
@@ -15659,9 +15773,9 @@ function CSVFileUpload({
|
|
|
15659
15773
|
selectFile = "Select a file to upload or drag and drop",
|
|
15660
15774
|
selectButton = "Select File to Upload"
|
|
15661
15775
|
} = labels;
|
|
15662
|
-
const inputRef =
|
|
15663
|
-
const [isDragging, setIsDragging] =
|
|
15664
|
-
const handleDrop =
|
|
15776
|
+
const inputRef = React13.useRef(null);
|
|
15777
|
+
const [isDragging, setIsDragging] = React13.useState(false);
|
|
15778
|
+
const handleDrop = React13.useCallback(
|
|
15665
15779
|
(e) => {
|
|
15666
15780
|
e.preventDefault();
|
|
15667
15781
|
setIsDragging(false);
|
|
@@ -15672,14 +15786,14 @@ function CSVFileUpload({
|
|
|
15672
15786
|
},
|
|
15673
15787
|
[onFileSelect]
|
|
15674
15788
|
);
|
|
15675
|
-
const handleDragOver =
|
|
15789
|
+
const handleDragOver = React13.useCallback((e) => {
|
|
15676
15790
|
e.preventDefault();
|
|
15677
15791
|
setIsDragging(true);
|
|
15678
15792
|
}, []);
|
|
15679
|
-
const handleDragLeave =
|
|
15793
|
+
const handleDragLeave = React13.useCallback(() => {
|
|
15680
15794
|
setIsDragging(false);
|
|
15681
15795
|
}, []);
|
|
15682
|
-
const handleFileChange =
|
|
15796
|
+
const handleFileChange = React13.useCallback(
|
|
15683
15797
|
(e) => {
|
|
15684
15798
|
const file = e.target.files?.[0];
|
|
15685
15799
|
if (file) {
|
|
@@ -15744,7 +15858,7 @@ var widgetVariants = cva("", {
|
|
|
15744
15858
|
size: "md"
|
|
15745
15859
|
}
|
|
15746
15860
|
});
|
|
15747
|
-
var DashboardWidget =
|
|
15861
|
+
var DashboardWidget = React13.forwardRef(
|
|
15748
15862
|
({
|
|
15749
15863
|
className,
|
|
15750
15864
|
size,
|
|
@@ -15839,7 +15953,7 @@ var DashboardWidget = React12.forwardRef(
|
|
|
15839
15953
|
}
|
|
15840
15954
|
);
|
|
15841
15955
|
DashboardWidget.displayName = "DashboardWidget";
|
|
15842
|
-
var DashboardWidgetInfo =
|
|
15956
|
+
var DashboardWidgetInfo = React13.forwardRef(({ className, items, columns = 2, layout = "stacked", ...props }, ref) => {
|
|
15843
15957
|
const gridCols = {
|
|
15844
15958
|
1: "grid-cols-1",
|
|
15845
15959
|
2: "grid-cols-2",
|
|
@@ -15973,10 +16087,10 @@ function WidgetRowActionMenu({
|
|
|
15973
16087
|
rowIndex,
|
|
15974
16088
|
actions
|
|
15975
16089
|
}) {
|
|
15976
|
-
const [open, setOpen] =
|
|
15977
|
-
const menuRef =
|
|
15978
|
-
const buttonRef =
|
|
15979
|
-
|
|
16090
|
+
const [open, setOpen] = React13.useState(false);
|
|
16091
|
+
const menuRef = React13.useRef(null);
|
|
16092
|
+
const buttonRef = React13.useRef(null);
|
|
16093
|
+
React13.useEffect(() => {
|
|
15980
16094
|
if (!open) return;
|
|
15981
16095
|
function handleClick(e) {
|
|
15982
16096
|
if (menuRef.current && !menuRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
|
|
@@ -15986,7 +16100,7 @@ function WidgetRowActionMenu({
|
|
|
15986
16100
|
document.addEventListener("mousedown", handleClick);
|
|
15987
16101
|
return () => document.removeEventListener("mousedown", handleClick);
|
|
15988
16102
|
}, [open]);
|
|
15989
|
-
|
|
16103
|
+
React13.useEffect(() => {
|
|
15990
16104
|
if (!open) return;
|
|
15991
16105
|
function handleKey(e) {
|
|
15992
16106
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -15994,8 +16108,8 @@ function WidgetRowActionMenu({
|
|
|
15994
16108
|
document.addEventListener("keydown", handleKey);
|
|
15995
16109
|
return () => document.removeEventListener("keydown", handleKey);
|
|
15996
16110
|
}, [open]);
|
|
15997
|
-
const [menuPos, setMenuPos] =
|
|
15998
|
-
|
|
16111
|
+
const [menuPos, setMenuPos] = React13.useState(null);
|
|
16112
|
+
React13.useLayoutEffect(() => {
|
|
15999
16113
|
if (!open || !buttonRef.current) return;
|
|
16000
16114
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
16001
16115
|
setMenuPos({
|
|
@@ -16076,7 +16190,7 @@ function WidgetRowActionMenu({
|
|
|
16076
16190
|
)
|
|
16077
16191
|
] });
|
|
16078
16192
|
}
|
|
16079
|
-
var DashboardWidgetTable =
|
|
16193
|
+
var DashboardWidgetTable = React13.forwardRef(DashboardWidgetTableInner);
|
|
16080
16194
|
var actionColorMap = {
|
|
16081
16195
|
primary: "bg-primary-100 text-primary-900 dark:bg-primary-900/40 dark:text-primary-300",
|
|
16082
16196
|
green: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300",
|
|
@@ -16087,7 +16201,7 @@ var actionColorMap = {
|
|
|
16087
16201
|
amber: "bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",
|
|
16088
16202
|
neutral: "bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300"
|
|
16089
16203
|
};
|
|
16090
|
-
var DashboardWidgetActions =
|
|
16204
|
+
var DashboardWidgetActions = React13.forwardRef(({ className, actions, columns = 2, ...props }, ref) => {
|
|
16091
16205
|
const gridCols = {
|
|
16092
16206
|
1: "grid-cols-1",
|
|
16093
16207
|
2: "grid-cols-2",
|
|
@@ -16140,7 +16254,7 @@ var DashboardWidgetActions = React12.forwardRef(({ className, actions, columns =
|
|
|
16140
16254
|
);
|
|
16141
16255
|
});
|
|
16142
16256
|
DashboardWidgetActions.displayName = "DashboardWidgetActions";
|
|
16143
|
-
var DashboardWidgetDataCards =
|
|
16257
|
+
var DashboardWidgetDataCards = React13.forwardRef(({ className, items, columns = 2, footer, ...props }, ref) => {
|
|
16144
16258
|
const gridCols = {
|
|
16145
16259
|
2: "grid-cols-2",
|
|
16146
16260
|
3: "grid-cols-3",
|
|
@@ -16342,24 +16456,24 @@ function DateRangePicker({
|
|
|
16342
16456
|
labels = {}
|
|
16343
16457
|
}) {
|
|
16344
16458
|
const finalPresets = presets || getDefaultPresets(labels);
|
|
16345
|
-
const [isCalendarOpen, setIsCalendarOpen] =
|
|
16346
|
-
const [leftMonth, setLeftMonth] =
|
|
16459
|
+
const [isCalendarOpen, setIsCalendarOpen] = React13.useState(false);
|
|
16460
|
+
const [leftMonth, setLeftMonth] = React13.useState(
|
|
16347
16461
|
() => value?.start?.getMonth() ?? (/* @__PURE__ */ new Date()).getMonth()
|
|
16348
16462
|
);
|
|
16349
|
-
const [leftYear, setLeftYear] =
|
|
16463
|
+
const [leftYear, setLeftYear] = React13.useState(
|
|
16350
16464
|
() => value?.start?.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()
|
|
16351
16465
|
);
|
|
16352
|
-
const [rangeStart, setRangeStart] =
|
|
16466
|
+
const [rangeStart, setRangeStart] = React13.useState(
|
|
16353
16467
|
value?.start ?? null
|
|
16354
16468
|
);
|
|
16355
|
-
const [rangeEnd, setRangeEnd] =
|
|
16469
|
+
const [rangeEnd, setRangeEnd] = React13.useState(
|
|
16356
16470
|
value?.end ?? null
|
|
16357
16471
|
);
|
|
16358
|
-
const [selectingEnd, setSelectingEnd] =
|
|
16359
|
-
const [hoverDate, setHoverDate] =
|
|
16360
|
-
const calendarRef =
|
|
16361
|
-
const triggerRef =
|
|
16362
|
-
const [resolvedAlign, setResolvedAlign] =
|
|
16472
|
+
const [selectingEnd, setSelectingEnd] = React13.useState(false);
|
|
16473
|
+
const [hoverDate, setHoverDate] = React13.useState(null);
|
|
16474
|
+
const calendarRef = React13.useRef(null);
|
|
16475
|
+
const triggerRef = React13.useRef(null);
|
|
16476
|
+
const [resolvedAlign, setResolvedAlign] = React13.useState(
|
|
16363
16477
|
align === "end" ? "end" : "start"
|
|
16364
16478
|
);
|
|
16365
16479
|
const isMobileVariant = variant === "mobile";
|
|
@@ -16369,7 +16483,7 @@ function DateRangePicker({
|
|
|
16369
16483
|
);
|
|
16370
16484
|
const rightMonth = leftMonth === 11 ? 0 : leftMonth + 1;
|
|
16371
16485
|
const rightYear = leftMonth === 11 ? leftYear + 1 : leftYear;
|
|
16372
|
-
|
|
16486
|
+
React13.useEffect(() => {
|
|
16373
16487
|
if (!value) {
|
|
16374
16488
|
setRangeStart(null);
|
|
16375
16489
|
setRangeEnd(null);
|
|
@@ -16378,8 +16492,8 @@ function DateRangePicker({
|
|
|
16378
16492
|
setRangeStart(value.start ?? null);
|
|
16379
16493
|
setRangeEnd(value.end ?? null);
|
|
16380
16494
|
}, [value]);
|
|
16381
|
-
const wrapperRef =
|
|
16382
|
-
const outsideRefs =
|
|
16495
|
+
const wrapperRef = React13.useRef(null);
|
|
16496
|
+
const outsideRefs = React13.useMemo(
|
|
16383
16497
|
() => [wrapperRef, calendarRef],
|
|
16384
16498
|
[calendarRef]
|
|
16385
16499
|
);
|
|
@@ -16400,7 +16514,7 @@ function DateRangePicker({
|
|
|
16400
16514
|
setSelectingEnd(false);
|
|
16401
16515
|
triggerRef.current?.focus();
|
|
16402
16516
|
}, isCalendarOpen);
|
|
16403
|
-
|
|
16517
|
+
React13.useEffect(() => {
|
|
16404
16518
|
if (isStorybookDocsMode()) return;
|
|
16405
16519
|
if (isMobileVariant && isCalendarOpen) {
|
|
16406
16520
|
const prev = document.body.style.overflow;
|
|
@@ -16410,7 +16524,7 @@ function DateRangePicker({
|
|
|
16410
16524
|
};
|
|
16411
16525
|
}
|
|
16412
16526
|
}, [isMobileVariant, isCalendarOpen]);
|
|
16413
|
-
|
|
16527
|
+
React13.useLayoutEffect(() => {
|
|
16414
16528
|
if (isMobileVariant || !isCalendarOpen) return;
|
|
16415
16529
|
if (align === "start" || align === "end") {
|
|
16416
16530
|
setResolvedAlign(align);
|
|
@@ -16515,7 +16629,7 @@ function DateRangePicker({
|
|
|
16515
16629
|
return isSameDay(date, today);
|
|
16516
16630
|
};
|
|
16517
16631
|
const displayValue = value ? formatDateRange(value) : "";
|
|
16518
|
-
const monthNames =
|
|
16632
|
+
const monthNames = React13.useMemo(
|
|
16519
16633
|
() => Array.from(
|
|
16520
16634
|
{ length: 12 },
|
|
16521
16635
|
(_, i) => new Intl.DateTimeFormat(void 0, { month: "long" }).format(
|
|
@@ -16524,7 +16638,7 @@ function DateRangePicker({
|
|
|
16524
16638
|
),
|
|
16525
16639
|
[]
|
|
16526
16640
|
);
|
|
16527
|
-
const weekdayNames =
|
|
16641
|
+
const weekdayNames = React13.useMemo(
|
|
16528
16642
|
() => Array.from(
|
|
16529
16643
|
{ length: 7 },
|
|
16530
16644
|
(_, i) => new Intl.DateTimeFormat(void 0, { weekday: "short" }).format(
|
|
@@ -16962,11 +17076,11 @@ function DropZone({
|
|
|
16962
17076
|
className,
|
|
16963
17077
|
children
|
|
16964
17078
|
}) {
|
|
16965
|
-
const [isDragging, setIsDragging] =
|
|
16966
|
-
const inputRef =
|
|
16967
|
-
const dropZoneRef =
|
|
16968
|
-
const dragCounter =
|
|
16969
|
-
const handleDragEnter =
|
|
17079
|
+
const [isDragging, setIsDragging] = React13.useState(false);
|
|
17080
|
+
const inputRef = React13.useRef(null);
|
|
17081
|
+
const dropZoneRef = React13.useRef(null);
|
|
17082
|
+
const dragCounter = React13.useRef(0);
|
|
17083
|
+
const handleDragEnter = React13.useCallback(
|
|
16970
17084
|
(e) => {
|
|
16971
17085
|
e.preventDefault();
|
|
16972
17086
|
e.stopPropagation();
|
|
@@ -16978,7 +17092,7 @@ function DropZone({
|
|
|
16978
17092
|
},
|
|
16979
17093
|
[disabled]
|
|
16980
17094
|
);
|
|
16981
|
-
const handleDragLeave =
|
|
17095
|
+
const handleDragLeave = React13.useCallback(
|
|
16982
17096
|
(e) => {
|
|
16983
17097
|
e.preventDefault();
|
|
16984
17098
|
e.stopPropagation();
|
|
@@ -16990,11 +17104,11 @@ function DropZone({
|
|
|
16990
17104
|
},
|
|
16991
17105
|
[disabled]
|
|
16992
17106
|
);
|
|
16993
|
-
const handleDragOver =
|
|
17107
|
+
const handleDragOver = React13.useCallback((e) => {
|
|
16994
17108
|
e.preventDefault();
|
|
16995
17109
|
e.stopPropagation();
|
|
16996
17110
|
}, []);
|
|
16997
|
-
const handleDrop =
|
|
17111
|
+
const handleDrop = React13.useCallback(
|
|
16998
17112
|
(e) => {
|
|
16999
17113
|
e.preventDefault();
|
|
17000
17114
|
e.stopPropagation();
|
|
@@ -17007,12 +17121,12 @@ function DropZone({
|
|
|
17007
17121
|
},
|
|
17008
17122
|
[disabled, onFilesSelected]
|
|
17009
17123
|
);
|
|
17010
|
-
const handleClick =
|
|
17124
|
+
const handleClick = React13.useCallback(() => {
|
|
17011
17125
|
if (!disabled) {
|
|
17012
17126
|
inputRef.current?.click();
|
|
17013
17127
|
}
|
|
17014
17128
|
}, [disabled]);
|
|
17015
|
-
const handleKeyDown =
|
|
17129
|
+
const handleKeyDown = React13.useCallback(
|
|
17016
17130
|
(e) => {
|
|
17017
17131
|
if ((e.key === "Enter" || e.key === " ") && !disabled) {
|
|
17018
17132
|
e.preventDefault();
|
|
@@ -17021,7 +17135,7 @@ function DropZone({
|
|
|
17021
17135
|
},
|
|
17022
17136
|
[disabled]
|
|
17023
17137
|
);
|
|
17024
|
-
const handleInputChange =
|
|
17138
|
+
const handleInputChange = React13.useCallback(
|
|
17025
17139
|
(e) => {
|
|
17026
17140
|
if (e.target.files && e.target.files.length > 0) {
|
|
17027
17141
|
onFilesSelected(e.target.files);
|
|
@@ -17112,7 +17226,7 @@ DropZone.displayName = "DropZone";
|
|
|
17112
17226
|
function FilePreviewItem({ file, onRemove, disabled }) {
|
|
17113
17227
|
const isPdf = file.file.type === "application/pdf";
|
|
17114
17228
|
const isImage = file.file.type.startsWith("image/");
|
|
17115
|
-
const handleRemove =
|
|
17229
|
+
const handleRemove = React13.useCallback(() => {
|
|
17116
17230
|
onRemove(file.id);
|
|
17117
17231
|
}, [file.id, onRemove]);
|
|
17118
17232
|
return /* @__PURE__ */ jsxs(
|
|
@@ -17258,24 +17372,24 @@ function useCamera({
|
|
|
17258
17372
|
width = 1920,
|
|
17259
17373
|
height = 1080
|
|
17260
17374
|
} = {}) {
|
|
17261
|
-
const [permission, setPermission] =
|
|
17262
|
-
const [stream, setStream] =
|
|
17263
|
-
const [isReady, setIsReady] =
|
|
17264
|
-
const [error, setError] =
|
|
17265
|
-
const [currentFacingMode, setCurrentFacingMode] =
|
|
17266
|
-
const videoRef =
|
|
17267
|
-
const canvasRef =
|
|
17268
|
-
|
|
17375
|
+
const [permission, setPermission] = React13.useState("prompt");
|
|
17376
|
+
const [stream, setStream] = React13.useState(null);
|
|
17377
|
+
const [isReady, setIsReady] = React13.useState(false);
|
|
17378
|
+
const [error, setError] = React13.useState(null);
|
|
17379
|
+
const [currentFacingMode, setCurrentFacingMode] = React13.useState(initialFacingMode);
|
|
17380
|
+
const videoRef = React13.useRef(null);
|
|
17381
|
+
const canvasRef = React13.useRef(null);
|
|
17382
|
+
React13.useEffect(() => {
|
|
17269
17383
|
checkCameraPermission().then(setPermission);
|
|
17270
17384
|
}, []);
|
|
17271
|
-
|
|
17385
|
+
React13.useEffect(() => {
|
|
17272
17386
|
return () => {
|
|
17273
17387
|
if (stream) {
|
|
17274
17388
|
stream.getTracks().forEach((track) => track.stop());
|
|
17275
17389
|
}
|
|
17276
17390
|
};
|
|
17277
17391
|
}, [stream]);
|
|
17278
|
-
const startCamera =
|
|
17392
|
+
const startCamera = React13.useCallback(async () => {
|
|
17279
17393
|
if (!hasCameraSupport()) {
|
|
17280
17394
|
setPermission("unavailable");
|
|
17281
17395
|
setError(new Error("Camera is not supported on this device"));
|
|
@@ -17309,7 +17423,7 @@ function useCamera({
|
|
|
17309
17423
|
}
|
|
17310
17424
|
}
|
|
17311
17425
|
}, [currentFacingMode, width, height]);
|
|
17312
|
-
const stopCamera =
|
|
17426
|
+
const stopCamera = React13.useCallback(() => {
|
|
17313
17427
|
if (stream) {
|
|
17314
17428
|
stream.getTracks().forEach((track) => track.stop());
|
|
17315
17429
|
setStream(null);
|
|
@@ -17319,8 +17433,8 @@ function useCamera({
|
|
|
17319
17433
|
videoRef.current.srcObject = null;
|
|
17320
17434
|
}
|
|
17321
17435
|
}, [stream]);
|
|
17322
|
-
const shouldRestartRef =
|
|
17323
|
-
const switchCamera =
|
|
17436
|
+
const shouldRestartRef = React13.useRef(false);
|
|
17437
|
+
const switchCamera = React13.useCallback(() => {
|
|
17324
17438
|
const newFacingMode = currentFacingMode === "user" ? "environment" : "user";
|
|
17325
17439
|
if (stream) {
|
|
17326
17440
|
stream.getTracks().forEach((track) => track.stop());
|
|
@@ -17333,13 +17447,13 @@ function useCamera({
|
|
|
17333
17447
|
}
|
|
17334
17448
|
setCurrentFacingMode(newFacingMode);
|
|
17335
17449
|
}, [currentFacingMode, stream]);
|
|
17336
|
-
|
|
17450
|
+
React13.useEffect(() => {
|
|
17337
17451
|
if (shouldRestartRef.current && !stream) {
|
|
17338
17452
|
shouldRestartRef.current = false;
|
|
17339
17453
|
startCamera();
|
|
17340
17454
|
}
|
|
17341
17455
|
}, [currentFacingMode, stream, startCamera]);
|
|
17342
|
-
const capturePhoto =
|
|
17456
|
+
const capturePhoto = React13.useCallback(() => {
|
|
17343
17457
|
if (!videoRef.current || !isReady) {
|
|
17344
17458
|
return null;
|
|
17345
17459
|
}
|
|
@@ -17886,14 +18000,14 @@ function WebcamModal({
|
|
|
17886
18000
|
width: 1920,
|
|
17887
18001
|
height: 1080
|
|
17888
18002
|
});
|
|
17889
|
-
const [capturedFile, setCapturedFile] =
|
|
17890
|
-
const [previewUrl, setPreviewUrl] =
|
|
17891
|
-
const [autoDetectEnabled, setAutoDetectEnabled] =
|
|
17892
|
-
const [videoDimensions, setVideoDimensions] =
|
|
18003
|
+
const [capturedFile, setCapturedFile] = React13.useState(null);
|
|
18004
|
+
const [previewUrl, setPreviewUrl] = React13.useState(null);
|
|
18005
|
+
const [autoDetectEnabled, setAutoDetectEnabled] = React13.useState(enableAutoCapture);
|
|
18006
|
+
const [videoDimensions, setVideoDimensions] = React13.useState({
|
|
17893
18007
|
width: 0,
|
|
17894
18008
|
height: 0
|
|
17895
18009
|
});
|
|
17896
|
-
const handleAutoCapture =
|
|
18010
|
+
const handleAutoCapture = React13.useCallback(() => {
|
|
17897
18011
|
const file = capturePhoto();
|
|
17898
18012
|
if (file) {
|
|
17899
18013
|
setCapturedFile(file);
|
|
@@ -17914,8 +18028,8 @@ function WebcamModal({
|
|
|
17914
18028
|
},
|
|
17915
18029
|
handleAutoCapture
|
|
17916
18030
|
);
|
|
17917
|
-
const hasStartedRef =
|
|
17918
|
-
|
|
18031
|
+
const hasStartedRef = React13.useRef(false);
|
|
18032
|
+
React13.useEffect(() => {
|
|
17919
18033
|
const video = videoRef.current;
|
|
17920
18034
|
if (video && isReady) {
|
|
17921
18035
|
const updateDimensions = () => {
|
|
@@ -17929,7 +18043,7 @@ function WebcamModal({
|
|
|
17929
18043
|
return () => video.removeEventListener("resize", updateDimensions);
|
|
17930
18044
|
}
|
|
17931
18045
|
}, [isReady, videoRef]);
|
|
17932
|
-
|
|
18046
|
+
React13.useEffect(() => {
|
|
17933
18047
|
if (open && permission !== "denied" && permission !== "unavailable") {
|
|
17934
18048
|
if (!hasStartedRef.current) {
|
|
17935
18049
|
hasStartedRef.current = true;
|
|
@@ -17948,7 +18062,7 @@ function WebcamModal({
|
|
|
17948
18062
|
});
|
|
17949
18063
|
}
|
|
17950
18064
|
}, [open, permission]);
|
|
17951
|
-
|
|
18065
|
+
React13.useEffect(() => {
|
|
17952
18066
|
if (isReady && autoDetectEnabled && !capturedFile) {
|
|
17953
18067
|
detection.startDetection();
|
|
17954
18068
|
}
|
|
@@ -17956,7 +18070,7 @@ function WebcamModal({
|
|
|
17956
18070
|
detection.stopDetection();
|
|
17957
18071
|
};
|
|
17958
18072
|
}, [isReady, autoDetectEnabled, capturedFile]);
|
|
17959
|
-
const handleCapture =
|
|
18073
|
+
const handleCapture = React13.useCallback(() => {
|
|
17960
18074
|
const file = capturePhoto();
|
|
17961
18075
|
if (file) {
|
|
17962
18076
|
setCapturedFile(file);
|
|
@@ -17964,7 +18078,7 @@ function WebcamModal({
|
|
|
17964
18078
|
stopCamera();
|
|
17965
18079
|
}
|
|
17966
18080
|
}, [capturePhoto, stopCamera]);
|
|
17967
|
-
const handleRetake =
|
|
18081
|
+
const handleRetake = React13.useCallback(() => {
|
|
17968
18082
|
if (previewUrl) {
|
|
17969
18083
|
URL.revokeObjectURL(previewUrl);
|
|
17970
18084
|
}
|
|
@@ -17973,13 +18087,13 @@ function WebcamModal({
|
|
|
17973
18087
|
detection.resetDetection();
|
|
17974
18088
|
startCamera();
|
|
17975
18089
|
}, [previewUrl, startCamera, detection]);
|
|
17976
|
-
const handleConfirm =
|
|
18090
|
+
const handleConfirm = React13.useCallback(() => {
|
|
17977
18091
|
if (capturedFile) {
|
|
17978
18092
|
onCapture(capturedFile);
|
|
17979
18093
|
onOpenChange(false);
|
|
17980
18094
|
}
|
|
17981
18095
|
}, [capturedFile, onCapture, onOpenChange]);
|
|
17982
|
-
const handleClose =
|
|
18096
|
+
const handleClose = React13.useCallback(() => {
|
|
17983
18097
|
stopCamera();
|
|
17984
18098
|
detection.stopDetection();
|
|
17985
18099
|
if (previewUrl) {
|
|
@@ -18131,13 +18245,13 @@ function useFileUpload({
|
|
|
18131
18245
|
multiple = false,
|
|
18132
18246
|
onValidationError
|
|
18133
18247
|
} = {}) {
|
|
18134
|
-
const [files, setFiles] =
|
|
18135
|
-
|
|
18248
|
+
const [files, setFiles] = React13.useState([]);
|
|
18249
|
+
React13.useEffect(() => {
|
|
18136
18250
|
return () => {
|
|
18137
18251
|
files.forEach((f) => URL.revokeObjectURL(f.previewUrl));
|
|
18138
18252
|
};
|
|
18139
18253
|
}, []);
|
|
18140
|
-
const addFiles =
|
|
18254
|
+
const addFiles = React13.useCallback(
|
|
18141
18255
|
(fileList, source = "upload") => {
|
|
18142
18256
|
const newFiles = [];
|
|
18143
18257
|
const errors = [];
|
|
@@ -18169,7 +18283,7 @@ function useFileUpload({
|
|
|
18169
18283
|
},
|
|
18170
18284
|
[acceptedFileTypes, maxFileSizeMb, multiple, onValidationError]
|
|
18171
18285
|
);
|
|
18172
|
-
const addFile =
|
|
18286
|
+
const addFile = React13.useCallback(
|
|
18173
18287
|
(file, source = "upload") => {
|
|
18174
18288
|
const dataTransfer = new DataTransfer();
|
|
18175
18289
|
dataTransfer.items.add(file);
|
|
@@ -18177,7 +18291,7 @@ function useFileUpload({
|
|
|
18177
18291
|
},
|
|
18178
18292
|
[addFiles]
|
|
18179
18293
|
);
|
|
18180
|
-
const removeFile =
|
|
18294
|
+
const removeFile = React13.useCallback((id) => {
|
|
18181
18295
|
setFiles((prev) => {
|
|
18182
18296
|
const fileToRemove = prev.find((f) => f.id === id);
|
|
18183
18297
|
if (fileToRemove) {
|
|
@@ -18186,13 +18300,13 @@ function useFileUpload({
|
|
|
18186
18300
|
return prev.filter((f) => f.id !== id);
|
|
18187
18301
|
});
|
|
18188
18302
|
}, []);
|
|
18189
|
-
const clearFiles =
|
|
18303
|
+
const clearFiles = React13.useCallback(() => {
|
|
18190
18304
|
setFiles((prev) => {
|
|
18191
18305
|
prev.forEach((f) => URL.revokeObjectURL(f.previewUrl));
|
|
18192
18306
|
return [];
|
|
18193
18307
|
});
|
|
18194
18308
|
}, []);
|
|
18195
|
-
const getFiles =
|
|
18309
|
+
const getFiles = React13.useCallback(() => {
|
|
18196
18310
|
return files.map((f) => f.file);
|
|
18197
18311
|
}, [files]);
|
|
18198
18312
|
return {
|
|
@@ -18220,12 +18334,12 @@ function DocumentScanner({
|
|
|
18220
18334
|
onValidationError,
|
|
18221
18335
|
onStateChange
|
|
18222
18336
|
}) {
|
|
18223
|
-
const [state, setState] =
|
|
18224
|
-
const [error, setError] =
|
|
18225
|
-
const [isWebcamOpen, setIsWebcamOpen] =
|
|
18226
|
-
const [validationErrors, setValidationErrors] =
|
|
18337
|
+
const [state, setState] = React13.useState("idle");
|
|
18338
|
+
const [error, setError] = React13.useState(null);
|
|
18339
|
+
const [isWebcamOpen, setIsWebcamOpen] = React13.useState(false);
|
|
18340
|
+
const [validationErrors, setValidationErrors] = React13.useState([]);
|
|
18227
18341
|
const isMobile = useIsMobile();
|
|
18228
|
-
const cameraInputRef =
|
|
18342
|
+
const cameraInputRef = React13.useRef(null);
|
|
18229
18343
|
const {
|
|
18230
18344
|
files,
|
|
18231
18345
|
addFiles,
|
|
@@ -18243,17 +18357,17 @@ function DocumentScanner({
|
|
|
18243
18357
|
onValidationError?.(errors);
|
|
18244
18358
|
}
|
|
18245
18359
|
});
|
|
18246
|
-
|
|
18360
|
+
React13.useEffect(() => {
|
|
18247
18361
|
onStateChange?.(state);
|
|
18248
18362
|
}, [state, onStateChange]);
|
|
18249
|
-
|
|
18363
|
+
React13.useEffect(() => {
|
|
18250
18364
|
if (hasFiles && state === "idle") {
|
|
18251
18365
|
setState("preview");
|
|
18252
18366
|
} else if (!hasFiles && state === "preview") {
|
|
18253
18367
|
setState("idle");
|
|
18254
18368
|
}
|
|
18255
18369
|
}, [hasFiles, state]);
|
|
18256
|
-
const handleFilesSelected =
|
|
18370
|
+
const handleFilesSelected = React13.useCallback(
|
|
18257
18371
|
(fileList) => {
|
|
18258
18372
|
setError(null);
|
|
18259
18373
|
setValidationErrors([]);
|
|
@@ -18261,10 +18375,10 @@ function DocumentScanner({
|
|
|
18261
18375
|
},
|
|
18262
18376
|
[addFiles]
|
|
18263
18377
|
);
|
|
18264
|
-
const handleCameraCapture =
|
|
18378
|
+
const handleCameraCapture = React13.useCallback(() => {
|
|
18265
18379
|
cameraInputRef.current?.click();
|
|
18266
18380
|
}, []);
|
|
18267
|
-
const handleCameraInputChange =
|
|
18381
|
+
const handleCameraInputChange = React13.useCallback(
|
|
18268
18382
|
(e) => {
|
|
18269
18383
|
if (e.target.files && e.target.files.length > 0) {
|
|
18270
18384
|
setError(null);
|
|
@@ -18275,7 +18389,7 @@ function DocumentScanner({
|
|
|
18275
18389
|
},
|
|
18276
18390
|
[addFiles]
|
|
18277
18391
|
);
|
|
18278
|
-
const handleWebcamCapture =
|
|
18392
|
+
const handleWebcamCapture = React13.useCallback(
|
|
18279
18393
|
(file) => {
|
|
18280
18394
|
setError(null);
|
|
18281
18395
|
setValidationErrors([]);
|
|
@@ -18283,7 +18397,7 @@ function DocumentScanner({
|
|
|
18283
18397
|
},
|
|
18284
18398
|
[addFile]
|
|
18285
18399
|
);
|
|
18286
|
-
const handleScan =
|
|
18400
|
+
const handleScan = React13.useCallback(async () => {
|
|
18287
18401
|
if (!hasFiles) return;
|
|
18288
18402
|
try {
|
|
18289
18403
|
setState("processing");
|
|
@@ -18302,11 +18416,11 @@ function DocumentScanner({
|
|
|
18302
18416
|
setError(errorMessage);
|
|
18303
18417
|
}
|
|
18304
18418
|
}, [hasFiles, getFiles, onScan, onResult, clearFiles]);
|
|
18305
|
-
const handleRetry =
|
|
18419
|
+
const handleRetry = React13.useCallback(() => {
|
|
18306
18420
|
setState("preview");
|
|
18307
18421
|
setError(null);
|
|
18308
18422
|
}, []);
|
|
18309
|
-
const handleClearAll =
|
|
18423
|
+
const handleClearAll = React13.useCallback(() => {
|
|
18310
18424
|
clearFiles();
|
|
18311
18425
|
setError(null);
|
|
18312
18426
|
setValidationErrors([]);
|
|
@@ -18598,30 +18712,30 @@ function DockablePanel({
|
|
|
18598
18712
|
container,
|
|
18599
18713
|
className
|
|
18600
18714
|
}) {
|
|
18601
|
-
const panelRef =
|
|
18602
|
-
const contentRef =
|
|
18603
|
-
const onCloseRef =
|
|
18715
|
+
const panelRef = React13.useRef(null);
|
|
18716
|
+
const contentRef = React13.useRef(null);
|
|
18717
|
+
const onCloseRef = React13.useRef(onClose);
|
|
18604
18718
|
onCloseRef.current = onClose;
|
|
18605
|
-
const onModeChangeRef =
|
|
18719
|
+
const onModeChangeRef = React13.useRef(onModeChange);
|
|
18606
18720
|
onModeChangeRef.current = onModeChange;
|
|
18607
|
-
const dirtyRef =
|
|
18721
|
+
const dirtyRef = React13.useRef(dirty);
|
|
18608
18722
|
dirtyRef.current = dirty;
|
|
18609
|
-
const modeRef =
|
|
18723
|
+
const modeRef = React13.useRef(mode);
|
|
18610
18724
|
modeRef.current = mode;
|
|
18611
|
-
const discardRef =
|
|
18725
|
+
const discardRef = React13.useRef(discardMessage);
|
|
18612
18726
|
discardRef.current = discardMessage;
|
|
18613
18727
|
const dockable = Boolean(onModeChange);
|
|
18614
18728
|
const docked = dockable && mode === "docked";
|
|
18615
|
-
const contentId =
|
|
18729
|
+
const contentId = React13.useId();
|
|
18616
18730
|
const [announcement, announce] = useLiveAnnouncement();
|
|
18617
|
-
const requestClose =
|
|
18731
|
+
const requestClose = React13.useCallback(() => {
|
|
18618
18732
|
const view = panelRef.current?.ownerDocument.defaultView;
|
|
18619
18733
|
if (dirtyRef.current && view?.confirm && !view.confirm(discardRef.current ?? `Discard ${title}?`)) {
|
|
18620
18734
|
return;
|
|
18621
18735
|
}
|
|
18622
18736
|
onCloseRef.current();
|
|
18623
18737
|
}, [title]);
|
|
18624
|
-
|
|
18738
|
+
React13.useEffect(() => {
|
|
18625
18739
|
const handleKeyDown = (event) => {
|
|
18626
18740
|
if (event.key !== "Escape") return;
|
|
18627
18741
|
if (modeRef.current === "docked" && !panelRef.current?.contains(event.target)) {
|
|
@@ -18637,7 +18751,7 @@ function DockablePanel({
|
|
|
18637
18751
|
doc.addEventListener("keydown", handleKeyDown);
|
|
18638
18752
|
return () => doc.removeEventListener("keydown", handleKeyDown);
|
|
18639
18753
|
}, [dockable, requestClose]);
|
|
18640
|
-
|
|
18754
|
+
React13.useEffect(() => {
|
|
18641
18755
|
if (!dirty || typeof window === "undefined") return;
|
|
18642
18756
|
const handleBeforeUnload = (event) => {
|
|
18643
18757
|
event.preventDefault();
|
|
@@ -18646,7 +18760,7 @@ function DockablePanel({
|
|
|
18646
18760
|
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
18647
18761
|
return () => window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
18648
18762
|
}, [dirty]);
|
|
18649
|
-
|
|
18763
|
+
React13.useEffect(() => {
|
|
18650
18764
|
const panel2 = panelRef.current;
|
|
18651
18765
|
if (!panel2 || mode !== "full") return;
|
|
18652
18766
|
const root = panel2.closest('[data-slot="dockable-panel-dock"]') ?? panel2;
|
|
@@ -18660,15 +18774,15 @@ function DockablePanel({
|
|
|
18660
18774
|
for (const element of inerted) releaseInert(element);
|
|
18661
18775
|
};
|
|
18662
18776
|
}, [mode]);
|
|
18663
|
-
|
|
18777
|
+
React13.useEffect(() => {
|
|
18664
18778
|
contentRef.current?.toggleAttribute("inert", docked);
|
|
18665
18779
|
}, [docked]);
|
|
18666
|
-
|
|
18780
|
+
React13.useEffect(() => {
|
|
18667
18781
|
if (docked) return;
|
|
18668
18782
|
const target2 = contentRef.current?.querySelector(FOCUSABLE_SELECTOR) ?? panelRef.current;
|
|
18669
18783
|
target2?.focus();
|
|
18670
18784
|
}, [docked]);
|
|
18671
|
-
|
|
18785
|
+
React13.useEffect(() => {
|
|
18672
18786
|
if (!docked) return;
|
|
18673
18787
|
announce(`${title} collapsed to dock`);
|
|
18674
18788
|
panelRef.current?.querySelector('[data-slot="dockable-panel-restore"]')?.focus();
|
|
@@ -18865,10 +18979,10 @@ function useDropzone({
|
|
|
18865
18979
|
multiple = false,
|
|
18866
18980
|
disabled = false
|
|
18867
18981
|
}) {
|
|
18868
|
-
const [isDragging, setIsDragging] =
|
|
18869
|
-
const inputRef =
|
|
18870
|
-
const dragCounter =
|
|
18871
|
-
const handleDragEnter =
|
|
18982
|
+
const [isDragging, setIsDragging] = React13.useState(false);
|
|
18983
|
+
const inputRef = React13.useRef(null);
|
|
18984
|
+
const dragCounter = React13.useRef(0);
|
|
18985
|
+
const handleDragEnter = React13.useCallback(
|
|
18872
18986
|
(e) => {
|
|
18873
18987
|
e.preventDefault();
|
|
18874
18988
|
e.stopPropagation();
|
|
@@ -18880,11 +18994,11 @@ function useDropzone({
|
|
|
18880
18994
|
},
|
|
18881
18995
|
[disabled]
|
|
18882
18996
|
);
|
|
18883
|
-
const handleDragOver =
|
|
18997
|
+
const handleDragOver = React13.useCallback((e) => {
|
|
18884
18998
|
e.preventDefault();
|
|
18885
18999
|
e.stopPropagation();
|
|
18886
19000
|
}, []);
|
|
18887
|
-
const handleDragLeave =
|
|
19001
|
+
const handleDragLeave = React13.useCallback((e) => {
|
|
18888
19002
|
e.preventDefault();
|
|
18889
19003
|
e.stopPropagation();
|
|
18890
19004
|
dragCounter.current--;
|
|
@@ -18892,7 +19006,7 @@ function useDropzone({
|
|
|
18892
19006
|
setIsDragging(false);
|
|
18893
19007
|
}
|
|
18894
19008
|
}, []);
|
|
18895
|
-
const handleDrop =
|
|
19009
|
+
const handleDrop = React13.useCallback(
|
|
18896
19010
|
(e) => {
|
|
18897
19011
|
e.preventDefault();
|
|
18898
19012
|
e.stopPropagation();
|
|
@@ -18906,7 +19020,7 @@ function useDropzone({
|
|
|
18906
19020
|
},
|
|
18907
19021
|
[disabled, multiple, onDrop]
|
|
18908
19022
|
);
|
|
18909
|
-
const handleInputChange =
|
|
19023
|
+
const handleInputChange = React13.useCallback(
|
|
18910
19024
|
(e) => {
|
|
18911
19025
|
const files = e.target.files ? Array.from(e.target.files) : [];
|
|
18912
19026
|
if (files.length > 0) {
|
|
@@ -18916,7 +19030,7 @@ function useDropzone({
|
|
|
18916
19030
|
},
|
|
18917
19031
|
[onDrop]
|
|
18918
19032
|
);
|
|
18919
|
-
const open =
|
|
19033
|
+
const open = React13.useCallback(() => {
|
|
18920
19034
|
if (!disabled) {
|
|
18921
19035
|
inputRef.current?.click();
|
|
18922
19036
|
}
|
|
@@ -18966,7 +19080,7 @@ function ClaimProviderForm({
|
|
|
18966
19080
|
termsUrl = "/terms",
|
|
18967
19081
|
className = ""
|
|
18968
19082
|
}) {
|
|
18969
|
-
const [formData, setFormData] =
|
|
19083
|
+
const [formData, setFormData] = React13.useState({
|
|
18970
19084
|
firstName: "",
|
|
18971
19085
|
lastName: "",
|
|
18972
19086
|
email: "",
|
|
@@ -19269,14 +19383,14 @@ function CreateInvoiceModal({
|
|
|
19269
19383
|
initialStep = 1,
|
|
19270
19384
|
initialEmployerId = ""
|
|
19271
19385
|
}) {
|
|
19272
|
-
const [step, setStep] =
|
|
19273
|
-
const [employerId, setEmployerId] =
|
|
19274
|
-
const [selectedOrders, setSelectedOrders] =
|
|
19386
|
+
const [step, setStep] = React13.useState(initialStep);
|
|
19387
|
+
const [employerId, setEmployerId] = React13.useState(initialEmployerId);
|
|
19388
|
+
const [selectedOrders, setSelectedOrders] = React13.useState(
|
|
19275
19389
|
/* @__PURE__ */ new Set()
|
|
19276
19390
|
);
|
|
19277
|
-
const [dueDate, setDueDate] =
|
|
19278
|
-
const [notes, setNotes] =
|
|
19279
|
-
|
|
19391
|
+
const [dueDate, setDueDate] = React13.useState("");
|
|
19392
|
+
const [notes, setNotes] = React13.useState("");
|
|
19393
|
+
React13.useEffect(() => {
|
|
19280
19394
|
if (!open) {
|
|
19281
19395
|
setStep(initialStep);
|
|
19282
19396
|
setEmployerId(initialEmployerId);
|
|
@@ -19285,7 +19399,7 @@ function CreateInvoiceModal({
|
|
|
19285
19399
|
setNotes("");
|
|
19286
19400
|
}
|
|
19287
19401
|
}, [open, initialStep, initialEmployerId]);
|
|
19288
|
-
|
|
19402
|
+
React13.useEffect(() => {
|
|
19289
19403
|
if (!dueDate && open) {
|
|
19290
19404
|
const date = /* @__PURE__ */ new Date();
|
|
19291
19405
|
date.setDate(date.getDate() + defaultDueDays);
|
|
@@ -19708,14 +19822,14 @@ function CreateReferralModal({
|
|
|
19708
19822
|
errorMessage,
|
|
19709
19823
|
currency = "$"
|
|
19710
19824
|
}) {
|
|
19711
|
-
const [selectedServices, setSelectedServices] =
|
|
19825
|
+
const [selectedServices, setSelectedServices] = React13.useState(
|
|
19712
19826
|
/* @__PURE__ */ new Set()
|
|
19713
19827
|
);
|
|
19714
|
-
const [notes, setNotes] =
|
|
19715
|
-
const [priority, setPriority] =
|
|
19828
|
+
const [notes, setNotes] = React13.useState("");
|
|
19829
|
+
const [priority, setPriority] = React13.useState(
|
|
19716
19830
|
"normal"
|
|
19717
19831
|
);
|
|
19718
|
-
|
|
19832
|
+
React13.useEffect(() => {
|
|
19719
19833
|
if (!open) {
|
|
19720
19834
|
setSelectedServices(/* @__PURE__ */ new Set());
|
|
19721
19835
|
setNotes("");
|
|
@@ -20016,15 +20130,15 @@ function EditUserRoleModal({
|
|
|
20016
20130
|
isSubmitting = false,
|
|
20017
20131
|
errorMessage
|
|
20018
20132
|
}) {
|
|
20019
|
-
const [selectedRoleId, setSelectedRoleId] =
|
|
20133
|
+
const [selectedRoleId, setSelectedRoleId] = React13.useState(
|
|
20020
20134
|
user?.currentRoleId || ""
|
|
20021
20135
|
);
|
|
20022
|
-
|
|
20136
|
+
React13.useEffect(() => {
|
|
20023
20137
|
if (user?.currentRoleId) {
|
|
20024
20138
|
setSelectedRoleId(user.currentRoleId);
|
|
20025
20139
|
}
|
|
20026
20140
|
}, [user?.currentRoleId]);
|
|
20027
|
-
|
|
20141
|
+
React13.useEffect(() => {
|
|
20028
20142
|
if (!open && user?.currentRoleId) {
|
|
20029
20143
|
setSelectedRoleId(user.currentRoleId);
|
|
20030
20144
|
}
|
|
@@ -20195,24 +20309,24 @@ function EmployeeForm({
|
|
|
20195
20309
|
emailRequired = "Email is required",
|
|
20196
20310
|
dobRequired = "Date of birth is required"
|
|
20197
20311
|
} = labels;
|
|
20198
|
-
const [firstName, setFirstName] =
|
|
20199
|
-
const [lastName, setLastName] =
|
|
20200
|
-
const [email, setEmail] =
|
|
20201
|
-
const [dob, setDob] =
|
|
20202
|
-
const [selectedDepartments, setSelectedDepartments] =
|
|
20203
|
-
const [title, setTitle] =
|
|
20204
|
-
const [address, setAddress] =
|
|
20312
|
+
const [firstName, setFirstName] = React13.useState(initialData.firstName ?? "");
|
|
20313
|
+
const [lastName, setLastName] = React13.useState(initialData.lastName ?? "");
|
|
20314
|
+
const [email, setEmail] = React13.useState(initialData.email ?? "");
|
|
20315
|
+
const [dob, setDob] = React13.useState(initialData.dob ?? "");
|
|
20316
|
+
const [selectedDepartments, setSelectedDepartments] = React13.useState(initialData.departments ?? []);
|
|
20317
|
+
const [title, setTitle] = React13.useState(initialData.title ?? "");
|
|
20318
|
+
const [address, setAddress] = React13.useState(
|
|
20205
20319
|
initialData.address ?? {}
|
|
20206
20320
|
);
|
|
20207
|
-
const [phones, setPhones] =
|
|
20321
|
+
const [phones, setPhones] = React13.useState(
|
|
20208
20322
|
initialData.phones ?? [{ number: "", type: "cell" }]
|
|
20209
20323
|
);
|
|
20210
|
-
const [isActive, setIsActive] =
|
|
20211
|
-
const [additionalInfo, setAdditionalInfo] =
|
|
20324
|
+
const [isActive, setIsActive] = React13.useState(initialData.isActive ?? true);
|
|
20325
|
+
const [additionalInfo, setAdditionalInfo] = React13.useState(
|
|
20212
20326
|
initialData.additionalInfo ?? ""
|
|
20213
20327
|
);
|
|
20214
|
-
const [sendInvite, setSendInvite] =
|
|
20215
|
-
const [errors, setErrors] =
|
|
20328
|
+
const [sendInvite, setSendInvite] = React13.useState(false);
|
|
20329
|
+
const [errors, setErrors] = React13.useState({});
|
|
20216
20330
|
const validate = () => {
|
|
20217
20331
|
const newErrors = {};
|
|
20218
20332
|
if (!firstName.trim()) newErrors.firstName = firstNameRequired;
|
|
@@ -20631,8 +20745,8 @@ function EmployeeProfileCard({
|
|
|
20631
20745
|
className,
|
|
20632
20746
|
labels = {}
|
|
20633
20747
|
}) {
|
|
20634
|
-
const [isExpanded, setIsExpanded] =
|
|
20635
|
-
const fileInputRef =
|
|
20748
|
+
const [isExpanded, setIsExpanded] = React13.useState(defaultExpanded);
|
|
20749
|
+
const fileInputRef = React13.useRef(null);
|
|
20636
20750
|
const {
|
|
20637
20751
|
moreDetails = "more details",
|
|
20638
20752
|
lessDetails = "less details",
|
|
@@ -21165,13 +21279,13 @@ function EmployerList({
|
|
|
21165
21279
|
emptyMessage = "No employers linked yet",
|
|
21166
21280
|
className = ""
|
|
21167
21281
|
}) {
|
|
21168
|
-
const [searchQuery, setSearchQuery] =
|
|
21282
|
+
const [searchQuery, setSearchQuery] = React13.useState("");
|
|
21169
21283
|
const handleSearch = (e) => {
|
|
21170
21284
|
const query = e.target.value;
|
|
21171
21285
|
setSearchQuery(query);
|
|
21172
21286
|
onSearch?.(query);
|
|
21173
21287
|
};
|
|
21174
|
-
const filteredEmployers =
|
|
21288
|
+
const filteredEmployers = React13.useMemo(() => {
|
|
21175
21289
|
if (!searchQuery.trim()) return employers;
|
|
21176
21290
|
const q = searchQuery.toLowerCase();
|
|
21177
21291
|
return employers.filter(
|
|
@@ -21820,7 +21934,7 @@ function EmployerServiceModal({
|
|
|
21820
21934
|
isSubmitting = false,
|
|
21821
21935
|
errorMessage
|
|
21822
21936
|
}) {
|
|
21823
|
-
const [config, setConfig] =
|
|
21937
|
+
const [config, setConfig] = React13.useState({
|
|
21824
21938
|
serviceId: service?.id || "",
|
|
21825
21939
|
employerId: employer?.id || "",
|
|
21826
21940
|
customPrice: existingConfig?.customPrice,
|
|
@@ -21832,7 +21946,7 @@ function EmployerServiceModal({
|
|
|
21832
21946
|
notes: existingConfig?.notes,
|
|
21833
21947
|
billingCode: existingConfig?.billingCode
|
|
21834
21948
|
});
|
|
21835
|
-
|
|
21949
|
+
React13.useEffect(() => {
|
|
21836
21950
|
setConfig({
|
|
21837
21951
|
serviceId: service?.id || "",
|
|
21838
21952
|
employerId: employer?.id || "",
|
|
@@ -22709,8 +22823,8 @@ function FileManager({
|
|
|
22709
22823
|
errorMessage,
|
|
22710
22824
|
className = ""
|
|
22711
22825
|
}) {
|
|
22712
|
-
const [isDragging, setIsDragging] =
|
|
22713
|
-
const fileInputRef =
|
|
22826
|
+
const [isDragging, setIsDragging] = React13.useState(false);
|
|
22827
|
+
const fileInputRef = React13.useRef(null);
|
|
22714
22828
|
const hasActions = !!(onPreview || onDownload || onDelete);
|
|
22715
22829
|
const handleDragOver = (e) => {
|
|
22716
22830
|
e.preventDefault();
|
|
@@ -22895,10 +23009,10 @@ function FileRowActionMenu({
|
|
|
22895
23009
|
onDownload,
|
|
22896
23010
|
onDelete
|
|
22897
23011
|
}) {
|
|
22898
|
-
const [open, setOpen] =
|
|
22899
|
-
const menuRef =
|
|
22900
|
-
const buttonRef =
|
|
22901
|
-
|
|
23012
|
+
const [open, setOpen] = React13.useState(false);
|
|
23013
|
+
const menuRef = React13.useRef(null);
|
|
23014
|
+
const buttonRef = React13.useRef(null);
|
|
23015
|
+
React13.useEffect(() => {
|
|
22902
23016
|
if (!open) return;
|
|
22903
23017
|
function handleClick(e) {
|
|
22904
23018
|
if (menuRef.current && !menuRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
|
|
@@ -22908,7 +23022,7 @@ function FileRowActionMenu({
|
|
|
22908
23022
|
document.addEventListener("mousedown", handleClick);
|
|
22909
23023
|
return () => document.removeEventListener("mousedown", handleClick);
|
|
22910
23024
|
}, [open]);
|
|
22911
|
-
|
|
23025
|
+
React13.useEffect(() => {
|
|
22912
23026
|
if (!open) return;
|
|
22913
23027
|
function handleKey(e) {
|
|
22914
23028
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -22916,8 +23030,8 @@ function FileRowActionMenu({
|
|
|
22916
23030
|
document.addEventListener("keydown", handleKey);
|
|
22917
23031
|
return () => document.removeEventListener("keydown", handleKey);
|
|
22918
23032
|
}, [open]);
|
|
22919
|
-
const [menuPos, setMenuPos] =
|
|
22920
|
-
|
|
23033
|
+
const [menuPos, setMenuPos] = React13.useState(null);
|
|
23034
|
+
React13.useLayoutEffect(() => {
|
|
22921
23035
|
if (!open || !buttonRef.current) return;
|
|
22922
23036
|
function updatePosition() {
|
|
22923
23037
|
if (!buttonRef.current) return;
|
|
@@ -23043,7 +23157,7 @@ function fmtDate(iso) {
|
|
|
23043
23157
|
if (!iso) return null;
|
|
23044
23158
|
return iso.slice(0, 10);
|
|
23045
23159
|
}
|
|
23046
|
-
var HealthSurveillance =
|
|
23160
|
+
var HealthSurveillance = React13.forwardRef(
|
|
23047
23161
|
({
|
|
23048
23162
|
history,
|
|
23049
23163
|
programs,
|
|
@@ -23057,13 +23171,13 @@ var HealthSurveillance = React12.forwardRef(
|
|
|
23057
23171
|
"data-testid": dataTestId,
|
|
23058
23172
|
...props
|
|
23059
23173
|
}, ref) => {
|
|
23060
|
-
const items =
|
|
23174
|
+
const items = React13.useMemo(
|
|
23061
23175
|
() => evaluateDue(history, programs, { enrolledKeys, now }),
|
|
23062
23176
|
[history, programs, enrolledKeys, now]
|
|
23063
23177
|
);
|
|
23064
23178
|
const actionable = items.filter((i) => i.status !== "satisfied");
|
|
23065
23179
|
const done = items.filter((i) => i.status === "satisfied");
|
|
23066
|
-
const historyLabels =
|
|
23180
|
+
const historyLabels = React13.useMemo(() => {
|
|
23067
23181
|
const m = /* @__PURE__ */ new Map();
|
|
23068
23182
|
const scan = (list) => {
|
|
23069
23183
|
for (const e of list ?? []) {
|
|
@@ -23078,9 +23192,9 @@ var HealthSurveillance = React12.forwardRef(
|
|
|
23078
23192
|
}, [history]);
|
|
23079
23193
|
const orderLabel = (key) => orderLabels?.[key] ?? historyLabels.get(key) ?? key;
|
|
23080
23194
|
const programLabel = (key) => programLabels?.[key] ?? key;
|
|
23081
|
-
const [expanded, setExpanded] =
|
|
23082
|
-
const [checked, setChecked] =
|
|
23083
|
-
const completedSet =
|
|
23195
|
+
const [expanded, setExpanded] = React13.useState(null);
|
|
23196
|
+
const [checked, setChecked] = React13.useState(/* @__PURE__ */ new Set());
|
|
23197
|
+
const completedSet = React13.useMemo(() => completedKeys(history), [history]);
|
|
23084
23198
|
const specLevel = (spec, specs) => {
|
|
23085
23199
|
let level = 0;
|
|
23086
23200
|
let cur = spec.after;
|
|
@@ -23267,14 +23381,14 @@ function HelpSupportPanel({
|
|
|
23267
23381
|
successMessage,
|
|
23268
23382
|
className = ""
|
|
23269
23383
|
}) {
|
|
23270
|
-
const [searchTerm, setSearchTerm] =
|
|
23271
|
-
const [expandedFaq, setExpandedFaq] =
|
|
23272
|
-
const [formData, setFormData] =
|
|
23384
|
+
const [searchTerm, setSearchTerm] = React13.useState("");
|
|
23385
|
+
const [expandedFaq, setExpandedFaq] = React13.useState(null);
|
|
23386
|
+
const [formData, setFormData] = React13.useState({
|
|
23273
23387
|
subject: "",
|
|
23274
23388
|
message: "",
|
|
23275
23389
|
email: ""
|
|
23276
23390
|
});
|
|
23277
|
-
const [showSuccess, setShowSuccess] =
|
|
23391
|
+
const [showSuccess, setShowSuccess] = React13.useState(false);
|
|
23278
23392
|
const filteredFaqs = faqs.filter(
|
|
23279
23393
|
(faq) => faq.question.toLowerCase().includes(searchTerm.toLowerCase()) || faq.answer.toLowerCase().includes(searchTerm.toLowerCase())
|
|
23280
23394
|
);
|
|
@@ -23746,7 +23860,7 @@ function HRISProviderSelector({
|
|
|
23746
23860
|
syncPending = "We are still waiting on data from your HRIS Provider. Please check back later.",
|
|
23747
23861
|
supportEmail = "support@bluehive.com"
|
|
23748
23862
|
} = labels;
|
|
23749
|
-
const filteredProviders =
|
|
23863
|
+
const filteredProviders = React13.useMemo(() => {
|
|
23750
23864
|
if (!searchQuery.trim()) return providers;
|
|
23751
23865
|
const query = searchQuery.toLowerCase();
|
|
23752
23866
|
return providers.filter((p) => p.displayName.toLowerCase().includes(query));
|
|
@@ -24033,11 +24147,11 @@ function InventoryManager({
|
|
|
24033
24147
|
isLoading = false,
|
|
24034
24148
|
className = ""
|
|
24035
24149
|
}) {
|
|
24036
|
-
const [updateType, setUpdateType] =
|
|
24150
|
+
const [updateType, setUpdateType] = React13.useState(
|
|
24037
24151
|
"credit"
|
|
24038
24152
|
);
|
|
24039
|
-
const [updateAmount, setUpdateAmount] =
|
|
24040
|
-
const [updateMemo, setUpdateMemo] =
|
|
24153
|
+
const [updateAmount, setUpdateAmount] = React13.useState("");
|
|
24154
|
+
const [updateMemo, setUpdateMemo] = React13.useState("");
|
|
24041
24155
|
const handleSubmit = () => {
|
|
24042
24156
|
if (!updateAmount || !onUpdateSubmit) return;
|
|
24043
24157
|
const amount = parseInt(updateAmount, 10);
|
|
@@ -24103,7 +24217,7 @@ function InventoryManager({
|
|
|
24103
24217
|
/* @__PURE__ */ jsx("th", { className: "text-muted-foreground py-2 text-start text-xs font-medium tracking-wider uppercase", children: "Change" }),
|
|
24104
24218
|
/* @__PURE__ */ jsx("th", { className: "text-muted-foreground py-2 text-end text-xs font-medium tracking-wider uppercase", children: "Quantity" })
|
|
24105
24219
|
] }) }),
|
|
24106
|
-
/* @__PURE__ */ jsx("tbody", { className: "divide-border/50 divide-y", children: logEntries.map((entry) => /* @__PURE__ */ jsxs(
|
|
24220
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-border/50 divide-y", children: logEntries.map((entry) => /* @__PURE__ */ jsxs(React13.Fragment, { children: [
|
|
24107
24221
|
/* @__PURE__ */ jsxs("tr", { children: [
|
|
24108
24222
|
/* @__PURE__ */ jsx(
|
|
24109
24223
|
"td",
|
|
@@ -24337,12 +24451,12 @@ function InviteUserModal({
|
|
|
24337
24451
|
errorMessage,
|
|
24338
24452
|
successMessage
|
|
24339
24453
|
}) {
|
|
24340
|
-
const [email, setEmail] =
|
|
24341
|
-
const [firstName, setFirstName] =
|
|
24342
|
-
const [lastName, setLastName] =
|
|
24343
|
-
const [roleId, setRoleId] =
|
|
24344
|
-
const [message, setMessage] =
|
|
24345
|
-
|
|
24454
|
+
const [email, setEmail] = React13.useState("");
|
|
24455
|
+
const [firstName, setFirstName] = React13.useState("");
|
|
24456
|
+
const [lastName, setLastName] = React13.useState("");
|
|
24457
|
+
const [roleId, setRoleId] = React13.useState(defaultRoleId || "");
|
|
24458
|
+
const [message, setMessage] = React13.useState("");
|
|
24459
|
+
React13.useEffect(() => {
|
|
24346
24460
|
if (!open) {
|
|
24347
24461
|
setEmail("");
|
|
24348
24462
|
setFirstName("");
|
|
@@ -24582,7 +24696,7 @@ function InvoiceList({
|
|
|
24582
24696
|
currency = "$",
|
|
24583
24697
|
className = ""
|
|
24584
24698
|
}) {
|
|
24585
|
-
const [searchQuery, setSearchQuery] =
|
|
24699
|
+
const [searchQuery, setSearchQuery] = React13.useState("");
|
|
24586
24700
|
const handleSearch = (e) => {
|
|
24587
24701
|
const query = e.target.value;
|
|
24588
24702
|
setSearchQuery(query);
|
|
@@ -24619,7 +24733,7 @@ function InvoiceList({
|
|
|
24619
24733
|
{ value: "overdue", label: "Overdue" },
|
|
24620
24734
|
{ value: "cancelled", label: "Cancelled" }
|
|
24621
24735
|
];
|
|
24622
|
-
const filteredInvoices =
|
|
24736
|
+
const filteredInvoices = React13.useMemo(() => {
|
|
24623
24737
|
let result = invoices;
|
|
24624
24738
|
if (statusFilter !== "all") {
|
|
24625
24739
|
result = result.filter((inv) => inv.status === statusFilter);
|
|
@@ -24632,7 +24746,7 @@ function InvoiceList({
|
|
|
24632
24746
|
}
|
|
24633
24747
|
return result;
|
|
24634
24748
|
}, [invoices, statusFilter, searchQuery]);
|
|
24635
|
-
const totals =
|
|
24749
|
+
const totals = React13.useMemo(() => {
|
|
24636
24750
|
return {
|
|
24637
24751
|
total: filteredInvoices.reduce((sum, inv) => sum + inv.amount, 0),
|
|
24638
24752
|
paid: filteredInvoices.filter((inv) => inv.status === "paid").reduce((sum, inv) => sum + inv.amount, 0),
|
|
@@ -24856,16 +24970,16 @@ function InvoicePaymentPage({
|
|
|
24856
24970
|
showStripeBranding = true,
|
|
24857
24971
|
className = ""
|
|
24858
24972
|
}) {
|
|
24859
|
-
const [paymentMethod, setPaymentMethod] =
|
|
24973
|
+
const [paymentMethod, setPaymentMethod] = React13.useState(
|
|
24860
24974
|
acceptedMethods[0] || "card"
|
|
24861
24975
|
);
|
|
24862
|
-
const [name, setName] =
|
|
24863
|
-
const [email, setEmail] =
|
|
24864
|
-
const [cardNumber, setCardNumber] =
|
|
24865
|
-
const [expiry, setExpiry] =
|
|
24866
|
-
const [cvc, setCvc] =
|
|
24867
|
-
const [routingNumber, setRoutingNumber] =
|
|
24868
|
-
const [accountNumber, setAccountNumber] =
|
|
24976
|
+
const [name, setName] = React13.useState("");
|
|
24977
|
+
const [email, setEmail] = React13.useState("");
|
|
24978
|
+
const [cardNumber, setCardNumber] = React13.useState("");
|
|
24979
|
+
const [expiry, setExpiry] = React13.useState("");
|
|
24980
|
+
const [cvc, setCvc] = React13.useState("");
|
|
24981
|
+
const [routingNumber, setRoutingNumber] = React13.useState("");
|
|
24982
|
+
const [accountNumber, setAccountNumber] = React13.useState("");
|
|
24869
24983
|
const formatCurrency3 = (amount) => {
|
|
24870
24984
|
return `${currency}${amount.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
24871
24985
|
};
|
|
@@ -25670,16 +25784,16 @@ function LanguageSelector({
|
|
|
25670
25784
|
disabled = false,
|
|
25671
25785
|
className
|
|
25672
25786
|
}) {
|
|
25673
|
-
const [isOpen, setIsOpen] =
|
|
25674
|
-
const containerRef =
|
|
25787
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
25788
|
+
const containerRef = React13.useRef(null);
|
|
25675
25789
|
const { anchorRef, floatingRef, style } = useAnchoredPosition({ open: isOpen, matchMinWidth: true, maxHeight: 240 });
|
|
25676
25790
|
const selectedLanguage = languages.find((l) => l.code === value);
|
|
25677
|
-
const outsideRefs =
|
|
25791
|
+
const outsideRefs = React13.useMemo(
|
|
25678
25792
|
() => [containerRef, floatingRef],
|
|
25679
25793
|
[floatingRef]
|
|
25680
25794
|
);
|
|
25681
25795
|
useClickOutside(outsideRefs, () => setIsOpen(false), isOpen);
|
|
25682
|
-
|
|
25796
|
+
React13.useEffect(() => {
|
|
25683
25797
|
const handleEscape = (e) => {
|
|
25684
25798
|
if (e.key === "Escape") setIsOpen(false);
|
|
25685
25799
|
};
|
|
@@ -27095,13 +27209,13 @@ function OrderConfirmationWizard({
|
|
|
27095
27209
|
stepTitles = ["Verify Employee", "Consent & ID", "Confirmation"],
|
|
27096
27210
|
className = ""
|
|
27097
27211
|
}) {
|
|
27098
|
-
const [step, setStep] =
|
|
27099
|
-
const [employeeVerified, setEmployeeVerified] =
|
|
27100
|
-
const [verificationNotes, setVerificationNotes] =
|
|
27101
|
-
const [consentObtained, setConsentObtained] =
|
|
27102
|
-
const [idVerified, setIdVerified] =
|
|
27103
|
-
const [idType, setIdType] =
|
|
27104
|
-
const [confirmationNotes, setConfirmationNotes] =
|
|
27212
|
+
const [step, setStep] = React13.useState(initialStep);
|
|
27213
|
+
const [employeeVerified, setEmployeeVerified] = React13.useState(false);
|
|
27214
|
+
const [verificationNotes, setVerificationNotes] = React13.useState("");
|
|
27215
|
+
const [consentObtained, setConsentObtained] = React13.useState(false);
|
|
27216
|
+
const [idVerified, setIdVerified] = React13.useState(false);
|
|
27217
|
+
const [idType, setIdType] = React13.useState("");
|
|
27218
|
+
const [confirmationNotes, setConfirmationNotes] = React13.useState("");
|
|
27105
27219
|
const handleStepChange = (newStep) => {
|
|
27106
27220
|
setStep(newStep);
|
|
27107
27221
|
onStepChange?.(newStep);
|
|
@@ -27129,7 +27243,7 @@ function OrderConfirmationWizard({
|
|
|
27129
27243
|
const stepNum = index + 1;
|
|
27130
27244
|
const isActive = step === stepNum;
|
|
27131
27245
|
const isComplete = step > stepNum;
|
|
27132
|
-
return /* @__PURE__ */ jsxs(
|
|
27246
|
+
return /* @__PURE__ */ jsxs(React13.Fragment, { children: [
|
|
27133
27247
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
27134
27248
|
/* @__PURE__ */ jsx(
|
|
27135
27249
|
"div",
|
|
@@ -27714,7 +27828,7 @@ function OrderList({
|
|
|
27714
27828
|
actions,
|
|
27715
27829
|
className
|
|
27716
27830
|
}) {
|
|
27717
|
-
const filteredOrders =
|
|
27831
|
+
const filteredOrders = React13.useMemo(() => {
|
|
27718
27832
|
const activeTabConfig = tabs.find((t) => t.id === activeTab);
|
|
27719
27833
|
if (!activeTabConfig?.statuses || !getOrderStatus) {
|
|
27720
27834
|
return orders;
|
|
@@ -27723,7 +27837,7 @@ function OrderList({
|
|
|
27723
27837
|
(order) => activeTabConfig.statuses.includes(getOrderStatus(order))
|
|
27724
27838
|
);
|
|
27725
27839
|
}, [orders, activeTab, tabs, getOrderStatus]);
|
|
27726
|
-
const tabCounts =
|
|
27840
|
+
const tabCounts = React13.useMemo(() => {
|
|
27727
27841
|
if (!getOrderStatus) return {};
|
|
27728
27842
|
const counts = {};
|
|
27729
27843
|
tabs.forEach((tab) => {
|
|
@@ -28019,15 +28133,15 @@ function BaseOrderEditor({
|
|
|
28019
28133
|
const config = TYPE_CONFIG[type];
|
|
28020
28134
|
const ambientCodeLookup = useCodeLookupConfig();
|
|
28021
28135
|
const effectiveCodeLookup = codeLookup === false ? void 0 : codeLookup ?? ambientCodeLookup ?? void 0;
|
|
28022
|
-
const [draft, setDraft] =
|
|
28136
|
+
const [draft, setDraft] = React13.useState(
|
|
28023
28137
|
() => order ?? {
|
|
28024
28138
|
orderId: newId(),
|
|
28025
28139
|
type,
|
|
28026
28140
|
display: ""
|
|
28027
28141
|
}
|
|
28028
28142
|
);
|
|
28029
|
-
const bodyRef =
|
|
28030
|
-
|
|
28143
|
+
const bodyRef = React13.useRef(null);
|
|
28144
|
+
React13.useEffect(() => {
|
|
28031
28145
|
const input = bodyRef.current?.querySelector("input");
|
|
28032
28146
|
input?.focus();
|
|
28033
28147
|
}, []);
|
|
@@ -28255,7 +28369,7 @@ function OrderLookupForm({
|
|
|
28255
28369
|
welcomeMessage = "Look up your order by entering the information below.",
|
|
28256
28370
|
className = ""
|
|
28257
28371
|
}) {
|
|
28258
|
-
const [formData, setFormData] =
|
|
28372
|
+
const [formData, setFormData] = React13.useState({
|
|
28259
28373
|
orderNumber: "",
|
|
28260
28374
|
dateOfBirth: "",
|
|
28261
28375
|
lastName: ""
|
|
@@ -28789,20 +28903,20 @@ function OverflowMenuItem({
|
|
|
28789
28903
|
function PatientOverflowMenu({
|
|
28790
28904
|
onAction
|
|
28791
28905
|
}) {
|
|
28792
|
-
const [open, setOpen] =
|
|
28793
|
-
const menuRef =
|
|
28906
|
+
const [open, setOpen] = React13.useState(false);
|
|
28907
|
+
const menuRef = React13.useRef(null);
|
|
28794
28908
|
const { anchorRef, floatingRef, style } = useAnchoredPosition({ open, placement: "bottom-end" });
|
|
28795
|
-
const outsideRefs =
|
|
28909
|
+
const outsideRefs = React13.useMemo(
|
|
28796
28910
|
() => [menuRef, floatingRef],
|
|
28797
28911
|
[floatingRef]
|
|
28798
28912
|
);
|
|
28799
28913
|
useClickOutside(
|
|
28800
28914
|
outsideRefs,
|
|
28801
|
-
|
|
28915
|
+
React13.useCallback(() => setOpen(false), []),
|
|
28802
28916
|
open
|
|
28803
28917
|
);
|
|
28804
28918
|
useEscapeKey(
|
|
28805
|
-
|
|
28919
|
+
React13.useCallback(() => setOpen(false), []),
|
|
28806
28920
|
open
|
|
28807
28921
|
);
|
|
28808
28922
|
const handleAction = (action) => {
|
|
@@ -29001,7 +29115,7 @@ function AlertRow({ comments }) {
|
|
|
29001
29115
|
/* @__PURE__ */ jsx("span", { className: "text-foreground text-sm", children: comments.join("; ") })
|
|
29002
29116
|
] });
|
|
29003
29117
|
}
|
|
29004
|
-
var PatientHeader =
|
|
29118
|
+
var PatientHeader = React13.forwardRef(
|
|
29005
29119
|
({
|
|
29006
29120
|
patient,
|
|
29007
29121
|
allergies = [],
|
|
@@ -29031,13 +29145,13 @@ var PatientHeader = React12.forwardRef(
|
|
|
29031
29145
|
const hasComments = showCommentsBanner && comments.length > 0;
|
|
29032
29146
|
const hasProviders = showProviderBanner && !!(patient.attendingProvider || patient.familyProvider);
|
|
29033
29147
|
const hasInfoRows = hasAllergies || hasMedications || hasComments || hasProviders;
|
|
29034
|
-
const [addModalType, setAddModalType] =
|
|
29035
|
-
const [addForm, setAddForm] =
|
|
29148
|
+
const [addModalType, setAddModalType] = React13.useState(null);
|
|
29149
|
+
const [addForm, setAddForm] = React13.useState({});
|
|
29036
29150
|
const addEntityLabel = addModalType ? ADD_ENTITY_LABELS[addModalType] ?? "" : "";
|
|
29037
|
-
const [contactModalOpen, setContactModalOpen] =
|
|
29038
|
-
const [editPatientOpen, setEditPatientOpen] =
|
|
29039
|
-
const [editPatientForm, setEditPatientForm] =
|
|
29040
|
-
const handleOverflowAction =
|
|
29151
|
+
const [contactModalOpen, setContactModalOpen] = React13.useState(false);
|
|
29152
|
+
const [editPatientOpen, setEditPatientOpen] = React13.useState(false);
|
|
29153
|
+
const [editPatientForm, setEditPatientForm] = React13.useState({});
|
|
29154
|
+
const handleOverflowAction = React13.useCallback(
|
|
29041
29155
|
(action) => {
|
|
29042
29156
|
if (action === "contact") {
|
|
29043
29157
|
setContactModalOpen(true);
|
|
@@ -30520,7 +30634,7 @@ function PermissionItem({
|
|
|
30520
30634
|
parentChecked
|
|
30521
30635
|
}) {
|
|
30522
30636
|
const hasChildren = permission.children && permission.children.length > 0;
|
|
30523
|
-
const [isExpanded, setIsExpanded] =
|
|
30637
|
+
const [isExpanded, setIsExpanded] = React13.useState(true);
|
|
30524
30638
|
const handleChange = (checked) => {
|
|
30525
30639
|
onToggle(permission.id, checked);
|
|
30526
30640
|
if (!checked && hasChildren) {
|
|
@@ -30602,12 +30716,12 @@ function PermissionsEditor({
|
|
|
30602
30716
|
summary = "Summary",
|
|
30603
30717
|
all = "All"
|
|
30604
30718
|
} = labels;
|
|
30605
|
-
const [expandedGroups, setExpandedGroups] =
|
|
30719
|
+
const [expandedGroups, setExpandedGroups] = React13.useState(
|
|
30606
30720
|
() => new Set(
|
|
30607
30721
|
groups.filter((g) => g.defaultExpanded !== false).map((g) => g.id)
|
|
30608
30722
|
)
|
|
30609
30723
|
);
|
|
30610
|
-
const permissionMap =
|
|
30724
|
+
const permissionMap = React13.useMemo(() => {
|
|
30611
30725
|
const map = /* @__PURE__ */ new Map();
|
|
30612
30726
|
const processPermissions = (permissions) => {
|
|
30613
30727
|
permissions.forEach((perm) => {
|
|
@@ -30651,7 +30765,7 @@ function PermissionsEditor({
|
|
|
30651
30765
|
onEmployersChange([...selectedEmployers, employerId]);
|
|
30652
30766
|
}
|
|
30653
30767
|
};
|
|
30654
|
-
const assignedPermissionNames =
|
|
30768
|
+
const assignedPermissionNames = React13.useMemo(() => {
|
|
30655
30769
|
return assignedPermissions.map((id) => permissionMap.get(id)?.name).filter(Boolean);
|
|
30656
30770
|
}, [assignedPermissions, permissionMap]);
|
|
30657
30771
|
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-6", className), "data-slot": "perm-editor", children: [
|
|
@@ -30895,7 +31009,7 @@ function RelevanceControl({
|
|
|
30895
31009
|
}
|
|
30896
31010
|
);
|
|
30897
31011
|
}
|
|
30898
|
-
var PresentingProblems =
|
|
31012
|
+
var PresentingProblems = React13.forwardRef(
|
|
30899
31013
|
({
|
|
30900
31014
|
patientConcerns,
|
|
30901
31015
|
presenting,
|
|
@@ -30911,11 +31025,11 @@ var PresentingProblems = React12.forwardRef(
|
|
|
30911
31025
|
"data-testid": dataTestId,
|
|
30912
31026
|
...props
|
|
30913
31027
|
}, ref) => {
|
|
30914
|
-
const [draft, setDraft] =
|
|
31028
|
+
const [draft, setDraft] = React13.useState("");
|
|
30915
31029
|
const [announcement, setAnnouncement] = useLiveAnnouncement();
|
|
30916
31030
|
const scopeMeta = SCOPE_META[scope];
|
|
30917
31031
|
const ScopeIcon = scopeMeta.icon;
|
|
30918
|
-
const relevanceById =
|
|
31032
|
+
const relevanceById = React13.useMemo(
|
|
30919
31033
|
() => new Map(presenting.map((p) => [p.concernId, p.relevance])),
|
|
30920
31034
|
[presenting]
|
|
30921
31035
|
);
|
|
@@ -31374,7 +31488,7 @@ var logoContainerVariants = cva(
|
|
|
31374
31488
|
}
|
|
31375
31489
|
);
|
|
31376
31490
|
var ProviderLogo = ({ logoURL, name, variant }) => {
|
|
31377
|
-
const [hasError, setHasError] =
|
|
31491
|
+
const [hasError, setHasError] = React13.useState(false);
|
|
31378
31492
|
if (!logoURL || hasError) {
|
|
31379
31493
|
return /* @__PURE__ */ jsx(
|
|
31380
31494
|
"div",
|
|
@@ -31509,7 +31623,7 @@ function formatAddressSingleLine2(address) {
|
|
|
31509
31623
|
parts.push(`${address.city}, ${address.state} ${address.postalCode}`);
|
|
31510
31624
|
return parts.join(", ");
|
|
31511
31625
|
}
|
|
31512
|
-
var ProviderCard =
|
|
31626
|
+
var ProviderCard = React13.forwardRef(
|
|
31513
31627
|
({
|
|
31514
31628
|
provider,
|
|
31515
31629
|
variant = "compact",
|
|
@@ -31994,7 +32108,7 @@ function ProviderLogo2({
|
|
|
31994
32108
|
size = "md",
|
|
31995
32109
|
className
|
|
31996
32110
|
}) {
|
|
31997
|
-
const [hasError, setHasError] =
|
|
32111
|
+
const [hasError, setHasError] = React13.useState(false);
|
|
31998
32112
|
const initials = name.split(" ").map((word) => word[0]).join("").toUpperCase().slice(0, 2);
|
|
31999
32113
|
if (!src || hasError) {
|
|
32000
32114
|
return /* @__PURE__ */ jsx(
|
|
@@ -32432,7 +32546,7 @@ function ProviderDetailHeaderSkeleton({
|
|
|
32432
32546
|
/* @__PURE__ */ jsx("div", { className: "h-3 w-12 rounded bg-gray-200 dark:bg-gray-700" })
|
|
32433
32547
|
] }, i)) }),
|
|
32434
32548
|
/* @__PURE__ */ jsxs("div", { className: "container mx-auto px-4 py-6", children: [
|
|
32435
|
-
/* @__PURE__ */ jsx("div", { className: "mb-4 hidden items-center gap-2 sm:flex", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxs(
|
|
32549
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4 hidden items-center gap-2 sm:flex", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxs(React13.Fragment, { children: [
|
|
32436
32550
|
i > 1 && /* @__PURE__ */ jsx("div", { className: "h-4 w-4 rounded-full bg-gray-200 dark:bg-gray-700" }),
|
|
32437
32551
|
/* @__PURE__ */ jsx("div", { className: "h-4 w-16 rounded bg-gray-200 dark:bg-gray-700" })
|
|
32438
32552
|
] }, i)) }),
|
|
@@ -33358,7 +33472,7 @@ var SearchResultsMessage = ({
|
|
|
33358
33472
|
}
|
|
33359
33473
|
);
|
|
33360
33474
|
};
|
|
33361
|
-
var ProviderSearchBar =
|
|
33475
|
+
var ProviderSearchBar = React13.forwardRef(
|
|
33362
33476
|
({
|
|
33363
33477
|
onSearch,
|
|
33364
33478
|
onGeolocate,
|
|
@@ -33379,10 +33493,10 @@ var ProviderSearchBar = React12.forwardRef(
|
|
|
33379
33493
|
className,
|
|
33380
33494
|
...props
|
|
33381
33495
|
}, ref) => {
|
|
33382
|
-
const [internalValue, setInternalValue] =
|
|
33496
|
+
const [internalValue, setInternalValue] = React13.useState(
|
|
33383
33497
|
defaultValue || ""
|
|
33384
33498
|
);
|
|
33385
|
-
const [validationError, setValidationError] =
|
|
33499
|
+
const [validationError, setValidationError] = React13.useState(
|
|
33386
33500
|
null
|
|
33387
33501
|
);
|
|
33388
33502
|
const zipValue = value ?? internalValue;
|
|
@@ -33662,7 +33776,7 @@ function XMarkIcon({ className }) {
|
|
|
33662
33776
|
);
|
|
33663
33777
|
}
|
|
33664
33778
|
function InputField({ label, icon, className, id, ...props }) {
|
|
33665
|
-
const generatedId =
|
|
33779
|
+
const generatedId = React13.useId();
|
|
33666
33780
|
const inputId = id || generatedId;
|
|
33667
33781
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
33668
33782
|
label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: labelVariants2(), children: label }),
|
|
@@ -33686,7 +33800,7 @@ function SelectField({
|
|
|
33686
33800
|
id,
|
|
33687
33801
|
...props
|
|
33688
33802
|
}) {
|
|
33689
|
-
const generatedId =
|
|
33803
|
+
const generatedId = React13.useId();
|
|
33690
33804
|
const selectId = id || generatedId;
|
|
33691
33805
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
33692
33806
|
label && /* @__PURE__ */ jsx("label", { htmlFor: selectId, className: labelVariants2(), children: label }),
|
|
@@ -33739,25 +33853,25 @@ function ServiceMultiSelect({
|
|
|
33739
33853
|
disabled = false,
|
|
33740
33854
|
showCounts = false
|
|
33741
33855
|
}) {
|
|
33742
|
-
const [isOpen, setIsOpen] =
|
|
33743
|
-
const [searchTerm, setSearchTerm] =
|
|
33744
|
-
const containerRef =
|
|
33745
|
-
const inputRef =
|
|
33746
|
-
const listboxId =
|
|
33856
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
33857
|
+
const [searchTerm, setSearchTerm] = React13.useState("");
|
|
33858
|
+
const containerRef = React13.useRef(null);
|
|
33859
|
+
const inputRef = React13.useRef(null);
|
|
33860
|
+
const listboxId = React13.useId();
|
|
33747
33861
|
const { anchorRef, floatingRef, style } = useAnchoredPosition({ open: isOpen, matchWidth: true, maxHeight: 240 });
|
|
33748
|
-
const outsideRefs =
|
|
33862
|
+
const outsideRefs = React13.useMemo(
|
|
33749
33863
|
() => [containerRef, floatingRef],
|
|
33750
33864
|
[floatingRef]
|
|
33751
33865
|
);
|
|
33752
33866
|
useClickOutside(outsideRefs, () => setIsOpen(false), isOpen);
|
|
33753
|
-
const filteredServices =
|
|
33867
|
+
const filteredServices = React13.useMemo(() => {
|
|
33754
33868
|
if (!searchTerm) return services;
|
|
33755
33869
|
const lowerSearch = searchTerm.toLowerCase();
|
|
33756
33870
|
return services.filter(
|
|
33757
33871
|
(service) => service.label.toLowerCase().includes(lowerSearch) || service.category?.toLowerCase().includes(lowerSearch)
|
|
33758
33872
|
);
|
|
33759
33873
|
}, [services, searchTerm]);
|
|
33760
|
-
const groupedServices =
|
|
33874
|
+
const groupedServices = React13.useMemo(() => {
|
|
33761
33875
|
const groups = {};
|
|
33762
33876
|
filteredServices.forEach((service) => {
|
|
33763
33877
|
const category = service.category || "Other";
|
|
@@ -33766,7 +33880,7 @@ function ServiceMultiSelect({
|
|
|
33766
33880
|
});
|
|
33767
33881
|
return groups;
|
|
33768
33882
|
}, [filteredServices]);
|
|
33769
|
-
const selectedServiceObjects =
|
|
33883
|
+
const selectedServiceObjects = React13.useMemo(
|
|
33770
33884
|
() => services.filter((s) => selectedServices.includes(s.value)),
|
|
33771
33885
|
[services, selectedServices]
|
|
33772
33886
|
);
|
|
@@ -34282,16 +34396,16 @@ function ProviderSelector({
|
|
|
34282
34396
|
size = "md",
|
|
34283
34397
|
className
|
|
34284
34398
|
}) {
|
|
34285
|
-
const [isOpen, setIsOpen] =
|
|
34286
|
-
const [searchQuery, setSearchQuery] =
|
|
34287
|
-
const containerRef =
|
|
34399
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
34400
|
+
const [searchQuery, setSearchQuery] = React13.useState("");
|
|
34401
|
+
const containerRef = React13.useRef(null);
|
|
34288
34402
|
const { anchorRef, floatingRef, style } = useAnchoredPosition({ open: isOpen, matchWidth: true });
|
|
34289
|
-
const outsideRefs =
|
|
34403
|
+
const outsideRefs = React13.useMemo(
|
|
34290
34404
|
() => [containerRef, floatingRef],
|
|
34291
34405
|
[floatingRef]
|
|
34292
34406
|
);
|
|
34293
34407
|
useClickOutside(outsideRefs, () => setIsOpen(false), isOpen);
|
|
34294
|
-
|
|
34408
|
+
React13.useEffect(() => {
|
|
34295
34409
|
function handleEscape(event) {
|
|
34296
34410
|
if (event.key === "Escape") {
|
|
34297
34411
|
setIsOpen(false);
|
|
@@ -34300,12 +34414,12 @@ function ProviderSelector({
|
|
|
34300
34414
|
document.addEventListener("keydown", handleEscape);
|
|
34301
34415
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
34302
34416
|
}, []);
|
|
34303
|
-
|
|
34417
|
+
React13.useEffect(() => {
|
|
34304
34418
|
if (!isOpen) {
|
|
34305
34419
|
setSearchQuery("");
|
|
34306
34420
|
}
|
|
34307
34421
|
}, [isOpen]);
|
|
34308
|
-
const filteredProviders =
|
|
34422
|
+
const filteredProviders = React13.useMemo(() => {
|
|
34309
34423
|
if (!searchQuery) return providers;
|
|
34310
34424
|
const query = searchQuery.toLowerCase();
|
|
34311
34425
|
return providers.filter(
|
|
@@ -34603,9 +34717,9 @@ function ProviderSettings({
|
|
|
34603
34717
|
defaultTab = "general",
|
|
34604
34718
|
className = ""
|
|
34605
34719
|
}) {
|
|
34606
|
-
const [settings, setSettings] =
|
|
34607
|
-
const [hasChanges, setHasChanges] =
|
|
34608
|
-
|
|
34720
|
+
const [settings, setSettings] = React13.useState(initialSettings);
|
|
34721
|
+
const [hasChanges, setHasChanges] = React13.useState(false);
|
|
34722
|
+
React13.useEffect(() => {
|
|
34609
34723
|
setSettings(initialSettings);
|
|
34610
34724
|
setHasChanges(false);
|
|
34611
34725
|
}, [initialSettings]);
|
|
@@ -35837,11 +35951,11 @@ function RecurringServiceSetupModal({
|
|
|
35837
35951
|
cancel = "Cancel",
|
|
35838
35952
|
save = "Save"
|
|
35839
35953
|
} = labels;
|
|
35840
|
-
const instanceId =
|
|
35954
|
+
const instanceId = React13.useId();
|
|
35841
35955
|
const providerSelectId = `${instanceId}-provider`;
|
|
35842
35956
|
const serviceSelectId = `${instanceId}-service`;
|
|
35843
35957
|
const occurrenceSelectId = `${instanceId}-occurrence`;
|
|
35844
|
-
const [formData, setFormData] =
|
|
35958
|
+
const [formData, setFormData] = React13.useState(
|
|
35845
35959
|
initialData || {
|
|
35846
35960
|
providerId: "",
|
|
35847
35961
|
serviceId: "",
|
|
@@ -35849,7 +35963,7 @@ function RecurringServiceSetupModal({
|
|
|
35849
35963
|
overrideConsent: false
|
|
35850
35964
|
}
|
|
35851
35965
|
);
|
|
35852
|
-
|
|
35966
|
+
React13.useEffect(() => {
|
|
35853
35967
|
if (initialData) {
|
|
35854
35968
|
setFormData(initialData);
|
|
35855
35969
|
} else {
|
|
@@ -36062,9 +36176,9 @@ function RejectionModal({
|
|
|
36062
36176
|
isSubmitting = false,
|
|
36063
36177
|
variant = "danger"
|
|
36064
36178
|
}) {
|
|
36065
|
-
const [selectedReasonId, setSelectedReasonId] =
|
|
36066
|
-
const [details, setDetails] =
|
|
36067
|
-
|
|
36179
|
+
const [selectedReasonId, setSelectedReasonId] = React13.useState("");
|
|
36180
|
+
const [details, setDetails] = React13.useState("");
|
|
36181
|
+
React13.useEffect(() => {
|
|
36068
36182
|
if (!open) {
|
|
36069
36183
|
setSelectedReasonId("");
|
|
36070
36184
|
setDetails("");
|
|
@@ -36521,7 +36635,7 @@ function ReportDashboard({
|
|
|
36521
36635
|
)
|
|
36522
36636
|
] });
|
|
36523
36637
|
}
|
|
36524
|
-
var ResultsEntryForm =
|
|
36638
|
+
var ResultsEntryForm = React13.forwardRef(function ResultsEntryForm2({
|
|
36525
36639
|
employeeFirstName,
|
|
36526
36640
|
employeeLastName,
|
|
36527
36641
|
initialData = {},
|
|
@@ -36549,30 +36663,30 @@ var ResultsEntryForm = React12.forwardRef(function ResultsEntryForm2({
|
|
|
36549
36663
|
addProviderContact = "Click here to add a provider contact",
|
|
36550
36664
|
pleaseSelectResult = "Please select a result"
|
|
36551
36665
|
} = labels;
|
|
36552
|
-
const [result, setResult] =
|
|
36666
|
+
const [result, setResult] = React13.useState(
|
|
36553
36667
|
initialData.result ?? null
|
|
36554
36668
|
);
|
|
36555
|
-
const [alternateText, setAlternateText] =
|
|
36669
|
+
const [alternateText, setAlternateText] = React13.useState(
|
|
36556
36670
|
initialData.alternateText ?? ""
|
|
36557
36671
|
);
|
|
36558
|
-
const [dateDrawnValue, setDateDrawnValue] =
|
|
36672
|
+
const [dateDrawnValue, setDateDrawnValue] = React13.useState(
|
|
36559
36673
|
initialData.dateDrawn ?? ""
|
|
36560
36674
|
);
|
|
36561
|
-
const [dateCompletedValue, setDateCompletedValue] =
|
|
36675
|
+
const [dateCompletedValue, setDateCompletedValue] = React13.useState(
|
|
36562
36676
|
initialData.dateCompleted ?? ""
|
|
36563
36677
|
);
|
|
36564
|
-
const [recommendations, setRecommendations] =
|
|
36678
|
+
const [recommendations, setRecommendations] = React13.useState(
|
|
36565
36679
|
initialData.recommendations ?? ""
|
|
36566
36680
|
);
|
|
36567
|
-
const [files, setFiles] =
|
|
36568
|
-
const [selectedContacts, setSelectedContacts] =
|
|
36681
|
+
const [files, setFiles] = React13.useState(initialData.files ?? []);
|
|
36682
|
+
const [selectedContacts, setSelectedContacts] = React13.useState(
|
|
36569
36683
|
initialData.providerContacts ?? []
|
|
36570
36684
|
);
|
|
36571
|
-
const [applyToAll, setApplyToAll] =
|
|
36685
|
+
const [applyToAll, setApplyToAll] = React13.useState(
|
|
36572
36686
|
initialData.applyToAllServices ?? false
|
|
36573
36687
|
);
|
|
36574
|
-
const [showError, setShowError] =
|
|
36575
|
-
const fileInputRef =
|
|
36688
|
+
const [showError, setShowError] = React13.useState(false);
|
|
36689
|
+
const fileInputRef = React13.useRef(null);
|
|
36576
36690
|
const handleFileSelect = (e) => {
|
|
36577
36691
|
const selectedFiles = Array.from(e.target.files || []);
|
|
36578
36692
|
setFiles((prev) => [...prev, ...selectedFiles]);
|
|
@@ -36588,7 +36702,7 @@ var ResultsEntryForm = React12.forwardRef(function ResultsEntryForm2({
|
|
|
36588
36702
|
(prev) => prev.includes(contactId) ? prev.filter((id) => id !== contactId) : [...prev, contactId]
|
|
36589
36703
|
);
|
|
36590
36704
|
};
|
|
36591
|
-
const validateAndSubmit =
|
|
36705
|
+
const validateAndSubmit = React13.useCallback(() => {
|
|
36592
36706
|
if (!result) {
|
|
36593
36707
|
setShowError(true);
|
|
36594
36708
|
return;
|
|
@@ -36615,7 +36729,7 @@ var ResultsEntryForm = React12.forwardRef(function ResultsEntryForm2({
|
|
|
36615
36729
|
applyToAll,
|
|
36616
36730
|
onSubmit
|
|
36617
36731
|
]);
|
|
36618
|
-
|
|
36732
|
+
React13.useImperativeHandle(
|
|
36619
36733
|
ref,
|
|
36620
36734
|
() => ({
|
|
36621
36735
|
submit: validateAndSubmit
|
|
@@ -36891,7 +37005,7 @@ function ResultsEntryModal({
|
|
|
36891
37005
|
...props
|
|
36892
37006
|
}) {
|
|
36893
37007
|
const { submit = "Submit", close = "Close" } = labels;
|
|
36894
|
-
const formRef =
|
|
37008
|
+
const formRef = React13.useRef(null);
|
|
36895
37009
|
const employeeName = employeeFirstName || employeeLastName ? `${employeeFirstName ?? ""} ${employeeLastName ?? ""}`.trim() : void 0;
|
|
36896
37010
|
const handleSubmitClick = () => {
|
|
36897
37011
|
formRef.current?.submit();
|
|
@@ -37021,7 +37135,7 @@ function ScheduleCalendar({
|
|
|
37021
37135
|
isLoading = false,
|
|
37022
37136
|
className = ""
|
|
37023
37137
|
}) {
|
|
37024
|
-
const [currentDate, setCurrentDate] =
|
|
37138
|
+
const [currentDate, setCurrentDate] = React13.useState(selectedDate);
|
|
37025
37139
|
const formatTime4 = (date) => {
|
|
37026
37140
|
const d = typeof date === "string" ? new Date(date) : date;
|
|
37027
37141
|
return d.toLocaleTimeString("en-US", {
|
|
@@ -37361,19 +37475,19 @@ function PillSelect({
|
|
|
37361
37475
|
disabled = false,
|
|
37362
37476
|
className
|
|
37363
37477
|
}) {
|
|
37364
|
-
const [internalValue, setInternalValue] =
|
|
37478
|
+
const [internalValue, setInternalValue] = React13.useState(
|
|
37365
37479
|
defaultValue ?? options[0]?.value ?? ""
|
|
37366
37480
|
);
|
|
37367
|
-
const [expanded, setExpanded] =
|
|
37368
|
-
const triggerRef =
|
|
37369
|
-
const menuRef =
|
|
37370
|
-
const selectedOptionRef =
|
|
37371
|
-
const firstEnabledOptionRef =
|
|
37372
|
-
const listboxId =
|
|
37373
|
-
const [menuStyle, setMenuStyle] =
|
|
37481
|
+
const [expanded, setExpanded] = React13.useState(false);
|
|
37482
|
+
const triggerRef = React13.useRef(null);
|
|
37483
|
+
const menuRef = React13.useRef(null);
|
|
37484
|
+
const selectedOptionRef = React13.useRef(null);
|
|
37485
|
+
const firstEnabledOptionRef = React13.useRef(null);
|
|
37486
|
+
const listboxId = React13.useId();
|
|
37487
|
+
const [menuStyle, setMenuStyle] = React13.useState({});
|
|
37374
37488
|
const value = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
37375
37489
|
const selectedOption = options.find((o) => o.value === value);
|
|
37376
|
-
const close =
|
|
37490
|
+
const close = React13.useCallback((restoreFocus = false) => {
|
|
37377
37491
|
setExpanded(false);
|
|
37378
37492
|
if (restoreFocus) {
|
|
37379
37493
|
requestAnimationFrame(
|
|
@@ -37381,7 +37495,7 @@ function PillSelect({
|
|
|
37381
37495
|
);
|
|
37382
37496
|
}
|
|
37383
37497
|
}, []);
|
|
37384
|
-
const updateMenuPosition =
|
|
37498
|
+
const updateMenuPosition = React13.useCallback(() => {
|
|
37385
37499
|
const trigger = triggerRef.current;
|
|
37386
37500
|
if (!trigger) return;
|
|
37387
37501
|
const rect = trigger.getBoundingClientRect();
|
|
@@ -37402,7 +37516,7 @@ function PillSelect({
|
|
|
37402
37516
|
zIndex: 9999
|
|
37403
37517
|
});
|
|
37404
37518
|
}, []);
|
|
37405
|
-
|
|
37519
|
+
React13.useEffect(() => {
|
|
37406
37520
|
if (!expanded) return;
|
|
37407
37521
|
updateMenuPosition();
|
|
37408
37522
|
window.addEventListener("scroll", updateMenuPosition, true);
|
|
@@ -37412,7 +37526,7 @@ function PillSelect({
|
|
|
37412
37526
|
window.removeEventListener("resize", updateMenuPosition);
|
|
37413
37527
|
};
|
|
37414
37528
|
}, [expanded, updateMenuPosition]);
|
|
37415
|
-
|
|
37529
|
+
React13.useEffect(() => {
|
|
37416
37530
|
if (!expanded) return;
|
|
37417
37531
|
const handleClickOutside = (event) => {
|
|
37418
37532
|
const target = event.target;
|
|
@@ -37424,7 +37538,7 @@ function PillSelect({
|
|
|
37424
37538
|
document.addEventListener("mousedown", handleClickOutside);
|
|
37425
37539
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
37426
37540
|
}, [close, expanded]);
|
|
37427
|
-
|
|
37541
|
+
React13.useEffect(() => {
|
|
37428
37542
|
if (!expanded) return;
|
|
37429
37543
|
requestAnimationFrame(() => {
|
|
37430
37544
|
(selectedOptionRef.current ?? firstEnabledOptionRef.current)?.focus({
|
|
@@ -37643,7 +37757,7 @@ function SubCategoryAccordion({
|
|
|
37643
37757
|
onServiceClick,
|
|
37644
37758
|
index
|
|
37645
37759
|
}) {
|
|
37646
|
-
const [isExpanded, setIsExpanded] =
|
|
37760
|
+
const [isExpanded, setIsExpanded] = React13.useState(
|
|
37647
37761
|
subCategory.defaultExpanded ?? false
|
|
37648
37762
|
);
|
|
37649
37763
|
const contentId = `sub-content-${index}`;
|
|
@@ -37710,7 +37824,7 @@ function CategoryAccordionItem({
|
|
|
37710
37824
|
onExpandChange
|
|
37711
37825
|
}) {
|
|
37712
37826
|
const isControlled = expandedCategories !== void 0;
|
|
37713
|
-
const [internalExpanded, setInternalExpanded] =
|
|
37827
|
+
const [internalExpanded, setInternalExpanded] = React13.useState(
|
|
37714
37828
|
category.defaultExpanded ?? false
|
|
37715
37829
|
);
|
|
37716
37830
|
const isExpanded = isControlled ? expandedCategories.includes(category.name) : internalExpanded;
|
|
@@ -37808,7 +37922,7 @@ function ServiceAccordion({
|
|
|
37808
37922
|
className,
|
|
37809
37923
|
"aria-label": ariaLabel = "Service categories"
|
|
37810
37924
|
}) {
|
|
37811
|
-
const [internalExpanded, setInternalExpanded] =
|
|
37925
|
+
const [internalExpanded, setInternalExpanded] = React13.useState([]);
|
|
37812
37926
|
const isControlled = controlledExpanded !== void 0;
|
|
37813
37927
|
const expanded = isControlled ? controlledExpanded : internalExpanded;
|
|
37814
37928
|
const handleExpandChange = (categoryName, isExpanded) => {
|
|
@@ -38100,7 +38214,7 @@ function ServiceBadgeGroup({
|
|
|
38100
38214
|
size = "md",
|
|
38101
38215
|
onShowMore
|
|
38102
38216
|
}) {
|
|
38103
|
-
const badges =
|
|
38217
|
+
const badges = React13.Children.toArray(children);
|
|
38104
38218
|
const visibleBadges = maxVisible ? badges.slice(0, maxVisible) : badges;
|
|
38105
38219
|
const hiddenCount = maxVisible ? badges.length - maxVisible : 0;
|
|
38106
38220
|
return /* @__PURE__ */ jsxs(
|
|
@@ -38953,15 +39067,15 @@ function ServicePicker({
|
|
|
38953
39067
|
fullWidth = false,
|
|
38954
39068
|
className
|
|
38955
39069
|
}) {
|
|
38956
|
-
const [searchQuery, setSearchQuery] =
|
|
38957
|
-
const [expandedGroups, setExpandedGroups] =
|
|
39070
|
+
const [searchQuery, setSearchQuery] = React13.useState("");
|
|
39071
|
+
const [expandedGroups, setExpandedGroups] = React13.useState(
|
|
38958
39072
|
/* @__PURE__ */ new Set()
|
|
38959
39073
|
);
|
|
38960
|
-
const filteredGroups =
|
|
39074
|
+
const filteredGroups = React13.useMemo(
|
|
38961
39075
|
() => filterServices(groups, searchQuery),
|
|
38962
39076
|
[groups, searchQuery]
|
|
38963
39077
|
);
|
|
38964
|
-
const searchResults =
|
|
39078
|
+
const searchResults = React13.useMemo(
|
|
38965
39079
|
() => searchQuery ? flattenServices(filteredGroups) : [],
|
|
38966
39080
|
[filteredGroups, searchQuery]
|
|
38967
39081
|
);
|
|
@@ -39410,16 +39524,16 @@ function ServicePricingManager({
|
|
|
39410
39524
|
categories: _categories = [],
|
|
39411
39525
|
className = ""
|
|
39412
39526
|
}) {
|
|
39413
|
-
const [searchTerm, setSearchTerm] =
|
|
39414
|
-
const [selectedCategory, setSelectedCategory] =
|
|
39527
|
+
const [searchTerm, setSearchTerm] = React13.useState("");
|
|
39528
|
+
const [selectedCategory, setSelectedCategory] = React13.useState(
|
|
39415
39529
|
null
|
|
39416
39530
|
);
|
|
39417
|
-
const [editingService, setEditingService] =
|
|
39418
|
-
const [editPrice, setEditPrice] =
|
|
39419
|
-
const [editEmployerPrice, setEditEmployerPrice] =
|
|
39420
|
-
const [showBulkModal, setShowBulkModal] =
|
|
39421
|
-
const [bulkAdjustment, setBulkAdjustment] =
|
|
39422
|
-
const [bulkAdjustmentType, setBulkAdjustmentType] =
|
|
39531
|
+
const [editingService, setEditingService] = React13.useState(null);
|
|
39532
|
+
const [editPrice, setEditPrice] = React13.useState("");
|
|
39533
|
+
const [editEmployerPrice, setEditEmployerPrice] = React13.useState("");
|
|
39534
|
+
const [showBulkModal, setShowBulkModal] = React13.useState(false);
|
|
39535
|
+
const [bulkAdjustment, setBulkAdjustment] = React13.useState("");
|
|
39536
|
+
const [bulkAdjustmentType, setBulkAdjustmentType] = React13.useState("percent");
|
|
39423
39537
|
const formatCurrency3 = (amount) => {
|
|
39424
39538
|
return new Intl.NumberFormat("en-US", {
|
|
39425
39539
|
style: "currency",
|
|
@@ -39810,7 +39924,7 @@ function ServiceShippingSettings({
|
|
|
39810
39924
|
isSaving = false,
|
|
39811
39925
|
className = ""
|
|
39812
39926
|
}) {
|
|
39813
|
-
const [address, setAddress] =
|
|
39927
|
+
const [address, setAddress] = React13.useState(
|
|
39814
39928
|
defaultAddress || {
|
|
39815
39929
|
name: "",
|
|
39816
39930
|
street1: "",
|
|
@@ -40012,7 +40126,7 @@ function SetupServiceModal({
|
|
|
40012
40126
|
errorMessage,
|
|
40013
40127
|
title = "Add New Service"
|
|
40014
40128
|
}) {
|
|
40015
|
-
const [formData, setFormData] =
|
|
40129
|
+
const [formData, setFormData] = React13.useState({
|
|
40016
40130
|
name: "",
|
|
40017
40131
|
description: "",
|
|
40018
40132
|
price: 0,
|
|
@@ -40022,7 +40136,7 @@ function SetupServiceModal({
|
|
|
40022
40136
|
initialInventory: void 0,
|
|
40023
40137
|
autoAcceptReferrals: false
|
|
40024
40138
|
});
|
|
40025
|
-
|
|
40139
|
+
React13.useEffect(() => {
|
|
40026
40140
|
if (!open) {
|
|
40027
40141
|
setFormData({
|
|
40028
40142
|
name: "",
|
|
@@ -41058,7 +41172,7 @@ function NewsletterForm({
|
|
|
41058
41172
|
isLoading = false,
|
|
41059
41173
|
className
|
|
41060
41174
|
}) {
|
|
41061
|
-
const [email, setEmail] =
|
|
41175
|
+
const [email, setEmail] = React13.useState("");
|
|
41062
41176
|
function handleSubmit(e) {
|
|
41063
41177
|
e.preventDefault();
|
|
41064
41178
|
if (email.trim()) {
|
|
@@ -41183,7 +41297,7 @@ function LegalLinks({
|
|
|
41183
41297
|
{
|
|
41184
41298
|
"data-slot": "site-footer-legal",
|
|
41185
41299
|
className: cn("flex flex-wrap items-center gap-x-4 gap-y-1", className),
|
|
41186
|
-
children: links.map((link, index) => /* @__PURE__ */ jsxs(
|
|
41300
|
+
children: links.map((link, index) => /* @__PURE__ */ jsxs(React13.Fragment, { children: [
|
|
41187
41301
|
index > 0 && /* @__PURE__ */ jsx(
|
|
41188
41302
|
"span",
|
|
41189
41303
|
{
|
|
@@ -41674,9 +41788,9 @@ function UserMenu({
|
|
|
41674
41788
|
menuItems = [],
|
|
41675
41789
|
className
|
|
41676
41790
|
}) {
|
|
41677
|
-
const [isOpen, setIsOpen] =
|
|
41678
|
-
const menuRef =
|
|
41679
|
-
|
|
41791
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
41792
|
+
const menuRef = React13.useRef(null);
|
|
41793
|
+
React13.useEffect(() => {
|
|
41680
41794
|
function handleClickOutside(event) {
|
|
41681
41795
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
41682
41796
|
setIsOpen(false);
|
|
@@ -41969,7 +42083,7 @@ function SiteHeader({
|
|
|
41969
42083
|
userMenuItems,
|
|
41970
42084
|
className
|
|
41971
42085
|
}) {
|
|
41972
|
-
const [mobileMenuOpen, setMobileMenuOpen] =
|
|
42086
|
+
const [mobileMenuOpen, setMobileMenuOpen] = React13.useState(false);
|
|
41973
42087
|
const colorVariant = variant === "primary" || variant === "transparent" ? "light" : "dark";
|
|
41974
42088
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41975
42089
|
/* @__PURE__ */ jsx("div", { "data-slot": "site-header-spacer", className: "h-16", "aria-hidden": "true" }),
|
|
@@ -42341,29 +42455,29 @@ function SSOConfigForm({
|
|
|
42341
42455
|
delete: deleteLabel = "Delete SSO",
|
|
42342
42456
|
cancel = "Cancel"
|
|
42343
42457
|
} = labels;
|
|
42344
|
-
const [clientDomain, setClientDomain] =
|
|
42458
|
+
const [clientDomain, setClientDomain] = React13.useState(
|
|
42345
42459
|
initialData.clientDomain ?? ""
|
|
42346
42460
|
);
|
|
42347
|
-
const [ssoLoginUrl, setSsoLoginUrl] =
|
|
42461
|
+
const [ssoLoginUrl, setSsoLoginUrl] = React13.useState(
|
|
42348
42462
|
initialData.ssoLoginUrl ?? ""
|
|
42349
42463
|
);
|
|
42350
|
-
const [ssoLogoutUrl, setSsoLogoutUrl] =
|
|
42464
|
+
const [ssoLogoutUrl, setSsoLogoutUrl] = React13.useState(
|
|
42351
42465
|
initialData.ssoLogoutUrl ?? ""
|
|
42352
42466
|
);
|
|
42353
|
-
const [forceReauth, setForceReauth] =
|
|
42467
|
+
const [forceReauth, setForceReauth] = React13.useState(
|
|
42354
42468
|
initialData.forceReauthentication ?? false
|
|
42355
42469
|
);
|
|
42356
|
-
const [idpSigns, setIdpSigns] =
|
|
42470
|
+
const [idpSigns, setIdpSigns] = React13.useState(
|
|
42357
42471
|
initialData.idpSignsRequest ?? false
|
|
42358
42472
|
);
|
|
42359
|
-
const [allowUnencrypted, setAllowUnencrypted] =
|
|
42473
|
+
const [allowUnencrypted, setAllowUnencrypted] = React13.useState(
|
|
42360
42474
|
initialData.allowUnencryptedAssertion ?? false
|
|
42361
42475
|
);
|
|
42362
|
-
const [certificateFile, setCertificateFile] =
|
|
42476
|
+
const [certificateFile, setCertificateFile] = React13.useState(
|
|
42363
42477
|
null
|
|
42364
42478
|
);
|
|
42365
|
-
const fileInputRef =
|
|
42366
|
-
const [errors, setErrors] =
|
|
42479
|
+
const fileInputRef = React13.useRef(null);
|
|
42480
|
+
const [errors, setErrors] = React13.useState({});
|
|
42367
42481
|
const validate = () => {
|
|
42368
42482
|
const newErrors = {};
|
|
42369
42483
|
if (!clientDomain.trim()) {
|
|
@@ -42721,7 +42835,7 @@ function StepIndicator({
|
|
|
42721
42835
|
const status = getStepStatus(index);
|
|
42722
42836
|
const isLast = index === steps.length - 1;
|
|
42723
42837
|
const clickable = isClickable(index);
|
|
42724
|
-
return /* @__PURE__ */ jsxs(
|
|
42838
|
+
return /* @__PURE__ */ jsxs(React13.Fragment, { children: [
|
|
42725
42839
|
/* @__PURE__ */ jsxs("div", { className: `flex flex-row items-center ${sizes.gap}`, children: [
|
|
42726
42840
|
circleButton(step, index, status, clickable),
|
|
42727
42841
|
stepLabel(step, status, false)
|
|
@@ -42938,10 +43052,10 @@ function TableOfContents({
|
|
|
42938
43052
|
scrollSpyOptions,
|
|
42939
43053
|
className
|
|
42940
43054
|
}) {
|
|
42941
|
-
const [discoveredItems, setDiscoveredItems] =
|
|
43055
|
+
const [discoveredItems, setDiscoveredItems] = React13.useState([]);
|
|
42942
43056
|
const flatItems = manualItems ?? discoveredItems;
|
|
42943
43057
|
const contentEl = contentRef?.current ?? null;
|
|
42944
|
-
|
|
43058
|
+
React13.useEffect(() => {
|
|
42945
43059
|
if (manualItems) return;
|
|
42946
43060
|
const container = contentEl ?? document;
|
|
42947
43061
|
let frameId = null;
|
|
@@ -42972,7 +43086,7 @@ function TableOfContents({
|
|
|
42972
43086
|
if (frameId !== null) cancelAnimationFrame(frameId);
|
|
42973
43087
|
};
|
|
42974
43088
|
}, [manualItems, selector, maxDepth, contentEl]);
|
|
42975
|
-
const ids =
|
|
43089
|
+
const ids = React13.useMemo(() => flatItems.map((i) => i.id), [flatItems]);
|
|
42976
43090
|
const isControlled = controlledActiveId !== void 0;
|
|
42977
43091
|
const { activeId: spyActiveId } = useScrollSpy({
|
|
42978
43092
|
ids,
|
|
@@ -42981,12 +43095,12 @@ function TableOfContents({
|
|
|
42981
43095
|
...scrollSpyOptions
|
|
42982
43096
|
});
|
|
42983
43097
|
const activeId = isControlled ? controlledActiveId : spyActiveId;
|
|
42984
|
-
|
|
43098
|
+
React13.useEffect(() => {
|
|
42985
43099
|
if (!isControlled && onActiveChange) {
|
|
42986
43100
|
onActiveChange(spyActiveId);
|
|
42987
43101
|
}
|
|
42988
43102
|
}, [spyActiveId, isControlled, onActiveChange]);
|
|
42989
|
-
const handleClick =
|
|
43103
|
+
const handleClick = React13.useCallback(
|
|
42990
43104
|
(e, id) => {
|
|
42991
43105
|
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) {
|
|
42992
43106
|
return;
|
|
@@ -43007,7 +43121,7 @@ function TableOfContents({
|
|
|
43007
43121
|
},
|
|
43008
43122
|
[contentEl, scrollOffset, smooth]
|
|
43009
43123
|
);
|
|
43010
|
-
const tree =
|
|
43124
|
+
const tree = React13.useMemo(() => nestItems(flatItems), [flatItems]);
|
|
43011
43125
|
if (hideWhenEmpty && tree.length === 0) return null;
|
|
43012
43126
|
return /* @__PURE__ */ jsxs("nav", { "aria-label": "Table of contents", className: cn("text-sm", className), children: [
|
|
43013
43127
|
title && /* @__PURE__ */ jsx("p", { className: "text-foreground mb-3 font-semibold", children: title }),
|
|
@@ -43612,7 +43726,7 @@ function WebChartReportViewer({
|
|
|
43612
43726
|
dateFrom = "From",
|
|
43613
43727
|
dateTo = "To"
|
|
43614
43728
|
} = labels;
|
|
43615
|
-
const [modalOpen, setModalOpen] =
|
|
43729
|
+
const [modalOpen, setModalOpen] = React13.useState(false);
|
|
43616
43730
|
const handleReportClick = (report) => {
|
|
43617
43731
|
onReportSelect?.(report);
|
|
43618
43732
|
setModalOpen(true);
|
|
@@ -43850,7 +43964,7 @@ function ReportTimeRange({
|
|
|
43850
43964
|
],
|
|
43851
43965
|
className
|
|
43852
43966
|
}) {
|
|
43853
|
-
const [preset, setPreset] =
|
|
43967
|
+
const [preset, setPreset] = React13.useState("this-month");
|
|
43854
43968
|
const handlePresetChange = (value) => {
|
|
43855
43969
|
setPreset(value);
|
|
43856
43970
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -43952,7 +44066,7 @@ function isValidUrl(url) {
|
|
|
43952
44066
|
}
|
|
43953
44067
|
}
|
|
43954
44068
|
}
|
|
43955
|
-
var WebsiteInput =
|
|
44069
|
+
var WebsiteInput = React13.forwardRef(
|
|
43956
44070
|
({
|
|
43957
44071
|
value = "",
|
|
43958
44072
|
onChange,
|
|
@@ -43963,7 +44077,7 @@ var WebsiteInput = React12.forwardRef(
|
|
|
43963
44077
|
error,
|
|
43964
44078
|
...props
|
|
43965
44079
|
}, ref) => {
|
|
43966
|
-
const [localError, setLocalError] =
|
|
44080
|
+
const [localError, setLocalError] = React13.useState();
|
|
43967
44081
|
const handleChange = (e) => {
|
|
43968
44082
|
onChange?.(e.target.value);
|
|
43969
44083
|
if (localError) {
|
|
@@ -44045,7 +44159,7 @@ function WebsiteInputGroup({
|
|
|
44045
44159
|
typeLabels,
|
|
44046
44160
|
className
|
|
44047
44161
|
}) {
|
|
44048
|
-
const websites =
|
|
44162
|
+
const websites = React13.useMemo(() => {
|
|
44049
44163
|
if (value.length >= minEntries) return value;
|
|
44050
44164
|
const padding = Array(minEntries - value.length).fill(null).map(() => ({ url: "", type: "website" }));
|
|
44051
44165
|
return [...value, ...padding];
|
|
@@ -44193,6 +44307,6 @@ function WebsiteInputGroup({
|
|
|
44193
44307
|
}
|
|
44194
44308
|
WebsiteInputGroup.displayName = "WebsiteInputGroup";
|
|
44195
44309
|
|
|
44196
|
-
export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clearVoiceprints, clearWhatPrints, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getVoiceprints, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, loadWhatPrints, medicationToOrder, mergeTurns, openRollingRecorder, orderToMedication, orderTypeForCodetype, panelVariants as reconciliationPanelVariants, saveWhatPrints, setVoiceprints, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
|
|
44310
|
+
export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clearVoiceprints, clearWhatPrints, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getVoiceprints, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, loadWhatPrints, medicationToOrder, mergeTurns, normalizeConditionCodingSystem, openRollingRecorder, orderToMedication, orderTypeForCodetype, panelVariants as reconciliationPanelVariants, saveWhatPrints, setVoiceprints, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
|
|
44197
44311
|
//# sourceMappingURL=index.js.map
|
|
44198
44312
|
//# sourceMappingURL=index.js.map
|