Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST #180

Closed
wants to merge 22 commits into from
Closed

TEST #180

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 16.0.0-beta01

---

- Rework of refero with new components
- removed old components and added new from @helsenorge designsystem

## 15.0.4

---
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ React component that consumes a [FHIR Questionnaire](https://www.hl7.org/fhir/qu

- [@helsenorge/core-utils](https://www.npmjs.com/package/@helsenorge/core-utils)
- [@helsenorge/file-upload](https://www.npmjs.com/package/@helsenorge/file-upload)
- [@helsenorge/form](https://www.npmjs.com/package/@helsenorge/form)
- [@helsenorge/date-time](https://www.npmjs.com/package/@helsenorge/date-time)
- [@helsenorge/autosuggest](https://www.npmjs.com/package/@helsenorge/autosuggest)
- [@helsenorge/designsystem-react](https://www.npmjs.com/package/@helsenorge/designsystem-react)
Expand All @@ -15,6 +14,7 @@ React component that consumes a [FHIR Questionnaire](https://www.hl7.org/fhir/qu
- [uuid](https://www.npmjs.com/package/uuid)
- [dompurify](https://www.npmjs.com/package/dompurify)
- [immer](https://www.npmjs.com/package/immer)
- [React hook form](https://www.npmjs.com/package/react-hook-form)

## Example usage

Expand Down Expand Up @@ -114,7 +114,6 @@ class App extends Component<{}, {}> {
| onFieldsNotCorrectlyFilledOut | | callback | | Callback when a field is incorrectly filled out |
| onStepChange | | callback | | Callback when the current step in step-views changes |


### `questionnaire: Questionnaire`

This is the questionnaire to be rendered. It must be a [`Questionnaire`](https://www.hl7.org/fhir/questionnaire.html) object.
Expand Down Expand Up @@ -289,8 +288,8 @@ This callback is called when a required field is not filled out, or if a field i

### `onStepChange: (newIndex: number) => void`

This callback is called when the current step in a step-view changes. It takes in the parameter newIndex, which contains the new index that the current index will be updated to.
This can be used to make progress indicators display the correct step.
This callback is called when the current step in a step-view changes. It takes in the parameter newIndex, which contains the new index that
the current index will be updated to. This can be used to make progress indicators display the correct step.

# Enum definitions

Expand Down
14 changes: 14 additions & 0 deletions config/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,17 @@ Enzyme.configure({

import structuredClone from '@ungap/structured-clone';
global.structuredClone = global.structuredClone || structuredClone;

Object.defineProperty(window, 'matchMedia', {
writable: true,
value: query => ({
matches: false,
media: query,
onchange: null,
addListener: () => {},
removeListener: () => {},
addEventListener: () => {},
removeEventListener: () => {},
dispatchEvent: () => {},
}),
});
Loading
Loading