@documenso/embed-react 0.2.1-rc.1 → 0.2.1

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
@@ -2,3 +2,5 @@ export { default as EmbedDirectTemplate } from './direct-template';
2
2
  export { default as EmbedSignDocument } from './sign-document';
3
3
  export { default as unstable_EmbedCreateDocument } from './create-document';
4
4
  export { default as unstable_EmbedCreateTemplate } from './create-template';
5
+ export { default as unstable_EmbedUpdateDocument } from './update-document';
6
+ export { default as unstable_EmbedUpdateTemplate } from './update-template';
package/dist/index.d.ts CHANGED
@@ -2,3 +2,5 @@ export { default as EmbedDirectTemplate } from './direct-template';
2
2
  export { default as EmbedSignDocument } from './sign-document';
3
3
  export { default as unstable_EmbedCreateDocument } from './create-document';
4
4
  export { default as unstable_EmbedCreateTemplate } from './create-template';
5
+ export { default as unstable_EmbedUpdateDocument } from './update-document';
6
+ export { default as unstable_EmbedUpdateTemplate } from './update-template';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),c=require("react");function f(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",a=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,email:e.email,lockEmail:e.lockEmail,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),n=new URL(`/embed/direct/${e.token}`,t);return e.externalId&&n.searchParams.set("externalId",e.externalId),`${n}#${a}`}function s(t){var a,n,m,o,u,r;if(((a=d.current)==null?void 0:a.contentWindow)===t.source)switch(t.data.action){case"document-ready":(n=e.onDocumentReady)==null||n.call(e);break;case"document-completed":(m=e.onDocumentCompleted)==null||m.call(e,t.data.data);break;case"document-error":(o=e.onDocumentError)==null||o.call(e,t.data.data);break;case"field-signed":(u=e.onFieldSigned)==null||u.call(e);break;case"field-unsigned":(r=e.onFieldUnsigned)==null||r.call(e);break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),l.jsx("iframe",{ref:d,className:e.className,src:i()})}function b(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",a=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps})));return`${new URL(`/embed/sign/${e.token}`,t)}#${a}`}function s(t){var a,n,m,o,u;if(((a=d.current)==null?void 0:a.contentWindow)===t.source)switch(t.data.action){case"document-ready":(n=e.onDocumentReady)==null||n.call(e);break;case"document-completed":(m=e.onDocumentCompleted)==null||m.call(e,t.data.data);break;case"document-error":(o=e.onDocumentError)==null||o.call(e,t.data.data);break;case"document-rejected":(u=e.onDocumentRejected)==null||u.call(e,t.data.data);break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),l.jsx("iframe",{ref:d,className:e.className,src:i()})}function k(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",a=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps})));return`${new URL("/embed/v1/authoring/document/create",t)}#${a}`}function s(t){var a,n;if(((a=d.current)==null?void 0:a.contentWindow)===t.source)switch(t.data.type){case"document-completed":(n=e.onDocumentCreated)==null||n.call(e,{documentId:t.data.documentId,externalId:t.data.externalId});break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),l.jsx("iframe",{ref:d,className:e.className,src:i()})}function w(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",a=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps})));return`${new URL("/embed/v1/authoring/template/create",t)}#${a}`}function s(t){var a,n;if(((a=d.current)==null?void 0:a.contentWindow)===t.source)switch(t.data.type){case"template-completed":(n=e.onTemplateCreated)==null||n.call(e,{templateId:t.data.templateId,externalId:t.data.externalId});break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),l.jsx("iframe",{ref:d,className:e.className,src:i()})}exports.EmbedDirectTemplate=f;exports.EmbedSignDocument=b;exports.unstable_EmbedCreateDocument=k;exports.unstable_EmbedCreateTemplate=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),c=require("react");function f(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",n=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,email:e.email,lockEmail:e.lockEmail,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL(`/embed/direct/${e.token}`,t);return e.externalId&&a.searchParams.set("externalId",e.externalId),`${a}#${n}`}function s(t){var n,a,o,u,r,l;if(((n=d.current)==null?void 0:n.contentWindow)===t.source)switch(t.data.action){case"document-ready":(a=e.onDocumentReady)==null||a.call(e);break;case"document-completed":(o=e.onDocumentCompleted)==null||o.call(e,t.data.data);break;case"document-error":(u=e.onDocumentError)==null||u.call(e,t.data.data);break;case"field-signed":(r=e.onFieldSigned)==null||r.call(e);break;case"field-unsigned":(l=e.onFieldUnsigned)==null||l.call(e);break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),m.jsx("iframe",{ref:d,className:e.className,src:i()})}function b(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",n=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps})));return`${new URL(`/embed/sign/${e.token}`,t)}#${n}`}function s(t){var n,a,o,u,r;if(((n=d.current)==null?void 0:n.contentWindow)===t.source)switch(t.data.action){case"document-ready":(a=e.onDocumentReady)==null||a.call(e);break;case"document-completed":(o=e.onDocumentCompleted)==null||o.call(e,t.data.data);break;case"document-error":(u=e.onDocumentError)==null||u.call(e,t.data.data);break;case"document-rejected":(r=e.onDocumentRejected)==null||r.call(e,t.data.data);break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),m.jsx("iframe",{ref:d,className:e.className,src:i()})}function g(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",n=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL("/embed/v1/authoring/document/create",t);return a.searchParams.set("token",e.presignToken),a.hash=n,a.toString()}function s(t){var n,a;if(((n=d.current)==null?void 0:n.contentWindow)===t.source)switch(t.data.type){case"document-created":(a=e.onDocumentCreated)==null||a.call(e,{documentId:t.data.documentId,externalId:t.data.externalId});break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),m.jsx("iframe",{ref:d,className:e.className,src:i()})}function w(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",n=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL("/embed/v1/authoring/template/create",t);return a.searchParams.set("token",e.presignToken),a.hash=n,a.toString()}function s(t){var n,a;if(((n=d.current)==null?void 0:n.contentWindow)===t.source)switch(t.data.type){case"template-created":(a=e.onTemplateCreated)==null||a.call(e,{templateId:t.data.templateId,externalId:t.data.externalId});break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),m.jsx("iframe",{ref:d,className:e.className,src:i()})}function k(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",n=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/document/update/${e.documentId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=n,a.toString()}function s(t){var n,a;if(((n=d.current)==null?void 0:n.contentWindow)===t.source)switch(t.data.type){case"document-updated":(a=e.onDocumentUpdated)==null||a.call(e,{documentId:t.data.documentId,externalId:t.data.externalId});break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),m.jsx("iframe",{ref:d,className:e.className,src:i()})}function h(e){const d=c.useRef(null);function i(){const t=e.host||"https://app.documenso.com",n=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/template/update/${e.templateId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=n,a.toString()}function s(t){var n,a;if(((n=d.current)==null?void 0:n.contentWindow)===t.source)switch(t.data.type){case"template-updated":(a=e.onTemplateUpdated)==null||a.call(e,{templateId:t.data.templateId,externalId:t.data.externalId});break}}return c.useEffect(()=>{window.addEventListener("message",s)},[]),c.useEffect(()=>()=>{window.removeEventListener("message",s)},[]),m.jsx("iframe",{ref:d,className:e.className,src:i()})}exports.EmbedDirectTemplate=f;exports.EmbedSignDocument=b;exports.unstable_EmbedCreateDocument=g;exports.unstable_EmbedCreateTemplate=w;exports.unstable_EmbedUpdateDocument=k;exports.unstable_EmbedUpdateTemplate=h;
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useRef as u, useEffect as m } from "react";
3
- function w(e) {
4
- const c = u(null);
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { useRef as o, useEffect as s } from "react";
3
+ function g(e) {
4
+ const d = o(null);
5
5
  function i() {
6
- const a = e.host || "https://app.documenso.com", t = btoa(
6
+ const a = e.host || "https://app.documenso.com", n = btoa(
7
7
  encodeURIComponent(
8
8
  JSON.stringify({
9
9
  name: e.name,
@@ -16,40 +16,40 @@ function w(e) {
16
16
  ...e.additionalProps
17
17
  })
18
18
  )
19
- ), n = new URL(`/embed/direct/${e.token}`, a);
20
- return e.externalId && n.searchParams.set("externalId", e.externalId), `${n}#${t}`;
19
+ ), t = new URL(`/embed/direct/${e.token}`, a);
20
+ return e.externalId && t.searchParams.set("externalId", e.externalId), `${t}#${n}`;
21
21
  }
22
- function d(a) {
23
- var t, n, s, o, l, f;
24
- if (((t = c.current) == null ? void 0 : t.contentWindow) === a.source)
22
+ function c(a) {
23
+ var n, t, r, l, u, f;
24
+ if (((n = d.current) == null ? void 0 : n.contentWindow) === a.source)
25
25
  switch (a.data.action) {
26
26
  case "document-ready":
27
- (n = e.onDocumentReady) == null || n.call(e);
27
+ (t = e.onDocumentReady) == null || t.call(e);
28
28
  break;
29
29
  case "document-completed":
30
- (s = e.onDocumentCompleted) == null || s.call(e, a.data.data);
30
+ (r = e.onDocumentCompleted) == null || r.call(e, a.data.data);
31
31
  break;
32
32
  case "document-error":
33
- (o = e.onDocumentError) == null || o.call(e, a.data.data);
33
+ (l = e.onDocumentError) == null || l.call(e, a.data.data);
34
34
  break;
35
35
  case "field-signed":
36
- (l = e.onFieldSigned) == null || l.call(e);
36
+ (u = e.onFieldSigned) == null || u.call(e);
37
37
  break;
38
38
  case "field-unsigned":
39
39
  (f = e.onFieldUnsigned) == null || f.call(e);
40
40
  break;
41
41
  }
42
42
  }
43
- return m(() => {
44
- window.addEventListener("message", d);
45
- }, []), m(() => () => {
46
- window.removeEventListener("message", d);
47
- }, []), /* @__PURE__ */ r("iframe", { ref: c, className: e.className, src: i() });
43
+ return s(() => {
44
+ window.addEventListener("message", c);
45
+ }, []), s(() => () => {
46
+ window.removeEventListener("message", c);
47
+ }, []), /* @__PURE__ */ m("iframe", { ref: d, className: e.className, src: i() });
48
48
  }
49
- function g(e) {
50
- const c = u(null);
49
+ function k(e) {
50
+ const d = o(null);
51
51
  function i() {
52
- const a = e.host || "https://app.documenso.com", t = btoa(
52
+ const a = e.host || "https://app.documenso.com", n = btoa(
53
53
  encodeURIComponent(
54
54
  JSON.stringify({
55
55
  name: e.name,
@@ -62,36 +62,106 @@ function g(e) {
62
62
  })
63
63
  )
64
64
  );
65
- return `${new URL(`/embed/sign/${e.token}`, a)}#${t}`;
65
+ return `${new URL(`/embed/sign/${e.token}`, a)}#${n}`;
66
66
  }
67
- function d(a) {
68
- var t, n, s, o, l;
69
- if (((t = c.current) == null ? void 0 : t.contentWindow) === a.source)
67
+ function c(a) {
68
+ var n, t, r, l, u;
69
+ if (((n = d.current) == null ? void 0 : n.contentWindow) === a.source)
70
70
  switch (a.data.action) {
71
71
  case "document-ready":
72
- (n = e.onDocumentReady) == null || n.call(e);
72
+ (t = e.onDocumentReady) == null || t.call(e);
73
73
  break;
74
74
  case "document-completed":
75
- (s = e.onDocumentCompleted) == null || s.call(e, a.data.data);
75
+ (r = e.onDocumentCompleted) == null || r.call(e, a.data.data);
76
76
  break;
77
77
  case "document-error":
78
- (o = e.onDocumentError) == null || o.call(e, a.data.data);
78
+ (l = e.onDocumentError) == null || l.call(e, a.data.data);
79
79
  break;
80
80
  case "document-rejected":
81
- (l = e.onDocumentRejected) == null || l.call(e, a.data.data);
81
+ (u = e.onDocumentRejected) == null || u.call(e, a.data.data);
82
+ break;
83
+ }
84
+ }
85
+ return s(() => {
86
+ window.addEventListener("message", c);
87
+ }, []), s(() => () => {
88
+ window.removeEventListener("message", c);
89
+ }, []), /* @__PURE__ */ m("iframe", { ref: d, className: e.className, src: i() });
90
+ }
91
+ function h(e) {
92
+ const d = o(null);
93
+ function i() {
94
+ const a = e.host || "https://app.documenso.com", n = btoa(
95
+ encodeURIComponent(
96
+ JSON.stringify({
97
+ externalId: e.externalId,
98
+ features: e.features,
99
+ css: e.css,
100
+ cssVars: e.cssVars,
101
+ darkModeDisabled: e.darkModeDisabled,
102
+ ...e.additionalProps
103
+ })
104
+ )
105
+ ), t = new URL("/embed/v1/authoring/document/create", a);
106
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
107
+ }
108
+ function c(a) {
109
+ var n, t;
110
+ if (((n = d.current) == null ? void 0 : n.contentWindow) === a.source)
111
+ switch (a.data.type) {
112
+ case "document-created":
113
+ (t = e.onDocumentCreated) == null || t.call(e, {
114
+ documentId: a.data.documentId,
115
+ externalId: a.data.externalId
116
+ });
82
117
  break;
83
118
  }
84
119
  }
85
- return m(() => {
86
- window.addEventListener("message", d);
87
- }, []), m(() => () => {
88
- window.removeEventListener("message", d);
89
- }, []), /* @__PURE__ */ r("iframe", { ref: c, className: e.className, src: i() });
120
+ return s(() => {
121
+ window.addEventListener("message", c);
122
+ }, []), s(() => () => {
123
+ window.removeEventListener("message", c);
124
+ }, []), /* @__PURE__ */ m("iframe", { ref: d, className: e.className, src: i() });
125
+ }
126
+ function I(e) {
127
+ const d = o(null);
128
+ function i() {
129
+ const a = e.host || "https://app.documenso.com", n = btoa(
130
+ encodeURIComponent(
131
+ JSON.stringify({
132
+ externalId: e.externalId,
133
+ features: e.features,
134
+ css: e.css,
135
+ cssVars: e.cssVars,
136
+ darkModeDisabled: e.darkModeDisabled,
137
+ ...e.additionalProps
138
+ })
139
+ )
140
+ ), t = new URL("/embed/v1/authoring/template/create", a);
141
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
142
+ }
143
+ function c(a) {
144
+ var n, t;
145
+ if (((n = d.current) == null ? void 0 : n.contentWindow) === a.source)
146
+ switch (a.data.type) {
147
+ case "template-created":
148
+ (t = e.onTemplateCreated) == null || t.call(e, {
149
+ templateId: a.data.templateId,
150
+ externalId: a.data.externalId
151
+ });
152
+ break;
153
+ }
154
+ }
155
+ return s(() => {
156
+ window.addEventListener("message", c);
157
+ }, []), s(() => () => {
158
+ window.removeEventListener("message", c);
159
+ }, []), /* @__PURE__ */ m("iframe", { ref: d, className: e.className, src: i() });
90
160
  }
91
161
  function D(e) {
92
- const c = u(null);
162
+ const d = o(null);
93
163
  function i() {
94
- const a = e.host || "https://app.documenso.com", t = btoa(
164
+ const a = e.host || "https://app.documenso.com", n = btoa(
95
165
  encodeURIComponent(
96
166
  JSON.stringify({
97
167
  token: e.presignToken,
@@ -103,34 +173,36 @@ function D(e) {
103
173
  ...e.additionalProps
104
174
  })
105
175
  )
176
+ ), t = new URL(
177
+ `/embed/v1/authoring/document/update/${e.documentId}`,
178
+ a
106
179
  );
107
- return `${new URL("/embed/v1/authoring/document/create", a)}#${t}`;
180
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
108
181
  }
109
- function d(a) {
110
- var t, n;
111
- if (((t = c.current) == null ? void 0 : t.contentWindow) === a.source)
182
+ function c(a) {
183
+ var n, t;
184
+ if (((n = d.current) == null ? void 0 : n.contentWindow) === a.source)
112
185
  switch (a.data.type) {
113
- case "document-completed":
114
- (n = e.onDocumentCreated) == null || n.call(e, {
186
+ case "document-updated":
187
+ (t = e.onDocumentUpdated) == null || t.call(e, {
115
188
  documentId: a.data.documentId,
116
189
  externalId: a.data.externalId
117
190
  });
118
191
  break;
119
192
  }
120
193
  }
121
- return m(() => {
122
- window.addEventListener("message", d);
123
- }, []), m(() => () => {
124
- window.removeEventListener("message", d);
125
- }, []), /* @__PURE__ */ r("iframe", { ref: c, className: e.className, src: i() });
194
+ return s(() => {
195
+ window.addEventListener("message", c);
196
+ }, []), s(() => () => {
197
+ window.removeEventListener("message", c);
198
+ }, []), /* @__PURE__ */ m("iframe", { ref: d, className: e.className, src: i() });
126
199
  }
127
- function h(e) {
128
- const c = u(null);
200
+ function E(e) {
201
+ const d = o(null);
129
202
  function i() {
130
- const a = e.host || "https://app.documenso.com", t = btoa(
203
+ const a = e.host || "https://app.documenso.com", n = btoa(
131
204
  encodeURIComponent(
132
205
  JSON.stringify({
133
- token: e.presignToken,
134
206
  externalId: e.externalId,
135
207
  features: e.features,
136
208
  css: e.css,
@@ -139,30 +211,35 @@ function h(e) {
139
211
  ...e.additionalProps
140
212
  })
141
213
  )
214
+ ), t = new URL(
215
+ `/embed/v1/authoring/template/update/${e.templateId}`,
216
+ a
142
217
  );
143
- return `${new URL("/embed/v1/authoring/template/create", a)}#${t}`;
218
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
144
219
  }
145
- function d(a) {
146
- var t, n;
147
- if (((t = c.current) == null ? void 0 : t.contentWindow) === a.source)
220
+ function c(a) {
221
+ var n, t;
222
+ if (((n = d.current) == null ? void 0 : n.contentWindow) === a.source)
148
223
  switch (a.data.type) {
149
- case "template-completed":
150
- (n = e.onTemplateCreated) == null || n.call(e, {
224
+ case "template-updated":
225
+ (t = e.onTemplateUpdated) == null || t.call(e, {
151
226
  templateId: a.data.templateId,
152
227
  externalId: a.data.externalId
153
228
  });
154
229
  break;
155
230
  }
156
231
  }
157
- return m(() => {
158
- window.addEventListener("message", d);
159
- }, []), m(() => () => {
160
- window.removeEventListener("message", d);
161
- }, []), /* @__PURE__ */ r("iframe", { ref: c, className: e.className, src: i() });
232
+ return s(() => {
233
+ window.addEventListener("message", c);
234
+ }, []), s(() => () => {
235
+ window.removeEventListener("message", c);
236
+ }, []), /* @__PURE__ */ m("iframe", { ref: d, className: e.className, src: i() });
162
237
  }
163
238
  export {
164
- w as EmbedDirectTemplate,
165
- g as EmbedSignDocument,
166
- D as unstable_EmbedCreateDocument,
167
- h as unstable_EmbedCreateTemplate
239
+ g as EmbedDirectTemplate,
240
+ k as EmbedSignDocument,
241
+ h as unstable_EmbedCreateDocument,
242
+ I as unstable_EmbedCreateTemplate,
243
+ D as unstable_EmbedUpdateDocument,
244
+ E as unstable_EmbedUpdateTemplate
168
245
  };
@@ -0,0 +1,27 @@
1
+ import { CssVars } from './css-vars';
2
+ import * as React from "react";
3
+ export type EmbedUpdateDocumentProps = {
4
+ className?: string;
5
+ host?: string;
6
+ presignToken: string;
7
+ documentId: number;
8
+ externalId?: string;
9
+ css?: string | undefined;
10
+ cssVars?: (CssVars & Record<string, string>) | undefined;
11
+ darkModeDisabled?: boolean | undefined;
12
+ features?: {
13
+ allowConfigureSignatureTypes?: boolean;
14
+ allowConfigureLanguage?: boolean;
15
+ allowConfigureDateFormat?: boolean;
16
+ allowConfigureTimezone?: boolean;
17
+ allowConfigureRedirectUrl?: boolean;
18
+ allowConfigureCommunication?: boolean;
19
+ };
20
+ additionalProps?: Record<string, string | number | boolean> | undefined;
21
+ onDocumentUpdated?: (data: {
22
+ externalId: string;
23
+ documentId: number;
24
+ }) => void;
25
+ };
26
+ declare function EmbedUpdateDocument(props: EmbedUpdateDocumentProps): React.JSX.Element;
27
+ export default EmbedUpdateDocument;
@@ -0,0 +1,27 @@
1
+ import { CssVars } from './css-vars';
2
+ import * as React from "react";
3
+ export type EmbedUpdateTemplateProps = {
4
+ className?: string;
5
+ host?: string;
6
+ presignToken: string;
7
+ templateId: number;
8
+ externalId?: string;
9
+ css?: string | undefined;
10
+ cssVars?: (CssVars & Record<string, string>) | undefined;
11
+ darkModeDisabled?: boolean | undefined;
12
+ features?: {
13
+ allowConfigureSignatureTypes?: boolean;
14
+ allowConfigureLanguage?: boolean;
15
+ allowConfigureDateFormat?: boolean;
16
+ allowConfigureTimezone?: boolean;
17
+ allowConfigureRedirectUrl?: boolean;
18
+ allowConfigureCommunication?: boolean;
19
+ };
20
+ additionalProps?: Record<string, string | number | boolean> | undefined;
21
+ onTemplateUpdated?: (data: {
22
+ externalId: string;
23
+ templateId: number;
24
+ }) => void;
25
+ };
26
+ declare function EmbedUpdateTemplate(props: EmbedUpdateTemplateProps): React.JSX.Element;
27
+ export default EmbedUpdateTemplate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@documenso/embed-react",
3
- "version": "0.2.1-rc.1",
3
+ "version": "0.2.1",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"