@pdfme/ui 4.1.0 → 4.1.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/index.es.js
CHANGED
@@ -9321,7 +9321,7 @@ const ArrayBufferSchema = z.any().refine((a) => a instanceof ArrayBuffer), Uint8
|
|
9321
9321
|
width: z.number(),
|
9322
9322
|
height: z.number(),
|
9323
9323
|
padding: z.tuple([z.number(), z.number(), z.number(), z.number()])
|
9324
|
-
}),
|
9324
|
+
}), CustomPdf = z.union([z.string(), ArrayBufferSchema, Uint8ArraySchema]), BasePdf = z.union([CustomPdf, BlankPdf]), Template = z.object({
|
9325
9325
|
schemas: z.array(z.record(Schema$1)),
|
9326
9326
|
basePdf: BasePdf,
|
9327
9327
|
pdfmeVersion: z.string().optional()
|
@@ -81729,7 +81729,7 @@ function getExtraFormatterSchema(a) {
|
|
81729
81729
|
title: a("schemas.text.format"),
|
81730
81730
|
widget: "ButtonGroup",
|
81731
81731
|
buttons: s,
|
81732
|
-
span:
|
81732
|
+
span: 17
|
81733
81733
|
};
|
81734
81734
|
}
|
81735
81735
|
const UseDynamicFontSize = (a) => {
|
@@ -81777,7 +81777,7 @@ const UseDynamicFontSize = (a) => {
|
|
81777
81777
|
type: "number",
|
81778
81778
|
widget: "inputNumber",
|
81779
81779
|
props: { step: 0.1, min: 0 },
|
81780
|
-
span:
|
81780
|
+
span: 7
|
81781
81781
|
},
|
81782
81782
|
useDynamicFontSize: { type: "boolean", widget: "UseDynamicFontSize", bind: !1, span: 16 },
|
81783
81783
|
dynamicFontSize: {
|
@@ -82422,14 +82422,14 @@ function parseInput(a, s) {
|
|
82422
82422
|
function createSingleTable(a, s) {
|
82423
82423
|
const { options: $, _cache: _, basePdf: _e } = s;
|
82424
82424
|
if (!isBlankPdf(_e))
|
82425
|
-
throw new Error("[@pdfme/schema/table]
|
82425
|
+
throw new Error("[@pdfme/schema/table] Custom PDF is not supported");
|
82426
82426
|
const tt = parseInput(s.schema, a), nt = $.font || getDefaultFont(), at = getFallbackFontName(nt), ot = parseContent4Table(tt, at);
|
82427
82427
|
return Table$3.create({ input: tt, content: ot, font: nt, _cache: _ });
|
82428
82428
|
}
|
82429
82429
|
async function createMultiTables(a, s) {
|
82430
82430
|
const { basePdf: $, schema: _ } = s;
|
82431
82431
|
if (!isBlankPdf($))
|
82432
|
-
throw new Error("[@pdfme/schema/table]
|
82432
|
+
throw new Error("[@pdfme/schema/table] Custom PDF is not supported");
|
82433
82433
|
const _e = $.height, tt = $.padding[2], nt = $.padding[0];
|
82434
82434
|
let at = _e - tt - _.position.y;
|
82435
82435
|
const ot = await createSingleTable(a, s);
|
@@ -152100,36 +152100,47 @@ Check this document: https://pdfme.com/docs/custom-schemas`);
|
|
152100
152100
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { visibility: lt ? "hidden" : "visible" }, children: a.children })
|
152101
152101
|
] });
|
152102
152102
|
}, LeftSidebar = ({ height: a, scale: s, basePdf: $ }) => {
|
152103
|
-
const { token: _ } = theme.useToken(), _e = reactExports.useContext(PluginsRegistry);
|
152104
|
-
return
|
152103
|
+
const { token: _ } = theme.useToken(), _e = reactExports.useContext(PluginsRegistry), [tt, nt] = reactExports.useState(!1);
|
152104
|
+
return reactExports.useEffect(() => {
|
152105
|
+
const at = () => {
|
152106
|
+
tt && nt(!1);
|
152107
|
+
};
|
152108
|
+
return document.addEventListener("mouseup", at), () => {
|
152109
|
+
document.removeEventListener("mouseup", at);
|
152110
|
+
};
|
152111
|
+
}, [tt]), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
152105
152112
|
"div",
|
152106
152113
|
{
|
152107
152114
|
style: {
|
152108
152115
|
left: 0,
|
152109
|
-
position: "absolute",
|
152110
152116
|
right: 0,
|
152117
|
+
position: "absolute",
|
152111
152118
|
zIndex: 1,
|
152112
152119
|
height: a,
|
152120
|
+
width: 45,
|
152113
152121
|
background: _.colorBgLayout,
|
152114
152122
|
textAlign: "center",
|
152115
|
-
|
152123
|
+
overflow: tt ? "visible" : "auto"
|
152116
152124
|
},
|
152117
|
-
children: Object.entries(_e).map(([
|
152125
|
+
children: Object.entries(_e).map(([at, ot]) => ot != null && ot.propPanel.defaultSchema ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
152118
152126
|
Draggable$1,
|
152119
152127
|
{
|
152120
152128
|
scale: s,
|
152121
152129
|
basePdf: $,
|
152122
|
-
plugin:
|
152130
|
+
plugin: ot,
|
152123
152131
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
152124
152132
|
Button$2,
|
152125
152133
|
{
|
152126
|
-
title:
|
152134
|
+
title: at,
|
152135
|
+
onMouseDown: () => {
|
152136
|
+
nt(!0);
|
152137
|
+
},
|
152127
152138
|
style: { width: 35, height: 35, marginTop: "0.25rem", padding: "0.25rem" },
|
152128
|
-
children:
|
152139
|
+
children: ot.propPanel.defaultSchema.icon ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: ot.propPanel.defaultSchema.icon } }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: at })
|
152129
152140
|
}
|
152130
152141
|
)
|
152131
152142
|
},
|
152132
|
-
|
152143
|
+
at
|
152133
152144
|
) : null)
|
152134
152145
|
}
|
152135
152146
|
);
|
@@ -162640,7 +162651,7 @@ const Designer$1 = Designer, { Text } = Typography$1, icons = {
|
|
162640
162651
|
const Rt = yt, kt = (vt == null ? void 0 : vt[St]) || "";
|
162641
162652
|
if (Rt === kt)
|
162642
162653
|
return;
|
162643
|
-
xt({ key: St, value: Rt }), Ct = !0;
|
162654
|
+
xt({ key: St, value: Rt }), bt.type === "table" && (Ct = !0);
|
162644
162655
|
} else {
|
162645
162656
|
const Rt = ut[st].find(
|
162646
162657
|
(kt) => kt.id === bt.id
|