@superdoc-dev/esign 1.2.0 → 1.3.1-next.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/__tests__/SuperDocESign.test.d.ts +2 -0
- package/dist/__tests__/SuperDocESign.test.d.ts.map +1 -0
- package/dist/defaults/SignatureInput.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +519 -458
- package/dist/test/setup.d.ts +4 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -6
- package/dist/PdfViewer-BLHsHKWf.es-DVVY0V9L.cjs +0 -43
- package/dist/PdfViewer-BLHsHKWf.es-JoVU99JQ.js +0 -400
- package/dist/superdoc.es-CqejOF1J.js +0 -90963
- package/dist/superdoc.es-DfpwGgyj.cjs +0 -1180
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import pe, { forwardRef as me, useState as I, useRef as L, useEffect as te, useCallback as M, useImperativeHandle as ge } from "react";
|
|
2
|
+
var re = { exports: {} }, W = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.js
|
|
@@ -9,29 +9,29 @@ var Q = { exports: {} }, $ = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
} else
|
|
24
|
-
return
|
|
25
|
-
$$typeof:
|
|
12
|
+
var ie;
|
|
13
|
+
function ve() {
|
|
14
|
+
if (ie) return W;
|
|
15
|
+
ie = 1;
|
|
16
|
+
var g = Symbol.for("react.transitional.element"), v = Symbol.for("react.fragment");
|
|
17
|
+
function m(a, n, d) {
|
|
18
|
+
var x = null;
|
|
19
|
+
if (d !== void 0 && (x = "" + d), n.key !== void 0 && (x = "" + n.key), "key" in n) {
|
|
20
|
+
d = {};
|
|
21
|
+
for (var S in n)
|
|
22
|
+
S !== "key" && (d[S] = n[S]);
|
|
23
|
+
} else d = n;
|
|
24
|
+
return n = d.ref, {
|
|
25
|
+
$$typeof: g,
|
|
26
26
|
type: a,
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
29
|
-
props:
|
|
27
|
+
key: x,
|
|
28
|
+
ref: n !== void 0 ? n : null,
|
|
29
|
+
props: d
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return W.Fragment = v, W.jsx = m, W.jsxs = m, W;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var V = {};
|
|
35
35
|
/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.development.js
|
|
@@ -41,126 +41,126 @@ var q = {};
|
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
function
|
|
44
|
+
var ce;
|
|
45
|
+
function be() {
|
|
46
|
+
return ce || (ce = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
|
+
function g(e) {
|
|
48
48
|
if (e == null) return null;
|
|
49
49
|
if (typeof e == "function")
|
|
50
|
-
return e.$$typeof ===
|
|
50
|
+
return e.$$typeof === oe ? null : e.displayName || e.name || null;
|
|
51
51
|
if (typeof e == "string") return e;
|
|
52
52
|
switch (e) {
|
|
53
|
-
case
|
|
53
|
+
case _:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case b:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case H:
|
|
58
58
|
return "StrictMode";
|
|
59
|
-
case
|
|
59
|
+
case T:
|
|
60
60
|
return "Suspense";
|
|
61
|
-
case
|
|
61
|
+
case Z:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case K:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
66
|
if (typeof e == "object")
|
|
67
67
|
switch (typeof e.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
69
|
), e.$$typeof) {
|
|
70
|
-
case
|
|
70
|
+
case ne:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case
|
|
72
|
+
case A:
|
|
73
73
|
return e.displayName || "Context";
|
|
74
|
-
case
|
|
74
|
+
case G:
|
|
75
75
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
76
|
-
case
|
|
77
|
-
var
|
|
78
|
-
return e = e.displayName, e || (e =
|
|
79
|
-
case
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
|
|
76
|
+
case X:
|
|
77
|
+
var r = e.render;
|
|
78
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
79
|
+
case Q:
|
|
80
|
+
return r = e.displayName || null, r !== null ? r : g(e.type) || "Memo";
|
|
81
|
+
case P:
|
|
82
|
+
r = e._payload, e = e._init;
|
|
83
83
|
try {
|
|
84
|
-
return
|
|
84
|
+
return g(e(r));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function v(e) {
|
|
91
91
|
return "" + e;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function m(e) {
|
|
94
94
|
try {
|
|
95
|
-
|
|
96
|
-
var
|
|
95
|
+
v(e);
|
|
96
|
+
var r = !1;
|
|
97
97
|
} catch {
|
|
98
|
-
|
|
98
|
+
r = !0;
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
|
|
100
|
+
if (r) {
|
|
101
|
+
r = console;
|
|
102
|
+
var c = r.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
103
|
+
return c.call(
|
|
104
|
+
r,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
|
|
107
|
-
),
|
|
106
|
+
l
|
|
107
|
+
), v(e);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
function a(e) {
|
|
111
|
-
if (e ===
|
|
112
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
111
|
+
if (e === _) return "<>";
|
|
112
|
+
if (typeof e == "object" && e !== null && e.$$typeof === P)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var
|
|
116
|
-
return
|
|
115
|
+
var r = g(e);
|
|
116
|
+
return r ? "<" + r + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
var e =
|
|
121
|
+
function n() {
|
|
122
|
+
var e = w.A;
|
|
123
123
|
return e === null ? null : e.getOwner();
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function d() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function x(e) {
|
|
129
129
|
if (y.call(e, "key")) {
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
130
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
131
|
+
if (r && r.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
133
|
return e.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
function
|
|
135
|
+
function S(e, r) {
|
|
136
|
+
function c() {
|
|
137
137
|
k || (k = !0, console.error(
|
|
138
138
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
139
|
-
|
|
139
|
+
r
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
c.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
143
|
+
get: c,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
var e =
|
|
149
|
-
return
|
|
147
|
+
function z() {
|
|
148
|
+
var e = g(this.type);
|
|
149
|
+
return N[e] || (N[e] = !0, console.error(
|
|
150
150
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
151
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
153
|
+
function B(e, r, c, l, D, q) {
|
|
154
|
+
var u = c.ref;
|
|
155
155
|
return e = {
|
|
156
|
-
$$typeof:
|
|
156
|
+
$$typeof: J,
|
|
157
157
|
type: e,
|
|
158
|
-
key:
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
158
|
+
key: r,
|
|
159
|
+
props: c,
|
|
160
|
+
_owner: l
|
|
161
|
+
}, (u !== void 0 ? u : null) !== null ? Object.defineProperty(e, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
|
-
get:
|
|
163
|
+
get: z
|
|
164
164
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
@@ -175,133 +175,140 @@ function me() {
|
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
177
177
|
writable: !0,
|
|
178
|
-
value:
|
|
178
|
+
value: D
|
|
179
179
|
}), Object.defineProperty(e, "_debugTask", {
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
|
-
value:
|
|
183
|
+
value: q
|
|
184
184
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
186
|
+
function Y(e, r, c, l, D, q) {
|
|
187
|
+
var u = r.children;
|
|
188
|
+
if (u !== void 0)
|
|
189
|
+
if (l)
|
|
190
|
+
if (ae(u)) {
|
|
191
|
+
for (l = 0; l < u.length; l++)
|
|
192
|
+
$(u[l]);
|
|
193
|
+
Object.freeze && Object.freeze(u);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else
|
|
199
|
-
if (y.call(
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
return
|
|
198
|
+
else $(u);
|
|
199
|
+
if (y.call(r, "key")) {
|
|
200
|
+
u = g(e);
|
|
201
|
+
var C = Object.keys(r).filter(function(se) {
|
|
202
|
+
return se !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
l = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}", j[u + l] || (C = 0 < C.length ? "{" + C.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
),
|
|
211
|
+
l,
|
|
212
|
+
u,
|
|
213
|
+
C,
|
|
214
|
+
u
|
|
215
|
+
), j[u + l] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
for (var
|
|
220
|
-
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
|
|
217
|
+
if (u = null, c !== void 0 && (m(c), u = "" + c), x(r) && (m(r.key), u = "" + r.key), "key" in r) {
|
|
218
|
+
c = {};
|
|
219
|
+
for (var F in r)
|
|
220
|
+
F !== "key" && (c[F] = r[F]);
|
|
221
|
+
} else c = r;
|
|
222
|
+
return u && S(
|
|
223
|
+
c,
|
|
224
224
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
|
-
),
|
|
225
|
+
), B(
|
|
226
226
|
e,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
u,
|
|
228
|
+
c,
|
|
229
|
+
n(),
|
|
230
|
+
D,
|
|
231
|
+
q
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
h(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof ===
|
|
234
|
+
function $(e) {
|
|
235
|
+
h(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === P && (e._payload.status === "fulfilled" ? h(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
236
236
|
}
|
|
237
237
|
function h(e) {
|
|
238
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
238
|
+
return typeof e == "object" && e !== null && e.$$typeof === J;
|
|
239
239
|
}
|
|
240
|
-
var
|
|
240
|
+
var O = pe, J = Symbol.for("react.transitional.element"), ne = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), H = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), G = Symbol.for("react.consumer"), A = Symbol.for("react.context"), X = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), Z = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), K = Symbol.for("react.activity"), oe = Symbol.for("react.client.reference"), w = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, y = Object.prototype.hasOwnProperty, ae = Array.isArray, E = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
|
-
|
|
243
|
+
O = {
|
|
244
244
|
react_stack_bottom_frame: function(e) {
|
|
245
245
|
return e();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var k,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
248
|
+
var k, N = {}, ee = O.react_stack_bottom_frame.bind(
|
|
249
|
+
O,
|
|
250
|
+
d
|
|
251
|
+
)(), U = E(a(d)), j = {};
|
|
252
|
+
V.Fragment = _, V.jsx = function(e, r, c) {
|
|
253
|
+
var l = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return Y(
|
|
255
255
|
e,
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
r,
|
|
257
|
+
c,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
l ? Error("react-stack-top-frame") : ee,
|
|
260
|
+
l ? E(a(e)) : U
|
|
261
261
|
);
|
|
262
|
-
},
|
|
263
|
-
var
|
|
264
|
-
return
|
|
262
|
+
}, V.jsxs = function(e, r, c) {
|
|
263
|
+
var l = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
264
|
+
return Y(
|
|
265
265
|
e,
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
r,
|
|
267
|
+
c,
|
|
268
268
|
!0,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
l ? Error("react-stack-top-frame") : ee,
|
|
270
|
+
l ? E(a(e)) : U
|
|
271
271
|
);
|
|
272
272
|
};
|
|
273
|
-
})()),
|
|
273
|
+
})()), V;
|
|
274
274
|
}
|
|
275
|
-
var
|
|
276
|
-
function
|
|
277
|
-
return
|
|
275
|
+
var le;
|
|
276
|
+
function xe() {
|
|
277
|
+
return le || (le = 1, process.env.NODE_ENV === "production" ? re.exports = ve() : re.exports = be()), re.exports;
|
|
278
278
|
}
|
|
279
|
-
var p =
|
|
280
|
-
const
|
|
281
|
-
value:
|
|
282
|
-
onChange:
|
|
283
|
-
isDisabled:
|
|
279
|
+
var p = xe();
|
|
280
|
+
const he = ({
|
|
281
|
+
value: g,
|
|
282
|
+
onChange: v,
|
|
283
|
+
isDisabled: m,
|
|
284
284
|
label: a
|
|
285
|
-
}) => /* @__PURE__ */ p.jsxs(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
"input",
|
|
289
|
-
{
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
285
|
+
}) => /* @__PURE__ */ p.jsxs(
|
|
286
|
+
"div",
|
|
287
|
+
{
|
|
288
|
+
className: "superdoc-esign-signature-input",
|
|
289
|
+
style: { display: "flex", flexDirection: "column", gap: "8px" },
|
|
290
|
+
children: [
|
|
291
|
+
a && /* @__PURE__ */ p.jsx("label", { children: a }),
|
|
292
|
+
/* @__PURE__ */ p.jsx(
|
|
293
|
+
"input",
|
|
294
|
+
{
|
|
295
|
+
type: "text",
|
|
296
|
+
value: String(g || ""),
|
|
297
|
+
onChange: (n) => v(n.target.value),
|
|
298
|
+
disabled: m,
|
|
299
|
+
placeholder: "Type your full name",
|
|
300
|
+
style: {
|
|
301
|
+
fontFamily: "cursive",
|
|
302
|
+
fontSize: "18px"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
), ye = ({
|
|
309
|
+
value: g,
|
|
310
|
+
onChange: v,
|
|
311
|
+
isDisabled: m,
|
|
305
312
|
label: a
|
|
306
313
|
}) => /* @__PURE__ */ p.jsxs(
|
|
307
314
|
"label",
|
|
@@ -313,343 +320,397 @@ const ge = ({
|
|
|
313
320
|
"input",
|
|
314
321
|
{
|
|
315
322
|
type: "checkbox",
|
|
316
|
-
checked: !!
|
|
317
|
-
onChange: (
|
|
318
|
-
disabled:
|
|
323
|
+
checked: !!g,
|
|
324
|
+
onChange: (n) => v(n.target.checked),
|
|
325
|
+
disabled: m
|
|
319
326
|
}
|
|
320
327
|
),
|
|
321
328
|
/* @__PURE__ */ p.jsx("span", { children: a })
|
|
322
329
|
]
|
|
323
330
|
}
|
|
324
|
-
),
|
|
325
|
-
onClick:
|
|
331
|
+
), Ee = (g) => ({
|
|
332
|
+
onClick: m,
|
|
326
333
|
fileName: a,
|
|
327
|
-
isDisabled:
|
|
334
|
+
isDisabled: n
|
|
328
335
|
}) => {
|
|
329
|
-
const
|
|
336
|
+
const d = g?.label || "Download";
|
|
330
337
|
return /* @__PURE__ */ p.jsxs(
|
|
331
338
|
"button",
|
|
332
339
|
{
|
|
333
|
-
onClick:
|
|
334
|
-
disabled:
|
|
335
|
-
className: "superdoc-esign-btn",
|
|
340
|
+
onClick: m,
|
|
341
|
+
disabled: n,
|
|
342
|
+
className: "superdoc-esign-btn superdoc-esign-btn--download",
|
|
336
343
|
style: {
|
|
337
|
-
padding: "
|
|
344
|
+
padding: "8px 16px",
|
|
338
345
|
borderRadius: "6px",
|
|
339
|
-
border: "
|
|
340
|
-
background: "#
|
|
346
|
+
border: "1px solid #d0d5dd",
|
|
347
|
+
background: "#ffffff",
|
|
341
348
|
color: "#333",
|
|
342
|
-
cursor:
|
|
343
|
-
opacity:
|
|
349
|
+
cursor: n ? "not-allowed" : "pointer",
|
|
350
|
+
opacity: n ? 0.5 : 1,
|
|
344
351
|
fontSize: "16px",
|
|
345
352
|
fontWeight: "bold"
|
|
346
353
|
},
|
|
347
354
|
children: [
|
|
348
|
-
|
|
355
|
+
d,
|
|
349
356
|
" ",
|
|
350
357
|
a && `(${a})`
|
|
351
358
|
]
|
|
352
359
|
}
|
|
353
360
|
);
|
|
354
|
-
},
|
|
355
|
-
onClick:
|
|
361
|
+
}, _e = (g) => ({
|
|
362
|
+
onClick: m,
|
|
356
363
|
isValid: a,
|
|
357
|
-
isDisabled:
|
|
358
|
-
isSubmitting:
|
|
364
|
+
isDisabled: n,
|
|
365
|
+
isSubmitting: d
|
|
359
366
|
}) => {
|
|
360
|
-
const
|
|
367
|
+
const x = () => g?.label || "Submit";
|
|
361
368
|
return /* @__PURE__ */ p.jsx(
|
|
362
369
|
"button",
|
|
363
370
|
{
|
|
364
|
-
onClick:
|
|
365
|
-
disabled: !a ||
|
|
366
|
-
className: "superdoc-esign-btn",
|
|
371
|
+
onClick: m,
|
|
372
|
+
disabled: !a || n || d,
|
|
373
|
+
className: "superdoc-esign-btn superdoc-esign-btn--submit",
|
|
367
374
|
style: {
|
|
368
375
|
padding: "12px 24px",
|
|
369
376
|
borderRadius: "6px",
|
|
370
377
|
border: "none",
|
|
371
378
|
background: "#007bff",
|
|
372
379
|
color: "#fff",
|
|
373
|
-
cursor: !a ||
|
|
374
|
-
opacity: !a ||
|
|
380
|
+
cursor: !a || n ? "not-allowed" : "pointer",
|
|
381
|
+
opacity: !a || n ? 0.5 : 1,
|
|
375
382
|
fontSize: "16px",
|
|
376
383
|
fontWeight: "bold"
|
|
377
384
|
},
|
|
378
|
-
children:
|
|
385
|
+
children: x()
|
|
379
386
|
}
|
|
380
387
|
);
|
|
381
|
-
},
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
const M = P(
|
|
427
|
-
(t) => {
|
|
428
|
-
if (!t) return;
|
|
429
|
-
const r = t.helpers.structuredContentCommands.getStructuredContentTags(
|
|
430
|
-
t.state
|
|
431
|
-
), s = /* @__PURE__ */ new Map();
|
|
432
|
-
E.current.document?.forEach((i) => {
|
|
433
|
-
i.id && s.set(i.id, i.value);
|
|
434
|
-
}), E.current.signer?.forEach((i) => {
|
|
435
|
-
i.value !== void 0 && s.set(i.id, i.value);
|
|
436
|
-
});
|
|
437
|
-
const d = r.map(({ node: i }) => ({
|
|
438
|
-
id: i.attrs.id,
|
|
439
|
-
label: i.attrs.label,
|
|
440
|
-
value: s.get(i.attrs.id) ?? i.textContent ?? ""
|
|
441
|
-
})).filter((i) => i.id);
|
|
442
|
-
d.length > 0 && (F?.(d), [
|
|
443
|
-
...E.current.document || [],
|
|
444
|
-
...E.current.signer || []
|
|
445
|
-
].filter((R) => R.value !== void 0).forEach(
|
|
446
|
-
(R) => k({
|
|
447
|
-
id: R.id,
|
|
448
|
-
value: R.value
|
|
449
|
-
})
|
|
450
|
-
));
|
|
451
|
-
},
|
|
452
|
-
[F, k]
|
|
453
|
-
), j = (t) => {
|
|
454
|
-
const r = {
|
|
455
|
-
...t,
|
|
456
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
457
|
-
};
|
|
458
|
-
C((s) => [...s, r]);
|
|
459
|
-
};
|
|
460
|
-
re(() => T.current ? ((async () => {
|
|
461
|
-
const { SuperDoc: r } = await import("./superdoc.es-CqejOF1J.js").then((d) => d.D), s = new r({
|
|
462
|
-
selector: T.current,
|
|
463
|
-
document: a.source,
|
|
464
|
-
documentMode: "viewing",
|
|
465
|
-
onReady: () => {
|
|
466
|
-
s.activeEditor && M(s.activeEditor), j({ type: "ready" }), ee(!0);
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
y.current = s;
|
|
470
|
-
})(), () => {
|
|
471
|
-
y.current && (y.current.destroy(), y.current = null);
|
|
472
|
-
}) : void 0, [a.source, a.mode, M]), re(() => {
|
|
473
|
-
if (!a.validation?.scroll?.required || !H) return;
|
|
474
|
-
const t = T.current;
|
|
388
|
+
}, Re = me((g, v) => {
|
|
389
|
+
const {
|
|
390
|
+
eventId: m,
|
|
391
|
+
document: a,
|
|
392
|
+
fields: n = {},
|
|
393
|
+
download: d,
|
|
394
|
+
submit: x,
|
|
395
|
+
onSubmit: S,
|
|
396
|
+
onDownload: z,
|
|
397
|
+
onStateChange: B,
|
|
398
|
+
onFieldChange: Y,
|
|
399
|
+
onFieldsDiscovered: $,
|
|
400
|
+
isDisabled: h = !1,
|
|
401
|
+
className: O,
|
|
402
|
+
style: J,
|
|
403
|
+
documentHeight: ne = "600px"
|
|
404
|
+
} = g, [_, H] = I(
|
|
405
|
+
!a.validation?.scroll?.required
|
|
406
|
+
), [b, G] = I(
|
|
407
|
+
/* @__PURE__ */ new Map()
|
|
408
|
+
), [A, X] = I(!1), [T, Z] = I(!1), [Q, P] = I([]), [K, oe] = I(!1), w = L(null), y = L(null), ae = L(Date.now()), E = L(n), k = L([]);
|
|
409
|
+
E.current = n, te(() => {
|
|
410
|
+
k.current = Q;
|
|
411
|
+
}, [Q]);
|
|
412
|
+
const N = M((t) => {
|
|
413
|
+
if (!y.current?.activeEditor) return;
|
|
414
|
+
const o = y.current.activeEditor, s = E.current.signer?.find(
|
|
415
|
+
(i) => i.id === t.id
|
|
416
|
+
);
|
|
417
|
+
let f;
|
|
418
|
+
s?.type === "signature" && t.value ? f = {
|
|
419
|
+
json: {
|
|
420
|
+
type: "image",
|
|
421
|
+
attrs: { src: typeof t.value == "string" && t.value.startsWith("data:image/") ? t.value : ee(String(t.value)), alt: "Signature" }
|
|
422
|
+
}
|
|
423
|
+
} : f = { text: String(t.value ?? "") }, t.id && o.commands.updateStructuredContentById(t.id, f);
|
|
424
|
+
}, []);
|
|
425
|
+
function ee(t) {
|
|
426
|
+
const o = globalThis.document.createElement("canvas"), s = o.getContext("2d"), f = 30;
|
|
427
|
+
s.font = `italic ${f}px cursive`;
|
|
428
|
+
const R = s.measureText(t).width, ue = f * 1.3, de = 4, fe = 6;
|
|
429
|
+
return o.width = Math.ceil(R + de * 2) + 20, o.height = Math.ceil(ue + fe * 2), s.font = `italic ${f}px cursive`, s.fillStyle = "black", s.textAlign = "center", s.textBaseline = "middle", s.fillText(t, o.width / 2, o.height / 2), o.toDataURL("image/png");
|
|
430
|
+
}
|
|
431
|
+
const U = M(
|
|
432
|
+
(t) => {
|
|
475
433
|
if (!t) return;
|
|
476
|
-
const
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
return t.addEventListener("scroll", r), r(), () => t.removeEventListener("scroll", r);
|
|
484
|
-
}, [a.validation?.scroll?.required, H]);
|
|
485
|
-
const X = P(
|
|
486
|
-
(t, r) => {
|
|
487
|
-
z((s) => {
|
|
488
|
-
const d = s.get(t), i = new Map(s);
|
|
489
|
-
return i.set(t, r), k({
|
|
490
|
-
id: t,
|
|
491
|
-
value: r
|
|
492
|
-
}), j({
|
|
493
|
-
type: "field_change",
|
|
494
|
-
data: { fieldId: t, value: r, previousValue: d }
|
|
495
|
-
}), D?.({
|
|
496
|
-
id: t,
|
|
497
|
-
value: r,
|
|
498
|
-
previousValue: d
|
|
499
|
-
}), i;
|
|
500
|
-
});
|
|
501
|
-
},
|
|
502
|
-
[D, k]
|
|
503
|
-
), e = P(() => a.validation?.scroll?.required && !x ? !1 : (o.signer || []).every((t) => {
|
|
504
|
-
if (!t.validation?.required) return !0;
|
|
505
|
-
const r = v.get(t.id);
|
|
506
|
-
return r && (typeof r != "string" || r.trim());
|
|
507
|
-
}), [x, o.signer, v, a.validation?.scroll?.required]);
|
|
508
|
-
re(() => {
|
|
509
|
-
const t = e();
|
|
510
|
-
B(t), W?.({
|
|
511
|
-
scrolled: x,
|
|
512
|
-
fields: v,
|
|
513
|
-
isValid: t,
|
|
514
|
-
isSubmitting: S
|
|
434
|
+
const o = t.helpers.structuredContentCommands.getStructuredContentTags(
|
|
435
|
+
t.state
|
|
436
|
+
), s = /* @__PURE__ */ new Map();
|
|
437
|
+
E.current.document?.forEach((i) => {
|
|
438
|
+
i.id && s.set(i.id, i.value);
|
|
439
|
+
}), E.current.signer?.forEach((i) => {
|
|
440
|
+
i.value !== void 0 && s.set(i.id, i.value);
|
|
515
441
|
});
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
await _(t);
|
|
549
|
-
} finally {
|
|
550
|
-
J(!1);
|
|
551
|
-
}
|
|
552
|
-
}, [
|
|
553
|
-
w,
|
|
554
|
-
h,
|
|
555
|
-
S,
|
|
556
|
-
f,
|
|
557
|
-
I,
|
|
558
|
-
o,
|
|
559
|
-
v,
|
|
560
|
-
_
|
|
561
|
-
]), c = (t) => {
|
|
562
|
-
const r = t.component || O(t.type);
|
|
563
|
-
return /* @__PURE__ */ p.jsx(
|
|
564
|
-
r,
|
|
565
|
-
{
|
|
566
|
-
value: v.get(t.id) ?? null,
|
|
567
|
-
onChange: (s) => X(t.id, s),
|
|
568
|
-
isDisabled: h,
|
|
569
|
-
label: t.label
|
|
570
|
-
},
|
|
571
|
-
t.id
|
|
572
|
-
);
|
|
573
|
-
}, O = (t) => {
|
|
574
|
-
switch (t) {
|
|
575
|
-
case "signature":
|
|
576
|
-
case "text":
|
|
577
|
-
return ge;
|
|
578
|
-
case "checkbox":
|
|
579
|
-
return ve;
|
|
442
|
+
const f = o.map(({ node: i }) => ({
|
|
443
|
+
id: i.attrs.id,
|
|
444
|
+
label: i.attrs.label,
|
|
445
|
+
value: s.get(i.attrs.id) ?? i.textContent ?? ""
|
|
446
|
+
})).filter((i) => i.id);
|
|
447
|
+
f.length > 0 && ($?.(f), [
|
|
448
|
+
...E.current.document || [],
|
|
449
|
+
...E.current.signer || []
|
|
450
|
+
].filter((R) => R.value !== void 0).forEach(
|
|
451
|
+
(R) => N({
|
|
452
|
+
id: R.id,
|
|
453
|
+
value: R.value
|
|
454
|
+
})
|
|
455
|
+
));
|
|
456
|
+
},
|
|
457
|
+
[$, N]
|
|
458
|
+
), j = (t) => {
|
|
459
|
+
const o = {
|
|
460
|
+
...t,
|
|
461
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
462
|
+
}, s = globalThis?.__SUPERDOC_AUDIT_MOCK__;
|
|
463
|
+
s && s(o);
|
|
464
|
+
const f = [...k.current, o];
|
|
465
|
+
return k.current = f, P(f), f;
|
|
466
|
+
};
|
|
467
|
+
te(() => w.current ? ((async () => {
|
|
468
|
+
const { SuperDoc: o } = await import("superdoc"), s = new o({
|
|
469
|
+
selector: w.current,
|
|
470
|
+
document: a.source,
|
|
471
|
+
documentMode: "viewing",
|
|
472
|
+
onReady: () => {
|
|
473
|
+
s.activeEditor && U(s.activeEditor), j({ type: "ready" }), oe(!0);
|
|
580
474
|
}
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
475
|
+
});
|
|
476
|
+
y.current = s;
|
|
477
|
+
})(), () => {
|
|
478
|
+
y.current && (typeof y.current.destroy == "function" && y.current.destroy(), y.current = null);
|
|
479
|
+
}) : void 0, [a.source, a.mode, U]), te(() => {
|
|
480
|
+
if (!a.validation?.scroll?.required || !K) return;
|
|
481
|
+
const t = w.current;
|
|
482
|
+
if (!t) return;
|
|
483
|
+
const o = () => {
|
|
484
|
+
const { scrollTop: s, scrollHeight: f, clientHeight: i } = t, R = s / (f - i);
|
|
485
|
+
(R >= 0.95 || f <= i) && (H(!0), j({
|
|
486
|
+
type: "scroll",
|
|
487
|
+
data: { percent: Math.round(R * 100) }
|
|
488
|
+
}));
|
|
489
|
+
};
|
|
490
|
+
return t.addEventListener("scroll", o), o(), () => t.removeEventListener("scroll", o);
|
|
491
|
+
}, [a.validation?.scroll?.required, K]);
|
|
492
|
+
const e = M(
|
|
493
|
+
(t, o) => {
|
|
494
|
+
G((s) => {
|
|
495
|
+
const f = s.get(t), i = new Map(s);
|
|
496
|
+
return i.set(t, o), N({
|
|
497
|
+
id: t,
|
|
498
|
+
value: o
|
|
499
|
+
}), j({
|
|
500
|
+
type: "field_change",
|
|
501
|
+
data: { fieldId: t, value: o, previousValue: f }
|
|
502
|
+
}), Y?.({
|
|
503
|
+
id: t,
|
|
504
|
+
value: o,
|
|
505
|
+
previousValue: f
|
|
506
|
+
}), i;
|
|
507
|
+
});
|
|
508
|
+
},
|
|
509
|
+
[Y, N]
|
|
510
|
+
), r = M(() => a.validation?.scroll?.required && !_ ? !1 : (n.signer || []).every((t) => {
|
|
511
|
+
if (!t.validation?.required) return !0;
|
|
512
|
+
const o = b.get(t.id);
|
|
513
|
+
return o && (typeof o != "string" || o.trim());
|
|
514
|
+
}), [
|
|
515
|
+
_,
|
|
516
|
+
n.signer,
|
|
517
|
+
b,
|
|
518
|
+
a.validation?.scroll?.required
|
|
519
|
+
]);
|
|
520
|
+
te(() => {
|
|
521
|
+
const t = r();
|
|
522
|
+
X(t), B?.({
|
|
523
|
+
scrolled: _,
|
|
524
|
+
fields: b,
|
|
525
|
+
isValid: t,
|
|
526
|
+
isSubmitting: T
|
|
527
|
+
});
|
|
528
|
+
}, [_, b, T, r, B]);
|
|
529
|
+
const c = M(async () => {
|
|
530
|
+
if (h) return;
|
|
531
|
+
const t = {
|
|
532
|
+
eventId: m,
|
|
533
|
+
documentSource: a.source,
|
|
534
|
+
fields: {
|
|
535
|
+
document: n.document || [],
|
|
536
|
+
signer: (n.signer || []).map((o) => ({
|
|
537
|
+
id: o.id,
|
|
538
|
+
value: b.get(o.id) ?? null
|
|
539
|
+
}))
|
|
540
|
+
},
|
|
541
|
+
fileName: d?.fileName || "document.pdf"
|
|
542
|
+
};
|
|
543
|
+
await z?.(t);
|
|
544
|
+
}, [
|
|
545
|
+
h,
|
|
546
|
+
m,
|
|
547
|
+
a.source,
|
|
548
|
+
n,
|
|
549
|
+
b,
|
|
550
|
+
d,
|
|
551
|
+
z
|
|
552
|
+
]), l = M(async () => {
|
|
553
|
+
if (!A || h || T) return;
|
|
554
|
+
Z(!0), j({ type: "submit" });
|
|
555
|
+
const t = j({ type: "submit" }), o = {
|
|
556
|
+
eventId: m,
|
|
557
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
558
|
+
duration: Math.floor((Date.now() - ae.current) / 1e3),
|
|
559
|
+
auditTrail: t,
|
|
560
|
+
documentFields: n.document || [],
|
|
561
|
+
signerFields: (n.signer || []).map((s) => ({
|
|
562
|
+
id: s.id,
|
|
563
|
+
value: b.get(s.id) ?? null
|
|
564
|
+
})),
|
|
565
|
+
isFullyCompleted: A
|
|
609
566
|
};
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
567
|
+
try {
|
|
568
|
+
await S(o);
|
|
569
|
+
} finally {
|
|
570
|
+
Z(!1);
|
|
571
|
+
}
|
|
572
|
+
}, [
|
|
573
|
+
A,
|
|
574
|
+
h,
|
|
575
|
+
T,
|
|
576
|
+
m,
|
|
577
|
+
n,
|
|
578
|
+
b,
|
|
579
|
+
S
|
|
580
|
+
]), D = (t) => {
|
|
581
|
+
const o = t.component || q(t.type);
|
|
582
|
+
return /* @__PURE__ */ p.jsx(
|
|
583
|
+
o,
|
|
584
|
+
{
|
|
585
|
+
value: b.get(t.id) ?? null,
|
|
586
|
+
onChange: (s) => e(t.id, s),
|
|
587
|
+
isDisabled: h,
|
|
588
|
+
label: t.label
|
|
589
|
+
},
|
|
590
|
+
t.id
|
|
591
|
+
);
|
|
592
|
+
}, q = (t) => {
|
|
593
|
+
switch (t) {
|
|
594
|
+
case "signature":
|
|
595
|
+
case "text":
|
|
596
|
+
return he;
|
|
597
|
+
case "checkbox":
|
|
598
|
+
return ye;
|
|
599
|
+
}
|
|
600
|
+
}, u = () => {
|
|
601
|
+
const t = d?.component || Ee(d);
|
|
602
|
+
return t ? /* @__PURE__ */ p.jsx(
|
|
603
|
+
t,
|
|
604
|
+
{
|
|
605
|
+
onClick: c,
|
|
606
|
+
fileName: d?.fileName,
|
|
607
|
+
isDisabled: h
|
|
620
608
|
}
|
|
621
|
-
|
|
609
|
+
) : null;
|
|
610
|
+
}, C = () => {
|
|
611
|
+
if (a.mode === "download")
|
|
612
|
+
return null;
|
|
613
|
+
const t = x?.component || _e(x);
|
|
614
|
+
return /* @__PURE__ */ p.jsx(
|
|
622
615
|
"div",
|
|
623
616
|
{
|
|
624
|
-
className:
|
|
625
|
-
style:
|
|
626
|
-
children:
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
o.signer && o.signer.length > 0 && /* @__PURE__ */ p.jsx(
|
|
636
|
-
"div",
|
|
637
|
-
{
|
|
638
|
-
className: "superdoc-esign-fields",
|
|
639
|
-
style: { marginBottom: "20px" },
|
|
640
|
-
children: o.signer.map(c)
|
|
641
|
-
}
|
|
642
|
-
),
|
|
643
|
-
Y()
|
|
644
|
-
] })
|
|
645
|
-
]
|
|
617
|
+
className: "superdoc-esign-actions superdoc-esign-form-actions",
|
|
618
|
+
style: { display: "flex", gap: "10px" },
|
|
619
|
+
children: /* @__PURE__ */ p.jsx(
|
|
620
|
+
t,
|
|
621
|
+
{
|
|
622
|
+
onClick: l,
|
|
623
|
+
isValid: A,
|
|
624
|
+
isDisabled: h,
|
|
625
|
+
isSubmitting: T
|
|
626
|
+
}
|
|
627
|
+
)
|
|
646
628
|
}
|
|
647
629
|
);
|
|
648
|
-
}
|
|
649
|
-
)
|
|
650
|
-
|
|
630
|
+
}, F = u(), se = C();
|
|
631
|
+
return ge(v, () => ({
|
|
632
|
+
getState: () => ({
|
|
633
|
+
scrolled: _,
|
|
634
|
+
fields: b,
|
|
635
|
+
isValid: A,
|
|
636
|
+
isSubmitting: T
|
|
637
|
+
}),
|
|
638
|
+
getAuditTrail: () => k.current,
|
|
639
|
+
reset: () => {
|
|
640
|
+
H(!a.validation?.scroll?.required), G(/* @__PURE__ */ new Map()), X(!1), k.current = [], P([]);
|
|
641
|
+
}
|
|
642
|
+
})), /* @__PURE__ */ p.jsxs(
|
|
643
|
+
"div",
|
|
644
|
+
{
|
|
645
|
+
className: `superdoc-esign-container ${O || ""}`,
|
|
646
|
+
style: J,
|
|
647
|
+
children: [
|
|
648
|
+
/* @__PURE__ */ p.jsxs(
|
|
649
|
+
"div",
|
|
650
|
+
{
|
|
651
|
+
className: "superdoc-esign-document",
|
|
652
|
+
"data-testid": "superdoc-esign-document",
|
|
653
|
+
style: { display: "flex", flexDirection: "column" },
|
|
654
|
+
children: [
|
|
655
|
+
F && /* @__PURE__ */ p.jsx(
|
|
656
|
+
"div",
|
|
657
|
+
{
|
|
658
|
+
className: "superdoc-esign-document-toolbar",
|
|
659
|
+
style: {
|
|
660
|
+
display: "flex",
|
|
661
|
+
justifyContent: "flex-end",
|
|
662
|
+
alignItems: "center",
|
|
663
|
+
padding: "8px 12px"
|
|
664
|
+
},
|
|
665
|
+
children: /* @__PURE__ */ p.jsx(
|
|
666
|
+
"div",
|
|
667
|
+
{
|
|
668
|
+
className: "superdoc-esign-document-controls",
|
|
669
|
+
style: { display: "flex", gap: "8px" },
|
|
670
|
+
children: F
|
|
671
|
+
}
|
|
672
|
+
)
|
|
673
|
+
}
|
|
674
|
+
),
|
|
675
|
+
/* @__PURE__ */ p.jsx(
|
|
676
|
+
"div",
|
|
677
|
+
{
|
|
678
|
+
ref: w,
|
|
679
|
+
className: "superdoc-esign-document-viewer",
|
|
680
|
+
"data-testid": "superdoc-scroll-container",
|
|
681
|
+
style: { height: ne, overflow: "auto" }
|
|
682
|
+
}
|
|
683
|
+
)
|
|
684
|
+
]
|
|
685
|
+
}
|
|
686
|
+
),
|
|
687
|
+
/* @__PURE__ */ p.jsxs(
|
|
688
|
+
"div",
|
|
689
|
+
{
|
|
690
|
+
className: "superdoc-esign-controls",
|
|
691
|
+
style: { marginTop: "20px" },
|
|
692
|
+
"data-testid": "superdoc-esign-controls",
|
|
693
|
+
children: [
|
|
694
|
+
n.signer && n.signer.length > 0 && /* @__PURE__ */ p.jsx(
|
|
695
|
+
"div",
|
|
696
|
+
{
|
|
697
|
+
className: "superdoc-esign-fields",
|
|
698
|
+
style: { marginBottom: "20px" },
|
|
699
|
+
"data-testid": "superdoc-esign-fields",
|
|
700
|
+
children: n.signer.map(D)
|
|
701
|
+
}
|
|
702
|
+
),
|
|
703
|
+
se
|
|
704
|
+
]
|
|
705
|
+
}
|
|
706
|
+
)
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
);
|
|
710
|
+
});
|
|
711
|
+
Re.displayName = "SuperDocESign";
|
|
651
712
|
export {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
713
|
+
ye as CheckboxInput,
|
|
714
|
+
he as SignatureInput,
|
|
715
|
+
Re as default
|
|
655
716
|
};
|