@aehrc/smart-forms-renderer 1.3.0 → 1.3.1
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/lib/components/FormComponents/GroupItem/GroupAccordion.d.ts +10 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.js +71 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.js.map +1 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.d.ts +1 -1
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.js +1 -1
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.js +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableView.js +1 -1
- package/lib/components/FormComponents/Tables/GroupTableView.js.map +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsible.js +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsible.js.map +1 -1
- package/lib/components/Renderer/FormBodyTabbed.js +38 -6
- package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
- package/lib/components/Tabs/FormBodyTabListWrapper.d.ts +1 -0
- package/lib/components/Tabs/FormBodyTabListWrapper.js +2 -2
- package/lib/components/Tabs/FormBodyTabListWrapper.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/FormComponents/GroupItem/GroupAccordion.styles.ts +1 -1
- package/src/components/FormComponents/GroupItem/GroupAccordion.tsx +93 -0
- package/src/components/FormComponents/GroupItem/GroupItemView.tsx +1 -1
- package/src/components/FormComponents/RepeatGroup/RepeatGroupView.tsx +1 -1
- package/src/components/FormComponents/Tables/GroupTableView.tsx +1 -1
- package/src/components/Renderer/FormBodySingleCollapsible.tsx +1 -1
- package/src/components/Renderer/FormBodyTabbed.tsx +48 -7
- package/src/components/Tabs/FormBodyTabListWrapper.tsx +3 -2
- package/src/hooks/index.ts +3 -0
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.d.ts +0 -7
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js +0 -26
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelText.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js +0 -63
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js +0 -53
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher copy.d.ts +0 -7
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher copy.js +0 -39
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher copy.js.map +0 -1
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.d.ts +0 -10
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js +0 -30
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js.map +0 -1
- package/lib/components/Iconify/Iconify.d.ts +0 -10
- package/lib/components/Iconify/Iconify.js +0 -26
- package/lib/components/Iconify/Iconify.js.map +0 -1
- package/lib/components/Renderer/FormBodyPage.d.ts +0 -9
- package/lib/components/Renderer/FormBodyPage.js +0 -43
- package/lib/components/Renderer/FormBodyPage.js.map +0 -1
- package/lib/components/Renderer/FormTitle.d.ts +0 -7
- package/lib/components/Renderer/FormTitle.js +0 -30
- package/lib/components/Renderer/FormTitle.js.map +0 -1
- package/lib/components/Renderer/FormTopLevelPage.d.ts +0 -9
- package/lib/components/Renderer/FormTopLevelPage.js +0 -29
- package/lib/components/Renderer/FormTopLevelPage.js.map +0 -1
- package/lib/hooks/useBooleanCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useBooleanCalculatedExpression.js +0 -52
- package/lib/hooks/useBooleanCalculatedExpression.js.map +0 -1
- package/lib/hooks/useCalculatedExpressionAnimating.d.ts +0 -1
- package/lib/hooks/useCalculatedExpressionAnimating.js +0 -18
- package/lib/hooks/useCalculatedExpressionAnimating.js.map +0 -1
- package/lib/hooks/useDecimalCalculatedExpression.d.ts +0 -13
- package/lib/hooks/useDecimalCalculatedExpression.js +0 -58
- package/lib/hooks/useDecimalCalculatedExpression.js.map +0 -1
- package/lib/hooks/useInitialiseGroupTable.d.ts +0 -4
- package/lib/hooks/useInitialiseGroupTable.js +0 -36
- package/lib/hooks/useInitialiseGroupTable.js.map +0 -1
- package/lib/hooks/useIntegerCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useIntegerCalculatedExpression.js +0 -55
- package/lib/hooks/useIntegerCalculatedExpression.js.map +0 -1
- package/lib/hooks/useNumberInput.d.ts +0 -3
- package/lib/hooks/useNumberInput.js +0 -31
- package/lib/hooks/useNumberInput.js.map +0 -1
- package/lib/hooks/useRepeatAnswers.d.ts +0 -4
- package/lib/hooks/useRepeatAnswers.js +0 -34
- package/lib/hooks/useRepeatAnswers.js.map +0 -1
- package/lib/hooks/useRepeatGroups.d.ts +0 -4
- package/lib/hooks/useRepeatGroups.js +0 -34
- package/lib/hooks/useRepeatGroups.js.map +0 -1
- package/lib/hooks/useShowFeedback.d.ts +0 -11
- package/lib/hooks/useShowFeedback.js +0 -33
- package/lib/hooks/useShowFeedback.js.map +0 -1
- package/lib/hooks/useStringCalculatedExpression.d.ts +0 -14
- package/lib/hooks/useStringCalculatedExpression.js +0 -69
- package/lib/hooks/useStringCalculatedExpression.js.map +0 -1
- package/lib/hooks/useStringInput.d.ts +0 -3
- package/lib/hooks/useStringInput.js +0 -31
- package/lib/hooks/useStringInput.js.map +0 -1
- package/lib/interfaces/itemPath.interface.d.ts +0 -31
- package/lib/interfaces/itemPath.interface.js +0 -2
- package/lib/interfaces/itemPath.interface.js.map +0 -1
- package/lib/interfaces/repeatItem.interface.d.ts +0 -5
- package/lib/interfaces/repeatItem.interface.js +0 -2
- package/lib/interfaces/repeatItem.interface.js.map +0 -1
- package/lib/stores/rendererStylingStore.d.ts +0 -144
- package/lib/stores/rendererStylingStore.js +0 -68
- package/lib/stores/rendererStylingStore.js.map +0 -1
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.d.ts +0 -30
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.js +0 -46
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.js.map +0 -1
- package/lib/stories/storybookWrappers/index.d.ts +0 -2
- package/lib/stories/storybookWrappers/index.js +0 -18
- package/lib/stories/storybookWrappers/index.js.map +0 -1
- package/lib/stories/testUtils.d.ts +0 -23
- package/lib/stories/testUtils.js +0 -249
- package/lib/stories/testUtils.js.map +0 -1
- package/lib/theme/Theme.d.ts +0 -44
- package/lib/theme/Theme.js +0 -45
- package/lib/theme/Theme.js.map +0 -1
- package/lib/theme/customGlobalStyles.d.ts +0 -2
- package/lib/theme/customGlobalStyles.js +0 -61
- package/lib/theme/customGlobalStyles.js.map +0 -1
- package/lib/theme/overrides/Accordion.d.ts +0 -14
- package/lib/theme/overrides/Accordion.js +0 -32
- package/lib/theme/overrides/Accordion.js.map +0 -1
- package/lib/theme/overrides/Autocomplete.d.ts +0 -10
- package/lib/theme/overrides/Autocomplete.js +0 -28
- package/lib/theme/overrides/Autocomplete.js.map +0 -1
- package/lib/theme/overrides/Button.d.ts +0 -33
- package/lib/theme/overrides/Button.js +0 -52
- package/lib/theme/overrides/Button.js.map +0 -1
- package/lib/theme/overrides/Card.d.ts +0 -35
- package/lib/theme/overrides/Card.js +0 -49
- package/lib/theme/overrides/Card.js.map +0 -1
- package/lib/theme/overrides/Input.d.ts +0 -64
- package/lib/theme/overrides/Input.js +0 -81
- package/lib/theme/overrides/Input.js.map +0 -1
- package/lib/theme/overrides/Overrides.d.ts +0 -3
- package/lib/theme/overrides/Overrides.js +0 -29
- package/lib/theme/overrides/Overrides.js.map +0 -1
- package/lib/theme/overrides/Paper.d.ts +0 -12
- package/lib/theme/overrides/Paper.js +0 -31
- package/lib/theme/overrides/Paper.js.map +0 -1
- package/lib/theme/overrides/SpeedDial.d.ts +0 -16
- package/lib/theme/overrides/SpeedDial.js +0 -34
- package/lib/theme/overrides/SpeedDial.js.map +0 -1
- package/lib/theme/overrides/Table.d.ts +0 -12
- package/lib/theme/overrides/Table.js +0 -30
- package/lib/theme/overrides/Table.js.map +0 -1
- package/lib/theme/palette.d.ts +0 -27
- package/lib/theme/palette.js +0 -67
- package/lib/theme/palette.js.map +0 -1
- package/lib/theme/shadows.d.ts +0 -2
- package/lib/theme/shadows.js +0 -52
- package/lib/theme/shadows.js.map +0 -1
- package/lib/utils/answerExpression.d.ts +0 -18
- package/lib/utils/answerExpression.js +0 -133
- package/lib/utils/answerExpression.js.map +0 -1
- package/lib/utils/dayjsExtend.d.ts +0 -1
- package/lib/utils/dayjsExtend.js +0 -22
- package/lib/utils/dayjsExtend.js.map +0 -1
- package/lib/utils/dynamicValueSet.d.ts +0 -5
- package/lib/utils/dynamicValueSet.js +0 -96
- package/lib/utils/dynamicValueSet.js.map +0 -1
- package/lib/utils/fhirpathAsyncUtils/fhirpath-async.d.ts +0 -14
- package/lib/utils/fhirpathAsyncUtils/fhirpath-async.js +0 -639
- package/lib/utils/fhirpathAsyncUtils/fhirpath-async.js.map +0 -1
- package/lib/utils/fhirpathAsyncUtils/outcome-utils.d.ts +0 -3
- package/lib/utils/fhirpathAsyncUtils/outcome-utils.js +0 -41
- package/lib/utils/fhirpathAsyncUtils/outcome-utils.js.map +0 -1
- package/lib/utils/itemControl.d.ts +0 -97
- package/lib/utils/itemControl.js +0 -336
- package/lib/utils/itemControl.js.map +0 -1
- package/lib/utils/itemPath.d.ts +0 -57
- package/lib/utils/itemPath.js +0 -75
- package/lib/utils/itemPath.js.map +0 -1
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.d.ts +0 -2
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.js +0 -43
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.js.map +0 -1
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.d.ts +0 -3
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +0 -101
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +0 -1
- package/lib/utils/validateQuestionnaire.d.ts +0 -66
- package/lib/utils/validateQuestionnaire.js +0 -559
- package/lib/utils/validateQuestionnaire.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"itemPath.interface.js","sourceRoot":"","sources":["../../src/interfaces/itemPath.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repeatItem.interface.js","sourceRoot":"","sources":["../../src/interfaces/repeatItem.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import type { QuestionnaireItem } from 'fhir/r4';
|
|
2
|
-
import type { UseResponsiveProps } from '../hooks';
|
|
3
|
-
import type { Breakpoints } from '@mui/material';
|
|
4
|
-
/**
|
|
5
|
-
* RendererStyling interface
|
|
6
|
-
* Provides fine-grained control over the styling and behaviour of the renderer.
|
|
7
|
-
*
|
|
8
|
-
* @property requiredIndicatorPosition - Defines where the required asterisk (*) is placed relative to the label.
|
|
9
|
-
* - `"start"` (default): Asterisk appears before the label.
|
|
10
|
-
* - `"end"`: Asterisk appears after the label.
|
|
11
|
-
*
|
|
12
|
-
* @property itemResponsive - Controls responsive layout settings for item labels and fields.
|
|
13
|
-
* @property labelBreakpoints - Defines breakpoints for label width at different screen sizes.
|
|
14
|
-
* - Default: `{ xs: 12, md: 4 }`
|
|
15
|
-
* @property fieldBreakpoints - Defines breakpoints for field width at different screen sizes.
|
|
16
|
-
* - Default: `{ xs: 12, md: 8 }`
|
|
17
|
-
* @property columnGapPixels - Spacing (in pixels) between the label and the field.
|
|
18
|
-
* - Default: `32`
|
|
19
|
-
* @property rowGapPixels - Vertical spacing (in pixels) between stacked items.
|
|
20
|
-
* - Default: `4`
|
|
21
|
-
*
|
|
22
|
-
* @property showTabbedFormAt - Defines when the form should switch to a tabbed layout based on screen size.
|
|
23
|
-
* - Default: `{ query: 'up', start: 'md' }`
|
|
24
|
-
*
|
|
25
|
-
* @property tabListWidthOrResponsive - Configures the width of the tab list, either as a fixed number or responsive breakpoints.
|
|
26
|
-
* - Default: `{ tabListBreakpoints: { xs: 12, sm: 3, md: 3, lg: 2.75 }, tabContentBreakpoints: { xs: 12, sm: 9, md: 9, lg: 9.25 } }`
|
|
27
|
-
*
|
|
28
|
-
* @property textFieldWidth - Defines the default width for text input fields (in pixels).
|
|
29
|
-
* - Default: `320`
|
|
30
|
-
*
|
|
31
|
-
* @property inputsFlexGrow - Determines whether input fields should grow to fill available space.
|
|
32
|
-
* - `false` (default): Inputs maintain their default size.
|
|
33
|
-
* - `true`: Inputs expand to fill space.
|
|
34
|
-
*
|
|
35
|
-
* @property reverseBooleanYesNo - If `true`, swaps "Yes" and "No" options for boolean fields.
|
|
36
|
-
* - Default: `false`
|
|
37
|
-
*
|
|
38
|
-
* @property hideClearButton - If `true`, hides the clear button on input fields.
|
|
39
|
-
* - Default: `false`
|
|
40
|
-
*
|
|
41
|
-
* @property hideQuantityComparatorField - If `true`, hides the quantity comparator field.
|
|
42
|
-
* - Default: `false`
|
|
43
|
-
*
|
|
44
|
-
* @property enableWhenAsReadOnly - Determines whether fields hidden by `enableWhen` logic should still be shown as read-only.
|
|
45
|
-
* - Can be `true` (all fields affected) or a `Set<QuestionnaireItem['type']>` to specify types.
|
|
46
|
-
* - Default: `false`
|
|
47
|
-
*
|
|
48
|
-
* @property disablePageCardView - If `true`, disables the card-style layout for pages.
|
|
49
|
-
* - Default: `false`
|
|
50
|
-
*
|
|
51
|
-
* @property disablePageButtons - If `true`, hides navigation buttons for pages.
|
|
52
|
-
* - Default: `false`
|
|
53
|
-
*
|
|
54
|
-
* @property disableTabButtons - If `true`, hides navigation buttons for tabs.
|
|
55
|
-
* - Default: `false`
|
|
56
|
-
*
|
|
57
|
-
* @property readOnlyVisualStyle - If `true`, item.readOnly will result in form fields having MUI disabled property and styles (recommended from usability perspective). If `false`, item.readOnly will result in form fields having HTML readonly property (less stable, but recommended from accessibility perspective).
|
|
58
|
-
* - Default: `true`
|
|
59
|
-
*/
|
|
60
|
-
export interface RendererStyling {
|
|
61
|
-
readOnlyVisualStyle?: 'disabled' | 'readonly';
|
|
62
|
-
requiredIndicatorPosition?: 'start' | 'end';
|
|
63
|
-
itemResponsive?: {
|
|
64
|
-
labelBreakpoints: Partial<Breakpoints['values']>;
|
|
65
|
-
fieldBreakpoints: Partial<Breakpoints['values']>;
|
|
66
|
-
columnGapPixels: number;
|
|
67
|
-
rowGapPixels: number;
|
|
68
|
-
};
|
|
69
|
-
showTabbedFormAt?: UseResponsiveProps;
|
|
70
|
-
tabListWidthOrResponsive?: number | {
|
|
71
|
-
tabListBreakpoints: Partial<Breakpoints['values']>;
|
|
72
|
-
tabContentBreakpoints: Partial<Breakpoints['values']>;
|
|
73
|
-
};
|
|
74
|
-
textFieldWidth?: number;
|
|
75
|
-
inputsFlexGrow?: boolean;
|
|
76
|
-
reverseBooleanYesNo?: boolean;
|
|
77
|
-
hideClearButton?: boolean;
|
|
78
|
-
hideQuantityComparatorField?: boolean;
|
|
79
|
-
enableWhenAsReadOnly?: boolean | Set<QuestionnaireItem['type']>;
|
|
80
|
-
disablePageCardView?: boolean;
|
|
81
|
-
disablePageButtons?: boolean;
|
|
82
|
-
disableTabButtons?: boolean;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* RendererStylingStore properties and methods
|
|
86
|
-
*
|
|
87
|
-
* @author Sean Fong
|
|
88
|
-
*/
|
|
89
|
-
export interface RendererStylingStoreType {
|
|
90
|
-
readOnlyVisualStyle: 'disabled' | 'readonly';
|
|
91
|
-
requiredIndicatorPosition: 'start' | 'end';
|
|
92
|
-
itemResponsive: {
|
|
93
|
-
labelBreakpoints: Partial<Breakpoints['values']>;
|
|
94
|
-
fieldBreakpoints: Partial<Breakpoints['values']>;
|
|
95
|
-
columnGapPixels: number;
|
|
96
|
-
rowGapPixels: number;
|
|
97
|
-
};
|
|
98
|
-
tabListWidthOrResponsive: number | {
|
|
99
|
-
tabListBreakpoints: Partial<Breakpoints['values']>;
|
|
100
|
-
tabContentBreakpoints: Partial<Breakpoints['values']>;
|
|
101
|
-
};
|
|
102
|
-
showTabbedFormAt: UseResponsiveProps;
|
|
103
|
-
textFieldWidth: number;
|
|
104
|
-
inputsFlexGrow: boolean;
|
|
105
|
-
reverseBooleanYesNo: boolean;
|
|
106
|
-
hideClearButton: boolean;
|
|
107
|
-
hideQuantityComparatorField: boolean;
|
|
108
|
-
enableWhenAsReadOnly: boolean | Set<QuestionnaireItem['type']>;
|
|
109
|
-
disablePageCardView: boolean;
|
|
110
|
-
disablePageButtons: boolean;
|
|
111
|
-
disableTabButtons: boolean;
|
|
112
|
-
setRendererStyling: (params: RendererStyling) => void;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* @author Sean Fong
|
|
116
|
-
*/
|
|
117
|
-
export declare const rendererStylingStore: import("zustand/vanilla").StoreApi<RendererStylingStoreType>;
|
|
118
|
-
export declare const useRendererStylingStore: import("zustand/vanilla").StoreApi<RendererStylingStoreType> & {
|
|
119
|
-
use: {
|
|
120
|
-
readOnlyVisualStyle: () => "disabled" | "readonly";
|
|
121
|
-
requiredIndicatorPosition: () => "start" | "end";
|
|
122
|
-
itemResponsive: () => {
|
|
123
|
-
labelBreakpoints: Partial<Breakpoints["values"]>;
|
|
124
|
-
fieldBreakpoints: Partial<Breakpoints["values"]>;
|
|
125
|
-
columnGapPixels: number;
|
|
126
|
-
rowGapPixels: number;
|
|
127
|
-
};
|
|
128
|
-
tabListWidthOrResponsive: () => number | {
|
|
129
|
-
tabListBreakpoints: Partial<Breakpoints["values"]>;
|
|
130
|
-
tabContentBreakpoints: Partial<Breakpoints["values"]>;
|
|
131
|
-
};
|
|
132
|
-
showTabbedFormAt: () => UseResponsiveProps;
|
|
133
|
-
textFieldWidth: () => number;
|
|
134
|
-
inputsFlexGrow: () => boolean;
|
|
135
|
-
reverseBooleanYesNo: () => boolean;
|
|
136
|
-
hideClearButton: () => boolean;
|
|
137
|
-
hideQuantityComparatorField: () => boolean;
|
|
138
|
-
enableWhenAsReadOnly: () => boolean | Set<"string" | "boolean" | "group" | "display" | "question" | "decimal" | "integer" | "date" | "dateTime" | "time" | "text" | "url" | "choice" | "open-choice" | "attachment" | "reference" | "quantity">;
|
|
139
|
-
disablePageCardView: () => boolean;
|
|
140
|
-
disablePageButtons: () => boolean;
|
|
141
|
-
disableTabButtons: () => boolean;
|
|
142
|
-
setRendererStyling: () => (params: RendererStyling) => void;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 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
|
-
import { createStore } from 'zustand/vanilla';
|
|
18
|
-
import { createSelectors } from './selector';
|
|
19
|
-
/**
|
|
20
|
-
* @author Sean Fong
|
|
21
|
-
*/
|
|
22
|
-
export const rendererStylingStore = createStore()((set) => ({
|
|
23
|
-
readOnlyVisualStyle: 'disabled',
|
|
24
|
-
requiredIndicatorPosition: 'start',
|
|
25
|
-
itemResponsive: {
|
|
26
|
-
labelBreakpoints: { xs: 12, md: 4 },
|
|
27
|
-
fieldBreakpoints: { xs: 12, md: 8 },
|
|
28
|
-
columnGapPixels: 32,
|
|
29
|
-
rowGapPixels: 4
|
|
30
|
-
},
|
|
31
|
-
tabListWidthOrResponsive: {
|
|
32
|
-
tabListBreakpoints: { xs: 12, sm: 3, md: 3, lg: 2.75 },
|
|
33
|
-
tabContentBreakpoints: { xs: 12, sm: 9, md: 9, lg: 9.25 }
|
|
34
|
-
},
|
|
35
|
-
showTabbedFormAt: { query: 'up', start: 'md' },
|
|
36
|
-
textFieldWidth: 320,
|
|
37
|
-
inputsFlexGrow: false,
|
|
38
|
-
reverseBooleanYesNo: false,
|
|
39
|
-
hideClearButton: false,
|
|
40
|
-
hideQuantityComparatorField: false,
|
|
41
|
-
enableWhenAsReadOnly: false,
|
|
42
|
-
disablePageCardView: false,
|
|
43
|
-
disablePageButtons: false,
|
|
44
|
-
disableTabButtons: false,
|
|
45
|
-
setRendererStyling: (params) => {
|
|
46
|
-
set((state) => {
|
|
47
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
48
|
-
return ({
|
|
49
|
-
readOnlyVisualStyle: (_a = params.readOnlyVisualStyle) !== null && _a !== void 0 ? _a : state.readOnlyVisualStyle,
|
|
50
|
-
requiredIndicatorPosition: (_b = params.requiredIndicatorPosition) !== null && _b !== void 0 ? _b : state.requiredIndicatorPosition,
|
|
51
|
-
itemResponsive: (_c = params.itemResponsive) !== null && _c !== void 0 ? _c : state.itemResponsive,
|
|
52
|
-
tabListWidthOrResponsive: (_d = params.tabListWidthOrResponsive) !== null && _d !== void 0 ? _d : state.tabListWidthOrResponsive,
|
|
53
|
-
showTabbedFormAt: (_e = params.showTabbedFormAt) !== null && _e !== void 0 ? _e : state.showTabbedFormAt,
|
|
54
|
-
textFieldWidth: (_f = params.textFieldWidth) !== null && _f !== void 0 ? _f : state.textFieldWidth,
|
|
55
|
-
inputsFlexGrow: (_g = params.inputsFlexGrow) !== null && _g !== void 0 ? _g : state.inputsFlexGrow,
|
|
56
|
-
reverseBooleanYesNo: (_h = params.reverseBooleanYesNo) !== null && _h !== void 0 ? _h : state.reverseBooleanYesNo,
|
|
57
|
-
hideClearButton: (_j = params.hideClearButton) !== null && _j !== void 0 ? _j : state.hideClearButton,
|
|
58
|
-
hideQuantityComparatorField: (_k = params.hideQuantityComparatorField) !== null && _k !== void 0 ? _k : state.hideQuantityComparatorField,
|
|
59
|
-
enableWhenAsReadOnly: (_l = params.enableWhenAsReadOnly) !== null && _l !== void 0 ? _l : state.enableWhenAsReadOnly,
|
|
60
|
-
disablePageCardView: (_m = params.disablePageCardView) !== null && _m !== void 0 ? _m : state.disablePageCardView,
|
|
61
|
-
disablePageButtons: (_o = params.disablePageButtons) !== null && _o !== void 0 ? _o : state.disablePageButtons,
|
|
62
|
-
disableTabButtons: (_p = params.disableTabButtons) !== null && _p !== void 0 ? _p : state.disableTabButtons
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}));
|
|
67
|
-
export const useRendererStylingStore = createSelectors(rendererStylingStore);
|
|
68
|
-
//# sourceMappingURL=rendererStylingStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rendererStylingStore.js","sourceRoot":"","sources":["../../src/stores/rendererStylingStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyH7C;;GAEG;AACH,MAAM,CAAC,MAAM,oBA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KAAK,CAAC,cAAc;gBAC7D,wBAAwB,EAAE,MAAA,MAAM,CAAC,wBAAwB,mCAAI,KAAK,CAAC,wBAAwB;gBAC3F,gBAAgB,EAAE,MAAA,MAAM,CAAC,gBAAgB,mCAAI,KAAK,CAAC,gBAAgB;gBACnE,cAAc,EAAE,MAAA,MAAM,CAAC,cAAc,mCAAI,KAAK,CAAC,cAAc;gBAC7D,cAAc,EAAE,MAAA,MAAM,CAAC,cAAc,mCAAI,KAAK,CAAC,cAAc;gBAC7D,mBAAmB,EAAE,MAAA,MAAM,CAAC,mBAAmB,mCAAI,KAAK,CAAC,mBAAmB;gBAC5E,eAAe,EAAE,MAAA,MAAM,CAAC,eAAe,mCAAI,KAAK,CAAC,eAAe;gBAChE,2BAA2B,EACzB,MAAA,MAAM,CAAC,2BAA2B,mCAAI,KAAK,CAAC,2BAA2B;gBACzE,oBAAoB,EAAE,MAAA,MAAM,CAAC,oBAAoB,mCAAI,KAAK,CAAC,oBAAoB;gBAC/E,mBAAmB,EAAE,MAAA,MAAM,CAAC,mBAAmB,mCAAI,KAAK,CAAC,mBAAmB;gBAC5E,kBAAkB,EAAE,MAAA,MAAM,CAAC,kBAAkB,mCAAI,KAAK,CAAC,kBAAkB;gBACzE,iBAAiB,EAAE,MAAA,MAAM,CAAC,iBAAiB,mCAAI,KAAK,CAAC,iBAAiB;aACvE,CAAC,CAAA;SAAA,CAAC,CAAC;IACN,CAAC;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4';
|
|
2
|
-
import type Client from 'fhirclient/lib/Client';
|
|
3
|
-
export interface InitialiseFormWrapperProps {
|
|
4
|
-
questionnaire: Questionnaire;
|
|
5
|
-
questionnaireResponse?: QuestionnaireResponse;
|
|
6
|
-
readOnly?: boolean;
|
|
7
|
-
terminologyServerUrl?: string;
|
|
8
|
-
additionalVariables?: Record<string, any>;
|
|
9
|
-
fhirClient?: Client;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* This is a one-to-one replacement for the SmartFormsRenderer for demo purposes.
|
|
13
|
-
* Instead of using this React component, define your own wrapper component that uses the BaseRenderer directly.
|
|
14
|
-
* Things to note:
|
|
15
|
-
* - It is required to wrap the BaseRenderer with the QueryClientProvider to make requests.
|
|
16
|
-
* - You can wrap the BaseRenderer with the RendererThemeProvider to apply the default renderer theme used in Smart Forms. Optionally, you can define your own ThemeProvider https://mui.com/material-ui/customization/theming/.
|
|
17
|
-
* - Make your buildForm() call in a button click or other event handler. Alternatively, you can use the useInitialiseForm hook to initialise the form.
|
|
18
|
-
* - Make your own initialiseFhirClient() call in a button click or other event handler. Alternatively, you can use the useInitialiseForm hook to initialise the form.
|
|
19
|
-
* - The initialised FHIRClient is only used for further FHIR calls. It does not provide pre-population capabilities.
|
|
20
|
-
*
|
|
21
|
-
* For button click usage examples of buildForm(), see:
|
|
22
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/BuildFormButtonTesterWrapperForStorybook.tsx
|
|
23
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/BuildFormButtonForStorybook.tsx
|
|
24
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/PrePopWrapperForStorybook.tsx
|
|
25
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/PrePopButtonForStorybook.tsx
|
|
26
|
-
*
|
|
27
|
-
* @author Sean Fong
|
|
28
|
-
*/
|
|
29
|
-
declare function InitialiseFormWrapperForStorybook(props: InitialiseFormWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export default InitialiseFormWrapperForStorybook;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BaseRenderer } from '../../components';
|
|
3
|
-
import { QueryClientProvider } from '@tanstack/react-query';
|
|
4
|
-
import useRendererQueryClient from '../../hooks/useRendererQueryClient';
|
|
5
|
-
import useInitialiseForm from '../../hooks/useInitialiseForm';
|
|
6
|
-
import Box from '@mui/material/Box';
|
|
7
|
-
import CircularProgress from '@mui/material/CircularProgress';
|
|
8
|
-
import Typography from '@mui/material/Typography';
|
|
9
|
-
import RendererThemeProvider from '../../theme/RendererThemeProvider';
|
|
10
|
-
/**
|
|
11
|
-
* This is a one-to-one replacement for the SmartFormsRenderer for demo purposes.
|
|
12
|
-
* Instead of using this React component, define your own wrapper component that uses the BaseRenderer directly.
|
|
13
|
-
* Things to note:
|
|
14
|
-
* - It is required to wrap the BaseRenderer with the QueryClientProvider to make requests.
|
|
15
|
-
* - You can wrap the BaseRenderer with the RendererThemeProvider to apply the default renderer theme used in Smart Forms. Optionally, you can define your own ThemeProvider https://mui.com/material-ui/customization/theming/.
|
|
16
|
-
* - Make your buildForm() call in a button click or other event handler. Alternatively, you can use the useInitialiseForm hook to initialise the form.
|
|
17
|
-
* - Make your own initialiseFhirClient() call in a button click or other event handler. Alternatively, you can use the useInitialiseForm hook to initialise the form.
|
|
18
|
-
* - The initialised FHIRClient is only used for further FHIR calls. It does not provide pre-population capabilities.
|
|
19
|
-
*
|
|
20
|
-
* For button click usage examples of buildForm(), see:
|
|
21
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/BuildFormButtonTesterWrapperForStorybook.tsx
|
|
22
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/BuildFormButtonForStorybook.tsx
|
|
23
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/PrePopWrapperForStorybook.tsx
|
|
24
|
-
* - https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/storybookWrappers/PrePopButtonForStorybook.tsx
|
|
25
|
-
*
|
|
26
|
-
* @author Sean Fong
|
|
27
|
-
*/
|
|
28
|
-
function InitialiseFormWrapperForStorybook(props) {
|
|
29
|
-
const { questionnaire, questionnaireResponse, readOnly, terminologyServerUrl, additionalVariables, fhirClient } = props;
|
|
30
|
-
// The renderer requires a @tanstack/react-query QueryClientProvider to make requests
|
|
31
|
-
const queryClient = useRendererQueryClient();
|
|
32
|
-
/**
|
|
33
|
-
* The useInitialiseForm hook provides initialisation logic for the form
|
|
34
|
-
* Alternatively (and recommended to do so), you can initialise your form via a button click or other event handler.
|
|
35
|
-
*
|
|
36
|
-
* @see {@link https://github.com/aehrc/smart-forms/blob/main/packages/smart-forms-renderer/src/stories/BuildFormButtonForStorybook.tsx} for button click usage examples.
|
|
37
|
-
*/
|
|
38
|
-
const isInitialising = useInitialiseForm(questionnaire, questionnaireResponse, readOnly, terminologyServerUrl, additionalVariables, fhirClient);
|
|
39
|
-
// Free feel to customise your loading animation here
|
|
40
|
-
if (isInitialising) {
|
|
41
|
-
return (_jsxs(Box, { display: "flex", alignItems: "center", columnGap: 2, children: [_jsx(CircularProgress, {}), _jsx(Typography, { children: "Loading questionnaire..." })] }));
|
|
42
|
-
}
|
|
43
|
-
return (_jsx(RendererThemeProvider, { children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(BaseRenderer, {}) }) }));
|
|
44
|
-
}
|
|
45
|
-
export default InitialiseFormWrapperForStorybook;
|
|
46
|
-
//# sourceMappingURL=InitialiseFormWrapperForStorybook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InitialiseFormWrapperForStorybook.js","sourceRoot":"","sources":["../../../src/stories/storybookWrappers/InitialiseFormWrapperForStorybook.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAExE,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,qBAAqB,MAAM,mCAAmC,CAAC;AAWtE;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAS,iCAAiC,CAAC,KAAiC;IAC1E,MAAM,EACJ,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACX,GAAG,KAAK,CAAC;IAEV,qFAAqF;IACrF,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAC;IAE7C;;;;;OAKG;IACH,MAAM,cAAc,GAAG,iBAAiB,CACtC,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,CACX,CAAC;IAEF,qDAAqD;IACrD,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CACL,MAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,aAClD,KAAC,gBAAgB,KAAG,EACpB,KAAC,UAAU,2CAAsC,IAC7C,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,qBAAqB,cACpB,KAAC,mBAAmB,IAAC,MAAM,EAAE,WAAW,YACtC,KAAC,YAAY,KAAG,GACI,GACA,CACzB,CAAC;AACJ,CAAC;AAED,eAAe,iCAAiC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 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
|
-
export { default as InitialiseFormWrapperForStorybook } from './InitialiseFormWrapperForStorybook';
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/storybookWrappers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Extension, Questionnaire, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from 'fhir/r4';
|
|
2
|
-
export declare function getAnswers(linkId: string): Promise<any[]>;
|
|
3
|
-
export declare function getGroupAnswers(groupLinkid: string, answerLinkid: string): Promise<any[]>;
|
|
4
|
-
export declare function questionnaireFactory(items: QuestionnaireItem[]): Questionnaire;
|
|
5
|
-
export declare function qrFactory(items: QuestionnaireResponseItem[]): QuestionnaireResponse;
|
|
6
|
-
export declare function itemControlExtFactory(code: string): Extension;
|
|
7
|
-
export declare function openLabelExtFactory(text: string): Extension;
|
|
8
|
-
export declare function inputText(canvasElement: HTMLElement, linkId: string, text: string | boolean | number): Promise<void>;
|
|
9
|
-
export declare function checkCheckBox(canvasElement: HTMLElement, linkId: string): Promise<void>;
|
|
10
|
-
export declare function inputFile(canvasElement: HTMLElement, linkId: string, files: File | File[], url: string, filename: string): Promise<void>;
|
|
11
|
-
export declare function inputDate(canvasElement: HTMLElement, linkId: string, text: string | boolean): Promise<void>;
|
|
12
|
-
export declare function inputTime(canvasElement: HTMLElement, linkId: string, text: string | boolean): Promise<void>;
|
|
13
|
-
export declare function inputReference(canvasElement: HTMLElement, linkId: string, text: string | boolean): Promise<void>;
|
|
14
|
-
export declare function inputDecimal(canvasElement: HTMLElement, linkId: string, text: number): Promise<void>;
|
|
15
|
-
export declare function inputUrl(canvasElement: HTMLElement, linkId: string, text: string): Promise<void>;
|
|
16
|
-
export declare function inputInteger(canvasElement: HTMLElement, linkId: string, text: number): Promise<void>;
|
|
17
|
-
export declare function inputDateTime(canvasElement: HTMLElement, linkId: string, date: string, time: string, amPm: string): Promise<void>;
|
|
18
|
-
export declare function checkRadioOption(canvasElement: HTMLElement, linkId: string, text: string): Promise<void>;
|
|
19
|
-
export declare function getInputText(canvasElement: HTMLElement, linkId: string): Promise<string>;
|
|
20
|
-
export declare function chooseSelectOption(canvasElement: HTMLElement, linkId: string, optionLabel: string): Promise<void>;
|
|
21
|
-
export declare function chooseQuantityOption(canvasElement: HTMLElement, linkId: string, quantity: number | string, quantityComparator?: string): Promise<void>;
|
|
22
|
-
export declare function findByLinkIdOrLabel(canvasElement: HTMLElement, linkId: string): Promise<HTMLElement>;
|
|
23
|
-
export declare function inputOpenChoiceOtherText(canvasElement: HTMLElement, linkId: string, text: string): Promise<void>;
|
package/lib/stories/testUtils.js
DELETED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { evaluate } from 'fhirpath';
|
|
11
|
-
import { questionnaireResponseStore } from '../stores';
|
|
12
|
-
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
|
13
|
-
import { userEvent } from '@testing-library/user-event';
|
|
14
|
-
export function getAnswers(linkId) {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const qr = questionnaireResponseStore.getState().updatableResponse;
|
|
17
|
-
const result = yield evaluate(qr, `QuestionnaireResponse.item.where(linkId='${linkId}').answer`);
|
|
18
|
-
return result;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
export function getGroupAnswers(groupLinkid, answerLinkid) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const qr = questionnaireResponseStore.getState().updatableResponse;
|
|
24
|
-
const result = yield evaluate(qr, groupLinkid
|
|
25
|
-
? `QuestionnaireResponse.item.where(linkId='${groupLinkid}').item.where(linkId='${answerLinkid}').answer`
|
|
26
|
-
: `QuestionnaireResponse.item.where(linkId='${answerLinkid}').answer`);
|
|
27
|
-
return result;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
export function questionnaireFactory(items) {
|
|
31
|
-
return {
|
|
32
|
-
resourceType: 'Questionnaire',
|
|
33
|
-
status: 'active',
|
|
34
|
-
item: items
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export function qrFactory(items) {
|
|
38
|
-
return {
|
|
39
|
-
resourceType: 'QuestionnaireResponse',
|
|
40
|
-
status: 'completed',
|
|
41
|
-
item: items
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export function itemControlExtFactory(code) {
|
|
45
|
-
return {
|
|
46
|
-
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
47
|
-
valueCodeableConcept: {
|
|
48
|
-
coding: [
|
|
49
|
-
{
|
|
50
|
-
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
51
|
-
code: code
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export function openLabelExtFactory(text) {
|
|
58
|
-
return {
|
|
59
|
-
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel',
|
|
60
|
-
valueString: text
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export function inputText(canvasElement, linkId, text) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
var _a;
|
|
66
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
67
|
-
const input = (_a = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('input')) !== null && _a !== void 0 ? _a : questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('textarea');
|
|
68
|
-
if (!input) {
|
|
69
|
-
throw new Error(`Input or textarea was not found inside ${`[data-linkid=${linkId}] block`}`);
|
|
70
|
-
}
|
|
71
|
-
fireEvent.change(input, { target: { value: text } });
|
|
72
|
-
// Here we await for debounced store update
|
|
73
|
-
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
export function checkCheckBox(canvasElement, linkId) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
var _a;
|
|
79
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
80
|
-
const input = (_a = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('input')) !== null && _a !== void 0 ? _a : questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('textarea');
|
|
81
|
-
if (!input) {
|
|
82
|
-
throw new Error(`Input or textarea was not found inside ${`[data-linkid=${linkId}] block`}`);
|
|
83
|
-
}
|
|
84
|
-
fireEvent.click(input);
|
|
85
|
-
// Here we await for debounced store update
|
|
86
|
-
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
export function inputFile(canvasElement, linkId, files, url, filename) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
92
|
-
const input = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('input');
|
|
93
|
-
const textareaUrl = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector(`textarea[data-test="q-item-attachment-url"]`);
|
|
94
|
-
const textareaName = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector(`textarea[data-test="q-item-attachment-file-name"]`);
|
|
95
|
-
if (!input) {
|
|
96
|
-
throw new Error(`File input was not found inside [data-linkid=${linkId}] block`);
|
|
97
|
-
}
|
|
98
|
-
if (!textareaUrl) {
|
|
99
|
-
throw new Error(`File input was not found inside [data-linkid="URL"] block`);
|
|
100
|
-
}
|
|
101
|
-
if (!textareaName) {
|
|
102
|
-
throw new Error(`File input was not found inside [data-linkid="File name (optional)"] block`);
|
|
103
|
-
}
|
|
104
|
-
const fileList = Array.isArray(files) ? files : [files];
|
|
105
|
-
yield userEvent.upload(input, fileList);
|
|
106
|
-
fireEvent.change(textareaUrl, { target: { value: url } });
|
|
107
|
-
fireEvent.change(textareaName, { target: { value: filename } });
|
|
108
|
-
// Here we await for debounced store update
|
|
109
|
-
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
export function inputDate(canvasElement, linkId, text) {
|
|
113
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
return yield inputText(canvasElement, linkId, text);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
export function inputTime(canvasElement, linkId, text) {
|
|
118
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
-
return yield inputText(canvasElement, linkId, text);
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
export function inputReference(canvasElement, linkId, text) {
|
|
123
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
return yield inputText(canvasElement, linkId, text);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
export function inputDecimal(canvasElement, linkId, text) {
|
|
128
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
return yield inputText(canvasElement, linkId, text);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
export function inputUrl(canvasElement, linkId, text) {
|
|
133
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
-
return yield inputText(canvasElement, linkId, text);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
export function inputInteger(canvasElement, linkId, text) {
|
|
138
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
-
return yield inputText(canvasElement, linkId, text);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
export function inputDateTime(canvasElement, linkId, date, time, amPm) {
|
|
143
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
145
|
-
const inputDate = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('div[data-test="date"] input');
|
|
146
|
-
const inputTime = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('div[data-test="time"] input');
|
|
147
|
-
const inputAmPm = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('div[data-test="ampm"] input');
|
|
148
|
-
if (!inputTime) {
|
|
149
|
-
throw new Error(`Input or textarea was not found inside ${`[data-linkid=${linkId}] block`}`);
|
|
150
|
-
}
|
|
151
|
-
if (!inputDate) {
|
|
152
|
-
throw new Error(`Input or textarea was not found inside ${`[data-linkid=${linkId}] block`}`);
|
|
153
|
-
}
|
|
154
|
-
if (!inputAmPm) {
|
|
155
|
-
throw new Error(`Input or textarea was not found inside ${`[data-linkid=${linkId}] block`}`);
|
|
156
|
-
}
|
|
157
|
-
fireEvent.change(inputDate, { target: { value: date } });
|
|
158
|
-
fireEvent.change(inputTime, { target: { value: time } });
|
|
159
|
-
fireEvent.change(inputAmPm, { target: { value: amPm } });
|
|
160
|
-
// Here we await for debounced store update
|
|
161
|
-
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
export function checkRadioOption(canvasElement, linkId, text) {
|
|
165
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
167
|
-
const radio = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector(`span[data-test="radio-single-${text}"] input`);
|
|
168
|
-
if (!radio) {
|
|
169
|
-
throw new Error(`Input or textarea was not found inside ${`[data-linkid=${linkId}] block`}`);
|
|
170
|
-
}
|
|
171
|
-
fireEvent.click(radio);
|
|
172
|
-
// Here we await for debounced store update
|
|
173
|
-
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
export function getInputText(canvasElement, linkId) {
|
|
177
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
-
var _a;
|
|
179
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
180
|
-
const input = (_a = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('input')) !== null && _a !== void 0 ? _a : questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('textarea');
|
|
181
|
-
if (!input) {
|
|
182
|
-
throw new Error(`Input or textarea was not found inside ${`[data-linkid=${linkId}] block`}`);
|
|
183
|
-
}
|
|
184
|
-
return input.value;
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
export function chooseSelectOption(canvasElement, linkId, optionLabel) {
|
|
188
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
190
|
-
const input = questionElement.querySelector('input, textarea');
|
|
191
|
-
if (!input) {
|
|
192
|
-
throw new Error(`There is no input inside ${linkId}`);
|
|
193
|
-
}
|
|
194
|
-
fireEvent.focus(input);
|
|
195
|
-
fireEvent.keyDown(input, { key: 'ArrowDown', code: 'ArrowDown' });
|
|
196
|
-
const option = yield screen.findByText(optionLabel);
|
|
197
|
-
fireEvent.click(option);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
export function chooseQuantityOption(canvasElement, linkId, quantity, quantityComparator) {
|
|
201
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
203
|
-
const inputComaparator = questionElement.querySelector('div[data-test="q-item-quantity-comparator"] input');
|
|
204
|
-
const inputWeight = questionElement.querySelector('div[data-test="q-item-quantity-field"] input');
|
|
205
|
-
if (!inputComaparator) {
|
|
206
|
-
throw new Error(`There is no input inside ${linkId}`);
|
|
207
|
-
}
|
|
208
|
-
if (!inputWeight) {
|
|
209
|
-
throw new Error(`There is no input inside ${linkId}`);
|
|
210
|
-
}
|
|
211
|
-
fireEvent.focus(inputComaparator);
|
|
212
|
-
fireEvent.keyDown(inputComaparator, { key: 'ArrowDown', code: 'ArrowDown' });
|
|
213
|
-
if (quantityComparator) {
|
|
214
|
-
const option = yield screen.findByText(quantityComparator);
|
|
215
|
-
fireEvent.click(option);
|
|
216
|
-
fireEvent.change(inputComaparator, { target: { value: quantityComparator } });
|
|
217
|
-
}
|
|
218
|
-
fireEvent.change(inputWeight, { target: { value: quantity } });
|
|
219
|
-
// Here we await for debounced store update
|
|
220
|
-
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
export function findByLinkIdOrLabel(canvasElement, linkId) {
|
|
224
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
-
const selectorByLinkId = `[data-linkid="${linkId}"]`;
|
|
226
|
-
const selectorByLabel = `[data-label="${linkId}"]`;
|
|
227
|
-
return yield waitFor(() => {
|
|
228
|
-
var _a;
|
|
229
|
-
const el = (_a = canvasElement.querySelector(selectorByLinkId)) !== null && _a !== void 0 ? _a : canvasElement.querySelector(selectorByLabel);
|
|
230
|
-
if (!el) {
|
|
231
|
-
throw new Error(`Element with selectors "${selectorByLinkId}" or "${selectorByLabel}" not found`);
|
|
232
|
-
}
|
|
233
|
-
return el;
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
export function inputOpenChoiceOtherText(canvasElement, linkId, text) {
|
|
238
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
-
const questionElement = yield findByLinkIdOrLabel(canvasElement, linkId);
|
|
240
|
-
const textarea = questionElement === null || questionElement === void 0 ? void 0 : questionElement.querySelector('div[data-test="q-item-radio-open-label-box"] textarea');
|
|
241
|
-
if (!textarea) {
|
|
242
|
-
throw new Error(`Input or textarea was not found inside ${`[data-test=${linkId}] block`}`);
|
|
243
|
-
}
|
|
244
|
-
fireEvent.change(textarea, { target: { value: text } });
|
|
245
|
-
// Here we await for debounced store update
|
|
246
|
-
yield new Promise((resolve) => setTimeout(resolve, 500));
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
//# sourceMappingURL=testUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../src/stories/testUtils.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAQvD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,MAAM,UAAgB,UAAU,CAAC,MAAc;;QAC7C,MAAM,EAAE,GAAG,0BAA0B,CAAC,QAAQ,EAAE,CAAC,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