@nium/nium-sdk 0.1.0 → 0.1.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.
package/dist/index.d.mts CHANGED
@@ -21,12 +21,18 @@ interface NiumTheme {
21
21
  }
22
22
  /** Prefill data for the payment (beneficiary) form */
23
23
  interface NiumPaymentPrefill {
24
- name?: {
25
- first?: string;
26
- last?: string;
27
- };
24
+ name?: string;
28
25
  email?: string;
29
26
  entityType?: 'individual' | 'business';
27
+ contactNumber?: string;
28
+ address?: {
29
+ line1?: string;
30
+ line2?: string;
31
+ city?: string;
32
+ state?: string;
33
+ postalCode?: string;
34
+ countryCode?: string;
35
+ };
30
36
  }
31
37
  /** Options passed to `createElement()` */
32
38
  interface NiumElementOptions {
@@ -37,6 +43,7 @@ interface NiumElementOptions {
37
43
  /** Custom minimum height for the iframe (default: 400) */
38
44
  customizations?: {
39
45
  minHeight?: number;
46
+ maxHeight?: number;
40
47
  };
41
48
  }
42
49
  interface NiumReadyEvent {
package/dist/index.d.ts CHANGED
@@ -21,12 +21,18 @@ interface NiumTheme {
21
21
  }
22
22
  /** Prefill data for the payment (beneficiary) form */
23
23
  interface NiumPaymentPrefill {
24
- name?: {
25
- first?: string;
26
- last?: string;
27
- };
24
+ name?: string;
28
25
  email?: string;
29
26
  entityType?: 'individual' | 'business';
27
+ contactNumber?: string;
28
+ address?: {
29
+ line1?: string;
30
+ line2?: string;
31
+ city?: string;
32
+ state?: string;
33
+ postalCode?: string;
34
+ countryCode?: string;
35
+ };
30
36
  }
31
37
  /** Options passed to `createElement()` */
32
38
  interface NiumElementOptions {
@@ -37,6 +43,7 @@ interface NiumElementOptions {
37
43
  /** Custom minimum height for the iframe (default: 400) */
38
44
  customizations?: {
39
45
  minHeight?: number;
46
+ maxHeight?: number;
40
47
  };
41
48
  }
42
49
  interface NiumReadyEvent {
package/dist/index.js CHANGED
@@ -61,12 +61,13 @@ var NiumElement = class {
61
61
  }
62
62
  this.container = el;
63
63
  const minHeight = this.options.customizations?.minHeight ?? 400;
64
+ const maxHeight = this.options.customizations?.maxHeight ?? 804;
64
65
  const iframe = document.createElement("iframe");
65
66
  iframe.src = this.iframeSrc;
66
67
  iframe.style.width = "100%";
67
68
  iframe.style.border = "none";
68
- iframe.style.overflow = "hidden";
69
69
  iframe.style.minHeight = `${minHeight}px`;
70
+ iframe.style.maxHeight = `${maxHeight}px`;
70
71
  iframe.setAttribute("allow", "clipboard-write");
71
72
  iframe.setAttribute("title", `NIUM ${this.elementType} onboarding`);
72
73
  this.iframe = iframe;
package/dist/index.mjs CHANGED
@@ -33,12 +33,13 @@ var NiumElement = class {
33
33
  }
34
34
  this.container = el;
35
35
  const minHeight = this.options.customizations?.minHeight ?? 400;
36
+ const maxHeight = this.options.customizations?.maxHeight ?? 804;
36
37
  const iframe = document.createElement("iframe");
37
38
  iframe.src = this.iframeSrc;
38
39
  iframe.style.width = "100%";
39
40
  iframe.style.border = "none";
40
- iframe.style.overflow = "hidden";
41
41
  iframe.style.minHeight = `${minHeight}px`;
42
+ iframe.style.maxHeight = `${maxHeight}px`;
42
43
  iframe.setAttribute("allow", "clipboard-write");
43
44
  iframe.setAttribute("title", `NIUM ${this.elementType} onboarding`);
44
45
  this.iframe = iframe;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nium/nium-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "NIUM Onboarding SDK - Embed hosted onboarding forms with a clean JavaScript API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",