@wisemen/wise-invoicing-web 0.6.0 → 0.7.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.
Files changed (65) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-r9DcFi76.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-CsqBeAiA.js → BillingDocumentDetailViewDataProvider-TX-tovKU.js} +1506 -1427
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-thrvzGfh.js → BillingDocumentPdf-c-7N80u4.js} +5 -5
  5. package/dist/{CreditNoteDetailViewDataProvider-D6IMBwLn.js → CreditNoteDetailViewDataProvider-BNT0h67Q.js} +230 -223
  6. package/dist/{CreditNotePdfViewDataProvider-C4z1NE3Q.js → CreditNotePdfViewDataProvider-qgOuhUf_.js} +2 -2
  7. package/dist/{CustomFieldValueText-BRpCwCqJ.js → CustomFieldValueText-BP4bKQh7.js} +53 -38
  8. package/dist/{DunningCaseDetailViewDataProvider-DTotyRX8.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
  9. package/dist/{DunningCaseOverviewView-kDq7UY5e.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
  11. package/dist/{DunningCaseSendDialog-DVfBVtgr.js → DunningCaseSendDialog-DwB_jFum.js} +8 -8
  12. package/dist/{InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
  13. package/dist/{InvoiceApprovalOverviewView-B6naRElx.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
  14. package/dist/{InvoiceApprovalStatusBadge-CDc_Pwsm.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
  15. package/dist/{InvoiceApproveDialogDataProvider-CK6ij8X1.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
  16. package/dist/{InvoiceDetailViewDataProvider-BKurQPAV.js → InvoiceDetailViewDataProvider-B8mMYTQf.js} +592 -586
  17. package/dist/{InvoiceOverviewViewDataProvider-ChoyCi5L.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +440 -440
  18. package/dist/{InvoicePdfView-DLEKQ29O.js → InvoicePdfView-C518PlHp.js} +2 -2
  19. package/dist/{InvoicePdfViewDataProvider-C-b7iXiH.js → InvoicePdfViewDataProvider-ClfBkHUZ.js} +3 -3
  20. package/dist/{InvoicePublicPdfViewDataProvider-DZ4WQsvi.js → InvoicePublicPdfViewDataProvider-CoXBj3Je.js} +3 -3
  21. package/dist/{InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js → InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js} +3 -3
  22. package/dist/{InvoicingFileUploadProvider-t64Qiyn6.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
  23. package/dist/{IssuerSettingsViewDataProvider-Cc8R6ekd.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +3 -3
  24. package/dist/{PeppolSettingsViewDataProvider-DpVIfFVG.js → PeppolSettingsViewDataProvider-Cptga29B.js} +2 -2
  25. package/dist/{ReminderSettingsViewDataProvider-QOh3LpMX.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +4 -4
  26. package/dist/{api.util-Do9BEwG4.js → api.util-CR2xLnNj.js} +536 -515
  27. package/dist/{billingDocumentDetail.transformer-BAOQ3Zrg.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +8 -2
  28. package/dist/client/index.d.ts +1 -1
  29. package/dist/client/types.gen.d.ts +23 -17
  30. package/dist/client/zod.gen.d.ts +360 -0
  31. package/dist/composables/invoicingConfig.composable.d.ts +12 -0
  32. package/dist/{creditNoteDetail.query-C1rr54m1.js → creditNoteDetail.query-DGeG9_sO.js} +3 -3
  33. package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
  34. package/dist/{dist-CZAOPudv.js → dist-DALBiuub.js} +133 -133
  35. package/dist/{documentTitle.composable-C3k1m0Nz.js → documentTitle.composable-RvqrZTBa.js} +1 -1
  36. package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
  37. package/dist/{i18n.lib-Bkz_R954.js → i18n.lib-MOiHLIGc.js} +4 -0
  38. package/dist/index.d.ts +6 -2
  39. package/dist/index.js +219 -204
  40. package/dist/{invoice.service-DrI2ULIR.js → invoice.service-Fv4F4aZq.js} +3 -3
  41. package/dist/{invoiceApproval.service-Dpxiru7l.js → invoiceApproval.service-DJvXagC7.js} +2 -2
  42. package/dist/{invoiceApprovalStatus.util-CdOAcPzv.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
  43. package/dist/{invoiceCustomer.service-RRFosiYR.js → invoiceCustomer.service-CDyrtcwH.js} +2 -2
  44. package/dist/{invoiceDetail.query-BmtHdfj0.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
  45. package/dist/{invoiceIndexCache.util-DKtJorc_.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
  46. package/dist/{invoicingConfig.composable-CMTYHHS9.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
  47. package/dist/{issuerSettings.query-CKDhoStt.js → issuerSettings.query-CoiXblSm.js} +2 -2
  48. package/dist/libs/i18n.lib.d.ts +4 -0
  49. package/dist/locales/en-US.json.d.ts +2 -0
  50. package/dist/locales/nl-BE.json.d.ts +2 -0
  51. package/dist/modules/custom-field/components/CustomFieldList.vue.d.ts +0 -1
  52. package/dist/modules/custom-field/components/customFieldTypeIcon.d.ts +16 -0
  53. package/dist/modules/custom-field/components/customFieldValueText.spec.d.ts +1 -0
  54. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.d.ts +16 -0
  55. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.spec.d.ts +1 -0
  56. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.model.d.ts +1 -1
  57. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.util.d.ts +10 -0
  58. package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +1 -0
  59. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
  60. package/dist/{reminderConfig.query-yImUS5qt.js → reminderConfig.query-aRFzY6uZ.js} +2 -2
  61. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +114 -0
  62. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +57 -36
  63. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.d.ts +6 -1
  64. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.spec.d.ts +1 -0
  65. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { P as e, Q as t, T as n, W as r, Z as i, a, n as o } from "./dist-DCbLgB6Y.js";
1
+ import { $ as e, V as t, a as n, j as r, n as i, ot as a, st as o } from "./dist-BMzyJZTx.js";
2
2
  import { n as s } from "./dist-Cdbpkd3Y.js";
3
3
  import c from "zod";
4
4
  import { useI18n as l } from "vue-i18n";
@@ -33,7 +33,7 @@ var [Le, A] = Ie("filtersContext"), Re = /* @__PURE__ */ _({
33
33
  "popover-side": "bottom"
34
34
  }, {
35
35
  default: T(() => [g(w(Ee), {
36
- icon: w(i),
36
+ icon: w(a),
37
37
  label: w(t).t("component.filters.add_filter"),
38
38
  variant: "tertiary",
39
39
  size: "sm"
@@ -44,30 +44,30 @@ var [Le, A] = Ie("filtersContext"), Re = /* @__PURE__ */ _({
44
44
  }), ze = { class: "flex h-6 items-center rounded-sm border border-secondary select-none" }, j = /* @__PURE__ */ _({
45
45
  __name: "FiltersActiveBadgeBase",
46
46
  props: { filter: {} },
47
- setup(t) {
48
- let n = t, i = l(), { clearFilter: a } = A(), o = k({
49
- id: `clear-filter-${n.filter.key}`,
47
+ setup(n) {
48
+ let r = n, i = l(), { clearFilter: a } = A(), o = k({
49
+ id: `clear-filter-${r.filter.key}`,
50
50
  name: () => i.t("component.filters.remove_filter"),
51
51
  execute: () => {
52
- a(n.filter.key);
52
+ a(r.filter.key);
53
53
  },
54
54
  group: {
55
- name: () => n.filter.label,
55
+ name: () => r.filter.label,
56
56
  category: () => i.t("component.filters.action_category"),
57
57
  priority: Ne.HOVER
58
58
  },
59
- icon: () => e,
59
+ icon: () => t,
60
60
  keyboardShortcut: { key: "Backspace" }
61
61
  });
62
- return (e, t) => (b(), f(w(ce), { actions: [w(o)] }, {
63
- default: T(() => [h("div", ze, [C(e.$slots, "default"), n.filter.isPersistent === !0 ? p("", !0) : (b(), m(u, { key: 0 }, [g(w(ke), { orientation: "vertical" }), g(w(E), {
62
+ return (t, n) => (b(), f(w(ce), { actions: [w(o)] }, {
63
+ default: T(() => [h("div", ze, [C(t.$slots, "default"), r.filter.isPersistent === !0 ? p("", !0) : (b(), m(u, { key: 0 }, [g(w(ke), { orientation: "vertical" }), g(w(E), {
64
64
  action: w(o),
65
65
  "is-current-context-only": !0
66
66
  }, {
67
- default: T(({ keyboardShortcut: e, label: t }) => [g(w(Ee), {
68
- icon: w(r),
69
- "keyboard-shortcut": e,
70
- label: t,
67
+ default: T(({ keyboardShortcut: t, label: n }) => [g(w(Ee), {
68
+ icon: w(e),
69
+ "keyboard-shortcut": t,
70
+ label: n,
71
71
  size: "xs",
72
72
  variant: "tertiary",
73
73
  class: "rounded-l-none!"
@@ -184,8 +184,8 @@ var [Le, A] = Ie("filtersContext"), Re = /* @__PURE__ */ _({
184
184
  },
185
185
  emits: ["navigate"],
186
186
  setup(e, { emit: t }) {
187
- let r = e, i = t, { actionGroup: s } = A(), c = l(), f = d(() => {
188
- let { from: e, until: t } = r;
187
+ let a = e, o = t, { actionGroup: s } = A(), c = l(), f = d(() => {
188
+ let { from: e, until: t } = a;
189
189
  return e === null || t === null || e.equals(t) ? "day" : e.month === 1 && e.day === 1 && t.month === 12 && t.day === 31 && e.year === t.year ? "year" : e.day === 1 && t.equals(e.add({ months: 1 }).add({ days: -1 })) ? "month" : e.add({ days: 6 }).equals(t) ? "week" : "custom";
190
190
  }), p = d(() => {
191
191
  switch (f.value) {
@@ -208,76 +208,76 @@ var [Le, A] = Ie("filtersContext"), Re = /* @__PURE__ */ _({
208
208
  });
209
209
  function v(e) {
210
210
  let t = Temporal.Now.plainDateISO();
211
- if (r.from === null) {
212
- i("navigate", t, t);
211
+ if (a.from === null) {
212
+ o("navigate", t, t);
213
213
  return;
214
214
  }
215
- let n = r.from, a = r.until ?? n;
215
+ let n = a.from, r = a.until ?? n;
216
216
  switch (f.value) {
217
217
  case "day": {
218
218
  let t = n.add({ days: e });
219
- i("navigate", t, t);
219
+ o("navigate", t, t);
220
220
  break;
221
221
  }
222
222
  case "week":
223
- i("navigate", n.add({ weeks: e }), a.add({ weeks: e }));
223
+ o("navigate", n.add({ weeks: e }), r.add({ weeks: e }));
224
224
  break;
225
225
  case "month": {
226
226
  let t = n.add({ months: e });
227
- i("navigate", t, t.add({ months: 1 }).add({ days: -1 }));
227
+ o("navigate", t, t.add({ months: 1 }).add({ days: -1 }));
228
228
  break;
229
229
  }
230
230
  case "year": {
231
231
  let t = n.add({ years: e });
232
- i("navigate", t, t.with({
232
+ o("navigate", t, t.with({
233
233
  day: 31,
234
234
  month: 12
235
235
  }));
236
236
  break;
237
237
  }
238
238
  case "custom": {
239
- let t = a.since(n, { largestUnit: "day" }).days + 1;
240
- i("navigate", n.add({ days: e * t }), a.add({ days: e * t }));
239
+ let t = r.since(n, { largestUnit: "day" }).days + 1;
240
+ o("navigate", n.add({ days: e * t }), r.add({ days: e * t }));
241
241
  break;
242
242
  }
243
243
  }
244
244
  }
245
245
  let y = k({
246
- id: `${r.filterId}-previous`,
246
+ id: `${a.filterId}-previous`,
247
247
  isApplicable: (e) => e.menuType === void 0,
248
248
  name: () => p.value,
249
249
  execute: () => v(-1),
250
250
  group: s,
251
- icon: () => n,
251
+ icon: () => r,
252
252
  keyboardShortcut: { key: "ArrowLeft" }
253
253
  }), ee = k({
254
- id: `${r.filterId}-next`,
254
+ id: `${a.filterId}-next`,
255
255
  isApplicable: (e) => e.menuType === void 0,
256
256
  name: () => _.value,
257
257
  execute: () => v(1),
258
258
  group: s,
259
- icon: () => o,
259
+ icon: () => i,
260
260
  keyboardShortcut: { key: "ArrowRight" }
261
261
  });
262
262
  return Pe(k({
263
- id: `${r.filterId}-today`,
263
+ id: `${a.filterId}-today`,
264
264
  isApplicable: (e) => e.menuType === void 0,
265
265
  name: () => c.t("component.filters_date_navigation.today"),
266
266
  execute: () => {
267
267
  let e = Temporal.Now.plainDateISO();
268
- i("navigate", e, e);
268
+ o("navigate", e, e);
269
269
  },
270
270
  group: s,
271
- icon: () => a,
271
+ icon: () => n,
272
272
  keyboardShortcut: { key: "T" }
273
273
  })), (e, t) => (b(), m(u, null, [
274
274
  g(w(E), {
275
275
  action: w(y),
276
276
  "is-current-context-only": !1
277
277
  }, {
278
- default: T(({ label: e, keyboardShortcut: r }) => [g(w(le), {
278
+ default: T(({ label: e, keyboardShortcut: n }) => [g(w(le), {
279
279
  label: e,
280
- "keyboard-shortcut": r
280
+ "keyboard-shortcut": n
281
281
  }, {
282
282
  default: T(() => [g(w(D), null, {
283
283
  default: T(() => [h("button", {
@@ -285,7 +285,7 @@ var [Le, A] = Ie("filtersContext"), Re = /* @__PURE__ */ _({
285
285
  type: "button",
286
286
  class: "flex h-full w-4 shrink-0 items-center justify-center rounded-none! hover:bg-fg-primary/2 dark:hover:bg-fg-primary/5",
287
287
  onClick: t[0] ||= (e) => v(-1)
288
- }, [g(w(n), { class: "size-3.5 text-primary" })], 8, He)]),
288
+ }, [g(w(r), { class: "size-3.5 text-primary" })], 8, He)]),
289
289
  _: 2
290
290
  }, 1024)]),
291
291
  _: 2
@@ -309,7 +309,7 @@ var [Le, A] = Ie("filtersContext"), Re = /* @__PURE__ */ _({
309
309
  type: "button",
310
310
  class: "flex h-full w-4 shrink-0 items-center justify-center rounded-none! hover:bg-fg-primary/2 dark:hover:bg-fg-primary/5",
311
311
  onClick: t[1] ||= (e) => v(1)
312
- }, [g(w(o), { class: "size-3.5 text-primary" })], 8, Ue)]),
312
+ }, [g(w(i), { class: "size-3.5 text-primary" })], 8, Ue)]),
313
313
  _: 2
314
314
  }, 1024)]),
315
315
  _: 2
@@ -949,48 +949,48 @@ var qt = /* @__PURE__ */ _({
949
949
  initialValue: {}
950
950
  },
951
951
  emits: ["submit"],
952
- setup(e, { emit: t }) {
953
- let n = e, i = t, a = l(), o = ae(), s = Fe({
954
- schema: c.object({ value: c.number().min(n.filter.min ?? -(2 ** 53 - 1)).max(n.filter.max ?? 2 ** 53 - 1).nullable() }),
952
+ setup(t, { emit: n }) {
953
+ let r = t, i = n, a = l(), o = ae(), s = Fe({
954
+ schema: c.object({ value: c.number().min(r.filter.min ?? -(2 ** 53 - 1)).max(r.filter.max ?? 2 ** 53 - 1).nullable() }),
955
955
  onSubmit: (e) => {
956
956
  i("submit", {
957
- operator: n.initialValue.operator,
957
+ operator: r.initialValue.operator,
958
958
  value: e.value
959
959
  });
960
960
  }
961
- }), u = s.register("value", n.initialValue.value);
962
- return (e, t) => (b(), f(w(Te), {
961
+ }), u = s.register("value", r.initialValue.value);
962
+ return (t, n) => (b(), f(w(Te), {
963
963
  form: w(s),
964
964
  size: "xxs"
965
965
  }, {
966
966
  default: T(() => [
967
967
  g(w(be), {
968
- title: n.filter.label,
968
+ title: r.filter.label,
969
969
  "hide-description": !0,
970
- description: n.filter.label
970
+ description: r.filter.label
971
971
  }, null, 8, ["title", "description"]),
972
972
  g(w(me), null, {
973
973
  default: T(() => [h("label", {
974
974
  for: w(o),
975
975
  class: "sr-only"
976
- }, ie(n.filter.label), 9, Yt), g(w(De), y(w(Ae)(w(u)), {
976
+ }, ie(r.filter.label), 9, Yt), g(w(De), y(w(Ae)(w(u)), {
977
977
  id: w(o),
978
- "format-options": n.filter.formatOptions,
979
- placeholder: n.filter.placeholder ?? w(a).t("component.filters_number_dialog.placeholder")
978
+ "format-options": r.filter.formatOptions,
979
+ placeholder: r.filter.placeholder ?? w(a).t("component.filters_number_dialog.placeholder")
980
980
  }), {
981
- right: T(() => [n.filter.customUnit === void 0 ? p("", !0) : (b(), f(w(O), {
981
+ right: T(() => [r.filter.customUnit === void 0 ? p("", !0) : (b(), f(w(O), {
982
982
  key: 0,
983
- text: n.filter.customUnit,
983
+ text: r.filter.customUnit,
984
984
  truncate: !1,
985
985
  class: "mr-sm text-xs text-tertiary"
986
986
  }, null, 8, ["text"])), w(u).value.value === null ? p("", !0) : (b(), f(w(Ee), {
987
987
  key: 1,
988
- icon: w(r),
988
+ icon: w(e),
989
989
  label: w(a).t("component.filters_number_dialog.clear"),
990
990
  size: "xs",
991
991
  variant: "tertiary",
992
992
  class: "mr-xs",
993
- onClick: t[0] ||= (e) => w(u).setValue(null)
993
+ onClick: n[0] ||= (e) => w(u).setValue(null)
994
994
  }, null, 8, ["icon", "label"]))]),
995
995
  _: 1
996
996
  }, 16, [
@@ -1052,39 +1052,39 @@ function an(e) {
1052
1052
  function on(e) {
1053
1053
  return typeof e == "object" && !!e && "items" in e && "pagination" in e;
1054
1054
  }
1055
- function sn(n) {
1056
- let r = l(), i = Me(), a = i.create(Xt), o = i.create(qt), s = i.create(Jt), c = ae(), u = x(ee()), f = x(null), p = x(/* @__PURE__ */ new Set()), m = n.filters.map((e) => {
1057
- switch (e.type) {
1055
+ function sn(e) {
1056
+ let n = l(), r = Me(), i = r.create(Xt), a = r.create(qt), s = r.create(Jt), c = ae(), u = x(ee()), f = x(null), p = x(/* @__PURE__ */ new Set()), m = e.filters.map((t) => {
1057
+ switch (t.type) {
1058
1058
  case "multi-select":
1059
1059
  case "multi-autocomplete": return {
1060
1060
  action: k({
1061
- id: e.key,
1062
- name: e.label,
1063
- group: n.actionGroup,
1064
- icon: () => e.icon ?? null,
1061
+ id: t.key,
1062
+ name: t.label,
1063
+ group: e.actionGroup,
1064
+ icon: () => t.icon ?? null,
1065
1065
  multiSelectSubActions: !0,
1066
1066
  parentScoreInfluence: "none",
1067
1067
  searchSubActionsConfig: {
1068
1068
  minLength: 1,
1069
- placeholder: r.t("component.filters_listbox.filter_placeholder")
1069
+ placeholder: n.t("component.filters_listbox.filter_placeholder")
1070
1070
  },
1071
- subActions: async (t) => {
1072
- let n = await e.options(t.searchInput, t.getPaginationOffsetForSubActionId), r = on(n) ? n.items : n, i = u.value[e.key].value, a = (t.getPaginationOffsetForSubActionId(e.key) === null ? [...i, ...r.filter((e) => !i.some((t) => K.stringify(t) === K.stringify(e)))] : r.filter((e) => !i.some((t) => K.stringify(t) === K.stringify(e)))).map((t) => k({
1073
- id: K.stringify(t),
1074
- name: e.displayFn(t),
1071
+ subActions: async (e) => {
1072
+ let n = await t.options(e.searchInput, e.getPaginationOffsetForSubActionId), r = on(n) ? n.items : n, i = u.value[t.key].value, a = (e.getPaginationOffsetForSubActionId(t.key) === null ? [...i, ...r.filter((e) => !i.some((t) => K.stringify(t) === K.stringify(e)))] : r.filter((e) => !i.some((t) => K.stringify(t) === K.stringify(e)))).map((e) => k({
1073
+ id: K.stringify(e),
1074
+ name: t.displayFn(e),
1075
1075
  execute: () => {
1076
- let n = u.value[e.key], r = n.value;
1077
- r.some((e) => K.stringify(e) === K.stringify(t)) ? u.value[e.key] = {
1076
+ let n = u.value[t.key], r = n.value;
1077
+ r.some((t) => K.stringify(t) === K.stringify(e)) ? u.value[t.key] = {
1078
1078
  ...n,
1079
- value: r.filter((e) => K.stringify(e) !== K.stringify(t))
1080
- } : u.value[e.key] = {
1079
+ value: r.filter((t) => K.stringify(t) !== K.stringify(e))
1080
+ } : u.value[t.key] = {
1081
1081
  ...n,
1082
- value: [...r, t]
1082
+ value: [...r, e]
1083
1083
  };
1084
1084
  },
1085
1085
  parentScoreInfluence: "direct",
1086
- selected: () => u.value[e.key].value.some((e) => K.stringify(e) === K.stringify(t)),
1087
- skipFilterScoring: e.type === "multi-autocomplete" && !i.some((e) => K.stringify(e) === K.stringify(t))
1086
+ selected: () => u.value[t.key].value.some((t) => K.stringify(t) === K.stringify(e)),
1087
+ skipFilterScoring: t.type === "multi-autocomplete" && !i.some((t) => K.stringify(t) === K.stringify(e))
1088
1088
  }));
1089
1089
  return on(n) ? {
1090
1090
  actions: a,
@@ -1092,111 +1092,111 @@ function sn(n) {
1092
1092
  } : a;
1093
1093
  }
1094
1094
  }),
1095
- key: e.key
1095
+ key: t.key
1096
1096
  };
1097
1097
  case "boolean": return {
1098
1098
  action: k({
1099
- id: e.key,
1100
- name: e.entityLabel,
1101
- disabledReason: () => u.value[e.key] === null ? null : r.t("component.filters.boolean_filter_already_active"),
1099
+ id: t.key,
1100
+ name: t.entityLabel,
1101
+ disabledReason: () => u.value[t.key] === null ? null : n.t("component.filters.boolean_filter_already_active"),
1102
1102
  execute: () => {
1103
- u.value[e.key] = !0;
1103
+ u.value[t.key] = !0;
1104
1104
  },
1105
- group: n.actionGroup,
1106
- icon: () => e.icon ?? null,
1105
+ group: e.actionGroup,
1106
+ icon: () => t.icon ?? null,
1107
1107
  parentScoreInfluence: "none"
1108
1108
  }),
1109
- key: e.key,
1109
+ key: t.key,
1110
1110
  searchSubActionsConfig: { placeholder: "Filter..." }
1111
1111
  };
1112
1112
  case "number": return {
1113
1113
  action: k({
1114
- id: e.key,
1115
- name: e.label,
1114
+ id: t.key,
1115
+ name: t.label,
1116
1116
  execute: () => {
1117
- a.open({
1118
- filter: e,
1119
- initialValue: u.value[e.key],
1120
- onSubmit: (t) => {
1121
- u.value[e.key] = t, a.close();
1117
+ i.open({
1118
+ filter: t,
1119
+ initialValue: u.value[t.key],
1120
+ onSubmit: (e) => {
1121
+ u.value[t.key] = e, i.close();
1122
1122
  }
1123
1123
  });
1124
1124
  },
1125
- group: n.actionGroup,
1126
- icon: () => e.icon ?? null,
1125
+ group: e.actionGroup,
1126
+ icon: () => t.icon ?? null,
1127
1127
  parentScoreInfluence: "none"
1128
1128
  }),
1129
- key: e.key
1129
+ key: t.key
1130
1130
  };
1131
1131
  case "date": return {
1132
1132
  action: k({
1133
- id: e.key,
1134
- name: e.label,
1133
+ id: t.key,
1134
+ name: t.label,
1135
1135
  execute: () => {
1136
- o.open({
1137
- filter: e,
1138
- initialValue: u.value[e.key],
1139
- onSubmit: (t) => {
1140
- u.value[e.key] = t, o.close();
1136
+ a.open({
1137
+ filter: t,
1138
+ initialValue: u.value[t.key],
1139
+ onSubmit: (e) => {
1140
+ u.value[t.key] = e, a.close();
1141
1141
  }
1142
1142
  });
1143
1143
  },
1144
- group: n.actionGroup,
1145
- icon: () => e.icon ?? null,
1144
+ group: e.actionGroup,
1145
+ icon: () => t.icon ?? null,
1146
1146
  parentScoreInfluence: "none"
1147
1147
  }),
1148
- key: e.key
1148
+ key: t.key
1149
1149
  };
1150
1150
  case "date-range": return {
1151
1151
  action: k({
1152
- id: e.key,
1153
- name: e.label,
1152
+ id: t.key,
1153
+ name: t.label,
1154
1154
  execute: () => {
1155
1155
  s.open({
1156
- filter: e,
1157
- initialValue: u.value[e.key],
1158
- onSubmit: (t) => {
1159
- u.value[e.key] = t, s.close();
1156
+ filter: t,
1157
+ initialValue: u.value[t.key],
1158
+ onSubmit: (e) => {
1159
+ u.value[t.key] = e, s.close();
1160
1160
  }
1161
1161
  });
1162
1162
  },
1163
- group: n.actionGroup,
1164
- icon: () => e.icon ?? null,
1163
+ group: e.actionGroup,
1164
+ icon: () => t.icon ?? null,
1165
1165
  parentScoreInfluence: "none"
1166
1166
  }),
1167
- key: e.key
1167
+ key: t.key
1168
1168
  };
1169
1169
  default: throw Error("Unsupported filter type");
1170
1170
  }
1171
1171
  }), h = k({
1172
1172
  id: "clear-filters",
1173
1173
  isApplicable: (e) => p.value.size > 0 && e.menuType !== "contextualMenu",
1174
- name: () => r.t("component.filters.clear_filters"),
1174
+ name: () => n.t("component.filters.clear_filters"),
1175
1175
  execute: () => re(),
1176
- group: n.actionGroup,
1177
- icon: () => e,
1176
+ group: e.actionGroup,
1177
+ icon: () => t,
1178
1178
  keyboardShortcut: {
1179
1179
  key: "F",
1180
1180
  shift: !0
1181
1181
  }
1182
1182
  }), g = k({
1183
1183
  id: c,
1184
- name: () => r.t("component.filters.add_filters"),
1184
+ name: () => n.t("component.filters.add_filters"),
1185
1185
  forceAsRootMenu: !0,
1186
- group: n.actionGroup,
1187
- icon: () => t,
1188
- nameAsParent: r.t("component.filters_dropdown_menu.filter"),
1186
+ group: e.actionGroup,
1187
+ icon: () => o,
1188
+ nameAsParent: n.t("component.filters_dropdown_menu.filter"),
1189
1189
  searchSubActionsConfig: {
1190
1190
  minLength: 99,
1191
- placeholder: r.t("component.filters.add_filter_placeholder")
1191
+ placeholder: n.t("component.filters.add_filter_placeholder")
1192
1192
  },
1193
1193
  subActions: () => [...m.map((e) => e.action), k({
1194
1194
  id: "add-filters-action-clear-filters",
1195
1195
  isApplicable: (e) => p.value.size === 0 || e.menuType !== "contextualMenu" || e.metadata.filters?.hideClearAll === !0 ? !1 : e.searchInput.trim().length === 0,
1196
- name: () => r.t("component.filters.clear_filters"),
1196
+ name: () => n.t("component.filters.clear_filters"),
1197
1197
  execute: () => re(),
1198
- group: n.actionGroup,
1199
- icon: () => e,
1198
+ group: e.actionGroup,
1199
+ icon: () => t,
1200
1200
  keyboardShortcut: {
1201
1201
  key: "F",
1202
1202
  shift: !0
@@ -1209,7 +1209,7 @@ function sn(n) {
1209
1209
  action: ne(e.key)
1210
1210
  })).sort((e, t) => (e.isPersistent === !0 ? 0 : 1) - (t.isPersistent === !0 ? 0 : 1)));
1211
1211
  oe(u, () => {
1212
- for (let e of n.filters) v(e.key) ? p.value.add(e.key) : p.value.delete(e.key);
1212
+ for (let t of e.filters) v(t.key) ? p.value.add(t.key) : p.value.delete(t.key);
1213
1213
  }, {
1214
1214
  deep: !0,
1215
1215
  immediate: !0
@@ -1233,7 +1233,7 @@ function sn(n) {
1233
1233
  }
1234
1234
  }
1235
1235
  function ee() {
1236
- return n.filters.reduce((e, t) => (e[t.key] = t.defaultValue ?? te(t.key), e), {});
1236
+ return e.filters.reduce((e, t) => (e[t.key] = t.defaultValue ?? te(t.key), e), {});
1237
1237
  }
1238
1238
  function te(e) {
1239
1239
  switch (b(e).type) {
@@ -1260,8 +1260,8 @@ function sn(n) {
1260
1260
  };
1261
1261
  }
1262
1262
  }
1263
- function b(e) {
1264
- return n.filters.find((t) => t.key === e);
1263
+ function b(t) {
1264
+ return e.filters.find((e) => e.key === t);
1265
1265
  }
1266
1266
  function ne(e) {
1267
1267
  return m.find((t) => t.key === e).action;
@@ -1273,12 +1273,12 @@ function sn(n) {
1273
1273
  b(e).isPersistent !== !0 && (t && !y(e) || (u.value[e] = te(e), p.value.delete(e)));
1274
1274
  }
1275
1275
  function re() {
1276
- for (let e of n.filters) e.isPersistent !== !0 && (u.value[e.key] = te(e.key), p.value.delete(e.key));
1276
+ for (let t of e.filters) t.isPersistent !== !0 && (u.value[t.key] = te(t.key), p.value.delete(t.key));
1277
1277
  }
1278
1278
  Pe(h);
1279
1279
  let ie = {
1280
1280
  action: g,
1281
- actionGroup: n.actionGroup,
1281
+ actionGroup: e.actionGroup,
1282
1282
  activeFilters: _,
1283
1283
  clearAll: re,
1284
1284
  clearFilter: C,
@@ -2418,13 +2418,13 @@ function fr(e) {
2418
2418
  var pr = /* @__PURE__ */ _({
2419
2419
  __name: "FiltersDropdownMenu",
2420
2420
  setup(e) {
2421
- let n = l(), { action: r } = A(), i = x(!1);
2421
+ let t = l(), { action: n } = A(), r = x(!1);
2422
2422
  return dr("F", () => {
2423
- i.value = !0;
2424
- }), (e, a) => (b(), f(w(se), {
2425
- "is-open": i.value,
2426
- "onUpdate:isOpen": a[0] ||= (e) => i.value = e,
2427
- "parent-action": w(r),
2423
+ r.value = !0;
2424
+ }), (e, i) => (b(), f(w(se), {
2425
+ "is-open": r.value,
2426
+ "onUpdate:isOpen": i[0] ||= (e) => r.value = e,
2427
+ "parent-action": w(n),
2428
2428
  "popover-collision-padding": 10,
2429
2429
  "is-current-context-only": !1,
2430
2430
  "popover-align": "start",
@@ -2432,9 +2432,9 @@ var pr = /* @__PURE__ */ _({
2432
2432
  }, {
2433
2433
  default: T(() => [g(w(ue), {
2434
2434
  "keyboard-shortcut": { key: "F" },
2435
- "icon-left": w(t),
2436
- label: w(n).t("component.filters_dropdown_menu.filter"),
2437
- "tooltip-label": w(n).t("component.filters_dropdown_menu.add_filter"),
2435
+ "icon-left": w(o),
2436
+ label: w(t).t("component.filters_dropdown_menu.filter"),
2437
+ "tooltip-label": w(t).t("component.filters_dropdown_menu.add_filter"),
2438
2438
  variant: "secondary"
2439
2439
  }, null, 8, [
2440
2440
  "icon-left",
@@ -17,7 +17,7 @@ var i = /* @__PURE__ */ function(e) {
17
17
  }({}), d = /* @__PURE__ */ function(e) {
18
18
  return e.DRAFT = "draft", e.READY = "ready", e.FINALIZED = "finalized", e;
19
19
  }({}), f = /* @__PURE__ */ function(e) {
20
- return e.TEXT = "text", e.TEXT_ARRAY = "text_array", e.NUMBER = "number", e.BOOLEAN = "boolean", e.TIMESTAMP = "timestamp", e.DATE = "date", e.SINGLE_SELECT = "single_select", e.MULTI_SELECT = "multi_select", e.MONETARY = "monetary", e;
20
+ return e.TEXT = "text", e.TEXT_ARRAY = "text_array", e.NUMBER = "number", e.BOOLEAN = "boolean", e.TIMESTAMP = "timestamp", e.DATE = "date", e.SINGLE_SELECT = "single_select", e.MULTI_SELECT = "multi_select", e.MONETARY = "monetary", e.REFERENCE = "reference", e;
21
21
  }({}), p = /* @__PURE__ */ function(e) {
22
22
  return e._0 = "0", e._6 = "6", e._12 = "12", e._21 = "21", e;
23
23
  }({}), m = /* @__PURE__ */ function(e) {
@@ -3,6 +3,15 @@ var e = class {
3
3
  static findByDefinition(e, t) {
4
4
  return e.find((e) => e.definitionUuid === t) ?? null;
5
5
  }
6
+ static listByDefinitions(e, t) {
7
+ return e.flatMap((e) => {
8
+ let n = this.findByDefinition(t, e.uuid);
9
+ return n === null ? [] : [{
10
+ definition: e,
11
+ value: n
12
+ }];
13
+ });
14
+ }
6
15
  static upsert(e, t, n) {
7
16
  return n === null ? e.filter((e) => e.definitionUuid !== t) : e.some((e) => e.definitionUuid === t) ? e.map((e) => e.definitionUuid === t ? n : e) : [...e, n];
8
17
  }
@@ -14,6 +14,7 @@ var t = {
14
14
  "wise_invoicing.common.yes": "Yes",
15
15
  "wise_invoicing.custom_field.date.infinity": "∞",
16
16
  "wise_invoicing.custom_field.date.negative_infinity": "-∞",
17
+ "wise_invoicing.custom_field.reference.open": "Open {label}",
17
18
  "wise_invoicing.customer_invoice_list.title": "Invoices",
18
19
  "wise_invoicing.customer_invoice_list.empty_state.title": "No invoices found",
19
20
  "wise_invoicing.customer_invoice_list.empty_state.description": "This customer has no invoices yet.",
@@ -307,6 +308,7 @@ var t = {
307
308
  "wise_invoicing.invoice.detail.line_items.collapse_all_groups": "Collapse all groups",
308
309
  "wise_invoicing.invoice.detail.line_items.expand_all_groups": "Expand all groups",
309
310
  "wise_invoicing.invoice.detail.line_items.group_actions": "Group actions",
311
+ "wise_invoicing.invoice.detail.line_items.line_actions": "Line actions",
310
312
  "wise_invoicing.invoice.detail.line_items.group_total_breakdown": "How this total is made up",
311
313
  "wise_invoicing.invoice.detail.line_items.group_subgroup_count": "{count} subgroup | {count} subgroups",
312
314
  "wise_invoicing.invoice.detail.line_items.indent_row": "Move into group above",
@@ -954,6 +956,7 @@ var t = {
954
956
  "wise_invoicing.common.yes": "Ja",
955
957
  "wise_invoicing.custom_field.date.infinity": "∞",
956
958
  "wise_invoicing.custom_field.date.negative_infinity": "-∞",
959
+ "wise_invoicing.custom_field.reference.open": "{label} openen",
957
960
  "wise_invoicing.customer_invoice_list.title": "Facturen",
958
961
  "wise_invoicing.customer_invoice_list.empty_state.title": "Geen facturen gevonden",
959
962
  "wise_invoicing.customer_invoice_list.empty_state.description": "Deze klant heeft nog geen facturen.",
@@ -1247,6 +1250,7 @@ var t = {
1247
1250
  "wise_invoicing.invoice.detail.line_items.collapse_all_groups": "Alle groepen inklappen",
1248
1251
  "wise_invoicing.invoice.detail.line_items.expand_all_groups": "Alle groepen uitklappen",
1249
1252
  "wise_invoicing.invoice.detail.line_items.group_actions": "Groepsacties",
1253
+ "wise_invoicing.invoice.detail.line_items.line_actions": "Lijnacties",
1250
1254
  "wise_invoicing.invoice.detail.line_items.group_total_breakdown": "Opbouw van dit totaal",
1251
1255
  "wise_invoicing.invoice.detail.line_items.group_subgroup_count": "{count} subgroep | {count} subgroepen",
1252
1256
  "wise_invoicing.invoice.detail.line_items.indent_row": "Naar groep erboven verplaatsen",
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export { SortDirection, CustomFieldType as WiseInvoicingCustomFieldType, } from './client/index.ts';
1
+ export { SortDirection, CustomFieldEntityType as WiseInvoicingCustomFieldEntityType, CustomFieldType as WiseInvoicingCustomFieldType, } from './client/index.ts';
2
2
  export { onCreated } from './composables/created.composable.ts';
3
3
  export type { CurrencySymbol } from './composables/currency-format/useCurrencyFormat.composable.ts';
4
4
  export { toMajorUnits, toMinorUnits, useCurrencyFormat, } from './composables/currency-format/useCurrencyFormat.composable.ts';
5
5
  export { useDocumentTitle } from './composables/document-title/documentTitle.composable.ts';
6
- export type { InvoicingConfig as WiseInvoicingConfig, InvoicingInitProps as WiseInvoicingInitProps, } from './composables/invoicingConfig.composable.ts';
6
+ export type { InvoicingConfig as WiseInvoicingConfig, CustomFieldReference as WiseInvoicingCustomFieldReference, InvoicingInitProps as WiseInvoicingInitProps, } from './composables/invoicingConfig.composable.ts';
7
7
  export { initInvoicingConfig as initWiseInvoicingConfig } from './composables/invoicingConfig.composable.ts';
8
8
  export { useInvoicingConfig as useWiseInvoicingConfig } from './composables/invoicingConfig.composable.ts';
9
9
  export { useInvoicingQueryInvalidation as useWiseInvoicingQueryInvalidation } from './composables/invoicingQueryInvalidation.composable.ts';
@@ -136,6 +136,7 @@ export declare const wiseInvoicingLocales: {
136
136
  "wise_invoicing.common.yes": string;
137
137
  "wise_invoicing.custom_field.date.infinity": string;
138
138
  "wise_invoicing.custom_field.date.negative_infinity": string;
139
+ "wise_invoicing.custom_field.reference.open": string;
139
140
  "wise_invoicing.customer_invoice_list.title": string;
140
141
  "wise_invoicing.customer_invoice_list.empty_state.title": string;
141
142
  "wise_invoicing.customer_invoice_list.empty_state.description": string;
@@ -429,6 +430,7 @@ export declare const wiseInvoicingLocales: {
429
430
  "wise_invoicing.invoice.detail.line_items.collapse_all_groups": string;
430
431
  "wise_invoicing.invoice.detail.line_items.expand_all_groups": string;
431
432
  "wise_invoicing.invoice.detail.line_items.group_actions": string;
433
+ "wise_invoicing.invoice.detail.line_items.line_actions": string;
432
434
  "wise_invoicing.invoice.detail.line_items.group_total_breakdown": string;
433
435
  "wise_invoicing.invoice.detail.line_items.group_subgroup_count": string;
434
436
  "wise_invoicing.invoice.detail.line_items.indent_row": string;
@@ -1136,6 +1138,7 @@ export declare const wiseInvoicingLocales: {
1136
1138
  "wise_invoicing.common.yes": string;
1137
1139
  "wise_invoicing.custom_field.date.infinity": string;
1138
1140
  "wise_invoicing.custom_field.date.negative_infinity": string;
1141
+ "wise_invoicing.custom_field.reference.open": string;
1139
1142
  "wise_invoicing.customer_invoice_list.title": string;
1140
1143
  "wise_invoicing.customer_invoice_list.empty_state.title": string;
1141
1144
  "wise_invoicing.customer_invoice_list.empty_state.description": string;
@@ -1429,6 +1432,7 @@ export declare const wiseInvoicingLocales: {
1429
1432
  "wise_invoicing.invoice.detail.line_items.collapse_all_groups": string;
1430
1433
  "wise_invoicing.invoice.detail.line_items.expand_all_groups": string;
1431
1434
  "wise_invoicing.invoice.detail.line_items.group_actions": string;
1435
+ "wise_invoicing.invoice.detail.line_items.line_actions": string;
1432
1436
  "wise_invoicing.invoice.detail.line_items.group_total_breakdown": string;
1433
1437
  "wise_invoicing.invoice.detail.line_items.group_subgroup_count": string;
1434
1438
  "wise_invoicing.invoice.detail.line_items.indent_row": string;