@unlev/exeq 0.3.2 → 0.3.3
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.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2226,7 +2226,7 @@ async function renderFieldsOnPages(pages, fields, getFont, getSignature) {
|
|
|
2226
2226
|
const font = await getFont(field.fontFamily || "Helvetica");
|
|
2227
2227
|
const spacing = field.letterSpacing || 0;
|
|
2228
2228
|
const textWidthAtSize = (text, size) => font.widthOfTextAtSize(text, size) + spacing * (text.length - 1);
|
|
2229
|
-
let fontSize = Math.min(field.fontSize, h * 0.7);
|
|
2229
|
+
let fontSize = field.autoShrink ? Math.min(field.fontSize, h * 0.7) : field.fontSize;
|
|
2230
2230
|
if (field.autoShrink) {
|
|
2231
2231
|
const padding = 4;
|
|
2232
2232
|
while (fontSize > 4) {
|
|
@@ -2803,9 +2803,9 @@ ${row.join(",")}`, "csv");
|
|
|
2803
2803
|
);
|
|
2804
2804
|
}, [signer, handleFieldUpdate, setSelectedFieldId]);
|
|
2805
2805
|
(0, import_react7.useEffect)(() => {
|
|
2806
|
-
const
|
|
2807
|
-
|
|
2808
|
-
|
|
2806
|
+
const dateStr = (/* @__PURE__ */ new Date()).toLocaleDateString();
|
|
2807
|
+
const needsFill = fields.some((f) => f.assignee === signer && f.type === "signed-date" && !f.value);
|
|
2808
|
+
if (needsFill) {
|
|
2809
2809
|
setFields((prev) => prev.map((f) => {
|
|
2810
2810
|
if (f.assignee === signer && f.type === "signed-date" && !f.value) {
|
|
2811
2811
|
return { ...f, value: dateStr };
|
|
@@ -2813,7 +2813,7 @@ ${row.join(",")}`, "csv");
|
|
|
2813
2813
|
return f;
|
|
2814
2814
|
}));
|
|
2815
2815
|
}
|
|
2816
|
-
}, [fields.filter((f) => f.type === "signature" && f.value).length]);
|
|
2816
|
+
}, [signer, fields.filter((f) => f.type === "signature" && f.value).length]);
|
|
2817
2817
|
(0, import_react7.useEffect)(() => {
|
|
2818
2818
|
const hasFormulas = fields.some((f) => f.formula);
|
|
2819
2819
|
if (!hasFormulas) return;
|