@aehrc/smart-forms-renderer 0.32.1 → 0.33.0
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/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.js +1 -1
- package/lib/globals.d.ts +1 -0
- package/lib/globals.js +18 -0
- package/lib/globals.js.map +1 -0
- package/lib/stores/terminologyServerStore.d.ts +2 -2
- package/lib/stores/terminologyServerStore.js +5 -5
- package/lib/stores/terminologyServerStore.js.map +1 -1
- package/package.json +2 -2
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.tsx +1 -1
- package/src/globals.ts +18 -0
- package/src/stores/terminologyServerStore.ts +5 -6
package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.js
CHANGED
|
@@ -88,7 +88,7 @@ function CustomDateTimeItem(props) {
|
|
|
88
88
|
onQrItemChange(createEmptyQrItem(qItem));
|
|
89
89
|
}
|
|
90
90
|
const { timeIsValid, is24HourNotation } = validateTimeInput(newTimeInput, newPeriodInput);
|
|
91
|
-
if (!validateDateInput(dateInput)
|
|
91
|
+
if (!validateDateInput(dateInput) || !timeIsValid) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
updateQRDateTime(dateInput, newTimeInput, newPeriodInput, is24HourNotation);
|
package/lib/globals.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TERMINOLOGY_SERVER_URL = "https://tx.ontoserver.csiro.au/fhir";
|
package/lib/globals.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 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 const TERMINOLOGY_SERVER_URL = 'https://tx.ontoserver.csiro.au/fhir';
|
|
18
|
+
//# sourceMappingURL=globals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.js","sourceRoot":"","sources":["../src/globals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,qCAAqC,CAAC"}
|
|
@@ -16,7 +16,7 @@ export interface TerminologyServerStoreType {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Terminology server state management store. This is used for resolving valueSets externally.
|
|
19
|
-
* Defaults to use https://
|
|
19
|
+
* Defaults to use https://tx.ontoserver.csiro.au/fhir.
|
|
20
20
|
* This is the vanilla version of the store which can be used in non-React environments.
|
|
21
21
|
* @see TerminologyServerStoreType for available properties and methods.
|
|
22
22
|
*
|
|
@@ -25,7 +25,7 @@ export interface TerminologyServerStoreType {
|
|
|
25
25
|
export declare const terminologyServerStore: import("zustand/vanilla").StoreApi<TerminologyServerStoreType>;
|
|
26
26
|
/**
|
|
27
27
|
* Terminology server state management store. This is used for resolving valueSets externally.
|
|
28
|
-
* Defaults to use https://
|
|
28
|
+
* Defaults to use https://tx.ontoserver.csiro.au/fhir.
|
|
29
29
|
* This is the React version of the store which can be used as React hooks in React functional components.
|
|
30
30
|
* @see TerminologyServerStoreType for available properties and methods.
|
|
31
31
|
*
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { createStore } from 'zustand/vanilla';
|
|
18
18
|
import { createSelectors } from './selector';
|
|
19
|
-
|
|
19
|
+
import { TERMINOLOGY_SERVER_URL } from '../globals';
|
|
20
20
|
/**
|
|
21
21
|
* Terminology server state management store. This is used for resolving valueSets externally.
|
|
22
|
-
* Defaults to use https://
|
|
22
|
+
* Defaults to use https://tx.ontoserver.csiro.au/fhir.
|
|
23
23
|
* This is the vanilla version of the store which can be used in non-React environments.
|
|
24
24
|
* @see TerminologyServerStoreType for available properties and methods.
|
|
25
25
|
*
|
|
26
26
|
* @author Sean Fong
|
|
27
27
|
*/
|
|
28
28
|
export const terminologyServerStore = createStore()((set) => ({
|
|
29
|
-
url:
|
|
29
|
+
url: TERMINOLOGY_SERVER_URL,
|
|
30
30
|
setUrl: (newUrl) => set(() => ({ url: newUrl })),
|
|
31
|
-
resetUrl: () => set(() => ({ url:
|
|
31
|
+
resetUrl: () => set(() => ({ url: TERMINOLOGY_SERVER_URL }))
|
|
32
32
|
}));
|
|
33
33
|
/**
|
|
34
34
|
* Terminology server state management store. This is used for resolving valueSets externally.
|
|
35
|
-
* Defaults to use https://
|
|
35
|
+
* Defaults to use https://tx.ontoserver.csiro.au/fhir.
|
|
36
36
|
* This is the React version of the store which can be used as React hooks in React functional components.
|
|
37
37
|
* @see TerminologyServerStoreType for available properties and methods.
|
|
38
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminologyServerStore.js","sourceRoot":"","sources":["../../src/stores/terminologyServerStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"terminologyServerStore.js","sourceRoot":"","sources":["../../src/stores/terminologyServerStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAmBpD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,EAA8B,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACxF,GAAG,EAAE,sBAAsB;IAC3B,MAAM,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,sBAAsB,EAAE,CAAC,CAAC;CAC7D,CAAC,CAAC,CAAC;AAEJ;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aehrc/smart-forms-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "FHIR Structured Data Captured (SDC) rendering engine for Smart Forms",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/aehrc/smart-forms#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aehrc/sdc-populate": "^2.0
|
|
30
|
+
"@aehrc/sdc-populate": "^2.1.0",
|
|
31
31
|
"@iconify/react": "^4.1.1",
|
|
32
32
|
"dayjs": "^1.11.10",
|
|
33
33
|
"deep-diff": "^1.0.2",
|
package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/CustomDateTimeItem.tsx
CHANGED
|
@@ -130,7 +130,7 @@ function CustomDateTimeItem(props: CustomDateTimeItemProps) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
const { timeIsValid, is24HourNotation } = validateTimeInput(newTimeInput, newPeriodInput);
|
|
133
|
-
if (!validateDateInput(dateInput)
|
|
133
|
+
if (!validateDateInput(dateInput) || !timeIsValid) {
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
|
package/src/globals.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 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
|
+
|
|
18
|
+
export const TERMINOLOGY_SERVER_URL = 'https://tx.ontoserver.csiro.au/fhir';
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { createStore } from 'zustand/vanilla';
|
|
19
19
|
import { createSelectors } from './selector';
|
|
20
|
-
|
|
21
|
-
const ONTOSERVER_R4 = 'https://r4.ontoserver.csiro.au/fhir';
|
|
20
|
+
import { TERMINOLOGY_SERVER_URL } from '../globals';
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* TerminologyServerStore properties and methods
|
|
@@ -39,21 +38,21 @@ export interface TerminologyServerStoreType {
|
|
|
39
38
|
|
|
40
39
|
/**
|
|
41
40
|
* Terminology server state management store. This is used for resolving valueSets externally.
|
|
42
|
-
* Defaults to use https://
|
|
41
|
+
* Defaults to use https://tx.ontoserver.csiro.au/fhir.
|
|
43
42
|
* This is the vanilla version of the store which can be used in non-React environments.
|
|
44
43
|
* @see TerminologyServerStoreType for available properties and methods.
|
|
45
44
|
*
|
|
46
45
|
* @author Sean Fong
|
|
47
46
|
*/
|
|
48
47
|
export const terminologyServerStore = createStore<TerminologyServerStoreType>()((set) => ({
|
|
49
|
-
url:
|
|
48
|
+
url: TERMINOLOGY_SERVER_URL,
|
|
50
49
|
setUrl: (newUrl: string) => set(() => ({ url: newUrl })),
|
|
51
|
-
resetUrl: () => set(() => ({ url:
|
|
50
|
+
resetUrl: () => set(() => ({ url: TERMINOLOGY_SERVER_URL }))
|
|
52
51
|
}));
|
|
53
52
|
|
|
54
53
|
/**
|
|
55
54
|
* Terminology server state management store. This is used for resolving valueSets externally.
|
|
56
|
-
* Defaults to use https://
|
|
55
|
+
* Defaults to use https://tx.ontoserver.csiro.au/fhir.
|
|
57
56
|
* This is the React version of the store which can be used as React hooks in React functional components.
|
|
58
57
|
* @see TerminologyServerStoreType for available properties and methods.
|
|
59
58
|
*
|