diff --git a/cypress/e2e/facility_spec/facility_manage.cy.ts b/cypress/e2e/facility_spec/facility_manage.cy.ts index 8250236906c..35256d48ef8 100644 --- a/cypress/e2e/facility_spec/facility_manage.cy.ts +++ b/cypress/e2e/facility_spec/facility_manage.cy.ts @@ -90,6 +90,7 @@ describe("Facility Manage Functions", () => { facilityManage.clickButtonWithText(facilityHfridUpdateButton); facilityManage.verifySuccessMessageVisibilityAndContent( facilityHfridToastNotificationText, + true, ); // update the existing middleware facilityPage.clickManageFacilityDropdown(); @@ -98,6 +99,7 @@ describe("Facility Manage Functions", () => { facilityManage.clickButtonWithText(facilityHfridUpdateButton); facilityManage.verifySuccessMessageVisibilityAndContent( facilityHfridToastNotificationText, + true, ); // verify its reflection facilityPage.clickManageFacilityDropdown(); diff --git a/cypress/pageobject/Facility/FacilityManage.ts b/cypress/pageobject/Facility/FacilityManage.ts index df379a53012..9e41d5d0290 100644 --- a/cypress/pageobject/Facility/FacilityManage.ts +++ b/cypress/pageobject/Facility/FacilityManage.ts @@ -71,8 +71,12 @@ class FacilityManage { cy.get("#hf_id").click().clear().click().type(address); } - verifySuccessMessageVisibilityAndContent(text) { - cy.get(".pnotify-text").should("be.visible").contains(text); + verifySuccessMessageVisibilityAndContent(text, isRegex = false) { + if (isRegex) { + cy.get(".pnotify-text").should("be.visible").contains(text); + } else { + cy.get(".pnotify-text").should("be.visible").and("contain.text", text); + } } verifyMiddlewareAddressValue(expectedValue) { diff --git a/package-lock.json b/package-lock.json index 1a320029a9c..fb54d65bc9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "echarts-for-react": "^3.0.2", "eslint-mdx": "^3.1.5", "events": "^3.3.0", + "hi-profiles": "^1.0.6", "i18next": "^23.2.7", "i18next-browser-languagedetector": "^7.1.0", "lodash-es": "^4.17.21", @@ -237,27 +238,27 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", - "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", - "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", + "@babel/generator": "^7.24.4", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", "@babel/template": "^7.24.0", "@babel/traverse": "^7.24.1", "@babel/types": "^7.24.0", @@ -276,9 +277,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", - "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "dependencies": { "@babel/types": "^7.24.0", @@ -595,9 +596,9 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", - "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dev": true, "dependencies": { "@babel/template": "^7.24.0", @@ -687,9 +688,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -698,6 +699,22 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.4.tgz", + "integrity": "sha512-qpl6vOOEEzTLLcsuqYYo8yDtrTocmu2xkGvgNebvPjT9DTtfFYGmgDqY+rBYXNlqL4s9qLDn6xkrJv4RxAPiTA==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.24.1", "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.1.tgz", @@ -1104,9 +1121,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.1.tgz", - "integrity": "sha512-h71T2QQvDgM2SmT29UYU6ozjMlAt7s7CSs5Hvy8f8cf/GM/Z4a2zMfN+fjVGaieeCrXR3EdQl6C4gQG+OgmbKw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.4.tgz", + "integrity": "sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.24.0" @@ -1135,12 +1152,12 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.1.tgz", - "integrity": "sha512-FUHlKCn6J3ERiu8Dv+4eoz7w8+kFLSyeVG4vDAikwADGjUCoHw/JHokyGtr8OR4UjpwPVivyF+h8Q5iv/JmrtA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.4.tgz", + "integrity": "sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-create-class-features-plugin": "^7.24.4", "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, @@ -1844,15 +1861,16 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.3.tgz", - "integrity": "sha512-fSk430k5c2ff8536JcPvPWK4tZDwehWLGlBp0wrsBUjZVdeQV6lePbwKWZaZfK2vnh/1kQX1PzAJWsnBmVgGJA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.4.tgz", + "integrity": "sha512-7Kl6cSmYkak0FK/FXjSEnLJ1N9T/WA2RkMhu17gZ/dsxKJUuTYNIylahPTzqpLyJN4WhDif8X0XK1R8Wsguo/A==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.24.1", + "@babel/compat-data": "^7.24.4", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-validator-option": "^7.23.5", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.4", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.1", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.1", "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.1", @@ -1879,9 +1897,9 @@ "@babel/plugin-transform-async-generator-functions": "^7.24.3", "@babel/plugin-transform-async-to-generator": "^7.24.1", "@babel/plugin-transform-block-scoped-functions": "^7.24.1", - "@babel/plugin-transform-block-scoping": "^7.24.1", + "@babel/plugin-transform-block-scoping": "^7.24.4", "@babel/plugin-transform-class-properties": "^7.24.1", - "@babel/plugin-transform-class-static-block": "^7.24.1", + "@babel/plugin-transform-class-static-block": "^7.24.4", "@babel/plugin-transform-classes": "^7.24.1", "@babel/plugin-transform-computed-properties": "^7.24.1", "@babel/plugin-transform-destructuring": "^7.24.1", @@ -2131,9 +2149,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", - "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", + "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2906,9 +2924,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@isaacs/cliui": { @@ -3208,13 +3226,13 @@ } }, "node_modules/@npmcli/config": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-8.2.0.tgz", - "integrity": "sha512-YoEYZFg0hRSRP/Chmq+J4FvULFvji6SORUYWQc10FiJ+ReAnViXcDCENg6kM6dID04bAoKNUygrby798+gYBbQ==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-8.2.1.tgz", + "integrity": "sha512-G4PknBr51bwCuY63wXSO8OakSoyHk11JYhxAZCayCAosJruX86lAstCfbr/2Fr+g6OqVz6PPfOVZ98bcoc+eQA==", "dependencies": { "@npmcli/map-workspaces": "^3.0.2", "ci-info": "^4.0.0", - "ini": "^4.1.0", + "ini": "^4.1.2", "nopt": "^7.0.0", "proc-log": "^3.0.0", "read-package-json-fast": "^3.0.2", @@ -3687,9 +3705,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.2.tgz", - "integrity": "sha512-3XFIDKWMFZrMnao1mJhnOT1h2g0169Os848NhhmGweEcfJ4rCi+3yMCOLG4zA61rbJdkcrM/DjVZm9Hg5p5w7g==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.1.tgz", + "integrity": "sha512-fH8/o8nSUek8ceQnT7K4EQbSiV7jgkHq81m9lWZFIXjJ7lJzpWXbQFpT/Zh6OZYnpFykvzC3fbEvEAFZu03dPA==", "cpu": [ "arm" ], @@ -3700,9 +3718,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.2.tgz", - "integrity": "sha512-GdxxXbAuM7Y/YQM9/TwwP+L0omeE/lJAR1J+olu36c3LqqZEBdsIWeQ91KBe6nxwOnb06Xh7JS2U5ooWU5/LgQ==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.1.tgz", + "integrity": "sha512-Y/9OHLjzkunF+KGEoJr3heiD5X9OLa8sbT1lm0NYeKyaM3oMhhQFvPB0bNZYJwlq93j8Z6wSxh9+cyKQaxS7PQ==", "cpu": [ "arm64" ], @@ -3713,9 +3731,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.2.tgz", - "integrity": "sha512-mCMlpzlBgOTdaFs83I4XRr8wNPveJiJX1RLfv4hggyIVhfB5mJfN4P8Z6yKh+oE4Luz+qq1P3kVdWrCKcMYrrA==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.1.tgz", + "integrity": "sha512-+kecg3FY84WadgcuSVm6llrABOdQAEbNdnpi5X3UwWiFVhZIZvKgGrF7kmLguvxHNQy+UuRV66cLVl3S+Rkt+Q==", "cpu": [ "arm64" ], @@ -3726,9 +3744,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.2.tgz", - "integrity": "sha512-yUoEvnH0FBef/NbB1u6d3HNGyruAKnN74LrPAfDQL3O32e3k3OSfLrPgSJmgb3PJrBZWfPyt6m4ZhAFa2nZp2A==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.1.tgz", + "integrity": "sha512-2pYRzEjVqq2TB/UNv47BV/8vQiXkFGVmPFwJb+1E0IFFZbIX8/jo1olxqqMbo6xCXf8kabANhp5bzCij2tFLUA==", "cpu": [ "x64" ], @@ -3739,9 +3757,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.2.tgz", - "integrity": "sha512-GYbLs5ErswU/Xs7aGXqzc3RrdEjKdmoCrgzhJWyFL0r5fL3qd1NPcDKDowDnmcoSiGJeU68/Vy+OMUluRxPiLQ==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.1.tgz", + "integrity": "sha512-mS6wQ6Do6/wmrF9aTFVpIJ3/IDXhg1EZcQFYHZLHqw6AzMBjTHWnCG35HxSqUNphh0EHqSM6wRTT8HsL1C0x5g==", "cpu": [ "arm" ], @@ -3752,9 +3770,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz", - "integrity": "sha512-L1+D8/wqGnKQIlh4Zre9i4R4b4noxzH5DDciyahX4oOz62CphY7WDWqJoQ66zNR4oScLNOqQJfNSIAe/6TPUmQ==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.1.tgz", + "integrity": "sha512-p9rGKYkHdFMzhckOTFubfxgyIO1vw//7IIjBBRVzyZebWlzRLeNhqxuSaZ7kCEKVkm/kuC9fVRW9HkC/zNRG2w==", "cpu": [ "arm64" ], @@ -3765,9 +3783,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.2.tgz", - "integrity": "sha512-tK5eoKFkXdz6vjfkSTCupUzCo40xueTOiOO6PeEIadlNBkadH1wNOH8ILCPIl8by/Gmb5AGAeQOFeLev7iZDOA==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.1.tgz", + "integrity": "sha512-nDY6Yz5xS/Y4M2i9JLQd3Rofh5OR8Bn8qe3Mv/qCVpHFlwtZSBYSPaU4mrGazWkXrdQ98GB//H0BirGR/SKFSw==", "cpu": [ "arm64" ], @@ -3778,9 +3796,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.13.2.tgz", - "integrity": "sha512-zvXvAUGGEYi6tYhcDmb9wlOckVbuD+7z3mzInCSTACJ4DQrdSLPNUeDIcAQW39M3q6PDquqLWu7pnO39uSMRzQ==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.1.tgz", + "integrity": "sha512-im7HE4VBL+aDswvcmfx88Mp1soqL9OBsdDBU8NqDEYtkri0qV0THhQsvZtZeNNlLeCUQ16PZyv7cqutjDF35qw==", "cpu": [ "ppc64le" ], @@ -3791,9 +3809,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.2.tgz", - "integrity": "sha512-C3GSKvMtdudHCN5HdmAMSRYR2kkhgdOfye4w0xzyii7lebVr4riCgmM6lRiSCnJn2w1Xz7ZZzHKuLrjx5620kw==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.1.tgz", + "integrity": "sha512-RWdiHuAxWmzPJgaHJdpvUUlDz8sdQz4P2uv367T2JocdDa98iRw2UjIJ4QxSyt077mXZT2X6pKfT2iYtVEvOFw==", "cpu": [ "riscv64" ], @@ -3804,9 +3822,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.13.2.tgz", - "integrity": "sha512-l4U0KDFwzD36j7HdfJ5/TveEQ1fUTjFFQP5qIt9gBqBgu1G8/kCaq5Ok05kd5TG9F8Lltf3MoYsUMw3rNlJ0Yg==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.1.tgz", + "integrity": "sha512-VMgaGQ5zRX6ZqV/fas65/sUGc9cPmsntq2FiGmayW9KMNfWVG/j0BAqImvU4KTeOOgYSf1F+k6at1UfNONuNjA==", "cpu": [ "s390x" ], @@ -3817,9 +3835,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.2.tgz", - "integrity": "sha512-xXMLUAMzrtsvh3cZ448vbXqlUa7ZL8z0MwHp63K2IIID2+DeP5iWIT6g1SN7hg1VxPzqx0xZdiDM9l4n9LRU1A==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.1.tgz", + "integrity": "sha512-9Q7DGjZN+hTdJomaQ3Iub4m6VPu1r94bmK2z3UeWP3dGUecRC54tmVu9vKHTm1bOt3ASoYtEz6JSRLFzrysKlA==", "cpu": [ "x64" ], @@ -3830,9 +3848,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.2.tgz", - "integrity": "sha512-M/JYAWickafUijWPai4ehrjzVPKRCyDb1SLuO+ZyPfoXgeCEAlgPkNXewFZx0zcnoIe3ay4UjXIMdXQXOZXWqA==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.1.tgz", + "integrity": "sha512-JNEG/Ti55413SsreTguSx0LOVKX902OfXIKVg+TCXO6Gjans/k9O6ww9q3oLGjNDaTLxM+IHFMeXy/0RXL5R/g==", "cpu": [ "x64" ], @@ -3843,9 +3861,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.2.tgz", - "integrity": "sha512-2YWwoVg9KRkIKaXSh0mz3NmfurpmYoBBTAXA9qt7VXk0Xy12PoOP40EFuau+ajgALbbhi4uTj3tSG3tVseCjuA==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.1.tgz", + "integrity": "sha512-ryS22I9y0mumlLNwDFYZRDFLwWh3aKaC72CWjFcFvxK0U6v/mOkM5Up1bTbCRAhv3kEIwW2ajROegCIQViUCeA==", "cpu": [ "arm64" ], @@ -3856,9 +3874,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.2.tgz", - "integrity": "sha512-2FSsE9aQ6OWD20E498NYKEQLneShWes0NGMPQwxWOdws35qQXH+FplabOSP5zEe1pVjurSDOGEVCE2agFwSEsw==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.1.tgz", + "integrity": "sha512-TdloItiGk+T0mTxKx7Hp279xy30LspMso+GzQvV2maYePMAWdmrzqSNZhUpPj3CGw12aGj57I026PgLCTu8CGg==", "cpu": [ "ia32" ], @@ -3869,9 +3887,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.2.tgz", - "integrity": "sha512-7h7J2nokcdPePdKykd8wtc8QqqkqxIrUz7MHj6aNr8waBRU//NLDVnNjQnqQO6fqtjrtCdftpbTuOKAyrAQETQ==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.1.tgz", + "integrity": "sha512-wQGI+LY/Py20zdUPq+XCem7JcPOyzIJBm3dli+56DJsQOHbnXZFEwgmnC6el1TPAfC8lBT3m+z69RmLykNUbew==", "cpu": [ "x64" ], @@ -5006,9 +5024,9 @@ } }, "node_modules/@storybook/react/node_modules/@types/node": { - "version": "18.19.28", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.28.tgz", - "integrity": "sha512-J5cOGD9n4x3YGgVuaND6khm5x07MMdAKkRyXnjVR6KFhLMNh2yONGiP7Z+4+tBOt5mK+GvDTiacTOVGGpqiecw==", + "version": "18.19.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.30.tgz", + "integrity": "sha512-453z1zPuJLVDbyahaa1sSD5C2sht6ZpHp5rgJNs+H8YGqhluCXcuOUmBYsAo0Tos0cHySJ3lVUGbGgLlqIkpyg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -5169,9 +5187,9 @@ } }, "node_modules/@swc/core": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.11.tgz", - "integrity": "sha512-WKEakMZxkVwRdgMN4AMJ9K5nysY8g8npgQPczmjBeNK5In7QEAZAJwnyccrWwJZU0XjVeHn2uj+XbOKdDW17rg==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.12.tgz", + "integrity": "sha512-QljRxTaUajSLB9ui93cZ38/lmThwIw/BPxjn+TphrYN6LPU3vu9/ykjgHtlpmaXDDcngL4K5i396E7iwwEUxYg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -5186,16 +5204,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.4.11", - "@swc/core-darwin-x64": "1.4.11", - "@swc/core-linux-arm-gnueabihf": "1.4.11", - "@swc/core-linux-arm64-gnu": "1.4.11", - "@swc/core-linux-arm64-musl": "1.4.11", - "@swc/core-linux-x64-gnu": "1.4.11", - "@swc/core-linux-x64-musl": "1.4.11", - "@swc/core-win32-arm64-msvc": "1.4.11", - "@swc/core-win32-ia32-msvc": "1.4.11", - "@swc/core-win32-x64-msvc": "1.4.11" + "@swc/core-darwin-arm64": "1.4.12", + "@swc/core-darwin-x64": "1.4.12", + "@swc/core-linux-arm-gnueabihf": "1.4.12", + "@swc/core-linux-arm64-gnu": "1.4.12", + "@swc/core-linux-arm64-musl": "1.4.12", + "@swc/core-linux-x64-gnu": "1.4.12", + "@swc/core-linux-x64-musl": "1.4.12", + "@swc/core-win32-arm64-msvc": "1.4.12", + "@swc/core-win32-ia32-msvc": "1.4.12", + "@swc/core-win32-x64-msvc": "1.4.12" }, "peerDependencies": { "@swc/helpers": "^0.5.0" @@ -5207,9 +5225,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.11.tgz", - "integrity": "sha512-C1j1Qp/IHSelVWdEnT7f0iONWxQz6FAqzjCF2iaL+0vFg4V5f2nlgrueY8vj5pNNzSGhrAlxsMxEIp4dj1MXkg==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.12.tgz", + "integrity": "sha512-BZUUq91LGJsLI2BQrhYL3yARkcdN4TS3YGNS6aRYUtyeWrGCTKHL90erF2BMU2rEwZLLkOC/U899R4o4oiSHfA==", "cpu": [ "arm64" ], @@ -5223,9 +5241,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.11.tgz", - "integrity": "sha512-0TTy3Ni8ncgaMCchSQ7FK8ZXQLlamy0FXmGWbR58c+pVZWYZltYPTmheJUvVcR0H2+gPAymRKyfC0iLszDALjg==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.12.tgz", + "integrity": "sha512-Wkk8rq1RwCOgg5ybTlfVtOYXLZATZ+QjgiBNM7pIn03A5/zZicokNTYd8L26/mifly2e74Dz34tlIZBT4aTGDA==", "cpu": [ "x64" ], @@ -5239,9 +5257,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.11.tgz", - "integrity": "sha512-XJLB71uw0rog4DjYAPxFGAuGCBQpgJDlPZZK6MTmZOvI/1t0+DelJ24IjHIxk500YYM26Yv47xPabqFPD7I2zQ==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.12.tgz", + "integrity": "sha512-8jb/SN67oTQ5KSThWlKLchhU6xnlAlnmnLCCOKK1xGtFS6vD+By9uL+qeEY2krV98UCRTf68WSmC0SLZhVoz5A==", "cpu": [ "arm" ], @@ -5255,9 +5273,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.11.tgz", - "integrity": "sha512-vYQwzJvm/iu052d5Iw27UFALIN5xSrGkPZXxLNMHPySVko2QMNNBv35HLatkEQHbQ3X+VKSW9J9SkdtAvAVRAQ==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.12.tgz", + "integrity": "sha512-DhW47DQEZKCdSq92v5F03rqdpjRXdDMqxfu4uAlZ9Uo1wJEGvY23e1SNmhji2sVHsZbBjSvoXoBLk0v00nSG8w==", "cpu": [ "arm64" ], @@ -5271,9 +5289,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.11.tgz", - "integrity": "sha512-eV+KduiRYUFjPsvbZuJ9aknQH9Tj0U2/G9oIZSzLx/18WsYi+upzHbgxmIIHJ2VJgfd7nN40RI/hMtxNsUzR/g==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.12.tgz", + "integrity": "sha512-PR57pT3TssnCRvdsaKNsxZy9N8rFg9AKA1U7W+LxbZ/7Z7PHc5PjxF0GgZpE/aLmU6xOn5VyQTlzjoamVkt05g==", "cpu": [ "arm64" ], @@ -5287,9 +5305,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.11.tgz", - "integrity": "sha512-WA1iGXZ2HpqM1OR9VCQZJ8sQ1KP2or9O4bO8vWZo6HZJIeoQSo7aa9waaCLRpkZvkng1ct/TF/l6ymqSNFXIzQ==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.12.tgz", + "integrity": "sha512-HLZIWNHWuFIlH+LEmXr1lBiwGQeCshKOGcqbJyz7xpqTh7m2IPAxPWEhr/qmMTMsjluGxeIsLrcsgreTyXtgNA==", "cpu": [ "x64" ], @@ -5303,9 +5321,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.11.tgz", - "integrity": "sha512-UkVJToKf0owwQYRnGvjHAeYVDfeimCEcx0VQSbJoN7Iy0ckRZi7YPlmWJU31xtKvikE2bQWCOVe0qbSDqqcWXA==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.12.tgz", + "integrity": "sha512-M5fBAtoOcpz2YQAFtNemrPod5BqmzAJc8pYtT3dVTn1MJllhmLHlphU8BQytvoGr1PHgJL8ZJBlBGdt70LQ7Mw==", "cpu": [ "x64" ], @@ -5319,9 +5337,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.11.tgz", - "integrity": "sha512-35khwkyly7lF5NDSyvIrukBMzxPorgc5iTSDfVO/LvnmN5+fm4lTlrDr4tUfTdOhv3Emy7CsKlsNAeFRJ+Pm+w==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.12.tgz", + "integrity": "sha512-K8LjjgZ7VQFtM+eXqjfAJ0z+TKVDng3r59QYn7CL6cyxZI2brLU3lNknZcUFSouZD+gsghZI/Zb8tQjVk7aKDQ==", "cpu": [ "arm64" ], @@ -5335,9 +5353,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.11.tgz", - "integrity": "sha512-Wx8/6f0ufgQF2pbVPsJ2dAmFLwIOW+xBE5fxnb7VnEbGkTgP1qMDWiiAtD9rtvDSuODG3i1AEmAak/2HAc6i6A==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.12.tgz", + "integrity": "sha512-hflO5LCxozngoOmiQbDPyvt6ODc5Cu9AwTJP9uH/BSMPdEQ6PCnefuUOJLAKew2q9o+NmDORuJk+vgqQz9Uzpg==", "cpu": [ "ia32" ], @@ -5351,9 +5369,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.11.tgz", - "integrity": "sha512-0xRFW6K9UZQH2NVC/0pVB0GJXS45lY24f+6XaPBF1YnMHd8A8GoHl7ugyM5yNUTe2AKhSgk5fJV00EJt/XBtdQ==", + "version": "1.4.12", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.12.tgz", + "integrity": "sha512-3A4qMtddBDbtprV5edTB/SgJn9L+X5TL7RGgS3eWtEgn/NG8gA80X/scjf1v2MMeOsrcxiYhnemI2gXCKuQN2g==", "cpu": [ "x64" ], @@ -5749,9 +5767,9 @@ } }, "node_modules/@types/google.maps": { - "version": "3.55.5", - "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.55.5.tgz", - "integrity": "sha512-U1QwCo1GeeLm0YI/GoHvfd1VfwgnoUSBcKCMXXFAM+2izSSuqqwZUJ9XNO6NxZxmYKjBNI+NF5eGF6uUSb1aSg==", + "version": "3.55.7", + "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.55.7.tgz", + "integrity": "sha512-SlWFx0vo7RSAOC63+PTz8FeqLDaRYs7PrS/L0bZSKswxIN5TnCuckbeIwZpgD/S+DWalPteXfDbg5JsUER5Cyw==", "dev": true }, "node_modules/@types/hast": { @@ -5851,9 +5869,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", - "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", + "version": "20.12.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.5.tgz", + "integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==", "dependencies": { "undici-types": "~5.26.4" } @@ -5930,9 +5948,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.23", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.23.tgz", - "integrity": "sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A==", + "version": "18.2.24", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.24.tgz", + "integrity": "sha512-cN6upcKd8zkGy4HU9F1+/s98Hrp6D4MOcippK4PoE8OZRngohHZpbJn1GsaDLz87MqvHNoT13nHvNqM9ocRHZg==", "dev": true, "dependencies": { "@types/react": "*" @@ -7629,9 +7647,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001603", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001603.tgz", - "integrity": "sha512-iL2iSS0eDILMb9n5yKQoTBim9jMZ0Yrk8g0N9K7UzYyWnfIKzXBZD5ngpM37ZcL/cv0Mli8XtVMRYMQAfFpi5Q==", + "version": "1.0.30001607", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001607.tgz", + "integrity": "sha512-WcvhVRjXLKFB/kmOFVwELtMxyhq3iM/MvmXcyCe2PNf166c39mptscOc/45TTS96n2gpNV2z7+NakArTWZCQ3w==", "dev": true, "funding": [ { @@ -8339,9 +8357,9 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cypress": { - "version": "13.7.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.1.tgz", - "integrity": "sha512-4u/rpFNxOFCoFX/Z5h+uwlkBO4mWzAjveURi3vqdSu56HPvVdyGTxGw4XKGWt399Y1JwIn9E1L9uMXQpc0o55w==", + "version": "13.7.2", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.2.tgz", + "integrity": "sha512-FF5hFI5wlRIHY8urLZjJjj/YvfCBrRpglbZCLr/cYcL9MdDe0+5usa8kTIrDHthlEc9lwihbkb5dmwqBDNS2yw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -9301,9 +9319,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.722", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.722.tgz", - "integrity": "sha512-5nLE0TWFFpZ80Crhtp4pIp8LXCztjYX41yUcV6b+bKR2PqzjskTMOOlBi1VjBHlvHwS+4gar7kNKOrsbsewEZQ==", + "version": "1.4.729", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.729.tgz", + "integrity": "sha512-bx7+5Saea/qu14kmPTDHQxkp2UnziG3iajUQu3BxFvCOnpAJdDbMV4rSl+EqFDkkpNNVUFlR1kDfpL59xfy1HA==", "dev": true }, "node_modules/emoji-regex": { @@ -10031,9 +10049,9 @@ "dev": true }, "node_modules/eslint-plugin-mdx/node_modules/@types/node": { - "version": "18.19.28", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.28.tgz", - "integrity": "sha512-J5cOGD9n4x3YGgVuaND6khm5x07MMdAKkRyXnjVR6KFhLMNh2yONGiP7Z+4+tBOt5mK+GvDTiacTOVGGpqiecw==", + "version": "18.19.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.30.tgz", + "integrity": "sha512-453z1zPuJLVDbyahaa1sSD5C2sht6ZpHp5rgJNs+H8YGqhluCXcuOUmBYsAo0Tos0cHySJ3lVUGbGgLlqIkpyg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -13479,6 +13497,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hi-profiles": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/hi-profiles/-/hi-profiles-1.0.6.tgz", + "integrity": "sha512-CCNbYp8iUBco19dBdpkDxF5RXRQRzfRixBu89A5SZHpPTInHEWynqLZdoCDe2n1bGcD24Lr5NLJB9oBJE4nawg==", + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-icons": "^4.11.0" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -18126,25 +18154,13 @@ "node": ">=8" } }, - "node_modules/path2d": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path2d/-/path2d-0.1.1.tgz", - "integrity": "sha512-/+S03c8AGsDYKKBtRDqieTJv2GlkMb0bWjnqOgtF6MkjdUQ9a8ARAtxWf9NgKLGm2+WQr6+/tqJdU8HNGsIDoA==", - "optional": true, - "engines": { - "node": ">=6" - } - }, "node_modules/path2d-polyfill": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.1.1.tgz", - "integrity": "sha512-4Rka5lN+rY/p0CdD8+E+BFv51lFaFvJOrlOhyQ+zjzyQrzyh3ozmxd1vVGGDdIbUFSBtIZLSnspxTgPT0iJhvA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz", + "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA==", "optional": true, - "dependencies": { - "path2d": "0.1.1" - }, "engines": { - "node": ">=18" + "node": ">=8" } }, "node_modules/pathe": { @@ -18772,9 +18788,9 @@ } }, "node_modules/property-information": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.1.tgz", - "integrity": "sha512-OHYtXfu5aI2sS2LWFSN5rgJjrQ4pCy8i1jubJLe2QvMF8JJ++HXTUIVWFLfXJoaOfvYYjk2SN8J2wFUWIGXT4w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", + "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -19044,9 +19060,9 @@ } }, "node_modules/react-dnd-scrolling": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/react-dnd-scrolling/-/react-dnd-scrolling-1.3.6.tgz", - "integrity": "sha512-P0GWFVJQWgaEpKn3V3C6xcV9jgYpuZmU674xpokryg/thqv7NWES3zG44uet+r2Iyv7oviEe8q3WAfBESApvSg==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/react-dnd-scrolling/-/react-dnd-scrolling-1.3.7.tgz", + "integrity": "sha512-iLMziS6A4fxiCBpheb+B5T3I8SnZtAeAJszADLavkCvCX+gWt0ElL7Z895c1xLZOlFTWvHPfeCMYtP5ELqV8zQ==", "dependencies": { "hoist-non-react-statics": "3.x", "lodash.throttle": "^4.1.1", @@ -19166,6 +19182,14 @@ } } }, + "node_modules/react-icons": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.12.0.tgz", + "integrity": "sha512-IBaDuHiShdZqmfc/TwHu6+d6k2ltNCf3AszxNmjJc1KUfXdEeRJOKyNvLmAHaarhzGmTSVygNdyu8/opXv2gaw==", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-infinite-scroll-component": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/react-infinite-scroll-component/-/react-infinite-scroll-component-6.1.0.tgz", @@ -21298,9 +21322,9 @@ } }, "node_modules/snyk": { - "version": "1.1286.2", - "resolved": "https://registry.npmjs.org/snyk/-/snyk-1.1286.2.tgz", - "integrity": "sha512-gb7PfujO1uJY7iDkmxq1d32bth/e2CZ1Yw28E620punYyf7rcwzO06BnRB65lbbxqnhfpb8L+pnbH4ZYkyNs5g==", + "version": "1.1287.0", + "resolved": "https://registry.npmjs.org/snyk/-/snyk-1.1287.0.tgz", + "integrity": "sha512-ZpsMjXLy5NPoMk0HbylsSDbhA6S8wSMqWO2DupIlJ7Q1URiv4+dOiL4wUYPViMFFNi9HdoYF00cxJyM1Y5I4QQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -21632,9 +21656,9 @@ } }, "node_modules/stringify-entities": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", - "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" @@ -22065,9 +22089,9 @@ } }, "node_modules/terser": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.0.tgz", - "integrity": "sha512-Y/SblUl5kEyEFzhMAQdsxVHh+utAxd4IuRNJzKywY/4uzSogh3G219jqbDDxYu4MXO9CzY3tSEqmZvW6AoEDJw==", + "version": "5.30.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", + "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -22445,9 +22469,9 @@ "dev": true }, "node_modules/tsx": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.1.tgz", - "integrity": "sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", + "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", "dev": true, "dependencies": { "esbuild": "~0.19.10", @@ -23005,9 +23029,9 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -23052,9 +23076,9 @@ } }, "node_modules/undici": { - "version": "5.28.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", - "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" @@ -23666,9 +23690,9 @@ } }, "node_modules/vfile-reporter": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-8.1.0.tgz", - "integrity": "sha512-NfHyHdkCcy0BsXiLA3nId29TY7W7hgpc8nd8Soe3imATx5N4/+mkLYdMR+Y6Zvu6BXMMi0FZsD4FLCm1dN85Pg==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-8.1.1.tgz", + "integrity": "sha512-qxRZcnFSQt6pWKn3PAk81yLK2rO2i7CDXpy8v8ZquiEOMLSnPw6BMSi9Y1sUCwGGl7a9b3CJT1CKpnRF7pp66g==", "dependencies": { "@types/supports-color": "^8.0.0", "string-width": "^6.0.0", @@ -23792,9 +23816,9 @@ } }, "node_modules/vite": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.7.tgz", - "integrity": "sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==", + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz", + "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==", "dev": true, "dependencies": { "esbuild": "^0.20.1", @@ -23994,9 +24018,9 @@ "dev": true }, "node_modules/vite/node_modules/rollup": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.2.tgz", - "integrity": "sha512-MIlLgsdMprDBXC+4hsPgzWUasLO9CE4zOkj/u6j+Z6j5A4zRY+CtiXAdJyPtgCsc42g658Aeh1DlrdVEJhsL2g==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.1.tgz", + "integrity": "sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -24009,21 +24033,21 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.13.2", - "@rollup/rollup-android-arm64": "4.13.2", - "@rollup/rollup-darwin-arm64": "4.13.2", - "@rollup/rollup-darwin-x64": "4.13.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.13.2", - "@rollup/rollup-linux-arm64-gnu": "4.13.2", - "@rollup/rollup-linux-arm64-musl": "4.13.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.13.2", - "@rollup/rollup-linux-riscv64-gnu": "4.13.2", - "@rollup/rollup-linux-s390x-gnu": "4.13.2", - "@rollup/rollup-linux-x64-gnu": "4.13.2", - "@rollup/rollup-linux-x64-musl": "4.13.2", - "@rollup/rollup-win32-arm64-msvc": "4.13.2", - "@rollup/rollup-win32-ia32-msvc": "4.13.2", - "@rollup/rollup-win32-x64-msvc": "4.13.2", + "@rollup/rollup-android-arm-eabi": "4.14.1", + "@rollup/rollup-android-arm64": "4.14.1", + "@rollup/rollup-darwin-arm64": "4.14.1", + "@rollup/rollup-darwin-x64": "4.14.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.1", + "@rollup/rollup-linux-arm64-gnu": "4.14.1", + "@rollup/rollup-linux-arm64-musl": "4.14.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.1", + "@rollup/rollup-linux-riscv64-gnu": "4.14.1", + "@rollup/rollup-linux-s390x-gnu": "4.14.1", + "@rollup/rollup-linux-x64-gnu": "4.14.1", + "@rollup/rollup-linux-x64-musl": "4.14.1", + "@rollup/rollup-win32-arm64-msvc": "4.14.1", + "@rollup/rollup-win32-ia32-msvc": "4.14.1", + "@rollup/rollup-win32-x64-msvc": "4.14.1", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index 3e99650ccec..7158185191c 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "echarts-for-react": "^3.0.2", "eslint-mdx": "^3.1.5", "events": "^3.3.0", + "hi-profiles": "^1.0.6", "i18next": "^23.2.7", "i18next-browser-languagedetector": "^7.1.0", "lodash-es": "^4.17.21", diff --git a/src/Common/constants.tsx b/src/Common/constants.tsx index 1a3099e45c8..ba71b4cc171 100644 --- a/src/Common/constants.tsx +++ b/src/Common/constants.tsx @@ -5,6 +5,10 @@ import { dateQueryString } from "../Utils/utils"; import { IconName } from "../CAREUI/icons/CareIcon"; import { PhoneNumberValidator } from "../Components/Form/FieldValidators"; import { SchemaType } from "./schemaParser"; +import { + ConsentHIType, + ConsentPurpose, +} from "../Components/ABDM/types/consent"; export const RESULTS_PER_PAGE_LIMIT = 14; export const PAGINATION_LIMIT = 36; @@ -697,6 +701,7 @@ export const CONSULTATION_TABS = [ { text: "PRESSURE_SORE", desc: "Pressure Sore" }, { text: "NURSING", desc: "Nursing" }, { text: "DIALYSIS", desc: "Dialysis" }, + { text: "ABDM", desc: "ABDM Records" }, ]; export const RHYTHM_CHOICES: Array = [ @@ -1097,6 +1102,26 @@ export const ExternalResultImportSchema: SchemaType = { Result: { prop: "result", type: "string" }, }; +// ABDM +export const ABDM_CONSENT_PURPOSE = [ + { value: "CAREMGT", label: "Care Management" }, + { value: "BTG", label: "Break The Glass" }, + { value: "PUBHLTH", label: "Public Health" }, + { value: "HPAYMT", label: "Healthcare Payment" }, + { value: "DSRCH", label: "Disease Specific Healthcare Research" }, + { value: "PATRQT", label: "Self Requested" }, +] as { value: ConsentPurpose; label: string }[]; + +export const ABDM_HI_TYPE = [ + { value: "Prescription", label: "Prescription" }, + { value: "DiagnosticReport", label: "Diagnostic Report" }, + { value: "OPConsultation", label: "Op Consultation" }, + { value: "DischargeSummary", label: "Discharge Summary" }, + { value: "ImmunizationRecord", label: "Immunization Record" }, + { value: "HealthDocumentRecord", label: "Record Artifact" }, + { value: "WellnessRecord", label: "Wellness Record" }, +] as { value: ConsentHIType; label: string }[]; + export const USER_TYPES_MAP = { Pharmacist: "Pharmacist", Volunteer: "Volunteer", diff --git a/src/Components/ABDM/ABDMFacilityRecords.tsx b/src/Components/ABDM/ABDMFacilityRecords.tsx new file mode 100644 index 00000000000..8178e037a7f --- /dev/null +++ b/src/Components/ABDM/ABDMFacilityRecords.tsx @@ -0,0 +1,166 @@ +import { Link } from "raviger"; +import routes from "../../Redux/api"; +import useQuery from "../../Utils/request/useQuery"; +import { formatDateTime } from "../../Utils/utils"; +import Loading from "../Common/Loading"; +import Page from "../Common/components/Page"; + +interface IProps { + facilityId: string; +} + +const TableHeads = [ + "Patient", + "Status", + "Created On", + "Consent Granted On", + // "Requested By", + "Health Information Range", + "Expires On", + "HI Profiles", +]; + +export default function ABDMFacilityRecords({ facilityId }: IProps) { + const { data: consentsResult, loading } = useQuery(routes.abha.listConsents, { + query: { facility: facilityId, ordering: "-created_date" }, + }); + + if (loading) { + return ; + } + + return ( + +
+
+
+
+
+ {/* eslint-disable-next-line tailwindcss/migration-from-tailwind-2 */} +
+ + + + {TableHeads.map((head) => ( + + ))} + + + + + {consentsResult?.results.map((consent) => ( + + + + + + + + + + {/* */} + + + + + + + + + + ))} + +
+ {head} + + View +
+ {consent.patient_abha_object?.name} +

+ ({consent.patient_abha}) +

+
+ {new Date( + consent.consent_artefacts?.[0]?.expiry ?? + consent.expiry, + ) < new Date() + ? "EXPIRED" + : consent.consent_artefacts?.[0]?.status ?? + consent.status} + + {formatDateTime(consent.created_date)} + + {consent.consent_artefacts.length + ? formatDateTime( + consent.consent_artefacts[0].created_date, + ) + : "-"} + + {`${consent.requester?.first_name} ${consent.requester?.last_name}`.trim()} +

+ ({consent.requester.username}) +

+
+ {formatDateTime( + consent.consent_artefacts?.[0]?.from_time ?? + consent.from_time, + )}{" "} +
+ {formatDateTime( + consent.consent_artefacts?.[0]?.to_time ?? + consent.to_time, + )} +
+ {formatDateTime( + consent.consent_artefacts?.[0]?.expiry ?? + consent.expiry, + )} + +
+ {( + consent.consent_artefacts?.[0]?.hi_types ?? + consent.hi_types + )?.map((hiType) => ( + + {hiType} + + ))} +
+
+
+ {(consent.consent_artefacts?.[0]?.status ?? + consent.status) === "GRANTED" && + new Date( + consent.consent_artefacts?.[0]?.expiry ?? + consent.expiry, + ) > new Date() ? ( + + View + + ) : ( +

+ View +

+ )} +
+
+
+
+
+
+
+
+ ); +} diff --git a/src/Components/ABDM/ABDMRecordsTab.tsx b/src/Components/ABDM/ABDMRecordsTab.tsx new file mode 100644 index 00000000000..7fe38011796 --- /dev/null +++ b/src/Components/ABDM/ABDMRecordsTab.tsx @@ -0,0 +1,180 @@ +import { ConsentArtefactModel, ConsentRequestModel } from "./types/consent"; +import dayjs from "dayjs"; +import { ABDM_CONSENT_PURPOSE } from "../../Common/constants"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import ButtonV2 from "../Common/components/ButtonV2"; +import * as Notification from "../../Utils/Notifications.js"; +import Loading from "../Common/Loading"; +import { classNames } from "../../Utils/utils"; +import { Link } from "raviger"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; +import useQuery from "../../Utils/request/useQuery"; + +interface IConsentArtefactCardProps { + artefact: ConsentArtefactModel; +} + +function ConsentArtefactCard({ artefact }: IConsentArtefactCardProps) { + return ( + +
+
+
+ {artefact.hip} +
+

+ created {dayjs(artefact.created_date).fromNow()} +

+
+
+
{artefact.status}
+
+ {dayjs(artefact.from_time).format("MMM DD YYYY")} -{" "} + {dayjs(artefact.to_time).format("MMM DD YYYY")} +
+

+ expires in {dayjs(artefact.expiry).fromNow()} +

+
+
+
+ {artefact.hi_types.map((hiType) => { + return ( +
+ {hiType} +
+ ); + })} +
+ + ); +} + +interface IConsentRequestCardProps { + consent: ConsentRequestModel; +} + +function ConsentRequestCard({ consent }: IConsentRequestCardProps) { + return ( +
+
+
+
+ { + ABDM_CONSENT_PURPOSE.find((p) => p.value === consent.purpose) + ?.label + } +
+
+ {consent.requester.first_name} {consent.requester.last_name} +
+
+
+
+ {dayjs(consent.from_time).format("MMM DD YYYY")} -{" "} + {dayjs(consent.to_time).format("MMM DD YYYY")} +
+

+ expires in {dayjs(consent.expiry).fromNow()} +

+
+
+ { + const { res, error } = await request( + routes.abha.checkConsentStatus, + { + pathParams: { id: consent.id }, + }, + ); + + if (res?.status === 200) { + Notification.Success({ + msg: "Checking Status!", + }); + } else { + Notification.Error({ + msg: error?.message ?? "Error while checking status!", + }); + } + }} + ghost + className="max-w-2xl text-sm text-gray-700 hover:text-gray-900" + > + check status + +

+ created {dayjs(consent.created_date).fromNow()} +

+

+ modified {dayjs(consent.modified_date).fromNow()} +

+
+
+ {consent.consent_artefacts?.length ? ( +
+ {consent.consent_artefacts?.map((artefact) => ( + + ))} +
+ ) : ( +
+

+ {consent.status === "REQUESTED" + ? "Waiting for the Patient to approve the consent request" + : "Patient has rejected the consent request"} +

+
+ )} +
+ {consent.hi_types.map((hiType) => { + return ( +
+ {hiType} +
+ ); + })} +
+
+ ); +} + +interface IProps { + patientId: string; +} + +export default function ABDMRecordsTab({ patientId }: IProps) { + const { data, loading } = useQuery(routes.abha.listConsents, { + query: { + patient: patientId, + ordering: "-created_date", + }, + }); + + if (loading) { + ; + } + + return ( +
+ {data?.results.map((record) => { + return ; + })} +
+ ); +} diff --git a/src/Components/ABDM/FetchRecordsModal.tsx b/src/Components/ABDM/FetchRecordsModal.tsx new file mode 100644 index 00000000000..8273a9763f1 --- /dev/null +++ b/src/Components/ABDM/FetchRecordsModal.tsx @@ -0,0 +1,225 @@ +import * as Notification from "../../Utils/Notifications.js"; + +import ButtonV2 from "../Common/components/ButtonV2"; +import DialogModal from "../Common/Dialog"; +import { PatientModel } from "../Patient/models"; +import TextFormField from "../Form/FormFields/TextFormField"; +import { useState } from "react"; +import { + MultiSelectFormField, + SelectFormField, +} from "../Form/FormFields/SelectFormField.js"; +import { ABDM_CONSENT_PURPOSE, ABDM_HI_TYPE } from "../../Common/constants.js"; +import DateRangeFormField from "../Form/FormFields/DateRangeFormField.js"; +import dayjs from "dayjs"; +import { navigate } from "raviger"; +import DateFormField from "../Form/FormFields/DateFormField.js"; +import request from "../../Utils/request/request.js"; +import routes from "../../Redux/api"; +import { useMessageListener } from "../../Common/hooks/useMessageListener.js"; +import CircularProgress from "../Common/components/CircularProgress.js"; +import CareIcon from "../../CAREUI/icons/CareIcon.js"; +import { classNames } from "../../Utils/utils.js"; +import { ConsentHIType, ConsentPurpose } from "./types/consent.js"; + +const getDate = (value: any) => + value && dayjs(value).isValid() && dayjs(value).toDate(); + +interface IProps { + patient: PatientModel; + show: boolean; + onClose: () => void; +} + +export default function FetchRecordsModal({ patient, show, onClose }: IProps) { + const [idVerificationStatus, setIdVerificationStatus] = useState< + "pending" | "in-progress" | "verified" | "failed" + >("pending"); + const [purpose, setPurpose] = useState("CAREMGT"); + const [fromDate, setFromDate] = useState( + dayjs().subtract(30, "day").toDate(), + ); + const [toDate, setToDate] = useState(dayjs().toDate()); + const [isMakingConsentRequest, setIsMakingConsentRequest] = useState(false); + const [hiTypes, setHiTypes] = useState([]); + const [expiryDate, setExpiryDate] = useState( + dayjs().add(30, "day").toDate(), + ); + const [errors, setErrors] = useState({}); + + useMessageListener((data) => { + if (data.type === "MESSAGE" && data.from === "patients/on_find") { + if ( + data.message?.patient?.id === patient?.abha_number_object?.health_id + ) { + setIdVerificationStatus("verified"); + setErrors({ + ...errors, + health_id: "", + }); + } + } + }); + + return ( + +
+ null} + disabled + label="Patient Identifier" + name="health_id" + error={errors.health_id} + className="flex-1" + /> + + { + const { res } = await request(routes.abha.findPatient, { + body: { + id: patient?.abha_number_object?.health_id, + }, + reattempts: 0, + }); + + if (res?.status) { + setIdVerificationStatus("in-progress"); + } + }} + loading={idVerificationStatus === "in-progress"} + ghost={idVerificationStatus === "verified"} + disabled={idVerificationStatus === "verified"} + className={classNames( + "mt-1.5 !py-3", + idVerificationStatus === "verified" && + "disabled:cursor-auto disabled:bg-transparent disabled:text-primary-600", + )} + > + {idVerificationStatus === "in-progress" && ( + + )} + {idVerificationStatus === "verified" && } + { + { + pending: "Verify Patient", + "in-progress": "Verifying", + verified: "Verified", + failed: "Retry", + }[idVerificationStatus] + } + +
+ o.label} + optionValue={(o) => o.value} + value={purpose} + onChange={({ value }) => setPurpose(value)} + required + /> + + { + setFromDate(e.value.start!); + setToDate(e.value.end!); + }} + label="Health Records range" + required + /> + + { + setHiTypes(ABDM_HI_TYPE.map((type) => type.value)); + }} + > + Select All + + ) + } + value={hiTypes} + optionLabel={(option) => option.label} + optionValue={(option) => option.value} + onChange={(e) => setHiTypes(e.value)} + required + /> + + setExpiryDate(e.value!)} + label="Consent Expiry Date" + required + disablePast + position="TOP-RIGHT" + /> + +
+ { + if (idVerificationStatus !== "verified") { + setErrors({ + ...errors, + health_id: "Please verify the patient identifier", + }); + + return; + } + + setIsMakingConsentRequest(true); + const { res } = await request(routes.abha.createConsent, { + body: { + patient_abha: patient?.abha_number_object?.health_id as string, + hi_types: hiTypes, + purpose, + from_time: fromDate, + to_time: toDate, + expiry: expiryDate, + }, + }); + + if (res?.status === 201) { + Notification.Success({ + msg: "Consent requested successfully!", + }); + + navigate( + `/facility/${patient.facility}/abdm` ?? + `/facility/${patient.facility}/patient/${patient.id}/consultation/${patient.last_consultation?.id}/abdm`, + ); + } else { + Notification.Error({ + msg: "Error while requesting consent!", + }); + } + setIsMakingConsentRequest(false); + onClose(); + }} + loading={isMakingConsentRequest} + > + Request Consent + +
+
+ ); +} diff --git a/src/Components/ABDM/HealthInformation.tsx b/src/Components/ABDM/HealthInformation.tsx new file mode 100644 index 00000000000..ceff48a0b7d --- /dev/null +++ b/src/Components/ABDM/HealthInformation.tsx @@ -0,0 +1,72 @@ +import routes from "../../Redux/api"; +import useQuery from "../../Utils/request/useQuery"; +import Loading from "../Common/Loading"; +import Page from "../Common/components/Page"; +import { HIProfile } from "hi-profiles"; + +interface IProps { + artefactId: string; +} + +export default function HealthInformation({ artefactId }: IProps) { + const { data, loading, error } = useQuery(routes.abha.getHealthInformation, { + pathParams: { artefactId }, + silent: true, + }); + + if (loading) { + return ; + } + + const parseData = (data: any) => { + try { + return JSON.parse(data); + } catch (e) { + return JSON.parse( + data.replace(/"/g, '\\"').replace(/'/g, '"'), // eslint-disable-line + ); + } + }; + + return ( + +
+ {!!error?.is_archived && ( + <> +

+ This record has been archived +

+
+ This record has been archived and is no longer available for + viewing. +
+

+ This record was archived on{" "} + {new Date(error?.archived_time as string).toLocaleString()} as{" "} + {error?.archived_reason as string} +

+ + )} + {error && !error?.is_archived && ( + <> +

+ This record hasn't been fetched yet +

+
+ This record hasn't been fetched yet. Please try again later. +
+

+ Waiting for the HIP to send the record. +

+ + )} + {data?.data.map((item) => ( + + ))} +
+
+ ); +} diff --git a/src/Components/ABDM/types/abha.ts b/src/Components/ABDM/types/abha.ts new file mode 100644 index 00000000000..d45986e8f8f --- /dev/null +++ b/src/Components/ABDM/types/abha.ts @@ -0,0 +1,21 @@ +export type AbhaNumberModel = { + id: number; + external_id: string; + created_date: string; + modified_date: string; + abha_number: string; + health_id: string; + name: string; + first_name: string | null; + middle_name: string | null; + last_name: string | null; + gender: "F" | "M" | "O"; + date_of_birth: string | null; + address: string | null; + district: string | null; + state: string | null; + pincode: string | null; + email: string | null; + profile_photo: string | null; + new: boolean; +}; diff --git a/src/Components/ABDM/types/consent.ts b/src/Components/ABDM/types/consent.ts new file mode 100644 index 00000000000..9ca60c7bd99 --- /dev/null +++ b/src/Components/ABDM/types/consent.ts @@ -0,0 +1,89 @@ +import { UserBaseModel } from "../../Users/models"; +import { AbhaNumberModel } from "./abha"; + +export type ConsentPurpose = + | "CAREMGT" + | "BTG" + | "PUBHLTH" + | "HPAYMT" + | "DSRCH" + | "PATRQT"; + +export type ConsentStatus = + | "REQUESTED" + | "GRANTED" + | "DENIED" + | "EXPIRED" + | "REVOKED"; + +export type ConsentHIType = + | "Prescription" + | "DiagnosticReport" + | "OPConsultation" + | "DischargeSummary" + | "ImmunizationRecord" + | "HealthDocumentRecord" + | "WellnessRecord"; + +export type ConsentAccessMode = "VIEW" | "STORE" | "QUERY" | "STREAM"; + +export type ConsentFrequencyUnit = "HOUR" | "DAY" | "WEEK" | "MONTH" | "YEAR"; + +export type ConsentCareContext = { + patientReference: string; + careContextReference: string; +}; + +export type ConsentModel = { + id: string; + consent_id: null | string; + + patient_abha: string; + care_contexts: ConsentCareContext[]; + + status: ConsentStatus; + purpose: ConsentPurpose; + hi_types: ConsentHIType[]; + + access_mode: ConsentAccessMode; + from_time: string; + to_time: string; + expiry: string; + + frequency_unit: ConsentFrequencyUnit; + frequency_value: number; + frequency_repeats: number; + + hip: null | string; + hiu: null | string; + + created_date: string; + modified_date: string; +}; + +export type CreateConsentTBody = { + patient_abha: string; + hi_types: ConsentHIType[]; + purpose: ConsentPurpose; + from_time: Date | string; + to_time: Date | string; + expiry: Date | string; + + access_mode?: ConsentAccessMode; + frequency_unit?: ConsentFrequencyUnit; + frequency_value?: number; + frequency_repeats?: number; + hip?: null | string; +}; + +export type ConsentArtefactModel = { + consent_request: string; + + cm: null | string; +} & ConsentModel; + +export type ConsentRequestModel = { + requester: UserBaseModel; + patient_abha_object: AbhaNumberModel; + consent_artefacts: ConsentArtefactModel[]; +} & ConsentModel; diff --git a/src/Components/ABDM/types/health-information.ts b/src/Components/ABDM/types/health-information.ts new file mode 100644 index 00000000000..eeb1c53a4fb --- /dev/null +++ b/src/Components/ABDM/types/health-information.ts @@ -0,0 +1,6 @@ +export type HealthInformationModel = { + data: { + content: string; + care_context_reference: string; + }[]; +}; diff --git a/src/Components/Common/DateInputV2.tsx b/src/Components/Common/DateInputV2.tsx index 3570f9e2490..c68ba74a90d 100644 --- a/src/Components/Common/DateInputV2.tsx +++ b/src/Components/Common/DateInputV2.tsx @@ -8,7 +8,13 @@ import * as Notification from "../../Utils/Notifications.js"; import { t } from "i18next"; type DatePickerType = "date" | "month" | "year"; -export type DatePickerPosition = "LEFT" | "RIGHT" | "CENTER"; +export type DatePickerPosition = + | "LEFT" + | "RIGHT" + | "CENTER" + | "TOP-LEFT" + | "TOP-RIGHT" + | "TOP-CENTER"; interface Props { id?: string; @@ -223,6 +229,12 @@ const DateInputV2: React.FC = ({ return "right-0 transform translate-x-1/2"; case "CENTER": return "transform -translate-x-1/2"; + case "TOP-LEFT": + return "bottom-full left-full"; + case "TOP-RIGHT": + return "bottom-full right-0"; + case "TOP-CENTER": + return "bottom-full left-1/2 transform -translate-x-1/2"; default: return "left-0"; } @@ -260,11 +272,18 @@ const DateInputV2: React.FC = ({ -
+
= ({ } }} /> -
- - -
- {type === "date" && ( -
- {dayjs(datePickerHeaderDate).format("MMMM")} -
- )} -
+
+
-
- -
-
- {type === "date" && ( - <> -
- {DAYS.map((day, i) => ( + + + +
+ {type === "date" && ( +
+ {dayjs(datePickerHeaderDate).format("MMMM")} +
+ )}
-
- {day} -
+

+ {type == "year" + ? year.getFullYear() + : dayjs(datePickerHeaderDate).format("YYYY")} +

- ))} -
-
- {blankDays.map((_, i) => ( -
- ))} - {dayCount.map((d, i) => { - const withinConstraints = isDateWithinConstraints(d); - const selected = value && isSelectedDate(d); - - const baseClasses = - "flex h-full items-center justify-center rounded text-center text-sm leading-loose transition duration-100 ease-in-out"; - let conditionalClasses = ""; - - if (withinConstraints) { - if (selected) { - conditionalClasses = - "bg-primary-500 font-bold text-white"; - } else { - conditionalClasses = - "hover:bg-gray-300 cursor-pointer"; - } - } else { - conditionalClasses = - "!cursor-not-allowed !text-gray-400"; +
+ +
+ + {type === "date" && ( + <> +
+ {DAYS.map((day, i) => (
- {d} +
+ {day} +
-
- ); - })} -
- - )} - {type === "month" && ( -
- {Array(12) - .fill(null) - .map((_, i) => ( -
- {dayjs( - new Date( - datePickerHeaderDate.getFullYear(), - i, - 1, - ), - ).format("MMM")} + ))}
- ))} -
- )} - {type === "year" && ( -
- {Array(12) - .fill(null) - .map((_, i) => { - const y = year.getFullYear() - 11 + i; - return ( -
- {y} -
- ); - })} +
+ {blankDays.map((_, i) => ( +
+ ))} + {dayCount.map((d, i) => { + const withinConstraints = + isDateWithinConstraints(d); + const selected = value && isSelectedDate(d); + + const baseClasses = + "flex h-full items-center justify-center rounded text-center text-sm leading-loose transition duration-100 ease-in-out"; + let conditionalClasses = ""; + + if (withinConstraints) { + if (selected) { + conditionalClasses = + "bg-primary-500 font-bold text-white"; + } else { + conditionalClasses = + "hover:bg-gray-300 cursor-pointer"; + } + } else { + conditionalClasses = + "!cursor-not-allowed !text-gray-400"; + } + return ( +
+
+ {d} +
+
+ ); + })} +
+ + )} + {type === "month" && ( +
+ {Array(12) + .fill(null) + .map((_, i) => ( +
+ {dayjs( + new Date( + datePickerHeaderDate.getFullYear(), + i, + 1, + ), + ).format("MMM")} +
+ ))} +
+ )} + {type === "year" && ( +
+ {Array(12) + .fill(null) + .map((_, i) => { + const y = year.getFullYear() - 11 + i; + return ( +
+ {y} +
+ ); + })} +
+ )}
- )} +
)}
diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index b670f60c84c..ffcd9166f23 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -33,6 +33,7 @@ import { ConsultationVentilatorTab } from "./ConsultationVentilatorTab"; import { ConsultationPressureSoreTab } from "./ConsultationPressureSoreTab"; import { ConsultationDialysisTab } from "./ConsultationDialysisTab"; import { ConsultationNeurologicalMonitoringTab } from "./ConsultationNeurologicalMonitoringTab"; +import ABDMRecordsTab from "../../ABDM/ABDMRecordsTab"; import { ConsultationNutritionTab } from "./ConsultationNutritionTab"; import PatientNotesSlideover from "../PatientNotesSlideover"; import { AssetBedModel } from "../../Assets/AssetTypes"; @@ -67,6 +68,7 @@ const TABS = { NUTRITION: ConsultationNutritionTab, PRESSURE_SORE: ConsultationPressureSoreTab, DIALYSIS: ConsultationDialysisTab, + ABDM: ABDMRecordsTab, }; export const ConsultationDetails = (props: any) => { @@ -336,7 +338,7 @@ export const ConsultationDetails = (props: any) => {
-
+
{ > View Users - {hasPermissionToDeleteFacility && ( + navigate(`/facility/${facilityId}/abdm`)} + icon={} + > + View ABDM Records + + {hasPermissionToDeleteFacility ? ( { > Delete Facility + ) : ( + <> )}
diff --git a/src/Components/Form/MultiSelectMenuV2.tsx b/src/Components/Form/MultiSelectMenuV2.tsx index 5fc466090a7..1568c3f6e84 100644 --- a/src/Components/Form/MultiSelectMenuV2.tsx +++ b/src/Components/Form/MultiSelectMenuV2.tsx @@ -130,7 +130,7 @@ const MultiSelectMenuV2 = (props: Props) => {
- + {options.map((option, index) => ( Link Care Context
+
{ + close(); + setShowFetchABDMRecords(true); + triggerGoal("Patient Card Button Clicked", { + buttonName: "Fetch Records over ABDM", + consultationId: consultation?.id, + userId: authUser?.id, + }); + }} + > + + Fetch Records over ABDM +
)} @@ -896,6 +915,11 @@ export default function PatientInfoCard(props: { show={showLinkCareContext} onClose={() => setShowLinkCareContext(false)} /> + setShowFetchABDMRecords(false)} + /> ); } diff --git a/src/Components/Users/models.tsx b/src/Components/Users/models.tsx index 4aa315ea6f9..1bbe494b9ed 100644 --- a/src/Components/Users/models.tsx +++ b/src/Components/Users/models.tsx @@ -46,6 +46,16 @@ export type UserModel = UserBareMinimum & { weekly_working_hours?: string | null; }; +export type UserBaseModel = { + email: string; + first_name: string; + last_name: string; + id: number; + user_type: UserRole; + username: string; + last_login: string | undefined; +}; + export interface SkillObjectModel { id: string; name: string; diff --git a/src/Redux/api.tsx b/src/Redux/api.tsx index 82ae52f26a4..3499bd3d2a5 100644 --- a/src/Redux/api.tsx +++ b/src/Redux/api.tsx @@ -1,5 +1,9 @@ import { IConfig } from "../Common/hooks/useConfig"; - +import { + ConsentRequestModel, + CreateConsentTBody, +} from "../Components/ABDM/types/consent"; +import { HealthInformationModel } from "../Components/ABDM/types/health-information"; import { IAadhaarOtp, IAadhaarOtpTBody, @@ -1440,6 +1444,43 @@ const routes = { TRes: Type(), TBody: Type(), }, + + listConsents: { + path: "/api/v1/abdm/consent/", + method: "GET", + TRes: Type>(), + }, + + createConsent: { + path: "/api/v1/abdm/consent/", + method: "POST", + TRes: Type(), + TBody: Type(), + }, + + getConsent: { + path: "/api/v1/abdm/consent/{id}/", + method: "GET", + }, + + checkConsentStatus: { + path: "/api/v1/abdm/consent/{id}/status/", + method: "GET", + TRes: Type(), + }, + + getHealthInformation: { + path: "/api/v1/abdm/health_information/{artefactId}", + method: "GET", + TRes: Type(), + }, + + findPatient: { + path: "/api/v1/abdm/patients/find/", + method: "POST", + TRes: Type(), + TBody: Type<{ id: string }>(), + }, }, // Prescription endpoints diff --git a/src/Routers/AppRouter.tsx b/src/Routers/AppRouter.tsx index eb6b21f54f1..04f9223e654 100644 --- a/src/Routers/AppRouter.tsx +++ b/src/Routers/AppRouter.tsx @@ -13,6 +13,8 @@ import { import { BLACKLISTED_PATHS } from "../Common/constants"; import useConfig from "../Common/hooks/useConfig"; import SessionExpired from "../Components/ErrorPages/SessionExpired"; +import HealthInformation from "../Components/ABDM/HealthInformation"; +import ABDMFacilityRecords from "../Components/ABDM/ABDMFacilityRecords"; import UserRoutes from "./routes/UserRoutes"; import PatientRoutes from "./routes/PatientRoutes"; @@ -44,6 +46,13 @@ const Routes = { ), "/notice_board": () => , + "/abdm/health-information/:id": ({ id }: { id: string }) => ( + + ), + "/facility/:facilityId/abdm": ({ facilityId }: any) => ( + + ), + "/session-expired": () => , "/not-found": () => , }; diff --git a/src/service-worker.ts b/src/service-worker.ts index f8e4bfef845..426f6b90621 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -34,7 +34,7 @@ self.addEventListener("push", async function (event) { if (event.data) { const data = JSON.parse(event.data.text()); - if (["PUSH_MESSAGE"].includes(data?.type)) { + if (["PUSH_MESSAGE", "MESSAGE"].includes(data?.type)) { self.clients.matchAll().then((clients) => { clients[0].postMessage(data); });