@medplum/react 5.1.36 → 5.1.38
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/cjs/index.cjs +4 -4
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +58 -1
- package/dist/esm/index.d.ts +58 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +17 -15
package/dist/cjs/index.d.ts
CHANGED
|
@@ -517,7 +517,7 @@ export declare interface CalendarDateInputProps {
|
|
|
517
517
|
/** Called with the day picked. */
|
|
518
518
|
readonly onClick: (date: Date) => void;
|
|
519
519
|
readonly month?: Date;
|
|
520
|
-
/**
|
|
520
|
+
/** An extra day to mark as picked, alongside any `range`. Ignored while a drag is under way. */
|
|
521
521
|
readonly selected?: Date;
|
|
522
522
|
readonly allowUnavailableDates?: boolean;
|
|
523
523
|
readonly earliestDate?: Date;
|
|
@@ -1081,6 +1081,19 @@ export declare interface InfoBarProps {
|
|
|
1081
1081
|
readonly children: ReactNode;
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* Loading placeholder that mirrors the InfoBar layout: an optional avatar followed by
|
|
1086
|
+
* key/value entries of varying width.
|
|
1087
|
+
* @param props - The skeleton props.
|
|
1088
|
+
* @returns The InfoBarSkeleton React node.
|
|
1089
|
+
*/
|
|
1090
|
+
export declare function InfoBarSkeleton(props: InfoBarSkeletonProps): JSX.Element;
|
|
1091
|
+
|
|
1092
|
+
export declare interface InfoBarSkeletonProps {
|
|
1093
|
+
readonly withAvatar?: boolean;
|
|
1094
|
+
readonly entries?: number;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1084
1097
|
export declare interface InfoBarValueProps {
|
|
1085
1098
|
readonly children: ReactNode;
|
|
1086
1099
|
}
|
|
@@ -1669,6 +1682,18 @@ export declare interface PatientSummarySectionConfig {
|
|
|
1669
1682
|
readonly component: ComponentType<SectionRenderContext>;
|
|
1670
1683
|
}
|
|
1671
1684
|
|
|
1685
|
+
/**
|
|
1686
|
+
* Loading placeholder that mirrors the PatientSummary layout: the patient header followed by
|
|
1687
|
+
* demographic rows and a set of collapsible sections with their items.
|
|
1688
|
+
* @param props - The skeleton props.
|
|
1689
|
+
* @returns The PatientSummarySkeleton React node.
|
|
1690
|
+
*/
|
|
1691
|
+
export declare function PatientSummarySkeleton(props: PatientSummarySkeletonProps): JSX.Element;
|
|
1692
|
+
|
|
1693
|
+
export declare interface PatientSummarySkeletonProps {
|
|
1694
|
+
readonly sections?: number;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1672
1697
|
export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;
|
|
1673
1698
|
|
|
1674
1699
|
export declare interface PatientTimelineProps extends Pick<ResourceTimelineProps<Patient>, 'getMenu'> {
|
|
@@ -2739,6 +2764,18 @@ export declare interface TimelineItemProps<T extends Resource = Resource> extend
|
|
|
2739
2764
|
readonly popupMenuItems?: ReactNode;
|
|
2740
2765
|
}
|
|
2741
2766
|
|
|
2767
|
+
/**
|
|
2768
|
+
* Loading placeholder that mirrors the TimelineItem layout: an avatar with name and date lines
|
|
2769
|
+
* in the header, followed by a title bar and full-width body rows.
|
|
2770
|
+
* @param props - The skeleton props.
|
|
2771
|
+
* @returns The TimelineItemSkeleton React node.
|
|
2772
|
+
*/
|
|
2773
|
+
export declare function TimelineItemSkeleton(props: TimelineItemSkeletonProps): JSX.Element;
|
|
2774
|
+
|
|
2775
|
+
export declare interface TimelineItemSkeletonProps {
|
|
2776
|
+
readonly lines?: number;
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2742
2779
|
export declare interface TimelineProps {
|
|
2743
2780
|
readonly children?: ReactNode;
|
|
2744
2781
|
}
|
|
@@ -3130,6 +3167,26 @@ export declare function useSearchOne<K extends ResourceType>(resourceType: K, qu
|
|
|
3130
3167
|
*/
|
|
3131
3168
|
export declare function useSearchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: SearchOptions): [ResourceArray<WithId<ExtractResource<K>>> | undefined, boolean, OperationOutcome | undefined];
|
|
3132
3169
|
|
|
3170
|
+
/**
|
|
3171
|
+
* Returns a referentially stable wrapper around `callback` that always invokes the most recent
|
|
3172
|
+
* value passed in. This allows consumers to pass inline callbacks without invalidating effects
|
|
3173
|
+
* that depend on them.
|
|
3174
|
+
*
|
|
3175
|
+
* The returned function is always defined, even when `callback` is undefined; in that case it
|
|
3176
|
+
* is a no-op returning undefined. Do not use the result as a "was a handler provided?" signal.
|
|
3177
|
+
*
|
|
3178
|
+
* The returned function may not be current during rendering. Synchronous usage in renders
|
|
3179
|
+
* should invoke the original function instead of the stabilized wrapper.
|
|
3180
|
+
*
|
|
3181
|
+
* In React v19.2+, when the callback is only used in effects, this can be replaced with
|
|
3182
|
+
* `useEffectEvent`. This package supports embedding in applications using React 18.0, so that
|
|
3183
|
+
* technique can not be used in this library yet.
|
|
3184
|
+
*
|
|
3185
|
+
* @param callback - The callback to stabilize. May be undefined.
|
|
3186
|
+
* @returns A stable function that forwards to the latest `callback`.
|
|
3187
|
+
*/
|
|
3188
|
+
export declare function useStabilizedCallback<Args extends unknown[], R>(callback: ((...args: Args) => R) | undefined): (...args: Args) => R | undefined;
|
|
3189
|
+
|
|
3133
3190
|
/**
|
|
3134
3191
|
* Creates an in-memory `Subscription` resource with the given criteria on the Medplum server and calls the given callback when an event notification is triggered by a resource interaction over a WebSocket connection.
|
|
3135
3192
|
*
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -517,7 +517,7 @@ export declare interface CalendarDateInputProps {
|
|
|
517
517
|
/** Called with the day picked. */
|
|
518
518
|
readonly onClick: (date: Date) => void;
|
|
519
519
|
readonly month?: Date;
|
|
520
|
-
/**
|
|
520
|
+
/** An extra day to mark as picked, alongside any `range`. Ignored while a drag is under way. */
|
|
521
521
|
readonly selected?: Date;
|
|
522
522
|
readonly allowUnavailableDates?: boolean;
|
|
523
523
|
readonly earliestDate?: Date;
|
|
@@ -1081,6 +1081,19 @@ export declare interface InfoBarProps {
|
|
|
1081
1081
|
readonly children: ReactNode;
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* Loading placeholder that mirrors the InfoBar layout: an optional avatar followed by
|
|
1086
|
+
* key/value entries of varying width.
|
|
1087
|
+
* @param props - The skeleton props.
|
|
1088
|
+
* @returns The InfoBarSkeleton React node.
|
|
1089
|
+
*/
|
|
1090
|
+
export declare function InfoBarSkeleton(props: InfoBarSkeletonProps): JSX.Element;
|
|
1091
|
+
|
|
1092
|
+
export declare interface InfoBarSkeletonProps {
|
|
1093
|
+
readonly withAvatar?: boolean;
|
|
1094
|
+
readonly entries?: number;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1084
1097
|
export declare interface InfoBarValueProps {
|
|
1085
1098
|
readonly children: ReactNode;
|
|
1086
1099
|
}
|
|
@@ -1669,6 +1682,18 @@ export declare interface PatientSummarySectionConfig {
|
|
|
1669
1682
|
readonly component: ComponentType<SectionRenderContext>;
|
|
1670
1683
|
}
|
|
1671
1684
|
|
|
1685
|
+
/**
|
|
1686
|
+
* Loading placeholder that mirrors the PatientSummary layout: the patient header followed by
|
|
1687
|
+
* demographic rows and a set of collapsible sections with their items.
|
|
1688
|
+
* @param props - The skeleton props.
|
|
1689
|
+
* @returns The PatientSummarySkeleton React node.
|
|
1690
|
+
*/
|
|
1691
|
+
export declare function PatientSummarySkeleton(props: PatientSummarySkeletonProps): JSX.Element;
|
|
1692
|
+
|
|
1693
|
+
export declare interface PatientSummarySkeletonProps {
|
|
1694
|
+
readonly sections?: number;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1672
1697
|
export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;
|
|
1673
1698
|
|
|
1674
1699
|
export declare interface PatientTimelineProps extends Pick<ResourceTimelineProps<Patient>, 'getMenu'> {
|
|
@@ -2739,6 +2764,18 @@ export declare interface TimelineItemProps<T extends Resource = Resource> extend
|
|
|
2739
2764
|
readonly popupMenuItems?: ReactNode;
|
|
2740
2765
|
}
|
|
2741
2766
|
|
|
2767
|
+
/**
|
|
2768
|
+
* Loading placeholder that mirrors the TimelineItem layout: an avatar with name and date lines
|
|
2769
|
+
* in the header, followed by a title bar and full-width body rows.
|
|
2770
|
+
* @param props - The skeleton props.
|
|
2771
|
+
* @returns The TimelineItemSkeleton React node.
|
|
2772
|
+
*/
|
|
2773
|
+
export declare function TimelineItemSkeleton(props: TimelineItemSkeletonProps): JSX.Element;
|
|
2774
|
+
|
|
2775
|
+
export declare interface TimelineItemSkeletonProps {
|
|
2776
|
+
readonly lines?: number;
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2742
2779
|
export declare interface TimelineProps {
|
|
2743
2780
|
readonly children?: ReactNode;
|
|
2744
2781
|
}
|
|
@@ -3130,6 +3167,26 @@ export declare function useSearchOne<K extends ResourceType>(resourceType: K, qu
|
|
|
3130
3167
|
*/
|
|
3131
3168
|
export declare function useSearchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: SearchOptions): [ResourceArray<WithId<ExtractResource<K>>> | undefined, boolean, OperationOutcome | undefined];
|
|
3132
3169
|
|
|
3170
|
+
/**
|
|
3171
|
+
* Returns a referentially stable wrapper around `callback` that always invokes the most recent
|
|
3172
|
+
* value passed in. This allows consumers to pass inline callbacks without invalidating effects
|
|
3173
|
+
* that depend on them.
|
|
3174
|
+
*
|
|
3175
|
+
* The returned function is always defined, even when `callback` is undefined; in that case it
|
|
3176
|
+
* is a no-op returning undefined. Do not use the result as a "was a handler provided?" signal.
|
|
3177
|
+
*
|
|
3178
|
+
* The returned function may not be current during rendering. Synchronous usage in renders
|
|
3179
|
+
* should invoke the original function instead of the stabilized wrapper.
|
|
3180
|
+
*
|
|
3181
|
+
* In React v19.2+, when the callback is only used in effects, this can be replaced with
|
|
3182
|
+
* `useEffectEvent`. This package supports embedding in applications using React 18.0, so that
|
|
3183
|
+
* technique can not be used in this library yet.
|
|
3184
|
+
*
|
|
3185
|
+
* @param callback - The callback to stabilize. May be undefined.
|
|
3186
|
+
* @returns A stable function that forwards to the latest `callback`.
|
|
3187
|
+
*/
|
|
3188
|
+
export declare function useStabilizedCallback<Args extends unknown[], R>(callback: ((...args: Args) => R) | undefined): (...args: Args) => R | undefined;
|
|
3189
|
+
|
|
3133
3190
|
/**
|
|
3134
3191
|
* Creates an in-memory `Subscription` resource with the given criteria on the Medplum server and calls the given callback when an event notification is triggered by a resource interaction over a WebSocket connection.
|
|
3135
3192
|
*
|