Skip to content

Commit

Permalink
Merge pull request #13 from beabee-communityrm/fix/embed-min-height
Browse files Browse the repository at this point in the history
build: update iframe resize script
  • Loading branch information
wpf500 authored Jul 9, 2024
2 parents aa8b6ff + a485885 commit de245ec
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
3 changes: 2 additions & 1 deletion apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"@fortawesome/free-regular-svg-icons": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/vue-fontawesome": "^3.0.8",
"@iframe-resizer/child": "^5.1.4",
"@iframe-resizer/parent": "^5.1.4",
"@maptiler/client": "^1.8.1",
"@maptiler/geocoding-control": "^1.2.4",
"@stripe/stripe-js": "^3.5.0",
Expand All @@ -64,7 +66,6 @@
"color2k": "^2.0.3",
"date-fns": "^3.6.0",
"formiojs": "npm:@beabee/formiojs@^4.15.11",
"iframe-resizer": "^4.4.2",
"maplibre-gl": "^3.6.2",
"mitt": "^3.0.1",
"otpauth": "^9.3.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/public/embed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import iframeResizer from 'iframe-resizer/js/iframeResizer';
import iframeResize from '@iframe-resizer/parent';

if (document.currentScript?.parentNode) {
const id = 'beabee-embed-' + Math.random().toString(36).substring(7);
Expand All @@ -16,5 +16,5 @@ if (document.currentScript?.parentNode) {
document.currentScript
);

iframeResizer({ heightCalculationMethod: 'lowestElement' }, '#' + id);
iframeResize({ license: 'GPLv3', waitForLoad: true }, '#' + id);
}
2 changes: 1 addition & 1 deletion apps/frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import router from './lib/router';

import './lib/theme';

import 'iframe-resizer/js/iframeResizer.contentWindow';
import '@iframe-resizer/child';

import './index.css';

Expand Down
33 changes: 25 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ __metadata:
"@fortawesome/free-regular-svg-icons": "npm:^6.5.2"
"@fortawesome/free-solid-svg-icons": "npm:^6.5.2"
"@fortawesome/vue-fontawesome": "npm:^3.0.8"
"@iframe-resizer/child": "npm:^5.1.4"
"@iframe-resizer/parent": "npm:^5.1.4"
"@intlify/unplugin-vue-i18n": "npm:^1.6.0"
"@maptiler/client": "npm:^1.8.1"
"@maptiler/geocoding-control": "npm:^1.2.4"
Expand Down Expand Up @@ -708,7 +710,6 @@ __metadata:
eslint-plugin-vue: "npm:^9.26.0"
formiojs: "npm:@beabee/formiojs@^4.15.11"
googleapis: "npm:^129.0.0"
iframe-resizer: "npm:^4.4.2"
maplibre-gl: "npm:^3.6.2"
markdown-it: "npm:^14.1.0"
mitt: "npm:^3.0.1"
Expand Down Expand Up @@ -1203,6 +1204,29 @@ __metadata:
languageName: node
linkType: hard

"@iframe-resizer/child@npm:^5.1.4":
version: 5.1.4
resolution: "@iframe-resizer/child@npm:5.1.4"
checksum: 10c0/0e525272539ef3c56d970ae6958845cb31a268113b41d8dbf403435f68112d188d7112f6fde013bff58d432064f0b0aef87a9a439c1d74b44ab5c7870b64a7e3
languageName: node
linkType: hard

"@iframe-resizer/core@npm:5.1.4":
version: 5.1.4
resolution: "@iframe-resizer/core@npm:5.1.4"
checksum: 10c0/adcc861109edf9265787c70f02f2599ce6eba7e6c8068d3907da68c9f862a4a073451a1d16980b7ef6bb7c90ff82694d62d80c1d9427c4cdaa4ae597616a0714
languageName: node
linkType: hard

"@iframe-resizer/parent@npm:^5.1.4":
version: 5.1.4
resolution: "@iframe-resizer/parent@npm:5.1.4"
dependencies:
"@iframe-resizer/core": "npm:5.1.4"
checksum: 10c0/5794312980950a07769332b5ff4f5f433d1e1c665f387e50437b55cc03394461d299f2a92a5085e9dffcf5a86735d61c472d1b7503bef34d67a6fda904c70748
languageName: node
linkType: hard

"@inquirer/checkbox@npm:^1.5.2":
version: 1.5.2
resolution: "@inquirer/checkbox@npm:1.5.2"
Expand Down Expand Up @@ -8326,13 +8350,6 @@ __metadata:
languageName: node
linkType: hard

"iframe-resizer@npm:^4.4.2":
version: 4.4.2
resolution: "iframe-resizer@npm:4.4.2"
checksum: 10c0/214a6e95c3d58a7956cc3ad468774c24c19a9c52b7a4beabc389748caaea4b7c62b711f67aa4d6de81c0d54017f0f7bbe81cabc8f39e2f79fbef7279822f2b20
languageName: node
linkType: hard

"ignore@npm:^5.2.0, ignore@npm:^5.3.1":
version: 5.3.1
resolution: "ignore@npm:5.3.1"
Expand Down

0 comments on commit de245ec

Please sign in to comment.