@aehrc/smart-forms-renderer 0.31.4 → 0.31.5
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/Renderer/BaseRenderer.d.ts +1 -1
- package/lib/components/Renderer/BaseRenderer.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/stories/StorybookWrappers/InitialiseFormWrapperForStorybook.d.ts +1 -1
- package/lib/stories/StorybookWrappers/index.d.ts +1 -0
- package/lib/stories/StorybookWrappers/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Renderer/BaseRenderer.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/stories/storybookWrappers/InitialiseFormWrapperForStorybook.tsx +1 -1
- package/src/stories/storybookWrappers/index.ts +1 -0
- package/src/stories/testing/BuildFormButtonTesterWrapper.stories.tsx +8 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Main component of the form-rendering engine.
|
|
4
|
-
* Renders the Questionnaire and QuestionnaireResponse defined in the state management
|
|
4
|
+
* Renders the Questionnaire and QuestionnaireResponse defined in the state management stores QuestionnaireStore and QuestionnaireResponseStore respectively.
|
|
5
5
|
* Use buildForm() in your wrapping component or in an event handler to initialise the form.
|
|
6
6
|
*
|
|
7
7
|
* @author Sean Fong
|
|
@@ -24,7 +24,7 @@ import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem';
|
|
|
24
24
|
import { updateQrItemsInGroup } from '../../utils/qrItem';
|
|
25
25
|
/**
|
|
26
26
|
* Main component of the form-rendering engine.
|
|
27
|
-
* Renders the Questionnaire and QuestionnaireResponse defined in the state management
|
|
27
|
+
* Renders the Questionnaire and QuestionnaireResponse defined in the state management stores QuestionnaireStore and QuestionnaireResponseStore respectively.
|
|
28
28
|
* Use buildForm() in your wrapping component or in an event handler to initialise the form.
|
|
29
29
|
*
|
|
30
30
|
* @author Sean Fong
|
package/lib/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export { useHidden, useBuildForm, useRendererQueryClient } from './hooks';
|
|
|
7
7
|
export type { ItemToRepopulate } from './utils';
|
|
8
8
|
export { buildForm, destroyForm, getResponse, removeEmptyAnswersFromResponse, isSpecificItemControl, isRepeatItemAndNotCheckbox, initialiseQuestionnaireResponse, generateItemsToRepopulate, repopulateResponse } from './utils';
|
|
9
9
|
export { RendererThemeProvider } from './theme';
|
|
10
|
+
export type { InitialiseFormWrapperProps } from './stories/storybookWrappers';
|
|
10
11
|
export { InitialiseFormWrapperForStorybook } from './stories/storybookWrappers';
|
package/lib/index.js
CHANGED
|
@@ -5,6 +5,5 @@ export { useHidden, useBuildForm, useRendererQueryClient } from './hooks';
|
|
|
5
5
|
export { buildForm, destroyForm, getResponse, removeEmptyAnswersFromResponse, isSpecificItemControl, isRepeatItemAndNotCheckbox, initialiseQuestionnaireResponse, generateItemsToRepopulate, repopulateResponse } from './utils';
|
|
6
6
|
// theme provider exports
|
|
7
7
|
export { RendererThemeProvider } from './theme';
|
|
8
|
-
// wrapper exports - only for smartforms.csiro.au/standalone use
|
|
9
8
|
export { InitialiseFormWrapperForStorybook } from './stories/storybookWrappers';
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AAStB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAElB,gBAAgB;AAChB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAI1E,OAAO,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,8BAA8B,EAC9B,qBAAqB,EACrB,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,yBAAyB;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AAStB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAElB,gBAAgB;AAChB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAI1E,OAAO,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,8BAA8B,EAC9B,qBAAqB,EACrB,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,yBAAyB;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAIhD,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4';
|
|
3
3
|
import type Client from 'fhirclient/lib/Client';
|
|
4
|
-
interface InitialiseFormWrapperProps {
|
|
4
|
+
export interface InitialiseFormWrapperProps {
|
|
5
5
|
questionnaire: Questionnaire;
|
|
6
6
|
questionnaireResponse?: QuestionnaireResponse;
|
|
7
7
|
readOnly?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/storybookWrappers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
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"}
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ import type { QrRepeatGroup } from '../../interfaces/repeatGroup.interface';
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Main component of the form-rendering engine.
|
|
31
|
-
* Renders the Questionnaire and QuestionnaireResponse defined in the state management
|
|
31
|
+
* Renders the Questionnaire and QuestionnaireResponse defined in the state management stores QuestionnaireStore and QuestionnaireResponseStore respectively.
|
|
32
32
|
* Use buildForm() in your wrapping component or in an event handler to initialise the form.
|
|
33
33
|
*
|
|
34
34
|
* @author Sean Fong
|
package/src/index.ts
CHANGED
|
@@ -53,4 +53,5 @@ export {
|
|
|
53
53
|
export { RendererThemeProvider } from './theme';
|
|
54
54
|
|
|
55
55
|
// wrapper exports - only for smartforms.csiro.au/standalone use
|
|
56
|
+
export type { InitialiseFormWrapperProps } from './stories/storybookWrappers';
|
|
56
57
|
export { InitialiseFormWrapperForStorybook } from './stories/storybookWrappers';
|
|
@@ -28,7 +28,7 @@ import Box from '@mui/material/Box';
|
|
|
28
28
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
29
29
|
import Typography from '@mui/material/Typography';
|
|
30
30
|
|
|
31
|
-
interface InitialiseFormWrapperProps {
|
|
31
|
+
export interface InitialiseFormWrapperProps {
|
|
32
32
|
questionnaire: Questionnaire;
|
|
33
33
|
questionnaireResponse?: QuestionnaireResponse;
|
|
34
34
|
readOnly?: boolean;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
19
19
|
import BuildFormButtonTesterWrapperForStorybook from '../storybookWrappers/BuildFormButtonTesterWrapperForStorybook';
|
|
20
20
|
import { qButtonTester, qrButtonTesterResponse } from '../assets/questionnaires/QButtonTester';
|
|
21
|
+
import { qBooleanBasic, qrBooleanBasicResponse } from '../assets/questionnaires';
|
|
21
22
|
|
|
22
23
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
23
24
|
const meta = {
|
|
@@ -33,6 +34,13 @@ type Story = StoryObj<typeof meta>;
|
|
|
33
34
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
34
35
|
|
|
35
36
|
export const BuildFormButtonTester: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
questionnaire: qBooleanBasic,
|
|
39
|
+
questionnaireResponse: qrBooleanBasicResponse
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const BuildFormButtonTesterBoolean: Story = {
|
|
36
44
|
args: {
|
|
37
45
|
questionnaire: qButtonTester,
|
|
38
46
|
questionnaireResponse: qrButtonTesterResponse
|