@medplum/react 5.1.11 → 5.1.13

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.
@@ -411,6 +411,26 @@ export declare interface BaseInputProps {
411
411
  readonly outcome?: OperationOutcome;
412
412
  }
413
413
 
414
+ /**
415
+ * A generic widget to choose an option by date/time. Renders a monthly
416
+ * calendar UI and lets the viewer drill down into options on a given day.
417
+ *
418
+ * @param props - The React props
419
+ * @param props.actor - A Reference or Resource to the actor being scheduled against (typically a Practitioner)
420
+ * @param props.fetchOptions - A function that fetches SchedulingOption pairs. If this is not a stable function it can cause duplicate queries.
421
+ * @param props.onSelectOption - A callback invoked when a specific option is selected
422
+ * @param props.children - React nodes to render inside the scheduler container
423
+ * @returns the JSX Element
424
+ */
425
+ export declare function BaseScheduler<T>(props: BaseSchedulerProps<T>): JSX.Element | null;
426
+
427
+ export declare interface BaseSchedulerProps<T> {
428
+ readonly actor?: Reference | Resource;
429
+ readonly fetchOptions: FetchOptionsFunction<T>;
430
+ readonly children?: React.ReactNode;
431
+ readonly onSelectOption?: (el: T, date: Date) => void;
432
+ }
433
+
414
434
  /**
415
435
  * Returns a field display name.
416
436
  * @param key - The field key.
@@ -422,6 +442,14 @@ export declare function buildInitialResponse(questionnaire: Questionnaire, quest
422
442
 
423
443
  export declare function buildInitialResponseItem(item: QuestionnaireItem): QuestionnaireResponseItem;
424
444
 
445
+ export declare function CalendarDateInput(props: CalendarDateInputProps): JSX.Element;
446
+
447
+ export declare interface CalendarDateInputProps {
448
+ readonly availableDates: Date[];
449
+ readonly onChangeMonth: (date: Date) => void;
450
+ readonly onClick: (date: Date) => void;
451
+ }
452
+
425
453
  export declare function CalendarInput(props: CalendarInputProps): JSX.Element;
426
454
 
427
455
  export declare interface CalendarInputProps {
@@ -577,6 +605,8 @@ export declare function convertIsoToLocal(isoString: string | undefined): string
577
605
  */
578
606
  export declare function convertLocalToIso(localString: string | undefined): string;
579
607
 
608
+ export declare function convertToPCM16(float32Array: Float32Array): Uint8Array;
609
+
580
610
  /**
581
611
  * Labs section — searches for both ServiceRequest and DiagnosticReport resources.
582
612
  * Accepts an optional `onRequestLabs` callback via closure.
@@ -746,6 +776,8 @@ export declare function evaluateCalculatedExpressionsInQuestionnaire(items: Ques
746
776
  */
747
777
  export declare function exportJsonFile(jsonString: string, fileName?: string): void;
748
778
 
779
+ export declare type FetchOptionsFunction<T> = (period: Period) => Promise<SchedulingOption<T>[]>;
780
+
749
781
  /**
750
782
  * The FhirPathTable component represents the embeddable search table control.
751
783
  * @param props - FhirPathTable React props.
@@ -1599,6 +1631,7 @@ export declare function RegisterForm(props: RegisterFormProps): JSX.Element;
1599
1631
 
1600
1632
  export declare interface RegisterFormProps {
1601
1633
  readonly type: 'patient' | 'project';
1634
+ readonly login?: string;
1602
1635
  readonly projectId?: string;
1603
1636
  readonly clientId?: string;
1604
1637
  readonly googleClientId?: string;
@@ -1844,6 +1877,8 @@ export declare interface SchedulerProps {
1844
1877
  children?: React.ReactNode;
1845
1878
  }
1846
1879
 
1880
+ declare type SchedulingOption<T> = [T, Date];
1881
+
1847
1882
  export declare class SearchChangeEvent extends Event {
1848
1883
  readonly definition: SearchRequest;
1849
1884
  constructor(definition: SearchRequest);
@@ -2230,6 +2265,11 @@ export declare interface TimingInputProps extends ComplexTypeInputProps<Timing>
2230
2265
  */
2231
2266
  export declare function toggleSort(definition: SearchRequest, key: string): SearchRequest;
2232
2267
 
2268
+ export declare type TranscriptItem = {
2269
+ text: string;
2270
+ timestamp: string;
2271
+ };
2272
+
2233
2273
  export declare function typedValueToResponseItem(item: QuestionnaireItem, value: TypedValue): QuestionnaireResponseItemAnswer | undefined;
2234
2274
 
2235
2275
  export declare const useCachedBinaryUrl: (binaryUrl: string | undefined) => string | undefined;
@@ -2441,6 +2481,23 @@ export declare interface UseThreadInboxReturn {
2441
2481
  refreshThreadMessages: () => Promise<void>;
2442
2482
  }
2443
2483
 
2484
+ export declare function useWhisper({ language, model, onTranscript, }: UseWhisperOptions): UseWhisperResult;
2485
+
2486
+ export declare type UseWhisperOptions = {
2487
+ language?: string;
2488
+ model?: string;
2489
+ onTranscript?: (text: string) => void;
2490
+ };
2491
+
2492
+ export declare type UseWhisperResult = {
2493
+ status: WhisperStatus;
2494
+ error: unknown;
2495
+ transcripts: TranscriptItem[];
2496
+ start: () => Promise<void>;
2497
+ stop: () => void;
2498
+ isListening: boolean;
2499
+ };
2500
+
2444
2501
  /**
2445
2502
  * A low-level component to autocomplete based on a FHIR Valueset.
2446
2503
  * This is the base component for CodeableConceptInput, CodingInput, and CodeInput.
@@ -2462,4 +2519,6 @@ export declare function valueSetElementToCoding(element: ValueSetExpansionContai
2462
2519
  /** Vitals section — searches for Observation resources with category vital-signs. */
2463
2520
  export declare const VitalsSection: PatientSummarySectionConfig;
2464
2521
 
2522
+ export declare type WhisperStatus = 'idle' | 'requesting_microphone' | 'connecting' | 'connected' | 'listening' | 'speech_started' | 'speech_stopped' | 'disconnected' | 'error';
2523
+
2465
2524
  export { }