diff --git a/.codeclimate.yml b/.codeclimate.yml index eea24d2f1b7..235441e49a3 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,4 +1,4 @@ plugins: eslint: - enabled: true + enabled: false channel: "eslint-7" diff --git a/.github/workflows/combine.yml b/.github/workflows/combine.yml new file mode 100644 index 00000000000..d44461ff5a7 --- /dev/null +++ b/.github/workflows/combine.yml @@ -0,0 +1,23 @@ +name: Combine Dependencies + +on: workflow_dispatch + +# The minimum permissions required to run this Action +permissions: + contents: write + pull-requests: write + checks: read + +jobs: + combine-prs: + runs-on: ubuntu-latest + + steps: + - name: Combine dependencies + id: combine-dependencies + uses: github/combine-prs@v5.0.0 + with: + pr_title: Combined dependencies # The title of the pull request to create + select_label: dependencies # The label which marks PRs that should be combined. + labels: combined-dependencies # Add a label to the combined PR + ci_required: "false" # Whether or not CI should be passing to combine the PR diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0e4c9005787..8964b0c8e57 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,9 +13,9 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-label: "stale" stale-pr-label: "stale" - stale-issue-message: "Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity." + stale-issue-message: "Hi, @coronasafe/care-frontend-maintainers, This issue has been automatically marked as stale because it has not had any recent activity." stale-pr-message: "Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions." - close-pr-message: "Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, This pr has been automatically closed because it has not had any recent activity. Thank you for your contributions. Feel free to repopen the pr." + close-pr-message: "Hi, @coronasafe/care-frontend-maintainers, This PR has been automatically closed due to inactivity. Thank you for your contributions. Feel free to re-open the PR." exempt-issue-labels: "blocked,waiting for related PR,waiting for back end,help wanted,work-in-progress,In Progress,wishlist,EPIC" exempt-pr-labels: "tested,needs testing,need Review,waiting for related PR,waiting for back end,help wanted,blocked,work-in-progress,In Progress" days-before-issue-stale: 14 diff --git a/README.md b/README.md index 6e36f52b3f1..dbb306a1bd8 100644 --- a/README.md +++ b/README.md @@ -73,12 +73,33 @@ Authenticate to staging API with any of the following credentials #### ๐Ÿงช Run cypress tests -Ensure that the development server is running and then run the cypress tests in either of the ways described below. +To run cypress tests locally, you'll need to setup the backend to run locally and load dummy data required for cypress to the database. See [docs](https://github.com/coronasafe/care#self-hosting). + +Once backend is running locally, you'll have to ensure your local front-end is connected to local backend, by setting the `CARE_API` env. + +```env +#.env +CARE_API=http://127.0.0.1:9000 +``` + +Once done, start the development server by running + +```sh +npm run dev +``` + +Once development server is running, then run the cypress tests in either of the ways described below. + +```sh +npm run cypress:run # To run all tests in headless mode. +``` + +```sh +npm run cypress:run:gui # To run all tests in headed mode. +``` ```sh -$ npm run cypress:run # To run all tests in headless mode. -$ npm run cypress:run:gui # To run all tests in headed mode. -$ npm run cypress:open # To debug and run tests individually. +npm run cypress:open # To debug and run tests individually. ``` - Failed test screenshots are saved in `cypress/screenshots` diff --git a/cypress/e2e/assets_spec/assets_creation.cy.ts b/cypress/e2e/assets_spec/assets_creation.cy.ts index f8edc2bb172..cd3489a14d8 100644 --- a/cypress/e2e/assets_spec/assets_creation.cy.ts +++ b/cypress/e2e/assets_spec/assets_creation.cy.ts @@ -160,12 +160,10 @@ describe("Asset", () => { assetPage.interceptAssetCreation(); assetPage.clickCreateAsset(); assetPage.verifyAssetCreation(); - assetSearchPage.typeSearchKeyword("New Test Asset Vital"); assetSearchPage.pressEnter(); - assetPage.openCreatedAsset(); - assetPage.configureVitalAsset("Host name", "192.168.1.64"); + assetPage.configureVitalAsset("Host name", "192.168.1.20"); assetPage.clickConfigureVital(); }); diff --git a/cypress/e2e/external_results_spec/external_result.cy.ts b/cypress/e2e/external_results_spec/external_result.cy.ts index deb92ae5171..2091a5f93be 100644 --- a/cypress/e2e/external_results_spec/external_result.cy.ts +++ b/cypress/e2e/external_results_spec/external_result.cy.ts @@ -42,10 +42,10 @@ describe("Edit Profile Testing", () => { cy.intercept("POST", "/api/v1/external_result/bulk_upsert").as("import"); cy.get("div").contains("Import/Export").click(); cy.get("div").contains("Import Results").click(); - cy.get("[id=result-upload]") - .selectFile("cypress/fixtures/externalresultsample.csv") + cy.get("[data-testid=import-file]") + .selectFile("cypress/fixtures/externalresultsample.csv", { force: true }) .wait(100); - cy.get("button").contains("Save").click(); + cy.submitButton("Import"); cy.wait("@import").then((interception) => { expect(interception.response.statusCode).to.equal(202); }); diff --git a/cypress/e2e/facility_spec/facility_creation.cy.ts b/cypress/e2e/facility_spec/facility_creation.cy.ts index 679929d347b..ed6cc439272 100644 --- a/cypress/e2e/facility_spec/facility_creation.cy.ts +++ b/cypress/e2e/facility_spec/facility_creation.cy.ts @@ -317,7 +317,9 @@ describe("Facility Creation", () => { facilityPage.clickConfigureFacilityOption(); facilityPage.fillMiddleWareAddress("dev_middleware.coronasafe.live"); facilityPage.clickupdateMiddleWare(); - facilityPage.verifySuccessNotification("Facility updated successfully"); + facilityPage.verifySuccessNotification( + "Facility middleware updated successfully" + ); }); afterEach(() => { diff --git a/cypress/e2e/facility_spec/facility_manage.cy.ts b/cypress/e2e/facility_spec/facility_manage.cy.ts index ce459d2d66b..766bf3d9247 100644 --- a/cypress/e2e/facility_spec/facility_manage.cy.ts +++ b/cypress/e2e/facility_spec/facility_manage.cy.ts @@ -12,7 +12,7 @@ describe("Facility Manage Functions", () => { const facilityMiddleware = "dev-middleware.coronasafe.live"; const facilityUpdatedMiddleware = "updated.coronasafe.live"; const facilityMiddlewareSuccessfullNotification = - "Facility updated successfully"; + "Facility middleware updated successfully"; const facilityHfridUpdateButton = "Link Health Facility"; const facilityHfridToastNotificationText = /Health Facility config updated successfully|Health ID registration failed/; diff --git a/cypress/e2e/patient_spec/patient_consultation.cy.ts b/cypress/e2e/patient_spec/patient_consultation.cy.ts index 530ff08b8eb..cb20dce0d88 100644 --- a/cypress/e2e/patient_spec/patient_consultation.cy.ts +++ b/cypress/e2e/patient_spec/patient_consultation.cy.ts @@ -59,7 +59,7 @@ describe("Patient Consultation in multiple combination", () => { patientConsultationPage.selectConsultationStatus( "Outpatient/Emergency Room" ); - cy.clickAndSelectOption("#symptoms", "ASYMPTOMATIC"); + cy.searchAndSelectOption("#symptoms", "ASYMPTOMATIC"); patientConsultationPage.typePatientIllnessHistory(patientIllnessHistory); patientConsultationPage.typePatientExaminationHistory( patientExaminationHistory @@ -175,7 +175,7 @@ describe("Patient Consultation in multiple combination", () => { "Outpatient/Emergency Room" ); // Asymptomatic - cy.clickAndSelectOption("#symptoms", "ASYMPTOMATIC"); + cy.searchAndSelectOption("#symptoms", "ASYMPTOMATIC"); // CRITICAL category patientConsultationPage.selectPatientCategory("Critical"); patientConsultationPage.selectPatientSuggestion("Declare Death"); @@ -234,7 +234,7 @@ describe("Patient Consultation in multiple combination", () => { ); patientConsultationPage.selectPatientWard("Dummy Location 1"); // Asymptomatic - cy.clickAndSelectOption("#symptoms", "ASYMPTOMATIC"); + cy.searchAndSelectOption("#symptoms", "ASYMPTOMATIC"); // Abnormal category patientConsultationPage.selectPatientCategory("Abnormal"); patientConsultationPage.selectPatientSuggestion("Domiciliary Care"); @@ -294,7 +294,10 @@ describe("Patient Consultation in multiple combination", () => { // verify the free text in referring facility name patientConsultationPage.typeReferringFacility("Life Care Hospital"); // Vomiting and Nausea symptoms - patientConsultationPage.selectSymptoms(["VOMITING", "SORE THROAT"]); + patientConsultationPage.typeAndMultiSelectSymptoms("s", [ + "SPUTUM", + "SORE THROAT", + ]); // Stable category patientConsultationPage.selectPatientCategory("Stable"); // Date of symptoms @@ -339,7 +342,10 @@ describe("Patient Consultation in multiple combination", () => { "Outpatient/Emergency Room" ); // Select the Symptoms - Sore throat and fever symptoms - patientConsultationPage.selectSymptoms(["FEVER", "SORE THROAT"]); + patientConsultationPage.typeAndMultiSelectSymptoms("b", [ + "BREATHLESSNESS", + "BLEEDING", + ]); // Comfort Care category patientConsultationPage.selectPatientCategory("Comfort Care"); // Date of symptoms diff --git a/cypress/e2e/patient_spec/patient_discharge.cy.ts b/cypress/e2e/patient_spec/patient_discharge.cy.ts new file mode 100644 index 00000000000..34ad423d1e8 --- /dev/null +++ b/cypress/e2e/patient_spec/patient_discharge.cy.ts @@ -0,0 +1,127 @@ +import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress"; +import LoginPage from "../../pageobject/Login/LoginPage"; +import { PatientPage } from "../../pageobject/Patient/PatientCreation"; +import PatientDischarge from "../../pageobject/Patient/PatientDischarge"; +import PatientPrescription from "../../pageobject/Patient/PatientPrescription"; + +describe("Patient Discharge based on multiple reason", () => { + const loginPage = new LoginPage(); + const patientPage = new PatientPage(); + const patientDischarge = new PatientDischarge(); + const patientPrescription = new PatientPrescription(); + const patientDischargeReason1 = "Recovered"; + const patientDischargeReason2 = "Referred"; + const patientDischargeReason3 = "Expired"; + const patientDischargeReason4 = "LAMA"; + const patientDischargeAdvice = "Discharge Advice"; + const patientMedicine = "ZOLE"; + const referringFacility = "Dummy Shifting Center, Ernakulam"; + const referringFreetextFacility = "Aster Mims"; + const patientDeathCause = "Cause Of Death"; + const doctorName = "Custom Doctor"; + + before(() => { + loginPage.loginAsDisctrictAdmin(); + cy.saveLocalStorage(); + }); + + beforeEach(() => { + cy.restoreLocalStorage(); + cy.clearLocalStorage(/filters--.+/); + cy.awaitUrl("/patients"); + }); + + it("Discharge a LAMA patient in the consultation", () => { + patientPage.visitPatient("Dummy Patient 12"); + patientDischarge.clickDischarge(); + patientDischarge.selectDischargeReason(patientDischargeReason4); + cy.submitButton("Confirm Discharge"); + cy.verifyNotification("Patient Discharged Successfully"); + cy.closeNotification(); + // Verify the consultation dashboard reflection + cy.verifyContentPresence("#consultation-buttons", ["LAMA"]); + // verify the discharge information card + cy.verifyContentPresence("#discharge-information", [ + patientDischargeReason4, + ]); + }); + + it("Discharge a expired patient in the consultation", () => { + patientPage.visitPatient("Dummy Patient 13"); + patientDischarge.clickDischarge(); + patientDischarge.selectDischargeReason(patientDischargeReason3); + patientDischarge.typeDischargeNote(patientDeathCause); + patientDischarge.typeDoctorName(doctorName); + cy.submitButton("Confirm Discharge"); + cy.verifyNotification("Patient Discharged Successfully"); + cy.closeNotification(); + // Verify the consultation dashboard reflection + cy.verifyContentPresence("#consultation-buttons", ["EXPIRED"]); + // verify the discharge information card + cy.verifyContentPresence("#discharge-information", [ + patientDischargeReason3, + patientDeathCause, + doctorName, + ]); + }); + + it("Discharge patient with referred reason to a facility", () => { + patientPage.visitPatient("Dummy Patient 16"); + patientDischarge.clickDischarge(); + patientDischarge.selectDischargeReason(patientDischargeReason2); + patientDischarge.typeDischargeNote(patientDischargeAdvice); + // select a registrated facility from dropdown and clear + patientDischarge.typeReferringFacility(referringFacility); + patientDischarge.clickClearButton(); + // select a non-registered facility and perform the discharge + patientDischarge.typeReferringFacility(referringFreetextFacility); + cy.wait(2000); + cy.submitButton("Confirm Discharge"); + cy.wait(2000); + cy.verifyNotification("Patient Discharged Successfully"); + cy.closeNotification(); + // Verify the consultation dashboard reflection + cy.verifyContentPresence("#consultation-buttons", ["Referred"]); + // Verify the dashboard and discharge information + cy.verifyContentPresence("#discharge-information", [ + patientDischargeReason2, + patientDischargeAdvice, + referringFreetextFacility, + ]); + }); + + it("Discharge a recovered patient with all relevant fields", () => { + patientPage.visitPatient("Dummy Patient 15"); + patientDischarge.clickDischarge(); + patientDischarge.selectDischargeReason(patientDischargeReason1); + patientDischarge.typeDischargeNote(patientDischargeAdvice); + // Prescribe a medicine for the patient + patientPrescription.clickAddPrescription(); + patientPrescription.interceptMedibase(); + patientPrescription.selectMedicinebox(); + patientPrescription.selectMedicine(patientMedicine); + patientPrescription.enterDosage("4"); + patientPrescription.selectDosageFrequency("Twice daily"); + cy.submitButton("Submit"); + cy.verifyNotification("Medicine prescribed"); + cy.wait(2000); + cy.closeNotification(); + // submit the discharge pop-up + cy.submitButton("Confirm Discharge"); + cy.wait(2000); + cy.verifyNotification("Patient Discharged Successfully"); + cy.closeNotification(); + // Verify the consultation dashboard reflection + cy.verifyContentPresence("#consultation-buttons", ["Recovered"]); + // Verify the dashboard and discharge information + cy.verifyContentPresence("#discharge-information", [ + patientDischargeReason1, + patientDischargeAdvice, + patientMedicine, + ]); + }); + + afterEach(() => { + cy.saveLocalStorage(); + }); +}); diff --git a/cypress/e2e/patient_spec/patient_manage.cy.ts b/cypress/e2e/patient_spec/patient_manage.cy.ts index 35b89aedb7f..c25677d9e8b 100644 --- a/cypress/e2e/patient_spec/patient_manage.cy.ts +++ b/cypress/e2e/patient_spec/patient_manage.cy.ts @@ -58,14 +58,6 @@ describe("Patient", () => { cy.verifyNotification("Medicine prescribed"); }); - it("Discharge a patient", () => { - patientPage.visitPatient("Dummy Patient 6"); - patientConsultationPage.clickDischargePatient(); - patientConsultationPage.selectDischargeReason("Recovered"); - patientConsultationPage.addDischargeNotes("Discharge notes"); - patientConsultationPage.confirmDischarge(); - }); - afterEach(() => { cy.saveLocalStorage(); }); diff --git a/cypress/e2e/users_spec/user_manage.cy.ts b/cypress/e2e/users_spec/user_manage.cy.ts index af3b9149b2f..0ff66fba27a 100644 --- a/cypress/e2e/users_spec/user_manage.cy.ts +++ b/cypress/e2e/users_spec/user_manage.cy.ts @@ -33,7 +33,7 @@ describe("Manage User", () => { cy.awaitUrl("/users"); }); - it("linking skills for a users and verify its reflection in profile", () => { + it("linking skills for users and verify its reflection in profile", () => { // select the district user and select one skill link and verify its profile reflection userPage.typeInSearchInput(usernameforworkinghour); userPage.checkUsernameText(usernameforworkinghour); @@ -49,7 +49,7 @@ describe("Manage User", () => { manageUserPage.navigateToProfile(); userCreationPage.verifyElementContainsText( "username-profile-details", - usernameforworkinghour + usernameforworkinghour, ); manageUserPage.assertSkillInAlreadyLinkedSkills(linkedskill); }); diff --git a/cypress/fixtures/externalresultsample.csv b/cypress/fixtures/externalresultsample.csv index d1e543200b2..2905cdc1af3 100644 --- a/cypress/fixtures/externalresultsample.csv +++ b/cypress/fixtures/externalresultsample.csv @@ -1,2 +1,2 @@ -District,srf id,name,age,age in,gender,mobile number,address,ward,local body,local body type,source,Sample Collection Date,result date,test type,lab name,sample type,patient status,Is Repeat,patient category,result +District,SRF ID,Name,Age,Age in,Gender,Mobile Number,Address,Ward,Local Body,Local Body Type,Source,Sample Collection Date,Result Date,Test Type,Lab Name,Sample Type,Patient Status,Is Repeat,Patient Category,Result Ernakulam,00/EKM/0000,Test Upload,24,years,m,8888888888,Upload test address,7,Poothrikka,grama panchayath,Secondary contact aparna,2020-10-14,2020-10-14,Antigen,Karothukuzhi Laboratory,Ag-SD_Biosensor_Standard_Q_COVID-19_Ag_detection_kit,Asymptomatic,NO,Cat 17: All individuals who wish to get themselves tested,Negative diff --git a/cypress/pageobject/Asset/AssetCreation.ts b/cypress/pageobject/Asset/AssetCreation.ts index 8f611e97d92..421fee0cee2 100644 --- a/cypress/pageobject/Asset/AssetCreation.ts +++ b/cypress/pageobject/Asset/AssetCreation.ts @@ -246,7 +246,7 @@ export class AssetPage { } importAssetFile() { - cy.get("[data-testid=import-asset-file]") + cy.get("[data-testid=import-file]") .selectFile("cypress/fixtures/sampleAsset.xlsx", { force: true }) .wait(100); } diff --git a/cypress/pageobject/Patient/PatientConsultation.ts b/cypress/pageobject/Patient/PatientConsultation.ts index 0a39a1f839a..4400d9a524c 100644 --- a/cypress/pageobject/Patient/PatientConsultation.ts +++ b/cypress/pageobject/Patient/PatientConsultation.ts @@ -9,7 +9,9 @@ export class PatientConsultationPage { selectSymptoms(symptoms) { cy.clickAndMultiSelectOption("#symptoms", symptoms); } - + typeAndMultiSelectSymptoms(input, symptoms) { + cy.typeAndMultiSelectOption("#symptoms", input, symptoms); + } selectSymptomsDate(selector: string, date: string) { cy.clickAndTypeDate(selector, date); } @@ -100,7 +102,7 @@ export class PatientConsultationPage { cy.get("button").contains("Manage Patient").click(); cy.verifyAndClickElement( "#consultation-buttons", - "Edit Consultation Details" + "Edit Consultation Details", ); cy.wait(3000); } @@ -130,30 +132,4 @@ export class PatientConsultationPage { cy.get("#add_doctor_note_button").click(); cy.wait("@postDoctorNotes").its("response.statusCode").should("eq", 201); } - - clickDischargePatient() { - cy.get("#show-more").scrollIntoView(); - cy.get("#show-more").click(); - cy.contains("p", "Discharge from CARE").click(); - } - - selectDischargeReason(reason: string) { - cy.get("#discharge_reason") - .click() - .then(() => { - cy.get("[role='option']").contains(reason).click(); - }); - } - - addDischargeNotes(notes: string) { - cy.get("#discharge_notes").type(notes); - } - - confirmDischarge() { - cy.intercept("POST", "**/api/v1/consultation/*/discharge_patient/").as( - "dischargePatient" - ); - cy.get("#submit").contains("Confirm Discharge").click(); - cy.wait("@dischargePatient").its("response.statusCode").should("eq", 200); - } } diff --git a/cypress/pageobject/Patient/PatientCreation.ts b/cypress/pageobject/Patient/PatientCreation.ts index a708f754964..01bdfdb8cbb 100644 --- a/cypress/pageobject/Patient/PatientCreation.ts +++ b/cypress/pageobject/Patient/PatientCreation.ts @@ -95,7 +95,7 @@ export class PatientPage { } selectPatientOccupation(occupation: string) { - cy.clickAndSelectOption("#occupation", occupation); + cy.searchAndSelectOption("#occupation", occupation); } clickCreatePatient() { diff --git a/cypress/pageobject/Patient/PatientDischarge.ts b/cypress/pageobject/Patient/PatientDischarge.ts new file mode 100644 index 00000000000..eda6a379a3f --- /dev/null +++ b/cypress/pageobject/Patient/PatientDischarge.ts @@ -0,0 +1,29 @@ +class PatientDischarge { + clickDischarge() { + cy.get("#show-more").scrollIntoView(); + cy.verifyAndClickElement("#show-more", "Manage Patient"); + cy.verifyAndClickElement("#show-more", "Discharge from CARE"); + } + + selectDischargeReason(reason: string) { + cy.clickAndSelectOption("#discharge_reason", reason); + } + + typeDischargeNote(note: string) { + cy.get("#discharge_notes").type(note); + } + + typeReferringFacility(facility: string) { + cy.searchAndSelectOption("#facility-referredto", facility); + } + + clickClearButton() { + cy.get("#clear-button").click(); + } + + typeDoctorName(doctorName: string) { + cy.get("#death_confirmed_by").type(doctorName); + } +} + +export default PatientDischarge; diff --git a/cypress/pageobject/Patient/PatientLogupdate.ts b/cypress/pageobject/Patient/PatientLogupdate.ts index 8b15e4dd4fe..7b431dbc458 100644 --- a/cypress/pageobject/Patient/PatientLogupdate.ts +++ b/cypress/pageobject/Patient/PatientLogupdate.ts @@ -25,7 +25,7 @@ class PatientLogupdate { } typeAdditionalSymptoms(symptoms: string) { - cy.clickAndSelectOption("#additional_symptoms", symptoms); + cy.searchAndSelectOption("#additional_symptoms", symptoms); } typeSystolic(systolic: string) { diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 94af548f6cd..e2c85e99d6d 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -141,6 +141,21 @@ Cypress.Commands.add( }); } ); +Cypress.Commands.add( + "typeAndMultiSelectOption", + (selector: string, input: string, options: string | string[]) => { + const optionArray = Array.isArray(options) ? options : [options]; + cy.get(selector) + .click() + .type(input) + .then(() => { + optionArray.forEach((options) => { + cy.get("[role='option']").contains(options).click(); + }); + cy.get(selector).click(); + }); + } +); Cypress.Commands.add( "clickAndSelectOption", diff --git a/cypress/support/index.ts b/cypress/support/index.ts index fbaaa4f18ea..01f50cc14a5 100644 --- a/cypress/support/index.ts +++ b/cypress/support/index.ts @@ -23,6 +23,11 @@ declare global { selector: string, symptoms: string | string[] ): Chainable; + typeAndMultiSelectOption( + selector: string, + input: string, + symptoms: string | string[] + ): Chainable; clickAndTypeDate(date: string, selector: string): Chainable; clickAndSelectOption( element: string, diff --git a/package-lock.json b/package-lock.json index 63a63942b68..4ef224e120d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "@rescript/react": "^0.11.0", "@sentry/browser": "^7.57.0", "@yaireo/ui-range": "^2.1.15", + "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.4.0", "browser-image-compression": "^2.0.2", "cross-env": "^7.0.3", @@ -39,7 +40,6 @@ "raviger": "^4.1.2", "react": "18.2.0", "react-copy-to-clipboard": "^5.1.0", - "react-csv-reader": "^4.0.0", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", "react-dnd-scrolling": "^1.3.3", @@ -50,17 +50,16 @@ "react-markdown": "^8.0.7", "react-pdf": "^7.7.1", "react-player": "^2.13.0", - "react-qr-reader": "^2.2.1", "react-redux": "^8.1.1", "react-transition-group": "^4.4.5", "react-webcam": "^7.1.1", - "read-excel-file": "^5.6.1", "redux": "^4.2.1", "redux-thunk": "^2.4.2", "rehype-raw": "^6.1.1", "rescript-webapi": "^0.8.0", "use-keyboard-shortcut": "^1.1.6", - "uuid": "^9.0.1" + "uuid": "^9.0.1", + "xlsx": "^0.18.5" }, "devDependencies": { "@storybook/addon-essentials": "^7.6.16", @@ -7099,14 +7098,6 @@ "node": ">=12" } }, - "node_modules/@xmldom/xmldom": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", - "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@yaireo/ui-range": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/@yaireo/ui-range/-/ui-range-2.1.15.tgz", @@ -7165,6 +7156,38 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/@yudiel/react-qr-scanner": { + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@yudiel/react-qr-scanner/-/react-qr-scanner-2.0.0-beta.3.tgz", + "integrity": "sha512-3zGssNoBXpSUdVmNPGhlyQS1V9snzKPlGk5JGOjNXPNUqVYjf/m8TTrU6cskPbL3dRUOGFctAs5rLeVB1UEhXw==", + "dependencies": { + "@zxing/library": "^0.20.0" + }, + "peerDependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + } + }, + "node_modules/@zxing/library": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.20.0.tgz", + "integrity": "sha512-6Ev6rcqVjMakZFIDvbUf0dtpPGeZMTfyxYg4HkVWioWeN7cRcnUWT3bU6sdohc82O1nPXcjq6WiGfXX2Pnit6A==", + "dependencies": { + "ts-custom-error": "^3.2.1" + }, + "engines": { + "node": ">= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "optional": true + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -7222,6 +7245,14 @@ "node": ">= 10.0.0" } }, + "node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -7909,25 +7940,14 @@ } }, "node_modules/big-integer": { - "version": "1.6.52", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", - "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, "engines": { "node": ">=0.6" } }, - "node_modules/binary": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", - "dependencies": { - "buffers": "~0.1.1", - "chainsaw": "~0.1.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -8039,6 +8059,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "devOptional": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8158,22 +8179,6 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, - "node_modules/buffer-indexof-polyfill": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", - "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/buffers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==", - "engines": { - "node": ">=0.2.0" - } - }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -8299,15 +8304,16 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/chainsaw": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", + "node_modules/cfb": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", "dependencies": { - "traverse": ">=0.3.0 <0.4" + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" }, "engines": { - "node": "*" + "node": ">=0.8" } }, "node_modules/chalk": { @@ -8555,6 +8561,14 @@ "node": ">=6" } }, + "node_modules/codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -8693,7 +8707,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "devOptional": true }, "node_modules/concat-stream": { "version": "2.0.0", @@ -8802,7 +8817,8 @@ "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true }, "node_modules/cosmiconfig": { "version": "8.3.6", @@ -8845,6 +8861,17 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/cross-env": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", @@ -9720,46 +9747,6 @@ "node": ">=12" } }, - "node_modules/duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/duplexer2/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "node_modules/duplexer2/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/duplexer2/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/duplexer2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -12627,11 +12614,6 @@ "integrity": "sha512-3yurQZ2hD9VISAhJJP9bpYFNQrHHBXE2JxxjY5aLEcDi46RmAzJE2OC9FAde0yis5ElW0jTTzs0zfg/Cca4XqQ==", "dev": true }, - "node_modules/fflate": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz", - "integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==" - }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -13087,6 +13069,14 @@ "node": ">= 0.6" } }, + "node_modules/frac": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -13162,7 +13152,8 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "devOptional": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -13178,61 +13169,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "dependencies": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/fstream/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/fstream/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/fstream/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -13691,7 +13627,8 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true }, "node_modules/graphemer": { "version": "1.4.0", @@ -14293,6 +14230,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "devOptional": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -15428,11 +15366,6 @@ "verror": "1.10.0" } }, - "node_modules/jsqr": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", - "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" - }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -15948,11 +15881,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/listenercount": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", - "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==" - }, "node_modules/listr2": { "version": "3.14.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", @@ -17970,6 +17898,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "devOptional": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -17981,6 +17910,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -18661,6 +18591,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "devOptional": true, "dependencies": { "wrappy": "1" } @@ -18803,11 +18734,6 @@ "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", "dev": true }, - "node_modules/papaparse": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", - "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -18881,6 +18807,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -19514,7 +19441,8 @@ "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "node_modules/progress": { "version": "2.0.3", @@ -19972,19 +19900,6 @@ "react": "^15.3.0 || 16 || 17 || 18" } }, - "node_modules/react-csv-reader": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/react-csv-reader/-/react-csv-reader-4.0.0.tgz", - "integrity": "sha512-NRo27kv1YWYAJAR3H5ZZ5KREEw35avUtdGr4DwYel87QN3rwJf2wdAw97swNDO3cTW2i3cuXSNjfPqVIJm5xOg==", - "dependencies": { - "papaparse": "^5.3.0" - }, - "peerDependencies": { - "prop-types": "^15.7.2", - "react": "^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-dnd": { "version": "16.0.1", "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-16.0.1.tgz", @@ -20777,20 +20692,6 @@ "react": ">=16.6.0" } }, - "node_modules/react-qr-reader": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/react-qr-reader/-/react-qr-reader-2.2.1.tgz", - "integrity": "sha512-EL5JEj53u2yAOgtpAKAVBzD/SiKWn0Bl7AZy6ZrSf1lub7xHwtaXe6XSx36Wbhl1VMGmvmrwYMRwO1aSCT2fwA==", - "dependencies": { - "jsqr": "^1.2.0", - "prop-types": "^15.7.2", - "webrtc-adapter": "^7.2.1" - }, - "peerDependencies": { - "react": "~16", - "react-dom": "~16" - } - }, "node_modules/react-redux": { "version": "8.1.3", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.1.3.tgz", @@ -20946,16 +20847,6 @@ "pify": "^2.3.0" } }, - "node_modules/read-excel-file": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/read-excel-file/-/read-excel-file-5.7.1.tgz", - "integrity": "sha512-cEX+y7A0TmUESjaVqDTVts3iY2YbySG5ew2TlP0qJN+H7PY+b9MqiK3pl/vNPhx112AuyLtmhfqQc5n6+U2vQw==", - "dependencies": { - "@xmldom/xmldom": "^0.8.2", - "fflate": "^0.7.3", - "unzipper": "^0.10.11" - } - }, "node_modules/read-package-json-fast": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", @@ -22003,18 +21894,6 @@ "node": ">= 10.13.0" } }, - "node_modules/rtcpeerconnection-shim": { - "version": "1.2.15", - "resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", - "integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", - "dependencies": { - "sdp": "^2.6.0" - }, - "engines": { - "node": ">=6.0.0", - "npm": ">=3.10.0" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -22150,11 +22029,6 @@ "loose-envify": "^1.1.0" } }, - "node_modules/sdp": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/sdp/-/sdp-2.12.0.tgz", - "integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -22304,11 +22178,6 @@ "node": ">= 0.4" } }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -22606,6 +22475,17 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, + "node_modules/ssf": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "dependencies": { + "frac": "~1.1.2" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/sshpk": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", @@ -23569,14 +23449,6 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "devOptional": true }, - "node_modules/traverse": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", - "engines": { - "node": "*" - } - }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", @@ -23595,6 +23467,14 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -24597,60 +24477,6 @@ "node": ">=8" } }, - "node_modules/unzipper": { - "version": "0.10.14", - "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", - "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", - "dependencies": { - "big-integer": "^1.6.17", - "binary": "~0.3.0", - "bluebird": "~3.4.1", - "buffer-indexof-polyfill": "~1.0.0", - "duplexer2": "~0.1.4", - "fstream": "^1.0.12", - "graceful-fs": "^4.2.2", - "listenercount": "~1.0.1", - "readable-stream": "~2.3.6", - "setimmediate": "~1.0.4" - } - }, - "node_modules/unzipper/node_modules/bluebird": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==" - }, - "node_modules/unzipper/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "node_modules/unzipper/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/unzipper/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/unzipper/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", @@ -25928,19 +25754,6 @@ "integrity": "sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==", "dev": true }, - "node_modules/webrtc-adapter": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.7.1.tgz", - "integrity": "sha512-TbrbBmiQBL9n0/5bvDdORc6ZfRY/Z7JnEj+EYOD1ghseZdpJ+nF2yx14k3LgQKc7JZnG7HAcL+zHnY25So9d7A==", - "dependencies": { - "rtcpeerconnection-shim": "^1.2.15", - "sdp": "^2.12.0" - }, - "engines": { - "node": ">=6.0.0", - "npm": ">=3.10.0" - } - }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -26053,6 +25866,22 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/wmf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -26479,7 +26308,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "devOptional": true }, "node_modules/write-file-atomic": { "version": "4.0.2", @@ -26515,6 +26345,26 @@ } } }, + "node_modules/xlsx": { + "version": "0.18.5", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz", + "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "dependencies": { + "adler-32": "~1.3.0", + "cfb": "~1.2.1", + "codepage": "~1.15.0", + "crc-32": "~1.2.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + }, + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 67588f2d309..a88d042d530 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "@rescript/react": "^0.11.0", "@sentry/browser": "^7.57.0", "@yaireo/ui-range": "^2.1.15", + "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.4.0", "browser-image-compression": "^2.0.2", "cross-env": "^7.0.3", @@ -79,7 +80,6 @@ "raviger": "^4.1.2", "react": "18.2.0", "react-copy-to-clipboard": "^5.1.0", - "react-csv-reader": "^4.0.0", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", "react-dnd-scrolling": "^1.3.3", @@ -90,17 +90,16 @@ "react-markdown": "^8.0.7", "react-pdf": "^7.7.1", "react-player": "^2.13.0", - "react-qr-reader": "^2.2.1", "react-redux": "^8.1.1", "react-transition-group": "^4.4.5", "react-webcam": "^7.1.1", - "read-excel-file": "^5.6.1", "redux": "^4.2.1", "redux-thunk": "^2.4.2", "rehype-raw": "^6.1.1", "rescript-webapi": "^0.8.0", "use-keyboard-shortcut": "^1.1.6", - "uuid": "^9.0.1" + "uuid": "^9.0.1", + "xlsx": "^0.18.5" }, "devDependencies": { "@storybook/addon-essentials": "^7.6.16", @@ -186,4 +185,4 @@ "node": ">=20.12.0" }, "packageManager": "npm@10.5.0" -} \ No newline at end of file +} diff --git a/public/External-Results-Template.csv b/public/External-Results-Template.csv index 3ab2afc65ba..c2601f2d64f 100644 --- a/public/External-Results-Template.csv +++ b/public/External-Results-Template.csv @@ -1,3 +1,3 @@ -District,srf id,name,age,age in,gender,mobile number,address,ward,local body,local body type,source,Sample Collection Date,result date,test type,lab name,sample type,patient status,Is Repeat,patient category,result +District,SRF ID,Name,Age,Age in,Gender,Mobile Number,Address,Ward,Local Body,Local Body Type,Source,Sample Collection Date,Result Date,Test Type,Lab Name,Sample Type,Patient Status,Is Repeat,Patient Category,Result Ernakulam,00/EKM/0000,Bodhi CSN,24,years,m,8888888888,"CSN HQ Kochi, Kerala ",7,Poothrikka,grama panchayath,Secondary contact aparna,2020-10-14,2020-10-14,Antigen,Karothukuzhi Laboratory,Ag-SD_Biosensor_Standard_Q_COVID-19_Ag_detection_kit,Asymptomatic,NO,Cat 17: All individuals who wish to get themselves tested,Negative \ No newline at end of file diff --git a/src/CAREUI/display/Timeline.tsx b/src/CAREUI/display/Timeline.tsx index b2401630e93..3414a792398 100644 --- a/src/CAREUI/display/Timeline.tsx +++ b/src/CAREUI/display/Timeline.tsx @@ -10,7 +10,9 @@ export interface TimelineEvent { timestamp: string; by: PerformedByModel | undefined; icon: IconName; - notes?: string; + iconStyle?: string; + iconWrapperStyle?: string; + notes?: string | React.ReactNode; cancelled?: boolean; } @@ -126,9 +128,17 @@ interface TimelineNodeTitleProps { export const TimelineNodeTitle = (props: TimelineNodeTitleProps) => { return ( <> -
+