@medplum/react 3.1.5 → 3.1.7
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 +67 -59
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +4 -4
- package/dist/cjs/index.d.ts +50 -45
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.css.map +4 -4
- package/dist/esm/index.d.ts +50 -45
- package/dist/esm/index.mjs +67 -59
- package/dist/esm/index.mjs.map +4 -4
- package/package.json +28 -28
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
|
|
3
|
+
import { AccessPolicyResource } from '@medplum/fhirtypes';
|
|
3
4
|
import { Address } from '@medplum/fhirtypes';
|
|
4
5
|
import { AnchorProps } from '@mantine/core';
|
|
5
6
|
import { Annotation } from '@medplum/fhirtypes';
|
|
@@ -25,6 +26,7 @@ import { ElementDefinitionBinding } from '@medplum/fhirtypes';
|
|
|
25
26
|
import { ElementDefinitionType } from '@medplum/fhirtypes';
|
|
26
27
|
import { Encounter } from '@medplum/fhirtypes';
|
|
27
28
|
import { ErrorInfo } from 'react';
|
|
29
|
+
import { ExtendedInternalSchemaElement } from '@medplum/core';
|
|
28
30
|
import { ExtractResource } from '@medplum/fhirtypes';
|
|
29
31
|
import { Filter } from '@medplum/core';
|
|
30
32
|
import { HumanName } from '@medplum/fhirtypes';
|
|
@@ -181,10 +183,7 @@ export declare function addYesterdayFilter(definition: SearchRequest, field: str
|
|
|
181
183
|
|
|
182
184
|
export declare function AnnotationInput(props: AnnotationInputProps): JSX.Element;
|
|
183
185
|
|
|
184
|
-
export declare interface AnnotationInputProps {
|
|
185
|
-
readonly name: string;
|
|
186
|
-
readonly defaultValue?: Annotation;
|
|
187
|
-
readonly onChange?: (value: Annotation) => void;
|
|
186
|
+
export declare interface AnnotationInputProps extends ComplexTypeInputProps<Annotation> {
|
|
188
187
|
}
|
|
189
188
|
|
|
190
189
|
export declare function AppShell(props: AppShellProps): JSX.Element;
|
|
@@ -246,6 +245,7 @@ export declare interface AttachmentArrayInputProps {
|
|
|
246
245
|
readonly defaultValue?: Attachment[];
|
|
247
246
|
readonly arrayElement?: boolean;
|
|
248
247
|
readonly onChange?: (value: Attachment[]) => void;
|
|
248
|
+
readonly disabled?: boolean;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
export declare function AttachmentButton(props: AttachmentButtonProps): JSX.Element;
|
|
@@ -257,8 +257,10 @@ export declare interface AttachmentButtonProps {
|
|
|
257
257
|
readonly onUploadProgress?: (e: ProgressEvent) => void;
|
|
258
258
|
readonly onUploadError?: (outcome: OperationOutcome) => void;
|
|
259
259
|
children(props: {
|
|
260
|
+
disabled?: boolean;
|
|
260
261
|
onClick(e: MouseEvent_2): void;
|
|
261
262
|
}): ReactNode;
|
|
263
|
+
readonly disabled?: boolean;
|
|
262
264
|
}
|
|
263
265
|
|
|
264
266
|
export declare function AttachmentDisplay(props: AttachmentDisplayProps): JSX.Element | null;
|
|
@@ -270,9 +272,7 @@ export declare interface AttachmentDisplayProps {
|
|
|
270
272
|
|
|
271
273
|
export declare function AttachmentInput(props: AttachmentInputProps): JSX.Element;
|
|
272
274
|
|
|
273
|
-
export declare interface AttachmentInputProps {
|
|
274
|
-
readonly name: string;
|
|
275
|
-
readonly defaultValue?: Attachment;
|
|
275
|
+
export declare interface AttachmentInputProps extends ComplexTypeInputProps<Attachment> {
|
|
276
276
|
readonly arrayElement?: boolean;
|
|
277
277
|
readonly securityContext?: Reference;
|
|
278
278
|
readonly onChange?: (value: Attachment | undefined) => void;
|
|
@@ -289,6 +289,10 @@ export declare interface BackboneElementDisplayProps {
|
|
|
289
289
|
readonly link?: boolean;
|
|
290
290
|
/** (optional) Profile URL of the structure definition represented by the backbone element */
|
|
291
291
|
readonly profileUrl?: string;
|
|
292
|
+
/**
|
|
293
|
+
* (optional) If provided, inputs specified in `accessPolicyResource.hiddenFields` are not shown.
|
|
294
|
+
*/
|
|
295
|
+
readonly accessPolicyResource?: AccessPolicyResource;
|
|
292
296
|
}
|
|
293
297
|
|
|
294
298
|
export declare function BackboneElementInput(props: BackboneElementInputProps): JSX.Element;
|
|
@@ -302,6 +306,11 @@ export declare interface BackboneElementInputProps extends BaseInputProps {
|
|
|
302
306
|
readonly onChange?: (value: any) => void;
|
|
303
307
|
/** (optional) Profile URL of the structure definition represented by the backbone element */
|
|
304
308
|
readonly profileUrl?: string;
|
|
309
|
+
/**
|
|
310
|
+
* (optional) If provided, inputs specified in `accessPolicyResource.readonlyFields` are not editable
|
|
311
|
+
* and inputs specified in `accessPolicyResource.hiddenFields` are not shown.
|
|
312
|
+
*/
|
|
313
|
+
readonly accessPolicyResource?: AccessPolicyResource;
|
|
305
314
|
}
|
|
306
315
|
|
|
307
316
|
export declare function BaseChat(props: BaseChatProps): JSX.Element | null;
|
|
@@ -361,6 +370,7 @@ export declare interface CheckboxFormSectionProps {
|
|
|
361
370
|
readonly children?: ReactNode;
|
|
362
371
|
readonly testId?: string;
|
|
363
372
|
readonly fhirPath?: string;
|
|
373
|
+
readonly readonly?: boolean;
|
|
364
374
|
}
|
|
365
375
|
|
|
366
376
|
/**
|
|
@@ -386,8 +396,8 @@ export declare interface CodeableConceptDisplayProps {
|
|
|
386
396
|
|
|
387
397
|
export declare function CodeableConceptInput(props: CodeableConceptInputProps): JSX.Element;
|
|
388
398
|
|
|
389
|
-
export declare interface CodeableConceptInputProps extends Omit<ValueSetAutocompleteProps, 'name' | 'defaultValue' | 'onChange'>, ComplexTypeInputProps<CodeableConcept> {
|
|
390
|
-
readonly onChange
|
|
399
|
+
export declare interface CodeableConceptInputProps extends Omit<ValueSetAutocompleteProps, 'name' | 'defaultValue' | 'onChange' | 'disabled'>, ComplexTypeInputProps<CodeableConcept> {
|
|
400
|
+
readonly onChange?: (value: CodeableConcept | undefined) => void;
|
|
391
401
|
}
|
|
392
402
|
|
|
393
403
|
export declare function CodeInput(props: CodeInputProps): JSX.Element;
|
|
@@ -405,15 +415,14 @@ export declare interface CodingDisplayProps {
|
|
|
405
415
|
|
|
406
416
|
export declare function CodingInput(props: CodingInputProps): JSX.Element;
|
|
407
417
|
|
|
408
|
-
export declare interface CodingInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
|
|
409
|
-
readonly defaultValue?: Coding;
|
|
410
|
-
readonly onChange?: (value: Coding | undefined) => void;
|
|
418
|
+
export declare interface CodingInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange' | 'disabled' | 'name'>, ComplexTypeInputProps<Coding> {
|
|
411
419
|
}
|
|
412
420
|
|
|
413
421
|
export declare interface ComplexTypeInputProps<ValueType> extends BaseInputProps {
|
|
414
|
-
name: string;
|
|
415
|
-
defaultValue?: ValueType;
|
|
416
|
-
onChange
|
|
422
|
+
readonly name: string;
|
|
423
|
+
readonly defaultValue?: ValueType;
|
|
424
|
+
readonly onChange?: (value: ValueType, propName?: string) => void;
|
|
425
|
+
readonly disabled?: boolean;
|
|
417
426
|
}
|
|
418
427
|
|
|
419
428
|
export declare function ContactDetailDisplay(props: ContactDetailDisplayProps): JSX.Element | null;
|
|
@@ -435,7 +444,7 @@ export declare interface ContactPointDisplayProps {
|
|
|
435
444
|
export declare function ContactPointInput(props: ContactPointInputProps): JSX.Element;
|
|
436
445
|
|
|
437
446
|
export declare type ContactPointInputProps = ComplexTypeInputProps<ContactPoint> & {
|
|
438
|
-
readonly onChange
|
|
447
|
+
readonly onChange?: (value: ContactPoint | undefined) => void;
|
|
439
448
|
};
|
|
440
449
|
|
|
441
450
|
export declare function Container(props: ContainerProps): JSX.Element;
|
|
@@ -471,13 +480,11 @@ export declare function createScriptTag(src: string, onload?: () => void): void;
|
|
|
471
480
|
*/
|
|
472
481
|
export declare function DateTimeInput(props: DateTimeInputProps): JSX.Element;
|
|
473
482
|
|
|
474
|
-
export declare interface DateTimeInputProps {
|
|
475
|
-
readonly name?: string;
|
|
483
|
+
export declare interface DateTimeInputProps extends PrimitiveTypeInputProps {
|
|
476
484
|
readonly label?: string;
|
|
477
485
|
readonly placeholder?: string;
|
|
478
486
|
readonly defaultValue?: string;
|
|
479
487
|
readonly autoFocus?: boolean;
|
|
480
|
-
readonly required?: boolean;
|
|
481
488
|
readonly outcome?: OperationOutcome;
|
|
482
489
|
readonly onChange?: (value: string) => void;
|
|
483
490
|
}
|
|
@@ -538,6 +545,7 @@ export declare interface ElementDefinitionTypeInputProps extends Pick<ResourcePr
|
|
|
538
545
|
readonly min: number;
|
|
539
546
|
readonly max: number;
|
|
540
547
|
readonly binding: ElementDefinitionBinding | undefined;
|
|
548
|
+
readonly readOnly?: boolean;
|
|
541
549
|
}
|
|
542
550
|
|
|
543
551
|
export declare function EncounterTimeline(props: EncounterTimelineProps): JSX.Element;
|
|
@@ -615,6 +623,7 @@ export declare interface FormSectionProps {
|
|
|
615
623
|
readonly testId?: string;
|
|
616
624
|
readonly fhirPath?: string;
|
|
617
625
|
readonly errorExpression?: string;
|
|
626
|
+
readonly readonly?: boolean;
|
|
618
627
|
}
|
|
619
628
|
|
|
620
629
|
export declare function getErrorsForInput(outcome: OperationOutcome | undefined, expression: string | undefined): string | undefined;
|
|
@@ -798,12 +807,9 @@ export declare interface MoneyDisplayProps {
|
|
|
798
807
|
|
|
799
808
|
export declare function MoneyInput(props: MoneyInputProps): JSX.Element;
|
|
800
809
|
|
|
801
|
-
export declare interface MoneyInputProps {
|
|
802
|
-
readonly name: string;
|
|
810
|
+
export declare interface MoneyInputProps extends ComplexTypeInputProps<Money> {
|
|
803
811
|
readonly label?: string;
|
|
804
812
|
readonly placeholder?: string;
|
|
805
|
-
readonly defaultValue?: Money;
|
|
806
|
-
readonly onChange?: (value: Money) => void;
|
|
807
813
|
}
|
|
808
814
|
|
|
809
815
|
export declare function Navbar(props: NavbarProps): JSX.Element;
|
|
@@ -880,6 +886,10 @@ export declare function PatientSummary(props: PatientSummaryProps): JSX.Element
|
|
|
880
886
|
export declare interface PatientSummaryProps extends Omit<CardProps, 'children'> {
|
|
881
887
|
readonly patient: Patient | Reference<Patient>;
|
|
882
888
|
readonly background?: string;
|
|
889
|
+
/** The URL that the upcoming appointments link should navigate to or `undefined` to not show the link. */
|
|
890
|
+
readonly appointmentsUrl?: string | undefined;
|
|
891
|
+
/** The URL that the documented visits (encounters) link should navigate to or `undefined` to not show the link. */
|
|
892
|
+
readonly encountersUrl?: string | undefined;
|
|
883
893
|
}
|
|
884
894
|
|
|
885
895
|
export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;
|
|
@@ -896,12 +906,13 @@ export declare interface PlanDefinitionBuilderProps {
|
|
|
896
906
|
}
|
|
897
907
|
|
|
898
908
|
export declare interface PrimitiveTypeInputProps {
|
|
899
|
-
id
|
|
900
|
-
name: string;
|
|
901
|
-
'data-testid'
|
|
902
|
-
defaultValue?: any;
|
|
903
|
-
required
|
|
904
|
-
error
|
|
909
|
+
readonly id?: string;
|
|
910
|
+
readonly name: string;
|
|
911
|
+
readonly 'data-testid'?: string;
|
|
912
|
+
readonly defaultValue?: any;
|
|
913
|
+
readonly required?: boolean;
|
|
914
|
+
readonly error?: string;
|
|
915
|
+
readonly disabled?: boolean;
|
|
905
916
|
}
|
|
906
917
|
|
|
907
918
|
export declare function QuantityDisplay(props: QuantityDisplayProps): JSX.Element | null;
|
|
@@ -912,12 +923,9 @@ export declare interface QuantityDisplayProps {
|
|
|
912
923
|
|
|
913
924
|
export declare function QuantityInput(props: QuantityInputProps): JSX.Element;
|
|
914
925
|
|
|
915
|
-
export declare interface QuantityInputProps {
|
|
916
|
-
readonly name: string;
|
|
917
|
-
readonly defaultValue?: Quantity;
|
|
926
|
+
export declare interface QuantityInputProps extends ComplexTypeInputProps<Quantity> {
|
|
918
927
|
readonly autoFocus?: boolean;
|
|
919
928
|
readonly required?: boolean;
|
|
920
|
-
readonly onChange?: (value: Quantity) => void;
|
|
921
929
|
readonly disableWheel?: boolean;
|
|
922
930
|
}
|
|
923
931
|
|
|
@@ -973,10 +981,7 @@ export declare interface RangeDisplayProps {
|
|
|
973
981
|
*/
|
|
974
982
|
export declare function RangeInput(props: RangeInputProps): JSX.Element;
|
|
975
983
|
|
|
976
|
-
export declare interface RangeInputProps {
|
|
977
|
-
readonly name: string;
|
|
978
|
-
readonly defaultValue?: Range_2;
|
|
979
|
-
readonly onChange?: (value: Range_2) => void;
|
|
984
|
+
export declare interface RangeInputProps extends ComplexTypeInputProps<Range_2> {
|
|
980
985
|
}
|
|
981
986
|
|
|
982
987
|
export declare const reactContext: Context<MedplumContext | undefined>;
|
|
@@ -999,6 +1004,7 @@ export declare interface ReferenceInputProps {
|
|
|
999
1004
|
readonly autoFocus?: boolean;
|
|
1000
1005
|
readonly required?: boolean;
|
|
1001
1006
|
readonly onChange?: (value: Reference | undefined) => void;
|
|
1007
|
+
readonly disabled?: boolean;
|
|
1002
1008
|
}
|
|
1003
1009
|
|
|
1004
1010
|
export declare function ReferenceRangeEditor(props: ReferenceRangeEditorProps): JSX.Element;
|
|
@@ -1064,10 +1070,10 @@ export declare interface ResourceArrayDisplayProps {
|
|
|
1064
1070
|
readonly includeDescriptionListEntry?: boolean;
|
|
1065
1071
|
}
|
|
1066
1072
|
|
|
1067
|
-
export declare function ResourceArrayInput(props: ResourceArrayInputProps): JSX.Element;
|
|
1073
|
+
export declare function ResourceArrayInput(props: ResourceArrayInputProps): JSX.Element | null;
|
|
1068
1074
|
|
|
1069
1075
|
export declare interface ResourceArrayInputProps extends BaseInputProps {
|
|
1070
|
-
readonly property:
|
|
1076
|
+
readonly property: ExtendedInternalSchemaElement;
|
|
1071
1077
|
readonly name: string;
|
|
1072
1078
|
readonly defaultValue?: any[];
|
|
1073
1079
|
readonly indent?: boolean;
|
|
@@ -1136,6 +1142,7 @@ export declare interface ResourceInputProps<T extends Resource = Resource> {
|
|
|
1136
1142
|
readonly loadOnFocus?: boolean;
|
|
1137
1143
|
readonly required?: boolean;
|
|
1138
1144
|
readonly onChange?: (value: T | undefined) => void;
|
|
1145
|
+
readonly disabled?: boolean;
|
|
1139
1146
|
}
|
|
1140
1147
|
|
|
1141
1148
|
export declare function ResourceName(props: ResourceNameProps): JSX.Element | null;
|
|
@@ -1171,12 +1178,12 @@ export declare interface ResourcePropertyDisplayProps {
|
|
|
1171
1178
|
export declare function ResourcePropertyInput(props: ResourcePropertyInputProps): JSX.Element;
|
|
1172
1179
|
|
|
1173
1180
|
export declare interface ResourcePropertyInputProps extends BaseInputProps {
|
|
1174
|
-
readonly property:
|
|
1181
|
+
readonly property: ExtendedInternalSchemaElement;
|
|
1175
1182
|
readonly name: string;
|
|
1176
1183
|
readonly defaultPropertyType?: string | undefined;
|
|
1177
1184
|
readonly defaultValue: any;
|
|
1178
1185
|
readonly arrayElement?: boolean | undefined;
|
|
1179
|
-
readonly onChange
|
|
1186
|
+
readonly onChange?: (value: any, propName?: string) => void;
|
|
1180
1187
|
}
|
|
1181
1188
|
|
|
1182
1189
|
export declare function ResourceTable(props: ResourceTableProps): JSX.Element | null;
|
|
@@ -1440,10 +1447,8 @@ export declare interface TimelineProps {
|
|
|
1440
1447
|
|
|
1441
1448
|
export declare function TimingInput(props: TimingInputProps): JSX.Element;
|
|
1442
1449
|
|
|
1443
|
-
export declare interface TimingInputProps {
|
|
1444
|
-
readonly
|
|
1445
|
-
readonly defaultValue?: Timing;
|
|
1446
|
-
readonly onChange?: (newValue: Timing) => void;
|
|
1450
|
+
export declare interface TimingInputProps extends ComplexTypeInputProps<Timing> {
|
|
1451
|
+
readonly defaultModalOpen?: boolean;
|
|
1447
1452
|
}
|
|
1448
1453
|
|
|
1449
1454
|
/**
|