@wisemen/wise-invoicing-web 0.7.0 → 0.9.0

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.
@@ -772,7 +772,8 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
772
772
  });
773
773
  return (e, t) => (b(!0), p(l, null, x(s.value, (e, t) => (b(), p("article", {
774
774
  key: `invoice-pdf-page-${t}`,
775
- class: v([t > 0 ? "\n mt-4xl\n print:mt-0\n " : "", "relative mx-auto box-border flex h-[297mm] w-[210mm] break-after-page flex-col overflow-hidden bg-primary px-5xl pt-5xl pb-2xl text-primary shadow-card [-webkit-print-color-adjust:exact] [page-break-after:always] [print-color-adjust:exact] last:break-after-auto last:[page-break-after:auto] print:mx-none print:min-h-auto print:w-auto print:shadow-none"])
775
+ class: v([t > 0 ? "\n mt-4xl\n print:mt-0\n " : "", "relative mx-auto box-border flex h-[297mm] w-[210mm] break-after-page flex-col overflow-hidden bg-primary px-5xl pt-5xl pb-2xl text-primary shadow-card [-webkit-print-color-adjust:exact] [page-break-after:always] [print-color-adjust:exact] last:break-after-auto last:[page-break-after:auto] print:mx-none print:min-h-auto print:w-auto print:shadow-none"]),
776
+ "data-pdf-page": ""
776
777
  }, [
777
778
  i.value ? (b(), d(ue, {
778
779
  key: 0,
@@ -798,4 +799,4 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
798
799
  }
799
800
  });
800
801
  //#endregion
801
- export { R as i, Q as n, Z as r, fe as t };
802
+ export { Q as n, Z as r, fe as t };
@@ -8,7 +8,7 @@ import { L as d, T as f, Tt as p, U as m, V as h, b as g, dt as _, i as ee, it a
8
8
  import { n as S, t as C } from "./dist-Cdbpkd3Y.js";
9
9
  import { t as w } from "./formango.util-D5c2ql--.js";
10
10
  import { n as T, r as E, t as D } from "./creditNoteDetail.query-DGeG9_sO.js";
11
- import { C as O, S as te, _ as k, a as ne, b as re, c as ie, d as ae, f as oe, g as se, h as ce, i as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e, v as ve, x as ye, y as be } from "./BillingDocumentDetailViewDataProvider-TX-tovKU.js";
11
+ import { C as O, S as te, _ as k, a as ne, b as re, c as ie, d as ae, f as oe, g as se, h as ce, i as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e, v as ve, x as ye, y as be } from "./BillingDocumentDetailViewDataProvider-LDF8-wk8.js";
12
12
  import { r as xe } from "./InvoicingFileUploadProvider-Dl1LvCPm.js";
13
13
  import Se, { z as A } from "zod";
14
14
  import { useI18n as j } from "vue-i18n";
@@ -0,0 +1,22 @@
1
+ import { n as e } from "./invoicingConfig.composable-UC7tGtBj.js";
2
+ import { t } from "./DataProvider-C3uEds9v.js";
3
+ import { t as n } from "./InvoicePdfView-BIDvRCr4.js";
4
+ import { t as r } from "./creditNoteDetail.query-DGeG9_sO.js";
5
+ import { useI18n as i } from "vue-i18n";
6
+ import { computed as a, createBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, openBlock as u, resolveDynamicComponent as d, unref as f, withCtx as p } from "vue";
7
+ import { UIText as m } from "@wisemen/vue-core-design-system";
8
+ //#region src/modules/credit-note/use-cases/pdf/views/CreditNotePdfViewDataProvider.vue?vue&type=script&setup=true&lang.ts
9
+ var h = { class: "flex min-h-screen items-center justify-center bg-secondary" }, g = /* @__PURE__ */ l({
10
+ __name: "CreditNotePdfViewDataProvider",
11
+ props: { creditNoteUuid: {} },
12
+ setup(l) {
13
+ let g = l, _ = i(), v = e(), y = a(() => v.invoicePdfComponent.value ?? n), b = r(a(() => g.creditNoteUuid));
14
+ return (e, n) => (u(), o(t, { queries: { invoice: f(b) } }, {
15
+ default: p(({ data: e }) => [(u(), o(d(y.value), { invoice: e.invoice }, null, 8, ["invoice"]))]),
16
+ loading: p(() => [s("div", h, [c(f(m), { text: f(_).t("wise_invoicing.common.loading") }, null, 8, ["text"])])]),
17
+ _: 1
18
+ }, 8, ["queries"]));
19
+ }
20
+ });
21
+ //#endregion
22
+ export { g as default };
@@ -16,7 +16,7 @@ import { t as Ae } from "./invoiceCustomer.service-CDyrtcwH.js";
16
16
  import { a as je, i as Me, n as Ne, r as Pe, t as Fe } from "./invoiceIndexCache.util-CLM7FO6z.js";
17
17
  import { n as Ie, t as Le } from "./InvoiceApprovalStatusBadge-D6Sr6JmN.js";
18
18
  import { t as Re } from "./issuerSettings.query-CoiXblSm.js";
19
- import { C as ze, S as Be, _ as Ve, a as He, b as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, x as ot, y as st } from "./BillingDocumentDetailViewDataProvider-TX-tovKU.js";
19
+ import { C as ze, S as Be, _ as Ve, a as He, b as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, x as ot, y as st } from "./BillingDocumentDetailViewDataProvider-LDF8-wk8.js";
20
20
  import { r as ct } from "./InvoicingFileUploadProvider-Dl1LvCPm.js";
21
21
  import { i as lt, n as ut, r as dt, t as ft } from "./InvoiceApproveDialogDataProvider-Bwb8bP1e.js";
22
22
  import { t as pt } from "./invoiceDetail.query-UHE0NCLh.js";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./documentTitle.composable-RvqrZTBa.js";
2
- import { t } from "./BillingDocumentPdf-c-7N80u4.js";
2
+ import { t } from "./BillingDocumentPdf-BYn3lUyl.js";
3
3
  import { useI18n as n } from "vue-i18n";
4
4
  import { computed as r, createElementBlock as i, createVNode as a, defineComponent as o, openBlock as s } from "vue";
5
5
  //#region src/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue?vue&type=script&setup=true&lang.ts
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./invoicingConfig.composable-UC7tGtBj.js";
2
2
  import { t } from "./DataProvider-C3uEds9v.js";
3
- import { t as n } from "./InvoicePdfView-C518PlHp.js";
3
+ import { t as n } from "./InvoicePdfView-BIDvRCr4.js";
4
4
  import { t as r } from "./invoiceDetail.query-UHE0NCLh.js";
5
5
  import { useI18n as i } from "vue-i18n";
6
6
  import { computed as a, createBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, openBlock as u, resolveDynamicComponent as d, unref as f, withCtx as p } from "vue";
@@ -2,7 +2,7 @@ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  import { n as t } from "./invoicingConfig.composable-UC7tGtBj.js";
3
3
  import { t as n } from "./invoice.service-Fv4F4aZq.js";
4
4
  import { t as r } from "./DataProvider-C3uEds9v.js";
5
- import { t as i } from "./InvoicePdfView-C518PlHp.js";
5
+ import { t as i } from "./InvoicePdfView-BIDvRCr4.js";
6
6
  import { useI18n as a } from "vue-i18n";
7
7
  import { computed as o, createBlock as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, openBlock as f, resolveDynamicComponent as p, unref as m, watch as h, withCtx as g } from "vue";
8
8
  import { useQuery as _ } from "@wisemen/vue-core-api-utils";
@@ -1,7 +1,7 @@
1
1
  import { n as e } from "./invoicingConfig.composable-UC7tGtBj.js";
2
2
  import { t } from "./invoice.service-Fv4F4aZq.js";
3
3
  import { t as n } from "./DataProvider-C3uEds9v.js";
4
- import { t as r } from "./InvoicePdfView-C518PlHp.js";
4
+ import { t as r } from "./InvoicePdfView-BIDvRCr4.js";
5
5
  import { useI18n as i } from "vue-i18n";
6
6
  import { computed as a, createBlock as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, openBlock as d, resolveDynamicComponent as f, unref as p, watch as m, withCtx as h } from "vue";
7
7
  import { useQuery as g } from "@wisemen/vue-core-api-utils";
@@ -23,9 +23,10 @@ export interface InvoicingInitProps {
23
23
  getCustomerDetailRoute?: (customerUuid: string) => RouteLocationRaw | null;
24
24
  getCustomFieldReferenceRoute?: (reference: CustomFieldReference) => RouteLocationRaw | null;
25
25
  /**
26
- * Renders the invoice PDF instead of the built-in layout, on both the in-app preview and the
27
- * public token route. It receives a single `invoice: InvoicePdfDetail` prop, so a host app can
28
- * ship its own invoice design without re-implementing the fetching or the token handling.
26
+ * Renders the invoice and credit note PDF instead of the built-in layout, in the detail page's PDF
27
+ * viewer, the in-app previews and the public token route. It receives a single `invoice: InvoicePdfDetail` prop,
28
+ * so a host app can ship its own invoice design without re-implementing the fetching or the token
29
+ * handling. Mark each page element with `data-pdf-page` so the viewer can count and navigate pages.
29
30
  */
30
31
  invoicePdfComponent?: Component;
31
32
  locale: MaybeRefOrGetter<string>;
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ import { t as ce } from "./DunningCaseDetailViewDataProvider-BNByfQTc.js";
21
21
  import { a as le, i as ue, l as A, n as de, o as fe, r as pe, s as me, t as j } from "./dist-DALBiuub.js";
22
22
  import { t as he } from "./DunningCaseReminderPdfViewDataProvider-D1avIVyK.js";
23
23
  import { t as ge } from "./ReminderSettingsViewDataProvider-BZgzQIxM.js";
24
- import { r as _e, t as ve } from "./InvoicePublicPdfViewDataProvider-CoXBj3Je.js";
24
+ import { r as _e, t as ve } from "./InvoicePublicPdfViewDataProvider-DS0Q-BEX.js";
25
25
  import { z as M } from "zod";
26
26
  import { useI18n as N } from "vue-i18n";
27
27
  import { Fragment as ye, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createTextVNode as be, createVNode as z, defineComponent as B, openBlock as V, toDisplayString as H, unref as U, withCtx as W } from "vue";
@@ -343,7 +343,7 @@ function it(e) {
343
343
  name: "invoicing-invoice-detail",
344
344
  props: !0,
345
345
  path: ":invoiceUuid",
346
- component: () => import("./InvoiceDetailViewDataProvider-B8mMYTQf.js"),
346
+ component: () => import("./InvoiceDetailViewDataProvider-BYYhc2v7.js"),
347
347
  meta: { permission: "invoice.read" }
348
348
  }]
349
349
  }]);
@@ -352,16 +352,16 @@ var at = Y([{
352
352
  name: "invoicing-invoice-pdf-preview",
353
353
  props: !0,
354
354
  path: "/invoicing/invoices/:invoiceUuid/pdf",
355
- component: () => import("./InvoicePdfViewDataProvider-ClfBkHUZ.js"),
355
+ component: () => import("./InvoicePdfViewDataProvider-Ct1HBqqa.js"),
356
356
  meta: { permission: "invoice.read" }
357
357
  }]), ot = Y([{
358
358
  name: "invoicing-invoice-public-pdf-preview",
359
359
  path: "/pdf",
360
- component: () => import("./InvoicePublicPdfViewDataProvider-CoXBj3Je.js").then((e) => e.n)
360
+ component: () => import("./InvoicePublicPdfViewDataProvider-DS0Q-BEX.js").then((e) => e.n)
361
361
  }, {
362
362
  name: "invoicing-invoice-public-pro-forma-pdf-preview",
363
363
  path: "/pro-forma-pdf",
364
- component: () => import("./InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js")
364
+ component: () => import("./InvoicePublicProFormaPdfViewDataProvider-DqWKGeAm.js")
365
365
  }]);
366
366
  //#endregion
367
367
  //#region src/routes/invoicingPublicRoutes.composable.ts
@@ -378,14 +378,14 @@ var ct = [{
378
378
  name: "invoicing-credit-note-detail",
379
379
  props: !0,
380
380
  path: ":creditNoteUuid",
381
- component: () => import("./CreditNoteDetailViewDataProvider-BNT0h67Q.js"),
381
+ component: () => import("./CreditNoteDetailViewDataProvider-rfc8cExF.js"),
382
382
  meta: { permission: "invoice.read" }
383
383
  }]
384
384
  }], lt = [{
385
385
  name: "invoicing-credit-note-pdf-preview",
386
386
  props: !0,
387
387
  path: "/invoicing/credit-notes/:creditNoteUuid/pdf",
388
- component: () => import("./CreditNotePdfViewDataProvider-qgOuhUf_.js"),
388
+ component: () => import("./CreditNotePdfViewDataProvider-Co4R7QJx.js"),
389
389
  meta: { permission: "invoice.read" }
390
390
  }];
391
391
  //#endregion