@medplum/react 2.1.3 → 2.1.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.
@@ -4,9 +4,11 @@ export interface AppShellProps {
4
4
  logo: React.ReactNode;
5
5
  pathname?: string;
6
6
  searchParams?: URLSearchParams;
7
+ headerSearchDisabled?: boolean;
7
8
  version?: string;
8
9
  menus?: NavbarMenu[];
9
10
  children: React.ReactNode;
10
11
  displayAddBookmark?: boolean;
12
+ resourceTypeSearchDisabled?: boolean;
11
13
  }
12
14
  export declare function AppShell(props: AppShellProps): JSX.Element;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface HeaderProps {
3
3
  pathname?: string;
4
4
  searchParams?: URLSearchParams;
5
+ headerSearchDisabled?: boolean;
5
6
  logo: React.ReactNode;
6
7
  version?: string;
7
8
  navbarToggle: () => void;
@@ -14,5 +14,6 @@ export interface NavbarProps {
14
14
  menus?: NavbarMenu[];
15
15
  closeNavbar: () => void;
16
16
  displayAddBookmark?: boolean;
17
+ resourceTypeSearchDisabled?: boolean;
17
18
  }
18
19
  export declare function Navbar(props: NavbarProps): JSX.Element;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ElementDefinition } from '@medplum/fhirtypes';
3
2
  export interface CodeInputProps {
4
- property: ElementDefinition;
3
+ binding: string | undefined;
5
4
  name: string;
6
5
  placeholder?: string;
7
6
  defaultValue?: string;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { CodeableConcept, ElementDefinition } from '@medplum/fhirtypes';
2
+ import { CodeableConcept } from '@medplum/fhirtypes';
3
3
  export interface CodeableConceptInputProps {
4
- property: ElementDefinition;
4
+ binding: string | undefined;
5
5
  name: string;
6
6
  placeholder?: string;
7
7
  defaultValue?: CodeableConcept;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { Coding, ElementDefinition } from '@medplum/fhirtypes';
2
+ import { Coding } from '@medplum/fhirtypes';
3
3
  export interface CodingInputProps {
4
- property: ElementDefinition;
4
+ binding: string | undefined;
5
5
  name: string;
6
6
  placeholder?: string;
7
7
  defaultValue?: Coding;
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { PropertyType } from '@medplum/core';
3
2
  import { Resource } from '@medplum/fhirtypes';
4
3
  export interface FhirPathDisplayProps {
5
4
  resource: Resource;
6
5
  path: string;
7
- propertyType: PropertyType;
6
+ propertyType: string;
8
7
  }
9
8
  export declare function FhirPathDisplay(props: FhirPathDisplayProps): JSX.Element | null;
@@ -1,9 +1,8 @@
1
- import { PropertyType } from '@medplum/core';
2
1
  import { Resource } from '@medplum/fhirtypes';
3
2
  import React from 'react';
4
3
  import { SearchClickEvent } from '../SearchControl/SearchControl';
5
4
  export interface FhirPathTableField {
6
- readonly propertyType: PropertyType;
5
+ readonly propertyType: string;
7
6
  readonly name: string;
8
7
  readonly fhirPath: string;
9
8
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ElementDefinition } from '@medplum/fhirtypes';
2
+ import { InternalSchemaElement } from '@medplum/core';
3
3
  interface ResourceArrayDisplayProps {
4
- property: ElementDefinition;
4
+ property: InternalSchemaElement;
5
5
  values: any[];
6
6
  arrayElement?: boolean;
7
7
  ignoreMissingValues?: boolean;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ElementDefinition } from '@medplum/fhirtypes';
2
+ import { InternalSchemaElement } from '@medplum/core';
3
3
  interface ResourceArrayInputProps {
4
- property: ElementDefinition;
4
+ property: InternalSchemaElement;
5
5
  name: string;
6
6
  defaultValue?: any[];
7
7
  arrayElement?: boolean;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ElementDefinition, OperationOutcome, Reference, Resource } from '@medplum/fhirtypes';
2
+ import { InternalSchemaElement } from '@medplum/core';
3
+ import { OperationOutcome, Reference, Resource } from '@medplum/fhirtypes';
3
4
  export interface ResourceFormProps {
4
5
  defaultValue: Resource | Reference;
5
6
  outcome?: OperationOutcome;
@@ -7,4 +8,4 @@ export interface ResourceFormProps {
7
8
  onDelete?: (resource: Resource) => void;
8
9
  }
9
10
  export declare function ResourceForm(props: ResourceFormProps): JSX.Element;
10
- export declare function setPropertyValue(obj: any, key: string, propName: string, elementDefinition: ElementDefinition, value: any): any;
11
+ export declare function setPropertyValue(obj: any, key: string, propName: string, elementDefinition: InternalSchemaElement, value: any): any;
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { PropertyType, TypedValue } from '@medplum/core';
3
- import { ElementDefinition } from '@medplum/fhirtypes';
2
+ import { InternalSchemaElement, TypedValue } from '@medplum/core';
4
3
  export interface ResourcePropertyDisplayProps {
5
- property?: ElementDefinition;
6
- propertyType: PropertyType;
4
+ property?: InternalSchemaElement;
5
+ propertyType: string;
7
6
  value: any;
8
7
  arrayElement?: boolean;
9
8
  maxWidth?: number;
@@ -26,4 +25,4 @@ export declare function ResourcePropertyDisplay(props: ResourcePropertyDisplayPr
26
25
  * @param path The property path.
27
26
  * @returns The value of the property and the property type.
28
27
  */
29
- export declare function getValueAndType(context: TypedValue, path: string): [any, PropertyType];
28
+ export declare function getValueAndType(context: TypedValue, path: string): [any, string];
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { PropertyType } from '@medplum/core';
3
- import { ElementDefinition, ElementDefinitionType, OperationOutcome } from '@medplum/fhirtypes';
2
+ import { InternalSchemaElement } from '@medplum/core';
3
+ import { ElementDefinitionType, OperationOutcome } from '@medplum/fhirtypes';
4
4
  export interface ResourcePropertyInputProps {
5
- property: ElementDefinition;
5
+ property: InternalSchemaElement;
6
6
  name: string;
7
- defaultPropertyType?: PropertyType;
7
+ defaultPropertyType?: string;
8
8
  defaultValue?: any;
9
9
  arrayElement?: boolean;
10
10
  onChange?: (value: any, propName?: string) => void;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { ResourceType } from '@medplum/fhirtypes';
3
+ export interface ResourceTypeInputProps {
4
+ name: string;
5
+ placeholder?: string;
6
+ defaultValue?: ResourceType;
7
+ targetTypes?: string[];
8
+ autoFocus?: boolean;
9
+ testId?: string;
10
+ onChange?: (value: ResourceType | undefined) => void;
11
+ }
12
+ export declare function ResourceTypeInput(props: ResourceTypeInputProps): JSX.Element;
@@ -1,10 +1,10 @@
1
- import { SearchRequest } from '@medplum/core';
2
- import { ElementDefinition, SearchParameter } from '@medplum/fhirtypes';
1
+ import { InternalSchemaElement, SearchRequest } from '@medplum/core';
2
+ import { SearchParameter } from '@medplum/fhirtypes';
3
3
  /**
4
4
  * The SearchControlField type describes a field in the search control.
5
5
  *
6
6
  * In a SearchRequest, a field is a simple string. Strings can be one of the following:
7
- * 1) Simple property names, which refer to ElementDefinition objects
7
+ * 1) Simple property names, which refer to InternalSchemaElement objects
8
8
  * 2) Search parameter names, which refer to SearchParameter resources
9
9
  *
10
10
  * Consider a few examples of how this becomes complicated.
@@ -29,7 +29,7 @@ import { ElementDefinition, SearchParameter } from '@medplum/fhirtypes';
29
29
  */
30
30
  export interface SearchControlField {
31
31
  readonly name: string;
32
- readonly elementDefinition?: ElementDefinition;
32
+ readonly elementDefinition?: InternalSchemaElement;
33
33
  readonly searchParams?: SearchParameter[];
34
34
  }
35
35
  /**
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { ElementDefinition, ValueSetExpansionContains } from '@medplum/fhirtypes';
2
+ import { ValueSetExpansionContains } from '@medplum/fhirtypes';
3
3
  import { AsyncAutocompleteProps } from '../AsyncAutocomplete/AsyncAutocomplete';
4
4
  export interface ValueSetAutocompleteProps extends Omit<AsyncAutocompleteProps<ValueSetExpansionContains>, 'loadOptions' | 'toKey' | 'toOption'> {
5
- elementDefinition: ElementDefinition;
5
+ binding: string | undefined;
6
6
  creatable?: boolean;
7
7
  clearable?: boolean;
8
8
  }
@@ -1,4 +1,4 @@
1
- import { QuestionnaireItem, QuestionnaireResponseItem } from '@medplum/fhirtypes';
1
+ import { QuestionnaireItem, QuestionnaireResponseItem, QuestionnaireResponseItemAnswer, ResourceType } from '@medplum/fhirtypes';
2
2
  export declare enum QuestionnaireItemType {
3
3
  group = "group",
4
4
  display = "display",
@@ -20,3 +20,6 @@ export declare enum QuestionnaireItemType {
20
20
  }
21
21
  export declare function isChoiceQuestion(item: QuestionnaireItem): boolean;
22
22
  export declare function isQuestionEnabled(item: QuestionnaireItem, responseItems: QuestionnaireResponseItem[]): boolean;
23
+ export declare function getNewMultiSelectValues(selected: string[], propertyName: string, item: QuestionnaireItem): QuestionnaireResponseItemAnswer[];
24
+ export declare function getQuestionnaireItemReferenceTargetTypes(item: QuestionnaireItem): ResourceType[] | undefined;
25
+ export declare function setQuestionnaireItemReferenceTargetTypes(item: QuestionnaireItem, targetTypes: ResourceType[] | undefined): QuestionnaireItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/react",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "Medplum React Component Library",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",