@pdfme/ui 3.4.1 → 3.4.2

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.es.js CHANGED
@@ -75082,7 +75082,7 @@ const getBrowserVerticalFontAdjustments = (a, s, $, _) => {
75082
75082
  for (; pt(mt, ct); )
75083
75083
  ft -= FONT_SIZE_ADJUSTMENT, { totalWidthInMm: mt, totalHeightInMm: ct } = dt(ft);
75084
75084
  return ft;
75085
- }, chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", lookup$1 = new Uint8Array(256);
75085
+ }, isFirefox = () => navigator.userAgent.toLowerCase().indexOf("firefox") > -1, chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", lookup$1 = new Uint8Array(256);
75086
75086
  for (let a = 0; a < chars$1.length; a++)
75087
75087
  lookup$1[chars$1.charCodeAt(a)] = a;
75088
75088
  const toCharCode = (a) => a.charCodeAt(0), toHexStringOfMinLength = (a, s) => padStart$1(a.toString(16), s, "0").toUpperCase(), toHexString = (a) => toHexStringOfMinLength(a, 2), charFromCode = (a) => String.fromCharCode(a), charFromHexCode = (a) => charFromCode(parseInt(a, 16)), padStart$1 = (a, s, $) => {
@@ -81800,7 +81800,14 @@ const convertForPdfLayoutProps = ({ schema: a, pageHeight: s, applyRotateTransla
81800
81800
  backgroundColor: "transparent"
81801
81801
  }, At = document.createElement("div");
81802
81802
  if (Object.assign(At.style, vt), isEditable(_e, $)) {
81803
- if (At.contentEditable = "plaintext-only", At.tabIndex = at || 0, At.innerText = s, At.addEventListener("blur", (xt) => {
81803
+ if (isFirefox() ? (At.contentEditable = "true", At.addEventListener("keydown", (xt) => {
81804
+ xt.key === "Enter" && !xt.shiftKey && (xt.preventDefault(), document.execCommand("insertLineBreak", !1, void 0));
81805
+ }), At.addEventListener("paste", (xt) => {
81806
+ var St;
81807
+ xt.preventDefault();
81808
+ const bt = (St = xt.clipboardData) == null ? void 0 : St.getData("text"), Et = window.getSelection();
81809
+ Et != null && Et.rangeCount && (Et.deleteFromDocument(), Et.getRangeAt(0).insertNode(document.createTextNode(bt || "")), Et.collapseToEnd());
81810
+ })) : At.contentEditable = "plaintext-only", At.tabIndex = at || 0, At.innerText = s, At.addEventListener("blur", (xt) => {
81804
81811
  tt && tt(xt.target.innerText), nt && nt();
81805
81812
  }), $.dynamicFontSize && At.addEventListener("keyup", () => {
81806
81813
  setTimeout(() => {