@parafin/react 7.2.1 → 7.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/out/index.js +11 -2
  2. package/package.json +2 -2
package/out/index.js CHANGED
@@ -32,6 +32,11 @@ const openParafinDashboard = (props) => {
32
32
  ...('inWebView' in props &&
33
33
  props.inWebView !== undefined &&
34
34
  props.inWebView !== null && { inWebView: props.inWebView.toString() }),
35
+ ...('hideCloseButton' in props &&
36
+ props.hideCloseButton !== undefined &&
37
+ props.hideCloseButton !== null && {
38
+ hideCloseButton: props.hideCloseButton.toString(),
39
+ }),
35
40
  ...(props.dashboardTargetElementId && {
36
41
  isDashboardEmbedded: 'true',
37
42
  }),
@@ -94,7 +99,9 @@ const openParafinDashboard = (props) => {
94
99
  if (withOnExit)
95
100
  onExit();
96
101
  dashboardTargetElement.removeChild(frame);
97
- document.body.style.removeProperty('overflow');
102
+ if (!props.dashboardTargetElementId) {
103
+ document.body.style.removeProperty('overflow');
104
+ }
98
105
  }, 200);
99
106
  };
100
107
  const messageListener = async (event) => {
@@ -115,7 +122,9 @@ const openParafinDashboard = (props) => {
115
122
  dashboardTargetElement.appendChild(frame);
116
123
  setTimeout(() => {
117
124
  frame.style.opacity = '1';
118
- document.body.style.overflow = 'hidden';
125
+ if (!props.dashboardTargetElementId) {
126
+ document.body.style.overflow = 'hidden';
127
+ }
119
128
  }, 0);
120
129
  return () => cleanup({ withOnExit: false });
121
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parafin/react",
3
- "version": "7.2.1",
3
+ "version": "7.2.2",
4
4
  "description": "Parafin React widget",
5
5
  "author": "Parafin (https://www.parafin.com)",
6
6
  "main": "./out/index.js",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/react": ">=16.8.0",
34
- "typescript": "^4.9.5"
34
+ "typescript": "^5.9.3"
35
35
  },
36
36
  "dependencies": {
37
37
  "@parafin/core": "^3.2.1"