@aehrc/smart-forms-renderer 1.0.0-alpha.42.dev2 → 1.0.0-alpha.42.dev3

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.
Files changed (114) hide show
  1. package/package.json +1 -1
  2. package/.storybook/main.ts +0 -34
  3. package/.storybook/preview.tsx +0 -40
  4. package/src/stories/assets/fhirClient/mockFhirClient.ts +0 -52
  5. package/src/stories/assets/patients/PatSmartForm.ts +0 -281
  6. package/src/stories/assets/practitioners/PracPrimaryPeter.ts +0 -38
  7. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreAllergyIntolerance.json +0 -209
  8. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreCondition.json +0 -220
  9. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreEncounter.json +0 -299
  10. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreImmunization.json +0 -175
  11. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreMedicationRequest.json +0 -229
  12. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBP.json +0 -359
  13. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyHeight.json +0 -195
  14. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationBodyWeight.json +0 -195
  15. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationHeartRate.json +0 -195
  16. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreObservationSmokingStatus.json +0 -174
  17. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePatient.json +0 -495
  18. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitioner.json +0 -139
  19. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCorePractitionerRole.json +0 -216
  20. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreProcedure.json +0 -199
  21. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreRespirationRate.json +0 -195
  22. package/src/stories/assets/questionnaires/AuCoreTestingJson/AuCoreWaistCircumference.json +0 -195
  23. package/src/stories/assets/questionnaires/QAdvancedAdditionalDisplayContent.ts +0 -113
  24. package/src/stories/assets/questionnaires/QAdvancedControlAppearance.ts +0 -865
  25. package/src/stories/assets/questionnaires/QAdvancedOther.ts +0 -494
  26. package/src/stories/assets/questionnaires/QAdvancedTextApperance.ts +0 -503
  27. package/src/stories/assets/questionnaires/QAttachment.ts +0 -38
  28. package/src/stories/assets/questionnaires/QAuCoreTesting.ts +0 -3796
  29. package/src/stories/assets/questionnaires/QBehaviorCalculations.ts +0 -643
  30. package/src/stories/assets/questionnaires/QBehaviorChoiceRestriction.ts +0 -281
  31. package/src/stories/assets/questionnaires/QBehaviorOther.ts +0 -1241
  32. package/src/stories/assets/questionnaires/QBehaviorValueConstraints.ts +0 -508
  33. package/src/stories/assets/questionnaires/QBoolean.ts +0 -180
  34. package/src/stories/assets/questionnaires/QButtonTester.ts +0 -497
  35. package/src/stories/assets/questionnaires/QChoice.ts +0 -493
  36. package/src/stories/assets/questionnaires/QDate.ts +0 -56
  37. package/src/stories/assets/questionnaires/QDateTime.ts +0 -56
  38. package/src/stories/assets/questionnaires/QDecimal.ts +0 -56
  39. package/src/stories/assets/questionnaires/QDisplay.ts +0 -197
  40. package/src/stories/assets/questionnaires/QFormPopulation.ts +0 -1349
  41. package/src/stories/assets/questionnaires/QGroup.ts +0 -52
  42. package/src/stories/assets/questionnaires/QGroupTableTester.ts +0 -461
  43. package/src/stories/assets/questionnaires/QIdRemoverDebugger.ts +0 -161
  44. package/src/stories/assets/questionnaires/QInteger.ts +0 -119
  45. package/src/stories/assets/questionnaires/QItemControlDisplay.ts +0 -558
  46. package/src/stories/assets/questionnaires/QItemControlGroup.ts +0 -1530
  47. package/src/stories/assets/questionnaires/QItemControlQuestion.ts +0 -1271
  48. package/src/stories/assets/questionnaires/QMbs715Tester.ts +0 -32888
  49. package/src/stories/assets/questionnaires/QOpenChoice.ts +0 -151
  50. package/src/stories/assets/questionnaires/QParameterisedValueSets.ts +0 -312
  51. package/src/stories/assets/questionnaires/QPrePopTester.ts +0 -543
  52. package/src/stories/assets/questionnaires/QQuantity.ts +0 -365
  53. package/src/stories/assets/questionnaires/QReference.ts +0 -38
  54. package/src/stories/assets/questionnaires/QSingleItems.ts +0 -251
  55. package/src/stories/assets/questionnaires/QString.ts +0 -131
  56. package/src/stories/assets/questionnaires/QTerminologyControl.ts +0 -59
  57. package/src/stories/assets/questionnaires/QText.ts +0 -169
  58. package/src/stories/assets/questionnaires/QTime.ts +0 -38
  59. package/src/stories/assets/questionnaires/QUrl.ts +0 -38
  60. package/src/stories/assets/questionnaires/QValidateTester.ts +0 -118
  61. package/src/stories/assets/questionnaires/index.ts +0 -43
  62. package/src/stories/itemTypes/Attachment.stories.tsx +0 -39
  63. package/src/stories/itemTypes/Boolean.stories.tsx +0 -65
  64. package/src/stories/itemTypes/Choice.stories.tsx +0 -78
  65. package/src/stories/itemTypes/Date.stories.tsx +0 -46
  66. package/src/stories/itemTypes/DateTime.stories.tsx +0 -45
  67. package/src/stories/itemTypes/Decimal.stories.tsx +0 -56
  68. package/src/stories/itemTypes/Display.stories.tsx +0 -55
  69. package/src/stories/itemTypes/Group.stories.tsx +0 -39
  70. package/src/stories/itemTypes/Integer.stories.tsx +0 -55
  71. package/src/stories/itemTypes/OpenChoice.stories.tsx +0 -64
  72. package/src/stories/itemTypes/Quantity.stories.tsx +0 -71
  73. package/src/stories/itemTypes/Reference.stories.tsx +0 -39
  74. package/src/stories/itemTypes/String.stories.tsx +0 -51
  75. package/src/stories/itemTypes/Text.stories.tsx +0 -51
  76. package/src/stories/itemTypes/Time.stories.tsx +0 -39
  77. package/src/stories/itemTypes/Url.stories.tsx +0 -39
  78. package/src/stories/sdc/AdvancedAdditionalDisplayContent.stories.tsx +0 -51
  79. package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +0 -90
  80. package/src/stories/sdc/AdvancedOther.stories.tsx +0 -76
  81. package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +0 -104
  82. package/src/stories/sdc/BehaviorCalculations.stories.tsx +0 -69
  83. package/src/stories/sdc/BehaviorChoiceRestriction.stories.tsx +0 -76
  84. package/src/stories/sdc/BehaviorOther.stories.tsx +0 -97
  85. package/src/stories/sdc/BehaviorValueConstraints.stories.tsx +0 -88
  86. package/src/stories/sdc/FormPopulation.stories.tsx +0 -97
  87. package/src/stories/sdc/ItemControlDisplay.stories.tsx +0 -69
  88. package/src/stories/sdc/ItemControlGroup.stories.tsx +0 -90
  89. package/src/stories/sdc/ItemControlQuestion.stories.tsx +0 -118
  90. package/src/stories/sdc/OtherExtensions.stories.tsx +0 -39
  91. package/src/stories/sdc/ParameterisedValueSets.stories.tsx +0 -48
  92. package/src/stories/storybookWrappers/BuildFormButtonForStorybook.tsx +0 -54
  93. package/src/stories/storybookWrappers/BuildFormButtonTesterWrapperForStorybook.tsx +0 -76
  94. package/src/stories/storybookWrappers/BuildFormWrapperForStorybook.tsx +0 -61
  95. package/src/stories/storybookWrappers/FormValidationTesterWrapperForStorybook.tsx +0 -70
  96. package/src/stories/storybookWrappers/FormValidationViewerForStorybook.tsx +0 -28
  97. package/src/stories/storybookWrappers/IdRemoverButtonForStorybook.tsx +0 -49
  98. package/src/stories/storybookWrappers/IdRemoverDebuggerWrapperForStorybook.tsx +0 -84
  99. package/src/stories/storybookWrappers/InitialiseFormWrapperForStorybook.tsx +0 -105
  100. package/src/stories/storybookWrappers/PrePopButtonForStorybook.tsx +0 -56
  101. package/src/stories/storybookWrappers/PrePopWrapperForStorybook.tsx +0 -114
  102. package/src/stories/storybookWrappers/TestCssSheet.css +0 -17
  103. package/src/stories/storybookWrappers/ValidateFormButtonForStorybook.tsx +0 -41
  104. package/src/stories/storybookWrappers/globals.ts +0 -18
  105. package/src/stories/storybookWrappers/iframeResizerChild.js +0 -1063
  106. package/src/stories/storybookWrappers/index.ts +0 -19
  107. package/src/stories/storybookWrappers/populateCallbackForStorybook.ts +0 -55
  108. package/src/stories/testing/AuCoreTester.stories.tsx +0 -196
  109. package/src/stories/testing/BuildFormButtonTesterWrapper.stories.tsx +0 -40
  110. package/src/stories/testing/GroupTableTester.stories.tsx +0 -39
  111. package/src/stories/testing/IdRemoverDebuggerWrapper.stories.tsx +0 -39
  112. package/src/stories/testing/Mbs715Tester.stories.tsx +0 -57
  113. package/src/stories/testing/PrePopButtonTesterWrapper.stories.tsx +0 -55
  114. package/src/stories/testing/ValidateFormTesterWrapper.stories.tsx +0 -39
@@ -1,19 +0,0 @@
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
- export type { InitialiseFormWrapperProps } from './InitialiseFormWrapperForStorybook';
19
- export { default as InitialiseFormWrapperForStorybook } from './InitialiseFormWrapperForStorybook';
@@ -1,55 +0,0 @@
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 { FetchResourceCallback, FetchResourceRequestConfig } from '@aehrc/sdc-populate';
19
-
20
- const ABSOLUTE_URL_REGEX = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/;
21
-
22
- /**
23
- * Sample callback function to fetch resources from your source server when using populate() or populateQuestionnaire() from @aehrc/sdc-populate.
24
- * See https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/PrePopWrapperForStorybook.tsx for usage.
25
- *
26
- * @author Sean Fong
27
- */
28
- export const fetchResourceCallback: FetchResourceCallback = async (
29
- query: string,
30
- requestConfig: FetchResourceRequestConfig
31
- ) => {
32
- let { sourceServerUrl } = requestConfig;
33
- const { authToken } = requestConfig;
34
-
35
- const headers: Record<string, string> = {
36
- Accept: 'application/json;charset=utf-8'
37
- };
38
-
39
- if (authToken) {
40
- headers['Authorization'] = `Bearer ${authToken}`;
41
- }
42
-
43
- if (!sourceServerUrl.endsWith('/')) {
44
- sourceServerUrl += '/';
45
- }
46
-
47
- const requestUrl = ABSOLUTE_URL_REGEX.test(query) ? query : `${sourceServerUrl}${query}`;
48
- const response = await fetch(requestUrl, { headers });
49
-
50
- if (!response.ok) {
51
- throw new Error(`HTTP error when performing ${requestUrl}. Status: ${response.status}`);
52
- }
53
-
54
- return response.json();
55
- };
@@ -1,196 +0,0 @@
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 { Meta, StoryObj } from '@storybook/react';
19
- import PrePopWrapperForStorybook from '../storybookWrappers/PrePopWrapperForStorybook';
20
- import { mockFhirClient } from '../assets/fhirClient/mockFhirClient';
21
- import { patSmartForm } from '../assets/patients/PatSmartForm';
22
- import { pracPrimaryPeter } from '../assets/practitioners/PracPrimaryPeter';
23
- import {
24
- QAuCoreAllergyIntolerance,
25
- QAuCoreCondition,
26
- QAuCoreEncounter,
27
- QAuCoreImmunization,
28
- QAuCoreMedicationRequest,
29
- QAuCoreObservationBodyHeight,
30
- QAuCoreObservationBodyWeight,
31
- QAuCoreObservationBP,
32
- QAuCoreObservationHeartRate,
33
- QAuCoreObservationRespirationRate,
34
- QAuCoreObservationSmokingStatus,
35
- QAuCoreObservationWaistCircumference,
36
- QAuCorePatient,
37
- QAuCorePractitioner,
38
- QAuCorePractitionerRole,
39
- QAuCoreProcedure
40
- } from '../assets/questionnaires/QAuCoreTesting';
41
-
42
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
43
- const meta = {
44
- title: 'Testing/AU Core Tester',
45
- component: PrePopWrapperForStorybook,
46
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
47
- tags: []
48
- } satisfies Meta<typeof PrePopWrapperForStorybook>;
49
-
50
- export default meta;
51
- type Story = StoryObj<typeof meta>;
52
-
53
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
54
-
55
- export const AuCoreAllergyIntolerance: Story = {
56
- args: {
57
- questionnaire: QAuCoreAllergyIntolerance,
58
- fhirClient: mockFhirClient,
59
- patient: patSmartForm,
60
- user: pracPrimaryPeter
61
- }
62
- };
63
-
64
- export const AuCoreCondition: Story = {
65
- args: {
66
- questionnaire: QAuCoreCondition,
67
- fhirClient: mockFhirClient,
68
- patient: patSmartForm,
69
- user: pracPrimaryPeter
70
- }
71
- };
72
-
73
- export const AuCoreEncounter: Story = {
74
- args: {
75
- questionnaire: QAuCoreEncounter,
76
- fhirClient: mockFhirClient,
77
- patient: patSmartForm,
78
- user: pracPrimaryPeter
79
- }
80
- };
81
-
82
- export const AuCoreImmunization: Story = {
83
- args: {
84
- questionnaire: QAuCoreImmunization,
85
- fhirClient: mockFhirClient,
86
- patient: patSmartForm,
87
- user: pracPrimaryPeter
88
- }
89
- };
90
-
91
- export const AuCoreMedicationRequest: Story = {
92
- args: {
93
- questionnaire: QAuCoreMedicationRequest,
94
- fhirClient: mockFhirClient,
95
- patient: patSmartForm,
96
- user: pracPrimaryPeter
97
- }
98
- };
99
-
100
- export const AuCorePatient: Story = {
101
- args: {
102
- questionnaire: QAuCorePatient,
103
- fhirClient: mockFhirClient,
104
- patient: patSmartForm,
105
- user: pracPrimaryPeter
106
- }
107
- };
108
-
109
- export const AuCorePractitioner: Story = {
110
- args: {
111
- questionnaire: QAuCorePractitioner,
112
- fhirClient: mockFhirClient,
113
- patient: patSmartForm,
114
- user: pracPrimaryPeter
115
- }
116
- };
117
-
118
- export const AuCorePractitionerRole: Story = {
119
- args: {
120
- questionnaire: QAuCorePractitionerRole,
121
- fhirClient: mockFhirClient,
122
- patient: patSmartForm,
123
- user: pracPrimaryPeter
124
- }
125
- };
126
-
127
- export const AuCoreProcedure: Story = {
128
- args: {
129
- questionnaire: QAuCoreProcedure,
130
- fhirClient: mockFhirClient,
131
- patient: patSmartForm,
132
- user: pracPrimaryPeter
133
- }
134
- };
135
-
136
- export const AuCoreObservationBP: Story = {
137
- args: {
138
- questionnaire: QAuCoreObservationBP,
139
- fhirClient: mockFhirClient,
140
- patient: patSmartForm,
141
- user: pracPrimaryPeter
142
- }
143
- };
144
-
145
- export const AuCoreObservationBodyHeight: Story = {
146
- args: {
147
- questionnaire: QAuCoreObservationBodyHeight,
148
- fhirClient: mockFhirClient,
149
- patient: patSmartForm,
150
- user: pracPrimaryPeter
151
- }
152
- };
153
-
154
- export const AuCoreObservationBodyWeight: Story = {
155
- args: {
156
- questionnaire: QAuCoreObservationBodyWeight,
157
- fhirClient: mockFhirClient,
158
- patient: patSmartForm,
159
- user: pracPrimaryPeter
160
- }
161
- };
162
-
163
- export const AuCoreObservationHeartRate: Story = {
164
- args: {
165
- questionnaire: QAuCoreObservationHeartRate,
166
- fhirClient: mockFhirClient,
167
- patient: patSmartForm,
168
- user: pracPrimaryPeter
169
- }
170
- };
171
- export const AuCoreObservationRespirationRate: Story = {
172
- args: {
173
- questionnaire: QAuCoreObservationRespirationRate,
174
- fhirClient: mockFhirClient,
175
- patient: patSmartForm,
176
- user: pracPrimaryPeter
177
- }
178
- };
179
-
180
- export const AuCoreObservationSmokingStatus: Story = {
181
- args: {
182
- questionnaire: QAuCoreObservationSmokingStatus,
183
- fhirClient: mockFhirClient,
184
- patient: patSmartForm,
185
- user: pracPrimaryPeter
186
- }
187
- };
188
-
189
- export const AuCoreObservationWaistCircumference: Story = {
190
- args: {
191
- questionnaire: QAuCoreObservationWaistCircumference,
192
- fhirClient: mockFhirClient,
193
- patient: patSmartForm,
194
- user: pracPrimaryPeter
195
- }
196
- };
@@ -1,40 +0,0 @@
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 { Meta, StoryObj } from '@storybook/react';
19
- import BuildFormButtonTesterWrapperForStorybook from '../storybookWrappers/BuildFormButtonTesterWrapperForStorybook';
20
- import { qButtonTester, qrButtonTesterResponse } from '../assets/questionnaires/QButtonTester';
21
-
22
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
23
- const meta = {
24
- title: 'Testing/Build Form Button Tester',
25
- component: BuildFormButtonTesterWrapperForStorybook,
26
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
27
- tags: []
28
- } satisfies Meta<typeof BuildFormButtonTesterWrapperForStorybook>;
29
-
30
- export default meta;
31
- type Story = StoryObj<typeof meta>;
32
-
33
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
34
-
35
- export const BuildFormButtonTester: Story = {
36
- args: {
37
- questionnaire: qButtonTester,
38
- questionnaireResponse: qrButtonTesterResponse
39
- }
40
- };
@@ -1,39 +0,0 @@
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 { Meta, StoryObj } from '@storybook/react';
19
- import BuildFormWrapperForStorybook from '../storybookWrappers/BuildFormWrapperForStorybook';
20
- import { qGTableWithBoolean } from '../assets/questionnaires/QGroupTableTester';
21
-
22
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
23
- const meta = {
24
- title: 'Testing/Group Table Tester',
25
- component: BuildFormWrapperForStorybook,
26
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
27
- tags: []
28
- } satisfies Meta<typeof BuildFormWrapperForStorybook>;
29
-
30
- export default meta;
31
- type Story = StoryObj<typeof meta>;
32
-
33
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
34
-
35
- export const GroupTableWithBoolean: Story = {
36
- args: {
37
- questionnaire: qGTableWithBoolean
38
- }
39
- };
@@ -1,39 +0,0 @@
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 { Meta, StoryObj } from '@storybook/react';
19
- import IdRemoverDebuggerWrapperForStorybook from '../storybookWrappers/IdRemoverDebuggerWrapperForStorybook';
20
- import { qMyPatient } from '../assets/questionnaires/QIdRemoverDebugger';
21
-
22
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
23
- const meta = {
24
- title: 'Testing/ID Remover Debugger',
25
- component: IdRemoverDebuggerWrapperForStorybook,
26
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
27
- tags: []
28
- } satisfies Meta<typeof IdRemoverDebuggerWrapperForStorybook>;
29
-
30
- export default meta;
31
- type Story = StoryObj<typeof meta>;
32
-
33
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
34
-
35
- export const MyPatient: Story = {
36
- args: {
37
- questionnaire: qMyPatient
38
- }
39
- };
@@ -1,57 +0,0 @@
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 { Meta, StoryObj } from '@storybook/react';
19
- import PrePopWrapperForStorybook from '../storybookWrappers/PrePopWrapperForStorybook';
20
- import {
21
- qBasicMbs715,
22
- qModifiedMbs715WithCollapsible
23
- } from '../assets/questionnaires/QMbs715Tester';
24
- import { mockFhirClient } from '../assets/fhirClient/mockFhirClient';
25
- import { patSmartForm } from '../assets/patients/PatSmartForm';
26
- import { pracPrimaryPeter } from '../assets/practitioners/PracPrimaryPeter';
27
-
28
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
29
- const meta = {
30
- title: 'Testing/MBS 715 Tester',
31
- component: PrePopWrapperForStorybook,
32
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
33
- tags: []
34
- } satisfies Meta<typeof PrePopWrapperForStorybook>;
35
-
36
- export default meta;
37
- type Story = StoryObj<typeof meta>;
38
-
39
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
40
-
41
- export const BasicMBS715: Story = {
42
- args: {
43
- questionnaire: qBasicMbs715,
44
- fhirClient: mockFhirClient,
45
- patient: patSmartForm,
46
- user: pracPrimaryPeter
47
- }
48
- };
49
-
50
- export const ModifiedMBS715WithCollapsible: Story = {
51
- args: {
52
- questionnaire: qModifiedMbs715WithCollapsible,
53
- fhirClient: mockFhirClient,
54
- patient: patSmartForm,
55
- user: pracPrimaryPeter
56
- }
57
- };
@@ -1,55 +0,0 @@
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 { Meta, StoryObj } from '@storybook/react';
19
- import PrePopWrapperForStorybook from '../storybookWrappers/PrePopWrapperForStorybook';
20
- import { mockFhirClient } from '../assets/fhirClient/mockFhirClient';
21
- import { patSmartForm } from '../assets/patients/PatSmartForm';
22
- import { pracPrimaryPeter } from '../assets/practitioners/PracPrimaryPeter';
23
- import { qButtonTester } from '../assets/questionnaires/QButtonTester';
24
- import { qSelectivePrePopTester } from '../assets/questionnaires/QPrePopTester';
25
-
26
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
27
- const meta = {
28
- title: 'Testing/Pre Pop Tester',
29
- component: PrePopWrapperForStorybook,
30
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
31
- tags: []
32
- } satisfies Meta<typeof PrePopWrapperForStorybook>;
33
-
34
- export default meta;
35
- type Story = StoryObj<typeof meta>;
36
-
37
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
38
-
39
- export const BasicPrePopTester: Story = {
40
- args: {
41
- questionnaire: qButtonTester,
42
- fhirClient: mockFhirClient,
43
- patient: patSmartForm,
44
- user: pracPrimaryPeter
45
- }
46
- };
47
-
48
- export const SelectivePrePopTester: Story = {
49
- args: {
50
- questionnaire: qSelectivePrePopTester,
51
- fhirClient: mockFhirClient,
52
- patient: patSmartForm,
53
- user: pracPrimaryPeter
54
- }
55
- };
@@ -1,39 +0,0 @@
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 { Meta, StoryObj } from '@storybook/react';
19
- import ValidationFormTesterWrapper from '../storybookWrappers/FormValidationTesterWrapperForStorybook';
20
- import { qValidateTester } from '../assets/questionnaires/QValidateTester';
21
-
22
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
23
- const meta = {
24
- title: 'Testing/Validate Tester',
25
- component: ValidationFormTesterWrapper,
26
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
27
- tags: []
28
- } satisfies Meta<typeof ValidationFormTesterWrapper>;
29
-
30
- export default meta;
31
- type Story = StoryObj<typeof meta>;
32
-
33
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
34
-
35
- export const ValidateTester: Story = {
36
- args: {
37
- questionnaire: qValidateTester
38
- }
39
- };