@medplum/react 3.0.13 → 3.1.1
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 +14 -6
- 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 +37 -21
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.css.map +4 -4
- package/dist/esm/index.d.ts +37 -21
- package/dist/esm/index.mjs +14 -6
- package/dist/esm/index.mjs.map +4 -4
- package/package.json +22 -22
package/dist/esm/index.d.ts
CHANGED
|
@@ -292,15 +292,11 @@ export declare interface BackboneElementDisplayProps {
|
|
|
292
292
|
|
|
293
293
|
export declare function BackboneElementInput(props: BackboneElementInputProps): JSX.Element;
|
|
294
294
|
|
|
295
|
-
export declare interface BackboneElementInputProps {
|
|
295
|
+
export declare interface BackboneElementInputProps extends BaseInputProps {
|
|
296
296
|
/** Type name the backbone element represents */
|
|
297
297
|
readonly typeName: string;
|
|
298
|
-
/** The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
|
|
299
|
-
readonly path: string;
|
|
300
298
|
/** (optional) The contents of the resource represented by the backbone element */
|
|
301
299
|
readonly defaultValue?: any;
|
|
302
|
-
/** (optional) OperationOutcome from the last attempted system action*/
|
|
303
|
-
readonly outcome?: OperationOutcome;
|
|
304
300
|
/** (optional) callback function that is called when the value of the backbone element changes */
|
|
305
301
|
readonly onChange?: (value: any) => void;
|
|
306
302
|
/** (optional) Profile URL of the structure definition represented by the backbone element */
|
|
@@ -316,7 +312,16 @@ export declare interface BaseChatProps {
|
|
|
316
312
|
readonly query: string;
|
|
317
313
|
readonly sendMessage: (content: string) => void;
|
|
318
314
|
readonly onMessageReceived?: (message: Communication) => void;
|
|
319
|
-
readonly
|
|
315
|
+
readonly inputDisabled?: boolean;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export declare interface BaseInputProps {
|
|
319
|
+
/** The path identifying the related element definition and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
|
|
320
|
+
readonly path: string;
|
|
321
|
+
/** (optional) A FHIRPath expression that identifies the input more precisely than `path`, e.g. `Patient.identifier[0].system` versus `Patient.identifier.system` */
|
|
322
|
+
readonly valuePath?: string;
|
|
323
|
+
/** (optional) OperationOutcome from the last attempted system action*/
|
|
324
|
+
readonly outcome?: OperationOutcome;
|
|
320
325
|
}
|
|
321
326
|
|
|
322
327
|
/**
|
|
@@ -338,6 +343,13 @@ export declare interface CalendarInputProps {
|
|
|
338
343
|
readonly onClick: (date: Date) => void;
|
|
339
344
|
}
|
|
340
345
|
|
|
346
|
+
export declare function ChatModal(props: ChatModalProps): JSX.Element | null;
|
|
347
|
+
|
|
348
|
+
export declare interface ChatModalProps {
|
|
349
|
+
readonly open?: boolean;
|
|
350
|
+
readonly children: React.ReactNode;
|
|
351
|
+
}
|
|
352
|
+
|
|
341
353
|
export declare function CheckboxFormSection(props: CheckboxFormSectionProps): JSX.Element;
|
|
342
354
|
|
|
343
355
|
export declare interface CheckboxFormSectionProps {
|
|
@@ -381,7 +393,7 @@ export declare function CodeInput(props: CodeInputProps): JSX.Element;
|
|
|
381
393
|
|
|
382
394
|
export declare interface CodeInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
|
|
383
395
|
readonly defaultValue?: string;
|
|
384
|
-
readonly onChange
|
|
396
|
+
readonly onChange: ((value: string | undefined) => void) | undefined;
|
|
385
397
|
}
|
|
386
398
|
|
|
387
399
|
export declare function CodingDisplay(props: CodingDisplayProps): JSX.Element;
|
|
@@ -397,13 +409,10 @@ export declare interface CodingInputProps extends Omit<ValueSetAutocompleteProps
|
|
|
397
409
|
readonly onChange?: (value: Coding | undefined) => void;
|
|
398
410
|
}
|
|
399
411
|
|
|
400
|
-
export declare interface ComplexTypeInputProps<ValueType> {
|
|
412
|
+
export declare interface ComplexTypeInputProps<ValueType> extends BaseInputProps {
|
|
401
413
|
name: string;
|
|
402
|
-
/** The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
|
|
403
|
-
path: string;
|
|
404
414
|
defaultValue?: ValueType;
|
|
405
415
|
onChange: ((value: ValueType, propName?: string) => void) | undefined;
|
|
406
|
-
outcome: OperationOutcome | undefined;
|
|
407
416
|
}
|
|
408
417
|
|
|
409
418
|
export declare function ContactDetailDisplay(props: ContactDetailDisplayProps): JSX.Element | null;
|
|
@@ -523,7 +532,7 @@ export declare interface ElementDefinitionSelectorProps extends ResourceProperty
|
|
|
523
532
|
|
|
524
533
|
export declare function ElementDefinitionTypeInput(props: ElementDefinitionTypeInputProps): JSX.Element;
|
|
525
534
|
|
|
526
|
-
export declare interface ElementDefinitionTypeInputProps extends Pick<ResourcePropertyInputProps, 'name' | 'path' | 'defaultValue' | 'onChange' | 'outcome'> {
|
|
535
|
+
export declare interface ElementDefinitionTypeInputProps extends Pick<ResourcePropertyInputProps, 'name' | 'path' | 'valuePath' | 'defaultValue' | 'onChange' | 'outcome'> {
|
|
527
536
|
readonly elementDefinitionType: ElementDefinitionType;
|
|
528
537
|
readonly min: number;
|
|
529
538
|
readonly max: number;
|
|
@@ -604,6 +613,7 @@ export declare interface FormSectionProps {
|
|
|
604
613
|
readonly children?: ReactNode;
|
|
605
614
|
readonly testId?: string;
|
|
606
615
|
readonly fhirPath?: string;
|
|
616
|
+
readonly errorExpression?: string;
|
|
607
617
|
}
|
|
608
618
|
|
|
609
619
|
export declare function getErrorsForInput(outcome: OperationOutcome | undefined, expression: string | undefined): string | undefined;
|
|
@@ -668,6 +678,8 @@ export declare function getSearchOperators(searchParam: SearchParameter): Operat
|
|
|
668
678
|
|
|
669
679
|
export declare function getSortField(definition: SearchRequest): string | undefined;
|
|
670
680
|
|
|
681
|
+
export declare function getValuePath(elementPath: string, valuePath: string | undefined, arrayIndex?: number): string;
|
|
682
|
+
|
|
671
683
|
export declare function Header(props: HeaderProps): JSX.Element;
|
|
672
684
|
|
|
673
685
|
export declare interface HeaderProps {
|
|
@@ -882,6 +894,15 @@ export declare interface PlanDefinitionBuilderProps {
|
|
|
882
894
|
readonly onSubmit: (result: PlanDefinition) => void;
|
|
883
895
|
}
|
|
884
896
|
|
|
897
|
+
export declare interface PrimitiveTypeInputProps {
|
|
898
|
+
id: string;
|
|
899
|
+
name: string;
|
|
900
|
+
'data-testid': string;
|
|
901
|
+
defaultValue?: any;
|
|
902
|
+
required: boolean;
|
|
903
|
+
error: string | undefined;
|
|
904
|
+
}
|
|
905
|
+
|
|
885
906
|
export declare function QuantityDisplay(props: QuantityDisplayProps): JSX.Element | null;
|
|
886
907
|
|
|
887
908
|
export declare interface QuantityDisplayProps {
|
|
@@ -1044,13 +1065,11 @@ export declare interface ResourceArrayDisplayProps {
|
|
|
1044
1065
|
|
|
1045
1066
|
export declare function ResourceArrayInput(props: ResourceArrayInputProps): JSX.Element;
|
|
1046
1067
|
|
|
1047
|
-
export declare interface ResourceArrayInputProps {
|
|
1068
|
+
export declare interface ResourceArrayInputProps extends BaseInputProps {
|
|
1048
1069
|
readonly property: InternalSchemaElement;
|
|
1049
1070
|
readonly name: string;
|
|
1050
|
-
readonly path: string;
|
|
1051
1071
|
readonly defaultValue?: any[];
|
|
1052
1072
|
readonly indent?: boolean;
|
|
1053
|
-
readonly outcome: OperationOutcome | undefined;
|
|
1054
1073
|
readonly onChange?: (value: any[]) => void;
|
|
1055
1074
|
readonly hideNonSliceValues?: boolean;
|
|
1056
1075
|
}
|
|
@@ -1150,16 +1169,13 @@ export declare interface ResourcePropertyDisplayProps {
|
|
|
1150
1169
|
|
|
1151
1170
|
export declare function ResourcePropertyInput(props: ResourcePropertyInputProps): JSX.Element;
|
|
1152
1171
|
|
|
1153
|
-
export declare interface ResourcePropertyInputProps {
|
|
1172
|
+
export declare interface ResourcePropertyInputProps extends BaseInputProps {
|
|
1154
1173
|
readonly property: InternalSchemaElement;
|
|
1155
1174
|
readonly name: string;
|
|
1156
|
-
/** The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
|
|
1157
|
-
readonly path: string;
|
|
1158
1175
|
readonly defaultPropertyType?: string | undefined;
|
|
1159
1176
|
readonly defaultValue: any;
|
|
1160
1177
|
readonly arrayElement?: boolean | undefined;
|
|
1161
1178
|
readonly onChange: ((value: any, propName?: string) => void) | undefined;
|
|
1162
|
-
readonly outcome: OperationOutcome | undefined;
|
|
1163
1179
|
}
|
|
1164
1180
|
|
|
1165
1181
|
export declare function ResourceTable(props: ResourceTableProps): JSX.Element | null;
|
|
@@ -1399,10 +1415,10 @@ export declare type SupportedProfileStructureDefinition = StructureDefinition &
|
|
|
1399
1415
|
export declare function ThreadChat(props: ThreadChatProps): JSX.Element | null;
|
|
1400
1416
|
|
|
1401
1417
|
export declare interface ThreadChatProps {
|
|
1402
|
-
readonly title: string;
|
|
1403
1418
|
readonly thread: Communication;
|
|
1404
|
-
readonly
|
|
1419
|
+
readonly title?: string;
|
|
1405
1420
|
readonly onMessageSent?: (message: Communication) => void;
|
|
1421
|
+
readonly inputDisabled?: boolean;
|
|
1406
1422
|
}
|
|
1407
1423
|
|
|
1408
1424
|
export declare function Timeline(props: TimelineProps): JSX.Element;
|