@aehrc/smart-forms-renderer 0.27.2 → 0.27.4
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.ts +2 -1
- package/.storybook/preview.ts +6 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.d.ts +3 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js +9 -17
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +12 -9
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js +7 -9
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +12 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +6 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +5 -7
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +4 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +2 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +5 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js +1 -1
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js +20 -20
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.d.ts +3 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js +7 -19
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +40 -40
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +15 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js +3 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +27 -26
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js.map +1 -1
- package/lib/hooks/useInitialiseRenderer.js +1 -1
- package/lib/hooks/useInitialiseRenderer.js.map +1 -1
- package/lib/hooks/useNextAndPreviousVisibleTabs.d.ts +7 -0
- package/lib/hooks/useNextAndPreviousVisibleTabs.js +63 -0
- package/lib/hooks/useNextAndPreviousVisibleTabs.js.map +1 -0
- package/lib/hooks/useNextPreviousVisibleTabs.d.ts +6 -0
- package/lib/hooks/useNextPreviousVisibleTabs.js +63 -0
- package/lib/hooks/useNextPreviousVisibleTabs.js.map +1 -0
- package/lib/index.d.ts +0 -7
- package/lib/index.js +0 -24
- package/lib/index.js.map +1 -1
- package/lib/utils/choice.d.ts +1 -7
- package/lib/utils/choice.js +10 -20
- package/lib/utils/choice.js.map +1 -1
- package/lib/utils/enableWhen.js +5 -7
- package/lib/utils/enableWhen.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/openChoice.d.ts +9 -4
- package/lib/utils/openChoice.js +47 -78
- package/lib/utils/openChoice.js.map +1 -1
- package/lib/utils/tabs.d.ts +0 -21
- package/lib/utils/tabs.js +0 -51
- package/lib/utils/tabs.js.map +1 -1
- package/package.json +4 -4
- package/src/components/FormComponents/ChoiceItems/CheckboxOptionList.tsx +82 -0
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx +23 -52
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +15 -9
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx +17 -19
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +13 -8
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +5 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +6 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.tsx +5 -1
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +9 -16
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +4 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +4 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +5 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.tsx +5 -1
- package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +1 -1
- package/src/components/FormComponents/GroupItem/TabButtonsWrapper.tsx +28 -25
- package/src/components/FormComponents/ItemParts/{RadioAnswerOptionButtons.tsx → RadioOptionList.tsx} +7 -7
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.tsx +18 -50
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +70 -68
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.tsx +110 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +188 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +46 -19
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx +5 -3
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +37 -29
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.tsx +104 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.tsx +156 -0
- package/src/components/FormComponents/StringItem/StringField.tsx +1 -1
- package/src/hooks/useInitialiseRenderer.ts +1 -1
- package/src/hooks/useNextAndPreviousVisibleTabs.ts +86 -0
- package/src/hooks/useOpenLabel.ts +43 -0
- package/src/index.ts +0 -21
- package/src/stories/BuildFormWrapper.tsx +57 -0
- package/src/stories/assets/questionnaires/QAdvancedAdditionalDisplayContent.ts +83 -0
- package/src/stories/assets/questionnaires/QAdvancedControlAppearance.ts +294 -0
- package/src/stories/assets/questionnaires/QAdvancedOther.ts +495 -0
- package/src/stories/assets/questionnaires/QAdvancedTextApperance.ts +188 -0
- package/src/stories/assets/questionnaires/QAttachment.ts +38 -0
- package/src/stories/assets/questionnaires/QBehaviorCalculations.ts +645 -0
- package/src/stories/assets/questionnaires/QBehaviorChoiceRestriction.ts +281 -0
- package/src/stories/assets/questionnaires/QBehaviorOther.ts +1149 -0
- package/src/stories/assets/questionnaires/QBehaviorValueConstraints.ts +508 -0
- package/src/stories/assets/questionnaires/QBoolean.ts +130 -0
- package/src/stories/assets/questionnaires/QChoice.ts +137 -0
- package/src/stories/assets/questionnaires/QDate.ts +56 -0
- package/src/stories/assets/questionnaires/QDateTime.ts +56 -0
- package/src/stories/assets/questionnaires/QDecimal.ts +56 -0
- package/src/stories/assets/questionnaires/QDisplay.ts +38 -0
- package/src/stories/assets/questionnaires/QGroup.ts +52 -0
- package/src/stories/assets/questionnaires/QInteger.ts +119 -0
- package/src/stories/assets/questionnaires/QItemControlDisplay.ts +114 -0
- package/src/stories/assets/questionnaires/QItemControlGroup.ts +419 -0
- package/src/stories/assets/questionnaires/QItemControlQuestion.ts +1271 -0
- package/src/stories/assets/questionnaires/QOpenChoice.ts +151 -0
- package/src/stories/assets/questionnaires/QQuantity.ts +38 -0
- package/src/stories/assets/questionnaires/QReference.ts +38 -0
- package/src/stories/assets/questionnaires/QSingleItems.ts +251 -0
- package/src/stories/assets/questionnaires/QString.ts +131 -0
- package/src/stories/assets/questionnaires/QText.ts +169 -0
- package/src/stories/assets/questionnaires/QTime.ts +38 -0
- package/src/stories/assets/questionnaires/QUrl.ts +38 -0
- package/src/stories/assets/questionnaires/index.ts +44 -0
- package/src/stories/itemTypes/Attachment.stories.tsx +39 -0
- package/src/stories/itemTypes/Boolean.stories.tsx +72 -0
- package/src/stories/{MedicalHistoryTable.stories.tsx → itemTypes/Choice.stories.tsx} +32 -26
- package/src/stories/itemTypes/Date.stories.tsx +46 -0
- package/src/stories/itemTypes/DateTime.stories.tsx +45 -0
- package/src/stories/itemTypes/Decimal.stories.tsx +56 -0
- package/src/stories/itemTypes/Display.stories.tsx +39 -0
- package/src/stories/itemTypes/Group.stories.tsx +39 -0
- package/src/stories/itemTypes/Integer.stories.tsx +55 -0
- package/src/stories/itemTypes/OpenChoice.stories.tsx +64 -0
- package/src/stories/itemTypes/Quantity.stories.tsx +39 -0
- package/src/stories/itemTypes/Reference.stories.tsx +39 -0
- package/src/stories/itemTypes/String.stories.tsx +51 -0
- package/src/stories/itemTypes/Text.stories.tsx +51 -0
- package/src/stories/itemTypes/Time.stories.tsx +39 -0
- package/src/stories/itemTypes/Url.stories.tsx +39 -0
- package/src/stories/sdc/AdvancedAdditionalDisplayContent.stories.tsx +45 -0
- package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +51 -0
- package/src/stories/sdc/AdvancedOther.stories.tsx +76 -0
- package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +69 -0
- package/src/stories/sdc/BehaviorCalculations.stories.tsx +69 -0
- package/src/stories/sdc/BehaviorChoiceRestriction.stories.tsx +76 -0
- package/src/stories/sdc/BehaviorOther.stories.tsx +90 -0
- package/src/stories/sdc/BehaviorValueConstraints.stories.tsx +88 -0
- package/src/stories/sdc/ItemControlDisplay.stories.tsx +39 -0
- package/src/stories/sdc/ItemControlGroup.stories.tsx +55 -0
- package/src/stories/sdc/ItemControlQuestion.stories.tsx +118 -0
- package/src/utils/buildForm.ts +23 -0
- package/src/utils/choice.ts +16 -23
- package/src/utils/enableWhen.ts +5 -7
- package/src/utils/index.ts +1 -0
- package/src/utils/openChoice.ts +83 -98
- package/src/utils/tabs.ts +0 -75
- package/vite.config.ts +23 -0
- package/doctor-storybook.log +0 -18
- package/src/stories/SmartFormsRenderer.stories.ts +0 -139
- package/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json +0 -80
- package/src/stories/assets/QItems-and-QRItems/Q_GTableMedicalHistory.json +0 -109
- package/src/stories/assets/Qs-and-QRs/Q715.json +0 -15086
- package/src/stories/assets/Qs-and-QRs/QDev715.json +0 -16081
- package/src/stories/assets/Qs-and-QRs/QTestGrid.json +0 -411
- package/src/stories/assets/Qs-and-QRs/R715.json +0 -311
- package/src/stories/assets/Qs-and-QRs/RTestGrid.json +0 -34
|
@@ -0,0 +1,39 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qGroupBasic } from '../assets/questionnaires/QGroup';
|
|
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: 'Component/ItemType/Group',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 GroupBasic: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qGroupBasic
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import {
|
|
21
|
+
qIntegerBasic,
|
|
22
|
+
qIntegerCalculation,
|
|
23
|
+
qrIntegerBasicResponse
|
|
24
|
+
} from '../assets/questionnaires';
|
|
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: 'Component/ItemType/Integer',
|
|
29
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 IntegerBasic: Story = {
|
|
40
|
+
args: {
|
|
41
|
+
questionnaire: qIntegerBasic
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export const IntegerBasicResponse: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
questionnaire: qIntegerBasic,
|
|
47
|
+
questionnaireResponse: qrIntegerBasicResponse
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const IntegerCalculation: Story = {
|
|
52
|
+
args: {
|
|
53
|
+
questionnaire: qIntegerCalculation
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import {
|
|
21
|
+
qOpenChoiceAnswerOptionBasic,
|
|
22
|
+
qOpenChoiceAnswerValueSetBasic,
|
|
23
|
+
qrOpenChoiceAnswerOptionBasicResponse,
|
|
24
|
+
qrOpenChoiceAnswerValueSetBasicResponse
|
|
25
|
+
} from '../assets/questionnaires';
|
|
26
|
+
|
|
27
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
28
|
+
const meta = {
|
|
29
|
+
title: 'Component/ItemType/OpenChoice',
|
|
30
|
+
component: BuildFormWrapper,
|
|
31
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
32
|
+
tags: []
|
|
33
|
+
} satisfies Meta<typeof BuildFormWrapper>;
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
|
|
38
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
39
|
+
|
|
40
|
+
export const OpenChoiceAnswerOptionBasic: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
questionnaire: qOpenChoiceAnswerOptionBasic
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const OpenChoiceAnswerOptionBasicResponse: Story = {
|
|
47
|
+
args: {
|
|
48
|
+
questionnaire: qOpenChoiceAnswerOptionBasic,
|
|
49
|
+
questionnaireResponse: qrOpenChoiceAnswerOptionBasicResponse
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const OpenChoiceAnswerValueSetBasic: Story = {
|
|
54
|
+
args: {
|
|
55
|
+
questionnaire: qOpenChoiceAnswerValueSetBasic
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const OpenChoiceAnswerValueSetBasicResponse: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
questionnaire: qOpenChoiceAnswerValueSetBasic,
|
|
62
|
+
questionnaireResponse: qrOpenChoiceAnswerValueSetBasicResponse
|
|
63
|
+
}
|
|
64
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qQuantityBasic } from '../assets/questionnaires';
|
|
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: 'Component/ItemType/Quantity',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 QuantityBasic: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qQuantityBasic
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qReferenceBasic } from '../assets/questionnaires';
|
|
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: 'Component/ItemType/Reference',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 ReferenceBasic: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qReferenceBasic
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qrStringBasicResponse, qStringBasic, qStringCalculation } from '../assets/questionnaires';
|
|
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: 'Component/ItemType/String',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 StringBasic: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qStringBasic
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export const StringBasicResponse: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
questionnaire: qStringBasic,
|
|
43
|
+
questionnaireResponse: qrStringBasicResponse
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const StringCalculation: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
questionnaire: qStringCalculation
|
|
50
|
+
}
|
|
51
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qrTextBasicResponse, qTextBasic, qTextCalculation } from '../assets/questionnaires';
|
|
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: 'Component/ItemType/Text',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 TextBasic: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qTextBasic
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export const TextBasicResponse: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
questionnaire: qTextBasic,
|
|
43
|
+
questionnaireResponse: qrTextBasicResponse
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const TextCalculation: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
questionnaire: qTextCalculation
|
|
50
|
+
}
|
|
51
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qTimeBasic } from '../assets/questionnaires';
|
|
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: 'Component/ItemType/Time',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 TimeBasic: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qTimeBasic
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qStringBasic } from '../assets/questionnaires';
|
|
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: 'Component/ItemType/Url',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 UrlBasic: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qStringBasic
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qEntryFormat, qShortText } from '../assets/questionnaires';
|
|
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: 'Component/SDC/8.1.3 Advanced Additional Display Content',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 EntryFormat: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qEntryFormat
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const ShortText: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
questionnaire: qShortText
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import { qChoiceOrientation, qItemControl, qSliderStepValue } from '../assets/questionnaires';
|
|
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: 'Component/SDC/8.1.2 Advanced Control Appearance',
|
|
25
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 ItemControl: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
questionnaire: qItemControl
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const ChoiceOrientation: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
questionnaire: qChoiceOrientation
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const SliderStepValue: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
questionnaire: qSliderStepValue
|
|
50
|
+
}
|
|
51
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import {
|
|
21
|
+
qReadOnly,
|
|
22
|
+
qRepeatsAutocomplete,
|
|
23
|
+
qRepeatsCheckbox,
|
|
24
|
+
qRepeatsGroup,
|
|
25
|
+
qRepeatsGroupNested,
|
|
26
|
+
qRequired
|
|
27
|
+
} from '../assets/questionnaires';
|
|
28
|
+
|
|
29
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
30
|
+
const meta = {
|
|
31
|
+
title: 'Component/SDC/8.1.4 Advanced Other',
|
|
32
|
+
component: BuildFormWrapper,
|
|
33
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
34
|
+
tags: []
|
|
35
|
+
} satisfies Meta<typeof BuildFormWrapper>;
|
|
36
|
+
|
|
37
|
+
export default meta;
|
|
38
|
+
type Story = StoryObj<typeof meta>;
|
|
39
|
+
|
|
40
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
41
|
+
|
|
42
|
+
export const Required: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
questionnaire: qRequired
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const RepeatsAutocomplete: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
questionnaire: qRepeatsAutocomplete
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const RepeatsCheckbox: Story = {
|
|
55
|
+
args: {
|
|
56
|
+
questionnaire: qRepeatsCheckbox
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const RepeatsGroup: Story = {
|
|
61
|
+
args: {
|
|
62
|
+
questionnaire: qRepeatsGroup
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const RepeatsGroupNested: Story = {
|
|
67
|
+
args: {
|
|
68
|
+
questionnaire: qRepeatsGroupNested
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const ReadOnly: Story = {
|
|
73
|
+
args: {
|
|
74
|
+
questionnaire: qReadOnly
|
|
75
|
+
}
|
|
76
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
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 BuildFormWrapper from '../BuildFormWrapper';
|
|
20
|
+
import {
|
|
21
|
+
qDisplayCategoryInstructions,
|
|
22
|
+
qHidden,
|
|
23
|
+
qOpenLabel,
|
|
24
|
+
qRenderingXhtmlBooleanCheckboxItem,
|
|
25
|
+
qRenderingXhtmlDisplayListItem
|
|
26
|
+
} from '../assets/questionnaires';
|
|
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: 'Component/SDC/8.1.1 Advanced Text Appearance',
|
|
31
|
+
component: BuildFormWrapper,
|
|
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 BuildFormWrapper>;
|
|
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 RenderingXHTMLBooleanCheckbox: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
questionnaire: qRenderingXhtmlBooleanCheckboxItem
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const RenderingXHTMLDisplayList: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
questionnaire: qRenderingXhtmlDisplayListItem
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const DisplayCategoryInstructions: Story = {
|
|
54
|
+
args: {
|
|
55
|
+
questionnaire: qDisplayCategoryInstructions
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const OpenLabel: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
questionnaire: qOpenLabel
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const Hidden: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
questionnaire: qHidden
|
|
68
|
+
}
|
|
69
|
+
};
|