Skip to content

Commit

Permalink
Merge pull request #6 from aehrc/issue/639
Browse files Browse the repository at this point in the history
Issue/639
  • Loading branch information
ryuuzake authored Aug 20, 2024
2 parents bf2632f + 2686b54 commit 12eeef2
Show file tree
Hide file tree
Showing 34 changed files with 1,117 additions and 356 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/build_test_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:

jobs:
build:
build-smart-forms-app:
name: Build
runs-on: ubuntu-latest
steps:
Expand All @@ -19,6 +19,21 @@ jobs:
- name: Build application
run: npm run build -w apps/smart-forms-app

build-demo-app:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Build application
run: cd apps/demo-renderer-app && npm run build

jest-test:
name: Jest Tests
runs-on: ubuntu-latest
Expand Down
52 changes: 26 additions & 26 deletions apps/demo-renderer-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/demo-renderer-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"preview": "vite preview"
},
"dependencies": {
"@aehrc/sdc-populate": "^1.8.0",
"@aehrc/smart-forms-renderer": "file:../../packages/smart-forms-renderer",
"@aehrc/sdc-populate": "^2.3.1",
"@aehrc/smart-forms-renderer": "^0.37.2",
"@tanstack/react-query": "^4.36.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
6 changes: 0 additions & 6 deletions apps/demo-renderer-app/src/utils/populate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ import type { RequestConfig } from './populateCallback';
import { fetchResourceCallback } from './populateCallback';
import { createPopulateInputParameters } from './populateInputParams';

export const REQUEST_CONFIG: RequestConfig = {
clientEndpoint: 'https://gw.interop.community/AuConNov23/data',
authToken:
'eyJqa3UiOiJodHRwczpcL1wvaW9sMmF1dGguaW50ZXJvcC5jb21tdW5pdHlqd2siLCJraWQiOiJyc2ExIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhdWQiOiJhN2RkNDJlZi05ZDdjLTRhOWItOTgyZi0xZjRmZjBlNDI5OGUiLCJpc3MiOiJodHRwczpcL1wvaW9sMmF1dGguaW50ZXJvcC5jb21tdW5pdHkiLCJleHAiOjE3MDA0NTAyNDcsImlhdCI6MTcwMDQ0NjY0NywianRpIjoiYTE0ZmM0MzktZGUzNC00MzQwLTlkNGYtYmIwZDY3Y2ZjM2NhIn0.PQ2T8GQCyQkwAI0UTXZ9AEJF1KcK8H0CGePLj7XLg-jqn381-9j8OyOR5cjEh2EpzhdfeDQX2KCjvq4wd3PkPmkQYfPXBj84odtNHSuubtHlA_TnDK2fyhoDOn_CwYOIPJrFNZ2frvDlkdFs5s--dlPGGoAQoy3Szbf09PzbiiThf3Y3YmRGcb1JR1n4RwhwW6d7lhMEhbaqEqzsfig75TFhFw2wmJGXqIZMz0L2TTel9iYT9zeEyBmmmZpdoCTwgD2raC2nPpxU-OjslA50r_OvjfDpVhIAC40E5-ol_xAL7QhFioudsUQaQXGXWgcDs2lTqrNA-HPoxxrj1ZD9GQ'
};

export interface PopulateResult {
populated: QuestionnaireResponse;
hasWarnings: boolean;
Expand Down
3 changes: 2 additions & 1 deletion apps/demo-renderer-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export default defineConfig({
commonjsOptions: {
include: [/node_modules/, '@aehrc/sdc-populate']
}
}
},
resolve: { preserveSymlinks: true }
});
14 changes: 7 additions & 7 deletions apps/smart-forms-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
"homepage": "https://github.com/aehrc/smart-forms#readme",
"dependencies": {
"@aehrc/sdc-assemble": "^1.3.1",
"@aehrc/sdc-populate": "^2.3.0",
"@aehrc/smart-forms-renderer": "^0.37.1",
"@emotion/react": "^11.11.4",
"@aehrc/sdc-populate": "^2.3.1",
"@aehrc/smart-forms-renderer": "^0.37.2",
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.11.5",
"@fontsource/material-icons": "^5.0.18",
"@fontsource/roboto": "^5.0.12",
"@iconify/react": "^4.1.1",
"@microlink/react-json-view": "^1.23.0",
"@microlink/react-json-view": "^1.23.1",
"@monaco-editor/react": "^4.6.0",
"@mui/icons-material": "^5.15.20",
"@mui/lab": "^5.0.0-alpha.151",
"@mui/material": "^5.15.20",
"@mui/material": "^5.16.6",
"@mui/x-date-pickers": "^6.10.1",
"@sentry/react": "^7.73.0",
"@sentry/tracing": "^7.101.0",
Expand Down Expand Up @@ -73,7 +73,7 @@
"react-to-print": "^2.14.15",
"simplebar-react": "^3.2.4",
"usehooks-ts": "^2.9.1",
"zustand": "^4.5.2"
"zustand": "^4.5.4"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
Expand Down Expand Up @@ -106,7 +106,7 @@
"@vitejs/plugin-react": "^4.0.4",
"eslint": "^8.52.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-storybook": "^0.8.0",
"jest": "^29.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ Key-value pair of calculated expressions `Record<linkId, array of calculated exp

***

### currentPageIndex

> **currentPageIndex**: `number`
Index of the current page

***

### currentTabIndex

> **currentTabIndex**: `number`
Expand Down Expand Up @@ -161,6 +169,24 @@ Key-value pair of launch contexts `Record<launch context name, launch context pr

***

### markPageAsComplete()

> **markPageAsComplete**: (`pageLinkId`) => `void`
Used to mark a page index as complete

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `pageLinkId` | `string` |

#### Returns

`void`

***

### markTabAsComplete()

> **markTabAsComplete**: (`tabLinkId`) => `void`
Expand Down Expand Up @@ -217,6 +243,14 @@ Used to set the focused linkId

***

### pages

> **pages**: `Pages`
Key-value pair of pages `Record<linkId, Page>`

***

### populatedContext

> **populatedContext**: `Record`\<`string`, `any`\>
Expand Down Expand Up @@ -293,6 +327,24 @@ FHIR R4 Questionnaire to render

***

### switchPage()

> **switchPage**: (`newPageIndex`) => `void`
Used to switch the current page index

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `newPageIndex` | `number` |

#### Returns

`void`

***

### switchTab()

> **switchTab**: (`newTabIndex`) => `void`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ This is the React version of the store which can be used as React hooks in React

`Record`\<`string`, `CalculatedExpression`[]\>

### use.currentPageIndex()

> **currentPageIndex**: () => `number`
#### Returns

`number`

### use.currentTabIndex()

> **currentTabIndex**: () => `number`
Expand Down Expand Up @@ -173,6 +181,24 @@ This is the React version of the store which can be used as React hooks in React

`Record`\<`string`, [`LaunchContext`](../interfaces/LaunchContext.md)\>

### use.markPageAsComplete()

> **markPageAsComplete**: () => (`pageLinkId`) => `void`
#### Returns

`Function`

##### Parameters

| Parameter | Type |
| :------ | :------ |
| `pageLinkId` | `string` |

##### Returns

`void`

### use.markTabAsComplete()

> **markTabAsComplete**: () => (`tabLinkId`) => `void`
Expand Down Expand Up @@ -229,6 +255,14 @@ This is the React version of the store which can be used as React hooks in React

`void`

### use.pages()

> **pages**: () => `Pages`
#### Returns

`Pages`

### use.populatedContext()

> **populatedContext**: () => `Record`\<`string`, `any`\>
Expand Down Expand Up @@ -305,6 +339,24 @@ This is the React version of the store which can be used as React hooks in React

`Questionnaire`

### use.switchPage()

> **switchPage**: () => (`newPageIndex`) => `void`
#### Returns

`Function`

##### Parameters

| Parameter | Type |
| :------ | :------ |
| `newPageIndex` | `number` |

##### Returns

`void`

### use.switchTab()

> **switchTab**: () => (`newTabIndex`) => `void`
Expand Down
Loading

0 comments on commit 12eeef2

Please sign in to comment.