diff --git a/cypress/e2e/patient_spec/patient_crud.cy.ts b/cypress/e2e/patient_spec/patient_consultation.cy.ts similarity index 50% rename from cypress/e2e/patient_spec/patient_crud.cy.ts rename to cypress/e2e/patient_spec/patient_consultation.cy.ts index 38eec604758..9b3248d6656 100644 --- a/cypress/e2e/patient_spec/patient_crud.cy.ts +++ b/cypress/e2e/patient_spec/patient_consultation.cy.ts @@ -1,26 +1,30 @@ import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress"; import LoginPage from "../../pageobject/Login/LoginPage"; import { PatientPage } from "../../pageobject/Patient/PatientCreation"; -import { UpdatePatientPage } from "../../pageobject/Patient/PatientUpdate"; -import FacilityPage from "../../pageobject/Facility/FacilityCreation"; import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation"; import { emergency_phone_number, phone_number, } from "../../pageobject/constants"; -const yearOfBirth = "2001"; - -const calculateAge = () => { - const currentYear = new Date().getFullYear(); - return currentYear - parseInt(yearOfBirth); -}; +import FacilityPage from "../../pageobject/Facility/FacilityCreation"; +import PatientMedicalHistory from "../../pageobject/Patient/PatientMedicalHistory"; describe("Patient Creation with consultation", () => { + const patientConsultationPage = new PatientConsultationPage(); const loginPage = new LoginPage(); const patientPage = new PatientPage(); - const updatePatientPage = new UpdatePatientPage(); - const patientConsultationPage = new PatientConsultationPage(); const facilityPage = new FacilityPage(); + const patientMedicalHistory = new PatientMedicalHistory(); + const patientDateOfBirth = "01012001"; + const patientOneName = "Patient With Consultation"; + const patientOneGender = "Male"; + const patientOneAddress = "Test Patient Address"; + const patientOnePincode = "682001"; + const patientOneState = "Kerala"; + const patientOneDistrict = "Ernakulam"; + const patientOneLocalbody = "Aluva"; + const patientOneWard = "4"; + const patientOneBloodGroup = "O+"; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -33,89 +37,25 @@ describe("Patient Creation with consultation", () => { cy.awaitUrl("/patients"); }); - it("Create a new patient with no consultation", () => { + it("Create a patient with consultation", () => { patientPage.createPatient(); - patientPage.selectFacility("dummy facility 40"); + patientPage.selectFacility("Dummy Facility 40"); patientPage.patientformvisibility(); - patientPage.enterPatientDetails( - phone_number, - emergency_phone_number, - "Test E2E User", - "Male", - "Test Patient Address", - "682001", - "O+", - "01012001" - ); - facilityPage.selectStateOnPincode("Kerala"); - facilityPage.selectDistrictOnPincode("Ernakulam"); - facilityPage.selectLocalBody("Aluva"); - facilityPage.selectWard("4"); + patientPage.typePatientPhoneNumber(phone_number); + patientPage.typePatientEmergencyNumber(emergency_phone_number); + patientPage.typePatientDateOfBirth(patientDateOfBirth); + patientPage.typePatientName(patientOneName); + patientPage.selectPatientGender(patientOneGender); + patientPage.typePatientAddress(patientOneAddress); + facilityPage.fillPincode(patientOnePincode); + facilityPage.selectStateOnPincode(patientOneState); + facilityPage.selectDistrictOnPincode(patientOneDistrict); + facilityPage.selectLocalBody(patientOneLocalbody); + facilityPage.selectWard(patientOneWard); + patientMedicalHistory.clickNoneMedicialHistory(); + patientPage.selectPatientBloodGroup(patientOneBloodGroup); patientPage.clickCreatePatient(); - patientPage.verifyPatientIsCreated(); - patientPage.saveCreatedPatientUrl(); - }); - - it("Patient Detail verification post registration", () => { - patientPage.interceptFacilities(); - patientPage.visitCreatedPatient(); - patientPage.verifyStatusCode(); - const age = calculateAge(); - patientPage.verifyPatientDetails( - age, - "Test E2E User", - phone_number, - emergency_phone_number, - yearOfBirth, - "O+" - ); - }); - - it("Edit the patient details", () => { - patientPage.interceptFacilities(); - patientPage.visitUpdatePatientUrl(); - patientPage.verifyStatusCode(); - patientPage.patientformvisibility(); - updatePatientPage.enterPatientDetails( - "Test E2E User Edited", - "O+", - phone_number, - emergency_phone_number, - "Test Patient Address Edited", - "Severe Cough", - "Paracetamol", - "Dust", - ["2 months ago", "1 month ago"], - "SUB123", - "P123", - "GICOFINDIA", - "GICOFINDIA" - ); - updatePatientPage.clickUpdatePatient(); - - updatePatientPage.verifyPatientUpdated(); - updatePatientPage.saveUpdatedPatientUrl(); - }); - - it("Patient Detail verification post edit", () => { - patientPage.interceptFacilities(); - updatePatientPage.visitUpdatedPatient(); - patientPage.verifyStatusCode(); - - updatePatientPage.verifyPatientDetails( - "Test E2E User Edited", - phone_number, - "Severe Cough", - "Paracetamol", - "Dust" - ); - }); - - it("Create a New consultation to existing patient", () => { - patientPage.interceptFacilities(); - updatePatientPage.visitConsultationPage(); - patientPage.verifyStatusCode(); patientConsultationPage.fillIllnessHistory("history"); patientConsultationPage.selectConsultationStatus( "Outpatient/Emergency Room" @@ -142,11 +82,13 @@ describe("Patient Creation with consultation", () => { patientConsultationPage.enterDosage("3"); patientConsultationPage.selectDosageFrequency("Twice daily"); patientConsultationPage.submitPrescriptionAndReturn(); + patientConsultationPage.verifyConsultationPatientName(patientOneName); }); it("Edit created consultation to existing patient", () => { - updatePatientPage.visitUpdatedPatient(); - patientConsultationPage.visitEditConsultationPage(); + // temporary fixing, whole file will be refactored soon + cy.get("[data-cy='patient']").first().click(); + patientConsultationPage.clickEditConsultationButton(); patientConsultationPage.fillIllnessHistory("editted"); patientConsultationPage.updateSymptoms("FEVER"); patientConsultationPage.setSymptomsDate("01082023"); diff --git a/cypress/e2e/patient_spec/patient_registration.cy.ts b/cypress/e2e/patient_spec/patient_registration.cy.ts new file mode 100644 index 00000000000..1dce2c7c6f7 --- /dev/null +++ b/cypress/e2e/patient_spec/patient_registration.cy.ts @@ -0,0 +1,292 @@ +import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress"; +import LoginPage from "../../pageobject/Login/LoginPage"; +import { PatientPage } from "../../pageobject/Patient/PatientCreation"; +import FacilityPage from "../../pageobject/Facility/FacilityCreation"; +import { + emergency_phone_number, + phone_number, +} from "../../pageobject/constants"; +import PatientTransfer from "../../pageobject/Patient/PatientTransfer"; +import PatientExternal from "../../pageobject/Patient/PatientExternal"; +import PatientInsurance from "../../pageobject/Patient/PatientInsurance"; +import PatientMedicalHistory from "../../pageobject/Patient/PatientMedicalHistory"; + +const yearOfBirth = "2001"; + +const calculateAge = () => { + const currentYear = new Date().getFullYear(); + return currentYear - parseInt(yearOfBirth); +}; + +describe("Patient Creation with consultation", () => { + const loginPage = new LoginPage(); + const patientPage = new PatientPage(); + const facilityPage = new FacilityPage(); + const patientTransfer = new PatientTransfer(); + const patientExternal = new PatientExternal(); + const patientInsurance = new PatientInsurance(); + const patientMedicalHistory = new PatientMedicalHistory(); + const age = calculateAge(); + const patientFacility = "Dummy Facility 40"; + const patientDateOfBirth = "01012001"; + const patientOneName = "Patient With No Consultation"; + const patientOneGender = "Male"; + const patientOneUpdatedGender = "Female"; + const patientOneAddress = "Test Patient Address"; + const patientOnePincode = "682001"; + const patientOneState = "Kerala"; + const patientOneDistrict = "Ernakulam"; + const patientOneLocalbody = "Aluva"; + const patientOneWard = "4"; + const patientOnePresentHealth = "Present Health Condition"; + const patientOneOngoingMedication = "Ongoing Medication"; + const patientOneAllergies = "Allergies"; + const patientOneBloodGroup = "O+"; + const patientOneUpdatedBloodGroup = "AB+"; + const patientOneFirstInsuranceId = "insurance-details-0"; + const patientOneFirstSubscriberId = "member id 01"; + const patientOneFirstPolicyId = "policy name 01"; + const patientOneFirstInsurerId = "insurer id 01"; + const patientOneFirstInsurerName = "insurer name 01"; + const patientOneSecondInsuranceId = "insurance-details-1"; + const patientOneSecondSubscriberId = "member id 02"; + const patientOneSecondPolicyId = "policy name 02"; + const patientOneSecondInsurerId = "insurer id 02"; + const patientOneSecondInsurerName = "insurer name 02"; + const patientTransferPhoneNumber = "9849511866"; + const patientTransferFacility = "Dummy Shifting Center"; + const patientTransferName = "Dummy Patient 10"; + const patientExternalName = "Patient 20"; + + before(() => { + loginPage.loginAsDisctrictAdmin(); + cy.saveLocalStorage(); + }); + + beforeEach(() => { + cy.restoreLocalStorage(); + cy.clearLocalStorage(/filters--.+/); + cy.awaitUrl("/patients"); + }); + + it("Create a new patient with all field in registration form and no consultation", () => { + // patient details with all the available fields except covid + patientPage.createPatient(); + patientPage.selectFacility(patientFacility); + patientPage.patientformvisibility(); + // Patient Details page + patientPage.typePatientPhoneNumber(phone_number); + patientPage.typePatientEmergencyNumber(emergency_phone_number); + patientPage.typePatientDateOfBirth(patientDateOfBirth); + patientPage.typePatientName(patientOneName); + patientPage.selectPatientGender(patientOneGender); + patientPage.typePatientAddress(patientOneAddress); + facilityPage.fillPincode(patientOnePincode); + facilityPage.selectStateOnPincode(patientOneState); + facilityPage.selectDistrictOnPincode(patientOneDistrict); + facilityPage.selectLocalBody(patientOneLocalbody); + facilityPage.selectWard(patientOneWard); + // Patient Medical History + patientMedicalHistory.typePatientPresentHealth(patientOnePresentHealth); + patientMedicalHistory.typePatientOngoingMedication( + patientOneOngoingMedication + ); + patientMedicalHistory.typeMedicalHistory(2, "Diabetes"); + patientMedicalHistory.typeMedicalHistory(3, "Heart Disease"); + patientMedicalHistory.typeMedicalHistory(4, "HyperTension"); + patientMedicalHistory.typeMedicalHistory(5, "Kidney Diseases"); + patientMedicalHistory.typeMedicalHistory(6, "Lung Diseases/Asthma"); + patientMedicalHistory.typeMedicalHistory(7, "Cancer"); + patientMedicalHistory.typeMedicalHistory(8, "Other"); + patientMedicalHistory.typePatientAllergies(patientOneAllergies); + patientPage.selectPatientBloodGroup(patientOneBloodGroup); + patientPage.clickCreatePatient(); + patientPage.verifyPatientIsCreated(); + // Verify the patient details + patientPage.clickCancelButton(); + cy.wait(3000); + patientPage.savePatientUrl(); + patientPage.verifyPatientDashboardDetails( + patientOneGender, + age, + patientOneName, + phone_number, + emergency_phone_number, + yearOfBirth, + patientOneBloodGroup + ); + patientMedicalHistory.verifyPatientMedicalDetails( + patientOnePresentHealth, + patientOneOngoingMedication, + patientOneAllergies, + "Diabetes", + "Heart Disease", + "HyperTension", + "Kidney Diseases", + "Lung Diseases/Asthma", + "Cancer", + "Other" + ); + // verify its presence in the patient detail page + cy.visit("/patients"); + patientPage.typePatientNameList(patientOneName); + patientPage.verifyPatientNameList(patientOneName); + }); + + it("Edit the patient details with no consultation and verify", () => { + patientPage.interceptFacilities(); + patientPage.visitUpdatePatientUrl(); + patientPage.verifyStatusCode(); + patientPage.patientformvisibility(); + // change the gender to female and input data to related changed field + cy.wait(3000); + patientPage.selectPatientGender(patientOneUpdatedGender); + patientPage.clickPatientAntenatalStatusYes(); + patientPage.selectPatientBloodGroup(patientOneUpdatedBloodGroup); + // Edit the patient consultation , select none medical history and multiple health ID + patientMedicalHistory.clickNoneMedicialHistory(); + patientInsurance.clickAddInsruanceDetails(); + patientInsurance.typePatientInsuranceDetail( + patientOneFirstInsuranceId, + "subscriber_id", + patientOneFirstSubscriberId + ); + patientInsurance.typePatientInsuranceDetail( + patientOneFirstInsuranceId, + "policy_id", + patientOneFirstPolicyId + ); + patientInsurance.typePatientInsuranceDetail( + patientOneFirstInsuranceId, + "insurer_id", + patientOneFirstInsurerId + ); + patientInsurance.typePatientInsuranceDetail( + patientOneFirstInsuranceId, + "insurer_name", + patientOneFirstInsurerName + ); + patientInsurance.clickAddInsruanceDetails(); + patientInsurance.typePatientInsuranceDetail( + patientOneSecondInsuranceId, + "subscriber_id", + patientOneSecondSubscriberId + ); + patientInsurance.typePatientInsuranceDetail( + patientOneSecondInsuranceId, + "policy_id", + patientOneSecondPolicyId + ); + patientInsurance.typePatientInsuranceDetail( + patientOneSecondInsuranceId, + "insurer_id", + patientOneSecondInsurerId + ); + patientInsurance.typePatientInsuranceDetail( + patientOneSecondInsuranceId, + "insurer_name", + patientOneSecondInsurerName + ); + patientPage.clickUpdatePatient(); + cy.wait(3000); + patientPage.verifyPatientUpdated(); + patientPage.visitPatientUrl(); + // Verify Female Gender change reflection, No Medical History and Insurance Details + cy.wait(5000); + patientPage.verifyPatientDashboardDetails( + patientOneUpdatedGender, + age, + patientOneName, + phone_number, + emergency_phone_number, + yearOfBirth, + patientOneUpdatedBloodGroup + ); + // Verify No medical history + patientMedicalHistory.verifyNoSymptosPresent("Diabetes"); + // verify insurance details and dedicatd page + cy.get("[data-testid=patient-details]") + .contains(patientOneFirstSubscriberId) + .scrollIntoView(); + cy.wait(2000); + patientInsurance.verifyPatientPolicyDetails( + patientOneFirstSubscriberId, + patientOneFirstPolicyId, + patientOneFirstInsurerId, + patientOneFirstInsurerName + ); + patientInsurance.clickPatientInsuranceViewDetail(); + cy.wait(3000); + patientInsurance.verifyPatientPolicyDetails( + patientOneFirstSubscriberId, + patientOneFirstPolicyId, + patientOneFirstInsurerId, + patientOneFirstInsurerName + ); + patientInsurance.verifyPatientPolicyDetails( + patientOneSecondSubscriberId, + patientOneSecondPolicyId, + patientOneSecondInsurerId, + patientOneSecondInsurerName + ); + }); + + it("Patient Registration using the transfer with no consultation", () => { + // transfer the patient and no consulation + patientPage.createPatient(); + patientPage.selectFacility(patientTransferFacility); + patientPage.patientformvisibility(); + patientPage.typePatientPhoneNumber(patientTransferPhoneNumber); + patientTransfer.clickAdmitPatientRecordButton(); + patientTransfer.clickTransferPopupContinueButton(); + patientTransfer.clickTransferPatientNameList(patientTransferName); + patientTransfer.clickTransferPatientDob(patientDateOfBirth); + patientTransfer.clickTransferSubmitButton(); + patientTransfer.verifyFacilitySuccessfullMessage(); + patientTransfer.clickConsultationCancelButton(); + cy.wait(3000); + // allow the transfer button of a patient + patientTransfer.clickAllowPatientTransferButton(); + // Verify the patient error message for the same facility + cy.awaitUrl("/patients"); + patientPage.createPatient(); + patientPage.selectFacility(patientTransferFacility); + patientPage.patientformvisibility(); + patientPage.typePatientPhoneNumber(patientTransferPhoneNumber); + patientTransfer.clickAdmitPatientRecordButton(); + patientTransfer.clickTransferPopupContinueButton(); + patientTransfer.clickTransferPatientNameList(patientTransferName); + patientTransfer.clickTransferPatientDob(patientDateOfBirth); + patientTransfer.clickTransferSubmitButton(); + patientTransfer.verifyFacilityErrorMessage(); + }); + + it("Patient Registration using External Result Import", () => { + // copy the patient external ID from external results + cy.awaitUrl("/external_results"); + patientExternal.verifyExternalListPatientName(patientExternalName); + patientExternal.verifyExternalIdVisible(); + // cypress have a limitation to work only asynchronously + // import the result and create a new patient + let extractedId = ""; + cy.get("#patient-external-id") + .invoke("text") + .then((text) => { + extractedId = text.split("Care external results ID: ")[1]; + cy.log(`Extracted Care external results ID: ${extractedId}`); + cy.awaitUrl("/patients"); + patientPage.createPatient(); + patientPage.selectFacility(patientFacility); + patientPage.patientformvisibility(); + patientExternal.clickImportFromExternalResultsButton(); + patientExternal.typeCareExternalResultId(extractedId); + patientExternal.clickImportPatientData(); + }); + // verify the patient is successfully created + patientExternal.verifyExternalPatientName(patientExternalName); + }); + + afterEach(() => { + cy.saveLocalStorage(); + }); +}); diff --git a/cypress/pageobject/Asset/AssetCreation.ts b/cypress/pageobject/Asset/AssetCreation.ts index 60e3f3ece2d..6932b5ed15e 100644 --- a/cypress/pageobject/Asset/AssetCreation.ts +++ b/cypress/pageobject/Asset/AssetCreation.ts @@ -129,7 +129,7 @@ export class AssetPage { cy.get( "[data-testid=asset-last-serviced-on-input] input[type='text']" ).click(); - cy.get("#date-input").click().type(lastServicedOn); + cy.get("#date-input").click().clear().type(lastServicedOn); cy.get("[data-testid=asset-notes-input] textarea").clear().type(notes); } diff --git a/cypress/pageobject/Patient/PatientConsultation.ts b/cypress/pageobject/Patient/PatientConsultation.ts index 8570b2b8e7a..bc2e8f330a3 100644 --- a/cypress/pageobject/Patient/PatientConsultation.ts +++ b/cypress/pageobject/Patient/PatientConsultation.ts @@ -17,6 +17,10 @@ export class PatientConsultationPage { }); } + verifyConsultationPatientName(patientName: string) { + cy.get("#patient-name-consultation").should("contain", patientName); + } + fillIllnessHistory(history: string) { cy.wait(5000); cy.get("#history_of_present_illness").scrollIntoView(); @@ -145,9 +149,12 @@ export class PatientConsultationPage { cy.wait("@submitPrescription").its("response.statusCode").should("eq", 201); } - visitEditConsultationPage() { - cy.get("#view_consulation_updates").click(); - cy.get("button").contains("Edit Consultation Details").click(); + clickEditConsultationButton() { + cy.get("#consultation-buttons").scrollIntoView(); + cy.get("button").contains("Manage Patient").click(); + cy.get("#consultation-buttons") + .contains("Edit Consultation Details") + .click(); } setSymptomsDate(date: string) { diff --git a/cypress/pageobject/Patient/PatientCreation.ts b/cypress/pageobject/Patient/PatientCreation.ts index 4e2f92ac040..07d87e024a1 100644 --- a/cypress/pageobject/Patient/PatientCreation.ts +++ b/cypress/pageobject/Patient/PatientCreation.ts @@ -24,7 +24,7 @@ export class PatientPage { cy.get("input[name='facilities']") .type(facilityName) .then(() => { - cy.get("[role='option']").first().click(); + cy.get("[role='option']").contains(facilityName).click(); }); cy.get("button").should("contain", "Select"); cy.get("button").get("#submit").click(); @@ -38,34 +38,65 @@ export class PatientPage { cy.wait("@createPatient").its("response.statusCode").should("eq", 200); } - enterPatientDetails( - phoneNumber: string, - emergencyPhoneNumber: string, - patientName: string, - gender: string, - address: string, - pincode: string, - bloodGroup: string, - dateOfBirth: string - ) { - cy.get("#phone_number-div").type(phoneNumber); - cy.get("#emergency_phone_number-div").type(emergencyPhoneNumber); + verifyPatientNameList(patientName: string) { + cy.get("#patient-name-list").contains(patientName); + } + + typePatientPhoneNumber(phoneNumber: string) { + cy.get("#phone_number-div").click().type(phoneNumber); + } + + typePatientEmergencyNumber(phoneNumber: string) { + cy.get("#emergency_phone_number-div").click().type(phoneNumber); + } + + typePatientDateOfBirth(dateOfBirth: string) { + cy.get("#date_of_birth").scrollIntoView(); cy.get("#date_of_birth").should("be.visible").click(); cy.get("#date-input").click().type(dateOfBirth); - cy.get("[data-testid=name] input").type(patientName); + } + + typePatientName(patientName: string) { + cy.get("[data-testid=name] input").click().type(patientName); + } + + typePatientNameList(patientName: string) { + cy.get("#name").click().type(patientName); + } + + typePatientAddress(address: string) { + cy.get("[data-testid=current-address] textarea") + .click() + .clear() + .click() + .type(address); + } + + clickPermanentAddress() { + cy.get("[data-testid=permanent-address] input").check(); + } + + clickPatientAntenatalStatusYes() { + cy.get("#is_antenatal-0").click(); + } + + clickCancelButton() { + cy.get("#cancel").click(); + } + + selectPatientGender(gender: string) { cy.get("[data-testid=Gender] button") .click() .then(() => { cy.get("[role='option']").contains(gender).click(); }); - cy.get("[data-testid=current-address] textarea").type(address); - cy.get("[data-testid=permanent-address] input").check(); - cy.get("#pincode").type(pincode); - cy.get("[name=medical_history_check_1]").check(); - cy.get("[data-testid=blood-group] button") + } + + selectPatientBloodGroup(bloodgroup: string) { + cy.get("#blood_group") .click() .then(() => { - cy.get("[role='option']").contains(bloodGroup).click(); + cy.get("[role='option']").contains(bloodgroup).click(); }); } @@ -80,40 +111,76 @@ export class PatientPage { cy.url().should("include", "/patient"); } - saveCreatedPatientUrl() { + savePatientUrl() { cy.url().then((url) => { - cy.log(url); - patient_url = url.split("/").slice(0, -1).join("/"); - cy.log(patient_url); + patient_url = url; }); } - visitCreatedPatient() { - cy.awaitUrl(patient_url); + visitPatientUrl() { + cy.visit(patient_url); + } + + visitConsultationPage() { + cy.visit(patient_url + "/consultation"); + } + + clickUpdatePatient() { + cy.intercept("PUT", "**/api/v1/patient/**").as("updatePatient"); + cy.get("button").get("[data-testid=submit-button]").click(); + cy.wait("@updatePatient").its("response.statusCode").should("eq", 200); + } + + verifyPatientUpdated() { + cy.url().should("include", "/patient"); + } + + verifyPatientPhoneNumber(phoneNumber: string) { + cy.get("[data-testid=patient-dashboard]").should("contain", phoneNumber); } - verifyPatientDetails( - age: number, - patientName: string, - phoneNumber: string, - emergencyPhoneNumber: string, - yearOfBirth: string, - bloodGroup: string + verifyPatientDashboardDetails( + gender, + age, + patientName, + phoneNumber, + emergencyPhoneNumber, + yearOfBirth, + bloodGroup ) { cy.url().should("include", "/facility/"); - cy.get("[data-testid=patient-dashboard]").should("contain", age); - cy.get("[data-testid=patient-dashboard]").should("contain", patientName); - cy.get("[data-testid=patient-dashboard]").should("contain", phoneNumber); - cy.get("[data-testid=patient-dashboard]").should( - "contain", - emergencyPhoneNumber - ); - cy.get("[data-testid=patient-dashboard]").should("contain", yearOfBirth); - cy.get("[data-testid=patient-dashboard]").should("contain", bloodGroup); + cy.get("[data-testid=patient-dashboard]").then(($dashboard) => { + expect($dashboard).to.contain(gender); + expect($dashboard).to.contain(age); + expect($dashboard).to.contain(patientName); + expect($dashboard).to.contain(phoneNumber); + expect($dashboard).to.contain(emergencyPhoneNumber); + expect($dashboard).to.contain(yearOfBirth); + expect($dashboard).to.contain(bloodGroup); + }); + } + + verifyPatientLocationDetails( + patientAddress, + patientPincode, + patientState, + patientDistrict, + patientLocalbody, + patientWard + ) { + cy.get("[data-testid=patient-details]").then(($dashboard) => { + cy.url().should("include", "/facility/"); + expect($dashboard).to.contain(patientAddress); + expect($dashboard).to.contain(patientPincode); + expect($dashboard).to.contain(patientState); + expect($dashboard).to.contain(patientDistrict); + expect($dashboard).to.contain(patientLocalbody); + expect($dashboard).to.contain(patientWard); + }); } visitUpdatePatientUrl() { - cy.awaitUrl(patient_url + "/update"); + cy.visit(patient_url + "/update"); } interceptFacilities() { diff --git a/cypress/pageobject/Patient/PatientExternal.ts b/cypress/pageobject/Patient/PatientExternal.ts new file mode 100644 index 00000000000..138c212a377 --- /dev/null +++ b/cypress/pageobject/Patient/PatientExternal.ts @@ -0,0 +1,28 @@ +class PatientExternal { + verifyExternalListPatientName(patientName: string) { + cy.get("#external-result-table").contains(patientName).click(); + } + + verifyExternalIdVisible() { + cy.get("#patient-external-id").contains("Care external results ID"); + } + + clickImportFromExternalResultsButton() { + cy.get("#import-externalresult-button").click(); + } + + typeCareExternalResultId(externalId) { + cy.get("#care-external-results-id").scrollIntoView(); + cy.get("#care-external-results-id").should("be.visible"); + cy.get("#care-external-results-id").type(externalId); + } + + clickImportPatientData() { + cy.get("#submit-importexternalresult-button").click(); + } + + verifyExternalPatientName(patientName: string) { + cy.get("#name", { timeout: 10000 }).should("have.value", patientName); + } +} +export default PatientExternal; diff --git a/cypress/pageobject/Patient/PatientInsurance.ts b/cypress/pageobject/Patient/PatientInsurance.ts new file mode 100644 index 00000000000..be4c25c5535 --- /dev/null +++ b/cypress/pageobject/Patient/PatientInsurance.ts @@ -0,0 +1,32 @@ +class PatientInsurance { + typePatientInsuranceDetail( + containerId: string, + fieldId: string, + value: string + ) { + cy.get(`#${containerId}`).within(() => { + cy.get(`#${fieldId}`).click().type(value); + }); + } + + clickPatientInsuranceViewDetail() { + cy.get("#insurance-view-details").scrollIntoView(); + cy.get("#insurance-view-details").click(); + } + + clickAddInsruanceDetails() { + cy.get("[data-testid=add-insurance-button]").click(); + } + + verifyPatientPolicyDetails(subscriberId, policyId, insurerId, insurerName) { + cy.get("[data-testid=patient-details]").then(($dashboard) => { + cy.url().should("include", "/facility/"); + expect($dashboard).to.contain(subscriberId); + expect($dashboard).to.contain(policyId); + expect($dashboard).to.contain(insurerId); + expect($dashboard).to.contain(insurerName); + }); + } +} + +export default PatientInsurance; diff --git a/cypress/pageobject/Patient/PatientMedicalHistory.ts b/cypress/pageobject/Patient/PatientMedicalHistory.ts new file mode 100644 index 00000000000..1c9b733f3ba --- /dev/null +++ b/cypress/pageobject/Patient/PatientMedicalHistory.ts @@ -0,0 +1,59 @@ +class PatientMedicalHistory { + typePatientOngoingMedication(ongoingMedication: string) { + cy.get("#ongoing_medication").click().type(ongoingMedication); + } + + typePatientPresentHealth(presentHealth: string) { + cy.get("#present_health").click().type(presentHealth); + } + + typePatientAllergies(allergies: string) { + cy.get("#allergies").click().type(allergies); + } + + typeMedicalHistory(index, text) { + cy.get(`#medical_history_check_${index}`).click(); + cy.get(`#medical_history_${index}`).click().type(text); + } + + clickNoneMedicialHistory() { + cy.get("[name=medical_history_check_1]").scrollIntoView(); + cy.get("[name=medical_history_check_1]").check(); + } + + verifyPatientMedicalDetails( + patientPresentHealth, + patientOngoingMedication, + patientAllergies, + patientSymptoms1, + patientSymptoms2, + patientSymptoms3, + patientSymptoms4, + patientSymptoms5, + patientSymptoms6, + patientSymptoms7 + ) { + cy.get("[data-testid=patient-details]").then(($dashboard) => { + cy.url().should("include", "/facility/"); + expect($dashboard).to.contain(patientPresentHealth); + expect($dashboard).to.contain(patientOngoingMedication); + expect($dashboard).to.contain(patientAllergies); + expect($dashboard).to.contain(patientSymptoms1); + expect($dashboard).to.contain(patientSymptoms2); + expect($dashboard).to.contain(patientSymptoms3); + expect($dashboard).to.contain(patientSymptoms4); + expect($dashboard).to.contain(patientSymptoms5); + expect($dashboard).to.contain(patientSymptoms6); + expect($dashboard).to.contain(patientSymptoms7); + }); + } + + verifyNoSymptosPresent(patientSymptoms1: string) { + cy.get("[data-testid=patient-details]").should( + "not.contain", + patientSymptoms1 + ); + } +} + +export default PatientMedicalHistory; diff --git a/cypress/pageobject/Patient/PatientTransfer.ts b/cypress/pageobject/Patient/PatientTransfer.ts new file mode 100644 index 00000000000..293490a8bdd --- /dev/null +++ b/cypress/pageobject/Patient/PatientTransfer.ts @@ -0,0 +1,63 @@ +class PatientTransfer { + clickAdmitPatientRecordButton() { + cy.get("#transfer").click(); + } + + clickTransferPopupContinueButton() { + cy.get("#submit-continue-button").click(); + } + + clickTransferPatientNameList(facilityName: string) { + cy.get("#patient").click(); + cy.get("li[role=option]").contains(facilityName).click(); + } + + clickTransferPatientDob(dateOfBirth: string) { + cy.get("#dateofbirth-transferform").scrollIntoView(); + cy.get("#dateofbirth-transferform").should("be.visible").click(); + cy.get("#date-input").click().type(dateOfBirth); + } + + clickTransferSubmitButton() { + cy.get("#submit-transferpatient").click(); + } + + clickConsultationCancelButton() { + cy.get("#cancel").scrollIntoView(); + cy.get("#cancel").click(); + } + + clickAllowPatientTransferButton() { + cy.get("#patient-allow-transfer").click(); + } + + verifyFacilitySuccessfullMessage() { + cy.get(".pnotify") + .should("exist") + .within(() => { + cy.get(".pnotify-text") + .invoke("text") + .then((text) => { + expect(text.trim()).to.match( + /^Patient Dummy Patient 10 \(Male\) transferred successfully$/i + ); + }); + }); + } + + verifyFacilityErrorMessage() { + cy.get(".pnotify") + .should("exist") + .within(() => { + cy.get(".pnotify-text") + .invoke("text") + .then((text) => { + expect(text).to.match( + /Patient - Patient transfer cannot be completed because the patient has an active consultation in the same facility/ + ); + }); + }); + } +} + +export default PatientTransfer; diff --git a/cypress/pageobject/Patient/PatientUpdate.ts b/cypress/pageobject/Patient/PatientUpdate.ts deleted file mode 100644 index b26ef678679..00000000000 --- a/cypress/pageobject/Patient/PatientUpdate.ts +++ /dev/null @@ -1,97 +0,0 @@ -let patient_url = ""; - -export class UpdatePatientPage { - enterPatientDetails( - patientName: string, - bloodGroup: string, - phoneNumber: string, - emergencyPhoneNumber: string, - address: string, - currentHealthCondition: string, - ongoingMedication: string, - allergies: string, - medicalHistory: string[], - subscriberId: string, - policyId: string, - insuranceId: string, - insuranceName: string - ) { - cy.wait(10000); - cy.get("#address").scrollIntoView(); - cy.get("#address").should("be.visible"); - cy.get("#address").type(address); - cy.get("[data-testid=name] input").clear(); - cy.get("[data-testid=name] input").type(patientName); - cy.get("#phone_number-div").clear(); - cy.get("#phone_number-div").type("+91").type(phoneNumber); - cy.get("#emergency_phone_number-div").clear(); - cy.get("#emergency_phone_number-div") - .type("+91") - .type(emergencyPhoneNumber); - cy.get("#present_health").type(currentHealthCondition); - cy.get("#ongoing_medication").type(ongoingMedication); - cy.get("#allergies").type(allergies); - cy.get("[name=medical_history_check_1]").uncheck(); - cy.get("[name=medical_history_check_2]").check(); - cy.get("#medical_history_2").type(medicalHistory[0]); - cy.get("[name=medical_history_check_3]").check(); - cy.get("#medical_history_3").type(medicalHistory[1]); - cy.get("button").get("[data-testid=add-insurance-button]").click(); - cy.get("#subscriber_id").type(subscriberId); - cy.get("#policy_id").type(policyId); - cy.get("#insurer_id").type(insuranceId); - cy.get("#insurer_name").type(insuranceName); - cy.get("[data-testid=blood-group] button") - .click() - .then(() => { - cy.get("[role='option']").contains(bloodGroup).click(); - }); - } - - clickUpdatePatient() { - cy.intercept("PUT", "**/api/v1/patient/**").as("updatePatient"); - cy.get("button").get("[data-testid=submit-button]").click(); - cy.wait("@updatePatient").its("response.statusCode").should("eq", 200); - } - - verifyPatientUpdated() { - cy.url().should("include", "/patient"); - } - - saveUpdatedPatientUrl() { - cy.url().then((url) => { - cy.log(url); - patient_url = url.split("/").slice(0, -1).join("/"); - cy.log(patient_url); - }); - } - - visitUpdatedPatient() { - cy.awaitUrl(patient_url); - } - - verifyPatientDetails( - patientName: string, - phoneNumber: string, - presentHealth: string, - ongoingMedication: string, - allergies: string - ) { - cy.url().should("include", "/facility/"); - cy.get("[data-testid=patient-dashboard]").should("contain", patientName); - cy.get("[data-testid=patient-dashboard]").should("contain", phoneNumber); - cy.get("[data-testid=patient-present-health]").should( - "contain", - presentHealth - ); - cy.get("[data-testid=patient-ongoing-medication]").should( - "contain", - ongoingMedication - ); - cy.get("[data-testid=patient-allergies]").should("contain", allergies); - } - - visitConsultationPage() { - cy.visit(patient_url + "/consultation"); - } -} diff --git a/netlify.toml b/netlify.toml index 59abf59caff..807a31ea553 100644 --- a/netlify.toml +++ b/netlify.toml @@ -24,12 +24,12 @@ status = 200 cache-control = "max-age=0, no-store" X-Frame-Options = "DENY" X-Content-Type-Options = "nosniff" - Content-Security-Policy = ''' + Content-Security-Policy-Report-Only = ''' default-src 'self'; - script-src 'self' blob: 'nonce-f51b9742' https://plausible.10bedicu.in; + script-src 'self' 'nonce-f51b9742' https://plausible.10bedicu.in; style-src 'self' 'unsafe-inline'; - connect-src *; - img-src 'self' blob: data: https://cdn.coronasafe.network https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; - media-src * blob: data:; - object-src 'self' blob: https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; + connect-src 'self' https://plausible.10bedicu.in; + img-src 'self' https://cdn.coronasafe.network https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; + object-src 'self' https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com; + report-uri https://csp-logger.ohc.network/ ''' diff --git a/package-lock.json b/package-lock.json index 7bddb48e206..648fd35ae1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,10 +28,10 @@ "cross-env": "^7.0.3", "date-fns": "^2.30.0", "date-fns-tz": "^2.0.0", - "dayjs": "^1.11.9", + "dayjs": "^1.11.10", "echarts": "^5.4.2", "echarts-for-react": "^3.0.2", - "eslint-mdx": "^2.2.0", + "eslint-mdx": "^3.1.5", "events": "^3.3.0", "i18next": "^23.2.7", "i18next-browser-languagedetector": "^7.1.0", @@ -3253,6 +3253,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -3265,6 +3266,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, "engines": { "node": ">= 8" } @@ -3273,6 +3275,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -3282,12 +3285,12 @@ } }, "node_modules/@npmcli/config": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-6.4.0.tgz", - "integrity": "sha512-/fQjIbuNVIT/PbXvw178Tm97bxV0E0nVUFKHivMKtSI2pcs8xKdaWkHJxf9dTI0G/y5hp/KuCvgcUu5HwAtI1w==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-8.1.0.tgz", + "integrity": "sha512-61LNEybTFaa9Z/f8y6X9s2Blc75aijZK67LxqC5xicBcfkw8M/88nYrRXGXxAUKm6GRlxTZ216dp1UK2+TbaYw==", "dependencies": { "@npmcli/map-workspaces": "^3.0.2", - "ci-info": "^3.8.0", + "ci-info": "^4.0.0", "ini": "^4.1.0", "nopt": "^7.0.0", "proc-log": "^3.0.0", @@ -3296,7 +3299,21 @@ "walk-up-path": "^3.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/config/node_modules/ci-info": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" } }, "node_modules/@npmcli/config/node_modules/ini": { @@ -3390,18 +3407,10 @@ "node": ">=14" } }, - "node_modules/@pkgr/utils": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", - "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", - "dependencies": { - "cross-spawn": "^7.0.3", - "fast-glob": "^3.3.0", - "is-glob": "^4.0.3", - "open": "^9.1.0", - "picocolors": "^1.0.0", - "tslib": "^2.6.0" - }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -3409,34 +3418,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@pkgr/utils/node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@pkgr/utils/node_modules/open": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", - "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", - "dependencies": { - "default-browser": "^4.0.0", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@pnotify/core": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@pnotify/core/-/core-5.2.0.tgz", @@ -5459,9 +5440,9 @@ } }, "node_modules/@types/concat-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-2.0.1.tgz", - "integrity": "sha512-v5HP9ZsRbzFq5XRo2liUZPKzwbGK5SuGVMWZjE6iJOm/JNdESk3/rkfcPe0lcal0C32PTLVlYUYqGpMGNdDsDg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-2.0.3.tgz", + "integrity": "sha512-3qe4oQAPNwVNwK4C9c8u+VJqv9kez+2MR4qJpoPFfXtgxxif1QbFusvXzK0/Wra2VX07smostI2VMmJNSpZjuQ==", "dependencies": { "@types/node": "*" } @@ -5628,9 +5609,9 @@ "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==" }, "node_modules/@types/is-empty": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/is-empty/-/is-empty-1.2.2.tgz", - "integrity": "sha512-BmFyKRHSsE+LFmOUQIYMg/8UJ+fNX3fxev0/OXGKWxUldHD8/bQYhXsTF7wR8woS0h8CWdLK39REjQ/Fxm6bFg==" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/is-empty/-/is-empty-1.2.3.tgz", + "integrity": "sha512-4J1l5d79hoIvsrKh5VUKVRA1aIdsOb10Hu5j3J2VfP/msDnfTdGPmNp2E1Wg+vs97Bktzo+MZePFFXSGoykYJw==" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", @@ -5898,9 +5879,9 @@ "dev": true }, "node_modules/@types/supports-color": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/supports-color/-/supports-color-8.1.2.tgz", - "integrity": "sha512-nhs1D8NjNueBqRBhBTsc81g90g7VBD4wnMTMy9oP+QIldHuJkE655QTL2D1jkj3LyCd+Q5Y69oOpfxN1l0eCMA==" + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@types/supports-color/-/supports-color-8.1.3.tgz", + "integrity": "sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==" }, "node_modules/@types/trusted-types": { "version": "2.0.3", @@ -6236,6 +6217,11 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" + }, "node_modules/@vitejs/plugin-react": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-3.1.0.tgz", @@ -7096,6 +7082,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, "dependencies": { "big-integer": "^1.6.44" }, @@ -7252,20 +7239,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bundle-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", - "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", - "dependencies": { - "run-applescript": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -7516,6 +7489,7 @@ "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, "funding": [ { "type": "github", @@ -8225,9 +8199,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.9", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.9.tgz", - "integrity": "sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA==" + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" }, "node_modules/debug": { "version": "4.3.4", @@ -8300,27 +8274,11 @@ "node": ">=0.10.0" } }, - "node_modules/default-browser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", - "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", - "dependencies": { - "bundle-name": "^3.0.0", - "default-browser-id": "^3.0.0", - "execa": "^7.1.1", - "titleize": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/default-browser-id": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, "dependencies": { "bplist-parser": "^0.2.0", "untildify": "^4.0.0" @@ -8332,119 +8290,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/default-browser/node_modules/execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/default-browser/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", - "engines": { - "node": ">=14.18.0" - } - }, - "node_modules/default-browser/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -8626,6 +8471,18 @@ "detect-port": "bin/detect-port.js" } }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -9269,27 +9126,27 @@ } }, "node_modules/eslint-mdx": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-2.2.0.tgz", - "integrity": "sha512-AriN6lCW6KhWQ9GEiXapR1DokKHefOUqKvCmHxnE9puCWYhWiycU2SNKH8jmrasDBreZ+RtJDLi+RcUNLJatjg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-3.1.5.tgz", + "integrity": "sha512-ynztX0k7CQ3iDL7fDEIeg3g0O/d6QPv7IBI9fdYLhXp5fAp0fi8X22xF/D3+Pk0f90R27uwqa1clHpay6t0l8Q==", "dependencies": { - "acorn": "^8.10.0", + "acorn": "^8.11.3", "acorn-jsx": "^5.3.2", "espree": "^9.6.1", - "estree-util-visit": "^1.2.1", - "remark-mdx": "^2.3.0", - "remark-parse": "^10.0.2", - "remark-stringify": "^10.0.3", - "synckit": "^0.8.5", - "tslib": "^2.6.1", - "unified": "^10.1.2", - "unified-engine": "^10.1.0", - "unist-util-visit": "^4.1.2", + "estree-util-visit": "^2.0.0", + "remark-mdx": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "synckit": "^0.9.0", + "tslib": "^2.6.2", + "unified": "^11.0.4", + "unified-engine": "^11.2.0", + "unist-util-visit": "^5.0.0", "uvu": "^0.5.6", - "vfile": "^5.3.7" + "vfile": "^6.0.1" }, "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + "node": ">=18.0.0" }, "funding": { "type": "opencollective", @@ -9299,10 +9156,36 @@ "eslint": ">=8.0.0" } }, + "node_modules/eslint-mdx/node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, + "node_modules/eslint-mdx/node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/eslint-mdx/node_modules/@types/mdast": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.3.tgz", + "integrity": "sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/eslint-mdx/node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" + }, "node_modules/eslint-mdx/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "bin": { "acorn": "bin/acorn" }, @@ -9310,337 +9193,1602 @@ "node": ">=0.4.0" } }, - "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } + "node_modules/eslint-mdx/node_modules/estree-util-is-identifier-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", + "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, + "node_modules/eslint-mdx/node_modules/estree-util-visit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-2.0.0.tgz", + "integrity": "sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==", "dependencies": { - "ms": "^2.1.1" + "@types/estree-jsx": "^1.0.0", + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, + "node_modules/eslint-mdx/node_modules/mdast-util-from-markdown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.0.tgz", + "integrity": "sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==", "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark": "^4.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/mdast-util-mdx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-3.0.0.tgz", + "integrity": "sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/mdast-util-mdx-expression": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz", + "integrity": "sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/mdast-util-mdx-jsx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.0.0.tgz", + "integrity": "sha512-XZuPPzQNBPAlaqsTTgRrcJnyFbSOBovSadFgbFu8SnuNgm+6Bdx1K+IWoitsmj6Lq6MNtI+ytOqwN70n//NaBA==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-remove-position": "^5.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/mdast-util-mdxjs-esm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", + "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/mdast-util-phrasing": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.0.0.tgz", + "integrity": "sha512-xadSsJayQIucJ9n053dfQwVu1kuXg7jCTdYsMK8rqzKZh52nLfSH/k0sAxE0u+pj/zKZX+o5wB+ML5mRayOxFA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/mdast-util-to-markdown": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.0.tgz", + "integrity": "sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-decode-string": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/mdast-util-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/micromark": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.0.tgz", + "integrity": "sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-core-commonmark": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.0.tgz", + "integrity": "sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-extension-mdx-expression": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-3.0.0.tgz", + "integrity": "sha512-sI0nwhUDz97xyzqJAbHQhp5TfaxEvZZZ2JDqUo+7NvyIYG6BZ5CPPqj2ogUoPJlmXHBnyZUzISg9+oUmU6tUjQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-extension-mdx-jsx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-3.0.0.tgz", + "integrity": "sha512-uvhhss8OGuzR4/N17L1JwvmJIpPhAd8oByMawEKx6NVdBCbesjH4t+vjEp3ZXft9DwvlKSD07fCeI44/N0Vf2w==", + "dependencies": { + "@types/acorn": "^4.0.0", + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "micromark-factory-mdx-expression": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-extension-mdx-md": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-2.0.0.tgz", + "integrity": "sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-extension-mdxjs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-3.0.0.tgz", + "integrity": "sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==", + "dependencies": { + "acorn": "^8.0.0", + "acorn-jsx": "^5.0.0", + "micromark-extension-mdx-expression": "^3.0.0", + "micromark-extension-mdx-jsx": "^3.0.0", + "micromark-extension-mdx-md": "^2.0.0", + "micromark-extension-mdxjs-esm": "^3.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-extension-mdxjs-esm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-3.0.0.tgz", + "integrity": "sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==", + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-factory-destination": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.0.tgz", + "integrity": "sha512-j9DGrQLm/Uhl2tCzcbLhy5kXsgkHUrjJHg4fFAeoMRwJmJerT9aw4FEhIbZStWN8A3qMwOp1uzHr4UL8AInxtA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-factory-label": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.0.tgz", + "integrity": "sha512-RR3i96ohZGde//4WSe/dJsxOX6vxIg9TimLAS3i4EhBAFx8Sm5SmqVfR8E87DPSR31nEAjZfbt91OMZWcNgdZw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-factory-mdx-expression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-2.0.1.tgz", + "integrity": "sha512-F0ccWIUHRLRrYp5TC9ZYXmZo+p2AM13ggbsW4T0b5CRKP8KHVRB8t4pwtBgTxtjRmwrK0Irwm7vs2JOZabHZfg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/estree": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-events-to-acorn": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-factory-space": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.0.tgz", + "integrity": "sha512-TKr+LIDX2pkBJXFLzpyPyljzYK3MtmllMUMODTQJIUfDGncESaqB90db9IAUcz4AZAJFdd8U9zOp9ty1458rxg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-factory-title": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.0.tgz", + "integrity": "sha512-jY8CSxmpWLOxS+t8W+FG3Xigc0RDQA9bKMY/EwILvsesiRniiVMejYTE4wumNc2f4UbAa4WsHqe3J1QS1sli+A==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-factory-whitespace": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.0.tgz", + "integrity": "sha512-28kbwaBjc5yAI1XadbdPYHX/eDnqaUFVikLwrO7FDnKG7lpgxnvk/XGRhX/PN0mOZ+dBSZ+LgunHS+6tYQAzhA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-character": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", + "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-chunked": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.0.tgz", + "integrity": "sha512-anK8SWmNphkXdaKgz5hJvGa7l00qmcaUQoMYsBwDlSKFKjc6gjGXPDw3FNL3Nbwq5L8gE+RCbGqTw49FK5Qyvg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-classify-character": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.0.tgz", + "integrity": "sha512-S0ze2R9GH+fu41FA7pbSqNWObo/kzwf8rN/+IGlW/4tC6oACOs8B++bh+i9bVyNnwCcuksbFwsBme5OCKXCwIw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-combine-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.0.tgz", + "integrity": "sha512-vZZio48k7ON0fVS3CUgFatWHoKbbLTK/rT7pzpJ4Bjp5JjkZeasRfrS9wsBdDJK2cJLHMckXZdzPSSr1B8a4oQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.1.tgz", + "integrity": "sha512-bmkNc7z8Wn6kgjZmVHOX3SowGmVdhYS7yBpMnuMnPzDq/6xwVA604DuOXMZTO1lvq01g+Adfa0pE2UKGlxL1XQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-decode-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.0.tgz", + "integrity": "sha512-r4Sc6leeUTn3P6gk20aFMj2ntPwn6qpDZqWvYmAG6NgvFTIlj4WtrAudLi65qYoaGdXYViXYw2pkmn7QnIFasA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", + "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/eslint-mdx/node_modules/micromark-util-events-to-acorn": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-2.0.2.tgz", + "integrity": "sha512-Fk+xmBrOv9QZnEDguL9OI9/NQQp6Hz4FuQ4YmCb/5V7+9eAh1s6AYSvL20kHkD67YIg7EpE54TiSlcsf3vyZgA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "@types/acorn": "^4.0.0", + "@types/estree": "^1.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "vfile-message": "^4.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-html-tag-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.0.tgz", + "integrity": "sha512-xNn4Pqkj2puRhKdKTm8t1YHC/BAjx6CEwRFXntTaRf/x16aqka6ouVoutm+QdkISTlT7e2zU7U4ZdlDLJd2Mcw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/eslint-mdx/node_modules/micromark-util-normalize-identifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.0.tgz", + "integrity": "sha512-2xhYT0sfo85FMrUPtHcPo2rrp1lwbDEEzpx7jiH2xXJLqBuy4H0GgXk5ToU8IEwoROtXuL8ND0ttVa4rNqYK3w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-resolve-all": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.0.tgz", + "integrity": "sha512-6KU6qO7DZ7GJkaCgwBNtplXCvGkJToU86ybBAUdavvgsCiG8lSSvYxr9MhwmQ+udpzywHsl4RpGJsYWG1pDOcA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-sanitize-uri": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", + "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-subtokenize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.0.tgz", + "integrity": "sha512-vc93L1t+gpR3p8jxeVdaYlbV2jTYteDje19rNSS/H5dlhxUYll5Fy6vJ2cDwP8RnsXi818yGty1ayP55y3W6fg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/eslint-mdx/node_modules/micromark-util-symbol": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", + "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/eslint-mdx/node_modules/micromark-util-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", + "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/eslint-mdx/node_modules/remark-mdx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-3.0.0.tgz", + "integrity": "sha512-O7yfjuC6ra3NHPbRVxfflafAj3LTwx3b73aBvkEFU5z4PsD6FD4vrqJAkE5iNGLz71GdjXfgRqm3SQ0h0VuE7g==", + "dependencies": { + "mdast-util-mdx": "^3.0.0", + "micromark-extension-mdxjs": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/remark-parse": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", + "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/remark-stringify": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", + "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-to-markdown": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/unified": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.4.tgz", + "integrity": "sha512-apMPnyLjAX+ty4OrNap7yumyVAMlKx5IWU2wlzzUdYJO9A8f1p9m/gywF/GM2ZDFcjQPrx59Mc90KwmxsoklxQ==", + "dependencies": { + "@types/unist": "^3.0.0", + "bail": "^2.0.0", + "devlop": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/unist-util-position-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-2.0.0.tgz", + "integrity": "sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/unist-util-remove-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-5.0.0.tgz", + "integrity": "sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-mdx/node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" }, "funding": { "url": "https://github.com/sponsors/mysticatea" }, "peerDependencies": { - "eslint": ">=4.19.1" + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-i18next": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-i18next/-/eslint-plugin-i18next-6.0.3.tgz", + "integrity": "sha512-RtQXYfg6PZCjejIQ/YG+dUj/x15jPhufJ9hUDGH0kCpJ6CkVMAWOQ9exU1CrbPmzeykxLjrXkjAaOZF/V7+DOA==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21", + "requireindex": "~1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", + "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.20.7", + "aria-query": "^5.1.3", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.6.2", + "axobject-query": "^3.1.1", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "has": "^1.0.3", + "jsx-ast-utils": "^3.3.3", + "language-tags": "=1.0.5", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-markdown": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.1.tgz", + "integrity": "sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==", + "dev": true, + "dependencies": { + "mdast-util-from-markdown": "^0.8.5" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/eslint-plugin-markdown/node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/eslint-plugin-mdx": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mdx/-/eslint-plugin-mdx-2.2.0.tgz", + "integrity": "sha512-OseoMXUIr8iy3E0me+wJLVAxuB0kxHP1plxuYAJDynzorzOj2OKv8Fhr+rIOJ32zfl3bnEWsqFnUiCnyznr1JQ==", + "dev": true, + "dependencies": { + "eslint-mdx": "^2.2.0", + "eslint-plugin-markdown": "^3.0.1", + "remark-mdx": "^2.3.0", + "remark-parse": "^10.0.2", + "remark-stringify": "^10.0.3", + "tslib": "^2.6.1", + "unified": "^10.1.2", + "vfile": "^5.3.7" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "eslint": ">=8.0.0" + } + }, + "node_modules/eslint-plugin-mdx/node_modules/@npmcli/config": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@npmcli/config/-/config-6.4.0.tgz", + "integrity": "sha512-/fQjIbuNVIT/PbXvw178Tm97bxV0E0nVUFKHivMKtSI2pcs8xKdaWkHJxf9dTI0G/y5hp/KuCvgcUu5HwAtI1w==", + "dev": true, + "dependencies": { + "@npmcli/map-workspaces": "^3.0.2", + "ci-info": "^3.8.0", + "ini": "^4.1.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.5", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/eslint-plugin-i18next": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-i18next/-/eslint-plugin-i18next-6.0.3.tgz", - "integrity": "sha512-RtQXYfg6PZCjejIQ/YG+dUj/x15jPhufJ9hUDGH0kCpJ6CkVMAWOQ9exU1CrbPmzeykxLjrXkjAaOZF/V7+DOA==", + "node_modules/eslint-plugin-mdx/node_modules/@types/node": { + "version": "18.19.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.11.tgz", + "integrity": "sha512-hzdHPKpDdp5bEcRq1XTlZ2ntVjLcHCTV73dEcGg02eSY/+9AZ+jlfz6i00+zOrunMWenjHuI49J8J7Y9uz50JQ==", "dev": true, "dependencies": { - "lodash": "^4.17.21", - "requireindex": "~1.1.0" + "undici-types": "~5.26.4" + } + }, + "node_modules/eslint-plugin-mdx/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.4.0" } }, - "node_modules/eslint-plugin-import": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", - "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "node_modules/eslint-plugin-mdx/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.7.4", - "has": "^1.0.3", - "is-core-module": "^2.11.0", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.values": "^1.1.6", - "resolve": "^1.22.1", - "semver": "^6.3.0", - "tsconfig-paths": "^3.14.1" - }, "engines": { - "node": ">=4" + "node": ">=12" }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/eslint-plugin-mdx/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "balanced-match": "^1.0.0" } }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "node_modules/eslint-plugin-mdx/node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", "dev": true, + "engines": [ + "node >= 6.0" + ], "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" } }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", - "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", + "node_modules/eslint-plugin-mdx/node_modules/eslint-mdx": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/eslint-mdx/-/eslint-mdx-2.3.4.tgz", + "integrity": "sha512-u4NszEUyoGtR7Q0A4qs0OymsEQdCO6yqWlTzDa9vGWsK7aMotdnW0hqifHTkf6lEtA2vHk2xlkWHTCrhYLyRbw==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.7", - "aria-query": "^5.1.3", - "array-includes": "^3.1.6", - "array.prototype.flatmap": "^1.3.1", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.6.2", - "axobject-query": "^3.1.1", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "has": "^1.0.3", - "jsx-ast-utils": "^3.3.3", - "language-tags": "=1.0.5", - "minimatch": "^3.1.2", - "object.entries": "^1.1.6", - "object.fromentries": "^2.0.6", - "semver": "^6.3.0" + "acorn": "^8.10.0", + "acorn-jsx": "^5.3.2", + "espree": "^9.6.1", + "estree-util-visit": "^1.2.1", + "remark-mdx": "^2.3.0", + "remark-parse": "^10.0.2", + "remark-stringify": "^10.0.3", + "synckit": "^0.9.0", + "tslib": "^2.6.1", + "unified": "^10.1.2", + "unified-engine": "^10.1.0", + "unist-util-visit": "^4.1.2", + "uvu": "^0.5.6", + "vfile": "^5.3.7" }, "engines": { - "node": ">=4.0" + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + "eslint": ">=8.0.0" } }, - "node_modules/eslint-plugin-markdown": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.1.tgz", - "integrity": "sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==", + "node_modules/eslint-plugin-mdx/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { - "mdast-util-from-markdown": "^0.8.5" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/eslint-plugin-markdown/node_modules/character-entities": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", - "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "node_modules/eslint-plugin-mdx/node_modules/import-meta-resolve": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.2.2.tgz", + "integrity": "sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==", "dev": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/eslint-plugin-markdown/node_modules/character-entities-legacy": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", - "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "node_modules/eslint-plugin-mdx/node_modules/ini": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/eslint-plugin-markdown/node_modules/character-reference-invalid": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", - "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "node_modules/eslint-plugin-mdx/node_modules/lines-and-columns": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/eslint-plugin-markdown/node_modules/is-alphabetical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", - "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "node_modules/eslint-plugin-mdx/node_modules/load-plugin": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-5.1.0.tgz", + "integrity": "sha512-Lg1CZa1CFj2CbNaxijTL6PCbzd4qGTlZov+iH2p5Xwy/ApcZJh+i6jMN2cYePouTfjJfrNu3nXFdEw8LvbjPFQ==", "dev": true, + "dependencies": { + "@npmcli/config": "^6.0.0", + "import-meta-resolve": "^2.0.0" + }, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/eslint-plugin-markdown/node_modules/is-alphanumerical": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", - "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "node_modules/eslint-plugin-mdx/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-mdx/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-mdx/node_modules/parse-json": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-6.0.2.tgz", + "integrity": "sha512-SA5aMiaIjXkAiBrW/yPgLgQAQg42f7K3ACO+2l/zOvtQBwX58DMUsFJXelW2fx3yMBmWOVkR6j1MGsdSbCA4UA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.0", + "error-ex": "^1.3.2", + "json-parse-even-better-errors": "^2.3.1", + "lines-and-columns": "^2.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-markdown/node_modules/is-decimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", - "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "node_modules/eslint-plugin-mdx/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-mdx/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-mdx/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/eslint-plugin-markdown/node_modules/is-hexadecimal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", - "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "node_modules/eslint-plugin-mdx/node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", "dev": true, + "engines": { + "node": ">=12" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/eslint-plugin-markdown/node_modules/mdast-util-from-markdown": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", - "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "node_modules/eslint-plugin-mdx/node_modules/unified-engine": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-10.1.0.tgz", + "integrity": "sha512-5+JDIs4hqKfHnJcVCxTid1yBoI/++FfF/1PFdSMpaftZZZY+qg2JFruRbf7PaIwa9KgLotXQV3gSjtY0IdcFGQ==", "dev": true, "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-to-string": "^2.0.0", - "micromark": "~2.11.0", - "parse-entities": "^2.0.0", - "unist-util-stringify-position": "^2.0.0" + "@types/concat-stream": "^2.0.0", + "@types/debug": "^4.0.0", + "@types/is-empty": "^1.0.0", + "@types/node": "^18.0.0", + "@types/unist": "^2.0.0", + "concat-stream": "^2.0.0", + "debug": "^4.0.0", + "fault": "^2.0.0", + "glob": "^8.0.0", + "ignore": "^5.0.0", + "is-buffer": "^2.0.0", + "is-empty": "^1.0.0", + "is-plain-obj": "^4.0.0", + "load-plugin": "^5.0.0", + "parse-json": "^6.0.0", + "to-vfile": "^7.0.0", + "trough": "^2.0.0", + "unist-util-inspect": "^7.0.0", + "vfile-message": "^3.0.0", + "vfile-reporter": "^7.0.0", + "vfile-statistics": "^2.0.0", + "yaml": "^2.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/eslint-plugin-markdown/node_modules/mdast-util-to-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", - "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "node_modules/eslint-plugin-mdx/node_modules/unist-util-inspect": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-7.0.2.tgz", + "integrity": "sha512-Op0XnmHUl6C2zo/yJCwhXQSm/SmW22eDZdWP2qdf4WpGrgO1ZxFodq+5zFyeRGasFjJotAnLgfuD1jkcKqiH1Q==", "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/eslint-plugin-markdown/node_modules/micromark": { - "version": "2.11.4", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", - "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "dependencies": { - "debug": "^4.0.0", - "parse-entities": "^2.0.0" - } - }, - "node_modules/eslint-plugin-markdown/node_modules/parse-entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", - "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "node_modules/eslint-plugin-mdx/node_modules/vfile-reporter": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-7.0.5.tgz", + "integrity": "sha512-NdWWXkv6gcd7AZMvDomlQbK3MqFWL1RlGzMn++/O2TI+68+nqxCPTvLugdOtfSzXmjh+xUyhp07HhlrbJjT+mw==", "dev": true, "dependencies": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" + "@types/supports-color": "^8.0.0", + "string-width": "^5.0.0", + "supports-color": "^9.0.0", + "unist-util-stringify-position": "^3.0.0", + "vfile": "^5.0.0", + "vfile-message": "^3.0.0", + "vfile-sort": "^3.0.0", + "vfile-statistics": "^2.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/eslint-plugin-markdown/node_modules/unist-util-stringify-position": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", - "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "node_modules/eslint-plugin-mdx/node_modules/vfile-sort": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-3.0.1.tgz", + "integrity": "sha512-1os1733XY6y0D5x0ugqSeaVJm9lYgj0j5qdcZQFyxlZOSy1jYarL77lLyb5gK4Wqr1d5OxmuyflSO3zKyFnTFw==", "dev": true, "dependencies": { - "@types/unist": "^2.0.2" + "vfile": "^5.0.0", + "vfile-message": "^3.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/eslint-plugin-mdx": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mdx/-/eslint-plugin-mdx-2.2.0.tgz", - "integrity": "sha512-OseoMXUIr8iy3E0me+wJLVAxuB0kxHP1plxuYAJDynzorzOj2OKv8Fhr+rIOJ32zfl3bnEWsqFnUiCnyznr1JQ==", + "node_modules/eslint-plugin-mdx/node_modules/vfile-statistics": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-2.0.1.tgz", + "integrity": "sha512-W6dkECZmP32EG/l+dp2jCLdYzmnDBIw6jwiLZSER81oR5AHRcVqL+k3Z+pfH1R73le6ayDkJRMk0sutj1bMVeg==", "dev": true, "dependencies": { - "eslint-mdx": "^2.2.0", - "eslint-plugin-markdown": "^3.0.1", - "remark-mdx": "^2.3.0", - "remark-parse": "^10.0.2", - "remark-stringify": "^10.0.3", - "tslib": "^2.6.1", - "unified": "^10.1.2", - "vfile": "^5.3.7" - }, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + "vfile": "^5.0.0", + "vfile-message": "^3.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" - }, - "peerDependencies": { - "eslint": ">=8.0.0" } }, + "node_modules/eslint-plugin-mdx/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", @@ -9997,6 +11145,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.1.0.tgz", "integrity": "sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==", + "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -10006,6 +11155,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-1.2.1.tgz", "integrity": "sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==", + "dev": true, "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/unist": "^2.0.0" @@ -10204,6 +11354,7 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -10219,6 +11370,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -10242,6 +11394,7 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -10250,6 +11403,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", + "dev": true, "dependencies": { "format": "^0.2.0" }, @@ -10522,9 +11676,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -10600,6 +11754,7 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "dev": true, "engines": { "node": ">=0.4.x" } @@ -11567,9 +12722,9 @@ } }, "node_modules/import-meta-resolve": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.2.2.tgz", - "integrity": "sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", + "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -11852,6 +13007,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, "bin": { "is-docker": "cli.js" }, @@ -11930,37 +13086,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-inside-container/node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -12148,6 +13273,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, "engines": { "node": ">=8" }, @@ -12255,6 +13381,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, "dependencies": { "is-docker": "^2.0.0" }, @@ -13164,12 +14291,12 @@ } }, "node_modules/load-plugin": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-5.1.0.tgz", - "integrity": "sha512-Lg1CZa1CFj2CbNaxijTL6PCbzd4qGTlZov+iH2p5Xwy/ApcZJh+i6jMN2cYePouTfjJfrNu3nXFdEw8LvbjPFQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-6.0.2.tgz", + "integrity": "sha512-3KRkTvCOsyNrx4zvBl/+ZMqPdVyp26TIf6xkmfEGuGwCfNQ/HzhktwbJCxd1KJpzPbK42t/WVOL3cX+TDaMRuQ==", "dependencies": { - "@npmcli/config": "^6.0.0", - "import-meta-resolve": "^2.0.0" + "@npmcli/config": "^8.0.0", + "import-meta-resolve": "^4.0.0" }, "funding": { "type": "github", @@ -13512,6 +14639,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-2.0.1.tgz", "integrity": "sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==", + "dev": true, "dependencies": { "mdast-util-from-markdown": "^1.0.0", "mdast-util-mdx-expression": "^1.0.0", @@ -13528,6 +14656,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-1.3.2.tgz", "integrity": "sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==", + "dev": true, "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^2.0.0", @@ -13544,6 +14673,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-2.1.4.tgz", "integrity": "sha512-DtMn9CmVhVzZx3f+optVDF8yFgQVt7FghCRNdlIaS3X5Bnym3hZwPbg/XW86vdpKjlc1PVj26SpnLGeJBXD3JA==", + "dev": true, "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^2.0.0", @@ -13567,6 +14697,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-1.3.1.tgz", "integrity": "sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w==", + "dev": true, "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^2.0.0", @@ -13583,6 +14714,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz", "integrity": "sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==", + "dev": true, "dependencies": { "@types/mdast": "^3.0.0", "unist-util-is": "^5.0.0" @@ -13629,6 +14761,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz", "integrity": "sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==", + "dev": true, "dependencies": { "@types/mdast": "^3.0.0", "@types/unist": "^2.0.0", @@ -13685,12 +14818,14 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, "engines": { "node": ">= 8" } @@ -13774,6 +14909,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-1.0.8.tgz", "integrity": "sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==", + "dev": true, "funding": [ { "type": "GitHub Sponsors", @@ -13798,12 +14934,14 @@ "node_modules/micromark-extension-mdx-expression/node_modules/@types/estree": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==" + "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", + "dev": true }, "node_modules/micromark-extension-mdx-jsx": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-1.0.5.tgz", "integrity": "sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA==", + "dev": true, "dependencies": { "@types/acorn": "^4.0.0", "@types/estree": "^1.0.0", @@ -13824,12 +14962,14 @@ "node_modules/micromark-extension-mdx-jsx/node_modules/@types/estree": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==" + "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", + "dev": true }, "node_modules/micromark-extension-mdx-md": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-1.0.1.tgz", "integrity": "sha512-7MSuj2S7xjOQXAjjkbjBsHkMtb+mDGVW6uI2dBL9snOBCbZmoNgDAeZ0nSn9j3T42UE/g2xVNMn18PJxZvkBEA==", + "dev": true, "dependencies": { "micromark-util-types": "^1.0.0" }, @@ -13842,6 +14982,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-1.0.1.tgz", "integrity": "sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q==", + "dev": true, "dependencies": { "acorn": "^8.0.0", "acorn-jsx": "^5.0.0", @@ -13861,6 +15002,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-1.0.5.tgz", "integrity": "sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w==", + "dev": true, "dependencies": { "@types/estree": "^1.0.0", "micromark-core-commonmark": "^1.0.0", @@ -13880,12 +15022,14 @@ "node_modules/micromark-extension-mdxjs-esm/node_modules/@types/estree": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==" + "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", + "dev": true }, "node_modules/micromark-extension-mdxjs/node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -13938,6 +15082,7 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-1.0.9.tgz", "integrity": "sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA==", + "dev": true, "funding": [ { "type": "GitHub Sponsors", @@ -13962,7 +15107,8 @@ "node_modules/micromark-factory-mdx-expression/node_modules/@types/estree": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==" + "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", + "dev": true }, "node_modules/micromark-factory-space": { "version": "1.1.0", @@ -14159,6 +15305,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-1.2.3.tgz", "integrity": "sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==", + "dev": true, "funding": [ { "type": "GitHub Sponsors", @@ -14183,7 +15330,8 @@ "node_modules/micromark-util-events-to-acorn/node_modules/@types/estree": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==" + "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", + "dev": true }, "node_modules/micromark-util-html-tag-name": { "version": "1.2.0", @@ -14311,6 +15459,7 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -14353,6 +15502,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, "engines": { "node": ">=6" } @@ -14784,6 +15934,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, "dependencies": { "path-key": "^3.0.0" }, @@ -17913,6 +19064,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -18205,7 +19357,8 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", @@ -18924,6 +20077,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -19417,9 +20571,9 @@ } }, "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", - "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -19780,6 +20934,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-2.3.0.tgz", "integrity": "sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==", + "dev": true, "dependencies": { "mdast-util-mdx": "^2.0.0", "micromark-extension-mdxjs": "^1.0.0" @@ -19881,6 +21036,7 @@ "version": "10.0.3", "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-10.0.3.tgz", "integrity": "sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==", + "dev": true, "dependencies": { "@types/mdast": "^3.0.0", "mdast-util-to-markdown": "^1.0.0", @@ -19993,6 +21149,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -20099,85 +21256,31 @@ "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "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-applescript": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", - "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "@types/node": "*", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "supports-color": "^7.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": ">= 10.13.0" } }, - "node_modules/run-applescript/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" + "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" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "engines": { - "node": ">=10.17.0" + "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", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, "funding": [ { "type": "github", @@ -20475,7 +21578,8 @@ "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/simple-update-notifier": { "version": "1.1.0", @@ -20924,6 +22028,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, "engines": { "node": ">=6" } @@ -21040,12 +22145,12 @@ "integrity": "sha512-AsS729u2RHUfEra9xJrE39peJcc2stq2+poBXX8bcM08Y6g9j/i/PUzwNQqkaJde7Ntg1TO7bSREbR5sdosQ+g==" }, "node_modules/synckit": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", - "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.0.tgz", + "integrity": "sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==", "dependencies": { - "@pkgr/utils": "^2.3.1", - "tslib": "^2.5.0" + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -21430,17 +22535,6 @@ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" }, - "node_modules/titleize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", - "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -21482,6 +22576,7 @@ "version": "7.2.4", "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-7.2.4.tgz", "integrity": "sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==", + "dev": true, "dependencies": { "is-buffer": "^2.0.0", "vfile": "^5.1.0" @@ -21604,9 +22699,9 @@ } }, "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -21857,31 +22952,30 @@ } }, "node_modules/unified-engine": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-10.1.0.tgz", - "integrity": "sha512-5+JDIs4hqKfHnJcVCxTid1yBoI/++FfF/1PFdSMpaftZZZY+qg2JFruRbf7PaIwa9KgLotXQV3gSjtY0IdcFGQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-11.2.0.tgz", + "integrity": "sha512-H9wEDpBSM0cpEUuuYAOIiPzLCVN0pjASZZ6FFNzgzYS/HHzl9tArk/ereOMGtcF8m8vgjzw+HrU3YN7oenT7Ww==", "dependencies": { "@types/concat-stream": "^2.0.0", "@types/debug": "^4.0.0", "@types/is-empty": "^1.0.0", - "@types/node": "^18.0.0", - "@types/unist": "^2.0.0", + "@types/node": "^20.0.0", + "@types/unist": "^3.0.0", + "@ungap/structured-clone": "^1.0.0", "concat-stream": "^2.0.0", "debug": "^4.0.0", - "fault": "^2.0.0", - "glob": "^8.0.0", + "glob": "^10.0.0", "ignore": "^5.0.0", - "is-buffer": "^2.0.0", "is-empty": "^1.0.0", "is-plain-obj": "^4.0.0", - "load-plugin": "^5.0.0", - "parse-json": "^6.0.0", - "to-vfile": "^7.0.0", + "load-plugin": "^6.0.0", + "parse-json": "^7.0.0", "trough": "^2.0.0", - "unist-util-inspect": "^7.0.0", - "vfile-message": "^3.0.0", - "vfile-reporter": "^7.0.0", - "vfile-statistics": "^2.0.0", + "unist-util-inspect": "^8.0.0", + "vfile": "^6.0.0", + "vfile-message": "^4.0.0", + "vfile-reporter": "^8.0.0", + "vfile-statistics": "^3.0.0", "yaml": "^2.0.0" }, "funding": { @@ -21889,18 +22983,10 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/unified-engine/node_modules/@types/node": { - "version": "18.18.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", - "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==" - }, - "node_modules/unified-engine/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } + "node_modules/unified-engine/node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, "node_modules/unified-engine/node_modules/concat-stream": { "version": "2.0.0", @@ -21916,58 +23002,88 @@ "typedarray": "^0.0.6" } }, - "node_modules/unified-engine/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "node_modules/unified-engine/node_modules/json-parse-even-better-errors": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", + "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unified-engine/node_modules/lines-and-columns": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/unified-engine/node_modules/parse-json": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", + "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "@babel/code-frame": "^7.21.4", + "error-ex": "^1.3.2", + "json-parse-even-better-errors": "^3.0.0", + "lines-and-columns": "^2.0.3", + "type-fest": "^3.8.0" }, "engines": { - "node": ">=12" + "node": ">=16" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unified-engine/node_modules/lines-and-columns": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.3.tgz", - "integrity": "sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==", + "node_modules/unified-engine/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unified-engine/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/unified-engine/node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", "dependencies": { - "brace-expansion": "^2.0.1" + "@types/unist": "^3.0.0" }, - "engines": { - "node": ">=10" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/unified-engine/node_modules/parse-json": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-6.0.2.tgz", - "integrity": "sha512-SA5aMiaIjXkAiBrW/yPgLgQAQg42f7K3ACO+2l/zOvtQBwX58DMUsFJXelW2fx3yMBmWOVkR6j1MGsdSbCA4UA==", + "node_modules/unified-engine/node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", "dependencies": { - "@babel/code-frame": "^7.16.0", - "error-ex": "^1.3.2", - "json-parse-even-better-errors": "^2.3.1", - "lines-and-columns": "^2.0.2" + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified-engine/node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/unique-string": { @@ -21992,17 +23108,22 @@ } }, "node_modules/unist-util-inspect": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-7.0.2.tgz", - "integrity": "sha512-Op0XnmHUl6C2zo/yJCwhXQSm/SmW22eDZdWP2qdf4WpGrgO1ZxFodq+5zFyeRGasFjJotAnLgfuD1jkcKqiH1Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-8.0.0.tgz", + "integrity": "sha512-/3Wn/wU6/H6UEo4FoYUeo8KUePN8ERiZpQYFWYoihOsr1DoDuv80PeB0hobVZyYSvALa2e556bG1A1/AbwU4yg==", "dependencies": { - "@types/unist": "^2.0.0" + "@types/unist": "^3.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, + "node_modules/unist-util-inspect/node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" + }, "node_modules/unist-util-is": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", @@ -22031,6 +23152,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-1.1.2.tgz", "integrity": "sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==", + "dev": true, "dependencies": { "@types/unist": "^2.0.0" }, @@ -22043,6 +23165,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-4.0.2.tgz", "integrity": "sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==", + "dev": true, "dependencies": { "@types/unist": "^2.0.0", "unist-util-visit": "^4.0.0" @@ -22133,6 +23256,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, "engines": { "node": ">=8" } @@ -22441,24 +23565,29 @@ } }, "node_modules/vfile-reporter": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-7.0.5.tgz", - "integrity": "sha512-NdWWXkv6gcd7AZMvDomlQbK3MqFWL1RlGzMn++/O2TI+68+nqxCPTvLugdOtfSzXmjh+xUyhp07HhlrbJjT+mw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-8.1.0.tgz", + "integrity": "sha512-NfHyHdkCcy0BsXiLA3nId29TY7W7hgpc8nd8Soe3imATx5N4/+mkLYdMR+Y6Zvu6BXMMi0FZsD4FLCm1dN85Pg==", "dependencies": { "@types/supports-color": "^8.0.0", - "string-width": "^5.0.0", + "string-width": "^6.0.0", "supports-color": "^9.0.0", - "unist-util-stringify-position": "^3.0.0", - "vfile": "^5.0.0", - "vfile-message": "^3.0.0", - "vfile-sort": "^3.0.0", - "vfile-statistics": "^2.0.0" + "unist-util-stringify-position": "^4.0.0", + "vfile": "^6.0.0", + "vfile-message": "^4.0.0", + "vfile-sort": "^4.0.0", + "vfile-statistics": "^3.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, + "node_modules/vfile-reporter/node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" + }, "node_modules/vfile-reporter/node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -22470,17 +23599,22 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, + "node_modules/vfile-reporter/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" + }, "node_modules/vfile-reporter/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-6.1.0.tgz", + "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", "dependencies": { "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", + "emoji-regex": "^10.2.1", "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=12" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -22511,13 +23645,96 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/vfile-reporter/node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-reporter/node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-reporter/node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vfile-sort": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-3.0.1.tgz", - "integrity": "sha512-1os1733XY6y0D5x0ugqSeaVJm9lYgj0j5qdcZQFyxlZOSy1jYarL77lLyb5gK4Wqr1d5OxmuyflSO3zKyFnTFw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-4.0.0.tgz", + "integrity": "sha512-lffPI1JrbHDTToJwcq0rl6rBmkjQmMuXkAxsZPRS9DXbaJQvc642eCg6EGxcX2i1L+esbuhq+2l9tBll5v8AeQ==", "dependencies": { - "vfile": "^5.0.0", - "vfile-message": "^3.0.0" + "vfile": "^6.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-sort/node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" + }, + "node_modules/vfile-sort/node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-sort/node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-sort/node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" }, "funding": { "type": "opencollective", @@ -22525,12 +23742,56 @@ } }, "node_modules/vfile-statistics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-2.0.1.tgz", - "integrity": "sha512-W6dkECZmP32EG/l+dp2jCLdYzmnDBIw6jwiLZSER81oR5AHRcVqL+k3Z+pfH1R73le6ayDkJRMk0sutj1bMVeg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-3.0.0.tgz", + "integrity": "sha512-/qlwqwWBWFOmpXujL/20P+Iuydil0rZZNglR+VNm6J0gpLHwuVM5s7g2TfVoswbXjZ4HuIhLMySEyIw5i7/D8w==", "dependencies": { - "vfile": "^5.0.0", - "vfile-message": "^3.0.0" + "vfile": "^6.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-statistics/node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" + }, + "node_modules/vfile-statistics/node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-statistics/node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-statistics/node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" }, "funding": { "type": "opencollective", @@ -23347,4 +24608,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 56d440b6239..0f50a65a090 100644 --- a/package.json +++ b/package.json @@ -68,10 +68,10 @@ "cross-env": "^7.0.3", "date-fns": "^2.30.0", "date-fns-tz": "^2.0.0", - "dayjs": "^1.11.9", + "dayjs": "^1.11.10", "echarts": "^5.4.2", "echarts-for-react": "^3.0.2", - "eslint-mdx": "^2.2.0", + "eslint-mdx": "^3.1.5", "events": "^3.3.0", "i18next": "^23.2.7", "i18next-browser-languagedetector": "^7.1.0", diff --git a/public/config.json b/public/config.json index 9398e28c410..69d898af544 100644 --- a/public/config.json +++ b/public/config.json @@ -21,5 +21,6 @@ "kasp_full_string": "Karunya Arogya Suraksha Padhathi", "sample_format_asset_import": "https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=11JaEhNHdyCHth4YQs_44YaRlP77Rrqe81VSEfg1glko&exportFormat=xlsx", "sample_format_external_result_import": "/External-Results-Template.csv", - "enable_abdm": true + "enable_abdm": true, + "enable_hcx": false } diff --git a/src/Common/hooks/useFilters.tsx b/src/Common/hooks/useFilters.tsx index 4229ae8ab02..1c62a10d9d0 100644 --- a/src/Common/hooks/useFilters.tsx +++ b/src/Common/hooks/useFilters.tsx @@ -5,14 +5,14 @@ import GenericFilterBadge from "../../CAREUI/display/FilterBadge"; import PaginationComponent from "../../Components/Common/Pagination"; import useConfig from "./useConfig"; import { classNames } from "../../Utils/utils"; +import FiltersCache from "../../Utils/FiltersCache"; export type FilterState = Record; -export type FilterParamKeys = string | string[]; interface FilterBadgeProps { name: string; value?: string; - paramKey: FilterParamKeys; + paramKey: string | string[]; } /** @@ -32,18 +32,18 @@ export default function useFilters({ const [showFilters, setShowFilters] = useState(false); const [qParams, _setQueryParams] = useQueryParams(); + const updateCache = (query: QueryParam) => { + const blacklist = FILTERS_CACHE_BLACKLIST.concat(cacheBlacklist); + FiltersCache.set(query, blacklist); + }; + const setQueryParams = ( query: QueryParam, options?: setQueryParamsOptions ) => { - const updatedQParams = { ...query }; - - for (const param of cacheBlacklist) { - delete updatedQParams[param]; - } - + query = FiltersCache.utils.clean(query); _setQueryParams(query, options); - updateFiltersCache(updatedQParams); + updateCache(query); }; const updateQuery = (filter: FilterState) => { @@ -61,15 +61,22 @@ export default function useFilters({ const removeFilter = (param: string) => removeFilters([param]); useEffect(() => { - const cache = getFiltersCache(); const qParamKeys = Object.keys(qParams); - const canSkip = Object.keys(cache).every( - (key) => qParamKeys.includes(key) && qParams[key] === cache[key] - ); - if (canSkip) return; - if (Object.keys(cache).length) { - setQueryParams(cache); + + // If we navigate to a path that has query params set on mount, + // skip restoring the cache, instead update the cache with new filters. + if (qParamKeys.length) { + updateCache(qParams); + return; } + + const cache = FiltersCache.get(); + if (!cache) { + return; + } + + // Restore cache + setQueryParams(cache); }, []); const FilterBadge = ({ name, value, paramKey }: FilterBadgeProps) => { @@ -99,7 +106,7 @@ export default function useFilters({ }; const badgeUtils = { - badge(name: string, paramKey: FilterParamKeys) { + badge(name: string, paramKey: FilterBadgeProps["paramKey"]) { return { name, paramKey }; }, ordering(name = "Sort by", paramKey = "ordering") { @@ -109,7 +116,7 @@ export default function useFilters({ value: qParams[paramKey] && t("SortOptions." + qParams[paramKey]), }; }, - value(name: string, paramKey: FilterParamKeys, value: string) { + value(name: string, paramKey: FilterBadgeProps["paramKey"], value: string) { return { name, value, paramKey }; }, phoneNumber(name = "Phone Number", paramKey = "phone_number") { @@ -278,15 +285,3 @@ const removeFromQuery = (query: Record, params: string[]) => { }; const FILTERS_CACHE_BLACKLIST = ["page", "limit", "offset"]; - -const getFiltersCacheKey = () => `filters--${window.location.pathname}`; -const getFiltersCache = () => { - return JSON.parse(localStorage.getItem(getFiltersCacheKey()) || "{}"); -}; -const updateFiltersCache = (cache: Record) => { - const result = { ...cache }; - for (const param of FILTERS_CACHE_BLACKLIST) { - delete result[param]; - } - localStorage.setItem(getFiltersCacheKey(), JSON.stringify(result)); -}; diff --git a/src/Components/Assets/AssetType/HL7Monitor.tsx b/src/Components/Assets/AssetType/HL7Monitor.tsx index 86b9565e536..a7be23baad8 100644 --- a/src/Components/Assets/AssetType/HL7Monitor.tsx +++ b/src/Components/Assets/AssetType/HL7Monitor.tsx @@ -69,6 +69,11 @@ const HL7Monitor = (props: HL7MonitorProps) => { }; if (isLoading) return ; + + const socketUrl = `wss://${ + middlewareHostname || resolvedMiddleware?.hostname + }/observations/${localipAddress}`; + return (
@@ -126,13 +131,12 @@ const HL7Monitor = (props: HL7MonitorProps) => { )} {assetType === "HL7MONITOR" && ( - + )} {assetType === "VENTILATOR" && ( )}
diff --git a/src/Components/Assets/AssetTypes.tsx b/src/Components/Assets/AssetTypes.tsx index 436c9370dd8..dc70d246e0b 100644 --- a/src/Components/Assets/AssetTypes.tsx +++ b/src/Components/Assets/AssetTypes.tsx @@ -9,14 +9,14 @@ export enum AssetLocationType { } export interface AssetLocationObject { - id: string; + id?: string; name: string; description: string; created_date?: string; modified_date?: string; location_type: AssetLocationType; middleware_address?: string; - facility: { + facility?: { id: string; name: string; }; @@ -105,8 +105,6 @@ export interface AssetData { }; } -export type AssetUpdate = Partial; - export interface AssetsResponse { count: number; next?: string; diff --git a/src/Components/Auth/Login.tsx b/src/Components/Auth/Login.tsx index d1cd94dbab5..8dcae9bafc0 100644 --- a/src/Components/Auth/Login.tsx +++ b/src/Components/Auth/Login.tsx @@ -11,8 +11,8 @@ import useConfig from "../../Common/hooks/useConfig"; import CircularProgress from "../Common/components/CircularProgress"; import ReactMarkdown from "react-markdown"; import rehypeRaw from "rehype-raw"; -import { invalidateFiltersCache } from "../../Utils/utils"; import { useAuthContext } from "../../Common/hooks/useAuthUser"; +import FiltersCache from "../../Utils/FiltersCache"; export const Login = (props: { forgot?: boolean }) => { const { signIn } = useAuthContext(); @@ -93,7 +93,7 @@ export const Login = (props: { forgot?: boolean }) => { const handleSubmit = async (e: any) => { e.preventDefault(); setLoading(true); - invalidateFiltersCache(); + FiltersCache.invaldiateAll(); const validated = validateData(); if (!validated) { setLoading(false); diff --git a/src/Components/Common/FacilitySelect.tsx b/src/Components/Common/FacilitySelect.tsx index 17f67a7def1..b207189d27d 100644 --- a/src/Components/Common/FacilitySelect.tsx +++ b/src/Components/Common/FacilitySelect.tsx @@ -16,7 +16,7 @@ interface FacilitySelectProps { showAll?: boolean; showNOptions?: number; freeText?: boolean; - selected: FacilityModel | FacilityModel[] | null; + selected?: FacilityModel | FacilityModel[] | null; setSelected: (selected: FacilityModel | FacilityModel[] | null) => void; } diff --git a/src/Components/Common/RelativeDateUserMention.tsx b/src/Components/Common/RelativeDateUserMention.tsx index 18fb431574f..6c5a78c7f09 100644 --- a/src/Components/Common/RelativeDateUserMention.tsx +++ b/src/Components/Common/RelativeDateUserMention.tsx @@ -6,6 +6,7 @@ function RelativeDateUserMention(props: { actionDate?: string; user?: PerformedByModel; tooltipPosition?: "top" | "bottom" | "left" | "right"; + withoutSuffix?: boolean; }) { return (
@@ -15,7 +16,9 @@ function RelativeDateUserMention(props: { > {props.actionDate ? formatDateTime(props.actionDate) : "--:--"} - {props.actionDate ? relativeDate(props.actionDate) : "--:--"} + {props.actionDate + ? relativeDate(props.actionDate, props.withoutSuffix ?? false) + : "--:--"}
{props.user && (
diff --git a/src/Components/Common/components/AccordionV2.tsx b/src/Components/Common/components/AccordionV2.tsx index ef4948d8ae3..b8fa441d277 100644 --- a/src/Components/Common/components/AccordionV2.tsx +++ b/src/Components/Common/components/AccordionV2.tsx @@ -1,5 +1,4 @@ import { useRef, useState } from "react"; -import { classNames } from "../../../Utils/utils"; export default function AccordionV2(props: { children: JSX.Element | JSX.Element[]; @@ -55,15 +54,10 @@ export default function AccordionV2(props: {
{props.children}
diff --git a/src/Components/Diagnosis/DiagnosesListAccordion.tsx b/src/Components/Diagnosis/DiagnosesListAccordion.tsx new file mode 100644 index 00000000000..5f339cabc16 --- /dev/null +++ b/src/Components/Diagnosis/DiagnosesListAccordion.tsx @@ -0,0 +1,102 @@ +import { + ActiveConditionVerificationStatuses, + ConditionVerificationStatus, + ConsultationDiagnosis, +} from "./types"; +import { useTranslation } from "react-i18next"; +import { compareBy } from "../../Utils/utils"; +import { useState } from "react"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import ButtonV2 from "../Common/components/ButtonV2"; + +interface Props { + diagnoses: ConsultationDiagnosis[]; +} + +type GroupedDiagnoses = Record< + ConditionVerificationStatus, + ConsultationDiagnosis[] +>; + +function groupDiagnoses(diagnoses: ConsultationDiagnosis[]) { + const groupedDiagnoses = {} as GroupedDiagnoses; + + for (const status of ActiveConditionVerificationStatuses) { + groupedDiagnoses[status] = diagnoses + .filter((d) => d.verification_status === status) + .sort(compareBy("is_principal")); + } + + return groupedDiagnoses; +} + +export default function DiagnosesListAccordion(props: Props) { + const [isVisible, setIsVisible] = useState(true); + const diagnoses = groupDiagnoses(props.diagnoses); + + return ( +
+
+ {!isVisible && ( + { + setIsVisible((prev) => !prev); + }} + > + + Expand Diagnoses + + )} +
+
+

+ Diagnoses +

+
+ {Object.entries(diagnoses).map( + ([status, diagnoses]) => + !!diagnoses.length && ( + + ) + )} +
+ { + setIsVisible(false); + }} + > + + Hide Diagnoses + +
+
+ ); +} + +const DiagnosesOfStatus = ({ diagnoses }: Props) => { + const { t } = useTranslation(); + + return ( +
+

+ {t(diagnoses[0].verification_status)} {t("diagnoses")}{" "} + ({t("icd11_as_recommended")}) +

+
    + {diagnoses.map((diagnosis) => ( +
  • + {diagnosis.diagnosis_object?.label} +
  • + ))} +
+
+ ); +}; diff --git a/src/Components/Diagnosis/LegacyDiagnosesList.tsx b/src/Components/Diagnosis/LegacyDiagnosesList.tsx deleted file mode 100644 index 408bee7b52a..00000000000 --- a/src/Components/Diagnosis/LegacyDiagnosesList.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { useState } from "react"; -import { - ActiveConditionVerificationStatuses, - ConditionVerificationStatus, - ConsultationDiagnosis, -} from "./types"; -import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { compareBy } from "../../Utils/utils"; - -interface Props { - diagnoses: ConsultationDiagnosis[]; -} - -type GroupedDiagnoses = Record< - ConditionVerificationStatus, - ConsultationDiagnosis[] ->; - -function groupDiagnoses(diagnoses: ConsultationDiagnosis[]) { - const groupedDiagnoses = {} as GroupedDiagnoses; - - for (const status of ActiveConditionVerificationStatuses) { - groupedDiagnoses[status] = diagnoses - .filter((d) => d.verification_status === status) - .sort(compareBy("is_principal")); - } - - return groupedDiagnoses; -} - -export default function LegacyDiagnosesList(props: Props) { - const diagnoses = groupDiagnoses(props.diagnoses); - - return ( -
- {Object.entries(diagnoses).map( - ([status, diagnoses]) => - !!diagnoses.length && ( - - ) - )} -
- ); -} - -const DefaultShowLimit = 3; - -const DiagnosesOfStatus = ({ diagnoses }: Props) => { - const { t } = useTranslation(); - const [showMore, setShowMore] = useState(false); - - const queryset = showMore ? diagnoses : diagnoses.slice(0, DefaultShowLimit); - - return ( -
-

- {t(queryset[0].verification_status)} {t("diagnoses")}{" "} - ({t("icd11_as_recommended")}) -

-
    - {queryset.map((diagnosis) => ( -
  • - {diagnosis.diagnosis_object.label} - {diagnosis.is_principal && ( - - - {t("principal")} - - )} -
  • - ))} -
- - {diagnoses.length > DefaultShowLimit && ( - setShowMore(!showMore)} - className="cursor-pointer text-sm text-blue-600 hover:text-blue-300" - > - {showMore - ? t("hide") - : `... and ${diagnoses.length - queryset.length} more.`} - - )} -
- ); -}; diff --git a/src/Components/ExternalResult/ResultItem.tsx b/src/Components/ExternalResult/ResultItem.tsx index 47363e02ce1..0954f704176 100644 --- a/src/Components/ExternalResult/ResultItem.tsx +++ b/src/Components/ExternalResult/ResultItem.tsx @@ -77,13 +77,18 @@ export default function ResultItem(props: any) {

- {resultItemData.name} - {resultItemData.age}{" "} - {resultItemData.age_in} | {resultItemData.result} + {resultItemData.name} -{" "} + {resultItemData.age}{" "} + {resultItemData.age_in} |{" "} + {resultItemData.result}

{t("srf_id")}: {resultItemData.srf_id}

-

+

{t("care_external_results_id")}: {resultItemData.id}

{resultItemData.patient_created ? ( diff --git a/src/Components/ExternalResult/ResultList.tsx b/src/Components/ExternalResult/ResultList.tsx index f644c2b54e0..82a49e3a8e3 100644 --- a/src/Components/ExternalResult/ResultList.tsx +++ b/src/Components/ExternalResult/ResultList.tsx @@ -318,7 +318,10 @@ export default function ResultList() { ]} /> -
+
diff --git a/src/Components/Facility/AddInventoryForm.tsx b/src/Components/Facility/AddInventoryForm.tsx index 9e4f761b550..5188f50d088 100644 --- a/src/Components/Facility/AddInventoryForm.tsx +++ b/src/Components/Facility/AddInventoryForm.tsx @@ -1,21 +1,15 @@ -import { useCallback, useReducer, useState, useEffect, lazy } from "react"; -import { useDispatch } from "react-redux"; +import { useReducer, useState, useEffect, lazy } from "react"; import Card from "../../CAREUI/display/Card"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { - getItems, - postInventory, - getAnyFacility, - getInventorySummary, -} from "../../Redux/actions"; import * as Notification from "../../Utils/Notifications.js"; import Page from "../Common/components/Page"; import { FieldLabel } from "../Form/FormFields/FormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextFormField from "../Form/FormFields/TextFormField"; -import { InventoryItemsModel } from "./models"; import { Cancel, Submit } from "../Common/components/ButtonV2"; import useAppHistory from "../../Common/hooks/useAppHistory"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; const Loading = lazy(() => import("../Common/Loading")); @@ -59,77 +53,41 @@ export const AddInventoryForm = (props: any) => { const { goBack } = useAppHistory(); const [state, dispatch] = useReducer(inventoryFormReducer, initialState); const { facilityId } = props; - const dispatchAction: any = useDispatch(); const [isLoading, setIsLoading] = useState(false); const [offset, _setOffset] = useState(0); const [stockError, setStockError] = useState(""); - const [inventory, setInventory] = useState([]); - const [data, setData] = useState>([]); const [currentUnit, setCurrentUnit] = useState(); - const [facilityName, setFacilityName] = useState(""); const limit = 14; - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatchAction(getItems({ limit, offset })); - if (!status.aborted) { - if (res && res.data) { - setData(res.data.results); - } - setIsLoading(false); - } - }, - [dispatchAction, offset] - ); - useAbortableEffect( - (status: statusType) => { - fetchData(status); + const { data } = useQuery(routes.getItems, { + query: { + limit, + offset, }, - [fetchData] - ); + }); - const fetchInventoryData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatchAction( - getInventorySummary(facilityId, { limit, offset }) - ); - if (!status.aborted) { - if (res && res.data) { - setInventory(res.data.results); - } - setIsLoading(false); - } + const { data: inventory } = useQuery(routes.getInventorySummary, { + pathParams: { + facility_external_id: facilityId, }, - [dispatchAction, facilityId] - ); - - useAbortableEffect( - (status: statusType) => { - fetchInventoryData(status); + query: { + limit, + offset, }, - [fetchInventoryData] - ); + prefetch: facilityId !== undefined, + }); - useEffect(() => { - async function fetchFacilityName() { - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); - - setFacilityName(res?.data?.name || ""); - } else { - setFacilityName(""); - } - } - - fetchFacilityName(); - }, [dispatchAction, facilityId]); + const { data: facilityObject } = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + prefetch: !!facilityId, + }); useEffect(() => { // set the default units according to the item - const item = data.find((item) => item.id === Number(state.form.id)); + const item = data?.results.find( + (item) => item.id === Number(state.form.id) + ); if (item) { dispatch({ type: "set_form", @@ -140,7 +98,9 @@ export const AddInventoryForm = (props: any) => { }, [state.form.id]); const defaultUnitConverter = (unitData: any) => { - const unitName = data[Number(unitData.item - 1)].allowed_units?.filter( + const unitName = data?.results[ + Number(unitData.item - 1) + ].allowed_units?.filter( (u: any) => Number(u.id) === Number(unitData.unit) )[0].name; if (unitName === "Dozen") { @@ -155,9 +115,9 @@ export const AddInventoryForm = (props: any) => { // this function determines whether the stock which user has demanded to use is available or not ! const stockValidation = (data: any) => { - if (inventory && inventory.length) { + if (inventory && inventory.results.length) { // get the stock cont of item selected - const stockBefore = inventory.filter( + const stockBefore = inventory.results.filter( (inventoryItem: any) => Number(inventoryItem.item_object.id) === Number(data.item) ); @@ -177,7 +137,7 @@ export const AddInventoryForm = (props: any) => { } setStockError(""); return true; - } else if (inventory && inventory.length === 0) { + } else if (inventory && inventory.results.length === 0) { setStockError("No Stock Available !"); setIsLoading(false); return false; @@ -243,17 +203,19 @@ export const AddInventoryForm = (props: any) => { data.quantity = data.quantity / 1000; data.unit = 6; } - const res = await dispatchAction(postInventory(data, { facilityId })); + await request(routes.createInventory, { + body: data, + pathParams: { facilityId }, + onResponse: ({ res, data }) => { + if (res?.ok && data) { + Notification.Success({ + msg: "Inventory created successfully", + }); + goBack(); + } + }, + }); setIsLoading(false); - - if (res && res.data && (res.status === 200 || res.status === 201)) { - Notification.Success({ - msg: "Inventory created successfully", - }); - goBack(); - } else { - setIsLoading(false); - } } else { setIsLoading(false); } @@ -273,7 +235,9 @@ export const AddInventoryForm = (props: any) => {
@@ -287,7 +251,7 @@ export const AddInventoryForm = (props: any) => { name="id" onChange={handleChange} value={state.form.id} - options={data.map((e) => { + options={(data?.results ?? []).map((e) => { return { id: e.id, name: e.name }; })} optionValue={(inventory) => inventory.id} diff --git a/src/Components/Facility/AddLocationForm.tsx b/src/Components/Facility/AddLocationForm.tsx index 8f756f91781..b9300708781 100644 --- a/src/Components/Facility/AddLocationForm.tsx +++ b/src/Components/Facility/AddLocationForm.tsx @@ -1,11 +1,4 @@ -import { useState, useEffect, lazy, SyntheticEvent } from "react"; -import { useDispatch } from "react-redux"; -import { - createFacilityAssetLocation, - getAnyFacility, - getFacilityAssetLocation, - updateFacilityAssetLocation, -} from "../../Redux/actions"; +import { useState, lazy, SyntheticEvent } from "react"; import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; import { Submit, Cancel } from "../Common/components/ButtonV2"; @@ -14,17 +7,18 @@ import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import Page from "../Common/components/Page"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { AssetLocationType } from "../Assets/AssetTypes"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; const Loading = lazy(() => import("../Common/Loading")); -interface LocationFormProps { +interface Props { facilityId: string; locationId?: string; } -export const AddLocationForm = (props: LocationFormProps) => { - const { facilityId, locationId } = props; - const dispatchAction: any = useDispatch(); +export const AddLocationForm = ({ facilityId, locationId }: Props) => { const [isLoading, setIsLoading] = useState(false); const [name, setName] = useState(""); const [middlewareAddress, setMiddlewareAddress] = useState(""); @@ -41,29 +35,30 @@ export const AddLocationForm = (props: LocationFormProps) => { const headerText = !locationId ? "Add Location" : "Update Location"; const buttonText = !locationId ? "Add Location" : "Update Location"; - useEffect(() => { - async function fetchFacilityName() { - setIsLoading(true); - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); - - setFacilityName(res?.data?.name || ""); - } - if (locationId) { - const res = await dispatchAction( - getFacilityAssetLocation(facilityId, locationId) - ); - - setName(res?.data?.name || ""); - setLocationName(res?.data?.name || ""); - setDescription(res?.data?.description || ""); - setLocationType(res?.data?.location_type || ""); - setMiddlewareAddress(res?.data?.middleware_address || ""); - } - setIsLoading(false); - } - fetchFacilityName(); - }, [dispatchAction, facilityId, locationId]); + const facilityQuery = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + prefetch: !locationId, + onResponse: ({ data }) => { + data?.name && setFacilityName(data.name); + }, + }); + + const locationQuery = useQuery(routes.getFacilityAssetLocation, { + pathParams: { + facility_external_id: facilityId, + external_id: locationId!, + }, + prefetch: !!locationId, + onResponse: ({ data }) => { + if (!data) return; + setFacilityName(data.facility?.name ?? ""); + setName(data.name); + setLocationName(data.name); + setDescription(data.description); + setLocationType(data.location_type); + setMiddlewareAddress(data.middleware_address ?? ""); + }, + }); const validateForm = () => { let formValid = true; @@ -109,39 +104,40 @@ export const AddLocationForm = (props: LocationFormProps) => { name, description, middleware_address: middlewareAddress, - location_type: locationType, + location_type: locationType as AssetLocationType, }; - const res = await dispatchAction( - locationId - ? updateFacilityAssetLocation(data, facilityId, locationId) - : createFacilityAssetLocation(data, facilityId) - ); + const { res, error } = await (locationId + ? request(routes.updateFacilityAssetLocation, { + body: data, + pathParams: { + facility_external_id: facilityId, + external_id: locationId, + }, + }) + : request(routes.createFacilityAssetLocation, { + body: data, + pathParams: { facility_external_id: facilityId }, + })); + setIsLoading(false); - if (res) { - if (res.status === 201 || res.status === 200) { - const notificationMessage = locationId + + if (res?.ok) { + navigate(`/facility/${facilityId}/location`, { replace: true }); + Notification.Success({ + msg: locationId ? "Location updated successfully" - : "Location created successfully"; - - navigate(`/facility/${facilityId}/location`, { - replace: true, - }); - Notification.Success({ - msg: notificationMessage, - }); - } else if (res.status === 400) { - Object.keys(res.data).forEach((key) => { - setErrors((prevState: any) => ({ - ...prevState, - [key]: res.data[key], - })); - }); - } + : "Location created successfully", + }); + return; + } + + if (error) { + setErrors(error); } }; - if (isLoading) { + if (isLoading || locationQuery.loading || facilityQuery.loading) { return ; } diff --git a/src/Components/Facility/AssetCreate.tsx b/src/Components/Facility/AssetCreate.tsx index 35f71a746fd..784174cd2f7 100644 --- a/src/Components/Facility/AssetCreate.tsx +++ b/src/Components/Facility/AssetCreate.tsx @@ -1,6 +1,6 @@ import * as Notification from "../../Utils/Notifications.js"; -import { AssetClass, AssetData, AssetType } from "../Assets/AssetTypes"; +import { AssetClass, AssetType } from "../Assets/AssetTypes"; import { Cancel, Submit } from "../Common/components/ButtonV2"; import { LegacyRef, @@ -11,12 +11,6 @@ import { useReducer, useState, } from "react"; -import { - createAsset, - getAsset, - listFacilityAssetLocation, - updateAsset, -} from "../../Redux/actions"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; @@ -32,13 +26,15 @@ import TextFormField from "../Form/FormFields/TextFormField"; import { navigate } from "raviger"; import { parseQueryParams } from "../../Utils/primitives"; import useAppHistory from "../../Common/hooks/useAppHistory"; -import { useDispatch } from "react-redux"; import useVisibility from "../../Utils/useVisibility"; import { validateEmailAddress } from "../../Common/validation"; import { dateQueryString, parsePhoneNumber } from "../../Utils/utils.js"; import dayjs from "../../Utils/dayjs"; import DateFormField from "../Form/FormFields/DateFormField.js"; import { t } from "i18next"; +import useQuery from "../../Utils/request/useQuery.js"; +import routes from "../../Redux/api.js"; +import request from "../../Utils/request/request.js"; const Loading = lazy(() => import("../Common/Loading")); @@ -124,18 +120,12 @@ const AssetCreate = (props: AssetProps) => { const [support_email, setSupportEmail] = useState(""); const [location, setLocation] = useState(""); const [isLoading, setIsLoading] = useState(false); - const [locations, setLocations] = useState<{ name: string; id: string }[]>( - [] - ); - const [asset, setAsset] = useState(); - const [facilityName, setFacilityName] = useState(""); const [qrCodeId, setQrCodeId] = useState(""); const [manufacturer, setManufacturer] = useState(""); const [warranty_amc_end_of_validity, setWarrantyAmcEndOfValidity] = useState(null); const [last_serviced_on, setLastServicedOn] = useState(null); const [notes, setNotes] = useState(""); - const dispatchAction: any = useDispatch(); const [isScannerActive, setIsScannerActive] = useState(false); const [currentSection, setCurrentSection] = @@ -173,32 +163,20 @@ const AssetCreate = (props: AssetProps) => { }); }, [generalDetailsVisible, warrantyDetailsVisible, serviceDetailsVisible]); - useEffect(() => { - setIsLoading(true); - dispatchAction( - listFacilityAssetLocation({}, { facility_external_id: facilityId }) - ).then(({ data }: any) => { - if (data.count > 0) { - setFacilityName(data.results[0].facility?.name); - setLocations(data.results); - } - setIsLoading(false); - }); + const locationsQuery = useQuery(routes.listFacilityAssetLocation, { + pathParams: { facility_external_id: facilityId }, + query: { limit: 1 }, + }); - if (assetId) { - setIsLoading(true); - dispatchAction(getAsset(assetId)).then(({ data }: any) => { - setAsset(data); - setIsLoading(false); - }); - } - }, [assetId, dispatchAction, facilityId]); + const assetQuery = useQuery(routes.getAsset, { + pathParams: { external_id: assetId! }, + prefetch: !!assetId, + onResponse: ({ data: asset }) => { + if (!asset) return; - useEffect(() => { - if (asset) { setName(asset.name); setDescription(asset.description); - setLocation(asset.location_object.id); + setLocation(asset.location_object.id!); setAssetType(asset.asset_type); setAssetClass(asset.asset_class); setIsWorking(String(asset.is_working)); @@ -215,8 +193,8 @@ const AssetCreate = (props: AssetProps) => { asset.last_service?.serviced_on && setLastServicedOn(asset.last_service?.serviced_on); asset.last_service?.note && setNotes(asset.last_service?.note); - } - }, [asset]); + }, + }); const validateForm = () => { const errors = { ...initError }; @@ -355,26 +333,25 @@ const AssetCreate = (props: AssetProps) => { } if (!assetId) { - const res = await dispatchAction(createAsset(data)); - if (res && res.data && res.status === 201) { - Notification.Success({ - msg: "Asset created successfully", - }); - if (!addMore) { - goBack(); - } else { + const { res } = await request(routes.createAsset, { body: data }); + if (res?.ok) { + Notification.Success({ msg: "Asset created successfully" }); + if (addMore) { resetFilters(); const pageContainer = window.document.getElementById("pages"); pageContainer?.scroll(0, 0); + } else { + goBack(); } } setIsLoading(false); } else { - const res = await dispatchAction(updateAsset(assetId, data)); - if (res && res.data && res.status === 200) { - Notification.Success({ - msg: "Asset updated successfully", - }); + const { res } = await request(routes.updateAsset, { + pathParams: { external_id: assetId }, + body: data, + }); + if (res?.ok) { + Notification.Success({ msg: "Asset updated successfully" }); goBack(); } setIsLoading(false); @@ -400,14 +377,15 @@ const AssetCreate = (props: AssetProps) => { setIsScannerActive(false); }; - if (isLoading) return ; + if (isLoading || locationsQuery.loading || assetQuery.loading) { + return ; + } - if (locations.length === 0) { + if (locationsQuery.data?.count === 0) { return ( { title={`${assetId ? t("update") : t("create")} Asset`} className="grow-0 pl-6" crumbsReplacements={{ - [facilityId]: { name: facilityName }, + [facilityId]: { + name: locationsQuery.data?.results[0].facility?.name, + }, assets: { style: "text-gray-200 pointer-events-none" }, [assetId || "????"]: { name }, }} diff --git a/src/Components/Facility/ConsultationCard.tsx b/src/Components/Facility/ConsultationCard.tsx index c402853f366..1c6ec77afde 100644 --- a/src/Components/Facility/ConsultationCard.tsx +++ b/src/Components/Facility/ConsultationCard.tsx @@ -163,6 +163,7 @@ export const ConsultationCard = (props: ConsultationProps) => { `/facility/${itemData.facility}/patient/${itemData.patient}/consultation/${itemData.id}/daily-rounds` ) } + disabled={itemData.discharge_date} authorizeFor={NonReadOnlyUsers} > Add Consultation Updates diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index 4158d7f6609..323715ccfb0 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -342,7 +342,7 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { from{" "} {formatDate( - props.consultationData.last_daily_round.created_at + props.consultationData.last_daily_round.taken_at )} @@ -602,58 +602,59 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {
)} - -
-
-

- Body Details -

-
-
- Gender {" - "} - - {props.patientData.gender ?? "-"} - -
-
- Age {" - "} - - {props.patientData.age !== undefined // 0 is a valid age, so we need to check for undefined - ? formatAge( - props.patientData.age, - props.patientData.date_of_birth - ) - : "-"} - -
-
- Weight {" - "} - - {props.consultationData.weight ?? "-"} Kg - -
-
- Height {" - "} - - {props.consultationData.height ?? "-"} cm - -
-
- Body Surface Area {" - "} - - {Math.sqrt( - (Number(props.consultationData.weight) * - Number(props.consultationData.height)) / - 3600 - ).toFixed(2)}{" "} - m2 - -
-
- Blood Group {" - "} - - {props.patientData.blood_group ?? "-"} - +
+
+
+

+ Body Details +

+
+
+ Gender {" - "} + + {props.patientData.gender ?? "-"} + +
+
+ Age {" - "} + + {props.patientData.age !== undefined // 0 is a valid age, so we need to check for undefined + ? formatAge( + props.patientData.age, + props.patientData.date_of_birth + ) + : "-"} + +
+
+ Weight {" - "} + + {props.consultationData.weight ?? "-"} Kg + +
+
+ Height {" - "} + + {props.consultationData.height ?? "-"} cm + +
+
+ Body Surface Area {" - "} + + {Math.sqrt( + (Number(props.consultationData.weight) * + Number(props.consultationData.height)) / + 3600 + ).toFixed(2)}{" "} + m2 + +
+
+ Blood Group {" - "} + + {props.patientData.blood_group ?? "-"} + +
diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index c6cc9e02275..071e7bfc1af 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -15,7 +15,6 @@ import { statusType, useAbortableEffect } from "../../../Common/utils"; import { lazy, useCallback, useState } from "react"; import DoctorVideoSlideover from "../DoctorVideoSlideover"; import { make as Link } from "../../Common/components/Link.bs"; -import PatientInfoCard from "../../Patient/PatientInfoCard"; import { PatientModel } from "../../Patient/models"; import { formatDateTime, relativeTime } from "../../../Utils/utils"; @@ -37,8 +36,10 @@ import { ConsultationDialysisTab } from "./ConsultationDialysisTab"; import { ConsultationNeurologicalMonitoringTab } from "./ConsultationNeurologicalMonitoringTab"; import { ConsultationNutritionTab } from "./ConsultationNutritionTab"; import PatientNotesSlideover from "../PatientNotesSlideover"; -import LegacyDiagnosesList from "../../Diagnosis/LegacyDiagnosesList"; import { AssetBedModel } from "../../Assets/AssetTypes"; +import PatientInfoCard from "../../Patient/PatientInfoCard"; +import RelativeDateUserMention from "../../Common/RelativeDateUserMention"; +import DiagnosesListAccordion from "../../Diagnosis/DiagnosesListAccordion"; const Loading = lazy(() => import("../../Common/Loading")); const PageTitle = lazy(() => import("../../Common/PageTitle")); @@ -343,7 +344,7 @@ export const ConsultationDetails = (props: any) => { showAbhaProfile={qParams["show-abha-profile"] === "true"} /> -
+
{consultationData.admitted_to && (
@@ -374,71 +375,39 @@ export const ConsultationDetails = (props: any) => {
)}
- -
-
- {/*consultationData.other_symptoms && ( -
- - Other Symptoms:{" "} - - {consultationData.other_symptoms} -
- )*/} - - - - {(consultationData.treating_physician_object || - consultationData.deprecated_verified_by) && ( -
- - Treating Physician:{" "} - - {consultationData.treating_physician_object - ? `${consultationData.treating_physician_object.first_name} ${consultationData.treating_physician_object.last_name}` - : consultationData.deprecated_verified_by} - -
- )} -
-
-
+
-
- Created: - {consultationData.created_date - ? formatDateTime(consultationData.created_date) - : "--:--"}{" "} - | +
+ Created:   +
- {consultationData.created_by && ( -
- {` ${consultationData.created_by.first_name} ${consultationData.created_by.last_name} `} - {`@${consultationData.created_by.username} (${consultationData.created_by.user_type})`} -
- )}
-
- Last Modified: - {consultationData.modified_date - ? formatDateTime(consultationData.modified_date) - : "--:--"}{" "} - | +
+ Last Modified:   +
- {consultationData.last_edited_by && ( -
- {` ${consultationData.last_edited_by.first_name} ${consultationData.last_edited_by.last_name} `} - {`@${consultationData.last_edited_by.username} (${consultationData.last_edited_by.user_type})`} -
- )}
- +
+
+ +
+
diff --git a/src/Components/Facility/Consultations/Mews.tsx b/src/Components/Facility/Consultations/Mews.tsx index 14e7d7f9e63..8e109410958 100644 --- a/src/Components/Facility/Consultations/Mews.tsx +++ b/src/Components/Facility/Consultations/Mews.tsx @@ -1,6 +1,5 @@ import { DailyRoundsModel } from "../../Patient/models"; -import RecordMeta from "../../../CAREUI/display/RecordMeta"; -import { classNames } from "../../../Utils/utils"; +import { formatDateTime } from "../../../Utils/utils"; const getRespScore = (value?: number) => { if (typeof value !== "number") return; @@ -60,35 +59,45 @@ const getLOCRange = (value?: DailyRoundsModel["consciousness_level"]) => { }[value]; }; +const getBorderColor = (score: number) => { + if (score === undefined) return "border-gray-700"; + if (score <= 2) return "border-primary-500"; + if (score <= 3) return "border-yellow-300"; + if (score <= 5) return "border-warning-600"; + return "border-danger-500"; +}; + export const Mews = ({ dailyRound }: { dailyRound: DailyRoundsModel }) => { const mewsCard = (isMissing: boolean, data: string[] | number) => { if (isMissing) { return ( <> -
-

N/A

+
+
+ - +
+ MEWS
{(data as string[]).join(", ")}{" "} data is missing from the last log update. +
Last Updated: {formatDateTime(dailyRound.modified_date)}
-
- -
-
+
); } else { - const value = Number(data); return ( <> -
-

{data}

+
+
+ {data} +
+ MEWS

Resp. Rate: {dailyRound.resp} @@ -113,25 +122,10 @@ export const Mews = ({ dailyRound }: { dailyRound: DailyRoundsModel }) => { .toLowerCase()}

+ Last Updated: {formatDateTime(dailyRound.modified_date)}
-
- -
6 && "bg-danger-500" - )} - >
-
+
); } @@ -149,8 +143,7 @@ export const Mews = ({ dailyRound }: { dailyRound: DailyRoundsModel }) => { if (Object.values(scores).some((value) => value === undefined)) { return ( -
-

MEWS Score

+
{mewsCard( true, Object.entries(scores) @@ -162,8 +155,7 @@ export const Mews = ({ dailyRound }: { dailyRound: DailyRoundsModel }) => { } return ( -
-

MEWS Score

+
{mewsCard( false, Object.values(scores as Record).reduce((p, v) => p + v) diff --git a/src/Components/Facility/CoverImageEditModal.tsx b/src/Components/Facility/CoverImageEditModal.tsx index 4b3519ca745..8de463ad9b5 100644 --- a/src/Components/Facility/CoverImageEditModal.tsx +++ b/src/Components/Facility/CoverImageEditModal.tsx @@ -6,8 +6,6 @@ import { useRef, useState, } from "react"; -import { useDispatch } from "react-redux"; -import { deleteFacilityCoverImage } from "../../Redux/actions"; import { Success } from "../../Utils/Notifications"; import useDragAndDrop from "../../Utils/useDragAndDrop"; import { sleep } from "../../Utils/utils"; @@ -20,6 +18,8 @@ import * as Notification from "../../Utils/Notifications.js"; import { useTranslation } from "react-i18next"; import { LocalStorageKeys } from "../../Common/constants"; import DialogModal from "../Common/Dialog"; +import request from "../../Utils/request/request"; +import routes from "../../Redux/api"; interface Props { open: boolean; onClose: (() => void) | undefined; @@ -35,7 +35,6 @@ const CoverImageEditModal = ({ onDelete, facility, }: Props) => { - const dispatch = useDispatch(); const [isUploading, setIsUploading] = useState(false); const [selectedFile, setSelectedFile] = useState(); const [preview, setPreview] = useState(); @@ -143,13 +142,14 @@ const CoverImageEditModal = ({ }; const handleDelete = async () => { - const res = await dispatch(deleteFacilityCoverImage(facility.id as any)); - if (res.statusCode === 204) { + const { res } = await request(routes.deleteFacilityCoverImage, { + pathParams: { id: facility.id! }, + }); + if (res?.ok) { Success({ msg: "Cover image deleted" }); + onDelete?.(); + closeModal(); } - - onDelete && onDelete(); - closeModal(); }; const hasImage = !!(preview || facility.read_cover_image_url); diff --git a/src/Components/Facility/DoctorCapacity.tsx b/src/Components/Facility/DoctorCapacity.tsx index 6c7baafaad8..34acb7567c1 100644 --- a/src/Components/Facility/DoctorCapacity.tsx +++ b/src/Components/Facility/DoctorCapacity.tsx @@ -1,15 +1,15 @@ -import { useCallback, useEffect, useReducer, useState } from "react"; -import { useDispatch } from "react-redux"; +import { useReducer, useState } from "react"; import { DOCTOR_SPECIALIZATION } from "../../Common/constants"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { createDoctor, getDoctor, listDoctor } from "../../Redux/actions"; import * as Notification from "../../Utils/Notifications.js"; import ButtonV2, { Cancel } from "../Common/components/ButtonV2"; import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; import TextFormField from "../Form/FormFields/TextFormField"; import { FieldChangeEventHandler } from "../Form/FormFields/Utils"; import SelectMenuV2 from "../Form/SelectMenuV2"; -import { DoctorModal, OptionsType } from "./models"; +import { DoctorModal } from "./models"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; interface DoctorCapacityProps extends DoctorModal { facilityId: string; @@ -19,8 +19,6 @@ interface DoctorCapacityProps extends DoctorModal { id?: number; } -const initDoctorTypes: Array = [...DOCTOR_SPECIALIZATION]; - const initForm: any = { area: "", count: "", @@ -50,78 +48,46 @@ const doctorCapacityReducer = (state = initialState, action: any) => { } }; +const getAllowedDoctorTypes = (existing?: DoctorModal[]) => { + if (!existing) return [...DOCTOR_SPECIALIZATION]; + + return DOCTOR_SPECIALIZATION.map((specialization) => { + const disabled = existing.some((i) => i.area === specialization.id); + return { ...specialization, disabled }; + }); +}; + export const DoctorCapacity = (props: DoctorCapacityProps) => { - const dispatchAction: any = useDispatch(); const { facilityId, handleClose, handleUpdate, className, id } = props; const [state, dispatch] = useReducer(doctorCapacityReducer, initialState); const [isLoading, setIsLoading] = useState(false); - const [isLastOptionType, setIsLastOptionType] = useState(false); - const [doctorTypes, setDoctorTypes] = - useState>(initDoctorTypes); - const headerText = !id ? "Add Doctor Capacity" : "Edit Doctor Capacity"; - const buttonText = !id - ? `Save ${!isLastOptionType ? "& Add More" : "Doctor Capacity"}` - : "Update Doctor Capacity"; + const specializationsQuery = useQuery(routes.listDoctor, { + pathParams: { facilityId }, + }); - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - if (!id) { - // Add Form functionality - const doctorRes = await dispatchAction(listDoctor({}, { facilityId })); - if (!status.aborted) { - if (doctorRes && doctorRes.data) { - const existingData = doctorRes.data.results; - // if all options are diabled - if (existingData.length === DOCTOR_SPECIALIZATION.length) { - return; - } - // disable existing doctor types - const updatedDoctorTypes = initDoctorTypes.map( - (type: OptionsType) => { - const isExisting = existingData.find( - (i: DoctorModal) => i.area === type.id - ); - return { - ...type, - disabled: !!isExisting, - }; - } - ); - setDoctorTypes(updatedDoctorTypes); - } - } - } else { - // Edit Form functionality - const res = await dispatchAction( - getDoctor({ facilityId: facilityId, id: id }) - ); - if (res && res.data) { - dispatch({ - type: "set_form", - form: { area: res.data.area, count: res.data.count }, - }); - } - } - setIsLoading(false); + const { loading } = useQuery(routes.getDoctor, { + pathParams: { facilityId, id: `${id}` }, + prefetch: !!id, + onResponse: ({ data }) => { + if (!data) return; + dispatch({ + type: "set_form", + form: { area: data.area, count: data.count }, + }); }, - [dispatchAction, facilityId, id] - ); + }); - useAbortableEffect( - (status: statusType) => { - fetchData(status); - }, - [dispatch, fetchData, id] - ); + const doctorTypes = getAllowedDoctorTypes(specializationsQuery.data?.results); - useEffect(() => { - const lastDoctorType = - doctorTypes.filter((i: OptionsType) => i.disabled).length === - DOCTOR_SPECIALIZATION.length - 1; - setIsLastOptionType(lastDoctorType); - }, [doctorTypes]); + const isLastOptionType = + doctorTypes.filter((i) => i.disabled).length === + DOCTOR_SPECIALIZATION.length - 1; + + const headerText = !id ? "Add Doctor Capacity" : "Edit Doctor Capacity"; + const buttonText = !id + ? `Save ${!isLastOptionType ? "& Add More" : "Doctor Capacity"}` + : "Update Doctor Capacity"; const validateData = () => { const errors = { ...initForm }; @@ -159,28 +125,23 @@ export const DoctorCapacity = (props: DoctorCapacityProps) => { area: Number(state.form.area), count: Number(state.form.count), }; - const res = await dispatchAction(createDoctor(id, data, { facilityId })); + const { res } = await (id + ? request(routes.updateDoctor, { + pathParams: { facilityId, id: `${id}` }, + body: data, + }) + : request(routes.createDoctor, { + pathParams: { facilityId }, + body: data, + })); setIsLoading(false); - if (res && res.data) { - // disable last added bed type - const updatedDoctorTypes = doctorTypes.map((type: OptionsType) => { - return { - ...type, - disabled: res.data.area !== type.id ? type.disabled : true, - }; - }); - setDoctorTypes(updatedDoctorTypes); - // reset form + if (res?.ok) { + specializationsQuery.refetch(); dispatch({ type: "set_form", form: initForm }); - // show success message if (!id) { - Notification.Success({ - msg: "Doctor count added successfully", - }); + Notification.Success({ msg: "Doctor count added successfully" }); } else { - Notification.Success({ - msg: "Doctor count updated successfully", - }); + Notification.Success({ msg: "Doctor count updated successfully" }); } } handleUpdate(); @@ -191,7 +152,7 @@ export const DoctorCapacity = (props: DoctorCapacityProps) => { return (
- {isLoading ? ( + {isLoading || loading || specializationsQuery.loading ? (
{ const specialization = DOCTOR_SPECIALIZATION.find((i) => i.id === props.area); - const dispatchAction: any = useDispatch(); const [openDeleteDialog, setOpenDeleteDialog] = useState(false); const [open, setOpen] = useState(false); const [selectedId, setSelectedId] = useState(-1); const handleDeleteSubmit = async () => { - if (props.area) { - const res = await dispatchAction( - deleteDoctor(props.area, { facilityId: props.facilityId }) - ); - if (res?.status === 204) { - Notification.Success({ - msg: "Doctor specialization type deleted successfully", - }); - props.removeDoctor(props.id); - } else { - Notification.Error({ - msg: - "Error while deleting Doctor specialization: " + - (res?.data?.detail || ""), - }); - } + if (!props.area) return; + + const { res } = await request(routes.deleteDoctor, { + pathParams: { facilityId: props.facilityId, area: `${props.area}` }, + }); + + if (res?.ok) { + props.removeDoctor(props.id); + Notification.Success({ + msg: "Doctor specialization type deleted successfully", + }); } }; diff --git a/src/Components/Facility/DuplicatePatientDialog.tsx b/src/Components/Facility/DuplicatePatientDialog.tsx index 46eb4e2dd7a..7a36beac685 100644 --- a/src/Components/Facility/DuplicatePatientDialog.tsx +++ b/src/Components/Facility/DuplicatePatientDialog.tsx @@ -119,6 +119,7 @@ const DuplicatePatientDialog = (props: Props) => { label={`Cancel ${isNew ? "Registration" : "Update"}`} /> handleOk(action)} disabled={!action} label="Continue" diff --git a/src/Components/Facility/FacilityCard.tsx b/src/Components/Facility/FacilityCard.tsx index 1424a657de4..8e8dd6da601 100644 --- a/src/Components/Facility/FacilityCard.tsx +++ b/src/Components/Facility/FacilityCard.tsx @@ -49,24 +49,10 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {
- - {(facility.read_cover_image_url && ( - {facility.name} - )) || ( - - )} -
{(facility.read_cover_image_url && ( {
-
- {facility.kasp_empanelled && ( -
- {kasp_string} -
- )} -
+ - - {facility.name} - - - - View CNS - -
-
- - {facility.features?.map( - (feature: number) => - FACILITY_FEATURE_TYPES.some( - (f) => f.id === feature - ) && ( - f.id === feature - )[0]?.name - } - size="small" - startIcon={ - FACILITY_FEATURE_TYPES.filter( - (f) => f.id === feature - )[0]?.icon - } - /> - ) + {(facility.read_cover_image_url && ( + {facility.name} + )) || ( + )} -
+ +
+ {facility.kasp_empanelled && ( +
+ {kasp_string} +
+ )} +
+ + {facility.name} + + + + View CNS + +
+
+ + {facility.features?.map( + (feature: number) => + FACILITY_FEATURE_TYPES.some( + (f) => f.id === feature + ) && ( + f.id === feature + )[0]?.name + } + size="small" + startIcon={ + FACILITY_FEATURE_TYPES.filter( + (f) => f.id === feature + )[0]?.icon + } + /> + ) + )} +
-
@@ -225,7 +227,7 @@ export const FacilityCard = (props: { facility: any; userType: any }) => {
- {userType !== "Staff" ? ( + {["DistrictAdmin", "StateAdmin"].includes(userType) && ( { Notify - ) : ( - <> )} { ? "+91" + data.phone_number : data.phone_number : "", - latitude: data.latitude ? String(data.latitude) : "", - longitude: data.longitude ? String(data.longitude) : "", + latitude: data.latitude ? parseFloat(data.latitude).toFixed(7) : "", + longitude: data.longitude + ? parseFloat(data.longitude).toFixed(7) + : "", type_b_cylinders: data.type_b_cylinders, type_c_cylinders: data.type_c_cylinders, type_d_cylinders: data.type_d_cylinders, @@ -292,8 +294,8 @@ export const FacilityCreate = (props: FacilityProps) => { type: "set_form", form: { ...state.form, - latitude: location.lat().toString(), - longitude: location.lng().toString(), + latitude: location.lat().toFixed(7), + longitude: location.lng().toFixed(7), }, }); } diff --git a/src/Components/Facility/FacilityFilter/DistrictSelect.tsx b/src/Components/Facility/FacilityFilter/DistrictSelect.tsx index 088048ba6dd..ef77d50221e 100644 --- a/src/Components/Facility/FacilityFilter/DistrictSelect.tsx +++ b/src/Components/Facility/FacilityFilter/DistrictSelect.tsx @@ -8,7 +8,7 @@ interface DistrictSelectProps { errors: string; className?: string; multiple?: boolean; - selected: string; + selected?: string; setSelected: (selected: string) => void; } diff --git a/src/Components/Facility/FacilityHome.tsx b/src/Components/Facility/FacilityHome.tsx index 6f42dab00a6..4b4754b894c 100644 --- a/src/Components/Facility/FacilityHome.tsx +++ b/src/Components/Facility/FacilityHome.tsx @@ -222,7 +222,7 @@ export const FacilityHome = (props: any) => {
-
+

@@ -242,7 +242,7 @@ export const FacilityHome = (props: any) => {

-
+

Local Body @@ -251,7 +251,7 @@ export const FacilityHome = (props: any) => { {facilityData?.local_body_object?.name}

-
+

Ward @@ -392,7 +392,7 @@ export const FacilityHome = (props: any) => { )}

-
+
import("../Common/Loading")); export default function InventoryList(props: any) { const { facilityId }: any = props; - const dispatchAction: any = useDispatch(); - const [isLoading, setIsLoading] = useState(false); - const initialInventory: any[] = []; let inventoryItem: any = null; - const [inventory, setInventory] = useState(initialInventory); const [offset, setOffset] = useState(0); const [currentPage, setCurrentPage] = useState(1); - const [totalCount, setTotalCount] = useState(0); - const [facilityName, setFacilityName] = useState(""); const limit = 14; - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatchAction( - getInventorySummary(facilityId, { limit, offset }) - ); - if (!status.aborted) { - if (res?.data) { - setInventory(res.data.results); - setTotalCount(res.data.count); - } - setIsLoading(false); - } + const { data: inventoryData } = useQuery(routes.getInventorySummary, { + pathParams: { + facility_external_id: facilityId, }, - [dispatchAction, offset, facilityId] - ); - - useAbortableEffect( - (status: statusType) => { - fetchData(status); + query: { + limit, + offset, }, - [fetchData] - ); - - useEffect(() => { - async function fetchFacilityName() { - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); + prefetch: facilityId !== undefined, + }); - setFacilityName(res?.data?.name || ""); - } else { - setFacilityName(""); - } - } - fetchFacilityName(); - }, [dispatchAction, facilityId]); + const { data: facilityObject } = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + prefetch: !!facilityId, + }); const handlePagination = (page: number, limit: number) => { const offset = (page - 1) * limit; @@ -68,8 +39,8 @@ export default function InventoryList(props: any) { }; let inventoryList: any = []; - if (inventory?.length) { - inventoryList = inventory.map((inventoryItem: any) => ( + if (inventoryData?.results.length) { + inventoryList = inventoryData.results.map((inventoryItem: any) => (
)); - } else if (inventory && inventory.length === 0) { + } else if (inventoryData?.results && inventoryData.results.length === 0) { inventoryList = (
@@ -113,9 +84,9 @@ export default function InventoryList(props: any) { ); } - if (isLoading || !inventory) { + if (!inventoryData?.results) { inventoryItem = ; - } else if (inventory) { + } else if (inventoryData.results) { inventoryItem = ( <>
@@ -135,12 +106,12 @@ export default function InventoryList(props: any) {
- {totalCount > limit && ( + {inventoryData?.count > limit && (
@@ -153,7 +124,7 @@ export default function InventoryList(props: any) {
diff --git a/src/Components/Facility/InventoryLog.tsx b/src/Components/Facility/InventoryLog.tsx index 8369a7d1562..474de009f76 100644 --- a/src/Components/Facility/InventoryLog.tsx +++ b/src/Components/Facility/InventoryLog.tsx @@ -1,114 +1,75 @@ -import { useState, useCallback, useEffect, lazy } from "react"; +import { useState, lazy } from "react"; import * as Notification from "../../Utils/Notifications.js"; -import { useDispatch } from "react-redux"; -import { - getInventoryLog, - flagInventoryItem, - deleteLastInventoryLog, - getAnyFacility, -} from "../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../Common/utils"; import Pagination from "../Common/Pagination"; import { formatDateTime } from "../../Utils/utils"; import Page from "../Common/components/Page.js"; import CareIcon from "../../CAREUI/icons/CareIcon.js"; import ButtonV2 from "../Common/components/ButtonV2.js"; +import useQuery from "../../Utils/request/useQuery.js"; +import routes from "../../Redux/api.js"; +import request from "../../Utils/request/request.js"; const Loading = lazy(() => import("../Common/Loading")); export default function InventoryLog(props: any) { const { facilityId, inventoryId }: any = props; - - const dispatchAction: any = useDispatch(); - const [isLoading, setIsLoading] = useState(false); const [saving, setSaving] = useState(false); - const initialInventory: any[] = []; let inventoryItem: any = null; - const [inventory, setInventory] = useState(initialInventory); - const [current_stock, setCurrentStock] = useState(0); const [offset, setOffset] = useState(0); const [currentPage, setCurrentPage] = useState(1); - const [totalCount, setTotalCount] = useState(0); const limit = 14; const item = inventoryId; - const [itemName, setItemName] = useState(" "); - const [facilityName, setFacilityName] = useState(""); - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatchAction( - getInventoryLog(facilityId, { item, limit, offset }) - ); - if (!status.aborted) { - if (res?.data) { - setInventory(res.data.results); - setCurrentStock(res.data.results[0].current_stock); - setTotalCount(res.data.count); - setItemName(res.data.results[0].item_object.name); - } - setIsLoading(false); - } + const { data, refetch } = useQuery(routes.getInventoryLog, { + pathParams: { + facilityId: facilityId, }, - [dispatchAction, offset, facilityId] - ); - - useEffect(() => { - async function fetchFacilityName() { - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); + query: { + item, + limit, + offset, + }, + prefetch: facilityId !== undefined, + }); - setFacilityName(res?.data?.name || ""); - } else { - setFacilityName(""); - } - } - fetchFacilityName(); - }, [dispatchAction, facilityId]); + const { data: facilityObject } = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + prefetch: !!facilityId, + }); const flagFacility = async (id: string) => { setSaving(true); - const res = await dispatchAction( - flagInventoryItem({ facility_external_id: facilityId, external_id: id }) - ); - - if (res && res.status === 204) { - Notification.Success({ - msg: "Updated Successfully", - }); - fetchData({ aborted: false }); - } + await request(routes.flagInventoryItem, { + pathParams: { facility_external_id: facilityId, external_id: id }, + query: { item: id }, + onResponse: ({ res }) => { + if (res?.ok) { + Notification.Success({ + msg: "Updated Successfully", + }); + } + refetch(); + }, + }); setSaving(false); }; const removeLastInventoryLog = async (id: any) => { setSaving(true); - const res = await dispatchAction( - deleteLastInventoryLog({ - facility_external_id: facilityId, - id: id, - }) - ); - - if (res?.status === 201) { - Notification.Success({ - msg: "Last entry deleted Successfully", - }); - fetchData({ aborted: false }); - } else { - Notification.Error({ - msg: "Error while deleting last entry: " + (res?.data?.detail || ""), - }); - } + await request(routes.deleteLastInventoryLog, { + pathParams: { facility_external_id: facilityId, id: id }, + onResponse: ({ res }) => { + if (res?.ok) { + Notification.Success({ + msg: "Last entry deleted Successfully", + }); + refetch(); + } + }, + }); setSaving(false); }; - useAbortableEffect( - (status: statusType) => { - fetchData(status); - }, - [fetchData] - ); const handlePagination = (page: number, limit: number) => { const offset = (page - 1) * limit; setCurrentPage(page); @@ -116,8 +77,8 @@ export default function InventoryLog(props: any) { }; let inventoryList: any = []; - if (inventory?.length) { - inventoryList = inventory.map((inventoryItem: any, index) => ( + if (data?.results.length) { + inventoryList = data.results.map((inventoryItem: any, index) => (
@@ -159,9 +120,11 @@ export default function InventoryLog(props: any) {
Marks this transaction as accident
- This action will not affect the total stock. To delete the - transaction, create another transaction that undos the effect - of this, or click Delete Last Entry. + This action will not affect the total stock. +
+ To delete the transaction, create another transaction that +
+ undos the effect of this, or click Delete Last Entry.
)}
@@ -193,7 +156,7 @@ export default function InventoryLog(props: any) { )); - } else if (inventory && inventory.length === 0) { + } else if (data?.results && data.results.length === 0) { inventoryList = ( @@ -205,9 +168,9 @@ export default function InventoryLog(props: any) { ); } - if (isLoading || !inventory) { + if (!data?.results) { inventoryItem = ; - } else if (inventory) { + } else if (data.results) { inventoryItem = ( <>
@@ -233,12 +196,12 @@ export default function InventoryLog(props: any) {
- {totalCount > limit && ( + {data.count > limit && (
@@ -253,16 +216,16 @@ export default function InventoryLog(props: any) { title="Inventory Log" className="mx-3 md:mx-8" crumbsReplacements={{ - [facilityId]: { name: facilityName }, - [inventoryId]: { name: itemName }, + [facilityId]: { name: facilityObject?.name }, + [inventoryId]: { name: data?.results[0].item_object.name }, }} backUrl={`/facility/${facilityId}/inventory`} >
-

Item: {itemName}

- {current_stock > 0 && ( +

Item: {data?.results[0].item_object.name}

+ {data?.results && data.results[0].current_stock > 0 && (
Deletes the last transaction by creating an @@ -273,7 +236,7 @@ export default function InventoryLog(props: any) { id="delete-last-entry" variant="danger" onClick={(_) => - removeLastInventoryLog(inventory[0].item_object.id) + removeLastInventoryLog(data?.results[0].item_object.id) } disabled={saving} > diff --git a/src/Components/Facility/Investigations/Reports/index.tsx b/src/Components/Facility/Investigations/Reports/index.tsx index b868e8e8af0..6800a6208aa 100644 --- a/src/Components/Facility/Investigations/Reports/index.tsx +++ b/src/Components/Facility/Investigations/Reports/index.tsx @@ -95,7 +95,6 @@ const InvestigationReports = ({ id }: any) => { const [page, setPage] = useState(1); const [sessionPage, setSessionPage] = useState(1); const [isNextSessionDisabled, setIsNextSessionDisabled] = useState(false); - const [isLoadMoreDisabled, setIsLoadMoreDisabled] = useState(false); const [patientDetails, setPatientDetails] = useState<{ name: string; age: number; @@ -136,6 +135,17 @@ const InvestigationReports = ({ id }: any) => { .slice(pageStart, pageStart + RESULT_PER_PAGE) .join(","); + if (investigationsParams.length === 0) { + Notification.Error({ + msg: "No more reports to load", + }); + dispatch({ + type: "set_loading", + payload: { ...isLoading, tableData: false }, + }); + return; + } + dispatchAction( getPatientInvestigation( { @@ -145,15 +155,13 @@ const InvestigationReports = ({ id }: any) => { id ) ).then((res: any) => { + dispatch({ + type: "set_loading", + payload: { ...isLoading, tableData: false }, + }); if (res?.data?.results) { onSuccess(res.data, curPage); setPage(curPage + 1); - if (res.data.results.length !== 0 || curPage >= totalPage) { - dispatch({ - type: "set_loading", - payload: { ...isLoading, tableData: false }, - }); - } } }); }, @@ -249,7 +257,7 @@ const InvestigationReports = ({ id }: any) => { }, []); // eslint-disable-next-line - const handleLoadMore = (e: any) => { + const handleLoadMore = () => { const onSuccess = (data: any, pageNo: number) => { if (data.results.length === 0 && pageNo + 1 <= totalPage) { fetchInvestigationsData(onSuccess, pageNo + 1, sessionPage); @@ -270,20 +278,16 @@ const InvestigationReports = ({ id }: any) => { if (curSessionPage > 1 && !data.results.length) { setSessionPage(curSessionPage - 1); setIsNextSessionDisabled(true); - setIsLoadMoreDisabled(true); } else { setIsNextSessionDisabled(false); - setIsLoadMoreDisabled(false); - if (!data.results.length) { - Notification.Error({ - msg: "No Investigation data available!", + handleLoadMore(); + } else { + dispatch({ + type: "set_investigation_table_data", + payload: data.results, }); } - dispatch({ - type: "set_investigation_table_data", - payload: data.results, - }); } document.getElementById("reports_section")?.scrollIntoView(); @@ -304,8 +308,7 @@ const InvestigationReports = ({ id }: any) => { handleGenerateReports(count); }; - const loadMoreDisabled = - page - 1 >= totalPage || isLoading.tableData || isLoadMoreDisabled; + const loadMoreDisabled = page - 1 >= totalPage || isLoading.tableData; const getTestDisabled = !selectedGroup.length || isLoading.tableData || @@ -391,6 +394,11 @@ const InvestigationReports = ({ id }: any) => { )} + {isLoading.tableData && ( +
+ +
+ )}
{!!investigationTableData.length && ( <> @@ -415,10 +423,6 @@ const InvestigationReports = ({ id }: any) => { patientDetails={patientDetails} /> - {!!isLoading.tableData && ( - - )} - {!loadMoreDisabled && ( import("../Common/Loading")); export default function MinQuantityList(props: any) { const { facilityId }: any = props; - const dispatchAction: any = useDispatch(); - const [isLoading, setIsLoading] = useState(false); - const initialInventory: any[] = []; let inventoryItem: any = null; - const [inventory, setInventory] = useState(initialInventory); const [offset, setOffset] = useState(0); const [currentPage, setCurrentPage] = useState(1); - const [totalCount, setTotalCount] = useState(0); - const [facilityName, setFacilityName] = useState(""); const [showMinQuantityRequiredModal, setShowMinQuantityRequiredModal] = useState(false); const [selectedItem, setSelectedItem] = useState({ id: 0, item_id: 0 }); const limit = 14; - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatchAction( - getMinQuantity(facilityId, { limit, offset }) - ); - if (!status.aborted) { - if (res && res.data) { - setInventory(res.data.results); - setTotalCount(res.data.count); - } - setIsLoading(false); - } - }, - [dispatchAction, offset, facilityId] - ); - - useAbortableEffect( - (status: statusType) => { - fetchData(status); - }, - [fetchData] + const { data: minimumQuantityData, refetch: minimumQuantityfetch } = useQuery( + routes.getMinQuantity, + { + pathParams: { + facilityId, + }, + query: { + limit, + offset, + }, + prefetch: !!facilityId, + } ); - useEffect(() => { - async function fetchFacilityName() { - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); - - setFacilityName(res?.data?.name || ""); - } else { - setFacilityName(""); - } - } - fetchFacilityName(); - }, [dispatchAction, facilityId]); + const { data: facilityObject } = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + prefetch: !!facilityId, + }); const handlePagination = (page: number, limit: number) => { const offset = (page - 1) * limit; @@ -70,8 +44,8 @@ export default function MinQuantityList(props: any) { }; let inventoryList: any = []; - if (inventory?.length) { - inventoryList = inventory.map((inventoryItem: any) => ( + if (minimumQuantityData?.results.length) { + inventoryList = minimumQuantityData.results.map((inventoryItem: any) => (
@@ -144,7 +118,7 @@ export default function MinQuantityList(props: any) { )); - } else if (inventory && inventory.length === 0) { + } else if (minimumQuantityData && minimumQuantityData.results.length === 0) { inventoryList = ( ; - } else if (inventory) { + } else if (minimumQuantityData) { inventoryItem = ( <>
@@ -188,12 +162,12 @@ export default function MinQuantityList(props: any) {
- {totalCount > limit && ( + {minimumQuantityData.count > limit && (
@@ -206,7 +180,7 @@ export default function MinQuantityList(props: any) { setShowMinQuantityRequiredModal(false)} handleUpdate={() => { - fetchData({ aborted: false }); + minimumQuantityfetch(); setShowMinQuantityRequiredModal(false); }} /> diff --git a/src/Components/Facility/MinQuantityRequiredModal.tsx b/src/Components/Facility/MinQuantityRequiredModal.tsx index 46296545500..1a604e3a66e 100644 --- a/src/Components/Facility/MinQuantityRequiredModal.tsx +++ b/src/Components/Facility/MinQuantityRequiredModal.tsx @@ -1,15 +1,11 @@ -import { useCallback, useReducer, useState } from "react"; -import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { - updateMinQuantity, - getAnyFacility, - getMinQuantityOfItem, -} from "../../Redux/actions"; +import { useReducer, useState } from "react"; import * as Notification from "../../Utils/Notifications.js"; import ButtonV2 from "../Common/components/ButtonV2"; import DialogModal from "../Common/Dialog"; import TextFormField from "../Form/FormFields/TextFormField"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; const initForm = { id: "", @@ -42,56 +38,47 @@ export const MinQuantityRequiredModal = (props: any) => { const [state, dispatch] = useReducer(inventoryFormReducer, initialState); const { facilityId, inventoryId, itemId, show, handleClose, handleUpdate } = props; - const dispatchAction: any = useDispatch(); - const [isLoading, setIsLoading] = useState(false); - const [data, setData] = useState(" "); - const [facilityName, setFacilityName] = useState(""); + const [isLoading, setIsLoading] = useState(true); - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatchAction( - getMinQuantityOfItem(facilityId, inventoryId) - ); - if (!status.aborted) { - if (res && res.data) { - setData(res.data.item_object.name); - const form = { ...state.form, quantity: res.data.min_quantity }; + const { data: minimumQuantityItemData } = useQuery( + routes.getMinQuantityItem, + { + pathParams: { + facilityId, + inventoryId, + }, + prefetch: !!facilityId && !!inventoryId, + onResponse: async ({ res, data }) => { + setIsLoading(true); + if (res?.ok && data) { + const form = { ...state.form, quantity: data.min_quantity }; dispatch({ type: "set_form", form }); } - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); - - setFacilityName(res?.data?.name || ""); - } else { - setFacilityName(""); - } - setIsLoading(false); - } - }, - [dispatchAction, facilityId, inventoryId] - ); - useAbortableEffect( - (status: statusType) => { - fetchData(status); - }, - [fetchData] + }, + } ); + const { data: facilityObject } = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + prefetch: !!facilityId, + }); + const handleSubmit = async (e: any) => { e.preventDefault(); setIsLoading(true); - const data: any = { - min_quantity: Number(state.form.quantity), - item: Number(itemId), - }; - - const res = await dispatchAction( - updateMinQuantity(data, { facilityId, inventoryId }) - ); + const { res, data } = await request(routes.updateMinQuantity, { + pathParams: { + facilityId, + inventoryId, + }, + body: { + min_quantity: Number(state.form.quantity), + item: Number(itemId), + }, + }); setIsLoading(false); - if (res && res.data) { + if (res?.ok && data) { Notification.Success({ msg: "Minimum quantity updated successfully", }); @@ -138,8 +125,9 @@ export const MinQuantityRequiredModal = (props: any) => { {" "}

- Set the minimum quantity for {data} in{" "} - {facilityName} + Set the minimum quantity for{" "} + {minimumQuantityItemData?.item_object.name} in{" "} + {facilityObject?.name}

diff --git a/src/Components/Facility/SetInventoryForm.tsx b/src/Components/Facility/SetInventoryForm.tsx index d0a275e41ba..c963aa05f5f 100644 --- a/src/Components/Facility/SetInventoryForm.tsx +++ b/src/Components/Facility/SetInventoryForm.tsx @@ -1,13 +1,4 @@ -import { useCallback, useReducer, useState, useEffect, lazy } from "react"; -import { useDispatch } from "react-redux"; - -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { - getItems, - setMinQuantity, - getAnyFacility, - getMinQuantity, -} from "../../Redux/actions"; +import { useReducer, useState, useEffect } from "react"; import * as Notification from "../../Utils/Notifications.js"; import { InventoryItemsModel } from "./models"; import { Cancel, Submit } from "../Common/components/ButtonV2"; @@ -17,7 +8,9 @@ import Card from "../../CAREUI/display/Card"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextFormField from "../Form/FormFields/TextFormField"; -const Loading = lazy(() => import("../Common/Loading")); +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; const initForm = { id: "", @@ -50,65 +43,49 @@ export const SetInventoryForm = (props: any) => { const { goBack } = useAppHistory(); const [state, dispatch] = useReducer(inventoryFormReducer, initialState); const { facilityId } = props; - const dispatchAction: any = useDispatch(); - const [isLoading, setIsLoading] = useState(false); const [data, setData] = useState>([]); const [currentUnit, setCurrentUnit] = useState(); - const [facilityName, setFacilityName] = useState(""); const limit = 14; const offset = 0; - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - + useQuery(routes.getMinQuantity, { + pathParams: { + facilityId, + }, + prefetch: !!facilityId, + onResponse: async ({ data }) => { const existingItemIDs: number[] = []; - const resMinQuantity = await dispatchAction( - getMinQuantity(facilityId, {}) - ); - - resMinQuantity.data.results.map((item: any) => - existingItemIDs.push(item.item_object.id) - ); - const res = await dispatchAction(getItems({ limit, offset })); - - if (!status.aborted) { - if (res && res.data) { - const filteredData = res.data.results.filter( - (item: any) => !existingItemIDs.includes(item.id) - ); - setData(filteredData); - dispatch({ - type: "set_form", - form: { ...state.form, id: filteredData[0]?.id }, - }); - } - setIsLoading(false); + if (data?.results) { + data.results.map((item) => existingItemIDs.push(item.item_object.id)); } - }, - [dispatchAction] - ); - useAbortableEffect( - (status: statusType) => { - fetchData(status); - }, - [fetchData] - ); - useEffect(() => { - async function fetchFacilityName() { - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); + await request(routes.getItems, { + query: { + limit, + offset, + }, + onResponse: ({ res, data }) => { + if (res && data) { + const filteredData = data.results.filter( + (item) => !existingItemIDs.includes(item.id as number) + ); + setData(filteredData); + dispatch({ + type: "set_form", + form: { ...state.form, id: filteredData[0]?.id }, + }); + } + }, + }); + }, + }); - setFacilityName(res?.data?.name || ""); - } else { - setFacilityName(""); - } - } - fetchFacilityName(); - }, [dispatchAction, facilityId]); + const { data: facilityObject } = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + prefetch: !!facilityId, + }); useEffect(() => { // set the default units according to the item @@ -124,35 +101,32 @@ export const SetInventoryForm = (props: any) => { const handleSubmit = async (e: any) => { e.preventDefault(); - setIsLoading(true); - const data: any = { - min_quantity: Number(state.form.quantity), - item: Number(state.form.id), - }; - - const res = await dispatchAction(setMinQuantity(data, { facilityId })); - setIsLoading(false); - if (res && res.data && res.data.id) { - Notification.Success({ - msg: "Minimum quantiy updated successfully", - }); - } - goBack(); + await request(routes.setMinQuantity, { + pathParams: { facilityId }, + body: { + min_quantity: Number(state.form.quantity), + item: Number(state.form.id), + }, + onResponse: ({ res }) => { + if (res?.ok) { + Notification.Success({ + msg: "Minimum quantiy updated successfully", + }); + } + goBack(); + }, + }); }; const handleChange = ({ name, value }: FieldChangeEvent) => { dispatch({ type: "set_form", form: { ...state.form, [name]: value } }); }; - if (isLoading) { - return ; - } - return ( ; @@ -60,7 +60,6 @@ const patientFormReducer = (state = initialState, action: any) => { const TransferPatientDialog = (props: Props) => { const { patientList, handleOk, handleCancel, facilityId } = props; - const dispatchAction: any = useDispatch(); const [isLoading, setIsLoading] = useState(false); const [state, dispatch] = useReducer(patientFormReducer, initialState); const patientOptions: Array = patientList.map((patient) => { @@ -114,15 +113,17 @@ const TransferPatientDialog = (props: Props) => { const validForm = validateForm(); if (validForm) { setIsLoading(true); - const data = { - date_of_birth: dateQueryString(state.form.date_of_birth), - facility: facilityId, - }; - const res = await dispatchAction( - transferPatient(data, { id: state.form.patient }) - ); + const { res, data } = await request(routes.transferPatient, { + body: { + facility: facilityId, + date_of_birth: dateQueryString(state.form.date_of_birth), + }, + pathParams: { + id: state.form.patient, + }, + }); setIsLoading(false); - if (res && res.data && res.status === 200) { + if (res?.ok && data) { dispatch({ type: "set_form", form: initForm }); handleOk(); @@ -132,10 +133,10 @@ const TransferPatientDialog = (props: Props) => { msg: `Patient ${patientName} transferred successfully`, }); const newFacilityId = - res.data && res.data.facility_object && res.data.facility_object.id; + data && data.facility_object && data.facility_object.id; if (newFacilityId) { navigate( - `/facility/${newFacilityId}/patient/${res.data.patient}/consultation` + `/facility/${newFacilityId}/patient/${data.patient}/consultation` ); } else { navigate("/facility"); @@ -175,6 +176,7 @@ const TransferPatientDialog = (props: Props) => {
{
import("../Common/Loading")); +import useSlug from "../../Common/hooks/useSlug"; +import useAppHistory from "../../Common/hooks/useAppHistory"; +import routes from "../../Redux/api"; +import useQuery from "../../Utils/request/useQuery"; const TreatmentSummary = (props: any) => { const { consultationId, patientId } = props; const date = new Date(); - const dispatch: any = useDispatch(); - const [patientData, setPatientData] = useState({}); - const [consultationData, setConsultationData] = useState( - {} - ); - const [isLoading, setIsLoading] = useState(false); - const [investigations, setInvestigations] = useState>([]); - const [dailyRounds, setDailyRounds] = useState({}); - - const fetchPatientData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatch(getPatient({ id: patientId })); - if (!status.aborted) { - if (res?.data) { - setPatientData(res.data); - } else { - setPatientData({}); - } - } - setIsLoading(false); - }, - [patientId, dispatch] - ); - - const fetchInvestigationData = useCallback( - async (status: statusType) => { - setIsLoading(true); - const res = await dispatch(getInvestigation({}, consultationId)); + const facilityId = useSlug("facility"); + const { goBack } = useAppHistory(); + const url = `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`; - if (!status.aborted) { - if (res?.data?.results) { - const valueMap = res.data.results.reduce( - (acc: any, cur: { id: any }) => ({ ...acc, [cur.id]: cur }), - {} - ); - setInvestigations(valueMap); - } else { - setInvestigations([]); - } - } - setIsLoading(false); - }, - [consultationId, dispatch] - ); - - const fetchConsultation = useCallback( - async (status: statusType) => { - setIsLoading(true); - const [res] = await Promise.all([ - dispatch(getConsultation(consultationId)), - ]); - if (!status.aborted) { - if (res?.data) { - setConsultationData(res.data); - if (res.data.last_daily_round) { - setDailyRounds(res.data.last_daily_round); - } - } else { - setConsultationData({}); - } - } - setIsLoading(false); - }, - [consultationId, dispatch] - ); + const { data: patientData } = useQuery(routes.getPatient, { + pathParams: { id: patientId }, + prefetch: patientId !== undefined, + }); - useAbortableEffect((status: statusType) => { - fetchPatientData(status); - fetchInvestigationData(status); + const { data: investigations } = useQuery(routes.getInvestigation, { + pathParams: { consultation_external_id: consultationId }, + prefetch: consultationId !== undefined, + }); - fetchConsultation(status); - }, []); + const { data: consultationData } = useQuery(routes.getConsultation, { + pathParams: { id: consultationId }, + prefetch: consultationId !== undefined, + }); return (
- {isLoading ? ( - - ) : ( -
-
- - -
+
+
+ + +
+ +
+

+ {consultationData?.facility_name ?? ""} +

-
-

- {consultationData.facility_name} -

+

INTERIM TREATMENT SUMMARY

-

INTERIM TREATMENT SUMMARY

+
{formatDate(date)}
-
{formatDate(date)}
+
+
+
+ Name : {patientData?.name ?? ""} +
+
+ Address : {patientData?.address ?? ""} +
+
-
-
+
+
- Name : {patientData.name} + Age :{" "} + {formatAge( + patientData?.age ?? 0, + patientData?.date_of_birth ?? "", + true + )}
-
- Address : {patientData.address} +
+ OP : {consultationData?.patient_no ?? ""}
-
-
-
- Age :{" "} - {formatAge( - patientData.age, - patientData.date_of_birth, - true - )} -
-
- OP : {consultationData.patient_no} -
-
- -
- Date of admission : - - {consultationData.admitted - ? formatDateTime(consultationData.encounter_date) - : " --/--/----"} - -
+
+ Date of admission : + + {consultationData?.admitted + ? formatDateTime(consultationData.encounter_date) + : " --/--/----"} +
+
-
-
- Gender : - {GENDER_TYPES.find((i) => i.id === patientData.gender)?.text} -
+
+
+ Gender : + {GENDER_TYPES.find((i) => i.id === patientData?.gender)?.text} +
-
- Contact person : - - {" "} - {patientData.emergency_phone_number - ? patientData.emergency_phone_number - : " -"} - -
+
+ Contact person : + + {" "} + {patientData?.emergency_phone_number + ? patientData.emergency_phone_number + : " -"} +
+
-
- Comorbidities : -
- - +
+ Comorbidities : +
+
+ + + + + + + + {patientData?.medical_history && + patientData.medical_history.length > 0 ? ( + patientData.medical_history.map( + (obj: any, index: number) => { + return ( + + + + + ); + } + ) + ) : ( - - + + - - - {patientData.medical_history && - patientData.medical_history.length > 0 ? ( - patientData.medical_history.map( - (obj: any, index: number) => { - return ( - - - - - ); - } - ) - ) : ( - - - - - )} - -
DiseaseDetails
+ {obj["disease"]} + + {obj["details"] ? obj["details"] : "---"} +
DiseaseDetails + --- + + --- +
- {obj["disease"]} - - {obj["details"] ? obj["details"] : "---"} -
- --- - - --- -
-
+ )} + +
+
-
- Diagnosis : -
-
- History of present illness : - {consultationData.history_of_present_illness - ? consultationData.history_of_present_illness - : " ---"} -
+
+ Diagnosis : +
+
+ History of present illness : + {consultationData?.history_of_present_illness + ? consultationData.history_of_present_illness + : " ---"} +
-
- Examination details and clinical conditions : - {consultationData.examination_details - ? consultationData.examination_details - : " ---"} -
+
+ Examination details and clinical conditions : + {consultationData?.examination_details + ? consultationData.examination_details + : " ---"} +
-
- Physical Examination info : - {dailyRounds.physical_examination_info - ? dailyRounds.physical_examination_info - : " ---"} -
+
+ Physical Examination info : + {consultationData?.last_daily_round?.physical_examination_info + ? consultationData.last_daily_round + ?.physical_examination_info + : " ---"}
+
-
- General Instructions : - {patientData?.last_consultation?.consultation_notes ? ( -
- {patientData.last_consultation.consultation_notes} -
- ) : ( - " ---" - )} -
+
+ General Instructions : + {patientData?.last_consultation?.consultation_notes ? ( +
+ {patientData.last_consultation.consultation_notes} +
+ ) : ( + " ---" + )} +
+ +
+ Relevant investigations : -
- Relevant investigations : +
+ + + + + + + + + + + -
-
+ Date + + Name + + Result + + Ideal value + + values range + + unit +
- + + {investigations && investigations.results.length > 0 ? ( + investigations.results.map( + (value: any, index: number) => { + return ( + + + + + + + + + ); + } + ) + ) : ( - - - - - - + + + + + + - - - - {Object.values(investigations).length > 0 ? ( - Object.values(investigations).map( - (value: any, index: number) => { - return ( - - - - - - - - - ); - } - ) - ) : ( - - - - - - - - - )} - -
+ {formatDate( + value["session_object"][ + "session_created_date" + ] + )} + + {value["investigation_object"]["name"]} + + {value["notes"] || value["value"]} + + {value["investigation_object"]["ideal_value"] || + "-"} + + {value["investigation_object"]["min_value"]} -{" "} + {value["investigation_object"]["max_value"]} + + {value["investigation_object"]["unit"] || "-"} +
- Date - - Name - - Result - - Ideal value - - values range - - unit - + --- + + --- + + --- + + --- + + --- + + --- +
- {formatDate( - value["session_object"][ - "session_created_date" - ] - )} - - {value["investigation_object"]["name"]} - - {value["notes"] || value["value"]} - - {value["investigation_object"][ - "ideal_value" - ] || "-"} - - {value["investigation_object"]["min_value"]} -{" "} - {value["investigation_object"]["max_value"]} - - {value["investigation_object"]["unit"] || "-"} -
- --- - - --- - - --- - - --- - - --- - - --- -
-
+ )} + +
+
-
- Treatment : - {consultationData.treatment_plan ? ( -

{consultationData.treatment_plan}

- ) : ( -

---

- )} - Treatment summary/Treament Plan : +
+ Treatment : + {consultationData?.treatment_plan ? ( +

{consultationData.treatment_plan}

+ ) : ( +

---

+ )} + Treatment summary/Treament Plan : -
- - +
+
+ + + + + + + + + + {consultationData?.last_daily_round ? ( - - - + + + - - - - {dailyRounds ? ( - - - - - - ) : ( - - - - - - )} - -
DateSpo2Temperature
DateSpo2Temperature + {formatDateTime( + consultationData.last_daily_round.modified_date + )} + + {consultationData.last_daily_round.ventilator_spo2 || + "-"} + + {consultationData.last_daily_round.temperature || "-"} +
- {formatDateTime(dailyRounds.modified_date)} - - {dailyRounds.ventilator_spo2 || "-"} - - {dailyRounds.temperature || "-"} -
- --- - - --- - - --- -
-
+ ) : ( + + + --- + + + --- + + + --- + + + )} + +
- )} +
); }; diff --git a/src/Components/Facility/TriageForm.tsx b/src/Components/Facility/TriageForm.tsx index 9264661fc45..32971f1d302 100644 --- a/src/Components/Facility/TriageForm.tsx +++ b/src/Components/Facility/TriageForm.tsx @@ -2,15 +2,7 @@ import ConfirmDialog from "../Common/ConfirmDialog"; import Card from "../../CAREUI/display/Card"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useCallback, useReducer, useState, useEffect, lazy } from "react"; -import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { - createTriageForm, - getTriageDetails, - getAnyFacility, - getTriageInfo, -} from "../../Redux/actions"; +import { useReducer, useState, lazy } from "react"; import * as Notification from "../../Utils/Notifications.js"; import TextFormField from "../Form/FormFields/TextFormField"; import { PatientStatsModel } from "./models"; @@ -22,10 +14,13 @@ const Loading = lazy(() => import("../Common/Loading")); import Page from "../Common/components/Page"; import dayjs from "dayjs"; import { dateQueryString, scrollTo } from "../../Utils/utils"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; -interface triageFormProps extends PatientStatsModel { - facilityId: number; - id?: number; +interface Props extends PatientStatsModel { + facilityId: string; + id?: string; } const initForm: any = { @@ -61,99 +56,40 @@ const triageFormReducer = (state = initialState, action: any) => { } }; -export const TriageForm = (props: triageFormProps) => { +export const TriageForm = ({ facilityId, id }: Props) => { const { goBack } = useAppHistory(); - const dispatchTriageData: any = useDispatch(); - const dispatchAction: any = useDispatch(); - const { facilityId, id } = props; const [state, dispatch] = useReducer(triageFormReducer, initialState); const [isLoading, setIsLoading] = useState(false); - const [facilityName, setFacilityName] = useState(""); - const [patientStatsData, setPatientStatsData] = useState< - Array - >([]); const [openModalForExistingTriage, setOpenModalForExistingTriage] = useState(false); const headerText = !id ? "Add Triage" : "Edit Triage"; const buttonText = !id ? "Save Triage" : "Update Triage"; - const fetchData = useCallback( - async (status: statusType) => { - setIsLoading(true); - if (id) { - // Edit Form functionality - const res = await dispatchAction( - getTriageDetails({ facilityId: facilityId, id: id }) - ); - if (!status.aborted && res && res.data) { - dispatch({ - type: "set_form", - form: { - entry_date: res.data.entry_date - ? dayjs(res.data.entry_date).toDate() - : null, - num_patients_visited: res.data.num_patients_visited, - num_patients_home_quarantine: - res.data.num_patients_home_quarantine, - num_patients_isolation: res.data.num_patients_isolation, - num_patient_referred: res.data.num_patient_referred, - num_patient_confirmed_positive: - res.data.num_patient_confirmed_positive, - }, - }); - } - } - setIsLoading(false); - }, - [dispatchAction, facilityId, id] - ); - - useAbortableEffect( - (status: statusType) => { - fetchData(status); - }, - [dispatch, fetchData, id] - ); - - // this will fetch all triage data of the facility - const fetchTriageData = useCallback( - async (status: statusType) => { - const [triageRes] = await Promise.all([ - dispatchTriageData(getTriageInfo({ facilityId })), - ]); - if (!status.aborted) { - if ( - triageRes && - triageRes.data && - triageRes.data.results && - triageRes.data.results.length - ) { - setPatientStatsData(triageRes.data.results); - } - } + const triageDetailsQuery = useQuery(routes.getTriageDetails, { + pathParams: { facilityId, id: id! }, + prefetch: !!id, + onResponse: ({ data }) => { + if (!data) return; + dispatch({ + type: "set_form", + form: { + ...data, + entry_date: data.entry_date ? dayjs(data.entry_date).toDate() : null, + }, + }); }, - [dispatchTriageData, facilityId] - ); + }); - useAbortableEffect( - (status: statusType) => { - fetchTriageData(status); - }, - [dispatch, fetchTriageData] - ); + const patientStatsQuery = useQuery(routes.getTriage, { + pathParams: { facilityId }, + }); - useEffect(() => { - async function fetchFacilityName() { - if (facilityId) { - const res = await dispatchAction(getAnyFacility(facilityId)); + const patientStatsData = patientStatsQuery.data?.results ?? []; - setFacilityName(res?.data?.name || ""); - } else { - setFacilityName(""); - } - } - fetchFacilityName(); - }, [dispatchAction, facilityId]); + const facilityQuery = useQuery(routes.getAnyFacility, { + pathParams: { id: facilityId }, + }); + const facilityName = facilityQuery.data?.name ?? ""; const validateForm = () => { const errors = { ...initForm }; @@ -216,20 +152,17 @@ export const TriageForm = (props: triageFormProps) => { ) { setOpenModalForExistingTriage(false); setIsLoading(true); - const res = await dispatchAction( - createTriageForm(data, { facilityId }) - ); + const { res } = await request(routes.createTriage, { + pathParams: { facilityId }, + body: data, + }); setIsLoading(false); - if (res && res.data) { + if (res?.ok) { dispatch({ type: "set_form", form: initForm }); if (id) { - Notification.Success({ - msg: "Triage updated successfully", - }); + Notification.Success({ msg: "Triage updated successfully" }); } else { - Notification.Success({ - msg: "Triage created successfully", - }); + Notification.Success({ msg: "Triage created successfully" }); } goBack(); } @@ -246,7 +179,12 @@ export const TriageForm = (props: triageFormProps) => { }); }; - if (isLoading) { + if ( + isLoading || + facilityQuery.loading || + triageDetailsQuery.loading || + patientStatsQuery.loading + ) { return ; } diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx index 99d91c6cbae..de035f9ffea 100644 --- a/src/Components/Facility/models.tsx +++ b/src/Components/Facility/models.tsx @@ -35,7 +35,7 @@ export interface WardModel { } export interface FacilityModel { - id?: number; + id?: string; name?: string; read_cover_image_url?: string; facility_type?: string; @@ -165,13 +165,13 @@ export interface ConsultationModel { } export interface PatientStatsModel { - id?: number; + id?: string; entryDate?: string; num_patients_visited?: number; num_patients_home_quarantine?: number; num_patients_isolation?: number; num_patient_referred?: number; - entry_date?: number; + entry_date?: string; num_patient_confirmed_positive?: number; } @@ -524,3 +524,58 @@ export type FacilityRequest = Omit & { patient_count?: string; bed_count?: string; }; + +export type InventorySummaryResponse = { + id: string; + item_object: { + id: number; + default_unit: { + id: number; + name: string; + }; + allowed_units: { + id: number; + name: string; + }[]; + tags: { + id: number; + name: string; + }[]; + name: string; + description: string; + min_quantity: number; + }; + unit_object: { + id: number; + name: string; + }; + created_date: string; + quantity: number; + is_low: boolean; + item: number; +}; + +export type MinimumQuantityItemResponse = { + id: string; + item_object: InventoryItemsModel; + created_date: string; + min_quantity: number; + item: number; +}; + +export type InventoryLogResponse = InventorySummaryResponse & { + external_id: string; + current_stock: number; + quantity_in_default_unit: number; + is_incoming: boolean; + probable_accident: boolean; + unit: number; + created_by: number; +}; + +export type PatientTransferResponse = { + id: string; + patient: string; + date_of_birth: string; + facility_object: BaseFacilityModel; +}; diff --git a/src/Components/HCX/InsuranceDetailsBuilder.tsx b/src/Components/HCX/InsuranceDetailsBuilder.tsx index 5482c48149f..36713e317a2 100644 --- a/src/Components/HCX/InsuranceDetailsBuilder.tsx +++ b/src/Components/HCX/InsuranceDetailsBuilder.tsx @@ -55,23 +55,27 @@ export default function InsuranceDetailsBuilder(props: Props) { return ( -
+
    {props.value?.length === 0 && ( No insurance details added )} {props.value?.map((policy, index) => ( - +
  • + +
  • ))} -
+
); } diff --git a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx index e94d740c0db..dba0943db20 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx @@ -33,7 +33,7 @@ const MedicineAdministrationSheet = ({ readonly, is_prn }: Props) => { MedicineRoutes.listPrescriptions, { pathParams: { consultation }, - query: { ...filters, discontinued: showDiscontinued ? undefined : false }, + query: { ...filters, discontinued: false }, } ); @@ -41,7 +41,7 @@ const MedicineAdministrationSheet = ({ readonly, is_prn }: Props) => { pathParams: { consultation }, query: { ...filters, - limit: showDiscontinued ? 100 : 1, + limit: 100, discontinued: true, }, prefetch: !showDiscontinued, @@ -49,16 +49,21 @@ const MedicineAdministrationSheet = ({ readonly, is_prn }: Props) => { const discontinuedCount = discontinuedPrescriptions.data?.count; + const prescriptionList = [ + ...(data?.results ?? []), + ...(showDiscontinued ? discontinuedPrescriptions.data?.results ?? [] : []), + ]; + const { activityTimelineBounds, prescriptions } = useMemo( () => ({ - prescriptions: data?.results?.sort( + prescriptions: prescriptionList.sort( (a, b) => +a.discontinued - +b.discontinued ), - activityTimelineBounds: data - ? computeActivityBounds(data.results) + activityTimelineBounds: prescriptionList + ? computeActivityBounds(prescriptionList) : undefined, }), - [data] + [prescriptionList] ); const daysPerPage = useBreakpoints({ default: 1, "2xl": 2 }); diff --git a/src/Components/Patient/FileUpload.tsx b/src/Components/Patient/FileUpload.tsx index d4b8b0387dc..77c67abeadd 100644 --- a/src/Components/Patient/FileUpload.tsx +++ b/src/Components/Patient/FileUpload.tsx @@ -172,8 +172,8 @@ export const FileUpload = (props: FileUploadProps) => { const [previewImage, setPreviewImage] = useState(null); const [facingMode, setFacingMode] = useState(FACING_MODE_USER); const videoConstraints = { - width: 1280, - height: 720, + width: { ideal: 4096 }, + height: { ideal: 2160 }, facingMode: "user", }; const { width } = useWindowDimensions(); @@ -1164,10 +1164,10 @@ export const FileUpload = (props: FileUploadProps) => { {!previewImage ? (
diff --git a/src/Components/Patient/InsuranceDetailsCard.tsx b/src/Components/Patient/InsuranceDetailsCard.tsx index b928ce7bffd..41cfede9f3a 100644 --- a/src/Components/Patient/InsuranceDetailsCard.tsx +++ b/src/Components/Patient/InsuranceDetailsCard.tsx @@ -54,6 +54,7 @@ export const InsuranceDetialsCard = (props: InsuranceDetails) => {
{ navigate( `/facility/${data.patient_object?.facility_object?.id}/patient/${data.patient_object?.id}/insurance` diff --git a/src/Components/Patient/PatientFilter.tsx b/src/Components/Patient/PatientFilter.tsx index 0e1cdfdd083..6392c5c4d45 100644 --- a/src/Components/Patient/PatientFilter.tsx +++ b/src/Components/Patient/PatientFilter.tsx @@ -1,5 +1,4 @@ import dayjs from "dayjs"; -import { useCallback, useEffect } from "react"; import CareIcon from "../../CAREUI/icons/CareIcon"; import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; import { @@ -12,12 +11,6 @@ import { } from "../../Common/constants"; import useConfig from "../../Common/hooks/useConfig"; import useMergeState from "../../Common/hooks/useMergeState"; -import { - getAllLocalBody, - getAnyFacility, - getDistrict, -} from "../../Redux/actions"; -import { useDispatch } from "react-redux"; import { dateQueryString } from "../../Utils/utils"; import { DateRange } from "../Common/DateRangeInputV2"; import { FacilitySelect } from "../Common/FacilitySelect"; @@ -35,6 +28,9 @@ import { import MultiSelectMenuV2 from "../Form/MultiSelectMenuV2"; import SelectMenuV2 from "../Form/SelectMenuV2"; import DiagnosesFilter, { FILTER_BY_DIAGNOSES_KEYS } from "./DiagnosesFilter"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; const getDate = (value: any) => value && dayjs(value).isValid() && dayjs(value).toDate(); @@ -105,37 +101,24 @@ export default function PatientFilter(props: any) { diagnoses_unconfirmed: filter.diagnoses_unconfirmed || null, diagnoses_differential: filter.diagnoses_differential || null, }); - const dispatch: any = useDispatch(); - - useEffect(() => { - async function fetchData() { - if (filter.facility) { - const { data: facilityData } = await dispatch( - getAnyFacility(filter.facility, "facility") - ); - setFilterState({ facility_ref: facilityData }); - } - if (filter.district) { - const { data: districtData } = await dispatch( - getDistrict(filter.district, "district") - ); - setFilterState({ district_ref: districtData }); - } + useQuery(routes.getAnyFacility, { + pathParams: { id: filter.facility }, + prefetch: !!filter.facility, + onResponse: ({ data }) => setFilterState({ facility_ref: data }), + }); - if (filter.lsgBody) { - const { data: lsgRes } = await dispatch(getAllLocalBody({})); - const lsgBodyData = lsgRes.results; + useQuery(routes.getDistrict, { + pathParams: { id: filter.district }, + prefetch: !!filter.district, + onResponse: ({ data }) => setFilterState({ district_ref: data }), + }); - setFilterState({ - lsgBody_ref: lsgBodyData.filter( - (obj: any) => obj.id.toString() === filter.lsgBody.toString() - )[0], - }); - } - } - fetchData(); - }, [dispatch]); + useQuery(routes.getLocalBody, { + pathParams: { id: filter.lsgBody }, + prefetch: !!filter.lsgBody, + onResponse: ({ data }) => setFilterState({ lsgBody_ref: data }), + }); const VACCINATED_FILTER = [ { id: "0", text: "Unvaccinated" }, @@ -161,21 +144,19 @@ export default function PatientFilter(props: any) { { id: "false", text: "No" }, ]; - const setFacility = (selected: any, name: string) => { - const filterData: any = { ...filterState }; - filterData[`${name}_ref`] = selected; - filterData[name] = (selected || {}).id; - - setFilterState(filterData); + const setFilterWithRef = (name: string, selected?: any) => { + setFilterState({ + [`${name}_ref`]: selected, + [name]: selected?.id, + }); }; - const lsgSearch = useCallback( - async (search: string) => { - const res = await dispatch(getAllLocalBody({ local_body_name: search })); - return res?.data?.results; - }, - [dispatch] - ); + const lsgSearch = async (search: string) => { + const { data } = await request(routes.getAllLocalBody, { + query: { local_body_name: search }, + }); + return data?.results; + }; const applyFilter = () => { const { @@ -585,7 +566,7 @@ export default function PatientFilter(props: any) { name="facility" showAll={false} selected={filterState.facility_ref} - setSelected={(obj) => setFacility(obj, "facility")} + setSelected={(obj) => setFilterWithRef("facility", obj)} />
{filterState.facility && ( @@ -629,13 +610,7 @@ export default function PatientFilter(props: any) { name="lsg_body" selected={filterState.lsgBody_ref} fetchData={lsgSearch} - onChange={(selected) => - setFilterState({ - ...filterState, - lsgBody_ref: selected, - lsgBody: selected.id, - }) - } + onChange={(obj) => setFilterWithRef("lsgBody", obj)} optionLabel={(option) => option.name} compareBy="id" /> @@ -648,7 +623,7 @@ export default function PatientFilter(props: any) { multiple={false} name="district" selected={filterState.district_ref} - setSelected={(obj: any) => setFacility(obj, "district")} + setSelected={(obj) => setFilterWithRef("district", obj)} errors={""} />
diff --git a/src/Components/Patient/PatientHome.tsx b/src/Components/Patient/PatientHome.tsx index 22cc35a170e..9b719ba31dd 100644 --- a/src/Components/Patient/PatientHome.tsx +++ b/src/Components/Patient/PatientHome.tsx @@ -795,6 +795,7 @@ export const PatientHome = (props: any) => {
)} -
-
+
+
{/* Can support for patient picture in the future */} -
-
- {consultation?.current_bed && - consultation?.discharge_date === null ? ( -
-

- { - consultation?.current_bed?.bed_object?.location_object - ?.name - } -

-

- {consultation?.current_bed?.bed_object.name} -

-
- +
+
+
+ {consultation?.current_bed && + consultation?.discharge_date === null ? ( +
+

{ consultation?.current_bed?.bed_object?.location_object ?.name } - - {consultation?.current_bed?.bed_object.name} +

+

+ {consultation?.current_bed?.bed_object.name} +

+
+ + { + consultation?.current_bed?.bed_object?.location_object + ?.name + } + + {consultation?.current_bed?.bed_object.name} +
-
- ) : ( -
- + ) : ( +
+ +
+ )} +
+ {category && ( +
+ {category.toUpperCase()}
)} + setOpen(true)} + className="mt-1 px-[10px] py-1" + > + {bedDialogTitle} +
- {category && ( +
- {category.toUpperCase()} -
- )} - setOpen(true)} className="mt-1"> - {bedDialogTitle} - -
-
-
- {patient.name} -
-
- {patient.review_time && - !consultation?.discharge_date && - Number(consultation?.review_interval) > 0 && ( -
+ {patient.age} years • {patient.gender} +
+
+ - - {(dayjs().isBefore(patient.review_time) - ? "Review before: " - : "Review Missed: ") + - formatDateTime(patient.review_time)} -
- )} + + {consultation?.facility_name} + +
+
-
+
+
+
- {consultation?.patient_no && ( - - - {`${consultation?.suggestion === "A" ? "IP" : "OP"}: ${ - consultation?.patient_no - }`} - - - )} {medicoLegalCase && ( - + MLC )}
- {!!consultation?.discharge_date && ( -

- Discharged from CARE -

- )} -
-
- {patient.action && patient.action != 10 && ( -
-
- - {" "} - { - TELEMEDICINE_ACTIONS.find( - (i) => i.id === patient.action - )?.desc - } - -
-
- )} -
-
- Age: {patient.age} years -
-
-
-
- Gender: {patient.gender} -
+
+
+ {patient.name} +
+ {patient.age} years • {patient.gender}
- {consultation?.suggestion === "DC" && ( -
+
+
+
+ {consultation?.patient_no && ( + + + {`${consultation?.suggestion === "A" ? "IP" : "OP"}: ${ + consultation?.patient_no + }`} + + + )} + {patient.action && patient.action != 10 && (
-
- Domiciliary Care - +
+ + {" "} + { + TELEMEDICINE_ACTIONS.find( + (i) => i.id === patient.action + )?.desc + } +
+ )} +
+ {patient.blood_group && ( +
+ Blood Group: {patient.blood_group} +
+ )}
- )} -
-
-
- {[ - [ - "Respiratory Support", - RESPIRATORY_SUPPORT.find( - (resp) => - resp.text === - consultation?.last_daily_round?.ventilator_interface - )?.id ?? "UNKNOWN", - consultation?.last_daily_round?.ventilator_interface, - ], - ].map((stat, i) => { - return stat[2] && stat[1] !== "NONE" ? ( -
- {stat[0]} : {stat[1]} -
- ) : ( - "" - ); - })} -
- {consultation?.discharge_date ? ( -
-
- - { - CONSULTATION_SUGGESTION.find( - (suggestion) => - suggestion.id === consultation?.suggestion - )?.text - }{" "} - on {formatDateTime(consultation.encounter_date)}, - {consultation?.new_discharge_reason === - DISCHARGE_REASONS.find((i) => i.text == "Expired")?.id ? ( - - {" "} - Expired on {formatDate(consultation?.death_datetime)} - - ) : ( - - {" "} - Discharged on{" "} - {formatDateTime(consultation?.discharge_date)} - + {patient.review_time && + !consultation?.discharge_date && + Number(consultation?.review_interval) > 0 && ( +
+
+ + {dayjs().isBefore(patient.review_time) + ? "Review before: " + : "Review Missed: "} + {formatDateTime(patient.review_time)} +
+
)} -
-
-
- ) : ( -
- - {consultation?.encounter_date && ( + {consultation?.suggestion === "DC" && (
- Admission on{" "} - {formatDateTime(consultation?.encounter_date)} +
+
+ + Domiciliary Care +
+
)} - {consultation?.icu_admission_date && ( -
- , ICU Admission on{" "} - {formatDateTime(consultation?.icu_admission_date)} + {!!consultation?.discharge_date && ( +

+ Discharged from CARE +

+ )} + {[ + [ + "Respiratory Support", + RESPIRATORY_SUPPORT.find( + (resp) => + resp.text === + consultation?.last_daily_round?.ventilator_interface + )?.id ?? "UNKNOWN", + consultation?.last_daily_round?.ventilator_interface, + ], + ].map((stat, i) => { + return stat[2] && stat[1] !== "NONE" ? ( +
+
+ {stat[0]} : {stat[1]} +
+
+ ) : ( + "" + ); + })} + {consultation?.discharge_date ? ( +
+
+ + + { + CONSULTATION_SUGGESTION.find( + (suggestion) => + suggestion.id === consultation?.suggestion + )?.text + } + {" "} + on {formatDateTime(consultation.encounter_date)}, + {consultation?.new_discharge_reason === "EXP" ? ( + + {" "} + Expired on{" "} + {formatDate(consultation?.death_datetime)} + + ) : ( + + {" "} + Discharged on{" "} + {formatDateTime(consultation?.discharge_date)} + + )} + +
+
+ ) : ( +
+ + {consultation?.encounter_date && ( +
+ Admission on:{" "} + {formatDateTime(consultation?.encounter_date)} +
+ )} + {consultation?.icu_admission_date && ( +
+ , ICU Admission on:{" "} + {formatDateTime(consultation?.icu_admission_date)} +
+ )} +
)} - +
+
+
+
+
+ {consultation?.diagnoses?.length + ? (() => { + const principal_diagnosis = consultation.diagnoses.find( + (diagnosis) => diagnosis.is_principal + ); + return principal_diagnosis ? ( +
+
+ Principal Diagnosis: +
+
+ {principal_diagnosis.diagnosis_object.label}{" "} + + +

+ {principal_diagnosis.verification_status} +

+
+
+
+ ) : null; + })() + : null} + {(consultation?.treating_physician_object || + consultation?.deprecated_verified_by) && ( +
+ + Treating Physician:{" "} + + {consultation?.treating_physician_object + ? `${consultation?.treating_physician_object.first_name} ${consultation?.treating_physician_object.last_name}` + : consultation?.deprecated_verified_by} + +
+ )}
- )} +
- {consultation?.last_daily_round && ( -
- -
- )} - -
+
+ {consultation?.last_daily_round && ( +
+ +
+ )} {!!consultation?.discharge_date && ( -
+
Discharge Reason
-
+
{!consultation?.new_discharge_reason ? ( {consultation.suggestion === "OP" @@ -398,14 +472,6 @@ export default function PatientInfoCard(props: {
)} {[ - [ - `/facility/${patient.facility}/patient/${patient.id}/consultation/${consultation?.id}/update`, - "Edit Consultation Details", - "pen", - patient.is_active && - consultation?.id && - !consultation?.discharge_date, - ], [ `/facility/${patient.facility}/patient/${patient.id}/consultation/${consultation?.id}/daily-rounds`, "Log Update", @@ -428,7 +494,10 @@ export default function PatientInfoCard(props: { ].map( (action: any, i) => action[3] && ( -
+
- +

{action[1]}

{action?.[4]?.[0] && ( <> -

+

{action[4][1]}

@@ -471,11 +540,20 @@ export default function PatientInfoCard(props: { } + title={"Manage Patient"} + icon={} + containerClassName="w-full lg:w-auto mt-2 2xl:mt-0" >
{[ + [ + `/facility/${patient.facility}/patient/${patient.id}/consultation/${consultation?.id}/update`, + "Edit Consultation Details", + "pen", + patient.is_active && + consultation?.id && + !consultation?.discharge_date, + ], [ `/patient/${patient.id}/investigation_reports`, "Investigation Summary", @@ -551,6 +629,7 @@ export default function PatientInfoCard(props: { ) )}
+
{enable_abdm && (patient.abha_number ? ( diff --git a/src/Components/Patient/PatientRegister.tsx b/src/Components/Patient/PatientRegister.tsx index ce63d5019de..2f18ef36dbb 100644 --- a/src/Components/Patient/PatientRegister.tsx +++ b/src/Components/Patient/PatientRegister.tsx @@ -1126,6 +1126,7 @@ export const PatientRegister = (props: PatientRegisterProps) => { />