@medplum/react 2.1.10 → 2.1.12
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 +5 -5
- package/dist/esm/index.mjs.map +4 -4
- package/dist/types.d.ts +113 -89
- package/package.json +38 -37
- package/tsdoc.json +4 -0
package/dist/types.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { HumanName } from '@medplum/fhirtypes';
|
|
|
25
25
|
import { HumanNameFormatOptions } from '@medplum/core';
|
|
26
26
|
import { Identifier } from '@medplum/fhirtypes';
|
|
27
27
|
import { InternalSchemaElement } from '@medplum/core';
|
|
28
|
+
import { MeasureReport } from '@medplum/fhirtypes';
|
|
28
29
|
import { Media } from '@medplum/fhirtypes';
|
|
29
30
|
import { MedplumClient } from '@medplum/core';
|
|
30
31
|
import { Money } from '@medplum/fhirtypes';
|
|
@@ -68,54 +69,54 @@ import { UserConfiguration } from '@medplum/fhirtypes';
|
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* 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.
|
|
72
|
+
* @param definition - The original search request.
|
|
73
|
+
* @param field - The field key name.
|
|
74
|
+
* @param d1 - The start date.
|
|
75
|
+
* @param d2 - The end date.
|
|
75
76
|
* @returns The updated search request.
|
|
76
77
|
*/
|
|
77
78
|
export declare function addDateFilterBetween(definition: SearchRequest, field: string, d1: Date, d2: Date): SearchRequest;
|
|
78
79
|
|
|
79
80
|
/**
|
|
80
81
|
* Adds a field.
|
|
81
|
-
* @param definition The original search request.
|
|
82
|
-
* @param field The field key name.
|
|
82
|
+
* @param definition - The original search request.
|
|
83
|
+
* @param field - The field key name.
|
|
83
84
|
* @returns The updated search request.
|
|
84
85
|
*/
|
|
85
86
|
export declare function addField(definition: SearchRequest, field: string): SearchRequest;
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* 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.
|
|
90
|
+
* @param definition - The original search request.
|
|
91
|
+
* @param field - The field key name.
|
|
92
|
+
* @param op - The operation key name.
|
|
93
|
+
* @param value - The filter value.
|
|
94
|
+
* @param opt_clear - Optional flag to clear filters on the field.
|
|
94
95
|
* @returns The updated search request.
|
|
95
96
|
*/
|
|
96
97
|
export declare function addFilter(definition: SearchRequest, field: string, op: Operator, value?: string, opt_clear?: boolean): SearchRequest;
|
|
97
98
|
|
|
98
99
|
/**
|
|
99
100
|
* 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.
|
|
101
|
+
* @param definition - The original search request.
|
|
102
|
+
* @param field - The field key name.
|
|
102
103
|
* @returns The updated search request.
|
|
103
104
|
*/
|
|
104
105
|
export declare function addLastMonthFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
105
106
|
|
|
106
107
|
/**
|
|
107
108
|
* 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.
|
|
109
|
+
* @param definition - The original search request.
|
|
110
|
+
* @param field - The field key name.
|
|
111
|
+
* @param value - Optional boolean value. Default is true.
|
|
111
112
|
* @returns The updated search request.
|
|
112
113
|
*/
|
|
113
114
|
export declare function addMissingFilter(definition: SearchRequest, field: string, value?: boolean): SearchRequest;
|
|
114
115
|
|
|
115
116
|
/**
|
|
116
117
|
* 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.
|
|
118
|
+
* @param definition - The original search request.
|
|
119
|
+
* @param field - The field key name.
|
|
119
120
|
* @returns The updated search request.
|
|
120
121
|
*/
|
|
121
122
|
export declare function addNextMonthFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
@@ -136,40 +137,40 @@ export declare interface AddressInputProps {
|
|
|
136
137
|
|
|
137
138
|
/**
|
|
138
139
|
* 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.
|
|
140
|
+
* @param definition - The original search request.
|
|
141
|
+
* @param field - The field key name.
|
|
141
142
|
* @returns The updated search request.
|
|
142
143
|
*/
|
|
143
144
|
export declare function addThisMonthFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
144
145
|
|
|
145
146
|
/**
|
|
146
147
|
* Adds a filter that constrains the specified field to "today".
|
|
147
|
-
* @param definition The original search request.
|
|
148
|
-
* @param field The field key name.
|
|
148
|
+
* @param definition - The original search request.
|
|
149
|
+
* @param field - The field key name.
|
|
149
150
|
* @returns The updated search request.
|
|
150
151
|
*/
|
|
151
152
|
export declare function addTodayFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
152
153
|
|
|
153
154
|
/**
|
|
154
155
|
* Adds a filter that constrains the specified field to "tomorrow".
|
|
155
|
-
* @param definition The original search request.
|
|
156
|
-
* @param field The field key name.
|
|
156
|
+
* @param definition - The original search request.
|
|
157
|
+
* @param field - The field key name.
|
|
157
158
|
* @returns The updated search request.
|
|
158
159
|
*/
|
|
159
160
|
export declare function addTomorrowFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
160
161
|
|
|
161
162
|
/**
|
|
162
163
|
* 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.
|
|
164
|
+
* @param definition - The original search request.
|
|
165
|
+
* @param field - The field key name.
|
|
165
166
|
* @returns The updated search request.
|
|
166
167
|
*/
|
|
167
168
|
export declare function addYearToDateFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
168
169
|
|
|
169
170
|
/**
|
|
170
171
|
* Adds a filter that constrains the specified field to "yesterday".
|
|
171
|
-
* @param definition The original search request.
|
|
172
|
-
* @param field The field key name.
|
|
172
|
+
* @param definition - The original search request.
|
|
173
|
+
* @param field - The field key name.
|
|
173
174
|
* @returns The updated search request.
|
|
174
175
|
*/
|
|
175
176
|
export declare function addYesterdayFilter(definition: SearchRequest, field: string): SearchRequest;
|
|
@@ -276,11 +277,15 @@ export declare interface BackboneElementInputProps {
|
|
|
276
277
|
|
|
277
278
|
/**
|
|
278
279
|
* Returns a field display name.
|
|
279
|
-
* @param key The field key.
|
|
280
|
+
* @param key - The field key.
|
|
280
281
|
* @returns The field display name.
|
|
281
282
|
*/
|
|
282
283
|
export declare function buildFieldNameString(key: string): string;
|
|
283
284
|
|
|
285
|
+
export declare function buildInitialResponse(questionnaire: Questionnaire): QuestionnaireResponse;
|
|
286
|
+
|
|
287
|
+
export declare function buildInitialResponseItem(item: QuestionnaireItem): QuestionnaireResponseItem;
|
|
288
|
+
|
|
284
289
|
export declare function CalendarInput(props: CalendarInputProps): JSX.Element;
|
|
285
290
|
|
|
286
291
|
export declare interface CalendarInputProps {
|
|
@@ -301,15 +306,15 @@ export declare interface CheckboxFormSectionProps {
|
|
|
301
306
|
|
|
302
307
|
/**
|
|
303
308
|
* Clears all of the filters.
|
|
304
|
-
* @param definition The original search request.
|
|
309
|
+
* @param definition - The original search request.
|
|
305
310
|
* @returns The updated search request.
|
|
306
311
|
*/
|
|
307
312
|
export declare function clearFilters(definition: SearchRequest): SearchRequest;
|
|
308
313
|
|
|
309
314
|
/**
|
|
310
315
|
* 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.
|
|
316
|
+
* @param definition - The original search request.
|
|
317
|
+
* @param code - The field key name to clear filters.
|
|
313
318
|
* @returns The updated search request.
|
|
314
319
|
*/
|
|
315
320
|
export declare function clearFiltersOnField(definition: SearchRequest, code: string): SearchRequest;
|
|
@@ -392,22 +397,22 @@ export declare function Container(props: ContainerProps): JSX.Element;
|
|
|
392
397
|
|
|
393
398
|
/**
|
|
394
399
|
* Converts an ISO-8601 date/time string to a local date/time string.
|
|
395
|
-
* @param isoString The ISO-8601 date/time string to convert.
|
|
400
|
+
* @param isoString - The ISO-8601 date/time string to convert.
|
|
396
401
|
* @returns The local date/time string.
|
|
397
402
|
*/
|
|
398
403
|
export declare function convertIsoToLocal(isoString: string | undefined): string;
|
|
399
404
|
|
|
400
405
|
/**
|
|
401
406
|
* Converts a local date/time string to an ISO-8601 date/time string.
|
|
402
|
-
* @param localString The local date/time string to convert.
|
|
407
|
+
* @param localString - The local date/time string to convert.
|
|
403
408
|
* @returns The ISO-8601 date/time string.
|
|
404
409
|
*/
|
|
405
410
|
export declare function convertLocalToIso(localString: string | undefined): string;
|
|
406
411
|
|
|
407
412
|
/**
|
|
408
413
|
* 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.
|
|
414
|
+
* @param src - The JavaScript file URL.
|
|
415
|
+
* @param onload - Optional callback for the onload event.
|
|
411
416
|
*/
|
|
412
417
|
export declare function createScriptTag(src: string, onload?: () => void): void;
|
|
413
418
|
|
|
@@ -416,7 +421,7 @@ export declare function createScriptTag(src: string, onload?: () => void): void;
|
|
|
416
421
|
* The main purpose is to reconcile time zones.
|
|
417
422
|
* Most of our date/time values are in ISO-8601, which includes a time zone offset.
|
|
418
423
|
* The datetime-local input does not support the time zone offset.
|
|
419
|
-
* @param props The Input props.
|
|
424
|
+
* @param props - The Input props.
|
|
420
425
|
* @returns The JSX element to render.
|
|
421
426
|
*/
|
|
422
427
|
export declare function DateTimeInput(props: DateTimeInputProps): JSX.Element;
|
|
@@ -439,8 +444,8 @@ export declare interface DefaultResourceTimelineProps {
|
|
|
439
444
|
|
|
440
445
|
/**
|
|
441
446
|
* Deletes a filter at the specified index.
|
|
442
|
-
* @param definition The original search request.
|
|
443
|
-
* @param index The filter index.
|
|
447
|
+
* @param definition - The original search request.
|
|
448
|
+
* @param index - The filter index.
|
|
444
449
|
* @returns The updated search request.
|
|
445
450
|
*/
|
|
446
451
|
export declare function deleteFilter(definition: SearchRequest, index: number): SearchRequest;
|
|
@@ -514,7 +519,7 @@ export declare interface ErrorBoundaryState {
|
|
|
514
519
|
|
|
515
520
|
/**
|
|
516
521
|
* The FhirPathTable component represents the embeddable search table control.
|
|
517
|
-
* @param props FhirPathTable React props.
|
|
522
|
+
* @param props - FhirPathTable React props.
|
|
518
523
|
* @returns FhirPathTable React node.
|
|
519
524
|
*/
|
|
520
525
|
export declare function FhirPathTable(props: FhirPathTableProps): JSX.Element;
|
|
@@ -537,6 +542,8 @@ export declare interface FhirPathTableProps {
|
|
|
537
542
|
|
|
538
543
|
export declare function Form(props: FormProps): JSX.Element;
|
|
539
544
|
|
|
545
|
+
export declare function formatReferenceString(typedValue: TypedValue): string;
|
|
546
|
+
|
|
540
547
|
export declare interface FormProps {
|
|
541
548
|
onSubmit?: (formData: Record<string, string>) => void;
|
|
542
549
|
style?: CSSProperties;
|
|
@@ -557,13 +564,34 @@ export declare interface FormSectionProps {
|
|
|
557
564
|
|
|
558
565
|
export declare function getErrorsForInput(outcome: OperationOutcome | undefined, expression: string | undefined): string | undefined;
|
|
559
566
|
|
|
567
|
+
/**
|
|
568
|
+
* Returns the collection of field definitions for the search request.
|
|
569
|
+
* @param search - The search request definition.
|
|
570
|
+
* @returns An array of field definitions.
|
|
571
|
+
*/
|
|
572
|
+
export declare function getFieldDefinitions(search: SearchRequest): SearchControlField[];
|
|
573
|
+
|
|
560
574
|
export declare function getIssuesForExpression(outcome: OperationOutcome | undefined, expression: string | undefined): OperationOutcomeIssue[] | undefined;
|
|
561
575
|
|
|
562
576
|
export declare function getNewMultiSelectValues(selected: string[], propertyName: string, item: QuestionnaireItem): QuestionnaireResponseItemAnswer[];
|
|
563
577
|
|
|
578
|
+
/**
|
|
579
|
+
* Returns the number of pages in the questionnaire.
|
|
580
|
+
*
|
|
581
|
+
* By default, a questionnaire is represented as a simple single page questionnaire,
|
|
582
|
+
* so the default return value is 1.
|
|
583
|
+
*
|
|
584
|
+
* If the questionnaire has a page extension on the first item, then the number of pages
|
|
585
|
+
* is the number of top level items in the questionnaire.
|
|
586
|
+
*
|
|
587
|
+
* @param questionnaire - The questionnaire to get the number of pages for.
|
|
588
|
+
* @returns The number of pages in the questionnaire. Default is 1.
|
|
589
|
+
*/
|
|
590
|
+
export declare function getNumberOfPages(questionnaire: Questionnaire): number;
|
|
591
|
+
|
|
564
592
|
/**
|
|
565
593
|
* Returns a string representing the operation.
|
|
566
|
-
* @param op The operation code.
|
|
594
|
+
* @param op - The operation code.
|
|
567
595
|
* @returns A display string for the operation.
|
|
568
596
|
*/
|
|
569
597
|
export declare function getOpString(op: Operator): string;
|
|
@@ -572,14 +600,14 @@ export declare function getQuestionnaireItemReferenceTargetTypes(item: Questionn
|
|
|
572
600
|
|
|
573
601
|
/**
|
|
574
602
|
* Starts a request to generate a recapcha token.
|
|
575
|
-
* @param siteKey The reCAPTCHA site key, available from the reCAPTCHA admin page.
|
|
603
|
+
* @param siteKey - The reCAPTCHA site key, available from the reCAPTCHA admin page.
|
|
576
604
|
* @returns Promise to a recaptcha token for the current user.
|
|
577
605
|
*/
|
|
578
606
|
export declare function getRecaptcha(siteKey: string): Promise<string>;
|
|
579
607
|
|
|
580
608
|
/**
|
|
581
609
|
* Returns a list of operators for a search parameter.
|
|
582
|
-
* @param searchParam The search parameter.
|
|
610
|
+
* @param searchParam - The search parameter.
|
|
583
611
|
* @returns The list of operators that can be used for the search parameter.
|
|
584
612
|
*/
|
|
585
613
|
export declare function getSearchOperators(searchParam: SearchParameter): Operator[] | undefined;
|
|
@@ -588,7 +616,7 @@ export declare function getSortField(definition: SearchRequest): string | undefi
|
|
|
588
616
|
|
|
589
617
|
export declare function Header(props: HeaderProps): JSX.Element;
|
|
590
618
|
|
|
591
|
-
declare interface HeaderProps {
|
|
619
|
+
export declare interface HeaderProps {
|
|
592
620
|
pathname?: string;
|
|
593
621
|
searchParams?: URLSearchParams;
|
|
594
622
|
headerSearchDisabled?: boolean;
|
|
@@ -629,11 +657,11 @@ export declare interface IdentifierInputProps {
|
|
|
629
657
|
/**
|
|
630
658
|
* Dynamically loads the recaptcha script.
|
|
631
659
|
* 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.
|
|
660
|
+
* @param siteKey - The reCAPTCHA site key, available from the reCAPTCHA admin page.
|
|
633
661
|
*/
|
|
634
662
|
export declare function initRecaptcha(siteKey: string): void;
|
|
635
663
|
|
|
636
|
-
declare type IntervalGroup = {
|
|
664
|
+
export declare type IntervalGroup = {
|
|
637
665
|
id: string;
|
|
638
666
|
filters: Record<string, any>;
|
|
639
667
|
intervals: ObservationDefinitionQualifiedInterval[];
|
|
@@ -654,6 +682,12 @@ export declare interface LogoProps {
|
|
|
654
682
|
fill?: string;
|
|
655
683
|
}
|
|
656
684
|
|
|
685
|
+
export declare function MeasureReportDisplay(props: MeasureReportDisplayProps): JSX.Element | null;
|
|
686
|
+
|
|
687
|
+
export declare interface MeasureReportDisplayProps {
|
|
688
|
+
readonly measureReport: MeasureReport | Reference<MeasureReport>;
|
|
689
|
+
}
|
|
690
|
+
|
|
657
691
|
export declare interface MedplumContext {
|
|
658
692
|
medplum: MedplumClient;
|
|
659
693
|
navigate: MepdlumNavigateFunction;
|
|
@@ -677,7 +711,7 @@ export declare interface MedplumLinkProps extends TextProps {
|
|
|
677
711
|
* Medplum context includes:
|
|
678
712
|
* 1) medplum - Medplum client library
|
|
679
713
|
* 2) profile - The current user profile (if signed in)
|
|
680
|
-
* @param props The MedplumProvider React props.
|
|
714
|
+
* @param props - The MedplumProvider React props.
|
|
681
715
|
* @returns The MedplumProvider React node.
|
|
682
716
|
*/
|
|
683
717
|
export declare function MedplumProvider(props: MedplumProviderProps): JSX.Element;
|
|
@@ -761,7 +795,7 @@ export declare interface PanelStylesParams {
|
|
|
761
795
|
|
|
762
796
|
/**
|
|
763
797
|
* Parses an HTML form and returns the result as a JavaScript object.
|
|
764
|
-
* @param form The HTML form element.
|
|
798
|
+
* @param form - The HTML form element.
|
|
765
799
|
* @returns Form values in key value pairs.
|
|
766
800
|
*/
|
|
767
801
|
export declare function parseForm(form: HTMLFormElement): Record<string, string>;
|
|
@@ -832,16 +866,6 @@ export declare enum QuestionnaireItemType {
|
|
|
832
866
|
quantity = "quantity"
|
|
833
867
|
}
|
|
834
868
|
|
|
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
869
|
export declare function RangeDisplay(props: RangeDisplayProps): JSX.Element | null;
|
|
846
870
|
|
|
847
871
|
export declare interface RangeDisplayProps {
|
|
@@ -851,7 +875,7 @@ export declare interface RangeDisplayProps {
|
|
|
851
875
|
/**
|
|
852
876
|
* Renders a Range input.
|
|
853
877
|
* See: https://www.hl7.org/fhir/datatypes.html#Range
|
|
854
|
-
* @param props Range input properties.
|
|
878
|
+
* @param props - Range input properties.
|
|
855
879
|
* @returns Range input element.
|
|
856
880
|
*/
|
|
857
881
|
export declare function RangeInput(props: RangeInputProps): JSX.Element;
|
|
@@ -919,8 +943,8 @@ export declare interface RegisterFormProps {
|
|
|
919
943
|
|
|
920
944
|
/**
|
|
921
945
|
* 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.
|
|
946
|
+
* @param resource - The parent resource.
|
|
947
|
+
* @param field - The search code or FHIRPath expression.
|
|
924
948
|
* @returns The fragment to display.
|
|
925
949
|
*/
|
|
926
950
|
export declare function renderValue(resource: Resource, field: SearchControlField): string | JSX.Element | null | undefined;
|
|
@@ -935,7 +959,7 @@ export declare interface RequestGroupDisplayProps {
|
|
|
935
959
|
|
|
936
960
|
export declare function ResourceArrayDisplay(props: ResourceArrayDisplayProps): JSX.Element;
|
|
937
961
|
|
|
938
|
-
declare interface ResourceArrayDisplayProps {
|
|
962
|
+
export declare interface ResourceArrayDisplayProps {
|
|
939
963
|
property: InternalSchemaElement;
|
|
940
964
|
values: any[];
|
|
941
965
|
arrayElement?: boolean;
|
|
@@ -945,7 +969,7 @@ declare interface ResourceArrayDisplayProps {
|
|
|
945
969
|
|
|
946
970
|
export declare function ResourceArrayInput(props: ResourceArrayInputProps): JSX.Element;
|
|
947
971
|
|
|
948
|
-
declare interface ResourceArrayInputProps {
|
|
972
|
+
export declare interface ResourceArrayInputProps {
|
|
949
973
|
property: InternalSchemaElement;
|
|
950
974
|
name: string;
|
|
951
975
|
defaultValue?: any[];
|
|
@@ -1021,7 +1045,7 @@ export declare interface ResourceNameProps extends TextProps {
|
|
|
1021
1045
|
|
|
1022
1046
|
/**
|
|
1023
1047
|
* Low-level component that renders a property from a given resource, given type information.
|
|
1024
|
-
* @param props The ResourcePropertyDisplay React props.
|
|
1048
|
+
* @param props - The ResourcePropertyDisplay React props.
|
|
1025
1049
|
* @returns The ResourcePropertyDisplay React node.
|
|
1026
1050
|
*/
|
|
1027
1051
|
export declare function ResourcePropertyDisplay(props: ResourcePropertyDisplayProps): JSX.Element;
|
|
@@ -1099,7 +1123,7 @@ export declare class SearchClickEvent extends Event {
|
|
|
1099
1123
|
* The SearchControl component represents the embeddable search table control.
|
|
1100
1124
|
* It includes the table, rows, headers, sorting, etc.
|
|
1101
1125
|
* It does not include the field editor, filter editor, pagination buttons.
|
|
1102
|
-
* @param props The SearchControl React props.
|
|
1126
|
+
* @param props - The SearchControl React props.
|
|
1103
1127
|
* @returns The SearchControl React node.
|
|
1104
1128
|
*/
|
|
1105
1129
|
export declare function SearchControl(props: SearchControlProps): JSX.Element;
|
|
@@ -1131,7 +1155,7 @@ export declare function SearchControl(props: SearchControlProps): JSX.Element;
|
|
|
1131
1155
|
* Overall, we want columns, fields, properties, and search parameters to feel seamless,
|
|
1132
1156
|
* so we try our darndest to make this work.
|
|
1133
1157
|
*/
|
|
1134
|
-
declare interface SearchControlField {
|
|
1158
|
+
export declare interface SearchControlField {
|
|
1135
1159
|
readonly name: string;
|
|
1136
1160
|
readonly elementDefinition?: InternalSchemaElement;
|
|
1137
1161
|
readonly searchParams?: SearchParameter[];
|
|
@@ -1158,7 +1182,7 @@ export declare interface SearchControlProps {
|
|
|
1158
1182
|
|
|
1159
1183
|
export declare function SearchFieldEditor(props: SearchFieldEditorProps): JSX.Element | null;
|
|
1160
1184
|
|
|
1161
|
-
declare interface SearchFieldEditorProps {
|
|
1185
|
+
export declare interface SearchFieldEditorProps {
|
|
1162
1186
|
visible: boolean;
|
|
1163
1187
|
search: SearchRequest;
|
|
1164
1188
|
onOk: (search: SearchRequest) => void;
|
|
@@ -1187,24 +1211,24 @@ export declare interface ServiceRequestTimelineProps {
|
|
|
1187
1211
|
|
|
1188
1212
|
/**
|
|
1189
1213
|
* Sets the array of filters.
|
|
1190
|
-
* @param definition The original search request.
|
|
1191
|
-
* @param filters The new filters.
|
|
1214
|
+
* @param definition - The original search request.
|
|
1215
|
+
* @param filters - The new filters.
|
|
1192
1216
|
* @returns The updated search request.
|
|
1193
1217
|
*/
|
|
1194
1218
|
export declare function setFilters(definition: SearchRequest, filters: Filter[]): SearchRequest;
|
|
1195
1219
|
|
|
1196
1220
|
/**
|
|
1197
1221
|
* Sets the offset (starting at zero).
|
|
1198
|
-
* @param definition The original search request.
|
|
1199
|
-
* @param offset The offset number.
|
|
1222
|
+
* @param definition - The original search request.
|
|
1223
|
+
* @param offset - The offset number.
|
|
1200
1224
|
* @returns The updated search request.
|
|
1201
1225
|
*/
|
|
1202
1226
|
export declare function setOffset(definition: SearchRequest, offset: number): SearchRequest;
|
|
1203
1227
|
|
|
1204
1228
|
/**
|
|
1205
1229
|
* 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
|
|
1230
|
+
* @param definition - The search definition.
|
|
1231
|
+
* @param page - The new page number
|
|
1208
1232
|
* @returns The new search definition.
|
|
1209
1233
|
*/
|
|
1210
1234
|
export declare function setPage(definition: SearchRequest, page: number): SearchRequest;
|
|
@@ -1214,9 +1238,9 @@ export declare function setQuestionnaireItemReferenceTargetTypes(item: Questionn
|
|
|
1214
1238
|
/**
|
|
1215
1239
|
* Sorts the search by the specified key, and optional direction.
|
|
1216
1240
|
* 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.
|
|
1241
|
+
* @param definition - The original search request.
|
|
1242
|
+
* @param sort - The sort key.
|
|
1243
|
+
* @param desc - Optional descending flag. Default is false.
|
|
1220
1244
|
* @returns The updated search request.
|
|
1221
1245
|
*/
|
|
1222
1246
|
export declare function setSort(definition: SearchRequest, sort: string, desc?: boolean): SearchRequest;
|
|
@@ -1230,7 +1254,7 @@ export declare function setSort(definition: SearchRequest, sort: string, desc?:
|
|
|
1230
1254
|
* 3) Choose profile - If the user has multiple profiles, prompt to choose one
|
|
1231
1255
|
* 4) Choose scope - If the user has multiple scopes, prompt to choose one
|
|
1232
1256
|
* 5) Success - Return to the caller with either a code or a redirect
|
|
1233
|
-
* @param props The SignInForm React props.
|
|
1257
|
+
* @param props - The SignInForm React props.
|
|
1234
1258
|
* @returns The SignInForm React node.
|
|
1235
1259
|
*/
|
|
1236
1260
|
export declare function SignInForm(props: SignInFormProps): JSX.Element;
|
|
@@ -1255,8 +1279,8 @@ export declare interface SmartSearchResponse {
|
|
|
1255
1279
|
|
|
1256
1280
|
/**
|
|
1257
1281
|
* 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.
|
|
1282
|
+
* @param resources - Array of resources.
|
|
1283
|
+
* @param timelineResource - Optional primary resource of a timeline view. If specified, the primary resource will be sorted by meta.lastUpdated descending.
|
|
1260
1284
|
*/
|
|
1261
1285
|
export declare function sortByDateAndPriority(resources: Resource[], timelineResource?: Resource): void;
|
|
1262
1286
|
|
|
@@ -1294,8 +1318,8 @@ export declare interface TimingInputProps {
|
|
|
1294
1318
|
* Toggles the sort of the search by key.
|
|
1295
1319
|
* If the search is already sorted by the key, reverses the direction.
|
|
1296
1320
|
* 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.
|
|
1321
|
+
* @param definition - The original search request.
|
|
1322
|
+
* @param key - The field key name.
|
|
1299
1323
|
* @returns The updated search request.
|
|
1300
1324
|
*/
|
|
1301
1325
|
export declare function toggleSort(definition: SearchRequest, key: string): SearchRequest;
|
|
@@ -1329,8 +1353,8 @@ export declare function useMedplumProfile(): ProfileResource | undefined;
|
|
|
1329
1353
|
/**
|
|
1330
1354
|
* React Hook to use a FHIR reference.
|
|
1331
1355
|
* 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.
|
|
1356
|
+
* @param value - The resource or reference to resource.
|
|
1357
|
+
* @param setOutcome - Optional callback to set the OperationOutcome.
|
|
1334
1358
|
* @returns The resolved resource.
|
|
1335
1359
|
*/
|
|
1336
1360
|
export declare function useResource<T extends Resource>(value: Reference<T> | T | undefined, setOutcome?: (outcome: OperationOutcome) => void): T | undefined;
|
|
@@ -1340,8 +1364,8 @@ export declare function useResource<T extends Resource>(value: Reference<T> | T
|
|
|
1340
1364
|
*
|
|
1341
1365
|
* This is a convenience hook for calling the MedplumClient.search() method.
|
|
1342
1366
|
*
|
|
1343
|
-
* @param resourceType The FHIR resource type to search.
|
|
1344
|
-
* @param query Optional search parameters.
|
|
1367
|
+
* @param resourceType - The FHIR resource type to search.
|
|
1368
|
+
* @param query - Optional search parameters.
|
|
1345
1369
|
* @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
|
|
1346
1370
|
*/
|
|
1347
1371
|
export declare function useSearch<K extends ResourceType>(resourceType: K, query?: QueryTypes): [Bundle<ExtractResource<K>> | undefined, boolean, OperationOutcome | undefined];
|
|
@@ -1351,8 +1375,8 @@ export declare function useSearch<K extends ResourceType>(resourceType: K, query
|
|
|
1351
1375
|
*
|
|
1352
1376
|
* This is a convenience hook for calling the MedplumClient.searchOne() method.
|
|
1353
1377
|
*
|
|
1354
|
-
* @param resourceType The FHIR resource type to search.
|
|
1355
|
-
* @param query Optional search parameters.
|
|
1378
|
+
* @param resourceType - The FHIR resource type to search.
|
|
1379
|
+
* @param query - Optional search parameters.
|
|
1356
1380
|
* @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
|
|
1357
1381
|
*/
|
|
1358
1382
|
export declare function useSearchOne<K extends ResourceType>(resourceType: K, query?: QueryTypes): [ExtractResource<K> | undefined, boolean, OperationOutcome | undefined];
|
|
@@ -1362,8 +1386,8 @@ export declare function useSearchOne<K extends ResourceType>(resourceType: K, qu
|
|
|
1362
1386
|
*
|
|
1363
1387
|
* This is a convenience hook for calling the MedplumClient.searchResources() method.
|
|
1364
1388
|
*
|
|
1365
|
-
* @param resourceType The FHIR resource type to search.
|
|
1366
|
-
* @param query Optional search parameters.
|
|
1389
|
+
* @param resourceType - The FHIR resource type to search.
|
|
1390
|
+
* @param query - Optional search parameters.
|
|
1367
1391
|
* @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
|
|
1368
1392
|
*/
|
|
1369
1393
|
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.12",
|
|
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