@wisemen/wise-invoicing-web 0.11.1 → 0.11.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.
Files changed (36) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-BEaLDJCs.js → ApprovalReminderSettingsViewDataProvider-BOzuwgOd.js} +3 -7
  2. package/dist/{BillingDocumentDetailViewDataProvider-lEoqq0aO.js → BillingDocumentDetailViewDataProvider-a3kGQ6K1.js} +77 -169
  3. package/dist/{BillingDocumentPdf-BChmqDnv.js → BillingDocumentPdf-DrOZdixo.js} +13 -19
  4. package/dist/{CreditNoteDetailViewDataProvider-IgfhVHNB.js → CreditNoteDetailViewDataProvider-9CTOmMw8.js} +8 -28
  5. package/dist/{CreditNotePdfViewDataProvider-CBQMNlLo.js → CreditNotePdfViewDataProvider-DX_y_ZIS.js} +3 -3
  6. package/dist/{CustomFieldValueText-TbpAeFXi.js → CustomFieldValueText-DZzqLZ0K.js} +1 -1
  7. package/dist/{DataProvider-C3uEds9v.js → DataProvider-BtnD-BzI.js} +1 -1
  8. package/dist/{DunningCaseSendDialog-DDlAJl-8.js → DunningCaseSendDialog-BFGLaor0.js} +4 -12
  9. package/dist/{InvoiceApprovalOutOfSyncIndicator-C4ZLDRiv.js → InvoiceApprovalOutOfSyncIndicator-Pc40MY4q.js} +1 -1
  10. package/dist/{InvoiceApprovalOverviewView-CmTPWWsc.js → InvoiceApprovalOverviewView-wBqCXtEF.js} +5 -13
  11. package/dist/{InvoiceApproveDialogDataProvider-CIeIkvgC.js → InvoiceApproveDialogDataProvider-DUeMi7qI.js} +11 -27
  12. package/dist/{InvoiceDetailViewDataProvider--DdALsMm.js → InvoiceDetailViewDataProvider-Dy4AN8tQ.js} +43 -117
  13. package/dist/{InvoicePdfView-DXxtuawk.js → InvoicePdfView-B-DBwFx-.js} +1 -1
  14. package/dist/{InvoicePdfViewDataProvider-DX5QXGge.js → InvoicePdfViewDataProvider-aRN8o_EF.js} +4 -4
  15. package/dist/{InvoicePublicProFormaPdfViewDataProvider-Dp5qqrtf.js → InvoicePublicProFormaPdfViewDataProvider-CGddJNyW.js} +4 -4
  16. package/dist/{IssuerSettingsViewDataProvider-Ca7GPCDE.js → IssuerSettingsViewDataProvider-BlKorJfv.js} +2 -6
  17. package/dist/{PeppolSettingsViewDataProvider-ZdJQGqux.js → PeppolSettingsViewDataProvider-CH0iMxBL.js} +4 -18
  18. package/dist/{dist-DALBiuub.js → dist-BZgvL8_m.js} +19 -30
  19. package/dist/{i18n.lib-Dn7eBA9l.js → i18n.lib-BkdaaKCs.js} +1 -1
  20. package/dist/index.js +4496 -227
  21. package/dist/{invoice.service-jakQLnDu.js → invoice.service-CXCNJz0L.js} +1 -1
  22. package/dist/{invoiceCustomer.service-Bp59E0ZJ.js → invoiceCustomer.service-CknXiBt9.js} +1 -1
  23. package/dist/{invoiceDetail.query-BBhA0ZAn.js → invoiceDetail.query-Cp9AnTrw.js} +1 -1
  24. package/dist/{invoiceIndexCache.util-Drx5EcfM.js → invoiceIndexCache.util-By0N8jal.js} +2 -6
  25. package/dist/{invoicingConfig.composable-BdQY3E3Q.js → invoicingConfig.composable-k8p1Y_eJ.js} +1 -1
  26. package/dist/locales/nl-BE.json.d.ts +1 -1
  27. package/dist/{src-DUSgQTKr.js → src-Vz2dm4sM.js} +1 -3
  28. package/package.json +2 -2
  29. package/dist/DunningCaseDetailViewDataProvider-BGrHh894.js +0 -439
  30. package/dist/DunningCaseOverviewView-BuN1k24H.js +0 -799
  31. package/dist/DunningCaseReminderPdfViewDataProvider-D-CfDeC8.js +0 -490
  32. package/dist/InvoiceOverviewViewDataProvider-Tkfl5mtR.js +0 -1929
  33. package/dist/InvoicePublicPdfViewDataProvider-DZYSpqtF.js +0 -45
  34. package/dist/ReminderSettingsViewDataProvider-onbGyWXX.js +0 -709
  35. package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
  36. /package/dist/{DunningCaseReminderPdfViewDataProvider.css → index.css} +0 -0
@@ -1,7 +1,7 @@
1
- import { t as e } from "./i18n.lib-Dn7eBA9l.js";
1
+ import { t as e } from "./i18n.lib-BkdaaKCs.js";
2
2
  import "./api.util-B3JqQVJA.js";
3
3
  import { s as t, t as n } from "./documentTitle.composable-RvqrZTBa.js";
4
- import { t as r } from "./DataProvider-C3uEds9v.js";
4
+ import { t as r } from "./DataProvider-BtnD-BzI.js";
5
5
  import { t as i } from "./formango.util-D5c2ql--.js";
6
6
  import { n as a, t as o } from "./invoiceApproval.service-DR9g1Dek.js";
7
7
  import { z as s } from "zod";
@@ -83,11 +83,7 @@ var I = 2, L = s.object({
83
83
  schema: R,
84
84
  onSubmit: async (e) => {
85
85
  let t = await T.execute({ body: e });
86
- if (t.isErr()) {
87
- x.apiError(t.error);
88
- return;
89
- }
90
- x.show({ message: h.t("wise_invoicing.invoice_approval.settings.success") });
86
+ t.isErr() ? x.apiError(t.error) : x.show({ message: h.t("wise_invoicing.invoice_approval.settings.success") });
91
87
  },
92
88
  onSubmitError: () => {
93
89
  x.unableToSave();
@@ -1,20 +1,20 @@
1
1
  import "./api.util-B3JqQVJA.js";
2
2
  import { O as e, _ as t, b as n, f as r, g as i, i as a, k as o, l as s, n as c, o as l, r as u, t as d, u as f, x as p } from "./documentTitle.composable-RvqrZTBa.js";
3
3
  import { n as m, r as h, t as g } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as _ } from "./invoicingConfig.composable-BdQY3E3Q.js";
5
- import { r as v, t as y } from "./invoice.service-jakQLnDu.js";
6
- import { r as b, t as x } from "./CustomFieldValueText-TbpAeFXi.js";
4
+ import { n as _ } from "./invoicingConfig.composable-k8p1Y_eJ.js";
5
+ import { r as v, t as y } from "./invoice.service-CXCNJz0L.js";
6
+ import { r as b, t as x } from "./CustomFieldValueText-DZzqLZ0K.js";
7
7
  import { n as S } from "./download.util-LyRpGWKA.js";
8
8
  import { t as ee } from "./percentage.util-Bl78kSSk.js";
9
9
  import { $ as C, B as te, C as ne, D as re, E as ie, J as ae, K as w, L as oe, M as se, O as ce, Q as le, R as ue, S as de, St as fe, Tt as pe, W as me, X as he, Y as ge, Z as _e, _ as ve, _t as ye, at as be, c as xe, ct as Se, et as Ce, f as we, ft as Te, g as Ee, gt as De, h as Oe, ht as ke, it as Ae, k as je, nt as Me, o as Ne, ot as Pe, p as Fe, q as Ie, r as Le, s as Re, t as ze, tt as Be, v as Ve, vt as He, w as Ue, wt as We, x as Ge, xt as Ke, y as qe, z as Je } from "./dist-BMzyJZTx.js";
10
10
  import { n as Ye } from "./dist-Cdbpkd3Y.js";
11
- import { t as Xe } from "./DataProvider-C3uEds9v.js";
11
+ import { t as Xe } from "./DataProvider-BtnD-BzI.js";
12
12
  import { t as Ze } from "./formango.util-D5c2ql--.js";
13
13
  import { t as Qe } from "./dist-BFx8U4Su.js";
14
14
  import { t as $e } from "./invoiceApprovalStatus.util-Nd4E3qlZ.js";
15
15
  import { t as et } from "./InvoiceApprovalStatusBadge-C2Wj9b_Z.js";
16
16
  import { t as tt } from "./dashboard-BaWGNEek.js";
17
- import { n as nt, r as rt, t as it } from "./BillingDocumentPdf-BChmqDnv.js";
17
+ import { n as nt, r as rt, t as it } from "./BillingDocumentPdf-DrOZdixo.js";
18
18
  import { n as at, r as ot, t as st } from "./InvoicingFileUploadProvider-BsK5eRGE.js";
19
19
  import ct, { z as T } from "zod";
20
20
  import { useI18n as E } from "vue-i18n";
@@ -564,7 +564,7 @@ var er = class {
564
564
  }
565
565
  let ie = L(null);
566
566
  return zt(ie, async () => {
567
- !t.hasNextPage || t.isFetchingNextPage || await t.fetchNextPage();
567
+ t.hasNextPage && !t.isFetchingNextPage && await t.fetchNextPage();
568
568
  }, { distance: 250 }), (e, n) => t.isLoading ? (I(), j("div", cr, [(I(), j(D, null, R(5, (e) => M("div", {
569
569
  key: e,
570
570
  class: "flex flex-col gap-xs px-xl py-lg"
@@ -909,17 +909,11 @@ var [Mr, Nr] = jr("BillingDocumentLineItemsTable"), Pr = [
909
909
  position: e.position,
910
910
  type: "group"
911
911
  }))].toSorted((e, t) => e.position - t.position);
912
- for (let i of r) {
913
- if (i.type === "line") {
914
- e.push(this.createBillingDocumentLineItemRowFromInvoiceLine(t, i.line));
915
- continue;
916
- }
917
- e.push(this.createBillingDocumentLineItemGroupRow(i.group, n.parentGroupId)), this.appendBillingDocumentEditorRows(e, t, {
918
- parentGroupId: i.group.uuid,
919
- groups: i.group.groups,
920
- lines: i.group.lines
921
- });
922
- }
912
+ for (let i of r) i.type === "line" ? e.push(this.createBillingDocumentLineItemRowFromInvoiceLine(t, i.line)) : (e.push(this.createBillingDocumentLineItemGroupRow(i.group, n.parentGroupId)), this.appendBillingDocumentEditorRows(e, t, {
913
+ parentGroupId: i.group.uuid,
914
+ groups: i.group.groups,
915
+ lines: i.group.lines
916
+ }));
923
917
  }
924
918
  static buildBillingDocumentLineItemsPayload(e, t) {
925
919
  let { groups: n, lines: r } = this.createBillingDocumentUpdateLevel(e, this.buildRowTree(t));
@@ -1093,24 +1087,20 @@ var [Mr, Nr] = jr("BillingDocumentLineItemsTable"), Pr = [
1093
1087
  }
1094
1088
  static createBillingDocumentUpdateLevel(e, t) {
1095
1089
  let n = [], r = [], i = 1;
1096
- for (let { row: a, children: o } of t) {
1097
- if (this.isGroupRow(a)) {
1098
- let t = this.createBillingDocumentUpdateLevel(e, o);
1099
- n.push({
1100
- name: this.trimOrNull(a.name) ?? `Group ${i}`,
1101
- customFields: a.customFields,
1102
- description: this.trimOrNull(a.description),
1103
- groups: t.groups,
1104
- lines: t.lines,
1105
- position: i
1106
- }), i += 1;
1107
- continue;
1108
- }
1109
- this.trimOrNull(a.name) !== null && (r.push({
1110
- ...this.createBillingDocumentUpdateLine(e, a),
1090
+ for (let { row: a, children: o } of t) if (this.isGroupRow(a)) {
1091
+ let t = this.createBillingDocumentUpdateLevel(e, o);
1092
+ n.push({
1093
+ name: this.trimOrNull(a.name) ?? `Group ${i}`,
1094
+ customFields: a.customFields,
1095
+ description: this.trimOrNull(a.description),
1096
+ groups: t.groups,
1097
+ lines: t.lines,
1111
1098
  position: i
1112
- }), i += 1);
1113
- }
1099
+ }), i += 1;
1100
+ } else this.trimOrNull(a.name) !== null && (r.push({
1101
+ ...this.createBillingDocumentUpdateLine(e, a),
1102
+ position: i
1103
+ }), i += 1);
1114
1104
  return {
1115
1105
  groups: n,
1116
1106
  lines: r
@@ -1215,19 +1205,13 @@ var [Mr, Nr] = jr("BillingDocumentLineItemsTable"), Pr = [
1215
1205
  return -1;
1216
1206
  }
1217
1207
  static flattenRowTree(e, t = null, n = []) {
1218
- for (let { row: r, children: i } of e) {
1219
- if (this.isGroupRow(r)) {
1220
- n.push(r.parentGroupId === t ? r : {
1221
- ...r,
1222
- parentGroupId: t
1223
- }), this.flattenRowTree(i, r.id, n);
1224
- continue;
1225
- }
1226
- n.push(r.groupId === t ? r : {
1227
- ...r,
1228
- groupId: t
1229
- });
1230
- }
1208
+ for (let { row: r, children: i } of e) this.isGroupRow(r) ? (n.push(r.parentGroupId === t ? r : {
1209
+ ...r,
1210
+ parentGroupId: t
1211
+ }), this.flattenRowTree(i, r.id, n)) : n.push(r.groupId === t ? r : {
1212
+ ...r,
1213
+ groupId: t
1214
+ });
1231
1215
  return n;
1232
1216
  }
1233
1217
  static getContainerLevel(e, t) {
@@ -1359,15 +1343,11 @@ var [Mr, Nr] = jr("BillingDocumentLineItemsTable"), Pr = [
1359
1343
  continue;
1360
1344
  }
1361
1345
  let e = this.collectRowTreeLineIds(o.children);
1362
- if (e.length > 0 && e.every((e) => t.has(e))) {
1363
- n.push({
1364
- height: r(o),
1365
- node: o,
1366
- path: a
1367
- });
1368
- continue;
1369
- }
1370
- i(o.children, [...a, o]);
1346
+ e.length > 0 && e.every((e) => t.has(e)) ? n.push({
1347
+ height: r(o),
1348
+ node: o,
1349
+ path: a
1350
+ }) : i(o.children, [...a, o]);
1371
1351
  }
1372
1352
  };
1373
1353
  i(e, []);
@@ -2084,7 +2064,7 @@ var ni = /* @__PURE__ */ P({
2084
2064
  o.mutations.ungroupGroup(n.group.id);
2085
2065
  }
2086
2066
  function Te(e) {
2087
- !o.isEditable.value || !(e.metaKey || e.ctrlKey) || l.value || (e.key === "]" ? (e.preventDefault(), Se()) : e.key === "[" && (e.preventDefault(), Ce()));
2067
+ o.isEditable.value && (e.metaKey || e.ctrlKey) && !l.value && (e.key === "]" ? (e.preventDefault(), Se()) : e.key === "[" && (e.preventDefault(), Ce()));
2088
2068
  }
2089
2069
  async function Ee() {
2090
2070
  await s.open({
@@ -2101,20 +2081,10 @@ var ni = /* @__PURE__ */ P({
2101
2081
  l.value && await ge(u.value);
2102
2082
  });
2103
2083
  async function Oe(e) {
2104
- if (!c.value?.contains(e.relatedTarget)) {
2105
- if (await _t(), !m.isValid.value) {
2106
- l.value = !0;
2107
- return;
2108
- }
2109
- await m.submit(), l.value = !1;
2110
- }
2084
+ c.value?.contains(e.relatedTarget) || (await _t(), m.isValid.value ? (await m.submit(), l.value = !1) : l.value = !0);
2111
2085
  }
2112
2086
  async function ke() {
2113
- if (await _t(), !m.isValid.value) {
2114
- g.onBlur();
2115
- return;
2116
- }
2117
- await m.submit(), l.value = !1;
2087
+ await _t(), m.isValid.value ? (await m.submit(), l.value = !1) : g.onBlur();
2118
2088
  }
2119
2089
  return Ht(() => m.state.value, async () => {
2120
2090
  o.isEditable.value && m.isValid.value && p(m.state.value) && await m.submit();
@@ -2478,11 +2448,7 @@ function Ei(e) {
2478
2448
  }
2479
2449
  }), u = O(() => i.value?.type === f.TIMESTAMP ? i.value.value.toZonedDateTimeISO(Gt.Now.timeZoneId()) : null);
2480
2450
  function d(e, t) {
2481
- if (e === null) {
2482
- i.value = null;
2483
- return;
2484
- }
2485
- i.value = {
2451
+ e === null ? i.value = null : i.value = {
2486
2452
  definitionUuid: n().uuid,
2487
2453
  type: f.TIMESTAMP,
2488
2454
  value: e.toZonedDateTime({
@@ -2990,7 +2956,7 @@ var Di = /* @__PURE__ */ P({
2990
2956
  return e.name === t.name && e.description === t.description && e.quantity === t.quantity && e.unit === t.unit && e.unitPrice === t.unitPrice && (e.discountPercentage?.getValue() ?? null) === t.discountPercentage && e.vatRate === t.vatRate;
2991
2957
  }
2992
2958
  return Nt(() => [g.state.value, g.isValid.value], async () => {
2993
- !o.isEditable.value || !g.isValid.value || fe(t.line, g.state.value) || await g.submit();
2959
+ o.isEditable.value && g.isValid.value && !fe(t.line, g.state.value) && await g.submit();
2994
2960
  }, { deep: !0 }), (e, r) => (I(), j("tr", {
2995
2961
  "data-line-item-row-id": t.line.id,
2996
2962
  "data-appearing": t.isAppearing ? "true" : void 0,
@@ -3272,29 +3238,7 @@ function Xi(e) {
3272
3238
  rowCount: d.length,
3273
3239
  rowIndex: f
3274
3240
  });
3275
- if (g !== null && (s === null || g.type !== "addLine" && g.type !== "deleteEmpty")) {
3276
- if (n.preventDefault(), s !== null && n.stopPropagation(), g.type === "blur") {
3277
- c.blur();
3278
- return;
3279
- }
3280
- if (g.type === "focusCell") {
3281
- r(g.rowIndex, g.colIndex);
3282
- return;
3283
- }
3284
- if (g.type === "addLine") {
3285
- a(e.addLineBelow(u), 0);
3286
- return;
3287
- }
3288
- if (g.type === "duplicate") {
3289
- a(e.duplicateLine(u), m);
3290
- return;
3291
- }
3292
- if (g.type === "indent" || g.type === "outdent") {
3293
- (g.type === "indent" ? e.indentRow(u) : e.outdentRow(u)) && a(u, m);
3294
- return;
3295
- }
3296
- a(e.deleteEmptyLine(u), 0);
3297
- }
3241
+ g !== null && (s === null || g.type !== "addLine" && g.type !== "deleteEmpty") && (n.preventDefault(), s !== null && n.stopPropagation(), g.type === "blur" ? c.blur() : g.type === "focusCell" ? r(g.rowIndex, g.colIndex) : g.type === "addLine" ? a(e.addLineBelow(u), 0) : g.type === "duplicate" ? a(e.duplicateLine(u), m) : g.type === "indent" || g.type === "outdent" ? (g.type === "indent" ? e.indentRow(u) : e.outdentRow(u)) && a(u, m) : a(e.deleteEmptyLine(u), 0));
3298
3242
  }
3299
3243
  async function a(e, t) {
3300
3244
  e !== null && (await _t(), n(e, t));
@@ -3427,8 +3371,7 @@ function Da() {
3427
3371
  }
3428
3372
  function Oa(e, t) {
3429
3373
  if (e == null) return {};
3430
- var n = {}, r = Object.keys(e), i, a;
3431
- for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
3374
+ for (var n = {}, r = Object.keys(e), i, a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
3432
3375
  return n;
3433
3376
  }
3434
3377
  function ka(e, t) {
@@ -3512,7 +3455,7 @@ function Ka() {
3512
3455
  return document.scrollingElement || document.documentElement;
3513
3456
  }
3514
3457
  function qa(e, t, n, r, i) {
3515
- if (!(!e.getBoundingClientRect && e !== window)) {
3458
+ if (e.getBoundingClientRect || e === window) {
3516
3459
  var a, o, s, c, l, u, d;
3517
3460
  if (e !== window && e.parentNode && e !== Ka() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Ma)) do
3518
3461
  if (i && i.getBoundingClientRect && (q(i, "transform") !== "none" || n && q(i, "position") !== "static")) {
@@ -3624,9 +3567,9 @@ function so(e) {
3624
3567
  function co(e, t, n) {
3625
3568
  var r = {};
3626
3569
  return Array.from(e.children).forEach(function(i) {
3627
- if (!(!Va(i, t.draggable, e, !1) || i.animated || i === n)) {
3570
+ if (Va(i, t.draggable, e, !1) && !i.animated && i !== n) {
3628
3571
  var a = qa(i);
3629
- r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
3572
+ r.left = Math.min(r.left ?? 1 / 0, a.left), r.top = Math.min(r.top ?? 1 / 0, a.top), r.right = Math.max(r.right ?? -1 / 0, a.right), r.bottom = Math.max(r.bottom ?? -1 / 0, a.bottom);
3630
3573
  }
3631
3574
  }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
3632
3575
  }
@@ -3658,19 +3601,18 @@ function uo() {
3658
3601
  },
3659
3602
  animateAll: function(n) {
3660
3603
  var r = this;
3661
- if (!this.options.animation) {
3662
- clearTimeout(t), typeof n == "function" && n();
3663
- return;
3604
+ if (!this.options.animation) clearTimeout(t), typeof n == "function" && n();
3605
+ else {
3606
+ var i = !1, a = 0;
3607
+ e.forEach(function(e) {
3608
+ var t = 0, n = e.target, o = n.fromRect, s = qa(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Wa(n, !0);
3609
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && no(c, s) && !no(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = po(u, c, l, r.options)), no(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
3610
+ n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
3611
+ }, t), n.thisAnimationDuration = t);
3612
+ }), clearTimeout(t), i ? t = setTimeout(function() {
3613
+ typeof n == "function" && n();
3614
+ }, a) : typeof n == "function" && n(), e = [];
3664
3615
  }
3665
- var i = !1, a = 0;
3666
- e.forEach(function(e) {
3667
- var t = 0, n = e.target, o = n.fromRect, s = qa(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Wa(n, !0);
3668
- d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && no(c, s) && !no(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = po(u, c, l, r.options)), no(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
3669
- n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
3670
- }, t), n.thisAnimationDuration = t);
3671
- }), clearTimeout(t), i ? t = setTimeout(function() {
3672
- typeof n == "function" && n();
3673
- }, a) : typeof n == "function" && n(), e = [];
3674
3616
  },
3675
3617
  animate: function(e, t, n, r) {
3676
3618
  if (r) {
@@ -3709,7 +3651,7 @@ var mo = [], ho = { initializeByDefault: !0 }, go = {
3709
3651
  initializePlugins: function(e, t, n, r) {
3710
3652
  for (var i in mo.forEach(function(r) {
3711
3653
  var i = r.pluginName;
3712
- if (!(!e.options[i] && !r.initializeByDefault)) {
3654
+ if (e.options[i] || r.initializeByDefault) {
3713
3655
  var a = new r(e, t, e.options);
3714
3656
  a.sortable = e, a.options = e.options, e[i] = a, Da(n, a.defaults);
3715
3657
  }
@@ -3814,7 +3756,7 @@ var J, Y, X, Z, xo, So, Q, Co, wo, To, Eo, Do, Oo, ko, Ao = !1, jo = !1, Mo = []
3814
3756
  var n;
3815
3757
  return Mo.some(function(r) {
3816
3758
  var i = r[lo].options.emptyInsertThreshold;
3817
- if (!(!i || Xa(r))) {
3759
+ if (i && !Xa(r)) {
3818
3760
  var a = qa(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
3819
3761
  if (o && s) return n = r;
3820
3762
  }
@@ -3953,15 +3895,11 @@ $.prototype = {
3953
3895
  clientX: (t || e).clientX,
3954
3896
  clientY: (t || e).clientY
3955
3897
  }, Lo = No.clientX - c.left, Ro = No.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, J.style["will-change"] = "all", s = function() {
3956
- if (yo("delayEnded", r, { evt: e }), $.eventCanceled) {
3957
- r._onDrop();
3958
- return;
3959
- }
3960
- r._disableDelayedDragEvents(), !Pa && r.nativeDraggable && (J.draggable = !0), r._triggerDragStart(e, t), bo({
3898
+ yo("delayEnded", r, { evt: e }), $.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Pa && r.nativeDraggable && (J.draggable = !0), r._triggerDragStart(e, t), bo({
3961
3899
  sortable: r,
3962
3900
  name: "choose",
3963
3901
  originalEvent: e
3964
- }), Ua(J, a.chosenClass, !0);
3902
+ }), Ua(J, a.chosenClass, !0));
3965
3903
  }, a.ignore.split(",").forEach(function(e) {
3966
3904
  Ga(J, e.trim(), us);
3967
3905
  }), G(o, "dragover", os), G(o, "mousemove", os), G(o, "touchmove", os), G(o, "mouseup", r._onDrop), G(o, "touchend", r._onDrop), G(o, "touchcancel", r._onDrop), Pa && this.nativeDraggable && (this.options.touchStartThreshold = 4, J.draggable = !0), yo("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Na || Ma))) {
@@ -4056,16 +3994,12 @@ $.prototype = {
4056
3994
  },
4057
3995
  _onDragStart: function(e, t) {
4058
3996
  var n = this, r = e.dataTransfer, i = n.options;
4059
- if (yo("dragStart", this, { evt: e }), $.eventCanceled) {
4060
- this._onDrop();
4061
- return;
4062
- }
4063
- yo("setupClone", this), $.eventCanceled || (Q = so(J), Q.removeAttribute("id"), Q.draggable = !1, Q.style["will-change"] = "", this._hideClone(), Ua(Q, this.options.chosenClass, !1), $.clone = Q), n.cloneId = vs(function() {
3997
+ yo("dragStart", this, { evt: e }), $.eventCanceled ? this._onDrop() : (yo("setupClone", this), $.eventCanceled || (Q = so(J), Q.removeAttribute("id"), Q.draggable = !1, Q.style["will-change"] = "", this._hideClone(), Ua(Q, this.options.chosenClass, !1), $.clone = Q), n.cloneId = vs(function() {
4064
3998
  yo("clone", n), !$.eventCanceled && (n.options.removeCloneOnHide || Z.insertBefore(Q, J), n._hideClone(), bo({
4065
3999
  sortable: n,
4066
4000
  name: "clone"
4067
4001
  }));
4068
- }), !t && Ua(J, i.dragClass, !0), t ? (jo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (K(document, "mouseup", n._onDrop), K(document, "touchend", n._onDrop), K(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, J)), G(document, "drop", n), q(J, "transform", "translateZ(0)")), Ao = !0, n._dragStartId = vs(n._dragStarted.bind(n, t, e)), G(document, "selectstart", n), zo = !0, Fa && q(document.body, "user-select", "none");
4002
+ }), !t && Ua(J, i.dragClass, !0), t ? (jo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (K(document, "mouseup", n._onDrop), K(document, "touchend", n._onDrop), K(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, J)), G(document, "drop", n), q(J, "transform", "translateZ(0)")), Ao = !0, n._dragStartId = vs(n._dragStarted.bind(n, t, e)), G(document, "selectstart", n), zo = !0, Fa && q(document.body, "user-select", "none"));
4069
4003
  },
4070
4004
  _onDragOver: function(e) {
4071
4005
  var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = $.active, l = Oo === s, u = o.sort, d = ko || c, f, p = this, m = !1;
@@ -4151,11 +4085,7 @@ $.prototype = {
4151
4085
  },
4152
4086
  _onDrop: function(e) {
4153
4087
  var t = this.el, n = this.options;
4154
- if (To = Za(J), Do = Za(J, n.draggable), yo("drop", this, { evt: e }), Y = J && J.parentNode, To = Za(J), Do = Za(J, n.draggable), $.eventCanceled) {
4155
- this._nulling();
4156
- return;
4157
- }
4158
- Ao = !1, Uo = !1, Ho = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ys(this.cloneId), ys(this._dragStartId), this.nativeDraggable && (K(document, "drop", this), K(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Fa && q(document.body, "user-select", ""), q(J, "transform", ""), e && (zo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), X && X.parentNode && X.parentNode.removeChild(X), (Z === Y || ko && ko.lastPutMode !== "clone") && Q && Q.parentNode && Q.parentNode.removeChild(Q), J && (this.nativeDraggable && K(J, "dragend", this), us(J), J.style["will-change"] = "", zo && !Ao && Ua(J, ko ? ko.options.ghostClass : this.options.ghostClass, !1), Ua(J, this.options.chosenClass, !1), bo({
4088
+ To = Za(J), Do = Za(J, n.draggable), yo("drop", this, { evt: e }), Y = J && J.parentNode, To = Za(J), Do = Za(J, n.draggable), $.eventCanceled || (Ao = !1, Uo = !1, Ho = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ys(this.cloneId), ys(this._dragStartId), this.nativeDraggable && (K(document, "drop", this), K(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Fa && q(document.body, "user-select", ""), q(J, "transform", ""), e && (zo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), X && X.parentNode && X.parentNode.removeChild(X), (Z === Y || ko && ko.lastPutMode !== "clone") && Q && Q.parentNode && Q.parentNode.removeChild(Q), J && (this.nativeDraggable && K(J, "dragend", this), us(J), J.style["will-change"] = "", zo && !Ao && Ua(J, ko ? ko.options.ghostClass : this.options.ghostClass, !1), Ua(J, this.options.chosenClass, !1), bo({
4159
4089
  sortable: this,
4160
4090
  name: "unchoose",
4161
4091
  toEl: Y,
@@ -4199,7 +4129,7 @@ $.prototype = {
4199
4129
  name: "end",
4200
4130
  toEl: Y,
4201
4131
  originalEvent: e
4202
- }), this.save()))), this._nulling();
4132
+ }), this.save())))), this._nulling();
4203
4133
  },
4204
4134
  _nulling: function() {
4205
4135
  yo("nulling", this), Z = J = Y = X = xo = Q = So = Co = No = Po = zo = To = Do = wo = Eo = Bo = Vo = ko = Oo = $.dragged = $.ghost = $.clone = $.active = null, Jo.forEach(function(e) {
@@ -4259,11 +4189,8 @@ $.prototype = {
4259
4189
  }
4260
4190
  },
4261
4191
  _showClone: function(e) {
4262
- if (e.lastPutMode !== "clone") {
4263
- this._hideClone();
4264
- return;
4265
- }
4266
- if (Co) {
4192
+ if (e.lastPutMode !== "clone") this._hideClone();
4193
+ else if (Co) {
4267
4194
  if (yo("showClone", this), $.eventCanceled) return;
4268
4195
  J.parentNode == Z && !this.options.group.revertClone ? Z.insertBefore(Q, J) : xo ? Z.insertBefore(Q, xo) : Z.appendChild(Q), this.options.group.revertClone && this.animate(J, Q), q(Q, "display", ""), Co = !1;
4269
4196
  }
@@ -4509,16 +4436,11 @@ function Us(...e) {
4509
4436
  }
4510
4437
  function m(e) {
4511
4438
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
4512
- if (ma(t, n, r), o === "clone") {
4513
- ha(s);
4514
- return;
4515
- }
4516
- if (ht(i)) {
4439
+ if (ma(t, n, r), o === "clone") ha(s);
4440
+ else if (ht(i)) {
4517
4441
  let e = [...B(i)];
4518
4442
  i.value = ua(e, a);
4519
- return;
4520
- }
4521
- ua(B(i), a);
4443
+ } else ua(B(i), a);
4522
4444
  }
4523
4445
  function h(e) {
4524
4446
  if (d) {
@@ -4529,9 +4451,7 @@ function Us(...e) {
4529
4451
  if (ha(n), ma(t, n, r), ht(i)) {
4530
4452
  let e = [...B(i)];
4531
4453
  i.value = sa(e, a, o);
4532
- return;
4533
- }
4534
- sa(B(i), a, o);
4454
+ } else sa(B(i), a, o);
4535
4455
  }
4536
4456
  function g(e) {
4537
4457
  let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
@@ -4701,10 +4621,10 @@ function Js(e) {
4701
4621
  e !== null && (e.style.minHeight = d);
4702
4622
  }
4703
4623
  function h() {
4704
- typeof document > "u" || (l = document.body.style.userSelect, u = document.body.style.webkitUserSelect, document.body.style.userSelect = "none", document.body.style.webkitUserSelect = "none", window.getSelection()?.removeAllRanges());
4624
+ typeof document < "u" && (l = document.body.style.userSelect, u = document.body.style.webkitUserSelect, document.body.style.userSelect = "none", document.body.style.webkitUserSelect = "none", window.getSelection()?.removeAllRanges());
4705
4625
  }
4706
4626
  function g() {
4707
- typeof document > "u" || (document.body.style.userSelect = l, document.body.style.webkitUserSelect = u);
4627
+ typeof document < "u" && (document.body.style.userSelect = l, document.body.style.webkitUserSelect = u);
4708
4628
  }
4709
4629
  function _() {
4710
4630
  t.value = !1, x(), m(), g();
@@ -5587,7 +5507,7 @@ function yc(e) {
5587
5507
  }
5588
5508
  let g = Rt(c, 500);
5589
5509
  return Nt(g, async () => {
5590
- !i.value || t.value || !r.value || await m();
5510
+ i.value && !t.value && r.value && await m();
5591
5511
  }), {
5592
5512
  isSaving: a,
5593
5513
  saveNow: m,
@@ -5606,11 +5526,7 @@ function Sc(e) {
5606
5526
  let { hasSaveError: t, isEditable: n, baselineRowsKey: r, billingDocument: i, rows: a, selection: o, meta: s } = e;
5607
5527
  function c(e = { clearSelection: !1 }) {
5608
5528
  let s = W.createBillingDocumentLineItemDisplayRows(i(), n.value);
5609
- if (a.value = W.syncBillingDocumentLineItemRowsWithServer(s, a.value), r.value = W.createBillingDocumentLineItemRowsKey(a.value), t.value = !1, e.clearSelection) {
5610
- o.clearSelection();
5611
- return;
5612
- }
5613
- o.syncSelection();
5529
+ a.value = W.syncBillingDocumentLineItemRowsWithServer(s, a.value), r.value = W.createBillingDocumentLineItemRowsKey(a.value), t.value = !1, e.clearSelection ? o.clearSelection() : o.syncSelection();
5614
5530
  }
5615
5531
  function l() {
5616
5532
  c({ clearSelection: !0 });
@@ -5743,18 +5659,10 @@ function Cc(e) {
5743
5659
  t.value = t.value.filter((t) => e.has(t));
5744
5660
  }
5745
5661
  function c(e) {
5746
- if (o(e)) {
5747
- t.value = t.value.filter((t) => t !== e);
5748
- return;
5749
- }
5750
- t.value = [...t.value, e];
5662
+ o(e) ? t.value = t.value.filter((t) => t !== e) : t.value = [...t.value, e];
5751
5663
  }
5752
5664
  function l() {
5753
- if (r.value) {
5754
- t.value = [];
5755
- return;
5756
- }
5757
- t.value = n.value.map((e) => e.id);
5665
+ r.value ? t.value = [] : t.value = n.value.map((e) => e.id);
5758
5666
  }
5759
5667
  function u() {
5760
5668
  t.value = [];
@@ -1,7 +1,7 @@
1
1
  import "./api.util-B3JqQVJA.js";
2
2
  import { b as e, x as t } from "./documentTitle.composable-RvqrZTBa.js";
3
3
  import { n, t as r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as i } from "./invoicingConfig.composable-BdQY3E3Q.js";
4
+ import { n as i } from "./invoicingConfig.composable-k8p1Y_eJ.js";
5
5
  import { n as a } from "./address.transformer-jGddczLV.js";
6
6
  import { bt as o } from "./dist-BMzyJZTx.js";
7
7
  import { i as s } from "./billingDocumentDetail.transformer-CcnSe7Fz.js";
@@ -20,24 +20,18 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
20
20
  kind: "group",
21
21
  position: e.position
22
22
  }))].toSorted((e, t) => e.position - t.position);
23
- for (let t of a) {
24
- if (t.kind === "line") {
25
- e.push({
26
- depth: r,
27
- line: t.line,
28
- type: "line"
29
- });
30
- continue;
31
- }
32
- e.push({
33
- uuid: t.group.uuid,
34
- name: t.group.name,
35
- depth: r,
36
- description: t.group.description,
37
- total: this.getGroupTotal(s.flattenLines([t.group]), i),
38
- type: "group"
39
- }), this.appendRows(e, t.group.lines, t.group.groups, r + 1, i);
40
- }
23
+ for (let t of a) t.kind === "line" ? e.push({
24
+ depth: r,
25
+ line: t.line,
26
+ type: "line"
27
+ }) : (e.push({
28
+ uuid: t.group.uuid,
29
+ name: t.group.name,
30
+ depth: r,
31
+ description: t.group.description,
32
+ total: this.getGroupTotal(s.flattenLines([t.group]), i),
33
+ type: "group"
34
+ }), this.appendRows(e, t.group.lines, t.group.groups, r + 1, i));
41
35
  }
42
36
  static avoidGroupRowOrphans(e) {
43
37
  let t = e.map((e) => [...e]);
@@ -1,14 +1,14 @@
1
- import { t as e } from "./i18n.lib-Dn7eBA9l.js";
1
+ import { t as e } from "./i18n.lib-BkdaaKCs.js";
2
2
  import "./api.util-B3JqQVJA.js";
3
3
  import { b as t, r as n } from "./documentTitle.composable-RvqrZTBa.js";
4
4
  import { n as r } from "./address.transformer-jGddczLV.js";
5
- import { a as i, i as a, n as o, r as s, t as c } from "./CustomFieldValueText-TbpAeFXi.js";
5
+ import { a as i, i as a, n as o, r as s, t as c } from "./CustomFieldValueText-DZzqLZ0K.js";
6
6
  import { n as l, t as u } from "./download.util-LyRpGWKA.js";
7
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 as v, nt as y, q as b, u as x } from "./dist-BMzyJZTx.js";
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-BVbXoNt-.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-lEoqq0aO.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-a3kGQ6K1.js";
12
12
  import { r as xe } from "./InvoicingFileUploadProvider-BsK5eRGE.js";
13
13
  import Se, { z as A } from "zod";
14
14
  import { useI18n as j } from "vue-i18n";
@@ -104,11 +104,7 @@ var Ye = /* @__PURE__ */ R({
104
104
  schema: Se.object({}),
105
105
  onSubmit: async () => {
106
106
  let e = await s.execute({ params: { creditNoteUuid: n.creditNote.uuid } });
107
- if (e.isErr()) {
108
- o.apiError(e.error);
109
- return;
110
- }
111
- o.show({ message: c.value }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" });
107
+ e.isErr() ? o.apiError(e.error) : (o.show({ message: c.value }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" }));
112
108
  }
113
109
  });
114
110
  return (e, t) => (V(), P(H(Re), {
@@ -139,11 +135,7 @@ function Xe(e) {
139
135
  creditNoteUuid: e.value.uuid,
140
136
  invoiceUuid: y.value
141
137
  } });
142
- if (t.isErr()) {
143
- r.apiError(t.error);
144
- return;
145
- }
146
- r.show({ message: n.t("wise_invoicing.credit_note.mark_as_ready.success") });
138
+ t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.mark_as_ready.success") });
147
139
  }
148
140
  async function S() {
149
141
  let t = await c.execute({ params: {
@@ -153,11 +145,7 @@ function Xe(e) {
153
145
  return t.isErr() ? (r.apiError(t.error), !1) : (r.show({ message: n.t("wise_invoicing.credit_note.finalize.success") }), !0);
154
146
  }
155
147
  async function C() {
156
- if (v.value) {
157
- await S();
158
- return;
159
- }
160
- await s.open({
148
+ v.value ? await S() : await s.open({
161
149
  billingDocumentType: "credit_note",
162
150
  onConfirm: S
163
151
  });
@@ -167,19 +155,11 @@ function Xe(e) {
167
155
  creditNoteUuid: e.value.uuid,
168
156
  invoiceUuid: y.value
169
157
  } });
170
- if (t.isErr()) {
171
- r.apiError(t.error);
172
- return;
173
- }
174
- r.show({ message: n.t("wise_invoicing.credit_note.mark_as_draft.success") });
158
+ t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.mark_as_draft.success") });
175
159
  }
176
160
  async function E() {
177
161
  let t = await _.execute({ params: { creditNoteUuid: e.value.uuid } });
178
- if (t.isErr()) {
179
- r.apiError(t.error);
180
- return;
181
- }
182
- r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
162
+ t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
183
163
  }
184
164
  async function D() {
185
165
  await a.open({ creditNote: e.value });
@@ -1,6 +1,6 @@
1
- import { n as e } from "./invoicingConfig.composable-BdQY3E3Q.js";
2
- import { t } from "./DataProvider-C3uEds9v.js";
3
- import { t as n } from "./InvoicePdfView-DXxtuawk.js";
1
+ import { n as e } from "./invoicingConfig.composable-k8p1Y_eJ.js";
2
+ import { t } from "./DataProvider-BtnD-BzI.js";
3
+ import { t as n } from "./InvoicePdfView-B-DBwFx-.js";
4
4
  import { t as r } from "./creditNoteDetail.query-BVbXoNt-.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";
@@ -1,7 +1,7 @@
1
1
  import { Z as e, t } from "./api.util-B3JqQVJA.js";
2
2
  import { b as n, u as r, y as i } from "./documentTitle.composable-RvqrZTBa.js";
3
3
  import { r as a } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as o } from "./invoicingConfig.composable-BdQY3E3Q.js";
4
+ import { n as o } from "./invoicingConfig.composable-k8p1Y_eJ.js";
5
5
  import { n as s } from "./dist-Cdbpkd3Y.js";
6
6
  import { useI18n as c } from "vue-i18n";
7
7
  import { computed as l, createBlock as u, createTextVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
@@ -64,7 +64,7 @@ var p = /* @__PURE__ */ o({
64
64
  let e = {};
65
65
  for (let t in n.queries) {
66
66
  let r = t, i = n.queries[r].result.value;
67
- i == null || !i.isOk() || (e[r] = i.getValue());
67
+ i != null && i.isOk() && (e[r] = i.getValue());
68
68
  }
69
69
  return e;
70
70
  });