@unlev/exeq 0.1.9 → 0.1.10
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.css +28 -60
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +69 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -69
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1221,8 +1221,8 @@ function FieldNavigator({
|
|
|
1221
1221
|
currentFieldId,
|
|
1222
1222
|
onNavigate,
|
|
1223
1223
|
allRequiredFilled,
|
|
1224
|
-
|
|
1225
|
-
|
|
1224
|
+
onComplete,
|
|
1225
|
+
completeLabel = "Complete"
|
|
1226
1226
|
}) {
|
|
1227
1227
|
const currentIndex = fields.findIndex((f) => f.id === currentFieldId);
|
|
1228
1228
|
const hasPrev = currentIndex > 0;
|
|
@@ -1273,10 +1273,10 @@ function FieldNavigator({
|
|
|
1273
1273
|
/* @__PURE__ */ jsx5(
|
|
1274
1274
|
"button",
|
|
1275
1275
|
{
|
|
1276
|
-
onClick:
|
|
1276
|
+
onClick: onComplete,
|
|
1277
1277
|
disabled: !allRequiredFilled,
|
|
1278
|
-
className: "
|
|
1279
|
-
children:
|
|
1278
|
+
className: "complete-btn",
|
|
1279
|
+
children: completeLabel
|
|
1280
1280
|
}
|
|
1281
1281
|
)
|
|
1282
1282
|
] });
|
|
@@ -1528,20 +1528,8 @@ function SignerView({
|
|
|
1528
1528
|
}));
|
|
1529
1529
|
}
|
|
1530
1530
|
}, [fields.filter((f) => f.type === "signature" && f.value).length]);
|
|
1531
|
-
const stepLabel = isLastSigner ? submitLabel || "Complete" : `Next: ${signerOrder[currentSignerIndex + 1]}`;
|
|
1532
1531
|
return /* @__PURE__ */ jsxs6("div", { className: "signer-layout", ref: containerRef, children: [
|
|
1533
1532
|
loading && /* @__PURE__ */ jsx6("div", { className: "loading-indicator", children: "Loading document..." }),
|
|
1534
|
-
isMultiSigner && /* @__PURE__ */ jsx6("div", { className: "signer-progress-bar", children: signerOrder.map((role, i) => /* @__PURE__ */ jsxs6(
|
|
1535
|
-
"div",
|
|
1536
|
-
{
|
|
1537
|
-
className: `signer-progress-step ${i < currentSignerIndex ? "completed" : ""} ${i === currentSignerIndex ? "active" : ""} ${i > currentSignerIndex ? "upcoming" : ""}`,
|
|
1538
|
-
children: [
|
|
1539
|
-
/* @__PURE__ */ jsx6("div", { className: "signer-progress-dot", children: i < currentSignerIndex ? "\u2713" : i + 1 }),
|
|
1540
|
-
/* @__PURE__ */ jsx6("span", { className: "signer-progress-label", children: role })
|
|
1541
|
-
]
|
|
1542
|
-
},
|
|
1543
|
-
role
|
|
1544
|
-
)) }),
|
|
1545
1533
|
/* @__PURE__ */ jsxs6("div", { className: "signer-content", children: [
|
|
1546
1534
|
/* @__PURE__ */ jsx6("div", { className: "signer-pdf-area", children: pages.length > 0 && /* @__PURE__ */ jsx6(
|
|
1547
1535
|
PdfViewer,
|
|
@@ -1556,65 +1544,77 @@ function SignerView({
|
|
|
1556
1544
|
}
|
|
1557
1545
|
) }),
|
|
1558
1546
|
/* @__PURE__ */ jsxs6("div", { className: "signer-panel", children: [
|
|
1559
|
-
/* @__PURE__ */ jsxs6("div", { className: "signer-
|
|
1560
|
-
/* @__PURE__ */
|
|
1561
|
-
|
|
1547
|
+
/* @__PURE__ */ jsxs6("div", { className: "signer-panel-header", children: [
|
|
1548
|
+
/* @__PURE__ */ jsxs6("div", { className: "signer-role-indicator", children: [
|
|
1549
|
+
/* @__PURE__ */ jsx6("span", { className: "signer-role-indicator-label", children: "Signing as" }),
|
|
1550
|
+
/* @__PURE__ */ jsx6("strong", { children: signer })
|
|
1551
|
+
] }),
|
|
1552
|
+
isMultiSigner && /* @__PURE__ */ jsxs6("div", { className: "signer-step-badge", children: [
|
|
1553
|
+
"Step ",
|
|
1554
|
+
currentSignerIndex + 1,
|
|
1555
|
+
" of ",
|
|
1556
|
+
signerOrder.length
|
|
1557
|
+
] })
|
|
1562
1558
|
] }),
|
|
1563
|
-
|
|
1564
|
-
/* @__PURE__ */
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
"
|
|
1577
|
-
{
|
|
1578
|
-
type: selectedField.textSubtype === "email" ? "email" : selectedField.textSubtype === "number" ? "number" : selectedField.textSubtype === "phone" ? "tel" : selectedField.textSubtype === "date" ? "date" : "text",
|
|
1579
|
-
value: selectedField.value,
|
|
1580
|
-
onChange: (e) => handleFieldUpdate(selectedField.id, e.target.value),
|
|
1581
|
-
placeholder: selectedField.placeholder,
|
|
1582
|
-
className: "signer-text-input"
|
|
1583
|
-
}
|
|
1584
|
-
),
|
|
1585
|
-
selectedField.type === "checkbox" && /* @__PURE__ */ jsxs6("label", { className: "signer-checkbox-label", children: [
|
|
1586
|
-
/* @__PURE__ */ jsx6(
|
|
1559
|
+
/* @__PURE__ */ jsxs6("div", { className: "signer-panel-body", children: [
|
|
1560
|
+
selectedField && isFieldEditable && /* @__PURE__ */ jsxs6("div", { className: "signer-field-input", children: [
|
|
1561
|
+
/* @__PURE__ */ jsx6("h3", { children: selectedField.label }),
|
|
1562
|
+
selectedField.required && /* @__PURE__ */ jsx6("span", { className: "required-badge", children: "Required" }),
|
|
1563
|
+
(selectedField.type === "signature" || selectedField.type === "initials") && /* @__PURE__ */ jsx6(
|
|
1564
|
+
SignatureCanvas,
|
|
1565
|
+
{
|
|
1566
|
+
width: 280,
|
|
1567
|
+
height: selectedField.type === "initials" ? 80 : 120,
|
|
1568
|
+
onSign: (dataUrl) => handleFieldUpdate(selectedField.id, dataUrl),
|
|
1569
|
+
initialValue: selectedField.value
|
|
1570
|
+
}
|
|
1571
|
+
),
|
|
1572
|
+
selectedField.type === "text" && /* @__PURE__ */ jsx6(
|
|
1587
1573
|
"input",
|
|
1588
1574
|
{
|
|
1589
|
-
type: "
|
|
1590
|
-
|
|
1591
|
-
onChange: (e) => handleFieldUpdate(selectedField.id, e.target.
|
|
1575
|
+
type: selectedField.textSubtype === "email" ? "email" : selectedField.textSubtype === "number" ? "number" : selectedField.textSubtype === "phone" ? "tel" : selectedField.textSubtype === "date" ? "date" : "text",
|
|
1576
|
+
value: selectedField.value,
|
|
1577
|
+
onChange: (e) => handleFieldUpdate(selectedField.id, e.target.value),
|
|
1578
|
+
placeholder: selectedField.placeholder,
|
|
1579
|
+
className: "signer-text-input"
|
|
1592
1580
|
}
|
|
1593
1581
|
),
|
|
1594
|
-
selectedField.
|
|
1582
|
+
selectedField.type === "checkbox" && /* @__PURE__ */ jsxs6("label", { className: "signer-checkbox-label", children: [
|
|
1583
|
+
/* @__PURE__ */ jsx6(
|
|
1584
|
+
"input",
|
|
1585
|
+
{
|
|
1586
|
+
type: "checkbox",
|
|
1587
|
+
checked: selectedField.value === "true",
|
|
1588
|
+
onChange: (e) => handleFieldUpdate(selectedField.id, e.target.checked ? "true" : "")
|
|
1589
|
+
}
|
|
1590
|
+
),
|
|
1591
|
+
selectedField.placeholder || "Check this box"
|
|
1592
|
+
] }),
|
|
1593
|
+
selectedField.type === "signed-date" && /* @__PURE__ */ jsx6("div", { className: "signer-date-display", children: selectedField.value || "Will auto-fill when you sign" })
|
|
1595
1594
|
] }),
|
|
1596
|
-
selectedField
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
/* @__PURE__ */ jsx6("
|
|
1595
|
+
selectedField && !isFieldEditable && /* @__PURE__ */ jsxs6("div", { className: "signer-field-readonly", children: [
|
|
1596
|
+
/* @__PURE__ */ jsx6("h3", { children: selectedField.label }),
|
|
1597
|
+
/* @__PURE__ */ jsx6("p", { children: "This field belongs to another signer." })
|
|
1598
|
+
] }),
|
|
1599
|
+
!selectedField && editableFields.length > 0 && /* @__PURE__ */ jsx6("div", { className: "panel-empty", children: "Select a field to fill it in, or use the navigation below." })
|
|
1601
1600
|
] }),
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1601
|
+
/* @__PURE__ */ jsxs6("div", { className: "signer-panel-footer", children: [
|
|
1602
|
+
/* @__PURE__ */ jsx6(
|
|
1603
|
+
FieldNavigator,
|
|
1604
|
+
{
|
|
1605
|
+
fields: editableFields,
|
|
1606
|
+
currentFieldId: selectedFieldId,
|
|
1607
|
+
onNavigate: handleNavigate,
|
|
1608
|
+
allRequiredFilled,
|
|
1609
|
+
onComplete: handleAdvanceOrSubmit,
|
|
1610
|
+
completeLabel: isLastSigner ? submitLabel || "Complete" : `Next: ${signerOrder[currentSignerIndex + 1]}`
|
|
1611
|
+
}
|
|
1612
|
+
),
|
|
1613
|
+
submitting && /* @__PURE__ */ jsx6("div", { className: "loading-indicator", children: "Generating PDF..." }),
|
|
1614
|
+
/* @__PURE__ */ jsxs6("div", { className: "powered-by", children: [
|
|
1615
|
+
"Powered by ",
|
|
1616
|
+
/* @__PURE__ */ jsx6("a", { href: "https://exeq.org", target: "_blank", rel: "noopener noreferrer", children: "Exeq.org" })
|
|
1617
|
+
] })
|
|
1618
1618
|
] })
|
|
1619
1619
|
] })
|
|
1620
1620
|
] })
|