@parafin/react 1.0.3 → 1.0.5

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.
package/index.tsx CHANGED
@@ -26,14 +26,15 @@ type OptInFields = {
26
26
  }
27
27
  }
28
28
 
29
- const ParafinWidget = (props: {
30
- token: string
31
- product: 'capital' | 'banking'
32
- externalBusinessId?: string
33
- onExit?: () => void
34
- onOptIn?: () => Promise<OptInFields>
35
- environment?: string
36
- }) => {
29
+ const ParafinWidget = (
30
+ props: {
31
+ token: string
32
+ product: 'capital' | 'banking'
33
+ externalBusinessId?: string
34
+ onExit?: () => void
35
+ onOptIn?: () => Promise<OptInFields>
36
+ } & Record<string, any>
37
+ ) => {
37
38
  try {
38
39
  const iframeRef = useRef<HTMLIFrameElement>(null)
39
40
  const [iframeKey, setIframeKey] = useState(0)
@@ -46,7 +47,7 @@ const ParafinWidget = (props: {
46
47
  case 'local':
47
48
  return 'http://localhost:9090'
48
49
  case 'development':
49
- return 'https://widget.dev.parafin.com'
50
+ return props.widgetUrlOverride ?? 'https://widget.dev.parafin.com'
50
51
  default:
51
52
  return 'https://widget.parafin.com'
52
53
  }
@@ -76,6 +77,7 @@ const ParafinWidget = (props: {
76
77
  setIframeKey((key) => key + 1)
77
78
  props.onExit?.()
78
79
  },
80
+ dashboardUrlOverride: props.dashboardUrlOverride,
79
81
  })
80
82
  break
81
83
  case 'opt-in':
package/out/index.d.ts CHANGED
@@ -28,6 +28,5 @@ declare const ParafinWidget: (props: {
28
28
  externalBusinessId?: string;
29
29
  onExit?: () => void;
30
30
  onOptIn?: () => Promise<OptInFields>;
31
- environment?: string;
32
- }) => import("react/jsx-runtime").JSX.Element;
31
+ } & Record<string, any>) => JSX.Element;
33
32
  export { OptInFields, ParafinWidget };
package/out/index.js CHANGED
@@ -13,7 +13,7 @@ const ParafinWidget = (props) => {
13
13
  case 'local':
14
14
  return 'http://localhost:9090';
15
15
  case 'development':
16
- return 'https://widget.dev.parafin.com';
16
+ return props.widgetUrlOverride ?? 'https://widget.dev.parafin.com';
17
17
  default:
18
18
  return 'https://widget.parafin.com';
19
19
  }
@@ -43,6 +43,7 @@ const ParafinWidget = (props) => {
43
43
  setIframeKey((key) => key + 1);
44
44
  props.onExit?.();
45
45
  },
46
+ dashboardUrlOverride: props.dashboardUrlOverride,
46
47
  });
47
48
  break;
48
49
  case 'opt-in':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parafin/react",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Parafin React widget",
5
5
  "author": "Parafin (https://www.parafin.com)",
6
6
  "module": "out/index.js",
@@ -10,11 +10,11 @@
10
10
  "build": "tsc"
11
11
  },
12
12
  "devDependencies": {
13
- "@types/react": "^18.2.55",
13
+ "@types/react": "^16.8.0",
14
14
  "typescript": "^4.9.5"
15
15
  },
16
16
  "dependencies": {
17
- "@parafin/core": "^1.0.4",
18
- "react": "^18.2.0"
17
+ "@parafin/core": "^1.0.8",
18
+ "react": "^16.8.0"
19
19
  }
20
20
  }