@medplum/react 0.9.14 → 0.9.17
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.js +2614 -2348
- 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/styles.css +335 -242
- package/dist/esm/index.js +2616 -2354
- 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/styles.css +335 -242
- package/dist/types/BackboneElementDisplay.d.ts +2 -4
- package/dist/types/BackboneElementInput.d.ts +0 -2
- package/dist/types/FhirPathDisplay.d.ts +1 -1
- package/dist/types/PlanDefinitionBuilder.d.ts +7 -0
- package/dist/types/QuestionnaireForm.d.ts +0 -2
- package/dist/types/RequestGroupDisplay.d.ts +7 -0
- package/dist/types/ResourceArrayDisplay.d.ts +0 -2
- package/dist/types/ResourceArrayInput.d.ts +0 -2
- package/dist/types/ResourcePropertyDisplay.d.ts +2 -3
- package/dist/types/ResourcePropertyInput.d.ts +1 -2
- package/dist/types/SearchControlField.d.ts +1 -1
- package/dist/types/SearchFilterEditor.d.ts +1 -0
- package/dist/types/SearchPopupMenu.d.ts +2 -2
- package/dist/types/SearchUtils.d.ts +5 -8
- package/dist/types/StatusBadge.d.ts +6 -0
- package/dist/types/UploadButton.d.ts +2 -1
- package/dist/types/index.d.ts +5 -1
- package/dist/types/stories/PlanDefinitionBuilder.stories.d.ts +5 -0
- package/dist/types/stories/RequestGroupDisplay.stories.d.ts +5 -0
- package/dist/types/stories/SearchControl.stories.d.ts +1 -0
- package/dist/types/stories/StatusBadge.stories.d.ts +5 -0
- package/dist/types/stories/UploadButton.stories.d.ts +6 -0
- package/package.json +19 -19
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IndexedStructureDefinition } from '@medplum/core';
|
|
3
2
|
import { ElementDefinition } from '@medplum/fhirtypes';
|
|
4
3
|
interface ResourceArrayInputProps {
|
|
5
|
-
schema: IndexedStructureDefinition;
|
|
6
4
|
property: ElementDefinition;
|
|
7
5
|
name: string;
|
|
8
6
|
defaultValue?: any[];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { PropertyType, TypedValue } from '@medplum/core';
|
|
3
3
|
import { ElementDefinition } from '@medplum/fhirtypes';
|
|
4
4
|
export interface ResourcePropertyDisplayProps {
|
|
5
|
-
schema?: IndexedStructureDefinition;
|
|
6
5
|
property?: ElementDefinition;
|
|
7
6
|
propertyType: PropertyType;
|
|
8
7
|
value: any;
|
|
@@ -22,4 +21,4 @@ export declare function ResourcePropertyDisplay(props: ResourcePropertyDisplayPr
|
|
|
22
21
|
* @param property The property definition.
|
|
23
22
|
* @returns The value of the property and the property type.
|
|
24
23
|
*/
|
|
25
|
-
export declare function getValueAndType(context:
|
|
24
|
+
export declare function getValueAndType(context: TypedValue, path: string): [any, PropertyType];
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { PropertyType } from '@medplum/core';
|
|
3
3
|
import { ElementDefinition, ElementDefinitionType, OperationOutcome } from '@medplum/fhirtypes';
|
|
4
4
|
export interface ResourcePropertyInputProps {
|
|
5
|
-
schema: IndexedStructureDefinition;
|
|
6
5
|
property: ElementDefinition;
|
|
7
6
|
name: string;
|
|
8
7
|
defaultPropertyType?: PropertyType;
|
|
@@ -30,7 +30,7 @@ import { ElementDefinition, SearchParameter } from '@medplum/fhirtypes';
|
|
|
30
30
|
export interface SearchControlField {
|
|
31
31
|
readonly name: string;
|
|
32
32
|
readonly elementDefinition?: ElementDefinition;
|
|
33
|
-
readonly
|
|
33
|
+
readonly searchParams?: SearchParameter[];
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Returns the collection of field definitions for the search request.
|
|
@@ -7,8 +7,8 @@ export interface SearchPopupMenuProps {
|
|
|
7
7
|
visible: boolean;
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
|
-
|
|
11
|
-
onPrompt: (filter: Filter) => void;
|
|
10
|
+
searchParams?: SearchParameter[];
|
|
11
|
+
onPrompt: (searchParam: SearchParameter, filter: Filter) => void;
|
|
12
12
|
onChange: (definition: SearchRequest) => void;
|
|
13
13
|
onClose: () => void;
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Filter,
|
|
2
|
+
import { Filter, Operator, SearchRequest } from '@medplum/core';
|
|
3
3
|
import { Resource, SearchParameter } from '@medplum/fhirtypes';
|
|
4
4
|
import { SearchControlField } from './SearchControlField';
|
|
5
5
|
/**
|
|
@@ -105,13 +105,11 @@ export declare function addDateFilter(definition: SearchRequest, field: string,
|
|
|
105
105
|
*/
|
|
106
106
|
export declare function addDateFilterBetween(definition: SearchRequest, field: string, d1: Date, d2: Date): SearchRequest;
|
|
107
107
|
/**
|
|
108
|
-
* Adds a filter
|
|
108
|
+
* Adds a filter that constrains the specified field to "missing".
|
|
109
109
|
*
|
|
110
|
-
* @param field
|
|
111
|
-
* @param op
|
|
112
|
-
* @param value
|
|
110
|
+
* @param {string} field The field key name.
|
|
113
111
|
*/
|
|
114
|
-
export declare function
|
|
112
|
+
export declare function addMissingFilter(definition: SearchRequest, field: string, value?: boolean): SearchRequest;
|
|
115
113
|
/**
|
|
116
114
|
* Returns true if the search has any filters on the specified field.
|
|
117
115
|
*
|
|
@@ -169,9 +167,8 @@ export declare function getOpString(op: Operator): string;
|
|
|
169
167
|
export declare function buildFieldNameString(key: string): string;
|
|
170
168
|
/**
|
|
171
169
|
* Returns a fragment to be displayed in the search table for the value.
|
|
172
|
-
* @param schema The currently indexed schema.
|
|
173
170
|
* @param resource The parent resource.
|
|
174
171
|
* @param key The search code or FHIRPath expression.
|
|
175
172
|
* @returns The fragment to display.
|
|
176
173
|
*/
|
|
177
|
-
export declare function renderValue(
|
|
174
|
+
export declare function renderValue(resource: Resource, field: SearchControlField): string | JSX.Element | null | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Attachment } from '@medplum/fhirtypes';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
export interface UploadButtonProps {
|
|
4
4
|
onUpload: (attachment: Attachment) => void;
|
|
5
|
+
children?: React.ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare function UploadButton(props: UploadButtonProps): JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './DiagnosticReportDisplay';
|
|
|
19
19
|
export * from './Document';
|
|
20
20
|
export * from './EncounterTimeline';
|
|
21
21
|
export * from './ErrorBoundary';
|
|
22
|
+
export * from './FhirPathTable';
|
|
22
23
|
export * from './FooterLinks';
|
|
23
24
|
export * from './Form';
|
|
24
25
|
export * from './FormSection';
|
|
@@ -34,6 +35,7 @@ export * from './MedplumLink';
|
|
|
34
35
|
export * from './MedplumProvider';
|
|
35
36
|
export * from './MenuItem';
|
|
36
37
|
export * from './PatientTimeline';
|
|
38
|
+
export * from './PlanDefinitionBuilder';
|
|
37
39
|
export * from './Popup';
|
|
38
40
|
export * from './QuestionnaireBuilder';
|
|
39
41
|
export * from './QuestionnaireForm';
|
|
@@ -41,6 +43,7 @@ export * from './QuestionnaireUtils';
|
|
|
41
43
|
export * from './RangeDisplay';
|
|
42
44
|
export * from './RangeInput';
|
|
43
45
|
export * from './ReferenceInput';
|
|
46
|
+
export * from './RequestGroupDisplay';
|
|
44
47
|
export * from './ResourceArrayDisplay';
|
|
45
48
|
export * from './ResourceArrayInput';
|
|
46
49
|
export * from './ResourceBadge';
|
|
@@ -62,7 +65,7 @@ export * from './SearchUtils';
|
|
|
62
65
|
export * from './Select';
|
|
63
66
|
export * from './ServiceRequestTimeline';
|
|
64
67
|
export * from './SignInForm';
|
|
65
|
-
export * from './
|
|
68
|
+
export * from './StatusBadge';
|
|
66
69
|
export * from './Tab';
|
|
67
70
|
export * from './TabList';
|
|
68
71
|
export * from './TabPanel';
|
|
@@ -70,6 +73,7 @@ export * from './TabSwitch';
|
|
|
70
73
|
export * from './TextArea';
|
|
71
74
|
export * from './Timeline';
|
|
72
75
|
export * from './TitleBar';
|
|
76
|
+
export * from './UploadButton';
|
|
73
77
|
export * from './useResource';
|
|
74
78
|
export * from './utils';
|
|
75
79
|
export * from './utils/date';
|
|
@@ -7,3 +7,4 @@ export declare const NoCheckboxes: () => JSX.Element;
|
|
|
7
7
|
export declare const AllButtons: () => JSX.Element;
|
|
8
8
|
export declare const ExtraFields: () => JSX.Element;
|
|
9
9
|
export declare const ServiceRequests: () => JSX.Element;
|
|
10
|
+
export declare const Observations: () => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Example: () => JSX.Element;
|
|
6
|
+
export declare const CustomText: () => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "Medplum React Component Library",
|
|
5
5
|
"author": "Medplum <hello@medplum.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,36 +19,36 @@
|
|
|
19
19
|
"storybook": "build-storybook"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@medplum/core": "0.9.
|
|
23
|
-
"@medplum/fhirtypes": "0.9.
|
|
24
|
-
"@medplum/mock": "0.9.
|
|
25
|
-
"@storybook/addon-actions": "6.5.
|
|
26
|
-
"@storybook/addon-essentials": "6.5.
|
|
27
|
-
"@storybook/addon-links": "6.5.
|
|
28
|
-
"@storybook/builder-webpack5": "6.5.
|
|
29
|
-
"@storybook/manager-webpack5": "6.5.
|
|
30
|
-
"@storybook/react": "6.5.
|
|
31
|
-
"@testing-library/dom": "8.
|
|
22
|
+
"@medplum/core": "0.9.17",
|
|
23
|
+
"@medplum/fhirtypes": "0.9.17",
|
|
24
|
+
"@medplum/mock": "0.9.17",
|
|
25
|
+
"@storybook/addon-actions": "6.5.9",
|
|
26
|
+
"@storybook/addon-essentials": "6.5.9",
|
|
27
|
+
"@storybook/addon-links": "6.5.9",
|
|
28
|
+
"@storybook/builder-webpack5": "6.5.9",
|
|
29
|
+
"@storybook/manager-webpack5": "6.5.9",
|
|
30
|
+
"@storybook/react": "6.5.9",
|
|
31
|
+
"@testing-library/dom": "8.14.0",
|
|
32
32
|
"@testing-library/jest-dom": "5.16.4",
|
|
33
33
|
"@testing-library/react": "13.3.0",
|
|
34
|
-
"@types/jest": "28.1.
|
|
35
|
-
"@types/node": "
|
|
36
|
-
"@types/react": "18.0.
|
|
34
|
+
"@types/jest": "28.1.3",
|
|
35
|
+
"@types/node": "18.0.0",
|
|
36
|
+
"@types/react": "18.0.14",
|
|
37
37
|
"@types/react-dom": "18.0.5",
|
|
38
38
|
"@types/react-router-dom": "5.3.3",
|
|
39
|
-
"dotenv-webpack": "7.1.
|
|
39
|
+
"dotenv-webpack": "7.1.1",
|
|
40
40
|
"identity-obj-proxy": "3.0.0",
|
|
41
41
|
"jest": "28.1.1",
|
|
42
42
|
"jest-each": "28.1.1",
|
|
43
43
|
"html-webpack-plugin": "5.5.0",
|
|
44
|
-
"react": "18.
|
|
45
|
-
"react-dom": "18.
|
|
44
|
+
"react": "18.2.0",
|
|
45
|
+
"react-dom": "18.2.0",
|
|
46
46
|
"react-router-dom": "6.3.0",
|
|
47
47
|
"rimraf": "3.0.2",
|
|
48
|
-
"typescript": "4.7.
|
|
48
|
+
"typescript": "4.7.4"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@medplum/core": "0.9.
|
|
51
|
+
"@medplum/core": "0.9.17",
|
|
52
52
|
"react": "^17.0.2 || ^18.0.0",
|
|
53
53
|
"react-dom": "^17.0.2 || ^18.0.0",
|
|
54
54
|
"react-router-dom": "^6.2.2"
|