vue-print-designer 1.2.20 → 1.2.21

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.
@@ -34633,7 +34633,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
34633
34633
  const renderBarcode = async () => {
34634
34634
  if (!barcodeRef.value) return;
34635
34635
  try {
34636
- const jsBarcodeModule = await import("./JsBarcode-CvbXC6Zv.js").then((n) => n.JsBarcode);
34636
+ const jsBarcodeModule = await import("./JsBarcode-vgX9_Af1.js").then((n) => n.JsBarcode);
34637
34637
  const JsBarcode = (jsBarcodeModule == null ? void 0 : jsBarcodeModule.default) || jsBarcodeModule;
34638
34638
  const content = resolvedContent.value;
34639
34639
  const style = props.element.style;
@@ -34779,7 +34779,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
34779
34779
  });
34780
34780
  const renderQR = async () => {
34781
34781
  try {
34782
- const qrcodeModule = await import("./browser-DlBpvWkr.js").then((n) => n.browser);
34782
+ const qrcodeModule = await import("./browser-DGNDbP3U.js").then((n) => n.browser);
34783
34783
  const QRCode = (qrcodeModule == null ? void 0 : qrcodeModule.default) || qrcodeModule;
34784
34784
  const content = resolvedContent.value;
34785
34785
  qrSrc.value = await QRCode.toDataURL(content, {
@@ -38102,6 +38102,7 @@ const createPagination = ({ store }) => {
38102
38102
  syncElementsBelowTables();
38103
38103
  return;
38104
38104
  }
38105
+ updatePageSums(table);
38105
38106
  let splitIndex = -1;
38106
38107
  const tbody = table.querySelector("tbody");
38107
38108
  if (!tbody) return;
@@ -38109,35 +38110,37 @@ const createPagination = ({ store }) => {
38109
38110
  const tfoot = table.querySelector("tfoot");
38110
38111
  const isFooterRepeated = table.getAttribute("data-tfoot-repeat") === "true";
38111
38112
  let repeatedFooterHeight = 0;
38112
- let totalFooterHeight = 0;
38113
38113
  if (tfoot) {
38114
- totalFooterHeight = tfoot.getBoundingClientRect().height;
38115
38114
  if (isFooterRepeated) {
38116
- repeatedFooterHeight = totalFooterHeight;
38115
+ repeatedFooterHeight = tfoot.getBoundingClientRect().height;
38117
38116
  }
38118
38117
  }
38118
+ const tableRect = table.getBoundingClientRect();
38119
38119
  for (let r = 0; r < rows.length; r++) {
38120
38120
  const row = rows[r];
38121
38121
  const rowRect = row.getBoundingClientRect();
38122
- let currentFooterHeight = repeatedFooterHeight;
38123
38122
  if (!isFooterRepeated && r === rows.length - 1) {
38124
- currentFooterHeight = totalFooterHeight;
38125
- }
38126
- if (rowRect.bottom + currentFooterHeight > limitBottom + 1) {
38127
- splitIndex = r;
38128
- break;
38123
+ if (tableRect.bottom > limitBottom + 1) {
38124
+ splitIndex = r;
38125
+ break;
38126
+ }
38127
+ } else {
38128
+ if (rowRect.bottom + repeatedFooterHeight > limitBottom + 1) {
38129
+ splitIndex = r;
38130
+ break;
38131
+ }
38129
38132
  }
38130
38133
  }
38131
- const resolvedStartY = resolveFlowChunkStartY(wrapper);
38134
+ resolveFlowChunkStartY(wrapper);
38135
+ const minTop = copyHeader && headerHeight > 0 ? headerHeight + (store.pageSpacingY || 0) : store.pageSpacingY || 0;
38132
38136
  if (splitIndex === 0) {
38133
- if (wrapperTopInPage <= resolvedStartY + 5) {
38137
+ if (wrapperTopInPage <= minTop + 5) {
38134
38138
  splitIndex = 1;
38135
38139
  }
38136
38140
  }
38137
38141
  if (splitIndex === -1 && rows.length > 0) {
38138
- const tableRect = table.getBoundingClientRect();
38139
38142
  if (tableRect.bottom > limitBottom + 2) {
38140
- if (wrapperTopInPage > resolvedStartY + 5) {
38143
+ if (wrapperTopInPage > minTop + 5) {
38141
38144
  splitIndex = 0;
38142
38145
  } else if (rows.length > 1) {
38143
38146
  splitIndex = rows.length - 1;
@@ -38307,7 +38310,7 @@ const createImageRenderer = (deps) => {
38307
38310
  const svgToCanvas = async (root) => {
38308
38311
  const svgs = root.querySelectorAll("svg");
38309
38312
  if (svgs.length === 0) return;
38310
- const { Canvg } = await import("./index.es-CZrTfO_R.js");
38313
+ const { Canvg } = await import("./index.es-C4KWgcHt.js");
38311
38314
  svgs.forEach((svg) => {
38312
38315
  const parent = svg.parentElement;
38313
38316
  if (!parent) return;
@@ -38633,7 +38636,7 @@ const createImageRenderer = (deps) => {
38633
38636
  }
38634
38637
  try {
38635
38638
  const generatePageImage = async (page) => {
38636
- const domToImageModule = await import("./dom-to-image-more.min-CAIm_yfT.js").then((n) => n.domToImageMore_min);
38639
+ const domToImageModule = await import("./dom-to-image-more.min-BZ9FRhxR.js").then((n) => n.domToImageMore_min);
38637
38640
  const domtoimage = (domToImageModule == null ? void 0 : domToImageModule.default) || domToImageModule;
38638
38641
  const canvas = await domtoimage.toCanvas(page, {
38639
38642
  filter: (node) => {
@@ -38702,7 +38705,7 @@ const createImageRenderer = (deps) => {
38702
38705
  source.getComputedStyleFn
38703
38706
  );
38704
38707
  tempWrapper = wrapper;
38705
- const jsPdfModule = await import("./jspdf.es.min-BZJ-oRe-.js");
38708
+ const jsPdfModule = await import("./jspdf.es.min-ChNFtJOU.js");
38706
38709
  const jsPDF = (jsPdfModule == null ? void 0 : jsPdfModule.default) || (jsPdfModule == null ? void 0 : jsPdfModule.jsPDF) || jsPdfModule;
38707
38710
  const pdf = new jsPDF({
38708
38711
  orientation: width > height ? "l" : "p",
@@ -39084,7 +39087,7 @@ const usePrint = () => {
39084
39087
  link.click();
39085
39088
  document.body.removeChild(link);
39086
39089
  } else {
39087
- const jsZipModule = await import("./jszip.min-Bq1RKpC9.js").then((n) => n.jszip_min);
39090
+ const jsZipModule = await import("./jszip.min-BV1cV44d.js").then((n) => n.jszip_min);
39088
39091
  const JSZip = (jsZipModule == null ? void 0 : jsZipModule.default) || jsZipModule;
39089
39092
  const zip = new JSZip();
39090
39093
  await Promise.all(
@@ -39385,7 +39388,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
39385
39388
  emits: ["update:visible", "update:value", "close", "save"],
39386
39389
  setup(__props, { emit: __emit }) {
39387
39390
  const Editor = /* @__PURE__ */ defineAsyncComponent(
39388
- () => import("./index-U9t6PBD9.js").then((m) => m.Editor)
39391
+ () => import("./index-eOImZGkP.js").then((m) => m.Editor)
39389
39392
  );
39390
39393
  const { t } = useI18n();
39391
39394
  const { isDark: isDark2 } = useTheme();
@@ -45492,7 +45495,7 @@ function render$d(_ctx, _cache) {
45492
45495
  }
45493
45496
  const InfoIcon = markRaw({ name: "material-symbols-info", render: render$d });
45494
45497
  const name = "vue-print-designer";
45495
- const version = "1.2.20";
45498
+ const version = "1.2.21";
45496
45499
  const dependencies = { "@guolao/vue-monaco-editor": "^1.6.0", "canvg": "^3.0.11", "dom-to-image-more": "^3.7.2", "jsbarcode": "^3.12.3", "jspdf": "4.2", "jszip": "^3.10.1", "lodash": "^4.17.21", "pinia": "^2.3.0", "qrcode": "^1.5.4", "uuid": "^11.0.3", "vue": "^3.5.13", "vue-i18n": "^11.2.8" };
45497
45500
  const devDependencies = { "@iconify-json/material-symbols": "^1.2.53", "@types/jsbarcode": "^3.11.4", "@types/lodash": "^4.17.13", "@types/node": "^22.10.2", "@types/qrcode": "^1.5.6", "@types/uuid": "^10.0.0", "@vitejs/plugin-vue": "^5.2.1", "@vue/tsconfig": "^0.7.0", "autoprefixer": "^10.4.20", "postcss": "^8.4.49", "rollup-plugin-visualizer": "^7.0.1", "sharp": "^0.34.5", "tailwindcss": "^3.4.17", "terser": "^5.46.1", "typescript": "~5.6.2", "unplugin-icons": "^23.0.1", "vite": "^6.0.1", "vue-tsc": "^2.1.10" };
45498
45501
  const pkg = {
@@ -48346,7 +48349,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
48346
48349
  emits: ["update:value"],
48347
48350
  setup(__props, { emit: __emit }) {
48348
48351
  const Editor = /* @__PURE__ */ defineAsyncComponent(
48349
- () => import("./index-U9t6PBD9.js").then((m) => m.Editor)
48352
+ () => import("./index-eOImZGkP.js").then((m) => m.Editor)
48350
48353
  );
48351
48354
  const emit2 = __emit;
48352
48355
  useDesignerStore();
@@ -50901,7 +50904,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
50901
50904
  };
50902
50905
  const renderBarcodeDataUrl = async (element) => {
50903
50906
  try {
50904
- const jsBarcodeModule = await import("./JsBarcode-CvbXC6Zv.js").then((n) => n.JsBarcode);
50907
+ const jsBarcodeModule = await import("./JsBarcode-vgX9_Af1.js").then((n) => n.JsBarcode);
50905
50908
  const JsBarcode = (jsBarcodeModule == null ? void 0 : jsBarcodeModule.default) || jsBarcodeModule;
50906
50909
  const canvas = document.createElement("canvas");
50907
50910
  const style = element.style || {};
@@ -50928,7 +50931,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
50928
50931
  const renderQrDataUrl = async (element) => {
50929
50932
  var _a2, _b;
50930
50933
  try {
50931
- const qrcodeModule = await import("./browser-DlBpvWkr.js").then((n) => n.browser);
50934
+ const qrcodeModule = await import("./browser-DGNDbP3U.js").then((n) => n.browser);
50932
50935
  const QRCode = (qrcodeModule == null ? void 0 : qrcodeModule.default) || qrcodeModule;
50933
50936
  return await QRCode.toDataURL(getResolvedContent(element), {
50934
50937
  margin: 0,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-print-designer",
3
3
  "private": false,
4
- "version": "1.2.20",
4
+ "version": "1.2.21",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "main": "dist/print-designer.umd.js",