diff --git a/apps/smart-forms-app/package.json b/apps/smart-forms-app/package.json index fd0b01f47..52cec2a97 100644 --- a/apps/smart-forms-app/package.json +++ b/apps/smart-forms-app/package.json @@ -28,7 +28,7 @@ "dayjs": "^1.11.7", "fhirclient": "^2.5.2", "fhirpath": "^3.6.0", - "html-react-parser": "^3.0.16", + "html-react-parser": "^4.2.0", "lodash.clonedeep": "^4.5.0", "lodash.debounce": "^4.0.8", "lodash.filter": "^4.6.0", diff --git a/package-lock.json b/package-lock.json index eac71ad39..6d79d8d21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "dayjs": "^1.11.7", "fhirclient": "^2.5.2", "fhirpath": "^3.6.0", - "html-react-parser": "^3.0.16", + "html-react-parser": "^4.2.0", "lodash.clonedeep": "^4.5.0", "lodash.debounce": "^4.0.8", "lodash.filter": "^4.6.0", @@ -13862,12 +13862,12 @@ "peer": true }, "node_modules/html-dom-parser": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/html-dom-parser/-/html-dom-parser-3.1.7.tgz", - "integrity": "sha512-cDgNF4YgF6J3H+d9mcldGL19p0GzVdS3iGuDNzYWQpU47q3+IRM85X3Xo07E+nntF4ek4s78A9V24EwxlPTjig==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-dom-parser/-/html-dom-parser-4.0.0.tgz", + "integrity": "sha512-TUa3wIwi80f5NF8CVWzkopBVqVAtlawUzJoLwVLHns0XSJGynss4jiY0mTWpiDOsuyw+afP+ujjMgRh9CoZcXw==", "dependencies": { "domhandler": "5.0.3", - "htmlparser2": "8.0.2" + "htmlparser2": "9.0.0" } }, "node_modules/html-escaper": { @@ -13877,12 +13877,12 @@ "dev": true }, "node_modules/html-react-parser": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-3.0.16.tgz", - "integrity": "sha512-ysQZtRFPcg+McVb4B05oNWSnqM14zagpvTgGcI5e1/BvCl38YwzWzKibrbBmXeemg70olN1bAoeixo7o06G5Eg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-4.2.0.tgz", + "integrity": "sha512-gzU55AS+FI6qD7XaKe5BLuLFM2Xw0/LodfMWZlxV9uOHe7LCD5Lukx/EgYuBI3c0kLu0XlgFXnSzO0qUUn3Vrg==", "dependencies": { "domhandler": "5.0.3", - "html-dom-parser": "3.1.7", + "html-dom-parser": "4.0.0", "react-property": "2.0.0", "style-to-js": "1.1.3" }, @@ -13891,9 +13891,9 @@ } }, "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.0.0.tgz", + "integrity": "sha512-uxbSI98wmFT/G4P2zXx4OVx04qWUmyFPrD2/CNepa2Zo3GPNaCaaxElDgwUrwYWkK1nr9fft0Ya8dws8coDLLQ==", "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", { @@ -13904,8 +13904,8 @@ "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" + "domutils": "^3.1.0", + "entities": "^4.5.0" } }, "node_modules/http-errors": { diff --git a/packages/sdc-populate/src/constructResponse.ts b/packages/sdc-populate/src/constructResponse.ts index fc36b56e6..dab52ba71 100644 --- a/packages/sdc-populate/src/constructResponse.ts +++ b/packages/sdc-populate/src/constructResponse.ts @@ -272,7 +272,7 @@ function getAnswerValues( * @author Sean Fong */ export function checkIsDate(value: string): boolean { - const acceptedFormats = ['YYYY-MM', 'YYYY-MM-DD']; + const acceptedFormats = ['YYYY', 'YYYY-MM', 'YYYY-MM-DD']; return dayjs(value, acceptedFormats, true).isValid(); } @@ -282,7 +282,7 @@ export function checkIsDate(value: string): boolean { * @author Sean Fong */ export function checkIsDateTime(value: string): boolean { - const acceptedFormats = ['YYYY-MM', 'YYYY-MM-DD', 'YYYY-MM-DDTHH:mm:ssZ']; + const acceptedFormats = ['YYYY', 'YYYY-MM', 'YYYY-MM-DD', 'YYYY-MM-DDTHH:mm:ssZ']; return moment(value, acceptedFormats, true).isValid(); }