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