@aehrc/smart-forms-renderer 0.7.0 → 0.7.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/README.md +4 -4
- package/package.json +1 -1
- package/lib/hooks/index.d.ts +0 -1
- package/lib/hooks/index.js +0 -2
- package/lib/hooks/index.js.map +0 -1
- package/lib/theme/overrides/Typography.d.ts +0 -13
- package/lib/theme/overrides/Typography.js +0 -31
- package/lib/theme/overrides/Typography.js.map +0 -1
- package/lib/utils/isHidden.d.ts +0 -3
- package/lib/utils/isHidden.js +0 -30
- package/lib/utils/isHidden.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Smart Forms Renderer
|
|
2
|
-
This React-based package acts as the rendering engine for the [Smart Forms app](https://github.com/aehrc/smart-forms).
|
|
2
|
+
This React-based package acts as the rendering engine for the [Smart Forms app](https://github.com/aehrc/smart-forms).
|
|
3
3
|
|
|
4
4
|
Try out a minimal demo here: https://www.smartforms.io/standalone.
|
|
5
5
|
|
|
@@ -37,14 +37,14 @@ export default function App () {
|
|
|
37
37
|
| questionnaire | FHIR R4.Questionnaire | Questionnaire to be rendered | Required |
|
|
38
38
|
| questionnaireResponse | FHIR R4.QuestionnaireResponse | Pre-populated QuestionnaireResponse to be rendered | Optional |
|
|
39
39
|
| additionalVariables | Record<string, Extension> | Key-value pair of [SDC variables](http://hl7.org/fhir/R4/extension-variable.html) <name, variable extension> | Optional |
|
|
40
|
-
| terminologyServerUrl | string |
|
|
40
|
+
| terminologyServerUrl | string | Terminology server url to fetch terminology | Optional |
|
|
41
|
+
|
|
41
42
|
The below props are not supported at the moment, but will be in the future.
|
|
42
43
|
|
|
43
44
|
| Name | Type | Description |
|
|
44
45
|
|----------------------|------------------------------------------------------|---------------------------------------------|
|
|
45
46
|
| fhirClient | [Client](https://github.com/smart-on-fhir/client-js) | FhirClient to perform further FHIR calls |
|
|
46
47
|
|
|
47
|
-
|
|
48
48
|
### Functions
|
|
49
49
|
|
|
50
50
|
```javascript
|
|
@@ -104,4 +104,4 @@ Raise a request in https://github.com/aehrc/smart-forms/issues if you want to se
|
|
|
104
104
|
|
|
105
105
|
---
|
|
106
106
|
|
|
107
|
-
Copyright © 2022, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. All rights reserved.
|
|
107
|
+
Copyright © 2022, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. All rights reserved.
|
package/package.json
CHANGED
package/lib/hooks/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as useHidden } from './useHidden';
|
package/lib/hooks/index.js
DELETED
package/lib/hooks/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2023 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 function Typography(theme) {
|
|
18
|
-
return {
|
|
19
|
-
MuiTypography: {
|
|
20
|
-
styleOverrides: {
|
|
21
|
-
paragraph: {
|
|
22
|
-
marginBottom: theme.spacing(2)
|
|
23
|
-
},
|
|
24
|
-
gutterBottom: {
|
|
25
|
-
marginBottom: theme.spacing(1)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=Typography.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../src/theme/overrides/Typography.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAY;IAC7C,OAAO;QACL,aAAa,EAAE;YACb,cAAc,EAAE;gBACd,SAAS,EAAE;oBACT,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;iBAC/B;gBACD,YAAY,EAAE;oBACZ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;iBAC/B;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/lib/utils/isHidden.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { EnableWhenExpression, EnableWhenItems } from '../interfaces/enableWhen.interface';
|
|
2
|
-
import { QuestionnaireItem } from 'fhir/r4';
|
|
3
|
-
export declare function IsHidden(qItem: QuestionnaireItem, enableWhenIsActivated: boolean, enableWhenItems: EnableWhenItems, enableWhenExpressions: Record<string, EnableWhenExpression>): boolean;
|
package/lib/utils/isHidden.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2023 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 { hasHiddenExtension } from './itemControl';
|
|
18
|
-
import { isHiddenByEnableWhens } from './qItem';
|
|
19
|
-
export function IsHidden(qItem, enableWhenIsActivated, enableWhenItems, enableWhenExpressions) {
|
|
20
|
-
if (hasHiddenExtension(qItem)) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
return isHiddenByEnableWhens({
|
|
24
|
-
linkId: qItem.linkId,
|
|
25
|
-
enableWhenIsActivated,
|
|
26
|
-
enableWhenItems,
|
|
27
|
-
enableWhenExpressions
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=isHidden.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isHidden.js","sourceRoot":"","sources":["../../src/utils/isHidden.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAIhD,MAAM,UAAU,QAAQ,CACtB,KAAwB,EACxB,qBAA8B,EAC9B,eAAgC,EAChC,qBAA2D;IAE3D,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE;QAC7B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,qBAAqB,CAAC;QAC3B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,qBAAqB;QACrB,eAAe;QACf,qBAAqB;KACtB,CAAC,CAAC;AACL,CAAC"}
|