diff --git a/.example.env b/.example.env index 848dd4bee93..f3f303bc1e3 100644 --- a/.example.env +++ b/.example.env @@ -58,7 +58,6 @@ REACT_KASP_FULL_STRING=Karunya Arogya Suraksha Padhathi # Sample format file paths REACT_SAMPLE_FORMAT_ASSET_IMPORT=/asset-import-template.xlsx -REACT_SAMPLE_FORMAT_EXTERNAL_RESULT_IMPORT=/External-Results-Template.csv # Camera feed, still watching idle timeout (in seconds; default: 180) REACT_STILL_WATCHING_IDLE_TIMEOUT= diff --git a/care.config.ts b/care.config.ts index f4f7d708ed0..c032ba613f3 100644 --- a/care.config.ts +++ b/care.config.ts @@ -61,9 +61,6 @@ const careConfig = { sampleFormats: { assetImport: env.REACT_SAMPLE_FORMAT_ASSET_IMPORT || "/asset-import-template.xlsx", - externalResultImport: - env.REACT_SAMPLE_FORMAT_EXTERNAL_RESULT_IMPORT || - "/External-Results-Template.csv", }, wartimeShifting: env.REACT_WARTIME_SHIFTING === "true", diff --git a/cypress/e2e/assets_spec/AssetHomepage.cy.ts b/cypress/e2e/assets_spec/AssetHomepage.cy.ts index f462bda4327..57c315bb0c4 100644 --- a/cypress/e2e/assets_spec/AssetHomepage.cy.ts +++ b/cypress/e2e/assets_spec/AssetHomepage.cy.ts @@ -99,9 +99,9 @@ describe("Asset Tab", () => { it("Export asset", () => { assetPage.selectassetimportbutton(); cy.wait(2000); - assetPage.selectjsonexportbutton(); + assetPage.selectJsonExportButton(); assetPage.selectassetimportbutton(); - assetPage.selectcsvexportbutton(); + assetPage.selectCsvExportButton(); }); afterEach(() => { diff --git a/cypress/e2e/assets_spec/AssetsCreation.cy.ts b/cypress/e2e/assets_spec/AssetsCreation.cy.ts index 1bcd984a7a3..6d94108b362 100644 --- a/cypress/e2e/assets_spec/AssetsCreation.cy.ts +++ b/cypress/e2e/assets_spec/AssetsCreation.cy.ts @@ -129,7 +129,7 @@ describe("Asset", () => { "d5694af2-21e2-4a39-9bad-2fb98d9818bd", ); assetPage.clickConfigureAsset(); - assetPage.verifyAssetConfiguration(200); + assetPage.verifyAssetConfiguration(); }); it("Add an vital monitor asset and configure it", () => { diff --git a/cypress/e2e/external_results_spec/ExternalResultsAdvanceFilters.ts b/cypress/e2e/external_results_spec/ExternalResultsAdvanceFilters.ts deleted file mode 100644 index 45c050cad8c..00000000000 --- a/cypress/e2e/external_results_spec/ExternalResultsAdvanceFilters.ts +++ /dev/null @@ -1,41 +0,0 @@ -describe("External Results Filters", () => { - before(() => { - cy.loginByApi("devdistrictadmin", "Coronasafe@123"); - cy.saveLocalStorage(); - }); - - beforeEach(() => { - cy.restoreLocalStorage(); - cy.clearLocalStorage(/filters--.+/); - cy.awaitUrl("/external_results"); - cy.contains("Filters").click(); - }); - - it("Advance Filter", () => { - cy.clickAndSelectOption("#local_bodies", "Aluva"); - cy.get("#local_bodies").click(); - cy.clickAndSelectOption("#wards", "4"); - cy.get("#wards").click(); - cy.contains("Apply").click(); - }); - - it("filter by date", () => { - cy.get("input[name='created_date_start']").click(); - cy.get("[id^='headlessui-popover-panel-'] .care-l-angle-left-b").click(); - cy.get("div[id='date-1']").click(); - cy.get("div[id='date-8']").click(); - cy.get("input[name='result_date_start']").click(); - cy.get("[id^='headlessui-popover-panel-'] .care-l-angle-left-b").click(); - cy.get("div[id='date-1']").click(); - cy.get("div[id='date-8']").click(); - cy.get("input[name='sample_collection_date_start']").click(); - cy.get("[id^='headlessui-popover-panel-'] .care-l-angle-left-b").click(); - cy.get("div[id='date-1']").click(); - cy.get("div[id='date-8']").click(); - cy.contains("Apply").click(); - }); - - afterEach(() => { - cy.saveLocalStorage(); - }); -}); diff --git a/cypress/e2e/external_results_spec/ExternalResultsHomepage.cy.ts b/cypress/e2e/external_results_spec/ExternalResultsHomepage.cy.ts deleted file mode 100644 index 6a37d8fb2d0..00000000000 --- a/cypress/e2e/external_results_spec/ExternalResultsHomepage.cy.ts +++ /dev/null @@ -1,68 +0,0 @@ -describe("Edit Profile Testing", () => { - before(() => { - cy.loginByApi("devdistrictadmin", "Coronasafe@123"); - cy.saveLocalStorage(); - }); - - beforeEach(() => { - cy.restoreLocalStorage(); - cy.clearLocalStorage(/filters--.+/); - cy.awaitUrl("/external_results"); - }); - - it("Search by Sample name", () => { - cy.intercept(/\/api\/v1\/external_result/).as("external_result"); - cy.get("[name='name']").type("akhil"); - cy.wait("@external_result").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); - cy.url().should("include", "akhil"); - }); - - it("Search by phone number", () => { - cy.intercept(/\/api\/v1\/external_result/).as("external_result"); - cy.get("[placeholder='Search by Phone Number']").type("7387434255"); - cy.wait("@external_result").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); - cy.url().should("include", "%2B917387434255"); - }); - - it("import", () => { - cy.intercept("POST", "/api/v1/external_result/bulk_upsert").as("import"); - cy.get("div").contains("Import/Export").click(); - cy.get("div").contains("Import Results").click(); - cy.get("[data-testid=import-file]") - .selectFile("cypress/fixtures/external-result-sample.csv", { - force: true, - }) - .wait(100); - cy.submitButton("Import"); - cy.wait("@import").then((interception) => { - expect(interception.response.statusCode).to.equal(202); - }); - }); - - it("export", () => { - cy.intercept("**", (req) => { - const url = new URL(req.url); - const params = new URLSearchParams(url.search); - if ( - req.method === "GET" && - url.pathname === "/api/v1/external_result/" && - params.get("csv") === "true" - ) { - req.alias = "export"; - } - }); - cy.contains("Import/Export").click().wait(100); - cy.contains("Export Results").click(); - cy.wait("@export").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); - }); - - afterEach(() => { - cy.saveLocalStorage(); - }); -}); diff --git a/cypress/e2e/patient_spec/PatientFileUpload.ts b/cypress/e2e/patient_spec/PatientFileUpload.ts index 9d6852d16e7..7e5a3073179 100644 --- a/cypress/e2e/patient_spec/PatientFileUpload.ts +++ b/cypress/e2e/patient_spec/PatientFileUpload.ts @@ -5,7 +5,10 @@ const loginPage = new LoginPage(); const patientPage = new PatientPage(); const patientFileUpload = new PatientFileUpload(); -function runTests(testDescription, visitPatientFileUploadSection) { +function runTests( + testDescription: string, + visitPatientFileUploadSection: () => void, +) { describe(testDescription, () => { const cypressAudioName = "cypress audio"; const cypressFileName = "cypress name"; diff --git a/cypress/e2e/patient_spec/PatientHomepage.cy.ts b/cypress/e2e/patient_spec/PatientHomepage.cy.ts index c1575057fe4..188b6bc9457 100644 --- a/cypress/e2e/patient_spec/PatientHomepage.cy.ts +++ b/cypress/e2e/patient_spec/PatientHomepage.cy.ts @@ -4,6 +4,24 @@ import PatientHome from "../../pageobject/Patient/PatientHome"; describe("Patient Homepage present functionalities", () => { const loginPage = new LoginPage(); const patientHome = new PatientHome(); + const patientGender = "Male"; + const patientCategory = "Moderate"; + const patientMinimumAge = "18"; + const patientMaximumAge = "24"; + const patientLastAdmittedBed = "No bed assigned"; + const PatientLastConsentType = "No consents"; + const patientTelemedicinePerference = "No"; + const patientReviewStatus = "No"; + const patientMedicoStatus = "Non-Medico-Legal"; + const patientIcdDiagnosis = "1A00"; + const facilityName = "Dummy Facility 40"; + const facilityType = "Private Hospital"; + const facilityLsgBody = "Aikaranad Grama Panchayat, Ernakulam District"; + const facilityDistrict = "Ernakulam"; + const patientFromDate = "01122023"; + const patientToDate = "07122023"; + const patientFromDateBadge = "2023-12-01"; + const patientToDateBadge = "2023-12-07"; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -16,6 +34,128 @@ describe("Patient Homepage present functionalities", () => { cy.awaitUrl("/patients"); }); + it("Date based advance filters applied in the patient tab", () => { + patientHome.clickPatientAdvanceFilters(); + patientHome.typePatientCreatedBeforeDate(patientFromDate); + patientHome.typePatientCreatedAfterDate(patientToDate); + patientHome.typePatientModifiedBeforeDate(patientFromDate); + patientHome.typePatientModifiedAfterDate(patientToDate); + patientHome.typePatientAdmitedBeforeDate(patientFromDate); + patientHome.typePatientAdmitedAfterDate(patientToDate); + patientHome.clickPatientFilterApply(); + patientHome.verifyTotalPatientCount("1"); + // verify the badge and clear the count + patientHome.verifyPatientCreatedBeforeDate(patientToDateBadge); + patientHome.verifyPatientCreatedAfterDate(patientFromDateBadge); + patientHome.verifyPatientModifiedBeforeDate(patientToDateBadge); + patientHome.verifyPatientModifiedAfterDate(patientFromDateBadge); + patientHome.verifyPatientAdmittedBeforeDate(patientToDateBadge); + patientHome.verifyPatientAdmittedAfterDate(patientFromDateBadge); + cy.clearAllFilters(); + patientHome.verifyTotalPatientCount("1"); + }); + + it("Facility Geography based advance filters applied in the patient tab", () => { + patientHome.clickPatientAdvanceFilters(); + patientHome.typeFacilityName(facilityName); + patientHome.selectFacilityType(facilityType); + patientHome.typeFacilityLsgBody(facilityLsgBody); + patientHome.typeFacilityDistrict(facilityDistrict); + patientHome.clickPatientFilterApply(); + patientHome.verifyTotalPatientCount("1"); + // Clear the badges and verify the patient count along with badges + patientHome.verifyFacilityNameBadgeContent(facilityName); + patientHome.verifyFacilityTypeBadgeContent(facilityType); + patientHome.verifyFacilityLsgBadgeContent(facilityLsgBody); + patientHome.verifyFacilityDistrictContent(facilityDistrict); + cy.clearAllFilters(); + patientHome.verifyTotalPatientCount("1"); + }); + + it("Patient diagnosis based advance filters applied in the patient tab", () => { + // Patient Filtering based on icd-11 data + patientHome.clickPatientAdvanceFilters(); + patientHome.selectAnyIcdDiagnosis(patientIcdDiagnosis, patientIcdDiagnosis); + patientHome.selectConfirmedIcdDiagnosis( + patientIcdDiagnosis, + patientIcdDiagnosis, + ); + patientHome.selectUnconfirmedIcdDiagnosis( + patientIcdDiagnosis, + patientIcdDiagnosis, + ); + patientHome.selectProvisionalIcdDiagnosis( + patientIcdDiagnosis, + patientIcdDiagnosis, + ); + patientHome.selectDifferentialIcdDiagnosis( + patientIcdDiagnosis, + patientIcdDiagnosis, + ); + patientHome.clickPatientFilterApply(); + patientHome.verifyTotalPatientCount("0"); + // verify the badges presence in the platform + patientHome.verifyAnyDiagnosisBadgeContent(patientIcdDiagnosis); + patientHome.verifyConfirmedDiagnosisBadgeContent(patientIcdDiagnosis); + patientHome.verifyUnconfirmedDiagnosisBadgeContent(patientIcdDiagnosis); + patientHome.verifyProvisionalDiagnosisBadgeContent(patientIcdDiagnosis); + patientHome.verifyDifferentialDiagnosisBadgeContent(patientIcdDiagnosis); + // Clear the badges and verify the patient count along with badges + cy.clearAllFilters(); + patientHome.verifyTotalPatientCount("1"); + // Apply Any and confirmed diagonsis to verify patient count 17 + patientHome.clickPatientAdvanceFilters(); + patientHome.selectAnyIcdDiagnosis(patientIcdDiagnosis, patientIcdDiagnosis); + patientHome.selectConfirmedIcdDiagnosis( + patientIcdDiagnosis, + patientIcdDiagnosis, + ); + patientHome.clickPatientFilterApply(); + patientHome.verifyTotalPatientCount("1"); + }); + + it("Patient Details based advance filters applied in the patient tab", () => { + // Patient Filtering based on patient details + patientHome.clickPatientAdvanceFilters(); + patientHome.selectPatientGenderfilter(patientGender); + patientHome.selectPatientCategoryfilter(patientCategory); + patientHome.typePatientMinimumAgeFilter(patientMinimumAge); + patientHome.typePatientMaximumAgeFilter(patientMaximumAge); + patientHome.selectPatientLastAdmittedBed(patientLastAdmittedBed); + patientHome.selectPatientLastConsentType(PatientLastConsentType); + patientHome.selectPatientTelemedicineFilter(patientTelemedicinePerference); + patientHome.selectPatientReviewFilter(patientReviewStatus); + patientHome.selectPatientMedicoFilter(patientMedicoStatus); + patientHome.clickPatientFilterApply(); + cy.get("a[data-cy='patient']").should("contain.text", "Dummy Patient"); + patientHome.verifyTotalPatientCount("1"); + // Verify the presence of badges + patientHome.verifyGenderBadgeContent(patientGender); + patientHome.verifyCategoryBadgeContent(patientCategory); + patientHome.verifyMinAgeBadgeContent(patientMinimumAge); + patientHome.verifyMaxAgeBadgeContent(patientMaximumAge); + patientHome.verifyLastAdmittedBedBadgeContent(patientLastAdmittedBed); + patientHome.verifyLastConsentTypeBadgeContent("No Consents"); + patientHome.verifyTelemedicineBadgeContent("false"); + patientHome.verifyReviewMissedBadgeContent("false"); + patientHome.verifyMedicoBadgeContent("false"); + // Clear the badges and verify the patient count along with badges + cy.clearAllFilters(); + patientHome.verifyTotalPatientCount("1"); + }); + + it("Export the live patient list based on a date range", () => { + patientHome.clickPatientExport(); + cy.verifyNotification("Please select a seven day period"); + cy.closeNotification(); + patientHome.typePatientModifiedBeforeDate("01122023"); + patientHome.typePatientModifiedAfterDate("07122023"); + patientHome.clickPatientFilterApply(); + patientHome.interceptPatientExportRequest(); + patientHome.clickPatientExport(); + patientHome.verifyPatientExportRequest(); + }); + it("Verify the functionality of the patient tab pagination", () => { let firstPatientPageOne: string; cy.get('[data-cy="patient"]') diff --git a/cypress/e2e/sample_test_spec/SampleTestHomepage.cy.ts b/cypress/e2e/sample_test_spec/SampleTestHomepage.cy.ts index 1af1cfc5cb4..98d69ccff41 100644 --- a/cypress/e2e/sample_test_spec/SampleTestHomepage.cy.ts +++ b/cypress/e2e/sample_test_spec/SampleTestHomepage.cy.ts @@ -13,18 +13,14 @@ describe("Sample List", () => { it("Search by District name", () => { cy.intercept(/\/api\/v1\/test_sample/).as("test_sample"); cy.get("[name='district_name']").type("Test"); - cy.wait("@test_sample").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); + cy.wait("@test_sample").its("response.statusCode").should("eq", 200); cy.url().should("include", "Test"); }); it("Search by Patient Name", () => { cy.intercept(/\/api\/v1\/test_sample/).as("test_sample"); cy.get("[name='patient_name']").type("Test"); - cy.wait("@test_sample").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); + cy.wait("@test_sample").its("response.statusCode").should("eq", 200); cy.url().should("include", "Test"); }); diff --git a/cypress/pageobject/Asset/AssetCreation.ts b/cypress/pageobject/Asset/AssetCreation.ts index 5863de0fa35..f0b2f1b74eb 100644 --- a/cypress/pageobject/Asset/AssetCreation.ts +++ b/cypress/pageobject/Asset/AssetCreation.ts @@ -149,10 +149,8 @@ export class AssetPage { cy.intercept(/\/api\/v1\/asset/).as("asset"); } - verifyAssetConfiguration(statusCode: number) { - cy.wait("@asset").then((interception) => { - expect(interception.response.statusCode).to.equal(statusCode); - }); + verifyAssetConfiguration() { + cy.wait("@asset").its("response.statusCode").should("eq", 200); } clickConfigureAsset() { @@ -222,22 +220,16 @@ export class AssetPage { cy.get("[data-testid=import-asset-button]").click(); } - selectjsonexportbutton() { + selectJsonExportButton() { cy.intercept("GET", "**/api/v1/asset/?**json=true**").as("getJsonexport"); cy.get("#export-json-option").click(); - cy.wait("@getJsonexport").then(({ request, response }) => { - expect(response.statusCode).to.eq(200); - expect(request.url).to.include("json=true"); - }); + cy.wait("@getJsonexport").its("response.statusCode").should("eq", 200); } - selectcsvexportbutton() { + selectCsvExportButton() { cy.intercept("GET", "**/api/v1/asset/?**csv=true**").as("getCsvexport"); cy.get("#export-csv-option").click(); - cy.wait("@getCsvexport").then(({ request, response }) => { - expect(response.statusCode).to.eq(200); - expect(request.url).to.include("csv=true"); - }); + cy.wait("@getCsvexport").its("response.statusCode").should("eq", 200); } selectImportOption() { diff --git a/cypress/pageobject/Asset/AssetFilters.ts b/cypress/pageobject/Asset/AssetFilters.ts index ac83ca97c0b..5a942b22f47 100644 --- a/cypress/pageobject/Asset/AssetFilters.ts +++ b/cypress/pageobject/Asset/AssetFilters.ts @@ -56,16 +56,16 @@ export class AssetFilters { cy.get("#close-slide-over").click(); } // Assertions - assertFacilityText(text) { + assertFacilityText(text: string) { cy.get("[data-testid=Facility]").should("contain", text); } - assertAssetClassText(text) { + assertAssetClassText(text: string) { cy.get("[data-testid='Asset Class']").should("contain", text); } - assertStatusText(text) { + assertStatusText(text: string) { cy.get("[data-testid=Status]").should("contain", text); } - assertLocationText(text) { + assertLocationText(text: string) { cy.get("[data-testid=Location]").should("contain", text); } } diff --git a/cypress/pageobject/Facility/FacilityCreation.ts b/cypress/pageobject/Facility/FacilityCreation.ts index f8ac7ac9c52..5fd6cb556a6 100644 --- a/cypress/pageobject/Facility/FacilityCreation.ts +++ b/cypress/pageobject/Facility/FacilityCreation.ts @@ -9,7 +9,7 @@ class FacilityPage { .should("eq", 200); } - typeFacilitySearch(facilityName) { + typeFacilitySearch(facilityName: string) { cy.get("#search").click().clear(); cy.get("#search").click().type(facilityName); } @@ -21,7 +21,7 @@ class FacilityPage { cy.get("#manage-facility-dropdown button").should("be.visible"); } - clickUpdateFacilityType(facilityType) { + clickUpdateFacilityType(facilityType: string) { cy.get("#facility_type") .click() .then(() => { @@ -225,11 +225,11 @@ class FacilityPage { } fillTriageEntryFields( - visited, - homeQuarantine, - isolation, - referred, - confirmedPositive, + visited: string, + homeQuarantine: string, + isolation: string, + referred: string, + confirmedPositive: string, ) { cy.get("#num_patients_visited").clear().click().type(visited); cy.get("#num_patients_home_quarantine") @@ -244,7 +244,7 @@ class FacilityPage { .type(confirmedPositive); } - fillEntryDate(date) { + fillEntryDate(date: string) { cy.get("#entry_date").click(); cy.get("#date-input").click().type(date); } @@ -253,13 +253,13 @@ class FacilityPage { cy.get("#edit-button").click(); } - clickButtonsMultipleTimes(selector) { + clickButtonsMultipleTimes(selector: string) { cy.get(selector).each(($button) => { cy.wrap($button).click(); }); } - verifyTriageTableContains(value) { + verifyTriageTableContains(value: string) { cy.get("#triage-table").contains(value); } @@ -430,7 +430,7 @@ class FacilityPage { return cy.get("#district"); } - selectStateOnPincode(stateName) { + selectStateOnPincode(stateName: string) { this.getStateElement() .scrollIntoView() .wait(2000) @@ -444,7 +444,7 @@ class FacilityPage { }); } - selectDistrictOnPincode(districtName) { + selectDistrictOnPincode(districtName: string) { this.getDistrictElement() .scrollIntoView() .wait(2000) diff --git a/cypress/pageobject/Facility/FacilityHome.ts b/cypress/pageobject/Facility/FacilityHome.ts index 956c374ada4..e021171ff0a 100644 --- a/cypress/pageobject/Facility/FacilityHome.ts +++ b/cypress/pageobject/Facility/FacilityHome.ts @@ -53,7 +53,7 @@ class FacilityHome { cy.get("#facility-detailspage-cns").click(); } - selectLocation(location) { + selectLocation(location: string) { cy.get("#location").click().type(location); cy.get("li[role=option]").contains(location).click(); } @@ -99,7 +99,7 @@ class FacilityHome { return cy.url(); } - verifyURLContains(searchText) { + verifyURLContains(searchText: string) { const encodedText = encodeURIComponent(searchText).replace(/%20/g, "+"); this.getURL().should("include", `search=${encodedText}`); } diff --git a/cypress/pageobject/Facility/FacilityManage.ts b/cypress/pageobject/Facility/FacilityManage.ts index 9e41d5d0290..52a432abe59 100644 --- a/cypress/pageobject/Facility/FacilityManage.ts +++ b/cypress/pageobject/Facility/FacilityManage.ts @@ -7,17 +7,17 @@ class FacilityManage { cy.get("#upload-cover-image").should("be.visible"); } - uploadCoverImage(fileName) { + uploadCoverImage(fileName: string) { cy.get("#upload-cover-image") .selectFile(`cypress/fixtures/${fileName}`, { force: true }) .wait(100); // Adjust the wait time as needed } - verifyTotalDoctorCapacity(expectedCapacity) { + verifyTotalDoctorCapacity(expectedCapacity: string) { cy.get("#facility-doctor-totalcapacity").contains(expectedCapacity); } - verifyFacilityBedCapacity(expectedCapacity) { + verifyFacilityBedCapacity(expectedCapacity: string) { cy.get("#facility-bed-capacity-details").contains(expectedCapacity); } @@ -51,15 +51,15 @@ class FacilityManage { cy.get("#middleware_address").should("be.visible"); } - clickButtonWithText(text) { + clickButtonWithText(text: string) { cy.get("button#submit").contains(text).click(); } - checkErrorMessageVisibility(text) { + checkErrorMessageVisibility(text: string) { cy.get(".error-text").contains(text).should("be.visible"); } - typeMiddlewareAddress(address) { + typeMiddlewareAddress(address: string) { cy.get("#middleware_address").click().clear().click().type(address); } @@ -67,11 +67,14 @@ class FacilityManage { cy.get("#hf_id").click().clear(); } - typeHfrId(address) { + typeHfrId(address: string) { cy.get("#hf_id").click().clear().click().type(address); } - verifySuccessMessageVisibilityAndContent(text, isRegex = false) { + verifySuccessMessageVisibilityAndContent( + text: string | RegExp, + isRegex = false, + ) { if (isRegex) { cy.get(".pnotify-text").should("be.visible").contains(text); } else { @@ -79,11 +82,11 @@ class FacilityManage { } } - verifyMiddlewareAddressValue(expectedValue) { + verifyMiddlewareAddressValue(expectedValue: string) { cy.get("#middleware_address").should("have.value", expectedValue); } - verifyHfrIdValue(expectedValue) { + verifyHfrIdValue(expectedValue: string) { cy.get("#hf_id").should("have.value", expectedValue); } diff --git a/cypress/pageobject/Patient/PatientConsultation.ts b/cypress/pageobject/Patient/PatientConsultation.ts index cc5b8e19465..71a0fbb3909 100644 --- a/cypress/pageobject/Patient/PatientConsultation.ts +++ b/cypress/pageobject/Patient/PatientConsultation.ts @@ -6,9 +6,10 @@ export class PatientConsultationPage { cy.clickAndSelectOption("#route_to_facility", status); } - typeAndMultiSelectSymptoms(input, symptoms) { + typeAndMultiSelectSymptoms(input: string, symptoms: string[]) { cy.typeAndMultiSelectOption("#additional_symptoms", input, symptoms); } + selectSymptomsDate(date: string) { cy.clickAndTypeDate("#symptoms_onset_date", date); } @@ -25,15 +26,15 @@ export class PatientConsultationPage { } selectPatientReferance(referance: string) { - cy.searchAndSelectOption("#referred_to", referance); + cy.typeAndSelectOption("#referred_to", referance); } selectBed(bedNo: string) { - cy.searchAndSelectOption("#bed", bedNo); + cy.typeAndSelectOption("#bed", bedNo); } selectPatientWard(ward: string) { - cy.searchAndSelectOption("#transferred_from_location", ward); + cy.typeAndSelectOption("#transferred_from_location", ward); } selectPatientSuggestion(suggestion: string) { @@ -48,8 +49,8 @@ export class PatientConsultationPage { cy.get("#death_confirmed_doctor").click().type(doctor); } - selectPatientDiagnosis(icdCode, statusId) { - cy.searchAndSelectOption("#icd11-search", icdCode); + selectPatientDiagnosis(icdCode: string, statusId: string) { + cy.typeAndSelectOption("#icd11-search", icdCode); cy.get("#diagnosis-list") .contains("Add as") .scrollIntoView() @@ -92,13 +93,13 @@ export class PatientConsultationPage { cy.clickAndSelectOption("#principal-diagnosis-select", diagnosis); } - verifyTextInConsultation(selector, text) { + verifyTextInConsultation(selector: string, text: string) { cy.get(selector).scrollIntoView(); cy.get(selector).contains(text).should("be.visible"); } typeReferringFacility(referringFacility: string) { - cy.searchAndSelectOption("#referred_from_facility", referringFacility); + cy.typeAndSelectOption("#referred_from_facility", referringFacility); } clickEditConsultationButton() { diff --git a/cypress/pageobject/Patient/PatientCreation.ts b/cypress/pageobject/Patient/PatientCreation.ts index e037f0888f0..a583844a632 100644 --- a/cypress/pageobject/Patient/PatientCreation.ts +++ b/cypress/pageobject/Patient/PatientCreation.ts @@ -10,7 +10,7 @@ export class PatientPage { cy.wait("@getFacilities").its("response.statusCode").should("eq", 200); } - visitPatient(patientName) { + visitPatient(patientName: string) { cy.get("#name").click().type(patientName); cy.intercept("GET", "**/api/v1/consultation/**").as("getPatient"); cy.get("#patient-name-list").contains(patientName).click(); @@ -22,7 +22,7 @@ export class PatientPage { } selectFacility(facilityName: string) { - cy.searchAndSelectOption("input[name='facilities']", facilityName); + cy.typeAndSelectOption("input[name='facilities']", facilityName); cy.submitButton("Select"); } @@ -114,7 +114,7 @@ export class PatientPage { } selectPatientOccupation(occupation: string) { - cy.searchAndSelectOption("#occupation", occupation); + cy.typeAndSelectOption("#occupation", occupation); } selectSocioeconomicStatus(value: string) { @@ -165,16 +165,16 @@ export class PatientPage { } verifyPatientDashboardDetails( - gender, - age, - patientName, - phoneNumber, - emergencyPhoneNumber, - yearOfBirth, - bloodGroup, - occupation, - socioeconomicStatus = null, - domesticHealthcareSupport = null, + gender: string, + age: number, + patientName: string, + phoneNumber: string, + emergencyPhoneNumber: string, + yearOfBirth: string, + bloodGroup: string, + occupation: string, + socioeconomicStatus: string | null = null, + domesticHealthcareSupport: string | null = null, isAntenatal = false, isPostPartum = false, ) { @@ -202,12 +202,12 @@ export class PatientPage { } verifyPatientLocationDetails( - patientAddress, - patientPincode, - patientState, - patientDistrict, - patientLocalbody, - patientWard, + patientAddress: string, + patientPincode: number, + patientState: string, + patientDistrict: string, + patientLocalbody: string, + patientWard: string, ) { cy.get("[data-testid=patient-details]").then(($dashboard) => { cy.url().should("include", "/facility/"); diff --git a/cypress/pageobject/Patient/PatientDischarge.ts b/cypress/pageobject/Patient/PatientDischarge.ts index eda6a379a3f..70a6d550887 100644 --- a/cypress/pageobject/Patient/PatientDischarge.ts +++ b/cypress/pageobject/Patient/PatientDischarge.ts @@ -14,7 +14,7 @@ class PatientDischarge { } typeReferringFacility(facility: string) { - cy.searchAndSelectOption("#facility-referredto", facility); + cy.typeAndSelectOption("#facility-referredto", facility); } clickClearButton() { diff --git a/cypress/pageobject/Patient/PatientHome.ts b/cypress/pageobject/Patient/PatientHome.ts index 94801cd4bb8..a69a96c3f77 100644 --- a/cypress/pageobject/Patient/PatientHome.ts +++ b/cypress/pageobject/Patient/PatientHome.ts @@ -10,5 +10,246 @@ class PatientHome { clickPreviousPage() { cy.get("#prev-pages").click(); } + + clickPatientExport() { + cy.get("#patient-export").click(); + } + + clickPatientFilterApply() { + cy.get("#apply-filter").click(); + } + + interceptPatientExportRequest() { + cy.intercept({ + method: "GET", + url: "/api/v1/patient/*", + }).as("getPatients"); + } + + verifyPatientExportRequest() { + cy.wait("@getPatients").its("response.statusCode").should("eq", 200); + } + + typePatientCreatedBeforeDate(startDate: string) { + cy.clickAndTypeDate("input[name='created_date_start']", startDate); + } + + typePatientCreatedAfterDate(endDate: string) { + cy.clickAndTypeDate("input[name='created_date_end']", endDate); + } + + typePatientModifiedBeforeDate(startDate: string) { + cy.clickAndTypeDate("input[name='modified_date_start']", startDate); + } + + typePatientModifiedAfterDate(endDate: string) { + cy.clickAndTypeDate("input[name='modified_date_end']", endDate); + } + + typePatientAdmitedBeforeDate(startDate: string) { + cy.clickAndTypeDate( + "input[name='last_consultation_encounter_date_start']", + startDate, + ); + } + + typePatientAdmitedAfterDate(endDate: string) { + cy.clickAndTypeDate( + "input[name='last_consultation_encounter_date_end']", + endDate, + ); + } + + clickPatientAdvanceFilters() { + cy.get("#advanced-filter").click(); + } + + selectPatientGenderfilter(gender: string) { + cy.clickAndSelectOption("#gender-advancefilter", gender); + } + + selectPatientCategoryfilter(category: string) { + cy.clickAndSelectOption("#category-advancefilter", category); + } + + typePatientMinimumAgeFilter(minage: string) { + cy.get("#age_min").type(minage); + } + + typePatientMaximumAgeFilter(maxage: string) { + cy.get("#age_max").type(maxage); + } + + selectPatientLastAdmittedBed(bed: string) { + cy.clickAndMultiSelectOption( + "#last_consultation_admitted_bed_type_list", + bed, + ); + } + + selectPatientLastConsentType(consent: string) { + cy.clickAndMultiSelectOption("#last_consultation__consent_types", consent); + } + + selectPatientTelemedicineFilter(telemedicine: string) { + cy.clickAndSelectOption("#telemedicine-advancefilter", telemedicine); + } + + selectPatientReviewFilter(review: string) { + cy.clickAndSelectOption("#review-advancefilter", review); + } + + selectPatientMedicoFilter(medico: string) { + cy.clickAndSelectOption("#medico-advancefilter", medico); + } + + verifyGenderBadgeContent(expectedText: string) { + cy.get("[data-testid='Gender']").should("contain", expectedText); + } + + verifyCategoryBadgeContent(expectedText: string) { + cy.get("[data-testid='Category']").should("contain", expectedText); + } + + verifyMinAgeBadgeContent(expectedText: string) { + cy.get("[data-testid='Age min']").should("contain", expectedText); + } + + verifyMaxAgeBadgeContent(expectedText: string) { + cy.get("[data-testid='Age max']").should("contain", expectedText); + } + + verifyLastAdmittedBedBadgeContent(expectedText: string) { + cy.get("[data-testid='Bed Type']").should("contain", expectedText); + } + + verifyLastConsentTypeBadgeContent(expectedText: string) { + cy.get("[data-testid='Has Consent']").should("contain", expectedText); + } + + verifyTelemedicineBadgeContent(expectedText: string) { + cy.get("[data-testid='Telemedicine']").should("contain", expectedText); + } + + verifyReviewMissedBadgeContent(expectedText: string) { + cy.get("[data-testid='Review Missed']").should("contain", expectedText); + } + + verifyMedicoBadgeContent(expectedText: string) { + cy.get("[data-testid='Is Medico-Legal Case']").should( + "contain", + expectedText, + ); + } + + verifyTotalPatientCount(count: string) { + cy.get("#total-patientcount").should("contain", count); + } + + selectAnyIcdDiagnosis(input: string, random: string) { + cy.typeAndMultiSelectOption("#diagnoses", input, random); + } + + selectConfirmedIcdDiagnosis(input: string, confirmed: string) { + cy.typeAndMultiSelectOption("#diagnoses_confirmed", input, confirmed); + } + + selectUnconfirmedIcdDiagnosis(input: string, unconfirmed: string) { + cy.typeAndMultiSelectOption("#diagnoses_unconfirmed", input, unconfirmed); + } + + selectProvisionalIcdDiagnosis(input: string, unconfirmed: string) { + cy.typeAndMultiSelectOption("#diagnoses_provisional", input, unconfirmed); + } + + selectDifferentialIcdDiagnosis(input: string, unconfirmed: string) { + cy.typeAndMultiSelectOption("#diagnoses_differential", input, unconfirmed); + } + + typeFacilityName(facilityName: string) { + cy.typeAndSelectOption("input[name='facility']", facilityName); + } + + selectFacilityType(facilityType: string) { + cy.clickAndSelectOption("#facility-type", facilityType); + } + + typeFacilityLsgBody(lsgbody: string) { + cy.typeAndSelectOption("#facility-lsgbody", lsgbody); + } + + typeFacilityDistrict(district: string) { + cy.typeAndSelectOption("#facility-district", district); + } + + verifyAnyDiagnosisBadgeContent(expectedText: string) { + cy.get("[data-testid='Diagnoses (of any verification status)']").should( + "contain", + expectedText, + ); + } + + verifyConfirmedDiagnosisBadgeContent(expectedText: string) { + cy.get("[data-testid='Confirmed Diagnoses']").should( + "contain", + expectedText, + ); + } + + verifyUnconfirmedDiagnosisBadgeContent(expectedText: string) { + cy.get("[data-testid='Unconfirmed Diagnoses']").should( + "contain", + expectedText, + ); + } + + verifyProvisionalDiagnosisBadgeContent(expectedText: string) { + cy.get("[data-testid='Provisional Diagnoses']").should( + "contain", + expectedText, + ); + } + + verifyDifferentialDiagnosisBadgeContent(expectedText: string) { + cy.get("[data-testid='Differential Diagnoses']").should( + "contain", + expectedText, + ); + } + + verifyFacilityNameBadgeContent(expectedText: string) { + cy.get("[data-testid='Facility']").should("contain", expectedText); + } + + verifyFacilityTypeBadgeContent(expectedText: string) { + cy.get("[data-testid='Facility Type']").should("contain", expectedText); + } + + verifyFacilityLsgBadgeContent(expectedText: string) { + cy.get("[data-testid='LSG Body']").should("contain", expectedText); + } + + verifyFacilityDistrictContent(expectedText: string) { + cy.get("[data-testid='District']").should("contain", expectedText); + } + + verifyPatientCreatedAfterDate(expectedText: string) { + cy.get("[data-testid='Created after']").should("contain", expectedText); + } + verifyPatientCreatedBeforeDate(expectedText: string) { + cy.get("[data-testid='Created before']").should("contain", expectedText); + } + verifyPatientModifiedAfterDate(expectedText: string) { + cy.get("[data-testid='Modified after']").should("contain", expectedText); + } + verifyPatientModifiedBeforeDate(expectedText: string) { + cy.get("[data-testid='Modified before']").should("contain", expectedText); + } + verifyPatientAdmittedBeforeDate(expectedText: string) { + cy.get("[data-testid='Admitted before']").should("contain", expectedText); + } + verifyPatientAdmittedAfterDate(expectedText: string) { + cy.get("[data-testid='Admitted after']").should("contain", expectedText); + } } export default PatientHome; diff --git a/cypress/pageobject/Patient/PatientInsurance.ts b/cypress/pageobject/Patient/PatientInsurance.ts index bdd571e9d0c..1b91d27b629 100644 --- a/cypress/pageobject/Patient/PatientInsurance.ts +++ b/cypress/pageobject/Patient/PatientInsurance.ts @@ -47,11 +47,11 @@ class PatientInsurance { } verifyPatientPolicyDetails( - subscriberId, - policyId, - insurerId, - insurerName, - isHcxEnabled, + subscriberId: string, + policyId: string, + insurerId: string, + insurerName: string, + isHcxEnabled: string, ) { cy.get("[data-testid=patient-details]").then(($dashboard) => { cy.url().should("include", "/facility/"); diff --git a/cypress/pageobject/Patient/PatientLogupdate.ts b/cypress/pageobject/Patient/PatientLogupdate.ts index add3fbb0590..857fe7dd972 100644 --- a/cypress/pageobject/Patient/PatientLogupdate.ts +++ b/cypress/pageobject/Patient/PatientLogupdate.ts @@ -14,7 +14,7 @@ class PatientLogupdate { } selectBed(bed: string) { - cy.searchAndSelectOption("input[name='bed']", bed); + cy.typeAndSelectOption("input[name='bed']", bed); cy.get("#update-switchbed").click(); cy.wait(2000); } @@ -32,7 +32,7 @@ class PatientLogupdate { cy.get("#other_details").click().type(details); } - typeAndMultiSelectSymptoms(input, symptoms) { + typeAndMultiSelectSymptoms(input: string, symptoms: string[]) { cy.typeAndMultiSelectOption("#additional_symptoms", input, symptoms); } selectSymptomsDate(date: string) { @@ -43,27 +43,27 @@ class PatientLogupdate { } typeSystolic(systolic: string) { - cy.searchAndSelectOption("#systolic", systolic); + cy.typeAndSelectOption("#systolic", systolic); } typeDiastolic(diastolic: string) { - cy.searchAndSelectOption("#diastolic", diastolic); + cy.typeAndSelectOption("#diastolic", diastolic); } typePulse(pulse: string) { - cy.searchAndSelectOption("#pulse", pulse); + cy.typeAndSelectOption("#pulse", pulse); } typeTemperature(temperature: string) { - cy.searchAndSelectOption("#temperature", temperature); + cy.typeAndSelectOption("#temperature", temperature); } typeRespiratory(respiratory: string) { - cy.searchAndSelectOption("#resp", respiratory); + cy.typeAndSelectOption("#resp", respiratory); } typeSpo2(spo: string) { - cy.searchAndSelectOption("#ventilator_spo2", spo); + cy.typeAndSelectOption("#ventilator_spo2", spo); } selectRhythm(rhythm: string) { @@ -74,14 +74,14 @@ class PatientLogupdate { cy.get("#rhythm_detail").click().type(rhythm); } - clickLogUpdateViewDetails(element, patientCategory) { + clickLogUpdateViewDetails(element: string, patientCategory: string) { cy.get(element).scrollIntoView(); cy.verifyContentPresence(element, [patientCategory]); cy.get(element).first().contains("View Details").click(); cy.wait(3000); } - clickLogUpdateUpdateLog(element, patientCategory) { + clickLogUpdateUpdateLog(element: string, patientCategory: string) { cy.get(element).scrollIntoView(); cy.verifyContentPresence(element, [patientCategory]); cy.get(element).first().contains("Update Log").click(); @@ -93,7 +93,7 @@ class PatientLogupdate { cy.wait(3000); } - clickClearButtonInElement(elementId) { + clickClearButtonInElement(elementId: string) { cy.get(elementId).find("#clear-button").click(); } diff --git a/cypress/pageobject/Patient/PatientMedicalHistory.ts b/cypress/pageobject/Patient/PatientMedicalHistory.ts index a0dbdd0131a..93fdd1b38b3 100644 --- a/cypress/pageobject/Patient/PatientMedicalHistory.ts +++ b/cypress/pageobject/Patient/PatientMedicalHistory.ts @@ -11,7 +11,7 @@ class PatientMedicalHistory { cy.get("#allergies").click().type(allergies); } - typeMedicalHistory(index, text) { + typeMedicalHistory(index: number, text: string) { cy.get(`#medical_history_check_${index}`).click(); cy.get(`#medical_history_${index}`).click().type(text); } @@ -22,16 +22,16 @@ class PatientMedicalHistory { } verifyPatientMedicalDetails( - patientPresentHealth, - patientOngoingMedication, - patientAllergies, - patientSymptoms1, - patientSymptoms2, - patientSymptoms3, - patientSymptoms4, - patientSymptoms5, - patientSymptoms6, - patientSymptoms7, + patientPresentHealth: string, + patientOngoingMedication: string, + patientAllergies: string, + patientSymptoms1: string, + patientSymptoms2: string, + patientSymptoms3: string, + patientSymptoms4: string, + patientSymptoms5: string, + patientSymptoms6: string, + patientSymptoms7: string, ) { cy.get("[data-testid=patient-details]").then(($dashboard) => { cy.url().should("include", "/facility/"); diff --git a/cypress/pageobject/Patient/PatientPrescription.ts b/cypress/pageobject/Patient/PatientPrescription.ts index 403d361e55c..d801b360aba 100644 --- a/cypress/pageobject/Patient/PatientPrescription.ts +++ b/cypress/pageobject/Patient/PatientPrescription.ts @@ -16,7 +16,7 @@ export class PatientPrescription { } selectMedicine(medicine: string) { - cy.searchAndSelectOption( + cy.typeAndSelectOption( "div#medicine_object input[placeholder='Select'][role='combobox']", medicine, ); diff --git a/cypress/pageobject/Patient/PatientTreatmentPlan.ts b/cypress/pageobject/Patient/PatientTreatmentPlan.ts index 70af5604776..0bbddbf70bc 100644 --- a/cypress/pageobject/Patient/PatientTreatmentPlan.ts +++ b/cypress/pageobject/Patient/PatientTreatmentPlan.ts @@ -4,7 +4,7 @@ class PatientTreatmentPlan { } fillTreatingPhysican(doctor: string) { - cy.searchAndSelectOption("#treating_physician", doctor); + cy.typeAndSelectOption("#treating_physician", doctor); } selectReviewAfter(time: string) { @@ -20,7 +20,7 @@ class PatientTreatmentPlan { } assignTelemedicineDoctor(doctor: string) { - cy.searchAndSelectOption("#assigned_to", doctor); + cy.typeAndSelectOption("#assigned_to", doctor); } clickAddProcedure() { diff --git a/cypress/pageobject/Resource/ResourcePage.ts b/cypress/pageobject/Resource/ResourcePage.ts index e4078fcb317..730d3dd9148 100644 --- a/cypress/pageobject/Resource/ResourcePage.ts +++ b/cypress/pageobject/Resource/ResourcePage.ts @@ -4,9 +4,9 @@ class ResourcePage { cy.get("svg.care-svg-icon__baseline.care-l-export").each(($button) => { cy.intercept(/\/api\/v1\/resource/).as("resource_download"); cy.wrap($button).click({ force: true }); - cy.wait("@resource_download").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); + cy.wait("@resource_download") + .its("response.statusCode") + .should("eq", 200); }); } @@ -19,9 +19,7 @@ class ResourcePage { } verifyCompletedResources() { - cy.wait("@resource").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); + cy.wait("@resource").its("response.statusCode").should("eq", 200); cy.contains("button", "Active").should("have.class", "text-primary-500"); cy.contains("button", "Completed").should("have.class", "text-white"); } @@ -31,9 +29,7 @@ class ResourcePage { } verifyActiveResources() { - cy.wait("@resource").then((interception) => { - expect(interception.response.statusCode).to.equal(200); - }); + cy.wait("@resource").its("response.statusCode").should("eq", 200); cy.contains("button", "Active").should("have.class", "text-white"); cy.contains("button", "Completed").should("have.class", "text-primary-500"); } diff --git a/cypress/pageobject/Users/ManageUserPage.ts b/cypress/pageobject/Users/ManageUserPage.ts index f3e0deca53b..efa0d90142c 100644 --- a/cypress/pageobject/Users/ManageUserPage.ts +++ b/cypress/pageobject/Users/ManageUserPage.ts @@ -1,5 +1,5 @@ export class ManageUserPage { - assertHomeFacility(expectedText) { + assertHomeFacility(expectedText: string) { cy.get("#home_facility").should("contain.text", expectedText); } @@ -7,23 +7,23 @@ export class ManageUserPage { cy.get("#facilities").click(); } - selectFacilityFromDropdown(facilityName) { - cy.searchAndSelectOption("input[name='facility']", facilityName); + selectFacilityFromDropdown(facilityName: string) { + cy.typeAndSelectOption("input[name='facility']", facilityName); } - selectSkillFromDropdown(skill) { - cy.searchAndSelectOption("input[name='skill']", skill); + selectSkillFromDropdown(skill: string) { + cy.typeAndSelectOption("input[name='skill']", skill); } clickLinkFacility() { cy.get("#link-facility").click(); } - assertLinkedFacility(facilityName) { + assertLinkedFacility(facilityName: string) { cy.get("#linked-facility-list").should("contain.text", facilityName); } - assertnotLinkedFacility(facilityName) { + assertnotLinkedFacility(facilityName: string) { cy.get("#linked-facility-list").should("not.contain", facilityName); } @@ -31,11 +31,11 @@ export class ManageUserPage { cy.get("#linked-facility-list").should("not.exist"); } - assertHomeFacilitylink(facilityName) { + assertHomeFacilitylink(facilityName: string) { cy.get("#home-facility").should("contain.text", facilityName); } - assertFacilityNotInDropdown(facilityName) { + assertFacilityNotInDropdown(facilityName: string) { cy.get("input[name='facility']").click().type(facilityName); cy.get("[role='option']").should("not.exist"); } @@ -93,12 +93,12 @@ export class ManageUserPage { cy.visit("/facility"); } - typeFacilitySearch(facilityName) { + typeFacilitySearch(facilityName: string) { cy.get("#search").click().clear(); cy.get("#search").click().type(facilityName); } - assertFacilityInCard(facilityName) { + assertFacilityInCard(facilityName: string) { cy.get("#facility-name-card").should("contain", facilityName); } @@ -117,13 +117,13 @@ export class ManageUserPage { cy.wait("@getSkills").its("response.statusCode").should("eq", 200); } - assertSkillInAlreadyLinkedSkills(skillName) { + assertSkillInAlreadyLinkedSkills(skillName: string) { cy.get("#already-linked-skills") .contains(skillName) .should("have.length", 1); } - assertSkillIndoctorconnect(skillName) { + assertSkillIndoctorconnect(skillName: string) { cy.get("#doctor-connect-home-doctor") .contains(skillName) .should("have.length", 1); @@ -137,11 +137,11 @@ export class ManageUserPage { cy.get("#unlink-skill").click(); } - assertSkillInAddedUserSkills(skillName) { + assertSkillInAddedUserSkills(skillName: string) { cy.get("#added-user-skills").should("contain", skillName); } - assertDoctorConnectVisibility(realName) { + assertDoctorConnectVisibility(realName: string) { cy.get('*[id="doctor-connect-home-doctor"]').should( "contain.text", realName, diff --git a/cypress/pageobject/Users/UserSearch.ts b/cypress/pageobject/Users/UserSearch.ts index 0c214e92706..d72c00c0de7 100644 --- a/cypress/pageobject/Users/UserSearch.ts +++ b/cypress/pageobject/Users/UserSearch.ts @@ -53,11 +53,11 @@ export class UserPage { } selectState(state: string) { - cy.searchAndSelectOption("#state input", state); + cy.typeAndSelectOption("#state input", state); } selectDistrict(district: string) { - cy.searchAndSelectOption("#district input", district); + cy.typeAndSelectOption("#district input", district); } typeInPhoneNumber(phone: string) { @@ -69,7 +69,7 @@ export class UserPage { } selectHomeFacility(facility: string) { - cy.searchAndSelectOption("input[name='home_facility']", facility); + cy.typeAndSelectOption("input[name='home_facility']", facility); } applyFilter() { diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 86d048e5f41..da78361f6e8 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -38,8 +38,8 @@ Cypress.Commands.add("refreshApiLogin", (username, password) => { Cypress.Commands.add("loginByApi", (username, password) => { cy.log(`Logging in the user: ${username}:${password}`); cy.task("readFileMaybe", "cypress/fixtures/token.json").then( - (tkn: string) => { - const token = JSON.parse(tkn); + (tkn: unknown) => { + const token = JSON.parse(tkn as string); // Cast tkn to string if (tkn && token.access && token.username === username) { cy.request({ method: "POST", @@ -66,21 +66,6 @@ Cypress.Commands.add("loginByApi", (username, password) => { ); }); -Cypress.Commands.add( - "awaitUrl", - (url: string, disableLoginVerification = false) => { - cy.intercept(/getcurrentuser/).as("currentuser"); - cy.visit(url); - disableLoginVerification - ? cy.wait("@currentuser") - : cy.wait("@currentuser").its("response.statusCode").should("eq", 200); - }, -); - -Cypress.Commands.add("verifyNotification", (text) => { - return cy.get(".pnotify-container").should("exist").contains(text); -}); - Cypress.on("uncaught:exception", () => { // returning false here prevents Cypress from // failing the test @@ -94,19 +79,44 @@ Cypress.on("uncaught:exception", () => { * Waits until the selector finds an attached element, then yields it (wrapped). * selectorFn, if provided, is passed $(document). Don't use cy methods inside selectorFn. */ -Cypress.Commands.add("getAttached", (selector) => { +Cypress.Commands.add("getAttached", (selector: string) => { const getElement = - typeof selector === "function" ? selector : ($d) => $d.find(selector); - let $el = null; + typeof selector === "function" + ? selector + : ($d: JQuery) => + $d.find(selector) as unknown as JQuery; + + let $el: JQuery | null = null; + return cy .document() - .should(($d) => { + .should(($d: Document) => { $el = getElement(Cypress.$($d)); - expect(Cypress.dom.isDetached($el)).to.be.false; + // Ensure $el is an HTMLElement before checking if it is detached + if ($el.length && $el[0] instanceof HTMLElement) { + expect(Cypress.dom.isDetached($el[0])).to.be.false; // Access the first HTMLElement + } else { + throw new Error("Element is not an HTMLElement or is detached."); + } }) .then(() => cy.wrap($el)); }); +Cypress.Commands.add( + "awaitUrl", + (url: string, disableLoginVerification = false) => { + cy.intercept(/getcurrentuser/).as("currentuser"); + cy.visit(url); + disableLoginVerification + ? cy.wait("@currentuser") + : cy.wait("@currentuser").its("response.statusCode").should("eq", 200); + }, +); + +Cypress.Commands.add("verifyNotification", (text) => { + return cy.get(".pnotify-container").should("exist").contains(text); +}); + Cypress.Commands.add("clearAllFilters", () => { return cy.get("#clear-all-filters").click(); }); @@ -117,7 +127,7 @@ Cypress.Commands.add("submitButton", (buttonText = "Submit") => { }); Cypress.Commands.add( - "searchAndSelectOption", + "typeAndSelectOption", (element: string, referance: string) => { cy.get(element) .click() diff --git a/cypress/support/index.ts b/cypress/support/index.ts index d660246324f..b2895871872 100644 --- a/cypress/support/index.ts +++ b/cypress/support/index.ts @@ -15,7 +15,7 @@ declare global { getAttached(selector: string): Chainable; clearAllFilters(): Chainable; submitButton(buttonText?: string): Chainable; - searchAndSelectOption( + typeAndSelectOption( element: string, referance: string, ): Chainable; diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 9c019786170..114000b60f0 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,11 +1,10 @@ { "compilerOptions": { - "baseUrl": "../node_modules", + "baseUrl": "./", "target": "es5", "lib": ["es5", "dom", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020"], - "types": ["cypress"], "typeRoots": ["./support"], "resolveJsonModule": true }, - "include": ["**/*.ts", "support/commands.js"], -} + "include": ["**/*.cy.ts", "support/commands.ts","**/*.ts"], +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 603305e8dee..d642d476b22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@googlemaps/react-wrapper": "^1.1.35", "@googlemaps/typescript-guards": "^2.0.3", "@headlessui/react": "^2.1.2", + "@hello-pangea/dnd": "^17.0.0", "@pnotify/core": "^5.2.0", "@pnotify/mobile": "^5.2.0", "@radix-ui/react-icons": "^1.3.0", @@ -20,13 +21,14 @@ "@radix-ui/react-toast": "^1.2.2", "@sentry/browser": "^8.33.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", - "axios": "^1.7.7", "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", + "browserslist": "^4.24.0", "browserslist-useragent-regexp": "^4.1.3", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cross-env": "^7.0.3", + "cypress": "^13.14.2", "dayjs": "^1.11.11", "echarts": "^5.5.1", "echarts-for-react": "^3.0.2", @@ -41,9 +43,6 @@ "raviger": "^4.1.2", "react": "18.3.1", "react-copy-to-clipboard": "^5.1.0", - "react-dnd": "^16.0.1", - "react-dnd-html5-backend": "^16.0.1", - "react-dnd-scrolling": "^1.3.8", "react-dom": "18.3.1", "react-google-recaptcha": "^3.1.0", "react-i18next": "^15.0.2", @@ -61,7 +60,6 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.13", - "@types/cypress": "^1.1.3", "@types/events": "^3.0.3", "@types/google.maps": "^3.55.8", "@types/lodash-es": "^4.17.12", @@ -72,10 +70,10 @@ "@types/react-csv": "^1.1.10", "@types/react-dom": "^18.3.0", "@types/react-google-recaptcha": "^2.1.9", + "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^7.18.0", "@vitejs/plugin-react-swc": "^3.6.0", "autoprefixer": "^10.4.19", - "cypress": "^13.14.2", "cypress-localstorage-commands": "^2.2.5", "cypress-split": "^1.23.2", "eslint-config-prettier": "^9.1.0", @@ -185,9 +183,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.7.tgz", - "integrity": "sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", + "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", "dev": true, "license": "MIT", "engines": { @@ -195,9 +193,9 @@ } }, "node_modules/@babel/core": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.7.tgz", - "integrity": "sha512-yJ474Zv3cwiSOO9nXJuqzvwEeM+chDuQ8GJirw+pZ91sCGCyOZ3dJkVE09fTV0VEVzXyLWhh3G/AolYTPX7Mow==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", + "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", "dev": true, "license": "MIT", "dependencies": { @@ -207,10 +205,10 @@ "@babel/helper-compilation-targets": "^7.25.7", "@babel/helper-module-transforms": "^7.25.7", "@babel/helpers": "^7.25.7", - "@babel/parser": "^7.25.7", + "@babel/parser": "^7.25.8", "@babel/template": "^7.25.7", "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7", + "@babel/types": "^7.25.8", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -679,13 +677,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.7.tgz", - "integrity": "sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", + "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.25.7" + "@babel/types": "^7.25.8" }, "bin": { "parser": "bin/babel-parser.js" @@ -791,74 +789,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.25.7", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.7.tgz", @@ -891,32 +821,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-jsx": { "version": "7.25.7", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.7.tgz", @@ -933,116 +837,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", @@ -1077,15 +871,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.7.tgz", - "integrity": "sha512-4B6OhTrwYKHYYgcwErvZjbmH9X5TxQBsaBHdzEIB4l71gR5jh/tuHGlb9in47udL2+wVUcOz5XXhhfhVJwEpEg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.8.tgz", + "integrity": "sha512-9ypqkozyzpG+HxlH4o4gdctalFGIjjdufzo7I2XPda0iBnZ6a+FO0rIEQcdSPXp02CkvGsII1exJhmROPQd5oA==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.7", "@babel/helper-remap-async-to-generator": "^7.25.7", - "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/traverse": "^7.25.7" }, "engines": { @@ -1163,15 +956,14 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.7.tgz", - "integrity": "sha512-rvUUtoVlkDWtDWxGAiiQj0aNktTPn3eFynBcMC2IhsXweehwgdI9ODe+XjWw515kEmv22sSOTp/rxIRuTiB7zg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.8.tgz", + "integrity": "sha512-e82gl3TCorath6YLf9xUwFehVvjvfqFhdOo4+0iVIVju+6XOi5XHkqB3P2AXnSwoeTX0HBoXq5gJFtvotJzFnQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1295,14 +1087,13 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.7.tgz", - "integrity": "sha512-UvcLuual4h7/GfylKm2IAA3aph9rwvAM2XBA0uPKU3lca+Maai4jBjjEVUS568ld6kJcgbouuumCBhMd/Yz17w==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.8.tgz", + "integrity": "sha512-gznWY+mr4ZQL/EWPcbBQUP3BXS5FwZp8RUOw06BaRn8tQLzN4XLIxXejpHN9Qo8x8jjBmAAKp6FoS51AgkSA/A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1329,14 +1120,13 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.7.tgz", - "integrity": "sha512-h3MDAP5l34NQkkNulsTNyjdaR+OiB0Im67VU//sFupouP8Q6m9Spy7l66DcaAQxtmCqGdanPByLsnwFttxKISQ==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.8.tgz", + "integrity": "sha512-sPtYrduWINTQTW7FtOy99VCTWp4H23UX7vYcut7S4CIMEXU+54zKX9uCoGkLsWXteyaMXzVHgzWbLfQ1w4GZgw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1381,14 +1171,13 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.7.tgz", - "integrity": "sha512-Ot43PrL9TEAiCe8C/2erAjXMeVSnE/BLEx6eyrKLNFCCw5jvhTHKyHxdI1pA0kz5njZRYAnMO2KObGqOCRDYSA==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.8.tgz", + "integrity": "sha512-4OMNv7eHTmJ2YXs3tvxAfa/I43di+VcF+M4Wt66c88EAED1RoGaf1D64cL5FkRpNL+Vx9Hds84lksWvd/wMIdA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1414,14 +1203,13 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.7.tgz", - "integrity": "sha512-iImzbA55BjiovLyG2bggWS+V+OLkaBorNvc/yJoeeDQGztknRnDdYfp2d/UPmunZYEnZi6Lg8QcTmNMHOB0lGA==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.8.tgz", + "integrity": "sha512-f5W0AhSbbI+yY6VakT04jmxdxz+WsID0neG7+kQZbCOjuyJNdL5Nn4WIBm4hRpKnUcO9lP0eipUhFN12JpoH8g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1551,14 +1339,13 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.7.tgz", - "integrity": "sha512-FbuJ63/4LEL32mIxrxwYaqjJxpbzxPVQj5a+Ebrc8JICV6YX8nE53jY+K0RZT3um56GoNWgkS2BQ/uLGTjtwfw==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.8.tgz", + "integrity": "sha512-Z7WJJWdQc8yCWgAmjI3hyC+5PXIubH9yRKzkl9ZEG647O9szl9zvmKLzpbItlijBnVhTUf1cpyWBsZ3+2wjWPQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1568,14 +1355,13 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.7.tgz", - "integrity": "sha512-8CbutzSSh4hmD+jJHIA8vdTNk15kAzOnFLVVgBSMGr28rt85ouT01/rezMecks9pkU939wDInImwCKv4ahU4IA==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.8.tgz", + "integrity": "sha512-rm9a5iEFPS4iMIy+/A/PiS0QN0UyjPIeVvbU5EMZFKJZHt8vQnasbpo3T3EFcxzCeYO0BHfc4RqooCZc51J86Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1585,15 +1371,14 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.7.tgz", - "integrity": "sha512-1JdVKPhD7Y5PvgfFy0Mv2brdrolzpzSoUq2pr6xsR+m+3viGGeHEokFKsCgOkbeFOQxfB1Vt2F0cPJLRpFI4Zg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.8.tgz", + "integrity": "sha512-LkUu0O2hnUKHKE7/zYOIjByMa4VRaV2CD/cdGz0AxU9we+VA3kDDggKEzI0Oz1IroG+6gUP6UmWEHBMWZU316g==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.25.7", "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-transform-parameters": "^7.25.7" }, "engines": { @@ -1621,14 +1406,13 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.7.tgz", - "integrity": "sha512-m9obYBA39mDPN7lJzD5WkGGb0GO54PPLXsbcnj1Hyeu8mSRz7Gb4b1A6zxNX32ZuUySDK4G6it8SDFWD1nCnqg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.8.tgz", + "integrity": "sha512-EbQYweoMAHOn7iJ9GgZo14ghhb9tTjgOc88xFgYngifx7Z9u580cENCV159M4xDh3q/irbhSjZVpuhpC2gKBbg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1638,15 +1422,14 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.7.tgz", - "integrity": "sha512-h39agClImgPWg4H8mYVAbD1qP9vClFbEjqoJmt87Zen8pjqK8FTPUwrOXAvqu5soytwxrLMd2fx2KSCp2CHcNg==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.8.tgz", + "integrity": "sha512-q05Bk7gXOxpTHoQ8RSzGSh/LHVB9JEIkKnk3myAWwZHnYiTGYtbdrYkIsS8Xyh4ltKf7GNUSgzs/6P2bJtBAQg==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1689,16 +1472,15 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.7.tgz", - "integrity": "sha512-LzA5ESzBy7tqj00Yjey9yWfs3FKy4EmJyKOSWld144OxkTji81WWnUT8nkLUn+imN/zHL8ZQlOu/MTUAhHaX3g==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.8.tgz", + "integrity": "sha512-8Uh966svuB4V8RHHg0QJOB32QK287NBksJOByoKmHMp1TAobNniNalIkI2i5IPj5+S9NYCG4VIjbEuiSN8r+ow==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.7", "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -1905,13 +1687,13 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.7.tgz", - "integrity": "sha512-Gibz4OUdyNqqLj+7OAvBZxOD7CklCtMA5/j0JgUEwOnaRULsPDXmic2iKxL2DX2vQduPR5wH2hjZas/Vr/Oc0g==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.25.8.tgz", + "integrity": "sha512-58T2yulDHMN8YMUxiLq5YmWUnlDCyY1FsHM+v12VMx+1/FlrUj5tY50iDCpofFQEM8fMYOaY9YRvym2jcjn1Dg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.7", + "@babel/compat-data": "^7.25.8", "@babel/helper-compilation-targets": "^7.25.7", "@babel/helper-plugin-utils": "^7.25.7", "@babel/helper-validator-option": "^7.25.7", @@ -1921,45 +1703,30 @@ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.7", "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-import-assertions": "^7.25.7", "@babel/plugin-syntax-import-attributes": "^7.25.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.25.7", - "@babel/plugin-transform-async-generator-functions": "^7.25.7", + "@babel/plugin-transform-async-generator-functions": "^7.25.8", "@babel/plugin-transform-async-to-generator": "^7.25.7", "@babel/plugin-transform-block-scoped-functions": "^7.25.7", "@babel/plugin-transform-block-scoping": "^7.25.7", "@babel/plugin-transform-class-properties": "^7.25.7", - "@babel/plugin-transform-class-static-block": "^7.25.7", + "@babel/plugin-transform-class-static-block": "^7.25.8", "@babel/plugin-transform-classes": "^7.25.7", "@babel/plugin-transform-computed-properties": "^7.25.7", "@babel/plugin-transform-destructuring": "^7.25.7", "@babel/plugin-transform-dotall-regex": "^7.25.7", "@babel/plugin-transform-duplicate-keys": "^7.25.7", "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.7", - "@babel/plugin-transform-dynamic-import": "^7.25.7", + "@babel/plugin-transform-dynamic-import": "^7.25.8", "@babel/plugin-transform-exponentiation-operator": "^7.25.7", - "@babel/plugin-transform-export-namespace-from": "^7.25.7", + "@babel/plugin-transform-export-namespace-from": "^7.25.8", "@babel/plugin-transform-for-of": "^7.25.7", "@babel/plugin-transform-function-name": "^7.25.7", - "@babel/plugin-transform-json-strings": "^7.25.7", + "@babel/plugin-transform-json-strings": "^7.25.8", "@babel/plugin-transform-literals": "^7.25.7", - "@babel/plugin-transform-logical-assignment-operators": "^7.25.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.8", "@babel/plugin-transform-member-expression-literals": "^7.25.7", "@babel/plugin-transform-modules-amd": "^7.25.7", "@babel/plugin-transform-modules-commonjs": "^7.25.7", @@ -1967,15 +1734,15 @@ "@babel/plugin-transform-modules-umd": "^7.25.7", "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.7", "@babel/plugin-transform-new-target": "^7.25.7", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.7", - "@babel/plugin-transform-numeric-separator": "^7.25.7", - "@babel/plugin-transform-object-rest-spread": "^7.25.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.8", + "@babel/plugin-transform-numeric-separator": "^7.25.8", + "@babel/plugin-transform-object-rest-spread": "^7.25.8", "@babel/plugin-transform-object-super": "^7.25.7", - "@babel/plugin-transform-optional-catch-binding": "^7.25.7", - "@babel/plugin-transform-optional-chaining": "^7.25.7", + "@babel/plugin-transform-optional-catch-binding": "^7.25.8", + "@babel/plugin-transform-optional-chaining": "^7.25.8", "@babel/plugin-transform-parameters": "^7.25.7", "@babel/plugin-transform-private-methods": "^7.25.7", - "@babel/plugin-transform-private-property-in-object": "^7.25.7", + "@babel/plugin-transform-private-property-in-object": "^7.25.8", "@babel/plugin-transform-property-literals": "^7.25.7", "@babel/plugin-transform-regenerator": "^7.25.7", "@babel/plugin-transform-reserved-words": "^7.25.7", @@ -2084,9 +1851,9 @@ } }, "node_modules/@babel/types": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.7.tgz", - "integrity": "sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", + "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", "dev": true, "license": "MIT", "dependencies": { @@ -2102,7 +1869,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "dev": true, "license": "MIT", "optional": true, "engines": { @@ -2113,7 +1879,6 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.5.tgz", "integrity": "sha512-v+XHd9XmWbufxF1/bTaVm2yhbxY+TB4YtWRqF2zaXBlDNMkls34KiATz0AVDLavL3iB6bQk9/7n3oY1EoLSWGA==", - "dev": true, "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", @@ -2143,7 +1908,6 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, "license": "MIT", "bin": { "uuid": "dist/bin/uuid" @@ -2153,7 +1917,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", - "dev": true, "license": "MIT", "dependencies": { "debug": "^3.1.0", @@ -2164,7 +1927,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.1" @@ -2710,9 +2472,9 @@ } }, "node_modules/@floating-ui/react": { - "version": "0.26.24", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.24.tgz", - "integrity": "sha512-2ly0pCkZIGEQUq5H8bBK0XJmc1xIK/RM3tvVzY3GBER7IOD1UgmC2Y2tjj4AuS+TC+vTE1KJv2053290jua0Sw==", + "version": "0.26.25", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.25.tgz", + "integrity": "sha512-hZOmgN0NTOzOuZxI1oIrDu3Gcl8WViIkvPMpB4xdd4QD6xAMtwgwr3VPoiyH/bLtRcS1cDnhxLSD1NsMJmwh/A==", "license": "MIT", "dependencies": { "@floating-ui/react-dom": "^2.1.2", @@ -2774,9 +2536,9 @@ "license": "Apache-2.0" }, "node_modules/@headlessui/react": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.1.9.tgz", - "integrity": "sha512-ckWw7vlKtnoa1fL2X0fx1a3t/Li9MIKDVXn3SgG65YlxvDAsNrY39PPCxVM7sQRA7go2fJsuHSSauKFNaJHH7A==", + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.1.10.tgz", + "integrity": "sha512-6mLa2fjMDAFQi+/R10B+zU3edsUk/MDtENB2zHho0lqKU1uzhAfJLUduWds4nCo8wbl3vULtC5rJfZAQ1yqIng==", "license": "MIT", "dependencies": { "@floating-ui/react": "^0.26.16", @@ -2792,6 +2554,25 @@ "react-dom": "^18" } }, + "node_modules/@hello-pangea/dnd": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@hello-pangea/dnd/-/dnd-17.0.0.tgz", + "integrity": "sha512-LDDPOix/5N0j5QZxubiW9T0M0+1PR0rTDWeZF5pu1Tz91UQnuVK4qQ/EjY83Qm2QeX0eM8qDXANfDh3VVqtR4Q==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime": "^7.25.6", + "css-box-model": "^1.2.1", + "memoize-one": "^6.0.0", + "raf-schd": "^4.0.3", + "react-redux": "^9.1.2", + "redux": "^5.0.1", + "use-memo-one": "^1.1.3" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -3756,12 +3537,12 @@ } }, "node_modules/@react-aria/focus": { - "version": "3.18.3", - "resolved": "https://registry.npmjs.org/@react-aria/focus/-/focus-3.18.3.tgz", - "integrity": "sha512-WKUElg+5zS0D3xlVn8MntNnkzJql2J6MuzAMP8Sv5WTgFDse/XGR842dsxPTIyKKdrWVCRegCuwa4m3n/GzgJw==", + "version": "3.18.4", + "resolved": "https://registry.npmjs.org/@react-aria/focus/-/focus-3.18.4.tgz", + "integrity": "sha512-91J35077w9UNaMK1cpMUEFRkNNz0uZjnSwiyBCFuRdaVuivO53wNC9XtWSDNDdcO5cGy87vfJRVAiyoCn/mjqA==", "license": "Apache-2.0", "dependencies": { - "@react-aria/interactions": "^3.22.3", + "@react-aria/interactions": "^3.22.4", "@react-aria/utils": "^3.25.3", "@react-types/shared": "^3.25.0", "@swc/helpers": "^0.5.0", @@ -3772,9 +3553,9 @@ } }, "node_modules/@react-aria/interactions": { - "version": "3.22.3", - "resolved": "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.22.3.tgz", - "integrity": "sha512-RRUb/aG+P0IKTIWikY/SylB6bIbLZeztnZY2vbe7RAG5MgVaCgn5HQ45SI15GlTmhsFG8CnF6slJsUFJiNHpbQ==", + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.22.4.tgz", + "integrity": "sha512-E0vsgtpItmknq/MJELqYJwib+YN18Qag8nroqwjk1qOnBa9ROIkUhWJerLi1qs5diXq9LHKehZDXRlwPvdEFww==", "license": "Apache-2.0", "dependencies": { "@react-aria/ssr": "^3.9.6", @@ -3817,24 +3598,6 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" } }, - "node_modules/@react-dnd/asap": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-5.0.2.tgz", - "integrity": "sha512-WLyfoHvxhs0V9U+GTsGilGgf2QsPl6ZZ44fnv0/b8T3nQyvzxidxsg/ZltbWssbsRDlYW8UKSQMTGotuTotZ6A==", - "license": "MIT" - }, - "node_modules/@react-dnd/invariant": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-4.0.2.tgz", - "integrity": "sha512-xKCTqAK/FFauOM9Ta2pswIyT3D8AQlfrYdOi/toTPEhqCuAs1v5tcJ3Y08Izh1cJ5Jchwy9SeAXmMg6zrKs2iw==", - "license": "MIT" - }, - "node_modules/@react-dnd/shallowequal": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-4.0.2.tgz", - "integrity": "sha512-/RVXdLvJxLg4QKvMoM5WlwNR9ViO9z8B/qPcc+C0Sa/teJY7QG7kJ441DwzOjMYEY7GmU4dj5EcGHIkKZiQZCA==", - "license": "MIT" - }, "node_modules/@react-stately/utils": { "version": "3.10.4", "resolved": "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.4.tgz", @@ -4170,96 +3933,96 @@ ] }, "node_modules/@sentry-internal/browser-utils": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.33.1.tgz", - "integrity": "sha512-TW6/r+Gl5jiXv54iK1xZ3mlVgTS/jaBp4vcQ0xGMdgiQ3WchEPcFSeYovL+YHT3tSud0GZqVtDQCz+5i76puqA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.34.0.tgz", + "integrity": "sha512-4AcYOzPzD1tL5eSRQ/GpKv5enquZf4dMVUez99/Bh3va8qiJrNP55AcM7UzZ7WZLTqKygIYruJTU5Zu2SpEAPQ==", "license": "MIT", "dependencies": { - "@sentry/core": "8.33.1", - "@sentry/types": "8.33.1", - "@sentry/utils": "8.33.1" + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.33.1.tgz", - "integrity": "sha512-qauMRTm3qDaLqZ3ibI03cj4gLF40y0ij65nj+cns6iWxGCtPrO8tjvXFWuQsE7Aye9dGMnBgmv7uN+NTUtC3RA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.34.0.tgz", + "integrity": "sha512-aYSM2KPUs0FLPxxbJCFSwCYG70VMzlT04xepD1Y/tTlPPOja/02tSv2tyOdZbv8Uw7xslZs3/8Lhj74oYcTBxw==", "license": "MIT", "dependencies": { - "@sentry/core": "8.33.1", - "@sentry/types": "8.33.1", - "@sentry/utils": "8.33.1" + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.33.1.tgz", - "integrity": "sha512-fm4coIOjmanU29NOVN9MyaP4fUCOYytbtFqVSKRFNZQ/xAgNeySiBIbUd6IjujMmnOk9bY0WEUMcdm3Uotjdog==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.34.0.tgz", + "integrity": "sha512-EoMh9NYljNewZK1quY23YILgtNdGgrkzJ9TPsj6jXUG0LZ0Q7N7eFWd0xOEDBvFxrmI3cSXF1i4d1sBb+eyKRw==", "license": "MIT", "dependencies": { - "@sentry-internal/browser-utils": "8.33.1", - "@sentry/core": "8.33.1", - "@sentry/types": "8.33.1", - "@sentry/utils": "8.33.1" + "@sentry-internal/browser-utils": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.33.1.tgz", - "integrity": "sha512-nsxTFTPCT10Ty/v6+AiST3+yotGP1sUb8xqfKB9fPnS1hZHFryp0NnEls7xFjBsBbZPU1GpFkzrk/E6JFzixDQ==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.34.0.tgz", + "integrity": "sha512-x8KhZcCDpbKHqFOykYXiamX6x0LRxv6N1OJHoH+XCrMtiDBZr4Yo30d/MaS6rjmKGMtSRij30v+Uq+YWIgxUrg==", "license": "MIT", "dependencies": { - "@sentry-internal/replay": "8.33.1", - "@sentry/core": "8.33.1", - "@sentry/types": "8.33.1", - "@sentry/utils": "8.33.1" + "@sentry-internal/replay": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/tracing": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.119.1.tgz", - "integrity": "sha512-cI0YraPd6qBwvUA3wQdPGTy8PzAoK0NZiaTN1LM3IczdPegehWOaEG5GVTnpGnTsmBAzn1xnBXNBhgiU4dgcrQ==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.119.2.tgz", + "integrity": "sha512-V2W+STWrafyGJhQv3ulMFXYDwWHiU6wHQAQBShsHVACiFaDrJ2kPRet38FKv4dMLlLlP2xN+ss2e5zv3tYlTiQ==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/core": "7.119.1", - "@sentry/types": "7.119.1", - "@sentry/utils": "7.119.1" + "@sentry/core": "7.119.2", + "@sentry/types": "7.119.2", + "@sentry/utils": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry-internal/tracing/node_modules/@sentry/core": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.119.1.tgz", - "integrity": "sha512-YUNnH7O7paVd+UmpArWCPH4Phlb5LwrkWVqzFWqL3xPyCcTSof2RL8UmvpkTjgYJjJ+NDfq5mPFkqv3aOEn5Sw==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.119.2.tgz", + "integrity": "sha512-hQr3d2yWq/2lMvoyBPOwXw1IHqTrCjOsU1vYKhAa6w9vGbJZFGhKGGE2KEi/92c3gqGn+gW/PC7cV6waCTDuVA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/types": "7.119.1", - "@sentry/utils": "7.119.1" + "@sentry/types": "7.119.2", + "@sentry/utils": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry-internal/tracing/node_modules/@sentry/types": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.119.1.tgz", - "integrity": "sha512-4G2mcZNnYzK3pa2PuTq+M2GcwBRY/yy1rF+HfZU+LAPZr98nzq2X3+mJHNJoobeHRkvVh7YZMPi4ogXiIS5VNQ==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.119.2.tgz", + "integrity": "sha512-ydq1tWsdG7QW+yFaTp0gFaowMLNVikIqM70wxWNK+u98QzKnVY/3XTixxNLsUtnAB4Y+isAzFhrc6Vb5GFdFeg==", "dev": true, "license": "MIT", "engines": { @@ -4267,59 +4030,59 @@ } }, "node_modules/@sentry-internal/tracing/node_modules/@sentry/utils": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.119.1.tgz", - "integrity": "sha512-ju/Cvyeu/vkfC5/XBV30UNet5kLEicZmXSyuLwZu95hEbL+foPdxN+re7pCI/eNqfe3B2vz7lvz5afLVOlQ2Hg==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.119.2.tgz", + "integrity": "sha512-TLdUCvcNgzKP0r9YD7tgCL1PEUp42TObISridsPJ5rhpVGQJvpr+Six0zIkfDUxerLYWZoK8QMm9KgFlPLNQzA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/types": "7.119.1" + "@sentry/types": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/browser": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.33.1.tgz", - "integrity": "sha512-c6zI/igexkLwZuGk+u8Rj26ChjxGgkhe6ZbKFsXCYaKAp5ep5X7HQRkkqgbxApiqlC0LduHdd/ymzh139JLg8w==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.34.0.tgz", + "integrity": "sha512-3HHG2NXxzHq1lVmDy2uRjYjGNf9NsJsTPlOC70vbQdOb+S49EdH/XMPy+J3ruIoyv6Cu0LwvA6bMOM6rHZOgNQ==", "license": "MIT", "dependencies": { - "@sentry-internal/browser-utils": "8.33.1", - "@sentry-internal/feedback": "8.33.1", - "@sentry-internal/replay": "8.33.1", - "@sentry-internal/replay-canvas": "8.33.1", - "@sentry/core": "8.33.1", - "@sentry/types": "8.33.1", - "@sentry/utils": "8.33.1" + "@sentry-internal/browser-utils": "8.34.0", + "@sentry-internal/feedback": "8.34.0", + "@sentry-internal/replay": "8.34.0", + "@sentry-internal/replay-canvas": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/core": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.33.1.tgz", - "integrity": "sha512-3SS41suXLFzxL3OQvTMZ6q92ZapELVq2l2SoWlZopcamWhog2Ru0dp2vkunq97kFHb2TzKRTlFH4+4gbT8SJug==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.34.0.tgz", + "integrity": "sha512-adrXCTK/zsg5pJ67lgtZqdqHvyx6etMjQW3P82NgWdj83c8fb+zH+K79Z47pD4zQjX0ou2Ws5nwwi4wJbz4bfA==", "license": "MIT", "dependencies": { - "@sentry/types": "8.33.1", - "@sentry/utils": "8.33.1" + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/integrations": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.119.1.tgz", - "integrity": "sha512-CGmLEPnaBqbUleVqrmGYjRjf5/OwjUXo57I9t0KKWViq81mWnYhaUhRZWFNoCNQHns+3+GPCOMvl0zlawt+evw==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.119.2.tgz", + "integrity": "sha512-dCuXKvbUE3gXVVa696SYMjlhSP6CxpMH/gl4Jk26naEB8Xjsn98z/hqEoXLg6Nab73rjR9c/9AdKqBbwVMHyrQ==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/core": "7.119.1", - "@sentry/types": "7.119.1", - "@sentry/utils": "7.119.1", + "@sentry/core": "7.119.2", + "@sentry/types": "7.119.2", + "@sentry/utils": "7.119.2", "localforage": "^1.8.1" }, "engines": { @@ -4327,23 +4090,23 @@ } }, "node_modules/@sentry/integrations/node_modules/@sentry/core": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.119.1.tgz", - "integrity": "sha512-YUNnH7O7paVd+UmpArWCPH4Phlb5LwrkWVqzFWqL3xPyCcTSof2RL8UmvpkTjgYJjJ+NDfq5mPFkqv3aOEn5Sw==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.119.2.tgz", + "integrity": "sha512-hQr3d2yWq/2lMvoyBPOwXw1IHqTrCjOsU1vYKhAa6w9vGbJZFGhKGGE2KEi/92c3gqGn+gW/PC7cV6waCTDuVA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/types": "7.119.1", - "@sentry/utils": "7.119.1" + "@sentry/types": "7.119.2", + "@sentry/utils": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/integrations/node_modules/@sentry/types": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.119.1.tgz", - "integrity": "sha512-4G2mcZNnYzK3pa2PuTq+M2GcwBRY/yy1rF+HfZU+LAPZr98nzq2X3+mJHNJoobeHRkvVh7YZMPi4ogXiIS5VNQ==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.119.2.tgz", + "integrity": "sha512-ydq1tWsdG7QW+yFaTp0gFaowMLNVikIqM70wxWNK+u98QzKnVY/3XTixxNLsUtnAB4Y+isAzFhrc6Vb5GFdFeg==", "dev": true, "license": "MIT", "engines": { @@ -4351,53 +4114,53 @@ } }, "node_modules/@sentry/integrations/node_modules/@sentry/utils": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.119.1.tgz", - "integrity": "sha512-ju/Cvyeu/vkfC5/XBV30UNet5kLEicZmXSyuLwZu95hEbL+foPdxN+re7pCI/eNqfe3B2vz7lvz5afLVOlQ2Hg==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.119.2.tgz", + "integrity": "sha512-TLdUCvcNgzKP0r9YD7tgCL1PEUp42TObISridsPJ5rhpVGQJvpr+Six0zIkfDUxerLYWZoK8QMm9KgFlPLNQzA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/types": "7.119.1" + "@sentry/types": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/node": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.119.1.tgz", - "integrity": "sha512-rpnoQCMxWh/ccjOe+qsmvXAdlTxQHXEWdaltSxnwj7QY+kOGKGP18WTQFLq/gdOBRw9aa6PEQGwhnLfhBXXaYg==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.119.2.tgz", + "integrity": "sha512-TPNnqxh+Myooe4jTyRiXrzrM2SH08R4+nrmBls4T7lKp2E5R/3mDSe/YTn5rRcUt1k1hPx1NgO/taG0DoS5cXA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry-internal/tracing": "7.119.1", - "@sentry/core": "7.119.1", - "@sentry/integrations": "7.119.1", - "@sentry/types": "7.119.1", - "@sentry/utils": "7.119.1" + "@sentry-internal/tracing": "7.119.2", + "@sentry/core": "7.119.2", + "@sentry/integrations": "7.119.2", + "@sentry/types": "7.119.2", + "@sentry/utils": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/node/node_modules/@sentry/core": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.119.1.tgz", - "integrity": "sha512-YUNnH7O7paVd+UmpArWCPH4Phlb5LwrkWVqzFWqL3xPyCcTSof2RL8UmvpkTjgYJjJ+NDfq5mPFkqv3aOEn5Sw==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.119.2.tgz", + "integrity": "sha512-hQr3d2yWq/2lMvoyBPOwXw1IHqTrCjOsU1vYKhAa6w9vGbJZFGhKGGE2KEi/92c3gqGn+gW/PC7cV6waCTDuVA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/types": "7.119.1", - "@sentry/utils": "7.119.1" + "@sentry/types": "7.119.2", + "@sentry/utils": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/node/node_modules/@sentry/types": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.119.1.tgz", - "integrity": "sha512-4G2mcZNnYzK3pa2PuTq+M2GcwBRY/yy1rF+HfZU+LAPZr98nzq2X3+mJHNJoobeHRkvVh7YZMPi4ogXiIS5VNQ==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.119.2.tgz", + "integrity": "sha512-ydq1tWsdG7QW+yFaTp0gFaowMLNVikIqM70wxWNK+u98QzKnVY/3XTixxNLsUtnAB4Y+isAzFhrc6Vb5GFdFeg==", "dev": true, "license": "MIT", "engines": { @@ -4405,34 +4168,34 @@ } }, "node_modules/@sentry/node/node_modules/@sentry/utils": { - "version": "7.119.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.119.1.tgz", - "integrity": "sha512-ju/Cvyeu/vkfC5/XBV30UNet5kLEicZmXSyuLwZu95hEbL+foPdxN+re7pCI/eNqfe3B2vz7lvz5afLVOlQ2Hg==", + "version": "7.119.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.119.2.tgz", + "integrity": "sha512-TLdUCvcNgzKP0r9YD7tgCL1PEUp42TObISridsPJ5rhpVGQJvpr+Six0zIkfDUxerLYWZoK8QMm9KgFlPLNQzA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/types": "7.119.1" + "@sentry/types": "7.119.2" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/types": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.33.1.tgz", - "integrity": "sha512-GjoAMvwtpIemoF/IiwZ7A60g4nQv3qwzR21GvJqDVUoKD0e8pv9OLX+HyXoUat4wEDGSuDUcUyUKD2G+od73QA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.34.0.tgz", + "integrity": "sha512-zLRc60CzohGCo6zNsNeQ9JF3SiEeRE4aDCP9fDDdIVCOKovS+mn1rtSip0qd0Vp2fidOu0+2yY0ALCz1A3PJSQ==", "license": "MIT", "engines": { "node": ">=14.18" } }, "node_modules/@sentry/utils": { - "version": "8.33.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.33.1.tgz", - "integrity": "sha512-uzuYpiiJuFY3N4WNHMBWUQX5oNv2t/TbG0OHRp3Rr7yeu+HSfD542TIp9/gMZ+G0Cxd8AmVO3wkKIFbk0TL4Qg==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.34.0.tgz", + "integrity": "sha512-W1KoRlFUjprlh3t86DZPFxLfM6mzjRzshVfMY7vRlJFymBelJsnJ3A1lPeBZM9nCraOSiw6GtOWu6k5BAkiGIg==", "license": "MIT", "dependencies": { - "@sentry/types": "8.33.1" + "@sentry/types": "8.34.0" }, "engines": { "node": ">=14.18" @@ -4462,15 +4225,15 @@ } }, "node_modules/@swc/core": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.26.tgz", - "integrity": "sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.35.tgz", + "integrity": "sha512-3cUteCTbr2r5jqfgx0r091sfq5Mgh6F1SQh8XAOnSvtKzwv2bC31mvBHVAieD1uPa2kHJhLav20DQgXOhpEitw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.12" + "@swc/types": "^0.1.13" }, "engines": { "node": ">=10" @@ -4480,16 +4243,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.7.26", - "@swc/core-darwin-x64": "1.7.26", - "@swc/core-linux-arm-gnueabihf": "1.7.26", - "@swc/core-linux-arm64-gnu": "1.7.26", - "@swc/core-linux-arm64-musl": "1.7.26", - "@swc/core-linux-x64-gnu": "1.7.26", - "@swc/core-linux-x64-musl": "1.7.26", - "@swc/core-win32-arm64-msvc": "1.7.26", - "@swc/core-win32-ia32-msvc": "1.7.26", - "@swc/core-win32-x64-msvc": "1.7.26" + "@swc/core-darwin-arm64": "1.7.35", + "@swc/core-darwin-x64": "1.7.35", + "@swc/core-linux-arm-gnueabihf": "1.7.35", + "@swc/core-linux-arm64-gnu": "1.7.35", + "@swc/core-linux-arm64-musl": "1.7.35", + "@swc/core-linux-x64-gnu": "1.7.35", + "@swc/core-linux-x64-musl": "1.7.35", + "@swc/core-win32-arm64-msvc": "1.7.35", + "@swc/core-win32-ia32-msvc": "1.7.35", + "@swc/core-win32-x64-msvc": "1.7.35" }, "peerDependencies": { "@swc/helpers": "*" @@ -4501,9 +4264,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz", - "integrity": "sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.35.tgz", + "integrity": "sha512-BQSSozVxjxS+SVQz6e3GC/+OBWGIK3jfe52pWdANmycdjF3ch7lrCKTHTU7eHwyoJ96mofszPf5AsiVJF34Fwg==", "cpu": [ "arm64" ], @@ -4518,9 +4281,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz", - "integrity": "sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.35.tgz", + "integrity": "sha512-44TYdKN/EWtkU88foXR7IGki9JzhEJzaFOoPevfi9Xe7hjAD/x2+AJOWWqQNzDPMz9+QewLdUVLyR6s5okRgtg==", "cpu": [ "x64" ], @@ -4535,9 +4298,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz", - "integrity": "sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.35.tgz", + "integrity": "sha512-ccfA5h3zxwioD+/z/AmYtkwtKz9m4rWTV7RoHq6Jfsb0cXHrd6tbcvgqRWXra1kASlE+cDWsMtEZygs9dJRtUQ==", "cpu": [ "arm" ], @@ -4552,9 +4315,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz", - "integrity": "sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.35.tgz", + "integrity": "sha512-hx65Qz+G4iG/IVtxJKewC5SJdki8PAPFGl6gC/57Jb0+jA4BIoGLD/J3Q3rCPeoHfdqpkCYpahtyUq8CKx41Jg==", "cpu": [ "arm64" ], @@ -4569,9 +4332,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz", - "integrity": "sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.35.tgz", + "integrity": "sha512-kL6tQL9No7UEoEvDRuPxzPTpxrvbwYteNRbdChSSP74j13/55G2/2hLmult5yFFaWuyoyU/2lvzjRL/i8OLZxg==", "cpu": [ "arm64" ], @@ -4586,9 +4349,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz", - "integrity": "sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.35.tgz", + "integrity": "sha512-Ke4rcLQSwCQ2LHdJX1FtnqmYNQ3IX6BddKlUtS7mcK13IHkQzZWp0Dcu6MgNA3twzb/dBpKX5GLy07XdGgfmyw==", "cpu": [ "x64" ], @@ -4603,9 +4366,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz", - "integrity": "sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.35.tgz", + "integrity": "sha512-T30tlLnz0kYyDFyO5RQF5EQ4ENjW9+b56hEGgFUYmfhFhGA4E4V67iEx7KIG4u0whdPG7oy3qjyyIeTb7nElEw==", "cpu": [ "x64" ], @@ -4620,9 +4383,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz", - "integrity": "sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.35.tgz", + "integrity": "sha512-CfM/k8mvtuMyX+okRhemfLt784PLS0KF7Q9djA8/Dtavk0L5Ghnq+XsGltO3d8B8+XZ7YOITsB14CrjehzeHsg==", "cpu": [ "arm64" ], @@ -4637,9 +4400,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz", - "integrity": "sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.35.tgz", + "integrity": "sha512-ATB3uuH8j/RmS64EXQZJSbo2WXfRNpTnQszHME/sGaexsuxeijrp3DTYSFAA3R2Bu6HbIIX6jempe1Au8I3j+A==", "cpu": [ "ia32" ], @@ -4654,9 +4417,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.7.26", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz", - "integrity": "sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==", + "version": "1.7.35", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.35.tgz", + "integrity": "sha512-iDGfQO1571NqWUXtLYDhwIELA/wadH42ioGn+J9R336nWx40YICzy9UQyslWRhqzhQ5kT+QXAW/MoCWc058N6Q==", "cpu": [ "x64" ], @@ -4687,9 +4450,9 @@ } }, "node_modules/@swc/types": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.12.tgz", - "integrity": "sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.13.tgz", + "integrity": "sha512-JL7eeCk6zWCbiYQg2xQSdLXQJl8Qoc9rXmG2cEKvHe3CKwMHwHGpfOb8frzNLmbycOo6I51qxnLnn9ESf4I20Q==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4782,17 +4545,6 @@ "@types/node": "*" } }, - "node_modules/@types/cypress": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-1.1.3.tgz", - "integrity": "sha512-OXe0Gw8LeCflkG1oPgFpyrYWJmEKqYncBsD/J0r17r0ETx/TnIGDNLwXt/pFYSYuYTpzcq1q3g62M9DrfsBL4g==", - "deprecated": "This is a stub types definition for cypress (https://cypress.io). cypress provides its own type definitions, so you don't need @types/cypress installed!", - "dev": true, - "license": "MIT", - "dependencies": { - "cypress": "*" - } - }, "node_modules/@types/debug": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", @@ -4803,9 +4555,9 @@ } }, "node_modules/@types/dom-webcodecs": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/@types/dom-webcodecs/-/dom-webcodecs-0.1.12.tgz", - "integrity": "sha512-vEkwKEr0xAO2xwNNkYhaltT7jMGjrgAbfpRR3qKRN7eW3B7R7O5fm1scx2OKBY6wMACgjCewhu+ljbCdudY+5A==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/@types/dom-webcodecs/-/dom-webcodecs-0.1.13.tgz", + "integrity": "sha512-O5hkiFIcjjszPIYyUSyvScyvrBoV3NOEEZx/pMlsu44TKzWNkLVBBxnxJz42in5n3QIolYOcBYFCPZZ0h8SkwQ==", "license": "MIT" }, "node_modules/@types/emscripten": { @@ -4859,18 +4611,6 @@ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "license": "MIT" }, - "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", - "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" - } - }, "node_modules/@types/is-empty": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@types/is-empty/-/is-empty-1.2.3.tgz", @@ -4985,9 +4725,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", - "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==", "devOptional": true, "license": "MIT", "dependencies": { @@ -5015,14 +4755,12 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", - "dev": true, "license": "MIT" }, "node_modules/@types/sizzle": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz", "integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==", - "dev": true, "license": "MIT" }, "node_modules/@types/supports-color": { @@ -5046,11 +4784,23 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==", + "license": "MIT" + }, + "node_modules/@types/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -5273,42 +5023,42 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.5.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.11.tgz", - "integrity": "sha512-PwAdxs7/9Hc3ieBO12tXzmTD+Ln4qhT/56S+8DvrrZ4kLDn4Z/AMUr8tXJD0axiJBS0RKIoNaR0yMuQB9v9Udg==", + "version": "3.5.12", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.12.tgz", + "integrity": "sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.25.3", - "@vue/shared": "3.5.11", + "@vue/shared": "3.5.12", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.5.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.11.tgz", - "integrity": "sha512-pyGf8zdbDDRkBrEzf8p7BQlMKNNF5Fk/Cf/fQ6PiUz9at4OaUfyXW0dGJTo2Vl1f5U9jSLCNf0EZJEogLXoeew==", + "version": "3.5.12", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.12.tgz", + "integrity": "sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.5.11", - "@vue/shared": "3.5.11" + "@vue/compiler-core": "3.5.12", + "@vue/shared": "3.5.12" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.5.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.11.tgz", - "integrity": "sha512-gsbBtT4N9ANXXepprle+X9YLg2htQk1sqH/qGJ/EApl+dgpUBdTv3yP7YlR535uHZY3n6XaR0/bKo0BgwwDniw==", + "version": "3.5.12", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.12.tgz", + "integrity": "sha512-2k973OGo2JuAa5+ZlekuQJtitI5CgLMOwgl94BzMCsKZCX/xiqzJYzapl4opFogKHqwJk34vfsaKpfEhd1k5nw==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.25.3", - "@vue/compiler-core": "3.5.11", - "@vue/compiler-dom": "3.5.11", - "@vue/compiler-ssr": "3.5.11", - "@vue/shared": "3.5.11", + "@vue/compiler-core": "3.5.12", + "@vue/compiler-dom": "3.5.12", + "@vue/compiler-ssr": "3.5.12", + "@vue/shared": "3.5.12", "estree-walker": "^2.0.2", "magic-string": "^0.30.11", "postcss": "^8.4.47", @@ -5316,20 +5066,20 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.5.11", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.11.tgz", - "integrity": "sha512-P4+GPjOuC2aFTk1Z4WANvEhyOykcvEd5bIj2KVNGKGfM745LaXGr++5njpdBTzVz5pZifdlR1kpYSJJpIlSePA==", + "version": "3.5.12", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.12.tgz", + "integrity": "sha512-eLwc7v6bfGBSM7wZOGPmRavSWzNFF6+PdRhE+VFJhNCgHiF8AM7ccoqcv5kBXA2eWUfigD7byekvf/JsOfKvPA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.11", - "@vue/shared": "3.5.11" + "@vue/compiler-dom": "3.5.12", + "@vue/shared": "3.5.12" } }, "node_modules/@vue/shared": { - "version": "3.5.11", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.11.tgz", - "integrity": "sha512-W8GgysJVnFo81FthhzurdRAWP/byq3q2qIw70e0JWblzVhjgOMiC2GyovXrZTFQJnFVryYaKGP3Tc9vYzYm6PQ==", + "version": "3.5.12", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.12.tgz", + "integrity": "sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==", "dev": true, "license": "MIT" }, @@ -5600,7 +5350,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", @@ -5641,7 +5390,6 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -5651,7 +5399,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.21.3" @@ -5667,7 +5414,6 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -5737,7 +5483,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", - "dev": true, "funding": [ { "type": "github", @@ -5941,7 +5686,6 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" @@ -5951,7 +5695,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.8" @@ -5971,7 +5714,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -5981,7 +5723,6 @@ "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, "license": "MIT" }, "node_modules/asynckit": { @@ -5994,7 +5735,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, "license": "ISC", "engines": { "node": ">= 4.0.0" @@ -6058,7 +5798,6 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true, "license": "Apache-2.0", "engines": { "node": "*" @@ -6068,20 +5807,8 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", - "dev": true, "license": "MIT" }, - "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.11", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", @@ -6151,12 +5878,12 @@ "license": "MIT" }, "node_modules/barcode-detector": { - "version": "2.2.10", - "resolved": "https://registry.npmjs.org/barcode-detector/-/barcode-detector-2.2.10.tgz", - "integrity": "sha512-fB6285Ahd6PIbru+PRw/CL+T1+dtPQmfCwBAwHmw+IWLLHrKH0q37qlAEHXWxPNM6bEmxgTMgGO+MJu/Si1uJQ==", + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/barcode-detector/-/barcode-detector-2.2.11.tgz", + "integrity": "sha512-N50XZ6Rav2sxTgHXOc38/mkpVJMan11GZ8Yqi1pPMZpTJSXuZ/FpIee6OtLehZX/Vs4ZOzGbp1DgXzFCfKggWA==", "license": "MIT", "dependencies": { - "@types/dom-webcodecs": "^0.1.12", + "@types/dom-webcodecs": "^0.1.13", "zxing-wasm": "1.2.14" } }, @@ -6164,7 +5891,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -6185,7 +5911,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" @@ -6207,14 +5932,12 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", - "dev": true, "license": "Apache-2.0" }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true, "license": "MIT" }, "node_modules/boolean": { @@ -6323,7 +6046,6 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, "funding": [ { "type": "github", @@ -6348,7 +6070,6 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, "license": "MIT", "engines": { "node": "*" @@ -6364,7 +6085,6 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.4.0.tgz", "integrity": "sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -6374,7 +6094,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -6409,9 +6128,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "version": "1.0.30001668", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz", + "integrity": "sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==", "funding": [ { "type": "opencollective", @@ -6448,7 +6167,6 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true, "license": "Apache-2.0" }, "node_modules/ccount": { @@ -6479,7 +6197,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -6496,7 +6213,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -6553,7 +6269,6 @@ "version": "2.24.0", "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -6619,7 +6334,6 @@ "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, "funding": [ { "type": "github", @@ -6656,7 +6370,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -6666,7 +6379,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" @@ -6679,7 +6391,6 @@ "version": "0.6.5", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", - "dev": true, "license": "MIT", "dependencies": { "string-width": "^4.2.0" @@ -6695,7 +6406,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", - "dev": true, "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", @@ -6768,7 +6478,6 @@ "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, "license": "MIT" }, "node_modules/combined-stream": { @@ -6797,7 +6506,6 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 6" @@ -6807,7 +6515,6 @@ "version": "1.8.2", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", - "dev": true, "license": "MIT", "engines": { "node": ">=4.0.0" @@ -6900,7 +6607,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true, "license": "MIT" }, "node_modules/cosmiconfig": { @@ -6983,6 +6689,15 @@ "node": ">=8" } }, + "node_modules/css-box-model": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz", + "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==", + "license": "MIT", + "dependencies": { + "tiny-invariant": "^1.0.6" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -7005,7 +6720,6 @@ "version": "13.15.0", "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.15.0.tgz", "integrity": "sha512-53aO7PwOfi604qzOkCSzNlWquCynLlKE/rmmpSPcziRH6LNfaDUAklQT6WJIsD8ywxlIy+uVZsnTMCCQVd2kTw==", - "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -7093,18 +6807,10 @@ "cypress-split-preview": "bin/preview.js" } }, - "node_modules/cypress/node_modules/proxy-from-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", - "dev": true, - "license": "MIT" - }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" @@ -7294,7 +7000,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -7585,17 +7290,6 @@ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", "license": "MIT" }, - "node_modules/dnd-core": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-16.0.1.tgz", - "integrity": "sha512-HK294sl7tbw6F6IeuK16YSBUoorvHpY8RHO+9yFfaJyCDVb6n7PRcezrOEOa2SBCqiYpemh5Jx20ZcjKdFAVng==", - "license": "MIT", - "dependencies": { - "@react-dnd/asap": "^5.0.1", - "@react-dnd/invariant": "^4.0.1", - "redux": "^4.2.0" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -7632,7 +7326,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, "license": "MIT", "dependencies": { "jsbn": "~0.1.0", @@ -7686,9 +7379,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.33", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.33.tgz", - "integrity": "sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==", + "version": "1.5.38", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.38.tgz", + "integrity": "sha512-VbeVexmZ1IFh+5EfrYz1I0HTzHVIlJa112UEWhciPyeOcKJGeTv6N8WnG4wsQB81DGCaVEGhpSb6o6a8WYFXXg==", "license": "ISC" }, "node_modules/emoji-regex": { @@ -7701,7 +7394,6 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, "license": "MIT", "dependencies": { "once": "^1.4.0" @@ -7724,7 +7416,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1", @@ -7828,7 +7519,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.2.4" @@ -7841,7 +7531,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -7869,9 +7558,9 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", - "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.1.0.tgz", + "integrity": "sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==", "dev": true, "license": "MIT", "dependencies": { @@ -7882,12 +7571,12 @@ "es-set-tostringtag": "^2.0.3", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "globalthis": "^1.0.3", + "globalthis": "^1.0.4", "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "internal-slot": "^1.0.7", - "iterator.prototype": "^1.1.2", + "iterator.prototype": "^1.1.3", "safe-array-concat": "^1.1.2" }, "engines": { @@ -8505,7 +8194,6 @@ "version": "6.4.7", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", - "dev": true, "license": "MIT" }, "node_modules/eventemitter3": { @@ -8528,7 +8216,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.0", @@ -8552,7 +8239,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "dev": true, "license": "MIT", "dependencies": { "pify": "^2.2.0" @@ -8571,7 +8257,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", @@ -8592,7 +8277,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, "engines": [ "node >=0.6.0" ], @@ -8683,7 +8367,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, "license": "MIT", "dependencies": { "pend": "~1.2.0" @@ -8693,7 +8376,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" @@ -8709,7 +8391,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" @@ -8931,26 +8612,6 @@ "license": "ISC", "peer": true }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -8993,16 +8654,15 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -9040,7 +8700,6 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", @@ -9205,7 +8864,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -9232,7 +8890,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, "license": "MIT", "dependencies": { "pump": "^3.0.0" @@ -9279,7 +8936,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", - "dev": true, "license": "MIT", "dependencies": { "async": "^3.2.0" @@ -9289,7 +8945,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" @@ -9376,7 +9031,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "dev": true, "license": "MIT", "dependencies": { "ini": "2.0.0" @@ -9463,7 +9117,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "license": "MIT", "dependencies": { "get-intrinsic": "^1.1.3" @@ -9508,7 +9161,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" @@ -9521,7 +9173,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -9534,7 +9185,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -9880,7 +9530,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", - "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", @@ -9909,7 +9558,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8.12.0" @@ -9939,9 +9587,9 @@ } }, "node_modules/i18next": { - "version": "23.15.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.15.2.tgz", - "integrity": "sha512-zcPSWzCvw6uKnuYHIqs4W7hTuB9e3AFcSdZgvCWoPXIZsBjBd4djN2/2uOHIB+1DFFkQnMBXvhNg7J3WyCuywQ==", + "version": "23.16.0", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.0.tgz", + "integrity": "sha512-Ni3CG6c14teOogY19YNRl+kYaE/Rb59khy0VyHVn4uOZ97E2E/Yziyi6r3C3s9+wacjdLZiq/LLYyx+Cgd+FCw==", "funding": [ { "type": "individual", @@ -9981,7 +9629,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -10057,7 +9704,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -10086,7 +9732,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -10287,7 +9932,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, "license": "MIT", "dependencies": { "ci-info": "^3.2.0" @@ -10435,7 +10079,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, "license": "MIT", "dependencies": { "global-dirs": "^3.0.0", @@ -10520,7 +10163,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -10598,7 +10240,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -10659,14 +10300,12 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true, "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -10755,13 +10394,12 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true, "license": "MIT" }, "node_modules/iterator.prototype": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", - "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.3.tgz", + "integrity": "sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10770,6 +10408,9 @@ "has-symbols": "^1.0.3", "reflect.getprototypeof": "^1.0.4", "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/jackspeak": { @@ -10877,7 +10518,6 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true, "license": "MIT" }, "node_modules/jsesc": { @@ -10911,7 +10551,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true, "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-traverse": { @@ -10933,7 +10572,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, "license": "ISC" }, "node_modules/json5": { @@ -10953,7 +10591,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, "license": "MIT", "dependencies": { "universalify": "^2.0.0" @@ -10976,7 +10613,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", - "dev": true, "engines": [ "node >=0.6.0" ], @@ -11028,7 +10664,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", - "dev": true, "license": "MIT", "engines": { "node": "> 0.8" @@ -11557,7 +11192,6 @@ "version": "3.14.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", - "dev": true, "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", @@ -11585,7 +11219,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -11691,7 +11324,6 @@ "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true, "license": "MIT" }, "node_modules/lodash-es": { @@ -11732,7 +11364,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true, "license": "MIT" }, "node_modules/lodash.sortby": { @@ -11742,17 +11373,10 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==", - "license": "MIT" - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.0", @@ -11769,7 +11393,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", - "dev": true, "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.0", @@ -11788,7 +11411,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -11806,7 +11428,6 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -11867,9 +11488,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dev": true, "license": "MIT", "dependencies": { @@ -12935,6 +12556,12 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/memoize-one": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", + "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==", + "license": "MIT" + }, "node_modules/merge-refs": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.3.0.tgz", @@ -13666,7 +13293,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -13714,7 +13340,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13895,9 +13520,9 @@ } }, "node_modules/nan": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", - "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", + "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", "license": "MIT", "optional": true }, @@ -14082,7 +13707,6 @@ "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, "license": "MIT", "dependencies": { "path-key": "^3.0.0" @@ -14127,7 +13751,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -14238,7 +13861,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "devOptional": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -14248,7 +13870,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" @@ -14283,7 +13904,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", - "dev": true, "license": "MIT" }, "node_modules/p-limit": { @@ -14324,7 +13944,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" @@ -14507,7 +14126,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true, "license": "MIT" }, "node_modules/performance-now": { @@ -14714,9 +14332,9 @@ } }, "node_modules/postcss-load-config/node_modules/yaml": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", - "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", + "integrity": "sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==", "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -14986,7 +14604,6 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -15009,7 +14626,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6.0" @@ -15058,23 +14674,21 @@ } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", "license": "MIT" }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true, "license": "MIT" }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", - "dev": true, "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", @@ -15103,7 +14717,6 @@ "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.6" @@ -15119,7 +14732,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true, "license": "MIT" }, "node_modules/queue-microtask": { @@ -15149,14 +14761,11 @@ "dev": true, "license": "MIT" }, - "node_modules/raf": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", - "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", - "license": "MIT", - "dependencies": { - "performance-now": "^2.1.0" - } + "node_modules/raf-schd": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz", + "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==", + "license": "MIT" }, "node_modules/ramda": { "version": "0.29.0", @@ -15228,62 +14837,6 @@ "react": "^15.3.0 || 16 || 17 || 18" } }, - "node_modules/react-dnd": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-16.0.1.tgz", - "integrity": "sha512-QeoM/i73HHu2XF9aKksIUuamHPDvRglEwdHL4jsp784BgUuWcg6mzfxT0QDdQz8Wj0qyRKx2eMg8iZtWvU4E2Q==", - "license": "MIT", - "dependencies": { - "@react-dnd/invariant": "^4.0.1", - "@react-dnd/shallowequal": "^4.0.1", - "dnd-core": "^16.0.1", - "fast-deep-equal": "^3.1.3", - "hoist-non-react-statics": "^3.3.2" - }, - "peerDependencies": { - "@types/hoist-non-react-statics": ">= 3.3.1", - "@types/node": ">= 12", - "@types/react": ">= 16", - "react": ">= 16.14" - }, - "peerDependenciesMeta": { - "@types/hoist-non-react-statics": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/react-dnd-html5-backend": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-16.0.1.tgz", - "integrity": "sha512-Wu3dw5aDJmOGw8WjH1I1/yTH+vlXEL4vmjk5p+MHxP8HuHJS1lAGeIdG/hze1AvNeXWo/JgULV87LyQOr+r5jw==", - "license": "MIT", - "dependencies": { - "dnd-core": "^16.0.1" - } - }, - "node_modules/react-dnd-scrolling": { - "version": "1.3.10", - "resolved": "https://registry.npmjs.org/react-dnd-scrolling/-/react-dnd-scrolling-1.3.10.tgz", - "integrity": "sha512-Vbe7tp6ZC2kgBx/8P1LXa3+3ao61Ve8HcoVzicnAuRiaV/r3lmccE9JVsa0TeZ+pzTBodb+MzQW0tMOMSRmtwg==", - "license": "MIT", - "dependencies": { - "hoist-non-react-statics": "3.x", - "lodash.throttle": "^4.1.1", - "prop-types": "15.x", - "raf": "^3.4.1" - }, - "peerDependencies": { - "react": "16.x || 17.x || 18.x", - "react-dnd": "10.x || 11.x || 14.x || 15.x || 16.x", - "react-dom": "16.x || 17.x || 18.x" - } - }, "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", @@ -15311,9 +14864,9 @@ } }, "node_modules/react-i18next": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.2.tgz", - "integrity": "sha512-z0W3/RES9Idv3MmJUcf0mDNeeMOUXe+xoL0kPfQPbDoZHmni/XsIoq5zgT2MCFUiau283GuBUK578uD/mkAbLQ==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.3.tgz", + "integrity": "sha512-BlO1P+oLKjjIxDBQ0GkAIMacgjfMbnvops+3Y5nZXF7UJ99v4KCWr0Na1azJXC8AMiNWp4kgUcFCJM7U9ZsUDg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.25.0", @@ -15992,6 +15545,29 @@ } } }, + "node_modules/react-redux": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.2.tgz", + "integrity": "sha512-0OA4dhM1W48l3uzmv6B7TXPCGmokUU4p1M44DGN2/D9a1FjVPukVjER1PcPX97jIg6aUeLq1XJo1IpfbgULn0w==", + "license": "MIT", + "dependencies": { + "@types/use-sync-external-store": "^0.0.3", + "use-sync-external-store": "^1.0.0" + }, + "peerDependencies": { + "@types/react": "^18.2.25", + "react": "^18.0", + "redux": "^5.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, "node_modules/react-webcam": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.2.0.tgz", @@ -16093,13 +15669,10 @@ } }, "node_modules/redux": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.9.2" - } + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT" }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", @@ -16592,7 +16165,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", - "dev": true, "license": "MIT", "dependencies": { "throttleit": "^1.0.0" @@ -16688,7 +16260,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true, "license": "MIT" }, "node_modules/resolve": { @@ -16742,7 +16313,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, "license": "MIT", "dependencies": { "onetime": "^5.1.0", @@ -16776,7 +16346,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", - "dev": true, "license": "MIT" }, "node_modules/rimraf": { @@ -16923,7 +16492,6 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -17002,7 +16570,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, "license": "MIT" }, "node_modules/sass-lookup": { @@ -17133,7 +16700,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -17252,7 +16818,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", @@ -17271,7 +16836,6 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "devOptional": true, "license": "ISC" }, "node_modules/simple-bin-help": { @@ -17337,7 +16901,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -17506,7 +17069,6 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "dev": true, "license": "MIT", "dependencies": { "asn1": "~0.2.3", @@ -17770,7 +17332,6 @@ "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, "license": "MIT", "engines": { "node": ">=6" @@ -17964,9 +17525,9 @@ "license": "MIT" }, "node_modules/tailwind-merge": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.3.tgz", - "integrity": "sha512-d9ZolCAIzom1nf/5p4LdD5zvjmgSxY0BGgdSvmXIoMYAiPdAW/dSpP7joCDYFY7r/HkEa2qmPtkgsu0xjQeQtw==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz", + "integrity": "sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==", "license": "MIT", "funding": { "type": "github", @@ -18236,7 +17797,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.1.tgz", "integrity": "sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -18246,7 +17806,6 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true, "license": "MIT" }, "node_modules/tiny-invariant": { @@ -18301,7 +17860,6 @@ "version": "0.2.3", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", - "dev": true, "license": "MIT", "engines": { "node": ">=14.14" @@ -18339,7 +17897,6 @@ "version": "4.1.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.33", @@ -18355,7 +17912,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 4.0.0" @@ -18462,7 +18018,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" @@ -18475,7 +18030,6 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true, "license": "Unlicense" }, "node_modules/type-check": { @@ -18591,9 +18145,9 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "devOptional": true, "license": "Apache-2.0", "bin": { @@ -19014,7 +18568,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 10.0.0" @@ -19024,7 +18577,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -19085,7 +18637,6 @@ "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, "license": "MIT", "dependencies": { "querystringify": "^2.1.1", @@ -19102,6 +18653,24 @@ "react-dom": ">=16.8" } }, + "node_modules/use-memo-one": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz", + "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/use-sync-external-store": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", + "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -19171,7 +18740,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, "engines": [ "node >=0.6.0" ], @@ -19422,9 +18990,9 @@ } }, "node_modules/vite": { - "version": "5.4.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", - "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", + "version": "5.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz", + "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==", "dev": true, "license": "MIT", "dependencies": { @@ -21014,7 +20582,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "devOptional": true, "license": "ISC" }, "node_modules/xlsx": { @@ -21059,7 +20626,6 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", diff --git a/package.json b/package.json index 6f099659fcd..46b84be481f 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@googlemaps/react-wrapper": "^1.1.35", "@googlemaps/typescript-guards": "^2.0.3", "@headlessui/react": "^2.1.2", + "@hello-pangea/dnd": "^17.0.0", "@pnotify/core": "^5.2.0", "@pnotify/mobile": "^5.2.0", "@radix-ui/react-icons": "^1.3.0", @@ -55,13 +56,14 @@ "@radix-ui/react-toast": "^1.2.2", "@sentry/browser": "^8.33.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", - "axios": "^1.7.7", "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", + "browserslist": "^4.24.0", "browserslist-useragent-regexp": "^4.1.3", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cross-env": "^7.0.3", + "cypress": "^13.14.2", "dayjs": "^1.11.11", "echarts": "^5.5.1", "echarts-for-react": "^3.0.2", @@ -76,9 +78,6 @@ "raviger": "^4.1.2", "react": "18.3.1", "react-copy-to-clipboard": "^5.1.0", - "react-dnd": "^16.0.1", - "react-dnd-html5-backend": "^16.0.1", - "react-dnd-scrolling": "^1.3.8", "react-dom": "18.3.1", "react-google-recaptcha": "^3.1.0", "react-i18next": "^15.0.2", @@ -96,7 +95,6 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.13", - "@types/cypress": "^1.1.3", "@types/events": "^3.0.3", "@types/google.maps": "^3.55.8", "@types/lodash-es": "^4.17.12", @@ -107,10 +105,10 @@ "@types/react-csv": "^1.1.10", "@types/react-dom": "^18.3.0", "@types/react-google-recaptcha": "^2.1.9", + "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^7.18.0", "@vitejs/plugin-react-swc": "^3.6.0", "autoprefixer": "^10.4.19", - "cypress": "^13.14.2", "cypress-localstorage-commands": "^2.2.5", "cypress-split": "^1.23.2", "eslint-config-prettier": "^9.1.0", diff --git a/src/Common/constants.tsx b/src/Common/constants.tsx index dcdf3728497..08d21dc1edc 100644 --- a/src/Common/constants.tsx +++ b/src/Common/constants.tsx @@ -1142,68 +1142,6 @@ export const AssetImportSchema: SchemaType = { }, }; -export const ExternalResultImportSchema: SchemaType = { - District: { prop: "district", type: "any" }, - "SRF ID": { prop: "srf_id", type: "string" }, - Name: { prop: "name", type: "string" }, - Age: { prop: "age", type: "number" }, - "Age in": { prop: "age_in", type: "string" }, - Gender: { prop: "gender", type: "string" }, - "Mobile Number": { prop: "mobile_number", type: "any" }, - Address: { prop: "address", type: "string" }, - Ward: { prop: "ward", type: "number" }, - "Local Body": { prop: "local_body", type: "string" }, - "Local Body Type": { prop: "local_body_type", type: "string" }, - Source: { prop: "source", type: "string" }, - "Sample Collection Date": { - prop: "sample_collection_date", - type: "string", - parse: (date: string) => { - if (!date) return null; - if (isNaN(Date.parse(date))) { - const parsed = new Date(date); - if (String(parsed) === "Invalid Date") { - throw new Error("Invalid Date: " + date); - } - return dateQueryString(parsed); - } else { - const parsed = new Date(date); - if (String(parsed) === "Invalid Date") { - throw new Error("Invalid Date: " + date); - } - return dateQueryString(parsed); - } - }, - }, - "Result Date": { - prop: "result_date", - type: "string", - parse: (date: string) => { - if (!date) return null; - if (isNaN(Date.parse(date))) { - const parsed = new Date(date); - if (String(parsed) === "Invalid Date") { - throw new Error("Invalid Date: " + date); - } - return dateQueryString(parsed); - } else { - const parsed = new Date(date); - if (String(parsed) === "Invalid Date") { - throw new Error("Invalid Date: " + date); - } - return dateQueryString(parsed); - } - }, - }, - "Test Type": { prop: "test_type", type: "string" }, - "Lab Name": { prop: "lab_name", type: "string" }, - "Sample Type": { prop: "sample_type", type: "string" }, - "Patient Status": { prop: "patient_status", type: "string" }, - "Is Repeat": { prop: "is_repeat", type: "string" }, - "Patient Category": { prop: "patient_category", type: "string" }, - Result: { prop: "result", type: "string" }, -}; - // ABDM export const ABDM_CONSENT_PURPOSE = [ { value: "CAREMGT", label: "Care Management" }, diff --git a/src/Common/hooks/useActiveLink.ts b/src/Common/hooks/useActiveLink.ts index 0d02d33d0b1..b52b15600dd 100644 --- a/src/Common/hooks/useActiveLink.ts +++ b/src/Common/hooks/useActiveLink.ts @@ -15,7 +15,6 @@ const activeLinkPriority = { "/sample": "/sample", "/shifting": "/shifting", "/resource": "/resource", - "/external_results": "/external_results", "/users": "/users", "/notice_board": "/notice_board", "/facility": "/facility", diff --git a/src/Components/ABDM/ConfigureHealthFacility.tsx b/src/Components/ABDM/ConfigureHealthFacility.tsx index 8259cd18a33..f78a65f2cd1 100644 --- a/src/Components/ABDM/ConfigureHealthFacility.tsx +++ b/src/Components/ABDM/ConfigureHealthFacility.tsx @@ -1,4 +1,4 @@ -import { lazy, useReducer, useState } from "react"; +import { useReducer, useState } from "react"; import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; import { Submit } from "../Common/components/ButtonV2"; @@ -8,8 +8,7 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; import { FieldChangeEvent } from "../Form/FormFields/Utils.js"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const initForm = { health_facility: null, hf_id: "", diff --git a/src/Components/Assets/AssetImportModal.tsx b/src/Components/Assets/AssetImportModal.tsx index 6ff51e293af..9be1c393960 100644 --- a/src/Components/Assets/AssetImportModal.tsx +++ b/src/Components/Assets/AssetImportModal.tsx @@ -1,4 +1,4 @@ -import { useState, lazy } from "react"; +import { lazy, useState } from "react"; import { sleep } from "../../Utils/utils"; import { FacilityModel } from "../Facility/models"; import { AssetData } from "./AssetTypes"; diff --git a/src/Components/Assets/AssetManage.tsx b/src/Components/Assets/AssetManage.tsx index 4c17721e1f9..69c8bc92f97 100644 --- a/src/Components/Assets/AssetManage.tsx +++ b/src/Components/Assets/AssetManage.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect, ReactElement, lazy } from "react"; +import { useState, useEffect, ReactElement } from "react"; import { AssetClass, assetClassProps, @@ -18,7 +18,7 @@ import { UserRole, USER_TYPES } from "../../Common/constants"; import ConfirmDialog from "../Common/ConfirmDialog"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../Common/Loading")); +import Loading from "@/Components/Common/Loading"; import * as Notification from "../../Utils/Notifications.js"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import Uptime from "../Common/Uptime"; diff --git a/src/Components/Assets/AssetsList.tsx b/src/Components/Assets/AssetsList.tsx index 5e29bbc0dfd..ee27c2a484f 100644 --- a/src/Components/Assets/AssetsList.tsx +++ b/src/Components/Assets/AssetsList.tsx @@ -1,7 +1,7 @@ import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; import * as Notification from "../../Utils/Notifications.js"; import { assetClassProps, AssetData } from "./AssetTypes"; -import { useState, useEffect, lazy } from "react"; +import { useState, useEffect } from "react"; import { Link, navigate } from "raviger"; import AssetFilter from "./AssetFilter"; import { parseQueryParams } from "../../Utils/primitives"; @@ -24,8 +24,7 @@ import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const AssetsList = () => { const { t } = useTranslation(); const { diff --git a/src/Components/Common/Breadcrumbs.tsx b/src/Components/Common/Breadcrumbs.tsx index 1ef56316890..c092ecbbc93 100644 --- a/src/Components/Common/Breadcrumbs.tsx +++ b/src/Components/Common/Breadcrumbs.tsx @@ -12,7 +12,6 @@ const MENU_TAGS: { [key: string]: string } = { sample: "Sample Tests", shifting: "Shiftings", resource: "Resources", - external_results: "External Results", users: "Users", notice_board: "Notice Board", }; diff --git a/src/Components/Common/Sidebar/Sidebar.tsx b/src/Components/Common/Sidebar/Sidebar.tsx index f7044d84b02..0e9ee34b715 100644 --- a/src/Components/Common/Sidebar/Sidebar.tsx +++ b/src/Components/Common/Sidebar/Sidebar.tsx @@ -7,7 +7,6 @@ import CareIcon, { IconName } from "../../../CAREUI/icons/CareIcon"; import SlideOver from "../../../CAREUI/interactive/SlideOver"; import { classNames } from "../../../Utils/utils"; import { Link } from "raviger"; -import useAuthUser from "../../../Common/hooks/useAuthUser"; import careConfig from "@careConfig"; export const SIDEBAR_SHRINK_PREFERENCE_KEY = "sidebarShrinkPreference"; @@ -33,8 +32,6 @@ const StatelessSidebar = ({ setShrinked, onItemClick, }: StatelessSidebarProps) => { - const authUser = useAuthUser(); - const NavItems: { text: string; to: string; @@ -46,17 +43,6 @@ const StatelessSidebar = ({ { text: "Sample Test", to: "/sample", icon: "l-medkit" }, { text: "Shifting", to: "/shifting", icon: "l-ambulance" }, { text: "Resource", to: "/resource", icon: "l-heart-medical" }, - ...(!["Nurse", "NurseReadOnly", "Staff", "StaffReadOnly"].includes( - authUser.user_type, - ) - ? ([ - { - text: "External Results", - to: "/external_results", - icon: "l-clipboard-notes", - }, - ] as const) - : []), { text: "Users", to: "/users", icon: "l-users-alt" }, { text: "Notice Board", to: "/notice_board", icon: "l-meeting-board" }, ]; diff --git a/src/Components/ExternalResult/Commons.tsx b/src/Components/ExternalResult/Commons.tsx deleted file mode 100644 index 6a7dfcd8e77..00000000000 --- a/src/Components/ExternalResult/Commons.tsx +++ /dev/null @@ -1,25 +0,0 @@ -export const externalResultFormatter = (props: any) => { - const data = props.map((el: any) => { - return { - Id: el.id, - Name: el.name, - Address: el.address, - Age: el.age, - Gender: el.gender, - Mobile: el.mobile_number, - Ward: el.ward_object?.name || "NILL", - Local_Body: el.local_body_object?.name || "NILL", - District: el.district_object?.name, - Result: el.result, - Test_Type: el.test_type, - Patient_Status: el.patient_status, - Patient_Category: el.patient_category, - SRF_ID: el.srf_id, - Sample_Type: el.sample_type, - Lab_Name: el.lab_name, - Sample_Collection_Date: el.sample_collection_date, - Result_Date: el.result_date, - }; - }); - return data; -}; diff --git a/src/Components/ExternalResult/ExternalResultImportModal.tsx b/src/Components/ExternalResult/ExternalResultImportModal.tsx deleted file mode 100644 index cd896b285ff..00000000000 --- a/src/Components/ExternalResult/ExternalResultImportModal.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import * as _ from "lodash-es"; -import { navigate } from "raviger"; -import { useEffect, useState, lazy } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { ExternalResultImportSchema } from "../../Common/constants"; -import DialogModal from "../Common/Dialog"; -import { IExternalResult } from "./models"; -import careConfig from "@careConfig"; -const ExcelFileDragAndDrop = lazy( - () => import("../Common/ExcelFIleDragAndDrop"), -); - -interface Props { - open: boolean; - onClose: () => void; -} - -export default function ExternalResultImportModal({ open, onClose }: Props) { - const [loading, setLoading] = useState(false); - - const fetchUser = async () => { - const { data: user } = await request(routes.currentUser, { - pathParams: {}, - }); - - ExternalResultImportSchema.Address.parse = (value: string) => { - if ( - user?.user_type === "StateAdmin" || - user?.user_type === "StateLabAdmin" - ) { - if (value.split(",").pop()?.trim() === user?.state_object?.name) { - return value; - } else { - throw new Error("State should be the same as the user's state"); - } - } - return value; - }; - - ExternalResultImportSchema.District.parse = (value: string) => { - if ( - user?.user_type === "StateAdmin" || - user?.user_type === "StateLabAdmin" - ) { - return value; - } else if (value !== user?.district_object?.name) { - throw new Error("District should be the same as the user's district"); - } - }; - }; - - useEffect(() => { - fetchUser(); - }, []); - - const handleSubmit = async (data: IExternalResult[]) => { - setLoading(true); - - if (data.length !== 0) { - try { - const { res } = await request(routes.externalResultUploadCsv, { - body: { - sample_tests: data, - }, - }); - - if (res && res.status === 202) { - setLoading(false); - navigate("/external_results"); - Notification.Success({ - msg: "External Results imported successfully", - }); - } else { - Notification.Error({ - msg: "Something went wrong", - }); - setLoading(false); - } - } catch (error) { - Notification.Error({ - msg: "Something went wrong: " + error, - }); - setLoading(false); - } finally { - setLoading(false); - onClose(); - } - } else { - setLoading(false); - } - }; - - return ( - - - - ); -} diff --git a/src/Components/ExternalResult/ListFilter.tsx b/src/Components/ExternalResult/ListFilter.tsx deleted file mode 100644 index 5beb1fe6e20..00000000000 --- a/src/Components/ExternalResult/ListFilter.tsx +++ /dev/null @@ -1,255 +0,0 @@ -import { useState } from "react"; -import useMergeState from "../../Common/hooks/useMergeState"; -import { useTranslation } from "react-i18next"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { MultiSelectFormField } from "../Form/FormFields/SelectFormField"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import dayjs from "dayjs"; -import { dateQueryString, compareBy } from "../../Utils/utils"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import Loading from "../Common/Loading"; -import { LocalBodyModel, WardModel } from "../Facility/models"; - -const getDate = (value: any) => - value && dayjs(value).isValid() && dayjs(value).toDate(); - -export default function ListFilter(props: any) { - const { filter, onChange, closeFilter, dataList, removeFilters } = props; - const [wardList, setWardList] = useState([]); - const [lsgList, setLsgList] = useState([]); - const [wards, setWards] = useState([]); - const [selectedLsgs, setSelectedLsgs] = useState([]); - const authUser = useAuthUser(); - const [filterState, setFilterState] = useMergeState({ - created_date_before: filter.created_date_before || null, - created_date_after: filter.created_date_after || null, - result_date_before: filter.result_date_before || null, - result_date_after: filter.result_date_after || null, - sample_collection_date_before: filter.sample_collection_date_before || null, - sample_collection_date_after: filter.sample_collection_date_after || null, - srf_id: filter.srf_id || null, - }); - const { t } = useTranslation(); - - const { loading } = useQuery(routes.getAllLocalBodyByDistrict, { - pathParams: { id: String(authUser.district) }, - onResponse: ({ res, data }) => { - if (res && data) { - const allWards: any[] = []; - const allLsgs: any[] = []; - - if (res && data) { - data.forEach((local: any) => { - allLsgs.push({ id: local.id, name: local.name }); - if (local.wards) { - local.wards.forEach((ward: any) => { - allWards.push({ - id: ward.id, - name: ward.number + ": " + ward.name, - panchayath: local.name, - number: ward.number, - local_body_id: local.id, - }); - }); - } - }); - } - - allWards.sort(compareBy("number")); - allLsgs.sort(compareBy("name")); - - setWardList(allWards); - setLsgList(allLsgs); - - const filteredWard = filter?.wards?.split(",").map(Number); - const selectedWards: any = - filteredWard && allWards - ? allWards.filter(({ id }: { id: number }) => { - return filteredWard.includes(id); - }) - : []; - setWards(selectedWards); - - const filteredLsgs = filter?.local_bodies?.split(",").map(Number); - const selectedLsgs: any = - filteredLsgs && allLsgs - ? allLsgs.filter(({ id }: { id: number }) => { - return filteredLsgs.includes(id); - }) - : []; - setSelectedLsgs(selectedLsgs); - } - }, - }); - - const handleDateRangeChange = ( - startDateId: string, - endDateId: string, - e: any, - ) => { - const filterData: any = { ...filterState }; - filterData[startDateId] = e.value.start?.toString(); - filterData[endDateId] = e.value.end?.toString(); - - setFilterState(filterData); - }; - - const field = (name: string) => ({ - name, - label: t(name), - value: filterState[name], - onChange: handleChange, - errorClassName: "hidden", - }); - - const applyFilter = () => { - const selectedWardIds = wards.map(function (obj) { - return obj.id; - }); - - const selectedLsgIds = selectedLsgs.map(function (obj) { - return obj.id; - }); - - const { - created_date_before, - created_date_after, - result_date_before, - result_date_after, - sample_collection_date_after, - sample_collection_date_before, - srf_id, - } = filterState; - - const data = { - state: authUser.state, - district: authUser.district, - wards: selectedWardIds.length ? selectedWardIds : "", - local_bodies: selectedLsgIds.length ? selectedLsgIds : "", - created_date_before: dateQueryString(created_date_before), - created_date_after: dateQueryString(created_date_after), - result_date_before: dateQueryString(result_date_before), - result_date_after: dateQueryString(result_date_after), - sample_collection_date_after: dateQueryString( - sample_collection_date_after, - ), - sample_collection_date_before: dateQueryString( - sample_collection_date_before, - ), - srf_id: srf_id, - }; - onChange(data); - dataList(selectedLsgs, wards); - }; - - const filterWards = () => { - const selectedLsgIds: any = selectedLsgs.map((e) => { - return e.id; - }); - const selectedwards: any = - selectedLsgIds.length === 0 - ? wardList - : wardList.filter(({ local_body_id }: { local_body_id: number }) => { - return selectedLsgIds.includes(local_body_id); - }); - - return selectedwards; - }; - - const handleChange = (event: any) => { - const { name, value } = event.target; - const filterData: any = { ...filterState }; - filterData[name] = value; - setFilterState(filterData); - }; - - if (loading) { - ; - } - - return ( - { - removeFilters(); - closeFilter(); - }} - > - option.name} - optionDescription={(option) => option.localbody_code} - onChange={({ value }) => setSelectedLsgs(value)} - /> - - option.name} - optionDescription={(option) => option.panchayath} - onChange={({ value }) => setWards(value)} - /> - - handleDateRangeChange("created_date_after", "created_date_before", e) - } - label={t("created_date")} - /> - - handleDateRangeChange("result_date_after", "result_date_before", e) - } - label={t("result_date")} - /> - - handleDateRangeChange( - "sample_collection_date_after", - "sample_collection_date_before", - e, - ) - } - label={t("sample_collection_date")} - /> - -
- -
-
- ); -} diff --git a/src/Components/ExternalResult/ResultItem.tsx b/src/Components/ExternalResult/ResultItem.tsx deleted file mode 100644 index 44f40e3248d..00000000000 --- a/src/Components/ExternalResult/ResultItem.tsx +++ /dev/null @@ -1,218 +0,0 @@ -import { useState, lazy } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import { navigate } from "raviger"; -import { useTranslation } from "react-i18next"; -import Page from "../Common/components/Page"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import CareIcon from "../../CAREUI/icons/CareIcon.js"; - -const Loading = lazy(() => import("../Common/Loading")); - -export default function ResultItem(props: any) { - const [showDeleteAlert, setShowDeleteAlert] = useState(false); - const { t } = useTranslation(); - - const { data: resultItemData, loading } = useQuery(routes.externalResult, { - pathParams: { id: props.id }, - }); - - const handleDelete = async () => { - if (showDeleteAlert) { - const { res, data } = await request(routes.deleteExternalResult, { - pathParams: { id: props.id }, - }); - - if (res?.status === 204) { - Notification.Success({ - msg: t("record_has_been_deleted_successfully"), - }); - } else { - Notification.Error({ - msg: t("error_while_deleting_record") + ": " + (data?.detail || ""), - }); - } - setShowDeleteAlert(false); - navigate("/external_results"); - } - }; - - if (loading || !resultItemData) { - return ; - } - - return ( - - { - handleDelete(); - }} - onClose={() => setShowDeleteAlert(false)} - /> -
-
- - -
-
-
-

- {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 ? ( - - {t("patient_created")} - - ) : null} -
-
-
-
-
- {t("gender")} -
-
- {resultItemData.gender} -
-
-
-
- {t("address")} -
-
- {resultItemData.address} - - {resultItemData.ward_object && ( -
- Ward: {resultItemData.ward_object.number}{" "} - {resultItemData.ward_object.name} -
- )} - {resultItemData.local_body_object && ( -
- {resultItemData.local_body_object.name} -
- )} -
-
-
-
- {t("mobile_number")} -
-
- {resultItemData.mobile_number} -
-
-
-
- Repeat? -
-
- {resultItemData.is_repeat ? t("yes") : t("no")} -
-
-
-
- {t("patient_status")} -
-
- {resultItemData.patient_status} -
-
-
-
- {t("sample_type")} -
-
- {resultItemData.sample_type} -
-
-
-
- {t("test_type")} -
-
- {resultItemData.test_type} -
-
-
-
- {t("sample_collection_date")} -
-
- {resultItemData.sample_collection_date || "-"} -
-
-
-
- {t("result_date")} -
-
- {resultItemData.result_date || "-"} -
-
-
-
- {t("result")} -
-
- {resultItemData.result} -
-
-
-
- {t("source")} -
-
- {resultItemData.source} -
-
- -
-
- {t("patient_category")} -
-
- {resultItemData.patient_category} -
-
-
-
-
-
-
- ); -} diff --git a/src/Components/ExternalResult/ResultList.tsx b/src/Components/ExternalResult/ResultList.tsx deleted file mode 100644 index 74c4655104d..00000000000 --- a/src/Components/ExternalResult/ResultList.tsx +++ /dev/null @@ -1,369 +0,0 @@ -import ButtonV2 from "../Common/components/ButtonV2"; -import { navigate } from "raviger"; -import { lazy, useState } from "react"; -import ListFilter from "./ListFilter"; -import FacilitiesSelectDialogue from "./FacilitiesSelectDialogue"; -import { FacilityModel } from "../Facility/models"; -import SearchInput from "../Form/SearchInput"; -import useFilters from "../../Common/hooks/useFilters"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ExportMenu from "../Common/Export"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import CountBlock from "../../CAREUI/display/Count"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import Page from "../Common/components/Page"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { parsePhoneNumber } from "../../Utils/utils"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import ExternalResultImportModal from "./ExternalResultImportModal"; -import request from "../../Utils/request/request"; - -const Loading = lazy(() => import("../Common/Loading")); - -export default function ResultList() { - const authUser = useAuthUser(); - const { - qParams, - updateQuery, - Pagination, - FilterBadges, - advancedFilter, - resultsPerPage, - } = useFilters({ - limit: 14, - cacheBlacklist: ["mobile_number", "name"], - }); - const [importModalOpen, setImportModalOpen] = useState(false); - const [showDialog, setShowDialog] = useState(false); - const [selectedFacility, setSelectedFacility] = useState({ - name: "", - }); - const [resultId, setResultId] = useState(-1); - const [dataList, setDataList] = useState({ lsgList: [], wardList: [] }); - - const [phone_number, setPhoneNumber] = useState(""); - const [phoneNumberError, setPhoneNumberError] = useState(""); - - const setPhoneNum = (mobile_number: string) => { - setPhoneNumber(mobile_number); - if (mobile_number.length >= 13) { - setPhoneNumberError(""); - updateQuery({ mobile_number }); - return; - } - - if (mobile_number === "+91" || mobile_number === "") { - setPhoneNumberError(""); - updateQuery({ mobile_number: "" }); - return; - } - - setPhoneNumberError("Enter a valid number"); - }; - const params = { - page: qParams.page || 1, - name: qParams.name || "", - mobile_number: qParams.mobile_number - ? (parsePhoneNumber(qParams.mobile_number) ?? "") - : "", - wards: qParams.wards || undefined, - local_bodies: qParams.local_bodies || undefined, - created_date_before: qParams.created_date_before || undefined, - created_date_after: qParams.created_date_after || undefined, - result_date_before: qParams.result_date_before || undefined, - result_date_after: qParams.result_date_after || undefined, - sample_collection_date_after: - qParams.sample_collection_date_after || undefined, - sample_collection_date_before: - qParams.sample_collection_date_before || undefined, - offset: (qParams.page ? qParams.page - 1 : 0) * resultsPerPage, - srf_id: qParams.srf_id || undefined, - }; - - const { data, loading } = useQuery(routes.externalResultList, { - query: params, - }); - - let manageResults: any = null; - - const removeLSGFilter = (paramKey: any, id: any) => { - const updatedLsgList = dataList.lsgList.filter((x: any) => x.id !== id); - const lsgParams = updatedLsgList.map((x: any) => x.id); - const updatedWardList = dataList.wardList.filter( - (x: any) => x.local_body_id !== id, - ); - const wardParams = updatedWardList.map((x: any) => x.id); - updateQuery({ [paramKey]: lsgParams, ["wards"]: wardParams }); - setDataList({ lsgList: updatedLsgList, wardList: updatedWardList }); - }; - - const removeWardFilter = (paramKey: any, id: any) => { - const updatedList = dataList.wardList.filter((x: any) => x.id !== id); - const params = updatedList.map((x: any) => x.id); - updateQuery({ [paramKey]: params }); - setDataList({ ...dataList, wardList: updatedList }); - }; - - const lsgWardData = (lsgs: any, wards: any) => - setDataList({ lsgList: lsgs, wardList: wards }); - - const lsgWardBadge = (key: string, value: any, paramKey: string) => { - return ( - value && ( - - {`${key}: ${value.name}`} - - paramKey === "local_bodies" - ? removeLSGFilter(paramKey, value.id) - : paramKey === "wards" - ? removeWardFilter(paramKey, value.id) - : null - } - /> - - ) - ); - }; - - let resultList: any[] = []; - if (data?.results.length) { - resultList = data.results.map((result: any) => { - const resultUrl = `/external_results/${result.id}`; - return ( - - navigate(resultUrl)} - className="text-md whitespace-nowrap px-6 py-4 leading-5 text-secondary-900" - > - - - - - {result.test_type} - - - - - {result.result} - - {result.patient_created ? ( - - Patient Created - - ) : null} - - - {result.result_date || "-"} - - - { - setShowDialog(true); - setResultId(result.id); - }} - > - CREATE - - - - ); - }); - } - - if (loading || !data) { - manageResults = ( - - - - - - ); - } else if (data?.results.length) { - manageResults = <>{resultList}; - } else if (data?.results.length === 0) { - manageResults = ( - - -
-
- No Results Found -
-
- - - ); - } - - return ( -
- setSelectedFacility(e)} - selectedFacility={selectedFacility} - handleOk={() => - navigate(`facility/${selectedFacility.id}/patient`, { - query: { extId: resultId }, - }) - } - handleCancel={() => setShowDialog(false)} - /> - - , - onClick: () => setImportModalOpen(true), - }, - }, - ] - : []), - { - label: "Export Results", - action: async () => { - const { data } = await request(routes.externalResultList, { - query: { ...qParams, csv: true }, - }); - return data ?? null; - }, - filePrefix: "external_results", - options: { - icon: , - }, - }, - ]} - /> - } - > - {importModalOpen && ( - setImportModalOpen(false)} - /> - )} -
- -
- updateQuery({ [e.name]: e.value })} - value={qParams.name} - placeholder="Search by name" - /> -
- setPhoneNum(e.value)} - error={phoneNumberError} - placeholder="Search by Phone Number" - types={["mobile", "landline"]} - /> -
-
-
- advancedFilter.setShow(true)} - /> -
-
- -
- {qParams.local_bodies && - dataList.lsgList.map((x) => lsgWardBadge("LSG", x, "local_bodies"))} - {qParams.wards && - dataList.wardList.map((x) => lsgWardBadge("Ward", x, "wards"))} -
- - [ - badge("Name", "name"), - phoneNumber("Phone no.", "mobile_number"), - ...dateRange("Created", "created_date"), - ...dateRange("Result", "result_date"), - ...dateRange("Sample created", "sample_collection_date"), - badge("SRF ID", "srf_id"), - ]} - /> - -
- - - - - - - - - - - - {manageResults} - -
- Name - - Test Type - - Status - - Result Date - - Create Patient -
-
- - -
-
- ); -} diff --git a/src/Components/ExternalResult/ResultUpdate.tsx b/src/Components/ExternalResult/ResultUpdate.tsx deleted file mode 100644 index 3e892940ac8..00000000000 --- a/src/Components/ExternalResult/ResultUpdate.tsx +++ /dev/null @@ -1,307 +0,0 @@ -import { useCallback, useState, useReducer, lazy } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField.js"; -import CircularProgress from "../Common/components/CircularProgress.js"; -import { SelectFormField } from "../Form/FormFields/SelectFormField.js"; -import RadioFormField from "../Form/FormFields/RadioFormField.js"; -import { navigate } from "raviger"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import Page from "../Common/components/Page.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; -import { compareBy } from "../../Utils/utils.js"; -import { useTranslation } from "react-i18next"; - -const Loading = lazy(() => import("../Common/Loading")); - -const initForm = { - address: "", - local_body: "", - ward: "", - patient_created: "false", -}; - -const initError = Object.assign( - {}, - ...Object.keys(initForm).map((k) => ({ [k]: "" })), -); - -const initialState = { - form: { ...initForm }, - errors: { ...initError }, -}; - -const FormReducer = (state = initialState, action: any) => { - switch (action.type) { - case "set_form": { - return { - ...state, - form: action.form, - }; - } - case "set_error": { - return { - ...state, - errors: action.errors, - }; - } - default: - return state; - } -}; - -const initialLocalbodies = [{ id: 0, name: "Choose Localbody", number: 0 }]; -const initialWard = [{ id: 0, name: "Choose Ward", number: 0 }]; - -export default function UpdateResult(props: any) { - const { id } = props; - const { goBack } = useAppHistory(); - const { t } = useTranslation(); - - const [state, dispatch] = useReducer(FormReducer, initialState); - const [isLoading, setIsLoading] = useState(true); - const [isLocalbodyLoading, setIsLocalbodyLoading] = useState(false); - const [isWardLoading, setIsWardLoading] = useState(false); - const [localBody, setLocalBody] = useState(initialLocalbodies); - const [ward, setWard] = useState(initialLocalbodies); - - const { loading } = useQuery(routes.externalResult, { - pathParams: { id }, - onResponse: async ({ res, data }) => { - if (res && data) { - const form = { ...state.form }; - form["name"] = data.name; - form["age"] = data.age; - form["age_in"] = data.age_in; - form["srf_id"] = data.srf_id; - form["address"] = data.address; - form["district"] = data.district_object.name; - form["local_body"] = String(data.local_body); - form["ward"] = String(data.ward); - form["patient_created"] = String(data.patient_created); - - dispatch({ type: "set_form", form }); - - Promise.all([ - fetchLocalBody(data.district), - fetchWards(data.local_body), - ]); - setIsLoading(false); - } - }, - }); - - const fetchLocalBody = async (id: number) => { - if (Number(id) > 0) { - setIsLocalbodyLoading(true); - const { res, data } = await request(routes.getLocalbodyByDistrict, { - pathParams: { id: String(id) }, - }); - if (res && data) { - setIsLocalbodyLoading(false); - setLocalBody([...initialLocalbodies, ...data]); - } - } else { - setLocalBody(initialLocalbodies); - } - }; - - const fetchWards = useCallback( - async (id: number) => { - if (Number(id) > 0) { - setIsWardLoading(true); - const { res, data } = await request(routes.getWardByLocalBody, { - pathParams: { id: String(id) }, - }); - if (res && data) { - setWard([...initialWard, ...data.results]); - } - setIsWardLoading(false); - } else { - setWard(initialLocalbodies); - } - }, - [props.id], - ); - - const validateForm = () => { - const errors = { ...initError }; - let invalidForm = false; - - Object.keys(state.form).forEach((field) => { - switch (field) { - case "address": - if (!state.form[field]) { - errors[field] = t("field_required"); - invalidForm = true; - } - return; - case "local_body": - if (!state.form[field] || state.form[field] === "0") { - errors[field] = "Please select local body"; - invalidForm = true; - } - return; - case "ward": - if (!state.form[field] || state.form[field] === "0") { - errors[field] = "Please select ward"; - invalidForm = true; - } - return; - case "patient_created": - if (state.form[field] !== "true" && state.form[field] !== "false") { - errors[field] = "Please select an option if the patient is created"; - invalidForm = true; - } - return; - default: - return; - } - }); - - if (invalidForm) { - dispatch({ type: "set_error", errors }); - return false; - } - dispatch({ type: "set_error", errors }); - return true; - }; - - const handleChange = (e: any) => { - const form = { ...state.form }; - form[e.name] = e.value; - if (e.name === "local_body") { - form["ward"] = "0"; - } - dispatch({ type: "set_form", form }); - }; - - const handleSubmit = async (e: any) => { - e.preventDefault(); - const validForm = validateForm(); - if (validForm) { - setIsLoading(true); - const rdata = { - address: state.form.address ? state.form.address : undefined, - local_body: state.form.local_body ? state.form.local_body : undefined, - ward: state.form.ward, - patient_created: state.form.patient_created === "true", - }; - - const { res, data } = await request(routes.partialUpdateExternalResult, { - pathParams: { id }, - body: rdata, - }); - - setIsLoading(false); - if (res && data) { - dispatch({ type: "set_form", form: initForm }); - Notification.Success({ - msg: "External Result updated successfully", - }); - navigate(`/external_results/${id}`); - } - } - }; - - if (isLoading || loading) { - return ; - } - - return ( -
- -
-
-

- {state.form.name} - {state.form.age} {state.form.age_in} -

-

- SRF ID: {state.form.srf_id} -

-

- Care external results ID: {id} -

-
-
handleSubmit(e)}> -
-
- -
-
- {isLocalbodyLoading ? ( - - ) : ( - localBody.name} - optionValue={(localBody) => localBody.id} - onChange={(e) => [handleChange(e), fetchWards(e.value)]} - error={state.errors.local_body} - /> - )} -
-
- {isWardLoading ? ( - - ) : ( - { - return { id: e.id, name: e.number + ": " + e.name }; - })} - value={state.form.ward} - optionLabel={(ward) => ward.name} - optionValue={(ward) => ward.id} - onChange={handleChange} - error={state.errors.ward} - /> - )} -
-
- option.label} - optionValue={(option) => option.value} - error={state.errors.patient_created} - /> -
-
-
- goBack()} /> - -
-
-
-
-
- ); -} diff --git a/src/Components/ExternalResult/models.ts b/src/Components/ExternalResult/models.ts index bc143593019..bc5f8d29e03 100644 --- a/src/Components/ExternalResult/models.ts +++ b/src/Components/ExternalResult/models.ts @@ -1,48 +1,3 @@ -export interface IExternalResultUploadCsv { - sample_tests: any[]; -} - -export interface IExternalResult { - id: number; - name: string; - age: number; - age_in: string; - test_type: string; - result: string; - result_date: string; - patient_created: boolean; - gender: string; - source: string; - is_repeat: boolean; - mobile_number: string; - patient_status: string; - sample_type: string; - sample_collection_date: string; - patient_category: string; - srf_id: string; - permanent_address: string; - test_id: string; - village: string; - district_object: { - id: number; - name: string; - state: number; - }; - district: number; - ward: number; - local_body: number; - address: string; - ward_object: { - id: number; - number: number; - name: string; - }; - local_body_object: { - id: number; - name: string; - }; -} - export interface ILocalBodies { id: number; name: string; @@ -52,27 +7,12 @@ export interface ILocalBodies { localbody_code: string; district: number; } - -export interface IDeleteExternalResult { - detail: string; -} export interface IDeleteBedCapacity { detail: string; } -export interface IPartialUpdateExternalResult { - address: string; - ward: number; - local_body: number; - patient_created: boolean; -} - export interface ILocalBodyByDistrict { id: number; name: string; state: number; } - -export interface IExternalResultCsv { - sample_tests: Partial[]; -} diff --git a/src/Components/Facility/AddBedForm.tsx b/src/Components/Facility/AddBedForm.tsx index 047549bd652..3bb43f9a27e 100644 --- a/src/Components/Facility/AddBedForm.tsx +++ b/src/Components/Facility/AddBedForm.tsx @@ -1,6 +1,6 @@ import Card from "../../CAREUI/display/Card"; -import { useState, lazy, SyntheticEvent } from "react"; +import { useState, SyntheticEvent } from "react"; import * as Notification from "../../Utils/Notifications.js"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; @@ -15,8 +15,7 @@ import useAppHistory from "../../Common/hooks/useAppHistory"; import request from "../../Utils/request/request"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface Props { facilityId: string; locationId: string; diff --git a/src/Components/Facility/AddInventoryForm.tsx b/src/Components/Facility/AddInventoryForm.tsx index 673e9949025..08fd7479dc8 100644 --- a/src/Components/Facility/AddInventoryForm.tsx +++ b/src/Components/Facility/AddInventoryForm.tsx @@ -1,4 +1,4 @@ -import { useReducer, useState, useEffect, lazy } from "react"; +import { useReducer, useState, useEffect } from "react"; import Card from "../../CAREUI/display/Card"; import * as Notification from "../../Utils/Notifications.js"; import Page from "../Common/components/Page"; @@ -11,8 +11,7 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const initForm = { id: "", quantity: "", diff --git a/src/Components/Facility/AddLocationForm.tsx b/src/Components/Facility/AddLocationForm.tsx index cdb7506cbec..5b480d89d89 100644 --- a/src/Components/Facility/AddLocationForm.tsx +++ b/src/Components/Facility/AddLocationForm.tsx @@ -1,4 +1,4 @@ -import { useState, lazy, SyntheticEvent } from "react"; +import { useState, SyntheticEvent } from "react"; import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; import { Submit, Cancel } from "../Common/components/ButtonV2"; @@ -11,8 +11,7 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface Props { facilityId: string; locationId?: string; diff --git a/src/Components/Facility/AssetCreate.tsx b/src/Components/Facility/AssetCreate.tsx index efa222308b3..110bf525509 100644 --- a/src/Components/Facility/AssetCreate.tsx +++ b/src/Components/Facility/AssetCreate.tsx @@ -7,7 +7,6 @@ import { MutableRefObject, RefObject, createRef, - lazy, useEffect, useReducer, useState, @@ -37,8 +36,7 @@ import routes from "../../Redux/api.js"; import request from "../../Utils/request/request.js"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const formErrorKeys = [ "name", "asset_class", diff --git a/src/Components/Facility/BedManagement.tsx b/src/Components/Facility/BedManagement.tsx index b46323b74bb..5816ff58d4b 100644 --- a/src/Components/Facility/BedManagement.tsx +++ b/src/Components/Facility/BedManagement.tsx @@ -1,4 +1,4 @@ -import { lazy, useState } from "react"; +import { useState } from "react"; import ButtonV2 from "../Common/components/ButtonV2"; import { BedModel } from "./models"; import { ReactElement } from "react"; @@ -13,8 +13,7 @@ import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; import useFilters from "../../Common/hooks/useFilters"; import useAuthUser from "../../Common/hooks/useAuthUser"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface BedManagementProps { facilityId: string; locationId: string; diff --git a/src/Components/Facility/ConsultationClaims.tsx b/src/Components/Facility/ConsultationClaims.tsx index 41535ce1853..853d44c3c4c 100644 --- a/src/Components/Facility/ConsultationClaims.tsx +++ b/src/Components/Facility/ConsultationClaims.tsx @@ -2,7 +2,7 @@ import * as Notification from "../../Utils/Notifications"; import ClaimCard from "../HCX/ClaimCard"; import CreateClaimCard from "../HCX/CreateClaimCard"; -import PageTitle from "../Common/PageTitle"; +import PageTitle from "@/Components/Common/PageTitle"; import { navigate } from "raviger"; import routes from "../../Redux/api"; import { useMessageListener } from "../../Common/hooks/useMessageListener"; diff --git a/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx index ea0e466dffa..48cdc363f9b 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx @@ -1,8 +1,7 @@ -import { lazy } from "react"; import { ConsultationTabProps } from "./index"; import { ABGPlots } from "../Consultations/ABGPlots"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationABGTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx index 43aaf627534..8bd5201d922 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx @@ -1,8 +1,7 @@ -import { lazy } from "react"; import { ConsultationTabProps } from "./index"; import { DialysisPlots } from "../Consultations/DialysisPlots"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationDialysisTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx index 99e25067c34..7f49fda1581 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx @@ -1,4 +1,3 @@ -import { lazy } from "react"; import { ConsultationTabProps } from "./index"; import { NonReadOnlyUsers } from "../../../Utils/AuthorizeFor"; import ButtonV2 from "../../Common/components/ButtonV2"; @@ -7,7 +6,7 @@ import CareIcon from "../../../CAREUI/icons/CareIcon"; import InvestigationTab from "../Investigations/investigationsTab"; import { t } from "i18next"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationInvestigationsTab = (props: ConsultationTabProps) => { return (
diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx index d6e0b611003..7aed6bb96d5 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx @@ -1,8 +1,7 @@ -import { lazy } from "react"; import { NeurologicalTable } from "../Consultations/NeurologicalTables"; import { ConsultationTabProps } from "./index"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationNeurologicalMonitoringTab = ( props: ConsultationTabProps, diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx index 2f689c82d19..63e3330bffd 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx @@ -1,4 +1,4 @@ -import { lazy, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { ConsultationTabProps } from "./index"; import { NursingPlot } from "../Consultations/NursingPlot"; import { useTranslation } from "react-i18next"; @@ -10,7 +10,7 @@ import { classNames, formatDate, formatTime } from "../../../Utils/utils"; import Pagination from "../../Common/Pagination"; import { PAGINATION_LIMIT } from "../../../Common/constants"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export default function ConsultationNursingTab(props: ConsultationTabProps) { const { t } = useTranslation(); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx index 75e0987cffd..f1b51ec4b81 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx @@ -1,8 +1,7 @@ -import { lazy } from "react"; import { ConsultationTabProps } from "./index"; import { NutritionPlots } from "../Consultations/NutritionPlots"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationNutritionTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx index 05327ca6870..5f8c0403afe 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx @@ -1,8 +1,7 @@ -import { lazy } from "react"; import { ConsultationTabProps } from "./index"; import { PressureSoreDiagrams } from "../Consultations/PressureSoreDiagrams"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationPressureSoreTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx index 09f6cb05a7b..ef4482b674c 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx @@ -1,8 +1,7 @@ -import { lazy } from "react"; import { ConsultationTabProps } from "./index"; import { PrimaryParametersPlot } from "../Consultations/PrimaryParametersPlot"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationSummaryTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index a1f898ee9c5..88b9b292eea 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -1,4 +1,4 @@ -import { lazy, useState } from "react"; +import { useState } from "react"; import { ConsultationTabProps } from "./index"; import { AssetBedModel, AssetClass, AssetData } from "../../Assets/AssetTypes"; import { BedModel } from "../models"; @@ -25,7 +25,7 @@ import CareIcon from "../../../CAREUI/icons/CareIcon"; import EncounterSymptomsCard from "../../Symptoms/SymptomsCard"; import Tabs from "../../Common/components/Tabs"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { const [hl7SocketUrl, setHL7SocketUrl] = useState(); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx index 36a72ab789e..3381045faeb 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx @@ -1,8 +1,7 @@ -import { lazy } from "react"; import { ConsultationTabProps } from "./index"; import { VentilatorPlot } from "../Consultations/VentilatorPlot"; -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import PageTitle from "@/Components/Common/PageTitle"; export const ConsultationVentilatorTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index f09d4547850..fd1af1a2ad1 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -1,6 +1,6 @@ import { GENDER_TYPES } from "../../../Common/constants"; import { ConsultationModel } from "../models"; -import { lazy, useCallback, useEffect, useState } from "react"; +import { useCallback, useEffect, useState } from "react"; import DoctorVideoSlideover from "../DoctorVideoSlideover"; import { PatientModel } from "../../Patient/models"; import { @@ -39,8 +39,8 @@ import Error404 from "../../ErrorPages/404"; import { useTranslation } from "react-i18next"; import useQuery from "../../../Utils/request/useQuery"; -const Loading = lazy(() => import("../../Common/Loading")); -const PageTitle = lazy(() => import("../../Common/PageTitle")); +import Loading from "@/Components/Common/Loading"; +import PageTitle from "@/Components/Common/PageTitle"; export interface ConsultationTabProps { consultationId: string; diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx index 06b50d69912..ef3d7daa781 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/Components/Facility/ConsultationForm.tsx @@ -15,7 +15,7 @@ import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; import InvestigationBuilder, { InvestigationType, } from "../Common/prescription-builder/InvestigationBuilder"; -import { LegacyRef, createRef, lazy, useEffect, useRef, useState } from "react"; +import { LegacyRef, createRef, useEffect, useRef, useState } from "react"; import ProcedureBuilder, { ProcedureType, } from "../Common/prescription-builder/ProcedureBuilder"; @@ -66,8 +66,8 @@ import { } from "../Symptoms/SymptomsBuilder.js"; import careConfig from "@careConfig"; -const Loading = lazy(() => import("../Common/Loading")); -const PageTitle = lazy(() => import("../Common/PageTitle")); +import Loading from "@/Components/Common/Loading"; +import PageTitle from "@/Components/Common/PageTitle"; type BooleanStrings = "true" | "false"; diff --git a/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx b/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx index 271c39709ad..e6d45c706af 100644 --- a/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx +++ b/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx @@ -8,7 +8,7 @@ import { PAGINATION_LIMIT } from "../../../Common/constants"; import { formatDateTime } from "../../../Utils/utils"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { PainDiagrams } from "./PainDiagrams"; -import PageTitle from "../../Common/PageTitle"; +import PageTitle from "@/Components/Common/PageTitle"; import dayjs from "../../../Utils/dayjs"; import { meanArterialPressure } from "../../Common/BloodPressureFormField"; import { PrimaryParametersPlotFields } from "../models"; diff --git a/src/Components/Facility/CoverImageEditModal.tsx b/src/Components/Facility/CoverImageEditModal.tsx index d65a1d0ebfd..f3b2b3ab761 100644 --- a/src/Components/Facility/CoverImageEditModal.tsx +++ b/src/Components/Facility/CoverImageEditModal.tsx @@ -1,11 +1,11 @@ -import { +import React, { + useState, ChangeEventHandler, useCallback, useEffect, useRef, - useState, } from "react"; -import { Success } from "../../Utils/Notifications"; +import { Success, Warn } from "../../Utils/Notifications"; import useDragAndDrop from "../../Utils/useDragAndDrop"; import { sleep } from "../../Utils/utils"; import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; @@ -67,9 +67,11 @@ const CoverImageEditModal = ({ const LaptopScreenBreakpoint = 640; const isLaptopScreen = width >= LaptopScreenBreakpoint; const { t } = useTranslation(); + const [isDragging, setIsDragging] = useState(false); + const handleSwitchCamera = useCallback(() => { - setConstraint((prev) => - prev.facingMode === "user" + setConstraint( + constraint.facingMode === "user" ? VideoConstraints.environment : VideoConstraints.user, ); @@ -85,6 +87,7 @@ const CoverImageEditModal = ({ setSelectedFile(myFile); }); }; + const closeModal = () => { setPreview(undefined); setSelectedFile(undefined); @@ -162,11 +165,25 @@ const CoverImageEditModal = ({ const onDrop = (e: React.DragEvent) => { e.preventDefault(); dragProps.setDragOver(false); - const dropedFile = e?.dataTransfer?.files[0]; - if (dropedFile.type.split("/")[0] !== "image") + setIsDragging(false); + const droppedFile = e?.dataTransfer?.files[0]; + if (droppedFile.type.split("/")[0] !== "image") return dragProps.setFileDropError("Please drop an image file to upload!"); - setSelectedFile(dropedFile); + setSelectedFile(droppedFile); + }; + + const onDragOver = (e: React.DragEvent) => { + e.preventDefault(); + dragProps.onDragOver(e); + setIsDragging(true); + }; + + const onDragLeave = (e: React.DragEvent) => { + e.preventDefault(); + dragProps.onDragLeave(); + setIsDragging(false); }; + const commonHint = ( <> {t("max_size_for_image_uploaded_should_be")} 1mb. @@ -202,16 +219,16 @@ const CoverImageEditModal = ({ ) : (

{ + setConstraint(() => VideoConstraints.user); setIsCameraOpen(true); }} > @@ -322,6 +346,10 @@ const CoverImageEditModal = ({ width={1280} ref={webRef} videoConstraints={constraint} + onUserMediaError={(_e) => { + setIsCameraOpen(false); + Warn({ msg: t("camera_permission_denied") }); + }} /> ) : ( diff --git a/src/Components/Facility/FacilityConfigure.tsx b/src/Components/Facility/FacilityConfigure.tsx index 320cbd7ecc5..2d948bb9cf7 100644 --- a/src/Components/Facility/FacilityConfigure.tsx +++ b/src/Components/Facility/FacilityConfigure.tsx @@ -1,4 +1,4 @@ -import { lazy, useReducer, useState } from "react"; +import { useReducer, useState } from "react"; import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; import { Submit } from "../Common/components/ButtonV2"; @@ -10,8 +10,7 @@ import routes from "../../Redux/api"; import request from "../../Utils/request/request"; import { FieldChangeEvent } from "../Form/FormFields/Utils.js"; import { t } from "i18next"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const initForm = { name: "", state: 0, diff --git a/src/Components/Facility/FacilityCreate.tsx b/src/Components/Facility/FacilityCreate.tsx index e9e95fbcdfc..81bc6f48125 100644 --- a/src/Components/Facility/FacilityCreate.tsx +++ b/src/Components/Facility/FacilityCreate.tsx @@ -23,7 +23,7 @@ import { PopoverPanel, Transition, } from "@headlessui/react"; -import { lazy, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import Steps, { Step } from "../Common/Steps"; import { getPincodeDetails, @@ -65,8 +65,7 @@ import useAuthUser from "../../Common/hooks/useAuthUser"; import SpokeFacilityEditor from "./SpokeFacilityEditor.js"; import careConfig from "@careConfig"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface FacilityProps { facilityId?: string; } @@ -851,14 +850,14 @@ export const FacilityCreate = (props: FacilityProps) => { required types={["mobile", "landline"]} /> -

-

{t("spokes")}

- {facilityId && ( + {facilityId && ( +
+

{t("spokes")}

- )} -
+
+ )}
import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export const getFacilityFeatureIcon = (featureId: number) => { const feature = FACILITY_FEATURE_TYPES.find((f) => f.id === featureId); if (!feature?.icon) return null; diff --git a/src/Components/Facility/FacilityUsers.tsx b/src/Components/Facility/FacilityUsers.tsx index 3c6cfa9f003..f7fe62810fc 100644 --- a/src/Components/Facility/FacilityUsers.tsx +++ b/src/Components/Facility/FacilityUsers.tsx @@ -1,4 +1,4 @@ -import { lazy, useState } from "react"; +import { useState } from "react"; import CountBlock from "../../CAREUI/display/Count"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { RESULTS_PER_PAGE_LIMIT } from "../../Common/constants"; @@ -17,8 +17,7 @@ import useQuery from "../../Utils/request/useQuery"; import { UserFacilities } from "../Users/ManageUsers"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function FacilityUsers(props: any) { const { t } = useTranslation(); const { facilityId } = props; diff --git a/src/Components/Facility/HospitalList.tsx b/src/Components/Facility/HospitalList.tsx index ca67fd0eb2c..e7949440307 100644 --- a/src/Components/Facility/HospitalList.tsx +++ b/src/Components/Facility/HospitalList.tsx @@ -1,4 +1,4 @@ -import { lazy, useEffect } from "react"; +import { useEffect } from "react"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CountBlock from "../../CAREUI/display/Count"; import ExportMenu from "../Common/Export"; @@ -17,8 +17,7 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import CareIcon from "../../CAREUI/icons/CareIcon"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export const HospitalList = () => { const { qParams, diff --git a/src/Components/Facility/InventoryList.tsx b/src/Components/Facility/InventoryList.tsx index fe7e846630d..c7f11f6d3bc 100644 --- a/src/Components/Facility/InventoryList.tsx +++ b/src/Components/Facility/InventoryList.tsx @@ -1,4 +1,4 @@ -import { useState, lazy } from "react"; +import { useState } from "react"; import { navigate } from "raviger"; import Pagination from "../Common/Pagination"; import { classNames } from "../../Utils/utils"; @@ -7,8 +7,7 @@ import ButtonV2 from "../Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function InventoryList(props: any) { const { facilityId }: any = props; let inventoryItem: any = null; diff --git a/src/Components/Facility/InventoryLog.tsx b/src/Components/Facility/InventoryLog.tsx index b8b1ed71e31..0450801f4b0 100644 --- a/src/Components/Facility/InventoryLog.tsx +++ b/src/Components/Facility/InventoryLog.tsx @@ -1,4 +1,4 @@ -import { useState, lazy } from "react"; +import { useState } from "react"; import * as Notification from "../../Utils/Notifications.js"; import Pagination from "../Common/Pagination"; @@ -10,8 +10,7 @@ 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")); - +import Loading from "@/Components/Common/Loading"; export default function InventoryLog(props: any) { const { facilityId, inventoryId }: any = props; const [saving, setSaving] = useState(false); diff --git a/src/Components/Facility/Investigations/ShowInvestigation.tsx b/src/Components/Facility/Investigations/ShowInvestigation.tsx index d7def1af6cc..bc0621af7d9 100644 --- a/src/Components/Facility/Investigations/ShowInvestigation.tsx +++ b/src/Components/Facility/Investigations/ShowInvestigation.tsx @@ -1,6 +1,6 @@ import * as _ from "lodash-es"; import { navigate } from "raviger"; -import { lazy, useCallback, useReducer } from "react"; +import { useCallback, useReducer } from "react"; import routes from "../../../Redux/api"; import * as Notification from "../../../Utils/Notifications.js"; import request from "../../../Utils/request/request"; @@ -8,8 +8,7 @@ import useQuery from "../../../Utils/request/useQuery"; import InvestigationTable from "./InvestigationTable"; import PrintPreview from "../../../CAREUI/misc/PrintPreview"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const initialState = { changedFields: {}, initialValues: {}, diff --git a/src/Components/Facility/Investigations/ViewInvestigations.tsx b/src/Components/Facility/Investigations/ViewInvestigations.tsx index 96156fa5d74..22c811f41fa 100644 --- a/src/Components/Facility/Investigations/ViewInvestigations.tsx +++ b/src/Components/Facility/Investigations/ViewInvestigations.tsx @@ -1,14 +1,12 @@ import { navigate } from "raviger"; import ReportTable from "./Reports/ReportTable"; -import { lazy } from "react"; import { useTranslation } from "react-i18next"; import { formatDateTime } from "../../../Utils/utils"; import { InvestigationResponse } from "./Reports/types"; import { InvestigationSessionType } from "./investigationsTab"; -const Loading = lazy(() => import("../../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function ViewInvestigations(props: { isLoading: boolean; investigations: InvestigationResponse; diff --git a/src/Components/Facility/Investigations/index.tsx b/src/Components/Facility/Investigations/index.tsx index b64e2995e19..df93c7945c6 100644 --- a/src/Components/Facility/Investigations/index.tsx +++ b/src/Components/Facility/Investigations/index.tsx @@ -1,5 +1,5 @@ import { navigate, useQueryParams } from "raviger"; -import { lazy, useEffect, useReducer, useState } from "react"; +import { useEffect, useReducer, useState } from "react"; import * as Notification from "../../../Utils/Notifications.js"; import { TestTable } from "./Table"; @@ -12,8 +12,7 @@ import { Submit } from "../../Common/components/ButtonV2"; import Page from "../../Common/components/Page"; import AutocompleteMultiSelectFormField from "../../Form/FormFields/AutocompleteMultiselect"; -const Loading = lazy(() => import("../../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const initialState = { form: {}, }; diff --git a/src/Components/Facility/LocationManagement.tsx b/src/Components/Facility/LocationManagement.tsx index 83bf335aff2..1aaf57b7233 100644 --- a/src/Components/Facility/LocationManagement.tsx +++ b/src/Components/Facility/LocationManagement.tsx @@ -1,4 +1,4 @@ -import { lazy, useState } from "react"; +import { useState } from "react"; import ButtonV2, { Cancel } from "../Common/components/ButtonV2"; import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import CareIcon from "../../CAREUI/icons/CareIcon"; @@ -13,9 +13,9 @@ import ConfirmDialog from "../Common/ConfirmDialog"; import DialogModal from "../Common/Dialog"; import Uptime from "../Common/Uptime"; import useAuthUser from "../../Common/hooks/useAuthUser"; +import useQuery from "../../Utils/request/useQuery"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface Props { facilityId: string; } @@ -224,97 +224,120 @@ const Location = ({ disabled, setShowDeletePopup, facilityId, -}: LocationProps) => ( -
-
-
-
-

- {name} -

-
-

- {location_type} +}: LocationProps) => { + const { loading, data } = useQuery(routes.listFacilityBeds, { + query: { + facility: facilityId, + location: id, + }, + }); + + const totalBeds = data?.count ?? 0; + + if (loading) { + return ; + } + + return ( +

+
+
+
+

+ {name}

+
+

+ {location_type} +

+
-
-

- {description || "-"} -

-

- Middleware Address: -

-

- {middleware_address || "-"} -

- - Middleware Uptime -

- } - centerInfoPanel - /> -
- - - - Manage Beds - -
-
- - - Edit - -
-
- - setShowDeletePopup({ open: true, name: name ?? "", id: id ?? "" }) - } + {description || "-"} +

+

+ Middleware Address: +

+

- - Delete - + {middleware_address || "-"} +

+ + Middleware Uptime +

+ } + centerInfoPanel + /> +
+ + + Manage Beds + + + {totalBeds} + + +
+
+ + + Edit + +
+
+ + setShowDeletePopup({ open: true, name: name ?? "", id: id ?? "" }) + } + > + + Delete + +
-
-
- - +
+ + +
-
-); + ); +}; diff --git a/src/Components/Facility/MinQuantityList.tsx b/src/Components/Facility/MinQuantityList.tsx index 528f03cbac7..eeff6a7fed4 100644 --- a/src/Components/Facility/MinQuantityList.tsx +++ b/src/Components/Facility/MinQuantityList.tsx @@ -1,4 +1,4 @@ -import { useState, lazy } from "react"; +import { useState } from "react"; import Pagination from "../Common/Pagination"; import { MinQuantityRequiredModal } from "./MinQuantityRequiredModal"; import ButtonV2 from "../Common/components/ButtonV2"; @@ -6,8 +6,7 @@ import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import Page from "../Common/components/Page"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function MinQuantityList(props: any) { const { facilityId }: any = props; let inventoryItem: any = null; diff --git a/src/Components/Facility/TriageForm.tsx b/src/Components/Facility/TriageForm.tsx index 1aa0537b53c..4413d9a48db 100644 --- a/src/Components/Facility/TriageForm.tsx +++ b/src/Components/Facility/TriageForm.tsx @@ -2,7 +2,7 @@ import ConfirmDialog from "../Common/ConfirmDialog"; import Card from "../../CAREUI/display/Card"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useReducer, useState, lazy } from "react"; +import { useReducer, useState } from "react"; import * as Notification from "../../Utils/Notifications.js"; import TextFormField from "../Form/FormFields/TextFormField"; import { PatientStatsModel } from "./models"; @@ -10,7 +10,7 @@ import { Cancel, Submit } from "../Common/components/ButtonV2"; import useAppHistory from "../../Common/hooks/useAppHistory"; import DateFormField from "../Form/FormFields/DateFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; -const Loading = lazy(() => import("../Common/Loading")); +import Loading from "@/Components/Common/Loading"; import Page from "../Common/components/Page"; import dayjs from "dayjs"; import { dateQueryString, scrollTo } from "../../Utils/utils"; diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx index 56c70f2ac94..8103ebb6729 100644 --- a/src/Components/Facility/models.tsx +++ b/src/Components/Facility/models.tsx @@ -5,6 +5,7 @@ import { ConsultationSuggestionValue, DISCHARGE_REASONS, PATIENT_NOTES_THREADS, + SHIFTING_CHOICES_PEACETIME, UserRole, } from "../../Common/constants"; import { FeatureFlag } from "../../Utils/featureFlags"; @@ -15,12 +16,13 @@ import { DailyRoundsModel, FacilityNameModel, FileUploadModel, + PatientModel, } from "../Patient/models"; import { EncounterSymptom } from "../Symptoms/types"; +import { UserBareMinimum, UserModel } from "../Users/models"; import { InvestigationType } from "../Common/prescription-builder/InvestigationBuilder"; import { ProcedureType } from "../Common/prescription-builder/ProcedureBuilder"; import { RouteToFacility } from "../Common/RouteToFacilitySelect"; -import { UserBareMinimum } from "../Users/models"; export interface LocalBodyModel { id: number; @@ -676,3 +678,50 @@ export type PatientTransferResponse = { date_of_birth: string; facility_object: BaseFacilityModel; }; + +export interface ShiftingModel { + assigned_facility: string; + assigned_facility_external: string | null; + assigned_facility_object: FacilityModel; + created_date: string; + emergency: boolean; + external_id: string; + id: string; + modified_date: string; + origin_facility_object: FacilityModel; + patient: string; + patient_object: PatientModel; + shifting_approving_facility_object: FacilityModel | null; + status: (typeof SHIFTING_CHOICES_PEACETIME)[number]["text"]; + assigned_to_object?: UserModel; +} + +export interface ResourceModel { + approving_facility: string | null; + approving_facility_object: FacilityModel | null; + assigned_facility: string | null; + assigned_facility_object: FacilityModel | null; + assigned_quantity: number; + assigned_to: string | null; + assigned_to_object: UserModel | null; + category: string; + created_by: number; + created_by_object: UserModel; + created_date: string; + emergency: boolean; + id: string; + is_assigned_to_user: boolean; + last_edited_by: number; + last_edited_by_object: UserModel; + modified_date: string; + origin_facility: string; + origin_facility_object: FacilityModel; + priority: number | null; + reason: string; + refering_facility_contact_name: string; + refering_facility_contact_number: string; + requested_quantity: number; + status: string; + sub_category: string; + title: string; +} diff --git a/src/Components/Form/Form.tsx b/src/Components/Form/Form.tsx index 31afc594447..4bf4bd22d01 100644 --- a/src/Components/Form/Form.tsx +++ b/src/Components/Form/Form.tsx @@ -13,7 +13,6 @@ type Props = { className?: string; defaults: T; asyncGetDefaults?: (() => Promise) | false; - onlyChild?: boolean; validate?: (form: T) => FormErrors; onSubmit: (form: T) => Promise | void>; onCancel?: () => void; @@ -23,6 +22,7 @@ type Props = { cancelLabel?: string; onDraftRestore?: (newState: FormState) => void; children: (props: FormContextValue) => React.ReactNode; + hideRestoreDraft?: boolean; }; const Form = ({ @@ -87,47 +87,43 @@ const Form = ({ props.onDraftRestore?.(newState); }} formData={state.form} - /> - ) => { - return { - name, - id: name, - onChange: ({ name, value }: FieldChangeEvent) => - dispatch({ - type: "set_field", - name, - value, - error: validate?.(value), - }), - value: state.form[name], - error: state.errors[name], - disabled, - }; - }} + hidden={props.hideRestoreDraft} > - {props.onlyChild ? ( - {props.children} - ) : ( - <> -
- {props.children} -
-
- - -
- - )} -
+ ) => { + return { + name, + id: name, + onChange: ({ name, value }: FieldChangeEvent) => + dispatch({ + type: "set_field", + name, + value, + error: validate?.(value), + }), + value: state.form[name], + error: state.errors[name], + disabled, + }; + }} + > +
+ {props.children} +
+
+ + +
+
+ ); }; diff --git a/src/Components/Kanban/Board.tsx b/src/Components/Kanban/Board.tsx new file mode 100644 index 00000000000..d2ab5da998f --- /dev/null +++ b/src/Components/Kanban/Board.tsx @@ -0,0 +1,190 @@ +import { + DragDropContext, + Draggable, + Droppable, + OnDragEndResponder, +} from "@hello-pangea/dnd"; +import { ReactNode, RefObject, useEffect, useRef, useState } from "react"; +import { QueryRoute } from "../../Utils/request/types"; +import { QueryOptions } from "../../Utils/request/useQuery"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import request from "../../Utils/request/request"; +import { useTranslation } from "react-i18next"; + +interface KanbanBoardProps { + title?: ReactNode; + onDragEnd: OnDragEndResponder; + sections: { + id: string; + title: ReactNode; + fetchOptions: ( + id: string, + ...args: unknown[] + ) => { + route: QueryRoute; + options?: QueryOptions; + }; + }[]; + itemRender: (item: T) => ReactNode; +} + +export default function KanbanBoard( + props: KanbanBoardProps, +) { + const board = useRef(null); + + return ( +
+
+
{props.title}
+
+ {[0, 1].map((button, i) => ( + + ))} +
+
+ +
+
+ {props.sections.map((section, i) => ( + + key={i} + section={section} + itemRender={props.itemRender} + boardRef={board} + /> + ))} +
+
+
+
+ ); +} + +export function KanbanSection( + props: Omit, "sections" | "onDragEnd"> & { + section: KanbanBoardProps["sections"][number]; + boardRef: RefObject; + }, +) { + const { section } = props; + const [offset, setOffset] = useState(0); + const [pages, setPages] = useState([]); + const [fetchingNextPage, setFetchingNextPage] = useState(false); + const [hasMore, setHasMore] = useState(true); + const [totalCount, setTotalCount] = useState(); + + const options = section.fetchOptions(section.id); + const sectionRef = useRef(null); + const defaultLimit = 14; + const { t } = useTranslation(); + + // should be replaced with useInfiniteQuery when we move over to react query + + const fetchNextPage = async (refresh: boolean = false) => { + if (!refresh && (fetchingNextPage || !hasMore)) return; + if (refresh) setPages([]); + const offsetToUse = refresh ? 0 : offset; + setFetchingNextPage(true); + const res = await request(options.route, { + ...options.options, + query: { ...options.options?.query, offsetToUse, limit: defaultLimit }, + }); + const newPages = refresh ? [] : [...pages]; + const page = Math.floor(offsetToUse / defaultLimit); + if (res.error) return; + newPages[page] = (res.data as any).results; + setPages(newPages); + setHasMore(!!(res.data as any)?.next); + setTotalCount((res.data as any)?.count); + setOffset(offsetToUse + defaultLimit); + setFetchingNextPage(false); + }; + + const items = pages.flat(); + + useEffect(() => { + const onBoardReachEnd = async () => { + const sectionElementHeight = + sectionRef.current?.getBoundingClientRect().height; + const scrolled = props.boardRef.current?.scrollTop; + // if user has scrolled 3/4th of the current items + if ( + scrolled && + sectionElementHeight && + scrolled > sectionElementHeight * (3 / 4) + ) { + fetchNextPage(); + } + }; + + props.boardRef.current?.addEventListener("scroll", onBoardReachEnd); + return () => + props.boardRef.current?.removeEventListener("scroll", onBoardReachEnd); + }, [props.boardRef, fetchingNextPage, hasMore]); + + useEffect(() => { + fetchNextPage(true); + }, [props.section]); + + return ( + + {(provided) => ( +
+
+
+
{section.title}
+
+ + {typeof totalCount === "undefined" ? "..." : totalCount} + +
+
+
+
+ {!fetchingNextPage && totalCount === 0 && ( +
+ {t("no_results_found")} +
+ )} + {items + .filter((item) => item) + .map((item, i) => ( + + {(provided) => ( +
+ {props.itemRender(item)} +
+ )} +
+ ))} + {fetchingNextPage && ( +
+ )} +
+
+ )} + + ); +} diff --git a/src/Components/LogUpdate/Sections/PressureSore/PressureSore.tsx b/src/Components/LogUpdate/Sections/PressureSore/PressureSore.tsx index a56457ef257..63970d4c25c 100644 --- a/src/Components/LogUpdate/Sections/PressureSore/PressureSore.tsx +++ b/src/Components/LogUpdate/Sections/PressureSore/PressureSore.tsx @@ -14,6 +14,7 @@ import { IPressureSore } from "../../../Patient/models"; import { Error } from "../../../../Utils/Notifications"; import { classNames, getValueDescription } from "../../../../Utils/utils"; import { calculatePushScore } from "./utils"; +import { useTranslation } from "react-i18next"; const PressureSore = ({ log, onChange, readonly }: LogUpdateSectionProps) => { const value = log.pressure_sore ?? []; @@ -104,6 +105,8 @@ const RegionEditor = (props: RegionEditorProps) => { const isReadOnly = !props.onSave; + const { t } = useTranslation(); + return ( {
{ onChange={(e) => update({ width: parseFloat(e.value) })} /> import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface MedicinePrescriptionSummaryProps { consultation: string; } diff --git a/src/Components/Medicine/PrescriptionBuilder.tsx b/src/Components/Medicine/PrescriptionBuilder.tsx index a65f9dd9a62..18efa27ee08 100644 --- a/src/Components/Medicine/PrescriptionBuilder.tsx +++ b/src/Components/Medicine/PrescriptionBuilder.tsx @@ -149,5 +149,9 @@ export default function PrescriptionBuilder({ const DefaultPrescription: Partial = { dosage_type: "REGULAR", + route: "ORAL", +}; +const DefaultPRNPrescription: Partial = { + dosage_type: "PRN", + route: "ORAL", }; -const DefaultPRNPrescription: Partial = { dosage_type: "PRN" }; diff --git a/src/Components/Patient/DailyRoundListDetails.tsx b/src/Components/Patient/DailyRoundListDetails.tsx index eb7eda62064..db68bc734d7 100644 --- a/src/Components/Patient/DailyRoundListDetails.tsx +++ b/src/Components/Patient/DailyRoundListDetails.tsx @@ -1,4 +1,4 @@ -import { lazy, useState } from "react"; +import { useState } from "react"; import { DailyRoundsModel } from "./models"; import Page from "../Common/components/Page"; import ButtonV2 from "../Common/components/ButtonV2"; @@ -6,8 +6,7 @@ import { formatDateTime } from "../../Utils/utils"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export const DailyRoundListDetails = (props: any) => { const { t } = useTranslation(); const { facilityId, patientId, consultationId, id } = props; diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx index ef1281fb62b..bf25d48f6bf 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/Components/Patient/DailyRounds.tsx @@ -1,7 +1,7 @@ import { navigate } from "raviger"; import dayjs from "dayjs"; -import { lazy, useCallback, useEffect, useState } from "react"; +import { useCallback, useEffect, useState } from "react"; import { APPETITE_CHOICES, BLADDER_DRAINAGE_CHOICES, @@ -58,8 +58,7 @@ import { scrollTo } from "../../Utils/utils"; import { ICD11DiagnosisModel } from "../Facility/models"; import NursingCare from "../LogUpdate/Sections/NursingCare"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export const DailyRounds = (props: any) => { const { t } = useTranslation(); const authUser = useAuthUser(); diff --git a/src/Components/Patient/DiagnosesFilter.tsx b/src/Components/Patient/DiagnosesFilter.tsx index 1217e821389..ba58a549dac 100644 --- a/src/Components/Patient/DiagnosesFilter.tsx +++ b/src/Components/Patient/DiagnosesFilter.tsx @@ -68,6 +68,7 @@ export default function DiagnosesFilter(props: Props) { return ( import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface IProps { facilityId: string; id: string; diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index 0ad1b81705b..0be6fe6b819 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -12,7 +12,7 @@ import { } from "../../Common/constants"; import { FacilityModel, PatientCategory } from "../Facility/models"; import { Link, navigate } from "raviger"; -import { ReactNode, lazy, useEffect, useState } from "react"; +import { ReactNode, useEffect, useState } from "react"; import { parseOptionId } from "../../Common/utils"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; @@ -53,9 +53,9 @@ import { ICD11DiagnosisModel } from "../Diagnosis/types.js"; import { getDiagnosesByIds } from "../Diagnosis/utils.js"; import Tabs from "../Common/components/Tabs.js"; import request from "../../Utils/request/request.js"; +import { Avatar } from "../Common/Avatar.js"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface TabPanelProps { children?: ReactNode; dir?: string; @@ -542,9 +542,10 @@ export const PatientManager = () => {
) : (
-
)} @@ -890,7 +891,7 @@ export const PatientManager = () => { selected={qParams.ordering} onSelect={updateQuery} /> -
+
{!isExportAllowed ? ( { @@ -966,7 +967,7 @@ export const PatientManager = () => {
-
+
Gender o.text} @@ -304,6 +305,7 @@ export default function PatientFilter(props: any) {
Category o.text} @@ -407,6 +409,7 @@ export default function PatientFilter(props: any) {
Telemedicine o.text} @@ -423,6 +426,7 @@ export default function PatientFilter(props: any) {
Respiratory Support o.text} @@ -455,6 +459,7 @@ export default function PatientFilter(props: any) { <> Review Missed (o === "true" ? "Yes" : "No")} @@ -469,6 +474,7 @@ export default function PatientFilter(props: any) {
Is Medico-Legal Case @@ -484,6 +490,7 @@ export default function PatientFilter(props: any) { />
{!props.dischargePage && ( -
+
Facility Facility type o.text} @@ -640,6 +648,7 @@ export default function PatientFilter(props: any) { LSG Body
-
+
District import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export const parseOccupation = (occupation: string | undefined) => { return OCCUPATION_TYPES.find((i) => i.value === occupation)?.text; }; diff --git a/src/Components/Patient/PatientRegister.tsx b/src/Components/Patient/PatientRegister.tsx index 3eb9590659c..58a882d184d 100644 --- a/src/Components/Patient/PatientRegister.tsx +++ b/src/Components/Patient/PatientRegister.tsx @@ -25,7 +25,7 @@ import { parsePhoneNumber, scrollTo, } from "../../Utils/utils"; -import { lazy, useCallback, useReducer, useRef, useState } from "react"; +import { useCallback, useReducer, useRef, useState } from "react"; import { navigate } from "raviger"; import { statusType, useAbortableEffect } from "../../Common/utils"; @@ -68,8 +68,9 @@ import { validatePincode } from "../../Common/validation"; import careConfig from "@careConfig"; import { Button } from "@/Components/ui/button"; -const Loading = lazy(() => import("../Common/Loading")); -const PageTitle = lazy(() => import("../Common/PageTitle")); +import Loading from "@/Components/Common/Loading"; +import PageTitle from "@/Components/Common/PageTitle"; +import { RestoreDraftButton } from "@/Utils/AutoSave.js"; type PatientForm = PatientModel & PatientMeta & { age?: number; is_postpartum?: boolean }; @@ -916,974 +917,937 @@ export const PatientRegister = (props: PatientRegisterProps) => { } return ( -
- {statusDialog.show && ( - { - handleDialogClose("close"); - setResetNum(true); - }} - /> - )} - {statusDialog.transfer && ( - { - setResetNum(true); - handleDialogClose("close"); - }} - title="Patient Transfer Form" - className="max-w-md md:min-w-[600px]" - > - handleDialogClose("close")} - handleCancel={() => { - setResetNum(true); - handleDialogClose("close"); - }} - facilityId={facilityId} - /> - - )} - { - id - ? navigate(`/facility/${facilityId}/patient/${id}`) - : navigate(`/facility/${facilityId}`); - }} - componentRight={ - !state.form.abha_number && ( - - ) + + defaults={id ? state.form : initForm} + validate={validateForm} + onSubmit={handleSubmit} + submitLabel={buttonText} + onCancel={() => navigate("/facility")} + className="bg-transparent px-1 py-2 md:px-2" + onDraftRestore={(newState) => { + dispatch({ type: "set_state", state: newState }); + Promise.all([ + fetchDistricts(newState.form.state ?? 0), + fetchLocalBody(newState.form.district?.toString() ?? ""), + fetchWards(newState.form.local_body?.toString() ?? ""), + duplicateCheck(newState.form.phone_number ?? ""), + ]); + }} + noPadding + hideRestoreDraft + > + {(field) => { + if (!formField) setFormField(field); + if (resetNum) { + field("phone_number").onChange({ + name: "phone_number", + value: "+91", + }); + setResetNum(false); } - crumbsReplacements={{ - [facilityId]: { name: facilityObject?.name }, - [id ?? "????"]: { name: patientName }, - }} - /> -
-
-
- {" "} - Please enter the correct date of birth for the patient -
-

- Each patient in the system is uniquely identifiable by the number - and date of birth. Adding incorrect date of birth can result in - duplication of patient records. -

-
- <> - {showAlertMessage.show && ( - goBack()} - onClose={() => goBack()} - variant="primary" - action="Ok" - show - /> - )} - <> - - defaults={id ? state.form : initForm} - validate={validateForm} - onSubmit={handleSubmit} - submitLabel={buttonText} - onCancel={() => navigate("/facility")} - className="bg-transparent px-1 py-2 md:px-2" - onDraftRestore={(newState) => { - dispatch({ type: "set_state", state: newState }); - Promise.all([ - fetchDistricts(newState.form.state ?? 0), - fetchLocalBody(newState.form.district?.toString() ?? ""), - fetchWards(newState.form.local_body?.toString() ?? ""), - duplicateCheck(newState.form.phone_number ?? ""), - ]); + return ( +
+ {statusDialog.show && ( + { + handleDialogClose("close"); + setResetNum(true); + }} + /> + )} + {statusDialog.transfer && ( + { + setResetNum(true); + handleDialogClose("close"); + }} + title="Patient Transfer Form" + className="max-w-md md:min-w-[600px]" + > + handleDialogClose("close")} + handleCancel={() => { + setResetNum(true); + handleDialogClose("close"); + }} + facilityId={facilityId} + /> + + )} + { + id + ? navigate(`/facility/${facilityId}/patient/${id}`) + : navigate(`/facility/${facilityId}`); }} - noPadding - > - {(field) => { - if (!formField) setFormField(field); - if (resetNum) { - field("phone_number").onChange({ - name: "phone_number", - value: "+91", - }); - setResetNum(false); - } - return ( - <> - {careConfig.abdm.enabled && ( -
- {showLinkAbhaNumberModal && ( - setShowLinkAbhaNumberModal(false)} - onSuccess={(data: any) => { - if (id) { - navigate( - `/facility/${facilityId}/patient/${id}`, - ); - return; - } + componentRight={} + crumbsReplacements={{ + [facilityId]: { name: facilityObject?.name }, + [id ?? "????"]: { name: patientName }, + }} + /> +
+
+
+ {" "} + Please enter the correct date of birth for the patient +
+

+ Each patient in the system is uniquely identifiable by the + number and date of birth. Adding incorrect date of birth can + result in duplication of patient records. +

+
+ {!state.form.abha_number && ( +
+ +
+ )} + {showAlertMessage.show && ( + goBack()} + onClose={() => goBack()} + variant="primary" + action="Ok" + show + /> + )} + {careConfig.abdm.enabled && ( +
+ {showLinkAbhaNumberModal && ( + setShowLinkAbhaNumberModal(false)} + onSuccess={(data: any) => { + if (id) { + navigate(`/facility/${facilityId}/patient/${id}`); + return; + } - handleAbhaLinking(data, field); - }} - /> - )} - {state.form.abha_number && ( -
-
- null} - disabled={true} - error="" - /> -
-
- {state.form.health_id ? ( - null} - disabled={true} - error="" - /> - ) : ( -
- No Abha Address Associated with this ABHA - Number -
- )} -
-
- )} + handleAbhaLinking(data, field); + }} + /> + )} + {state.form.abha_number && ( +
+
+ null} + disabled={true} + error="" + />
- )} -
-

- Personal Details -

-
-
- { - if (!id) duplicateCheck(event.value); - field("phone_number").onChange(event); - if (isEmergencyNumberEnabled) { - field("emergency_phone_number").onChange({ - name: field("emergency_phone_number").name, - value: event.value, - }); - } - }} - types={["mobile", "landline"]} - /> - { - setIsEmergencyNumberEnabled(value); - value - ? field("emergency_phone_number").onChange({ - name: field("emergency_phone_number").name, - value: field("phone_number").value, - }) - : field("emergency_phone_number").onChange({ - name: field("emergency_phone_number").name, - value: initForm.emergency_phone_number, - }); - }} - /> -
-
- -
-
+
+ {state.form.health_id ? ( null} + disabled={true} + error="" /> -
-
- - {ageInputType === "age" ? "Age" : "Date of Birth"} - -
- + No Abha Address Associated with this ABHA Number +
+ )} +
+
+ )} +
+ )} +
+

+ Personal Details +

+
+
+ { + if (!id) duplicateCheck(event.value); + field("phone_number").onChange(event); + if (isEmergencyNumberEnabled) { + field("emergency_phone_number").onChange({ + name: field("emergency_phone_number").name, + value: event.value, + }); + } + }} + types={["mobile", "landline"]} + /> + { + setIsEmergencyNumberEnabled(value); + value + ? field("emergency_phone_number").onChange({ + name: field("emergency_phone_number").name, + value: field("phone_number").value, + }) + : field("emergency_phone_number").onChange({ + name: field("emergency_phone_number").name, + value: initForm.emergency_phone_number, + }); + }} + /> +
+
+ +
+
+ +
+
+ + {ageInputType === "age" ? "Age" : "Date of Birth"} + +
+ o.text} + optionValue={(o) => + o.value === "date_of_birth" ? "date_of_birth" : "age" + } + value={ageInputType} + onChange={(v) => { + if (v === "age" && ageInputType === "date_of_birth") { + setAgeInputType("alert_for_age"); + return; + } + setAgeInputType(v); + }} + /> +
+ {ageInputType !== "age" ? ( +
+ o.text} - optionValue={(o) => - o.value === "date_of_birth" - ? "date_of_birth" - : "age" - } - value={ageInputType} - onChange={(v) => { - if ( - v === "age" && - ageInputType === "date_of_birth" - ) { - setAgeInputType("alert_for_age"); - return; - } - setAgeInputType(v); - }} + position="LEFT" + disableFuture /> -
- {ageInputType !== "age" ? ( -
- -
- ) : ( -
- - {field("age").value !== "" && ( - <> - - Year of Birth: - - - YOB: - - - {new Date().getFullYear() - - field("age").value} - - - )} -

- } - placeholder="Enter the age" - type="number" - min={0} - /> -
- )} -
- -
- -
- While entering a patient's age is an option, - please note that only the year of birth will - be captured from this information. -
- - Recommended only when the patient's date of - birth is unknown - -
+ ) : ( +
+ + {field("age").value !== "" && ( + <> + + Year of Birth: + + + YOB: + + + {new Date().getFullYear() - + field("age").value} + + + )} +

} - action="Confirm" - variant="warning" - show={ageInputType == "alert_for_age"} - onClose={() => setAgeInputType("date_of_birth")} - onConfirm={() => setAgeInputType("age")} + placeholder="Enter the age" + type="number" + min={0} />
-
-
+ )} +
+
+ +
+ +
+ While entering a patient's age is an option, + please note that only the year of birth will be + captured from this information. +
+ + Recommended only when the patient's date of birth + is unknown + +
+ } + action="Confirm" + variant="warning" + show={ageInputType == "alert_for_age"} + onClose={() => setAgeInputType("date_of_birth")} + onConfirm={() => setAgeInputType("age")} + /> +
+
+
+ { + field("gender").onChange(e); + if (e.value !== "2") { + field("is_antenatal").onChange({ + name: "is_antenatal", + value: "false", + }); + + field("is_postpartum").onChange({ + name: "is_postpartum", + value: "false", + }); + } + }} + optionLabel={(o: any) => o.text} + optionValue={(o: any) => o.id} + /> +
+ + { +
+ option.label} + optionValue={(option) => option.value} + /> +
+ } +
+ + { +
+ +
+ } +
+ + option.label} + optionValue={(option) => option.value} + /> + + + + +
+ +
+
+ + +
+ +
+ { + field("pincode").onChange(e); + handlePincodeChange(e, field("pincode").onChange); + }} + /> + {showAutoFilledPincode && ( +
+ + + State and District auto-filled from Pincode + +
+ )} +
+
+ +
+
+ o} + optionValue={(o) => o} + /> +
+ {field("nationality").value === "India" ? ( + <> +
+ {isStateLoading ? ( + + ) : ( { - field("gender").onChange(e); - if (e.value !== "2") { - field("is_antenatal").onChange({ - name: "is_antenatal", - value: "false", - }); - - field("is_postpartum").onChange({ - name: "is_postpartum", - value: "false", - }); - } - }} - optionLabel={(o: any) => o.text} + placeholder="Choose State" + options={stateData ? stateData.results : []} + optionLabel={(o: any) => o.name} optionValue={(o: any) => o.id} + onChange={(e: any) => { + field("state").onChange(e); + field("district").onChange({ + name: "district", + value: undefined, + }); + field("local_body").onChange({ + name: "local_body", + value: undefined, + }); + field("ward").onChange({ + name: "ward", + value: undefined, + }); + fetchDistricts(e.value); + fetchLocalBody("0"); + fetchWards("0"); + }} /> -
- - { -
- option.label} - optionValue={(option) => option.value} - /> -
- } -
- - { -
- -
- } -
- - option.label} - optionValue={(option) => option.value} - /> - - - - -
- -
-
- + +
+ {isDistrictLoading ? ( +
+ +
+ ) : ( + o.name} + optionValue={(o: any) => o.id} + onChange={(e: any) => { + field("district").onChange(e); + field("local_body").onChange({ + name: "local_body", + value: undefined, + }); + field("ward").onChange({ + name: "ward", + value: undefined, + }); + fetchLocalBody(String(e.value)); + fetchWards("0"); + }} /> - -
+ )} +
-
- + {isLocalbodyLoading ? ( +
+ +
+ ) : ( + o.name} + optionValue={(o) => o.id} onChange={(e) => { - field("pincode").onChange(e); - handlePincodeChange(e, field("pincode").onChange); + field("local_body").onChange(e); + field("ward").onChange({ + name: "ward", + value: undefined, + }); + fetchWards(String(e.value)); }} /> - {showAutoFilledPincode && ( -
- - - State and District auto-filled from Pincode - -
- )} -
-
- -
-
+ )} +
+
+ {isWardLoading ? ( +
+ +
+ ) : ( o} - optionValue={(o) => o} + {...field("ward")} + label="Ward" + options={ward.sort(compareBy("number")).map((e) => { + return { + id: e.id, + name: e.number + ": " + e.name, + }; + })} + placeholder={ + field("local_body").value + ? "Choose Ward" + : "Select Localbody First" + } + disabled={!field("local_body").value} + optionLabel={(o: any) => o.name} + optionValue={(o: any) => o.id} + onChange={(e: any) => { + field("ward").onChange(e); + }} /> -
- {field("nationality").value === "India" ? ( - <> -
- {isStateLoading ? ( - - ) : ( - o.name} - optionValue={(o: any) => o.id} - onChange={(e: any) => { - field("state").onChange(e); - field("district").onChange({ - name: "district", - value: undefined, - }); - field("local_body").onChange({ - name: "local_body", - value: undefined, - }); - field("ward").onChange({ - name: "ward", - value: undefined, - }); - fetchDistricts(e.value); - fetchLocalBody("0"); - fetchWards("0"); - }} - /> - )} -
- -
- {isDistrictLoading ? ( -
- -
- ) : ( - o.name} - optionValue={(o: any) => o.id} - onChange={(e: any) => { - field("district").onChange(e); - field("local_body").onChange({ - name: "local_body", - value: undefined, - }); - field("ward").onChange({ - name: "ward", - value: undefined, - }); - fetchLocalBody(String(e.value)); - fetchWards("0"); - }} - /> - )} -
- -
- {isLocalbodyLoading ? ( -
- -
- ) : ( - o.name} - optionValue={(o) => o.id} - onChange={(e) => { - field("local_body").onChange(e); - field("ward").onChange({ - name: "ward", - value: undefined, - }); - fetchWards(String(e.value)); - }} - /> - )} -
-
- {isWardLoading ? ( -
- -
- ) : ( - { - return { - id: e.id, - name: e.number + ": " + e.name, - }; - })} - placeholder={ - field("local_body").value - ? "Choose Ward" - : "Select Localbody First" - } - disabled={!field("local_body").value} - optionLabel={(o: any) => o.name} - optionValue={(o: any) => o.id} - onChange={(e: any) => { - field("ward").onChange(e); - }} - /> - )} -
- - ) : ( -
- -
)}
+ + ) : ( +
+
- {field("nationality").value === "India" && ( -
- + )} +
+
+ {field("nationality").value === "India" && ( +
+ + } + title={ +

+ Social Profile +

+ } + expanded + > +
+
+ o.text} + optionValue={(o) => o.id} + /> + t(`ration_card__${o}`)} + optionValue={(o) => o} + /> + t(`SOCIOECONOMIC_STATUS__${o}`)} + optionValue={(o) => o} + value={field("meta_info").value?.socioeconomic_status} + onChange={({ name, value }) => + field("meta_info").onChange({ + name: "meta_info", + value: { + ...(field("meta_info").value ?? {}), + [name]: value, + }, + }) } - title={ -

- Social Profile -

+ /> + + t(`DOMESTIC_HEALTHCARE_SUPPORT__${o}`) } - expanded - > -
-
- o.text} - optionValue={(o) => o.id} - /> - t(`ration_card__${o}`)} - optionValue={(o) => o} - /> - - t(`SOCIOECONOMIC_STATUS__${o}`) - } - optionValue={(o) => o} - value={ - field("meta_info").value?.socioeconomic_status - } - onChange={({ name, value }) => - field("meta_info").onChange({ - name: "meta_info", - value: { - ...(field("meta_info").value ?? {}), - [name]: value, - }, - }) - } - /> - - t(`DOMESTIC_HEALTHCARE_SUPPORT__${o}`) - } - optionValue={(o) => o} - value={ - field("meta_info").value - ?.domestic_healthcare_support - } - onChange={({ name, value }) => - field("meta_info").onChange({ - name: "meta_info", - value: { - ...(field("meta_info").value ?? {}), - [name]: value, - }, - }) - } - /> -
-
- + optionValue={(o) => o} + value={ + field("meta_info").value + ?.domestic_healthcare_support + } + onChange={({ name, value }) => + field("meta_info").onChange({ + name: "meta_info", + value: { + ...(field("meta_info").value ?? {}), + [name]: value, + }, + }) + } + />
- )} -
- - } - title={ -

- COVID Details -

- } +
+ +
+ )} +
+ + } + title={ +

+ COVID Details +

+ } + > +
+
+
+ option.label} + optionValue={(option) => option.value} + /> +
+
+
+ -
-
-
- option.label} - optionValue={(option) => option.value} + { +
+
+
-
-
- - { -
-
- -
-
- option.label} - optionValue={(option) => option.value} - /> -
-
- o} - optionValue={(o) => o} - /> -
-
- -
-
- } -
-
-
-
+
option.label} optionValue={(option) => option.value} /> - -
- -
-
-
+
+ o} + optionValue={(o) => o} + /> +
+
-
- -
-
-

- Medical History -

-
-
- -
- -
- -
-
- - Any medical history? (Comorbidities) - -
- {MEDICAL_HISTORY_CHOICES.map((i) => { - return renderMedicalHistory( - i.id as number, - i.text, - field, - ); - })} -
- -
- -
- -
- -
- o} - optionValue={(o: any) => o} - /> -
-
+ } +
-
-
-

- Insurance Details -

- - setInsuranceDetails([ - ...insuranceDetails, - { - id: "", - subscriber_id: "", - policy_id: "", - insurer_id: "", - insurer_name: "", - }, - ]) +
+
+ option.label} + optionValue={(option) => option.value} + /> + - - Add Insurance Details - +
+ +
+
+
+
+
- setInsuranceDetails(value)} - error={insuranceDetailsError} - gridView - />
- - ); - }} - - - -
-
+
+ +
+
+

+ Medical History +

+
+
+ +
+ +
+ +
+
+ + Any medical history? (Comorbidities) + +
+ {MEDICAL_HISTORY_CHOICES.map((i) => { + return renderMedicalHistory( + i.id as number, + i.text, + field, + ); + })} +
+ +
+ +
+ +
+ +
+ o} + optionValue={(o: any) => o} + /> +
+
+
+
+
+

+ Insurance Details +

+ + setInsuranceDetails([ + ...insuranceDetails, + { + id: "", + subscriber_id: "", + policy_id: "", + insurer_id: "", + insurer_name: "", + }, + ]) + } + data-testid="add-insurance-button" + > + + Add Insurance Details + +
+ setInsuranceDetails(value)} + error={insuranceDetailsError} + gridView + /> +
+
+
+ ); + }} + ); }; diff --git a/src/Components/Patient/SampleDetails.tsx b/src/Components/Patient/SampleDetails.tsx index 343927733ca..a80ca515122 100644 --- a/src/Components/Patient/SampleDetails.tsx +++ b/src/Components/Patient/SampleDetails.tsx @@ -1,6 +1,5 @@ import { FlowModel } from "./models"; import { GENDER_TYPES, TEST_TYPE_CHOICES } from "../../Common/constants"; -import { lazy } from "react"; import ButtonV2 from "../Common/components/ButtonV2"; import Card from "../../CAREUI/display/Card"; @@ -14,8 +13,7 @@ import { DetailRoute } from "../../Routers/types"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export const SampleDetails = ({ id }: DetailRoute) => { const { loading: isLoading, data: sampleDetails } = useQuery( routes.getTestSample, diff --git a/src/Components/Patient/SamplePreview.tsx b/src/Components/Patient/SamplePreview.tsx index f56714f0c36..3e692d4d43a 100644 --- a/src/Components/Patient/SamplePreview.tsx +++ b/src/Components/Patient/SamplePreview.tsx @@ -1,14 +1,11 @@ import { classNames, formatDateTime, humanizeStrings } from "../../Utils/utils"; -import { lazy } from "react"; - import ButtonV2 from "../Common/components/ButtonV2"; import Page from "../Common/components/Page"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface ISamplePreviewProps { id: string; sampleId: string; diff --git a/src/Components/Patient/SampleTest.tsx b/src/Components/Patient/SampleTest.tsx index 6734ed03f0d..b4d36da74b6 100644 --- a/src/Components/Patient/SampleTest.tsx +++ b/src/Components/Patient/SampleTest.tsx @@ -1,6 +1,6 @@ import { navigate } from "raviger"; -import { useReducer, useState, lazy } from "react"; +import { useReducer, useState } from "react"; import { SAMPLE_TYPE_CHOICES, ICMR_CATEGORY } from "../../Common/constants"; import * as Notification from "../../Utils/Notifications.js"; import { SampleTestModel } from "./models"; @@ -17,8 +17,7 @@ import { FacilitySelect } from "../Common/FacilitySelect"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; const initForm: SampleTestModel = { isFastTrack: false, fast_track: "", diff --git a/src/Components/Patient/SampleViewAdmin.tsx b/src/Components/Patient/SampleViewAdmin.tsx index ced7e1a96ba..2361d2a697a 100644 --- a/src/Components/Patient/SampleViewAdmin.tsx +++ b/src/Components/Patient/SampleViewAdmin.tsx @@ -1,6 +1,6 @@ import SampleFilter from "./SampleFilters"; import { navigate } from "raviger"; -import { useState, lazy } from "react"; +import { useState } from "react"; import { SAMPLE_TEST_STATUS, SAMPLE_TEST_RESULT, @@ -22,8 +22,7 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function SampleViewAdmin() { const { qParams, diff --git a/src/Components/Patient/ShiftCreate.tsx b/src/Components/Patient/ShiftCreate.tsx index c3b01ad189d..17d627d982c 100644 --- a/src/Components/Patient/ShiftCreate.tsx +++ b/src/Components/Patient/ShiftCreate.tsx @@ -7,7 +7,7 @@ import { SHIFTING_VEHICLE_CHOICES, } from "../../Common/constants"; import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { lazy, useReducer, useState } from "react"; +import { useReducer, useState } from "react"; import { FacilitySelect } from "../Common/FacilitySelect"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; @@ -31,8 +31,7 @@ import routes from "../../Redux/api.js"; import request from "../../Utils/request/request.js"; import careConfig from "@careConfig"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface patientShiftProps { facilityId: string; patientId: string; diff --git a/src/Components/Patient/models.tsx b/src/Components/Patient/models.tsx index cf35680de11..d9e275fdc4a 100644 --- a/src/Components/Patient/models.tsx +++ b/src/Components/Patient/models.tsx @@ -135,6 +135,7 @@ export interface PatientModel { assigned_to?: { first_name?: string; username?: string; last_name?: string }; assigned_to_object?: AssignedToObjectModel; meta_info?: PatientMeta; + age?: string; } export interface SampleTestModel { diff --git a/src/Components/Resource/ListView.tsx b/src/Components/Resource/ListView.tsx index 11362f54891..31b34065aa5 100644 --- a/src/Components/Resource/ListView.tsx +++ b/src/Components/Resource/ListView.tsx @@ -1,4 +1,3 @@ -import { lazy } from "react"; import { navigate } from "raviger"; import ListFilter from "./ListFilter"; import { formatFilter } from "./Commons"; @@ -17,8 +16,7 @@ import Page from "../Common/components/Page"; import SearchInput from "../Form/SearchInput"; import request from "../../Utils/request/request"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function ListView() { const { qParams, diff --git a/src/Components/Resource/ResourceBoard.tsx b/src/Components/Resource/ResourceBoard.tsx deleted file mode 100644 index aa0b031ba0e..00000000000 --- a/src/Components/Resource/ResourceBoard.tsx +++ /dev/null @@ -1,301 +0,0 @@ -import { useState, useEffect } from "react"; -import { navigate } from "raviger"; -import { classNames, formatName } from "../../Utils/utils"; -import { useDrag, useDrop } from "react-dnd"; -import { formatDateTime } from "../../Utils/utils"; -import { ExportButton } from "../Common/Export"; -import dayjs from "../../Utils/dayjs"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { PaginatedResponse } from "../../Utils/request/types"; -import { IResource } from "./models"; -import request from "../../Utils/request/request"; -import CareIcon from "../../CAREUI/icons/CareIcon"; - -interface boardProps { - board: string; - filterProp: any; - formatFilter: any; -} - -const renderBoardTitle = (board: string) => board; - -const reduceLoading = (action: string, current: any) => { - switch (action) { - case "MORE": - return { ...current, more: true }; - case "BOARD": - return { ...current, board: true }; - case "COMPLETE": - return { board: false, more: false }; - } -}; - -const ResourceCard = ({ resource }: any) => { - const [{ isDragging }, drag] = useDrag(() => ({ - type: "resource-card", - item: resource, - collect: (monitor) => ({ isDragging: !!monitor.isDragging() }), - })); - - return ( -
-
-
-
-
-
- {resource.title} -
-
- {resource.emergency && ( - - Emergency - - )} -
-
-
-
-
- -
- {(resource.origin_facility_object || {}).name} -
- -
-
-
- -
- {(resource.approving_facility_object || {}).name} -
- -
- {resource.assigned_facility_object && ( -
-
- - -
- {(resource.assigned_facility_object || {}).name || - "Yet to be decided"} -
- -
- )} -
-
- -
- {formatDateTime(resource.modified_date) || "--"} -
- -
- {resource.assigned_to_object && ( -
-
- -
- {formatName(resource.assigned_to_object)} -{" "} - {resource.assigned_to_object.user_type} -
- -
- )} -
-
-
- -
-
-
-
- ); -}; - -export default function ResourceBoard({ - board, - filterProp, - formatFilter, -}: boardProps) { - const [isLoading, setIsLoading] = useState({ board: "BOARD", more: false }); - const [{ isOver }, drop] = useDrop(() => ({ - accept: "resource-card", - drop: (item: any) => { - if (item.status !== board) { - navigate(`/resource/${item.id}/update?status=${board}`); - } - }, - collect: (monitor) => ({ isOver: !!monitor.isOver() }), - })); - const [offset, setOffSet] = useState(0); - const [data, setData] = useState>(); - - useEffect(() => { - setIsLoading((loading) => reduceLoading("BOARD", loading)); - }, [ - board, - filterProp.title, - filterProp.facility, - filterProp.origin_facility, - filterProp.approving_facility, - filterProp.assigned_facility, - filterProp.emergency, - filterProp.created_date_before, - filterProp.created_date_after, - filterProp.modified_date_before, - filterProp.modified_date_after, - filterProp.ordering, - ]); - - useQuery(routes.listResourceRequests, { - query: formatFilter({ - ...filterProp, - status: board, - }), - onResponse: ({ res, data: listResourceData }) => { - if (res?.ok && listResourceData) { - setData(listResourceData); - } - setIsLoading((loading) => reduceLoading("COMPLETE", loading)); - }, - }); - - const handlePagination = async () => { - setIsLoading((loading) => reduceLoading("MORE", loading)); - setOffSet(offset + 14); - const { res, data: newPageData } = await request( - routes.listResourceRequests, - { - query: formatFilter({ - ...filterProp, - status: board, - offset: offset, - }), - }, - ); - if (res?.ok && newPageData) { - setData((prev) => - prev - ? { ...prev, results: [...prev.results, ...newPageData.results] } - : newPageData, - ); - } - setIsLoading((loading) => reduceLoading("COMPLETE", loading)); - }; - - const boardFilter = (filter: string) => { - return data?.results - .filter(({ status }) => status === filter) - .map((resource: any) => ( - - )); - }; - - return ( -
-
-
-

- {renderBoardTitle(board)}{" "} - { - const { data } = await request( - routes.downloadResourceRequests, - { - query: { - ...formatFilter({ ...filterProp, status: board }), - csv: true, - }, - }, - ); - return data ?? null; - }} - filenamePrefix={`resource_requests_${board}`} - /> -

- - {data?.count || "0"} - -
-
-
- {isLoading.board ? ( -
-
-
-
-
-
-
-
-
-
-
-
-
- ) : data && data?.results.length > 0 ? ( - boardFilter(board) - ) : ( -

No requests to show.

- )} - {!isLoading.board && - data && - data?.results.length < (data?.count || 0) && - (isLoading.more ? ( -
- Loading -
- ) : ( - - ))} -
-
- ); -} diff --git a/src/Components/Resource/ResourceBoardView.tsx b/src/Components/Resource/ResourceBoardView.tsx index 345cd11c381..ed6d63bbd77 100644 --- a/src/Components/Resource/ResourceBoardView.tsx +++ b/src/Components/Resource/ResourceBoardView.tsx @@ -1,9 +1,7 @@ -import { lazy, useState } from "react"; -import { navigate } from "raviger"; +import { useState } from "react"; +import { Link, navigate } from "raviger"; import ListFilter from "./ListFilter"; -import ResourceBoard from "./ResourceBoard"; import { RESOURCE_CHOICES } from "../../Common/constants"; -import withScrolling from "react-dnd-scrolling"; import BadgesList from "./BadgesList"; import { formatFilter } from "./Commons"; import useFilters from "../../Common/hooks/useFilters"; @@ -16,10 +14,12 @@ import SearchInput from "../Form/SearchInput"; import Tabs from "../Common/components/Tabs"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; +import KanbanBoard from "../Kanban/Board"; +import { ResourceModel } from "../Facility/models"; +import { classNames, formatDateTime, formatName } from "../../Utils/utils"; +import dayjs from "dayjs"; -const Loading = lazy(() => import("../Common/Loading")); -const PageTitle = lazy(() => import("../Common/PageTitle")); -const ScrollingComponent = withScrolling("div"); +import PageTitle from "@/Components/Common/PageTitle"; const resourceStatusOptions = RESOURCE_CHOICES.map((obj) => obj.text); const COMPLETED = ["COMPLETED", "REJECTED"]; @@ -32,7 +32,6 @@ export default function BoardView() { }); const [boardFilter, setBoardFilter] = useState(ACTIVE); // eslint-disable-next-line - const [isLoading, setIsLoading] = useState(false); const appliedFilters = formatFilter(qParams); const { t } = useTranslation(); @@ -42,11 +41,11 @@ export default function BoardView() { }; return ( -
+
- - -
- {isLoading ? ( - - ) : ( - boardFilter.map((board) => ( - + title={} + sections={boardFilter.map((board) => ({ + id: board, + title: ( +

+ {board}{" "} + { + const { data } = await request( + routes.downloadResourceRequests, + { + query: { + ...formatFilter({ ...qParams, status: board }), + csv: true, + }, + }, + ); + return data ?? null; + }} + filenamePrefix={`resource_requests_${board}`} /> - )) - )} -

-
+ + ), + fetchOptions: (id) => ({ + route: routes.listResourceRequests, + options: { + query: formatFilter({ + ...qParams, + status: id, + }), + }, + }), + }))} + onDragEnd={(result) => { + if (result.source.droppableId !== result.destination?.droppableId) + navigate( + `/resource/${result.draggableId}/update?status=${result.destination?.droppableId}`, + ); + }} + itemRender={(resource) => ( +
+
+
+
+
+ {resource.title} +
+
+
+ {resource.emergency && ( + + {t("emergency")} + + )} +
+
+
+ {( + [ + { + title: "origin_facility", + icon: "l-plane-departure", + data: resource.origin_facility_object.name, + }, + { + title: "resource_approving_facility", + icon: "l-user-check", + data: resource.approving_facility_object?.name, + }, + { + title: "assigned_facility", + icon: "l-plane-arrival", + data: + resource.assigned_facility_object?.name || + t("yet_to_be_decided"), + }, + { + title: "last_modified", + icon: "l-stopwatch", + data: formatDateTime(resource.modified_date), + className: dayjs() + .subtract(2, "hours") + .isBefore(resource.modified_date) + ? "text-secondary-900" + : "rounded bg-red-500 border border-red-600 text-white w-full font-bold", + }, + { + title: "assigned_to", + icon: "l-user", + data: resource.assigned_to_object + ? formatName(resource.assigned_to_object) + + " - " + + resource.assigned_to_object.user_type + : undefined, + }, + ] as const + ) + .filter((d) => d.data) + .map((datapoint, i) => ( +
+
+ +
+
+ {datapoint.data} +
+
+ ))} +
+
+
+ + {t("all_details")} + +
+
+ )} + />
); diff --git a/src/Components/Resource/ResourceCreate.tsx b/src/Components/Resource/ResourceCreate.tsx index ebdb83e90bb..ec41e6c9175 100644 --- a/src/Components/Resource/ResourceCreate.tsx +++ b/src/Components/Resource/ResourceCreate.tsx @@ -1,4 +1,4 @@ -import { useReducer, useState, lazy } from "react"; +import { useReducer, useState } from "react"; import { FacilitySelect } from "../Common/FacilitySelect"; import * as Notification from "../../Utils/Notifications.js"; @@ -27,8 +27,7 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface resourceProps { facilityId: number; } diff --git a/src/Components/Resource/ResourceDetails.tsx b/src/Components/Resource/ResourceDetails.tsx index 652f71344c7..50e572f5680 100644 --- a/src/Components/Resource/ResourceDetails.tsx +++ b/src/Components/Resource/ResourceDetails.tsx @@ -1,4 +1,4 @@ -import { useState, lazy } from "react"; +import { useState } from "react"; import { classNames, formatDateTime, formatName } from "../../Utils/utils"; import { navigate } from "raviger"; import * as Notification from "../../Utils/Notifications.js"; @@ -10,8 +10,7 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; import CareIcon from "../../CAREUI/icons/CareIcon"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function ResourceDetails(props: { id: string }) { const [isPrintMode, setIsPrintMode] = useState(false); const [openDeleteResourceDialog, setOpenDeleteResourceDialog] = @@ -254,7 +253,7 @@ export default function ResourceDetails(props: { id: string }) {
{data.title || "--"}
Update Status/Details diff --git a/src/Components/Resource/ResourceDetailsUpdate.tsx b/src/Components/Resource/ResourceDetailsUpdate.tsx index 6d293f05df5..7aac3031274 100644 --- a/src/Components/Resource/ResourceDetailsUpdate.tsx +++ b/src/Components/Resource/ResourceDetailsUpdate.tsx @@ -1,6 +1,6 @@ import * as Notification from "../../Utils/Notifications.js"; import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { lazy, useReducer, useState } from "react"; +import { useReducer, useState } from "react"; import { navigate, useQueryParams } from "raviger"; import Card from "../../CAREUI/display/Card"; import CircularProgress from "../Common/components/CircularProgress"; @@ -20,8 +20,7 @@ import routes from "../../Redux/api.js"; import { UserModel } from "../Users/models.js"; import request from "../../Utils/request/request.js"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface resourceProps { id: string; } diff --git a/src/Components/Shifting/BoardView.tsx b/src/Components/Shifting/BoardView.tsx index f303df72d99..f83e0a4974e 100644 --- a/src/Components/Shifting/BoardView.tsx +++ b/src/Components/Shifting/BoardView.tsx @@ -7,25 +7,26 @@ import BadgesList from "./BadgesList"; import { ExportButton } from "../Common/Export"; import ListFilter from "./ListFilter"; import SearchInput from "../Form/SearchInput"; -import ShiftingBoard from "./ShiftingBoard"; import { formatFilter } from "./Commons"; -import { navigate } from "raviger"; +import { Link, navigate } from "raviger"; import useFilters from "../../Common/hooks/useFilters"; -import { lazy, useLayoutEffect, useRef, useState } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import withScrolling from "react-dnd-scrolling"; import ButtonV2 from "../Common/components/ButtonV2"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; import Tabs from "../Common/components/Tabs"; import careConfig from "@careConfig"; +import KanbanBoard from "../Kanban/Board"; +import { classNames, formatDateTime, formatName } from "../../Utils/utils"; +import dayjs from "dayjs"; +import ConfirmDialog from "../Common/ConfirmDialog"; +import { ShiftingModel } from "../Facility/models"; +import useAuthUser from "../../Common/hooks/useAuthUser"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; - -const Loading = lazy(() => import("../Common/Loading")); -const PageTitle = lazy(() => import("../Common/PageTitle")); -const ScrollingComponent = withScrolling("div"); +import PageTitle from "@/Components/Common/PageTitle"; export default function BoardView() { const { qParams, updateQuery, FilterBadges, advancedFilter } = useFilters({ @@ -33,6 +34,26 @@ export default function BoardView() { cacheBlacklist: ["patient_name"], }); + const [modalFor, setModalFor] = useState<{ + externalId?: string; + loading: boolean; + }>({ + externalId: undefined, + loading: false, + }); + + const authUser = useAuthUser(); + + const handleTransferComplete = async (shift: any) => { + setModalFor({ ...modalFor, loading: true }); + await request(routes.completeTransfer, { + pathParams: { externalId: shift.external_id }, + }); + navigate( + `/facility/${shift.assigned_facility}/patient/${shift.patient}/consultation`, + ); + }; + const shiftStatusOptions = careConfig.wartimeShifting ? SHIFTING_CHOICES_WARTIME : SHIFTING_CHOICES_PEACETIME; @@ -55,79 +76,10 @@ export default function BoardView() { ); const [boardFilter, setBoardFilter] = useState(activeBoards); - const [isLoading] = useState(false); const { t } = useTranslation(); - const containerRef = useRef(null); - const [containerHeight, setContainerHeight] = useState(0); - const [isLeftScrollable, setIsLeftScrollable] = useState(false); - const [isRightScrollable, setIsRightScrollable] = useState(false); - - useLayoutEffect(() => { - const container = containerRef.current; - - if (!container) return; - - const handleScroll = () => { - setIsLeftScrollable(container.scrollLeft > 0); - setIsRightScrollable( - container.scrollLeft + container.clientWidth < - container.scrollWidth - 10, - ); - }; - - container.addEventListener("scroll", handleScroll); - - handleScroll(); - - return () => { - container.removeEventListener("scroll", handleScroll); - }; - }, []); - - const handleOnClick = (direction: "right" | "left") => { - const container = containerRef.current; - if (direction === "left" ? !isLeftScrollable : !isRightScrollable) return; - - if (container) { - const scrollAmount = 300; - const currentScrollLeft = container.scrollLeft; - - if (direction === "left") { - container.scrollTo({ - left: currentScrollLeft - scrollAmount, - behavior: "smooth", - }); - } else if (direction === "right") { - container.scrollTo({ - left: currentScrollLeft + scrollAmount, - behavior: "smooth", - }); - } - } - }; - - const renderArrowIcons = (direction: "right" | "left") => { - const isIconEnable = - direction === "left" ? isLeftScrollable : isRightScrollable; - return ( - isIconEnable && ( -
- handleOnClick(direction)} - /> -
- ) - ); - }; return ( -
+
- - -
- {isLoading ? ( - - ) : ( - <> - {renderArrowIcons("left")} -
- {boardFilter.map((board) => ( - - ))} + + title={} + sections={boardFilter.map((board) => ({ + id: board.text, + title: ( +

+ {board.label || board.text}{" "} + { + const { data } = await request(routes.downloadShiftRequests, { + query: { ...formatFilter(qParams), csv: true }, + }); + return data ?? null; + }} + filenamePrefix={`shift_requests_${board.label || board.text}`} + /> +

+ ), + fetchOptions: (id) => ({ + route: routes.listShiftRequests, + options: { + query: formatFilter({ + ...qParams, + status: id, + }), + }, + }), + }))} + onDragEnd={(result) => { + if (result.source.droppableId !== result.destination?.droppableId) + navigate( + `/shifting/${result.draggableId}/update?status=${result.destination?.droppableId}`, + ); + }} + itemRender={(shift) => ( +
+
+
+
+
+ {shift.patient_object.name} +
+
+ {shift.patient_object.age} old +
+
+
+ {shift.emergency && ( + + {t("emergency")} + + )} +
- {renderArrowIcons("right")} - - )} -
- +
+ {( + [ + { + title: "phone_number", + icon: "l-mobile-android", + data: shift.patient_object.phone_number, + }, + { + title: "origin_facility", + icon: "l-plane-departure", + data: shift.origin_facility_object.name, + }, + { + title: "shifting_approving_facility", + icon: "l-user-check", + data: careConfig.wartimeShifting + ? shift.shifting_approving_facility_object?.name + : undefined, + }, + { + title: "assigned_facility", + icon: "l-plane-arrival", + data: + shift.assigned_facility_external || + shift.assigned_facility_object?.name || + t("yet_to_be_decided"), + }, + { + title: "last_modified", + icon: "l-stopwatch", + data: formatDateTime(shift.modified_date), + className: dayjs() + .subtract(2, "hours") + .isBefore(shift.modified_date) + ? "text-secondary-900" + : "rounded bg-red-500 border border-red-600 text-white w-full font-bold", + }, + { + title: "patient_address", + icon: "l-home", + data: shift.patient_object.address, + }, + { + title: "assigned_to", + icon: "l-user", + data: shift.assigned_to_object + ? formatName(shift.assigned_to_object) + + " - " + + shift.assigned_to_object.user_type + : undefined, + }, + { + title: "patient_state", + icon: "l-map-marker", + data: shift.patient_object.state_object?.name, + }, + ] as const + ) + .filter((d) => d.data) + .map((datapoint, i) => ( +
+
+ +
+
+ {datapoint.data} +
+
+ ))} +
+
+
+ + {t("all_details")} + + + {shift.status === "COMPLETED" && shift.assigned_facility && ( + <> + + + + setModalFor({ externalId: undefined, loading: false }) + } + action={t("confirm")} + onConfirm={() => handleTransferComplete(shift)} + > +

+ {t("redirected_to_create_consultation")} +

+
+ + )} +
+
+ )} + />
); diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index b40b42dc979..1e069d9e37f 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -1,4 +1,4 @@ -import { lazy, useState } from "react"; +import { useState } from "react"; import BadgesList from "./BadgesList"; import ButtonV2 from "../Common/components/ButtonV2"; import ConfirmDialog from "../Common/ConfirmDialog"; @@ -20,8 +20,7 @@ import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; import careConfig from "@careConfig"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function ListView() { const { qParams, diff --git a/src/Components/Shifting/ShiftDetails.tsx b/src/Components/Shifting/ShiftDetails.tsx index 5790f59cb05..cc39e048e89 100644 --- a/src/Components/Shifting/ShiftDetails.tsx +++ b/src/Components/Shifting/ShiftDetails.tsx @@ -6,7 +6,7 @@ import { SHIFTING_CHOICES_WARTIME, } from "../../Common/constants"; import { Link, navigate } from "raviger"; -import { lazy, useState } from "react"; +import { useState } from "react"; import ButtonV2 from "../Common/components/ButtonV2"; import CommentSection from "./CommentsSection"; import ConfirmDialog from "../Common/ConfirmDialog.js"; @@ -29,8 +29,7 @@ import CareIcon from "../../CAREUI/icons/CareIcon.js"; import { PatientModel } from "../Patient/models.js"; import careConfig from "@careConfig"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function ShiftDetails(props: { id: string }) { const [isPrintMode, setIsPrintMode] = useState(false); const [isCopied, setIsCopied] = useState(false); diff --git a/src/Components/Shifting/ShiftDetailsUpdate.tsx b/src/Components/Shifting/ShiftDetailsUpdate.tsx index ccf808ecda9..64a7d1af110 100644 --- a/src/Components/Shifting/ShiftDetailsUpdate.tsx +++ b/src/Components/Shifting/ShiftDetailsUpdate.tsx @@ -12,7 +12,7 @@ import { } from "../../Common/constants"; import { Cancel, Submit } from "../Common/components/ButtonV2"; import { navigate, useQueryParams } from "raviger"; -import { lazy, useReducer, useState } from "react"; +import { useReducer, useState } from "react"; import { ConsultationModel } from "../Facility/models.js"; import DischargeModal from "../Facility/DischargeModal.js"; import { FacilitySelect } from "../Common/FacilitySelect"; @@ -40,8 +40,7 @@ import { PatientModel } from "../Patient/models.js"; import useAuthUser from "../../Common/hooks/useAuthUser.js"; import careConfig from "@careConfig"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; interface patientShiftProps { id: string; } diff --git a/src/Components/Shifting/ShiftingBoard.tsx b/src/Components/Shifting/ShiftingBoard.tsx deleted file mode 100644 index 6f2eb3b77a3..00000000000 --- a/src/Components/Shifting/ShiftingBoard.tsx +++ /dev/null @@ -1,395 +0,0 @@ -import { - Dispatch, - SetStateAction, - useEffect, - useLayoutEffect, - useRef, - useState, -} from "react"; -import { classNames, formatDateTime, formatName } from "../../Utils/utils"; -import { useDrag, useDrop } from "react-dnd"; -import ButtonV2 from "../Common/components/ButtonV2"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { navigate } from "raviger"; -import { useTranslation } from "react-i18next"; -import { ExportButton } from "../Common/Export"; -import dayjs from "../../Utils/dayjs"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { PaginatedResponse } from "../../Utils/request/types"; -import { IShift } from "./models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import careConfig from "@careConfig"; - -interface boardProps { - board: string; - title?: string; - filterProp: any; - formatFilter: any; - setContainerHeight: Dispatch>; - containerHeight: number; -} - -const ShiftCard = ({ shift, filter }: any) => { - const [modalFor, setModalFor] = useState({ - externalId: undefined, - loading: false, - }); - const [{ isDragging }, drag] = useDrag(() => ({ - type: "shift-card", - item: shift, - collect: (monitor) => ({ isDragging: !!monitor.isDragging() }), - })); - const authUser = useAuthUser(); - const { t } = useTranslation(); - - const handleTransferComplete = async (shift: any) => { - setModalFor({ ...modalFor, loading: true }); - await request(routes.completeTransfer, { - pathParams: { externalId: shift.external_id }, - }); - navigate( - `/facility/${shift.assigned_facility}/patient/${shift.patient}/consultation`, - ); - }; - return ( -
-
-
-
-
-
- {shift.patient_object.name} - {shift.patient_object.age} -
-
- {shift.emergency && ( - - {t("emergency")} - - )} -
-
-
-
-
- -
- {shift.patient_object.phone_number || ""} -
- -
-
-
- -
- {(shift.origin_facility_object || {}).name} -
- -
- {careConfig.wartimeShifting && ( -
-
- -
- {(shift.shifting_approving_facility_object || {}).name} -
- -
- )} -
-
- - -
- {shift.assigned_facility_external || - shift.assigned_facility_object?.name || - t("yet_to_be_decided")} -
- -
- -
-
- -
- {formatDateTime(shift.modified_date) || "--"} -
- -
- -
-
- -
- {shift.patient_object.address || "--"} -
- -
- - {shift.assigned_to_object && ( -
-
- -
- {formatName(shift.assigned_to_object)} - {" - "} - {shift.assigned_to_object.user_type} -
- -
- )} - -
-
- -
- {shift.patient_object.state_object.name || "--"} -
- -
-
-
- -
- -
- {filter === "COMPLETED" && shift.assigned_facility && ( -
- setModalFor(shift.external_id)} - > - {t("transfer_to_receiving_facility")} - - - - setModalFor({ externalId: undefined, loading: false }) - } - action={t("confirm")} - onConfirm={() => handleTransferComplete(shift)} - > -

- {t("redirected_to_create_consultation")} -

-
-
- )} -
-
-
- ); -}; - -export default function ShiftingBoard({ - board, - title, - filterProp, - formatFilter, - setContainerHeight, - containerHeight, -}: boardProps) { - const containerRef = useRef(null); - const [offset, setOffSet] = useState(0); - const [pages, setPages] = useState[]>([]); - const [isLoading, setIsLoading] = useState(true); - const [{ isOver }, drop] = useDrop(() => ({ - accept: "shift-card", - drop: (item: any) => { - if (item.status !== board) { - navigate(`/shifting/${item.id}/update?status=${board}`); - } - }, - collect: (monitor) => ({ isOver: !!monitor.isOver() }), - })); - - const query = useQuery(routes.listShiftRequests, { - query: formatFilter({ - ...filterProp, - status: board, - }), - onResponse: ({ res, data: listShiftData }) => { - setIsLoading(false); - if (res?.ok && listShiftData) { - setPages((prev) => [...prev, listShiftData]); - } - }, - }); - - useEffect(() => { - setPages([]); - setIsLoading(true); - query.refetch(); - }, [ - filterProp.facility, - filterProp.origin_facility, - filterProp.shifting_approving_facility, - filterProp.assigned_facility, - filterProp.emergency, - filterProp.is_up_shift, - filterProp.patient_name, - filterProp.created_date_before, - filterProp.created_date_after, - filterProp.modified_date_before, - filterProp.modified_date_after, - filterProp.patient_phone_number, - filterProp.ordering, - filterProp.is_kasp, - filterProp.assigned_to, - filterProp.is_antenatal, - filterProp.breathlessness_level, - ]); - - const handlePagination = async () => { - setIsLoading(true); - setOffSet(offset + 14); - const { res, data: newPageData } = await request(routes.listShiftRequests, { - query: formatFilter({ - ...filterProp, - status: board, - offset: offset, - }), - }); - if (res?.ok && newPageData) { - setPages((prev) => [...prev, newPageData]); - } - setIsLoading(false); - }; - const { t } = useTranslation(); - - const patientFilter = (filter: string) => { - return pages - .flatMap((p) => p.results) - .filter(({ status }) => status === filter) - .map((shift: any) => ( - - )); - }; - - useLayoutEffect(() => { - const container = containerRef.current; - if (container) { - const { height } = container.getBoundingClientRect(); - containerHeight < height && setContainerHeight(height); - } - }, [containerRef.current, pages.flatMap((p) => p.results).length]); - - return ( -
-
-
-

- {title || board}{" "} - { - const { data } = await request(routes.downloadShiftRequests, { - query: { - ...formatFilter({ ...filterProp, status: board }), - csv: true, - }, - }); - return data ?? null; - }} - filenamePrefix={`shift_requests_${board}`} - /> -

- - {pages[0] ? pages[0].count : "..."} - -
-
-
- {pages[0]?.count > 0 - ? patientFilter(board) - : !isLoading && ( -

{t("no_patients_to_show")}

- )} - {isLoading ? ( -
-
-
-
-
-
-
-
-
-
-
-
-
- ) : ( - pages.at(-1)?.next && ( - handlePagination()} className="m-2 block"> - Load More - - ) - )} -
-
- ); -} diff --git a/src/Components/Users/ManageUsers.tsx b/src/Components/Users/ManageUsers.tsx index 88069ca5e29..2a00a2a8305 100644 --- a/src/Components/Users/ManageUsers.tsx +++ b/src/Components/Users/ManageUsers.tsx @@ -1,6 +1,6 @@ import dayjs from "dayjs"; import { navigate } from "raviger"; -import { lazy, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import CountBlock from "../../CAREUI/display/Count"; import CareIcon from "../../CAREUI/icons/CareIcon"; @@ -37,8 +37,7 @@ import UserDeleteDialog from "./UserDeleteDialog"; import UserFilter from "./UserFilter"; import { showUserDelete } from "../../Utils/permissions"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; export default function ManageUsers() { const { t } = useTranslation(); const { width } = useWindowDimensions(); diff --git a/src/Components/Users/UserAdd.tsx b/src/Components/Users/UserAdd.tsx index 73c7fb63c26..6a87e64425c 100644 --- a/src/Components/Users/UserAdd.tsx +++ b/src/Components/Users/UserAdd.tsx @@ -1,5 +1,5 @@ import { Link, navigate } from "raviger"; -import { lazy, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { GENDER_TYPES, USER_TYPES, @@ -43,7 +43,7 @@ import CareIcon from "../../CAREUI/icons/CareIcon"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../Common/Loading")); +import Loading from "@/Components/Common/Loading"; interface UserProps { userId?: number; } @@ -294,6 +294,7 @@ export const UserAdd = (props: UserProps) => { const handleDateChange = (e: FieldChangeEvent) => { if (dayjs(e.value).isValid()) { + const errors = { ...state.errors, [e.name]: "" }; dispatch({ type: "set_form", form: { @@ -301,10 +302,12 @@ export const UserAdd = (props: UserProps) => { [e.name]: dayjs(e.value).format("YYYY-MM-DD"), }, }); + dispatch({ type: "set_errors", errors }); } }; const handleFieldChange = (event: FieldChangeEvent) => { + const errors = { ...state.errors, [event.name]: "" }; dispatch({ type: "set_form", form: { @@ -312,6 +315,7 @@ export const UserAdd = (props: UserProps) => { [event.name]: event.value, }, }); + dispatch({ type: "set_errors", errors }); }; useAbortableEffect(() => { diff --git a/src/Components/Users/UserProfile.tsx b/src/Components/Users/UserProfile.tsx index 667abc942ec..b9af5b98f65 100644 --- a/src/Components/Users/UserProfile.tsx +++ b/src/Components/Users/UserProfile.tsx @@ -1,4 +1,4 @@ -import { useState, useReducer, lazy, FormEvent } from "react"; +import { useState, useReducer, FormEvent } from "react"; import { GENDER_TYPES } from "../../Common/constants"; import { validateEmailAddress } from "../../Common/validation"; import * as Notification from "../../Utils/Notifications.js"; @@ -27,8 +27,7 @@ import request from "../../Utils/request/request"; import DateFormField from "../Form/FormFields/DateFormField"; import { validateRule } from "./UserAdd"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../Common/Loading")); - +import Loading from "@/Components/Common/Loading"; type EditForm = { firstName: string; lastName: string; diff --git a/src/Locale/en.json b/src/Locale/en.json index 064a6af7bdf..13690f230d3 100644 --- a/src/Locale/en.json +++ b/src/Locale/en.json @@ -198,6 +198,7 @@ "retake": "Retake", "submit": "Submit", "camera": "Camera", + "camera_permission_denied": "Camera Permission denied", "submitting": "Submitting", "view_details": "View Details", "type_to_search": "Type to search", @@ -399,7 +400,6 @@ "Sample Test": "Sample Test", "Shifting": "Shifting", "Resource": "Resource", - "External Results": "External Results", "Users": "Users", "Profile": "Profile", "Dashboard": "Dashboard", @@ -415,7 +415,6 @@ "session_expired_msg": "It appears that your session has expired. This could be due to inactivity. Please login again to continue.", "invalid_reset": "Invalid Reset", "please_upload_a_csv_file": "Please Upload A CSV file", - "upload_external_results": "Upload External Results", "csv_file_in_the_specified_format": "Select a CSV file in the specified format", "sample_format": "Sample Format", "search_for_facility": "Search for Facility", @@ -435,7 +434,6 @@ "patient_status": "Patient Status", "mobile_number": "Mobile Number", "patient_created": "Patient Created", - "care_external_results_id": "Care external results ID", "update_record": "Update Record", "facility_search_placeholder": "Search by Facility / District Name", "advanced_filters": "Advanced Filters", @@ -942,7 +940,7 @@ "modified_date": "Modified Date", "no_patients_to_show": "No patients to show.", "shifting_status": "Shifting status", - "transfer_to_receiving_facility": "TRANSFER TO RECEIVING FACILITY", + "transfer_to_receiving_facility": "Transfer to receiving facility", "confirm_transfer_complete": "Confirm Transfer Complete!", "mark_transfer_complete_confirmation": "Are you sure you want to mark this transfer as complete? The Origin facility will no longer have access to this patient", "board_view": "Board View", @@ -1053,5 +1051,9 @@ "location_beds_empty": "No beds available in this location", "add_beds_to_configure_presets": "Add beds to this location to configure presets for them.", "manage_bed_presets": "Manage Presets of Bed", - "position": "Position" + "position": "Position", + "resource_origin_facility": "Origin Facility", + "resource_approving_facility": "Resource approving facility", + "width": "Width ({{unit}})", + "length": "Length ({{unit}})" } \ No newline at end of file diff --git a/src/Locale/hi.json b/src/Locale/hi.json index 065889b0c96..93fcd9d2b47 100644 --- a/src/Locale/hi.json +++ b/src/Locale/hi.json @@ -197,6 +197,7 @@ "retake": "फिर से लेना", "submit": "जमा करना", "camera": "कैमरा", + "camera_permission_denied": "कैमरा अनुमति नहीं दी गई", "submitting": "भेजने से", "view_details": "विवरण देखें", "type_to_search": "खोजने के लिए टाइप करें", @@ -364,7 +365,6 @@ "Sample Test": "नमूना परीक्षण", "Shifting": "स्थानांतरण", "Resource": "संसाधन", - "External Results": "बाह्य परिणाम", "Users": "उपयोगकर्ताओं", "Profile": "प्रोफ़ाइल", "Dashboard": "डैशबोर्ड", @@ -380,7 +380,6 @@ "session_expired_msg": "ऐसा लगता है कि आपका सत्र समाप्त हो गया है। यह निष्क्रियता के कारण हो सकता है। कृपया जारी रखने के लिए फिर से लॉगिन करें।", "invalid_reset": "अमान्य रीसेट", "please_upload_a_csv_file": "कृपया एक CSV फ़ाइल अपलोड करें", - "upload_external_results": "बाहरी परिणाम अपलोड करें", "csv_file_in_the_specified_format": "निर्दिष्ट प्रारूप में CSV फ़ाइल चुनें", "sample_format": "नमूना प्रारूप", "search_for_facility": "सुविधा खोजें", @@ -400,7 +399,6 @@ "patient_status": "रोगी की स्थिति", "mobile_number": "मोबाइल नंबर", "patient_created": "रोगी बनाया गया", - "care_external_results_id": "देखभाल बाह्य परिणाम आईडी", "update_record": "रिकॉर्ड अपडेट करें", "facility_search_placeholder": "सुविधा / जिला नाम से खोजें", "advanced_filters": "उन्नत फ़िल्टर", diff --git a/src/Locale/kn.json b/src/Locale/kn.json index 816db159f44..483399d0f4f 100644 --- a/src/Locale/kn.json +++ b/src/Locale/kn.json @@ -197,6 +197,7 @@ "retake": "ಮರುಪಡೆಯಿರಿ", "submit": "ಸಲ್ಲಿಸಿ", "camera": "ಕ್ಯಾಮೆರಾ", + "camera_permission_denied": "ಕ್ಯಾಮೆರಾ ಅನುಮತಿ ನಿರಾಕರಿಸಲಾಗಿದೆ", "submitting": "ಸಲ್ಲಿಸಲಾಗುತ್ತಿದೆ", "view_details": "ವಿವರಗಳನ್ನು ವೀಕ್ಷಿಸಿ", "type_to_search": "ಹುಡುಕಲು ಟೈಪ್ ಮಾಡಿ", @@ -364,7 +365,6 @@ "Sample Test": "ಮಾದರಿ ಪರೀಕ್ಷೆ", "Shifting": "ಸ್ಥಳಾಂತರ", "Resource": "ಸಂಪನ್ಮೂಲ", - "External Results": "ಬಾಹ್ಯ ಫಲಿತಾಂಶಗಳು", "Users": "ಬಳಕೆದಾರರು", "Profile": "ಪ್ರೊಫೈಲ್", "Dashboard": "ಡ್ಯಾಶ್‌ಬೋರ್ಡ್", @@ -380,7 +380,6 @@ "session_expired_msg": "ನಿಮ್ಮ ಅವಧಿ ಮುಗಿದಿದೆ ಎಂದು ತೋರುತ್ತಿದೆ. ಇದು ನಿಷ್ಕ್ರಿಯತೆಯ ಕಾರಣದಿಂದಾಗಿರಬಹುದು. ಮುಂದುವರಿಸಲು ದಯವಿಟ್ಟು ಮತ್ತೆ ಲಾಗಿನ್ ಮಾಡಿ.", "invalid_reset": "ಅಮಾನ್ಯ ಮರುಹೊಂದಿಸಿ", "please_upload_a_csv_file": "ದಯವಿಟ್ಟು CSV ಫೈಲ್ ಅನ್ನು ಅಪ್‌ಲೋಡ್ ಮಾಡಿ", - "upload_external_results": "ಬಾಹ್ಯ ಫಲಿತಾಂಶಗಳನ್ನು ಅಪ್ಲೋಡ್ ಮಾಡಿ", "csv_file_in_the_specified_format": "ನಿರ್ದಿಷ್ಟಪಡಿಸಿದ ಸ್ವರೂಪದಲ್ಲಿ CSV ಫೈಲ್ ಅನ್ನು ಆಯ್ಕೆಮಾಡಿ", "sample_format": "ಮಾದರಿ ಸ್ವರೂಪ", "search_for_facility": "ಸೌಲಭ್ಯಕ್ಕಾಗಿ ಹುಡುಕಿ", @@ -400,7 +399,6 @@ "patient_status": "ರೋಗಿಯ ಸ್ಥಿತಿ", "mobile_number": "ಮೊಬೈಲ್ ಸಂಖ್ಯೆ", "patient_created": "ರೋಗಿಯನ್ನು ರಚಿಸಲಾಗಿದೆ", - "care_external_results_id": "ಬಾಹ್ಯ ಫಲಿತಾಂಶಗಳ ಐಡಿಯನ್ನು ನೋಡಿಕೊಳ್ಳಿ", "update_record": "ದಾಖಲೆಯನ್ನು ನವೀಕರಿಸಿ", "facility_search_placeholder": "ಸೌಲಭ್ಯ / ಜಿಲ್ಲೆಯ ಹೆಸರಿನ ಮೂಲಕ ಹುಡುಕಿ", "advanced_filters": "ಸುಧಾರಿತ ಫಿಲ್ಟರ್‌ಗಳು", diff --git a/src/Locale/ml.json b/src/Locale/ml.json index 5dc71639e63..feca336779d 100644 --- a/src/Locale/ml.json +++ b/src/Locale/ml.json @@ -197,6 +197,7 @@ "retake": "വീണ്ടും എടുക്കുക", "submit": "സമർപ്പിക്കുക", "camera": "ക്യാമറ", + "camera_permission_denied": "ക്യാമറ അനുമതി നിഷേധിച്ചു", "submitting": "സമർപ്പിക്കുന്നു", "view_details": "വിശദാംശങ്ങൾ കാണുക", "type_to_search": "തിരയാൻ ടൈപ്പ് ചെയ്യുക", @@ -364,7 +365,6 @@ "Sample Test": "സാമ്പിൾ ടെസ്റ്റ്", "Shifting": "ഫെസിലിറ്റി മാറ്റല്‍ ", "Resource": "സഹായം", - "External Results": "ബാഹ്യ ഫലങ്ങൾ", "Users": "ഉപയോക്താക്കൾ", "Profile": "പ്രൊഫൈൽ", "Dashboard": "ഡാഷ്ബോർഡ്", @@ -380,7 +380,6 @@ "session_expired_msg": "നിങ്ങളുടെ സെഷൻ കാലഹരണപ്പെട്ടതായി തോന്നുന്നു. ഇത് നിഷ്ക്രിയത്വം മൂലമാകാം. തുടരാൻ വീണ്ടും ലോഗിൻ ചെയ്യുക.", "invalid_reset": "അസാധുവായ റീസെറ്റ്", "please_upload_a_csv_file": "ദയവായി ഒരു CSV ഫയൽ അപ്‌ലോഡ് ചെയ്യുക", - "upload_external_results": "ബാഹ്യ ഫലങ്ങൾ അപ്‌ലോഡ് ചെയ്യുക", "csv_file_in_the_specified_format": "നിർദ്ദിഷ്ട ഫോർമാറ്റിൽ ഒരു CSV ഫയൽ തിരഞ്ഞെടുക്കുക", "sample_format": "സാമ്പിൾ ഫോർമാറ്റ്", "search_for_facility": "സൗകര്യത്തിനായി തിരയുക", @@ -400,7 +399,6 @@ "patient_status": "രോഗിയുടെ അവസ്ഥ", "mobile_number": "മൊബൈൽ നമ്പർ", "patient_created": "രോഗിയെ സൃഷ്ടിച്ചു", - "care_external_results_id": "ബാഹ്യ ഫലങ്ങളുടെ ഐഡി പരിപാലിക്കുക", "update_record": "റെക്കോർഡ് അപ്ഡേറ്റ് ചെയ്യുക", "facility_search_placeholder": "ഫെസിലിറ്റി / ജില്ല പ്രകാരം തിരയുക", "advanced_filters": "വിപുലമായ ഫിൽട്ടറുകൾ", diff --git a/src/Locale/mr.json b/src/Locale/mr.json index 835d0524792..180e7df8391 100644 --- a/src/Locale/mr.json +++ b/src/Locale/mr.json @@ -52,7 +52,6 @@ "Sample Test": "नमुना तपासणी ", "Shifting": "शिफ्टिंग", "Resource": "संसाधन", - "External Results": "बाह्य परिणाम", "Users": "युजर्स", "Profile": "प्रोफाइल", "Dashboard": "डॅशबोर्ड", diff --git a/src/Locale/ta.json b/src/Locale/ta.json index 0f34867d767..0a6dd322ee5 100644 --- a/src/Locale/ta.json +++ b/src/Locale/ta.json @@ -197,6 +197,7 @@ "retake": "மீண்டும் எடுக்கவும்", "submit": "சமர்ப்பிக்கவும்", "camera": "கேமரா", + "camera_permission_denied": "கேமரா அனுமதி நிராகரித்தது", "submitting": "சமர்ப்பிக்கிறது", "view_details": "விவரங்களைக் காண்க", "type_to_search": "தேட தட்டச்சு செய்யவும்", @@ -364,7 +365,6 @@ "Sample Test": "மாதிரி சோதனை", "Shifting": "மாற்றுதல்", "Resource": "வளம்", - "External Results": "வெளி முடிவு", "Users": "பயனர்கள்", "Profile": "சுயவிவரம்", "Dashboard": "டாஷ்போர்டு", @@ -380,7 +380,6 @@ "session_expired_msg": "உங்கள் அமர்வு காலாவதியானது போல் தெரிகிறது. இது செயலற்ற தன்மை காரணமாக இருக்கலாம். தொடர மீண்டும் உள்நுழையவும்.", "invalid_reset": "தவறான மீட்டமைப்பு", "please_upload_a_csv_file": "CSV கோப்பைப் பதிவேற்றவும்", - "upload_external_results": "வெளிப்புற முடிவுகளைப் பதிவேற்றவும்", "csv_file_in_the_specified_format": "குறிப்பிட்ட வடிவத்தில் CSV கோப்பைத் தேர்ந்தெடுக்கவும்", "sample_format": "மாதிரி வடிவம்", "search_for_facility": "வசதியைத் தேடுங்கள்", @@ -400,7 +399,6 @@ "patient_status": "நோயாளியின் நிலை", "mobile_number": "மொபைல் எண்", "patient_created": "நோயாளி உருவாக்கப்பட்டது", - "care_external_results_id": "கேர் வெளிப்புற முடிவுகள் ஐடி", "update_record": "பதிவைப் புதுப்பிக்கவும்", "facility_search_placeholder": "வசதி / மாவட்ட பெயர் மூலம் தேடுங்கள்", "advanced_filters": "மேம்பட்ட வடிப்பான்கள்", diff --git a/src/Redux/api.tsx b/src/Redux/api.tsx index cd1a019e221..f63bb8191bd 100644 --- a/src/Redux/api.tsx +++ b/src/Redux/api.tsx @@ -72,12 +72,8 @@ import { import { IComment, IResource } from "../Components/Resource/models"; import { IDeleteBedCapacity, - IDeleteExternalResult, - IExternalResult, - IExternalResultCsv, ILocalBodies, ILocalBodyByDistrict, - IPartialUpdateExternalResult, } from "../Components/ExternalResult/models"; import { InvestigationGroup, @@ -846,42 +842,6 @@ const routes = { TRes: Type(), }, - // External Results - externalResultList: { - path: "/api/v1/external_result/", - method: "GET", - TRes: Type>(), - }, - externalResult: { - path: "/api/v1/external_result/{id}/", - method: "GET", - TRes: Type(), - }, - externalResultUploadCsv: { - path: "/api/v1/external_result/bulk_upsert/", - method: "POST", - TBody: Type(), - TRes: Type(), - }, - - deleteExternalResult: { - path: "/api/v1/external_result/{id}/", - method: "DELETE", - TRes: Type(), - }, - - updateExternalResult: { - path: "/api/v1/external_result/{id}/", - method: "PUT", - }, - - partialUpdateExternalResult: { - path: "/api/v1/external_result/{id}/", - method: "PATCH", - TRes: Type(), - TBody: Type(), - }, - // States statesList: { path: "/api/v1/state/", diff --git a/src/Routers/AppRouter.tsx b/src/Routers/AppRouter.tsx index 4240eff221e..87bd3b71d8a 100644 --- a/src/Routers/AppRouter.tsx +++ b/src/Routers/AppRouter.tsx @@ -24,9 +24,7 @@ import HCXRoutes from "./routes/HCXRoutes"; import ShiftingRoutes from "./routes/ShiftingRoutes"; import AssetRoutes from "./routes/AssetRoutes"; import ResourceRoutes from "./routes/ResourceRoutes"; -import ExternalResultRoutes from "./routes/ExternalResultRoutes"; import { DetailRoute } from "./types"; -import useAuthUser from "../Common/hooks/useAuthUser"; import careConfig from "@careConfig"; import IconIndex from "../CAREUI/icons/Index"; @@ -63,22 +61,12 @@ const Routes = { }; export default function AppRouter() { - const authUser = useAuthUser(); - let routes = Routes; if (careConfig.hcx.enabled) { routes = { ...HCXRoutes, ...routes }; } - if ( - !["Nurse", "NurseReadOnly", "Staff", "StaffReadOnly"].includes( - authUser.user_type, - ) - ) { - routes = { ...routes, ...ExternalResultRoutes }; - } - useRedirect("/user", "/users"); const pages = useRoutes(routes) || ; const path = usePath(); diff --git a/src/Routers/routes/ExternalResultRoutes.tsx b/src/Routers/routes/ExternalResultRoutes.tsx deleted file mode 100644 index b6bc71a2808..00000000000 --- a/src/Routers/routes/ExternalResultRoutes.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import ResultItem from "../../Components/ExternalResult/ResultItem"; -import ResultList from "../../Components/ExternalResult/ResultList"; -import ResultUpdate from "../../Components/ExternalResult/ResultUpdate"; -import { DetailRoute } from "../types"; - -export default { - "/external_results": () => , - "/external_results/:id": ({ id }: DetailRoute) => , - "/external_results/:id/update": ({ id }: DetailRoute) => ( - - ), -}; diff --git a/src/Routers/routes/ResourceRoutes.tsx b/src/Routers/routes/ResourceRoutes.tsx index 8408ab4d79d..6636d0d83ea 100644 --- a/src/Routers/routes/ResourceRoutes.tsx +++ b/src/Routers/routes/ResourceRoutes.tsx @@ -1,5 +1,3 @@ -import { DndProvider } from "react-dnd"; -import { HTML5Backend } from "react-dnd-html5-backend"; import ResourceDetails from "../../Components/Resource/ResourceDetails"; import { ResourceDetailsUpdate } from "../../Components/Resource/ResourceDetailsUpdate"; import ListView from "../../Components/Resource/ListView"; @@ -12,11 +10,7 @@ const getDefaultView = () => export default { "/resource": () => , - "/resource/board": () => ( - - - - ), + "/resource/board": () => , "/resource/list": () => , "/resource/:id": ({ id }: DetailRoute) => , "/resource/:id/update": ({ id }: DetailRoute) => ( diff --git a/src/Routers/routes/ShiftingRoutes.tsx b/src/Routers/routes/ShiftingRoutes.tsx index 9b20b4a1a0b..f2e12de4f25 100644 --- a/src/Routers/routes/ShiftingRoutes.tsx +++ b/src/Routers/routes/ShiftingRoutes.tsx @@ -1,5 +1,3 @@ -import { DndProvider } from "react-dnd"; -import { HTML5Backend } from "react-dnd-html5-backend"; import { ShiftCreate } from "../../Components/Patient/ShiftCreate"; import ShiftDetails from "../../Components/Shifting/ShiftDetails"; import { ShiftDetailsUpdate } from "../../Components/Shifting/ShiftDetailsUpdate"; @@ -12,11 +10,7 @@ const getDefaultView = () => export default { "/shifting": () => , - "/shifting/board": () => ( - - - - ), + "/shifting/board": () => , "/shifting/list": () => , "/shifting/:id": ({ id }: any) => , "/shifting/:id/update": ({ id }: any) => , diff --git a/src/Utils/AutoSave.tsx b/src/Utils/AutoSave.tsx index da330a3fc6a..dd251f5bbb7 100644 --- a/src/Utils/AutoSave.tsx +++ b/src/Utils/AutoSave.tsx @@ -1,4 +1,12 @@ -import { useReducer, useEffect, useRef, useState, Dispatch } from "react"; +import React, { + useReducer, + useEffect, + useRef, + useState, + Dispatch, + useContext, + ReactNode, +} from "react"; import { Button } from "../Components/ui/button"; import { FormAction, FormReducer, FormState } from "../Components/Form/Utils"; import { relativeTime } from "./utils"; @@ -81,9 +89,20 @@ export function useAutoSaveState(initialState: any) { return [state, setState]; } +type RestoreDraftContextValue = { + handleDraftSelect: (formState: any) => void; + draftStarted: boolean; + drafts: Draft[]; +}; + +const RestoreDraftContext = + React.createContext(null); + export function DraftSection(props: { handleDraftSelect: (formState: any) => void; formData: any; + hidden?: boolean; + children?: ReactNode; }) { const { handleDraftSelect } = props; const [drafts, setDrafts] = useState([]); @@ -123,32 +142,56 @@ export function DraftSection(props: { }, []); return ( - <> - {drafts && drafts.length > 0 && ( + + {!props.hidden && drafts && drafts.length > 0 && (
- +
)} - + {props.children} +
); } + +export const RestoreDraftButton = () => { + const ctx = useContext(RestoreDraftContext); + + if (!ctx) { + throw new Error( + "RestoreDraftButton must be used within a RestoreDraftProvider", + ); + } + + const { handleDraftSelect, draftStarted, drafts } = ctx; + + if (!(drafts && drafts.length > 0)) { + return null; + } + + return ( + + ); +}; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index a14b5cd2122..7657f7da19e 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -25,7 +25,6 @@ interface ImportMetaEnv { readonly REACT_KASP_STRING?: string; readonly REACT_KASP_FULL_STRING?: string; readonly REACT_SAMPLE_FORMAT_ASSET_IMPORT?: string; - readonly REACT_SAMPLE_FORMAT_EXTERNAL_RESULT_IMPORT?: string; readonly REACT_WARTIME_SHIFTING?: string; readonly REACT_STILL_WATCHING_IDLE_TIMEOUT?: string; readonly REACT_STILL_WATCHING_PROMPT_DURATION?: string;