@medplum/react 3.2.8 → 3.2.10
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 +56 -56
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +8 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.mjs +56 -56
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +28 -28
package/dist/cjs/index.d.ts
CHANGED
|
@@ -217,6 +217,9 @@ export declare interface AsyncAutocompleteProps<T> extends Omit<ComboboxProps, '
|
|
|
217
217
|
readonly toOption: (item: T) => AsyncAutocompleteOption<T>;
|
|
218
218
|
readonly loadOptions: (input: string, signal: AbortSignal) => Promise<T[]>;
|
|
219
219
|
readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
|
|
220
|
+
readonly emptyComponent?: (props: {
|
|
221
|
+
search: string;
|
|
222
|
+
}) => JSX.Element | ReactNode;
|
|
220
223
|
readonly onChange: (item: T[]) => void;
|
|
221
224
|
readonly onCreate?: (input: string) => T;
|
|
222
225
|
readonly creatable?: boolean;
|
|
@@ -227,6 +230,7 @@ export declare interface AsyncAutocompleteProps<T> extends Omit<ComboboxProps, '
|
|
|
227
230
|
readonly leftSection?: ReactNode;
|
|
228
231
|
readonly maxValues?: number;
|
|
229
232
|
readonly optionsDropdownMaxHeight?: number;
|
|
233
|
+
readonly minInputLength?: number;
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
export declare function AttachmentArrayDisplay(props: AttachmentArrayDisplayProps): JSX.Element;
|
|
@@ -324,6 +328,7 @@ export declare interface BaseChatProps extends PaperProps {
|
|
|
324
328
|
readonly sendMessage: (content: string) => void;
|
|
325
329
|
readonly onMessageReceived?: (message: Communication) => void;
|
|
326
330
|
readonly inputDisabled?: boolean;
|
|
331
|
+
readonly onError?: (err: Error) => void;
|
|
327
332
|
}
|
|
328
333
|
|
|
329
334
|
export declare interface BaseInputProps {
|
|
@@ -1473,6 +1478,7 @@ export declare interface ThreadChatProps {
|
|
|
1473
1478
|
readonly title?: string;
|
|
1474
1479
|
readonly onMessageSent?: (message: Communication) => void;
|
|
1475
1480
|
readonly inputDisabled?: boolean;
|
|
1481
|
+
readonly onError?: (err: Error) => void;
|
|
1476
1482
|
}
|
|
1477
1483
|
|
|
1478
1484
|
export declare function Timeline(props: TimelineProps): JSX.Element;
|
|
@@ -1603,6 +1609,7 @@ export declare function useSearchResources<K extends ResourceType>(resourceType:
|
|
|
1603
1609
|
* - `onWebsocketClose` - Called when the WebSocket connection disconnects.
|
|
1604
1610
|
* - `onSubscriptionConnect` - Called when the corresponding subscription starts to receive updates after the subscription has been initialized and connected to.
|
|
1605
1611
|
* - `onSubscriptionDisconnect` - Called when the corresponding subscription is destroyed and stops receiving updates from the server.
|
|
1612
|
+
* - `onError` - Called whenever an error occurs during the lifecycle of the managed subscription.
|
|
1606
1613
|
*/
|
|
1607
1614
|
export declare function useSubscription(criteria: string, callback: (bundle: Bundle) => void, options?: UseSubscriptionOptions): void;
|
|
1608
1615
|
|
|
@@ -1612,6 +1619,7 @@ export declare type UseSubscriptionOptions = {
|
|
|
1612
1619
|
onWebSocketClose?: () => void;
|
|
1613
1620
|
onSubscriptionConnect?: (subscriptionId: string) => void;
|
|
1614
1621
|
onSubscriptionDisconnect?: (subscriptionId: string) => void;
|
|
1622
|
+
onError?: (err: Error) => void;
|
|
1615
1623
|
};
|
|
1616
1624
|
|
|
1617
1625
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -217,6 +217,9 @@ export declare interface AsyncAutocompleteProps<T> extends Omit<ComboboxProps, '
|
|
|
217
217
|
readonly toOption: (item: T) => AsyncAutocompleteOption<T>;
|
|
218
218
|
readonly loadOptions: (input: string, signal: AbortSignal) => Promise<T[]>;
|
|
219
219
|
readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
|
|
220
|
+
readonly emptyComponent?: (props: {
|
|
221
|
+
search: string;
|
|
222
|
+
}) => JSX.Element | ReactNode;
|
|
220
223
|
readonly onChange: (item: T[]) => void;
|
|
221
224
|
readonly onCreate?: (input: string) => T;
|
|
222
225
|
readonly creatable?: boolean;
|
|
@@ -227,6 +230,7 @@ export declare interface AsyncAutocompleteProps<T> extends Omit<ComboboxProps, '
|
|
|
227
230
|
readonly leftSection?: ReactNode;
|
|
228
231
|
readonly maxValues?: number;
|
|
229
232
|
readonly optionsDropdownMaxHeight?: number;
|
|
233
|
+
readonly minInputLength?: number;
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
export declare function AttachmentArrayDisplay(props: AttachmentArrayDisplayProps): JSX.Element;
|
|
@@ -324,6 +328,7 @@ export declare interface BaseChatProps extends PaperProps {
|
|
|
324
328
|
readonly sendMessage: (content: string) => void;
|
|
325
329
|
readonly onMessageReceived?: (message: Communication) => void;
|
|
326
330
|
readonly inputDisabled?: boolean;
|
|
331
|
+
readonly onError?: (err: Error) => void;
|
|
327
332
|
}
|
|
328
333
|
|
|
329
334
|
export declare interface BaseInputProps {
|
|
@@ -1473,6 +1478,7 @@ export declare interface ThreadChatProps {
|
|
|
1473
1478
|
readonly title?: string;
|
|
1474
1479
|
readonly onMessageSent?: (message: Communication) => void;
|
|
1475
1480
|
readonly inputDisabled?: boolean;
|
|
1481
|
+
readonly onError?: (err: Error) => void;
|
|
1476
1482
|
}
|
|
1477
1483
|
|
|
1478
1484
|
export declare function Timeline(props: TimelineProps): JSX.Element;
|
|
@@ -1603,6 +1609,7 @@ export declare function useSearchResources<K extends ResourceType>(resourceType:
|
|
|
1603
1609
|
* - `onWebsocketClose` - Called when the WebSocket connection disconnects.
|
|
1604
1610
|
* - `onSubscriptionConnect` - Called when the corresponding subscription starts to receive updates after the subscription has been initialized and connected to.
|
|
1605
1611
|
* - `onSubscriptionDisconnect` - Called when the corresponding subscription is destroyed and stops receiving updates from the server.
|
|
1612
|
+
* - `onError` - Called whenever an error occurs during the lifecycle of the managed subscription.
|
|
1606
1613
|
*/
|
|
1607
1614
|
export declare function useSubscription(criteria: string, callback: (bundle: Bundle) => void, options?: UseSubscriptionOptions): void;
|
|
1608
1615
|
|
|
@@ -1612,6 +1619,7 @@ export declare type UseSubscriptionOptions = {
|
|
|
1612
1619
|
onWebSocketClose?: () => void;
|
|
1613
1620
|
onSubscriptionConnect?: (subscriptionId: string) => void;
|
|
1614
1621
|
onSubscriptionDisconnect?: (subscriptionId: string) => void;
|
|
1622
|
+
onError?: (err: Error) => void;
|
|
1615
1623
|
};
|
|
1616
1624
|
|
|
1617
1625
|
/**
|