fhir-react 0.3.9 → 0.3.10
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/.storybook/main.js +5 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview.js +7 -0
- package/README.md +1 -1
- package/package.json +5 -4
- package/src/components/containers/Accordion/Accordion.stories.js +74 -58
- package/src/components/containers/ResourceContainer/ResourceContainer.stories.js +43 -41
- package/src/components/defaultArgTypes.js +12 -0
- package/src/components/resources/AdverseEvent/AdverseEvent.stories.js +17 -19
- package/src/components/resources/AllergyIntolerance/AllergyIntolerance.stories.js +46 -70
- package/src/components/resources/Appointment/Appointment.stories.js +51 -62
- package/src/components/resources/Binary/Binary.stories.js +27 -21
- package/src/components/resources/Bundle/Bundle.stories.js +59 -49
- package/src/components/resources/CarePlan/CarePlan.stories.js +44 -54
- package/src/components/resources/CareTeam/CareTeam.stories.js +22 -28
- package/src/components/resources/Claim/Claim.stories.js +36 -49
- package/src/components/resources/ClaimResponse/ClaimResponse.stories.js +42 -52
- package/src/components/resources/Condition/Condition.stories.js +47 -62
- package/src/components/resources/Coverage/Coverage.stories.js +38 -50
- package/src/components/resources/Device/Device.stories.js +40 -52
- package/src/components/resources/DiagnosticReport/DiagnosticReport.stories.js +38 -50
- package/src/components/resources/DocumentReference/DocumentReference.stories.js +25 -29
- package/src/components/resources/Encounter/Encounter.stories.js +43 -59
- package/src/components/resources/ExplanationOfBenefit/ExplanationOfBenefit.stories.js +53 -67
- package/src/components/resources/ExplanationOfBenefitGraph/ExplanationOfBenefitGraph.stories.js +74 -38
- package/src/components/resources/FamilyMemberHistory/FamilyMemberHistory.stories.js +22 -28
- package/src/components/resources/Generic/Generic.stories.js +21 -12
- package/src/components/resources/Goal/Goal.stories.js +35 -49
- package/src/components/resources/Immunization/Immunization.stories.js +38 -51
- package/src/components/resources/List/List.stories.js +66 -70
- package/src/components/resources/Location/Location.stories.js +23 -18
- package/src/components/resources/Medication/Medication.stories.js +42 -64
- package/src/components/resources/MedicationAdministration/MedicationAdministration.stories.js +32 -46
- package/src/components/resources/MedicationDispense/MedicationDispense.stories.js +39 -57
- package/src/components/resources/MedicationKnowledge/MedicationKnowledge.stories.js +49 -58
- package/src/components/resources/MedicationOrder/MedicationOrder.stories.js +11 -4
- package/src/components/resources/MedicationRequest/MedicationRequest.stories.js +27 -30
- package/src/components/resources/MedicationStatement/MedicationStatement.stories.js +32 -46
- package/src/components/resources/Observation/Observation.stories.js +39 -33
- package/src/components/resources/Organization/Organization.stories.js +40 -52
- package/src/components/resources/Patient/Patient.stories.js +36 -28
- package/src/components/resources/Practitioner/Practitioner.stories.js +39 -52
- package/src/components/resources/PractitionerRole/PractitionerRole.stories.js +43 -63
- package/src/components/resources/Procedure/Procedure.stories.js +33 -25
- package/src/components/resources/Questionnaire/Questionnaire.stories.js +47 -62
- package/src/components/resources/QuestionnaireResponse/QuestionnaireResponse.stories.js +43 -63
- package/src/components/resources/ReferralRequest/ReferralRequest.stories.js +20 -20
- package/src/components/resources/RelatedPerson/RelatedPerson.stories.js +26 -30
- package/src/components/resources/ResearchStudy/ResearchStudy.stories.js +17 -15
- package/src/components/resources/ResourceCategory/ResourceCategory.stories.js +40 -27
- package/.storybook/addons.js +0 -1
- package/.storybook/config.js +0 -26
- package/.storybook/presets.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import RelatedPerson from './RelatedPerson';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -10,37 +10,33 @@ import exampleR4 from '../../../fixtures/r4/resources/relatedPerson/example1.jso
|
|
|
10
10
|
|
|
11
11
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
12
12
|
|
|
13
|
-
export default {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
fhirResource={fhirResource}
|
|
20
|
-
fhirVersion={fhirVersions.DSTU2}
|
|
21
|
-
fhirIcons={fhirIcons}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
13
|
+
export default {
|
|
14
|
+
title: 'RelatedPerson',
|
|
15
|
+
component: RelatedPerson,
|
|
16
|
+
argTypes: {
|
|
17
|
+
...defaultArgTypes,
|
|
18
|
+
},
|
|
24
19
|
};
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
const Template = args => <RelatedPerson {...args} />;
|
|
22
|
+
|
|
23
|
+
export const ExampleDSTU2 = Template.bind({});
|
|
24
|
+
ExampleDSTU2.args = {
|
|
25
|
+
fhirVersion: fhirVersions.DSTU2,
|
|
26
|
+
fhirResource: exampleDSTU2,
|
|
27
|
+
fhirIcons: fhirIcons,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const ExampleSTU3 = Template.bind({});
|
|
31
|
+
ExampleSTU3.args = {
|
|
32
|
+
fhirVersion: fhirVersions.STU3,
|
|
33
|
+
fhirResource: exampleSTU3,
|
|
34
|
+
fhirIcons: false,
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
export const ExampleR4 = ()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fhirVersion={fhirVersions.R4}
|
|
43
|
-
fhirIcons={'random text'}
|
|
44
|
-
/>
|
|
45
|
-
);
|
|
37
|
+
export const ExampleR4 = Template.bind({});
|
|
38
|
+
ExampleR4.args = {
|
|
39
|
+
fhirVersion: fhirVersions.R4,
|
|
40
|
+
fhirResource: exampleR4,
|
|
41
|
+
fhirIcons: 'random text',
|
|
46
42
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
3
|
|
|
4
4
|
import ResearchStudy from './ResearchStudy';
|
|
5
5
|
import fhirVersions from '../fhirResourceVersions';
|
|
@@ -10,22 +10,24 @@ import fhirIcons from '../../../fixtures/example-icons';
|
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
title: 'ResearchStudy',
|
|
13
|
+
component: ResearchStudy,
|
|
14
|
+
argTypes: {
|
|
15
|
+
...defaultArgTypes,
|
|
16
|
+
},
|
|
13
17
|
};
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
19
|
+
const Template = args => <ResearchStudy {...args} />;
|
|
20
|
+
|
|
21
|
+
export const ExampleOfSTU3 = Template.bind({});
|
|
22
|
+
ExampleOfSTU3.args = {
|
|
23
|
+
fhirVersion: fhirVersions.STU3,
|
|
24
|
+
fhirResource: stu3Example1,
|
|
25
|
+
fhirIcons: fhirIcons,
|
|
24
26
|
};
|
|
25
27
|
|
|
26
|
-
export const ExampleOfR4 = ()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
export const ExampleOfR4 = Template.bind({});
|
|
29
|
+
ExampleOfR4.args = {
|
|
30
|
+
fhirVersion: fhirVersions.R4,
|
|
31
|
+
fhirResource: r4Example1,
|
|
32
|
+
fhirIcons: false,
|
|
31
33
|
};
|
|
@@ -1,40 +1,53 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { defaultArgTypes } from '../../defaultArgTypes';
|
|
3
|
+
|
|
2
4
|
import ResourceCategory from './ResourceCategory';
|
|
3
5
|
import fhirIcons from '../../../fixtures/example-icons';
|
|
4
6
|
import ResourceCategoryIcon from '../../../assets/containers/ResourceCategory/resource-category.svg';
|
|
5
7
|
|
|
6
|
-
export default {
|
|
8
|
+
export default {
|
|
9
|
+
title: 'ResourceCategory',
|
|
10
|
+
component: ResourceCategory,
|
|
11
|
+
argTypes: {
|
|
12
|
+
...defaultArgTypes,
|
|
13
|
+
itemsCount: {
|
|
14
|
+
table: {
|
|
15
|
+
disable: true,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
title: {
|
|
19
|
+
table: {
|
|
20
|
+
disable: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const Template = args => <ResourceCategory {...args} />;
|
|
7
27
|
|
|
8
|
-
export const ExampleWithAllProperties = ()
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
fhirIcons={require('../../../assets/containers/ResourceCategory/resource-category.svg')}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
28
|
+
export const ExampleWithAllProperties = Template.bind({});
|
|
29
|
+
ExampleWithAllProperties.args = {
|
|
30
|
+
itemsCount: 41,
|
|
31
|
+
title: 'Resource name',
|
|
32
|
+
fhirIcons: require('../../../assets/containers/ResourceCategory/resource-category.svg'),
|
|
16
33
|
};
|
|
17
34
|
|
|
18
|
-
export const ExampleWith1Item = ()
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
fhirIcons={ResourceCategoryIcon}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
35
|
+
export const ExampleWith1Item = Template.bind({});
|
|
36
|
+
ExampleWith1Item.args = {
|
|
37
|
+
itemsCount: '1',
|
|
38
|
+
title: 'Resource name',
|
|
39
|
+
fhirIcons: ResourceCategoryIcon,
|
|
26
40
|
};
|
|
27
41
|
|
|
28
|
-
export const ExampleWithoutItemsCount = ()
|
|
29
|
-
|
|
42
|
+
export const ExampleWithoutItemsCount = Template.bind({});
|
|
43
|
+
ExampleWithoutItemsCount.args = {
|
|
44
|
+
title: 'Resource name',
|
|
45
|
+
fhirIcons: fhirIcons,
|
|
30
46
|
};
|
|
31
47
|
|
|
32
|
-
export const ExampleWith1ItemAndDisableIcon = ()
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fhirIcons={false}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
48
|
+
export const ExampleWith1ItemAndDisableIcon = Template.bind({});
|
|
49
|
+
ExampleWith1ItemAndDisableIcon.args = {
|
|
50
|
+
itemsCount: '1',
|
|
51
|
+
title: 'Resource name',
|
|
52
|
+
fhirIcons: false,
|
|
40
53
|
};
|
package/.storybook/addons.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@storybook/addon-knobs/register';
|
package/.storybook/config.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import '../src/components/ui/bootstrap-reboot.min.css';
|
|
2
|
-
import '../src/style.css';
|
|
3
|
-
import '../src/style.scss';
|
|
4
|
-
|
|
5
|
-
import { addDecorator, addParameters, configure } from '@storybook/react';
|
|
6
|
-
|
|
7
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
|
8
|
-
|
|
9
|
-
if (typeof document !== 'undefined') {
|
|
10
|
-
require('bootstrap/dist/js/bootstrap.min.js');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
addParameters({
|
|
14
|
-
options: {
|
|
15
|
-
name: 'FHIR-REACT storybook',
|
|
16
|
-
showRoots: true,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
addDecorator(
|
|
21
|
-
withKnobs({
|
|
22
|
-
escapeHTML: false,
|
|
23
|
-
}),
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
configure(require.context('../src', true, /\.stories\.js$/), module);
|
package/.storybook/presets.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = ['@storybook/preset-scss'];
|