diff --git a/frontend/app/components/AssistStats/pdfGenerator.ts b/frontend/app/components/AssistStats/pdfGenerator.ts index 7570f33c4..1364343f7 100644 --- a/frontend/app/components/AssistStats/pdfGenerator.ts +++ b/frontend/app/components/AssistStats/pdfGenerator.ts @@ -2,7 +2,7 @@ import { fileNameFormat } from 'App/utils'; export const getPdf2 = async () => { // @ts-ignore - import('html2canvas-pro').then(({ default: html2canvas }) => { + import('html2canvas').then(({ default: html2canvas }) => { // @ts-ignore window.html2canvas = html2canvas; diff --git a/frontend/app/components/Dashboard/components/WidgetForm/renderMap.ts b/frontend/app/components/Dashboard/components/WidgetForm/renderMap.ts index f29fb8a98..05aaff537 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/renderMap.ts +++ b/frontend/app/components/Dashboard/components/WidgetForm/renderMap.ts @@ -1,6 +1,6 @@ export const renderClickmapThumbnail = () => { // @ts-ignore - return import('html2canvas-pro').then(({ default: html2canvas }) => { + return import('html2canvas').then(({ default: html2canvas }) => { // @ts-ignore window.html2canvas = html2canvas; const element = document.querySelector('#clickmap-render * iframe').contentDocument.body diff --git a/frontend/app/components/Session_/Highlight/HighlightPanel.tsx b/frontend/app/components/Session_/Highlight/HighlightPanel.tsx index 60f36821a..c992fde91 100644 --- a/frontend/app/components/Session_/Highlight/HighlightPanel.tsx +++ b/frontend/app/components/Session_/Highlight/HighlightPanel.tsx @@ -242,7 +242,7 @@ window.__debugElementToImage = (el) => elementToImage(el).then(img => { function elementToImage(doc: Document) { const el = doc.body const srcMap = new WeakMap() - return import('html2canvas-pro').then(({ default: html2canvas }) => { + return import('html2canvas').then(({ default: html2canvas }) => { const images = doc.querySelectorAll('img') images.forEach((img) => { const sameOrigin = new URL(img.src, location.href).origin === location.origin diff --git a/frontend/package.json b/frontend/package.json index b2999bcc2..7a39d78d2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -40,6 +40,7 @@ "fzstd": "^0.1.1", "hls.js": "^1.5.13", "html-to-image": "^1.9.0", + "html2canvas": "^1.4.1", "html2canvas-pro": "^1.5.8", "immutable": "^4.3.7", "jest-environment-jsdom": "^29.5.0", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 2d31befaf..40e3667b9 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -8662,7 +8662,7 @@ __metadata: languageName: node linkType: hard -"html2canvas@npm:^1.0.0-rc.5": +"html2canvas@npm:^1.0.0-rc.5, html2canvas@npm:^1.4.1": version: 1.4.1 resolution: "html2canvas@npm:1.4.1" dependencies: @@ -11637,6 +11637,7 @@ __metadata: hls.js: "npm:^1.5.13" html-to-image: "npm:^1.9.0" html-webpack-plugin: "npm:^5.5.0" + html2canvas: "npm:^1.4.1" html2canvas-pro: "npm:^1.5.8" immutable: "npm:^4.3.7" jest: "npm:^29.5.0"