@documenso/embed-solid 0.3.0 → 0.5.0
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +89 -122
- package/dist/update-document.d.ts +1 -0
- package/dist/update-template.d.ts +1 -0
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { default as EmbedDirectTemplate } from './direct-template';
|
|
2
2
|
export { default as EmbedSignDocument } from './sign-document';
|
|
3
|
+
export { default as EmbedCreateDocumentV1 } from './create-document';
|
|
4
|
+
export { default as EmbedCreateTemplateV1 } from './create-template';
|
|
5
|
+
export { default as EmbedUpdateDocumentV1 } from './update-document';
|
|
6
|
+
export { default as EmbedUpdateTemplateV1 } from './update-template';
|
|
3
7
|
export { default as unstable_EmbedCreateDocument } from './create-document';
|
|
4
8
|
export { default as unstable_EmbedCreateTemplate } from './create-template';
|
|
5
9
|
export { default as unstable_EmbedUpdateDocument } from './update-document';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { default as EmbedDirectTemplate } from './direct-template';
|
|
2
2
|
export { default as EmbedSignDocument } from './sign-document';
|
|
3
|
+
export { default as EmbedCreateDocumentV1 } from './create-document';
|
|
4
|
+
export { default as EmbedCreateTemplateV1 } from './create-template';
|
|
5
|
+
export { default as EmbedUpdateDocumentV1 } from './update-document';
|
|
6
|
+
export { default as EmbedUpdateTemplateV1 } from './update-template';
|
|
3
7
|
export { default as unstable_EmbedCreateDocument } from './create-document';
|
|
4
8
|
export { default as unstable_EmbedCreateTemplate } from './create-template';
|
|
5
9
|
export { default as unstable_EmbedUpdateDocument } from './update-document';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("solid-js/web"),r=require("solid-js");var k=n.template("<iframe>");function g(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=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}#${d}`});function i(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"field-signed":e.onFieldSigned?.();break;case"field-unsigned":e.onFieldUnsigned?.();break}}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=k(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var h=n.template("<iframe>");function v(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=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)}#${d}`});function i(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break}}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=h(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var D=n.template("<iframe>");function l(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=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=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="document-created"&&e.onDocumentCreated?.({documentId:t.data.documentId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=D(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var w=n.template("<iframe>");function u(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=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=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="template-created"&&e.onTemplateCreated?.({templateId:t.data.templateId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=w(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var M=n.template("<iframe>");function f(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/document/edit/${e.documentId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="document-updated"&&e.onDocumentUpdated?.({documentId:t.data.documentId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=M(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var I=n.template("<iframe>");function b(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/template/edit/${e.templateId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="template-updated"&&e.onTemplateUpdated?.({templateId:t.data.templateId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=I(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var E=n.template("<iframe>");function U(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps}))),a=new URL("/embed/v1/multisign",t);for(const o of e.tokens)a.searchParams.append("token",o);return`${a}#${d}`});function i(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break;case"all-documents-completed":e.onAllDocumentsCompleted?.(t.data.data);break}}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=E(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}exports.EmbedCreateDocumentV1=l;exports.EmbedCreateTemplateV1=u;exports.EmbedDirectTemplate=g;exports.EmbedSignDocument=v;exports.EmbedUpdateDocumentV1=f;exports.EmbedUpdateTemplateV1=b;exports.unstable_EmbedCreateDocument=l;exports.unstable_EmbedCreateTemplate=u;exports.unstable_EmbedMultiSignDocument=U;exports.unstable_EmbedUpdateDocument=f;exports.unstable_EmbedUpdateTemplate=b;
|
package/dist/index.mjs
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return a.innerHTML = e, a.content.firstChild;
|
|
7
|
-
}, n = () => (d || (d = t())).cloneNode(!0);
|
|
8
|
-
return n.cloneNode = n, n;
|
|
9
|
-
}
|
|
10
|
-
function f(e, c, r) {
|
|
11
|
-
g(e) || (r == null ? e.removeAttribute(c) : e.setAttribute(c, r));
|
|
12
|
-
}
|
|
13
|
-
function b(e, c) {
|
|
14
|
-
g(e) || (c == null ? e.removeAttribute("class") : e.className = c);
|
|
15
|
-
}
|
|
16
|
-
function k(e, c, r) {
|
|
17
|
-
return v(() => e(c, r));
|
|
18
|
-
}
|
|
19
|
-
function g(e) {
|
|
20
|
-
return !!h.context && !h.done && (!e || e.isConnected);
|
|
21
|
-
}
|
|
22
|
-
var D = /* @__PURE__ */ u("<iframe>");
|
|
23
|
-
function N(e) {
|
|
24
|
-
const c = i(() => {
|
|
1
|
+
import { effect as i, className as m, setAttribute as l, use as u, template as f } from "solid-js/web";
|
|
2
|
+
import { createMemo as b, onMount as k } from "solid-js";
|
|
3
|
+
var h = /* @__PURE__ */ f("<iframe>");
|
|
4
|
+
function _(e) {
|
|
5
|
+
const s = b(() => {
|
|
25
6
|
const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
|
|
26
7
|
name: e.name,
|
|
27
8
|
lockName: e.lockName,
|
|
@@ -55,22 +36,22 @@ function N(e) {
|
|
|
55
36
|
}
|
|
56
37
|
}
|
|
57
38
|
let d;
|
|
58
|
-
return
|
|
39
|
+
return k(() => {
|
|
59
40
|
window.addEventListener("message", r);
|
|
60
41
|
}), (() => {
|
|
61
|
-
var t =
|
|
62
|
-
return typeof n == "function" ?
|
|
63
|
-
var
|
|
64
|
-
return
|
|
42
|
+
var t = h(), n = d;
|
|
43
|
+
return typeof n == "function" ? u(n, t) : d = t, i((a) => {
|
|
44
|
+
var c = e.className, o = s();
|
|
45
|
+
return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
|
|
65
46
|
}, {
|
|
66
47
|
e: void 0,
|
|
67
48
|
t: void 0
|
|
68
49
|
}), t;
|
|
69
50
|
})();
|
|
70
51
|
}
|
|
71
|
-
var
|
|
72
|
-
function
|
|
73
|
-
const
|
|
52
|
+
var v = /* @__PURE__ */ f("<iframe>");
|
|
53
|
+
function M(e) {
|
|
54
|
+
const s = b(() => {
|
|
74
55
|
const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
|
|
75
56
|
name: e.name,
|
|
76
57
|
lockName: e.lockName,
|
|
@@ -100,22 +81,22 @@ function R(e) {
|
|
|
100
81
|
}
|
|
101
82
|
}
|
|
102
83
|
let d;
|
|
103
|
-
return
|
|
84
|
+
return k(() => {
|
|
104
85
|
window.addEventListener("message", r);
|
|
105
86
|
}), (() => {
|
|
106
|
-
var t =
|
|
107
|
-
return typeof n == "function" ?
|
|
108
|
-
var
|
|
109
|
-
return
|
|
87
|
+
var t = v(), n = d;
|
|
88
|
+
return typeof n == "function" ? u(n, t) : d = t, i((a) => {
|
|
89
|
+
var c = e.className, o = s();
|
|
90
|
+
return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
|
|
110
91
|
}, {
|
|
111
92
|
e: void 0,
|
|
112
93
|
t: void 0
|
|
113
94
|
}), t;
|
|
114
95
|
})();
|
|
115
96
|
}
|
|
116
|
-
var
|
|
117
|
-
function
|
|
118
|
-
const
|
|
97
|
+
var g = /* @__PURE__ */ f("<iframe>");
|
|
98
|
+
function R(e) {
|
|
99
|
+
const s = b(() => {
|
|
119
100
|
const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
|
|
120
101
|
externalId: e.externalId,
|
|
121
102
|
features: e.features,
|
|
@@ -127,33 +108,28 @@ function $(e) {
|
|
|
127
108
|
return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
|
|
128
109
|
});
|
|
129
110
|
function r(t) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
documentId: t.data.documentId,
|
|
135
|
-
externalId: t.data.externalId
|
|
136
|
-
});
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
111
|
+
d?.contentWindow === t.source && t.data.type === "document-created" && e.onDocumentCreated?.({
|
|
112
|
+
documentId: t.data.documentId,
|
|
113
|
+
externalId: t.data.externalId
|
|
114
|
+
});
|
|
139
115
|
}
|
|
140
116
|
let d;
|
|
141
|
-
return
|
|
117
|
+
return k(() => {
|
|
142
118
|
window.addEventListener("message", r);
|
|
143
119
|
}), (() => {
|
|
144
|
-
var t =
|
|
145
|
-
return typeof n == "function" ?
|
|
146
|
-
var
|
|
147
|
-
return
|
|
120
|
+
var t = g(), n = d;
|
|
121
|
+
return typeof n == "function" ? u(n, t) : d = t, i((a) => {
|
|
122
|
+
var c = e.className, o = s();
|
|
123
|
+
return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
|
|
148
124
|
}, {
|
|
149
125
|
e: void 0,
|
|
150
126
|
t: void 0
|
|
151
127
|
}), t;
|
|
152
128
|
})();
|
|
153
129
|
}
|
|
154
|
-
var
|
|
155
|
-
function
|
|
156
|
-
const
|
|
130
|
+
var D = /* @__PURE__ */ f("<iframe>");
|
|
131
|
+
function $(e) {
|
|
132
|
+
const s = b(() => {
|
|
157
133
|
const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
|
|
158
134
|
externalId: e.externalId,
|
|
159
135
|
features: e.features,
|
|
@@ -165,33 +141,28 @@ function x(e) {
|
|
|
165
141
|
return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
|
|
166
142
|
});
|
|
167
143
|
function r(t) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
templateId: t.data.templateId,
|
|
173
|
-
externalId: t.data.externalId
|
|
174
|
-
});
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
144
|
+
d?.contentWindow === t.source && t.data.type === "template-created" && e.onTemplateCreated?.({
|
|
145
|
+
templateId: t.data.templateId,
|
|
146
|
+
externalId: t.data.externalId
|
|
147
|
+
});
|
|
177
148
|
}
|
|
178
149
|
let d;
|
|
179
|
-
return
|
|
150
|
+
return k(() => {
|
|
180
151
|
window.addEventListener("message", r);
|
|
181
152
|
}), (() => {
|
|
182
|
-
var t =
|
|
183
|
-
return typeof n == "function" ?
|
|
184
|
-
var
|
|
185
|
-
return
|
|
153
|
+
var t = D(), n = d;
|
|
154
|
+
return typeof n == "function" ? u(n, t) : d = t, i((a) => {
|
|
155
|
+
var c = e.className, o = s();
|
|
156
|
+
return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
|
|
186
157
|
}, {
|
|
187
158
|
e: void 0,
|
|
188
159
|
t: void 0
|
|
189
160
|
}), t;
|
|
190
161
|
})();
|
|
191
162
|
}
|
|
192
|
-
var
|
|
193
|
-
function
|
|
194
|
-
const
|
|
163
|
+
var w = /* @__PURE__ */ f("<iframe>");
|
|
164
|
+
function N(e) {
|
|
165
|
+
const s = b(() => {
|
|
195
166
|
const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
|
|
196
167
|
token: e.presignToken,
|
|
197
168
|
externalId: e.externalId,
|
|
@@ -199,76 +170,68 @@ function C(e) {
|
|
|
199
170
|
css: e.css,
|
|
200
171
|
cssVars: e.cssVars,
|
|
201
172
|
darkModeDisabled: e.darkModeDisabled,
|
|
173
|
+
onlyEditFields: e.onlyEditFields,
|
|
202
174
|
...e.additionalProps
|
|
203
175
|
}))), a = new URL(`/embed/v1/authoring/document/edit/${e.documentId}`, t);
|
|
204
176
|
return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
|
|
205
177
|
});
|
|
206
178
|
function r(t) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
documentId: t.data.documentId,
|
|
212
|
-
externalId: t.data.externalId
|
|
213
|
-
});
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
179
|
+
d?.contentWindow === t.source && t.data.type === "document-updated" && e.onDocumentUpdated?.({
|
|
180
|
+
documentId: t.data.documentId,
|
|
181
|
+
externalId: t.data.externalId
|
|
182
|
+
});
|
|
216
183
|
}
|
|
217
184
|
let d;
|
|
218
|
-
return
|
|
185
|
+
return k(() => {
|
|
219
186
|
window.addEventListener("message", r);
|
|
220
187
|
}), (() => {
|
|
221
|
-
var t =
|
|
222
|
-
return typeof n == "function" ?
|
|
223
|
-
var
|
|
224
|
-
return
|
|
188
|
+
var t = w(), n = d;
|
|
189
|
+
return typeof n == "function" ? u(n, t) : d = t, i((a) => {
|
|
190
|
+
var c = e.className, o = s();
|
|
191
|
+
return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
|
|
225
192
|
}, {
|
|
226
193
|
e: void 0,
|
|
227
194
|
t: void 0
|
|
228
195
|
}), t;
|
|
229
196
|
})();
|
|
230
197
|
}
|
|
231
|
-
var
|
|
232
|
-
function
|
|
233
|
-
const
|
|
198
|
+
var I = /* @__PURE__ */ f("<iframe>");
|
|
199
|
+
function x(e) {
|
|
200
|
+
const s = b(() => {
|
|
234
201
|
const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
|
|
235
202
|
externalId: e.externalId,
|
|
236
203
|
features: e.features,
|
|
237
204
|
css: e.css,
|
|
238
205
|
cssVars: e.cssVars,
|
|
239
206
|
darkModeDisabled: e.darkModeDisabled,
|
|
207
|
+
onlyEditFields: e.onlyEditFields,
|
|
240
208
|
...e.additionalProps
|
|
241
209
|
}))), a = new URL(`/embed/v1/authoring/template/edit/${e.templateId}`, t);
|
|
242
210
|
return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
|
|
243
211
|
});
|
|
244
212
|
function r(t) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
templateId: t.data.templateId,
|
|
250
|
-
externalId: t.data.externalId
|
|
251
|
-
});
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
213
|
+
d?.contentWindow === t.source && t.data.type === "template-updated" && e.onTemplateUpdated?.({
|
|
214
|
+
templateId: t.data.templateId,
|
|
215
|
+
externalId: t.data.externalId
|
|
216
|
+
});
|
|
254
217
|
}
|
|
255
218
|
let d;
|
|
256
|
-
return
|
|
219
|
+
return k(() => {
|
|
257
220
|
window.addEventListener("message", r);
|
|
258
221
|
}), (() => {
|
|
259
|
-
var t =
|
|
260
|
-
return typeof n == "function" ?
|
|
261
|
-
var
|
|
262
|
-
return
|
|
222
|
+
var t = I(), n = d;
|
|
223
|
+
return typeof n == "function" ? u(n, t) : d = t, i((a) => {
|
|
224
|
+
var c = e.className, o = s();
|
|
225
|
+
return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
|
|
263
226
|
}, {
|
|
264
227
|
e: void 0,
|
|
265
228
|
t: void 0
|
|
266
229
|
}), t;
|
|
267
230
|
})();
|
|
268
231
|
}
|
|
269
|
-
var
|
|
270
|
-
function
|
|
271
|
-
const
|
|
232
|
+
var E = /* @__PURE__ */ f("<iframe>");
|
|
233
|
+
function C(e) {
|
|
234
|
+
const s = b(() => {
|
|
272
235
|
const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
|
|
273
236
|
name: e.name,
|
|
274
237
|
lockName: e.lockName,
|
|
@@ -278,8 +241,8 @@ function L(e) {
|
|
|
278
241
|
allowDocumentRejection: e.allowDocumentRejection,
|
|
279
242
|
...e.additionalProps
|
|
280
243
|
}))), a = new URL("/embed/v1/multisign", t);
|
|
281
|
-
for (const
|
|
282
|
-
a.searchParams.append("token",
|
|
244
|
+
for (const c of e.tokens)
|
|
245
|
+
a.searchParams.append("token", c);
|
|
283
246
|
return `${a}#${n}`;
|
|
284
247
|
});
|
|
285
248
|
function r(t) {
|
|
@@ -303,13 +266,13 @@ function L(e) {
|
|
|
303
266
|
}
|
|
304
267
|
}
|
|
305
268
|
let d;
|
|
306
|
-
return
|
|
269
|
+
return k(() => {
|
|
307
270
|
window.addEventListener("message", r);
|
|
308
271
|
}), (() => {
|
|
309
|
-
var t =
|
|
310
|
-
return typeof n == "function" ?
|
|
311
|
-
var
|
|
312
|
-
return
|
|
272
|
+
var t = E(), n = d;
|
|
273
|
+
return typeof n == "function" ? u(n, t) : d = t, i((a) => {
|
|
274
|
+
var c = e.className, o = s();
|
|
275
|
+
return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
|
|
313
276
|
}, {
|
|
314
277
|
e: void 0,
|
|
315
278
|
t: void 0
|
|
@@ -317,11 +280,15 @@ function L(e) {
|
|
|
317
280
|
})();
|
|
318
281
|
}
|
|
319
282
|
export {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
283
|
+
R as EmbedCreateDocumentV1,
|
|
284
|
+
$ as EmbedCreateTemplateV1,
|
|
285
|
+
_ as EmbedDirectTemplate,
|
|
286
|
+
M as EmbedSignDocument,
|
|
287
|
+
N as EmbedUpdateDocumentV1,
|
|
288
|
+
x as EmbedUpdateTemplateV1,
|
|
289
|
+
R as unstable_EmbedCreateDocument,
|
|
290
|
+
$ as unstable_EmbedCreateTemplate,
|
|
291
|
+
C as unstable_EmbedMultiSignDocument,
|
|
292
|
+
N as unstable_EmbedUpdateDocument,
|
|
293
|
+
x as unstable_EmbedUpdateTemplate
|
|
327
294
|
};
|
|
@@ -16,6 +16,7 @@ export type EmbedUpdateDocumentProps = {
|
|
|
16
16
|
allowConfigureRedirectUrl?: boolean;
|
|
17
17
|
allowConfigureCommunication?: boolean;
|
|
18
18
|
};
|
|
19
|
+
onlyEditFields?: boolean | undefined;
|
|
19
20
|
additionalProps?: Record<string, string | number | boolean> | undefined;
|
|
20
21
|
onDocumentUpdated?: (data: {
|
|
21
22
|
externalId: string;
|
|
@@ -16,6 +16,7 @@ export type EmbedUpdateTemplateProps = {
|
|
|
16
16
|
allowConfigureRedirectUrl?: boolean;
|
|
17
17
|
allowConfigureCommunication?: boolean;
|
|
18
18
|
};
|
|
19
|
+
onlyEditFields?: boolean | undefined;
|
|
19
20
|
additionalProps?: Record<string, string | number | boolean> | undefined;
|
|
20
21
|
onTemplateUpdated?: (data: {
|
|
21
22
|
externalId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@documenso/embed-solid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -32,12 +32,13 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"solid-js": "^1.
|
|
35
|
+
"solid-js": "^1.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@documenso/embed": "*",
|
|
39
|
-
"
|
|
39
|
+
"solid-js": "^1.0.0",
|
|
40
|
+
"vite-plugin-solid": "^2.0.0",
|
|
40
41
|
"vite": "^7.0.0",
|
|
41
|
-
"vite-plugin-dts": "^4.
|
|
42
|
+
"vite-plugin-dts": "^4.0.0"
|
|
42
43
|
}
|
|
43
44
|
}
|