@medplum/react 3.1.10 → 3.1.11

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.
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
-
3
1
  import { AccessPolicyResource } from '@medplum/fhirtypes';
4
2
  import { Address } from '@medplum/fhirtypes';
5
3
  import { AnchorProps } from '@mantine/core';
@@ -492,7 +490,7 @@ export declare interface DateTimeInputProps extends PrimitiveTypeInputProps {
492
490
 
493
491
  export declare function DefaultResourceTimeline(props: DefaultResourceTimelineProps): JSX.Element;
494
492
 
495
- export declare interface DefaultResourceTimelineProps {
493
+ export declare interface DefaultResourceTimelineProps extends Pick<ResourceTimelineProps<Resource>, 'getMenu'> {
496
494
  readonly resource: Resource | Reference;
497
495
  }
498
496
 
@@ -551,7 +549,7 @@ export declare interface ElementDefinitionTypeInputProps extends Pick<ResourcePr
551
549
 
552
550
  export declare function EncounterTimeline(props: EncounterTimelineProps): JSX.Element;
553
551
 
554
- export declare interface EncounterTimelineProps {
552
+ export declare interface EncounterTimelineProps extends Pick<ResourceTimelineProps<Encounter>, 'getMenu'> {
555
553
  readonly encounter: Encounter | Reference<Encounter>;
556
554
  }
557
555
 
@@ -895,7 +893,7 @@ export declare interface PatientSummaryProps extends Omit<CardProps, 'children'>
895
893
 
896
894
  export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;
897
895
 
898
- export declare interface PatientTimelineProps {
896
+ export declare interface PatientTimelineProps extends Pick<ResourceTimelineProps<Patient>, 'getMenu'> {
899
897
  readonly patient: Patient | Reference<Patient>;
900
898
  }
901
899
 
@@ -941,8 +939,8 @@ export declare interface QuestionnaireBuilderProps {
941
939
  export declare function QuestionnaireForm(props: QuestionnaireFormProps): JSX.Element | null;
942
940
 
943
941
  export declare const QuestionnaireFormContext: Context< {
944
- subject?: Reference<Resource> | undefined;
945
- encounter?: Reference<Encounter> | undefined;
942
+ subject?: Reference;
943
+ encounter?: Reference<Encounter>;
946
944
  }>;
947
945
 
948
946
  export declare interface QuestionnaireFormProps {
@@ -1216,11 +1214,18 @@ export declare interface ResourceTableProps {
1216
1214
 
1217
1215
  export declare function ResourceTimeline<T extends Resource>(props: ResourceTimelineProps<T>): JSX.Element;
1218
1216
 
1217
+ export declare interface ResourceTimelineMenuItemContext {
1218
+ readonly primaryResource: Resource;
1219
+ readonly currentResource: Resource;
1220
+ readonly reloadTimeline: () => void;
1221
+ }
1222
+
1219
1223
  export declare interface ResourceTimelineProps<T extends Resource> {
1220
1224
  readonly value: T | Reference<T>;
1221
1225
  readonly loadTimelineResources: (medplum: MedplumClient, resourceType: ResourceType, id: string) => Promise<PromiseSettledResult<Bundle>[]>;
1222
1226
  readonly createCommunication?: (resource: T, sender: ProfileResource, text: string) => Communication;
1223
1227
  readonly createMedia?: (resource: T, operator: ProfileResource, attachment: Attachment) => Media;
1228
+ readonly getMenu?: (context: ResourceTimelineMenuItemContext) => ReactNode;
1224
1229
  }
1225
1230
 
1226
1231
  export declare function Scheduler(props: SchedulerProps): JSX.Element | null;
@@ -1325,7 +1330,7 @@ export declare class SearchLoadEvent extends Event {
1325
1330
 
1326
1331
  export declare function ServiceRequestTimeline(props: ServiceRequestTimelineProps): JSX.Element;
1327
1332
 
1328
- export declare interface ServiceRequestTimelineProps {
1333
+ export declare interface ServiceRequestTimelineProps extends Pick<ResourceTimelineProps<ServiceRequest>, 'getMenu'> {
1329
1334
  readonly serviceRequest: ServiceRequest | Reference<ServiceRequest>;
1330
1335
  }
1331
1336
 
@@ -1439,8 +1444,8 @@ export declare function Timeline(props: TimelineProps): JSX.Element;
1439
1444
 
1440
1445
  export declare function TimelineItem(props: TimelineItemProps): JSX.Element;
1441
1446
 
1442
- export declare interface TimelineItemProps extends PanelProps {
1443
- readonly resource: Resource;
1447
+ export declare interface TimelineItemProps<T extends Resource = Resource> extends PanelProps {
1448
+ readonly resource: T;
1444
1449
  readonly profile?: Reference;
1445
1450
  readonly dateTime?: string;
1446
1451
  readonly padding?: boolean;
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
-
3
1
  import { AccessPolicyResource } from '@medplum/fhirtypes';
4
2
  import { Address } from '@medplum/fhirtypes';
5
3
  import { AnchorProps } from '@mantine/core';
@@ -492,7 +490,7 @@ export declare interface DateTimeInputProps extends PrimitiveTypeInputProps {
492
490
 
493
491
  export declare function DefaultResourceTimeline(props: DefaultResourceTimelineProps): JSX.Element;
494
492
 
495
- export declare interface DefaultResourceTimelineProps {
493
+ export declare interface DefaultResourceTimelineProps extends Pick<ResourceTimelineProps<Resource>, 'getMenu'> {
496
494
  readonly resource: Resource | Reference;
497
495
  }
498
496
 
@@ -551,7 +549,7 @@ export declare interface ElementDefinitionTypeInputProps extends Pick<ResourcePr
551
549
 
552
550
  export declare function EncounterTimeline(props: EncounterTimelineProps): JSX.Element;
553
551
 
554
- export declare interface EncounterTimelineProps {
552
+ export declare interface EncounterTimelineProps extends Pick<ResourceTimelineProps<Encounter>, 'getMenu'> {
555
553
  readonly encounter: Encounter | Reference<Encounter>;
556
554
  }
557
555
 
@@ -895,7 +893,7 @@ export declare interface PatientSummaryProps extends Omit<CardProps, 'children'>
895
893
 
896
894
  export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;
897
895
 
898
- export declare interface PatientTimelineProps {
896
+ export declare interface PatientTimelineProps extends Pick<ResourceTimelineProps<Patient>, 'getMenu'> {
899
897
  readonly patient: Patient | Reference<Patient>;
900
898
  }
901
899
 
@@ -941,8 +939,8 @@ export declare interface QuestionnaireBuilderProps {
941
939
  export declare function QuestionnaireForm(props: QuestionnaireFormProps): JSX.Element | null;
942
940
 
943
941
  export declare const QuestionnaireFormContext: Context< {
944
- subject?: Reference<Resource> | undefined;
945
- encounter?: Reference<Encounter> | undefined;
942
+ subject?: Reference;
943
+ encounter?: Reference<Encounter>;
946
944
  }>;
947
945
 
948
946
  export declare interface QuestionnaireFormProps {
@@ -1216,11 +1214,18 @@ export declare interface ResourceTableProps {
1216
1214
 
1217
1215
  export declare function ResourceTimeline<T extends Resource>(props: ResourceTimelineProps<T>): JSX.Element;
1218
1216
 
1217
+ export declare interface ResourceTimelineMenuItemContext {
1218
+ readonly primaryResource: Resource;
1219
+ readonly currentResource: Resource;
1220
+ readonly reloadTimeline: () => void;
1221
+ }
1222
+
1219
1223
  export declare interface ResourceTimelineProps<T extends Resource> {
1220
1224
  readonly value: T | Reference<T>;
1221
1225
  readonly loadTimelineResources: (medplum: MedplumClient, resourceType: ResourceType, id: string) => Promise<PromiseSettledResult<Bundle>[]>;
1222
1226
  readonly createCommunication?: (resource: T, sender: ProfileResource, text: string) => Communication;
1223
1227
  readonly createMedia?: (resource: T, operator: ProfileResource, attachment: Attachment) => Media;
1228
+ readonly getMenu?: (context: ResourceTimelineMenuItemContext) => ReactNode;
1224
1229
  }
1225
1230
 
1226
1231
  export declare function Scheduler(props: SchedulerProps): JSX.Element | null;
@@ -1325,7 +1330,7 @@ export declare class SearchLoadEvent extends Event {
1325
1330
 
1326
1331
  export declare function ServiceRequestTimeline(props: ServiceRequestTimelineProps): JSX.Element;
1327
1332
 
1328
- export declare interface ServiceRequestTimelineProps {
1333
+ export declare interface ServiceRequestTimelineProps extends Pick<ResourceTimelineProps<ServiceRequest>, 'getMenu'> {
1329
1334
  readonly serviceRequest: ServiceRequest | Reference<ServiceRequest>;
1330
1335
  }
1331
1336
 
@@ -1439,8 +1444,8 @@ export declare function Timeline(props: TimelineProps): JSX.Element;
1439
1444
 
1440
1445
  export declare function TimelineItem(props: TimelineItemProps): JSX.Element;
1441
1446
 
1442
- export declare interface TimelineItemProps extends PanelProps {
1443
- readonly resource: Resource;
1447
+ export declare interface TimelineItemProps<T extends Resource = Resource> extends PanelProps {
1448
+ readonly resource: T;
1444
1449
  readonly profile?: Reference;
1445
1450
  readonly dateTime?: string;
1446
1451
  readonly padding?: boolean;