@aehrc/smart-forms-renderer 0.30.2 → 0.31.0
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/README.md +6 -6
- package/lib/components/FormComponents/BooleanItem/BooleanField.js +5 -4
- package/lib/components/FormComponents/BooleanItem/BooleanField.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +5 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +5 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/index.d.ts +1 -1
- package/lib/components/FormComponents/DateTimeItems/index.js +1 -1
- package/lib/components/FormComponents/DateTimeItems/index.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/utils/parseDate.d.ts +5 -0
- package/lib/components/FormComponents/DateTimeItems/utils/parseDate.js +5 -0
- package/lib/components/FormComponents/DateTimeItems/utils/parseDate.js.map +1 -1
- package/lib/components/FormComponents/GridGroup/GridGroup.d.ts +6 -0
- package/lib/components/FormComponents/GridGroup/GridGroup.js +6 -0
- package/lib/components/FormComponents/GridGroup/GridGroup.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.d.ts +6 -0
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +6 -0
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js.map +1 -1
- package/lib/components/FormComponents/RepeatItem/RepeatItem.d.ts +5 -0
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js +5 -0
- package/lib/components/FormComponents/RepeatItem/RepeatItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleItem.d.ts +6 -0
- package/lib/components/FormComponents/SingleItem/SingleItem.js +6 -0
- package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTable.d.ts +6 -0
- package/lib/components/FormComponents/Tables/GroupTable.js +6 -0
- package/lib/components/FormComponents/Tables/GroupTable.js.map +1 -1
- package/lib/components/FormComponents/index.d.ts +6 -6
- package/lib/components/FormComponents/index.js +6 -6
- package/lib/components/FormComponents/index.js.map +1 -1
- package/lib/components/Renderer/BaseRenderer.d.ts +7 -0
- package/lib/components/Renderer/BaseRenderer.js +7 -0
- package/lib/components/Renderer/BaseRenderer.js.map +1 -1
- package/lib/components/Renderer/SmartFormsRenderer.d.ts +22 -1
- package/lib/components/Renderer/SmartFormsRenderer.js +16 -6
- package/lib/components/Renderer/SmartFormsRenderer.js.map +1 -1
- package/lib/components/Renderer/index.d.ts +1 -0
- package/lib/components/Renderer/index.js.map +1 -1
- package/lib/components/index.d.ts +3 -2
- package/lib/components/index.js +2 -2
- package/lib/components/index.js.map +1 -1
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useBuildForm.d.ts +15 -0
- package/lib/hooks/useBuildForm.js +41 -0
- package/lib/hooks/useBuildForm.js.map +1 -0
- package/lib/hooks/useHidden.d.ts +6 -0
- package/lib/hooks/useHidden.js +6 -0
- package/lib/hooks/useHidden.js.map +1 -1
- package/lib/hooks/useInitaliseFhirClient.d.ts +1 -0
- package/lib/hooks/useInitaliseFhirClient.js +55 -0
- package/lib/hooks/useInitaliseFhirClient.js.map +1 -0
- package/lib/hooks/useInitialiseForm.d.ts +20 -0
- package/lib/hooks/useInitialiseForm.js +72 -0
- package/lib/hooks/useInitialiseForm.js.map +1 -0
- package/lib/hooks/useInitialiseRenderer.d.ts +1 -1
- package/lib/hooks/useInitialiseRenderer.js +8 -31
- package/lib/hooks/useInitialiseRenderer.js.map +1 -1
- package/lib/hooks/useRendererQueryClient.d.ts +10 -0
- package/lib/hooks/useRendererQueryClient.js +36 -0
- package/lib/hooks/useRendererQueryClient.js.map +1 -0
- package/lib/hooks/useValueSetCodings.js +1 -0
- package/lib/hooks/useValueSetCodings.js.map +1 -1
- package/lib/index.d.ts +10 -40
- package/lib/index.js +8 -77
- package/lib/index.js.map +1 -1
- package/lib/interfaces/calculatedExpression.interface.d.ts +7 -0
- package/lib/interfaces/calculatedExpression.interface.js +16 -0
- package/lib/interfaces/calculatedExpression.interface.js.map +1 -1
- package/lib/interfaces/enableWhen.interface.d.ts +12 -0
- package/lib/interfaces/index.d.ts +4 -1
- package/lib/interfaces/index.js +16 -0
- package/lib/interfaces/index.js.map +1 -1
- package/lib/interfaces/populate.interface.d.ts +6 -0
- package/lib/interfaces/repopulateItems.interface.d.ts +0 -0
- package/lib/interfaces/repopulateItems.interface.js +2 -0
- package/lib/interfaces/repopulateItems.interface.js.map +1 -0
- package/lib/interfaces/tab.interface.d.ts +10 -0
- package/lib/interfaces/tab.interface.js +16 -0
- package/lib/interfaces/tab.interface.js.map +1 -1
- package/lib/interfaces/variables.interface.d.ts +12 -0
- package/lib/stores/index.d.ts +4 -0
- package/lib/stores/index.js.map +1 -1
- package/lib/stores/questionnaireResponseStore.d.ts +37 -2
- package/lib/stores/questionnaireResponseStore.js +72 -22
- package/lib/stores/questionnaireResponseStore.js.map +1 -1
- package/lib/stores/questionnaireStore.d.ts +59 -3
- package/lib/stores/questionnaireStore.js +18 -0
- package/lib/stores/questionnaireStore.js.map +1 -1
- package/lib/stores/smartConfigStore.d.ts +37 -0
- package/lib/stores/smartConfigStore.js +21 -0
- package/lib/stores/smartConfigStore.js.map +1 -1
- package/lib/stores/terminologyServerStore.d.ts +28 -2
- package/lib/stores/terminologyServerStore.js +16 -0
- package/lib/stores/terminologyServerStore.js.map +1 -1
- package/lib/stories/InitialiseFormWrapperForStorybook.d.ts +29 -0
- package/lib/stories/InitialiseFormWrapperForStorybook.js +65 -0
- package/lib/stories/InitialiseFormWrapperForStorybook.js.map +1 -0
- package/lib/stories/StorybookWrappers/BuildFormButtonForStorybook.d.ts +8 -0
- package/lib/stories/StorybookWrappers/BuildFormButtonForStorybook.js +44 -0
- package/lib/stories/StorybookWrappers/BuildFormButtonForStorybook.js.map +1 -0
- package/lib/stories/StorybookWrappers/BuildFormButtonTesterWrapperForStorybook.d.ts +18 -0
- package/lib/stories/StorybookWrappers/BuildFormButtonTesterWrapperForStorybook.js +48 -0
- package/lib/stories/StorybookWrappers/BuildFormButtonTesterWrapperForStorybook.js.map +1 -0
- package/lib/stories/StorybookWrappers/InitialiseFormWrapperForStorybook.d.ts +31 -0
- package/lib/stories/StorybookWrappers/InitialiseFormWrapperForStorybook.js +67 -0
- package/lib/stories/StorybookWrappers/InitialiseFormWrapperForStorybook.js.map +1 -0
- package/lib/stories/StorybookWrappers/PrePopButtonForStorybook.d.ts +7 -0
- package/lib/stories/StorybookWrappers/PrePopButtonForStorybook.js +32 -0
- package/lib/stories/StorybookWrappers/PrePopButtonForStorybook.js.map +1 -0
- package/lib/stories/StorybookWrappers/PrePopWrapperForStorybook.d.ts +21 -0
- package/lib/stories/StorybookWrappers/PrePopWrapperForStorybook.js +83 -0
- package/lib/stories/StorybookWrappers/PrePopWrapperForStorybook.js.map +1 -0
- package/lib/stories/StorybookWrappers/index.d.ts +3 -0
- package/lib/stories/StorybookWrappers/index.js +20 -0
- package/lib/stories/StorybookWrappers/index.js.map +1 -0
- package/lib/stories/StorybookWrappers/populateCallbackForStorybook.d.ts +8 -0
- package/lib/stories/StorybookWrappers/populateCallbackForStorybook.js +46 -0
- package/lib/stories/StorybookWrappers/populateCallbackForStorybook.js.map +1 -0
- package/lib/stories/index.d.ts +1 -0
- package/lib/stories/index.js +18 -0
- package/lib/stories/index.js.map +1 -0
- package/lib/theme/Theme.d.ts +8 -2
- package/lib/theme/Theme.js +8 -2
- package/lib/theme/Theme.js.map +1 -1
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +2 -0
- package/lib/theme/index.js.map +1 -0
- package/lib/utils/enableWhen.d.ts +1 -1
- package/lib/utils/enableWhenExpression.d.ts +1 -1
- package/lib/utils/fhirpath.d.ts +1 -1
- package/lib/utils/index.d.ts +5 -3
- package/lib/utils/index.js +4 -3
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/initialise.d.ts +2 -2
- package/lib/utils/initialise.js +1 -1
- package/lib/utils/manageForm.d.ts +45 -0
- package/lib/utils/manageForm.js +101 -0
- package/lib/utils/manageForm.js.map +1 -0
- package/lib/utils/qItem.d.ts +1 -1
- package/lib/utils/questionnaireStoreUtils/extractOtherExtensions.d.ts +1 -1
- package/lib/utils/removeEmptyAnswers.d.ts +1 -1
- package/lib/utils/repopulateIntoResponse.d.ts +6 -0
- package/lib/utils/repopulateIntoResponse.js +11 -0
- package/lib/utils/repopulateIntoResponse.js.map +1 -1
- package/lib/utils/repopulateItems.d.ts +19 -1
- package/lib/utils/repopulateItems.js +23 -0
- package/lib/utils/repopulateItems.js.map +1 -1
- package/lib/utils/tabs.d.ts +2 -2
- package/lib/utils/tabs.js +1 -1
- package/lib/utils/validateQuestionnaire.d.ts +0 -4
- package/lib/utils/validateQuestionnaire.js +9 -5
- package/lib/utils/validateQuestionnaire.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FormComponents/BooleanItem/BooleanField.tsx +11 -9
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +11 -9
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +11 -9
- package/src/components/FormComponents/DateTimeItems/index.ts +1 -1
- package/src/components/FormComponents/DateTimeItems/utils/parseDate.ts +5 -0
- package/src/components/FormComponents/GridGroup/GridGroup.tsx +6 -0
- package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +6 -0
- package/src/components/FormComponents/RepeatItem/RepeatItem.tsx +5 -0
- package/src/components/FormComponents/SingleItem/SingleItem.tsx +6 -0
- package/src/components/FormComponents/Tables/GroupTable.tsx +6 -0
- package/src/components/FormComponents/index.ts +6 -6
- package/src/components/Renderer/BaseRenderer.tsx +7 -0
- package/src/components/Renderer/SmartFormsRenderer.tsx +34 -11
- package/src/components/Renderer/index.ts +1 -0
- package/src/components/index.ts +10 -2
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useBuildForm.ts +58 -0
- package/src/hooks/useHidden.ts +6 -0
- package/src/hooks/useInitialiseForm.ts +93 -0
- package/src/hooks/{useQueryClient.ts → useRendererQueryClient.ts} +9 -2
- package/src/hooks/useValueSetCodings.ts +1 -0
- package/src/index.ts +59 -96
- package/src/interfaces/calculatedExpression.interface.ts +24 -0
- package/src/interfaces/enableWhen.interface.ts +12 -0
- package/src/interfaces/index.ts +21 -10
- package/src/interfaces/populate.interface.ts +6 -0
- package/src/interfaces/tab.interface.ts +12 -0
- package/src/interfaces/variables.interface.ts +12 -0
- package/src/stores/index.ts +7 -0
- package/src/stores/questionnaireResponseStore.ts +90 -19
- package/src/stores/questionnaireStore.ts +62 -2
- package/src/stores/smartConfigStore.ts +37 -0
- package/src/stores/terminologyServerStore.ts +28 -1
- package/src/stories/{BuildFormButtonForStorybook.tsx → StorybookWrappers/BuildFormButtonForStorybook.tsx} +12 -5
- package/src/stories/StorybookWrappers/BuildFormButtonTesterWrapperForStorybook.tsx +70 -0
- package/src/stories/{BuildFormWrapper.tsx → StorybookWrappers/BuildFormWrapperForStorybook.tsx} +11 -12
- package/src/stories/{BuildFormButtonTesterWrapper.tsx → StorybookWrappers/FormValidationTesterWrapperForStorybook.tsx} +22 -19
- package/src/stories/{useBuildFormForStorybook.ts → StorybookWrappers/FormValidationViewerForStorybook.tsx} +7 -16
- package/src/stories/StorybookWrappers/InitialiseFormWrapperForStorybook.tsx +105 -0
- package/src/stories/{PrePopButtonForStorybook.tsx → StorybookWrappers/PrePopButtonForStorybook.tsx} +12 -10
- package/src/stories/{PrePopWrapper.tsx → StorybookWrappers/PrePopWrapperForStorybook.tsx} +22 -14
- package/src/stories/StorybookWrappers/ValidateFormButtonForStorybook.tsx +41 -0
- package/src/stories/StorybookWrappers/index.ts +20 -0
- package/src/stories/{populateCallbackForStorybook.ts → StorybookWrappers/populateCallbackForStorybook.ts} +8 -2
- package/src/stories/assets/questionnaires/QButtonTester.ts +380 -0
- package/src/stories/assets/questionnaires/QValidateTester.ts +118 -0
- package/src/stories/itemTypes/Attachment.stories.tsx +3 -3
- package/src/stories/itemTypes/Boolean.stories.tsx +3 -3
- package/src/stories/itemTypes/Choice.stories.tsx +3 -3
- package/src/stories/itemTypes/Date.stories.tsx +3 -3
- package/src/stories/itemTypes/DateTime.stories.tsx +3 -3
- package/src/stories/itemTypes/Decimal.stories.tsx +3 -3
- package/src/stories/itemTypes/Display.stories.tsx +3 -3
- package/src/stories/itemTypes/Group.stories.tsx +3 -3
- package/src/stories/itemTypes/Integer.stories.tsx +3 -3
- package/src/stories/itemTypes/OpenChoice.stories.tsx +3 -3
- package/src/stories/itemTypes/Quantity.stories.tsx +3 -3
- package/src/stories/itemTypes/Reference.stories.tsx +3 -3
- package/src/stories/itemTypes/String.stories.tsx +3 -3
- package/src/stories/itemTypes/Text.stories.tsx +3 -3
- package/src/stories/itemTypes/Time.stories.tsx +3 -3
- package/src/stories/itemTypes/Url.stories.tsx +3 -3
- package/src/stories/sdc/AdvancedAdditionalDisplayContent.stories.tsx +3 -3
- package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +3 -3
- package/src/stories/sdc/AdvancedOther.stories.tsx +3 -3
- package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +3 -3
- package/src/stories/sdc/BehaviorCalculations.stories.tsx +3 -3
- package/src/stories/sdc/BehaviorChoiceRestriction.stories.tsx +3 -3
- package/src/stories/sdc/BehaviorOther.stories.tsx +3 -3
- package/src/stories/sdc/BehaviorValueConstraints.stories.tsx +3 -3
- package/src/stories/sdc/FormPopulation.stories.tsx +3 -3
- package/src/stories/sdc/ItemControlDisplay.stories.tsx +3 -3
- package/src/stories/sdc/ItemControlGroup.stories.tsx +3 -3
- package/src/stories/sdc/ItemControlQuestion.stories.tsx +3 -3
- package/src/stories/{rebuildForm/BuildFormTesterWrapper.stories.tsx → testing/BuildFormButtonTesterWrapper.stories.tsx} +6 -9
- package/src/stories/testing/PrePopButtonTesterWrapper.stories.tsx +45 -0
- package/src/stories/testing/ValidateFormTesterWrapper.stories.tsx +39 -0
- package/src/tests/enableWhen.test.ts +6 -2
- package/src/theme/Theme.tsx +8 -2
- package/src/theme/index.ts +1 -0
- package/src/utils/enableWhen.ts +1 -1
- package/src/utils/enableWhenExpression.ts +1 -1
- package/src/utils/fhirpath.ts +1 -1
- package/src/utils/index.ts +5 -7
- package/src/utils/initialise.ts +2 -2
- package/src/utils/manageForm.ts +110 -0
- package/src/utils/qItem.ts +1 -1
- package/src/utils/questionnaireStoreUtils/extractOtherExtensions.ts +1 -1
- package/src/utils/removeEmptyAnswers.ts +1 -1
- package/src/utils/repopulateIntoResponse.ts +17 -0
- package/src/utils/repopulateItems.ts +38 -1
- package/src/utils/tabs.ts +2 -2
- package/src/utils/validateQuestionnaire.ts +12 -17
- package/vite.config.ts +1 -1
- package/src/hooks/useInitialiseRenderer.ts +0 -114
- package/src/stories/assets/questionnaires/QBuildFormButtonTester.ts +0 -270
- package/src/stories/populateUtilsForStorybook.ts +0 -545
- package/src/utils/buildForm.ts +0 -23
- /package/.storybook/{preview.ts → preview.tsx} +0 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4';
|
|
19
|
+
|
|
20
|
+
export const qButtonTester: Questionnaire = {
|
|
21
|
+
resourceType: 'Questionnaire',
|
|
22
|
+
id: 'ButtonTester',
|
|
23
|
+
name: 'ButtonTester',
|
|
24
|
+
title: 'Button Tester',
|
|
25
|
+
version: '0.1.0',
|
|
26
|
+
status: 'draft',
|
|
27
|
+
publisher: 'AEHRC CSIRO',
|
|
28
|
+
date: '2024-05-01',
|
|
29
|
+
url: 'https://smartforms.csiro.au/docs/tester/button',
|
|
30
|
+
extension: [
|
|
31
|
+
{
|
|
32
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
33
|
+
valueExpression: {
|
|
34
|
+
name: 'AllConditions',
|
|
35
|
+
language: 'application/x-fhir-query',
|
|
36
|
+
expression: 'Condition?patient={{%patient.id}}'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
41
|
+
valueExpression: {
|
|
42
|
+
name: 'DecimalObsBodyWeight',
|
|
43
|
+
language: 'application/x-fhir-query',
|
|
44
|
+
expression: 'Observation?code=29463-7&_count=1&_sort=-date&patient={{%patient.id}}'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
49
|
+
valueExpression: {
|
|
50
|
+
name: 'IntegerObsBloodPressure',
|
|
51
|
+
language: 'application/x-fhir-query',
|
|
52
|
+
expression: 'Observation?code=85354-9&_count=1&_sort=-date&patient={{%patient.id}}'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext',
|
|
57
|
+
extension: [
|
|
58
|
+
{
|
|
59
|
+
url: 'name',
|
|
60
|
+
valueCoding: {
|
|
61
|
+
system: 'http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext',
|
|
62
|
+
code: 'patient'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
url: 'type',
|
|
67
|
+
valueCode: 'Patient'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
url: 'description',
|
|
71
|
+
valueString: 'The patient that is to be used to pre-populate the form'
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
item: [
|
|
77
|
+
{
|
|
78
|
+
extension: [
|
|
79
|
+
{
|
|
80
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
81
|
+
valueExpression: {
|
|
82
|
+
language: 'text/fhirpath',
|
|
83
|
+
expression: '%DecimalObsBodyWeight.entry.resource.value.value'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
linkId: 'decimal',
|
|
88
|
+
type: 'decimal',
|
|
89
|
+
repeats: false,
|
|
90
|
+
text: 'Decimal Test'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
extension: [
|
|
94
|
+
{
|
|
95
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
96
|
+
valueExpression: {
|
|
97
|
+
language: 'text/fhirpath',
|
|
98
|
+
expression:
|
|
99
|
+
"%IntegerObsBloodPressure.entry.resource.component.where(code.coding.exists(code='8480-6')).value.value"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
linkId: 'integer',
|
|
104
|
+
type: 'integer',
|
|
105
|
+
repeats: false,
|
|
106
|
+
text: 'Integer Test'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
extension: [
|
|
110
|
+
{
|
|
111
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
112
|
+
valueExpression: {
|
|
113
|
+
language: 'text/fhirpath',
|
|
114
|
+
expression: "(%patient.name.where(use='official').select(family) | text).first()"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
linkId: 'string',
|
|
119
|
+
type: 'string',
|
|
120
|
+
repeats: false,
|
|
121
|
+
text: 'String Test'
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
extension: [
|
|
125
|
+
{
|
|
126
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
127
|
+
valueExpression: {
|
|
128
|
+
language: 'text/fhirpath',
|
|
129
|
+
expression:
|
|
130
|
+
"%patient.address.where(use='home' and (type.empty() or type!='postal')).select(line.join(', '))"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
linkId: 'text',
|
|
135
|
+
type: 'text',
|
|
136
|
+
repeats: false,
|
|
137
|
+
text: 'Text Test'
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
extension: [
|
|
141
|
+
{
|
|
142
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
143
|
+
valueExpression: {
|
|
144
|
+
language: 'text/fhirpath',
|
|
145
|
+
expression: '%patient.birthDate'
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
linkId: 'date',
|
|
150
|
+
type: 'date',
|
|
151
|
+
repeats: false,
|
|
152
|
+
text: 'Date Test'
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
extension: [
|
|
156
|
+
{
|
|
157
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
158
|
+
valueExpression: {
|
|
159
|
+
language: 'text/fhirpath',
|
|
160
|
+
expression: '%patient.birthDate'
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
linkId: 'dateTime',
|
|
165
|
+
type: 'dateTime',
|
|
166
|
+
repeats: false,
|
|
167
|
+
text: 'DateTime Test'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
linkId: 'repeats-container',
|
|
171
|
+
type: 'group',
|
|
172
|
+
repeats: false,
|
|
173
|
+
text: '',
|
|
174
|
+
item: [
|
|
175
|
+
{
|
|
176
|
+
extension: [
|
|
177
|
+
{
|
|
178
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
179
|
+
valueExpression: {
|
|
180
|
+
language: 'text/fhirpath',
|
|
181
|
+
expression: "%patient.telecom.where(system = 'phone' and use = 'home').value"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
linkId: 'repeats-string',
|
|
186
|
+
type: 'string',
|
|
187
|
+
repeats: true,
|
|
188
|
+
text: 'Repeats Test (String)'
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
extension: [
|
|
194
|
+
{
|
|
195
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext',
|
|
196
|
+
valueExpression: {
|
|
197
|
+
name: 'PostalAddressRepeat',
|
|
198
|
+
language: 'text/fhirpath',
|
|
199
|
+
expression: "%patient.address.where(type='postal')"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
linkId: 'repeats-group',
|
|
204
|
+
type: 'group',
|
|
205
|
+
repeats: true,
|
|
206
|
+
text: 'Repeats Group Test',
|
|
207
|
+
item: [
|
|
208
|
+
{
|
|
209
|
+
extension: [
|
|
210
|
+
{
|
|
211
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
212
|
+
valueExpression: {
|
|
213
|
+
language: 'text/fhirpath',
|
|
214
|
+
expression: '%PostalAddressRepeat.city'
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
linkId: 'repeats-group-string',
|
|
219
|
+
text: 'String',
|
|
220
|
+
type: 'string',
|
|
221
|
+
repeats: false
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
extension: [
|
|
225
|
+
{
|
|
226
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression',
|
|
227
|
+
valueExpression: {
|
|
228
|
+
language: 'text/fhirpath',
|
|
229
|
+
expression: '%PostalAddressRepeat.state'
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
linkId: 'repeats-group-choice',
|
|
234
|
+
text: 'Choice',
|
|
235
|
+
type: 'choice',
|
|
236
|
+
repeats: false,
|
|
237
|
+
answerValueSet:
|
|
238
|
+
'https://healthterminologies.gov.au/fhir/ValueSet/australian-states-territories-2'
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export const qrButtonTesterResponse: QuestionnaireResponse = {
|
|
246
|
+
resourceType: 'QuestionnaireResponse',
|
|
247
|
+
status: 'in-progress',
|
|
248
|
+
item: [
|
|
249
|
+
{
|
|
250
|
+
linkId: 'decimal',
|
|
251
|
+
text: 'Decimal Test',
|
|
252
|
+
answer: [
|
|
253
|
+
{
|
|
254
|
+
valueDecimal: 123.45
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
linkId: 'integer',
|
|
260
|
+
text: 'Integer Test',
|
|
261
|
+
answer: [
|
|
262
|
+
{
|
|
263
|
+
valueInteger: 123
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
linkId: 'string',
|
|
269
|
+
text: 'String Test',
|
|
270
|
+
answer: [
|
|
271
|
+
{
|
|
272
|
+
valueString: 'Sample String'
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
linkId: 'text',
|
|
278
|
+
text: 'Text Test',
|
|
279
|
+
answer: [
|
|
280
|
+
{
|
|
281
|
+
valueString: 'Sample Text'
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
linkId: 'date',
|
|
287
|
+
text: 'Date Test',
|
|
288
|
+
answer: [
|
|
289
|
+
{
|
|
290
|
+
valueDate: '2024-05-20'
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
linkId: 'dateTime',
|
|
296
|
+
text: 'DateTime Test',
|
|
297
|
+
answer: [
|
|
298
|
+
{
|
|
299
|
+
valueDateTime: '2024-05-20T15:30:00Z'
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
linkId: 'repeats-container',
|
|
305
|
+
text: '',
|
|
306
|
+
item: [
|
|
307
|
+
{
|
|
308
|
+
linkId: 'repeats-string',
|
|
309
|
+
text: 'Repeats Test (String)',
|
|
310
|
+
answer: [
|
|
311
|
+
{
|
|
312
|
+
valueString: 'First String'
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
valueString: 'Second String'
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
linkId: 'repeats-group',
|
|
323
|
+
text: 'Repeats Group Test',
|
|
324
|
+
item: [
|
|
325
|
+
{
|
|
326
|
+
linkId: 'repeats-group-string',
|
|
327
|
+
text: 'String',
|
|
328
|
+
answer: [
|
|
329
|
+
{
|
|
330
|
+
valueString: 'Nested String 1'
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
linkId: 'repeats-group-choice',
|
|
336
|
+
text: 'Choice',
|
|
337
|
+
answer: [
|
|
338
|
+
{
|
|
339
|
+
valueCoding: {
|
|
340
|
+
system:
|
|
341
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
342
|
+
code: 'NSW'
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
linkId: 'repeats-group',
|
|
351
|
+
text: 'Repeats Group Test',
|
|
352
|
+
item: [
|
|
353
|
+
{
|
|
354
|
+
linkId: 'repeats-group-string',
|
|
355
|
+
text: 'String',
|
|
356
|
+
answer: [
|
|
357
|
+
{
|
|
358
|
+
valueString: 'Nested String 2'
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
linkId: 'repeats-group-choice',
|
|
364
|
+
text: 'Choice',
|
|
365
|
+
answer: [
|
|
366
|
+
{
|
|
367
|
+
valueCoding: {
|
|
368
|
+
system:
|
|
369
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
370
|
+
code: 'SA'
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
|
|
379
|
+
questionnaire: 'https://smartforms.csiro.au/docs/tester/button'
|
|
380
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire } from 'fhir/r4';
|
|
19
|
+
|
|
20
|
+
export const qValidateTester: Questionnaire = {
|
|
21
|
+
resourceType: 'Questionnaire',
|
|
22
|
+
id: 'ValidateTester',
|
|
23
|
+
name: 'ValidateTester',
|
|
24
|
+
title: 'Validate Tester',
|
|
25
|
+
version: '0.1.0',
|
|
26
|
+
status: 'draft',
|
|
27
|
+
publisher: 'AEHRC CSIRO',
|
|
28
|
+
date: '2024-05-01',
|
|
29
|
+
url: 'https://smartforms.csiro.au/docs/tester/validate',
|
|
30
|
+
item: [
|
|
31
|
+
{
|
|
32
|
+
linkId: 'required',
|
|
33
|
+
text: 'Required',
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
repeats: false,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
linkId: 'maxlength',
|
|
40
|
+
text: 'Max Length (10)',
|
|
41
|
+
type: 'string',
|
|
42
|
+
repeats: false,
|
|
43
|
+
maxLength: 10
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
extension: [
|
|
47
|
+
{
|
|
48
|
+
url: 'http://hl7.org/fhir/StructureDefinition/minLength',
|
|
49
|
+
valueInteger: 10
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
linkId: 'minlength',
|
|
53
|
+
text: 'Min Length (10)',
|
|
54
|
+
type: 'string',
|
|
55
|
+
repeats: false
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
extension: [
|
|
59
|
+
{
|
|
60
|
+
url: 'http://hl7.org/fhir/StructureDefinition/regex',
|
|
61
|
+
valueString: "matches('^[0-9]{4}$')"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
url: 'http://hl7.org/fhir/StructureDefinition/entryFormat',
|
|
65
|
+
valueString: '####'
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
linkId: 'regex',
|
|
69
|
+
text: 'Regex (####)',
|
|
70
|
+
type: 'string',
|
|
71
|
+
repeats: false
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
extension: [
|
|
75
|
+
{
|
|
76
|
+
url: 'http://hl7.org/fhir/StructureDefinition/maxValue',
|
|
77
|
+
valueInteger: 65
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
linkId: 'maxvalue',
|
|
81
|
+
text: 'Max Value (<=65)',
|
|
82
|
+
type: 'integer',
|
|
83
|
+
repeats: false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
extension: [
|
|
87
|
+
{
|
|
88
|
+
url: 'http://hl7.org/fhir/StructureDefinition/minValue',
|
|
89
|
+
valueInteger: 18
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
linkId: 'minvalue',
|
|
93
|
+
text: 'Min Value (>=18)',
|
|
94
|
+
type: 'integer',
|
|
95
|
+
repeats: false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
extension: [
|
|
99
|
+
{
|
|
100
|
+
url: 'http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces',
|
|
101
|
+
valueInteger: 2
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
|
|
105
|
+
valueCoding: {
|
|
106
|
+
system: 'http://unitsofmeasure.org',
|
|
107
|
+
code: 'kg',
|
|
108
|
+
display: 'kg'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
linkId: 'maxdecimalplaces',
|
|
113
|
+
text: 'Max Decimal Places (2)',
|
|
114
|
+
type: 'decimal',
|
|
115
|
+
repeats: false
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
};
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import { qAttachmentBasic } from '../assets/questionnaires';
|
|
21
21
|
|
|
22
22
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
23
23
|
const meta = {
|
|
24
24
|
title: 'Component/ItemType/Attachment',
|
|
25
|
-
component:
|
|
25
|
+
component: BuildFormWrapperForStorybook,
|
|
26
26
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
27
27
|
tags: []
|
|
28
|
-
} satisfies Meta<typeof
|
|
28
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
29
29
|
|
|
30
30
|
export default meta;
|
|
31
31
|
type Story = StoryObj<typeof meta>;
|
|
@@ -21,15 +21,15 @@ import {
|
|
|
21
21
|
qBooleanCalculation,
|
|
22
22
|
qrBooleanBasicResponse
|
|
23
23
|
} from '../assets/questionnaires';
|
|
24
|
-
import
|
|
24
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook'; // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
25
25
|
|
|
26
26
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
27
27
|
const meta = {
|
|
28
28
|
title: 'Component/ItemType/Boolean',
|
|
29
|
-
component:
|
|
29
|
+
component: BuildFormWrapperForStorybook,
|
|
30
30
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
31
31
|
tags: []
|
|
32
|
-
} satisfies Meta<typeof
|
|
32
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
33
33
|
|
|
34
34
|
export default meta;
|
|
35
35
|
type Story = StoryObj<typeof meta>;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import {
|
|
21
21
|
qChoiceAnswerOptionBasic,
|
|
22
22
|
qChoiceAnswerOptionCalculation,
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
30
30
|
const meta = {
|
|
31
31
|
title: 'Component/ItemType/Choice',
|
|
32
|
-
component:
|
|
32
|
+
component: BuildFormWrapperForStorybook,
|
|
33
33
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
34
34
|
tags: []
|
|
35
|
-
} satisfies Meta<typeof
|
|
35
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
36
36
|
|
|
37
37
|
export default meta;
|
|
38
38
|
type Story = StoryObj<typeof meta>;
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import { qDateBasic, qrDateBasicResponse } from '../assets/questionnaires';
|
|
21
21
|
|
|
22
22
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
23
23
|
const meta = {
|
|
24
24
|
title: 'Component/ItemType/Date',
|
|
25
|
-
component:
|
|
25
|
+
component: BuildFormWrapperForStorybook,
|
|
26
26
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
27
27
|
tags: []
|
|
28
|
-
} satisfies Meta<typeof
|
|
28
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
29
29
|
|
|
30
30
|
export default meta;
|
|
31
31
|
type Story = StoryObj<typeof meta>;
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import { qDateTimeBasic, qrDateTimeBasicResponse } from '../assets/questionnaires';
|
|
21
21
|
|
|
22
22
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
23
23
|
const meta = {
|
|
24
24
|
title: 'Component/ItemType/DateTime',
|
|
25
|
-
component:
|
|
25
|
+
component: BuildFormWrapperForStorybook,
|
|
26
26
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
27
27
|
tags: []
|
|
28
|
-
} satisfies Meta<typeof
|
|
28
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
29
29
|
|
|
30
30
|
export default meta;
|
|
31
31
|
type Story = StoryObj<typeof meta>;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import {
|
|
21
21
|
qCalculatedExpressionBMICalculator,
|
|
22
22
|
qDecimalBasic,
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
27
27
|
const meta = {
|
|
28
28
|
title: 'Component/ItemType/Decimal',
|
|
29
|
-
component:
|
|
29
|
+
component: BuildFormWrapperForStorybook,
|
|
30
30
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
31
31
|
tags: []
|
|
32
|
-
} satisfies Meta<typeof
|
|
32
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
33
33
|
|
|
34
34
|
export default meta;
|
|
35
35
|
type Story = StoryObj<typeof meta>;
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import { qDisplayBasic, qDisplayCalculation } from '../assets/questionnaires/QDisplay';
|
|
21
21
|
|
|
22
22
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
23
23
|
const meta = {
|
|
24
24
|
title: 'Component/ItemType/Display',
|
|
25
|
-
component:
|
|
25
|
+
component: BuildFormWrapperForStorybook,
|
|
26
26
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
27
27
|
tags: []
|
|
28
|
-
} satisfies Meta<typeof
|
|
28
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
29
29
|
|
|
30
30
|
export default meta;
|
|
31
31
|
type Story = StoryObj<typeof meta>;
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import { qGroupBasic } from '../assets/questionnaires/QGroup';
|
|
21
21
|
|
|
22
22
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
23
23
|
const meta = {
|
|
24
24
|
title: 'Component/ItemType/Group',
|
|
25
|
-
component:
|
|
25
|
+
component: BuildFormWrapperForStorybook,
|
|
26
26
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
27
27
|
tags: []
|
|
28
|
-
} satisfies Meta<typeof
|
|
28
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
29
29
|
|
|
30
30
|
export default meta;
|
|
31
31
|
type Story = StoryObj<typeof meta>;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
|
-
import
|
|
19
|
+
import BuildFormWrapperForStorybook from '../StorybookWrappers/BuildFormWrapperForStorybook';
|
|
20
20
|
import {
|
|
21
21
|
qIntegerBasic,
|
|
22
22
|
qIntegerCalculation,
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
27
27
|
const meta = {
|
|
28
28
|
title: 'Component/ItemType/Integer',
|
|
29
|
-
component:
|
|
29
|
+
component: BuildFormWrapperForStorybook,
|
|
30
30
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
31
31
|
tags: []
|
|
32
|
-
} satisfies Meta<typeof
|
|
32
|
+
} satisfies Meta<typeof BuildFormWrapperForStorybook>;
|
|
33
33
|
|
|
34
34
|
export default meta;
|
|
35
35
|
type Story = StoryObj<typeof meta>;
|