Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) O3-3871 Upgrade react-to-print library to v3 beta to resolve TypeError #1979

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
"@hookform/resolvers": "^3.3.1",
"classnames": "^2.3.2",
"react-hook-form": "^7.46.2",
"react-to-print": "^2.14.13",
"react-to-print": "^3.0.0-beta-3",
"zod": "^3.22.2"
},
"devDependencies": {
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ const PrintIdentifierSticker: React.FC<PrintIdentifierStickerProps> = ({ closeMo
onAfterPrint: handleAfterPrint,
onBeforeGetContent: handleBeforeGetContent,
onPrintError: handlePrintError,
});
} as any);

return (
<>
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ function PrintModal({ patientUuid, closeDialog }) {

const handlePrint = useReactToPrint({
content: () => printContainerRef.current,
});
} as any);

const patient = usePatient(patientUuid);

Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ const MedicationsDetailsTable: React.FC<ActiveMedicationsProps> = ({
onBeforeGetContentResolve.current = null;
setIsPrinting(false);
},
});
} as any);

return (
<div className={styles.widgetCard}>
Original file line number Diff line number Diff line change
@@ -269,7 +269,7 @@ const OrderDetailsTable: React.FC<OrderDetailsProps> = ({ patientUuid, showAddBu
onBeforeGetContentResolve.current = null;
setIsPrinting(false);
},
});
} as any);

const orderTypesToDisplay = useMemo(
() => [
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ const VitalsOverview: React.FC<VitalsOverviewProps> = ({ patientUuid, pageSize,
onBeforeGetContentResolve.current = null;
setIsPrinting(false);
},
});
} as any);

return (
<>
13 changes: 6 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -5652,7 +5652,7 @@ __metadata:
react-hook-form: "npm:^7.46.2"
react-i18next: "npm:^11.18.6"
react-router-dom: "npm:^6.16.0"
react-to-print: "npm:^2.14.13"
react-to-print: "npm:^3.0.0-beta-3"
rxjs: "npm:^7.8.0"
sass: "npm:^1.54.3"
swc-loader: "npm:^0.2.3"
@@ -21812,13 +21812,12 @@ __metadata:
languageName: node
linkType: hard

"react-to-print@npm:^2.14.13":
version: 2.14.13
resolution: "react-to-print@npm:2.14.13"
"react-to-print@npm:^3.0.0-beta-3":
version: 3.0.0-beta-3
resolution: "react-to-print@npm:3.0.0-beta-3"
peerDependencies:
react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0
react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0
checksum: 10/cc4e438b5b7e5c67a73ca3d87ff0f1b5a550a7e6c1a1911cded14c9591b286efd82029bd0447e016b0b404f274d546a108e760fd7867e6b73342dba450282a29
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ~19

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WodPachua was this neccessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this auto-generated to reflect the dependency(react-to-print version) change?

checksum: 10/5140a1a54932ad74f88ec34bd7fff5b1bd2f912e046f61892f1739714053a1ddf00fb0daa8b446b14c1da50a778020e7f239a2abbb2f2132e076d4e360c2da27
languageName: node
linkType: hard