@medplum/react 2.1.10 → 2.1.11
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/babel.config.cjs +19 -0
- package/dist/cjs/index.cjs +5 -5
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/index.mjs.map +4 -4
- package/dist/types.d.ts +106 -89
- package/package.json +38 -37
- package/tsdoc.json +4 -0
package/dist/types.d.ts
CHANGED
|
@@ -68,54 +68,54 @@ import { UserConfiguration } from '@medplum/fhirtypes';
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Adds a filter for a date between two dates (inclusive of both dates).
|
|
71
|
-
* @param definition The original search request.
|
|
72
|
-
* @param field The field key name.
|
|
73
|
-
* @param d1 The start date.
|
|
74
|
-
* @param d2 The end date.
|
|
71
|
+
* @param definition - The original search request.
|
|
72
|
+
* @param field - The field key name.
|
|
73
|
+
* @param d1 - The start date.
|
|
74
|
+
* @param d2 - The end date.
|
|
75
75
|
* @returns The updated search request.
|
|
76
76
|
*/
|
|
77
77
|
export declare function addDateFilterBetween(definition: SearchRequest, field: string, d1: Date, d2: Date): SearchRequest;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Adds a field.
|
|
81
|
-
* @param definition The original search request.
|
|
82
|
-
* @param field The field key name.
|
|
81
|
+
* @param definition - The original search request.
|
|
82
|
+
* @param field - The field key name.
|
|
83
83
|
* @returns The updated search request.
|
|
84
84
|
*/
|
|
85
85
|
export declare function addField(definition: SearchRequest, field: string): SearchRequest;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Adds a filter.
|
|
89
|
-
* @param definition The original search request.
|
|
90
|
-
* @param field The field key name.
|
|
91
|
-
* @param op The operation key name.
|
|
92
|
-
* @param value The filter value.
|
|
93
|
-
* @param opt_clear Optional flag to clear filters on the field.
|
|
89
|
+
* @param definition - The original search request.
|
|
90
|
+
* @param field - The field key name.
|
|
91
|
+
* @param op - The operation key name.
|
|
92
|
+
* @param value - The filter value.
|
|
93
|
+
* @param opt_clear - Optional flag to clear filters on the field.
|
|
94
94
|
* @returns The updated search request.
|
|
95
95
|
*/
|
|
96
96
|
export declare function addFilter(definition: SearchRequest, field: string, op: Operator, value?: string, opt_clear?: boolean): SearchRequest;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Adds a filter that constrains the specified field to "last month".
|
|
100
|
-
* @param definition The original search request.
|
|
101
|
-
* @param field The field key name.
|
|
100
|
+
* @param definition - The original search request.
|
|
101
|
+
* @param field - The field key name.
|
|
102
102
|
* @returns The updated search request.
|
|
103
103
|
*/
|
|
104
104
|
export declare function addLastMonthFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* Adds a filter that constrains the specified field to "missing".
|
|
108
|
-
* @param definition The original search request.
|
|
109
|
-
* @param field The field key name.
|
|
110
|
-
* @param value Optional boolean value. Default is true.
|
|
108
|
+
* @param definition - The original search request.
|
|
109
|
+
* @param field - The field key name.
|
|
110
|
+
* @param value - Optional boolean value. Default is true.
|
|
111
111
|
* @returns The updated search request.
|
|
112
112
|
*/
|
|
113
113
|
export declare function addMissingFilter(definition: SearchRequest, field: string, value?: boolean): SearchRequest;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
116
|
* Adds a filter that constrains the specified field to "next month".
|
|
117
|
-
* @param definition The original search request.
|
|
118
|
-
* @param field The field key name.
|
|
117
|
+
* @param definition - The original search request.
|
|
118
|
+
* @param field - The field key name.
|
|
119
119
|
* @returns The updated search request.
|
|
120
120
|
*/
|
|
121
121
|
export declare function addNextMonthFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
@@ -136,40 +136,40 @@ export declare interface AddressInputProps {
|
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* Adds a filter that constrains the specified field to "this month".
|
|
139
|
-
* @param definition The original search request.
|
|
140
|
-
* @param field The field key name.
|
|
139
|
+
* @param definition - The original search request.
|
|
140
|
+
* @param field - The field key name.
|
|
141
141
|
* @returns The updated search request.
|
|
142
142
|
*/
|
|
143
143
|
export declare function addThisMonthFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Adds a filter that constrains the specified field to "today".
|
|
147
|
-
* @param definition The original search request.
|
|
148
|
-
* @param field The field key name.
|
|
147
|
+
* @param definition - The original search request.
|
|
148
|
+
* @param field - The field key name.
|
|
149
149
|
* @returns The updated search request.
|
|
150
150
|
*/
|
|
151
151
|
export declare function addTodayFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Adds a filter that constrains the specified field to "tomorrow".
|
|
155
|
-
* @param definition The original search request.
|
|
156
|
-
* @param field The field key name.
|
|
155
|
+
* @param definition - The original search request.
|
|
156
|
+
* @param field - The field key name.
|
|
157
157
|
* @returns The updated search request.
|
|
158
158
|
*/
|
|
159
159
|
export declare function addTomorrowFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
162
|
* Adds a filter that constrains the specified field to the year to date.
|
|
163
|
-
* @param definition The original search request.
|
|
164
|
-
* @param field The field key name.
|
|
163
|
+
* @param definition - The original search request.
|
|
164
|
+
* @param field - The field key name.
|
|
165
165
|
* @returns The updated search request.
|
|
166
166
|
*/
|
|
167
167
|
export declare function addYearToDateFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
170
|
* Adds a filter that constrains the specified field to "yesterday".
|
|
171
|
-
* @param definition The original search request.
|
|
172
|
-
* @param field The field key name.
|
|
171
|
+
* @param definition - The original search request.
|
|
172
|
+
* @param field - The field key name.
|
|
173
173
|
* @returns The updated search request.
|
|
174
174
|
*/
|
|
175
175
|
export declare function addYesterdayFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
@@ -276,11 +276,15 @@ export declare interface BackboneElementInputProps {
|
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
278
|
* Returns a field display name.
|
|
279
|
-
* @param key The field key.
|
|
279
|
+
* @param key - The field key.
|
|
280
280
|
* @returns The field display name.
|
|
281
281
|
*/
|
|
282
282
|
export declare function buildFieldNameString(key: string): string;
|
|
283
283
|
|
|
284
|
+
export declare function buildInitialResponse(questionnaire: Questionnaire): QuestionnaireResponse;
|
|
285
|
+
|
|
286
|
+
export declare function buildInitialResponseItem(item: QuestionnaireItem): QuestionnaireResponseItem;
|
|
287
|
+
|
|
284
288
|
export declare function CalendarInput(props: CalendarInputProps): JSX.Element;
|
|
285
289
|
|
|
286
290
|
export declare interface CalendarInputProps {
|
|
@@ -301,15 +305,15 @@ export declare interface CheckboxFormSectionProps {
|
|
|
301
305
|
|
|
302
306
|
/**
|
|
303
307
|
* Clears all of the filters.
|
|
304
|
-
* @param definition The original search request.
|
|
308
|
+
* @param definition - The original search request.
|
|
305
309
|
* @returns The updated search request.
|
|
306
310
|
*/
|
|
307
311
|
export declare function clearFilters(definition: SearchRequest): SearchRequest;
|
|
308
312
|
|
|
309
313
|
/**
|
|
310
314
|
* Clears all of the filters on a certain field.
|
|
311
|
-
* @param definition The original search request.
|
|
312
|
-
* @param code The field key name to clear filters.
|
|
315
|
+
* @param definition - The original search request.
|
|
316
|
+
* @param code - The field key name to clear filters.
|
|
313
317
|
* @returns The updated search request.
|
|
314
318
|
*/
|
|
315
319
|
export declare function clearFiltersOnField(definition: SearchRequest, code: string): SearchRequest;
|
|
@@ -392,22 +396,22 @@ export declare function Container(props: ContainerProps): JSX.Element;
|
|
|
392
396
|
|
|
393
397
|
/**
|
|
394
398
|
* Converts an ISO-8601 date/time string to a local date/time string.
|
|
395
|
-
* @param isoString The ISO-8601 date/time string to convert.
|
|
399
|
+
* @param isoString - The ISO-8601 date/time string to convert.
|
|
396
400
|
* @returns The local date/time string.
|
|
397
401
|
*/
|
|
398
402
|
export declare function convertIsoToLocal(isoString: string | undefined): string;
|
|
399
403
|
|
|
400
404
|
/**
|
|
401
405
|
* Converts a local date/time string to an ISO-8601 date/time string.
|
|
402
|
-
* @param localString The local date/time string to convert.
|
|
406
|
+
* @param localString - The local date/time string to convert.
|
|
403
407
|
* @returns The ISO-8601 date/time string.
|
|
404
408
|
*/
|
|
405
409
|
export declare function convertLocalToIso(localString: string | undefined): string;
|
|
406
410
|
|
|
407
411
|
/**
|
|
408
412
|
* Dynamically creates a script tag for the specified JavaScript file.
|
|
409
|
-
* @param src The JavaScript file URL.
|
|
410
|
-
* @param onload Optional callback for the onload event.
|
|
413
|
+
* @param src - The JavaScript file URL.
|
|
414
|
+
* @param onload - Optional callback for the onload event.
|
|
411
415
|
*/
|
|
412
416
|
export declare function createScriptTag(src: string, onload?: () => void): void;
|
|
413
417
|
|
|
@@ -416,7 +420,7 @@ export declare function createScriptTag(src: string, onload?: () => void): void;
|
|
|
416
420
|
* The main purpose is to reconcile time zones.
|
|
417
421
|
* Most of our date/time values are in ISO-8601, which includes a time zone offset.
|
|
418
422
|
* The datetime-local input does not support the time zone offset.
|
|
419
|
-
* @param props The Input props.
|
|
423
|
+
* @param props - The Input props.
|
|
420
424
|
* @returns The JSX element to render.
|
|
421
425
|
*/
|
|
422
426
|
export declare function DateTimeInput(props: DateTimeInputProps): JSX.Element;
|
|
@@ -439,8 +443,8 @@ export declare interface DefaultResourceTimelineProps {
|
|
|
439
443
|
|
|
440
444
|
/**
|
|
441
445
|
* Deletes a filter at the specified index.
|
|
442
|
-
* @param definition The original search request.
|
|
443
|
-
* @param index The filter index.
|
|
446
|
+
* @param definition - The original search request.
|
|
447
|
+
* @param index - The filter index.
|
|
444
448
|
* @returns The updated search request.
|
|
445
449
|
*/
|
|
446
450
|
export declare function deleteFilter(definition: SearchRequest, index: number): SearchRequest;
|
|
@@ -514,7 +518,7 @@ export declare interface ErrorBoundaryState {
|
|
|
514
518
|
|
|
515
519
|
/**
|
|
516
520
|
* The FhirPathTable component represents the embeddable search table control.
|
|
517
|
-
* @param props FhirPathTable React props.
|
|
521
|
+
* @param props - FhirPathTable React props.
|
|
518
522
|
* @returns FhirPathTable React node.
|
|
519
523
|
*/
|
|
520
524
|
export declare function FhirPathTable(props: FhirPathTableProps): JSX.Element;
|
|
@@ -537,6 +541,8 @@ export declare interface FhirPathTableProps {
|
|
|
537
541
|
|
|
538
542
|
export declare function Form(props: FormProps): JSX.Element;
|
|
539
543
|
|
|
544
|
+
export declare function formatReferenceString(typedValue: TypedValue): string;
|
|
545
|
+
|
|
540
546
|
export declare interface FormProps {
|
|
541
547
|
onSubmit?: (formData: Record<string, string>) => void;
|
|
542
548
|
style?: CSSProperties;
|
|
@@ -557,13 +563,34 @@ export declare interface FormSectionProps {
|
|
|
557
563
|
|
|
558
564
|
export declare function getErrorsForInput(outcome: OperationOutcome | undefined, expression: string | undefined): string | undefined;
|
|
559
565
|
|
|
566
|
+
/**
|
|
567
|
+
* Returns the collection of field definitions for the search request.
|
|
568
|
+
* @param search - The search request definition.
|
|
569
|
+
* @returns An array of field definitions.
|
|
570
|
+
*/
|
|
571
|
+
export declare function getFieldDefinitions(search: SearchRequest): SearchControlField[];
|
|
572
|
+
|
|
560
573
|
export declare function getIssuesForExpression(outcome: OperationOutcome | undefined, expression: string | undefined): OperationOutcomeIssue[] | undefined;
|
|
561
574
|
|
|
562
575
|
export declare function getNewMultiSelectValues(selected: string[], propertyName: string, item: QuestionnaireItem): QuestionnaireResponseItemAnswer[];
|
|
563
576
|
|
|
577
|
+
/**
|
|
578
|
+
* Returns the number of pages in the questionnaire.
|
|
579
|
+
*
|
|
580
|
+
* By default, a questionnaire is represented as a simple single page questionnaire,
|
|
581
|
+
* so the default return value is 1.
|
|
582
|
+
*
|
|
583
|
+
* If the questionnaire has a page extension on the first item, then the number of pages
|
|
584
|
+
* is the number of top level items in the questionnaire.
|
|
585
|
+
*
|
|
586
|
+
* @param questionnaire - The questionnaire to get the number of pages for.
|
|
587
|
+
* @returns The number of pages in the questionnaire. Default is 1.
|
|
588
|
+
*/
|
|
589
|
+
export declare function getNumberOfPages(questionnaire: Questionnaire): number;
|
|
590
|
+
|
|
564
591
|
/**
|
|
565
592
|
* Returns a string representing the operation.
|
|
566
|
-
* @param op The operation code.
|
|
593
|
+
* @param op - The operation code.
|
|
567
594
|
* @returns A display string for the operation.
|
|
568
595
|
*/
|
|
569
596
|
export declare function getOpString(op: Operator): string;
|
|
@@ -572,14 +599,14 @@ export declare function getQuestionnaireItemReferenceTargetTypes(item: Questionn
|
|
|
572
599
|
|
|
573
600
|
/**
|
|
574
601
|
* Starts a request to generate a recapcha token.
|
|
575
|
-
* @param siteKey The reCAPTCHA site key, available from the reCAPTCHA admin page.
|
|
602
|
+
* @param siteKey - The reCAPTCHA site key, available from the reCAPTCHA admin page.
|
|
576
603
|
* @returns Promise to a recaptcha token for the current user.
|
|
577
604
|
*/
|
|
578
605
|
export declare function getRecaptcha(siteKey: string): Promise<string>;
|
|
579
606
|
|
|
580
607
|
/**
|
|
581
608
|
* Returns a list of operators for a search parameter.
|
|
582
|
-
* @param searchParam The search parameter.
|
|
609
|
+
* @param searchParam - The search parameter.
|
|
583
610
|
* @returns The list of operators that can be used for the search parameter.
|
|
584
611
|
*/
|
|
585
612
|
export declare function getSearchOperators(searchParam: SearchParameter): Operator[] | undefined;
|
|
@@ -588,7 +615,7 @@ export declare function getSortField(definition: SearchRequest): string | undefi
|
|
|
588
615
|
|
|
589
616
|
export declare function Header(props: HeaderProps): JSX.Element;
|
|
590
617
|
|
|
591
|
-
declare interface HeaderProps {
|
|
618
|
+
export declare interface HeaderProps {
|
|
592
619
|
pathname?: string;
|
|
593
620
|
searchParams?: URLSearchParams;
|
|
594
621
|
headerSearchDisabled?: boolean;
|
|
@@ -629,11 +656,11 @@ export declare interface IdentifierInputProps {
|
|
|
629
656
|
/**
|
|
630
657
|
* Dynamically loads the recaptcha script.
|
|
631
658
|
* We do not want to load the script on page load unless the user needs it.
|
|
632
|
-
* @param siteKey The reCAPTCHA site key, available from the reCAPTCHA admin page.
|
|
659
|
+
* @param siteKey - The reCAPTCHA site key, available from the reCAPTCHA admin page.
|
|
633
660
|
*/
|
|
634
661
|
export declare function initRecaptcha(siteKey: string): void;
|
|
635
662
|
|
|
636
|
-
declare type IntervalGroup = {
|
|
663
|
+
export declare type IntervalGroup = {
|
|
637
664
|
id: string;
|
|
638
665
|
filters: Record<string, any>;
|
|
639
666
|
intervals: ObservationDefinitionQualifiedInterval[];
|
|
@@ -677,7 +704,7 @@ export declare interface MedplumLinkProps extends TextProps {
|
|
|
677
704
|
* Medplum context includes:
|
|
678
705
|
* 1) medplum - Medplum client library
|
|
679
706
|
* 2) profile - The current user profile (if signed in)
|
|
680
|
-
* @param props The MedplumProvider React props.
|
|
707
|
+
* @param props - The MedplumProvider React props.
|
|
681
708
|
* @returns The MedplumProvider React node.
|
|
682
709
|
*/
|
|
683
710
|
export declare function MedplumProvider(props: MedplumProviderProps): JSX.Element;
|
|
@@ -761,7 +788,7 @@ export declare interface PanelStylesParams {
|
|
|
761
788
|
|
|
762
789
|
/**
|
|
763
790
|
* Parses an HTML form and returns the result as a JavaScript object.
|
|
764
|
-
* @param form The HTML form element.
|
|
791
|
+
* @param form - The HTML form element.
|
|
765
792
|
* @returns Form values in key value pairs.
|
|
766
793
|
*/
|
|
767
794
|
export declare function parseForm(form: HTMLFormElement): Record<string, string>;
|
|
@@ -832,16 +859,6 @@ export declare enum QuestionnaireItemType {
|
|
|
832
859
|
quantity = "quantity"
|
|
833
860
|
}
|
|
834
861
|
|
|
835
|
-
export declare function QuestionnaireRepeatWrapper(props: QuestionnaireRepeatWrapperProps): JSX.Element;
|
|
836
|
-
|
|
837
|
-
export declare interface QuestionnaireRepeatWrapperProps {
|
|
838
|
-
item: QuestionnaireItem;
|
|
839
|
-
allResponses: QuestionnaireResponseItem[];
|
|
840
|
-
currentResponseItems: QuestionnaireResponseItem[];
|
|
841
|
-
groupSequence?: number;
|
|
842
|
-
onChange: (newResponseItem: QuestionnaireResponseItem, index?: number) => void;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
862
|
export declare function RangeDisplay(props: RangeDisplayProps): JSX.Element | null;
|
|
846
863
|
|
|
847
864
|
export declare interface RangeDisplayProps {
|
|
@@ -851,7 +868,7 @@ export declare interface RangeDisplayProps {
|
|
|
851
868
|
/**
|
|
852
869
|
* Renders a Range input.
|
|
853
870
|
* See: https://www.hl7.org/fhir/datatypes.html#Range
|
|
854
|
-
* @param props Range input properties.
|
|
871
|
+
* @param props - Range input properties.
|
|
855
872
|
* @returns Range input element.
|
|
856
873
|
*/
|
|
857
874
|
export declare function RangeInput(props: RangeInputProps): JSX.Element;
|
|
@@ -919,8 +936,8 @@ export declare interface RegisterFormProps {
|
|
|
919
936
|
|
|
920
937
|
/**
|
|
921
938
|
* Returns a fragment to be displayed in the search table for the value.
|
|
922
|
-
* @param resource The parent resource.
|
|
923
|
-
* @param field The search code or FHIRPath expression.
|
|
939
|
+
* @param resource - The parent resource.
|
|
940
|
+
* @param field - The search code or FHIRPath expression.
|
|
924
941
|
* @returns The fragment to display.
|
|
925
942
|
*/
|
|
926
943
|
export declare function renderValue(resource: Resource, field: SearchControlField): string | JSX.Element | null | undefined;
|
|
@@ -935,7 +952,7 @@ export declare interface RequestGroupDisplayProps {
|
|
|
935
952
|
|
|
936
953
|
export declare function ResourceArrayDisplay(props: ResourceArrayDisplayProps): JSX.Element;
|
|
937
954
|
|
|
938
|
-
declare interface ResourceArrayDisplayProps {
|
|
955
|
+
export declare interface ResourceArrayDisplayProps {
|
|
939
956
|
property: InternalSchemaElement;
|
|
940
957
|
values: any[];
|
|
941
958
|
arrayElement?: boolean;
|
|
@@ -945,7 +962,7 @@ declare interface ResourceArrayDisplayProps {
|
|
|
945
962
|
|
|
946
963
|
export declare function ResourceArrayInput(props: ResourceArrayInputProps): JSX.Element;
|
|
947
964
|
|
|
948
|
-
declare interface ResourceArrayInputProps {
|
|
965
|
+
export declare interface ResourceArrayInputProps {
|
|
949
966
|
property: InternalSchemaElement;
|
|
950
967
|
name: string;
|
|
951
968
|
defaultValue?: any[];
|
|
@@ -1021,7 +1038,7 @@ export declare interface ResourceNameProps extends TextProps {
|
|
|
1021
1038
|
|
|
1022
1039
|
/**
|
|
1023
1040
|
* Low-level component that renders a property from a given resource, given type information.
|
|
1024
|
-
* @param props The ResourcePropertyDisplay React props.
|
|
1041
|
+
* @param props - The ResourcePropertyDisplay React props.
|
|
1025
1042
|
* @returns The ResourcePropertyDisplay React node.
|
|
1026
1043
|
*/
|
|
1027
1044
|
export declare function ResourcePropertyDisplay(props: ResourcePropertyDisplayProps): JSX.Element;
|
|
@@ -1099,7 +1116,7 @@ export declare class SearchClickEvent extends Event {
|
|
|
1099
1116
|
* The SearchControl component represents the embeddable search table control.
|
|
1100
1117
|
* It includes the table, rows, headers, sorting, etc.
|
|
1101
1118
|
* It does not include the field editor, filter editor, pagination buttons.
|
|
1102
|
-
* @param props The SearchControl React props.
|
|
1119
|
+
* @param props - The SearchControl React props.
|
|
1103
1120
|
* @returns The SearchControl React node.
|
|
1104
1121
|
*/
|
|
1105
1122
|
export declare function SearchControl(props: SearchControlProps): JSX.Element;
|
|
@@ -1131,7 +1148,7 @@ export declare function SearchControl(props: SearchControlProps): JSX.Element;
|
|
|
1131
1148
|
* Overall, we want columns, fields, properties, and search parameters to feel seamless,
|
|
1132
1149
|
* so we try our darndest to make this work.
|
|
1133
1150
|
*/
|
|
1134
|
-
declare interface SearchControlField {
|
|
1151
|
+
export declare interface SearchControlField {
|
|
1135
1152
|
readonly name: string;
|
|
1136
1153
|
readonly elementDefinition?: InternalSchemaElement;
|
|
1137
1154
|
readonly searchParams?: SearchParameter[];
|
|
@@ -1158,7 +1175,7 @@ export declare interface SearchControlProps {
|
|
|
1158
1175
|
|
|
1159
1176
|
export declare function SearchFieldEditor(props: SearchFieldEditorProps): JSX.Element | null;
|
|
1160
1177
|
|
|
1161
|
-
declare interface SearchFieldEditorProps {
|
|
1178
|
+
export declare interface SearchFieldEditorProps {
|
|
1162
1179
|
visible: boolean;
|
|
1163
1180
|
search: SearchRequest;
|
|
1164
1181
|
onOk: (search: SearchRequest) => void;
|
|
@@ -1187,24 +1204,24 @@ export declare interface ServiceRequestTimelineProps {
|
|
|
1187
1204
|
|
|
1188
1205
|
/**
|
|
1189
1206
|
* Sets the array of filters.
|
|
1190
|
-
* @param definition The original search request.
|
|
1191
|
-
* @param filters The new filters.
|
|
1207
|
+
* @param definition - The original search request.
|
|
1208
|
+
* @param filters - The new filters.
|
|
1192
1209
|
* @returns The updated search request.
|
|
1193
1210
|
*/
|
|
1194
1211
|
export declare function setFilters(definition: SearchRequest, filters: Filter[]): SearchRequest;
|
|
1195
1212
|
|
|
1196
1213
|
/**
|
|
1197
1214
|
* Sets the offset (starting at zero).
|
|
1198
|
-
* @param definition The original search request.
|
|
1199
|
-
* @param offset The offset number.
|
|
1215
|
+
* @param definition - The original search request.
|
|
1216
|
+
* @param offset - The offset number.
|
|
1200
1217
|
* @returns The updated search request.
|
|
1201
1218
|
*/
|
|
1202
1219
|
export declare function setOffset(definition: SearchRequest, offset: number): SearchRequest;
|
|
1203
1220
|
|
|
1204
1221
|
/**
|
|
1205
1222
|
* Creates a new search request with the search offset at the specified page.
|
|
1206
|
-
* @param definition The search definition.
|
|
1207
|
-
* @param page The new page number
|
|
1223
|
+
* @param definition - The search definition.
|
|
1224
|
+
* @param page - The new page number
|
|
1208
1225
|
* @returns The new search definition.
|
|
1209
1226
|
*/
|
|
1210
1227
|
export declare function setPage(definition: SearchRequest, page: number): SearchRequest;
|
|
@@ -1214,9 +1231,9 @@ export declare function setQuestionnaireItemReferenceTargetTypes(item: Questionn
|
|
|
1214
1231
|
/**
|
|
1215
1232
|
* Sorts the search by the specified key, and optional direction.
|
|
1216
1233
|
* Direction defaults to ascending ('asc') if not specified.
|
|
1217
|
-
* @param definition The original search request.
|
|
1218
|
-
* @param sort The sort key.
|
|
1219
|
-
* @param desc Optional descending flag. Default is false.
|
|
1234
|
+
* @param definition - The original search request.
|
|
1235
|
+
* @param sort - The sort key.
|
|
1236
|
+
* @param desc - Optional descending flag. Default is false.
|
|
1220
1237
|
* @returns The updated search request.
|
|
1221
1238
|
*/
|
|
1222
1239
|
export declare function setSort(definition: SearchRequest, sort: string, desc?: boolean): SearchRequest;
|
|
@@ -1230,7 +1247,7 @@ export declare function setSort(definition: SearchRequest, sort: string, desc?:
|
|
|
1230
1247
|
* 3) Choose profile - If the user has multiple profiles, prompt to choose one
|
|
1231
1248
|
* 4) Choose scope - If the user has multiple scopes, prompt to choose one
|
|
1232
1249
|
* 5) Success - Return to the caller with either a code or a redirect
|
|
1233
|
-
* @param props The SignInForm React props.
|
|
1250
|
+
* @param props - The SignInForm React props.
|
|
1234
1251
|
* @returns The SignInForm React node.
|
|
1235
1252
|
*/
|
|
1236
1253
|
export declare function SignInForm(props: SignInFormProps): JSX.Element;
|
|
@@ -1255,8 +1272,8 @@ export declare interface SmartSearchResponse {
|
|
|
1255
1272
|
|
|
1256
1273
|
/**
|
|
1257
1274
|
* Sorts an array of resources in place by meta.lastUpdated ascending.
|
|
1258
|
-
* @param resources Array of resources.
|
|
1259
|
-
* @param timelineResource Optional primary resource of a timeline view. If specified, the primary resource will be sorted by meta.lastUpdated descending.
|
|
1275
|
+
* @param resources - Array of resources.
|
|
1276
|
+
* @param timelineResource - Optional primary resource of a timeline view. If specified, the primary resource will be sorted by meta.lastUpdated descending.
|
|
1260
1277
|
*/
|
|
1261
1278
|
export declare function sortByDateAndPriority(resources: Resource[], timelineResource?: Resource): void;
|
|
1262
1279
|
|
|
@@ -1294,8 +1311,8 @@ export declare interface TimingInputProps {
|
|
|
1294
1311
|
* Toggles the sort of the search by key.
|
|
1295
1312
|
* If the search is already sorted by the key, reverses the direction.
|
|
1296
1313
|
* If the search is not sorted by the key, sort in ascending order.
|
|
1297
|
-
* @param definition The original search request.
|
|
1298
|
-
* @param key The field key name.
|
|
1314
|
+
* @param definition - The original search request.
|
|
1315
|
+
* @param key - The field key name.
|
|
1299
1316
|
* @returns The updated search request.
|
|
1300
1317
|
*/
|
|
1301
1318
|
export declare function toggleSort(definition: SearchRequest, key: string): SearchRequest;
|
|
@@ -1329,8 +1346,8 @@ export declare function useMedplumProfile(): ProfileResource | undefined;
|
|
|
1329
1346
|
/**
|
|
1330
1347
|
* React Hook to use a FHIR reference.
|
|
1331
1348
|
* Handles the complexity of resolving references and caching resources.
|
|
1332
|
-
* @param value The resource or reference to resource.
|
|
1333
|
-
* @param setOutcome Optional callback to set the OperationOutcome.
|
|
1349
|
+
* @param value - The resource or reference to resource.
|
|
1350
|
+
* @param setOutcome - Optional callback to set the OperationOutcome.
|
|
1334
1351
|
* @returns The resolved resource.
|
|
1335
1352
|
*/
|
|
1336
1353
|
export declare function useResource<T extends Resource>(value: Reference<T> | T | undefined, setOutcome?: (outcome: OperationOutcome) => void): T | undefined;
|
|
@@ -1340,8 +1357,8 @@ export declare function useResource<T extends Resource>(value: Reference<T> | T
|
|
|
1340
1357
|
*
|
|
1341
1358
|
* This is a convenience hook for calling the MedplumClient.search() method.
|
|
1342
1359
|
*
|
|
1343
|
-
* @param resourceType The FHIR resource type to search.
|
|
1344
|
-
* @param query Optional search parameters.
|
|
1360
|
+
* @param resourceType - The FHIR resource type to search.
|
|
1361
|
+
* @param query - Optional search parameters.
|
|
1345
1362
|
* @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
|
|
1346
1363
|
*/
|
|
1347
1364
|
export declare function useSearch<K extends ResourceType>(resourceType: K, query?: QueryTypes): [Bundle<ExtractResource<K>> | undefined, boolean, OperationOutcome | undefined];
|
|
@@ -1351,8 +1368,8 @@ export declare function useSearch<K extends ResourceType>(resourceType: K, query
|
|
|
1351
1368
|
*
|
|
1352
1369
|
* This is a convenience hook for calling the MedplumClient.searchOne() method.
|
|
1353
1370
|
*
|
|
1354
|
-
* @param resourceType The FHIR resource type to search.
|
|
1355
|
-
* @param query Optional search parameters.
|
|
1371
|
+
* @param resourceType - The FHIR resource type to search.
|
|
1372
|
+
* @param query - Optional search parameters.
|
|
1356
1373
|
* @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
|
|
1357
1374
|
*/
|
|
1358
1375
|
export declare function useSearchOne<K extends ResourceType>(resourceType: K, query?: QueryTypes): [ExtractResource<K> | undefined, boolean, OperationOutcome | undefined];
|
|
@@ -1362,8 +1379,8 @@ export declare function useSearchOne<K extends ResourceType>(resourceType: K, qu
|
|
|
1362
1379
|
*
|
|
1363
1380
|
* This is a convenience hook for calling the MedplumClient.searchResources() method.
|
|
1364
1381
|
*
|
|
1365
|
-
* @param resourceType The FHIR resource type to search.
|
|
1366
|
-
* @param query Optional search parameters.
|
|
1382
|
+
* @param resourceType - The FHIR resource type to search.
|
|
1383
|
+
* @param query - Optional search parameters.
|
|
1367
1384
|
* @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
|
|
1368
1385
|
*/
|
|
1369
1386
|
export declare function useSearchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes): [ResourceArray<ExtractResource<K>> | undefined, boolean, OperationOutcome | undefined];
|
package/package.json
CHANGED
|
@@ -1,24 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/react",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "Medplum React Component Library",
|
|
5
|
-
"
|
|
6
|
-
|
|
5
|
+
"keywords": [
|
|
6
|
+
"medplum",
|
|
7
|
+
"fhir",
|
|
8
|
+
"healthcare",
|
|
9
|
+
"interoperability",
|
|
10
|
+
"json",
|
|
11
|
+
"serialization",
|
|
12
|
+
"hl7",
|
|
13
|
+
"standards",
|
|
14
|
+
"clinical",
|
|
15
|
+
"dstu2",
|
|
16
|
+
"stu3",
|
|
17
|
+
"r4",
|
|
18
|
+
"normative",
|
|
19
|
+
"ui",
|
|
20
|
+
"input",
|
|
21
|
+
"react",
|
|
22
|
+
"react-component"
|
|
23
|
+
],
|
|
7
24
|
"homepage": "https://www.medplum.com/",
|
|
8
25
|
"repository": {
|
|
9
26
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/medplum/medplum.git",
|
|
27
|
+
"url": "git+https://github.com/medplum/medplum.git",
|
|
11
28
|
"directory": "packages/react"
|
|
12
29
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
30
|
+
"license": "Apache-2.0",
|
|
31
|
+
"author": "Medplum <hello@medplum.com>",
|
|
32
|
+
"type": "module",
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"exports": {
|
|
35
|
+
"types": "./dist/types.d.ts",
|
|
36
|
+
"require": "./dist/cjs/index.cjs",
|
|
37
|
+
"import": "./dist/esm/index.mjs"
|
|
15
38
|
},
|
|
39
|
+
"main": "dist/cjs/index.cjs",
|
|
40
|
+
"module": "dist/esm/index.mjs",
|
|
41
|
+
"types": "dist/types.d.ts",
|
|
16
42
|
"scripts": {
|
|
43
|
+
"build": "npm run clean && tsc --project tsconfig.build.json && node esbuild.mjs && api-extractor run --local",
|
|
17
44
|
"clean": "rimraf dist storybook-static",
|
|
18
45
|
"dev": "storybook dev -p 6006",
|
|
19
|
-
"
|
|
20
|
-
"test": "jest"
|
|
21
|
-
"storybook": "storybook build"
|
|
46
|
+
"storybook": "storybook build",
|
|
47
|
+
"test": "jest"
|
|
22
48
|
},
|
|
23
49
|
"devDependencies": {
|
|
24
50
|
"@emotion/react": "11.11.1",
|
|
@@ -76,32 +102,7 @@
|
|
|
76
102
|
"optional": true
|
|
77
103
|
}
|
|
78
104
|
},
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"exports": {
|
|
83
|
-
"types": "./dist/types.d.ts",
|
|
84
|
-
"require": "./dist/cjs/index.cjs",
|
|
85
|
-
"import": "./dist/esm/index.mjs"
|
|
86
|
-
},
|
|
87
|
-
"sideEffects": false,
|
|
88
|
-
"keywords": [
|
|
89
|
-
"medplum",
|
|
90
|
-
"fhir",
|
|
91
|
-
"healthcare",
|
|
92
|
-
"interoperability",
|
|
93
|
-
"json",
|
|
94
|
-
"serialization",
|
|
95
|
-
"hl7",
|
|
96
|
-
"standards",
|
|
97
|
-
"clinical",
|
|
98
|
-
"dstu2",
|
|
99
|
-
"stu3",
|
|
100
|
-
"r4",
|
|
101
|
-
"normative",
|
|
102
|
-
"ui",
|
|
103
|
-
"input",
|
|
104
|
-
"react",
|
|
105
|
-
"react-component"
|
|
106
|
-
]
|
|
105
|
+
"engines": {
|
|
106
|
+
"node": ">=18.0.0"
|
|
107
|
+
}
|
|
107
108
|
}
|
package/tsdoc.json
ADDED