@medplum/react 1.0.4 → 1.0.5
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/AsyncAutocomplete/AsyncAutocomplete.d.ts +14 -0
- package/dist/cjs/DiagnosticReportDisplay/DiagnosticReportDisplay.stories.d.ts +1 -0
- package/dist/cjs/FhirPathTable/FhirPathTable.d.ts +2 -2
- package/dist/cjs/ValueSetAutocomplete/ValueSetAutocomplete.d.ts +3 -6
- package/dist/cjs/auth/ChooseProfileForm.d.ts +2 -1
- package/dist/cjs/auth/ChooseScopeForm.d.ts +2 -1
- package/dist/cjs/auth/MfaForm.d.ts +7 -0
- package/dist/cjs/auth/OktaButton.d.ts +5 -0
- package/dist/cjs/auth/SignInForm.d.ts +10 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +319 -181
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/stories/referenceLab.d.ts +3 -1
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.d.ts +14 -0
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.js +116 -0
- package/dist/esm/AsyncAutocomplete/AsyncAutocomplete.js.map +1 -0
- package/dist/esm/CodeInput/CodeInput.js +3 -2
- package/dist/esm/CodeInput/CodeInput.js.map +1 -1
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.js +18 -18
- package/dist/esm/CodeableConceptInput/CodeableConceptInput.js.map +1 -1
- package/dist/esm/CodingInput/CodingInput.js +3 -2
- package/dist/esm/CodingInput/CodingInput.js.map +1 -1
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.js +8 -2
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.js.map +1 -1
- package/dist/esm/DiagnosticReportDisplay/DiagnosticReportDisplay.stories.d.ts +1 -0
- package/dist/esm/FhirPathTable/FhirPathTable.d.ts +2 -2
- package/dist/esm/FhirPathTable/FhirPathTable.js.map +1 -1
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.js +1 -0
- package/dist/esm/QuestionnaireForm/QuestionnaireForm.js.map +1 -1
- package/dist/esm/ResourceInput/ResourceInput.js +2 -2
- package/dist/esm/ResourceInput/ResourceInput.js.map +1 -1
- package/dist/esm/StatusBadge/StatusBadge.js +2 -1
- package/dist/esm/StatusBadge/StatusBadge.js.map +1 -1
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.d.ts +3 -6
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.js +24 -44
- package/dist/esm/ValueSetAutocomplete/ValueSetAutocomplete.js.map +1 -1
- package/dist/esm/auth/ChooseProfileForm.d.ts +2 -1
- package/dist/esm/auth/ChooseProfileForm.js.map +1 -1
- package/dist/esm/auth/ChooseScopeForm.d.ts +2 -1
- package/dist/esm/auth/ChooseScopeForm.js.map +1 -1
- package/dist/esm/auth/MfaForm.d.ts +7 -0
- package/dist/esm/auth/MfaForm.js +34 -0
- package/dist/esm/auth/MfaForm.js.map +1 -0
- package/dist/esm/auth/OktaButton.d.ts +5 -0
- package/dist/esm/auth/SignInForm.d.ts +10 -0
- package/dist/esm/auth/SignInForm.js +16 -0
- package/dist/esm/auth/SignInForm.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/stories/referenceLab.d.ts +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MultiSelectProps, SelectItem } from '@mantine/core';
|
|
3
|
+
export interface AsyncAutocompleteOption<T> extends SelectItem {
|
|
4
|
+
resource: T;
|
|
5
|
+
}
|
|
6
|
+
export interface AsyncAutocompleteProps<T> extends Omit<MultiSelectProps, 'data' | 'defaultValue' | 'loadOptions' | 'onChange' | 'onCreate' | 'searchable'> {
|
|
7
|
+
defaultValue?: T | T[];
|
|
8
|
+
toKey: (item: T) => string;
|
|
9
|
+
toOption: (item: T) => AsyncAutocompleteOption<T>;
|
|
10
|
+
loadOptions: (input: string, signal: AbortSignal) => Promise<T[]>;
|
|
11
|
+
onChange: (item: T[]) => void;
|
|
12
|
+
onCreate?: (input: string) => T;
|
|
13
|
+
}
|
|
14
|
+
export declare function AsyncAutocomplete<T>(props: AsyncAutocompleteProps<T>): JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { PropertyType } from '@medplum/core';
|
|
|
2
2
|
import { Resource } from '@medplum/fhirtypes';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { SearchClickEvent } from '../SearchControl/SearchControl';
|
|
5
|
-
export interface
|
|
5
|
+
export interface FhirPathTableField {
|
|
6
6
|
readonly propertyType: PropertyType;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly fhirPath: string;
|
|
@@ -10,7 +10,7 @@ export interface SmartSearchField {
|
|
|
10
10
|
export interface FhirPathTableProps {
|
|
11
11
|
resourceType: string;
|
|
12
12
|
query: string;
|
|
13
|
-
fields:
|
|
13
|
+
fields: FhirPathTableField[];
|
|
14
14
|
checkboxesEnabled?: boolean;
|
|
15
15
|
onClick?: (e: SearchClickEvent) => void;
|
|
16
16
|
onAuxClick?: (e: SearchClickEvent) => void;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ElementDefinition, ValueSetExpansionContains } from '@medplum/fhirtypes';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
defaultValue?: ValueSetExpansionContains;
|
|
8
|
-
onChange?: (value: ValueSetExpansionContains | undefined) => void;
|
|
3
|
+
import { AsyncAutocompleteProps } from '../AsyncAutocomplete/AsyncAutocomplete';
|
|
4
|
+
export interface ValueSetAutocompleteProps extends Omit<AsyncAutocompleteProps<ValueSetExpansionContains>, 'loadOptions' | 'toKey' | 'toOption'> {
|
|
5
|
+
elementDefinition: ElementDefinition;
|
|
9
6
|
}
|
|
10
7
|
export declare function ValueSetAutocomplete(props: ValueSetAutocompleteProps): JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { LoginAuthenticationResponse } from '@medplum/core';
|
|
2
3
|
import { ProjectMembership } from '@medplum/fhirtypes';
|
|
3
4
|
export interface ChooseProfileFormProps {
|
|
4
5
|
login: string;
|
|
5
6
|
memberships: ProjectMembership[];
|
|
6
|
-
handleAuthResponse: (response:
|
|
7
|
+
handleAuthResponse: (response: LoginAuthenticationResponse) => void;
|
|
7
8
|
}
|
|
8
9
|
export declare function ChooseProfileForm(props: ChooseProfileFormProps): JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { LoginAuthenticationResponse } from '@medplum/core';
|
|
2
3
|
export interface ChooseScopeFormProps {
|
|
3
4
|
login: string;
|
|
4
5
|
scope: string | undefined;
|
|
5
|
-
handleAuthResponse: (response:
|
|
6
|
+
handleAuthResponse: (response: LoginAuthenticationResponse) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare function ChooseScopeForm(props: ChooseScopeFormProps): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LoginAuthenticationResponse } from '@medplum/core';
|
|
3
|
+
export interface MfaFormProps {
|
|
4
|
+
login: string;
|
|
5
|
+
handleAuthResponse: (response: LoginAuthenticationResponse) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function MfaForm(props: MfaFormProps): JSX.Element;
|
|
@@ -8,4 +8,14 @@ export interface SignInFormProps extends BaseLoginRequest {
|
|
|
8
8
|
readonly onCode?: (code: string) => void;
|
|
9
9
|
readonly children?: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The SignInForm component allows users to sign in to Medplum.
|
|
13
|
+
*
|
|
14
|
+
* "Signing in" is a multi-step process:
|
|
15
|
+
* 1) Authentication - identify the user
|
|
16
|
+
* 2) MFA - If MFA is enabled, prompt for MFA code
|
|
17
|
+
* 3) Choose profile - If the user has multiple profiles, prompt to choose one
|
|
18
|
+
* 4) Choose scope - If the user has multiple scopes, prompt to choose one
|
|
19
|
+
* 5) Success - Return to the caller with either a code or a redirect
|
|
20
|
+
*/
|
|
11
21
|
export declare function SignInForm(props: SignInFormProps): JSX.Element;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './AddressDisplay/AddressDisplay';
|
|
2
2
|
export * from './AddressInput/AddressInput';
|
|
3
3
|
export * from './AnnotationInput/AnnotationInput';
|
|
4
|
+
export * from './AsyncAutocomplete/AsyncAutocomplete';
|
|
4
5
|
export * from './AttachmentArrayDisplay/AttachmentArrayDisplay';
|
|
5
6
|
export * from './AttachmentArrayInput/AttachmentArrayInput';
|
|
6
7
|
export * from './AttachmentButton/AttachmentButton';
|